Salome HOME
bos #19182: GEOM appears in Object browser when calling SMESH from python
[modules/geom.git] / src / GEOM_SWIG / geomBuilder.py
1 #  -*- coding: iso-8859-1 -*-
2 # Copyright (C) 2007-2020  CEA/DEN, EDF R&D, OPEN CASCADE
3 #
4 # This library is free software; you can redistribute it and/or
5 # modify it under the terms of the GNU Lesser General Public
6 # License as published by the Free Software Foundation; either
7 # version 2.1 of the License, or (at your option) any later version.
8 #
9 # This library is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12 # Lesser General Public License for more details.
13 #
14 # You should have received a copy of the GNU Lesser General Public
15 # License along with this library; if not, write to the Free Software
16 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
17 #
18 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
19 #
20
21 #  GEOM GEOM_SWIG : binding of C++ implementation with Python
22 #  File   : geomBuilder.py
23 #  Author : Paul RASCLE, EDF
24 #  Module : GEOM
25
26 """
27     \namespace geomBuilder
28     \brief Module geomBuilder
29 """
30
31 ##
32 ## @defgroup geomBuilder geomBuilder Python module
33 ## @{
34 ##
35 ## @details
36 ##
37 ## By default, all functions of geomBuilder Python module do not publish
38 ## resulting geometrical objects. This can be done in the Python script
39 ## by means of \ref geomBuilder.geomBuilder.addToStudy() "addToStudy()"
40 ## or \ref geomBuilder.geomBuilder.addToStudyInFather() "addToStudyInFather()"
41 ## functions.
42 ##
43 ## However, it is possible to publish result data in the study
44 ## automatically. For this, almost each function of
45 ## \ref geomBuilder.geomBuilder "geomBuilder" class has
46 ## an additional @a theName parameter (@c None by default).
47 ## As soon as non-empty string value is passed to this parameter,
48 ## the result object is published in the study automatically.
49 ##
50 ## For example, consider the following Python script:
51 ##
52 ## @code
53 ## import salome
54 ## from salome.geom import geomBuilder
55 ## geompy = geomBuilder.New()
56 ## box = geompy.MakeBoxDXDYDZ(100, 100, 100) # box is not published in the study yet
57 ## geompy.addToStudy(box, "box")             # explicit publishing
58 ## @endcode
59 ##
60 ## Last two lines can be replaced by one-line instruction:
61 ##
62 ## @code
63 ## box = geompy.MakeBoxDXDYDZ(100, 100, 100, theName="box") # box is published in the study with "box" name
64 ## @endcode
65 ##
66 ## ... or simply
67 ##
68 ## @code
69 ## box = geompy.MakeBoxDXDYDZ(100, 100, 100, "box") # box is published in the study with "box" name
70 ## @endcode
71 ##
72 ## Note, that some functions produce more than one geometrical objects. For example,
73 ## \ref geomBuilder.geomBuilder.GetNonBlocks() "GetNonBlocks()" function returns two objects:
74 ## group of all non-hexa solids and group of all non-quad faces.
75 ## For such functions it is possible to specify separate names for results.
76 ##
77 ## For example
78 ##
79 ## @code
80 ## # create and publish cylinder
81 ## cyl = geompy.MakeCylinderRH(100, 100, "cylinder")
82 ## # get non blocks from cylinder
83 ## g1, g2 = geompy.GetNonBlocks(cyl, theName="nonblock")
84 ## @endcode
85 ##
86 ## Above example will publish both result compounds (first with non-hexa solids and
87 ## second with non-quad faces) as two items, both named "nonblock".
88 ## However, if second command is invoked as
89 ##
90 ## @code
91 ## g1, g2 = geompy.GetNonBlocks(cyl, theName=("nonhexa", "nonquad"))
92 ## @endcode
93 ##
94 ## ... the first compound will be published with "nonhexa" name, and second will be named "nonquad".
95 ##
96 ## Automatic publication of all results can be also enabled/disabled by means of the function
97 ## \ref geomBuilder.geomBuilder.addToStudyAuto() "addToStudyAuto()". The automatic publishing
98 ## is managed by the numeric parameter passed to this function:
99 ## - if @a maxNbSubShapes = 0, automatic publishing is disabled.
100 ## - if @a maxNbSubShapes = -1 (default), automatic publishing is enabled and
101 ##   maximum number of sub-shapes allowed for publishing is unlimited; any negative
102 ##   value passed as parameter has the same effect.
103 ## - if @a maxNbSubShapes is any positive value, automatic publishing is enabled and
104 ##   maximum number of sub-shapes allowed for publishing is set to specified value.
105 ##
106 ## When automatic publishing is enabled, you even do not need to pass @a theName parameter
107 ## to the functions creating objects, instead default names will be used. However, you
108 ## can always change the behavior, by passing explicit name to the @a theName parameter
109 ## and it will be used instead default one.
110 ## The publishing of the collections of objects will be done according to the above
111 ## mentioned rules (maximum allowed number of sub-shapes).
112 ##
113 ## For example:
114 ##
115 ## @code
116 ## import salome
117 ## from salome.geom import geomBuilder
118 ## geompy = geomBuilder.New()
119 ## geompy.addToStudyAuto() # enable automatic publication
120 ## box = geompy.MakeBoxDXDYDZ(100, 100, 100)
121 ## # the box is created and published in the study with default name
122 ## geompy.addToStudyAuto(5) # set max allowed number of sub-shapes to 5
123 ## vertices = geompy.SubShapeAll(box, geomBuilder.ShapeType['VERTEX'])
124 ## # only 5 first vertices will be published, with default names
125 ## print len(vertices)
126 ## # note, that result value still contains all 8 vertices
127 ## geompy.addToStudyAuto(-1) # disable automatic publication
128 ## @endcode
129 ##
130 ## This feature can be used, for example, for debugging purposes.
131 ##
132 ## @note
133 ## - Use automatic publication feature with caution. When it is enabled, any function of
134 ##   \ref geomBuilder.geomBuilder "geomBuilder" class publishes the results in the study,
135 ##   that can lead to the huge size of the study data tree.
136 ##   For example, repeating call of \ref geomBuilder.geomBuilder.SubShapeAll() "SubShapeAll()"
137 ##   command on the same main shape each time will publish all child objects, that will lead
138 ##   to a lot of duplicated items in the study.
139 ## - Sub-shapes are automatically published as child items of the parent main shape in the study if main
140 ##   shape was also published before. Otherwise, sub-shapes are published as top-level objects.
141 ## - Some functions of \ref geomBuilder.geomBuilder "geomBuilder" class do not have
142 ##   \a theName parameter (and, thus, do not support automatic publication).
143 ##   For example, some transformation operations like
144 ##   \ref geomBuilder.geomBuilder.TranslateDXDYDZ() "TranslateDXDYDZ()".
145 ##   Refer to the documentation to check if some function has such possibility.
146 ##
147 ## It is possible to customize the representation of the geometrical
148 ## data in the data tree; this can be done by using folders. A folder can
149 ## be created in the study tree using function
150 ## \ref geomBuilder.geomBuilder.NewFolder() "NewFolder()"
151 ## (by default it is created under the "Geometry" root object).
152 ## As soon as folder is created, any published geometry object
153 ## can be moved into it.
154 ##
155 ## For example:
156 ##
157 ## @code
158 ## import salome
159 ## from salome.geom import geomBuilder
160 ## geompy = geomBuilder.New()
161 ## box = geompy.MakeBoxDXDYDZ(100, 100, 100, "Box")
162 ## # the box was created and published in the study
163 ## folder = geompy.NewFolder("Primitives")
164 ## # an empty "Primitives" folder was created under default "Geometry" root object
165 ## geompy.PutToFolder(box, folder)
166 ## # the box was moved into "Primitives" folder
167 ## @endcode
168 ##
169 ## Subfolders are also can be created by specifying another folder as a parent:
170 ##
171 ## @code
172 ## subfolder = geompy.NewFolder("3D", folder)
173 ## # "3D" folder was created under "Primitives" folder
174 ## @endcode
175 ##
176 ## @note
177 ## - Folder container is just a representation layer object that
178 ## deals with already published objects only. So, any geometry object
179 ## should be published in the study (for example, with
180 ## \ref geomBuilder.geomBuilder.PutToFolder() "addToStudy()" function)
181 ## BEFORE moving it into any existing folder.
182 ## - \ref geomBuilder.geomBuilder.PutToFolder() "PutToFolder()" function
183 ## does not change physical position of geometry object in the study tree,
184 ## it only affects on the representation of the data tree.
185 ## - It is impossible to publish geometry object using any folder as father.
186 ##
187 ##  \defgroup l1_publish_data
188 ##  \defgroup l1_geomBuilder_auxiliary
189 ##  \defgroup l1_geomBuilder_purpose
190 ## @}
191
192 ## @defgroup l1_publish_data Publishing results in SALOME study
193
194 ## @defgroup l1_geomBuilder_auxiliary Auxiliary data structures and methods
195
196 ## @defgroup l1_geomBuilder_purpose   All package methods, grouped by their purpose
197 ## @{
198 ##   @defgroup l2_import_export Importing/exporting geometrical objects
199 ##   @defgroup l2_creating      Creating geometrical objects
200 ##   @{
201 ##     @defgroup l3_basic_go      Creating Basic Geometric Objects
202 ##     @{
203 ##       @defgroup l4_curves        Creating Curves
204
205 ##     @}
206 ##     @defgroup l3_3d_primitives Creating 3D Primitives
207 ##     @defgroup l3_complex       Creating Complex Objects
208 ##     @defgroup l3_groups        Working with groups
209 ##     @defgroup l3_blocks        Building by blocks
210 ##     @{
211 ##       @defgroup l4_blocks_measure Check and Improve
212
213 ##     @}
214 ##     @defgroup l3_sketcher      Sketcher
215 ##     @defgroup l3_advanced      Creating Advanced Geometrical Objects
216 ##     @{
217 ##       @defgroup l4_decompose     Decompose objects
218 ##       @defgroup l4_decompose_d   Decompose objects deprecated methods
219 ##       @defgroup l4_access        Access to sub-shapes by their unique IDs inside the main shape
220 ##       @defgroup l4_obtain        Access to sub-shapes by a criteria
221 ##       @defgroup l4_advanced      Advanced objects creation functions
222
223 ##     @}
224
225 ##   @}
226 ##   @defgroup l2_transforming  Transforming geometrical objects
227 ##   @{
228 ##     @defgroup l3_basic_op      Basic Operations
229 ##     @defgroup l3_boolean       Boolean Operations
230 ##     @defgroup l3_transform     Transformation Operations
231 ##     @defgroup l3_transform_d   Transformation Operations deprecated methods
232 ##     @defgroup l3_local         Local Operations (Fillet, Chamfer and other Features)
233 ##     @defgroup l3_blocks_op     Blocks Operations
234 ##     @defgroup l3_healing       Repairing Operations
235 ##     @defgroup l3_restore_ss    Restore presentation parameters and a tree of sub-shapes
236
237 ##   @}
238 ##   @defgroup l2_measure       Using measurement tools
239 ##   @defgroup l2_field         Field on Geometry
240
241 ## @}
242
243 import omniORB
244
245 # initialize SALOME session in try/except block
246 # to avoid problems in some cases, e.g. when generating documentation
247 try:
248     import salome
249     salome.salome_init()
250     from salome import *
251 except:
252     pass
253
254 from salome_notebook import *
255
256 import GEOM
257 import math
258 import os
259 import functools
260
261 from salome.geom.gsketcher import Sketcher3D, Sketcher2D, Polyline2D
262
263 # In case the omniORBpy EnumItem class does not fully support Python 3
264 # (for instance in version 4.2.1-2), the comparison ordering methods must be
265 # defined
266 #
267 try:
268     GEOM.COMPOUND < GEOM.SOLID
269 except TypeError:
270     def enumitem_eq(self, other):
271         try:
272             if isinstance(other, omniORB.EnumItem):
273                 if other._parent_id == self._parent_id:
274                     return self._v == other._v
275                 else:
276                     return self._parent_id == other._parent_id
277             else:
278                 return id(self) == id(other)
279         except:
280             return id(self) == id(other)
281
282     def enumitem_lt(self, other):
283         try:
284             if isinstance(other, omniORB.EnumItem):
285                 if other._parent_id == self._parent_id:
286                     return self._v < other._v
287                 else:
288                     return self._parent_id < other._parent_id
289             else:
290                 return id(self) < id(other)
291         except:
292             return id(self) < id(other)
293
294     def enumitem_le(self, other):
295         try:
296             if isinstance(other, omniORB.EnumItem):
297                 if other._parent_id == self._parent_id:
298                     return self._v <= other._v
299                 else:
300                     return self._parent_id <= other._parent_id
301             else:
302                 return id(self) <= id(other)
303         except:
304             return id(self) <= id(other)
305
306     def enumitem_gt(self, other):
307         try:
308             if isinstance(other, omniORB.EnumItem):
309                 if other._parent_id == self._parent_id:
310                     return self._v > other._v
311                 else:
312                     return self._parent_id > other._parent_id
313             else:
314                 return id(self) > id(other)
315         except:
316             return id(self) > id(other)
317
318     def enumitem_ge(self, other):
319         try:
320             if isinstance(other, omniORB.EnumItem):
321                 if other._parent_id == self._parent_id:
322                     return self._v >= other._v
323                 else:
324                     return self._parent_id >= other._parent_id
325             else:
326                 return id(self) >= id(other)
327         except:
328             return id(self) >= id(other)
329
330     GEOM.omniORB.EnumItem.__eq__ = enumitem_eq
331     GEOM.omniORB.EnumItem.__lt__ = enumitem_lt
332     GEOM.omniORB.EnumItem.__le__ = enumitem_le
333     GEOM.omniORB.EnumItem.__gt__ = enumitem_gt
334     GEOM.omniORB.EnumItem.__ge__ = enumitem_ge
335     omniORB.EnumItem.__eq__ = enumitem_eq
336     omniORB.EnumItem.__lt__ = enumitem_lt
337     omniORB.EnumItem.__le__ = enumitem_le
338     omniORB.EnumItem.__gt__ = enumitem_gt
339     omniORB.EnumItem.__ge__ = enumitem_ge
340
341 # service function
342 def _toListOfNames(_names, _size=-1):
343     l = []
344     import types
345     if type(_names) in [list, tuple]:
346         for i in _names: l.append(i)
347     elif _names:
348         l.append(_names)
349     if l and len(l) < _size:
350         for i in range(len(l), _size): l.append("%s_%d"%(l[0],i))
351     return l
352
353 # Decorator function to manage transactions for all geometric operations.
354 def ManageTransactions(theOpeName):
355     def MTDecorator(theFunction):
356         # To keep the original function name an documentation.
357         @functools.wraps(theFunction)
358         def OpenCallClose(self, *args, **kwargs):
359             # Open transaction
360             anOperation = getattr(self, theOpeName)
361             anOperation.StartOperation()
362             try:
363                 # Call the function
364                 res = theFunction(self, *args, **kwargs)
365                 # Commit transaction
366                 anOperation.FinishOperation()
367                 return res
368             except:
369                 # Abort transaction
370                 anOperation.AbortOperation()
371                 raise
372         return OpenCallClose
373     return MTDecorator
374
375 ## Raise an Error, containing the Method_name, if Operation is Failed
376 ## @ingroup l1_geomBuilder_auxiliary
377 def RaiseIfFailed (Method_name, Operation):
378     if not Operation.IsDone() and Operation.GetErrorCode() != "NOT_FOUND_ANY":
379         raise RuntimeError(Method_name + " : " + Operation.GetErrorCode())
380
381 ## Return list of variables value from salome notebook
382 ## @ingroup l1_geomBuilder_auxiliary
383 def ParseParameters(*parameters):
384     Result = []
385     StringResult = []
386     for parameter in parameters:
387         if isinstance(parameter, list):
388             lResults = ParseParameters(*parameter)
389             if len(lResults) > 0:
390                 Result.append(lResults[:-1])
391                 StringResult += lResults[-1].split(":")
392                 pass
393             pass
394         else:
395             if isinstance(parameter,str):
396                 if notebook.isVariable(parameter):
397                     Result.append(notebook.get(parameter))
398                 else:
399                     raise RuntimeError("Variable with name '" + parameter + "' doesn't exist!!!")
400                 pass
401             else:
402                 Result.append(parameter)
403                 pass
404             StringResult.append(str(parameter))
405             pass
406         pass
407     if Result:
408         Result.append(":".join(StringResult))
409     else:
410         Result = ":".join(StringResult)
411     return Result
412
413 ## Return list of variables value from salome notebook
414 ## @ingroup l1_geomBuilder_auxiliary
415 def ParseList(list):
416     Result = []
417     StringResult = ""
418     for parameter in list:
419         if isinstance(parameter,str) and notebook.isVariable(parameter):
420             Result.append(str(notebook.get(parameter)))
421             pass
422         else:
423             Result.append(str(parameter))
424             pass
425
426         StringResult = StringResult + str(parameter)
427         StringResult = StringResult + ":"
428         pass
429     StringResult = StringResult[:len(StringResult)-1]
430     return Result, StringResult
431
432 ## Return list of variables value from salome notebook
433 ## @ingroup l1_geomBuilder_auxiliary
434 def ParseSketcherCommand(command):
435     Result = ""
436     StringResult = ""
437     sections = command.split(":")
438     for section in sections:
439         parameters = section.split(" ")
440         paramIndex = 1
441         for parameter in parameters:
442             if paramIndex > 1 and parameter.find("'") != -1:
443                 parameter = parameter.replace("'","")
444                 if notebook.isVariable(parameter):
445                     Result = Result + str(notebook.get(parameter)) + " "
446                     pass
447                 else:
448                     raise RuntimeError("Variable with name '" + parameter + "' doesn't exist!!!")
449                     pass
450                 pass
451             else:
452                 Result = Result + str(parameter) + " "
453                 pass
454             if paramIndex > 1:
455                 StringResult = StringResult + parameter
456                 StringResult = StringResult + ":"
457                 pass
458             paramIndex = paramIndex + 1
459             pass
460         Result = Result[:len(Result)-1] + ":"
461         pass
462     Result = Result[:len(Result)-1]
463     return Result, StringResult
464
465 ## Helper function which can be used to pack the passed string to the byte data.
466 ## Only '1' an '0' symbols are valid for the string. The missing bits are replaced by zeroes.
467 ## If the string contains invalid symbol (neither '1' nor '0'), the function raises an exception.
468 ## For example,
469 ## \code
470 ## val = PackData("10001110") # val = 0xAE
471 ## val = PackData("1")        # val = 0x80
472 ## \endcode
473 ## @param data unpacked data - a string containing '1' and '0' symbols
474 ## @return data packed to the byte stream
475 ## @ingroup l1_geomBuilder_auxiliary
476 def PackData(data):
477     """
478     Helper function which can be used to pack the passed string to the byte data.
479     Only '1' an '0' symbols are valid for the string. The missing bits are replaced by zeroes.
480     If the string contains invalid symbol (neither '1' nor '0'), the function raises an exception.
481
482     Parameters:
483         data unpacked data - a string containing '1' and '0' symbols
484
485     Returns:
486         data packed to the byte stream
487
488     Example of usage:
489         val = PackData("10001110") # val = 0xAE
490         val = PackData("1")        # val = 0x80
491     """
492     bytes = len(data)/8
493     if len(data)%8: bytes += 1
494     res = ""
495     for b in range(bytes):
496         d = data[b*8:(b+1)*8]
497         val = 0
498         for i in range(8):
499             val *= 2
500             if i < len(d):
501                 if d[i] == "1": val += 1
502                 elif d[i] != "0":
503                     raise "Invalid symbol %s" % d[i]
504                 pass
505             pass
506         res += chr(val)
507         pass
508     return res
509
510 ## Read bitmap texture from the text file.
511 ## In that file, any non-zero symbol represents '1' opaque pixel of the bitmap.
512 ## A zero symbol ('0') represents transparent pixel of the texture bitmap.
513 ## The function returns width and height of the pixmap in pixels and byte stream representing
514 ## texture bitmap itself.
515 ##
516 ## This function can be used to read the texture to the byte stream in order to pass it to
517 ## the AddTexture() function of geomBuilder class.
518 ## For example,
519 ## \code
520 ## from salome.geom import geomBuilder
521 ## geompy = geomBuilder.New()
522 ## texture = geompy.readtexture('mytexture.dat')
523 ## texture = geompy.AddTexture(*texture)
524 ## obj.SetMarkerTexture(texture)
525 ## \endcode
526 ## @param fname texture file name
527 ## @return sequence of tree values: texture's width, height in pixels and its byte stream
528 ## @ingroup l1_geomBuilder_auxiliary
529 def ReadTexture(fname):
530     """
531     Read bitmap texture from the text file.
532     In that file, any non-zero symbol represents '1' opaque pixel of the bitmap.
533     A zero symbol ('0') represents transparent pixel of the texture bitmap.
534     The function returns width and height of the pixmap in pixels and byte stream representing
535     texture bitmap itself.
536     This function can be used to read the texture to the byte stream in order to pass it to
537     the AddTexture() function of geomBuilder class.
538
539     Parameters:
540         fname texture file name
541
542     Returns:
543         sequence of tree values: texture's width, height in pixels and its byte stream
544
545     Example of usage:
546         from salome.geom import geomBuilder
547         geompy = geomBuilder.New()
548         texture = geompy.readtexture('mytexture.dat')
549         texture = geompy.AddTexture(*texture)
550         obj.SetMarkerTexture(texture)
551     """
552     try:
553         f = open(fname)
554         lines = [ l.strip() for l in f.readlines()]
555         f.close()
556         maxlen = 0
557         if lines: maxlen = max([len(x) for x in lines])
558         lenbytes = maxlen/8
559         if maxlen%8: lenbytes += 1
560         bytedata=""
561         for line in lines:
562             if len(line)%8:
563                 lenline = (len(line)/8+1)*8
564                 pass
565             else:
566                 lenline = (len(line)/8)*8
567                 pass
568             for i in range(lenline/8):
569                 byte=""
570                 for j in range(8):
571                     if i*8+j < len(line) and line[i*8+j] != "0": byte += "1"
572                     else: byte += "0"
573                     pass
574                 bytedata += PackData(byte)
575                 pass
576             for i in range(lenline/8, lenbytes):
577                 bytedata += PackData("0")
578             pass
579         return lenbytes*8, len(lines), bytedata
580     except:
581         pass
582     return 0, 0, ""
583
584 ## Returns a long value from enumeration type
585 #  Can be used for CORBA enumerator types like GEOM.shape_type
586 #  @param theItem enumeration type
587 #  @ingroup l1_geomBuilder_auxiliary
588 def EnumToLong(theItem):
589     """
590     Returns a long value from enumeration type
591     Can be used for CORBA enumerator types like geomBuilder.ShapeType
592
593     Parameters:
594         theItem enumeration type
595     """
596     ret = theItem
597     if hasattr(theItem, "_v"): ret = theItem._v
598     return ret
599
600 ## Pack an argument into a list
601 def ToList( arg ):
602     if isinstance( arg, list ):
603         return arg
604     if hasattr( arg, "__getitem__" ):
605         return list( arg )
606     return [ arg ]
607
608 ## Information about closed/unclosed state of shell or wire
609 #  @ingroup l1_geomBuilder_auxiliary
610 class info:
611     """
612     Information about closed/unclosed state of shell or wire
613     """
614     UNKNOWN  = 0
615     CLOSED   = 1
616     UNCLOSED = 2
617
618 ## Private class used to bind calls of plugin operations to geomBuilder
619 class PluginOperation:
620   def __init__(self, operation, function):
621     self.operation = operation
622     self.function = function
623     pass
624
625   @ManageTransactions("operation")
626   def __call__(self, *args):
627     res = self.function(self.operation, *args)
628     RaiseIfFailed(self.function.__name__, self.operation)
629     return res
630
631 # Warning: geom is a singleton
632 geom = None
633 engine = None
634 doLcc = False
635 created = False
636
637 class geomBuilder(GEOM._objref_GEOM_Gen):
638
639         ## Enumeration ShapeType as a dictionary. \n
640         ## Topological types of shapes (like Open Cascade types). See GEOM::shape_type for details.
641         #  @ingroup l1_geomBuilder_auxiliary
642         ShapeType = {"AUTO":-1, "COMPOUND":0, "COMPSOLID":1, "SOLID":2, "SHELL":3, "FACE":4, "WIRE":5, "EDGE":6, "VERTEX":7, "SHAPE":8, "FLAT":9}
643
644         ## Kinds of shape in terms of <VAR>GEOM.GEOM_IKindOfShape.shape_kind</VAR> enumeration
645         #  and a list of parameters, describing the shape.
646         #  List of parameters, describing the shape:
647         #  - COMPOUND:            [nb_solids  nb_faces  nb_edges  nb_vertices]
648         #  - COMPSOLID:           [nb_solids  nb_faces  nb_edges  nb_vertices]
649         #
650         #  - SHELL:       [info.CLOSED / info.UNCLOSED  nb_faces  nb_edges  nb_vertices]
651         #
652         #  - WIRE:        [info.CLOSED / info.UNCLOSED nb_edges  nb_vertices]
653         #
654         #  - SPHERE:       [xc yc zc            R]
655         #  - CYLINDER:     [xb yb zb  dx dy dz  R         H]
656         #  - BOX:          [xc yc zc                      ax ay az]
657         #  - ROTATED_BOX:  [xc yc zc  zx zy zz  xx xy xz  ax ay az]
658         #  - TORUS:        [xc yc zc  dx dy dz  R_1  R_2]
659         #  - CONE:         [xb yb zb  dx dy dz  R_1  R_2  H]
660         #  - POLYHEDRON:                       [nb_faces  nb_edges  nb_vertices]
661         #  - SOLID:                            [nb_faces  nb_edges  nb_vertices]
662         #
663         #  - SPHERE2D:     [xc yc zc            R]
664         #  - CYLINDER2D:   [xb yb zb  dx dy dz  R         H]
665         #  - TORUS2D:      [xc yc zc  dx dy dz  R_1  R_2]
666         #  - CONE2D:       [xc yc zc  dx dy dz  R_1  R_2  H]
667         #  - DISK_CIRCLE:  [xc yc zc  dx dy dz  R]
668         #  - DISK_ELLIPSE: [xc yc zc  dx dy dz  R_1  R_2]
669         #  - POLYGON:      [xo yo zo  dx dy dz            nb_edges  nb_vertices]
670         #  - PLANE:        [xo yo zo  dx dy dz]
671         #  - PLANAR:       [xo yo zo  dx dy dz            nb_edges  nb_vertices]
672         #  - FACE:                                       [nb_edges  nb_vertices]
673         #
674         #  - CIRCLE:       [xc yc zc  dx dy dz  R]
675         #  - ARC_CIRCLE:   [xc yc zc  dx dy dz  R         x1 y1 z1  x2 y2 z2]
676         #  - ELLIPSE:      [xc yc zc  dx dy dz  R_1  R_2]
677         #  - ARC_ELLIPSE:  [xc yc zc  dx dy dz  R_1  R_2  x1 y1 z1  x2 y2 z2]
678         #  - LINE:         [xo yo zo  dx dy dz]
679         #  - SEGMENT:      [x1 y1 z1  x2 y2 z2]
680         #  - EDGE:                                                 [nb_vertices]
681         #
682         #  - VERTEX:       [x  y  z]
683         #
684         #  - LCS:          [x y z  xx xy xz  yx yy yz  zx zy zz]
685         #  @ingroup l1_geomBuilder_auxiliary
686         kind = GEOM.GEOM_IKindOfShape
687
688         def __new__(cls, *args):
689             global engine
690             global geom
691             global doLcc
692             global created
693             #print "==== __new__ ", engine, geom, doLcc, created
694             if geom is None:
695                 # geom engine is either retrieved from engine, or created
696                 geom = engine
697                 # Following test avoids a recursive loop
698                 if doLcc:
699                     if geom is not None:
700                         # geom engine not created: existing engine found
701                         doLcc = False
702                     if doLcc and not created:
703                         doLcc = False
704                         # FindOrLoadComponent called:
705                         # 1. CORBA resolution of server
706                         # 2. the __new__ method is called again
707                         #print "==== FindOrLoadComponent ", engine, geom, doLcc, created
708                         geom = lcc.FindOrLoadComponent( "FactoryServer", "GEOM" )
709                         #print "====1 ",geom
710                 else:
711                     # FindOrLoadComponent not called
712                     if geom is None:
713                         # geomBuilder instance is created from lcc.FindOrLoadComponent
714                         #print "==== super ", engine, geom, doLcc, created
715                         geom = super(geomBuilder,cls).__new__(cls)
716                         #print "====2 ",geom
717                     else:
718                         # geom engine not created: existing engine found
719                         #print "==== existing ", engine, geom, doLcc, created
720                         pass
721                 #print "return geom 1 ", geom
722                 return geom
723
724             #print "return geom 2 ", geom
725             return geom
726
727         def __init__(self, *args):
728             global created
729             #print "-------- geomBuilder __init__ --- ", created, self
730             if not created:
731               created = True
732               GEOM._objref_GEOM_Gen.__init__(self, *args)
733               self.myMaxNbSubShapesAllowed = 0 # auto-publishing is disabled by default
734               self.myBuilder = None
735               self.father    = None
736
737               self.BasicOp  = None
738               self.CurvesOp = None
739               self.PrimOp   = None
740               self.ShapesOp = None
741               self.HealOp   = None
742               self.InsertOp = None
743               self.BoolOp   = None
744               self.TrsfOp   = None
745               self.LocalOp  = None
746               self.MeasuOp  = None
747               self.BlocksOp = None
748               self.GroupOp  = None
749               self.FieldOp  = None
750             pass
751
752         ## Process object publication in the study, as follows:
753         #  - if @a theName is specified (not None), the object is published in the study
754         #    with this name, not taking into account "auto-publishing" option;
755         #  - if @a theName is NOT specified, the object is published in the study
756         #    (using default name, which can be customized using @a theDefaultName parameter)
757         #    only if auto-publishing is switched on.
758         #
759         #  @param theObj  object, a subject for publishing
760         #  @param theName object name for study
761         #  @param theDefaultName default name for the auto-publishing
762         #
763         #  @sa addToStudyAuto()
764         def _autoPublish(self, theObj, theName, theDefaultName="noname"):
765             # ---
766             def _item_name(_names, _defname, _idx=-1):
767                 if not _names: _names = _defname
768                 if type(_names) in [list, tuple]:
769                     if _idx >= 0:
770                         if _idx >= len(_names) or not _names[_idx]:
771                             if type(_defname) not in [list, tuple]:
772                                 _name = "%s_%d"%(_defname, _idx+1)
773                             elif len(_defname) > 0 and _idx >= 0 and _idx < len(_defname):
774                                 _name = _defname[_idx]
775                             else:
776                                 _name = "%noname_%d"%(dn, _idx+1)
777                             pass
778                         else:
779                             _name = _names[_idx]
780                         pass
781                     else:
782                         # must be wrong  usage
783                         _name = _names[0]
784                     pass
785                 else:
786                     if _idx >= 0:
787                         _name = "%s_%d"%(_names, _idx+1)
788                     else:
789                         _name = _names
790                     pass
791                 return _name
792             # ---
793             def _publish( _name, _obj ):
794                 fatherObj = None
795                 if isinstance( _obj, GEOM._objref_GEOM_Field ):
796                     fatherObj = _obj.GetShape()
797                 elif isinstance( _obj, GEOM._objref_GEOM_FieldStep ):
798                     fatherObj = _obj.GetField()
799                 elif not _obj.IsMainShape():
800                     fatherObj = _obj.GetMainShape()
801                     pass
802                 if fatherObj and fatherObj.GetStudyEntry():
803                     self.addToStudyInFather(fatherObj, _obj, _name)
804                 else:
805                     self.addToStudy(_obj, _name)
806                     pass
807                 return
808             # ---
809             if not theObj:
810                 return # null object
811             if not theName and not self.myMaxNbSubShapesAllowed:
812                 return # nothing to do: auto-publishing is disabled
813             if not theName and not theDefaultName:
814                 return # neither theName nor theDefaultName is given
815             import types
816             if type(theObj) in [list, tuple]:
817                 # list of objects is being published
818                 idx = 0
819                 for obj in theObj:
820                     if not obj: continue # bad object
821                     name = _item_name(theName, theDefaultName, idx)
822                     _publish( name, obj )
823                     idx = idx+1
824                     if not theName and idx == self.myMaxNbSubShapesAllowed: break
825                     pass
826                 pass
827             else:
828                 # single object is published
829                 name = _item_name(theName, theDefaultName)
830                 _publish( name, theObj )
831             pass
832
833         ## @addtogroup l1_geomBuilder_auxiliary
834         ## @{
835         def init_geom(self):
836             self.myStudy = salome.myStudy
837             self.myBuilder = self.myStudy.NewBuilder()
838             self.father = self.myStudy.FindComponent("GEOM")
839
840             # load data from the study file, if necessary
841             if self.father:
842                 self.myBuilder.LoadWith(self.father, self)
843
844             self.BasicOp  = self.GetIBasicOperations    ()
845             self.CurvesOp = self.GetICurvesOperations   ()
846             self.PrimOp   = self.GetI3DPrimOperations   ()
847             self.ShapesOp = self.GetIShapesOperations   ()
848             self.HealOp   = self.GetIHealingOperations  ()
849             self.InsertOp = self.GetIInsertOperations   ()
850             self.BoolOp   = self.GetIBooleanOperations  ()
851             self.TrsfOp   = self.GetITransformOperations()
852             self.LocalOp  = self.GetILocalOperations    ()
853             self.MeasuOp  = self.GetIMeasureOperations  ()
854             self.BlocksOp = self.GetIBlocksOperations   ()
855             self.GroupOp  = self.GetIGroupOperations    ()
856             self.FieldOp  = self.GetIFieldOperations    ()
857
858             # set GEOM as root in the use case tree
859             self.myUseCaseBuilder = self.myStudy.GetUseCaseBuilder()
860             self.myUseCaseBuilder.SetRootCurrent()
861             self.myUseCaseBuilder.Append(self.father)
862
863             notebook.myStudy = salome.myStudy
864             pass
865
866         def GetPluginOperations(self, libraryName):
867             op = GEOM._objref_GEOM_Gen.GetPluginOperations(self, libraryName)
868             return op
869
870         ## Enable / disable results auto-publishing
871         #
872         #  The automatic publishing is managed in the following way:
873         #  - if @a maxNbSubShapes = 0, automatic publishing is disabled.
874         #  - if @a maxNbSubShapes = -1 (default), automatic publishing is enabled and
875         #  maximum number of sub-shapes allowed for publishing is unlimited; any negative
876         #  value passed as parameter has the same effect.
877         #  - if @a maxNbSubShapes is any positive value, automatic publishing is enabled and
878         #  maximum number of sub-shapes allowed for publishing is set to specified value.
879         #
880         #  @param maxNbSubShapes maximum number of sub-shapes allowed for publishing.
881         #  @ingroup l1_publish_data
882         def addToStudyAuto(self, maxNbSubShapes=-1):
883             """
884             Enable / disable results auto-publishing
885
886             The automatic publishing is managed in the following way:
887             - if @a maxNbSubShapes = 0, automatic publishing is disabled;
888             - if @a maxNbSubShapes = -1 (default), automatic publishing is enabled and
889             maximum number of sub-shapes allowed for publishing is unlimited; any negative
890             value passed as parameter has the same effect.
891             - if @a maxNbSubShapes is any positive value, automatic publishing is enabled and
892             maximum number of sub-shapes allowed for publishing is set to this value.
893
894             Parameters:
895                 maxNbSubShapes maximum number of sub-shapes allowed for publishing.
896
897             Example of usage:
898                 geompy.addToStudyAuto()   # enable auto-publishing
899                 geompy.MakeBoxDXDYDZ(100) # box is created and published with default name
900                 geompy.addToStudyAuto(0)  # disable auto-publishing
901             """
902             self.myMaxNbSubShapesAllowed = max(-1, maxNbSubShapes)
903             pass
904
905         ## Dump component to the Python script
906         #  This method overrides IDL function to allow default values for the parameters.
907         def DumpPython(self, theIsPublished=True, theIsMultiFile=True):
908             """
909             Dump component to the Python script
910             This method overrides IDL function to allow default values for the parameters.
911             """
912             return GEOM._objref_GEOM_Gen.DumpPython(self, theIsPublished, theIsMultiFile)
913
914         ## Get name for sub-shape aSubObj of shape aMainObj
915         #
916         # @ref swig_SubShapeName "Example"
917         @ManageTransactions("ShapesOp")
918         def SubShapeName(self,aSubObj, aMainObj):
919             """
920             Get name for sub-shape aSubObj of shape aMainObj
921             """
922             # Example: see GEOM_TestAll.py
923
924             #aSubId  = orb.object_to_string(aSubObj)
925             #aMainId = orb.object_to_string(aMainObj)
926             #index = gg.getIndexTopology(aSubId, aMainId)
927             #name = gg.getShapeTypeString(aSubId) + "_%d"%(index)
928             index = self.ShapesOp.GetTopologyIndex(aMainObj, aSubObj)
929             name = self.ShapesOp.GetShapeTypeString(aSubObj) + "_%d"%(index)
930             return name
931
932         ## Publish in study aShape with name aName
933         #
934         #  \param aShape the shape to be published
935         #  \param aName  the name for the shape
936         #  \param doRestoreSubShapes if True, finds and publishes also
937         #         sub-shapes of <VAR>aShape</VAR>, corresponding to its arguments
938         #         and published sub-shapes of arguments
939         #  \param theArgs,theFindMethod,theInheritFirstArg see RestoreSubShapes() for
940         #                                                  these arguments description
941         #  \return study entry of the published shape in form of string
942         #
943         #  @ingroup l1_publish_data
944         #  @ref swig_all_addtostudy "Example"
945         def addToStudy(self, aShape, aName, doRestoreSubShapes=False,
946                        theArgs=[], theFindMethod=GEOM.FSM_GetInPlace, theInheritFirstArg=False):
947             """
948             Publish in study aShape with name aName
949
950             Parameters:
951                 aShape the shape to be published
952                 aName  the name for the shape
953                 doRestoreSubShapes if True, finds and publishes also
954                                    sub-shapes of aShape, corresponding to its arguments
955                                    and published sub-shapes of arguments
956                 theArgs,theFindMethod,theInheritFirstArg see geompy.RestoreSubShapes() for
957                                                          these arguments description
958
959             Returns:
960                 study entry of the published shape in form of string
961
962             Example of usage:
963                 id_block1 = geompy.addToStudy(Block1, "Block 1")
964             """
965             # Example: see GEOM_TestAll.py
966             try:
967                 aSObject = self.AddInStudy(aShape, aName, None)
968                 if aSObject and aName: aSObject.SetAttrString("AttributeName", aName)
969                 if doRestoreSubShapes:
970                     self.RestoreSubShapesSO(aSObject, theArgs,
971                                             theFindMethod, theInheritFirstArg, True )
972             except:
973                 print("addToStudy() failed")
974                 return ""
975             return aShape.GetStudyEntry()
976
977         ## Publish in study aShape with name aName as sub-object of previously published aFather
978         #  \param aFather previously published object
979         #  \param aShape the shape to be published as sub-object of <VAR>aFather</VAR>
980         #  \param aName  the name for the shape
981         #
982         #  \return study entry of the published shape in form of string
983         #
984         #  @ingroup l1_publish_data
985         #  @ref swig_all_addtostudyInFather "Example"
986         def addToStudyInFather(self, aFather, aShape, aName):
987             """
988             Publish in study aShape with name aName as sub-object of previously published aFather
989
990             Parameters:
991                 aFather previously published object
992                 aShape the shape to be published as sub-object of aFather
993                 aName  the name for the shape
994
995             Returns:
996                 study entry of the published shape in form of string
997             """
998             # Example: see GEOM_TestAll.py
999             try:
1000                 aSObject = self.AddInStudy(aShape, aName, aFather)
1001                 if aSObject and aName: aSObject.SetAttrString("AttributeName", aName)
1002             except:
1003                 print("addToStudyInFather() failed")
1004                 return ""
1005             return aShape.GetStudyEntry()
1006
1007         ## Unpublish object in study
1008         #
1009         #  \param obj the object to be unpublished
1010         def hideInStudy(self, obj):
1011             """
1012             Unpublish object in study
1013
1014             Parameters:
1015                 obj the object to be unpublished
1016             """
1017             ior = salome.orb.object_to_string(obj)
1018             aSObject = self.myStudy.FindObjectIOR(ior)
1019             if aSObject is not None:
1020                 genericAttribute = self.myBuilder.FindOrCreateAttribute(aSObject, "AttributeDrawable")
1021                 drwAttribute = genericAttribute._narrow(SALOMEDS.AttributeDrawable)
1022                 drwAttribute.SetDrawable(False)
1023                 # hide references if any
1024                 vso = self.myStudy.FindDependances(aSObject);
1025                 for refObj in vso :
1026                     genericAttribute = self.myBuilder.FindOrCreateAttribute(refObj, "AttributeDrawable")
1027                     drwAttribute = genericAttribute._narrow(SALOMEDS.AttributeDrawable)
1028                     drwAttribute.SetDrawable(False)
1029                     pass
1030                 pass
1031
1032         # end of l1_geomBuilder_auxiliary
1033         ## @}
1034
1035         ## @addtogroup l3_restore_ss
1036         ## @{
1037
1038         ## Publish sub-shapes, standing for arguments and sub-shapes of arguments
1039         #  To be used from python scripts out of addToStudy() (non-default usage)
1040         #  \param theObject published GEOM.GEOM_Object, arguments of which will be published
1041         #  \param theArgs   list of GEOM.GEOM_Object, operation arguments to be published.
1042         #                   If this list is empty, all operation arguments will be published
1043         #  \param theFindMethod method to search sub-shapes, corresponding to arguments and
1044         #                       their sub-shapes. Value from enumeration GEOM.find_shape_method.
1045         #  \param theInheritFirstArg set properties of the first argument for <VAR>theObject</VAR>.
1046         #                            Do not publish sub-shapes in place of arguments, but only
1047         #                            in place of sub-shapes of the first argument,
1048         #                            because the whole shape corresponds to the first argument.
1049         #                            Mainly to be used after transformations, but it also can be
1050         #                            useful after partition with one object shape, and some other
1051         #                            operations, where only the first argument has to be considered.
1052         #                            If theObject has only one argument shape, this flag is automatically
1053         #                            considered as True, not regarding really passed value.
1054         #  \param theAddPrefix add prefix "from_" to names of restored sub-shapes,
1055         #                      and prefix "from_subshapes_of_" to names of partially restored sub-shapes.
1056         #  \return list of published sub-shapes
1057         #
1058         #  @ref tui_restore_prs_params "Example"
1059         def RestoreSubShapes (self, theObject, theArgs=[], theFindMethod=GEOM.FSM_GetInPlace,
1060                               theInheritFirstArg=False, theAddPrefix=True):
1061             """
1062             Publish sub-shapes, standing for arguments and sub-shapes of arguments
1063             To be used from python scripts out of geompy.addToStudy (non-default usage)
1064
1065             Parameters:
1066                 theObject published GEOM.GEOM_Object, arguments of which will be published
1067                 theArgs   list of GEOM.GEOM_Object, operation arguments to be published.
1068                           If this list is empty, all operation arguments will be published
1069                 theFindMethod method to search sub-shapes, corresponding to arguments and
1070                               their sub-shapes. Value from enumeration GEOM.find_shape_method.
1071                 theInheritFirstArg set properties of the first argument for theObject.
1072                                    Do not publish sub-shapes in place of arguments, but only
1073                                    in place of sub-shapes of the first argument,
1074                                    because the whole shape corresponds to the first argument.
1075                                    Mainly to be used after transformations, but it also can be
1076                                    useful after partition with one object shape, and some other
1077                                    operations, where only the first argument has to be considered.
1078                                    If theObject has only one argument shape, this flag is automatically
1079                                    considered as True, not regarding really passed value.
1080                 theAddPrefix add prefix "from_" to names of restored sub-shapes,
1081                              and prefix "from_subshapes_of_" to names of partially restored sub-shapes.
1082             Returns:
1083                 list of published sub-shapes
1084             """
1085             # Example: see GEOM_TestAll.py
1086             return self.RestoreSubShapesO(theObject, theArgs,
1087                                           theFindMethod, theInheritFirstArg, theAddPrefix)
1088
1089         ## Publish sub-shapes, standing for arguments and sub-shapes of arguments
1090         #  To be used from python scripts out of addToStudy() (non-default usage)
1091         #  \param theObject published GEOM.GEOM_Object, arguments of which will be published
1092         #  \param theArgs   list of GEOM.GEOM_Object, operation arguments to be published.
1093         #                   If this list is empty, all operation arguments will be published
1094         #  \param theFindMethod method to search sub-shapes, corresponding to arguments and
1095         #                       their sub-shapes. Value from enumeration GEOM::find_shape_method.
1096         #  \param theInheritFirstArg set properties of the first argument for <VAR>theObject</VAR>.
1097         #                            Do not publish sub-shapes in place of arguments, but only
1098         #                            in place of sub-shapes of the first argument,
1099         #                            because the whole shape corresponds to the first argument.
1100         #                            Mainly to be used after transformations, but it also can be
1101         #                            useful after partition with one object shape, and some other
1102         #                            operations, where only the first argument has to be considered.
1103         #                            If theObject has only one argument shape, this flag is automatically
1104         #                            considered as True, not regarding really passed value.
1105         #  \param theAddPrefix add prefix "from_" to names of restored sub-shapes,
1106         #                      and prefix "from_subshapes_of_" to names of partially restored sub-shapes.
1107         #  \return list of published sub-shapes
1108         #
1109         #  @ref tui_restore_prs_params "Example"
1110         def RestoreGivenSubShapes (self, theObject, theArgs=[], theFindMethod=GEOM.FSM_GetInPlace,
1111                                    theInheritFirstArg=False, theAddPrefix=True):
1112             """
1113             Publish sub-shapes, standing for arguments and sub-shapes of arguments
1114             To be used from python scripts out of geompy.addToStudy() (non-default usage)
1115
1116             Parameters:
1117                 theObject published GEOM.GEOM_Object, arguments of which will be published
1118                 theArgs   list of GEOM.GEOM_Object, operation arguments to be published.
1119                           If this list is empty, all operation arguments will be published
1120                 theFindMethod method to search sub-shapes, corresponding to arguments and
1121                               their sub-shapes. Value from enumeration GEOM::find_shape_method.
1122                 theInheritFirstArg set properties of the first argument for theObject.
1123                                    Do not publish sub-shapes in place of arguments, but only
1124                                    in place of sub-shapes of the first argument,
1125                                    because the whole shape corresponds to the first argument.
1126                                    Mainly to be used after transformations, but it also can be
1127                                    useful after partition with one object shape, and some other
1128                                    operations, where only the first argument has to be considered.
1129                                    If theObject has only one argument shape, this flag is automatically
1130                                    considered as True, not regarding really passed value.
1131                 theAddPrefix add prefix "from_" to names of restored sub-shapes,
1132                              and prefix "from_subshapes_of_" to names of partially restored sub-shapes.
1133
1134             Returns:
1135                 list of published sub-shapes
1136             """
1137             # Example: see GEOM_TestAll.py
1138             return self.RestoreGivenSubShapesO(theObject, theArgs,
1139                                                theFindMethod, theInheritFirstArg, theAddPrefix)
1140
1141         # end of l3_restore_ss
1142         ## @}
1143
1144         ## @addtogroup l3_basic_go
1145         ## @{
1146
1147         ## Create point by three coordinates.
1148         #  @param theX The X coordinate of the point.
1149         #  @param theY The Y coordinate of the point.
1150         #  @param theZ The Z coordinate of the point.
1151         #  @param theName Object name; when specified, this parameter is used
1152         #         for result publication in the study. Otherwise, if automatic
1153         #         publication is switched on, default value is used for result name.
1154         #
1155         #  @return New GEOM.GEOM_Object, containing the created point.
1156         #
1157         #  @ref tui_creation_point "Example"
1158         @ManageTransactions("BasicOp")
1159         def MakeVertex(self, theX, theY, theZ, theName=None):
1160             """
1161             Create point by three coordinates.
1162
1163             Parameters:
1164                 theX The X coordinate of the point.
1165                 theY The Y coordinate of the point.
1166                 theZ The Z coordinate of the point.
1167                 theName Object name; when specified, this parameter is used
1168                         for result publication in the study. Otherwise, if automatic
1169                         publication is switched on, default value is used for result name.
1170
1171             Returns:
1172                 New GEOM.GEOM_Object, containing the created point.
1173             """
1174             # Example: see GEOM_TestAll.py
1175             theX,theY,theZ,Parameters = ParseParameters(theX, theY, theZ)
1176             anObj = self.BasicOp.MakePointXYZ(theX, theY, theZ)
1177             RaiseIfFailed("MakePointXYZ", self.BasicOp)
1178             anObj.SetParameters(Parameters)
1179             self._autoPublish(anObj, theName, "vertex")
1180             return anObj
1181
1182         ## Create a point, distant from the referenced point
1183         #  on the given distances along the coordinate axes.
1184         #  @param theReference The referenced point.
1185         #  @param theX Displacement from the referenced point along OX axis.
1186         #  @param theY Displacement from the referenced point along OY axis.
1187         #  @param theZ Displacement from the referenced point along OZ axis.
1188         #  @param theName Object name; when specified, this parameter is used
1189         #         for result publication in the study. Otherwise, if automatic
1190         #         publication is switched on, default value is used for result name.
1191         #
1192         #  @return New GEOM.GEOM_Object, containing the created point.
1193         #
1194         #  @ref tui_creation_point "Example"
1195         @ManageTransactions("BasicOp")
1196         def MakeVertexWithRef(self, theReference, theX, theY, theZ, theName=None):
1197             """
1198             Create a point, distant from the referenced point
1199             on the given distances along the coordinate axes.
1200
1201             Parameters:
1202                 theReference The referenced point.
1203                 theX Displacement from the referenced point along OX axis.
1204                 theY Displacement from the referenced point along OY axis.
1205                 theZ Displacement from the referenced point along OZ axis.
1206                 theName Object name; when specified, this parameter is used
1207                         for result publication in the study. Otherwise, if automatic
1208                         publication is switched on, default value is used for result name.
1209
1210             Returns:
1211                 New GEOM.GEOM_Object, containing the created point.
1212             """
1213             # Example: see GEOM_TestAll.py
1214             theX,theY,theZ,Parameters = ParseParameters(theX, theY, theZ)
1215             anObj = self.BasicOp.MakePointWithReference(theReference, theX, theY, theZ)
1216             RaiseIfFailed("MakePointWithReference", self.BasicOp)
1217             anObj.SetParameters(Parameters)
1218             self._autoPublish(anObj, theName, "vertex")
1219             return anObj
1220
1221         ## Create a point, corresponding to the given parameter on the given curve.
1222         #  @param theRefCurve The referenced curve.
1223         #  @param theParameter Value of parameter on the referenced curve.
1224         #  @param takeOrientationIntoAccount flag that tells if it is necessary
1225         #         to take the curve's orientation into account for the
1226         #         operation. I.e. if this flag is set, the results for the same
1227         #         parameters (except the value 0.5) is different for forward
1228         #         and reversed curves. If it is not set the result is the same.
1229         #  @param theName Object name; when specified, this parameter is used
1230         #         for result publication in the study. Otherwise, if automatic
1231         #         publication is switched on, default value is used for result name.
1232         #
1233         #  @return New GEOM.GEOM_Object, containing the created point.
1234         #
1235         #  @ref tui_creation_point "Example"
1236         @ManageTransactions("BasicOp")
1237         def MakeVertexOnCurve(self, theRefCurve, theParameter,
1238                               takeOrientationIntoAccount=False, theName=None):
1239             """
1240             Create a point, corresponding to the given parameter on the given curve.
1241
1242             Parameters:
1243                 theRefCurve The referenced curve.
1244                 theParameter Value of parameter on the referenced curve.
1245                 takeOrientationIntoAccount flag that tells if it is necessary
1246                         to take the curve's orientation into account for the
1247                         operation. I.e. if this flag is set, the results for
1248                         the same parameters (except the value 0.5) is different
1249                         for forward and reversed curves. If it is not set
1250                         the result is the same.
1251                 theName Object name; when specified, this parameter is used
1252                         for result publication in the study. Otherwise, if automatic
1253                         publication is switched on, default value is used for result name.
1254
1255             Returns:
1256                 New GEOM.GEOM_Object, containing the created point.
1257
1258             Example of usage:
1259                 p_on_arc = geompy.MakeVertexOnCurve(Arc, 0.25)
1260             """
1261             # Example: see GEOM_TestAll.py
1262             theParameter, takeOrientationIntoAccount, Parameters = ParseParameters(
1263                 theParameter, takeOrientationIntoAccount)
1264             anObj = self.BasicOp.MakePointOnCurve(theRefCurve, theParameter,
1265                                                   takeOrientationIntoAccount)
1266             RaiseIfFailed("MakePointOnCurve", self.BasicOp)
1267             anObj.SetParameters(Parameters)
1268             self._autoPublish(anObj, theName, "vertex")
1269             return anObj
1270
1271         ## Create a point by projection give coordinates on the given curve
1272         #  @param theRefCurve The referenced curve.
1273         #  @param theX X-coordinate in 3D space
1274         #  @param theY Y-coordinate in 3D space
1275         #  @param theZ Z-coordinate in 3D space
1276         #  @param theName Object name; when specified, this parameter is used
1277         #         for result publication in the study. Otherwise, if automatic
1278         #         publication is switched on, default value is used for result name.
1279         #
1280         #  @return New GEOM.GEOM_Object, containing the created point.
1281         #
1282         #  @ref tui_creation_point "Example"
1283         @ManageTransactions("BasicOp")
1284         def MakeVertexOnCurveByCoord(self, theRefCurve, theX, theY, theZ, theName=None):
1285             """
1286             Create a point by projection give coordinates on the given curve
1287
1288             Parameters:
1289                 theRefCurve The referenced curve.
1290                 theX X-coordinate in 3D space
1291                 theY Y-coordinate in 3D space
1292                 theZ Z-coordinate in 3D space
1293                 theName Object name; when specified, this parameter is used
1294                         for result publication in the study. Otherwise, if automatic
1295                         publication is switched on, default value is used for result name.
1296
1297             Returns:
1298                 New GEOM.GEOM_Object, containing the created point.
1299
1300             Example of usage:
1301                 p_on_arc3 = geompy.MakeVertexOnCurveByCoord(Arc, 100, -10, 10)
1302             """
1303             # Example: see GEOM_TestAll.py
1304             theX, theY, theZ, Parameters = ParseParameters(theX, theY, theZ)
1305             anObj = self.BasicOp.MakePointOnCurveByCoord(theRefCurve, theX, theY, theZ)
1306             RaiseIfFailed("MakeVertexOnCurveByCoord", self.BasicOp)
1307             anObj.SetParameters(Parameters)
1308             self._autoPublish(anObj, theName, "vertex")
1309             return anObj
1310
1311         ## Create a point, corresponding to the given length on the given curve.
1312         #  @param theRefCurve The referenced curve.
1313         #  @param theLength Length on the referenced curve. It can be negative.
1314         #  @param theStartPoint Point allowing to choose the direction for the calculation
1315         #                       of the length. If None, start from the first point of theRefCurve.
1316         #  @param theName Object name; when specified, this parameter is used
1317         #         for result publication in the study. Otherwise, if automatic
1318         #         publication is switched on, default value is used for result name.
1319         #
1320         #  @return New GEOM.GEOM_Object, containing the created point.
1321         #
1322         #  @ref tui_creation_point "Example"
1323         @ManageTransactions("BasicOp")
1324         def MakeVertexOnCurveByLength(self, theRefCurve, theLength, theStartPoint = None, theName=None):
1325             """
1326             Create a point, corresponding to the given length on the given curve.
1327
1328             Parameters:
1329                 theRefCurve The referenced curve.
1330                 theLength Length on the referenced curve. It can be negative.
1331                 theStartPoint Point allowing to choose the direction for the calculation
1332                               of the length. If None, start from the first point of theRefCurve.
1333                 theName Object name; when specified, this parameter is used
1334                         for result publication in the study. Otherwise, if automatic
1335                         publication is switched on, default value is used for result name.
1336
1337             Returns:
1338                 New GEOM.GEOM_Object, containing the created point.
1339             """
1340             # Example: see GEOM_TestAll.py
1341             theLength, Parameters = ParseParameters(theLength)
1342             anObj = self.BasicOp.MakePointOnCurveByLength(theRefCurve, theLength, theStartPoint)
1343             RaiseIfFailed("MakePointOnCurveByLength", self.BasicOp)
1344             anObj.SetParameters(Parameters)
1345             self._autoPublish(anObj, theName, "vertex")
1346             return anObj
1347
1348         ## Create a point, corresponding to the given parameters on the
1349         #    given surface.
1350         #  @param theRefSurf The referenced surface.
1351         #  @param theUParameter Value of U-parameter on the referenced surface.
1352         #  @param theVParameter Value of V-parameter on the referenced surface.
1353         #  @param theName Object name; when specified, this parameter is used
1354         #         for result publication in the study. Otherwise, if automatic
1355         #         publication is switched on, default value is used for result name.
1356         #
1357         #  @return New GEOM.GEOM_Object, containing the created point.
1358         #
1359         #  @ref swig_MakeVertexOnSurface "Example"
1360         @ManageTransactions("BasicOp")
1361         def MakeVertexOnSurface(self, theRefSurf, theUParameter, theVParameter, theName=None):
1362             """
1363             Create a point, corresponding to the given parameters on the
1364             given surface.
1365
1366             Parameters:
1367                 theRefSurf The referenced surface.
1368                 theUParameter Value of U-parameter on the referenced surface.
1369                 theVParameter Value of V-parameter on the referenced surface.
1370                 theName Object name; when specified, this parameter is used
1371                         for result publication in the study. Otherwise, if automatic
1372                         publication is switched on, default value is used for result name.
1373
1374             Returns:
1375                 New GEOM.GEOM_Object, containing the created point.
1376
1377             Example of usage:
1378                 p_on_face = geompy.MakeVertexOnSurface(Face, 0.1, 0.8)
1379             """
1380             theUParameter, theVParameter, Parameters = ParseParameters(theUParameter, theVParameter)
1381             # Example: see GEOM_TestAll.py
1382             anObj = self.BasicOp.MakePointOnSurface(theRefSurf, theUParameter, theVParameter)
1383             RaiseIfFailed("MakePointOnSurface", self.BasicOp)
1384             anObj.SetParameters(Parameters);
1385             self._autoPublish(anObj, theName, "vertex")
1386             return anObj
1387
1388         ## Create a point by projection give coordinates on the given surface
1389         #  @param theRefSurf The referenced surface.
1390         #  @param theX X-coordinate in 3D space
1391         #  @param theY Y-coordinate in 3D space
1392         #  @param theZ Z-coordinate in 3D space
1393         #  @param theName Object name; when specified, this parameter is used
1394         #         for result publication in the study. Otherwise, if automatic
1395         #         publication is switched on, default value is used for result name.
1396         #
1397         #  @return New GEOM.GEOM_Object, containing the created point.
1398         #
1399         #  @ref swig_MakeVertexOnSurfaceByCoord "Example"
1400         @ManageTransactions("BasicOp")
1401         def MakeVertexOnSurfaceByCoord(self, theRefSurf, theX, theY, theZ, theName=None):
1402             """
1403             Create a point by projection give coordinates on the given surface
1404
1405             Parameters:
1406                 theRefSurf The referenced surface.
1407                 theX X-coordinate in 3D space
1408                 theY Y-coordinate in 3D space
1409                 theZ Z-coordinate in 3D space
1410                 theName Object name; when specified, this parameter is used
1411                         for result publication in the study. Otherwise, if automatic
1412                         publication is switched on, default value is used for result name.
1413
1414             Returns:
1415                 New GEOM.GEOM_Object, containing the created point.
1416
1417             Example of usage:
1418                 p_on_face2 = geompy.MakeVertexOnSurfaceByCoord(Face, 0., 0., 0.)
1419             """
1420             theX, theY, theZ, Parameters = ParseParameters(theX, theY, theZ)
1421             # Example: see GEOM_TestAll.py
1422             anObj = self.BasicOp.MakePointOnSurfaceByCoord(theRefSurf, theX, theY, theZ)
1423             RaiseIfFailed("MakeVertexOnSurfaceByCoord", self.BasicOp)
1424             anObj.SetParameters(Parameters);
1425             self._autoPublish(anObj, theName, "vertex")
1426             return anObj
1427
1428         ## Create a point, which lays on the given face.
1429         #  The point will lay in arbitrary place of the face.
1430         #  The only condition on it is a non-zero distance to the face boundary.
1431         #  Such point can be used to uniquely identify the face inside any
1432         #  shape in case, when the shape does not contain overlapped faces.
1433         #  @param theFace The referenced face.
1434         #  @param theName Object name; when specified, this parameter is used
1435         #         for result publication in the study. Otherwise, if automatic
1436         #         publication is switched on, default value is used for result name.
1437         #
1438         #  @return New GEOM.GEOM_Object, containing the created point.
1439         #
1440         #  @ref swig_MakeVertexInsideFace "Example"
1441         @ManageTransactions("BasicOp")
1442         def MakeVertexInsideFace (self, theFace, theName=None):
1443             """
1444             Create a point, which lays on the given face.
1445             The point will lay in arbitrary place of the face.
1446             The only condition on it is a non-zero distance to the face boundary.
1447             Such point can be used to uniquely identify the face inside any
1448             shape in case, when the shape does not contain overlapped faces.
1449
1450             Parameters:
1451                 theFace The referenced face.
1452                 theName Object name; when specified, this parameter is used
1453                         for result publication in the study. Otherwise, if automatic
1454                         publication is switched on, default value is used for result name.
1455
1456             Returns:
1457                 New GEOM.GEOM_Object, containing the created point.
1458
1459             Example of usage:
1460                 p_on_face = geompy.MakeVertexInsideFace(Face)
1461             """
1462             # Example: see GEOM_TestAll.py
1463             anObj = self.BasicOp.MakePointOnFace(theFace)
1464             RaiseIfFailed("MakeVertexInsideFace", self.BasicOp)
1465             self._autoPublish(anObj, theName, "vertex")
1466             return anObj
1467
1468         ## Create a point on intersection of two lines.
1469         #  @param theRefLine1, theRefLine2 The referenced lines.
1470         #  @param theName Object name; when specified, this parameter is used
1471         #         for result publication in the study. Otherwise, if automatic
1472         #         publication is switched on, default value is used for result name.
1473         #
1474         #  @return New GEOM.GEOM_Object, containing the created point.
1475         #
1476         #  @ref swig_MakeVertexOnLinesIntersection "Example"
1477         @ManageTransactions("BasicOp")
1478         def MakeVertexOnLinesIntersection(self, theRefLine1, theRefLine2, theName=None):
1479             """
1480             Create a point on intersection of two lines.
1481
1482             Parameters:
1483                 theRefLine1, theRefLine2 The referenced lines.
1484                 theName Object name; when specified, this parameter is used
1485                         for result publication in the study. Otherwise, if automatic
1486                         publication is switched on, default value is used for result name.
1487
1488             Returns:
1489                 New GEOM.GEOM_Object, containing the created point.
1490             """
1491             # Example: see GEOM_TestAll.py
1492             anObj = self.BasicOp.MakePointOnLinesIntersection(theRefLine1, theRefLine2)
1493             RaiseIfFailed("MakePointOnLinesIntersection", self.BasicOp)
1494             self._autoPublish(anObj, theName, "vertex")
1495             return anObj
1496
1497         ## Create a tangent, corresponding to the given parameter on the given curve.
1498         #  @param theRefCurve The referenced curve.
1499         #  @param theParameter Value of parameter on the referenced curve.
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 tangent.
1505         #
1506         #  @ref swig_MakeTangentOnCurve "Example"
1507         @ManageTransactions("BasicOp")
1508         def MakeTangentOnCurve(self, theRefCurve, theParameter, theName=None):
1509             """
1510             Create a tangent, corresponding to the given parameter on the given curve.
1511
1512             Parameters:
1513                 theRefCurve The referenced curve.
1514                 theParameter Value of parameter on the referenced curve.
1515                 theName Object name; when specified, this parameter is used
1516                         for result publication in the study. Otherwise, if automatic
1517                         publication is switched on, default value is used for result name.
1518
1519             Returns:
1520                 New GEOM.GEOM_Object, containing the created tangent.
1521
1522             Example of usage:
1523                 tan_on_arc = geompy.MakeTangentOnCurve(Arc, 0.7)
1524             """
1525             anObj = self.BasicOp.MakeTangentOnCurve(theRefCurve, theParameter)
1526             RaiseIfFailed("MakeTangentOnCurve", self.BasicOp)
1527             self._autoPublish(anObj, theName, "tangent")
1528             return anObj
1529
1530         ## Create a tangent plane, corresponding to the given parameter on the given face.
1531         #  @param theFace The face for which tangent plane should be built.
1532         #  @param theParameterV vertical value of the center point (0.0 - 1.0).
1533         #  @param theParameterU horisontal value of the center point (0.0 - 1.0).
1534         #  @param theTrimSize the size of plane.
1535         #  @param theName Object name; when specified, this parameter is used
1536         #         for result publication in the study. Otherwise, if automatic
1537         #         publication is switched on, default value is used for result name.
1538         #
1539         #  @return New GEOM.GEOM_Object, containing the created tangent.
1540         #
1541         #  @ref swig_MakeTangentPlaneOnFace "Example"
1542         @ManageTransactions("BasicOp")
1543         def MakeTangentPlaneOnFace(self, theFace, theParameterU, theParameterV, theTrimSize, theName=None):
1544             """
1545             Create a tangent plane, corresponding to the given parameter on the given face.
1546
1547             Parameters:
1548                 theFace The face for which tangent plane should be built.
1549                 theParameterV vertical value of the center point (0.0 - 1.0).
1550                 theParameterU horisontal value of the center point (0.0 - 1.0).
1551                 theTrimSize the size of plane.
1552                 theName Object name; when specified, this parameter is used
1553                         for result publication in the study. Otherwise, if automatic
1554                         publication is switched on, default value is used for result name.
1555
1556            Returns:
1557                 New GEOM.GEOM_Object, containing the created tangent.
1558
1559            Example of usage:
1560                 an_on_face = geompy.MakeTangentPlaneOnFace(tan_extrusion, 0.7, 0.5, 150)
1561             """
1562             anObj = self.BasicOp.MakeTangentPlaneOnFace(theFace, theParameterU, theParameterV, theTrimSize)
1563             RaiseIfFailed("MakeTangentPlaneOnFace", self.BasicOp)
1564             self._autoPublish(anObj, theName, "tangent")
1565             return anObj
1566
1567         ## Create a vector with the given components.
1568         #  @param theDX X component of the vector.
1569         #  @param theDY Y component of the vector.
1570         #  @param theDZ Z component of the vector.
1571         #  @param theName Object name; when specified, this parameter is used
1572         #         for result publication in the study. Otherwise, if automatic
1573         #         publication is switched on, default value is used for result name.
1574         #
1575         #  @return New GEOM.GEOM_Object, containing the created vector.
1576         #
1577         #  @ref tui_creation_vector "Example"
1578         @ManageTransactions("BasicOp")
1579         def MakeVectorDXDYDZ(self, theDX, theDY, theDZ, theName=None):
1580             """
1581             Create a vector with the given components.
1582
1583             Parameters:
1584                 theDX X component of the vector.
1585                 theDY Y component of the vector.
1586                 theDZ Z component of the vector.
1587                 theName Object name; when specified, this parameter is used
1588                         for result publication in the study. Otherwise, if automatic
1589                         publication is switched on, default value is used for result name.
1590
1591             Returns:
1592                 New GEOM.GEOM_Object, containing the created vector.
1593             """
1594             # Example: see GEOM_TestAll.py
1595             theDX,theDY,theDZ,Parameters = ParseParameters(theDX, theDY, theDZ)
1596             anObj = self.BasicOp.MakeVectorDXDYDZ(theDX, theDY, theDZ)
1597             RaiseIfFailed("MakeVectorDXDYDZ", self.BasicOp)
1598             anObj.SetParameters(Parameters)
1599             self._autoPublish(anObj, theName, "vector")
1600             return anObj
1601
1602         ## Create a vector between two points.
1603         #  @param thePnt1 Start point for the vector.
1604         #  @param thePnt2 End point for the vector.
1605         #  @param theName Object name; when specified, this parameter is used
1606         #         for result publication in the study. Otherwise, if automatic
1607         #         publication is switched on, default value is used for result name.
1608         #
1609         #  @return New GEOM.GEOM_Object, containing the created vector.
1610         #
1611         #  @ref tui_creation_vector "Example"
1612         @ManageTransactions("BasicOp")
1613         def MakeVector(self, thePnt1, thePnt2, theName=None):
1614             """
1615             Create a vector between two points.
1616
1617             Parameters:
1618                 thePnt1 Start point for the vector.
1619                 thePnt2 End point for the vector.
1620                 theName Object name; when specified, this parameter is used
1621                         for result publication in the study. Otherwise, if automatic
1622                         publication is switched on, default value is used for result name.
1623
1624             Returns:
1625                 New GEOM.GEOM_Object, containing the created vector.
1626             """
1627             # Example: see GEOM_TestAll.py
1628             anObj = self.BasicOp.MakeVectorTwoPnt(thePnt1, thePnt2)
1629             RaiseIfFailed("MakeVectorTwoPnt", self.BasicOp)
1630             self._autoPublish(anObj, theName, "vector")
1631             return anObj
1632
1633         ## Create a line, passing through the given point
1634         #  and parallel to the given direction
1635         #  @param thePnt Point. The resulting line will pass through it.
1636         #  @param theDir Direction. The resulting line will be parallel to it.
1637         #  @param theName Object name; when specified, this parameter is used
1638         #         for result publication in the study. Otherwise, if automatic
1639         #         publication is switched on, default value is used for result name.
1640         #
1641         #  @return New GEOM.GEOM_Object, containing the created line.
1642         #
1643         #  @ref tui_creation_line "Example"
1644         @ManageTransactions("BasicOp")
1645         def MakeLine(self, thePnt, theDir, theName=None):
1646             """
1647             Create a line, passing through the given point
1648             and parallel to the given direction
1649
1650             Parameters:
1651                 thePnt Point. The resulting line will pass through it.
1652                 theDir Direction. The resulting line will be parallel to it.
1653                 theName Object name; when specified, this parameter is used
1654                         for result publication in the study. Otherwise, if automatic
1655                         publication is switched on, default value is used for result name.
1656
1657             Returns:
1658                 New GEOM.GEOM_Object, containing the created line.
1659             """
1660             # Example: see GEOM_TestAll.py
1661             anObj = self.BasicOp.MakeLine(thePnt, theDir)
1662             RaiseIfFailed("MakeLine", self.BasicOp)
1663             self._autoPublish(anObj, theName, "line")
1664             return anObj
1665
1666         ## Create a line, passing through the given points
1667         #  @param thePnt1 First of two points, defining the line.
1668         #  @param thePnt2 Second of two points, defining the line.
1669         #  @param theName Object name; when specified, this parameter is used
1670         #         for result publication in the study. Otherwise, if automatic
1671         #         publication is switched on, default value is used for result name.
1672         #
1673         #  @return New GEOM.GEOM_Object, containing the created line.
1674         #
1675         #  @ref tui_creation_line "Example"
1676         @ManageTransactions("BasicOp")
1677         def MakeLineTwoPnt(self, thePnt1, thePnt2, theName=None):
1678             """
1679             Create a line, passing through the given points
1680
1681             Parameters:
1682                 thePnt1 First of two points, defining the line.
1683                 thePnt2 Second of two points, defining the line.
1684                 theName Object name; when specified, this parameter is used
1685                         for result publication in the study. Otherwise, if automatic
1686                         publication is switched on, default value is used for result name.
1687
1688             Returns:
1689                 New GEOM.GEOM_Object, containing the created line.
1690             """
1691             # Example: see GEOM_TestAll.py
1692             anObj = self.BasicOp.MakeLineTwoPnt(thePnt1, thePnt2)
1693             RaiseIfFailed("MakeLineTwoPnt", self.BasicOp)
1694             self._autoPublish(anObj, theName, "line")
1695             return anObj
1696
1697         ## Create a line on two faces intersection.
1698         #  @param theFace1 First of two faces, defining the line.
1699         #  @param theFace2 Second of two faces, defining the line.
1700         #  @param theName Object name; when specified, this parameter is used
1701         #         for result publication in the study. Otherwise, if automatic
1702         #         publication is switched on, default value is used for result name.
1703         #
1704         #  @return New GEOM.GEOM_Object, containing the created line.
1705         #
1706         #  @ref swig_MakeLineTwoFaces "Example"
1707         @ManageTransactions("BasicOp")
1708         def MakeLineTwoFaces(self, theFace1, theFace2, theName=None):
1709             """
1710             Create a line on two faces intersection.
1711
1712             Parameters:
1713                 theFace1 First of two faces, defining the line.
1714                 theFace2 Second of two faces, defining the line.
1715                 theName Object name; when specified, this parameter is used
1716                         for result publication in the study. Otherwise, if automatic
1717                         publication is switched on, default value is used for result name.
1718
1719             Returns:
1720                 New GEOM.GEOM_Object, containing the created line.
1721             """
1722             # Example: see GEOM_TestAll.py
1723             anObj = self.BasicOp.MakeLineTwoFaces(theFace1, theFace2)
1724             RaiseIfFailed("MakeLineTwoFaces", self.BasicOp)
1725             self._autoPublish(anObj, theName, "line")
1726             return anObj
1727
1728         ## Create a plane, passing through the given point
1729         #  and normal to the given vector.
1730         #  @param thePnt Point, the plane has to pass through.
1731         #  @param theVec Vector, defining the plane normal direction.
1732         #  @param theTrimSize Half size of a side of quadrangle face, representing the plane.
1733         #  @param theName Object name; when specified, this parameter is used
1734         #         for result publication in the study. Otherwise, if automatic
1735         #         publication is switched on, default value is used for result name.
1736         #
1737         #  @return New GEOM.GEOM_Object, containing the created plane.
1738         #
1739         #  @ref tui_creation_plane "Example"
1740         @ManageTransactions("BasicOp")
1741         def MakePlane(self, thePnt, theVec, theTrimSize, theName=None):
1742             """
1743             Create a plane, passing through the given point
1744             and normal to the given vector.
1745
1746             Parameters:
1747                 thePnt Point, the plane has to pass through.
1748                 theVec Vector, defining the plane normal direction.
1749                 theTrimSize Half size of a side of quadrangle face, representing the plane.
1750                 theName Object name; when specified, this parameter is used
1751                         for result publication in the study. Otherwise, if automatic
1752                         publication is switched on, default value is used for result name.
1753
1754             Returns:
1755                 New GEOM.GEOM_Object, containing the created plane.
1756             """
1757             # Example: see GEOM_TestAll.py
1758             theTrimSize, Parameters = ParseParameters(theTrimSize);
1759             anObj = self.BasicOp.MakePlanePntVec(thePnt, theVec, theTrimSize)
1760             RaiseIfFailed("MakePlanePntVec", self.BasicOp)
1761             anObj.SetParameters(Parameters)
1762             self._autoPublish(anObj, theName, "plane")
1763             return anObj
1764
1765         ## Create a plane, passing through the three given points
1766         #  @param thePnt1 First of three points, defining the plane.
1767         #  @param thePnt2 Second of three points, defining the plane.
1768         #  @param thePnt3 Third of three points, defining the plane.
1769         #  @param theTrimSize Half size of a side of quadrangle face, representing the plane.
1770         #  @param theName Object name; when specified, this parameter is used
1771         #         for result publication in the study. Otherwise, if automatic
1772         #         publication is switched on, default value is used for result name.
1773         #
1774         #  @return New GEOM.GEOM_Object, containing the created plane.
1775         #
1776         #  @ref tui_creation_plane "Example"
1777         @ManageTransactions("BasicOp")
1778         def MakePlaneThreePnt(self, thePnt1, thePnt2, thePnt3, theTrimSize, theName=None):
1779             """
1780             Create a plane, passing through the three given points
1781
1782             Parameters:
1783                 thePnt1 First of three points, defining the plane.
1784                 thePnt2 Second of three points, defining the plane.
1785                 thePnt3 Third of three points, defining the plane.
1786                 theTrimSize Half size of a side of quadrangle face, representing the plane.
1787                 theName Object name; when specified, this parameter is used
1788                         for result publication in the study. Otherwise, if automatic
1789                         publication is switched on, default value is used for result name.
1790
1791             Returns:
1792                 New GEOM.GEOM_Object, containing the created plane.
1793             """
1794             # Example: see GEOM_TestAll.py
1795             theTrimSize, Parameters = ParseParameters(theTrimSize);
1796             anObj = self.BasicOp.MakePlaneThreePnt(thePnt1, thePnt2, thePnt3, theTrimSize)
1797             RaiseIfFailed("MakePlaneThreePnt", self.BasicOp)
1798             anObj.SetParameters(Parameters)
1799             self._autoPublish(anObj, theName, "plane")
1800             return anObj
1801
1802         ## Create a plane, similar to the existing one, but with another size of representing face.
1803         #  @param theFace Referenced plane or LCS(Marker).
1804         #  @param theTrimSize New half size of a side of quadrangle face, representing the plane.
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 MakePlaneFace(self, theFace, theTrimSize, theName=None):
1814             """
1815             Create a plane, similar to the existing one, but with another size of representing face.
1816
1817             Parameters:
1818                 theFace Referenced plane or LCS(Marker).
1819                 theTrimSize New half size of a side of quadrangle face, representing the plane.
1820                 theName Object name; when specified, this parameter is used
1821                         for result publication in the study. Otherwise, if automatic
1822                         publication is switched on, default value is used for result name.
1823
1824             Returns:
1825                 New GEOM.GEOM_Object, containing the created plane.
1826             """
1827             # Example: see GEOM_TestAll.py
1828             theTrimSize, Parameters = ParseParameters(theTrimSize);
1829             anObj = self.BasicOp.MakePlaneFace(theFace, theTrimSize)
1830             RaiseIfFailed("MakePlaneFace", self.BasicOp)
1831             anObj.SetParameters(Parameters)
1832             self._autoPublish(anObj, theName, "plane")
1833             return anObj
1834
1835         ## Create a plane, passing through the 2 vectors
1836         #  with center in a start point of the first vector.
1837         #  @param theVec1 Vector, defining center point and plane direction.
1838         #  @param theVec2 Vector, defining the plane normal direction.
1839         #  @param theTrimSize Half size of a side of quadrangle face, representing the plane.
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 plane.
1845         #
1846         #  @ref tui_creation_plane "Example"
1847         @ManageTransactions("BasicOp")
1848         def MakePlane2Vec(self, theVec1, theVec2, theTrimSize, theName=None):
1849             """
1850             Create a plane, passing through the 2 vectors
1851             with center in a start point of the first vector.
1852
1853             Parameters:
1854                 theVec1 Vector, defining center point and plane direction.
1855                 theVec2 Vector, defining the plane normal direction.
1856                 theTrimSize Half size of a side of quadrangle face, representing the plane.
1857                 theName Object name; when specified, this parameter is used
1858                         for result publication in the study. Otherwise, if automatic
1859                         publication is switched on, default value is used for result name.
1860
1861             Returns:
1862                 New GEOM.GEOM_Object, containing the created plane.
1863             """
1864             # Example: see GEOM_TestAll.py
1865             theTrimSize, Parameters = ParseParameters(theTrimSize);
1866             anObj = self.BasicOp.MakePlane2Vec(theVec1, theVec2, theTrimSize)
1867             RaiseIfFailed("MakePlane2Vec", self.BasicOp)
1868             anObj.SetParameters(Parameters)
1869             self._autoPublish(anObj, theName, "plane")
1870             return anObj
1871
1872         ## Create a plane, based on a Local coordinate system.
1873         #  @param theLCS  coordinate system, defining plane.
1874         #  @param theTrimSize Half size of a side of quadrangle face, representing the plane.
1875         #  @param theOrientation OXY, OYZ or OZX orientation - (1, 2 or 3)
1876         #  @param theName Object name; when specified, this parameter is used
1877         #         for result publication in the study. Otherwise, if automatic
1878         #         publication is switched on, default value is used for result name.
1879         #
1880         #  @return New GEOM.GEOM_Object, containing the created plane.
1881         #
1882         #  @ref tui_creation_plane "Example"
1883         @ManageTransactions("BasicOp")
1884         def MakePlaneLCS(self, theLCS, theTrimSize, theOrientation, theName=None):
1885             """
1886             Create a plane, based on a Local coordinate system.
1887
1888            Parameters:
1889                 theLCS  coordinate system, defining plane.
1890                 theTrimSize Half size of a side of quadrangle face, representing the plane.
1891                 theOrientation OXY, OYZ or OZX orientation - (1, 2 or 3)
1892                 theName Object name; when specified, this parameter is used
1893                         for result publication in the study. Otherwise, if automatic
1894                         publication is switched on, default value is used for result name.
1895
1896             Returns:
1897                 New GEOM.GEOM_Object, containing the created plane.
1898             """
1899             # Example: see GEOM_TestAll.py
1900             theTrimSize, Parameters = ParseParameters(theTrimSize);
1901             anObj = self.BasicOp.MakePlaneLCS(theLCS, theTrimSize, theOrientation)
1902             RaiseIfFailed("MakePlaneLCS", self.BasicOp)
1903             anObj.SetParameters(Parameters)
1904             self._autoPublish(anObj, theName, "plane")
1905             return anObj
1906
1907         ## Create a local coordinate system.
1908         #  @param OX,OY,OZ Three coordinates of coordinate system origin.
1909         #  @param XDX,XDY,XDZ Three components of OX direction
1910         #  @param YDX,YDY,YDZ Three components of OY direction
1911         #  @param theName Object name; when specified, this parameter is used
1912         #         for result publication in the study. Otherwise, if automatic
1913         #         publication is switched on, default value is used for result name.
1914         #
1915         #  @return New GEOM.GEOM_Object, containing the created coordinate system.
1916         #
1917         #  @ref swig_MakeMarker "Example"
1918         @ManageTransactions("BasicOp")
1919         def MakeMarker(self, OX,OY,OZ, XDX,XDY,XDZ, YDX,YDY,YDZ, theName=None):
1920             """
1921             Create a local coordinate system.
1922
1923             Parameters:
1924                 OX,OY,OZ Three coordinates of coordinate system origin.
1925                 XDX,XDY,XDZ Three components of OX direction
1926                 YDX,YDY,YDZ Three components of OY direction
1927                 theName Object name; when specified, this parameter is used
1928                         for result publication in the study. Otherwise, if automatic
1929                         publication is switched on, default value is used for result name.
1930
1931             Returns:
1932                 New GEOM.GEOM_Object, containing the created coordinate system.
1933             """
1934             # Example: see GEOM_TestAll.py
1935             OX,OY,OZ, XDX,XDY,XDZ, YDX,YDY,YDZ, Parameters = ParseParameters(OX,OY,OZ, XDX,XDY,XDZ, YDX,YDY,YDZ);
1936             anObj = self.BasicOp.MakeMarker(OX,OY,OZ, XDX,XDY,XDZ, YDX,YDY,YDZ)
1937             RaiseIfFailed("MakeMarker", self.BasicOp)
1938             anObj.SetParameters(Parameters)
1939             self._autoPublish(anObj, theName, "lcs")
1940             return anObj
1941
1942         ## Create a local coordinate system from shape.
1943         #  @param theShape The initial shape to detect the coordinate system.
1944         #  @param theName Object name; when specified, this parameter is used
1945         #         for result publication in the study. Otherwise, if automatic
1946         #         publication is switched on, default value is used for result name.
1947         #
1948         #  @return New GEOM.GEOM_Object, containing the created coordinate system.
1949         #
1950         #  @ref tui_creation_lcs "Example"
1951         @ManageTransactions("BasicOp")
1952         def MakeMarkerFromShape(self, theShape, theName=None):
1953             """
1954             Create a local coordinate system from shape.
1955
1956             Parameters:
1957                 theShape The initial shape to detect the coordinate system.
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 coordinate system.
1964             """
1965             anObj = self.BasicOp.MakeMarkerFromShape(theShape)
1966             RaiseIfFailed("MakeMarkerFromShape", self.BasicOp)
1967             self._autoPublish(anObj, theName, "lcs")
1968             return anObj
1969
1970         ## Create a local coordinate system from point and two vectors.
1971         #  @param theOrigin Point of coordinate system origin.
1972         #  @param theXVec Vector of X direction
1973         #  @param theYVec Vector of Y direction
1974         #  @param theName Object name; when specified, this parameter is used
1975         #         for result publication in the study. Otherwise, if automatic
1976         #         publication is switched on, default value is used for result name.
1977         #
1978         #  @return New GEOM.GEOM_Object, containing the created coordinate system.
1979         #
1980         #  @ref tui_creation_lcs "Example"
1981         @ManageTransactions("BasicOp")
1982         def MakeMarkerPntTwoVec(self, theOrigin, theXVec, theYVec, theName=None):
1983             """
1984             Create a local coordinate system from point and two vectors.
1985
1986             Parameters:
1987                 theOrigin Point of coordinate system origin.
1988                 theXVec Vector of X direction
1989                 theYVec Vector of Y direction
1990                 theName Object name; when specified, this parameter is used
1991                         for result publication in the study. Otherwise, if automatic
1992                         publication is switched on, default value is used for result name.
1993
1994             Returns:
1995                 New GEOM.GEOM_Object, containing the created coordinate system.
1996
1997             """
1998             anObj = self.BasicOp.MakeMarkerPntTwoVec(theOrigin, theXVec, theYVec)
1999             RaiseIfFailed("MakeMarkerPntTwoVec", self.BasicOp)
2000             self._autoPublish(anObj, theName, "lcs")
2001             return anObj
2002
2003         # end of l3_basic_go
2004         ## @}
2005
2006         ## @addtogroup l4_curves
2007         ## @{
2008
2009         ##  Create an arc of circle, passing through three given points.
2010         #  @param thePnt1 Start point of the arc.
2011         #  @param thePnt2 Middle point of the arc.
2012         #  @param thePnt3 End point of the arc.
2013         #  @param theName Object name; when specified, this parameter is used
2014         #         for result publication in the study. Otherwise, if automatic
2015         #         publication is switched on, default value is used for result name.
2016         #
2017         #  @return New GEOM.GEOM_Object, containing the created arc.
2018         #
2019         #  @ref swig_MakeArc "Example"
2020         @ManageTransactions("CurvesOp")
2021         def MakeArc(self, thePnt1, thePnt2, thePnt3, theName=None):
2022             """
2023             Create an arc of circle, passing through three given points.
2024
2025             Parameters:
2026                 thePnt1 Start point of the arc.
2027                 thePnt2 Middle point of the arc.
2028                 thePnt3 End point of the arc.
2029                 theName Object name; when specified, this parameter is used
2030                         for result publication in the study. Otherwise, if automatic
2031                         publication is switched on, default value is used for result name.
2032
2033             Returns:
2034                 New GEOM.GEOM_Object, containing the created arc.
2035             """
2036             # Example: see GEOM_TestAll.py
2037             anObj = self.CurvesOp.MakeArc(thePnt1, thePnt2, thePnt3)
2038             RaiseIfFailed("MakeArc", self.CurvesOp)
2039             self._autoPublish(anObj, theName, "arc")
2040             return anObj
2041
2042         ##  Create an arc of circle from a center and 2 points.
2043         #  @param thePnt1 Center of the arc
2044         #  @param thePnt2 Start point of the arc. (Gives also the radius of the arc)
2045         #  @param thePnt3 End point of the arc (Gives also a direction)
2046         #  @param theSense Orientation of the arc
2047         #  @param theName Object name; when specified, this parameter is used
2048         #         for result publication in the study. Otherwise, if automatic
2049         #         publication is switched on, default value is used for result name.
2050         #
2051         #  @return New GEOM.GEOM_Object, containing the created arc.
2052         #
2053         #  @ref swig_MakeArc "Example"
2054         @ManageTransactions("CurvesOp")
2055         def MakeArcCenter(self, thePnt1, thePnt2, thePnt3, theSense=False, theName=None):
2056             """
2057             Create an arc of circle from a center and 2 points.
2058
2059             Parameters:
2060                 thePnt1 Center of the arc
2061                 thePnt2 Start point of the arc. (Gives also the radius of the arc)
2062                 thePnt3 End point of the arc (Gives also a direction)
2063                 theSense Orientation of the arc
2064                 theName Object name; when specified, this parameter is used
2065                         for result publication in the study. Otherwise, if automatic
2066                         publication is switched on, default value is used for result name.
2067
2068             Returns:
2069                 New GEOM.GEOM_Object, containing the created arc.
2070             """
2071             # Example: see GEOM_TestAll.py
2072             anObj = self.CurvesOp.MakeArcCenter(thePnt1, thePnt2, thePnt3, theSense)
2073             RaiseIfFailed("MakeArcCenter", self.CurvesOp)
2074             self._autoPublish(anObj, theName, "arc")
2075             return anObj
2076
2077         ##  Create an arc of ellipse, of center and two points.
2078         #  @param theCenter Center of the arc.
2079         #  @param thePnt1 defines major radius of the arc by distance from Pnt1 to Pnt2.
2080         #  @param thePnt2 defines plane of ellipse and minor radius as distance from Pnt3 to line from Pnt1 to Pnt2.
2081         #  @param theName Object name; when specified, this parameter is used
2082         #         for result publication in the study. Otherwise, if automatic
2083         #         publication is switched on, default value is used for result name.
2084         #
2085         #  @return New GEOM.GEOM_Object, containing the created arc.
2086         #
2087         #  @ref swig_MakeArc "Example"
2088         @ManageTransactions("CurvesOp")
2089         def MakeArcOfEllipse(self, theCenter, thePnt1, thePnt2, theName=None):
2090             """
2091             Create an arc of ellipse, of center and two points.
2092
2093             Parameters:
2094                 theCenter Center of the arc.
2095                 thePnt1 defines major radius of the arc by distance from Pnt1 to Pnt2.
2096                 thePnt2 defines plane of ellipse and minor radius as distance from Pnt3 to line from Pnt1 to Pnt2.
2097                 theName Object name; when specified, this parameter is used
2098                         for result publication in the study. Otherwise, if automatic
2099                         publication is switched on, default value is used for result name.
2100
2101             Returns:
2102                 New GEOM.GEOM_Object, containing the created arc.
2103             """
2104             # Example: see GEOM_TestAll.py
2105             anObj = self.CurvesOp.MakeArcOfEllipse(theCenter, thePnt1, thePnt2)
2106             RaiseIfFailed("MakeArcOfEllipse", self.CurvesOp)
2107             self._autoPublish(anObj, theName, "arc")
2108             return anObj
2109
2110         ## Create a circle with given center, normal vector and radius.
2111         #  @param thePnt Circle center.
2112         #  @param theVec Vector, normal to the plane of the circle.
2113         #  @param theR Circle radius.
2114         #  @param theName Object name; when specified, this parameter is used
2115         #         for result publication in the study. Otherwise, if automatic
2116         #         publication is switched on, default value is used for result name.
2117         #
2118         #  @return New GEOM.GEOM_Object, containing the created circle.
2119         #
2120         #  @ref tui_creation_circle "Example"
2121         @ManageTransactions("CurvesOp")
2122         def MakeCircle(self, thePnt, theVec, theR, theName=None):
2123             """
2124             Create a circle with given center, normal vector and radius.
2125
2126             Parameters:
2127                 thePnt Circle center.
2128                 theVec Vector, normal to the plane of the circle.
2129                 theR Circle radius.
2130                 theName Object name; when specified, this parameter is used
2131                         for result publication in the study. Otherwise, if automatic
2132                         publication is switched on, default value is used for result name.
2133
2134             Returns:
2135                 New GEOM.GEOM_Object, containing the created circle.
2136             """
2137             # Example: see GEOM_TestAll.py
2138             theR, Parameters = ParseParameters(theR)
2139             anObj = self.CurvesOp.MakeCirclePntVecR(thePnt, theVec, theR)
2140             RaiseIfFailed("MakeCirclePntVecR", self.CurvesOp)
2141             anObj.SetParameters(Parameters)
2142             self._autoPublish(anObj, theName, "circle")
2143             return anObj
2144
2145         ## Create a circle with given radius.
2146         #  Center of the circle will be in the origin of global
2147         #  coordinate system and normal vector will be codirected with Z axis
2148         #  @param theR Circle radius.
2149         #  @param theName Object name; when specified, this parameter is used
2150         #         for result publication in the study. Otherwise, if automatic
2151         #         publication is switched on, default value is used for result name.
2152         #
2153         #  @return New GEOM.GEOM_Object, containing the created circle.
2154         @ManageTransactions("CurvesOp")
2155         def MakeCircleR(self, theR, theName=None):
2156             """
2157             Create a circle with given radius.
2158             Center of the circle will be in the origin of global
2159             coordinate system and normal vector will be codirected with Z axis
2160
2161             Parameters:
2162                 theR Circle radius.
2163                 theName Object name; when specified, this parameter is used
2164                         for result publication in the study. Otherwise, if automatic
2165                         publication is switched on, default value is used for result name.
2166
2167             Returns:
2168                 New GEOM.GEOM_Object, containing the created circle.
2169             """
2170             anObj = self.CurvesOp.MakeCirclePntVecR(None, None, theR)
2171             RaiseIfFailed("MakeCirclePntVecR", self.CurvesOp)
2172             self._autoPublish(anObj, theName, "circle")
2173             return anObj
2174
2175         ## Create a circle, passing through three given points
2176         #  @param thePnt1,thePnt2,thePnt3 Points, defining the circle.
2177         #  @param theName Object name; when specified, this parameter is used
2178         #         for result publication in the study. Otherwise, if automatic
2179         #         publication is switched on, default value is used for result name.
2180         #
2181         #  @return New GEOM.GEOM_Object, containing the created circle.
2182         #
2183         #  @ref tui_creation_circle "Example"
2184         @ManageTransactions("CurvesOp")
2185         def MakeCircleThreePnt(self, thePnt1, thePnt2, thePnt3, theName=None):
2186             """
2187             Create a circle, passing through three given points
2188
2189             Parameters:
2190                 thePnt1,thePnt2,thePnt3 Points, defining the circle.
2191                 theName Object name; when specified, this parameter is used
2192                         for result publication in the study. Otherwise, if automatic
2193                         publication is switched on, default value is used for result name.
2194
2195             Returns:
2196                 New GEOM.GEOM_Object, containing the created circle.
2197             """
2198             # Example: see GEOM_TestAll.py
2199             anObj = self.CurvesOp.MakeCircleThreePnt(thePnt1, thePnt2, thePnt3)
2200             RaiseIfFailed("MakeCircleThreePnt", self.CurvesOp)
2201             self._autoPublish(anObj, theName, "circle")
2202             return anObj
2203
2204         ## Create a circle, with given point1 as center,
2205         #  passing through the point2 as radius and laying in the plane,
2206         #  defined by all three given points.
2207         #  @param thePnt1,thePnt2,thePnt3 Points, defining the circle.
2208         #  @param theName Object name; when specified, this parameter is used
2209         #         for result publication in the study. Otherwise, if automatic
2210         #         publication is switched on, default value is used for result name.
2211         #
2212         #  @return New GEOM.GEOM_Object, containing the created circle.
2213         #
2214         #  @ref swig_MakeCircle "Example"
2215         @ManageTransactions("CurvesOp")
2216         def MakeCircleCenter2Pnt(self, thePnt1, thePnt2, thePnt3, theName=None):
2217             """
2218             Create a circle, with given point1 as center,
2219             passing through the point2 as radius and laying in the plane,
2220             defined by all three given points.
2221
2222             Parameters:
2223                 thePnt1,thePnt2,thePnt3 Points, defining the circle.
2224                 theName Object name; when specified, this parameter is used
2225                         for result publication in the study. Otherwise, if automatic
2226                         publication is switched on, default value is used for result name.
2227
2228             Returns:
2229                 New GEOM.GEOM_Object, containing the created circle.
2230             """
2231             # Example: see GEOM_example6.py
2232             anObj = self.CurvesOp.MakeCircleCenter2Pnt(thePnt1, thePnt2, thePnt3)
2233             RaiseIfFailed("MakeCircleCenter2Pnt", self.CurvesOp)
2234             self._autoPublish(anObj, theName, "circle")
2235             return anObj
2236
2237         ## Create an ellipse with given center, normal vector and radiuses.
2238         #  @param thePnt Ellipse center.
2239         #  @param theVec Vector, normal to the plane of the ellipse.
2240         #  @param theRMajor Major ellipse radius.
2241         #  @param theRMinor Minor ellipse radius.
2242         #  @param theVecMaj Vector, direction of the ellipse's main axis.
2243         #  @param theName Object name; when specified, this parameter is used
2244         #         for result publication in the study. Otherwise, if automatic
2245         #         publication is switched on, default value is used for result name.
2246         #
2247         #  @return New GEOM.GEOM_Object, containing the created ellipse.
2248         #
2249         #  @ref tui_creation_ellipse "Example"
2250         @ManageTransactions("CurvesOp")
2251         def MakeEllipse(self, thePnt, theVec, theRMajor, theRMinor, theVecMaj=None, theName=None):
2252             """
2253             Create an ellipse with given center, normal vector and radiuses.
2254
2255             Parameters:
2256                 thePnt Ellipse center.
2257                 theVec Vector, normal to the plane of the ellipse.
2258                 theRMajor Major ellipse radius.
2259                 theRMinor Minor ellipse radius.
2260                 theVecMaj Vector, direction of the ellipse's main axis.
2261                 theName Object name; when specified, this parameter is used
2262                         for result publication in the study. Otherwise, if automatic
2263                         publication is switched on, default value is used for result name.
2264
2265             Returns:
2266                 New GEOM.GEOM_Object, containing the created ellipse.
2267             """
2268             # Example: see GEOM_TestAll.py
2269             theRMajor, theRMinor, Parameters = ParseParameters(theRMajor, theRMinor)
2270             if theVecMaj is not None:
2271                 anObj = self.CurvesOp.MakeEllipseVec(thePnt, theVec, theRMajor, theRMinor, theVecMaj)
2272             else:
2273                 anObj = self.CurvesOp.MakeEllipse(thePnt, theVec, theRMajor, theRMinor)
2274                 pass
2275             RaiseIfFailed("MakeEllipse", self.CurvesOp)
2276             anObj.SetParameters(Parameters)
2277             self._autoPublish(anObj, theName, "ellipse")
2278             return anObj
2279
2280         ## Create an ellipse with given radiuses.
2281         #  Center of the ellipse will be in the origin of global
2282         #  coordinate system and normal vector will be codirected with Z axis
2283         #  @param theRMajor Major ellipse radius.
2284         #  @param theRMinor Minor ellipse radius.
2285         #  @param theName Object name; when specified, this parameter is used
2286         #         for result publication in the study. Otherwise, if automatic
2287         #         publication is switched on, default value is used for result name.
2288         #
2289         #  @return New GEOM.GEOM_Object, containing the created ellipse.
2290         @ManageTransactions("CurvesOp")
2291         def MakeEllipseRR(self, theRMajor, theRMinor, theName=None):
2292             """
2293             Create an ellipse with given radiuses.
2294             Center of the ellipse will be in the origin of global
2295             coordinate system and normal vector will be codirected with Z axis
2296
2297             Parameters:
2298                 theRMajor Major ellipse radius.
2299                 theRMinor Minor ellipse radius.
2300                 theName Object name; when specified, this parameter is used
2301                         for result publication in the study. Otherwise, if automatic
2302                         publication is switched on, default value is used for result name.
2303
2304             Returns:
2305             New GEOM.GEOM_Object, containing the created ellipse.
2306             """
2307             anObj = self.CurvesOp.MakeEllipse(None, None, theRMajor, theRMinor)
2308             RaiseIfFailed("MakeEllipse", self.CurvesOp)
2309             self._autoPublish(anObj, theName, "ellipse")
2310             return anObj
2311
2312         ## Create a polyline on the set of points.
2313         #  @param thePoints Sequence of points for the polyline.
2314         #  @param theIsClosed If True, build a closed wire.
2315         #  @param theName Object name; when specified, this parameter is used
2316         #         for result publication in the study. Otherwise, if automatic
2317         #         publication is switched on, default value is used for result name.
2318         #
2319         #  @return New GEOM.GEOM_Object, containing the created polyline.
2320         #
2321         #  @ref tui_creation_curve "Example"
2322         @ManageTransactions("CurvesOp")
2323         def MakePolyline(self, thePoints, theIsClosed=False, theName=None):
2324             """
2325             Create a polyline on the set of points.
2326
2327             Parameters:
2328                 thePoints Sequence of points for the polyline.
2329                 theIsClosed If True, build a closed wire.
2330                 theName Object name; when specified, this parameter is used
2331                         for result publication in the study. Otherwise, if automatic
2332                         publication is switched on, default value is used for result name.
2333
2334             Returns:
2335                 New GEOM.GEOM_Object, containing the created polyline.
2336             """
2337             # Example: see GEOM_TestAll.py
2338             anObj = self.CurvesOp.MakePolyline(thePoints, theIsClosed)
2339             RaiseIfFailed("MakePolyline", self.CurvesOp)
2340             self._autoPublish(anObj, theName, "polyline")
2341             return anObj
2342
2343         ## Create bezier curve on the set of points.
2344         #  @param thePoints Sequence of points for the bezier curve.
2345         #  @param theIsClosed If True, build a closed curve.
2346         #  @param theName Object name; when specified, this parameter is used
2347         #         for result publication in the study. Otherwise, if automatic
2348         #         publication is switched on, default value is used for result name.
2349         #
2350         #  @return New GEOM.GEOM_Object, containing the created bezier curve.
2351         #
2352         #  @ref tui_creation_curve "Example"
2353         @ManageTransactions("CurvesOp")
2354         def MakeBezier(self, thePoints, theIsClosed=False, theName=None):
2355             """
2356             Create bezier curve on the set of points.
2357
2358             Parameters:
2359                 thePoints Sequence of points for the bezier curve.
2360                 theIsClosed If True, build a closed curve.
2361                 theName Object name; when specified, this parameter is used
2362                         for result publication in the study. Otherwise, if automatic
2363                         publication is switched on, default value is used for result name.
2364
2365             Returns:
2366                 New GEOM.GEOM_Object, containing the created bezier curve.
2367             """
2368             # Example: see GEOM_TestAll.py
2369             anObj = self.CurvesOp.MakeSplineBezier(thePoints, theIsClosed)
2370             RaiseIfFailed("MakeSplineBezier", self.CurvesOp)
2371             self._autoPublish(anObj, theName, "bezier")
2372             return anObj
2373
2374         ## Create B-Spline curve on the set of points.
2375         #  @param thePoints Sequence of points for the B-Spline curve.
2376         #  @param theIsClosed If True, build a closed curve.
2377         #  @param theDoReordering If TRUE, the algo does not follow the order of
2378         #                         \a thePoints but searches for the closest vertex.
2379         #  @param theName Object name; when specified, this parameter is used
2380         #         for result publication in the study. Otherwise, if automatic
2381         #         publication is switched on, default value is used for result name.
2382         #
2383         #  @return New GEOM.GEOM_Object, containing the created B-Spline curve.
2384         #
2385         #  @ref tui_creation_curve "Example"
2386         @ManageTransactions("CurvesOp")
2387         def MakeInterpol(self, thePoints, theIsClosed=False, theDoReordering=False, theName=None):
2388             """
2389             Create B-Spline curve on the set of points.
2390
2391             Parameters:
2392                 thePoints Sequence of points for the B-Spline curve.
2393                 theIsClosed If True, build a closed curve.
2394                 theDoReordering If True, the algo does not follow the order of
2395                                 thePoints but searches for the closest vertex.
2396                 theName Object name; when specified, this parameter is used
2397                         for result publication in the study. Otherwise, if automatic
2398                         publication is switched on, default value is used for result name.
2399
2400             Returns:
2401                 New GEOM.GEOM_Object, containing the created B-Spline curve.
2402             """
2403             # Example: see GEOM_TestAll.py
2404             anObj = self.CurvesOp.MakeSplineInterpolation(thePoints, theIsClosed, theDoReordering)
2405             RaiseIfFailed("MakeInterpol", self.CurvesOp)
2406             self._autoPublish(anObj, theName, "bspline")
2407             return anObj
2408
2409         ## Create B-Spline curve on the set of points.
2410         #  @param thePoints Sequence of points for the B-Spline curve.
2411         #  @param theFirstVec Vector object, defining the curve direction at its first point.
2412         #  @param theLastVec Vector object, defining the curve direction at its last point.
2413         #  @param theName Object name; when specified, this parameter is used
2414         #         for result publication in the study. Otherwise, if automatic
2415         #         publication is switched on, default value is used for result name.
2416         #
2417         #  @return New GEOM.GEOM_Object, containing the created B-Spline curve.
2418         #
2419         #  @ref tui_creation_curve "Example"
2420         @ManageTransactions("CurvesOp")
2421         def MakeInterpolWithTangents(self, thePoints, theFirstVec, theLastVec, theName=None):
2422             """
2423             Create B-Spline curve on the set of points.
2424
2425             Parameters:
2426                 thePoints Sequence of points for the B-Spline curve.
2427                 theFirstVec Vector object, defining the curve direction at its first point.
2428                 theLastVec Vector object, defining the curve direction at its last point.
2429                 theName Object name; when specified, this parameter is used
2430                         for result publication in the study. Otherwise, if automatic
2431                         publication is switched on, default value is used for result name.
2432
2433             Returns:
2434                 New GEOM.GEOM_Object, containing the created B-Spline curve.
2435             """
2436             # Example: see GEOM_TestAll.py
2437             anObj = self.CurvesOp.MakeSplineInterpolWithTangents(thePoints, theFirstVec, theLastVec)
2438             RaiseIfFailed("MakeInterpolWithTangents", self.CurvesOp)
2439             self._autoPublish(anObj, theName, "bspline")
2440             return anObj
2441
2442         ## Creates a curve using the parametric definition of the basic points.
2443         #  @param thexExpr parametric equation of the coordinates X.
2444         #  @param theyExpr parametric equation of the coordinates Y.
2445         #  @param thezExpr parametric equation of the coordinates Z.
2446         #  @param theParamMin the minimal value of the parameter.
2447         #  @param theParamMax the maximum value of the parameter.
2448         #  @param theParamStep the number of steps if theNewMethod = True, else step value of the parameter.
2449         #  @param theCurveType the type of the curve,
2450         #         one of GEOM.Polyline, GEOM.Bezier, GEOM.Interpolation.
2451         #  @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.
2452         #  @param theName Object name; when specified, this parameter is used
2453         #         for result publication in the study. Otherwise, if automatic
2454         #         publication is switched on, default value is used for result name.
2455         #
2456         #  @return New GEOM.GEOM_Object, containing the created curve.
2457         #
2458         #  @ref tui_creation_curve "Example"
2459         @ManageTransactions("CurvesOp")
2460         def MakeCurveParametric(self, thexExpr, theyExpr, thezExpr,
2461                                 theParamMin, theParamMax, theParamStep, theCurveType, theNewMethod=False, theName=None ):
2462             """
2463             Creates a curve using the parametric definition of the basic points.
2464
2465             Parameters:
2466                 thexExpr parametric equation of the coordinates X.
2467                 theyExpr parametric equation of the coordinates Y.
2468                 thezExpr parametric equation of the coordinates Z.
2469                 theParamMin the minimal value of the parameter.
2470                 theParamMax the maximum value of the parameter.
2471                 theParamStep the number of steps if theNewMethod = True, else step value of the parameter.
2472                 theCurveType the type of the curve,
2473                              one of GEOM.Polyline, GEOM.Bezier, GEOM.Interpolation.
2474                 theNewMethod flag for switching to the new method if the flag is set to false a deprecated
2475                              method is used which can lead to a bug.
2476                 theName Object name; when specified, this parameter is used
2477                         for result publication in the study. Otherwise, if automatic
2478                         publication is switched on, default value is used for result name.
2479
2480             Returns:
2481                 New GEOM.GEOM_Object, containing the created curve.
2482             """
2483             theParamMin,theParamMax,theParamStep,Parameters = ParseParameters(theParamMin,theParamMax,theParamStep)
2484             if theNewMethod:
2485               anObj = self.CurvesOp.MakeCurveParametricNew(thexExpr,theyExpr,thezExpr,theParamMin,theParamMax,theParamStep,theCurveType)
2486             else:
2487               anObj = self.CurvesOp.MakeCurveParametric(thexExpr,theyExpr,thezExpr,theParamMin,theParamMax,theParamStep,theCurveType)
2488             RaiseIfFailed("MakeCurveParametric", self.CurvesOp)
2489             anObj.SetParameters(Parameters)
2490             self._autoPublish(anObj, theName, "curve")
2491             return anObj
2492
2493         ## Create an isoline curve on a face.
2494         #  @param theFace the face for which an isoline is created.
2495         #  @param IsUIsoline True for U-isoline creation; False for V-isoline
2496         #         creation.
2497         #  @param theParameter the U parameter for U-isoline or V parameter
2498         #         for V-isoline.
2499         #  @param theName Object name; when specified, this parameter is used
2500         #         for result publication in the study. Otherwise, if automatic
2501         #         publication is switched on, default value is used for result name.
2502         #
2503         #  @return New GEOM.GEOM_Object, containing the created isoline edge or
2504         #          a compound of edges.
2505         #
2506         #  @ref tui_creation_curve "Example"
2507         @ManageTransactions("CurvesOp")
2508         def MakeIsoline(self, theFace, IsUIsoline, theParameter, theName=None):
2509             """
2510             Create an isoline curve on a face.
2511
2512             Parameters:
2513                 theFace the face for which an isoline is created.
2514                 IsUIsoline True for U-isoline creation; False for V-isoline
2515                            creation.
2516                 theParameter the U parameter for U-isoline or V parameter
2517                              for V-isoline.
2518                 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             Returns:
2523                 New GEOM.GEOM_Object, containing the created isoline edge or a
2524                 compound of edges.
2525             """
2526             # Example: see GEOM_TestAll.py
2527             anObj = self.CurvesOp.MakeIsoline(theFace, IsUIsoline, theParameter)
2528             RaiseIfFailed("MakeIsoline", self.CurvesOp)
2529             if IsUIsoline:
2530                 self._autoPublish(anObj, theName, "U-Isoline")
2531             else:
2532                 self._autoPublish(anObj, theName, "V-Isoline")
2533             return anObj
2534
2535         # end of l4_curves
2536         ## @}
2537
2538         ## @addtogroup l3_sketcher
2539         ## @{
2540
2541         ## Create a sketcher (wire or face), following the textual description,
2542         #  passed through <VAR>theCommand</VAR> argument. \n
2543         #  Edges of the resulting wire or face will be arcs of circles and/or linear segments. \n
2544         #  Format of the description string have to be the following:
2545         #
2546         #  "Sketcher[:F x1 y1]:CMD[:CMD[:CMD...]]"
2547         #
2548         #  Where:
2549         #  - x1, y1 are coordinates of the first sketcher point (zero by default),
2550         #  - CMD is one of
2551         #     - "R angle" : Set the direction by angle
2552         #     - "D dx dy" : Set the direction by DX & DY
2553         #     .
2554         #       \n
2555         #     - "TT x y" : Create segment by point at X & Y
2556         #     - "T dx dy" : Create segment by point with DX & DY
2557         #     - "L length" : Create segment by direction & Length
2558         #     - "IX x" : Create segment by direction & Intersect. X
2559         #     - "IY y" : Create segment by direction & Intersect. Y
2560         #     .
2561         #       \n
2562         #     - "C radius length" : Create arc by direction, radius and length(in degree)
2563         #     - "AA x y": Create arc by point at X & Y
2564         #     - "A dx dy" : Create arc by point with DX & DY
2565         #     - "UU x y radius flag1": Create arc by point at X & Y with given radiUs
2566         #     - "U dx dy radius flag1" : Create arc by point with DX & DY with given radiUs
2567         #     - "EE x y xc yc flag1 flag2": Create arc by point at X & Y with given cEnter coordinates
2568         #     - "E dx dy dxc dyc radius flag1 flag2" : Create arc by point with DX & DY with given cEnter coordinates
2569         #     .
2570         #       \n
2571         #     - "WW" : Close Wire (to finish)
2572         #     - "WF" : Close Wire and build face (to finish)
2573         #     .
2574         #        \n
2575         #  - Flag1 (= reverse) is 0 or 2 ...
2576         #     - if 0 the drawn arc is the one of lower angle (< Pi)
2577         #     - if 2 the drawn arc ius the one of greater angle (> Pi)
2578         #     .
2579         #        \n
2580         #  - Flag2 (= control tolerance) is 0 or 1 ...
2581         #     - if 0 the specified end point can be at a distance of the arc greater than the tolerance (10^-7)
2582         #     - if 1 the wire is built only if the end point is on the arc
2583         #       with a tolerance of 10^-7 on the distance else the creation fails
2584         #
2585         #  @param theCommand String, defining the sketcher in local
2586         #                    coordinates of the working plane.
2587         #  @param theWorkingPlane Nine double values, defining origin,
2588         #                         OZ and OX directions of the working plane.
2589         #  @param theName Object name; when specified, this parameter is used
2590         #         for result publication in the study. Otherwise, if automatic
2591         #         publication is switched on, default value is used for result name.
2592         #
2593         #  @return New GEOM.GEOM_Object, containing the created wire.
2594         #
2595         #  @ref tui_sketcher_page "Example"
2596         @ManageTransactions("CurvesOp")
2597         def MakeSketcher(self, theCommand, theWorkingPlane = [0,0,0, 0,0,1, 1,0,0], theName=None):
2598             """
2599             Create a sketcher (wire or face), following the textual description, passed
2600             through theCommand argument.
2601             Edges of the resulting wire or face will be arcs of circles and/or linear segments.
2602             Format of the description string have to be the following:
2603                 "Sketcher[:F x1 y1]:CMD[:CMD[:CMD...]]"
2604             Where:
2605             - x1, y1 are coordinates of the first sketcher point (zero by default),
2606             - CMD is one of
2607                - "R angle" : Set the direction by angle
2608                - "D dx dy" : Set the direction by DX & DY
2609
2610                - "TT x y" : Create segment by point at X & Y
2611                - "T dx dy" : Create segment by point with DX & DY
2612                - "L length" : Create segment by direction & Length
2613                - "IX x" : Create segment by direction & Intersect. X
2614                - "IY y" : Create segment by direction & Intersect. Y
2615
2616                - "C radius length" : Create arc by direction, radius and length(in degree)
2617                - "AA x y": Create arc by point at X & Y
2618                - "A dx dy" : Create arc by point with DX & DY
2619                - "UU x y radius flag1": Create arc by point at X & Y with given radiUs
2620                - "U dx dy radius flag1" : Create arc by point with DX & DY with given radiUs
2621                - "EE x y xc yc flag1 flag2": Create arc by point at X & Y with given cEnter coordinates
2622                - "E dx dy dxc dyc radius flag1 flag2" : Create arc by point with DX & DY with given cEnter coordinates
2623
2624                - "WW" : Close Wire (to finish)
2625                - "WF" : Close Wire and build face (to finish)
2626
2627             - Flag1 (= reverse) is 0 or 2 ...
2628                - if 0 the drawn arc is the one of lower angle (< Pi)
2629                - if 2 the drawn arc ius the one of greater angle (> Pi)
2630
2631             - Flag2 (= control tolerance) is 0 or 1 ...
2632                - if 0 the specified end point can be at a distance of the arc greater than the tolerance (10^-7)
2633                - if 1 the wire is built only if the end point is on the arc
2634                  with a tolerance of 10^-7 on the distance else the creation fails
2635
2636             Parameters:
2637                 theCommand String, defining the sketcher in local
2638                            coordinates of the working plane.
2639                 theWorkingPlane Nine double values, defining origin,
2640                                 OZ and OX directions of the working plane.
2641                 theName Object name; when specified, this parameter is used
2642                         for result publication in the study. Otherwise, if automatic
2643                         publication is switched on, default value is used for result name.
2644
2645             Returns:
2646                 New GEOM.GEOM_Object, containing the created wire.
2647             """
2648             # Example: see GEOM_TestAll.py
2649             theCommand,Parameters = ParseSketcherCommand(theCommand)
2650             anObj = self.CurvesOp.MakeSketcher(theCommand, theWorkingPlane)
2651             RaiseIfFailed("MakeSketcher", self.CurvesOp)
2652             anObj.SetParameters(Parameters)
2653             self._autoPublish(anObj, theName, "wire")
2654             return anObj
2655
2656         ## Create a sketcher (wire or face), following the textual description,
2657         #  passed through <VAR>theCommand</VAR> argument. \n
2658         #  For format of the description string see MakeSketcher() method.\n
2659         #  @param theCommand String, defining the sketcher in local
2660         #                    coordinates of the working plane.
2661         #  @param theWorkingPlane Planar Face or LCS(Marker) of the working plane.
2662         #  @param theName Object name; when specified, this parameter is used
2663         #         for result publication in the study. Otherwise, if automatic
2664         #         publication is switched on, default value is used for result name.
2665         #
2666         #  @return New GEOM.GEOM_Object, containing the created wire.
2667         #
2668         #  @ref tui_sketcher_page "Example"
2669         @ManageTransactions("CurvesOp")
2670         def MakeSketcherOnPlane(self, theCommand, theWorkingPlane, theName=None):
2671             """
2672             Create a sketcher (wire or face), following the textual description,
2673             passed through theCommand argument.
2674             For format of the description string see geompy.MakeSketcher() method.
2675
2676             Parameters:
2677                 theCommand String, defining the sketcher in local
2678                            coordinates of the working plane.
2679                 theWorkingPlane Planar Face or LCS(Marker) of the working plane.
2680                 theName Object name; when specified, this parameter is used
2681                         for result publication in the study. Otherwise, if automatic
2682                         publication is switched on, default value is used for result name.
2683
2684             Returns:
2685                 New GEOM.GEOM_Object, containing the created wire.
2686             """
2687             theCommand,Parameters = ParseSketcherCommand(theCommand)
2688             anObj = self.CurvesOp.MakeSketcherOnPlane(theCommand, theWorkingPlane)
2689             RaiseIfFailed("MakeSketcherOnPlane", self.CurvesOp)
2690             anObj.SetParameters(Parameters)
2691             self._autoPublish(anObj, theName, "wire")
2692             return anObj
2693
2694         ## Obtain a 2D sketcher interface
2695         #  @return An instance of @ref gsketcher.Sketcher2D "Sketcher2D" interface
2696         def Sketcher2D (self):
2697             """
2698             Obtain a 2D sketcher interface.
2699
2700             Example of usage:
2701                sk = geompy.Sketcher2D()
2702                sk.addPoint(20, 20)
2703                sk.addSegmentRelative(15, 70)
2704                sk.addSegmentPerpY(50)
2705                sk.addArcRadiusRelative(25, 15, 14.5, 0)
2706                sk.addArcCenterAbsolute(1, 1, 50, 50, 0, 0)
2707                sk.addArcDirectionRadiusLength(20, 20, 101, 162.13)
2708                sk.close()
2709                Sketch_1 = sk.wire(geomObj_1)
2710             """
2711             sk = Sketcher2D (self)
2712             return sk
2713
2714         ## Create a sketcher wire, following the numerical description,
2715         #  passed through <VAR>theCoordinates</VAR> argument. \n
2716         #  @param theCoordinates double values, defining points to create a wire,
2717         #                                                      passing from it.
2718         #  @param theName Object name; when specified, this parameter is used
2719         #         for result publication in the study. Otherwise, if automatic
2720         #         publication is switched on, default value is used for result name.
2721         #
2722         #  @return New GEOM.GEOM_Object, containing the created wire.
2723         #
2724         #  @ref tui_3dsketcher_page "Example"
2725         @ManageTransactions("CurvesOp")
2726         def Make3DSketcher(self, theCoordinates, theName=None):
2727             """
2728             Create a sketcher wire, following the numerical description,
2729             passed through theCoordinates argument.
2730
2731             Parameters:
2732                 theCoordinates double values, defining points to create a wire,
2733                                passing from it.
2734                 theName Object name; when specified, this parameter is used
2735                         for result publication in the study. Otherwise, if automatic
2736                         publication is switched on, default value is used for result name.
2737
2738             Returns:
2739                 New GEOM_Object, containing the created wire.
2740             """
2741             theCoordinates,Parameters = ParseParameters(theCoordinates)
2742             anObj = self.CurvesOp.Make3DSketcher(theCoordinates)
2743             RaiseIfFailed("Make3DSketcher", self.CurvesOp)
2744             anObj.SetParameters(Parameters)
2745             self._autoPublish(anObj, theName, "wire")
2746             return anObj
2747
2748         ## Obtain a 3D sketcher interface
2749         #  @return An instance of @ref gsketcher.Sketcher3D "Sketcher3D" interface
2750         #
2751         #  @ref tui_3dsketcher_page "Example"
2752         def Sketcher3D (self):
2753             """
2754             Obtain a 3D sketcher interface.
2755
2756             Example of usage:
2757                 sk = geompy.Sketcher3D()
2758                 sk.addPointsAbsolute(0,0,0, 70,0,0)
2759                 sk.addPointsRelative(0, 0, 130)
2760                 sk.addPointAnglesLength("OXY", 50, 0, 100)
2761                 sk.addPointAnglesLength("OXZ", 30, 80, 130)
2762                 sk.close()
2763                 a3D_Sketcher_1 = sk.wire()
2764             """
2765             sk = Sketcher3D (self)
2766             return sk
2767
2768         ## Obtain a 2D polyline creation interface
2769         #  @return An instance of @ref gsketcher.Polyline2D "Polyline2D" interface
2770         #
2771         #  @ref tui_3dsketcher_page "Example"
2772         def Polyline2D (self):
2773             """
2774             Obtain a 2D polyline creation interface.
2775
2776             Example of usage:
2777                 pl = geompy.Polyline2D()
2778                 pl.addSection("section 1", GEOM.Polyline, True)
2779                 pl.addPoints(0, 0, 10, 0, 10, 10)
2780                 pl.addSection("section 2", GEOM.Interpolation, False)
2781                 pl.addPoints(20, 0, 30, 0, 30, 10)
2782                 resultObj = pl.result(WorkingPlane)
2783             """
2784             pl = Polyline2D (self)
2785             return pl
2786
2787         # end of l3_sketcher
2788         ## @}
2789
2790         ## @addtogroup l3_3d_primitives
2791         ## @{
2792
2793         ## Create a box by coordinates of two opposite vertices.
2794         #
2795         #  @param x1,y1,z1 double values, defining first point it.
2796         #  @param x2,y2,z2 double values, defining first point it.
2797         #  @param theName Object name; when specified, this parameter is used
2798         #         for result publication in the study. Otherwise, if automatic
2799         #         publication is switched on, default value is used for result name.
2800         #
2801         #  @return New GEOM.GEOM_Object, containing the created box.
2802         #
2803         #  @ref tui_creation_box "Example"
2804         def MakeBox(self, x1, y1, z1, x2, y2, z2, theName=None):
2805             """
2806             Create a box by coordinates of two opposite vertices.
2807
2808             Parameters:
2809                 x1,y1,z1 double values, defining first point.
2810                 x2,y2,z2 double values, defining second point.
2811                 theName Object name; when specified, this parameter is used
2812                         for result publication in the study. Otherwise, if automatic
2813                         publication is switched on, default value is used for result name.
2814
2815             Returns:
2816                 New GEOM.GEOM_Object, containing the created box.
2817             """
2818             # Example: see GEOM_TestAll.py
2819             pnt1 = self.MakeVertex(x1,y1,z1)
2820             pnt2 = self.MakeVertex(x2,y2,z2)
2821             # note: auto-publishing is done in self.MakeBoxTwoPnt()
2822             return self.MakeBoxTwoPnt(pnt1, pnt2, theName)
2823
2824         ## Create a box with specified dimensions along the coordinate axes
2825         #  and with edges, parallel to the coordinate axes.
2826         #  Center of the box will be at point (DX/2, DY/2, DZ/2).
2827         #  @param theDX Length of Box edges, parallel to OX axis.
2828         #  @param theDY Length of Box edges, parallel to OY axis.
2829         #  @param theDZ Length of Box edges, parallel to OZ axis.
2830         #  @param theName Object name; when specified, this parameter is used
2831         #         for result publication in the study. Otherwise, if automatic
2832         #         publication is switched on, default value is used for result name.
2833         #
2834         #  @return New GEOM.GEOM_Object, containing the created box.
2835         #
2836         #  @ref tui_creation_box "Example"
2837         @ManageTransactions("PrimOp")
2838         def MakeBoxDXDYDZ(self, theDX, theDY, theDZ, theName=None):
2839             """
2840             Create a box with specified dimensions along the coordinate axes
2841             and with edges, parallel to the coordinate axes.
2842             Center of the box will be at point (DX/2, DY/2, DZ/2).
2843
2844             Parameters:
2845                 theDX Length of Box edges, parallel to OX axis.
2846                 theDY Length of Box edges, parallel to OY axis.
2847                 theDZ Length of Box edges, parallel to OZ axis.
2848                 theName Object name; when specified, this parameter is used
2849                         for result publication in the study. Otherwise, if automatic
2850                         publication is switched on, default value is used for result name.
2851
2852             Returns:
2853                 New GEOM.GEOM_Object, containing the created box.
2854             """
2855             # Example: see GEOM_TestAll.py
2856             theDX,theDY,theDZ,Parameters = ParseParameters(theDX, theDY, theDZ)
2857             anObj = self.PrimOp.MakeBoxDXDYDZ(theDX, theDY, theDZ)
2858             RaiseIfFailed("MakeBoxDXDYDZ", self.PrimOp)
2859             anObj.SetParameters(Parameters)
2860             self._autoPublish(anObj, theName, "box")
2861             return anObj
2862
2863         ## Create a box with two specified opposite vertices,
2864         #  and with edges, parallel to the coordinate axes
2865         #  @param thePnt1 First of two opposite vertices.
2866         #  @param thePnt2 Second of two opposite vertices.
2867         #  @param theName Object name; when specified, this parameter is used
2868         #         for result publication in the study. Otherwise, if automatic
2869         #         publication is switched on, default value is used for result name.
2870         #
2871         #  @return New GEOM.GEOM_Object, containing the created box.
2872         #
2873         #  @ref tui_creation_box "Example"
2874         @ManageTransactions("PrimOp")
2875         def MakeBoxTwoPnt(self, thePnt1, thePnt2, theName=None):
2876             """
2877             Create a box with two specified opposite vertices,
2878             and with edges, parallel to the coordinate axes
2879
2880             Parameters:
2881                 thePnt1 First of two opposite vertices.
2882                 thePnt2 Second of two opposite vertices.
2883                 theName Object name; when specified, this parameter is used
2884                         for result publication in the study. Otherwise, if automatic
2885                         publication is switched on, default value is used for result name.
2886
2887             Returns:
2888                 New GEOM.GEOM_Object, containing the created box.
2889             """
2890             # Example: see GEOM_TestAll.py
2891             anObj = self.PrimOp.MakeBoxTwoPnt(thePnt1, thePnt2)
2892             RaiseIfFailed("MakeBoxTwoPnt", self.PrimOp)
2893             self._autoPublish(anObj, theName, "box")
2894             return anObj
2895
2896         ## Create a face with specified dimensions with edges parallel to coordinate axes.
2897         #  @param theH height of Face.
2898         #  @param theW width of Face.
2899         #  @param theOrientation face orientation: 1-OXY, 2-OYZ, 3-OZX
2900         #  @param theName Object name; when specified, this parameter is used
2901         #         for result publication in the study. Otherwise, if automatic
2902         #         publication is switched on, default value is used for result name.
2903         #
2904         #  @return New GEOM.GEOM_Object, containing the created face.
2905         #
2906         #  @ref tui_creation_face "Example"
2907         @ManageTransactions("PrimOp")
2908         def MakeFaceHW(self, theH, theW, theOrientation, theName=None):
2909             """
2910             Create a face with specified dimensions with edges parallel to coordinate axes.
2911
2912             Parameters:
2913                 theH height of Face.
2914                 theW width of Face.
2915                 theOrientation face orientation: 1-OXY, 2-OYZ, 3-OZX
2916                 theName Object name; when specified, this parameter is used
2917                         for result publication in the study. Otherwise, if automatic
2918                         publication is switched on, default value is used for result name.
2919
2920             Returns:
2921                 New GEOM.GEOM_Object, containing the created face.
2922             """
2923             # Example: see GEOM_TestAll.py
2924             theH,theW,Parameters = ParseParameters(theH, theW)
2925             anObj = self.PrimOp.MakeFaceHW(theH, theW, theOrientation)
2926             RaiseIfFailed("MakeFaceHW", self.PrimOp)
2927             anObj.SetParameters(Parameters)
2928             self._autoPublish(anObj, theName, "rectangle")
2929             return anObj
2930
2931         ## Create a face from another plane and two sizes,
2932         #  vertical size and horisontal size.
2933         #  @param theObj   Normale vector to the creating face or
2934         #  the face object.
2935         #  @param theH     Height (vertical size).
2936         #  @param theW     Width (horisontal size).
2937         #  @param theName Object name; when specified, this parameter is used
2938         #         for result publication in the study. Otherwise, if automatic
2939         #         publication is switched on, default value is used for result name.
2940         #
2941         #  @return New GEOM.GEOM_Object, containing the created face.
2942         #
2943         #  @ref tui_creation_face "Example"
2944         @ManageTransactions("PrimOp")
2945         def MakeFaceObjHW(self, theObj, theH, theW, theName=None):
2946             """
2947             Create a face from another plane and two sizes,
2948             vertical size and horisontal size.
2949
2950             Parameters:
2951                 theObj   Normale vector to the creating face or
2952                          the face object.
2953                 theH     Height (vertical size).
2954                 theW     Width (horisontal size).
2955                 theName Object name; when specified, this parameter is used
2956                         for result publication in the study. Otherwise, if automatic
2957                         publication is switched on, default value is used for result name.
2958
2959             Returns:
2960                 New GEOM_Object, containing the created face.
2961             """
2962             # Example: see GEOM_TestAll.py
2963             theH,theW,Parameters = ParseParameters(theH, theW)
2964             anObj = self.PrimOp.MakeFaceObjHW(theObj, theH, theW)
2965             RaiseIfFailed("MakeFaceObjHW", self.PrimOp)
2966             anObj.SetParameters(Parameters)
2967             self._autoPublish(anObj, theName, "rectangle")
2968             return anObj
2969
2970         ## Create a disk with given center, normal vector and radius.
2971         #  @param thePnt Disk center.
2972         #  @param theVec Vector, normal to the plane of the disk.
2973         #  @param theR Disk radius.
2974         #  @param theName Object name; when specified, this parameter is used
2975         #         for result publication in the study. Otherwise, if automatic
2976         #         publication is switched on, default value is used for result name.
2977         #
2978         #  @return New GEOM.GEOM_Object, containing the created disk.
2979         #
2980         #  @ref tui_creation_disk "Example"
2981         @ManageTransactions("PrimOp")
2982         def MakeDiskPntVecR(self, thePnt, theVec, theR, theName=None):
2983             """
2984             Create a disk with given center, normal vector and radius.
2985
2986             Parameters:
2987                 thePnt Disk center.
2988                 theVec Vector, normal to the plane of the disk.
2989                 theR Disk radius.
2990                 theName Object name; when specified, this parameter is used
2991                         for result publication in the study. Otherwise, if automatic
2992                         publication is switched on, default value is used for result name.
2993
2994             Returns:
2995                 New GEOM.GEOM_Object, containing the created disk.
2996             """
2997             # Example: see GEOM_TestAll.py
2998             theR,Parameters = ParseParameters(theR)
2999             anObj = self.PrimOp.MakeDiskPntVecR(thePnt, theVec, theR)
3000             RaiseIfFailed("MakeDiskPntVecR", self.PrimOp)
3001             anObj.SetParameters(Parameters)
3002             self._autoPublish(anObj, theName, "disk")
3003             return anObj
3004
3005         ## Create a disk, passing through three given points
3006         #  @param thePnt1,thePnt2,thePnt3 Points, defining the disk.
3007         #  @param theName Object name; when specified, this parameter is used
3008         #         for result publication in the study. Otherwise, if automatic
3009         #         publication is switched on, default value is used for result name.
3010         #
3011         #  @return New GEOM.GEOM_Object, containing the created disk.
3012         #
3013         #  @ref tui_creation_disk "Example"
3014         @ManageTransactions("PrimOp")
3015         def MakeDiskThreePnt(self, thePnt1, thePnt2, thePnt3, theName=None):
3016             """
3017             Create a disk, passing through three given points
3018
3019             Parameters:
3020                 thePnt1,thePnt2,thePnt3 Points, defining the disk.
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 disk.
3027             """
3028             # Example: see GEOM_TestAll.py
3029             anObj = self.PrimOp.MakeDiskThreePnt(thePnt1, thePnt2, thePnt3)
3030             RaiseIfFailed("MakeDiskThreePnt", self.PrimOp)
3031             self._autoPublish(anObj, theName, "disk")
3032             return anObj
3033
3034         ## Create a disk with specified dimensions along OX-OY coordinate axes.
3035         #  @param theR Radius of Face.
3036         #  @param theOrientation set the orientation belong axis OXY or OYZ or OZX
3037         #  @param theName Object name; when specified, this parameter is used
3038         #         for result publication in the study. Otherwise, if automatic
3039         #         publication is switched on, default value is used for result name.
3040         #
3041         #  @return New GEOM.GEOM_Object, containing the created disk.
3042         #
3043         #  @ref tui_creation_face "Example"
3044         @ManageTransactions("PrimOp")
3045         def MakeDiskR(self, theR, theOrientation, theName=None):
3046             """
3047             Create a disk with specified dimensions along OX-OY coordinate axes.
3048
3049             Parameters:
3050                 theR Radius of Face.
3051                 theOrientation set the orientation belong axis OXY or OYZ or OZX
3052                 theName Object name; when specified, this parameter is used
3053                         for result publication in the study. Otherwise, if automatic
3054                         publication is switched on, default value is used for result name.
3055
3056             Returns:
3057                 New GEOM.GEOM_Object, containing the created disk.
3058
3059             Example of usage:
3060                 Disk3 = geompy.MakeDiskR(100., 1)
3061             """
3062             # Example: see GEOM_TestAll.py
3063             theR,Parameters = ParseParameters(theR)
3064             anObj = self.PrimOp.MakeDiskR(theR, theOrientation)
3065             RaiseIfFailed("MakeDiskR", self.PrimOp)
3066             anObj.SetParameters(Parameters)
3067             self._autoPublish(anObj, theName, "disk")
3068             return anObj
3069
3070         ## Create a cylinder with given base point, axis, radius and height.
3071         #  @param thePnt Central point of cylinder base.
3072         #  @param theAxis Cylinder axis.
3073         #  @param theR Cylinder radius.
3074         #  @param theH Cylinder height.
3075         #  @param theName Object name; when specified, this parameter is used
3076         #         for result publication in the study. Otherwise, if automatic
3077         #         publication is switched on, default value is used for result name.
3078         #
3079         #  @return New GEOM.GEOM_Object, containing the created cylinder.
3080         #
3081         #  @ref tui_creation_cylinder "Example"
3082         @ManageTransactions("PrimOp")
3083         def MakeCylinder(self, thePnt, theAxis, theR, theH, theName=None):
3084             """
3085             Create a cylinder with given base point, axis, radius and height.
3086
3087             Parameters:
3088                 thePnt Central point of cylinder base.
3089                 theAxis Cylinder axis.
3090                 theR Cylinder radius.
3091                 theH Cylinder height.
3092                 theName Object name; when specified, this parameter is used
3093                         for result publication in the study. Otherwise, if automatic
3094                         publication is switched on, default value is used for result name.
3095
3096             Returns:
3097                 New GEOM.GEOM_Object, containing the created cylinder.
3098             """
3099             # Example: see GEOM_TestAll.py
3100             theR,theH,Parameters = ParseParameters(theR, theH)
3101             anObj = self.PrimOp.MakeCylinderPntVecRH(thePnt, theAxis, theR, theH)
3102             RaiseIfFailed("MakeCylinderPntVecRH", self.PrimOp)
3103             anObj.SetParameters(Parameters)
3104             self._autoPublish(anObj, theName, "cylinder")
3105             return anObj
3106             
3107         ## Create a portion of cylinder with given base point, axis, radius, height and angle.
3108         #  @param thePnt Central point of cylinder base.
3109         #  @param theAxis Cylinder axis.
3110         #  @param theR Cylinder radius.
3111         #  @param theH Cylinder height.
3112         #  @param theA Cylinder angle in radians.
3113         #  @param theName Object name; when specified, this parameter is used
3114         #         for result publication in the study. Otherwise, if automatic
3115         #         publication is switched on, default value is used for result name.
3116         #
3117         #  @return New GEOM.GEOM_Object, containing the created cylinder.
3118         #
3119         #  @ref tui_creation_cylinder "Example"
3120         @ManageTransactions("PrimOp")
3121         def MakeCylinderA(self, thePnt, theAxis, theR, theH, theA, theName=None):
3122             """
3123             Create a portion of cylinder with given base point, axis, radius, height and angle.
3124
3125             Parameters:
3126                 thePnt Central point of cylinder base.
3127                 theAxis Cylinder axis.
3128                 theR Cylinder radius.
3129                 theH Cylinder height.
3130                 theA Cylinder angle in radians.
3131                 theName Object name; when specified, this parameter is used
3132                         for result publication in the study. Otherwise, if automatic
3133                         publication is switched on, default value is used for result name.
3134
3135             Returns:
3136                 New GEOM.GEOM_Object, containing the created cylinder.
3137             """
3138             # Example: see GEOM_TestAll.py
3139             flag = False
3140             if isinstance(theA,str):
3141                 flag = True
3142             theR,theH,theA,Parameters = ParseParameters(theR, theH, theA)
3143             if flag:
3144                 theA = theA*math.pi/180.
3145             if theA<=0. or theA>=2*math.pi:
3146                 raise ValueError("The angle parameter should be strictly between 0 and 2*pi.")
3147             anObj = self.PrimOp.MakeCylinderPntVecRHA(thePnt, theAxis, theR, theH, theA)
3148             RaiseIfFailed("MakeCylinderPntVecRHA", self.PrimOp)
3149             anObj.SetParameters(Parameters)
3150             self._autoPublish(anObj, theName, "cylinder")
3151             return anObj
3152
3153         ## Create a cylinder with given radius and height at
3154         #  the origin of coordinate system. Axis of the cylinder
3155         #  will be collinear to the OZ axis of the coordinate system.
3156         #  @param theR Cylinder radius.
3157         #  @param theH Cylinder height.
3158         #  @param theName Object name; when specified, this parameter is used
3159         #         for result publication in the study. Otherwise, if automatic
3160         #         publication is switched on, default value is used for result name.
3161         #
3162         #  @return New GEOM.GEOM_Object, containing the created cylinder.
3163         #
3164         #  @ref tui_creation_cylinder "Example"
3165         @ManageTransactions("PrimOp")
3166         def MakeCylinderRH(self, theR, theH, theName=None):
3167             """
3168             Create a cylinder with given radius and height at
3169             the origin of coordinate system. Axis of the cylinder
3170             will be collinear to the OZ axis of the coordinate system.
3171
3172             Parameters:
3173                 theR Cylinder radius.
3174                 theH Cylinder height.
3175                 theName Object name; when specified, this parameter is used
3176                         for result publication in the study. Otherwise, if automatic
3177                         publication is switched on, default value is used for result name.
3178
3179             Returns:
3180                 New GEOM.GEOM_Object, containing the created cylinder.
3181             """
3182             # Example: see GEOM_TestAll.py
3183             theR,theH,Parameters = ParseParameters(theR, theH)
3184             anObj = self.PrimOp.MakeCylinderRH(theR, theH)
3185             RaiseIfFailed("MakeCylinderRH", self.PrimOp)
3186             anObj.SetParameters(Parameters)
3187             self._autoPublish(anObj, theName, "cylinder")
3188             return anObj
3189             
3190         ## Create a portion of cylinder with given radius, height and angle at
3191         #  the origin of coordinate system. Axis of the cylinder
3192         #  will be collinear to the OZ axis of the coordinate system.
3193         #  @param theR Cylinder radius.
3194         #  @param theH Cylinder height.
3195         #  @param theA Cylinder angle in radians.
3196         #  @param theName Object name; when specified, this parameter is used
3197         #         for result publication in the study. Otherwise, if automatic
3198         #         publication is switched on, default value is used for result name.
3199         #
3200         #  @return New GEOM.GEOM_Object, containing the created cylinder.
3201         #
3202         #  @ref tui_creation_cylinder "Example"
3203         @ManageTransactions("PrimOp")
3204         def MakeCylinderRHA(self, theR, theH, theA, theName=None):
3205             """
3206             Create a portion of cylinder with given radius, height and angle at
3207             the origin of coordinate system. Axis of the cylinder
3208             will be collinear to the OZ axis of the coordinate system.
3209
3210             Parameters:
3211                 theR Cylinder radius.
3212                 theH Cylinder height.
3213                 theA Cylinder angle in radians.
3214                 theName Object name; when specified, this parameter is used
3215                         for result publication in the study. Otherwise, if automatic
3216                         publication is switched on, default value is used for result name.
3217
3218             Returns:
3219                 New GEOM.GEOM_Object, containing the created cylinder.
3220             """
3221             # Example: see GEOM_TestAll.py
3222             flag = False
3223             if isinstance(theA,str):
3224                 flag = True
3225             theR,theH,theA,Parameters = ParseParameters(theR, theH, theA)
3226             if flag:
3227                 theA = theA*math.pi/180.
3228             if theA<=0. or theA>=2*math.pi:
3229                 raise ValueError("The angle parameter should be strictly between 0 and 2*pi.")
3230             anObj = self.PrimOp.MakeCylinderRHA(theR, theH, theA)
3231             RaiseIfFailed("MakeCylinderRHA", self.PrimOp)
3232             anObj.SetParameters(Parameters)
3233             self._autoPublish(anObj, theName, "cylinder")
3234             return anObj
3235
3236         ## Create a sphere with given center and radius.
3237         #  @param thePnt Sphere center.
3238         #  @param theR Sphere radius.
3239         #  @param theName Object name; when specified, this parameter is used
3240         #         for result publication in the study. Otherwise, if automatic
3241         #         publication is switched on, default value is used for result name.
3242         #
3243         #  @return New GEOM.GEOM_Object, containing the created sphere.
3244         #
3245         #  @ref tui_creation_sphere "Example"
3246         @ManageTransactions("PrimOp")
3247         def MakeSpherePntR(self, thePnt, theR, theName=None):
3248             """
3249             Create a sphere with given center and radius.
3250
3251             Parameters:
3252                 thePnt Sphere center.
3253                 theR Sphere radius.
3254                 theName Object name; when specified, this parameter is used
3255                         for result publication in the study. Otherwise, if automatic
3256                         publication is switched on, default value is used for result name.
3257
3258             Returns:
3259                 New GEOM.GEOM_Object, containing the created sphere.
3260             """
3261             # Example: see GEOM_TestAll.py
3262             theR,Parameters = ParseParameters(theR)
3263             anObj = self.PrimOp.MakeSpherePntR(thePnt, theR)
3264             RaiseIfFailed("MakeSpherePntR", self.PrimOp)
3265             anObj.SetParameters(Parameters)
3266             self._autoPublish(anObj, theName, "sphere")
3267             return anObj
3268
3269         ## Create a sphere with given center and radius.
3270         #  @param x,y,z Coordinates of sphere center.
3271         #  @param theR Sphere radius.
3272         #  @param theName Object name; when specified, this parameter is used
3273         #         for result publication in the study. Otherwise, if automatic
3274         #         publication is switched on, default value is used for result name.
3275         #
3276         #  @return New GEOM.GEOM_Object, containing the created sphere.
3277         #
3278         #  @ref tui_creation_sphere "Example"
3279         def MakeSphere(self, x, y, z, theR, theName=None):
3280             """
3281             Create a sphere with given center and radius.
3282
3283             Parameters:
3284                 x,y,z Coordinates of sphere center.
3285                 theR Sphere radius.
3286                 theName Object name; when specified, this parameter is used
3287                         for result publication in the study. Otherwise, if automatic
3288                         publication is switched on, default value is used for result name.
3289
3290             Returns:
3291                 New GEOM.GEOM_Object, containing the created sphere.
3292             """
3293             # Example: see GEOM_TestAll.py
3294             point = self.MakeVertex(x, y, z)
3295             # note: auto-publishing is done in self.MakeSpherePntR()
3296             anObj = self.MakeSpherePntR(point, theR, theName)
3297             return anObj
3298
3299         ## Create a sphere with given radius at the origin of coordinate system.
3300         #  @param theR Sphere radius.
3301         #  @param theName Object name; when specified, this parameter is used
3302         #         for result publication in the study. Otherwise, if automatic
3303         #         publication is switched on, default value is used for result name.
3304         #
3305         #  @return New GEOM.GEOM_Object, containing the created sphere.
3306         #
3307         #  @ref tui_creation_sphere "Example"
3308         @ManageTransactions("PrimOp")
3309         def MakeSphereR(self, theR, theName=None):
3310             """
3311             Create a sphere with given radius at the origin of coordinate system.
3312
3313             Parameters:
3314                 theR Sphere radius.
3315                 theName Object name; when specified, this parameter is used
3316                         for result publication in the study. Otherwise, if automatic
3317                         publication is switched on, default value is used for result name.
3318
3319             Returns:
3320                 New GEOM.GEOM_Object, containing the created sphere.
3321             """
3322             # Example: see GEOM_TestAll.py
3323             theR,Parameters = ParseParameters(theR)
3324             anObj = self.PrimOp.MakeSphereR(theR)
3325             RaiseIfFailed("MakeSphereR", self.PrimOp)
3326             anObj.SetParameters(Parameters)
3327             self._autoPublish(anObj, theName, "sphere")
3328             return anObj
3329
3330         ## Create a cone with given base point, axis, height and radiuses.
3331         #  @param thePnt Central point of the first cone base.
3332         #  @param theAxis Cone axis.
3333         #  @param theR1 Radius of the first cone base.
3334         #  @param theR2 Radius of the second cone base.
3335         #    \note If both radiuses are non-zero, the cone will be truncated.
3336         #    \note If the radiuses are equal, a cylinder will be created instead.
3337         #  @param theH Cone height.
3338         #  @param theName Object name; when specified, this parameter is used
3339         #         for result publication in the study. Otherwise, if automatic
3340         #         publication is switched on, default value is used for result name.
3341         #
3342         #  @return New GEOM.GEOM_Object, containing the created cone.
3343         #
3344         #  @ref tui_creation_cone "Example"
3345         @ManageTransactions("PrimOp")
3346         def MakeCone(self, thePnt, theAxis, theR1, theR2, theH, theName=None):
3347             """
3348             Create a cone with given base point, axis, height and radiuses.
3349
3350             Parameters:
3351                 thePnt Central point of the first cone base.
3352                 theAxis Cone axis.
3353                 theR1 Radius of the first cone base.
3354                 theR2 Radius of the second cone base.
3355                 theH Cone height.
3356                 theName Object name; when specified, this parameter is used
3357                         for result publication in the study. Otherwise, if automatic
3358                         publication is switched on, default value is used for result name.
3359
3360             Note:
3361                 If both radiuses are non-zero, the cone will be truncated.
3362                 If the radiuses are equal, a cylinder will be created instead.
3363
3364             Returns:
3365                 New GEOM.GEOM_Object, containing the created cone.
3366             """
3367             # Example: see GEOM_TestAll.py
3368             theR1,theR2,theH,Parameters = ParseParameters(theR1,theR2,theH)
3369             anObj = self.PrimOp.MakeConePntVecR1R2H(thePnt, theAxis, theR1, theR2, theH)
3370             RaiseIfFailed("MakeConePntVecR1R2H", self.PrimOp)
3371             anObj.SetParameters(Parameters)
3372             self._autoPublish(anObj, theName, "cone")
3373             return anObj
3374
3375         ## Create a cone with given height and radiuses at
3376         #  the origin of coordinate system. Axis of the cone will
3377         #  be collinear to the OZ axis of the coordinate system.
3378         #  @param theR1 Radius of the first cone base.
3379         #  @param theR2 Radius of the second cone base.
3380         #    \note If both radiuses are non-zero, the cone will be truncated.
3381         #    \note If the radiuses are equal, a cylinder will be created instead.
3382         #  @param theH Cone height.
3383         #  @param theName Object name; when specified, this parameter is used
3384         #         for result publication in the study. Otherwise, if automatic
3385         #         publication is switched on, default value is used for result name.
3386         #
3387         #  @return New GEOM.GEOM_Object, containing the created cone.
3388         #
3389         #  @ref tui_creation_cone "Example"
3390         @ManageTransactions("PrimOp")
3391         def MakeConeR1R2H(self, theR1, theR2, theH, theName=None):
3392             """
3393             Create a cone with given height and radiuses at
3394             the origin of coordinate system. Axis of the cone will
3395             be collinear to the OZ axis of the coordinate system.
3396
3397             Parameters:
3398                 theR1 Radius of the first cone base.
3399                 theR2 Radius of the second cone base.
3400                 theH Cone height.
3401                 theName Object name; when specified, this parameter is used
3402                         for result publication in the study. Otherwise, if automatic
3403                         publication is switched on, default value is used for result name.
3404
3405             Note:
3406                 If both radiuses are non-zero, the cone will be truncated.
3407                 If the radiuses are equal, a cylinder will be created instead.
3408
3409             Returns:
3410                 New GEOM.GEOM_Object, containing the created cone.
3411             """
3412             # Example: see GEOM_TestAll.py
3413             theR1,theR2,theH,Parameters = ParseParameters(theR1,theR2,theH)
3414             anObj = self.PrimOp.MakeConeR1R2H(theR1, theR2, theH)
3415             RaiseIfFailed("MakeConeR1R2H", self.PrimOp)
3416             anObj.SetParameters(Parameters)
3417             self._autoPublish(anObj, theName, "cone")
3418             return anObj
3419
3420         ## Create a torus with given center, normal vector and radiuses.
3421         #  @param thePnt Torus central point.
3422         #  @param theVec Torus axis of symmetry.
3423         #  @param theRMajor Torus major radius.
3424         #  @param theRMinor Torus minor radius.
3425         #  @param theName Object name; when specified, this parameter is used
3426         #         for result publication in the study. Otherwise, if automatic
3427         #         publication is switched on, default value is used for result name.
3428         #
3429         #  @return New GEOM.GEOM_Object, containing the created torus.
3430         #
3431         #  @ref tui_creation_torus "Example"
3432         @ManageTransactions("PrimOp")
3433         def MakeTorus(self, thePnt, theVec, theRMajor, theRMinor, theName=None):
3434             """
3435             Create a torus with given center, normal vector and radiuses.
3436
3437             Parameters:
3438                 thePnt Torus central point.
3439                 theVec Torus axis of symmetry.
3440                 theRMajor Torus major radius.
3441                 theRMinor Torus minor radius.
3442                 theName Object name; when specified, this parameter is used
3443                         for result publication in the study. Otherwise, if automatic
3444                         publication is switched on, default value is used for result name.
3445
3446            Returns:
3447                 New GEOM.GEOM_Object, containing the created torus.
3448             """
3449             # Example: see GEOM_TestAll.py
3450             theRMajor,theRMinor,Parameters = ParseParameters(theRMajor,theRMinor)
3451             anObj = self.PrimOp.MakeTorusPntVecRR(thePnt, theVec, theRMajor, theRMinor)
3452             RaiseIfFailed("MakeTorusPntVecRR", self.PrimOp)
3453             anObj.SetParameters(Parameters)
3454             self._autoPublish(anObj, theName, "torus")
3455             return anObj
3456
3457         ## Create a torus with given radiuses at the origin of coordinate system.
3458         #  @param theRMajor Torus major radius.
3459         #  @param theRMinor Torus minor radius.
3460         #  @param theName Object name; when specified, this parameter is used
3461         #         for result publication in the study. Otherwise, if automatic
3462         #         publication is switched on, default value is used for result name.
3463         #
3464         #  @return New GEOM.GEOM_Object, containing the created torus.
3465         #
3466         #  @ref tui_creation_torus "Example"
3467         @ManageTransactions("PrimOp")
3468         def MakeTorusRR(self, theRMajor, theRMinor, theName=None):
3469             """
3470            Create a torus with given radiuses at the origin of coordinate system.
3471
3472            Parameters:
3473                 theRMajor Torus major radius.
3474                 theRMinor Torus minor radius.
3475                 theName Object name; when specified, this parameter is used
3476                         for result publication in the study. Otherwise, if automatic
3477                         publication is switched on, default value is used for result name.
3478
3479            Returns:
3480                 New GEOM.GEOM_Object, containing the created torus.
3481             """
3482             # Example: see GEOM_TestAll.py
3483             theRMajor,theRMinor,Parameters = ParseParameters(theRMajor,theRMinor)
3484             anObj = self.PrimOp.MakeTorusRR(theRMajor, theRMinor)
3485             RaiseIfFailed("MakeTorusRR", self.PrimOp)
3486             anObj.SetParameters(Parameters)
3487             self._autoPublish(anObj, theName, "torus")
3488             return anObj
3489
3490         # end of l3_3d_primitives
3491         ## @}
3492
3493         ## @addtogroup l3_complex
3494         ## @{
3495
3496         ## Create a shape by extrusion of the base shape along a vector, defined by two points.
3497         #  @param theBase Base shape to be extruded.
3498         #  @param thePoint1 First end of extrusion vector.
3499         #  @param thePoint2 Second end of extrusion vector.
3500         #  @param theScaleFactor Use it to make prism with scaled second base.
3501         #                        Nagative value means not scaled second base.
3502         #  @param theName Object name; when specified, this parameter is used
3503         #         for result publication in the study. Otherwise, if automatic
3504         #         publication is switched on, default value is used for result name.
3505         #
3506         #  @return New GEOM.GEOM_Object, containing the created prism.
3507         #
3508         #  @ref tui_creation_prism "Example"
3509         @ManageTransactions("PrimOp")
3510         def MakePrism(self, theBase, thePoint1, thePoint2, theScaleFactor = -1.0, theName=None):
3511             """
3512             Create a shape by extrusion of the base shape along a vector, defined by two points.
3513
3514             Parameters:
3515                 theBase Base shape to be extruded.
3516                 thePoint1 First end of extrusion vector.
3517                 thePoint2 Second end of extrusion vector.
3518                 theScaleFactor Use it to make prism with scaled second base.
3519                                Nagative value means not scaled second base.
3520                 theName Object name; when specified, this parameter is used
3521                         for result publication in the study. Otherwise, if automatic
3522                         publication is switched on, default value is used for result name.
3523
3524             Returns:
3525                 New GEOM.GEOM_Object, containing the created prism.
3526             """
3527             # Example: see GEOM_TestAll.py
3528             anObj = None
3529             Parameters = ""
3530             if theScaleFactor > 0:
3531                 theScaleFactor,Parameters = ParseParameters(theScaleFactor)
3532                 anObj = self.PrimOp.MakePrismTwoPntWithScaling(theBase, thePoint1, thePoint2, theScaleFactor)
3533             else:
3534                 anObj = self.PrimOp.MakePrismTwoPnt(theBase, thePoint1, thePoint2)
3535             RaiseIfFailed("MakePrismTwoPnt", self.PrimOp)
3536             anObj.SetParameters(Parameters)
3537             self._autoPublish(anObj, theName, "prism")
3538             return anObj
3539
3540         ## Create a shape by extrusion of the base shape along a
3541         #  vector, defined by two points, in 2 Ways (forward/backward).
3542         #  @param theBase Base shape to be extruded.
3543         #  @param thePoint1 First end of extrusion vector.
3544         #  @param thePoint2 Second end of extrusion vector.
3545         #  @param theName Object name; when specified, this parameter is used
3546         #         for result publication in the study. Otherwise, if automatic
3547         #         publication is switched on, default value is used for result name.
3548         #
3549         #  @return New GEOM.GEOM_Object, containing the created prism.
3550         #
3551         #  @ref tui_creation_prism "Example"
3552         @ManageTransactions("PrimOp")
3553         def MakePrism2Ways(self, theBase, thePoint1, thePoint2, theName=None):
3554             """
3555             Create a shape by extrusion of the base shape along a
3556             vector, defined by two points, in 2 Ways (forward/backward).
3557
3558             Parameters:
3559                 theBase Base shape to be extruded.
3560                 thePoint1 First end of extrusion vector.
3561                 thePoint2 Second end of extrusion vector.
3562                 theName Object name; when specified, this parameter is used
3563                         for result publication in the study. Otherwise, if automatic
3564                         publication is switched on, default value is used for result name.
3565
3566             Returns:
3567                 New GEOM.GEOM_Object, containing the created prism.
3568             """
3569             # Example: see GEOM_TestAll.py
3570             anObj = self.PrimOp.MakePrismTwoPnt2Ways(theBase, thePoint1, thePoint2)
3571             RaiseIfFailed("MakePrismTwoPnt", self.PrimOp)
3572             self._autoPublish(anObj, theName, "prism")
3573             return anObj
3574
3575         ## Create a shape by extrusion of the base shape along the vector,
3576         #  i.e. all the space, transfixed by the base shape during its translation
3577         #  along the vector on the given distance.
3578         #  @param theBase Base shape to be extruded.
3579         #  @param theVec Direction of extrusion.
3580         #  @param theH Prism dimension along theVec.
3581         #  @param theScaleFactor Use it to make prism with scaled second base.
3582         #                        Negative value means not scaled second base.
3583         #  @param theName Object name; when specified, this parameter is used
3584         #         for result publication in the study. Otherwise, if automatic
3585         #         publication is switched on, default value is used for result name.
3586         #
3587         #  @return New GEOM.GEOM_Object, containing the created prism.
3588         #
3589         #  @ref tui_creation_prism "Example"
3590         @ManageTransactions("PrimOp")
3591         def MakePrismVecH(self, theBase, theVec, theH, theScaleFactor = -1.0, theName=None):
3592             """
3593             Create a shape by extrusion of the base shape along the vector,
3594             i.e. all the space, transfixed by the base shape during its translation
3595             along the vector on the given distance.
3596
3597             Parameters:
3598                 theBase Base shape to be extruded.
3599                 theVec Direction of extrusion.
3600                 theH Prism dimension along theVec.
3601                 theScaleFactor Use it to make prism with scaled second base.
3602                                Negative value means not scaled second base.
3603                 theName Object name; when specified, this parameter is used
3604                         for result publication in the study. Otherwise, if automatic
3605                         publication is switched on, default value is used for result name.
3606
3607             Returns:
3608                 New GEOM.GEOM_Object, containing the created prism.
3609             """
3610             # Example: see GEOM_TestAll.py
3611             anObj = None
3612             Parameters = ""
3613             if theScaleFactor > 0:
3614                 theH,theScaleFactor,Parameters = ParseParameters(theH,theScaleFactor)
3615                 anObj = self.PrimOp.MakePrismVecHWithScaling(theBase, theVec, theH, theScaleFactor)
3616             else:
3617                 theH,Parameters = ParseParameters(theH)
3618                 anObj = self.PrimOp.MakePrismVecH(theBase, theVec, theH)
3619             RaiseIfFailed("MakePrismVecH", self.PrimOp)
3620             anObj.SetParameters(Parameters)
3621             self._autoPublish(anObj, theName, "prism")
3622             return anObj
3623
3624         ## Create a shape by extrusion of the base shape along the vector,
3625         #  i.e. all the space, transfixed by the base shape during its translation
3626         #  along the vector on the given distance in 2 Ways (forward/backward).
3627         #  @param theBase Base shape to be extruded.
3628         #  @param theVec Direction of extrusion.
3629         #  @param theH Prism dimension along theVec in forward direction.
3630         #  @param theName Object name; when specified, this parameter is used
3631         #         for result publication in the study. Otherwise, if automatic
3632         #         publication is switched on, default value is used for result name.
3633         #
3634         #  @return New GEOM.GEOM_Object, containing the created prism.
3635         #
3636         #  @ref tui_creation_prism "Example"
3637         @ManageTransactions("PrimOp")
3638         def MakePrismVecH2Ways(self, theBase, theVec, theH, theName=None):
3639             """
3640             Create a shape by extrusion of the base shape along the vector,
3641             i.e. all the space, transfixed by the base shape during its translation
3642             along the vector on the given distance in 2 Ways (forward/backward).
3643
3644             Parameters:
3645                 theBase Base shape to be extruded.
3646                 theVec Direction of extrusion.
3647                 theH Prism dimension along theVec in forward direction.
3648                 theName Object name; when specified, this parameter is used
3649                         for result publication in the study. Otherwise, if automatic
3650                         publication is switched on, default value is used for result name.
3651
3652             Returns:
3653                 New GEOM.GEOM_Object, containing the created prism.
3654             """
3655             # Example: see GEOM_TestAll.py
3656             theH,Parameters = ParseParameters(theH)
3657             anObj = self.PrimOp.MakePrismVecH2Ways(theBase, theVec, theH)
3658             RaiseIfFailed("MakePrismVecH2Ways", self.PrimOp)
3659             anObj.SetParameters(Parameters)
3660             self._autoPublish(anObj, theName, "prism")
3661             return anObj
3662
3663         ## Create a shape by extrusion of the base shape along the dx, dy, dz direction
3664         #  @param theBase Base shape to be extruded.
3665         #  @param theDX, theDY, theDZ Directions of extrusion.
3666         #  @param theScaleFactor Use it to make prism with scaled second base.
3667         #                        Nagative value means not scaled second base.
3668         #  @param theName Object name; when specified, this parameter is used
3669         #         for result publication in the study. Otherwise, if automatic
3670         #         publication is switched on, default value is used for result name.
3671         #
3672         #  @return New GEOM.GEOM_Object, containing the created prism.
3673         #
3674         #  @ref tui_creation_prism "Example"
3675         @ManageTransactions("PrimOp")
3676         def MakePrismDXDYDZ(self, theBase, theDX, theDY, theDZ, theScaleFactor = -1.0, theName=None):
3677             """
3678             Create a shape by extrusion of the base shape along the dx, dy, dz direction
3679
3680             Parameters:
3681                 theBase Base shape to be extruded.
3682                 theDX, theDY, theDZ Directions of extrusion.
3683                 theScaleFactor Use it to make prism with scaled second base.
3684                                Nagative value means not scaled second base.
3685                 theName Object name; when specified, this parameter is used
3686                         for result publication in the study. Otherwise, if automatic
3687                         publication is switched on, default value is used for result name.
3688
3689             Returns:
3690                 New GEOM.GEOM_Object, containing the created prism.
3691             """
3692             # Example: see GEOM_TestAll.py
3693             anObj = None
3694             Parameters = ""
3695             if theScaleFactor > 0:
3696                 theDX,theDY,theDZ,theScaleFactor,Parameters = ParseParameters(theDX, theDY, theDZ, theScaleFactor)
3697                 anObj = self.PrimOp.MakePrismDXDYDZWithScaling(theBase, theDX, theDY, theDZ, theScaleFactor)
3698             else:
3699                 theDX,theDY,theDZ,Parameters = ParseParameters(theDX, theDY, theDZ)
3700                 anObj = self.PrimOp.MakePrismDXDYDZ(theBase, theDX, theDY, theDZ)
3701             RaiseIfFailed("MakePrismDXDYDZ", self.PrimOp)
3702             anObj.SetParameters(Parameters)
3703             self._autoPublish(anObj, theName, "prism")
3704             return anObj
3705
3706         ## Create a shape by extrusion of the base shape along the dx, dy, dz direction
3707         #  i.e. all the space, transfixed by the base shape during its translation
3708         #  along the vector on the given distance in 2 Ways (forward/backward).
3709         #  @param theBase Base shape to be extruded.
3710         #  @param theDX, theDY, theDZ Directions of extrusion.
3711         #  @param theName Object name; when specified, this parameter is used
3712         #         for result publication in the study. Otherwise, if automatic
3713         #         publication is switched on, default value is used for result name.
3714         #
3715         #  @return New GEOM.GEOM_Object, containing the created prism.
3716         #
3717         #  @ref tui_creation_prism "Example"
3718         @ManageTransactions("PrimOp")
3719         def MakePrismDXDYDZ2Ways(self, theBase, theDX, theDY, theDZ, theName=None):
3720             """
3721             Create a shape by extrusion of the base shape along the dx, dy, dz direction
3722             i.e. all the space, transfixed by the base shape during its translation
3723             along the vector on the given distance in 2 Ways (forward/backward).
3724
3725             Parameters:
3726                 theBase Base shape to be extruded.
3727                 theDX, theDY, theDZ Directions of extrusion.
3728                 theName Object name; when specified, this parameter is used
3729                         for result publication in the study. Otherwise, if automatic
3730                         publication is switched on, default value is used for result name.
3731
3732             Returns:
3733                 New GEOM.GEOM_Object, containing the created prism.
3734             """
3735             # Example: see GEOM_TestAll.py
3736             theDX,theDY,theDZ,Parameters = ParseParameters(theDX, theDY, theDZ)
3737             anObj = self.PrimOp.MakePrismDXDYDZ2Ways(theBase, theDX, theDY, theDZ)
3738             RaiseIfFailed("MakePrismDXDYDZ2Ways", self.PrimOp)
3739             anObj.SetParameters(Parameters)
3740             self._autoPublish(anObj, theName, "prism")
3741             return anObj
3742
3743         ## Create a shape by revolution of the base shape around the axis
3744         #  on the given angle, i.e. all the space, transfixed by the base
3745         #  shape during its rotation around the axis on the given angle.
3746         #  @param theBase Base shape to be rotated.
3747         #  @param theAxis Rotation axis.
3748         #  @param theAngle Rotation angle in radians.
3749         #  @param theName Object name; when specified, this parameter is used
3750         #         for result publication in the study. Otherwise, if automatic
3751         #         publication is switched on, default value is used for result name.
3752         #
3753         #  @return New GEOM.GEOM_Object, containing the created revolution.
3754         #
3755         #  @ref tui_creation_revolution "Example"
3756         @ManageTransactions("PrimOp")
3757         def MakeRevolution(self, theBase, theAxis, theAngle, theName=None):
3758             """
3759             Create a shape by revolution of the base shape around the axis
3760             on the given angle, i.e. all the space, transfixed by the base
3761             shape during its rotation around the axis on the given angle.
3762
3763             Parameters:
3764                 theBase Base shape to be rotated.
3765                 theAxis Rotation axis.
3766                 theAngle Rotation angle in radians.
3767                 theName Object name; when specified, this parameter is used
3768                         for result publication in the study. Otherwise, if automatic
3769                         publication is switched on, default value is used for result name.
3770
3771             Returns:
3772                 New GEOM.GEOM_Object, containing the created revolution.
3773             """
3774             # Example: see GEOM_TestAll.py
3775             theAngle,Parameters = ParseParameters(theAngle)
3776             anObj = self.PrimOp.MakeRevolutionAxisAngle(theBase, theAxis, theAngle)
3777             RaiseIfFailed("MakeRevolutionAxisAngle", self.PrimOp)
3778             anObj.SetParameters(Parameters)
3779             self._autoPublish(anObj, theName, "revolution")
3780             return anObj
3781
3782         ## Create a shape by revolution of the base shape around the axis
3783         #  on the given angle, i.e. all the space, transfixed by the base
3784         #  shape during its rotation around the axis on the given angle in
3785         #  both directions (forward/backward)
3786         #  @param theBase Base shape to be rotated.
3787         #  @param theAxis Rotation axis.
3788         #  @param theAngle Rotation angle in radians.
3789         #  @param theName Object name; when specified, this parameter is used
3790         #         for result publication in the study. Otherwise, if automatic
3791         #         publication is switched on, default value is used for result name.
3792         #
3793         #  @return New GEOM.GEOM_Object, containing the created revolution.
3794         #
3795         #  @ref tui_creation_revolution "Example"
3796         @ManageTransactions("PrimOp")
3797         def MakeRevolution2Ways(self, theBase, theAxis, theAngle, theName=None):
3798             """
3799             Create a shape by revolution of the base shape around the axis
3800             on the given angle, i.e. all the space, transfixed by the base
3801             shape during its rotation around the axis on the given angle in
3802             both directions (forward/backward).
3803
3804             Parameters:
3805                 theBase Base shape to be rotated.
3806                 theAxis Rotation axis.
3807                 theAngle Rotation angle in radians.
3808                 theName Object name; when specified, this parameter is used
3809                         for result publication in the study. Otherwise, if automatic
3810                         publication is switched on, default value is used for result name.
3811
3812             Returns:
3813                 New GEOM.GEOM_Object, containing the created revolution.
3814             """
3815             theAngle,Parameters = ParseParameters(theAngle)
3816             anObj = self.PrimOp.MakeRevolutionAxisAngle2Ways(theBase, theAxis, theAngle)
3817             RaiseIfFailed("MakeRevolutionAxisAngle2Ways", self.PrimOp)
3818             anObj.SetParameters(Parameters)
3819             self._autoPublish(anObj, theName, "revolution")
3820             return anObj
3821
3822         ## Create a face from a given set of contours.
3823         #  @param theContours either a list or a compound of edges/wires.
3824         #  @param theMinDeg a minimal degree of BSpline surface to create.
3825         #  @param theMaxDeg a maximal degree of BSpline surface to create.
3826         #  @param theTol2D a 2d tolerance to be reached.
3827         #  @param theTol3D a 3d tolerance to be reached.
3828         #  @param theNbIter a number of iteration of approximation algorithm.
3829         #  @param theMethod Kind of method to perform filling operation
3830         #         (see GEOM.filling_oper_method enum).
3831         #  @param isApprox if True, BSpline curves are generated in the process
3832         #                  of surface construction. By default it is False, that means
3833         #                  the surface is created using given curves. The usage of
3834         #                  Approximation makes the algorithm work slower, but allows
3835         #                  building the surface for rather complex cases.
3836         #  @param theName Object name; when specified, this parameter is used
3837         #         for result publication in the study. Otherwise, if automatic
3838         #         publication is switched on, default value is used for result name.
3839         #
3840         #  @return New GEOM.GEOM_Object (face), containing the created filling surface.
3841         #
3842         #  @ref tui_creation_filling "Example"
3843         @ManageTransactions("PrimOp")
3844         def MakeFilling(self, theContours, theMinDeg=2, theMaxDeg=5, theTol2D=0.0001,
3845                         theTol3D=0.0001, theNbIter=0, theMethod=GEOM.FOM_Default, isApprox=0, theName=None):
3846             """
3847             Create a face from a given set of contours.
3848
3849             Parameters:
3850                 theContours either a list or a compound of edges/wires.
3851                 theMinDeg a minimal degree of BSpline surface to create.
3852                 theMaxDeg a maximal degree of BSpline surface to create.
3853                 theTol2D a 2d tolerance to be reached.
3854                 theTol3D a 3d tolerance to be reached.
3855                 theNbIter a number of iteration of approximation algorithm.
3856                 theMethod Kind of method to perform filling operation
3857                           (see GEOM.filling_oper_method enum).
3858                 isApprox if True, BSpline curves are generated in the process
3859                          of surface construction. By default it is False, that means
3860                          the surface is created using given curves. The usage of
3861                          Approximation makes the algorithm work slower, but allows
3862                          building the surface for rather complex cases.
3863                 theName Object name; when specified, this parameter is used
3864                         for result publication in the study. Otherwise, if automatic
3865                         publication is switched on, default value is used for result name.
3866
3867             Returns:
3868                 New GEOM.GEOM_Object (face), containing the created filling surface.
3869
3870             Example of usage:
3871                 filling = geompy.MakeFilling(compound, 2, 5, 0.0001, 0.0001, 5)
3872             """
3873             # Example: see GEOM_TestAll.py
3874             theMinDeg,theMaxDeg,theTol2D,theTol3D,theNbIter,Parameters = ParseParameters(theMinDeg, theMaxDeg, theTol2D, theTol3D, theNbIter)
3875             anObj = self.PrimOp.MakeFilling(ToList(theContours), theMinDeg, theMaxDeg,
3876                                             theTol2D, theTol3D, theNbIter,
3877                                             theMethod, isApprox)
3878             RaiseIfFailed("MakeFilling", self.PrimOp)
3879             anObj.SetParameters(Parameters)
3880             self._autoPublish(anObj, theName, "filling")
3881             return anObj
3882
3883
3884         ## Create a face from a given set of contours.
3885         #  This method corresponds to MakeFilling() with isApprox=True.
3886         #  @param theContours either a list or a compound of edges/wires.
3887         #  @param theMinDeg a minimal degree of BSpline surface to create.
3888         #  @param theMaxDeg a maximal degree of BSpline surface to create.
3889         #  @param theTol3D a 3d tolerance to be reached.
3890         #  @param theName Object name; when specified, this parameter is used
3891         #         for result publication in the study. Otherwise, if automatic
3892         #         publication is switched on, default value is used for result name.
3893         #
3894         #  @return New GEOM.GEOM_Object (face), containing the created filling surface.
3895         #
3896         #  @ref tui_creation_filling "Example"
3897         @ManageTransactions("PrimOp")
3898         def MakeFillingNew(self, theContours, theMinDeg=2, theMaxDeg=5, theTol3D=0.0001, theName=None):
3899             """
3900             Create a filling from the given compound of contours.
3901             This method corresponds to MakeFilling() with isApprox=True.
3902
3903             Parameters:
3904                 theContours either a list or a compound of edges/wires.
3905                 theMinDeg a minimal degree of BSpline surface to create.
3906                 theMaxDeg a maximal degree of BSpline surface to create.
3907                 theTol3D a 3d tolerance to be reached.
3908                 theName Object name; when specified, this parameter is used
3909                         for result publication in the study. Otherwise, if automatic
3910                         publication is switched on, default value is used for result name.
3911
3912             Returns:
3913                 New GEOM.GEOM_Object (face), containing the created filling surface.
3914
3915             Example of usage:
3916                 filling = geompy.MakeFillingNew(compound, 2, 5, 0.0001)
3917             """
3918             # Example: see GEOM_TestAll.py
3919             theMinDeg,theMaxDeg,theTol3D,Parameters = ParseParameters(theMinDeg, theMaxDeg, theTol3D)
3920             anObj = self.PrimOp.MakeFilling(ToList(theContours), theMinDeg, theMaxDeg,
3921                                             0, theTol3D, 0, GEOM.FOM_Default, True)
3922             RaiseIfFailed("MakeFillingNew", self.PrimOp)
3923             anObj.SetParameters(Parameters)
3924             self._autoPublish(anObj, theName, "filling")
3925             return anObj
3926
3927         ## Create a shell or solid passing through set of sections.Sections should be wires,edges or vertices.
3928         #  @param theSeqSections - set of specified sections.
3929         #  @param theModeSolid - mode defining building solid or shell
3930         #  @param thePreci - precision 3D used for smoothing
3931         #  @param theRuled - mode defining type of the result surfaces (ruled or smoothed).
3932         #  @param theName Object name; when specified, this parameter is used
3933         #         for result publication in the study. Otherwise, if automatic
3934         #         publication is switched on, default value is used for result name.
3935         #
3936         #  @return New GEOM.GEOM_Object, containing the created shell or solid.
3937         #
3938         #  @ref swig_todo "Example"
3939         @ManageTransactions("PrimOp")
3940         def MakeThruSections(self, theSeqSections, theModeSolid, thePreci, theRuled, theName=None):
3941             """
3942             Create a shell or solid passing through set of sections.Sections should be wires,edges or vertices.
3943
3944             Parameters:
3945                 theSeqSections - set of specified sections.
3946                 theModeSolid - mode defining building solid or shell
3947                 thePreci - precision 3D used for smoothing
3948                 theRuled - mode defining type of the result surfaces (ruled or smoothed).
3949                 theName Object name; when specified, this parameter is used
3950                         for result publication in the study. Otherwise, if automatic
3951                         publication is switched on, default value is used for result name.
3952
3953             Returns:
3954                 New GEOM.GEOM_Object, containing the created shell or solid.
3955             """
3956             # Example: see GEOM_TestAll.py
3957             anObj = self.PrimOp.MakeThruSections(theSeqSections,theModeSolid,thePreci,theRuled)
3958             RaiseIfFailed("MakeThruSections", self.PrimOp)
3959             self._autoPublish(anObj, theName, "filling")
3960             return anObj
3961
3962         ## Create a shape by extrusion of the base shape along
3963         #  the path shape. The path shape can be a wire or an edge. It is
3964         #  possible to generate groups along with the result by means of
3965         #  setting the flag \a IsGenerateGroups.<BR>
3966         #  If \a thePath is a closed edge or wire and \a IsGenerateGroups is
3967         #  set, an error is occurred. If \a thePath is not closed edge/wire,
3968         #  the following groups are returned:
3969         #  - If \a theBase is unclosed edge or wire: "Down", "Up", "Side1",
3970         #    "Side2";
3971         #  - If \a theBase is closed edge or wire, face or shell: "Down", "Up",
3972         #    "Other".
3973         #  .
3974         #  "Down" and "Up" groups contain:
3975         #  - Edges if \a theBase is edge or wire;
3976         #  - Faces if \a theBase is face or shell.<BR>
3977         #  .
3978         #  "Side1" and "Side2" groups contain edges generated from the first
3979         #  and last vertices of \a theBase. The first and last vertices are
3980         #  determined taking into account edge/wire orientation.<BR>
3981         #  "Other" group represents faces generated from the bounding edges of
3982         #  \a theBase.
3983         #
3984         #  @param theBase Base shape to be extruded.
3985         #  @param thePath Path shape to extrude the base shape along it.
3986         #  @param IsGenerateGroups flag that tells if it is necessary to
3987         #         create groups. It is equal to False by default.
3988         #  @param theName Object name; when specified, this parameter is used
3989         #         for result publication in the study. Otherwise, if automatic
3990         #         publication is switched on, default value is used for result name.
3991         #
3992         #  @return New GEOM.GEOM_Object, containing the created pipe if 
3993         #          \a IsGenerateGroups is not set. Otherwise it returns a
3994         #          list of GEOM.GEOM_Object. Its first element is the created pipe, the
3995         #          remaining ones are created groups.
3996         #
3997         #  @ref tui_creation_pipe "Example"
3998         @ManageTransactions("PrimOp")
3999         def MakePipe(self, theBase, thePath,
4000                      IsGenerateGroups=False, theName=None):
4001             """
4002             Create a shape by extrusion of the base shape along
4003             the path shape. The path shape can be a wire or an edge. It is
4004             possible to generate groups along with the result by means of
4005             setting the flag IsGenerateGroups.
4006             If thePath is a closed edge or wire and IsGenerateGroups is
4007             set, an error is occurred. If thePath is not closed edge/wire,
4008             the following groups are returned:
4009             - If theBase is unclosed edge or wire: "Down", "Up", "Side1",
4010               "Side2";
4011             - If theBase is closed edge or wire, face or shell: "Down", "Up",
4012               "Other".
4013             "Down" and "Up" groups contain:
4014             - Edges if theBase is edge or wire;
4015             - Faces if theBase is face or shell.
4016             "Side1" and "Side2" groups contain edges generated from the first
4017             and last vertices of theBase. The first and last vertices are
4018             determined taking into account edge/wire orientation.
4019             "Other" group represents faces generated from the bounding edges of
4020             theBase.
4021
4022             Parameters:
4023                 theBase Base shape to be extruded.
4024                 thePath Path shape to extrude the base shape along it.
4025                 IsGenerateGroups flag that tells if it is necessary to
4026                         create groups. It is equal to False by default.
4027                 theName Object name; when specified, this parameter is used
4028                         for result publication in the study. Otherwise, if automatic
4029                         publication is switched on, default value is used for result name.
4030
4031             Returns:
4032                 New GEOM.GEOM_Object, containing the created pipe if 
4033                 IsGenerateGroups is not set. Otherwise it returns a
4034                 list of GEOM.GEOM_Object. Its first element is the created pipe, the
4035                 remaining ones are created groups.
4036             """
4037             # Example: see GEOM_TestAll.py
4038             aList = self.PrimOp.MakePipe(theBase, thePath, IsGenerateGroups)
4039             RaiseIfFailed("MakePipe", self.PrimOp)
4040
4041             if IsGenerateGroups:
4042               self._autoPublish(aList, theName, "pipe")
4043               return aList
4044
4045             self._autoPublish(aList[0], theName, "pipe")
4046             return aList[0]
4047
4048         ## Create a shape by extrusion of the profile shape along
4049         #  the path shape. The path shape can be a wire or an edge.
4050         #  the several profiles can be specified in the several locations of path.
4051         #  It is possible to generate groups along with the result by means of
4052         #  setting the flag \a IsGenerateGroups. For detailed information on
4053         #  groups that can be created please see the method MakePipe().
4054         #  @param theSeqBases - list of  Bases shape to be extruded.
4055         #  @param theLocations - list of locations on the path corresponding
4056         #                        specified list of the Bases shapes. Number of locations
4057         #                        should be equal to number of bases or list of locations can be empty.
4058         #  @param thePath - Path shape to extrude the base shape along it.
4059         #  @param theWithContact - the mode defining that the section is translated to be in
4060         #                          contact with the spine.
4061         #  @param theWithCorrection - defining that the section is rotated to be
4062         #                             orthogonal to the spine tangent in the correspondent point
4063         #  @param IsGenerateGroups - flag that tells if it is necessary to
4064         #                          create groups. It is equal to False by default.
4065         #  @param theName Object name; when specified, this parameter is used
4066         #         for result publication in the study. Otherwise, if automatic
4067         #         publication is switched on, default value is used for result name.
4068         #
4069         #  @return New GEOM.GEOM_Object, containing the created pipe if 
4070         #          \a IsGenerateGroups is not set. Otherwise it returns new
4071         #          GEOM.ListOfGO. Its first element is the created pipe, the
4072         #          remaining ones are created groups.
4073         #
4074         #  @ref tui_creation_pipe_with_diff_sec "Example"
4075         @ManageTransactions("PrimOp")
4076         def MakePipeWithDifferentSections(self, theSeqBases,
4077                                           theLocations, thePath,
4078                                           theWithContact, theWithCorrection,
4079                                           IsGenerateGroups=False, theName=None):
4080             """
4081             Create a shape by extrusion of the profile shape along
4082             the path shape. The path shape can be a wire or an edge.
4083             the several profiles can be specified in the several locations of path.
4084             It is possible to generate groups along with the result by means of
4085             setting the flag IsGenerateGroups. For detailed information on
4086             groups that can be created please see the method geompy.MakePipe().
4087
4088             Parameters:
4089                 theSeqBases - list of  Bases shape to be extruded.
4090                 theLocations - list of locations on the path corresponding
4091                                specified list of the Bases shapes. Number of locations
4092                                should be equal to number of bases or list of locations can be empty.
4093                 thePath - Path shape to extrude the base shape along it.
4094                 theWithContact - the mode defining that the section is translated to be in
4095                                  contact with the spine(0/1)
4096                 theWithCorrection - defining that the section is rotated to be
4097                                     orthogonal to the spine tangent in the correspondent point (0/1)
4098                 IsGenerateGroups - flag that tells if it is necessary to
4099                                  create groups. It is equal to False by default.
4100                 theName Object name; when specified, this parameter is used
4101                         for result publication in the study. Otherwise, if automatic
4102                         publication is switched on, default value is used for result name.
4103
4104             Returns:
4105                 New GEOM.GEOM_Object, containing the created pipe if 
4106                 IsGenerateGroups is not set. Otherwise it returns new
4107                 GEOM.ListOfGO. Its first element is the created pipe, the
4108                 remaining ones are created groups.
4109             """
4110             aList = self.PrimOp.MakePipeWithDifferentSections(theSeqBases,
4111                                                               theLocations, thePath,
4112                                                               theWithContact, theWithCorrection,
4113                                                               False, IsGenerateGroups)
4114             RaiseIfFailed("MakePipeWithDifferentSections", self.PrimOp)
4115
4116             if IsGenerateGroups:
4117               self._autoPublish(aList, theName, "pipe")
4118               return aList
4119
4120             self._autoPublish(aList[0], theName, "pipe")
4121             return aList[0]
4122
4123         ## Create a shape by extrusion of the profile shape along
4124         #  the path shape. This function is a version of
4125         #  MakePipeWithDifferentSections() with the same parameters, except
4126         #  eliminated theWithContact and theWithCorrection. So it is
4127         #  possible to find the description of all parameters is in this
4128         #  method. The difference is that this method performs the operation
4129         #  step by step, i.e. it creates pipes between each pair of neighbor
4130         #  sections and fuses them into a single shape.
4131         #
4132         #  @ref tui_creation_pipe_with_diff_sec "Example"
4133         @ManageTransactions("PrimOp")
4134         def MakePipeWithDifferentSectionsBySteps(self, theSeqBases,
4135                                                  theLocations, thePath,
4136                                                  IsGenerateGroups=False, theName=None):
4137             """
4138             Create a shape by extrusion of the profile shape along
4139             the path shape. This function is a version of
4140             MakePipeWithDifferentSections() with the same parameters, except
4141             eliminated theWithContact and theWithCorrection. So it is
4142             possible to find the description of all parameters is in this
4143             method. The difference is that this method performs the operation
4144             step by step, i.e. it creates pipes between each pair of neighbor
4145             sections and fuses them into a single shape.
4146             """
4147             aList = self.PrimOp.MakePipeWithDifferentSections(theSeqBases,
4148                                                               theLocations, thePath,
4149                                                               False, False,
4150                                                               True, IsGenerateGroups)
4151             RaiseIfFailed("MakePipeWithDifferentSectionsBySteps", self.PrimOp)
4152
4153             if IsGenerateGroups:
4154               self._autoPublish(aList, theName, "pipe")
4155               return aList
4156
4157             self._autoPublish(aList[0], theName, "pipe")
4158             return aList[0]
4159
4160         ## Create a shape by extrusion of the profile shape along
4161         #  the path shape. The path shape can be a wire or an edge.
4162         #  the several profiles can be specified in the several locations of path.
4163         #  It is possible to generate groups along with the result by means of
4164         #  setting the flag \a IsGenerateGroups. For detailed information on
4165         #  groups that can be created please see the method MakePipe().
4166         #  @param theSeqBases - list of  Bases shape to be extruded. Base shape must be
4167         #                       shell or face. If number of faces in neighbour sections
4168         #                       aren't coincided result solid between such sections will
4169         #                       be created using external boundaries of this shells.
4170         #  @param theSeqSubBases - list of corresponding sub-shapes of section shapes.
4171         #                          This list is used for searching correspondences between
4172         #                          faces in the sections. Size of this list must be equal
4173         #                          to size of list of base shapes.
4174         #  @param theLocations - list of locations on the path corresponding
4175         #                        specified list of the Bases shapes. Number of locations
4176         #                        should be equal to number of bases. First and last
4177         #                        locations must be coincided with first and last vertexes
4178         #                        of path correspondingly.
4179         #  @param thePath - Path shape to extrude the base shape along it.
4180         #  @param theWithContact - the mode defining that the section is translated to be in
4181         #                          contact with the spine.
4182         #  @param theWithCorrection - defining that the section is rotated to be
4183         #                             orthogonal to the spine tangent in the correspondent point
4184         #  @param IsGenerateGroups - flag that tells if it is necessary to
4185         #                          create groups. It is equal to False by default.
4186         #  @param theName Object name; when specified, this parameter is used
4187         #         for result publication in the study. Otherwise, if automatic
4188         #         publication is switched on, default value is used for result name.
4189         #
4190         #  @return New GEOM.GEOM_Object, containing the created solids if 
4191         #          \a IsGenerateGroups is not set. Otherwise it returns new
4192         #          GEOM.ListOfGO. Its first element is the created solids, the
4193         #          remaining ones are created groups.
4194         #
4195         #  @ref tui_creation_pipe_with_shell_sec "Example"
4196         @ManageTransactions("PrimOp")
4197         def MakePipeWithShellSections(self, theSeqBases, theSeqSubBases,
4198                                       theLocations, thePath,
4199                                       theWithContact, theWithCorrection,
4200                                       IsGenerateGroups=False, theName=None):
4201             """
4202             Create a shape by extrusion of the profile shape along
4203             the path shape. The path shape can be a wire or an edge.
4204             the several profiles can be specified in the several locations of path.
4205             It is possible to generate groups along with the result by means of
4206             setting the flag IsGenerateGroups. For detailed information on
4207             groups that can be created please see the method geompy.MakePipe().
4208
4209             Parameters:
4210                 theSeqBases - list of  Bases shape to be extruded. Base shape must be
4211                               shell or face. If number of faces in neighbour sections
4212                               aren't coincided result solid between such sections will
4213                               be created using external boundaries of this shells.
4214                 theSeqSubBases - list of corresponding sub-shapes of section shapes.
4215                                  This list is used for searching correspondences between
4216                                  faces in the sections. Size of this list must be equal
4217                                  to size of list of base shapes.
4218                 theLocations - list of locations on the path corresponding
4219                                specified list of the Bases shapes. Number of locations
4220                                should be equal to number of bases. First and last
4221                                locations must be coincided with first and last vertexes
4222                                of path correspondingly.
4223                 thePath - Path shape to extrude the base shape along it.
4224                 theWithContact - the mode defining that the section is translated to be in
4225                                  contact with the spine (0/1)
4226                 theWithCorrection - defining that the section is rotated to be
4227                                     orthogonal to the spine tangent in the correspondent point (0/1)
4228                 IsGenerateGroups - flag that tells if it is necessary to
4229                                  create groups. It is equal to False by default.
4230                 theName Object name; when specified, this parameter is used
4231                         for result publication in the study. Otherwise, if automatic
4232                         publication is switched on, default value is used for result name.
4233
4234             Returns:
4235                 New GEOM.GEOM_Object, containing the created solids if 
4236                 IsGenerateGroups is not set. Otherwise it returns new
4237                 GEOM.ListOfGO. Its first element is the created solids, the
4238                 remaining ones are created groups.
4239             """
4240             aList = self.PrimOp.MakePipeWithShellSections(theSeqBases, theSeqSubBases,
4241                                                           theLocations, thePath,
4242                                                           theWithContact, theWithCorrection,
4243                                                           IsGenerateGroups)
4244             RaiseIfFailed("MakePipeWithShellSections", self.PrimOp)
4245
4246             if IsGenerateGroups:
4247               self._autoPublish(aList, theName, "pipe")
4248               return aList
4249
4250             self._autoPublish(aList[0], theName, "pipe")
4251             return aList[0]
4252
4253         ## Create a shape by extrusion of the profile shape along
4254         #  the path shape. This function is used only for debug pipe
4255         #  functionality - it is a version of function MakePipeWithShellSections()
4256         #  which give a possibility to receive information about
4257         #  creating pipe between each pair of sections step by step.
4258         @ManageTransactions("PrimOp")
4259         def MakePipeWithShellSectionsBySteps(self, theSeqBases, theSeqSubBases,
4260                                              theLocations, thePath,
4261                                              theWithContact, theWithCorrection,
4262                                              IsGenerateGroups=False, theName=None):
4263             """
4264             Create a shape by extrusion of the profile shape along
4265             the path shape. This function is used only for debug pipe
4266             functionality - it is a version of previous function
4267             geompy.MakePipeWithShellSections() which give a possibility to
4268             receive information about creating pipe between each pair of
4269             sections step by step.
4270             """
4271             res = []
4272             nbsect = len(theSeqBases)
4273             nbsubsect = len(theSeqSubBases)
4274             #print "nbsect = ",nbsect
4275             for i in range(1,nbsect):
4276                 #print "  i = ",i
4277                 tmpSeqBases = [ theSeqBases[i-1], theSeqBases[i] ]
4278                 tmpLocations = [ theLocations[i-1], theLocations[i] ]
4279                 tmpSeqSubBases = []
4280                 if nbsubsect>0: tmpSeqSubBases = [ theSeqSubBases[i-1], theSeqSubBases[i] ]
4281                 aList = self.PrimOp.MakePipeWithShellSections(tmpSeqBases, tmpSeqSubBases,
4282                                                               tmpLocations, thePath,
4283                                                               theWithContact, theWithCorrection,
4284                                                               IsGenerateGroups)
4285                 if self.PrimOp.IsDone() == 0:
4286                     print("Problems with pipe creation between ",i," and ",i+1," sections")
4287                     RaiseIfFailed("MakePipeWithShellSections", self.PrimOp)
4288                     break
4289                 else:
4290                     print("Pipe between ",i," and ",i+1," sections is OK")
4291                     res.append(aList[0])
4292                     pass
4293                 pass
4294
4295             resc = self.MakeCompound(res)
4296             #resc = self.MakeSewing(res, 0.001)
4297             #print "resc: ",resc
4298             self._autoPublish(resc, theName, "pipe")
4299             return resc
4300
4301         ## Create solids between given sections.
4302         #  It is possible to generate groups along with the result by means of
4303         #  setting the flag \a IsGenerateGroups. For detailed information on
4304         #  groups that can be created please see the method MakePipe().
4305         #  @param theSeqBases - list of sections (shell or face).
4306         #  @param theLocations - list of corresponding vertexes
4307         #  @param IsGenerateGroups - flag that tells if it is necessary to
4308         #         create groups. It is equal to False by default.
4309         #  @param theName Object name; when specified, this parameter is used
4310         #         for result publication in the study. Otherwise, if automatic
4311         #         publication is switched on, default value is used for result name.
4312         #
4313         #  @return New GEOM.GEOM_Object, containing the created solids if 
4314         #          \a IsGenerateGroups is not set. Otherwise it returns new
4315         #          GEOM.ListOfGO. Its first element is the created solids, the
4316         #          remaining ones are created groups.
4317         #
4318         #  @ref tui_creation_pipe_without_path "Example"
4319         @ManageTransactions("PrimOp")
4320         def MakePipeShellsWithoutPath(self, theSeqBases, theLocations,
4321                                       IsGenerateGroups=False, theName=None):
4322             """
4323             Create solids between given sections.
4324             It is possible to generate groups along with the result by means of
4325             setting the flag IsGenerateGroups. For detailed information on
4326             groups that can be created please see the method geompy.MakePipe().
4327
4328             Parameters:
4329                 theSeqBases - list of sections (shell or face).
4330                 theLocations - list of corresponding vertexes
4331                 IsGenerateGroups - flag that tells if it is necessary to
4332                                  create groups. It is equal to False by default.
4333                 theName Object name; when specified, this parameter is used
4334                         for result publication in the study. Otherwise, if automatic
4335                         publication is switched on, default value is used for result name.
4336
4337             Returns:
4338                 New GEOM.GEOM_Object, containing the created solids if 
4339                 IsGenerateGroups is not set. Otherwise it returns new
4340                 GEOM.ListOfGO. Its first element is the created solids, the
4341                 remaining ones are created groups.
4342             """
4343             aList = self.PrimOp.MakePipeShellsWithoutPath(theSeqBases, theLocations,
4344                                                           IsGenerateGroups)
4345             RaiseIfFailed("MakePipeShellsWithoutPath", self.PrimOp)
4346
4347             if IsGenerateGroups:
4348               self._autoPublish(aList, theName, "pipe")
4349               return aList
4350
4351             self._autoPublish(aList[0], theName, "pipe")
4352             return aList[0]
4353
4354         ## Create a shape by extrusion of the base shape along
4355         #  the path shape with constant bi-normal direction along the given vector.
4356         #  The path shape can be a wire or an edge.
4357         #  It is possible to generate groups along with the result by means of
4358         #  setting the flag \a IsGenerateGroups. For detailed information on
4359         #  groups that can be created please see the method MakePipe().
4360         #  @param theBase Base shape to be extruded.
4361         #  @param thePath Path shape to extrude the base shape along it.
4362         #  @param theVec Vector defines a constant binormal direction to keep the
4363         #                same angle between the direction and the sections
4364         #                along the sweep surface.
4365         #  @param IsGenerateGroups flag that tells if it is necessary to
4366         #         create groups. It is equal to False by default.
4367         #  @param theName Object name; when specified, this parameter is used
4368         #         for result publication in the study. Otherwise, if automatic
4369         #         publication is switched on, default value is used for result name.
4370         #
4371         #  @return New GEOM.GEOM_Object, containing the created pipe if 
4372         #          \a IsGenerateGroups is not set. Otherwise it returns new
4373         #          GEOM.ListOfGO. Its first element is the created pipe, the
4374         #          remaining ones are created groups.
4375         #
4376         #  @ref tui_creation_pipe "Example"
4377         @ManageTransactions("PrimOp")
4378         def MakePipeBiNormalAlongVector(self, theBase, thePath, theVec,
4379                                         IsGenerateGroups=False, theName=None):
4380             """
4381             Create a shape by extrusion of the base shape along
4382             the path shape with constant bi-normal direction along the given vector.
4383             The path shape can be a wire or an edge.
4384             It is possible to generate groups along with the result by means of
4385             setting the flag IsGenerateGroups. For detailed information on
4386             groups that can be created please see the method geompy.MakePipe().
4387
4388             Parameters:
4389                 theBase Base shape to be extruded.
4390                 thePath Path shape to extrude the base shape along it.
4391                 theVec Vector defines a constant binormal direction to keep the
4392                        same angle between the direction and the sections
4393                        along the sweep surface.
4394                 IsGenerateGroups flag that tells if it is necessary to
4395                                  create groups. It is equal to False by default.
4396                 theName Object name; when specified, this parameter is used
4397                         for result publication in the study. Otherwise, if automatic
4398                         publication is switched on, default value is used for result name.
4399
4400             Returns:
4401                 New GEOM.GEOM_Object, containing the created pipe if 
4402                 IsGenerateGroups is not set. Otherwise it returns new
4403                 GEOM.ListOfGO. Its first element is the created pipe, the
4404                 remaining ones are created groups.
4405             """
4406             # Example: see GEOM_TestAll.py
4407             aList = self.PrimOp.MakePipeBiNormalAlongVector(theBase, thePath,
4408                           theVec, IsGenerateGroups)
4409             RaiseIfFailed("MakePipeBiNormalAlongVector", self.PrimOp)
4410
4411             if IsGenerateGroups:
4412               self._autoPublish(aList, theName, "pipe")
4413               return aList
4414
4415             self._autoPublish(aList[0], theName, "pipe")
4416             return aList[0]
4417
4418         ## Makes a thick solid from a shape. If the input is a surface shape
4419         #  (face or shell) the result is a thick solid. If an input shape is
4420         #  a solid the result is a hollowed solid with removed faces.
4421         #  @param theShape Face or Shell to get thick solid or solid to get
4422         #         hollowed solid.
4423         #  @param theThickness Thickness of the resulting solid
4424         #  @param theFacesIDs the list of face IDs to be removed from the
4425         #         result. It is ignored if \a theShape is a face or a shell.
4426         #         It is empty by default. 
4427         #  @param theInside If true the thickness is applied towards inside
4428         #  @param theName Object name; when specified, this parameter is used
4429         #         for result publication in the study. Otherwise, if automatic
4430         #         publication is switched on, default value is used for result name.
4431         #
4432         #  @return New GEOM.GEOM_Object, containing the created solid
4433         #
4434         #  @ref tui_creation_thickness "Example"
4435         @ManageTransactions("PrimOp")
4436         def MakeThickSolid(self, theShape, theThickness,
4437                            theFacesIDs=[], theInside=False, theName=None):
4438             """
4439             Make a thick solid from a shape. If the input is a surface shape
4440             (face or shell) the result is a thick solid. If an input shape is
4441             a solid the result is a hollowed solid with removed faces.
4442
4443             Parameters:
4444                  theShape Face or Shell to get thick solid or solid to get
4445                           hollowed solid.
4446                  theThickness Thickness of the resulting solid
4447                  theFacesIDs the list of face IDs to be removed from the
4448                           result. It is ignored if theShape is a face or a
4449                           shell. It is empty by default. 
4450                  theInside If true the thickness is applied towards inside
4451                  theName Object name; when specified, this parameter is used
4452                          for result publication in the study. Otherwise, if automatic
4453                          publication is switched on, default value is used for result name.
4454
4455             Returns:
4456                 New GEOM.GEOM_Object, containing the created solid
4457             """
4458             # Example: see GEOM_TestAll.py
4459             theThickness,Parameters = ParseParameters(theThickness)
4460             anObj = self.PrimOp.MakeThickening(theShape, theFacesIDs,
4461                                                theThickness, True, theInside)
4462             RaiseIfFailed("MakeThickSolid", self.PrimOp)
4463             anObj.SetParameters(Parameters)
4464             self._autoPublish(anObj, theName, "thickSolid")
4465             return anObj
4466
4467
4468         ## Modifies a shape to make it a thick solid. If the input is a surface
4469         #  shape (face or shell) the result is a thick solid. If an input shape
4470         #  is a solid the result is a hollowed solid with removed faces.
4471         #  @param theShape Face or Shell to get thick solid or solid to get
4472         #         hollowed solid.
4473         #  @param theThickness Thickness of the resulting solid
4474         #  @param theFacesIDs the list of face IDs to be removed from the
4475         #         result. It is ignored if \a theShape is a face or a shell.
4476         #         It is empty by default. 
4477         #  @param theInside If true the thickness is applied towards inside
4478         #
4479         #  @return The modified shape
4480         #
4481         #  @ref tui_creation_thickness "Example"
4482         @ManageTransactions("PrimOp")
4483         def Thicken(self, theShape, theThickness, theFacesIDs=[], theInside=False):
4484             """
4485             Modifies a shape to make it a thick solid. If the input is a
4486             surface shape (face or shell) the result is a thick solid. If
4487             an input shape is a solid the result is a hollowed solid with
4488             removed faces.
4489
4490             Parameters:
4491                 theShape Face or Shell to get thick solid or solid to get
4492                          hollowed solid.
4493                 theThickness Thickness of the resulting solid
4494                 theFacesIDs the list of face IDs to be removed from the
4495                          result. It is ignored if \a theShape is a face or
4496                          a shell. It is empty by default. 
4497                 theInside If true the thickness is applied towards inside
4498
4499             Returns:
4500                 The modified shape
4501             """
4502             # Example: see GEOM_TestAll.py
4503             theThickness,Parameters = ParseParameters(theThickness)
4504             anObj = self.PrimOp.MakeThickening(theShape, theFacesIDs,
4505                                                theThickness, False, theInside)
4506             RaiseIfFailed("Thicken", self.PrimOp)
4507             anObj.SetParameters(Parameters)
4508             return anObj
4509
4510         ## Build a middle path of a pipe-like shape.
4511         #  The path shape can be a wire or an edge.
4512         #  @param theShape It can be closed or unclosed pipe-like shell
4513         #                  or a pipe-like solid.
4514         #  @param theBase1, theBase2 Two bases of the supposed pipe. This
4515         #                            should be wires or faces of theShape.
4516         #  @param 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         #  @note It is not assumed that exact or approximate copy of theShape
4521         #        can be obtained by applying existing Pipe operation on the
4522         #        resulting "Path" wire taking theBase1 as the base - it is not
4523         #        always possible; though in some particular cases it might work
4524         #        it is not guaranteed. Thus, RestorePath function should not be
4525         #        considered as an exact reverse operation of the Pipe.
4526         #
4527         #  @return New GEOM.GEOM_Object, containing an edge or wire that represent
4528         #                                source pipe's "path".
4529         #
4530         #  @ref tui_creation_pipe_path "Example"
4531         @ManageTransactions("PrimOp")
4532         def RestorePath (self, theShape, theBase1, theBase2, theName=None):
4533             """
4534             Build a middle path of a pipe-like shape.
4535             The path shape can be a wire or an edge.
4536
4537             Parameters:
4538                 theShape It can be closed or unclosed pipe-like shell
4539                          or a pipe-like solid.
4540                 theBase1, theBase2 Two bases of the supposed pipe. This
4541                                    should be wires or faces of theShape.
4542                 theName Object name; when specified, this parameter is used
4543                         for result publication in the study. Otherwise, if automatic
4544                         publication is switched on, default value is used for result name.
4545
4546             Returns:
4547                 New GEOM_Object, containing an edge or wire that represent
4548                                  source pipe's path.
4549             """
4550             anObj = self.PrimOp.RestorePath(theShape, theBase1, theBase2)
4551             RaiseIfFailed("RestorePath", self.PrimOp)
4552             self._autoPublish(anObj, theName, "path")
4553             return anObj
4554
4555         ## Build a middle path of a pipe-like shape.
4556         #  The path shape can be a wire or an edge.
4557         #  @param theShape It can be closed or unclosed pipe-like shell
4558         #                  or a pipe-like solid.
4559         #  @param listEdges1, listEdges2 Two bases of the supposed pipe. This
4560         #                                should be lists of edges of theShape.
4561         #  @param theName Object name; when specified, this parameter is used
4562         #         for result publication in the study. Otherwise, if automatic
4563         #         publication is switched on, default value is used for result name.
4564         #
4565         #  @note It is not assumed that exact or approximate copy of theShape
4566         #        can be obtained by applying existing Pipe operation on the
4567         #        resulting "Path" wire taking theBase1 as the base - it is not
4568         #        always possible; though in some particular cases it might work
4569         #        it is not guaranteed. Thus, RestorePath function should not be
4570         #        considered as an exact reverse operation of the Pipe.
4571         #
4572         #  @return New GEOM.GEOM_Object, containing an edge or wire that represent
4573         #                                source pipe's "path".
4574         #
4575         #  @ref tui_creation_pipe_path "Example"
4576         @ManageTransactions("PrimOp")
4577         def RestorePathEdges (self, theShape, listEdges1, listEdges2, theName=None):
4578             """
4579             Build a middle path of a pipe-like shape.
4580             The path shape can be a wire or an edge.
4581
4582             Parameters:
4583                 theShape It can be closed or unclosed pipe-like shell
4584                          or a pipe-like solid.
4585                 listEdges1, listEdges2 Two bases of the supposed pipe. This
4586                                        should be lists of edges of theShape.
4587                 theName Object name; when specified, this parameter is used
4588                         for result publication in the study. Otherwise, if automatic
4589                         publication is switched on, default value is used for result name.
4590
4591             Returns:
4592                 New GEOM_Object, containing an edge or wire that represent
4593                                  source pipe's path.
4594             """
4595             anObj = self.PrimOp.RestorePathEdges(theShape, listEdges1, listEdges2)
4596             RaiseIfFailed("RestorePath", self.PrimOp)
4597             self._autoPublish(anObj, theName, "path")
4598             return anObj
4599
4600         # end of l3_complex
4601         ## @}
4602
4603         ## @addtogroup l3_basic_go
4604         ## @{
4605
4606         ## Create a linear edge with specified ends.
4607         #  @param thePnt1 Point for the first end of edge.
4608         #  @param thePnt2 Point for the second end of edge.
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 MakeEdge(self, thePnt1, thePnt2, theName=None):
4618             """
4619             Create a linear edge with specified ends.
4620
4621             Parameters:
4622                 thePnt1 Point for the first end of edge.
4623                 thePnt2 Point for the second end of edge.
4624                 theName Object name; when specified, this parameter is used
4625                         for result publication in the study. Otherwise, if automatic
4626                         publication is switched on, default value is used for result name.
4627
4628             Returns:
4629                 New GEOM.GEOM_Object, containing the created edge.
4630             """
4631             # Example: see GEOM_TestAll.py
4632             anObj = self.ShapesOp.MakeEdge(thePnt1, thePnt2)
4633             RaiseIfFailed("MakeEdge", self.ShapesOp)
4634             self._autoPublish(anObj, theName, "edge")
4635             return anObj
4636
4637         ## Create a new edge, corresponding to the given length on the given curve.
4638         #  @param theRefCurve The referenced curve (edge).
4639         #  @param theLength Length on the referenced curve. It can be negative.
4640         #  @param theStartPoint Any point can be selected for it, the new edge will begin
4641         #                       at the end of \a theRefCurve, close to the selected point.
4642         #                       If None, start from the first point of \a theRefCurve.
4643         #  @param theName Object name; when specified, this parameter is used
4644         #         for result publication in the study. Otherwise, if automatic
4645         #         publication is switched on, default value is used for result name.
4646         #
4647         #  @return New GEOM.GEOM_Object, containing the created edge.
4648         #
4649         #  @ref tui_creation_edge "Example"
4650         @ManageTransactions("ShapesOp")
4651         def MakeEdgeOnCurveByLength(self, theRefCurve, theLength, theStartPoint = None, theName=None):
4652             """
4653             Create a new edge, corresponding to the given length on the given curve.
4654
4655             Parameters:
4656                 theRefCurve The referenced curve (edge).
4657                 theLength Length on the referenced curve. It can be negative.
4658                 theStartPoint Any point can be selected for it, the new edge will begin
4659                               at the end of theRefCurve, close to the selected point.
4660                               If None, start from the first point of theRefCurve.
4661                 theName Object name; when specified, this parameter is used
4662                         for result publication in the study. Otherwise, if automatic
4663                         publication is switched on, default value is used for result name.
4664
4665             Returns:
4666                 New GEOM.GEOM_Object, containing the created edge.
4667             """
4668             # Example: see GEOM_TestAll.py
4669             theLength, Parameters = ParseParameters(theLength)
4670             anObj = self.ShapesOp.MakeEdgeOnCurveByLength(theRefCurve, theLength, theStartPoint)
4671             RaiseIfFailed("MakeEdgeOnCurveByLength", self.ShapesOp)
4672             anObj.SetParameters(Parameters)
4673             self._autoPublish(anObj, theName, "edge")
4674             return anObj
4675
4676         ## Create an edge from specified wire.
4677         #  @param theWire source Wire
4678         #  @param theLinearTolerance linear tolerance value (default = 1e-07)
4679         #  @param theAngularTolerance angular tolerance value (default = 1e-12)
4680         #  @param theName Object name; when specified, this parameter is used
4681         #         for result publication in the study. Otherwise, if automatic
4682         #         publication is switched on, default value is used for result name.
4683         #
4684         #  @return New GEOM.GEOM_Object, containing the created edge.
4685         #
4686         #  @ref tui_creation_edge "Example"
4687         @ManageTransactions("ShapesOp")
4688         def MakeEdgeWire(self, theWire, theLinearTolerance = 1e-07, theAngularTolerance = 1e-12, theName=None):
4689             """
4690             Create an edge from specified wire.
4691
4692             Parameters:
4693                 theWire source Wire
4694                 theLinearTolerance linear tolerance value (default = 1e-07)
4695                 theAngularTolerance angular tolerance value (default = 1e-12)
4696                 theName Object name; when specified, this parameter is used
4697                         for result publication in the study. Otherwise, if automatic
4698                         publication is switched on, default value is used for result name.
4699
4700             Returns:
4701                 New GEOM.GEOM_Object, containing the created edge.
4702             """
4703             # Example: see GEOM_TestAll.py
4704             anObj = self.ShapesOp.MakeEdgeWire(theWire, theLinearTolerance, theAngularTolerance)
4705             RaiseIfFailed("MakeEdgeWire", self.ShapesOp)
4706             self._autoPublish(anObj, theName, "edge")
4707             return anObj
4708
4709         ## Create a wire from the set of edges and wires.
4710         #  @param theEdgesAndWires List of edges and/or wires.
4711         #  @param theTolerance Maximum distance between vertices, that will be merged.
4712         #                      Values less than 1e-07 are equivalent to 1e-07 (Precision::Confusion())
4713         #  @param theName Object name; when specified, this parameter is used
4714         #         for result publication in the study. Otherwise, if automatic
4715         #         publication is switched on, default value is used for result name.
4716         #
4717         #  @return New GEOM.GEOM_Object, containing the created wire.
4718         #
4719         #  @ref tui_creation_wire "Example"
4720         @ManageTransactions("ShapesOp")
4721         def MakeWire(self, theEdgesAndWires, theTolerance = 1e-07, theName=None):
4722             """
4723             Create a wire from the set of edges and wires.
4724
4725             Parameters:
4726                 theEdgesAndWires List of edges and/or wires.
4727                 theTolerance Maximum distance between vertices, that will be merged.
4728                              Values less than 1e-07 are equivalent to 1e-07 (Precision::Confusion()).
4729                 theName Object name; when specified, this parameter is used
4730                         for result publication in the study. Otherwise, if automatic
4731                         publication is switched on, default value is used for result name.
4732
4733             Returns:
4734                 New GEOM.GEOM_Object, containing the created wire.
4735             """
4736             # Example: see GEOM_TestAll.py
4737             anObj = self.ShapesOp.MakeWire(theEdgesAndWires, theTolerance)
4738             RaiseIfFailed("MakeWire", self.ShapesOp)
4739             self._autoPublish(anObj, theName, "wire")
4740             return anObj
4741
4742         ## Create a face on the given wire.
4743         #  @param theWire closed Wire or Edge to build the face on.
4744         #  @param isPlanarWanted If TRUE, the algorithm tries to build a planar face.
4745         #                        If the tolerance of the obtained planar face is less
4746         #                        than 1e-06, this face will be returned, otherwise the
4747         #                        algorithm tries to build any suitable face on the given
4748         #                        wire and prints a warning message.
4749         #  @param theName Object name; when specified, this parameter is used
4750         #         for result publication in the study. Otherwise, if automatic
4751         #         publication is switched on, default value is used for result name.
4752         #
4753         #  @return New GEOM.GEOM_Object, containing the created face (compound of faces).
4754         #
4755         #  @ref tui_creation_face "Example"
4756         @ManageTransactions("ShapesOp")
4757         def MakeFace(self, theWire, isPlanarWanted, theName=None):
4758             """
4759             Create a face on the given wire.
4760
4761             Parameters:
4762                 theWire closed Wire or Edge to build the face on.
4763                 isPlanarWanted If TRUE, the algorithm tries to build a planar face.
4764                                If the tolerance of the obtained planar face is less
4765                                than 1e-06, this face will be returned, otherwise the
4766                                algorithm tries to build any suitable face on the given
4767                                wire and prints a warning message.
4768                 theName Object name; when specified, this parameter is used
4769                         for result publication in the study. Otherwise, if automatic
4770                         publication is switched on, default value is used for result name.
4771
4772             Returns:
4773                 New GEOM.GEOM_Object, containing the created face (compound of faces).
4774             """
4775             # Example: see GEOM_TestAll.py
4776             anObj = self.ShapesOp.MakeFace(theWire, isPlanarWanted)
4777             if isPlanarWanted and anObj is not None and self.ShapesOp.GetErrorCode() == "MAKE_FACE_TOLERANCE_TOO_BIG":
4778                 print("WARNING: Cannot build a planar face: required tolerance is too big. Non-planar face is built.")
4779             else:
4780                 RaiseIfFailed("MakeFace", self.ShapesOp)
4781             self._autoPublish(anObj, theName, "face")
4782             return anObj
4783
4784         ## Create a face on the given wires set.
4785         #  @param theWires List of closed wires or edges to build the face on.
4786         #  @param isPlanarWanted If TRUE, the algorithm tries to build a planar face.
4787         #                        If the tolerance of the obtained planar face is less
4788         #                        than 1e-06, this face will be returned, otherwise the
4789         #                        algorithm tries to build any suitable face on the given
4790         #                        wire and prints a warning message.
4791         #  @param theName Object name; when specified, this parameter is used
4792         #         for result publication in the study. Otherwise, if automatic
4793         #         publication is switched on, default value is used for result name.
4794         #
4795         #  @return New GEOM.GEOM_Object, containing the created face (compound of faces).
4796         #
4797         #  @ref tui_creation_face "Example"
4798         @ManageTransactions("ShapesOp")
4799         def MakeFaceWires(self, theWires, isPlanarWanted, theName=None):
4800             """
4801             Create a face on the given wires set.
4802
4803             Parameters:
4804                 theWires List of closed wires or edges to build the face on.
4805                 isPlanarWanted If TRUE, the algorithm tries to build a planar face.
4806                                If the tolerance of the obtained planar face is less
4807                                than 1e-06, this face will be returned, otherwise the
4808                                algorithm tries to build any suitable face on the given
4809                                wire and prints a warning message.
4810                 theName Object name; when specified, this parameter is used
4811                         for result publication in the study. Otherwise, if automatic
4812                         publication is switched on, default value is used for result name.
4813
4814             Returns:
4815                 New GEOM.GEOM_Object, containing the created face (compound of faces).
4816             """
4817             # Example: see GEOM_TestAll.py
4818             anObj = self.ShapesOp.MakeFaceWires(ToList(theWires), isPlanarWanted)
4819             if isPlanarWanted and anObj is not None and self.ShapesOp.GetErrorCode() == "MAKE_FACE_TOLERANCE_TOO_BIG":
4820                 print("WARNING: Cannot build a planar face: required tolerance is too big. Non-planar face is built.")
4821             else:
4822                 RaiseIfFailed("MakeFaceWires", self.ShapesOp)
4823             self._autoPublish(anObj, theName, "face")
4824             return anObj
4825
4826         ## See MakeFaceWires() method for details.
4827         #
4828         #  @ref tui_creation_face "Example 1"
4829         #  \n @ref swig_MakeFaces  "Example 2"
4830         def MakeFaces(self, theWires, isPlanarWanted, theName=None):
4831             """
4832             See geompy.MakeFaceWires() method for details.
4833             """
4834             # Example: see GEOM_TestOthers.py
4835             # note: auto-publishing is done in self.MakeFaceWires()
4836             anObj = self.MakeFaceWires(theWires, isPlanarWanted, theName)
4837             return anObj
4838
4839         ## Create a face based on a surface from given face bounded
4840         #  by given wire.
4841         #  @param theFace the face whose surface is used to create a new face.
4842         #  @param theWire the wire that will bound a new face.
4843         #  @param theName Object name; when specified, this parameter is used
4844         #         for result publication in the study. Otherwise, if automatic
4845         #         publication is switched on, default value is used for result name.
4846         #
4847         #  @return New GEOM.GEOM_Object, containing the created face.
4848         #
4849         #  @ref tui_creation_face "Example"
4850         @ManageTransactions("ShapesOp")
4851         def MakeFaceFromSurface(self, theFace, theWire, theName=None):
4852             """
4853             Create a face based on a surface from given face bounded
4854             by given wire.
4855
4856             Parameters:
4857                 theFace the face whose surface is used to create a new face.
4858                 theWire the wire that will bound a new face.
4859                 theName Object name; when specified, this parameter is used
4860                         for result publication in the study. Otherwise, if automatic
4861                         publication is switched on, default value is used for result name.
4862
4863             Returns:
4864                 New GEOM.GEOM_Object, containing the created face.
4865             """
4866             # Example: see GEOM_TestAll.py
4867             anObj = self.ShapesOp.MakeFaceFromSurface(theFace, theWire)
4868             RaiseIfFailed("MakeFaceFromSurface", self.ShapesOp)
4869             self._autoPublish(anObj, theName, "face")
4870             return anObj
4871           
4872         ## Create a face from a set of edges with the given constraints.
4873         #  @param theConstraints List of edges and constraint faces (as a sequence of a Edge + Face couples):
4874         #         - edges should form a closed wire;
4875         #         - for each edge, constraint face is optional: if a constraint face is missing
4876         #           for some edge, this means that there no constraint associated with this edge.
4877         #  @param theName Object name; when specified, this parameter is used
4878         #         for result publication in the study. Otherwise, if automatic
4879         #         publication is switched on, default value is used for result name.
4880         # 
4881         # @return New GEOM.GEOM_Object, containing the created face.
4882         # 
4883         # @ref tui_creation_face "Example"
4884         @ManageTransactions("ShapesOp")
4885         def MakeFaceWithConstraints(self, theConstraints, theName=None):
4886             """
4887             Create a face from a set of edges with the given constraints.
4888
4889             Parameters:
4890                 theConstraints List of edges and constraint faces (as a sequence of a Edge + Face couples):
4891                         - edges should form a closed wire;
4892                         - for each edge, constraint face is optional: if a constraint face is missing
4893                           for some edge, this means that there no constraint associated with this edge.
4894                 theName Object name; when specified, this parameter is used
4895                         for result publication in the study. Otherwise, if automatic
4896                         publication is switched on, default value is used for result name.
4897
4898             Returns:
4899                 New GEOM.GEOM_Object, containing the created face.
4900             """
4901             # Example: see GEOM_TestAll.py
4902             anObj = self.ShapesOp.MakeFaceWithConstraints(theConstraints)
4903             if anObj is None:
4904                 RaiseIfFailed("MakeFaceWithConstraints", self.ShapesOp)
4905             self._autoPublish(anObj, theName, "face")
4906             return anObj
4907
4908         ## Create a shell from the set of faces, shells and/or compounds of faces.
4909         #  @param theFacesAndShells List of faces, shells and/or compounds of faces.
4910         #  @param theName Object name; when specified, this parameter is used
4911         #         for result publication in the study. Otherwise, if automatic
4912         #         publication is switched on, default value is used for result name.
4913         #
4914         #  @return New GEOM.GEOM_Object, containing the created shell (compound of shells).
4915         #
4916         #  @ref tui_creation_shell "Example"
4917         @ManageTransactions("ShapesOp")
4918         def MakeShell(self, theFacesAndShells, theName=None):
4919             """
4920             Create a shell from the set of faces and shells.
4921
4922             Parameters:
4923                 theFacesAndShells List of faces and/or shells.
4924                 theName Object name; when specified, this parameter is used
4925                         for result publication in the study. Otherwise, if automatic
4926                         publication is switched on, default value is used for result name.
4927
4928             Returns:
4929                 New GEOM.GEOM_Object, containing the created shell (compound of shells).
4930             """
4931             # Example: see GEOM_TestAll.py
4932             anObj = self.ShapesOp.MakeShell( ToList( theFacesAndShells ))
4933             RaiseIfFailed("MakeShell", self.ShapesOp)
4934             self._autoPublish(anObj, theName, "shell")
4935             return anObj
4936
4937         ## Create a solid, bounded by the given shells.
4938         #  @param theShells Sequence of bounding shells.
4939         #  @param theName Object name; when specified, this parameter is used
4940         #         for result publication in the study. Otherwise, if automatic
4941         #         publication is switched on, default value is used for result name.
4942         #
4943         #  @return New GEOM.GEOM_Object, containing the created solid.
4944         #
4945         #  @ref tui_creation_solid "Example"
4946         @ManageTransactions("ShapesOp")
4947         def MakeSolid(self, theShells, theName=None):
4948             """
4949             Create a solid, bounded by the given shells.
4950
4951             Parameters:
4952                 theShells Sequence of bounding shells.
4953                 theName Object name; when specified, this parameter is used
4954                         for result publication in the study. Otherwise, if automatic
4955                         publication is switched on, default value is used for result name.
4956
4957             Returns:
4958                 New GEOM.GEOM_Object, containing the created solid.
4959             """
4960             # Example: see GEOM_TestAll.py
4961             theShells = ToList(theShells)
4962             if len(theShells) == 1:
4963                 descr = self._IsGoodForSolid(theShells[0])
4964                 #if len(descr) > 0:
4965                 #    raise RuntimeError, "MakeSolidShells : " + descr
4966                 if descr == "WRN_SHAPE_UNCLOSED":
4967                     raise RuntimeError("MakeSolidShells : Unable to create solid from unclosed shape")
4968             anObj = self.ShapesOp.MakeSolidShells(theShells)
4969             RaiseIfFailed("MakeSolidShells", self.ShapesOp)
4970             self._autoPublish(anObj, theName, "solid")
4971             return anObj
4972
4973         ## Create a compound of the given shapes.
4974         #  @param theShapes List of shapes to put in compound.
4975         #  @param theName Object name; when specified, this parameter is used
4976         #         for result publication in the study. Otherwise, if automatic
4977         #         publication is switched on, default value is used for result name.
4978         #
4979         #  @return New GEOM.GEOM_Object, containing the created compound.
4980         #
4981         #  @ref tui_creation_compound "Example"
4982         @ManageTransactions("ShapesOp")
4983         def MakeCompound(self, theShapes, theName=None):
4984             """
4985             Create a compound of the given shapes.
4986
4987             Parameters:
4988                 theShapes List of shapes to put in compound.
4989                 theName Object name; when specified, this parameter is used
4990                         for result publication in the study. Otherwise, if automatic
4991                         publication is switched on, default value is used for result name.
4992
4993             Returns:
4994                 New GEOM.GEOM_Object, containing the created compound.
4995             """
4996             # Example: see GEOM_TestAll.py
4997             anObj = self.ShapesOp.MakeCompound(ToList(theShapes))
4998             RaiseIfFailed("MakeCompound", self.ShapesOp)
4999             self._autoPublish(anObj, theName, "compound")
5000             return anObj
5001         
5002         ## Create a solid (or solids) from the set of faces and/or shells.
5003         #  @param theFacesOrShells List of faces and/or shells.
5004         #  @param isIntersect If TRUE, forces performing intersections
5005         #         between arguments; otherwise (default) intersection is not performed.
5006         #  @param theName Object name; when specified, this parameter is used
5007         #         for result publication in the study. Otherwise, if automatic
5008         #         publication is switched on, default value is used for result name.
5009         #
5010         #  @return New GEOM.GEOM_Object, containing the created solid (or compound of solids).
5011         #
5012         #  @ref tui_creation_solid_from_faces "Example"
5013         @ManageTransactions("ShapesOp")
5014         def MakeSolidFromConnectedFaces(self, theFacesOrShells, isIntersect = False, theName=None):
5015             """
5016             Create a solid (or solids) from the set of connected faces and/or shells.
5017
5018             Parameters:
5019                 theFacesOrShells List of faces and/or shells.
5020                 isIntersect If TRUE, forces performing intersections
5021                         between arguments; otherwise (default) intersection is not performed
5022                 theName Object name; when specified, this parameter is used.
5023                         for result publication in the study. Otherwise, if automatic
5024                         publication is switched on, default value is used for result name.
5025
5026             Returns:
5027                 New GEOM.GEOM_Object, containing the created solid (or compound of solids).
5028             """
5029             # Example: see GEOM_TestAll.py
5030             anObj = self.ShapesOp.MakeSolidFromConnectedFaces(theFacesOrShells, isIntersect)
5031             RaiseIfFailed("MakeSolidFromConnectedFaces", self.ShapesOp)
5032             self._autoPublish(anObj, theName, "solid")
5033             return anObj
5034
5035         # end of l3_basic_go
5036         ## @}
5037
5038         ## @addtogroup l2_measure
5039         ## @{
5040
5041         ## Gives quantity of faces in the given shape.
5042         #  @param theShape Shape to count faces of.
5043         #  @return Quantity of faces.
5044         #
5045         #  @ref swig_NumberOf "Example"
5046         @ManageTransactions("ShapesOp")
5047         def NumberOfFaces(self, theShape):
5048             """
5049             Gives quantity of faces in the given shape.
5050
5051             Parameters:
5052                 theShape Shape to count faces of.
5053
5054             Returns:
5055                 Quantity of faces.
5056             """
5057             # Example: see GEOM_TestOthers.py
5058             nb_faces = self.ShapesOp.NumberOfFaces(theShape)
5059             RaiseIfFailed("NumberOfFaces", self.ShapesOp)
5060             return nb_faces
5061
5062         ## Gives quantity of edges in the given shape.
5063         #  @param theShape Shape to count edges of.
5064         #  @return Quantity of edges.
5065         #
5066         #  @ref swig_NumberOf "Example"
5067         @ManageTransactions("ShapesOp")
5068         def NumberOfEdges(self, theShape):
5069             """
5070             Gives quantity of edges in the given shape.
5071
5072             Parameters:
5073                 theShape Shape to count edges of.
5074
5075             Returns:
5076                 Quantity of edges.
5077             """
5078             # Example: see GEOM_TestOthers.py
5079             nb_edges = self.ShapesOp.NumberOfEdges(theShape)
5080             RaiseIfFailed("NumberOfEdges", self.ShapesOp)
5081             return nb_edges
5082
5083         ## Gives quantity of sub-shapes of type theShapeType in the given shape.
5084         #  @param theShape Shape to count sub-shapes of.
5085         #  @param theShapeType Type of sub-shapes to count (see ShapeType())
5086         #  @return Quantity of sub-shapes of given type.
5087         #
5088         #  @ref swig_NumberOf "Example"
5089         @ManageTransactions("ShapesOp")
5090         def NumberOfSubShapes(self, theShape, theShapeType):
5091             """
5092             Gives quantity of sub-shapes of type theShapeType in the given shape.
5093
5094             Parameters:
5095                 theShape Shape to count sub-shapes of.
5096                 theShapeType Type of sub-shapes to count (see geompy.ShapeType)
5097
5098             Returns:
5099                 Quantity of sub-shapes of given type.
5100             """
5101             # Example: see GEOM_TestOthers.py
5102             nb_ss = self.ShapesOp.NumberOfSubShapes(theShape, theShapeType)
5103             RaiseIfFailed("NumberOfSubShapes", self.ShapesOp)
5104             return nb_ss
5105
5106         ## Gives quantity of solids in the given shape.
5107         #  @param theShape Shape to count solids in.
5108         #  @return Quantity of solids.
5109         #
5110         #  @ref swig_NumberOf "Example"
5111         @ManageTransactions("ShapesOp")
5112         def NumberOfSolids(self, theShape):
5113             """
5114             Gives quantity of solids in the given shape.
5115
5116             Parameters:
5117                 theShape Shape to count solids in.
5118
5119             Returns:
5120                 Quantity of solids.
5121             """
5122             # Example: see GEOM_TestOthers.py
5123             nb_solids = self.ShapesOp.NumberOfSubShapes(theShape, self.ShapeType["SOLID"])
5124             RaiseIfFailed("NumberOfSolids", self.ShapesOp)
5125             return nb_solids
5126
5127         # end of l2_measure
5128         ## @}
5129
5130         ## @addtogroup l3_healing
5131         ## @{
5132
5133         ## Reverses an orientation the given shape.
5134         #  @param theShape Shape to be reversed.
5135         #  @param theName Object name; when specified, this parameter is used
5136         #         for result publication in the study. Otherwise, if automatic
5137         #         publication is switched on, default value is used for result name.
5138         #
5139         #  @return The reversed copy of theShape.
5140         #
5141         #  @ref swig_ChangeOrientation "Example"
5142         @ManageTransactions("ShapesOp")
5143         def ChangeOrientation(self, theShape, theName=None):
5144             """
5145             Reverses an orientation the given shape.
5146
5147             Parameters:
5148                 theShape Shape to be reversed.
5149                 theName Object name; when specified, this parameter is used
5150                         for result publication in the study. Otherwise, if automatic
5151                         publication is switched on, default value is used for result name.
5152
5153             Returns:
5154                 The reversed copy of theShape.
5155             """
5156             # Example: see GEOM_TestAll.py
5157             anObj = self.ShapesOp.ChangeOrientation(theShape)
5158             RaiseIfFailed("ChangeOrientation", self.ShapesOp)
5159             self._autoPublish(anObj, theName, "reversed")
5160             return anObj
5161
5162         ## See ChangeOrientation() method for details.
5163         #
5164         #  @ref swig_OrientationChange "Example"
5165         def OrientationChange(self, theShape, theName=None):
5166             """
5167             See geompy.ChangeOrientation method for details.
5168             """
5169             # Example: see GEOM_TestOthers.py
5170             # note: auto-publishing is done in self.ChangeOrientation()
5171             anObj = self.ChangeOrientation(theShape, theName)
5172             return anObj
5173
5174         # end of l3_healing
5175         ## @}
5176
5177         ## @addtogroup l4_obtain
5178         ## @{
5179
5180         ## Retrieve all free faces from the given shape.
5181         #  Free face is a face, which is not shared between two shells of the shape.
5182         #  @param theShape Shape to find free faces in.
5183         #  @return List of IDs of all free faces, contained in theShape.
5184         #
5185         #  @ref tui_free_faces_page "Example"
5186         @ManageTransactions("ShapesOp")
5187         def GetFreeFacesIDs(self,theShape):
5188             """
5189             Retrieve all free faces from the given shape.
5190             Free face is a face, which is not shared between two shells of the shape.
5191
5192             Parameters:
5193                 theShape Shape to find free faces in.
5194
5195             Returns:
5196                 List of IDs of all free faces, contained in theShape.
5197             """
5198             # Example: see GEOM_TestOthers.py
5199             anIDs = self.ShapesOp.GetFreeFacesIDs(theShape)
5200             RaiseIfFailed("GetFreeFacesIDs", self.ShapesOp)
5201             return anIDs
5202
5203         ## Get all sub-shapes of theShape1 of the given type, shared with theShape2.
5204         #  @param theShape1 Shape to find sub-shapes in.
5205         #  @param theShape2 Shape to find shared sub-shapes with.
5206         #  @param theShapeType Type of sub-shapes to be retrieved.
5207         #  @param theName Object name; when specified, this parameter is used
5208         #         for result publication in the study. Otherwise, if automatic
5209         #         publication is switched on, default value is used for result name.
5210         #
5211         #  @return List of sub-shapes of theShape1, shared with theShape2.
5212         #
5213         #  @ref swig_GetSharedShapes "Example"
5214         @ManageTransactions("ShapesOp")
5215         def GetSharedShapes(self, theShape1, theShape2, theShapeType, theName=None):
5216             """
5217             Get all sub-shapes of theShape1 of the given type, shared with theShape2.
5218
5219             Parameters:
5220                 theShape1 Shape to find sub-shapes in.
5221                 theShape2 Shape to find shared sub-shapes with.
5222                 theShapeType Type of sub-shapes to be retrieved.
5223                 theName Object name; when specified, this parameter is used
5224                         for result publication in the study. Otherwise, if automatic
5225                         publication is switched on, default value is used for result name.
5226
5227             Returns:
5228                 List of sub-shapes of theShape1, shared with theShape2.
5229             """
5230             # Example: see GEOM_TestOthers.py
5231             aList = self.ShapesOp.GetSharedShapes(theShape1, theShape2, theShapeType)
5232             RaiseIfFailed("GetSharedShapes", self.ShapesOp)
5233             self._autoPublish(aList, theName, "shared")
5234             return aList
5235
5236         ## Get sub-shapes, shared by input shapes.
5237         #  @param theShapes Either a list or compound of shapes to find common sub-shapes of.
5238         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType()).
5239         #  @param theMultiShare Specifies what type of shares should be checked:
5240         #         - @c True (default): search sub-shapes from 1st input shape shared with all other input shapes;
5241         #         - @c False: causes to search sub-shapes shared between couples of input shapes.
5242         #  @param theName Object name; when specified, this parameter is used
5243         #         for result publication in the study. Otherwise, if automatic
5244         #         publication is switched on, default value is used for result name.
5245         #
5246         #  @note If @a theShapes contains single compound, the shares between all possible couples of 
5247         #        its top-level shapes are returned; otherwise, only shares between 1st input shape
5248         #        and all rest input shapes are returned.
5249         #
5250         #  @return List of all found sub-shapes.
5251         #
5252         #  Examples:
5253         #  - @ref tui_shared_shapes "Example 1"
5254         #  - @ref swig_GetSharedShapes "Example 2"
5255         @ManageTransactions("ShapesOp")
5256         def GetSharedShapesMulti(self, theShapes, theShapeType, theMultiShare=True, theName=None):
5257             """
5258             Get sub-shapes, shared by input shapes.
5259
5260             Parameters:
5261                 theShapes Either a list or compound of shapes to find common sub-shapes of.
5262                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType).
5263                 theMultiShare Specifies what type of shares should be checked:
5264                   - True (default): search sub-shapes from 1st input shape shared with all other input shapes;
5265                   - False: causes to search sub-shapes shared between couples of input shapes.
5266                 theName Object name; when specified, this parameter is used
5267                         for result publication in the study. Otherwise, if automatic
5268                         publication is switched on, default value is used for result name.
5269
5270             Note: if theShapes contains single compound, the shares between all possible couples of 
5271                   its top-level shapes are returned; otherwise, only shares between 1st input shape
5272                   and all rest input shapes are returned.
5273
5274             Returns:
5275                 List of all found sub-shapes.
5276             """
5277             # Example: see GEOM_TestOthers.py
5278             aList = self.ShapesOp.GetSharedShapesMulti(ToList(theShapes), theShapeType, theMultiShare)
5279             RaiseIfFailed("GetSharedShapesMulti", self.ShapesOp)
5280             self._autoPublish(aList, theName, "shared")
5281             return aList
5282
5283         ## Find in <VAR>theShape</VAR> all sub-shapes of type <VAR>theShapeType</VAR>,
5284         #  situated relatively the specified plane by the certain way,
5285         #  defined through <VAR>theState</VAR> parameter.
5286         #  @param theShape Shape to find sub-shapes of.
5287         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5288         #  @param theAx1 Vector (or line, or linear edge), specifying normal
5289         #                direction and location of the plane to find shapes on.
5290         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5291         #  @param theName Object name; when specified, this parameter is used
5292         #         for result publication in the study. Otherwise, if automatic
5293         #         publication is switched on, default value is used for result name.
5294         #
5295         #  @return List of all found sub-shapes.
5296         #
5297         #  @ref swig_GetShapesOnPlane "Example"
5298         @ManageTransactions("ShapesOp")
5299         def GetShapesOnPlane(self, theShape, theShapeType, theAx1, theState, theName=None):
5300             """
5301             Find in theShape all sub-shapes of type theShapeType,
5302             situated relatively the specified plane by the certain way,
5303             defined through theState parameter.
5304
5305             Parameters:
5306                 theShape Shape to find sub-shapes of.
5307                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5308                 theAx1 Vector (or line, or linear edge), specifying normal
5309                        direction and location of the plane to find shapes on.
5310                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5311                 theName Object name; when specified, this parameter is used
5312                         for result publication in the study. Otherwise, if automatic
5313                         publication is switched on, default value is used for result name.
5314
5315             Returns:
5316                 List of all found sub-shapes.
5317             """
5318             # Example: see GEOM_TestOthers.py
5319             aList = self.ShapesOp.GetShapesOnPlane(theShape, theShapeType, theAx1, theState)
5320             RaiseIfFailed("GetShapesOnPlane", self.ShapesOp)
5321             self._autoPublish(aList, theName, "shapeOnPlane")
5322             return aList
5323
5324         ## Find in <VAR>theShape</VAR> all sub-shapes of type <VAR>theShapeType</VAR>,
5325         #  situated relatively the specified plane by the certain way,
5326         #  defined through <VAR>theState</VAR> parameter.
5327         #  @param theShape Shape to find sub-shapes of.
5328         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5329         #  @param theAx1 Vector (or line, or linear edge), specifying normal
5330         #                direction and location of the plane to find shapes on.
5331         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5332         #
5333         #  @return List of all found sub-shapes indices.
5334         #
5335         #  @ref swig_GetShapesOnPlaneIDs "Example"
5336         @ManageTransactions("ShapesOp")
5337         def GetShapesOnPlaneIDs(self, theShape, theShapeType, theAx1, theState):
5338             """
5339             Find in theShape all sub-shapes of type theShapeType,
5340             situated relatively the specified plane by the certain way,
5341             defined through theState parameter.
5342
5343             Parameters:
5344                 theShape Shape to find sub-shapes of.
5345                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5346                 theAx1 Vector (or line, or linear edge), specifying normal
5347                        direction and location of the plane to find shapes on.
5348                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5349
5350             Returns:
5351                 List of all found sub-shapes indices.
5352             """
5353             # Example: see GEOM_TestOthers.py
5354             aList = self.ShapesOp.GetShapesOnPlaneIDs(theShape, theShapeType, theAx1, theState)
5355             RaiseIfFailed("GetShapesOnPlaneIDs", self.ShapesOp)
5356             return aList
5357
5358         ## Find in <VAR>theShape</VAR> all sub-shapes of type <VAR>theShapeType</VAR>,
5359         #  situated relatively the specified plane by the certain way,
5360         #  defined through <VAR>theState</VAR> parameter.
5361         #  @param theShape Shape to find sub-shapes of.
5362         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5363         #  @param theAx1 Vector (or line, or linear edge), specifying normal
5364         #                direction of the plane to find shapes on.
5365         #  @param thePnt Point specifying location of the plane to find shapes on.
5366         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5367         #  @param theName Object name; when specified, this parameter is used
5368         #         for result publication in the study. Otherwise, if automatic
5369         #         publication is switched on, default value is used for result name.
5370         #
5371         #  @return List of all found sub-shapes.
5372         #
5373         #  @ref swig_GetShapesOnPlaneWithLocation "Example"
5374         @ManageTransactions("ShapesOp")
5375         def GetShapesOnPlaneWithLocation(self, theShape, theShapeType, theAx1, thePnt, theState, theName=None):
5376             """
5377             Find in theShape all sub-shapes of type theShapeType,
5378             situated relatively the specified plane by the certain way,
5379             defined through theState parameter.
5380
5381             Parameters:
5382                 theShape Shape to find sub-shapes of.
5383                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5384                 theAx1 Vector (or line, or linear edge), specifying normal
5385                        direction and location of the plane to find shapes on.
5386                 thePnt Point specifying location of the plane to find shapes on.
5387                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5388                 theName Object name; when specified, this parameter is used
5389                         for result publication in the study. Otherwise, if automatic
5390                         publication is switched on, default value is used for result name.
5391
5392             Returns:
5393                 List of all found sub-shapes.
5394             """
5395             # Example: see GEOM_TestOthers.py
5396             aList = self.ShapesOp.GetShapesOnPlaneWithLocation(theShape, theShapeType,
5397                                                                theAx1, thePnt, theState)
5398             RaiseIfFailed("GetShapesOnPlaneWithLocation", self.ShapesOp)
5399             self._autoPublish(aList, theName, "shapeOnPlane")
5400             return aList
5401
5402         ## Find in <VAR>theShape</VAR> all sub-shapes of type <VAR>theShapeType</VAR>,
5403         #  situated relatively the specified plane by the certain way,
5404         #  defined through <VAR>theState</VAR> parameter.
5405         #  @param theShape Shape to find sub-shapes of.
5406         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5407         #  @param theAx1 Vector (or line, or linear edge), specifying normal
5408         #                direction of the plane to find shapes on.
5409         #  @param thePnt Point specifying location of the plane to find shapes on.
5410         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5411         #
5412         #  @return List of all found sub-shapes indices.
5413         #
5414         #  @ref swig_GetShapesOnPlaneWithLocationIDs "Example"
5415         @ManageTransactions("ShapesOp")
5416         def GetShapesOnPlaneWithLocationIDs(self, theShape, theShapeType, theAx1, thePnt, theState):
5417             """
5418             Find in theShape all sub-shapes of type theShapeType,
5419             situated relatively the specified plane by the certain way,
5420             defined through theState parameter.
5421
5422             Parameters:
5423                 theShape Shape to find sub-shapes of.
5424                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5425                 theAx1 Vector (or line, or linear edge), specifying normal
5426                        direction and location of the plane to find shapes on.
5427                 thePnt Point specifying location of the plane to find shapes on.
5428                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5429
5430             Returns:
5431                 List of all found sub-shapes indices.
5432             """
5433             # Example: see GEOM_TestOthers.py
5434             aList = self.ShapesOp.GetShapesOnPlaneWithLocationIDs(theShape, theShapeType,
5435                                                                   theAx1, thePnt, theState)
5436             RaiseIfFailed("GetShapesOnPlaneWithLocationIDs", self.ShapesOp)
5437             return aList
5438
5439         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
5440         #  the specified cylinder by the certain way, defined through \a theState parameter.
5441         #  @param theShape Shape to find sub-shapes of.
5442         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5443         #  @param theAxis Vector (or line, or linear edge), specifying
5444         #                 axis of the cylinder to find shapes on.
5445         #  @param theRadius Radius of the cylinder to find shapes on.
5446         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5447         #  @param theName Object name; when specified, this parameter is used
5448         #         for result publication in the study. Otherwise, if automatic
5449         #         publication is switched on, default value is used for result name.
5450         #
5451         #  @return List of all found sub-shapes.
5452         #
5453         #  @ref swig_GetShapesOnCylinder "Example"
5454         @ManageTransactions("ShapesOp")
5455         def GetShapesOnCylinder(self, theShape, theShapeType, theAxis, theRadius, theState, theName=None):
5456             """
5457             Find in theShape all sub-shapes of type theShapeType, situated relatively
5458             the specified cylinder by the certain way, defined through theState parameter.
5459
5460             Parameters:
5461                 theShape Shape to find sub-shapes of.
5462                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5463                 theAxis Vector (or line, or linear edge), specifying
5464                         axis of the cylinder to find shapes on.
5465                 theRadius Radius of the cylinder to find shapes on.
5466                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5467                 theName Object name; when specified, this parameter is used
5468                         for result publication in the study. Otherwise, if automatic
5469                         publication is switched on, default value is used for result name.
5470
5471             Returns:
5472                 List of all found sub-shapes.
5473             """
5474             # Example: see GEOM_TestOthers.py
5475             aList = self.ShapesOp.GetShapesOnCylinder(theShape, theShapeType, theAxis, theRadius, theState)
5476             RaiseIfFailed("GetShapesOnCylinder", self.ShapesOp)
5477             self._autoPublish(aList, theName, "shapeOnCylinder")
5478             return aList
5479
5480         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
5481         #  the specified cylinder by the certain way, defined through \a theState parameter.
5482         #  @param theShape Shape to find sub-shapes of.
5483         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5484         #  @param theAxis Vector (or line, or linear edge), specifying
5485         #                 axis of the cylinder to find shapes on.
5486         #  @param theRadius Radius of the cylinder to find shapes on.
5487         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5488         #
5489         #  @return List of all found sub-shapes indices.
5490         #
5491         #  @ref swig_GetShapesOnCylinderIDs "Example"
5492         @ManageTransactions("ShapesOp")
5493         def GetShapesOnCylinderIDs(self, theShape, theShapeType, theAxis, theRadius, theState):
5494             """
5495             Find in theShape all sub-shapes of type theShapeType, situated relatively
5496             the specified cylinder by the certain way, defined through theState parameter.
5497
5498             Parameters:
5499                 theShape Shape to find sub-shapes of.
5500                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5501                 theAxis Vector (or line, or linear edge), specifying
5502                         axis of the cylinder to find shapes on.
5503                 theRadius Radius of the cylinder to find shapes on.
5504                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5505
5506             Returns:
5507                 List of all found sub-shapes indices.
5508             """
5509             # Example: see GEOM_TestOthers.py
5510             aList = self.ShapesOp.GetShapesOnCylinderIDs(theShape, theShapeType, theAxis, theRadius, theState)
5511             RaiseIfFailed("GetShapesOnCylinderIDs", self.ShapesOp)
5512             return aList
5513
5514         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
5515         #  the specified cylinder by the certain way, defined through \a theState parameter.
5516         #  @param theShape Shape to find sub-shapes of.
5517         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5518         #  @param theAxis Vector (or line, or linear edge), specifying
5519         #                 axis of the cylinder to find shapes on.
5520         #  @param thePnt Point specifying location of the bottom of the cylinder.
5521         #  @param theRadius Radius of the cylinder to find shapes on.
5522         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5523         #  @param theName Object name; when specified, this parameter is used
5524         #         for result publication in the study. Otherwise, if automatic
5525         #         publication is switched on, default value is used for result name.
5526         #
5527         #  @return List of all found sub-shapes.
5528         #
5529         #  @ref swig_GetShapesOnCylinderWithLocation "Example"
5530         @ManageTransactions("ShapesOp")
5531         def GetShapesOnCylinderWithLocation(self, theShape, theShapeType, theAxis, thePnt, theRadius, theState, theName=None):
5532             """
5533             Find in theShape all sub-shapes of type theShapeType, situated relatively
5534             the specified cylinder by the certain way, defined through theState parameter.
5535
5536             Parameters:
5537                 theShape Shape to find sub-shapes of.
5538                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5539                 theAxis Vector (or line, or linear edge), specifying
5540                         axis of the cylinder to find shapes on.
5541                 theRadius Radius of the cylinder to find shapes on.
5542                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5543                 theName Object name; when specified, this parameter is used
5544                         for result publication in the study. Otherwise, if automatic
5545                         publication is switched on, default value is used for result name.
5546
5547             Returns:
5548                 List of all found sub-shapes.
5549             """
5550             # Example: see GEOM_TestOthers.py
5551             aList = self.ShapesOp.GetShapesOnCylinderWithLocation(theShape, theShapeType, theAxis, thePnt, theRadius, theState)
5552             RaiseIfFailed("GetShapesOnCylinderWithLocation", self.ShapesOp)
5553             self._autoPublish(aList, theName, "shapeOnCylinder")
5554             return aList
5555
5556         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
5557         #  the specified cylinder by the certain way, defined through \a theState parameter.
5558         #  @param theShape Shape to find sub-shapes of.
5559         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5560         #  @param theAxis Vector (or line, or linear edge), specifying
5561         #                 axis of the cylinder to find shapes on.
5562         #  @param thePnt Point specifying location of the bottom of the cylinder.
5563         #  @param theRadius Radius of the cylinder to find shapes on.
5564         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5565         #
5566         #  @return List of all found sub-shapes indices
5567         #
5568         #  @ref swig_GetShapesOnCylinderWithLocationIDs "Example"
5569         @ManageTransactions("ShapesOp")
5570         def GetShapesOnCylinderWithLocationIDs(self, theShape, theShapeType, theAxis, thePnt, theRadius, theState):
5571             """
5572             Find in theShape all sub-shapes of type theShapeType, situated relatively
5573             the specified cylinder by the certain way, defined through theState parameter.
5574
5575             Parameters:
5576                 theShape Shape to find sub-shapes of.
5577                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5578                 theAxis Vector (or line, or linear edge), specifying
5579                         axis of the cylinder to find shapes on.
5580                 theRadius Radius of the cylinder 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.GetShapesOnCylinderWithLocationIDs(theShape, theShapeType, theAxis, thePnt, theRadius, theState)
5588             RaiseIfFailed("GetShapesOnCylinderWithLocationIDs", self.ShapesOp)
5589             return aList
5590
5591         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
5592         #  the specified sphere 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 theCenter Point, specifying center of the sphere to find shapes on.
5596         #  @param theRadius Radius of the sphere to find shapes on.
5597         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5598         #  @param theName Object name; when specified, this parameter is used
5599         #         for result publication in the study. Otherwise, if automatic
5600         #         publication is switched on, default value is used for result name.
5601         #
5602         #  @return List of all found sub-shapes.
5603         #
5604         #  @ref swig_GetShapesOnSphere "Example"
5605         @ManageTransactions("ShapesOp")
5606         def GetShapesOnSphere(self, theShape, theShapeType, theCenter, theRadius, theState, theName=None):
5607             """
5608             Find in theShape all sub-shapes of type theShapeType, situated relatively
5609             the specified sphere by the certain way, defined through theState parameter.
5610
5611             Parameters:
5612                 theShape Shape to find sub-shapes of.
5613                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5614                 theCenter Point, specifying center of the sphere to find shapes on.
5615                 theRadius Radius of the sphere to find shapes on.
5616                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5617                 theName Object name; when specified, this parameter is used
5618                         for result publication in the study. Otherwise, if automatic
5619                         publication is switched on, default value is used for result name.
5620
5621             Returns:
5622                 List of all found sub-shapes.
5623             """
5624             # Example: see GEOM_TestOthers.py
5625             aList = self.ShapesOp.GetShapesOnSphere(theShape, theShapeType, theCenter, theRadius, theState)
5626             RaiseIfFailed("GetShapesOnSphere", self.ShapesOp)
5627             self._autoPublish(aList, theName, "shapeOnSphere")
5628             return aList
5629
5630         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
5631         #  the specified sphere by the certain way, defined through \a theState parameter.
5632         #  @param theShape Shape to find sub-shapes of.
5633         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5634         #  @param theCenter Point, specifying center of the sphere to find shapes on.
5635         #  @param theRadius Radius of the sphere to find shapes on.
5636         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5637         #
5638         #  @return List of all found sub-shapes indices.
5639         #
5640         #  @ref swig_GetShapesOnSphereIDs "Example"
5641         @ManageTransactions("ShapesOp")
5642         def GetShapesOnSphereIDs(self, theShape, theShapeType, theCenter, theRadius, theState):
5643             """
5644             Find in theShape all sub-shapes of type theShapeType, situated relatively
5645             the specified sphere by the certain way, defined through theState parameter.
5646
5647             Parameters:
5648                 theShape Shape to find sub-shapes of.
5649                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5650                 theCenter Point, specifying center of the sphere to find shapes on.
5651                 theRadius Radius of the sphere to find shapes on.
5652                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5653
5654             Returns:
5655                 List of all found sub-shapes indices.
5656             """
5657             # Example: see GEOM_TestOthers.py
5658             aList = self.ShapesOp.GetShapesOnSphereIDs(theShape, theShapeType, theCenter, theRadius, theState)
5659             RaiseIfFailed("GetShapesOnSphereIDs", self.ShapesOp)
5660             return aList
5661
5662         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
5663         #  the specified quadrangle by the certain way, defined through \a theState parameter.
5664         #  @param theShape Shape to find sub-shapes of.
5665         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5666         #  @param theTopLeftPoint Point, specifying top left corner of a quadrangle
5667         #  @param theTopRightPoint Point, specifying top right corner of a quadrangle
5668         #  @param theBottomLeftPoint Point, specifying bottom left corner of a quadrangle
5669         #  @param theBottomRightPoint Point, specifying bottom right corner of a quadrangle
5670         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5671         #  @param theName Object name; when specified, this parameter is used
5672         #         for result publication in the study. Otherwise, if automatic
5673         #         publication is switched on, default value is used for result name.
5674         #
5675         #  @return List of all found sub-shapes.
5676         #
5677         #  @ref swig_GetShapesOnQuadrangle "Example"
5678         @ManageTransactions("ShapesOp")
5679         def GetShapesOnQuadrangle(self, theShape, theShapeType,
5680                                   theTopLeftPoint, theTopRightPoint,
5681                                   theBottomLeftPoint, theBottomRightPoint, theState, theName=None):
5682             """
5683             Find in theShape all sub-shapes of type theShapeType, situated relatively
5684             the specified quadrangle by the certain way, defined through theState parameter.
5685
5686             Parameters:
5687                 theShape Shape to find sub-shapes of.
5688                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5689                 theTopLeftPoint Point, specifying top left corner of a quadrangle
5690                 theTopRightPoint Point, specifying top right corner of a quadrangle
5691                 theBottomLeftPoint Point, specifying bottom left corner of a quadrangle
5692                 theBottomRightPoint Point, specifying bottom right corner of a quadrangle
5693                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5694                 theName Object name; when specified, this parameter is used
5695                         for result publication in the study. Otherwise, if automatic
5696                         publication is switched on, default value is used for result name.
5697
5698             Returns:
5699                 List of all found sub-shapes.
5700             """
5701             # Example: see GEOM_TestOthers.py
5702             aList = self.ShapesOp.GetShapesOnQuadrangle(theShape, theShapeType,
5703                                                         theTopLeftPoint, theTopRightPoint,
5704                                                         theBottomLeftPoint, theBottomRightPoint, theState)
5705             RaiseIfFailed("GetShapesOnQuadrangle", self.ShapesOp)
5706             self._autoPublish(aList, theName, "shapeOnQuadrangle")
5707             return aList
5708
5709         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
5710         #  the specified quadrangle by the certain way, defined through \a theState parameter.
5711         #  @param theShape Shape to find sub-shapes of.
5712         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5713         #  @param theTopLeftPoint Point, specifying top left corner of a quadrangle
5714         #  @param theTopRightPoint Point, specifying top right corner of a quadrangle
5715         #  @param theBottomLeftPoint Point, specifying bottom left corner of a quadrangle
5716         #  @param theBottomRightPoint Point, specifying bottom right corner of a quadrangle
5717         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5718         #
5719         #  @return List of all found sub-shapes indices.
5720         #
5721         #  @ref swig_GetShapesOnQuadrangleIDs "Example"
5722         @ManageTransactions("ShapesOp")
5723         def GetShapesOnQuadrangleIDs(self, theShape, theShapeType,
5724                                      theTopLeftPoint, theTopRightPoint,
5725                                      theBottomLeftPoint, theBottomRightPoint, theState):
5726             """
5727             Find in theShape all sub-shapes of type theShapeType, situated relatively
5728             the specified quadrangle by the certain way, defined through theState parameter.
5729
5730             Parameters:
5731                 theShape Shape to find sub-shapes of.
5732                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5733                 theTopLeftPoint Point, specifying top left corner of a quadrangle
5734                 theTopRightPoint Point, specifying top right corner of a quadrangle
5735                 theBottomLeftPoint Point, specifying bottom left corner of a quadrangle
5736                 theBottomRightPoint Point, specifying bottom right corner of a quadrangle
5737                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5738
5739             Returns:
5740                 List of all found sub-shapes indices.
5741             """
5742
5743             # Example: see GEOM_TestOthers.py
5744             aList = self.ShapesOp.GetShapesOnQuadrangleIDs(theShape, theShapeType,
5745                                                            theTopLeftPoint, theTopRightPoint,
5746                                                            theBottomLeftPoint, theBottomRightPoint, theState)
5747             RaiseIfFailed("GetShapesOnQuadrangleIDs", self.ShapesOp)
5748             return aList
5749
5750         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
5751         #  the specified \a theBox by the certain way, defined through \a theState parameter.
5752         #  @param theBox Shape for relative comparing.
5753         #  @param theShape Shape to find sub-shapes of.
5754         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5755         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5756         #  @param theName Object name; when specified, this parameter is used
5757         #         for result publication in the study. Otherwise, if automatic
5758         #         publication is switched on, default value is used for result name.
5759         #
5760         #  @return List of all found sub-shapes.
5761         #
5762         #  @ref swig_GetShapesOnBox "Example"
5763         @ManageTransactions("ShapesOp")
5764         def GetShapesOnBox(self, theBox, theShape, theShapeType, theState, theName=None):
5765             """
5766             Find in theShape all sub-shapes of type theShapeType, situated relatively
5767             the specified theBox by the certain way, defined through theState parameter.
5768
5769             Parameters:
5770                 theBox Shape for relative comparing.
5771                 theShape Shape to find sub-shapes of.
5772                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5773                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5774                 theName Object name; when specified, this parameter is used
5775                         for result publication in the study. Otherwise, if automatic
5776                         publication is switched on, default value is used for result name.
5777
5778             Returns:
5779                 List of all found sub-shapes.
5780             """
5781             # Example: see GEOM_TestOthers.py
5782             aList = self.ShapesOp.GetShapesOnBox(theBox, theShape, theShapeType, theState)
5783             RaiseIfFailed("GetShapesOnBox", self.ShapesOp)
5784             self._autoPublish(aList, theName, "shapeOnBox")
5785             return aList
5786
5787         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
5788         #  the specified \a theBox by the certain way, defined through \a theState parameter.
5789         #  @param theBox Shape for relative comparing.
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         #
5794         #  @return List of all found sub-shapes indices.
5795         #
5796         #  @ref swig_GetShapesOnBoxIDs "Example"
5797         @ManageTransactions("ShapesOp")
5798         def GetShapesOnBoxIDs(self, theBox, theShape, theShapeType, theState):
5799             """
5800             Find in theShape all sub-shapes of type theShapeType, situated relatively
5801             the specified theBox by the certain way, defined through theState parameter.
5802
5803             Parameters:
5804                 theBox Shape for relative comparing.
5805                 theShape Shape to find sub-shapes of.
5806                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5807                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5808
5809             Returns:
5810                 List of all found sub-shapes indices.
5811             """
5812             # Example: see GEOM_TestOthers.py
5813             aList = self.ShapesOp.GetShapesOnBoxIDs(theBox, theShape, theShapeType, theState)
5814             RaiseIfFailed("GetShapesOnBoxIDs", self.ShapesOp)
5815             return aList
5816
5817         ## Find in \a theShape all sub-shapes of type \a theShapeType,
5818         #  situated relatively the specified \a theCheckShape by the
5819         #  certain way, defined through \a theState parameter.
5820         #  @param theCheckShape Shape for relative comparing. It must be a solid.
5821         #  @param theShape Shape to find sub-shapes of.
5822         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5823         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5824         #  @param theName Object name; when specified, this parameter is used
5825         #         for result publication in the study. Otherwise, if automatic
5826         #         publication is switched on, default value is used for result name.
5827         #
5828         #  @return List of all found sub-shapes.
5829         #
5830         #  @ref swig_GetShapesOnShape "Example"
5831         @ManageTransactions("ShapesOp")
5832         def GetShapesOnShape(self, theCheckShape, theShape, theShapeType, theState, theName=None):
5833             """
5834             Find in theShape all sub-shapes of type theShapeType,
5835             situated relatively the specified theCheckShape by the
5836             certain way, defined through theState parameter.
5837
5838             Parameters:
5839                 theCheckShape Shape for relative comparing. It must be a solid.
5840                 theShape Shape to find sub-shapes of.
5841                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5842                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5843                 theName Object name; when specified, this parameter is used
5844                         for result publication in the study. Otherwise, if automatic
5845                         publication is switched on, default value is used for result name.
5846
5847             Returns:
5848                 List of all found sub-shapes.
5849             """
5850             # Example: see GEOM_TestOthers.py
5851             aList = self.ShapesOp.GetShapesOnShape(theCheckShape, theShape,
5852                                                    theShapeType, theState)
5853             RaiseIfFailed("GetShapesOnShape", self.ShapesOp)
5854             self._autoPublish(aList, theName, "shapeOnShape")
5855             return aList
5856
5857         ## Find in \a theShape all sub-shapes of type \a theShapeType,
5858         #  situated relatively the specified \a theCheckShape by the
5859         #  certain way, defined through \a theState parameter.
5860         #  @param theCheckShape Shape for relative comparing. It must be a solid.
5861         #  @param theShape Shape to find sub-shapes of.
5862         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5863         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5864         #  @param theName Object name; when specified, this parameter is used
5865         #         for result publication in the study. Otherwise, if automatic
5866         #         publication is switched on, default value is used for result name.
5867         #
5868         #  @return All found sub-shapes as compound.
5869         #
5870         #  @ref swig_GetShapesOnShapeAsCompound "Example"
5871         @ManageTransactions("ShapesOp")
5872         def GetShapesOnShapeAsCompound(self, theCheckShape, theShape, theShapeType, theState, theName=None):
5873             """
5874             Find in theShape all sub-shapes of type theShapeType,
5875             situated relatively the specified theCheckShape by the
5876             certain way, defined through theState parameter.
5877
5878             Parameters:
5879                 theCheckShape Shape for relative comparing. It must be a solid.
5880                 theShape Shape to find sub-shapes of.
5881                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5882                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5883                 theName Object name; when specified, this parameter is used
5884                         for result publication in the study. Otherwise, if automatic
5885                         publication is switched on, default value is used for result name.
5886
5887             Returns:
5888                 All found sub-shapes as compound.
5889             """
5890             # Example: see GEOM_TestOthers.py
5891             anObj = self.ShapesOp.GetShapesOnShapeAsCompound(theCheckShape, theShape,
5892                                                              theShapeType, theState)
5893             RaiseIfFailed("GetShapesOnShapeAsCompound", self.ShapesOp)
5894             self._autoPublish(anObj, theName, "shapeOnShape")
5895             return anObj
5896
5897         ## Find in \a theShape all sub-shapes of type \a theShapeType,
5898         #  situated relatively the specified \a theCheckShape by the
5899         #  certain way, defined through \a theState parameter.
5900         #  @param theCheckShape Shape for relative comparing. It must be a solid.
5901         #  @param theShape Shape to find sub-shapes of.
5902         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5903         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5904         #
5905         #  @return List of all found sub-shapes indices.
5906         #
5907         #  @ref swig_GetShapesOnShapeIDs "Example"
5908         @ManageTransactions("ShapesOp")
5909         def GetShapesOnShapeIDs(self, theCheckShape, theShape, theShapeType, theState):
5910             """
5911             Find in theShape all sub-shapes of type theShapeType,
5912             situated relatively the specified theCheckShape by the
5913             certain way, defined through theState parameter.
5914
5915             Parameters:
5916                 theCheckShape Shape for relative comparing. It must be a solid.
5917                 theShape Shape to find sub-shapes of.
5918                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5919                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5920
5921             Returns:
5922                 List of all found sub-shapes indices.
5923             """
5924             # Example: see GEOM_TestOthers.py
5925             aList = self.ShapesOp.GetShapesOnShapeIDs(theCheckShape, theShape,
5926                                                       theShapeType, theState)
5927             RaiseIfFailed("GetShapesOnShapeIDs", self.ShapesOp)
5928             return aList
5929
5930         ## Get sub-shape(s) of theShapeWhere, which are
5931         #  coincident with \a theShapeWhat or could be a part of it.
5932         #  @param theShapeWhere Shape to find sub-shapes of.
5933         #  @param theShapeWhat Shape, specifying what to find.
5934         #  @param isNewImplementation implementation of GetInPlace functionality
5935         #             (default = False, old alghorithm based on shape properties)
5936         #  @param theName Object name; when specified, this parameter is used
5937         #         for result publication in the study. Otherwise, if automatic
5938         #         publication is switched on, default value is used for result name.
5939         #
5940         #  @return Compound which includes all found sub-shapes if they have different types; 
5941         #          or group of all found shapes of the equal type; or a single found sub-shape.
5942         #
5943         #  @note This function has a restriction on argument shapes.
5944         #        If \a theShapeWhere has curved parts with significantly
5945         #        outstanding centres (i.e. the mass centre of a part is closer to
5946         #        \a theShapeWhat than to the part), such parts will not be found.
5947         #        @image html get_in_place_lost_part.png
5948         #
5949         #  @ref swig_GetInPlace "Example"
5950         @ManageTransactions("ShapesOp")
5951         def GetInPlace(self, theShapeWhere, theShapeWhat, isNewImplementation = False, theName=None):
5952             """
5953             Get sub-shape(s) of theShapeWhere, which are
5954             coincident with  theShapeWhat or could be a part of it.
5955
5956             Parameters:
5957                 theShapeWhere Shape to find sub-shapes of.
5958                 theShapeWhat Shape, specifying what to find.
5959                 isNewImplementation Implementation of GetInPlace functionality
5960                                     (default = False, old alghorithm based on shape properties)
5961                 theName Object name; when specified, this parameter is used
5962                         for result publication in the study. Otherwise, if automatic
5963                         publication is switched on, default value is used for result name.
5964
5965             Returns:
5966                 Compound which includes all found sub-shapes if they have different types; 
5967                 or group of all found shapes of the equal type; or a single found sub-shape.
5968
5969
5970             Note:
5971                 This function has a restriction on argument shapes.
5972                 If theShapeWhere has curved parts with significantly
5973                 outstanding centres (i.e. the mass centre of a part is closer to
5974                 theShapeWhat than to the part), such parts will not be found.
5975             """
5976             # Example: see GEOM_TestOthers.py
5977             anObj = None
5978             if isNewImplementation:
5979                 anObj = self.ShapesOp.GetInPlace(theShapeWhere, theShapeWhat)
5980             else:
5981                 anObj = self.ShapesOp.GetInPlaceOld(theShapeWhere, theShapeWhat)
5982                 pass
5983             RaiseIfFailed("GetInPlace", self.ShapesOp)
5984             self._autoPublish(anObj, theName, "inplace")
5985             return anObj
5986
5987         ## Get sub-shape(s) of \a theShapeWhere, which are
5988         #  coincident with \a theShapeWhat or could be a part of it.
5989         #
5990         #  Implementation of this method is based on a saved history of an operation,
5991         #  produced \a theShapeWhere. The \a theShapeWhat must be among this operation's
5992         #  arguments (an argument shape or a sub-shape of an argument shape).
5993         #  The operation could be the Partition or one of boolean operations,
5994         #  performed on simple shapes (not on compounds).
5995         #
5996         #  @param theShapeWhere Shape to find sub-shapes of.
5997         #  @param theShapeWhat Shape, specifying what to find (must be in the
5998         #                      building history of the ShapeWhere).
5999         #  @param theName Object name; when specified, this parameter is used
6000         #         for result publication in the study. Otherwise, if automatic
6001         #         publication is switched on, default value is used for result name.
6002         #
6003         #  @return Compound which includes all found sub-shapes if they have different types; 
6004         #          or group of all found shapes of the equal type; or a single found sub-shape.
6005         #
6006         #  @ref swig_GetInPlace "Example"
6007         @ManageTransactions("ShapesOp")
6008         def GetInPlaceByHistory(self, theShapeWhere, theShapeWhat, theName=None):
6009             """
6010             Implementation of this method is based on a saved history of an operation,
6011             produced theShapeWhere. The theShapeWhat must be among this operation's
6012             arguments (an argument shape or a sub-shape of an argument shape).
6013             The operation could be the Partition or one of boolean operations,
6014             performed on simple shapes (not on compounds).
6015
6016             Parameters:
6017                 theShapeWhere Shape to find sub-shapes of.
6018                 theShapeWhat Shape, specifying what to find (must be in the
6019                                 building history of the ShapeWhere).
6020                 theName Object name; when specified, this parameter is used
6021                         for result publication in the study. Otherwise, if automatic
6022                         publication is switched on, default value is used for result name.
6023
6024             Returns:
6025                 Compound which includes all found sub-shapes if they have different types; 
6026                 or group of all found shapes of the equal type; or a single found sub-shape.
6027             """
6028             # Example: see GEOM_TestOthers.py
6029             anObj = self.ShapesOp.GetInPlaceByHistory(theShapeWhere, theShapeWhat)
6030             RaiseIfFailed("GetInPlaceByHistory", self.ShapesOp)
6031             self._autoPublish(anObj, theName, "inplace")
6032             return anObj
6033
6034         ## A sort of GetInPlace functionality, returning IDs of sub-shapes.
6035         #  For each sub-shape ID of @a theShapeWhat return a list of corresponding sub-shape
6036         #  IDs of @a theShapeWhere.
6037         #  For example, if theShapeWhat is a box and theShapeWhere is this box cut into 
6038         #  two parts by a plane, then the result can be as this: 
6039         #    len( result_list ) = 35,
6040         #    result_list[ 1 ] = [ 2, 36 ], which means that the box  (ID 1) turned into two
6041         #  solids with IDs 2 and 36 within theShapeWhere
6042         #
6043         #  @param theShapeWhere Shape to find sub-shapes of.
6044         #  @param theShapeWhat Shape, specifying what to find.
6045         #  @return List of lists of sub-shape IDS of theShapeWhere.
6046         def GetInPlaceMap(self, theShapeWhere, theShapeWhat):
6047             """
6048             A sort of GetInPlace functionality, returning IDs of sub-shapes.
6049             For each sub-shape ID of @a theShapeWhat return a list of corresponding sub-shape
6050             IDs of @a theShapeWhere.
6051             For example, if theShapeWhat is a box and theShapeWhere is this box cut into 
6052             two parts by a plane, then the result can be as this: 
6053               len( result_list ) = 35,
6054               result_list[ 1 ] = [ 2, 36 ], which means that the box (ID 1) turned into two
6055             solids with IDs 2 and 36 within theShapeWhere
6056
6057             Parameters:
6058                 theShapeWhere Shape to find sub-shapes of.
6059                 theShapeWhat Shape, specifying what to find.
6060
6061             Returns:
6062                 List of lists of sub-shape IDS of theShapeWhere.
6063             """
6064             return self.ShapesOp.GetInPlaceMap(theShapeWhere, theShapeWhat)
6065
6066         ## Get sub-shape of theShapeWhere, which is
6067         #  equal to \a theShapeWhat.
6068         #  @param theShapeWhere Shape to find sub-shape of.
6069         #  @param theShapeWhat Shape, specifying what to find.
6070         #  @param theName Object name; when specified, this parameter is used
6071         #         for result publication in the study. Otherwise, if automatic
6072         #         publication is switched on, default value is used for result name.
6073         #
6074         #  @return New GEOM.GEOM_Object for found sub-shape.
6075         #
6076         #  @ref swig_GetSame "Example"
6077         @ManageTransactions("ShapesOp")
6078         def GetSame(self, theShapeWhere, theShapeWhat, theName=None):
6079             """
6080             Get sub-shape of theShapeWhere, which is
6081             equal to theShapeWhat.
6082
6083             Parameters:
6084                 theShapeWhere Shape to find sub-shape of.
6085                 theShapeWhat Shape, specifying what to find.
6086                 theName Object name; when specified, this parameter is used
6087                         for result publication in the study. Otherwise, if automatic
6088                         publication is switched on, default value is used for result name.
6089
6090             Returns:
6091                 New GEOM.GEOM_Object for found sub-shape.
6092             """
6093             anObj = self.ShapesOp.GetSame(theShapeWhere, theShapeWhat)
6094             RaiseIfFailed("GetSame", self.ShapesOp)
6095             self._autoPublish(anObj, theName, "sameShape")
6096             return anObj
6097
6098
6099         ## Get sub-shape indices of theShapeWhere, which is
6100         #  equal to \a theShapeWhat.
6101         #  @param theShapeWhere Shape to find sub-shape of.
6102         #  @param theShapeWhat Shape, specifying what to find.
6103         #  @return List of all found sub-shapes indices.
6104         #
6105         #  @ref swig_GetSame "Example"
6106         @ManageTransactions("ShapesOp")
6107         def GetSameIDs(self, theShapeWhere, theShapeWhat):
6108             """
6109             Get sub-shape indices of theShapeWhere, which is
6110             equal to theShapeWhat.
6111
6112             Parameters:
6113                 theShapeWhere Shape to find sub-shape of.
6114                 theShapeWhat Shape, specifying what to find.
6115
6116             Returns:
6117                 List of all found sub-shapes indices.
6118             """
6119             anObj = self.ShapesOp.GetSameIDs(theShapeWhere, theShapeWhat)
6120             RaiseIfFailed("GetSameIDs", self.ShapesOp)
6121             return anObj
6122
6123         ## Resize the input edge with the new Min and Max parameters.
6124         #  The input edge parameters range is [0, 1]. If theMin parameter is
6125         #  negative, the input edge is extended, otherwise it is shrinked by
6126         #  theMin parameter. If theMax is greater than 1, the edge is extended,
6127         #  otherwise it is shrinked by theMax parameter.
6128         #  @param theEdge the input edge to be resized.
6129         #  @param theMin the minimal parameter value.
6130         #  @param theMax the maximal parameter value.
6131         #  @param theName Object name; when specified, this parameter is used
6132         #         for result publication in the study. Otherwise, if automatic
6133         #         publication is switched on, default value is used for result name.
6134         #  @return New GEOM.GEOM_Object, containing the created edge.
6135         #
6136         #  @ref tui_extend "Example"
6137         @ManageTransactions("ShapesOp")
6138         def ExtendEdge(self, theEdge, theMin, theMax, theName=None):
6139             """
6140             Resize the input edge with the new Min and Max parameters.
6141             The input edge parameters range is [0, 1]. If theMin parameter is
6142             negative, the input edge is extended, otherwise it is shrinked by
6143             theMin parameter. If theMax is greater than 1, the edge is extended,
6144             otherwise it is shrinked by theMax parameter.
6145
6146             Parameters:
6147                 theEdge the input edge to be resized.
6148                 theMin the minimal parameter value.
6149                 theMax the maximal parameter value.
6150                 theName Object name; when specified, this parameter is used
6151                         for result publication in the study. Otherwise, if automatic
6152                         publication is switched on, default value is used for result name.
6153
6154             Returns:
6155                 New GEOM.GEOM_Object, containing the created edge.
6156             """
6157             theMin, theMax, Parameters = ParseParameters(theMin, theMax)
6158             anObj = self.ShapesOp.ExtendEdge(theEdge, theMin, theMax)
6159             RaiseIfFailed("ExtendEdge", self.ShapesOp)
6160             anObj.SetParameters(Parameters)
6161             self._autoPublish(anObj, theName, "edge")
6162             return anObj
6163
6164         ## Resize the input face with the new UMin, UMax, VMin and VMax
6165         #  parameters. The input face U and V parameters range is [0, 1]. If
6166         #  theUMin parameter is negative, the input face is extended, otherwise
6167         #  it is shrinked along U direction by theUMin parameter. If theUMax is
6168         #  greater than 1, the face is extended, otherwise it is shrinked along
6169         #  U direction by theUMax parameter. So as for theVMin, theVMax and
6170         #  V direction of the input face.
6171         #  @param theFace the input face to be resized.
6172         #  @param theUMin the minimal U parameter value.
6173         #  @param theUMax the maximal U parameter value.
6174         #  @param theVMin the minimal V parameter value.
6175         #  @param theVMax the maximal V parameter value.
6176         #  @param theName Object name; when specified, this parameter is used
6177         #         for result publication in the study. Otherwise, if automatic
6178         #         publication is switched on, default value is used for result name.
6179         #  @return New GEOM.GEOM_Object, containing the created face.
6180         #
6181         #  @ref tui_extend "Example"
6182         @ManageTransactions("ShapesOp")
6183         def ExtendFace(self, theFace, theUMin, theUMax,
6184                        theVMin, theVMax, theName=None):
6185             """
6186             Resize the input face with the new UMin, UMax, VMin and VMax
6187             parameters. The input face U and V parameters range is [0, 1]. If
6188             theUMin parameter is negative, the input face is extended, otherwise
6189             it is shrinked along U direction by theUMin parameter. If theUMax is
6190             greater than 1, the face is extended, otherwise it is shrinked along
6191             U direction by theUMax parameter. So as for theVMin, theVMax and
6192             V direction of the input face.
6193
6194             Parameters:
6195                 theFace the input face to be resized.
6196                 theUMin the minimal U parameter value.
6197                 theUMax the maximal U parameter value.
6198                 theVMin the minimal V parameter value.
6199                 theVMax the maximal V parameter value.
6200                 theName Object name; when specified, this parameter is used
6201                         for result publication in the study. Otherwise, if automatic
6202                         publication is switched on, default value is used for result name.
6203
6204             Returns:
6205                 New GEOM.GEOM_Object, containing the created face.
6206             """
6207             theUMin, theUMax, theVMin, theVMax, Parameters = ParseParameters(theUMin, theUMax, theVMin, theVMax)
6208             anObj = self.ShapesOp.ExtendFace(theFace, theUMin, theUMax,
6209                                              theVMin, theVMax)
6210             RaiseIfFailed("ExtendFace", self.ShapesOp)
6211             anObj.SetParameters(Parameters)
6212             self._autoPublish(anObj, theName, "face")
6213             return anObj
6214
6215         ## This function takes some face as input parameter and creates new
6216         #  GEOM_Object, i.e. topological shape by extracting underlying surface
6217         #  of the source face and limiting it by the Umin, Umax, Vmin, Vmax
6218         #  parameters of the source face (in the parametrical space).
6219         #  @param theFace the input face.
6220         #  @param theName Object name; when specified, this parameter is used
6221         #         for result publication in the study. Otherwise, if automatic
6222         #         publication is switched on, default value is used for result name.
6223         #  @return New GEOM.GEOM_Object, containing the created face.
6224         #
6225         #  @ref tui_creation_surface "Example"
6226         @ManageTransactions("ShapesOp")
6227         def MakeSurfaceFromFace(self, theFace, theName=None):
6228             """
6229             This function takes some face as input parameter and creates new
6230             GEOM_Object, i.e. topological shape by extracting underlying surface
6231             of the source face and limiting it by the Umin, Umax, Vmin, Vmax
6232             parameters of the source face (in the parametrical space).
6233
6234             Parameters:
6235                 theFace the input face.
6236                 theName Object name; when specified, this parameter is used
6237                         for result publication in the study. Otherwise, if automatic
6238                         publication is switched on, default value is used for result name.
6239
6240             Returns:
6241                 New GEOM.GEOM_Object, containing the created face.
6242             """
6243             anObj = self.ShapesOp.MakeSurfaceFromFace(theFace)
6244             RaiseIfFailed("MakeSurfaceFromFace", self.ShapesOp)
6245             self._autoPublish(anObj, theName, "surface")
6246             return anObj
6247
6248         # end of l4_obtain
6249         ## @}
6250
6251         ## @addtogroup l4_access
6252         ## @{
6253
6254         ## Obtain a composite sub-shape of <VAR>aShape</VAR>, composed from sub-shapes
6255         #  of aShape, selected by their unique IDs inside <VAR>aShape</VAR>
6256         #  @param aShape Shape to get sub-shape of.
6257         #  @param ListOfID List of sub-shapes indices.
6258         #  @param theName Object name; when specified, this parameter is used
6259         #         for result publication in the study. Otherwise, if automatic
6260         #         publication is switched on, default value is used for result name.
6261         #
6262         #  @return Found sub-shape.
6263         #
6264         #  @ref swig_all_decompose "Example"
6265         def GetSubShape(self, aShape, ListOfID, theName=None):
6266             """
6267             Obtain a composite sub-shape of aShape, composed from sub-shapes
6268             of aShape, selected by their unique IDs inside aShape
6269
6270             Parameters:
6271                 aShape Shape to get sub-shape of.
6272                 ListOfID List of sub-shapes indices.
6273                 theName Object name; when specified, this parameter is used
6274                         for result publication in the study. Otherwise, if automatic
6275                         publication is switched on, default value is used for result name.
6276
6277             Returns:
6278                 Found sub-shape.
6279             """
6280             # Example: see GEOM_TestAll.py
6281             anObj = self.AddSubShape(aShape,ListOfID)
6282             self._autoPublish(anObj, theName, "subshape")
6283             return anObj
6284
6285         ## Obtain unique ID of sub-shape <VAR>aSubShape</VAR> inside <VAR>aShape</VAR>
6286         #  of aShape, selected by their unique IDs inside <VAR>aShape</VAR>
6287         #  @param aShape Shape to get sub-shape of.
6288         #  @param aSubShape Sub-shapes of aShape.
6289         #  @return ID of found sub-shape.
6290         #
6291         #  @ref swig_all_decompose "Example"
6292         @ManageTransactions("LocalOp")
6293         def GetSubShapeID(self, aShape, aSubShape):
6294             """
6295             Obtain unique ID of sub-shape aSubShape inside aShape
6296             of aShape, selected by their unique IDs inside aShape
6297
6298             Parameters:
6299                aShape Shape to get sub-shape of.
6300                aSubShape Sub-shapes of aShape.
6301
6302             Returns:
6303                ID of found sub-shape.
6304             """
6305             # Example: see GEOM_TestAll.py
6306             anID = self.LocalOp.GetSubShapeIndex(aShape, aSubShape)
6307             RaiseIfFailed("GetSubShapeIndex", self.LocalOp)
6308             return anID
6309
6310         ## Obtain unique IDs of sub-shapes <VAR>aSubShapes</VAR> inside <VAR>aShape</VAR>
6311         #  This function is provided for performance purpose. The complexity is O(n) with n
6312         #  the number of subobjects of aShape
6313         #  @param aShape Shape to get sub-shape of.
6314         #  @param aSubShapes Sub-shapes of aShape.
6315         #  @return list of IDs of found sub-shapes.
6316         #
6317         #  @ref swig_all_decompose "Example"
6318         @ManageTransactions("ShapesOp")
6319         def GetSubShapesIDs(self, aShape, aSubShapes):
6320             """
6321             Obtain a list of IDs of sub-shapes aSubShapes inside aShape
6322             This function is provided for performance purpose. The complexity is O(n) with n
6323             the number of subobjects of aShape
6324
6325             Parameters:
6326                aShape Shape to get sub-shape of.
6327                aSubShapes Sub-shapes of aShape.
6328
6329             Returns:
6330                List of IDs of found sub-shape.
6331             """
6332             # Example: see GEOM_TestAll.py
6333             anIDs = self.ShapesOp.GetSubShapesIndices(aShape, aSubShapes)
6334             RaiseIfFailed("GetSubShapesIndices", self.ShapesOp)
6335             return anIDs
6336
6337         # end of l4_access
6338         ## @}
6339
6340         ## @addtogroup l4_decompose
6341         ## @{
6342
6343         ## Get all sub-shapes and groups of \a theShape,
6344         #  that were created already by any other methods.
6345         #  @param theShape Any shape.
6346         #  @param theGroupsOnly If this parameter is TRUE, only groups will be
6347         #                       returned, else all found sub-shapes and groups.
6348         #  @return List of existing sub-objects of \a theShape.
6349         #
6350         #  @ref swig_all_decompose "Example"
6351         @ManageTransactions("ShapesOp")
6352         def GetExistingSubObjects(self, theShape, theGroupsOnly = False):
6353             """
6354             Get all sub-shapes and groups of theShape,
6355             that were created already by any other methods.
6356
6357             Parameters:
6358                 theShape Any shape.
6359                 theGroupsOnly If this parameter is TRUE, only groups will be
6360                                  returned, else all found sub-shapes and groups.
6361
6362             Returns:
6363                 List of existing sub-objects of theShape.
6364             """
6365             # Example: see GEOM_TestAll.py
6366             ListObj = self.ShapesOp.GetExistingSubObjects(theShape, theGroupsOnly)
6367             RaiseIfFailed("GetExistingSubObjects", self.ShapesOp)
6368             return ListObj
6369
6370         ## Get all groups of \a theShape,
6371         #  that were created already by any other methods.
6372         #  @param theShape Any shape.
6373         #  @return List of existing groups of \a theShape.
6374         #
6375         #  @ref swig_all_decompose "Example"
6376         @ManageTransactions("ShapesOp")
6377         def GetGroups(self, theShape):
6378             """
6379             Get all groups of theShape,
6380             that were created already by any other methods.
6381
6382             Parameters:
6383                 theShape Any shape.
6384
6385             Returns:
6386                 List of existing groups of theShape.
6387             """
6388             # Example: see GEOM_TestAll.py
6389             ListObj = self.ShapesOp.GetExistingSubObjects(theShape, True)
6390             RaiseIfFailed("GetExistingSubObjects", self.ShapesOp)
6391             return ListObj
6392
6393         ## Explode a shape on sub-shapes of a given type.
6394         #  If the shape itself matches the type, it is also returned.
6395         #  @param aShape Shape to be exploded.
6396         #  @param aType Type of sub-shapes to be retrieved (see ShapeType())
6397         #  @param theName Object name; when specified, this parameter is used
6398         #         for result publication in the study. Otherwise, if automatic
6399         #         publication is switched on, default value is used for result name.
6400         #
6401         #  @return List of sub-shapes of type theShapeType, contained in theShape.
6402         #
6403         #  @ref swig_all_decompose "Example"
6404         @ManageTransactions("ShapesOp")
6405         def SubShapeAll(self, aShape, aType, theName=None):
6406             """
6407             Explode a shape on sub-shapes of a given type.
6408             If the shape itself matches the type, it is also returned.
6409
6410             Parameters:
6411                 aShape Shape to be exploded.
6412                 aType Type of sub-shapes to be retrieved (see geompy.ShapeType)
6413                 theName Object name; when specified, this parameter is used
6414                         for result publication in the study. Otherwise, if automatic
6415                         publication is switched on, default value is used for result name.
6416
6417             Returns:
6418                 List of sub-shapes of type theShapeType, contained in theShape.
6419             """
6420             # Example: see GEOM_TestAll.py
6421             ListObj = self.ShapesOp.MakeAllSubShapes(aShape, EnumToLong( aType ), False)
6422             RaiseIfFailed("SubShapeAll", self.ShapesOp)
6423             self._autoPublish(ListObj, theName, "subshape")
6424             return ListObj
6425
6426         ## Explode a shape on sub-shapes of a given type.
6427         #  @param aShape Shape to be exploded.
6428         #  @param aType Type of sub-shapes to be retrieved (see ShapeType())
6429         #  @return List of IDs of sub-shapes.
6430         #
6431         #  @ref swig_all_decompose "Example"
6432         @ManageTransactions("ShapesOp")
6433         def SubShapeAllIDs(self, aShape, aType):
6434             """
6435             Explode a shape on sub-shapes of a given type.
6436
6437             Parameters:
6438                 aShape Shape to be exploded (see geompy.ShapeType)
6439                 aType Type of sub-shapes to be retrieved (see geompy.ShapeType)
6440
6441             Returns:
6442                 List of IDs of sub-shapes.
6443             """
6444             ListObj = self.ShapesOp.GetAllSubShapesIDs(aShape, EnumToLong( aType ), False)
6445             RaiseIfFailed("SubShapeAllIDs", self.ShapesOp)
6446             return ListObj
6447
6448         ## Obtain a compound of sub-shapes of <VAR>aShape</VAR>,
6449         #  selected by their indices in list of all sub-shapes of type <VAR>aType</VAR>.
6450         #  Each index is in range [1, Nb_Sub-Shapes_Of_Given_Type]
6451         #  @param aShape Shape to get sub-shape of.
6452         #  @param ListOfInd List of sub-shapes indices.
6453         #  @param aType Type of sub-shapes to be retrieved (see ShapeType())
6454         #  @param theName Object name; when specified, this parameter is used
6455         #         for result publication in the study. Otherwise, if automatic
6456         #         publication is switched on, default value is used for result name.
6457         #
6458         #  @return A compound of sub-shapes of aShape.
6459         #
6460         #  @ref swig_all_decompose "Example"
6461         def SubShape(self, aShape, aType, ListOfInd, theName=None):
6462             """
6463             Obtain a compound of sub-shapes of aShape,
6464             selected by their indices in list of all sub-shapes of type aType.
6465             Each index is in range [1, Nb_Sub-Shapes_Of_Given_Type]
6466
6467             Parameters:
6468                 aShape Shape to get sub-shape of.
6469                 ListOfID List of sub-shapes indices.
6470                 aType Type of sub-shapes to be retrieved (see geompy.ShapeType)
6471                 theName Object name; when specified, this parameter is used
6472                         for result publication in the study. Otherwise, if automatic
6473                         publication is switched on, default value is used for result name.
6474
6475             Returns:
6476                 A compound of sub-shapes of aShape.
6477             """
6478             # Example: see GEOM_TestAll.py
6479             ListOfIDs = []
6480             AllShapeIDsList = self.SubShapeAllIDs(aShape, EnumToLong( aType ))
6481             for ind in ListOfInd:
6482                 ListOfIDs.append(AllShapeIDsList[ind - 1])
6483             # note: auto-publishing is done in self.GetSubShape()
6484             anObj = self.GetSubShape(aShape, ListOfIDs, theName)
6485             return anObj
6486
6487         ## Explode a shape on sub-shapes of a given type.
6488         #  Sub-shapes will be sorted taking into account their gravity centers,
6489         #  to provide stable order of sub-shapes. Please see
6490         #  @ref sorting_shapes_page "Description of Sorting Shapes Algorithm".
6491         #  If the shape itself matches the type, it is also returned.
6492         #  @param aShape Shape to be exploded.
6493         #  @param aType Type of sub-shapes to be retrieved (see ShapeType())
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 theShapeType, contained in theShape.
6499         #
6500         #  @ref swig_SubShapeAllSorted "Example"
6501         @ManageTransactions("ShapesOp")
6502         def SubShapeAllSortedCentres(self, aShape, aType, theName=None):
6503             """
6504             Explode a shape on sub-shapes of a given type.
6505             Sub-shapes will be sorted taking into account their gravity centers,
6506             to provide stable order of sub-shapes.
6507             If the shape itself matches the type, it is also returned.
6508
6509             Parameters:
6510                 aShape Shape to be exploded.
6511                 aType Type of sub-shapes to be retrieved (see geompy.ShapeType)
6512                 theName Object name; when specified, this parameter is used
6513                         for result publication in the study. Otherwise, if automatic
6514                         publication is switched on, default value is used for result name.
6515
6516             Returns:
6517                 List of sub-shapes of type theShapeType, contained in theShape.
6518             """
6519             # Example: see GEOM_TestAll.py
6520             ListObj = self.ShapesOp.MakeAllSubShapes(aShape, EnumToLong( aType ), True)
6521             RaiseIfFailed("SubShapeAllSortedCentres", self.ShapesOp)
6522             self._autoPublish(ListObj, theName, "subshape")
6523             return ListObj
6524
6525         ## Explode a shape on sub-shapes of a given type.
6526         #  Sub-shapes will be sorted taking into account their gravity centers,
6527         #  to provide stable order of sub-shapes. Please see
6528         #  @ref sorting_shapes_page "Description of Sorting Shapes Algorithm".
6529         #  @param aShape Shape to be exploded.
6530         #  @param aType Type of sub-shapes to be retrieved (see ShapeType())
6531         #  @return List of IDs of sub-shapes.
6532         #
6533         #  @ref swig_all_decompose "Example"
6534         @ManageTransactions("ShapesOp")
6535         def SubShapeAllSortedCentresIDs(self, aShape, aType):
6536             """
6537             Explode a shape on sub-shapes of a given type.
6538             Sub-shapes will be sorted taking into account their gravity centers,
6539             to provide stable order of sub-shapes.
6540
6541             Parameters:
6542                 aShape Shape to be exploded.
6543                 aType Type of sub-shapes to be retrieved (see geompy.ShapeType)
6544
6545             Returns:
6546                 List of IDs of sub-shapes.
6547             """
6548             ListIDs = self.ShapesOp.GetAllSubShapesIDs(aShape, EnumToLong( aType ), True)
6549             RaiseIfFailed("SubShapeAllIDs", self.ShapesOp)
6550             return ListIDs
6551
6552         ## Obtain a compound of sub-shapes of <VAR>aShape</VAR>,
6553         #  selected by they indices in sorted list of all sub-shapes of type <VAR>aType</VAR>.
6554         #  Please see @ref sorting_shapes_page "Description of Sorting Shapes Algorithm".
6555         #  Each index is in range [1, Nb_Sub-Shapes_Of_Given_Type]
6556         #  @param aShape Shape to get sub-shape of.
6557         #  @param ListOfInd List of sub-shapes indices.
6558         #  @param aType Type of sub-shapes to be retrieved (see ShapeType())
6559         #  @param theName Object name; when specified, this parameter is used
6560         #         for result publication in the study. Otherwise, if automatic
6561         #         publication is switched on, default value is used for result name.
6562         #
6563         #  @return A compound of sub-shapes of aShape.
6564         #
6565         #  @ref swig_all_decompose "Example"
6566         def SubShapeSortedCentres(self, aShape, aType, ListOfInd, theName=None):
6567             """
6568             Obtain a compound of sub-shapes of aShape,
6569             selected by they indices in sorted list of all sub-shapes of type aType.
6570             Each index is in range [1, Nb_Sub-Shapes_Of_Given_Type]
6571
6572             Parameters:
6573                 aShape Shape to get sub-shape of.
6574                 ListOfID List of sub-shapes indices.
6575                 aType Type of sub-shapes to be retrieved (see geompy.ShapeType)
6576                 theName Object name; when specified, this parameter is used
6577                         for result publication in the study. Otherwise, if automatic
6578                         publication is switched on, default value is used for result name.
6579
6580             Returns:
6581                 A compound of sub-shapes of aShape.
6582             """
6583             # Example: see GEOM_TestAll.py
6584             ListOfIDs = []
6585             AllShapeIDsList = self.SubShapeAllSortedCentresIDs(aShape, EnumToLong( aType ))
6586             for ind in ListOfInd:
6587                 ListOfIDs.append(AllShapeIDsList[ind - 1])
6588             # note: auto-publishing is done in self.GetSubShape()
6589             anObj = self.GetSubShape(aShape, ListOfIDs, theName)
6590             return anObj
6591
6592         ## Extract shapes (excluding the main shape) of given type.
6593         #  @param aShape The shape.
6594         #  @param aType  The shape type (see ShapeType())
6595         #  @param isSorted Boolean flag to switch sorting on/off. Please see
6596         #         @ref sorting_shapes_page "Description of Sorting Shapes Algorithm".
6597         #  @param theName Object name; when specified, this parameter is used
6598         #         for result publication in the study. Otherwise, if automatic
6599         #         publication is switched on, default value is used for result name.
6600         #
6601         #  @return List of sub-shapes of type aType, contained in aShape.
6602         #
6603         #  @ref swig_FilletChamfer "Example"
6604         @ManageTransactions("ShapesOp")
6605         def ExtractShapes(self, aShape, aType, isSorted = False, theName=None):
6606             """
6607             Extract shapes (excluding the main shape) of given type.
6608
6609             Parameters:
6610                 aShape The shape.
6611                 aType  The shape type (see geompy.ShapeType)
6612                 isSorted Boolean flag to switch sorting on/off.
6613                 theName Object name; when specified, this parameter is used
6614                         for result publication in the study. Otherwise, if automatic
6615                         publication is switched on, default value is used for result name.
6616
6617             Returns:
6618                 List of sub-shapes of type aType, contained in aShape.
6619             """
6620             # Example: see GEOM_TestAll.py
6621             ListObj = self.ShapesOp.ExtractSubShapes(aShape, EnumToLong( aType ), isSorted)
6622             RaiseIfFailed("ExtractSubShapes", self.ShapesOp)
6623             self._autoPublish(ListObj, theName, "subshape")
6624             return ListObj
6625
6626         ## Get a set of sub-shapes defined by their unique IDs inside <VAR>aShape</VAR>
6627         #  @param aShape Main shape.
6628         #  @param anIDs List of unique IDs of sub-shapes inside <VAR>aShape</VAR>.
6629         #  @param theName Object name; when specified, this parameter is used
6630         #         for result publication in the study. Otherwise, if automatic
6631         #         publication is switched on, default value is used for result name.
6632         #  @return List of GEOM.GEOM_Object, corresponding to found sub-shapes.
6633         #
6634         #  @ref swig_all_decompose "Example"
6635         @ManageTransactions("ShapesOp")
6636         def SubShapes(self, aShape, anIDs, theName=None):
6637             """
6638             Get a set of sub-shapes defined by their unique IDs inside theMainShape
6639
6640             Parameters:
6641                 aShape Main shape.
6642                 anIDs List of unique IDs of sub-shapes inside theMainShape.
6643                 theName Object name; when specified, this parameter is used
6644                         for result publication in the study. Otherwise, if automatic
6645                         publication is switched on, default value is used for result name.
6646
6647             Returns:
6648                 List of GEOM.GEOM_Object, corresponding to found sub-shapes.
6649             """
6650             # Example: see GEOM_TestAll.py
6651             ListObj = self.ShapesOp.MakeSubShapes(aShape, anIDs)
6652             RaiseIfFailed("SubShapes", self.ShapesOp)
6653             self._autoPublish(ListObj, theName, "subshape")
6654             return ListObj
6655
6656         ## Explode a shape into edges sorted in a row from a starting point.
6657         #  @param theShape the shape to be exploded on edges.
6658         #  @param theStartPoint the starting point.
6659         #  @param theName Object name; when specified, this parameter is used
6660         #         for result publication in the study. Otherwise, if automatic
6661         #         publication is switched on, default value is used for result name.
6662         #  @return List of GEOM.GEOM_Object that is actually an ordered list
6663         #          of edges sorted in a row from a starting point.
6664         #
6665         #  @ref swig_GetSubShapeEdgeSorted "Example"
6666         @ManageTransactions("ShapesOp")
6667         def GetSubShapeEdgeSorted(self, theShape, theStartPoint, theName=None):
6668             """
6669             Explode a shape into edges sorted in a row from a starting point.
6670
6671             Parameters:
6672                 theShape the shape to be exploded on edges.
6673                 theStartPoint the starting point.
6674                 theName Object name; when specified, this parameter is used
6675                         for result publication in the study. Otherwise, if automatic
6676                         publication is switched on, default value is used for result name.
6677
6678             Returns:
6679                 List of GEOM.GEOM_Object that is actually an ordered list
6680                 of edges sorted in a row from a starting point.
6681             """
6682             # Example: see GEOM_TestAll.py
6683             ListObj = self.ShapesOp.GetSubShapeEdgeSorted(theShape, theStartPoint)
6684             RaiseIfFailed("GetSubShapeEdgeSorted", self.ShapesOp)
6685             self._autoPublish(ListObj, theName, "SortedEdges")
6686             return ListObj
6687
6688         ##
6689         # Return the list of subshapes that satisfies a certain tolerance
6690         # criterion. The user defines the type of shapes to be returned, the
6691         # condition and the tolerance value. The operation is defined for
6692         # faces, edges and vertices only. E.g. for theShapeType FACE,
6693         # theCondition GEOM::CC_GT and theTolerance 1.e-7 this method returns
6694         # all faces of theShape that have tolerances greater then 1.e7.
6695         #
6696         #  @param theShape the shape to be exploded
6697         #  @param theShapeType the type of sub-shapes to be returned (see
6698         #         ShapeType()). Can have the values FACE, EDGE and VERTEX only.
6699         #  @param theCondition the condition type (see GEOM::comparison_condition).
6700         #  @param theTolerance the tolerance filter.
6701         #  @param theName Object name; when specified, this parameter is used
6702         #         for result publication in the study. Otherwise, if automatic
6703         #         publication is switched on, default value is used for result name.
6704         #  @return the list of shapes that satisfy the conditions.
6705         #
6706         #  @ref swig_GetSubShapesWithTolerance "Example"
6707         @ManageTransactions("ShapesOp")
6708         def GetSubShapesWithTolerance(self, theShape, theShapeType,
6709                                       theCondition, theTolerance, theName=None):
6710             """
6711             Return the list of subshapes that satisfies a certain tolerance
6712             criterion. The user defines the type of shapes to be returned, the
6713             condition and the tolerance value. The operation is defined for
6714             faces, edges and vertices only. E.g. for theShapeType FACE,
6715             theCondition GEOM::CC_GT and theTolerance 1.e-7 this method returns
6716             all faces of theShape that have tolerances greater then 1.e7.
6717             
6718             Parameters:
6719                 theShape the shape to be exploded
6720                 theShapeType the type of sub-shapes to be returned (see
6721                              ShapeType()). Can have the values FACE,
6722                              EDGE and VERTEX only.
6723                 theCondition the condition type (see GEOM::comparison_condition).
6724                 theTolerance the tolerance filter.
6725                 theName Object name; when specified, this parameter is used
6726                         for result publication in the study. Otherwise, if automatic
6727                         publication is switched on, default value is used for result name.
6728
6729             Returns:
6730                 The list of shapes that satisfy the conditions.
6731             """
6732             # Example: see GEOM_TestAll.py
6733             ListObj = self.ShapesOp.GetSubShapesWithTolerance(theShape, EnumToLong(theShapeType),
6734                                                               theCondition, theTolerance)
6735             RaiseIfFailed("GetSubShapesWithTolerance", self.ShapesOp)
6736             self._autoPublish(ListObj, theName, "SubShapeWithTolerance")
6737             return ListObj
6738
6739         ## Check if the object is a sub-object of another GEOM object.
6740         #  @param aSubObject Checked sub-object (or its parent object, in case if
6741         #         \a theSubObjectIndex is non-zero).
6742         #  @param anObject An object that is checked for ownership (or its parent object,
6743         #         in case if \a theObjectIndex is non-zero).
6744         #  @param aSubObjectIndex When non-zero, specifies a sub-shape index that
6745         #         identifies a sub-object within its parent specified via \a theSubObject.
6746         #  @param anObjectIndex When non-zero, specifies a sub-shape index that
6747         #         identifies an object within its parent specified via \a theObject.
6748         #  @return TRUE, if the given object contains sub-object.
6749         @ManageTransactions("ShapesOp")
6750         def IsSubShapeBelongsTo(self, aSubObject, anObject, aSubObjectIndex = 0, anObjectIndex = 0):
6751             """
6752             Check if the object is a sub-object of another GEOM object.
6753             
6754             Parameters:
6755                 aSubObject Checked sub-object (or its parent object, in case if
6756                     \a theSubObjectIndex is non-zero).
6757                 anObject An object that is checked for ownership (or its parent object,
6758                     in case if \a theObjectIndex is non-zero).
6759                 aSubObjectIndex When non-zero, specifies a sub-shape index that
6760                     identifies a sub-object within its parent specified via \a theSubObject.
6761                 anObjectIndex When non-zero, specifies a sub-shape index that
6762                     identifies an object within its parent specified via \a theObject.
6763
6764             Returns
6765                 TRUE, if the given object contains sub-object.
6766             """
6767             IsOk = self.ShapesOp.IsSubShapeBelongsTo(aSubObject, aSubObjectIndex, anObject, anObjectIndex)
6768             RaiseIfFailed("IsSubShapeBelongsTo", self.ShapesOp)
6769             return IsOk
6770
6771         ## Perform extraction of sub-shapes from the main shape.
6772         #
6773         #  @param theShape the main shape
6774         #  @param theListOfID the list of sub-shape IDs to be extracted from
6775         #         the main shape.
6776         #  @return New GEOM.GEOM_Object, containing the shape without
6777         #          extracted sub-shapes.
6778         #
6779         #  @ref swig_MakeExtraction "Example"
6780         @ManageTransactions("ShapesOp")
6781         def MakeExtraction(self, theShape, theListOfID, theName=None):
6782             """
6783             Perform extraction of sub-shapes from the main shape.
6784
6785             Parameters:
6786                 theShape the main shape
6787                 theListOfID the list of sub-shape IDs to be extracted from
6788                             the main shape.
6789
6790             Returns
6791                 New GEOM.GEOM_Object, containing the shape without
6792                 extracted sub-shapes.
6793             """
6794             # Example: see GEOM_TestAll.py
6795             (anObj, aStat) = self.ShapesOp.MakeExtraction(theShape, theListOfID)
6796             RaiseIfFailed("MakeExtraction", self.ShapesOp)
6797             self._autoPublish(anObj, theName, "Extraction")
6798             return anObj
6799
6800         # end of l4_decompose
6801         ## @}
6802
6803         ## @addtogroup l4_decompose_d
6804         ## @{
6805
6806         ## Deprecated method
6807         #  It works like SubShapeAllSortedCentres(), but wrongly
6808         #  defines centres of faces, shells and solids.
6809         @ManageTransactions("ShapesOp")
6810         def SubShapeAllSorted(self, aShape, aType, theName=None):
6811             """
6812             Deprecated method
6813             It works like geompy.SubShapeAllSortedCentres, but wrongly
6814             defines centres of faces, shells and solids.
6815             """
6816             ListObj = self.ShapesOp.MakeExplode(aShape, EnumToLong( aType ), True)
6817             RaiseIfFailed("MakeExplode", self.ShapesOp)
6818             self._autoPublish(ListObj, theName, "subshape")
6819             return ListObj
6820
6821         ## Deprecated method
6822         #  It works like SubShapeAllSortedCentresIDs(), but wrongly
6823         #  defines centres of faces, shells and solids.
6824         @ManageTransactions("ShapesOp")
6825         def SubShapeAllSortedIDs(self, aShape, aType):
6826             """
6827             Deprecated method
6828             It works like geompy.SubShapeAllSortedCentresIDs, but wrongly
6829             defines centres of faces, shells and solids.
6830             """
6831             ListIDs = self.ShapesOp.SubShapeAllIDs(aShape, EnumToLong( aType ), True)
6832             RaiseIfFailed("SubShapeAllIDs", self.ShapesOp)
6833             return ListIDs
6834
6835         ## Deprecated method
6836         #  It works like SubShapeSortedCentres(), but has a bug
6837         #  (wrongly defines centres of faces, shells and solids).
6838         def SubShapeSorted(self, aShape, aType, ListOfInd, theName=None):
6839             """
6840             Deprecated method
6841             It works like geompy.SubShapeSortedCentres, but has a bug
6842             (wrongly defines centres of faces, shells and solids).
6843             """
6844             ListOfIDs = []
6845             AllShapeIDsList = self.SubShapeAllSortedIDs(aShape, EnumToLong( aType ))
6846             for ind in ListOfInd:
6847                 ListOfIDs.append(AllShapeIDsList[ind - 1])
6848             # note: auto-publishing is done in self.GetSubShape()
6849             anObj = self.GetSubShape(aShape, ListOfIDs, theName)
6850             return anObj
6851
6852         # end of l4_decompose_d
6853         ## @}
6854
6855         ## @addtogroup l3_healing
6856         ## @{
6857
6858         ## Apply a sequence of Shape Healing operators to the given object.
6859         #  @param theShape Shape to be processed.
6860         #  @param theOperators List of names of operators ("FixShape", "SplitClosedFaces", etc.).
6861         #  @param theParameters List of names of parameters
6862         #                    ("FixShape.Tolerance3d", "SplitClosedFaces.NbSplitPoints", etc.).
6863         #  @param theValues List of values of parameters, in the same order
6864         #                    as parameters are listed in <VAR>theParameters</VAR> list.
6865         #  @param theName Object name; when specified, this parameter is used
6866         #         for result publication in the study. Otherwise, if automatic
6867         #         publication is switched on, default value is used for result name.
6868         #
6869         #  <b> Operators and Parameters: </b> \n
6870         #
6871         #  * \b FixShape - corrects invalid shapes. \n
6872         #  - \b FixShape.Tolerance3d - work tolerance for detection of the problems and correction of them. \n
6873         #  - \b FixShape.MaxTolerance3d - maximal possible tolerance of the shape after correction. \n
6874         #
6875         #  * \b FixFaceSize - removes small faces, such as spots and strips.\n
6876         #  - \b FixFaceSize.Tolerance - defines minimum possible face size. \n
6877         #  - \b DropSmallEdges - removes edges, which merge with neighbouring edges. \n
6878         #  - \b DropSmallEdges.Tolerance3d - defines minimum possible distance between two parallel edges.\n
6879         #  - \b DropSmallSolids - either removes small solids or merges them with neighboring ones. \n
6880         #  - \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
6881         #  - \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
6882         #  - \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
6883         #
6884         #  * \b SplitAngle - splits faces based on conical surfaces, surfaces of revolution and cylindrical
6885         #    surfaces in segments using a certain angle. \n
6886         #  - \b SplitAngle.Angle - the central angle of the resulting segments (i.e. we obtain two segments
6887         #    if Angle=180, four if Angle=90, etc). \n
6888         #  - \b SplitAngle.MaxTolerance - maximum possible tolerance among the resulting segments.\n
6889         #
6890         #  * \b SplitClosedFaces - splits closed faces in segments.
6891         #    The number of segments depends on the number of splitting points.\n
6892         #  - \b SplitClosedFaces.NbSplitPoints - the number of splitting points.\n
6893         #
6894         #  * \b SplitContinuity - splits shapes to reduce continuities of curves and surfaces.\n
6895         #  - \b SplitContinuity.Tolerance3d - 3D tolerance for correction of geometry.\n
6896         #  - \b SplitContinuity.SurfaceContinuity - required continuity for surfaces.\n
6897         #  - \b SplitContinuity.CurveContinuity - required continuity for curves.\n
6898         #   This and the previous parameters can take the following values:\n
6899         #   \b Parametric \b Continuity \n
6900         #   \b C0 (Positional Continuity): curves are joined (the end positions of curves or surfaces
6901         #   are coincidental. The curves or surfaces may still meet at an angle, giving rise to a sharp corner or edge).\n
6902         #   \b C1 (Tangential Continuity): first derivatives are equal (the end vectors of curves or surfaces are parallel,
6903         #    ruling out sharp edges).\n
6904         #   \b C2 (Curvature Continuity): first and second derivatives are equal (the end vectors of curves or surfaces
6905         #       are of the same magnitude).\n
6906         #   \b CN N-th derivatives are equal (both the direction and the magnitude of the Nth derivatives of curves
6907         #    or surfaces (d/du C(u)) are the same at junction. \n
6908         #   \b Geometric \b Continuity \n
6909         #   \b G1: first derivatives are proportional at junction.\n
6910         #   The curve tangents thus have the same direction, but not necessarily the same magnitude.
6911         #      i.e., C1'(1) = (a,b,c) and C2'(0) = (k*a, k*b, k*c).\n
6912         #   \b G2: first and second derivatives are proportional at junction.
6913         #   As the names imply, geometric continuity requires the geometry to be continuous, while parametric
6914         #    continuity requires that the underlying parameterization was continuous as well.
6915         #   Parametric continuity of order n implies geometric continuity of order n, but not vice-versa.\n
6916         #
6917         #  * \b BsplineRestriction - converts curves and surfaces to Bsplines and processes them with the following parameters:\n
6918         #  - \b BSplineRestriction.SurfaceMode - approximation of surfaces if restriction is necessary.\n
6919         #  - \b BSplineRestriction.Curve3dMode - conversion of any 3D curve to BSpline and approximation.\n
6920         #  - \b BSplineRestriction.Curve2dMode - conversion of any 2D curve to BSpline and approximation.\n
6921         #  - \b BSplineRestriction.Tolerance3d - defines the possibility of surfaces and 3D curves approximation
6922         #       with the specified parameters.\n
6923         #  - \b BSplineRestriction.Tolerance2d - defines the possibility of surfaces and 2D curves approximation
6924         #       with the specified parameters.\n
6925         #  - \b BSplineRestriction.RequiredDegree - required degree of the resulting BSplines.\n
6926         #  - \b BSplineRestriction.RequiredNbSegments - required maximum number of segments of resultant BSplines.\n
6927         #  - \b BSplineRestriction.Continuity3d - continuity of the resulting surfaces and 3D curves.\n
6928         #  - \b BSplineRestriction.Continuity2d - continuity of the resulting 2D curves.\n
6929         #
6930         #  * \b ToBezier - converts curves and surfaces of any type to Bezier curves and surfaces.\n
6931         #  - \b ToBezier.SurfaceMode - if checked in, allows conversion of surfaces.\n
6932         #  - \b ToBezier.Curve3dMode - if checked in, allows conversion of 3D curves.\n
6933         #  - \b ToBezier.Curve2dMode - if checked in, allows conversion of 2D curves.\n
6934         #  - \b ToBezier.MaxTolerance - defines tolerance for detection and correction of problems.\n
6935         #
6936         #  * \b SameParameter - fixes edges of 2D and 3D curves not having the same parameter.\n
6937         #  - \b SameParameter.Tolerance3d - defines tolerance for fixing of edges.\n
6938         #
6939         #
6940         #  @return New GEOM.GEOM_Object, containing processed shape.
6941         #
6942         #  \n @ref tui_shape_processing "Example"
6943         @ManageTransactions("HealOp")
6944         def ProcessShape(self, theShape, theOperators, theParameters, theValues, theName=None):
6945             """
6946             Apply a sequence of Shape Healing operators to the given object.
6947
6948             Parameters:
6949                 theShape Shape to be processed.
6950                 theValues List of values of parameters, in the same order
6951                           as parameters are listed in theParameters list.
6952                 theOperators List of names of operators ('FixShape', 'SplitClosedFaces', etc.).
6953                 theParameters List of names of parameters
6954                               ('FixShape.Tolerance3d', 'SplitClosedFaces.NbSplitPoints', etc.).
6955                 theName Object name; when specified, this parameter is used
6956                         for result publication in the study. Otherwise, if automatic
6957                         publication is switched on, default value is used for result name.
6958
6959                 Operators and Parameters:
6960
6961                  * FixShape - corrects invalid shapes.
6962                      * FixShape.Tolerance3d - work tolerance for detection of the problems and correction of them.
6963                      * FixShape.MaxTolerance3d - maximal possible tolerance of the shape after correction.
6964                  * FixFaceSize - removes small faces, such as spots and strips.
6965                      * FixFaceSize.Tolerance - defines minimum possible face size.
6966                  * DropSmallEdges - removes edges, which merge with neighbouring edges.
6967                      * DropSmallEdges.Tolerance3d - defines minimum possible distance between two parallel edges.
6968                  * DropSmallSolids - either removes small solids or merges them with neighboring ones.
6969                      * 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.
6970                      * 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.
6971                      * 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.
6972
6973                  * SplitAngle - splits faces based on conical surfaces, surfaces of revolution and cylindrical surfaces
6974                                 in segments using a certain angle.
6975                      * SplitAngle.Angle - the central angle of the resulting segments (i.e. we obtain two segments
6976                                           if Angle=180, four if Angle=90, etc).
6977                      * SplitAngle.MaxTolerance - maximum possible tolerance among the resulting segments.
6978                  * SplitClosedFaces - splits closed faces in segments. The number of segments depends on the number of
6979                                       splitting points.
6980                      * SplitClosedFaces.NbSplitPoints - the number of splitting points.
6981                  * SplitContinuity - splits shapes to reduce continuities of curves and surfaces.
6982                      * SplitContinuity.Tolerance3d - 3D tolerance for correction of geometry.
6983                      * SplitContinuity.SurfaceContinuity - required continuity for surfaces.
6984                      * SplitContinuity.CurveContinuity - required continuity for curves.
6985                        This and the previous parameters can take the following values:
6986
6987                        Parametric Continuity:
6988                        C0 (Positional Continuity): curves are joined (the end positions of curves or surfaces are
6989                                                    coincidental. The curves or surfaces may still meet at an angle,
6990                                                    giving rise to a sharp corner or edge).
6991                        C1 (Tangential Continuity): first derivatives are equal (the end vectors of curves or surfaces
6992                                                    are parallel, ruling out sharp edges).
6993                        C2 (Curvature Continuity): first and second derivatives are equal (the end vectors of curves
6994                                                   or surfaces are of the same magnitude).
6995                        CN N-th derivatives are equal (both the direction and the magnitude of the Nth derivatives of
6996                           curves or surfaces (d/du C(u)) are the same at junction.
6997
6998                        Geometric Continuity:
6999                        G1: first derivatives are proportional at junction.
7000                            The curve tangents thus have the same direction, but not necessarily the same magnitude.
7001                            i.e., C1'(1) = (a,b,c) and C2'(0) = (k*a, k*b, k*c).
7002                        G2: first and second derivatives are proportional at junction. As the names imply,
7003                            geometric continuity requires the geometry to be continuous, while parametric continuity requires
7004                            that the underlying parameterization was continuous as well. Parametric continuity of order n implies
7005                            geometric continuity of order n, but not vice-versa.
7006                  * BsplineRestriction - converts curves and surfaces to Bsplines and processes them with the following parameters:
7007                      * BSplineRestriction.SurfaceMode - approximation of surfaces if restriction is necessary.
7008                      * BSplineRestriction.Curve3dMode - conversion of any 3D curve to BSpline and approximation.
7009                      * BSplineRestriction.Curve2dMode - conversion of any 2D curve to BSpline and approximation.
7010                      * BSplineRestriction.Tolerance3d - defines the possibility of surfaces and 3D curves approximation with
7011                                                         the specified parameters.
7012                      * BSplineRestriction.Tolerance2d - defines the possibility of surfaces and 2D curves approximation with
7013                                                         the specified parameters.
7014                      * BSplineRestriction.RequiredDegree - required degree of the resulting BSplines.
7015                      * BSplineRestriction.RequiredNbSegments - required maximum number of segments of resultant BSplines.
7016                      * BSplineRestriction.Continuity3d - continuity of the resulting surfaces and 3D curves.
7017                      * BSplineRestriction.Continuity2d - continuity of the resulting 2D curves.
7018                  * ToBezier - converts curves and surfaces of any type to Bezier curves and surfaces.
7019                      * ToBezier.SurfaceMode - if checked in, allows conversion of surfaces.
7020                      * ToBezier.Curve3dMode - if checked in, allows conversion of 3D curves.
7021                      * ToBezier.Curve2dMode - if checked in, allows conversion of 2D curves.
7022                      * ToBezier.MaxTolerance - defines tolerance for detection and correction of problems.
7023                  * SameParameter - fixes edges of 2D and 3D curves not having the same parameter.
7024                      * SameParameter.Tolerance3d - defines tolerance for fixing of edges.
7025
7026             Returns:
7027                 New GEOM.GEOM_Object, containing processed shape.
7028
7029             Note: For more information look through SALOME Geometry User's Guide->
7030                   -> Introduction to Geometry-> Repairing Operations-> Shape Processing
7031             """
7032             # Example: see GEOM_TestHealing.py
7033             theValues,Parameters = ParseList(theValues)
7034             anObj = self.HealOp.ProcessShape(theShape, theOperators, theParameters, theValues)
7035             # To avoid script failure in case of good argument shape
7036             if self.HealOp.GetErrorCode() == "ShHealOper_NotError_msg":
7037                 return theShape
7038             RaiseIfFailed("ProcessShape", self.HealOp)
7039             for string in (theOperators + theParameters):
7040                 Parameters = ":" + Parameters
7041                 pass
7042             anObj.SetParameters(Parameters)
7043             self._autoPublish(anObj, theName, "healed")
7044             return anObj
7045
7046         ## Remove faces from the given object (shape).
7047         #  @param theObject Shape to be processed.
7048         #  @param theFaces Indices of faces to be removed, if EMPTY then the method
7049         #                  removes ALL faces of the given object.
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_suppress_faces "Example"
7057         @ManageTransactions("HealOp")
7058         def SuppressFaces(self, theObject, theFaces, theName=None):
7059             """
7060             Remove faces from the given object (shape).
7061
7062             Parameters:
7063                 theObject Shape to be processed.
7064                 theFaces Indices of faces to be removed, if EMPTY then the method
7065                          removes ALL faces of the given object.
7066                 theName Object name; when specified, this parameter is used
7067                         for result publication in the study. Otherwise, if automatic
7068                         publication is switched on, default value is used for result name.
7069
7070             Returns:
7071                 New GEOM.GEOM_Object, containing processed shape.
7072             """
7073             # Example: see GEOM_TestHealing.py
7074             anObj = self.HealOp.SuppressFaces(theObject, theFaces)
7075             RaiseIfFailed("SuppressFaces", self.HealOp)
7076             self._autoPublish(anObj, theName, "suppressFaces")
7077             return anObj
7078
7079         ## Sewing of faces into a single shell.
7080         #  @param ListShape Shapes to be processed.
7081         #  @param theTolerance Required tolerance value.
7082         #  @param AllowNonManifold Flag that allows non-manifold sewing.
7083         #  @param theName Object name; when specified, this parameter is used
7084         #         for result publication in the study. Otherwise, if automatic
7085         #         publication is switched on, default value is used for result name.
7086         #
7087         #  @return New GEOM.GEOM_Object, containing a result shell.
7088         #
7089         #  @ref tui_sewing "Example"
7090         def MakeSewing(self, ListShape, theTolerance, AllowNonManifold=False, theName=None):
7091             """
7092             Sewing of faces into a single shell.
7093
7094             Parameters:
7095                 ListShape Shapes to be processed.
7096                 theTolerance Required tolerance value.
7097                 AllowNonManifold Flag that allows non-manifold sewing.
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 containing a result shell.
7104             """
7105             # Example: see GEOM_TestHealing.py
7106             # note: auto-publishing is done in self.Sew()
7107             anObj = self.Sew(ListShape, theTolerance, AllowNonManifold, theName)
7108             return anObj
7109
7110         ## Sewing of faces into a single shell.
7111         #  @param ListShape Shapes to be processed.
7112         #  @param theTolerance Required tolerance value.
7113         #  @param AllowNonManifold Flag that allows non-manifold sewing.
7114         #  @param theName Object name; when specified, this parameter is used
7115         #         for result publication in the study. Otherwise, if automatic
7116         #         publication is switched on, default value is used for result name.
7117         #
7118         #  @return New GEOM.GEOM_Object, containing a result shell.
7119         @ManageTransactions("HealOp")
7120         def Sew(self, ListShape, theTolerance, AllowNonManifold=False, theName=None):
7121             """
7122             Sewing of faces into a single shell.
7123
7124             Parameters:
7125                 ListShape Shapes to be processed.
7126                 theTolerance Required tolerance value.
7127                 AllowNonManifold Flag that allows non-manifold sewing.
7128                 theName Object name; when specified, this parameter is used
7129                         for result publication in the study. Otherwise, if automatic
7130                         publication is switched on, default value is used for result name.
7131
7132             Returns:
7133                 New GEOM.GEOM_Object, containing a result shell.
7134             """
7135             # Example: see MakeSewing() above
7136             theTolerance,Parameters = ParseParameters(theTolerance)
7137             if AllowNonManifold:
7138                 anObj = self.HealOp.SewAllowNonManifold( ToList( ListShape ), theTolerance)
7139             else:
7140                 anObj = self.HealOp.Sew( ToList( ListShape ), theTolerance)
7141             # To avoid script failure in case of good argument shape
7142             # (Fix of test cases geom/bugs11/L7,L8)
7143             if self.HealOp.GetErrorCode() == "ShHealOper_NotError_msg":
7144                 return anObj
7145             RaiseIfFailed("Sew", self.HealOp)
7146             anObj.SetParameters(Parameters)
7147             self._autoPublish(anObj, theName, "sewed")
7148             return anObj
7149
7150         ## Rebuild the topology of theSolids by removing
7151         #  the faces that are shared by several solids.
7152         #  @param theSolids A compound or a list of solids to be processed.
7153         #  @param theName Object name; when specified, this parameter is used
7154         #         for result publication in the study. Otherwise, if automatic
7155         #         publication is switched on, default value is used for result name.
7156         #
7157         #  @return New GEOM.GEOM_Object, containing processed shape.
7158         #
7159         #  @ref tui_remove_webs "Example"
7160         @ManageTransactions("HealOp")
7161         def RemoveInternalFaces (self, theSolids, theName=None):
7162             """
7163             Rebuild the topology of theSolids by removing
7164             the faces that are shared by several solids.
7165
7166             Parameters:
7167                 theSolids A compound or a list of solids to be processed.
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.RemoveInternalFaces(ToList(theSolids))
7177             RaiseIfFailed("RemoveInternalFaces", self.HealOp)
7178             self._autoPublish(anObj, theName, "removeWebs")
7179             return anObj
7180
7181         ## Remove internal wires and edges from the given object (face).
7182         #  @param theObject Shape to be processed.
7183         #  @param theWires Indices of wires to be removed, if EMPTY then the method
7184         #                  removes ALL internal wires of the given object.
7185         #  @param theName Object name; when specified, this parameter is used
7186         #         for result publication in the study. Otherwise, if automatic
7187         #         publication is switched on, default value is used for result name.
7188         #
7189         #  @return New GEOM.GEOM_Object, containing processed shape.
7190         #
7191         #  @ref tui_suppress_internal_wires "Example"
7192         @ManageTransactions("HealOp")
7193         def SuppressInternalWires(self, theObject, theWires, theName=None):
7194             """
7195             Remove internal wires and edges from the given object (face).
7196
7197             Parameters:
7198                 theObject Shape to be processed.
7199                 theWires Indices of wires to be removed, if EMPTY then the method
7200                          removes ALL internal wires of the given object.
7201                 theName Object name; when specified, this parameter is used
7202                         for result publication in the study. Otherwise, if automatic
7203                         publication is switched on, default value is used for result name.
7204
7205             Returns:
7206                 New GEOM.GEOM_Object, containing processed shape.
7207             """
7208             # Example: see GEOM_TestHealing.py
7209             anObj = self.HealOp.RemoveIntWires(theObject, theWires)
7210             RaiseIfFailed("RemoveIntWires", self.HealOp)
7211             self._autoPublish(anObj, theName, "suppressWires")
7212             return anObj
7213
7214         ## Remove internal closed contours (holes) from the given object.
7215         #  @param theObject Shape to be processed.
7216         #  @param theWires Indices of wires to be removed, if EMPTY then the method
7217         #                  removes ALL internal holes of the given object
7218         #  @param theName Object name; when specified, this parameter is used
7219         #         for result publication in the study. Otherwise, if automatic
7220         #         publication is switched on, default value is used for result name.
7221         #
7222         #  @return New GEOM.GEOM_Object, containing processed shape.
7223         #
7224         #  @ref tui_suppress_holes "Example"
7225         @ManageTransactions("HealOp")
7226         def SuppressHoles(self, theObject, theWires, theName=None):
7227             """
7228             Remove internal closed contours (holes) from the given object.
7229
7230             Parameters:
7231                 theObject Shape to be processed.
7232                 theWires Indices of wires to be removed, if EMPTY then the method
7233                          removes ALL internal holes of the given object
7234                 theName Object name; when specified, this parameter is used
7235                         for result publication in the study. Otherwise, if automatic
7236                         publication is switched on, default value is used for result name.
7237
7238             Returns:
7239                 New GEOM.GEOM_Object, containing processed shape.
7240             """
7241             # Example: see GEOM_TestHealing.py
7242             anObj = self.HealOp.FillHoles(theObject, theWires)
7243             RaiseIfFailed("FillHoles", self.HealOp)
7244             self._autoPublish(anObj, theName, "suppressHoles")
7245             return anObj
7246
7247         ## Close an open wire.
7248         #  @param theObject Shape to be processed.
7249         #  @param theWires Indexes of edge(s) and wire(s) to be closed within <VAR>theObject</VAR>'s shape,
7250         #                  if [ ], then <VAR>theObject</VAR> itself is a wire.
7251         #  @param isCommonVertex If True  : closure by creation of a common vertex,
7252         #                        If False : closure by creation of an edge between ends.
7253         #  @param theName Object name; when specified, this parameter is used
7254         #         for result publication in the study. Otherwise, if automatic
7255         #         publication is switched on, default value is used for result name.
7256         #
7257         #  @return New GEOM.GEOM_Object, containing processed shape.
7258         #
7259         #  @ref tui_close_contour "Example"
7260         @ManageTransactions("HealOp")
7261         def CloseContour(self,theObject, theWires, isCommonVertex, theName=None):
7262             """
7263             Close an open wire.
7264
7265             Parameters:
7266                 theObject Shape to be processed.
7267                 theWires Indexes of edge(s) and wire(s) to be closed within theObject's shape,
7268                          if [ ], then theObject itself is a wire.
7269                 isCommonVertex If True  : closure by creation of a common vertex,
7270                                If False : closure by creation of an edge between ends.
7271                 theName Object name; when specified, this parameter is used
7272                         for result publication in the study. Otherwise, if automatic
7273                         publication is switched on, default value is used for result name.
7274
7275             Returns:
7276                 New GEOM.GEOM_Object, containing processed shape.
7277             """
7278             # Example: see GEOM_TestHealing.py
7279             anObj = self.HealOp.CloseContour(theObject, theWires, isCommonVertex)
7280             RaiseIfFailed("CloseContour", self.HealOp)
7281             self._autoPublish(anObj, theName, "closeContour")
7282             return anObj
7283
7284         ## Addition of a point to a given edge object.
7285         #  @param theObject Shape to be processed.
7286         #  @param theEdgeIndex Index of edge to be divided within theObject's shape,
7287         #                      if -1, then theObject itself is the edge.
7288         #  @param theValue Value of parameter on edge or length parameter,
7289         #                  depending on \a isByParameter.
7290         #  @param isByParameter If TRUE : \a theValue is treated as a curve parameter [0..1], \n
7291         #                       if FALSE : \a theValue is treated as a length parameter [0..1]
7292         #  @param theName Object name; when specified, this parameter is used
7293         #         for result publication in the study. Otherwise, if automatic
7294         #         publication is switched on, default value is used for result name.
7295         #
7296         #  @return New GEOM.GEOM_Object, containing processed shape.
7297         #
7298         #  @ref tui_add_point_on_edge "Example"
7299         @ManageTransactions("HealOp")
7300         def DivideEdge(self, theObject, theEdgeIndex, theValue, isByParameter, theName=None):
7301             """
7302             Addition of a point to a given edge object.
7303
7304             Parameters:
7305                 theObject Shape to be processed.
7306                 theEdgeIndex Index of edge to be divided within theObject's shape,
7307                              if -1, then theObject itself is the edge.
7308                 theValue Value of parameter on edge or length parameter,
7309                          depending on isByParameter.
7310                 isByParameter If TRUE :  theValue is treated as a curve parameter [0..1],
7311                               if FALSE : theValue is treated as a length parameter [0..1]
7312                 theName Object name; when specified, this parameter is used
7313                         for result publication in the study. Otherwise, if automatic
7314                         publication is switched on, default value is used for result name.
7315
7316             Returns:
7317                 New GEOM.GEOM_Object, containing processed shape.
7318             """
7319             # Example: see GEOM_TestHealing.py
7320             theEdgeIndex,theValue,isByParameter,Parameters = ParseParameters(theEdgeIndex,theValue,isByParameter)
7321             anObj = self.HealOp.DivideEdge(theObject, theEdgeIndex, theValue, isByParameter)
7322             RaiseIfFailed("DivideEdge", self.HealOp)
7323             anObj.SetParameters(Parameters)
7324             self._autoPublish(anObj, theName, "divideEdge")
7325             return anObj
7326
7327         ## Addition of points to a given edge of \a theObject by projecting
7328         #  other points to the given edge.
7329         #  @param theObject Shape to be processed.
7330         #  @param theEdgeIndex Index of edge to be divided within theObject's shape,
7331         #                      if -1, then theObject itself is the edge.
7332         #  @param thePoints List of points to project to theEdgeIndex-th edge.
7333         #  @param theName Object name; when specified, this parameter is used
7334         #         for result publication in the study. Otherwise, if automatic
7335         #         publication is switched on, default value is used for result name.
7336         #
7337         #  @return New GEOM.GEOM_Object, containing processed shape.
7338         #
7339         #  @ref tui_add_point_on_edge "Example"
7340         @ManageTransactions("HealOp")
7341         def DivideEdgeByPoint(self, theObject, theEdgeIndex, thePoints, theName=None):
7342             """
7343             Addition of points to a given edge of \a theObject by projecting
7344             other points to the given edge.
7345
7346             Parameters:
7347                 theObject Shape to be processed.
7348                 theEdgeIndex The edge or its index to be divided within theObject's shape,
7349                              if -1, then theObject itself is the edge.
7350                 thePoints List of points to project to theEdgeIndex-th edge.
7351                 theName Object name; when specified, this parameter is used
7352                         for result publication in the study. Otherwise, if automatic
7353                         publication is switched on, default value is used for result name.
7354
7355             Returns:
7356                 New GEOM.GEOM_Object, containing processed shape.
7357             """
7358             # Example: see GEOM_TestHealing.py
7359             if isinstance( theEdgeIndex, GEOM._objref_GEOM_Object ):
7360                 theEdgeIndex = self.GetSubShapeID( theObject, theEdgeIndex )
7361             anObj = self.HealOp.DivideEdgeByPoint(theObject, theEdgeIndex, ToList( thePoints ))
7362             RaiseIfFailed("DivideEdgeByPoint", self.HealOp)
7363             self._autoPublish(anObj, theName, "divideEdge")
7364             return anObj
7365
7366         ## Suppress the vertices in the wire in case if adjacent edges are C1 continuous.
7367         #  @param theWire Wire to minimize the number of C1 continuous edges in.
7368         #  @param theVertices A list of vertices to suppress. If the list
7369         #                     is empty, all vertices in a wire will be assumed.
7370         #  @param theName Object name; when specified, this parameter is used
7371         #         for result publication in the study. Otherwise, if automatic
7372         #         publication is switched on, default value is used for result name.
7373         #
7374         #  @return New GEOM.GEOM_Object with modified wire.
7375         #
7376         #  @ref tui_fuse_collinear_edges "Example"
7377         @ManageTransactions("HealOp")
7378         def FuseCollinearEdgesWithinWire(self, theWire, theVertices = [], theName=None):
7379             """
7380             Suppress the vertices in the wire in case if adjacent edges are C1 continuous.
7381
7382             Parameters:
7383                 theWire Wire to minimize the number of C1 continuous edges in.
7384                 theVertices A list of vertices to suppress. If the list
7385                             is empty, all vertices in a wire will be assumed.
7386                 theName Object name; when specified, this parameter is used
7387                         for result publication in the study. Otherwise, if automatic
7388                         publication is switched on, default value is used for result name.
7389
7390             Returns:
7391                 New GEOM.GEOM_Object with modified wire.
7392             """
7393             anObj = self.HealOp.FuseCollinearEdgesWithinWire(theWire, theVertices)
7394             RaiseIfFailed("FuseCollinearEdgesWithinWire", self.HealOp)
7395             self._autoPublish(anObj, theName, "fuseEdges")
7396             return anObj
7397
7398         ## Change orientation of the given object. Updates given shape.
7399         #  @param theObject Shape to be processed.
7400         #  @return Updated <var>theObject</var>
7401         #
7402         #  @ref swig_todo "Example"
7403         @ManageTransactions("HealOp")
7404         def ChangeOrientationShell(self,theObject):
7405             """
7406             Change orientation of the given object. Updates given shape.
7407
7408             Parameters:
7409                 theObject Shape to be processed.
7410
7411             Returns:
7412                 Updated theObject
7413             """
7414             theObject = self.HealOp.ChangeOrientation(theObject)
7415             RaiseIfFailed("ChangeOrientation", self.HealOp)
7416             pass
7417
7418         ## Change orientation of the given object.
7419         #  @param theObject Shape to be processed.
7420         #  @param theName Object name; when specified, this parameter is used
7421         #         for result publication in the study. Otherwise, if automatic
7422         #         publication is switched on, default value is used for result name.
7423         #
7424         #  @return New GEOM.GEOM_Object, containing processed shape.
7425         #
7426         #  @ref swig_todo "Example"
7427         @ManageTransactions("HealOp")
7428         def ChangeOrientationShellCopy(self, theObject, theName=None):
7429             """
7430             Change orientation of the given object.
7431
7432             Parameters:
7433                 theObject Shape to be processed.
7434                 theName Object name; when specified, this parameter is used
7435                         for result publication in the study. Otherwise, if automatic
7436                         publication is switched on, default value is used for result name.
7437
7438             Returns:
7439                 New GEOM.GEOM_Object, containing processed shape.
7440             """
7441             anObj = self.HealOp.ChangeOrientationCopy(theObject)
7442             RaiseIfFailed("ChangeOrientationCopy", self.HealOp)
7443             self._autoPublish(anObj, theName, "reversed")
7444             return anObj
7445
7446         ## Try to limit tolerance of the given object by value \a theTolerance.
7447         #  @param theObject Shape to be processed.
7448         #  @param theTolerance Required tolerance value.
7449         #  @param theName Object name; when specified, this parameter is used
7450         #         for result publication in the study. Otherwise, if automatic
7451         #         publication is switched on, default value is used for result name.
7452         #
7453         #  @return New GEOM.GEOM_Object, containing processed shape.
7454         #
7455         #  @ref tui_limit_tolerance "Example"
7456         @ManageTransactions("HealOp")
7457         def LimitTolerance(self, theObject, theTolerance = 1e-07, theName=None):
7458             """
7459             Try to limit tolerance of the given object by value theTolerance.
7460
7461             Parameters:
7462                 theObject Shape to be processed.
7463                 theTolerance Required tolerance value.
7464                 theName Object name; when specified, this parameter is used
7465                         for result publication in the study. Otherwise, if automatic
7466                         publication is switched on, default value is used for result name.
7467
7468             Returns:
7469                 New GEOM.GEOM_Object, containing processed shape.
7470             """
7471             anObj = self.HealOp.LimitTolerance(theObject, theTolerance)
7472             RaiseIfFailed("LimitTolerance", self.HealOp)
7473             self._autoPublish(anObj, theName, "limitTolerance")
7474             return anObj
7475
7476         ## Get a list of wires (wrapped in GEOM.GEOM_Object-s),
7477         #  that constitute a free boundary of the given shape.
7478         #  @param theObject Shape to get free boundary of.
7479         #  @param theName Object name; when specified, this parameter is used
7480         #         for result publication in the study. Otherwise, if automatic
7481         #         publication is switched on, default value is used for result name.
7482         #
7483         #  @return [\a status, \a theClosedWires, \a theOpenWires]
7484         #  \n \a status: FALSE, if an error(s) occurred during the method execution.
7485         #  \n \a theClosedWires: Closed wires on the free boundary of the given shape.
7486         #  \n \a theOpenWires: Open wires on the free boundary of the given shape.
7487         #
7488         #  @ref tui_free_boundaries_page "Example"
7489         @ManageTransactions("HealOp")
7490         def GetFreeBoundary(self, theObject, theName=None):
7491             """
7492             Get a list of wires (wrapped in GEOM.GEOM_Object-s),
7493             that constitute a free boundary of the given shape.
7494
7495             Parameters:
7496                 theObject Shape to get free boundary of.
7497                 theName Object name; when specified, this parameter is used
7498                         for result publication in the study. Otherwise, if automatic
7499                         publication is switched on, default value is used for result name.
7500
7501             Returns:
7502                 [status, theClosedWires, theOpenWires]
7503                  status: FALSE, if an error(s) occurred during the method execution.
7504                  theClosedWires: Closed wires on the free boundary of the given shape.
7505                  theOpenWires: Open wires on the free boundary of the given shape.
7506             """
7507             # Example: see GEOM_TestHealing.py
7508             anObj = self.HealOp.GetFreeBoundary( ToList( theObject ))
7509             RaiseIfFailed("GetFreeBoundary", self.HealOp)
7510             self._autoPublish(anObj[1], theName, "closedWire")
7511             self._autoPublish(anObj[2], theName, "openWire")
7512             return anObj
7513
7514         ## Replace coincident faces in \a theShapes by one face.
7515         #  @param theShapes Initial shapes, either a list or compound of shapes.
7516         #  @param theTolerance Maximum distance between faces, which can be considered as coincident.
7517         #  @param doKeepNonSolids If FALSE, only solids will present in the result,
7518         #                         otherwise all initial shapes.
7519         #  @param theName Object name; when specified, this parameter is used
7520         #         for result publication in the study. Otherwise, if automatic
7521         #         publication is switched on, default value is used for result name.
7522         #
7523         #  @return New GEOM.GEOM_Object, containing copies of theShapes without coincident faces.
7524         #
7525         #  @ref tui_glue_faces "Example"
7526         @ManageTransactions("ShapesOp")
7527         def MakeGlueFaces(self, theShapes, theTolerance, doKeepNonSolids=True, theName=None):
7528             """
7529             Replace coincident faces in theShapes by one face.
7530
7531             Parameters:
7532                 theShapes Initial shapes, either a list or compound of shapes.
7533                 theTolerance Maximum distance between faces, which can be considered as coincident.
7534                 doKeepNonSolids If FALSE, only solids will present in the result,
7535                                 otherwise all initial shapes.
7536                 theName Object name; when specified, this parameter is used
7537                         for result publication in the study. Otherwise, if automatic
7538                         publication is switched on, default value is used for result name.
7539
7540             Returns:
7541                 New GEOM.GEOM_Object, containing copies of theShapes without coincident faces.
7542             """
7543             # Example: see GEOM_Spanner.py
7544             theTolerance,Parameters = ParseParameters(theTolerance)
7545             anObj = self.ShapesOp.MakeGlueFaces(ToList(theShapes), theTolerance, doKeepNonSolids)
7546             if anObj is None:
7547                 raise RuntimeError("MakeGlueFaces : " + self.ShapesOp.GetErrorCode())
7548             anObj.SetParameters(Parameters)
7549             self._autoPublish(anObj, theName, "glueFaces")
7550             return anObj
7551
7552         ## Find coincident faces in \a theShapes for possible gluing.
7553         #  @param theShapes Initial shapes, either a list or compound of shapes.
7554         #  @param theTolerance Maximum distance between faces,
7555         #                      which can be considered as coincident.
7556         #  @param theName Object name; when specified, this parameter is used
7557         #         for result publication in the study. Otherwise, if automatic
7558         #         publication is switched on, default value is used for result name.
7559         #
7560         #  @return GEOM.ListOfGO
7561         #
7562         #  @ref tui_glue_faces "Example"
7563         @ManageTransactions("ShapesOp")
7564         def GetGlueFaces(self, theShapes, theTolerance, theName=None):
7565             """
7566             Find coincident faces in theShapes for possible gluing.
7567
7568             Parameters:
7569                 theShapes Initial shapes, either a list or compound of shapes.
7570                 theTolerance Maximum distance between faces,
7571                              which can be considered as coincident.
7572                 theName Object name; when specified, this parameter is used
7573                         for result publication in the study. Otherwise, if automatic
7574                         publication is switched on, default value is used for result name.
7575
7576             Returns:
7577                 GEOM.ListOfGO
7578             """
7579             anObj = self.ShapesOp.GetGlueFaces(ToList(theShapes), theTolerance)
7580             RaiseIfFailed("GetGlueFaces", self.ShapesOp)
7581             self._autoPublish(anObj, theName, "facesToGlue")
7582             return anObj
7583
7584         ## Replace coincident faces in \a theShapes by one face
7585         #  in compliance with given list of faces
7586         #  @param theShapes Initial shapes, either a list or compound of shapes.
7587         #  @param theTolerance Maximum distance between faces,
7588         #                      which can be considered as coincident.
7589         #  @param theFaces List of faces for gluing.
7590         #  @param doKeepNonSolids If FALSE, only solids will present in the result,
7591         #                         otherwise all initial shapes.
7592         #  @param doGlueAllEdges If TRUE, all coincident edges of <VAR>theShape</VAR>
7593         #                        will be glued, otherwise only the edges,
7594         #                        belonging to <VAR>theFaces</VAR>.
7595         #  @param theName Object name; when specified, this parameter is used
7596         #         for result publication in the study. Otherwise, if automatic
7597         #         publication is switched on, default value is used for result name.
7598         #
7599         #  @return New GEOM.GEOM_Object, containing copies of theShapes without coincident faces.
7600         #
7601         #  @ref tui_glue_faces "Example"
7602         @ManageTransactions("ShapesOp")
7603         def MakeGlueFacesByList(self, theShapes, theTolerance, theFaces,
7604                                 doKeepNonSolids=True, doGlueAllEdges=True, theName=None):
7605             """
7606             Replace coincident faces in theShapes by one face
7607             in compliance with given list of faces
7608
7609             Parameters:
7610                 theShapes theShapes Initial shapes, either a list or compound of shapes.
7611                 theTolerance Maximum distance between faces,
7612                              which can be considered as coincident.
7613                 theFaces List of faces for gluing.
7614                 doKeepNonSolids If FALSE, only solids will present in the result,
7615                                 otherwise all initial shapes.
7616                 doGlueAllEdges If TRUE, all coincident edges of theShape
7617                                will be glued, otherwise only the edges,
7618                                belonging to theFaces.
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 faces.
7625             """
7626             anObj = self.ShapesOp.MakeGlueFacesByList(ToList(theShapes), theTolerance, ToList(theFaces),
7627                                                       doKeepNonSolids, doGlueAllEdges)
7628             if anObj is None:
7629                 raise RuntimeError("MakeGlueFacesByList : " + self.ShapesOp.GetErrorCode())
7630             self._autoPublish(anObj, theName, "glueFaces")
7631             return anObj
7632
7633         ## Replace coincident edges in \a theShapes by one edge.
7634         #  @param theShapes Initial shapes, either a list or compound of shapes.
7635         #  @param theTolerance Maximum distance between edges, which can be considered as coincident.
7636         #  @param theName Object name; when specified, this parameter is used
7637         #         for result publication in the study. Otherwise, if automatic
7638         #         publication is switched on, default value is used for result name.
7639         #
7640         #  @return New GEOM.GEOM_Object, containing copies of theShapes without coincident edges.
7641         #
7642         #  @ref tui_glue_edges "Example"
7643         @ManageTransactions("ShapesOp")
7644         def MakeGlueEdges(self, theShapes, theTolerance, theName=None):
7645             """
7646             Replace coincident edges in theShapes by one edge.
7647
7648             Parameters:
7649                 theShapes Initial shapes, either a list or compound of shapes.
7650                 theTolerance Maximum distance between edges, which can be considered as coincident.
7651                 theName Object name; when specified, this parameter is used
7652                         for result publication in the study. Otherwise, if automatic
7653                         publication is switched on, default value is used for result name.
7654
7655             Returns:
7656                 New GEOM.GEOM_Object, containing copies of theShapes without coincident edges.
7657             """
7658             theTolerance,Parameters = ParseParameters(theTolerance)
7659             anObj = self.ShapesOp.MakeGlueEdges(ToList(theShapes), theTolerance)
7660             if anObj is None:
7661                 raise RuntimeError("MakeGlueEdges : " + self.ShapesOp.GetErrorCode())
7662             anObj.SetParameters(Parameters)
7663             self._autoPublish(anObj, theName, "glueEdges")
7664             return anObj
7665
7666         ## Find coincident edges in \a theShapes for possible gluing.
7667         #  @param theShapes Initial shapes, either a list or compound of shapes.
7668         #  @param theTolerance Maximum distance between edges,
7669         #                      which can be considered as coincident.
7670         #  @param theName Object name; when specified, this parameter is used
7671         #         for result publication in the study. Otherwise, if automatic
7672         #         publication is switched on, default value is used for result name.
7673         #
7674         #  @return GEOM.ListOfGO
7675         #
7676         #  @ref tui_glue_edges "Example"
7677         @ManageTransactions("ShapesOp")
7678         def GetGlueEdges(self, theShapes, theTolerance, theName=None):
7679             """
7680             Find coincident edges in theShapes for possible gluing.
7681
7682             Parameters:
7683                 theShapes Initial shapes, either a list or compound of shapes.
7684                 theTolerance Maximum distance between edges,
7685                              which can be considered as coincident.
7686                 theName Object name; when specified, this parameter is used
7687                         for result publication in the study. Otherwise, if automatic
7688                         publication is switched on, default value is used for result name.
7689
7690             Returns:
7691                 GEOM.ListOfGO
7692             """
7693             anObj = self.ShapesOp.GetGlueEdges(ToList(theShapes), theTolerance)
7694             RaiseIfFailed("GetGlueEdges", self.ShapesOp)
7695             self._autoPublish(anObj, theName, "edgesToGlue")
7696             return anObj
7697
7698         ## Replace coincident edges in theShapes by one edge
7699         #  in compliance with given list of edges.
7700         #  @param theShapes Initial shapes, either a list or compound of shapes.
7701         #  @param theTolerance Maximum distance between edges,
7702         #                      which can be considered as coincident.
7703         #  @param theEdges List of edges for gluing.
7704         #  @param theName Object name; when specified, this parameter is used
7705         #         for result publication in the study. Otherwise, if automatic
7706         #         publication is switched on, default value is used for result name.
7707         #
7708         #  @return New GEOM.GEOM_Object, containing copies of theShapes without coincident edges.
7709         #
7710         #  @ref tui_glue_edges "Example"
7711         @ManageTransactions("ShapesOp")
7712         def MakeGlueEdgesByList(self, theShapes, theTolerance, theEdges, theName=None):
7713             """
7714             Replace coincident edges in theShapes by one edge
7715             in compliance with given list of edges.
7716
7717             Parameters:
7718                 theShapes Initial shapes, either a list or compound of shapes.
7719                 theTolerance Maximum distance between edges,
7720                              which can be considered as coincident.
7721                 theEdges List of edges for gluing.
7722                 theName Object name; when specified, this parameter is used
7723                         for result publication in the study. Otherwise, if automatic
7724                         publication is switched on, default value is used for result name.
7725
7726             Returns:
7727                 New GEOM.GEOM_Object, containing copies of theShapes without coincident edges.
7728             """
7729             anObj = self.ShapesOp.MakeGlueEdgesByList(ToList(theShapes), theTolerance, theEdges)
7730             if anObj is None:
7731                 raise RuntimeError("MakeGlueEdgesByList : " + self.ShapesOp.GetErrorCode())
7732             self._autoPublish(anObj, theName, "glueEdges")
7733             return anObj
7734
7735         # end of l3_healing
7736         ## @}
7737
7738         ## @addtogroup l3_boolean Boolean Operations
7739         ## @{
7740
7741         # -----------------------------------------------------------------------------
7742         # Boolean (Common, Cut, Fuse, Section)
7743         # -----------------------------------------------------------------------------
7744
7745         ## Perform one of boolean operations on two given shapes.
7746         #  @param theShape1 First argument for boolean operation.
7747         #  @param theShape2 Second argument for boolean operation.
7748         #  @param theOperation Indicates the operation to be done:\n
7749         #                      1 - Common, 2 - Cut, 3 - Fuse, 4 - Section.
7750         #  @param checkSelfInte The flag that tells if the arguments should
7751         #         be checked for self-intersection prior to the operation.
7752         #  @param theName Object name; when specified, this parameter is used
7753         #         for result publication in the study. Otherwise, if automatic
7754         #         publication is switched on, default value is used for result name.
7755         #
7756         #  @note This algorithm doesn't find all types of self-intersections.
7757         #        It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7758         #        vertex/face and edge/face intersections. Face/face
7759         #        intersections detection is switched off as it is a
7760         #        time-consuming operation that gives an impact on performance.
7761         #        To find all self-intersections please use
7762         #        CheckSelfIntersections() method.
7763         #
7764         #  @return New GEOM.GEOM_Object, containing the result shape.
7765         #
7766         #  @ref tui_fuse "Example"
7767         @ManageTransactions("BoolOp")
7768         def MakeBoolean(self, theShape1, theShape2, theOperation, checkSelfInte=False, theName=None):
7769             """
7770             Perform one of boolean operations on two given shapes.
7771
7772             Parameters:
7773                 theShape1 First argument for boolean operation.
7774                 theShape2 Second argument for boolean operation.
7775                 theOperation Indicates the operation to be done:
7776                              1 - Common, 2 - Cut, 3 - Fuse, 4 - Section.
7777                 checkSelfInte The flag that tells if the arguments should
7778                               be checked for self-intersection prior to
7779                               the operation.
7780                 theName Object name; when specified, this parameter is used
7781                         for result publication in the study. Otherwise, if automatic
7782                         publication is switched on, default value is used for result name.
7783
7784             Note:
7785                     This algorithm doesn't find all types of self-intersections.
7786                     It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7787                     vertex/face and edge/face intersections. Face/face
7788                     intersections detection is switched off as it is a
7789                     time-consuming operation that gives an impact on performance.
7790                     To find all self-intersections please use
7791                     CheckSelfIntersections() method.
7792
7793             Returns:
7794                 New GEOM.GEOM_Object, containing the result shape.
7795             """
7796             # Example: see GEOM_TestAll.py
7797             anObj = self.BoolOp.MakeBoolean(theShape1, theShape2, theOperation, checkSelfInte)
7798             RaiseIfFailed("MakeBoolean", self.BoolOp)
7799             def_names = { 1: "common", 2: "cut", 3: "fuse", 4: "section" }
7800             self._autoPublish(anObj, theName, def_names[theOperation])
7801             return anObj
7802
7803         ## Perform Common 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 theName Object name; when specified, this parameter is used
7809         #         for result publication in the study. Otherwise, if automatic
7810         #         publication is switched on, default value is used for result name.
7811         #
7812         #  @note This algorithm doesn't find all types of self-intersections.
7813         #        It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7814         #        vertex/face and edge/face intersections. Face/face
7815         #        intersections detection is switched off as it is a
7816         #        time-consuming operation that gives an impact on performance.
7817         #        To find all self-intersections please use
7818         #        CheckSelfIntersections() method.
7819         #
7820         #  @return New GEOM.GEOM_Object, containing the result shape.
7821         #
7822         #  @ref tui_common "Example 1"
7823         #  \n @ref swig_MakeCommon "Example 2"
7824         def MakeCommon(self, theShape1, theShape2, checkSelfInte=False, theName=None):
7825             """
7826             Perform Common boolean operation on two given shapes.
7827
7828             Parameters:
7829                 theShape1 First argument for boolean operation.
7830                 theShape2 Second argument for boolean operation.
7831                 checkSelfInte The flag that tells if the arguments should
7832                               be checked for self-intersection prior to
7833                               the operation.
7834                 theName Object name; when specified, this parameter is used
7835                         for result publication in the study. Otherwise, if automatic
7836                         publication is switched on, default value is used for result name.
7837
7838             Note:
7839                     This algorithm doesn't find all types of self-intersections.
7840                     It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7841                     vertex/face and edge/face intersections. Face/face
7842                     intersections detection is switched off as it is a
7843                     time-consuming operation that gives an impact on performance.
7844                     To find all self-intersections please use
7845                     CheckSelfIntersections() method.
7846
7847             Returns:
7848                 New GEOM.GEOM_Object, containing the result shape.
7849             """
7850             # Example: see GEOM_TestOthers.py
7851             # note: auto-publishing is done in self.MakeBoolean()
7852             return self.MakeBoolean(theShape1, theShape2, 1, checkSelfInte, theName)
7853
7854         ## Perform Cut boolean operation on two given shapes.
7855         #  @param theShape1 First argument for boolean operation.
7856         #  @param theShape2 Second argument for boolean operation.
7857         #  @param checkSelfInte The flag that tells if the arguments should
7858         #         be checked for self-intersection prior to the operation.
7859         #  @param theName Object name; when specified, this parameter is used
7860         #         for result publication in the study. Otherwise, if automatic
7861         #         publication is switched on, default value is used for result name.
7862         #
7863         #  @note This algorithm doesn't find all types of self-intersections.
7864         #        It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7865         #        vertex/face and edge/face intersections. Face/face
7866         #        intersections detection is switched off as it is a
7867         #        time-consuming operation that gives an impact on performance.
7868         #        To find all self-intersections please use
7869         #        CheckSelfIntersections() method.
7870         #
7871         #  @return New GEOM.GEOM_Object, containing the result shape.
7872         #
7873         #  @ref tui_cut "Example 1"
7874         #  \n @ref swig_MakeCommon "Example 2"
7875         def MakeCut(self, theShape1, theShape2, checkSelfInte=False, theName=None):
7876             """
7877             Perform Cut boolean operation on two given shapes.
7878
7879             Parameters:
7880                 theShape1 First argument for boolean operation.
7881                 theShape2 Second argument for boolean operation.
7882                 checkSelfInte The flag that tells if the arguments should
7883                               be checked for self-intersection prior to
7884                               the operation.
7885                 theName Object name; when specified, this parameter is used
7886                         for result publication in the study. Otherwise, if automatic
7887                         publication is switched on, default value is used for result name.
7888
7889             Note:
7890                     This algorithm doesn't find all types of self-intersections.
7891                     It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7892                     vertex/face and edge/face intersections. Face/face
7893                     intersections detection is switched off as it is a
7894                     time-consuming operation that gives an impact on performance.
7895                     To find all self-intersections please use
7896                     CheckSelfIntersections() method.
7897
7898             Returns:
7899                 New GEOM.GEOM_Object, containing the result shape.
7900
7901             """
7902             # Example: see GEOM_TestOthers.py
7903             # note: auto-publishing is done in self.MakeBoolean()
7904             return self.MakeBoolean(theShape1, theShape2, 2, checkSelfInte, theName)
7905
7906         ## Perform Fuse boolean operation on two given shapes.
7907         #  @param theShape1 First argument for boolean operation.
7908         #  @param theShape2 Second argument for boolean operation.
7909         #  @param checkSelfInte The flag that tells if the arguments should
7910         #         be checked for self-intersection prior to the operation.
7911         #  @param rmExtraEdges The flag that tells if Remove Extra Edges
7912         #         operation should be performed during the operation.
7913         #  @param theName Object name; when specified, this parameter is used
7914         #         for result publication in the study. Otherwise, if automatic
7915         #         publication is switched on, default value is used for result name.
7916         #
7917         #  @note This algorithm doesn't find all types of self-intersections.
7918         #        It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7919         #        vertex/face and edge/face intersections. Face/face
7920         #        intersections detection is switched off as it is a
7921         #        time-consuming operation that gives an impact on performance.
7922         #        To find all self-intersections please use
7923         #        CheckSelfIntersections() method.
7924         #
7925         #  @return New GEOM.GEOM_Object, containing the result shape.
7926         #
7927         #  @ref tui_fuse "Example 1"
7928         #  \n @ref swig_MakeCommon "Example 2"
7929         @ManageTransactions("BoolOp")
7930         def MakeFuse(self, theShape1, theShape2, checkSelfInte=False,
7931                      rmExtraEdges=False, theName=None):
7932             """
7933             Perform Fuse boolean operation on two given shapes.
7934
7935             Parameters:
7936                 theShape1 First argument for boolean operation.
7937                 theShape2 Second argument for boolean operation.
7938                 checkSelfInte The flag that tells if the arguments should
7939                               be checked for self-intersection prior to
7940                               the operation.
7941                 rmExtraEdges The flag that tells if Remove Extra Edges
7942                              operation should be performed during the operation.
7943                 theName Object name; when specified, this parameter is used
7944                         for result publication in the study. Otherwise, if automatic
7945                         publication is switched on, default value is used for result name.
7946
7947             Note:
7948                     This algorithm doesn't find all types of self-intersections.
7949                     It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7950                     vertex/face and edge/face intersections. Face/face
7951                     intersections detection is switched off as it is a
7952                     time-consuming operation that gives an impact on performance.
7953                     To find all self-intersections please use
7954                     CheckSelfIntersections() method.
7955
7956             Returns:
7957                 New GEOM.GEOM_Object, containing the result shape.
7958
7959             """
7960             # Example: see GEOM_TestOthers.py
7961             anObj = self.BoolOp.MakeFuse(theShape1, theShape2,
7962                                          checkSelfInte, rmExtraEdges)
7963             RaiseIfFailed("MakeFuse", self.BoolOp)
7964             self._autoPublish(anObj, theName, "fuse")
7965             return anObj
7966
7967         ## Perform Section boolean operation on two given shapes.
7968         #  @param theShape1 First argument for boolean operation.
7969         #  @param theShape2 Second argument for boolean operation.
7970         #  @param checkSelfInte The flag that tells if the arguments should
7971         #         be checked for self-intersection prior to the operation.
7972         #         If a self-intersection detected the operation fails.
7973         #  @param theName Object name; when specified, this parameter is used
7974         #         for result publication in the study. Otherwise, if automatic
7975         #         publication is switched on, default value is used for result name.
7976         #  @return New GEOM.GEOM_Object, containing the result shape.
7977         #
7978         #  @ref tui_section "Example 1"
7979         #  \n @ref swig_MakeCommon "Example 2"
7980         def MakeSection(self, theShape1, theShape2, checkSelfInte=False, theName=None):
7981             """
7982             Perform Section boolean operation on two given shapes.
7983
7984             Parameters:
7985                 theShape1 First argument for boolean operation.
7986                 theShape2 Second argument for boolean operation.
7987                 checkSelfInte The flag that tells if the arguments should
7988                               be checked for self-intersection prior to the operation.
7989                               If a self-intersection detected the operation fails.
7990                 theName Object name; when specified, this parameter is used
7991                         for result publication in the study. Otherwise, if automatic
7992                         publication is switched on, default value is used for result name.
7993             Returns:
7994                 New GEOM.GEOM_Object, containing the result shape.
7995
7996             """
7997             # Example: see GEOM_TestOthers.py
7998             # note: auto-publishing is done in self.MakeBoolean()
7999             return self.MakeBoolean(theShape1, theShape2, 4, checkSelfInte, theName)
8000
8001         ## Perform Fuse boolean operation on the list of shapes.
8002         #  @param theShapesList Shapes to be fused.
8003         #  @param checkSelfInte The flag that tells if the arguments should
8004         #         be checked for self-intersection prior to the operation.
8005         #  @param rmExtraEdges The flag that tells if Remove Extra Edges
8006         #         operation should be performed during the operation.
8007         #  @param theName Object name; when specified, this parameter is used
8008         #         for result publication in the study. Otherwise, if automatic
8009         #         publication is switched on, default value is used for result name.
8010         #
8011         #  @note This algorithm doesn't find all types of self-intersections.
8012         #        It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
8013         #        vertex/face and edge/face intersections. Face/face
8014         #        intersections detection is switched off as it is a
8015         #        time-consuming operation that gives an impact on performance.
8016         #        To find all self-intersections please use
8017         #        CheckSelfIntersections() method.
8018         #
8019         #  @return New GEOM.GEOM_Object, containing the result shape.
8020         #
8021         #  @ref tui_fuse "Example 1"
8022         #  \n @ref swig_MakeCommon "Example 2"
8023         @ManageTransactions("BoolOp")
8024         def MakeFuseList(self, theShapesList, checkSelfInte=False,
8025                          rmExtraEdges=False, theName=None):
8026             """
8027             Perform Fuse boolean operation on the list of shapes.
8028
8029             Parameters:
8030                 theShapesList Shapes to be fused.
8031                 checkSelfInte The flag that tells if the arguments should
8032                               be checked for self-intersection prior to
8033                               the operation.
8034                 rmExtraEdges The flag that tells if Remove Extra Edges
8035                              operation should be performed during the operation.
8036                 theName Object name; when specified, this parameter is used
8037                         for result publication in the study. Otherwise, if automatic
8038                         publication is switched on, default value is used for result name.
8039
8040             Note:
8041                     This algorithm doesn't find all types of self-intersections.
8042                     It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
8043                     vertex/face and edge/face intersections. Face/face
8044                     intersections detection is switched off as it is a
8045                     time-consuming operation that gives an impact on performance.
8046                     To find all self-intersections please use
8047                     CheckSelfIntersections() method.
8048
8049             Returns:
8050                 New GEOM.GEOM_Object, containing the result shape.
8051
8052             """
8053             # Example: see GEOM_TestOthers.py
8054             anObj = self.BoolOp.MakeFuseList(theShapesList, checkSelfInte,
8055                                              rmExtraEdges)
8056             RaiseIfFailed("MakeFuseList", self.BoolOp)
8057             self._autoPublish(anObj, theName, "fuse")
8058             return anObj
8059
8060         ## Perform Common boolean operation on the list of shapes.
8061         #  @param theShapesList Shapes for Common operation.
8062         #  @param checkSelfInte The flag that tells if the arguments should
8063         #         be checked for self-intersection prior to the operation.
8064         #  @param theName Object name; when specified, this parameter is used
8065         #         for result publication in the study. Otherwise, if automatic
8066         #         publication is switched on, default value is used for result name.
8067         #
8068         #  @note This algorithm doesn't find all types of self-intersections.
8069         #        It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
8070         #        vertex/face and edge/face intersections. Face/face
8071         #        intersections detection is switched off as it is a
8072         #        time-consuming operation that gives an impact on performance.
8073         #        To find all self-intersections please use
8074         #        CheckSelfIntersections() method.
8075         #
8076         #  @return New GEOM.GEOM_Object, containing the result shape.
8077         #
8078         #  @ref tui_common "Example 1"
8079         #  \n @ref swig_MakeCommon "Example 2"
8080         @ManageTransactions("BoolOp")
8081         def MakeCommonList(self, theShapesList, checkSelfInte=False, theName=None):
8082             """
8083             Perform Common boolean operation on the list of shapes.
8084
8085             Parameters:
8086                 theShapesList Shapes for Common operation.
8087                 checkSelfInte The flag that tells if the arguments should
8088                               be checked for self-intersection prior to
8089                               the operation.
8090                 theName Object name; when specified, this parameter is used
8091                         for result publication in the study. Otherwise, if automatic
8092                         publication is switched on, default value is used for result name.
8093
8094             Note:
8095                     This algorithm doesn't find all types of self-intersections.
8096                     It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
8097                     vertex/face and edge/face intersections. Face/face
8098                     intersections detection is switched off as it is a
8099                     time-consuming operation that gives an impact on performance.
8100                     To find all self-intersections please use
8101                     CheckSelfIntersections() method.
8102
8103             Returns:
8104                 New GEOM.GEOM_Object, containing the result shape.
8105
8106             """
8107             # Example: see GEOM_TestOthers.py
8108             anObj = self.BoolOp.MakeCommonList(theShapesList, checkSelfInte)
8109             RaiseIfFailed("MakeCommonList", self.BoolOp)
8110             self._autoPublish(anObj, theName, "common")
8111             return anObj
8112
8113         ## Perform Cut boolean operation on one object and the list of tools.
8114         #  @param theMainShape The object of the operation.
8115         #  @param theShapesList The list of tools of the operation.
8116         #  @param checkSelfInte The flag that tells if the arguments should
8117         #         be checked for self-intersection prior to the operation.
8118         #  @param theName Object name; when specified, this parameter is used
8119         #         for result publication in the study. Otherwise, if automatic
8120         #         publication is switched on, default value is used for result name.
8121         #
8122         #  @note This algorithm doesn't find all types of self-intersections.
8123         #        It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
8124         #        vertex/face and edge/face intersections. Face/face
8125         #        intersections detection is switched off as it is a
8126         #        time-consuming operation that gives an impact on performance.
8127         #        To find all self-intersections please use
8128         #        CheckSelfIntersections() method.
8129         #
8130         #  @return New GEOM.GEOM_Object, containing the result shape.
8131         #
8132         #  @ref tui_cut "Example 1"
8133         #  \n @ref swig_MakeCommon "Example 2"
8134         @ManageTransactions("BoolOp")
8135         def MakeCutList(self, theMainShape, theShapesList, checkSelfInte=False, theName=None):
8136             """
8137             Perform Cut boolean operation on one object and the list of tools.
8138
8139             Parameters:
8140                 theMainShape The object of the operation.
8141                 theShapesList The list of tools of the operation.
8142                 checkSelfInte The flag that tells if the arguments should
8143                               be checked for self-intersection prior to
8144                               the operation.
8145                 theName Object name; when specified, this parameter is used
8146                         for result publication in the study. Otherwise, if automatic
8147                         publication is switched on, default value is used for result name.
8148
8149             Note:
8150                     This algorithm doesn't find all types of self-intersections.
8151                     It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
8152                     vertex/face and edge/face intersections. Face/face
8153                     intersections detection is switched off as it is a
8154                     time-consuming operation that gives an impact on performance.
8155                     To find all self-intersections please use
8156                     CheckSelfIntersections() method.
8157
8158             Returns:
8159                 New GEOM.GEOM_Object, containing the result shape.
8160
8161             """
8162             # Example: see GEOM_TestOthers.py
8163             anObj = self.BoolOp.MakeCutList(theMainShape, theShapesList, checkSelfInte)
8164             RaiseIfFailed("MakeCutList", self.BoolOp)
8165             self._autoPublish(anObj, theName, "cut")
8166             return anObj
8167
8168         # end of l3_boolean
8169         ## @}
8170
8171         ## @addtogroup l3_basic_op
8172         ## @{
8173
8174         ## Perform partition operation.
8175         #  @param ListShapes Shapes to be intersected.
8176         #  @param ListTools Shapes to intersect theShapes.
8177         #  @param Limit Type of resulting shapes (see ShapeType()).\n
8178         #         If this parameter is set to -1 ("Auto"), most appropriate shape limit
8179         #         type will be detected automatically.
8180         #  @param KeepNonlimitShapes if this parameter == 0, then only shapes of
8181         #                             target type (equal to Limit) are kept in the result,
8182         #                             else standalone shapes of lower dimension
8183         #                             are kept also (if they exist).
8184         #
8185         #  @param theName Object name; when specified, this parameter is used
8186         #         for result publication in the study. Otherwise, if automatic
8187         #         publication is switched on, default value is used for result name.
8188         #
8189         #  @note Each compound from ListShapes and ListTools will be exploded
8190         #        in order to avoid possible intersection between shapes from this compound.
8191         #
8192         #  After implementation new version of PartitionAlgo (October 2006)
8193         #  other parameters are ignored by current functionality. They are kept
8194         #  in this function only for support old versions.
8195         #      @param ListKeepInside Shapes, outside which the results will be deleted.
8196         #         Each shape from theKeepInside must belong to theShapes also.
8197         #      @param ListRemoveInside Shapes, inside which the results will be deleted.
8198         #         Each shape from theRemoveInside must belong to theShapes also.
8199         #      @param RemoveWebs If TRUE, perform Glue 3D algorithm.
8200         #      @param ListMaterials Material indices for each shape. Make sense,
8201         #         only if theRemoveWebs is TRUE.
8202         #
8203         #  @return New GEOM.GEOM_Object, containing the result shapes.
8204         #
8205         #  @ref tui_partition "Example"
8206         @ManageTransactions("BoolOp")
8207         def MakePartition(self, ListShapes, ListTools=[], ListKeepInside=[], ListRemoveInside=[],
8208                           Limit=ShapeType["AUTO"], RemoveWebs=0, ListMaterials=[],
8209                           KeepNonlimitShapes=0, theName=None):
8210             """
8211             Perform partition operation.
8212
8213             Parameters:
8214                 ListShapes Shapes to be intersected.
8215                 ListTools Shapes to intersect theShapes.
8216                 Limit Type of resulting shapes (see geompy.ShapeType)
8217                       If this parameter is set to -1 ("Auto"), most appropriate shape limit
8218                       type will be detected automatically.
8219                 KeepNonlimitShapes if this parameter == 0, then only shapes of
8220                                     target type (equal to Limit) are kept in the result,
8221                                     else standalone shapes of lower dimension
8222                                     are kept also (if they exist).
8223
8224                 theName Object name; when specified, this parameter is used
8225                         for result publication in the study. Otherwise, if automatic
8226                         publication is switched on, default value is used for result name.
8227             Note:
8228                     Each compound from ListShapes and ListTools will be exploded
8229                     in order to avoid possible intersection between shapes from
8230                     this compound.
8231
8232             After implementation new version of PartitionAlgo (October 2006) other
8233             parameters are ignored by current functionality. They are kept in this
8234             function only for support old versions.
8235
8236             Ignored parameters:
8237                 ListKeepInside Shapes, outside which the results will be deleted.
8238                                Each shape from theKeepInside must belong to theShapes also.
8239                 ListRemoveInside Shapes, inside which the results will be deleted.
8240                                  Each shape from theRemoveInside must belong to theShapes also.
8241                 RemoveWebs If TRUE, perform Glue 3D algorithm.
8242                 ListMaterials Material indices for each shape. Make sense, only if theRemoveWebs is TRUE.
8243
8244             Returns:
8245                 New GEOM.GEOM_Object, containing the result shapes.
8246             """
8247             # Example: see GEOM_TestAll.py
8248             if Limit == self.ShapeType["AUTO"]:
8249                 # automatic detection of the most appropriate shape limit type
8250                 lim = GEOM.SHAPE
8251                 for s in ListShapes: lim = min(lim, s.GetMaxShapeType())
8252                 Limit = EnumToLong(lim)
8253                 pass
8254             anObj = self.BoolOp.MakePartition(ListShapes, ListTools,
8255                                               ListKeepInside, ListRemoveInside,
8256                                               Limit, RemoveWebs, ListMaterials,
8257                                               KeepNonlimitShapes);
8258             RaiseIfFailed("MakePartition", self.BoolOp)
8259             self._autoPublish(anObj, theName, "partition")
8260             return anObj
8261
8262         ## Perform partition operation.
8263         #  This method may be useful if it is needed to make a partition for
8264         #  compound contains nonintersected shapes. Performance will be better
8265         #  since intersection between shapes from compound is not performed.
8266         #
8267         #  Description of all parameters as in previous method MakePartition().
8268         #  One additional parameter is provided:
8269         #  @param checkSelfInte The flag that tells if the arguments should
8270         #         be checked for self-intersection prior to the operation.
8271         #
8272         #  @note This algorithm doesn't find all types of self-intersections.
8273         #        It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
8274         #        vertex/face and edge/face intersections. Face/face
8275         #        intersections detection is switched off as it is a
8276         #        time-consuming operation that gives an impact on performance.
8277         #        To find all self-intersections please use
8278         #        CheckSelfIntersections() method.
8279         #
8280         #  @note Passed compounds (via ListShapes or via ListTools)
8281         #           have to consist of nonintersecting shapes.
8282         #
8283         #  @return New GEOM.GEOM_Object, containing the result shapes.
8284         #
8285         #  @ref swig_todo "Example"
8286         @ManageTransactions("BoolOp")
8287         def MakePartitionNonSelfIntersectedShape(self, ListShapes, ListTools=[],
8288                                                  ListKeepInside=[], ListRemoveInside=[],
8289                                                  Limit=ShapeType["AUTO"], RemoveWebs=0,
8290                                                  ListMaterials=[], KeepNonlimitShapes=0,
8291                                                  checkSelfInte=False, theName=None):
8292             """
8293             Perform partition operation.
8294             This method may be useful if it is needed to make a partition for
8295             compound contains nonintersected shapes. Performance will be better
8296             since intersection between shapes from compound is not performed.
8297
8298             Parameters:
8299                 Description of all parameters as in method geompy.MakePartition.
8300                 One additional parameter is provided:
8301                 checkSelfInte The flag that tells if the arguments should
8302                               be checked for self-intersection prior to
8303                               the operation.
8304
8305             Note:
8306                     This algorithm doesn't find all types of self-intersections.
8307                     It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
8308                     vertex/face and edge/face intersections. Face/face
8309                     intersections detection is switched off as it is a
8310                     time-consuming operation that gives an impact on performance.
8311                     To find all self-intersections please use
8312                     CheckSelfIntersections() method.
8313
8314             NOTE:
8315                 Passed compounds (via ListShapes or via ListTools)
8316                 have to consist of nonintersecting shapes.
8317
8318             Returns:
8319                 New GEOM.GEOM_Object, containing the result shapes.
8320             """
8321             if Limit == self.ShapeType["AUTO"]:
8322                 # automatic detection of the most appropriate shape limit type
8323                 lim = GEOM.SHAPE
8324                 for s in ListShapes: lim = min(lim, s.GetMaxShapeType())
8325                 Limit = EnumToLong(lim)
8326                 pass
8327             anObj = self.BoolOp.MakePartitionNonSelfIntersectedShape(ListShapes, ListTools,
8328                                                                      ListKeepInside, ListRemoveInside,
8329                                                                      Limit, RemoveWebs, ListMaterials,
8330                                                                      KeepNonlimitShapes, checkSelfInte);
8331             RaiseIfFailed("MakePartitionNonSelfIntersectedShape", self.BoolOp)
8332             self._autoPublish(anObj, theName, "partition")
8333             return anObj
8334
8335         ## See method MakePartition() for more information.
8336         #
8337         #  @ref tui_partition "Example 1"
8338         #  \n @ref swig_Partition "Example 2"
8339         def Partition(self, ListShapes, ListTools=[], ListKeepInside=[], ListRemoveInside=[],
8340                       Limit=ShapeType["AUTO"], RemoveWebs=0, ListMaterials=[],
8341                       KeepNonlimitShapes=0, theName=None):
8342             """
8343             See method geompy.MakePartition for more information.
8344             """
8345             # Example: see GEOM_TestOthers.py
8346             # note: auto-publishing is done in self.MakePartition()
8347             anObj = self.MakePartition(ListShapes, ListTools,
8348                                        ListKeepInside, ListRemoveInside,
8349                                        Limit, RemoveWebs, ListMaterials,
8350                                        KeepNonlimitShapes, theName);
8351             return anObj
8352
8353         ## Perform partition of the Shape with the Plane
8354         #  @param theShape Shape to be intersected.
8355         #  @param thePlane Tool shape, to intersect theShape.
8356         #  @param theName Object name; when specified, this parameter is used
8357         #         for result publication in the study. Otherwise, if automatic
8358         #         publication is switched on, default value is used for result name.
8359         #
8360         #  @return New GEOM.GEOM_Object, containing the result shape.
8361         #
8362         #  @note This operation is a shortcut to the more general @ref MakePartition
8363         #  operation, where @a theShape specifies single "object" (shape being partitioned)
8364         #  and @a thePlane specifies single "tool" (intersector shape). Other parameters of
8365         #  @ref MakePartition operation have default values:
8366         #  - @a Limit: GEOM::SHAPE (shape limit corresponds to the type of @a theShape)
8367         #  - @a KeepNonlimitShapes: 0
8368         #  - @a KeepInside, @a RemoveInside, @a RemoveWebs,
8369         #    @a Materials (obsolete parameters): empty
8370         #
8371         #  @note I.e. the following two operations are equivalent:
8372         #  @code
8373         #  Result = geompy.MakeHalfPartition(Object, Plane)
8374         #  Result = geompy.MakePartition([Object], [Plane])
8375         #  @endcode
8376         #
8377         #  @sa MakePartition, MakePartitionNonSelfIntersectedShape
8378         #
8379         #  @ref tui_partition "Example"
8380         @ManageTransactions("BoolOp")
8381         def MakeHalfPartition(self, theShape, thePlane, theName=None):
8382             """
8383             Perform partition of the Shape with the Plane
8384
8385             Parameters:
8386                 theShape Shape to be intersected.
8387                 thePlane Tool shape, to intersect theShape.
8388                 theName Object name; when specified, this parameter is used
8389                         for result publication in the study. Otherwise, if automatic
8390                         publication is switched on, default value is used for result name.
8391
8392             Returns:
8393                 New GEOM.GEOM_Object, containing the result shape.
8394          
8395             Note: This operation is a shortcut to the more general MakePartition
8396             operation, where theShape specifies single "object" (shape being partitioned)
8397             and thePlane specifies single "tool" (intersector shape). Other parameters of
8398             MakePartition operation have default values:
8399             - Limit: GEOM::SHAPE (shape limit corresponds to the type of theShape)
8400             - KeepNonlimitShapes: 0
8401             - KeepInside, RemoveInside, RemoveWebs, Materials (obsolete parameters): empty
8402          
8403             I.e. the following two operations are equivalent:
8404               Result = geompy.MakeHalfPartition(Object, Plane)
8405               Result = geompy.MakePartition([Object], [Plane])
8406             """
8407             # Example: see GEOM_TestAll.py
8408             anObj = self.BoolOp.MakeHalfPartition(theShape, thePlane)
8409             RaiseIfFailed("MakeHalfPartition", self.BoolOp)
8410             self._autoPublish(anObj, theName, "partition")
8411             return anObj
8412
8413         # end of l3_basic_op
8414         ## @}
8415
8416         ## @addtogroup l3_transform
8417         ## @{
8418
8419         ## Translate the given object along the vector, specified
8420         #  by its end points.
8421         #  @param theObject The object to be translated.
8422         #  @param thePoint1 Start point of translation vector.
8423         #  @param thePoint2 End point of translation vector.
8424         #  @param theCopy Flag used to translate object itself or create a copy.
8425         #  @return Translated @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
8426         #  new GEOM.GEOM_Object, containing the translated object if @a theCopy flag is @c True.
8427         @ManageTransactions("TrsfOp")
8428         def TranslateTwoPoints(self, theObject, thePoint1, thePoint2, theCopy=False):
8429             """
8430             Translate the given object along the vector, specified by its end points.
8431
8432             Parameters:
8433                 theObject The object to be translated.
8434                 thePoint1 Start point of translation vector.
8435                 thePoint2 End point of translation vector.
8436                 theCopy Flag used to translate object itself or create a copy.
8437
8438             Returns:
8439                 Translated theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
8440                 new GEOM.GEOM_Object, containing the translated object if theCopy flag is True.
8441             """
8442             if theCopy:
8443                 anObj = self.TrsfOp.TranslateTwoPointsCopy(theObject, thePoint1, thePoint2)
8444             else:
8445                 anObj = self.TrsfOp.TranslateTwoPoints(theObject, thePoint1, thePoint2)
8446             RaiseIfFailed("TranslateTwoPoints", self.TrsfOp)
8447             return anObj
8448
8449         ## Translate the given object along the vector, specified
8450         #  by its end points, creating its copy before the translation.
8451         #  @param theObject The object to be translated.
8452         #  @param thePoint1 Start point of translation vector.
8453         #  @param thePoint2 End point of translation vector.
8454         #  @param theName Object name; when specified, this parameter is used
8455         #         for result publication in the study. Otherwise, if automatic
8456         #         publication is switched on, default value is used for result name.
8457         #
8458         #  @return New GEOM.GEOM_Object, containing the translated object.
8459         #
8460         #  @ref tui_translation "Example 1"
8461         #  \n @ref swig_MakeTranslationTwoPoints "Example 2"
8462         @ManageTransactions("TrsfOp")
8463         def MakeTranslationTwoPoints(self, theObject, thePoint1, thePoint2, theName=None):
8464             """
8465             Translate the given object along the vector, specified
8466             by its end points, creating its copy before the translation.
8467
8468             Parameters:
8469                 theObject The object to be translated.
8470                 thePoint1 Start point of translation vector.
8471                 thePoint2 End point of translation vector.
8472                 theName Object name; when specified, this parameter is used
8473                         for result publication in the study. Otherwise, if automatic
8474                         publication is switched on, default value is used for result name.
8475
8476             Returns:
8477                 New GEOM.GEOM_Object, containing the translated object.
8478             """
8479             # Example: see GEOM_TestAll.py
8480             anObj = self.TrsfOp.TranslateTwoPointsCopy(theObject, thePoint1, thePoint2)
8481             RaiseIfFailed("TranslateTwoPointsCopy", self.TrsfOp)
8482             self._autoPublish(anObj, theName, "translated")
8483             return anObj
8484
8485         ## Translate the given object along the vector, specified by its components.
8486         #  @param theObject The object to be translated.
8487         #  @param theDX,theDY,theDZ Components of translation vector.
8488         #  @param theCopy Flag used to translate object itself or create a copy.
8489         #  @return Translated @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
8490         #  new GEOM.GEOM_Object, containing the translated object if @a theCopy flag is @c True.
8491         #
8492         #  @ref tui_translation "Example"
8493         @ManageTransactions("TrsfOp")
8494         def TranslateDXDYDZ(self, theObject, theDX, theDY, theDZ, theCopy=False):
8495             """
8496             Translate the given object along the vector, specified by its components.
8497
8498             Parameters:
8499                 theObject The object to be translated.
8500                 theDX,theDY,theDZ Components of translation vector.
8501                 theCopy Flag used to translate object itself or create a copy.
8502
8503             Returns:
8504                 Translated theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
8505                 new GEOM.GEOM_Object, containing the translated object if theCopy flag is True.
8506             """
8507             # Example: see GEOM_TestAll.py
8508             theDX, theDY, theDZ, Parameters = ParseParameters(theDX, theDY, theDZ)
8509             if theCopy:
8510                 anObj = self.TrsfOp.TranslateDXDYDZCopy(theObject, theDX, theDY, theDZ)
8511             else:
8512                 anObj = self.TrsfOp.TranslateDXDYDZ(theObject, theDX, theDY, theDZ)
8513             anObj.SetParameters(Parameters)
8514             RaiseIfFailed("TranslateDXDYDZ", self.TrsfOp)
8515             return anObj
8516
8517         ## Translate the given object along the vector, specified
8518         #  by its components, creating its copy before the translation.
8519         #  @param theObject The object to be translated.
8520         #  @param theDX,theDY,theDZ Components of translation vector.
8521         #  @param theName Object name; when specified, this parameter is used
8522         #         for result publication in the study. Otherwise, if automatic
8523         #         publication is switched on, default value is used for result name.
8524         #
8525         #  @return New GEOM.GEOM_Object, containing the translated object.
8526         #
8527         #  @ref tui_translation "Example"
8528         @ManageTransactions("TrsfOp")
8529         def MakeTranslation(self,theObject, theDX, theDY, theDZ, theName=None):
8530             """
8531             Translate the given object along the vector, specified
8532             by its components, creating its copy before the translation.
8533
8534             Parameters:
8535                 theObject The object to be translated.
8536                 theDX,theDY,theDZ Components of translation vector.
8537                 theName Object name; when specified, this parameter is used
8538                         for result publication in the study. Otherwise, if automatic
8539                         publication is switched on, default value is used for result name.
8540
8541             Returns:
8542                 New GEOM.GEOM_Object, containing the translated object.
8543             """
8544             # Example: see GEOM_TestAll.py
8545             theDX, theDY, theDZ, Parameters = ParseParameters(theDX, theDY, theDZ)
8546             anObj = self.TrsfOp.TranslateDXDYDZCopy(theObject, theDX, theDY, theDZ)
8547             anObj.SetParameters(Parameters)
8548             RaiseIfFailed("TranslateDXDYDZ", self.TrsfOp)
8549             self._autoPublish(anObj, theName, "translated")
8550             return anObj
8551
8552         ## Translate the given object along the given vector.
8553         #  @param theObject The object to be translated.
8554         #  @param theVector The translation vector.
8555         #  @param theCopy Flag used to translate object itself or create a copy.
8556         #  @return Translated @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
8557         #  new GEOM.GEOM_Object, containing the translated object if @a theCopy flag is @c True.
8558         @ManageTransactions("TrsfOp")
8559         def TranslateVector(self, theObject, theVector, theCopy=False):
8560             """
8561             Translate the given object along the given vector.
8562
8563             Parameters:
8564                 theObject The object to be translated.
8565                 theVector The translation vector.
8566                 theCopy Flag used to translate object itself or create a copy.
8567
8568             Returns:
8569                 Translated theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
8570                 new GEOM.GEOM_Object, containing the translated object if theCopy flag is True.
8571             """
8572             if theCopy:
8573                 anObj = self.TrsfOp.TranslateVectorCopy(theObject, theVector)
8574             else:
8575                 anObj = self.TrsfOp.TranslateVector(theObject, theVector)
8576             RaiseIfFailed("TranslateVector", self.TrsfOp)
8577             return anObj
8578
8579         ## Translate the given object along the given vector,
8580         #  creating its copy before the translation.
8581         #  @param theObject The object to be translated.
8582         #  @param theVector The translation vector.
8583         #  @param theName Object name; when specified, this parameter is used
8584         #         for result publication in the study. Otherwise, if automatic
8585         #         publication is switched on, default value is used for result name.
8586         #
8587         #  @return New GEOM.GEOM_Object, containing the translated object.
8588         #
8589         #  @ref tui_translation "Example"
8590         @ManageTransactions("TrsfOp")
8591         def MakeTranslationVector(self, theObject, theVector, theName=None):
8592             """
8593             Translate the given object along the given vector,
8594             creating its copy before the translation.
8595
8596             Parameters:
8597                 theObject The object to be translated.
8598                 theVector The translation vector.
8599                 theName Object name; when specified, this parameter is used
8600                         for result publication in the study. Otherwise, if automatic
8601                         publication is switched on, default value is used for result name.
8602
8603             Returns:
8604                 New GEOM.GEOM_Object, containing the translated object.
8605             """
8606             # Example: see GEOM_TestAll.py
8607             anObj = self.TrsfOp.TranslateVectorCopy(theObject, theVector)
8608             RaiseIfFailed("TranslateVectorCopy", self.TrsfOp)
8609             self._autoPublish(anObj, theName, "translated")
8610             return anObj
8611
8612         ## Translate the given object along the given vector on given distance.
8613         #  @param theObject The object to be translated.
8614         #  @param theVector The translation vector.
8615         #  @param theDistance The translation distance.
8616         #  @param theCopy Flag used to translate object itself or create a copy.
8617         #  @return Translated @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
8618         #  new GEOM.GEOM_Object, containing the translated object if @a theCopy flag is @c True.
8619         #
8620         #  @ref tui_translation "Example"
8621         @ManageTransactions("TrsfOp")
8622         def TranslateVectorDistance(self, theObject, theVector, theDistance, theCopy=False):
8623             """
8624             Translate the given object along the given vector on given distance.
8625
8626             Parameters:
8627                 theObject The object to be translated.
8628                 theVector The translation vector.
8629                 theDistance The translation distance.
8630                 theCopy Flag used to translate object itself or create a copy.
8631
8632             Returns:
8633                 Translated theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
8634                 new GEOM.GEOM_Object, containing the translated object if theCopy flag is True.
8635             """
8636             # Example: see GEOM_TestAll.py
8637             theDistance,Parameters = ParseParameters(theDistance)
8638             anObj = self.TrsfOp.TranslateVectorDistance(theObject, theVector, theDistance, theCopy)
8639             RaiseIfFailed("TranslateVectorDistance", self.TrsfOp)
8640             anObj.SetParameters(Parameters)
8641             return anObj
8642
8643         ## Translate the given object along the given vector on given distance,
8644         #  creating its copy before the translation.
8645         #  @param theObject The object to be translated.
8646         #  @param theVector The translation vector.
8647         #  @param theDistance The translation distance.
8648         #  @param theName Object name; when specified, this parameter is used
8649         #         for result publication in the study. Otherwise, if automatic
8650         #         publication is switched on, default value is used for result name.
8651         #
8652         #  @return New GEOM.GEOM_Object, containing the translated object.
8653         #
8654         #  @ref tui_translation "Example"
8655         @ManageTransactions("TrsfOp")
8656         def MakeTranslationVectorDistance(self, theObject, theVector, theDistance, theName=None):
8657             """
8658             Translate the given object along the given vector on given distance,
8659             creating its copy before the translation.
8660
8661             Parameters:
8662                 theObject The object to be translated.
8663                 theVector The translation vector.
8664                 theDistance The translation distance.
8665                 theName Object name; when specified, this parameter is used
8666                         for result publication in the study. Otherwise, if automatic
8667                         publication is switched on, default value is used for result name.
8668
8669             Returns:
8670                 New GEOM.GEOM_Object, containing the translated object.
8671             """
8672             # Example: see GEOM_TestAll.py
8673             theDistance,Parameters = ParseParameters(theDistance)
8674             anObj = self.TrsfOp.TranslateVectorDistance(theObject, theVector, theDistance, 1)
8675             RaiseIfFailed("TranslateVectorDistance", self.TrsfOp)
8676             anObj.SetParameters(Parameters)
8677             self._autoPublish(anObj, theName, "translated")
8678             return anObj
8679
8680         ## Rotate the given object around the given axis on the given angle.
8681         #  @param theObject The object to be rotated.
8682         #  @param theAxis Rotation axis.
8683         #  @param theAngle Rotation angle in radians.
8684         #  @param theCopy Flag used to rotate object itself or create a copy.
8685         #
8686         #  @return Rotated @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
8687         #  new GEOM.GEOM_Object, containing the rotated object if @a theCopy flag is @c True.
8688         #
8689         #  @ref tui_rotation "Example"
8690         @ManageTransactions("TrsfOp")
8691         def Rotate(self, theObject, theAxis, theAngle, theCopy=False):
8692             """
8693             Rotate the given object around the given axis on the given angle.
8694
8695             Parameters:
8696                 theObject The object to be rotated.
8697                 theAxis Rotation axis.
8698                 theAngle Rotation angle in radians.
8699                 theCopy Flag used to rotate object itself or create a copy.
8700
8701             Returns:
8702                 Rotated theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
8703                 new GEOM.GEOM_Object, containing the rotated object if theCopy flag is True.
8704             """
8705             # Example: see GEOM_TestAll.py
8706             flag = False
8707             if isinstance(theAngle,str):
8708                 flag = True
8709             theAngle, Parameters = ParseParameters(theAngle)
8710             if flag:
8711                 theAngle = theAngle*math.pi/180.0
8712             if theCopy:
8713                 anObj = self.TrsfOp.RotateCopy(theObject, theAxis, theAngle)
8714             else:
8715                 anObj = self.TrsfOp.Rotate(theObject, theAxis, theAngle)
8716             RaiseIfFailed("Rotate", self.TrsfOp)
8717             anObj.SetParameters(Parameters)
8718             return anObj
8719
8720         ## Rotate the given object around the given axis
8721         #  on the given angle, creating its copy before the rotation.
8722         #  @param theObject The object to be rotated.
8723         #  @param theAxis Rotation axis.
8724         #  @param theAngle Rotation angle in radians.
8725         #  @param theName Object name; when specified, this parameter is used
8726         #         for result publication in the study. Otherwise, if automatic
8727         #         publication is switched on, default value is used for result name.
8728         #
8729         #  @return New GEOM.GEOM_Object, containing the rotated object.
8730         #
8731         #  @ref tui_rotation "Example"
8732         @ManageTransactions("TrsfOp")
8733         def MakeRotation(self, theObject, theAxis, theAngle, theName=None):
8734             """
8735             Rotate the given object around the given axis
8736             on the given angle, creating its copy before the rotatation.
8737
8738             Parameters:
8739                 theObject The object to be rotated.
8740                 theAxis Rotation axis.
8741                 theAngle Rotation angle in radians.
8742                 theName Object name; when specified, this parameter is used
8743                         for result publication in the study. Otherwise, if automatic
8744                         publication is switched on, default value is used for result name.
8745
8746             Returns:
8747                 New GEOM.GEOM_Object, containing the rotated object.
8748             """
8749             # Example: see GEOM_TestAll.py
8750             flag = False
8751             if isinstance(theAngle,str):
8752                 flag = True
8753             theAngle, Parameters = ParseParameters(theAngle)
8754             if flag:
8755                 theAngle = theAngle*math.pi/180.0
8756             anObj = self.TrsfOp.RotateCopy(theObject, theAxis, theAngle)
8757             RaiseIfFailed("RotateCopy", self.TrsfOp)
8758             anObj.SetParameters(Parameters)
8759             self._autoPublish(anObj, theName, "rotated")
8760             return anObj
8761
8762         ## Rotate given object around vector perpendicular to plane
8763         #  containing three points.
8764         #  @param theObject The object to be rotated.
8765         #  @param theCentPoint central point the axis is the vector perpendicular to the plane
8766         #  containing the three points.
8767         #  @param thePoint1,thePoint2 points in a perpendicular plane of the axis.
8768         #  @param theCopy Flag used to rotate object itself or create a copy.
8769         #  @return Rotated @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
8770         #  new GEOM.GEOM_Object, containing the rotated object if @a theCopy flag is @c True.
8771         @ManageTransactions("TrsfOp")
8772         def RotateThreePoints(self, theObject, theCentPoint, thePoint1, thePoint2, theCopy=False):
8773             """
8774             Rotate given object around vector perpendicular to plane
8775             containing three points.
8776
8777             Parameters:
8778                 theObject The object to be rotated.
8779                 theCentPoint central point  the axis is the vector perpendicular to the plane
8780                              containing the three points.
8781                 thePoint1,thePoint2 points in a perpendicular plane of the axis.
8782                 theCopy Flag used to rotate object itself or create a copy.
8783
8784             Returns:
8785                 Rotated theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
8786                 new GEOM.GEOM_Object, containing the rotated object if theCopy flag is True.
8787             """
8788             if theCopy:
8789                 anObj = self.TrsfOp.RotateThreePointsCopy(theObject, theCentPoint, thePoint1, thePoint2)
8790             else:
8791                 anObj = self.TrsfOp.RotateThreePoints(theObject, theCentPoint, thePoint1, thePoint2)
8792             RaiseIfFailed("RotateThreePoints", self.TrsfOp)
8793             return anObj
8794
8795         ## Rotate given object around vector perpendicular to plane
8796         #  containing three points, creating its copy before the rotatation.
8797         #  @param theObject The object to be rotated.
8798         #  @param theCentPoint central point the axis is the vector perpendicular to the plane
8799         #  containing the three points.
8800         #  @param thePoint1,thePoint2 in a perpendicular plane of the axis.
8801         #  @param theName Object name; when specified, this parameter is used
8802         #         for result publication in the study. Otherwise, if automatic
8803         #         publication is switched on, default value is used for result name.
8804         #
8805         #  @return New GEOM.GEOM_Object, containing the rotated object.
8806         #
8807         #  @ref tui_rotation "Example"
8808         @ManageTransactions("TrsfOp")
8809         def MakeRotationThreePoints(self, theObject, theCentPoint, thePoint1, thePoint2, theName=None):
8810             """
8811             Rotate given object around vector perpendicular to plane
8812             containing three points, creating its copy before the rotatation.
8813
8814             Parameters:
8815                 theObject The object to be rotated.
8816                 theCentPoint central point  the axis is the vector perpendicular to the plane
8817                              containing the three points.
8818                 thePoint1,thePoint2  in a perpendicular plane of the axis.
8819                 theName Object name; when specified, this parameter is used
8820                         for result publication in the study. Otherwise, if automatic
8821                         publication is switched on, default value is used for result name.
8822
8823             Returns:
8824                 New GEOM.GEOM_Object, containing the rotated object.
8825             """
8826             # Example: see GEOM_TestAll.py
8827             anObj = self.TrsfOp.RotateThreePointsCopy(theObject, theCentPoint, thePoint1, thePoint2)
8828             RaiseIfFailed("RotateThreePointsCopy", self.TrsfOp)
8829             self._autoPublish(anObj, theName, "rotated")
8830             return anObj
8831
8832         ## Scale the given object by the specified factor.
8833         #  @param theObject The object to be scaled.
8834         #  @param thePoint Center point for scaling.
8835         #                  Passing None for it means scaling relatively the origin of global CS.
8836         #  @param theFactor Scaling factor value.
8837         #  @param theCopy Flag used to scale object itself or create a copy.
8838         #  @return Scaled @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
8839         #  new GEOM.GEOM_Object, containing the scaled object if @a theCopy flag is @c True.
8840         @ManageTransactions("TrsfOp")
8841         def Scale(self, theObject, thePoint, theFactor, theCopy=False):
8842             """
8843             Scale the given object by the specified factor.
8844
8845             Parameters:
8846                 theObject The object to be scaled.
8847                 thePoint Center point for scaling.
8848                          Passing None for it means scaling relatively the origin of global CS.
8849                 theFactor Scaling factor value.
8850                 theCopy Flag used to scale object itself or create a copy.
8851
8852             Returns:
8853                 Scaled theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
8854                 new GEOM.GEOM_Object, containing the scaled object if theCopy flag is True.
8855             """
8856             # Example: see GEOM_TestAll.py
8857             theFactor, Parameters = ParseParameters(theFactor)
8858             if theCopy:
8859                 anObj = self.TrsfOp.ScaleShapeCopy(theObject, thePoint, theFactor)
8860             else:
8861                 anObj = self.TrsfOp.ScaleShape(theObject, thePoint, theFactor)
8862             RaiseIfFailed("Scale", self.TrsfOp)
8863             anObj.SetParameters(Parameters)
8864             return anObj
8865
8866         ## Scale the given object by the factor, creating its copy before the scaling.
8867         #  @param theObject The object to be scaled.
8868         #  @param thePoint Center point for scaling.
8869         #                  Passing None for it means scaling relatively the origin of global CS.
8870         #  @param theFactor Scaling factor value.
8871         #  @param theName Object name; when specified, this parameter is used
8872         #         for result publication in the study. Otherwise, if automatic
8873         #         publication is switched on, default value is used for result name.
8874         #
8875         #  @return New GEOM.GEOM_Object, containing the scaled shape.
8876         #
8877         #  @ref tui_scale "Example"
8878         @ManageTransactions("TrsfOp")
8879         def MakeScaleTransform(self, theObject, thePoint, theFactor, theName=None):
8880             """
8881             Scale the given object by the factor, creating its copy before the scaling.
8882
8883             Parameters:
8884                 theObject The object to be scaled.
8885                 thePoint Center point for scaling.
8886                          Passing None for it means scaling relatively the origin of global CS.
8887                 theFactor Scaling factor value.
8888                 theName Object name; when specified, this parameter is used
8889                         for result publication in the study. Otherwise, if automatic
8890                         publication is switched on, default value is used for result name.
8891
8892             Returns:
8893                 New GEOM.GEOM_Object, containing the scaled shape.
8894             """
8895             # Example: see GEOM_TestAll.py
8896             theFactor, Parameters = ParseParameters(theFactor)
8897             anObj = self.TrsfOp.ScaleShapeCopy(theObject, thePoint, theFactor)
8898             RaiseIfFailed("ScaleShapeCopy", self.TrsfOp)
8899             anObj.SetParameters(Parameters)
8900             self._autoPublish(anObj, theName, "scaled")
8901             return anObj
8902
8903         ## Scale the given object by different factors along coordinate axes.
8904         #  @param theObject The object to be scaled.
8905         #  @param thePoint Center point for scaling.
8906         #                  Passing None for it means scaling relatively the origin of global CS.
8907         #  @param theFactorX,theFactorY,theFactorZ Scaling factors along each axis.
8908         #  @param theCopy Flag used to scale object itself or create a copy.
8909         #  @return Scaled @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
8910         #  new GEOM.GEOM_Object, containing the scaled object if @a theCopy flag is @c True.
8911         @ManageTransactions("TrsfOp")
8912         def ScaleAlongAxes(self, theObject, thePoint, theFactorX, theFactorY, theFactorZ, theCopy=False):
8913             """
8914             Scale the given object by different factors along coordinate axes.
8915
8916             Parameters:
8917                 theObject The object to be scaled.
8918                 thePoint Center point for scaling.
8919                             Passing None for it means scaling relatively the origin of global CS.
8920                 theFactorX,theFactorY,theFactorZ Scaling factors along each axis.
8921                 theCopy Flag used to scale object itself or create a copy.
8922
8923             Returns:
8924                 Scaled theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
8925                 new GEOM.GEOM_Object, containing the scaled object if theCopy flag is True.
8926             """
8927             # Example: see GEOM_TestAll.py
8928             theFactorX, theFactorY, theFactorZ, Parameters = ParseParameters(theFactorX, theFactorY, theFactorZ)
8929             if theCopy:
8930                 anObj = self.TrsfOp.ScaleShapeAlongAxesCopy(theObject, thePoint,
8931                                                             theFactorX, theFactorY, theFactorZ)
8932             else:
8933                 anObj = self.TrsfOp.ScaleShapeAlongAxes(theObject, thePoint,
8934                                                         theFactorX, theFactorY, theFactorZ)
8935             RaiseIfFailed("ScaleAlongAxes", self.TrsfOp)
8936             anObj.SetParameters(Parameters)
8937             return anObj
8938
8939         ## Scale the given object by different factors along coordinate axes,
8940         #  creating its copy before the scaling.
8941         #  @param theObject The object to be scaled.
8942         #  @param thePoint Center point for scaling.
8943         #                  Passing None for it means scaling relatively the origin of global CS.
8944         #  @param theFactorX,theFactorY,theFactorZ Scaling factors along each axis.
8945         #  @param theName Object name; when specified, this parameter is used
8946         #         for result publication in the study. Otherwise, if automatic
8947         #         publication is switched on, default value is used for result name.
8948         #
8949         #  @return New GEOM.GEOM_Object, containing the scaled shape.
8950         #
8951         #  @ref swig_scale "Example"
8952         @ManageTransactions("TrsfOp")
8953         def MakeScaleAlongAxes(self, theObject, thePoint, theFactorX, theFactorY, theFactorZ, theName=None):
8954             """
8955             Scale the given object by different factors along coordinate axes,
8956             creating its copy before the scaling.
8957
8958             Parameters:
8959                 theObject The object to be scaled.
8960                 thePoint Center point for scaling.
8961                             Passing None for it means scaling relatively the origin of global CS.
8962                 theFactorX,theFactorY,theFactorZ Scaling factors along each axis.
8963                 theName Object name; when specified, this parameter is used
8964                         for result publication in the study. Otherwise, if automatic
8965                         publication is switched on, default value is used for result name.
8966
8967             Returns:
8968                 New GEOM.GEOM_Object, containing the scaled shape.
8969             """
8970             # Example: see GEOM_TestAll.py
8971             theFactorX, theFactorY, theFactorZ, Parameters = ParseParameters(theFactorX, theFactorY, theFactorZ)
8972             anObj = self.TrsfOp.ScaleShapeAlongAxesCopy(theObject, thePoint,
8973                                                         theFactorX, theFactorY, theFactorZ)
8974             RaiseIfFailed("MakeScaleAlongAxes", self.TrsfOp)
8975             anObj.SetParameters(Parameters)
8976             self._autoPublish(anObj, theName, "scaled")
8977             return anObj
8978
8979         ## Mirror an object relatively the given plane.
8980         #  @param theObject The object to be mirrored.
8981         #  @param thePlane Plane of symmetry.
8982         #  @param theCopy Flag used to mirror object itself or create a copy.
8983         #  @return Mirrored @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
8984         #  new GEOM.GEOM_Object, containing the mirrored object if @a theCopy flag is @c True.
8985         @ManageTransactions("TrsfOp")
8986         def MirrorByPlane(self, theObject, thePlane, theCopy=False):
8987             """
8988             Mirror an object relatively the given plane.
8989
8990             Parameters:
8991                 theObject The object to be mirrored.
8992                 thePlane Plane of symmetry.
8993                 theCopy Flag used to mirror object itself or create a copy.
8994
8995             Returns:
8996                 Mirrored theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
8997                 new GEOM.GEOM_Object, containing the mirrored object if theCopy flag is True.
8998             """
8999             if theCopy:
9000                 anObj = self.TrsfOp.MirrorPlaneCopy(theObject, thePlane)
9001             else:
9002                 anObj = self.TrsfOp.MirrorPlane(theObject, thePlane)
9003             RaiseIfFailed("MirrorByPlane", self.TrsfOp)
9004             return anObj
9005
9006         ## Create an object, symmetrical
9007         #  to the given one relatively the given plane.
9008         #  @param theObject The object to be mirrored.
9009         #  @param thePlane Plane of symmetry.
9010         #  @param theName Object name; when specified, this parameter is used
9011         #         for result publication in the study. Otherwise, if automatic
9012         #         publication is switched on, default value is used for result name.
9013         #
9014         #  @return New GEOM.GEOM_Object, containing the mirrored shape.
9015         #
9016         #  @ref tui_mirror "Example"
9017         @ManageTransactions("TrsfOp")
9018         def MakeMirrorByPlane(self, theObject, thePlane, theName=None):
9019             """
9020             Create an object, symmetrical to the given one relatively the given plane.
9021
9022             Parameters:
9023                 theObject The object to be mirrored.
9024                 thePlane Plane of symmetry.
9025                 theName Object name; when specified, this parameter is used
9026                         for result publication in the study. Otherwise, if automatic
9027                         publication is switched on, default value is used for result name.
9028
9029             Returns:
9030                 New GEOM.GEOM_Object, containing the mirrored shape.
9031             """
9032             # Example: see GEOM_TestAll.py
9033             anObj = self.TrsfOp.MirrorPlaneCopy(theObject, thePlane)
9034             RaiseIfFailed("MirrorPlaneCopy", self.TrsfOp)
9035             self._autoPublish(anObj, theName, "mirrored")
9036             return anObj
9037
9038         ## Mirror an object relatively the given axis.
9039         #  @param theObject The object to be mirrored.
9040         #  @param theAxis Axis of symmetry.
9041         #  @param theCopy Flag used to mirror object itself or create a copy.
9042         #  @return Mirrored @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
9043         #  new GEOM.GEOM_Object, containing the mirrored object if @a theCopy flag is @c True.
9044         @ManageTransactions("TrsfOp")
9045         def MirrorByAxis(self, theObject, theAxis, theCopy=False):
9046             """
9047             Mirror an object relatively the given axis.
9048
9049             Parameters:
9050                 theObject The object to be mirrored.
9051                 theAxis Axis of symmetry.
9052                 theCopy Flag used to mirror object itself or create a copy.
9053
9054             Returns:
9055                 Mirrored theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
9056                 new GEOM.GEOM_Object, containing the mirrored object if theCopy flag is True.
9057             """
9058             if theCopy:
9059                 anObj = self.TrsfOp.MirrorAxisCopy(theObject, theAxis)
9060             else:
9061                 anObj = self.TrsfOp.MirrorAxis(theObject, theAxis)
9062             RaiseIfFailed("MirrorByAxis", self.TrsfOp)
9063             return anObj
9064
9065         ## Create an object, symmetrical
9066         #  to the given one relatively the given axis.
9067         #  @param theObject The object to be mirrored.
9068         #  @param theAxis Axis of symmetry.
9069         #  @param theName Object name; when specified, this parameter is used
9070         #         for result publication in the study. Otherwise, if automatic
9071         #         publication is switched on, default value is used for result name.
9072         #
9073         #  @return New GEOM.GEOM_Object, containing the mirrored shape.
9074         #
9075         #  @ref tui_mirror "Example"
9076         @ManageTransactions("TrsfOp")
9077         def MakeMirrorByAxis(self, theObject, theAxis, theName=None):
9078             """
9079             Create an object, symmetrical to the given one relatively the given axis.
9080
9081             Parameters:
9082                 theObject The object to be mirrored.
9083                 theAxis Axis of symmetry.
9084                 theName Object name; when specified, this parameter is used
9085                         for result publication in the study. Otherwise, if automatic
9086                         publication is switched on, default value is used for result name.
9087
9088             Returns:
9089                 New GEOM.GEOM_Object, containing the mirrored shape.
9090             """
9091             # Example: see GEOM_TestAll.py
9092             anObj = self.TrsfOp.MirrorAxisCopy(theObject, theAxis)
9093             RaiseIfFailed("MirrorAxisCopy", self.TrsfOp)
9094             self._autoPublish(anObj, theName, "mirrored")
9095             return anObj
9096
9097         ## Mirror an object relatively the given point.
9098         #  @param theObject The object to be mirrored.
9099         #  @param thePoint Point of symmetry.
9100         #  @param theCopy Flag used to mirror object itself or create a copy.
9101         #  @return Mirrored @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
9102         #  new GEOM.GEOM_Object, containing the mirrored object if @a theCopy flag is @c True.
9103         @ManageTransactions("TrsfOp")
9104         def MirrorByPoint(self, theObject, thePoint, theCopy=False):
9105             """
9106             Mirror an object relatively the given point.
9107
9108             Parameters:
9109                 theObject The object to be mirrored.
9110                 thePoint Point of symmetry.
9111                 theCopy Flag used to mirror object itself or create a copy.
9112
9113             Returns:
9114                 Mirrored theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
9115                 new GEOM.GEOM_Object, containing the mirrored object if theCopy flag is True.
9116             """
9117             # Example: see GEOM_TestAll.py
9118             if theCopy:
9119                 anObj = self.TrsfOp.MirrorPointCopy(theObject, thePoint)
9120             else:
9121                 anObj = self.TrsfOp.MirrorPoint(theObject, thePoint)
9122             RaiseIfFailed("MirrorByPoint", self.TrsfOp)
9123             return anObj
9124
9125         ## Create an object, symmetrical
9126         #  to the given one relatively the given point.
9127         #  @param theObject The object to be mirrored.
9128         #  @param thePoint Point of symmetry.
9129         #  @param theName Object name; when specified, this parameter is used
9130         #         for result publication in the study. Otherwise, if automatic
9131         #         publication is switched on, default value is used for result name.
9132         #
9133         #  @return New GEOM.GEOM_Object, containing the mirrored shape.
9134         #
9135         #  @ref tui_mirror "Example"
9136         @ManageTransactions("TrsfOp")
9137         def MakeMirrorByPoint(self, theObject, thePoint, theName=None):
9138             """
9139             Create an object, symmetrical
9140             to the given one relatively the given point.
9141
9142             Parameters:
9143                 theObject The object to be mirrored.
9144                 thePoint Point of symmetry.
9145                 theName Object name; when specified, this parameter is used
9146                         for result publication in the study. Otherwise, if automatic
9147                         publication is switched on, default value is used for result name.
9148
9149             Returns:
9150                 New GEOM.GEOM_Object, containing the mirrored shape.
9151             """
9152             # Example: see GEOM_TestAll.py
9153             anObj = self.TrsfOp.MirrorPointCopy(theObject, thePoint)
9154             RaiseIfFailed("MirrorPointCopy", self.TrsfOp)
9155             self._autoPublish(anObj, theName, "mirrored")
9156             return anObj
9157
9158         ## Modify the location of the given object.
9159         #  @param theObject The object to be displaced.
9160         #  @param theStartLCS Coordinate system to perform displacement from it.\n
9161         #                     If \a theStartLCS is NULL, displacement
9162         #                     will be performed from global CS.\n
9163         #                     If \a theObject itself is used as \a theStartLCS,
9164         #                     its location will be changed to \a theEndLCS.
9165         #  @param theEndLCS Coordinate system to perform displacement to it.
9166         #  @param theCopy Flag used to displace object itself or create a copy.
9167         #  @return Displaced @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
9168         #  new GEOM.GEOM_Object, containing the displaced object if @a theCopy flag is @c True.
9169         @ManageTransactions("TrsfOp")
9170         def Position(self, theObject, theStartLCS, theEndLCS, theCopy=False):
9171             """
9172             Modify the Location of the given object by LCS, creating its copy before the setting.
9173
9174             Parameters:
9175                 theObject The object to be displaced.
9176                 theStartLCS Coordinate system to perform displacement from it.
9177                             If theStartLCS is NULL, displacement
9178                             will be performed from global CS.
9179                             If theObject itself is used as theStartLCS,
9180                             its location will be changed to theEndLCS.
9181                 theEndLCS Coordinate system to perform displacement to it.
9182                 theCopy Flag used to displace object itself or create a copy.
9183
9184             Returns:
9185                 Displaced theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
9186                 new GEOM.GEOM_Object, containing the displaced object if theCopy flag is True.
9187             """
9188             # Example: see GEOM_TestAll.py
9189             if theCopy:
9190                 anObj = self.TrsfOp.PositionShapeCopy(theObject, theStartLCS, theEndLCS)
9191             else:
9192                 anObj = self.TrsfOp.PositionShape(theObject, theStartLCS, theEndLCS)
9193             RaiseIfFailed("Displace", self.TrsfOp)
9194             return anObj
9195
9196         ## Modify the Location of the given object by LCS,
9197         #  creating its copy before the setting.
9198         #  @param theObject The object to be displaced.
9199         #  @param theStartLCS Coordinate system to perform displacement from it.\n
9200         #                     If \a theStartLCS is NULL, displacement
9201         #                     will be performed from global CS.\n
9202         #                     If \a theObject itself is used as \a theStartLCS,
9203         #                     its location will be changed to \a theEndLCS.
9204         #  @param theEndLCS Coordinate system to perform displacement to it.
9205         #  @param theName Object name; when specified, this parameter is used
9206         #         for result publication in the study. Otherwise, if automatic
9207         #         publication is switched on, default value is used for result name.
9208         #
9209         #  @return New GEOM.GEOM_Object, containing the displaced shape.
9210         #
9211         #  @ref tui_modify_location "Example"
9212         @ManageTransactions("TrsfOp")
9213         def MakePosition(self, theObject, theStartLCS, theEndLCS, theName=None):
9214             """
9215             Modify the Location of the given object by LCS, creating its copy before the setting.
9216
9217             Parameters:
9218                 theObject The object to be displaced.
9219                 theStartLCS Coordinate system to perform displacement from it.
9220                             If theStartLCS is NULL, displacement
9221                             will be performed from global CS.
9222                             If theObject itself is used as theStartLCS,
9223                             its location will be changed to theEndLCS.
9224                 theEndLCS Coordinate system to perform displacement to it.
9225                 theName Object name; when specified, this parameter is used
9226                         for result publication in the study. Otherwise, if automatic
9227                         publication is switched on, default value is used for result name.
9228
9229             Returns:
9230                 New GEOM.GEOM_Object, containing the displaced shape.
9231
9232             Example of usage:
9233                 # create local coordinate systems
9234                 cs1 = geompy.MakeMarker( 0, 0, 0, 1,0,0, 0,1,0)
9235                 cs2 = geompy.MakeMarker(30,40,40, 1,0,0, 0,1,0)
9236                 # modify the location of the given object
9237                 position = geompy.MakePosition(cylinder, cs1, cs2)
9238             """
9239             # Example: see GEOM_TestAll.py
9240             anObj = self.TrsfOp.PositionShapeCopy(theObject, theStartLCS, theEndLCS)
9241             RaiseIfFailed("PositionShapeCopy", self.TrsfOp)
9242             self._autoPublish(anObj, theName, "displaced")
9243             return anObj
9244
9245         ## Modify the Location of the given object by Path.
9246         #  @param  theObject The object to be displaced.
9247         #  @param  thePath Wire or Edge along that the object will be translated.
9248         #  @param  theDistance progress of Path (0 = start location, 1 = end of path location).
9249         #  @param  theCopy is to create a copy objects if true.
9250         #  @param  theReverse  0 - for usual direction, 1 - to reverse path direction.
9251         #  @return Displaced @a theObject (GEOM.GEOM_Object) if @a theCopy is @c False or
9252         #          new GEOM.GEOM_Object, containing the displaced shape if @a theCopy is @c True.
9253         #
9254         #  @ref tui_modify_location "Example"
9255         @ManageTransactions("TrsfOp")
9256         def PositionAlongPath(self,theObject, thePath, theDistance, theCopy, theReverse):
9257             """
9258             Modify the Location of the given object by Path.
9259
9260             Parameters:
9261                  theObject The object to be displaced.
9262                  thePath Wire or Edge along that the object will be translated.
9263                  theDistance progress of Path (0 = start location, 1 = end of path location).
9264                  theCopy is to create a copy objects if true.
9265                  theReverse  0 - for usual direction, 1 - to reverse path direction.
9266
9267             Returns:
9268                  Displaced theObject (GEOM.GEOM_Object) if theCopy is False or
9269                  new GEOM.GEOM_Object, containing the displaced shape if theCopy is True.
9270
9271             Example of usage:
9272                 position = geompy.PositionAlongPath(cylinder, circle, 0.75, 1, 1)
9273             """
9274             # Example: see GEOM_TestAll.py
9275             anObj = self.TrsfOp.PositionAlongPath(theObject, thePath, theDistance, theCopy, theReverse)
9276             RaiseIfFailed("PositionAlongPath", self.TrsfOp)
9277             return anObj
9278
9279         ## Modify the Location of the given object by Path, creating its copy before the operation.
9280         #  @param theObject The object to be displaced.
9281         #  @param thePath Wire or Edge along that the object will be translated.
9282         #  @param theDistance progress of Path (0 = start location, 1 = end of path location).
9283         #  @param theReverse  0 - for usual direction, 1 - to reverse path direction.
9284         #  @param theName Object name; when specified, this parameter is used
9285         #         for result publication in the study. Otherwise, if automatic
9286         #         publication is switched on, default value is used for result name.
9287         #
9288         #  @return New GEOM.GEOM_Object, containing the displaced shape.
9289         @ManageTransactions("TrsfOp")
9290         def MakePositionAlongPath(self, theObject, thePath, theDistance, theReverse, theName=None):
9291             """
9292             Modify the Location of the given object by Path, creating its copy before the operation.
9293
9294             Parameters:
9295                  theObject The object to be displaced.
9296                  thePath Wire or Edge along that the object will be translated.
9297                  theDistance progress of Path (0 = start location, 1 = end of path location).
9298                  theReverse  0 - for usual direction, 1 - to reverse path direction.
9299                  theName Object name; when specified, this parameter is used
9300                          for result publication in the study. Otherwise, if automatic
9301                          publication is switched on, default value is used for result name.
9302
9303             Returns:
9304                 New GEOM.GEOM_Object, containing the displaced shape.
9305             """
9306             # Example: see GEOM_TestAll.py
9307             anObj = self.TrsfOp.PositionAlongPath(theObject, thePath, theDistance, 1, theReverse)
9308             RaiseIfFailed("PositionAlongPath", self.TrsfOp)
9309             self._autoPublish(anObj, theName, "displaced")
9310             return anObj
9311
9312         ## Offset given shape.
9313         #  @param theObject The base object for the offset.
9314         #  @param theOffset Offset value.
9315         #  @param theCopy Flag used to offset object itself or create a copy.
9316         #  @return Modified @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
9317         #  new GEOM.GEOM_Object, containing the result of offset operation if @a theCopy flag is @c True.
9318         @ManageTransactions("TrsfOp")
9319         def Offset(self, theObject, theOffset, theCopy=False):
9320             """
9321             Offset given shape.
9322
9323             Parameters:
9324                 theObject The base object for the offset.
9325                 theOffset Offset value.
9326                 theCopy Flag used to offset object itself or create a copy.
9327
9328             Returns:
9329                 Modified theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
9330                 new GEOM.GEOM_Object, containing the result of offset operation if theCopy flag is True.
9331             """
9332             theOffset, Parameters = ParseParameters(theOffset)
9333             if theCopy:
9334                 anObj = self.TrsfOp.OffsetShapeCopy(theObject, theOffset, True)
9335             else:
9336                 anObj = self.TrsfOp.OffsetShape(theObject, theOffset, True)
9337             RaiseIfFailed("Offset", self.TrsfOp)
9338             anObj.SetParameters(Parameters)
9339             return anObj
9340
9341         ## Create new object as offset of the given one. Gap between two adjacent
9342         #  offset surfaces is filled by a pipe.
9343         #  @param theObject The base object for the offset.
9344         #  @param theOffset Offset value.
9345         #  @param theName Object name; when specified, this parameter is used
9346         #         for result publication in the study. Otherwise, if automatic
9347         #         publication is switched on, default value is used for result name.
9348         #
9349         #  @return New GEOM.GEOM_Object, containing the offset object.
9350         #
9351         #  @sa MakeOffsetIntersectionJoin
9352         #  @ref tui_offset "Example"
9353         @ManageTransactions("TrsfOp")
9354         def MakeOffset(self, theObject, theOffset, theName=None):
9355             """
9356             Create new object as offset of the given one. Gap between adjacent
9357             offset surfaces is filled by a pipe.
9358
9359             Parameters:
9360                 theObject The base object for the offset.
9361                 theOffset Offset value.
9362                 theName Object name; when specified, this parameter is used
9363                         for result publication in the study. Otherwise, if automatic
9364                         publication is switched on, default value is used for result name.
9365
9366             Returns:
9367                 New GEOM.GEOM_Object, containing the offset object.
9368
9369             Example of usage:
9370                  box = geompy.MakeBox(20, 20, 20, 200, 200, 200)
9371                  # create a new object as offset of the given object
9372                  offset = geompy.MakeOffset(box, 70.)
9373             """
9374             # Example: see GEOM_TestAll.py
9375             theOffset, Parameters = ParseParameters(theOffset)
9376             anObj = self.TrsfOp.OffsetShapeCopy( theObject, theOffset, True )
9377             RaiseIfFailed("OffsetShapeCopy", self.TrsfOp)
9378             anObj.SetParameters(Parameters)
9379             self._autoPublish(anObj, theName, "offset")
9380             return anObj
9381
9382         ## Create new object as offset of the given one. Gap between adjacent
9383         #  offset surfaces is filled by extending and intersecting them.
9384         #  @param theObject The base object for the offset.
9385         #  @param theOffset Offset value.
9386         #  @param theName Object name; when specified, this parameter is used
9387         #         for result publication in the study. Otherwise, if automatic
9388         #         publication is switched on, default value is used for result name.
9389         #
9390         #  @return New GEOM.GEOM_Object, containing the offset object.
9391         #
9392         #  @sa MakeOffset
9393         #  @ref tui_offset "Example"
9394         @ManageTransactions("TrsfOp")
9395         def MakeOffsetIntersectionJoin(self, theObject, theOffset, theName=None):
9396             """
9397             Create new object as offset of the given one. Gap between adjacent
9398             offset surfaces is filled by extending and intersecting them.
9399
9400             Parameters:
9401                 theObject The base object for the offset.
9402                 theOffset Offset value.
9403                 theName Object name; when specified, this parameter is used
9404                         for result publication in the study. Otherwise, if automatic
9405                         publication is switched on, default value is used for result name.
9406
9407             Returns:
9408                 New GEOM.GEOM_Object, containing the offset object.
9409
9410             Example of usage:
9411                  box = geompy.MakeBox(20, 20, 20, 200, 200, 200)
9412                  # create a new box extended by 70
9413                  offset = geompy.MakeOffsetIntersectionJoin(box, 70.)
9414             """
9415             # Example: see GEOM_TestAll.py
9416             theOffset, Parameters = ParseParameters( theOffset )
9417             anObj = self.TrsfOp.OffsetShapeCopy( theObject, theOffset, False )
9418             RaiseIfFailed("OffsetShapeCopy", self.TrsfOp)
9419             anObj.SetParameters(Parameters)
9420             self._autoPublish(anObj, theName, "offset")
9421             return anObj
9422
9423         ## Create new object as projection of the given one on another.
9424         #  @param theSource The source object for the projection. It can be a point, edge or wire.
9425         #         Edge and wire are acceptable if @a theTarget is a face.
9426         #  @param theTarget The target object. It can be planar or cylindrical face, edge or wire.
9427         #  @param theName Object name; when specified, this parameter is used
9428         #         for result publication in the study. Otherwise, if automatic
9429         #         publication is switched on, default value is used for result name.
9430         #
9431         #  @return New GEOM.GEOM_Object, containing the projection.
9432         #
9433         #  @ref tui_projection "Example"
9434         @ManageTransactions("TrsfOp")
9435         def MakeProjection(self, theSource, theTarget, theName=None):
9436             """
9437             Create new object as projection of the given one on another.
9438
9439             Parameters:
9440                 theSource The source object for the projection. It can be a point, edge or wire.
9441                           Edge and wire are acceptable if theTarget is a face.
9442                 theTarget The target object. It can be planar or cylindrical face, edge or wire.
9443                 theName Object name; when specified, this parameter is used
9444                         for result publication in the study. Otherwise, if automatic
9445                         publication is switched on, default value is used for result name.
9446
9447             Returns:
9448                 New GEOM.GEOM_Object, containing the projection.
9449             """
9450             # Example: see GEOM_TestAll.py
9451             anObj = self.TrsfOp.ProjectShapeCopy(theSource, theTarget)
9452             RaiseIfFailed("ProjectShapeCopy", self.TrsfOp)
9453             self._autoPublish(anObj, theName, "projection")
9454             return anObj
9455
9456         ## Create a projection of the given point on a wire or an edge.
9457         #  If there are no solutions or there are 2 or more solutions It throws an
9458         #  exception.
9459         #  @param thePoint the point to be projected.
9460         #  @param theWire the wire. The edge is accepted as well.
9461         #  @param theName Object name; when specified, this parameter is used
9462         #         for result publication in the study. Otherwise, if automatic
9463         #         publication is switched on, default value is used for result name.
9464         #
9465         #  @return [\a u, \a PointOnEdge, \a EdgeInWireIndex]
9466         #  \n \a u: The parameter of projection point on edge.
9467         #  \n \a PointOnEdge: The projection point.
9468         #  \n \a EdgeInWireIndex: The index of an edge in a wire.
9469         #
9470         #  @ref tui_projection "Example"
9471         @ManageTransactions("TrsfOp")
9472         def MakeProjectionOnWire(self, thePoint, theWire, theName=None):
9473             """
9474             Create a projection of the given point on a wire or an edge.
9475             If there are no solutions or there are 2 or more solutions It throws an
9476             exception.
9477
9478             Parameters:
9479                 thePoint the point to be projected.
9480                 theWire the wire. The edge is accepted as well.
9481                 theName Object name; when specified, this parameter is used
9482                         for result publication in the study. Otherwise, if automatic
9483                         publication is switched on, default value is used for result name.
9484
9485             Returns:
9486                 [u, PointOnEdge, EdgeInWireIndex]
9487                  u: The parameter of projection point on edge.
9488                  PointOnEdge: The projection point.
9489                  EdgeInWireIndex: The index of an edge in a wire.
9490             """
9491             # Example: see GEOM_TestAll.py
9492             anObj = self.TrsfOp.ProjectPointOnWire(thePoint, theWire)
9493             RaiseIfFailed("ProjectPointOnWire", self.TrsfOp)
9494             self._autoPublish(anObj[1], theName, "projection")
9495             return anObj
9496
9497         # -----------------------------------------------------------------------------
9498         # Patterns
9499         # -----------------------------------------------------------------------------
9500
9501         ## Translate the given object along the given vector a given number times
9502         #  @param theObject The object to be translated.
9503         #  @param theVector Direction of the translation. DX if None.
9504         #  @param theStep Distance to translate on.
9505         #  @param theNbTimes Quantity of translations to be done.
9506         #  @param theName Object name; when specified, this parameter is used
9507         #         for result publication in the study. Otherwise, if automatic
9508         #         publication is switched on, default value is used for result name.
9509         #
9510         #  @return New GEOM.GEOM_Object, containing compound of all
9511         #          the shapes, obtained after each translation.
9512         #
9513         #  @ref tui_multi_translation "Example"
9514         @ManageTransactions("TrsfOp")
9515         def MakeMultiTranslation1D(self, theObject, theVector, theStep, theNbTimes, theName=None):
9516             """
9517             Translate the given object along the given vector a given number times
9518
9519             Parameters:
9520                 theObject The object to be translated.
9521                 theVector Direction of the translation. DX if None.
9522                 theStep Distance to translate on.
9523                 theNbTimes Quantity of translations to be done.
9524                 theName Object name; when specified, this parameter is used
9525                         for result publication in the study. Otherwise, if automatic
9526                         publication is switched on, default value is used for result name.
9527
9528             Returns:
9529                 New GEOM.GEOM_Object, containing compound of all
9530                 the shapes, obtained after each translation.
9531
9532             Example of usage:
9533                 r1d = geompy.MakeMultiTranslation1D(prism, vect, 20, 4)
9534             """
9535             # Example: see GEOM_TestAll.py
9536             theStep, theNbTimes, Parameters = ParseParameters(theStep, theNbTimes)
9537             anObj = self.TrsfOp.MultiTranslate1D(theObject, theVector, theStep, theNbTimes)
9538             RaiseIfFailed("MultiTranslate1D", self.TrsfOp)
9539             anObj.SetParameters(Parameters)
9540             self._autoPublish(anObj, theName, "multitranslation")
9541             return anObj
9542
9543         ## Conseqently apply two specified translations to theObject specified number of times.
9544         #  @param theObject The object to be translated.
9545         #  @param theVector1 Direction of the first translation. DX if None.
9546         #  @param theStep1 Step of the first translation.
9547         #  @param theNbTimes1 Quantity of translations to be done along theVector1.
9548         #  @param theVector2 Direction of the second translation. DY if None.
9549         #  @param theStep2 Step of the second translation.
9550         #  @param theNbTimes2 Quantity of translations to be done along theVector2.
9551         #  @param theName Object name; when specified, this parameter is used
9552         #         for result publication in the study. Otherwise, if automatic
9553         #         publication is switched on, default value is used for result name.
9554         #
9555         #  @return New GEOM.GEOM_Object, containing compound of all
9556         #          the shapes, obtained after each translation.
9557         #
9558         #  @ref tui_multi_translation "Example"
9559         @ManageTransactions("TrsfOp")
9560         def MakeMultiTranslation2D(self, theObject, theVector1, theStep1, theNbTimes1,
9561                                    theVector2, theStep2, theNbTimes2, theName=None):
9562             """
9563             Conseqently apply two specified translations to theObject specified number of times.
9564
9565             Parameters:
9566                 theObject The object to be translated.
9567                 theVector1 Direction of the first translation. DX if None.
9568                 theStep1 Step of the first translation.
9569                 theNbTimes1 Quantity of translations to be done along theVector1.
9570                 theVector2 Direction of the second translation. DY if None.
9571                 theStep2 Step of the second translation.
9572                 theNbTimes2 Quantity of translations to be done along theVector2.
9573                 theName Object name; when specified, this parameter is used
9574                         for result publication in the study. Otherwise, if automatic
9575                         publication is switched on, default value is used for result name.
9576
9577             Returns:
9578                 New GEOM.GEOM_Object, containing compound of all
9579                 the shapes, obtained after each translation.
9580
9581             Example of usage:
9582                 tr2d = geompy.MakeMultiTranslation2D(prism, vect1, 20, 4, vect2, 80, 3)
9583             """
9584             # Example: see GEOM_TestAll.py
9585             theStep1,theNbTimes1,theStep2,theNbTimes2, Parameters = ParseParameters(theStep1,theNbTimes1,theStep2,theNbTimes2)
9586             anObj = self.TrsfOp.MultiTranslate2D(theObject, theVector1, theStep1, theNbTimes1,
9587                                                  theVector2, theStep2, theNbTimes2)
9588             RaiseIfFailed("MultiTranslate2D", self.TrsfOp)
9589             anObj.SetParameters(Parameters)
9590             self._autoPublish(anObj, theName, "multitranslation")
9591             return anObj
9592
9593         ## Rotate the given object around the given axis a given number times.
9594         #  Rotation angle will be 2*PI/theNbTimes.
9595         #  @param theObject The object to be rotated.
9596         #  @param theAxis The rotation axis. DZ if None.
9597         #  @param theNbTimes Quantity of rotations to be done.
9598         #  @param theName Object name; when specified, this parameter is used
9599         #         for result publication in the study. Otherwise, if automatic
9600         #         publication is switched on, default value is used for result name.
9601         #
9602         #  @return New GEOM.GEOM_Object, containing compound of all the
9603         #          shapes, obtained after each rotation.
9604         #
9605         #  @ref tui_multi_rotation "Example"
9606         @ManageTransactions("TrsfOp")
9607         def MultiRotate1DNbTimes (self, theObject, theAxis, theNbTimes, theName=None):
9608             """
9609             Rotate the given object around the given axis a given number times.
9610             Rotation angle will be 2*PI/theNbTimes.
9611
9612             Parameters:
9613                 theObject The object to be rotated.
9614                 theAxis The rotation axis. DZ if None.
9615                 theNbTimes Quantity of rotations to be done.
9616                 theName Object name; when specified, this parameter is used
9617                         for result publication in the study. Otherwise, if automatic
9618                         publication is switched on, default value is used for result name.
9619
9620             Returns:
9621                 New GEOM.GEOM_Object, containing compound of all the
9622                 shapes, obtained after each rotation.
9623
9624             Example of usage:
9625                 rot1d = geompy.MultiRotate1DNbTimes(prism, vect, 4)
9626             """
9627             # Example: see GEOM_TestAll.py
9628             theNbTimes, Parameters = ParseParameters(theNbTimes)
9629             anObj = self.TrsfOp.MultiRotate1D(theObject, theAxis, theNbTimes)
9630             RaiseIfFailed("MultiRotate1DNbTimes", self.TrsfOp)
9631             anObj.SetParameters(Parameters)
9632             self._autoPublish(anObj, theName, "multirotation")
9633             return anObj
9634
9635         ## Rotate the given object around the given axis
9636         #  a given number times on the given angle.
9637         #  @param theObject The object to be rotated.
9638         #  @param theAxis The rotation axis. DZ if None.
9639         #  @param theAngleStep Rotation angle in radians.
9640         #  @param theNbTimes Quantity of rotations to be done.
9641         #  @param theName Object name; when specified, this parameter is used
9642         #         for result publication in the study. Otherwise, if automatic
9643         #         publication is switched on, default value is used for result name.
9644         #
9645         #  @return New GEOM.GEOM_Object, containing compound of all the
9646         #          shapes, obtained after each rotation.
9647         #
9648         #  @ref tui_multi_rotation "Example"
9649         @ManageTransactions("TrsfOp")
9650         def MultiRotate1DByStep(self, theObject, theAxis, theAngleStep, theNbTimes, theName=None):
9651             """
9652             Rotate the given object around the given axis
9653             a given number times on the given angle.
9654
9655             Parameters:
9656                 theObject The object to be rotated.
9657                 theAxis The rotation axis. DZ if None.
9658                 theAngleStep Rotation angle in radians.
9659                 theNbTimes Quantity of rotations to be done.
9660                 theName Object name; when specified, this parameter is used
9661                         for result publication in the study. Otherwise, if automatic
9662                         publication is switched on, default value is used for result name.
9663
9664             Returns:
9665                 New GEOM.GEOM_Object, containing compound of all the
9666                 shapes, obtained after each rotation.
9667
9668             Example of usage:
9669                 rot1d = geompy.MultiRotate1DByStep(prism, vect, math.pi/4, 4)
9670             """
9671             # Example: see GEOM_TestAll.py
9672             theAngleStep, theNbTimes, Parameters = ParseParameters(theAngleStep, theNbTimes)
9673             anObj = self.TrsfOp.MultiRotate1DByStep(theObject, theAxis, theAngleStep, theNbTimes)
9674             RaiseIfFailed("MultiRotate1DByStep", self.TrsfOp)
9675             anObj.SetParameters(Parameters)
9676             self._autoPublish(anObj, theName, "multirotation")
9677             return anObj
9678
9679         ## Rotate the given object around the given axis a given
9680         #  number times and multi-translate each rotation result.
9681         #  Rotation angle will be 2*PI/theNbTimes1.
9682         #  Translation direction passes through center of gravity
9683         #  of rotated shape and its projection on the rotation axis.
9684         #  @param theObject The object to be rotated.
9685         #  @param theAxis Rotation axis. DZ if None.
9686         #  @param theNbTimes1 Quantity of rotations to be done.
9687         #  @param theRadialStep Translation distance.
9688         #  @param theNbTimes2 Quantity of translations to be done.
9689         #  @param theName Object name; when specified, this parameter is used
9690         #         for result publication in the study. Otherwise, if automatic
9691         #         publication is switched on, default value is used for result name.
9692         #
9693         #  @return New GEOM.GEOM_Object, containing compound of all the
9694         #          shapes, obtained after each transformation.
9695         #
9696         #  @ref tui_multi_rotation "Example"
9697         @ManageTransactions("TrsfOp")
9698         def MultiRotate2DNbTimes(self, theObject, theAxis, theNbTimes1, theRadialStep, theNbTimes2, theName=None):
9699             """
9700             Rotate the given object around the
9701             given axis on the given angle a given number
9702             times and multi-translate each rotation result.
9703             Translation direction passes through center of gravity
9704             of rotated shape and its projection on the rotation axis.
9705
9706             Parameters:
9707                 theObject The object to be rotated.
9708                 theAxis Rotation axis. DZ if None.
9709                 theNbTimes1 Quantity of rotations to be done.
9710                 theRadialStep Translation distance.
9711                 theNbTimes2 Quantity of translations to be done.
9712                 theName Object name; when specified, this parameter is used
9713                         for result publication in the study. Otherwise, if automatic
9714                         publication is switched on, default value is used for result name.
9715
9716             Returns:
9717                 New GEOM.GEOM_Object, containing compound of all the
9718                 shapes, obtained after each transformation.
9719
9720             Example of usage:
9721                 rot2d = geompy.MultiRotate2D(prism, vect, 60, 4, 50, 5)
9722             """
9723             # Example: see GEOM_TestAll.py
9724             theNbTimes1, theRadialStep, theNbTimes2, Parameters = ParseParameters(theNbTimes1, theRadialStep, theNbTimes2)
9725             anObj = self.TrsfOp.MultiRotate2DNbTimes(theObject, theAxis, theNbTimes1, theRadialStep, theNbTimes2)
9726             RaiseIfFailed("MultiRotate2DNbTimes", self.TrsfOp)
9727             anObj.SetParameters(Parameters)
9728             self._autoPublish(anObj, theName, "multirotation")
9729             return anObj
9730
9731         ## Rotate the given object around the
9732         #  given axis on the given angle a given number
9733         #  times and multi-translate each rotation result.
9734         #  Translation direction passes through center of gravity
9735         #  of rotated shape and its projection on the rotation axis.
9736         #  @param theObject The object to be rotated.
9737         #  @param theAxis Rotation axis. DZ if None.
9738         #  @param theAngleStep Rotation angle in radians.
9739         #  @param theNbTimes1 Quantity of rotations to be done.
9740         #  @param theRadialStep Translation distance.
9741         #  @param theNbTimes2 Quantity of translations to be done.
9742         #  @param theName Object name; when specified, this parameter is used
9743         #         for result publication in the study. Otherwise, if automatic
9744         #         publication is switched on, default value is used for result name.
9745         #
9746         #  @return New GEOM.GEOM_Object, containing compound of all the
9747         #          shapes, obtained after each transformation.
9748         #
9749         #  @ref tui_multi_rotation "Example"
9750         @ManageTransactions("TrsfOp")
9751         def MultiRotate2DByStep (self, theObject, theAxis, theAngleStep, theNbTimes1, theRadialStep, theNbTimes2, theName=None):
9752             """
9753             Rotate the given object around the
9754             given axis on the given angle a given number
9755             times and multi-translate each rotation result.
9756             Translation direction passes through center of gravity
9757             of rotated shape and its projection on the rotation axis.
9758
9759             Parameters:
9760                 theObject The object to be rotated.
9761                 theAxis Rotation axis. DZ if None.
9762                 theAngleStep Rotation angle in radians.
9763                 theNbTimes1 Quantity of rotations to be done.
9764                 theRadialStep Translation distance.
9765                 theNbTimes2 Quantity of translations to be done.
9766                 theName Object name; when specified, this parameter is used
9767                         for result publication in the study. Otherwise, if automatic
9768                         publication is switched on, default value is used for result name.
9769
9770             Returns:
9771                 New GEOM.GEOM_Object, containing compound of all the
9772                 shapes, obtained after each transformation.
9773
9774             Example of usage:
9775                 rot2d = geompy.MultiRotate2D(prism, vect, math.pi/3, 4, 50, 5)
9776             """
9777             # Example: see GEOM_TestAll.py
9778             theAngleStep, theNbTimes1, theRadialStep, theNbTimes2, Parameters = ParseParameters(theAngleStep, theNbTimes1, theRadialStep, theNbTimes2)
9779             anObj = self.TrsfOp.MultiRotate2DByStep(theObject, theAxis, theAngleStep, theNbTimes1, theRadialStep, theNbTimes2)
9780             RaiseIfFailed("MultiRotate2DByStep", self.TrsfOp)
9781             anObj.SetParameters(Parameters)
9782             self._autoPublish(anObj, theName, "multirotation")
9783             return anObj
9784
9785         ## The same, as MultiRotate1DNbTimes(), but axis is given by direction and point
9786         #
9787         #  @ref swig_MakeMultiRotation "Example"
9788         def MakeMultiRotation1DNbTimes(self, aShape, aDir, aPoint, aNbTimes, theName=None):
9789             """
9790             The same, as geompy.MultiRotate1DNbTimes, but axis is given by direction and point
9791
9792             Example of usage:
9793                 pz = geompy.MakeVertex(0, 0, 100)
9794                 vy = geompy.MakeVectorDXDYDZ(0, 100, 0)
9795                 MultiRot1D = geompy.MakeMultiRotation1DNbTimes(prism, vy, pz, 6)
9796             """
9797             # Example: see GEOM_TestOthers.py
9798             aVec = self.MakeLine(aPoint,aDir)
9799             # note: auto-publishing is done in self.MultiRotate1D()
9800             anObj = self.MultiRotate1DNbTimes(aShape, aVec, aNbTimes, theName)
9801             return anObj
9802
9803         ## The same, as MultiRotate1DByStep(), but axis is given by direction and point
9804         #
9805         #  @ref swig_MakeMultiRotation "Example"
9806         def MakeMultiRotation1DByStep(self, aShape, aDir, aPoint, anAngle, aNbTimes, theName=None):
9807             """
9808             The same, as geompy.MultiRotate1D, but axis is given by direction and point
9809
9810             Example of usage:
9811                 pz = geompy.MakeVertex(0, 0, 100)
9812                 vy = geompy.MakeVectorDXDYDZ(0, 100, 0)
9813                 MultiRot1D = geompy.MakeMultiRotation1DByStep(prism, vy, pz, math.pi/3, 6)
9814             """
9815             # Example: see GEOM_TestOthers.py
9816             aVec = self.MakeLine(aPoint,aDir)
9817             # note: auto-publishing is done in self.MultiRotate1D()
9818             anObj = self.MultiRotate1DByStep(aShape, aVec, anAngle, aNbTimes, theName)
9819             return anObj
9820
9821         ## The same, as MultiRotate2DNbTimes(), but axis is given by direction and point
9822         #
9823         #  @ref swig_MakeMultiRotation "Example"
9824         def MakeMultiRotation2DNbTimes(self, aShape, aDir, aPoint, nbtimes1, aStep, nbtimes2, theName=None):
9825             """
9826             The same, as MultiRotate2DNbTimes(), but axis is given by direction and point
9827
9828             Example of usage:
9829                 pz = geompy.MakeVertex(0, 0, 100)
9830                 vy = geompy.MakeVectorDXDYDZ(0, 100, 0)
9831                 MultiRot2D = geompy.MakeMultiRotation2DNbTimes(f12, vy, pz, 6, 30, 3)
9832             """
9833             # Example: see GEOM_TestOthers.py
9834             aVec = self.MakeLine(aPoint,aDir)
9835             # note: auto-publishing is done in self.MultiRotate2DNbTimes()
9836             anObj = self.MultiRotate2DNbTimes(aShape, aVec, nbtimes1, aStep, nbtimes2, theName)
9837             return anObj
9838
9839         ## The same, as MultiRotate2DByStep(), but axis is given by direction and point
9840         #
9841         #  @ref swig_MakeMultiRotation "Example"
9842         def MakeMultiRotation2DByStep(self, aShape, aDir, aPoint, anAngle, nbtimes1, aStep, nbtimes2, theName=None):
9843             """
9844             The same, as MultiRotate2DByStep(), but axis is given by direction and point
9845
9846             Example of usage:
9847                 pz = geompy.MakeVertex(0, 0, 100)
9848                 vy = geompy.MakeVectorDXDYDZ(0, 100, 0)
9849                 MultiRot2D = geompy.MakeMultiRotation2DByStep(f12, vy, pz, math.pi/4, 6, 30, 3)
9850             """
9851             # Example: see GEOM_TestOthers.py
9852             aVec = self.MakeLine(aPoint,aDir)
9853             # note: auto-publishing is done in self.MultiRotate2D()
9854             anObj = self.MultiRotate2DByStep(aShape, aVec, anAngle, nbtimes1, aStep, nbtimes2, theName)
9855             return anObj
9856
9857         ##
9858         #  Compute a wire or a face that represents a projection of the source
9859         #  shape onto cylinder. The cylinder's coordinate system is the same
9860         #  as the global coordinate system.
9861         #
9862         #  @param theObject The object to be projected. It can be either
9863         #         a planar wire or a face.
9864         #  @param theRadius The radius of the cylinder.
9865         #  @param theStartAngle The starting angle in radians from
9866         #         the cylinder's X axis around Z axis. The angle from which
9867         #         the projection is started.
9868         #  @param theAngleLength The projection length angle in radians.
9869         #         The angle in which to project the total length of the wire.
9870         #         If it is negative the projection is not scaled and natural
9871         #         wire length is kept for the projection.
9872         #  @param theAngleRotation The desired angle in radians between
9873         #         the tangent vector to the first curve at the first point of
9874         #         the theObject's projection in 2D space and U-direction of
9875         #         cylinder's 2D space.
9876         #  @param theName Object name; when specified, this parameter is used
9877         #         for result publication in the study. Otherwise, if automatic
9878         #         publication is switched on, default value is used for result name.
9879         #
9880         #  @return New GEOM.GEOM_Object, containing the result shape. The result
9881         #         represents a wire or a face that represents a projection of
9882         #         the source shape onto a cylinder.
9883         #
9884         #  @ref tui_projection "Example"
9885         def MakeProjectionOnCylinder (self, theObject, theRadius,
9886                                       theStartAngle=0.0, theAngleLength=-1.0,
9887                                       theAngleRotation=0.0,
9888                                       theName=None):
9889             """
9890             Compute a wire or a face that represents a projection of the source
9891             shape onto cylinder. The cylinder's coordinate system is the same
9892             as the global coordinate system.
9893
9894             Parameters:
9895                 theObject The object to be projected. It can be either
9896                         a planar wire or a face.
9897                 theRadius The radius of the cylinder.
9898                 theStartAngle The starting angle in radians from the cylinder's X axis
9899                         around Z axis. The angle from which the projection is started.
9900                 theAngleLength The projection length angle in radians. The angle in which
9901                         to project the total length of the wire. If it is negative the
9902                         projection is not scaled and natural wire length is kept for
9903                         the projection.
9904                 theAngleRotation The desired angle in radians between
9905                         the tangent vector to the first curve at the first
9906                         point of the theObject's projection in 2D space and
9907                         U-direction of cylinder's 2D space.
9908                 theName Object name; when specified, this parameter is used
9909                         for result publication in the study. Otherwise, if automatic
9910                         publication is switched on, default value is used for result name.
9911
9912             Returns:
9913                 New GEOM.GEOM_Object, containing the result shape. The result
9914                 represents a wire or a face that represents a projection of
9915                 the source shape onto a cylinder.
9916             """
9917             # Example: see GEOM_TestAll.py
9918             flagStartAngle = False
9919             if isinstance(theStartAngle,str):
9920                 flagStartAngle = True
9921             flagAngleLength = False
9922             if isinstance(theAngleLength,str):
9923                 flagAngleLength = True
9924             flagAngleRotation = False
9925             if isinstance(theAngleRotation,str):
9926                 flagAngleRotation = True
9927             theRadius, theStartAngle, theAngleLength, theAngleRotation, Parameters = ParseParameters(
9928               theRadius, theStartAngle, theAngleLength, theAngleRotation)
9929             if flagStartAngle:
9930                 theStartAngle = theStartAngle*math.pi/180.
9931             if flagAngleLength:
9932                 theAngleLength = theAngleLength*math.pi/180.
9933             if flagAngleRotation:
9934                 theAngleRotation = theAngleRotation*math.pi/180.
9935             anObj = self.TrsfOp.MakeProjectionOnCylinder(theObject, theRadius,
9936                 theStartAngle, theAngleLength, theAngleRotation)
9937             RaiseIfFailed("MakeProjectionOnCylinder", self.TrsfOp)
9938             anObj.SetParameters(Parameters)
9939             self._autoPublish(anObj, theName, "projection")
9940             return anObj
9941
9942         # end of l3_transform
9943         ## @}
9944
9945         ## @addtogroup l3_transform_d
9946         ## @{
9947
9948         ## Deprecated method. Use MultiRotate1DNbTimes instead.
9949         def MultiRotate1D(self, theObject, theAxis, theNbTimes, theName=None):
9950             """
9951             Deprecated method. Use MultiRotate1DNbTimes instead.
9952             """
9953             print("The method MultiRotate1D is DEPRECATED. Use MultiRotate1DNbTimes instead.")
9954             return self.MultiRotate1DNbTimes(theObject, theAxis, theNbTimes, theName)
9955
9956         ## The same, as MultiRotate2DByStep(), but theAngle is in degrees.
9957         #  This method is DEPRECATED. Use MultiRotate2DByStep() instead.
9958         @ManageTransactions("TrsfOp")
9959         def MultiRotate2D(self, theObject, theAxis, theAngle, theNbTimes1, theStep, theNbTimes2, theName=None):
9960             """
9961             The same, as MultiRotate2DByStep(), but theAngle is in degrees.
9962             This method is DEPRECATED. Use MultiRotate2DByStep() instead.
9963
9964             Example of usage:
9965                 rot2d = geompy.MultiRotate2D(prism, vect, 60, 4, 50, 5)
9966             """
9967             print("The method MultiRotate2D is DEPRECATED. Use MultiRotate2DByStep instead.")
9968             theAngle, theNbTimes1, theStep, theNbTimes2, Parameters = ParseParameters(theAngle, theNbTimes1, theStep, theNbTimes2)
9969             anObj = self.TrsfOp.MultiRotate2D(theObject, theAxis, theAngle, theNbTimes1, theStep, theNbTimes2)
9970             RaiseIfFailed("MultiRotate2D", self.TrsfOp)
9971             anObj.SetParameters(Parameters)
9972             self._autoPublish(anObj, theName, "multirotation")
9973             return anObj
9974
9975         ## The same, as MultiRotate1D(), but axis is given by direction and point
9976         #  This method is DEPRECATED. Use MakeMultiRotation1DNbTimes instead.
9977         def MakeMultiRotation1D(self, aShape, aDir, aPoint, aNbTimes, theName=None):
9978             """
9979             The same, as geompy.MultiRotate1D, but axis is given by direction and point.
9980             This method is DEPRECATED. Use MakeMultiRotation1DNbTimes instead.
9981
9982             Example of usage:
9983                 pz = geompy.MakeVertex(0, 0, 100)
9984                 vy = geompy.MakeVectorDXDYDZ(0, 100, 0)
9985                 MultiRot1D = geompy.MakeMultiRotation1D(prism, vy, pz, 6)
9986             """
9987             print("The method MakeMultiRotation1D is DEPRECATED. Use MakeMultiRotation1DNbTimes instead.")
9988             aVec = self.MakeLine(aPoint,aDir)
9989             # note: auto-publishing is done in self.MultiRotate1D()
9990             anObj = self.MultiRotate1D(aShape, aVec, aNbTimes, theName)
9991             return anObj
9992
9993         ## The same, as MultiRotate2D(), but axis is given by direction and point
9994         #  This method is DEPRECATED. Use MakeMultiRotation2DByStep instead.
9995         def MakeMultiRotation2D(self, aShape, aDir, aPoint, anAngle, nbtimes1, aStep, nbtimes2, theName=None):
9996             """
9997             The same, as MultiRotate2D(), but axis is given by direction and point
9998             This method is DEPRECATED. Use MakeMultiRotation2DByStep instead.
9999
10000             Example of usage:
10001                 pz = geompy.MakeVertex(0, 0, 100)
10002                 vy = geompy.MakeVectorDXDYDZ(0, 100, 0)
10003                 MultiRot2D = geompy.MakeMultiRotation2D(f12, vy, pz, 45, 6, 30, 3)
10004             """
10005             print("The method MakeMultiRotation2D is DEPRECATED. Use MakeMultiRotation2DByStep instead.")
10006             aVec = self.MakeLine(aPoint,aDir)
10007             # note: auto-publishing is done in self.MultiRotate2D()
10008             anObj = self.MultiRotate2D(aShape, aVec, anAngle, nbtimes1, aStep, nbtimes2, theName)
10009             return anObj
10010
10011         # end of l3_transform_d
10012         ## @}
10013
10014         ## @addtogroup l3_local
10015         ## @{
10016
10017         ## Perform a fillet on all edges of the given shape.
10018         #  @param theShape Shape, to perform fillet on.
10019         #  @param theR Fillet radius.
10020         #  @param theName Object name; when specified, this parameter is used
10021         #         for result publication in the study. Otherwise, if automatic
10022         #         publication is switched on, default value is used for result name.
10023         #
10024         #  @return New GEOM.GEOM_Object, containing the result shape.
10025         #
10026         #  @ref tui_fillet "Example 1"
10027         #  \n @ref swig_MakeFilletAll "Example 2"
10028         @ManageTransactions("LocalOp")
10029         def MakeFilletAll(self, theShape, theR, theName=None):
10030             """
10031             Perform a fillet on all edges of the given shape.
10032
10033             Parameters:
10034                 theShape Shape, to perform fillet on.
10035                 theR Fillet radius.
10036                 theName Object name; when specified, this parameter is used
10037                         for result publication in the study. Otherwise, if automatic
10038                         publication is switched on, default value is used for result name.
10039
10040             Returns:
10041                 New GEOM.GEOM_Object, containing the result shape.
10042
10043             Example of usage:
10044                filletall = geompy.MakeFilletAll(prism, 10.)
10045             """
10046             # Example: see GEOM_TestOthers.py
10047             theR,Parameters = ParseParameters(theR)
10048             anObj = self.LocalOp.MakeFilletAll(theShape, theR)
10049             RaiseIfFailed("MakeFilletAll", self.LocalOp)
10050             anObj.SetParameters(Parameters)
10051             self._autoPublish(anObj, theName, "fillet")
10052             return anObj
10053
10054         ## Perform a fillet on the specified edges/faces of the given shape
10055         #  @param theShape Shape, to perform fillet on.
10056         #  @param theR Fillet radius.
10057         #  @param theShapeType Type of shapes in <VAR>theListShapes</VAR> (see ShapeType())
10058         #  @param theListShapes Global indices of edges/faces to perform fillet on.
10059         #  @param theName Object name; when specified, this parameter is used
10060         #         for result publication in the study. Otherwise, if automatic
10061         #         publication is switched on, default value is used for result name.
10062         #
10063         #  @note Global index of sub-shape can be obtained, using method GetSubShapeID().
10064         #
10065         #  @return New GEOM.GEOM_Object, containing the result shape.
10066         #
10067         #  @ref tui_fillet "Example"
10068         @ManageTransactions("LocalOp")
10069         def MakeFillet(self, theShape, theR, theShapeType, theListShapes, theName=None):
10070             """
10071             Perform a fillet on the specified edges/faces of the given shape
10072
10073             Parameters:
10074                 theShape Shape, to perform fillet on.
10075                 theR Fillet radius.
10076                 theShapeType Type of shapes in theListShapes (see geompy.ShapeTypes)
10077                 theListShapes Global indices of edges/faces to perform fillet on.
10078                 theName Object name; when specified, this parameter is used
10079                         for result publication in the study. Otherwise, if automatic
10080                         publication is switched on, default value is used for result name.
10081
10082             Note:
10083                 Global index of sub-shape can be obtained, using method geompy.GetSubShapeID
10084
10085             Returns:
10086                 New GEOM.GEOM_Object, containing the result shape.
10087
10088             Example of usage:
10089                 # get the list of IDs (IDList) for the fillet
10090                 prism_edges = geompy.SubShapeAllSortedCentres(prism, geompy.ShapeType["EDGE"])
10091                 IDlist_e = []
10092                 IDlist_e.append(geompy.GetSubShapeID(prism, prism_edges[0]))
10093                 IDlist_e.append(geompy.GetSubShapeID(prism, prism_edges[1]))
10094                 IDlist_e.append(geompy.GetSubShapeID(prism, prism_edges[2]))
10095                 # make a fillet on the specified edges of the given shape
10096                 fillet = geompy.MakeFillet(prism, 10., geompy.ShapeType["EDGE"], IDlist_e)
10097             """
10098             # Example: see GEOM_TestAll.py
10099             theR,Parameters = ParseParameters(theR)
10100             anObj = None
10101             if theShapeType == self.ShapeType["EDGE"]:
10102                 anObj = self.LocalOp.MakeFilletEdges(theShape, theR, theListShapes)
10103                 RaiseIfFailed("MakeFilletEdges", self.LocalOp)
10104             else:
10105                 anObj = self.LocalOp.MakeFilletFaces(theShape, theR, theListShapes)
10106                 RaiseIfFailed("MakeFilletFaces", self.LocalOp)
10107             anObj.SetParameters(Parameters)
10108             self._autoPublish(anObj, theName, "fillet")
10109             return anObj
10110
10111         ## The same that MakeFillet() but with two Fillet Radius R1 and R2
10112         @ManageTransactions("LocalOp")
10113         def MakeFilletR1R2(self, theShape, theR1, theR2, theShapeType, theListShapes, theName=None):
10114             """
10115             The same that geompy.MakeFillet but with two Fillet Radius R1 and R2
10116
10117             Example of usage:
10118                 # get the list of IDs (IDList) for the fillet
10119                 prism_edges = geompy.SubShapeAllSortedCentres(prism, geompy.ShapeType["EDGE"])
10120                 IDlist_e = []
10121                 IDlist_e.append(geompy.GetSubShapeID(prism, prism_edges[0]))
10122                 IDlist_e.append(geompy.GetSubShapeID(prism, prism_edges[1]))
10123                 IDlist_e.append(geompy.GetSubShapeID(prism, prism_edges[2]))
10124                 # make a fillet on the specified edges of the given shape
10125                 fillet = geompy.MakeFillet(prism, 10., 15., geompy.ShapeType["EDGE"], IDlist_e)
10126             """
10127             theR1,theR2,Parameters = ParseParameters(theR1,theR2)
10128             anObj = None
10129             if theShapeType == self.ShapeType["EDGE"]:
10130                 anObj = self.LocalOp.MakeFilletEdgesR1R2(theShape, theR1, theR2, theListShapes)
10131                 RaiseIfFailed("MakeFilletEdgesR1R2", self.LocalOp)
10132             else:
10133                 anObj = self.LocalOp.MakeFilletFacesR1R2(theShape, theR1, theR2, theListShapes)
10134                 RaiseIfFailed("MakeFilletFacesR1R2", self.LocalOp)
10135             anObj.SetParameters(Parameters)
10136             self._autoPublish(anObj, theName, "fillet")
10137             return anObj
10138
10139         ## Perform a fillet on the specified edges of the given shape
10140         #  @param theShape  Wire Shape to perform fillet on.
10141         #  @param theR  Fillet radius.
10142         #  @param theListOfVertexes Global indices of vertexes to perform fillet on.
10143         #    \note Global index of sub-shape can be obtained, using method GetSubShapeID()
10144         #    \note The list of vertices could be empty,
10145         #          in this case fillet will done done at all vertices in wire
10146         #  @param doIgnoreSecantVertices If FALSE, fillet radius is always limited
10147         #         by the length of the edges, nearest to the fillet vertex.
10148         #         But sometimes the next edge is C1 continuous with the one, nearest to
10149         #         the fillet point, and such two (or more) edges can be united to allow
10150         #         bigger radius. Set this flag to TRUE to allow collinear edges union,
10151         #         thus ignoring the secant vertex (vertices).
10152         #  @param theName Object name; when specified, this parameter is used
10153         #         for result publication in the study. Otherwise, if automatic
10154         #         publication is switched on, default value is used for result name.
10155         #
10156         #  @return New GEOM.GEOM_Object, containing the result shape.
10157         #
10158         #  @ref tui_fillet2d "Example"
10159         @ManageTransactions("LocalOp")
10160         def MakeFillet1D(self, theShape, theR, theListOfVertexes, doIgnoreSecantVertices = True, theName=None):
10161             """
10162             Perform a fillet on the specified edges of the given shape
10163
10164             Parameters:
10165                 theShape  Wire Shape to perform fillet on.
10166                 theR  Fillet radius.
10167                 theListOfVertexes Global indices of vertexes to perform fillet on.
10168                 doIgnoreSecantVertices If FALSE, fillet radius is always limited
10169                     by the length of the edges, nearest to the fillet vertex.
10170                     But sometimes the next edge is C1 continuous with the one, nearest to
10171                     the fillet point, and such two (or more) edges can be united to allow
10172                     bigger radius. Set this flag to TRUE to allow collinear edges union,
10173                     thus ignoring the secant vertex (vertices).
10174                 theName Object name; when specified, this parameter is used
10175                         for result publication in the study. Otherwise, if automatic
10176                         publication is switched on, default value is used for result name.
10177             Note:
10178                 Global index of sub-shape can be obtained, using method geompy.GetSubShapeID
10179
10180                 The list of vertices could be empty,in this case fillet will done done at all vertices in wire
10181
10182             Returns:
10183                 New GEOM.GEOM_Object, containing the result shape.
10184
10185             Example of usage:
10186                 # create wire
10187                 Wire_1 = geompy.MakeWire([Edge_12, Edge_7, Edge_11, Edge_6, Edge_1,Edge_4])
10188                 # make fillet at given wire vertices with giver radius
10189                 Fillet_1D_1 = geompy.MakeFillet1D(Wire_1, 55, [3, 4, 6, 8, 10])
10190             """
10191             # Example: see GEOM_TestAll.py
10192             theR,doIgnoreSecantVertices,Parameters = ParseParameters(theR,doIgnoreSecantVertices)
10193             anObj = self.LocalOp.MakeFillet1D(theShape, theR, theListOfVertexes, doIgnoreSecantVertices)
10194             RaiseIfFailed("MakeFillet1D", self.LocalOp)
10195             anObj.SetParameters(Parameters)
10196             self._autoPublish(anObj, theName, "fillet")
10197             return anObj
10198
10199         ## Perform a fillet at the specified vertices of the given face/shell.
10200         #  @param theShape Face or Shell shape to perform fillet on.
10201         #  @param theR Fillet radius.
10202         #  @param theListOfVertexes Global indices of vertexes to perform fillet on.
10203         #  @param theName Object name; when specified, this parameter is used
10204         #         for result publication in the study. Otherwise, if automatic
10205         #         publication is switched on, default value is used for result name.
10206         #
10207         #  @note Global index of sub-shape can be obtained, using method GetSubShapeID().
10208         #
10209         #  @return New GEOM.GEOM_Object, containing the result shape.
10210         #
10211         #  @ref tui_fillet2d "Example"
10212         @ManageTransactions("LocalOp")
10213         def MakeFillet2D(self, theShape, theR, theListOfVertexes, theName=None):
10214             """
10215             Perform a fillet at the specified vertices of the given face/shell.
10216
10217             Parameters:
10218                 theShape  Face or Shell shape to perform fillet on.
10219                 theR  Fillet radius.
10220                 theListOfVertexes Global indices of vertexes to perform fillet on.
10221                 theName Object name; when specified, this parameter is used
10222                         for result publication in the study. Otherwise, if automatic
10223                         publication is switched on, default value is used for result name.
10224             Note:
10225                 Global index of sub-shape can be obtained, using method geompy.GetSubShapeID
10226
10227             Returns:
10228                 New GEOM.GEOM_Object, containing the result shape.
10229
10230             Example of usage:
10231                 face = geompy.MakeFaceHW(100, 100, 1)
10232                 fillet2d = geompy.MakeFillet2D(face, 30, [7, 9])
10233             """
10234             # Example: see GEOM_TestAll.py
10235             theR,Parameters = ParseParameters(theR)
10236             anObj = self.LocalOp.MakeFillet2D(theShape, theR, theListOfVertexes)
10237             RaiseIfFailed("MakeFillet2D", self.LocalOp)
10238             anObj.SetParameters(Parameters)
10239             self._autoPublish(anObj, theName, "fillet")
10240             return anObj
10241
10242         ## Perform a symmetric chamfer on all edges of the given shape.
10243         #  @param theShape Shape, to perform chamfer on.
10244         #  @param theD Chamfer size along each face.
10245         #  @param theName Object name; when specified, this parameter is used
10246         #         for result publication in the study. Otherwise, if automatic
10247         #         publication is switched on, default value is used for result name.
10248         #
10249         #  @return New GEOM.GEOM_Object, containing the result shape.
10250         #
10251         #  @ref tui_chamfer "Example 1"
10252         #  \n @ref swig_MakeChamferAll "Example 2"
10253         @ManageTransactions("LocalOp")
10254         def MakeChamferAll(self, theShape, theD, theName=None):
10255             """
10256             Perform a symmetric chamfer on all edges of the given shape.
10257
10258             Parameters:
10259                 theShape Shape, to perform chamfer on.
10260                 theD Chamfer size along each face.
10261                 theName Object name; when specified, this parameter is used
10262                         for result publication in the study. Otherwise, if automatic
10263                         publication is switched on, default value is used for result name.
10264
10265             Returns:
10266                 New GEOM.GEOM_Object, containing the result shape.
10267
10268             Example of usage:
10269                 chamfer_all = geompy.MakeChamferAll(prism, 10.)
10270             """
10271             # Example: see GEOM_TestOthers.py
10272             theD,Parameters = ParseParameters(theD)
10273             anObj = self.LocalOp.MakeChamferAll(theShape, theD)
10274             RaiseIfFailed("MakeChamferAll", self.LocalOp)
10275             anObj.SetParameters(Parameters)
10276             self._autoPublish(anObj, theName, "chamfer")
10277             return anObj
10278
10279         ## Perform a chamfer on edges, common to the specified faces,
10280         #  with distance D1 on the Face1
10281         #  @param theShape Shape, to perform chamfer on.
10282         #  @param theD1 Chamfer size along \a theFace1.
10283         #  @param theD2 Chamfer size along \a theFace2.
10284         #  @param theFace1,theFace2 Global indices of two faces of \a theShape.
10285         #  @param theName Object name; when specified, this parameter is used
10286         #         for result publication in the study. Otherwise, if automatic
10287         #         publication is switched on, default value is used for result name.
10288         #
10289         #  @note Global index of sub-shape can be obtained, using method GetSubShapeID().
10290         #
10291         #  @return New GEOM.GEOM_Object, containing the result shape.
10292         #
10293         #  @ref tui_chamfer "Example"
10294         @ManageTransactions("LocalOp")
10295         def MakeChamferEdge(self, theShape, theD1, theD2, theFace1, theFace2, theName=None):
10296             """
10297             Perform a chamfer on edges, common to the specified faces,
10298             with distance D1 on the Face1
10299
10300             Parameters:
10301                 theShape Shape, to perform chamfer on.
10302                 theD1 Chamfer size along theFace1.
10303                 theD2 Chamfer size along theFace2.
10304                 theFace1,theFace2 Global indices of two faces of theShape.
10305                 theName Object name; when specified, this parameter is used
10306                         for result publication in the study. Otherwise, if automatic
10307                         publication is switched on, default value is used for result name.
10308
10309             Note:
10310                 Global index of sub-shape can be obtained, using method geompy.GetSubShapeID
10311
10312             Returns:
10313                 New GEOM.GEOM_Object, containing the result shape.
10314
10315             Example of usage:
10316                 prism_faces = geompy.SubShapeAllSortedCentres(prism, geompy.ShapeType["FACE"])
10317                 f_ind_1 = geompy.GetSubShapeID(prism, prism_faces[0])
10318                 f_ind_2 = geompy.GetSubShapeID(prism, prism_faces[1])
10319                 chamfer_e = geompy.MakeChamferEdge(prism, 10., 10., f_ind_1, f_ind_2)
10320             """
10321             # Example: see GEOM_TestAll.py
10322             theD1,theD2,Parameters = ParseParameters(theD1,theD2)
10323             anObj = self.LocalOp.MakeChamferEdge(theShape, theD1, theD2, theFace1, theFace2)
10324             RaiseIfFailed("MakeChamferEdge", self.LocalOp)
10325             anObj.SetParameters(Parameters)
10326             self._autoPublish(anObj, theName, "chamfer")
10327             return anObj
10328
10329         ## Perform a chamfer on edges
10330         #  @param theShape Shape, to perform chamfer on.
10331         #  @param theD Chamfer length
10332         #  @param theAngle Angle of chamfer (angle in radians or a name of variable which defines angle in degrees)
10333         #  @param theFace1,theFace2 Global indices of two faces of \a theShape.
10334         #  @param theName Object name; when specified, this parameter is used
10335         #         for result publication in the study. Otherwise, if automatic
10336         #         publication is switched on, default value is used for result name.
10337         #
10338         #  @note Global index of sub-shape can be obtained, using method GetSubShapeID().
10339         #
10340         #  @return New GEOM.GEOM_Object, containing the result shape.
10341         @ManageTransactions("LocalOp")
10342         def MakeChamferEdgeAD(self, theShape, theD, theAngle, theFace1, theFace2, theName=None):
10343             """
10344             Perform a chamfer on edges
10345
10346             Parameters:
10347                 theShape Shape, to perform chamfer on.
10348                 theD1 Chamfer size along theFace1.
10349                 theAngle Angle of chamfer (angle in radians or a name of variable which defines angle in degrees).
10350                 theFace1,theFace2 Global indices of two faces of theShape.
10351                 theName Object name; when specified, this parameter is used
10352                         for result publication in the study. Otherwise, if automatic
10353                         publication is switched on, default value is used for result name.
10354
10355             Note:
10356                 Global index of sub-shape can be obtained, using method geompy.GetSubShapeID
10357
10358             Returns:
10359                 New GEOM.GEOM_Object, containing the result shape.
10360
10361             Example of usage:
10362                 prism_faces = geompy.SubShapeAllSortedCentres(prism, geompy.ShapeType["FACE"])
10363                 f_ind_1 = geompy.GetSubShapeID(prism, prism_faces[0])
10364                 f_ind_2 = geompy.GetSubShapeID(prism, prism_faces[1])
10365                 ang = 30
10366                 chamfer_e = geompy.MakeChamferEdge(prism, 10., ang, f_ind_1, f_ind_2)
10367             """
10368             flag = False
10369             if isinstance(theAngle,str):
10370                 flag = True
10371             theD,theAngle,Parameters = ParseParameters(theD,theAngle)
10372             if flag:
10373                 theAngle = theAngle*math.pi/180.0
10374             anObj = self.LocalOp.MakeChamferEdgeAD(theShape, theD, theAngle, theFace1, theFace2)
10375             RaiseIfFailed("MakeChamferEdgeAD", self.LocalOp)
10376             anObj.SetParameters(Parameters)
10377             self._autoPublish(anObj, theName, "chamfer")
10378             return anObj
10379
10380         ## Perform a chamfer on all edges of the specified faces,
10381         #  with distance D1 on the first specified face (if several for one edge)
10382         #  @param theShape Shape, to perform chamfer on.
10383         #  @param theD1 Chamfer size along face from \a theFaces. If both faces,
10384         #               connected to the edge, are in \a theFaces, \a theD1
10385         #               will be get along face, which is nearer to \a theFaces beginning.
10386         #  @param theD2 Chamfer size along another of two faces, connected to the edge.
10387         #  @param theFaces Sequence of global indices of faces of \a theShape.
10388         #  @param theName Object name; when specified, this parameter is used
10389         #         for result publication in the study. Otherwise, if automatic
10390         #         publication is switched on, default value is used for result name.
10391         #
10392         #  @note Global index of sub-shape can be obtained, using method GetSubShapeID().
10393         #
10394         #  @return New GEOM.GEOM_Object, containing the result shape.
10395         #
10396         #  @ref tui_chamfer "Example"
10397         @ManageTransactions("LocalOp")
10398         def MakeChamferFaces(self, theShape, theD1, theD2, theFaces, theName=None):
10399             """
10400             Perform a chamfer on all edges of the specified faces,
10401             with distance D1 on the first specified face (if several for one edge)
10402
10403             Parameters:
10404                 theShape Shape, to perform chamfer on.
10405                 theD1 Chamfer size along face from  theFaces. If both faces,
10406                       connected to the edge, are in theFaces, theD1
10407                       will be get along face, which is nearer to theFaces beginning.
10408                 theD2 Chamfer size along another of two faces, connected to the edge.
10409                 theFaces Sequence of global indices of faces of theShape.
10410                 theName Object name; when specified, this parameter is used
10411                         for result publication in the study. Otherwise, if automatic
10412                         publication is switched on, default value is used for result name.
10413
10414             Note: Global index of sub-shape can be obtained, using method geompy.GetSubShapeID().
10415
10416             Returns:
10417                 New GEOM.GEOM_Object, containing the result shape.
10418             """
10419             # Example: see GEOM_TestAll.py
10420             theD1,theD2,Parameters = ParseParameters(theD1,theD2)
10421             anObj = self.LocalOp.MakeChamferFaces(theShape, theD1, theD2, theFaces)
10422             RaiseIfFailed("MakeChamferFaces", self.LocalOp)
10423             anObj.SetParameters(Parameters)
10424             self._autoPublish(anObj, theName, "chamfer")
10425             return anObj
10426
10427         ## The Same that MakeChamferFaces() but with params theD is chamfer length and
10428         #  theAngle is Angle of chamfer (angle in radians or a name of variable which defines angle in degrees)
10429         #
10430         #  @ref swig_FilletChamfer "Example"
10431         @ManageTransactions("LocalOp")
10432         def MakeChamferFacesAD(self, theShape, theD, theAngle, theFaces, theName=None):
10433             """
10434             The Same that geompy.MakeChamferFaces but with params theD is chamfer length and
10435             theAngle is Angle of chamfer (angle in radians or a name of variable which defines angle in degrees)
10436             """
10437             flag = False
10438             if isinstance(theAngle,str):
10439                 flag = True
10440             theD,theAngle,Parameters = ParseParameters(theD,theAngle)
10441             if flag:
10442                 theAngle = theAngle*math.pi/180.0
10443             anObj = self.LocalOp.MakeChamferFacesAD(theShape, theD, theAngle, theFaces)
10444             RaiseIfFailed("MakeChamferFacesAD", self.LocalOp)
10445             anObj.SetParameters(Parameters)
10446             self._autoPublish(anObj, theName, "chamfer")
10447             return anObj
10448
10449         ## Perform a chamfer on edges,
10450         #  with distance D1 on the first specified face (if several for one edge)
10451         #  @param theShape Shape, to perform chamfer on.
10452         #  @param theD1,theD2 Chamfer size
10453         #  @param theEdges Sequence of edges of \a theShape.
10454         #  @param theName Object name; when specified, this parameter is used
10455         #         for result publication in the study. Otherwise, if automatic
10456         #         publication is switched on, default value is used for result name.
10457         #
10458         #  @return New GEOM.GEOM_Object, containing the result shape.
10459         #
10460         #  @ref swig_FilletChamfer "Example"
10461         @ManageTransactions("LocalOp")
10462         def MakeChamferEdges(self, theShape, theD1, theD2, theEdges, theName=None):
10463             """
10464             Perform a chamfer on edges,
10465             with distance D1 on the first specified face (if several for one edge)
10466
10467             Parameters:
10468                 theShape Shape, to perform chamfer on.
10469                 theD1,theD2 Chamfer size
10470                 theEdges Sequence of edges of theShape.
10471                 theName Object name; when specified, this parameter is used
10472                         for result publication in the study. Otherwise, if automatic
10473                         publication is switched on, default value is used for result name.
10474
10475             Returns:
10476                 New GEOM.GEOM_Object, containing the result shape.
10477             """
10478             theD1,theD2,Parameters = ParseParameters(theD1,theD2)
10479             anObj = self.LocalOp.MakeChamferEdges(theShape, theD1, theD2, theEdges)
10480             RaiseIfFailed("MakeChamferEdges", self.LocalOp)
10481             anObj.SetParameters(Parameters)
10482             self._autoPublish(anObj, theName, "chamfer")
10483             return anObj
10484
10485         ## The Same that MakeChamferEdges() but with params theD is chamfer length and
10486         #  theAngle is Angle of chamfer (angle in radians or a name of variable which defines angle in degrees)
10487         @ManageTransactions("LocalOp")
10488         def MakeChamferEdgesAD(self, theShape, theD, theAngle, theEdges, theName=None):
10489             """
10490             The Same that geompy.MakeChamferEdges but with params theD is chamfer length and
10491             theAngle is Angle of chamfer (angle in radians or a name of variable which defines angle in degrees)
10492             """
10493             flag = False
10494             if isinstance(theAngle,str):
10495                 flag = True
10496             theD,theAngle,Parameters = ParseParameters(theD,theAngle)
10497             if flag:
10498                 theAngle = theAngle*math.pi/180.0
10499             anObj = self.LocalOp.MakeChamferEdgesAD(theShape, theD, theAngle, theEdges)
10500             RaiseIfFailed("MakeChamferEdgesAD", self.LocalOp)
10501             anObj.SetParameters(Parameters)
10502             self._autoPublish(anObj, theName, "chamfer")
10503             return anObj
10504
10505         ## @sa MakeChamferEdge(), MakeChamferFaces()
10506         #
10507         #  @ref swig_MakeChamfer "Example"
10508         def MakeChamfer(self, aShape, d1, d2, aShapeType, ListShape, theName=None):
10509             """
10510             See geompy.MakeChamferEdge() and geompy.MakeChamferFaces() functions for more information.
10511             """
10512             # Example: see GEOM_TestOthers.py
10513             anObj = None
10514             # note: auto-publishing is done in self.MakeChamferEdge() or self.MakeChamferFaces()
10515             if aShapeType == self.ShapeType["EDGE"]:
10516                 anObj = self.MakeChamferEdge(aShape,d1,d2,ListShape[0],ListShape[1],theName)
10517             else:
10518                 anObj = self.MakeChamferFaces(aShape,d1,d2,ListShape,theName)
10519             return anObj
10520
10521         ## Remove material from a solid by extrusion of the base shape on the given distance.
10522         #  @param theInit Shape to remove material from. It must be a solid or
10523         #  a compound made of a single solid.
10524         #  @param theBase Closed edge or wire defining the base shape to be extruded.
10525         #  @param theH Prism dimension along the normal to theBase
10526         #  @param theAngle Draft angle in degrees.
10527         #  @param theInvert If true material changes the direction
10528         #  @param theName Object name; when specified, this parameter is used
10529         #         for result publication in the study. Otherwise, if automatic
10530         #         publication is switched on, default value is used for result name.
10531         #
10532         #  @return New GEOM.GEOM_Object, containing the initial shape with removed material
10533         #
10534         #  @ref tui_creation_prism "Example"
10535         @ManageTransactions("PrimOp")
10536         def MakeExtrudedCut(self, theInit, theBase, theH, theAngle, theInvert=False, theName=None):
10537             """
10538             Add material to a solid by extrusion of the base shape on the given distance.
10539
10540             Parameters:
10541                 theInit Shape to remove material from. It must be a solid or a compound made of a single solid.
10542                 theBase Closed edge or wire defining the base shape to be extruded.
10543                 theH Prism dimension along the normal to theBase
10544                 theAngle Draft angle in degrees.
10545                 theInvert If true material changes the direction.
10546                 theName Object name; when specified, this parameter is used
10547                         for result publication in the study. Otherwise, if automatic
10548                         publication is switched on, default value is used for result name.
10549
10550             Returns:
10551                 New GEOM.GEOM_Object,  containing the initial shape with removed material.
10552             """
10553             # Example: see GEOM_TestAll.py
10554             theH,theAngle,Parameters = ParseParameters(theH,theAngle)
10555             anObj = self.PrimOp.MakeDraftPrism(theInit, theBase, theH, theAngle, False, theInvert)
10556             RaiseIfFailed("MakeExtrudedBoss", self.PrimOp)
10557             anObj.SetParameters(Parameters)
10558             self._autoPublish(anObj, theName, "extrudedCut")
10559             return anObj
10560
10561         ## Add material to a solid by extrusion of the base shape on the given distance.
10562         #  @param theInit Shape to add material to. It must be a solid or
10563         #  a compound made of a single solid.
10564         #  @param theBase Closed edge or wire defining the base shape to be extruded.
10565         #  @param theH Prism dimension along the normal to theBase
10566         #  @param theAngle Draft angle in degrees.
10567         #  @param theInvert If true material changes the direction
10568         #  @param theName Object name; when specified, this parameter is used
10569         #         for result publication in the study. Otherwise, if automatic
10570         #         publication is switched on, default value is used for result name.
10571         #
10572         #  @return New GEOM.GEOM_Object, containing the initial shape with added material
10573         #
10574         #  @ref tui_creation_prism "Example"
10575         @ManageTransactions("PrimOp")
10576         def MakeExtrudedBoss(self, theInit, theBase, theH, theAngle, theInvert=False, theName=None):
10577             """
10578             Add material to a solid by extrusion of the base shape on the given distance.
10579
10580             Parameters:
10581                 theInit Shape to add material to. It must be a solid or a compound made of a single solid.
10582                 theBase Closed edge or wire defining the base shape to be extruded.
10583                 theH Prism dimension along the normal to theBase
10584                 theAngle Draft angle in degrees.
10585                 theInvert If true material changes the direction.
10586                 theName Object name; when specified, this parameter is used
10587                         for result publication in the study. Otherwise, if automatic
10588                         publication is switched on, default value is used for result name.
10589
10590             Returns:
10591                 New GEOM.GEOM_Object,  containing the initial shape with added material.
10592             """
10593             # Example: see GEOM_TestAll.py
10594             theH,theAngle,Parameters = ParseParameters(theH,theAngle)
10595             anObj = self.PrimOp.MakeDraftPrism(theInit, theBase, theH, theAngle, True, theInvert)
10596             RaiseIfFailed("MakeExtrudedBoss", self.PrimOp)
10597             anObj.SetParameters(Parameters)
10598             self._autoPublish(anObj, theName, "extrudedBoss")
10599             return anObj
10600
10601         # end of l3_local
10602         ## @}
10603
10604         ## @addtogroup l3_basic_op
10605         ## @{
10606
10607         ## Perform an Archimde operation on the given shape with given parameters.
10608         #  The object presenting the resulting face is returned.
10609         #  @param theShape Shape to be put in water.
10610         #  @param theWeight Weight of the shape.
10611         #  @param theWaterDensity Density of the water.
10612         #  @param theMeshDeflection Deflection of the mesh, using to compute the section.
10613         #  @param theName Object name; when specified, this parameter is used
10614         #         for result publication in the study. Otherwise, if automatic
10615         #         publication is switched on, default value is used for result name.
10616         #
10617         #  @return New GEOM.GEOM_Object, containing a section of \a theShape
10618         #          by a plane, corresponding to water level.
10619         #
10620         #  @ref tui_archimede "Example"
10621         @ManageTransactions("LocalOp")
10622         def Archimede(self, theShape, theWeight, theWaterDensity, theMeshDeflection, theName=None):
10623             """
10624             Perform an Archimde operation on the given shape with given parameters.
10625             The object presenting the resulting face is returned.
10626
10627             Parameters:
10628                 theShape Shape to be put in water.
10629                 theWeight Weight of the shape.
10630                 theWaterDensity Density of the water.
10631                 theMeshDeflection Deflection of the mesh, using to compute the section.
10632                 theName Object name; when specified, this parameter is used
10633                         for result publication in the study. Otherwise, if automatic
10634                         publication is switched on, default value is used for result name.
10635
10636             Returns:
10637                 New GEOM.GEOM_Object, containing a section of theShape
10638                 by a plane, corresponding to water level.
10639             """
10640             # Example: see GEOM_TestAll.py
10641             theWeight,theWaterDensity,theMeshDeflection,Parameters = ParseParameters(
10642               theWeight,theWaterDensity,theMeshDeflection)
10643             anObj = self.LocalOp.MakeArchimede(theShape, theWeight, theWaterDensity, theMeshDeflection)
10644             RaiseIfFailed("MakeArchimede", self.LocalOp)
10645             anObj.SetParameters(Parameters)
10646             self._autoPublish(anObj, theName, "archimede")
10647             return anObj
10648
10649         # end of l3_basic_op
10650         ## @}
10651
10652         ## @addtogroup l2_measure
10653         ## @{
10654
10655         ## Get point coordinates
10656         #  @return [x, y, z]
10657         #
10658         #  @ref tui_point_coordinates_page "Example"
10659         @ManageTransactions("MeasuOp")
10660         def PointCoordinates(self,Point):
10661             """
10662             Get point coordinates
10663
10664             Returns:
10665                 [x, y, z]
10666             """
10667             # Example: see GEOM_TestMeasures.py
10668             aTuple = self.MeasuOp.PointCoordinates(Point)
10669             RaiseIfFailed("PointCoordinates", self.MeasuOp)
10670             return aTuple
10671
10672         ## Get vector coordinates
10673         #  @return [x, y, z]
10674         #
10675         #  @ref tui_measurement_tools_page "Example"
10676         def VectorCoordinates(self,Vector):
10677             """
10678             Get vector coordinates
10679
10680             Returns:
10681                 [x, y, z]
10682             """
10683
10684             p1=self.GetFirstVertex(Vector)
10685             p2=self.GetLastVertex(Vector)
10686
10687             X1=self.PointCoordinates(p1)
10688             X2=self.PointCoordinates(p2)
10689
10690             return (X2[0]-X1[0],X2[1]-X1[1],X2[2]-X1[2])
10691
10692
10693         ## Compute cross product
10694         #  @return vector w=u^v
10695         #
10696         #  @ref tui_measurement_tools_page "Example"
10697         def CrossProduct(self, Vector1, Vector2):
10698             """
10699             Compute cross product
10700
10701             Returns: vector w=u^v
10702             """
10703             u=self.VectorCoordinates(Vector1)
10704             v=self.VectorCoordinates(Vector2)
10705             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])
10706
10707             return w
10708
10709         ## Compute cross product
10710         #  @return dot product  p=u.v
10711         #
10712         #  @ref tui_measurement_tools_page "Example"
10713         def DotProduct(self, Vector1, Vector2):
10714             """
10715             Compute cross product
10716
10717             Returns: dot product  p=u.v
10718             """
10719             u=self.VectorCoordinates(Vector1)
10720             v=self.VectorCoordinates(Vector2)
10721             p=u[0]*v[0]+u[1]*v[1]+u[2]*v[2]
10722
10723             return p
10724
10725
10726         ## Get summarized length of all wires,
10727         #  area of surface and volume of the given shape.
10728         #  @param theShape Shape to define properties of.
10729         #  @param theTolerance maximal relative error of area
10730         #         and volume computation.
10731         #  @return [theLength, theSurfArea, theVolume]\n
10732         #  theLength:   Summarized length of all wires of the given shape.\n
10733         #  theSurfArea: Area of surface of the given shape.\n
10734         #  theVolume:   Volume of the given shape.
10735         #
10736         #  @ref tui_basic_properties_page "Example"
10737         @ManageTransactions("MeasuOp")
10738         def BasicProperties(self,theShape, theTolerance=1.e-6):
10739             """
10740             Get summarized length of all wires,
10741             area of surface and volume of the given shape.
10742
10743             Parameters:
10744                 theShape Shape to define properties of.
10745                 theTolerance maximal relative error of area
10746                              and volume computation.
10747
10748             Returns:
10749                 [theLength, theSurfArea, theVolume]
10750                  theLength:   Summarized length of all wires of the given shape.
10751                  theSurfArea: Area of surface of the given shape.
10752                  theVolume:   Volume of the given shape.
10753             """
10754             # Example: see GEOM_TestMeasures.py
10755             aTuple = self.MeasuOp.GetBasicProperties(theShape, theTolerance)
10756             RaiseIfFailed("GetBasicProperties", self.MeasuOp)
10757             return aTuple
10758
10759         ## Get parameters of bounding box of the given shape
10760         #  @param theShape Shape to obtain bounding box of.
10761         #  @param precise TRUE for precise computation; FALSE for fast one.
10762         #  @return [Xmin,Xmax, Ymin,Ymax, Zmin,Zmax]
10763         #  Xmin,Xmax: Limits of shape along OX axis.
10764         #  Ymin,Ymax: Limits of shape along OY axis.
10765         #  Zmin,Zmax: Limits of shape along OZ axis.
10766         #
10767         #  @ref tui_bounding_box_page "Example"
10768         @ManageTransactions("MeasuOp")
10769         def BoundingBox (self, theShape, precise=False):
10770             """
10771             Get parameters of bounding box of the given shape
10772
10773             Parameters:
10774                 theShape Shape to obtain bounding box of.
10775                 precise TRUE for precise computation; FALSE for fast one.
10776
10777             Returns:
10778                 [Xmin,Xmax, Ymin,Ymax, Zmin,Zmax]
10779                  Xmin,Xmax: Limits of shape along OX axis.
10780                  Ymin,Ymax: Limits of shape along OY axis.
10781                  Zmin,Zmax: Limits of shape along OZ axis.
10782             """
10783             # Example: see GEOM_TestMeasures.py
10784             aTuple = self.MeasuOp.GetBoundingBox(theShape, precise)
10785             RaiseIfFailed("GetBoundingBox", self.MeasuOp)
10786             return aTuple
10787
10788         ## Get bounding box of the given shape
10789         #  @param theShape Shape to obtain bounding box of.
10790         #  @param precise TRUE for precise computation; FALSE for fast one.
10791         #  @param theName Object name; when specified, this parameter is used
10792         #         for result publication in the study. Otherwise, if automatic
10793         #         publication is switched on, default value is used for result name.
10794         #
10795         #  @return New GEOM.GEOM_Object, containing the created box.
10796         #
10797         #  @ref tui_bounding_box_page "Example"
10798         @ManageTransactions("MeasuOp")
10799         def MakeBoundingBox (self, theShape, precise=False, theName=None):
10800             """
10801             Get bounding box of the given shape
10802
10803             Parameters:
10804                 theShape Shape to obtain bounding box of.
10805                 precise TRUE for precise computation; FALSE for fast one.
10806                 theName Object name; when specified, this parameter is used
10807                         for result publication in the study. Otherwise, if automatic
10808                         publication is switched on, default value is used for result name.
10809
10810             Returns:
10811                 New GEOM.GEOM_Object, containing the created box.
10812             """
10813             # Example: see GEOM_TestMeasures.py
10814             anObj = self.MeasuOp.MakeBoundingBox(theShape, precise)
10815             RaiseIfFailed("MakeBoundingBox", self.MeasuOp)
10816             self._autoPublish(anObj, theName, "bndbox")
10817             return anObj
10818
10819         ## Get inertia matrix and moments of inertia of theShape.
10820         #  @param theShape Shape to calculate inertia of.
10821         #  @return [I11,I12,I13, I21,I22,I23, I31,I32,I33, Ix,Iy,Iz]
10822         #  I(1-3)(1-3): Components of the inertia matrix of the given shape.
10823         #  Ix,Iy,Iz:    Moments of inertia of the given shape.
10824         #
10825         #  @ref tui_inertia_page "Example"
10826         @ManageTransactions("MeasuOp")
10827         def Inertia(self,theShape):
10828             """
10829             Get inertia matrix and moments of inertia of theShape.
10830
10831             Parameters:
10832                 theShape Shape to calculate inertia of.
10833
10834             Returns:
10835                 [I11,I12,I13, I21,I22,I23, I31,I32,I33, Ix,Iy,Iz]
10836                  I(1-3)(1-3): Components of the inertia matrix of the given shape.
10837                  Ix,Iy,Iz:    Moments of inertia of the given shape.
10838             """
10839             # Example: see GEOM_TestMeasures.py
10840             aTuple = self.MeasuOp.GetInertia(theShape)
10841             RaiseIfFailed("GetInertia", self.MeasuOp)
10842             return aTuple
10843
10844         ## Get if coords are included in the shape (ST_IN or ST_ON)
10845         #  @param theShape Shape
10846         #  @param coords list of points coordinates [x1, y1, z1, x2, y2, z2, ...]
10847         #  @param tolerance to be used (default is 1.0e-7)
10848         #  @return list_of_boolean = [res1, res2, ...]
10849         @ManageTransactions("MeasuOp")
10850         def AreCoordsInside(self, theShape, coords, tolerance=1.e-7):
10851             """
10852             Get if coords are included in the shape (ST_IN or ST_ON)
10853
10854             Parameters:
10855                 theShape Shape
10856                 coords list of points coordinates [x1, y1, z1, x2, y2, z2, ...]
10857                 tolerance to be used (default is 1.0e-7)
10858
10859             Returns:
10860                 list_of_boolean = [res1, res2, ...]
10861             """
10862             return self.MeasuOp.AreCoordsInside(theShape, coords, tolerance)
10863
10864         ## Get minimal distance between the given shapes.
10865         #  @param theShape1,theShape2 Shapes to find minimal distance between.
10866         #  @return Value of the minimal distance between the given shapes.
10867         #
10868         #  @ref tui_min_distance_page "Example"
10869         @ManageTransactions("MeasuOp")
10870         def MinDistance(self, theShape1, theShape2):
10871             """
10872             Get minimal distance between the given shapes.
10873
10874             Parameters:
10875                 theShape1,theShape2 Shapes to find minimal distance between.
10876
10877             Returns:
10878                 Value of the minimal distance between the given shapes.
10879             """
10880             # Example: see GEOM_TestMeasures.py
10881             aTuple = self.MeasuOp.GetMinDistance(theShape1, theShape2)
10882             RaiseIfFailed("GetMinDistance", self.MeasuOp)
10883             return aTuple[0]
10884
10885         ## Get minimal distance between the given shapes.
10886         #  @param theShape1,theShape2 Shapes to find minimal distance between.
10887         #  @return Value of the minimal distance between the given shapes, in form of list
10888         #          [Distance, DX, DY, DZ].
10889         #
10890         #  @ref tui_min_distance_page "Example"
10891         @ManageTransactions("MeasuOp")
10892         def MinDistanceComponents(self, theShape1, theShape2):
10893             """
10894             Get minimal distance between the given shapes.
10895
10896             Parameters:
10897                 theShape1,theShape2 Shapes to find minimal distance between.
10898
10899             Returns:
10900                 Value of the minimal distance between the given shapes, in form of list
10901                 [Distance, DX, DY, DZ]
10902             """
10903             # Example: see GEOM_TestMeasures.py
10904             aTuple = self.MeasuOp.GetMinDistance(theShape1, theShape2)
10905             RaiseIfFailed("GetMinDistance", self.MeasuOp)
10906             aRes = [aTuple[0], aTuple[4] - aTuple[1], aTuple[5] - aTuple[2], aTuple[6] - aTuple[3]]
10907             return aRes
10908
10909         ## Get closest points of the given shapes.
10910         #  @param theShape1,theShape2 Shapes to find closest points of.
10911         #  @return The number of found solutions (-1 in case of infinite number of
10912         #          solutions) and a list of (X, Y, Z) coordinates for all couples of points.
10913         #
10914         #  @ref tui_min_distance_page "Example"
10915         @ManageTransactions("MeasuOp")
10916         def ClosestPoints (self, theShape1, theShape2):
10917             """
10918             Get closest points of the given shapes.
10919
10920             Parameters:
10921                 theShape1,theShape2 Shapes to find closest points of.
10922
10923             Returns:
10924                 The number of found solutions (-1 in case of infinite number of
10925                 solutions) and a list of (X, Y, Z) coordinates for all couples of points.
10926             """
10927             # Example: see GEOM_TestMeasures.py
10928             aTuple = self.MeasuOp.ClosestPoints(theShape1, theShape2)
10929             RaiseIfFailed("ClosestPoints", self.MeasuOp)
10930             return aTuple
10931
10932         ## Get angle between the given shapes in degrees.
10933         #  @param theShape1,theShape2 Lines or linear edges to find angle between.
10934         #  @note If both arguments are vectors, the angle is computed in accordance
10935         #        with their orientations, otherwise the minimum angle is computed.
10936         #  @return Value of the angle between the given shapes in degrees.
10937         #
10938         #  @ref tui_angle_page "Example"
10939         @ManageTransactions("MeasuOp")
10940         def GetAngle(self, theShape1, theShape2):
10941             """
10942             Get angle between the given shapes in degrees.
10943
10944             Parameters:
10945                 theShape1,theShape2 Lines or linear edges to find angle between.
10946
10947             Note:
10948                 If both arguments are vectors, the angle is computed in accordance
10949                 with their orientations, otherwise the minimum angle is computed.
10950
10951             Returns:
10952                 Value of the angle between the given shapes in degrees.
10953             """
10954             # Example: see GEOM_TestMeasures.py
10955             anAngle = self.MeasuOp.GetAngle(theShape1, theShape2)
10956             RaiseIfFailed("GetAngle", self.MeasuOp)
10957             return anAngle
10958
10959         ## Get angle between the given shapes in radians.
10960         #  @param theShape1,theShape2 Lines or linear edges to find angle between.
10961         #  @note If both arguments are vectors, the angle is computed in accordance
10962         #        with their orientations, otherwise the minimum angle is computed.
10963         #  @return Value of the angle between the given shapes in radians.
10964         #
10965         #  @ref tui_angle_page "Example"
10966         @ManageTransactions("MeasuOp")
10967         def GetAngleRadians(self, theShape1, theShape2):
10968             """
10969             Get angle between the given shapes in radians.
10970
10971             Parameters:
10972                 theShape1,theShape2 Lines or linear edges to find angle between.
10973
10974
10975             Note:
10976                 If both arguments are vectors, the angle is computed in accordance
10977                 with their orientations, otherwise the minimum angle is computed.
10978
10979             Returns:
10980                 Value of the angle between the given shapes in radians.
10981             """
10982             # Example: see GEOM_TestMeasures.py
10983             anAngle = self.MeasuOp.GetAngle(theShape1, theShape2)*math.pi/180.
10984             RaiseIfFailed("GetAngle", self.MeasuOp)
10985             return anAngle
10986
10987         ## Get angle between the given vectors in degrees.
10988         #  @param theShape1,theShape2 Vectors to find angle between.
10989         #  @param theFlag If True, the normal vector is defined by the two vectors cross,
10990         #                 if False, the opposite vector to the normal vector is used.
10991         #  @return Value of the angle between the given vectors in degrees.
10992         #
10993         #  @ref tui_angle_page "Example"
10994         @ManageTransactions("MeasuOp")
10995         def GetAngleVectors(self, theShape1, theShape2, theFlag = True):
10996             """
10997             Get angle between the given vectors in degrees.
10998
10999             Parameters:
11000                 theShape1,theShape2 Vectors to find angle between.
11001                 theFlag If True, the normal vector is defined by the two vectors cross,
11002                         if False, the opposite vector to the normal vector is used.
11003
11004             Returns:
11005                 Value of the angle between the given vectors in degrees.
11006             """
11007             anAngle = self.MeasuOp.GetAngleBtwVectors(theShape1, theShape2)
11008             if not theFlag:
11009                 anAngle = 360. - anAngle
11010             RaiseIfFailed("GetAngleVectors", self.MeasuOp)
11011             return anAngle
11012
11013         ## The same as GetAngleVectors, but the result is in radians.
11014         def GetAngleRadiansVectors(self, theShape1, theShape2, theFlag = True):
11015             """
11016             Get angle between the given vectors in radians.
11017
11018             Parameters:
11019                 theShape1,theShape2 Vectors to find angle between.
11020                 theFlag If True, the normal vector is defined by the two vectors cross,
11021                         if False, the opposite vector to the normal vector is used.
11022
11023             Returns:
11024                 Value of the angle between the given vectors in radians.
11025             """
11026             anAngle = self.GetAngleVectors(theShape1, theShape2, theFlag)*math.pi/180.
11027             return anAngle
11028
11029         ## @name Curve Curvature Measurement
11030         #  Methods for receiving radius of curvature of curves
11031         #  in the given point
11032         ## @{
11033
11034         ## Measure curvature of a curve at a point, set by parameter.
11035         #  @param theCurve a curve.
11036         #  @param theParam parameter.
11037         #  @return radius of curvature of \a theCurve.
11038         #
11039         #  @ref swig_todo "Example"
11040         @ManageTransactions("MeasuOp")
11041         def CurveCurvatureByParam(self, theCurve, theParam):
11042             """
11043             Measure curvature of a curve at a point, set by parameter.
11044
11045             Parameters:
11046                 theCurve a curve.
11047                 theParam parameter.
11048
11049             Returns:
11050                 radius of curvature of theCurve.
11051             """
11052             # Example: see GEOM_TestMeasures.py
11053             aCurv = self.MeasuOp.CurveCurvatureByParam(theCurve,theParam)
11054             RaiseIfFailed("CurveCurvatureByParam", self.MeasuOp)
11055             return aCurv
11056
11057         ## Measure curvature of a curve at a point.
11058         #  @param theCurve a curve.
11059         #  @param thePoint given point.
11060         #  @return radius of curvature of \a theCurve.
11061         #
11062         #  @ref swig_todo "Example"
11063         @ManageTransactions("MeasuOp")
11064         def CurveCurvatureByPoint(self, theCurve, thePoint):
11065             """
11066             Measure curvature of a curve at a point.
11067
11068             Parameters:
11069                 theCurve a curve.
11070                 thePoint given point.
11071
11072             Returns:
11073                 radius of curvature of theCurve.
11074             """
11075             aCurv = self.MeasuOp.CurveCurvatureByPoint(theCurve,thePoint)
11076             RaiseIfFailed("CurveCurvatureByPoint", self.MeasuOp)
11077             return aCurv
11078         ## @}
11079
11080         ## @name Surface Curvature Measurement
11081         #  Methods for receiving max and min radius of curvature of surfaces
11082         #  in the given point
11083         ## @{
11084
11085         ## Measure max radius of curvature of surface.
11086         #  @param theSurf the given surface.
11087         #  @param theUParam Value of U-parameter on the referenced surface.
11088         #  @param theVParam Value of V-parameter on the referenced surface.
11089         #  @return max radius of curvature of theSurf.
11090         #
11091         ## @ref swig_todo "Example"
11092         @ManageTransactions("MeasuOp")
11093         def MaxSurfaceCurvatureByParam(self, theSurf, theUParam, theVParam):
11094             """
11095             Measure max radius of curvature of surface.
11096
11097             Parameters:
11098                 theSurf the given surface.
11099                 theUParam Value of U-parameter on the referenced surface.
11100                 theVParam Value of V-parameter on the referenced surface.
11101
11102             Returns:
11103                 max radius of curvature of theSurf.
11104             """
11105             # Example: see GEOM_TestMeasures.py
11106             aSurf = self.MeasuOp.MaxSurfaceCurvatureByParam(theSurf,theUParam,theVParam)
11107             RaiseIfFailed("MaxSurfaceCurvatureByParam", self.MeasuOp)
11108             return aSurf
11109
11110         ## Measure max radius of curvature of surface in the given point
11111         #  @param theSurf the given surface.
11112         #  @param thePoint given point.
11113         #  @return max radius of curvature of theSurf.
11114         #
11115         ## @ref swig_todo "Example"
11116         @ManageTransactions("MeasuOp")
11117         def MaxSurfaceCurvatureByPoint(self, theSurf, thePoint):
11118             """
11119             Measure max radius of curvature of surface in the given point.
11120
11121             Parameters:
11122                 theSurf the given surface.
11123                 thePoint given point.
11124
11125             Returns:
11126                 max radius of curvature of theSurf.
11127             """
11128             aSurf = self.MeasuOp.MaxSurfaceCurvatureByPoint(theSurf,thePoint)
11129             RaiseIfFailed("MaxSurfaceCurvatureByPoint", self.MeasuOp)
11130             return aSurf
11131
11132         ## Measure min radius of curvature of surface.
11133         #  @param theSurf the given surface.
11134         #  @param theUParam Value of U-parameter on the referenced surface.
11135         #  @param theVParam Value of V-parameter on the referenced surface.
11136         #  @return min radius of curvature of theSurf.
11137         #
11138         ## @ref swig_todo "Example"
11139         @ManageTransactions("MeasuOp")
11140         def MinSurfaceCurvatureByParam(self, theSurf, theUParam, theVParam):
11141             """
11142             Measure min radius of curvature of surface.
11143
11144             Parameters:
11145                 theSurf the given surface.
11146                 theUParam Value of U-parameter on the referenced surface.
11147                 theVParam Value of V-parameter on the referenced surface.
11148
11149             Returns:
11150                 Min radius of curvature of theSurf.
11151             """
11152             aSurf = self.MeasuOp.MinSurfaceCurvatureByParam(theSurf,theUParam,theVParam)
11153             RaiseIfFailed("MinSurfaceCurvatureByParam", self.MeasuOp)
11154             return aSurf
11155
11156         ## Measure min radius of curvature of surface in the given point
11157         #  @param theSurf the given surface.
11158         #  @param thePoint given point.
11159         #  @return min radius of curvature of theSurf.
11160         #
11161         ## @ref swig_todo "Example"
11162         @ManageTransactions("MeasuOp")
11163         def MinSurfaceCurvatureByPoint(self, theSurf, thePoint):
11164             """
11165             Measure min radius of curvature of surface in the given point.
11166
11167             Parameters:
11168                 theSurf the given surface.
11169                 thePoint given point.
11170
11171             Returns:
11172                 Min radius of curvature of theSurf.
11173             """
11174             aSurf = self.MeasuOp.MinSurfaceCurvatureByPoint(theSurf,thePoint)
11175             RaiseIfFailed("MinSurfaceCurvatureByPoint", self.MeasuOp)
11176             return aSurf
11177         ## @}
11178
11179         ## Get min and max tolerances of sub-shapes of theShape
11180         #  @param theShape Shape, to get tolerances of.
11181         #  @return [FaceMin,FaceMax, EdgeMin,EdgeMax, VertMin,VertMax]\n
11182         #  FaceMin,FaceMax: Min and max tolerances of the faces.\n
11183         #  EdgeMin,EdgeMax: Min and max tolerances of the edges.\n
11184         #  VertMin,VertMax: Min and max tolerances of the vertices.
11185         #
11186         #  @ref tui_tolerance_page "Example"
11187         @ManageTransactions("MeasuOp")
11188         def Tolerance(self,theShape):
11189             """
11190             Get min and max tolerances of sub-shapes of theShape
11191
11192             Parameters:
11193                 theShape Shape, to get tolerances of.
11194
11195             Returns:
11196                 [FaceMin,FaceMax, EdgeMin,EdgeMax, VertMin,VertMax]
11197                  FaceMin,FaceMax: Min and max tolerances of the faces.
11198                  EdgeMin,EdgeMax: Min and max tolerances of the edges.
11199                  VertMin,VertMax: Min and max tolerances of the vertices.
11200             """
11201             # Example: see GEOM_TestMeasures.py
11202             aTuple = self.MeasuOp.GetTolerance(theShape)
11203             RaiseIfFailed("GetTolerance", self.MeasuOp)
11204             return aTuple
11205
11206         ## Obtain description of the given shape (number of sub-shapes of each type)
11207         #  @param theShape Shape to be described.
11208         #  @return Description of the given shape.
11209         #
11210         #  @ref tui_whatis_page "Example"
11211         @ManageTransactions("MeasuOp")
11212         def WhatIs(self,theShape):
11213             """
11214             Obtain description of the given shape (number of sub-shapes of each type)
11215
11216             Parameters:
11217                 theShape Shape to be described.
11218
11219             Returns:
11220                 Description of the given shape.
11221             """
11222             # Example: see GEOM_TestMeasures.py
11223             aDescr = self.MeasuOp.WhatIs(theShape)
11224             RaiseIfFailed("WhatIs", self.MeasuOp)
11225             return aDescr
11226
11227         ## Obtain quantity of shapes of the given type in \a theShape.
11228         #  If \a theShape is of type \a theType, it is also counted.
11229         #  @param theShape Shape to be described.
11230         #  @param theType the given ShapeType().
11231         #  @return Quantity of shapes of type \a theType in \a theShape.
11232         #
11233         #  @ref tui_measurement_tools_page "Example"
11234         def NbShapes (self, theShape, theType):
11235             """
11236             Obtain quantity of shapes of the given type in theShape.
11237             If theShape is of type theType, it is also counted.
11238
11239             Parameters:
11240                 theShape Shape to be described.
11241                 theType the given geompy.ShapeType
11242
11243             Returns:
11244                 Quantity of shapes of type theType in theShape.
11245             """
11246             # Example: see GEOM_TestMeasures.py
11247             listSh = self.SubShapeAllIDs(theShape, theType)
11248             Nb = len(listSh)
11249             return Nb
11250
11251         ## Obtain quantity of shapes of each type in \a theShape.
11252         #  The \a theShape is also counted.
11253         #  @param theShape Shape to be described.
11254         #  @return Dictionary of ShapeType() with bound quantities of shapes.
11255         #
11256         #  @ref tui_measurement_tools_page "Example"
11257         def ShapeInfo (self, theShape):
11258             """
11259             Obtain quantity of shapes of each type in theShape.
11260             The theShape is also counted.
11261
11262             Parameters:
11263                 theShape Shape to be described.
11264
11265             Returns:
11266                 Dictionary of geompy.ShapeType with bound quantities of shapes.
11267             """
11268             # Example: see GEOM_TestMeasures.py
11269             aDict = {}
11270             for typeSh in self.ShapeType:
11271                 if typeSh in ( "AUTO", "SHAPE" ): continue
11272                 listSh = self.SubShapeAllIDs(theShape, self.ShapeType[typeSh])
11273                 Nb = len(listSh)
11274                 aDict[typeSh] = Nb
11275                 pass
11276             return aDict
11277
11278         def GetCreationInformation(self, theShape):
11279             res = ''
11280             infos = theShape.GetCreationInformation()
11281             for info in infos:
11282                 # operationName
11283                 opName = info.operationName
11284                 if not opName: opName = "no info available"
11285                 if res: res += "\n"
11286                 res += "Operation: " + opName
11287                 # parameters
11288                 for parVal in info.params:
11289                     res += "\n \t%s = %s" % ( parVal.name, parVal.value )
11290             return res
11291
11292         ## Get a point, situated at the centre of mass of theShape.
11293         #  @param theShape Shape to define centre of mass of.
11294         #  @param theName Object name; when specified, this parameter is used
11295         #         for result publication in the study. Otherwise, if automatic
11296         #         publication is switched on, default value is used for result name.
11297         #
11298         #  @return New GEOM.GEOM_Object, containing the created point.
11299         #
11300         #  @ref tui_center_of_mass_page "Example"
11301         @ManageTransactions("MeasuOp")
11302         def MakeCDG(self, theShape, theName=None):
11303             """
11304             Get a point, situated at the centre of mass of theShape.
11305
11306             Parameters:
11307                 theShape Shape to define centre of mass of.
11308                 theName Object name; when specified, this parameter is used
11309                         for result publication in the study. Otherwise, if automatic
11310                         publication is switched on, default value is used for result name.
11311
11312             Returns:
11313                 New GEOM.GEOM_Object, containing the created point.
11314             """
11315             # Example: see GEOM_TestMeasures.py
11316             anObj = self.MeasuOp.GetCentreOfMass(theShape)
11317             RaiseIfFailed("GetCentreOfMass", self.MeasuOp)
11318             self._autoPublish(anObj, theName, "centerOfMass")
11319             return anObj
11320
11321         ## Get a vertex sub-shape by index.
11322         #  @param theShape Shape to find sub-shape.
11323         #  @param theIndex Index to find vertex by this index (starting from zero)
11324         #  @param theUseOri To consider edge/wire orientation or not
11325         #  @param theName Object name; when specified, this parameter is used
11326         #         for result publication in the study. Otherwise, if automatic
11327         #         publication is switched on, default value is used for result name.
11328         #
11329         #  @return New GEOM.GEOM_Object, containing the created vertex.
11330         #
11331         #  @ref tui_measurement_tools_page "Example"
11332         @ManageTransactions("MeasuOp")
11333         def GetVertexByIndex(self, theShape, theIndex, theUseOri=True, theName=None):
11334             """
11335             Get a vertex sub-shape by index.
11336
11337             Parameters:
11338                 theShape Shape to find sub-shape.
11339                 theIndex Index to find vertex by this index (starting from zero)
11340                 theUseOri To consider edge/wire orientation or not
11341                 theName Object name; when specified, this parameter is used
11342                         for result publication in the study. Otherwise, if automatic
11343                         publication is switched on, default value is used for result name.
11344
11345             Returns:
11346                 New GEOM.GEOM_Object, containing the created vertex.
11347             """
11348             # Example: see GEOM_TestMeasures.py
11349             if isinstance( theUseOri, str ): # theUseOri was inserted before theName
11350                 theUseOri, theName = True, theUseOri
11351             anObj = self.MeasuOp.GetVertexByIndex(theShape, theIndex, theUseOri)
11352             RaiseIfFailed("GetVertexByIndex", self.MeasuOp)
11353             self._autoPublish(anObj, theName, "vertex")
11354             return anObj
11355
11356         ## Get the first vertex of wire/edge depended orientation.
11357         #  @param theShape Shape to find first vertex.
11358         #  @param theName Object name; when specified, this parameter is used
11359         #         for result publication in the study. Otherwise, if automatic
11360         #         publication is switched on, default value is used for result name.
11361         #
11362         #  @return New GEOM.GEOM_Object, containing the created vertex.
11363         #
11364         #  @ref tui_measurement_tools_page "Example"
11365         def GetFirstVertex(self, theShape, theName=None):
11366             """
11367             Get the first vertex of wire/edge depended orientation.
11368
11369             Parameters:
11370                 theShape Shape to find first vertex.
11371                 theName Object name; when specified, this parameter is used
11372                         for result publication in the study. Otherwise, if automatic
11373                         publication is switched on, default value is used for result name.
11374
11375             Returns:
11376                 New GEOM.GEOM_Object, containing the created vertex.
11377             """
11378             # Example: see GEOM_TestMeasures.py
11379             # note: auto-publishing is done in self.GetVertexByIndex()
11380             return self.GetVertexByIndex(theShape, 0, True, theName)
11381
11382         ## Get the last vertex of wire/edge depended orientation.
11383         #  @param theShape Shape to find last vertex.
11384         #  @param theName Object name; when specified, this parameter is used
11385         #         for result publication in the study. Otherwise, if automatic
11386         #         publication is switched on, default value is used for result name.
11387         #
11388         #  @return New GEOM.GEOM_Object, containing the created vertex.
11389         #
11390         #  @ref tui_measurement_tools_page "Example"
11391         def GetLastVertex(self, theShape, theName=None):
11392             """
11393             Get the last vertex of wire/edge depended orientation.
11394
11395             Parameters:
11396                 theShape Shape to find last vertex.
11397                 theName Object name; when specified, this parameter is used
11398                         for result publication in the study. Otherwise, if automatic
11399                         publication is switched on, default value is used for result name.
11400
11401             Returns:
11402                 New GEOM.GEOM_Object, containing the created vertex.
11403             """
11404             # Example: see GEOM_TestMeasures.py
11405             nb_vert =  self.NumberOfSubShapes(theShape, self.ShapeType["VERTEX"])
11406             # note: auto-publishing is done in self.GetVertexByIndex()
11407             return self.GetVertexByIndex(theShape, (nb_vert-1), True, theName)
11408
11409         ## Get a normale to the given face. If the point is not given,
11410         #  the normale is calculated at the center of mass.
11411         #  @param theFace Face to define normale of.
11412         #  @param theOptionalPoint Point to compute the normale at.
11413         #  @param theName Object name; when specified, this parameter is used
11414         #         for result publication in the study. Otherwise, if automatic
11415         #         publication is switched on, default value is used for result name.
11416         #
11417         #  @return New GEOM.GEOM_Object, containing the created vector.
11418         #
11419         #  @ref swig_todo "Example"
11420         @ManageTransactions("MeasuOp")
11421         def GetNormal(self, theFace, theOptionalPoint = None, theName=None):
11422             """
11423             Get a normale to the given face. If the point is not given,
11424             the normale is calculated at the center of mass.
11425
11426             Parameters:
11427                 theFace Face to define normale of.
11428                 theOptionalPoint Point to compute the normale at.
11429                 theName Object name; when specified, this parameter is used
11430                         for result publication in the study. Otherwise, if automatic
11431                         publication is switched on, default value is used for result name.
11432
11433             Returns:
11434                 New GEOM.GEOM_Object, containing the created vector.
11435             """
11436             # Example: see GEOM_TestMeasures.py
11437             anObj = self.MeasuOp.GetNormal(theFace, theOptionalPoint)
11438             RaiseIfFailed("GetNormal", self.MeasuOp)
11439             self._autoPublish(anObj, theName, "normal")
11440             return anObj
11441
11442         ## Print shape errors obtained from CheckShape.
11443         #  @param theShape Shape that was checked.
11444         #  @param theShapeErrors the shape errors obtained by CheckShape.
11445         #  @param theReturnStatus If 0 the description of problem is printed.
11446         #                         If 1 the description of problem is returned.
11447         #  @return If theReturnStatus is equal to 1 the description is returned.
11448         #          Otherwise doesn't return anything.
11449         #
11450         #  @ref tui_check_shape_page "Example"
11451         @ManageTransactions("MeasuOp")
11452         def PrintShapeErrors(self, theShape, theShapeErrors, theReturnStatus = 0):
11453             """
11454             Print shape errors obtained from CheckShape.
11455
11456             Parameters:
11457                 theShape Shape that was checked.
11458                 theShapeErrors the shape errors obtained by CheckShape.
11459                 theReturnStatus If 0 the description of problem is printed.
11460                                 If 1 the description of problem is returned.
11461
11462             Returns:
11463                 If theReturnStatus is equal to 1 the description is returned.
11464                   Otherwise doesn't return anything.
11465             """
11466             # Example: see GEOM_TestMeasures.py
11467             Descr = self.MeasuOp.PrintShapeErrors(theShape, theShapeErrors)
11468             if theReturnStatus == 1:
11469                 return Descr
11470             print(Descr)
11471             pass
11472
11473         ## Check a topology of the given shape.
11474         #  @param theShape Shape to check validity of.
11475         #  @param theIsCheckGeom If FALSE, only the shape's topology will be checked, \n
11476         #                        if TRUE, the shape's geometry will be checked also.
11477         #  @param theReturnStatus If 0 and if theShape is invalid, a description
11478         #                         of problem is printed.
11479         #                         If 1 isValid flag and the description of
11480         #                         problem is returned.
11481         #                         If 2 isValid flag and the list of error data
11482         #                         is returned.
11483         #  @return TRUE, if the shape "seems to be valid".
11484         #          If theShape is invalid, prints a description of problem.
11485         #          If theReturnStatus is equal to 1 the description is returned
11486         #          along with IsValid flag.
11487         #          If theReturnStatus is equal to 2 the list of error data is
11488         #          returned along with IsValid flag.
11489         #
11490         #  @ref tui_check_shape_page "Example"
11491         @ManageTransactions("MeasuOp")
11492         def CheckShape(self,theShape, theIsCheckGeom = 0, theReturnStatus = 0):
11493             """
11494             Check a topology of the given shape.
11495
11496             Parameters:
11497                 theShape Shape to check validity of.
11498                 theIsCheckGeom If FALSE, only the shape's topology will be checked,
11499                                if TRUE, the shape's geometry will be checked also.
11500                 theReturnStatus If 0 and if theShape is invalid, a description
11501                                 of problem is printed.
11502                                 If 1 IsValid flag and the description of
11503                                 problem is returned.
11504                                 If 2 IsValid flag and the list of error data
11505                                 is returned.
11506
11507             Returns:
11508                 TRUE, if the shape "seems to be valid".
11509                 If theShape is invalid, prints a description of problem.
11510                 If theReturnStatus is equal to 1 the description is returned
11511                 along with IsValid flag.
11512                 If theReturnStatus is equal to 2 the list of error data is
11513                 returned along with IsValid flag.
11514             """
11515             # Example: see GEOM_TestMeasures.py
11516             if theIsCheckGeom:
11517                 (IsValid, ShapeErrors) = self.MeasuOp.CheckShapeWithGeometry(theShape)
11518                 RaiseIfFailed("CheckShapeWithGeometry", self.MeasuOp)
11519             else:
11520                 (IsValid, ShapeErrors) = self.MeasuOp.CheckShape(theShape)
11521                 RaiseIfFailed("CheckShape", self.MeasuOp)
11522             if IsValid == 0:
11523                 if theReturnStatus == 0:
11524                     Descr = self.MeasuOp.PrintShapeErrors(theShape, ShapeErrors)
11525                     print(Descr)
11526             if theReturnStatus == 1:
11527               Descr = self.MeasuOp.PrintShapeErrors(theShape, ShapeErrors)
11528               return (IsValid, Descr)
11529             elif theReturnStatus == 2:
11530               return (IsValid, ShapeErrors)
11531             return IsValid
11532
11533         ## Detect self-intersections in the given shape.
11534         #  @param theShape Shape to check.
11535         #  @param theCheckLevel is the level of self-intersection check.
11536         #         Possible input values are:
11537         #         - GEOM.SI_V_V(0) - only V/V interferences
11538         #         - GEOM.SI_V_E(1) - V/V and V/E interferences
11539         #         - GEOM.SI_E_E(2) - V/V, V/E and E/E interferences
11540         #         - GEOM.SI_V_F(3) - V/V, V/E, E/E and V/F interferences
11541         #         - GEOM.SI_E_F(4) - V/V, V/E, E/E, V/F and E/F interferences
11542         #         - GEOM.SI_ALL(5) - all interferences.
11543         #  @return TRUE, if the shape contains no self-intersections.
11544         #
11545         #  @ref tui_check_self_intersections_page "Example"
11546         @ManageTransactions("MeasuOp")
11547         def CheckSelfIntersections(self, theShape, theCheckLevel = GEOM.SI_ALL):
11548             """
11549             Detect self-intersections in the given shape.
11550
11551             Parameters:
11552                 theShape Shape to check.
11553                 theCheckLevel is the level of self-intersection check.
11554                   Possible input values are:
11555                    - GEOM.SI_V_V(0) - only V/V interferences
11556                    - GEOM.SI_V_E(1) - V/V and V/E interferences
11557                    - GEOM.SI_E_E(2) - V/V, V/E and E/E interferences
11558                    - GEOM.SI_V_F(3) - V/V, V/E, E/E and V/F interferences
11559                    - GEOM.SI_E_F(4) - V/V, V/E, E/E, V/F and E/F interferences
11560                    - GEOM.SI_ALL(5) - all interferences.
11561  
11562             Returns:
11563                 TRUE, if the shape contains no self-intersections.
11564             """
11565             # Example: see GEOM_TestMeasures.py
11566             (IsValid, Pairs) = self.MeasuOp.CheckSelfIntersections(theShape, EnumToLong(theCheckLevel))
11567             RaiseIfFailed("CheckSelfIntersections", self.MeasuOp)
11568             return IsValid
11569
11570         ## Detect self-intersections of the given shape with algorithm based on mesh intersections.
11571         #  @param theShape Shape to check.
11572         #  @param theDeflection Linear deflection coefficient that specifies quality of tessellation:
11573         #         - if \a theDeflection <= 0, default deflection 0.001 is used
11574         #  @param theTolerance Specifies a distance between sub-shapes used for detecting gaps:
11575         #         - if \a theTolerance <= 0, algorithm detects intersections (default behavior)
11576         #         - if \a theTolerance > 0, algorithm detects gaps
11577         #  @return TRUE, if the shape contains no self-intersections.
11578         #
11579         #  @ref tui_check_self_intersections_fast_page "Example"
11580         @ManageTransactions("MeasuOp")
11581         def CheckSelfIntersectionsFast(self, theShape, theDeflection = 0.001, theTolerance = 0.0):
11582             """
11583             Detect self-intersections of the given shape with algorithm based on mesh intersections.
11584
11585             Parameters:
11586                 theShape Shape to check.
11587                 theDeflection Linear deflection coefficient that specifies quality of tessellation:
11588                     - if theDeflection <= 0, default deflection 0.001 is used
11589                 theTolerance Specifies a distance between shapes used for detecting gaps:
11590                     - if theTolerance <= 0, algorithm detects intersections (default behavior)
11591                     - if theTolerance > 0, algorithm detects gaps
11592  
11593             Returns:
11594                 TRUE, if the shape contains no self-intersections.
11595             """
11596             # Example: see GEOM_TestMeasures.py
11597             (IsValid, Pairs) = self.MeasuOp.CheckSelfIntersectionsFast(theShape, theDeflection, theTolerance)
11598             RaiseIfFailed("CheckSelfIntersectionsFast", self.MeasuOp)
11599             return IsValid
11600
11601         ## Check boolean and partition operations arguments.
11602         #  @param theShape the argument of an operation to be checked
11603         #  @return TRUE if the argument is valid for a boolean or partition
11604         #          operation; FALSE otherwise.
11605         @ManageTransactions("MeasuOp")
11606         def CheckBOPArguments(self, theShape):
11607             """
11608             Check boolean and partition operations arguments.
11609
11610             Parameters:
11611                 theShape the argument of an operation to be checked
11612
11613             Returns:
11614                 TRUE if the argument is valid for a boolean or partition
11615                 operation; FALSE otherwise.
11616             """
11617             return self.MeasuOp.CheckBOPArguments(theShape)
11618
11619         ## Detect intersections of the given shapes with algorithm based on mesh intersections.
11620         #  @param theShape1 First source object
11621         #  @param theShape2 Second source object
11622         #  @param theTolerance Specifies a distance between shapes used for detecting gaps:
11623         #         - if \a theTolerance <= 0, algorithm detects intersections (default behavior)
11624         #         - if \a theTolerance > 0, algorithm detects gaps
11625         #  @param theDeflection Linear deflection coefficient that specifies quality of tessellation:
11626         #         - if \a theDeflection <= 0, default deflection 0.001 is used
11627         #  @return TRUE, if there are intersections (gaps) between source shapes
11628         #  @return List of sub-shapes IDs from 1st shape that localize intersection.
11629         #  @return List of sub-shapes IDs from 2nd shape that localize intersection.
11630         #
11631         #  @ref tui_fast_intersection_page "Example"
11632         @ManageTransactions("MeasuOp")
11633         def FastIntersect(self, theShape1, theShape2, theTolerance = 0.0, theDeflection = 0.001):
11634             """
11635             Detect intersections of the given shapes with algorithm based on mesh intersections.
11636
11637             Parameters:
11638                 theShape1 First source object
11639                 theShape2 Second source object
11640                 theTolerance Specifies a distance between shapes used for detecting gaps:
11641                     - if theTolerance <= 0, algorithm detects intersections (default behavior)
11642                     - if theTolerance > 0, algorithm detects gaps
11643                 theDeflection Linear deflection coefficient that specifies quality of tessellation:
11644                     - if theDeflection <= 0, default deflection 0.001 is used
11645  
11646             Returns:
11647                 TRUE, if there are intersections (gaps) between source shapes
11648                 List of sub-shapes IDs from 1st shape that localize intersection.
11649                 List of sub-shapes IDs from 2nd shape that localize intersection.
11650             """
11651             # Example: see GEOM_TestMeasures.py
11652             IsOk, Res1, Res2 = self.MeasuOp.FastIntersect(theShape1, theShape2, theTolerance, theDeflection)
11653             RaiseIfFailed("FastIntersect", self.MeasuOp)
11654             return IsOk, Res1, Res2
11655
11656         ## Get position (LCS) of theShape.
11657         #
11658         #  Origin of the LCS is situated at the shape's center of mass.
11659         #  Axes of the LCS are obtained from shape's location or,
11660         #  if the shape is a planar face, from position of its plane.
11661         #
11662         #  @param theShape Shape to calculate position of.
11663         #  @return [Ox,Oy,Oz, Zx,Zy,Zz, Xx,Xy,Xz].
11664         #          Ox,Oy,Oz: Coordinates of shape's LCS origin.
11665         #          Zx,Zy,Zz: Coordinates of shape's LCS normal(main) direction.
11666         #          Xx,Xy,Xz: Coordinates of shape's LCS X direction.
11667         #
11668         #  @ref swig_todo "Example"
11669         @ManageTransactions("MeasuOp")
11670         def GetPosition(self,theShape):
11671             """
11672             Get position (LCS) of theShape.
11673             Origin of the LCS is situated at the shape's center of mass.
11674             Axes of the LCS are obtained from shape's location or,
11675             if the shape is a planar face, from position of its plane.
11676
11677             Parameters:
11678                 theShape Shape to calculate position of.
11679
11680             Returns:
11681                 [Ox,Oy,Oz, Zx,Zy,Zz, Xx,Xy,Xz].
11682                  Ox,Oy,Oz: Coordinates of shape's LCS origin.
11683                  Zx,Zy,Zz: Coordinates of shape's LCS normal(main) direction.
11684                  Xx,Xy,Xz: Coordinates of shape's LCS X direction.
11685             """
11686             # Example: see GEOM_TestMeasures.py
11687             aTuple = self.MeasuOp.GetPosition(theShape)
11688             RaiseIfFailed("GetPosition", self.MeasuOp)
11689             return aTuple
11690
11691         ## Get kind of theShape.
11692         #
11693         #  @param theShape Shape to get a kind of.
11694         #  @return Returns a kind of shape in terms of <VAR>GEOM.GEOM_IKindOfShape.shape_kind</VAR> enumeration
11695         #          and a list of parameters, describing the shape.
11696         #  @note  Concrete meaning of each value, returned via \a theIntegers
11697         #         or \a theDoubles list depends on the kind() of the shape.
11698         #
11699         #  @ref swig_todo "Example"
11700         @ManageTransactions("MeasuOp")
11701         def KindOfShape(self,theShape):
11702             """
11703             Get kind of theShape.
11704
11705             Parameters:
11706                 theShape Shape to get a kind of.
11707
11708             Returns:
11709                 a kind of shape in terms of GEOM_IKindOfShape.shape_kind enumeration
11710                     and a list of parameters, describing the shape.
11711             Note:
11712                 Concrete meaning of each value, returned via theIntegers
11713                 or theDoubles list depends on the geompy.kind of the shape
11714             """
11715             # Example: see GEOM_TestMeasures.py
11716             aRoughTuple = self.MeasuOp.KindOfShape(theShape)
11717             RaiseIfFailed("KindOfShape", self.MeasuOp)
11718
11719             aKind  = aRoughTuple[0]
11720             anInts = aRoughTuple[1]
11721             aDbls  = aRoughTuple[2]
11722
11723             # Now there is no exception from this rule:
11724             aKindTuple = [aKind] + aDbls + anInts
11725
11726             # If they are we will regroup parameters for such kind of shape.
11727             # For example:
11728             #if aKind == kind.SOME_KIND:
11729             #    #  SOME_KIND     int int double int double double
11730             #    aKindTuple = [aKind, anInts[0], anInts[1], aDbls[0], anInts[2], aDbls[1], aDbls[2]]
11731
11732             return aKindTuple
11733
11734         ## Returns the string that describes if the shell is good for solid.
11735         #  This is a support method for MakeSolid.
11736         #
11737         #  @param theShell the shell to be checked.
11738         #  @return Returns a string that describes the shell validity for
11739         #          solid construction.
11740         @ManageTransactions("MeasuOp")
11741         def _IsGoodForSolid(self, theShell):
11742             """
11743             Returns the string that describes if the shell is good for solid.
11744             This is a support method for MakeSolid.
11745
11746             Parameter:
11747                 theShell the shell to be checked.
11748
11749             Returns:
11750                 Returns a string that describes the shell validity for
11751                 solid construction.
11752             """
11753             aDescr = self.MeasuOp.IsGoodForSolid(theShell)
11754             return aDescr
11755
11756         # end of l2_measure
11757         ## @}
11758
11759         ## @addtogroup l2_import_export
11760         ## @{
11761
11762         ## Import a shape from the BREP, IGES, STEP or other file
11763         #  (depends on given format) with given name.
11764         #
11765         #  Note: this function is deprecated, it is kept for backward compatibility only
11766         #  Use Import<FormatName> instead, where <FormatName> is a name of desirable format to import.
11767         #
11768         #  @param theFileName The file, containing the shape.
11769         #  @param theFormatName Specify format for the file reading.
11770         #         Available formats can be obtained with InsertOp.ImportTranslators() method.
11771         #         If format 'IGES_SCALE' is used instead of 'IGES' or
11772         #            format 'STEP_SCALE' is used instead of 'STEP',
11773         #            length unit will be set to 'meter' and result model will be scaled.
11774         #  @param theName Object name; when specified, this parameter is used
11775         #         for result publication in the study. Otherwise, if automatic
11776         #         publication is switched on, default value is used for result name.
11777         #
11778         #  @return New GEOM.GEOM_Object, containing the imported shape.
11779         #          If material names are imported it returns the list of
11780         #          objects. The first one is the imported object followed by
11781         #          material groups.
11782         #  @note Auto publishing is allowed for the shape itself. Imported
11783         #        material groups are not automatically published.
11784         #
11785         #  @ref swig_Import_Export "Example"
11786         @ManageTransactions("InsertOp")
11787         def ImportFile(self, theFileName, theFormatName, theName=None):
11788             """
11789             Import a shape from the BREP, IGES, STEP or other file
11790             (depends on given format) with given name.
11791
11792             Note: this function is deprecated, it is kept for backward compatibility only
11793             Use Import<FormatName> instead, where <FormatName> is a name of desirable format to import.
11794
11795             Parameters: 
11796                 theFileName The file, containing the shape.
11797                 theFormatName Specify format for the file reading.
11798                     Available formats can be obtained with geompy.InsertOp.ImportTranslators() method.
11799                     If format 'IGES_SCALE' is used instead of 'IGES' or
11800                        format 'STEP_SCALE' is used instead of 'STEP',
11801                        length unit will be set to 'meter' and result model will be scaled.
11802                 theName Object name; when specified, this parameter is used
11803                         for result publication in the study. Otherwise, if automatic
11804                         publication is switched on, default value is used for result name.
11805
11806             Returns:
11807                 New GEOM.GEOM_Object, containing the imported shape.
11808                 If material names are imported it returns the list of
11809                 objects. The first one is the imported object followed by
11810                 material groups.
11811             Note:
11812                 Auto publishing is allowed for the shape itself. Imported
11813                 material groups are not automatically published.
11814             """
11815             # Example: see GEOM_TestOthers.py
11816             print("""
11817             WARNING: Function ImportFile is deprecated, use Import<FormatName> instead,
11818             where <FormatName> is a name of desirable format for importing.
11819             """)
11820             aListObj = self.InsertOp.ImportFile(theFileName, theFormatName)
11821             RaiseIfFailed("ImportFile", self.InsertOp)
11822             aNbObj = len(aListObj)
11823             if aNbObj > 0:
11824                 self._autoPublish(aListObj[0], theName, "imported")
11825             if aNbObj == 1:
11826                 return aListObj[0]
11827             return aListObj
11828
11829         ## Deprecated analog of ImportFile()
11830         def Import(self, theFileName, theFormatName, theName=None):
11831             """
11832             Deprecated analog of geompy.ImportFile, kept for backward compatibility only.
11833             """
11834             # note: auto-publishing is done in self.ImportFile()
11835             return self.ImportFile(theFileName, theFormatName, theName)
11836
11837         ## Read a shape from the binary stream, containing its bounding representation (BRep).
11838         #
11839         #  @note As the byte-stream representing the shape data can be quite large, this method
11840         #  is not automatically dumped to the Python script with the DumpStudy functionality;
11841         #  so please use this method carefully, only for strong reasons.
11842         #  
11843         #  @note GEOM.GEOM_Object.GetShapeStream() method can be used to obtain the shape's
11844         #  data stream.
11845         #
11846         #  @param theStream The BRep binary stream.
11847         #  @param theName Object name; when specified, this parameter is used
11848         #         for result publication in the study. Otherwise, if automatic
11849         #         publication is switched on, default value is used for result name.
11850         #
11851         #  @return New GEOM_Object, containing the shape, read from theStream.
11852         #
11853         #  @ref swig_Import_Export "Example"
11854         @ManageTransactions("InsertOp")
11855         def RestoreShape (self, theStream, theName=None):
11856             """
11857             Read a shape from the binary stream, containing its bounding representation (BRep).
11858
11859             Note:
11860                 shape.GetShapeStream() method can be used to obtain the shape's BRep stream.
11861
11862             Parameters:
11863                 theStream The BRep binary stream.
11864                 theName Object name; when specified, this parameter is used
11865                         for result publication in the study. Otherwise, if automatic
11866                         publication is switched on, default value is used for result name.
11867
11868             Returns:
11869                 New GEOM_Object, containing the shape, read from theStream.
11870             """
11871             # Example: see GEOM_TestOthers.py
11872             if not theStream:
11873                 # this is the workaround to ignore invalid case when data stream is empty
11874                 if int(os.getenv("GEOM_IGNORE_RESTORE_SHAPE", "0")) > 0:
11875                     print("WARNING: Result of RestoreShape is a NULL shape!")
11876                     return None
11877             anObj = self.InsertOp.RestoreShape(theStream)
11878             RaiseIfFailed("RestoreShape", self.InsertOp)
11879             self._autoPublish(anObj, theName, "restored")
11880             return anObj
11881
11882         ## Export the given shape into a file with given name.
11883         #
11884         #  Note: this function is deprecated, it is kept for backward compatibility only
11885         #  Use Export<FormatName> instead, where <FormatName> is a name of desirable format to export.
11886         #
11887         #  @param theObject Shape to be stored in the file.
11888         #  @param theFileName Name of the file to store the given shape in.
11889         #  @param theFormatName Specify format for the shape storage.
11890         #         Available formats can be obtained with
11891         #         geompy.InsertOp.ExportTranslators()[0] method.
11892         #
11893         #  @ref swig_Import_Export "Example"
11894         @ManageTransactions("InsertOp")
11895         def Export(self, theObject, theFileName, theFormatName):
11896             """
11897             Export the given shape into a file with given name.
11898
11899             Note: this function is deprecated, it is kept for backward compatibility only
11900             Use Export<FormatName> instead, where <FormatName> is a name of desirable format to export.
11901             
11902             Parameters: 
11903                 theObject Shape to be stored in the file.
11904                 theFileName Name of the file to store the given shape in.
11905                 theFormatName Specify format for the shape storage.
11906                               Available formats can be obtained with
11907                               geompy.InsertOp.ExportTranslators()[0] method.
11908             """
11909             # Example: see GEOM_TestOthers.py
11910             print("""
11911             WARNING: Function Export is deprecated, use Export<FormatName> instead,
11912             where <FormatName> is a name of desirable format for exporting.
11913             """)
11914             self.InsertOp.Export(theObject, theFileName, theFormatName)
11915             if self.InsertOp.IsDone() == 0:
11916                 raise RuntimeError("Export : " + self.InsertOp.GetErrorCode())
11917                 pass
11918             pass
11919
11920         # end of l2_import_export
11921         ## @}
11922
11923         ## @addtogroup l3_blocks
11924         ## @{
11925
11926         ## Create a quadrangle face from four edges. Order of Edges is not
11927         #  important. It is not necessary that edges share the same vertex.
11928         #  @param E1,E2,E3,E4 Edges for the face bound.
11929         #  @param theName Object name; when specified, this parameter is used
11930         #         for result publication in the study. Otherwise, if automatic
11931         #         publication is switched on, default value is used for result name.
11932         #
11933         #  @return New GEOM.GEOM_Object, containing the created face.
11934         #
11935         #  @ref tui_building_by_blocks_page "Example"
11936         @ManageTransactions("BlocksOp")
11937         def MakeQuad(self, E1, E2, E3, E4, theName=None):
11938             """
11939             Create a quadrangle face from four edges. Order of Edges is not
11940             important. It is not necessary that edges share the same vertex.
11941
11942             Parameters:
11943                 E1,E2,E3,E4 Edges for the face bound.
11944                 theName Object name; when specified, this parameter is used
11945                         for result publication in the study. Otherwise, if automatic
11946                         publication is switched on, default value is used for result name.
11947
11948             Returns:
11949                 New GEOM.GEOM_Object, containing the created face.
11950
11951             Example of usage:
11952                 qface1 = geompy.MakeQuad(edge1, edge2, edge3, edge4)
11953             """
11954             # Example: see GEOM_Spanner.py
11955             anObj = self.BlocksOp.MakeQuad(E1, E2, E3, E4)
11956             RaiseIfFailed("MakeQuad", self.BlocksOp)
11957             self._autoPublish(anObj, theName, "quad")
11958             return anObj
11959
11960         ## Create a quadrangle face on two edges.
11961         #  The missing edges will be built by creating the shortest ones.
11962         #  @param E1,E2 Two opposite edges for the face.
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 created face.
11968         #
11969         #  @ref tui_building_by_blocks_page "Example"
11970         @ManageTransactions("BlocksOp")
11971         def MakeQuad2Edges(self, E1, E2, theName=None):
11972             """
11973             Create a quadrangle face on two edges.
11974             The missing edges will be built by creating the shortest ones.
11975
11976             Parameters:
11977                 E1,E2 Two opposite edges for the face.
11978                 theName Object name; when specified, this parameter is used
11979                         for result publication in the study. Otherwise, if automatic
11980                         publication is switched on, default value is used for result name.
11981
11982             Returns:
11983                 New GEOM.GEOM_Object, containing the created face.
11984
11985             Example of usage:
11986                 # create vertices
11987                 p1 = geompy.MakeVertex(  0.,   0.,   0.)
11988                 p2 = geompy.MakeVertex(150.,  30.,   0.)
11989                 p3 = geompy.MakeVertex(  0., 120.,  50.)
11990                 p4 = geompy.MakeVertex(  0.,  40.,  70.)
11991                 # create edges
11992                 edge1 = geompy.MakeEdge(p1, p2)
11993                 edge2 = geompy.MakeEdge(p3, p4)
11994                 # create a quadrangle face from two edges
11995                 qface2 = geompy.MakeQuad2Edges(edge1, edge2)
11996             """
11997             # Example: see GEOM_Spanner.py
11998             anObj = self.BlocksOp.MakeQuad2Edges(E1, E2)
11999             RaiseIfFailed("MakeQuad2Edges", self.BlocksOp)
12000             self._autoPublish(anObj, theName, "quad")
12001             return anObj
12002
12003         ## Create a quadrangle face with specified corners.
12004         #  The missing edges will be built by creating the shortest ones.
12005         #  @param V1,V2,V3,V4 Corner vertices for the face.
12006         #  @param theName Object name; when specified, this parameter is used
12007         #         for result publication in the study. Otherwise, if automatic
12008         #         publication is switched on, default value is used for result name.
12009         #
12010         #  @return New GEOM.GEOM_Object, containing the created face.
12011         #
12012         #  @ref tui_building_by_blocks_page "Example 1"
12013         #  \n @ref swig_MakeQuad4Vertices "Example 2"
12014         @ManageTransactions("BlocksOp")
12015         def MakeQuad4Vertices(self, V1, V2, V3, V4, theName=None):
12016             """
12017             Create a quadrangle face with specified corners.
12018             The missing edges will be built by creating the shortest ones.
12019
12020             Parameters:
12021                 V1,V2,V3,V4 Corner vertices for the face.
12022                 theName Object name; when specified, this parameter is used
12023                         for result publication in the study. Otherwise, if automatic
12024                         publication is switched on, default value is used for result name.
12025
12026             Returns:
12027                 New GEOM.GEOM_Object, containing the created face.
12028
12029             Example of usage:
12030                 # create vertices
12031                 p1 = geompy.MakeVertex(  0.,   0.,   0.)
12032                 p2 = geompy.MakeVertex(150.,  30.,   0.)
12033                 p3 = geompy.MakeVertex(  0., 120.,  50.)
12034                 p4 = geompy.MakeVertex(  0.,  40.,  70.)
12035                 # create a quadrangle from four points in its corners
12036                 qface3 = geompy.MakeQuad4Vertices(p1, p2, p3, p4)
12037             """
12038             # Example: see GEOM_Spanner.py
12039             anObj = self.BlocksOp.MakeQuad4Vertices(V1, V2, V3, V4)
12040             RaiseIfFailed("MakeQuad4Vertices", self.BlocksOp)
12041             self._autoPublish(anObj, theName, "quad")
12042             return anObj
12043
12044         ## Create a hexahedral solid, bounded by the six given faces. Order of
12045         #  faces is not important. It is not necessary that Faces share the same edge.
12046         #  @param F1,F2,F3,F4,F5,F6 Faces for the hexahedral solid.
12047         #  @param theName Object name; when specified, this parameter is used
12048         #         for result publication in the study. Otherwise, if automatic
12049         #         publication is switched on, default value is used for result name.
12050         #
12051         #  @return New GEOM.GEOM_Object, containing the created solid.
12052         #
12053         #  @ref tui_building_by_blocks_page "Example 1"
12054         #  \n @ref swig_MakeHexa "Example 2"
12055         @ManageTransactions("BlocksOp")
12056         def MakeHexa(self, F1, F2, F3, F4, F5, F6, theName=None):
12057             """
12058             Create a hexahedral solid, bounded by the six given faces. Order of
12059             faces is not important. It is not necessary that Faces share the same edge.
12060
12061             Parameters:
12062                 F1,F2,F3,F4,F5,F6 Faces for the hexahedral solid.
12063                 theName Object name; when specified, this parameter is used
12064                         for result publication in the study. Otherwise, if automatic
12065                         publication is switched on, default value is used for result name.
12066
12067             Returns:
12068                 New GEOM.GEOM_Object, containing the created solid.
12069
12070             Example of usage:
12071                 solid = geompy.MakeHexa(qface1, qface2, qface3, qface4, qface5, qface6)
12072             """
12073             # Example: see GEOM_Spanner.py
12074             anObj = self.BlocksOp.MakeHexa(F1, F2, F3, F4, F5, F6)
12075             RaiseIfFailed("MakeHexa", self.BlocksOp)
12076             self._autoPublish(anObj, theName, "hexa")
12077             return anObj
12078
12079         ## Create a hexahedral solid between two given faces.
12080         #  The missing faces will be built by creating the smallest ones.
12081         #  @param F1,F2 Two opposite faces for the hexahedral solid.
12082         #  @param theName Object name; when specified, this parameter is used
12083         #         for result publication in the study. Otherwise, if automatic
12084         #         publication is switched on, default value is used for result name.
12085         #
12086         #  @return New GEOM.GEOM_Object, containing the created solid.
12087         #
12088         #  @ref tui_building_by_blocks_page "Example 1"
12089         #  \n @ref swig_MakeHexa2Faces "Example 2"
12090         @ManageTransactions("BlocksOp")
12091         def MakeHexa2Faces(self, F1, F2, theName=None):
12092             """
12093             Create a hexahedral solid between two given faces.
12094             The missing faces will be built by creating the smallest ones.
12095
12096             Parameters:
12097                 F1,F2 Two opposite faces for the hexahedral solid.
12098                 theName Object name; when specified, this parameter is used
12099                         for result publication in the study. Otherwise, if automatic
12100                         publication is switched on, default value is used for result name.
12101
12102             Returns:
12103                 New GEOM.GEOM_Object, containing the created solid.
12104
12105             Example of usage:
12106                 solid1 = geompy.MakeHexa2Faces(qface1, qface2)
12107             """
12108             # Example: see GEOM_Spanner.py
12109             anObj = self.BlocksOp.MakeHexa2Faces(F1, F2)
12110             RaiseIfFailed("MakeHexa2Faces", self.BlocksOp)
12111             self._autoPublish(anObj, theName, "hexa")
12112             return anObj
12113
12114         # end of l3_blocks
12115         ## @}
12116
12117         ## @addtogroup l3_blocks_op
12118         ## @{
12119
12120         ## Get a vertex, found in the given shape by its coordinates.
12121         #  @param theShape Block or a compound of blocks.
12122         #  @param theX,theY,theZ Coordinates of the sought vertex.
12123         #  @param theEpsilon Maximum allowed distance between the resulting
12124         #                    vertex and point with the given coordinates.
12125         #  @param theName Object name; when specified, this parameter is used
12126         #         for result publication in the study. Otherwise, if automatic
12127         #         publication is switched on, default value is used for result name.
12128         #
12129         #  @return New GEOM.GEOM_Object, containing the found vertex.
12130         #
12131         #  @ref swig_GetPoint "Example"
12132         @ManageTransactions("BlocksOp")
12133         def GetPoint(self, theShape, theX, theY, theZ, theEpsilon, theName=None):
12134             """
12135             Get a vertex, found in the given shape by its coordinates.
12136
12137             Parameters:
12138                 theShape Block or a compound of blocks.
12139                 theX,theY,theZ Coordinates of the sought vertex.
12140                 theEpsilon Maximum allowed distance between the resulting
12141                            vertex and point with the given coordinates.
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 vertex.
12148
12149             Example of usage:
12150                 pnt = geompy.GetPoint(shape, -50,  50,  50, 0.01)
12151             """
12152             # Example: see GEOM_TestOthers.py
12153             anObj = self.BlocksOp.GetPoint(theShape, theX, theY, theZ, theEpsilon)
12154             RaiseIfFailed("GetPoint", self.BlocksOp)
12155             self._autoPublish(anObj, theName, "vertex")
12156             return anObj
12157
12158         ## Find a vertex of the given shape, which has minimal distance to the given point.
12159         #  @param theShape Any shape.
12160         #  @param thePoint Point, close to the desired vertex.
12161         #  @param theName Object name; when specified, this parameter is used
12162         #         for result publication in the study. Otherwise, if automatic
12163         #         publication is switched on, default value is used for result name.
12164         #
12165         #  @return New GEOM.GEOM_Object, containing the found vertex.
12166         #
12167         #  @ref swig_GetVertexNearPoint "Example"
12168         @ManageTransactions("BlocksOp")
12169         def GetVertexNearPoint(self, theShape, thePoint, theName=None):
12170             """
12171             Find a vertex of the given shape, which has minimal distance to the given point.
12172
12173             Parameters:
12174                 theShape Any shape.
12175                 thePoint Point, close to the desired vertex.
12176                 theName Object name; when specified, this parameter is used
12177                         for result publication in the study. Otherwise, if automatic
12178                         publication is switched on, default value is used for result name.
12179
12180             Returns:
12181                 New GEOM.GEOM_Object, containing the found vertex.
12182
12183             Example of usage:
12184                 pmidle = geompy.MakeVertex(50, 0, 50)
12185                 edge1 = geompy.GetEdgeNearPoint(blocksComp, pmidle)
12186             """
12187             # Example: see GEOM_TestOthers.py
12188             anObj = self.BlocksOp.GetVertexNearPoint(theShape, thePoint)
12189             RaiseIfFailed("GetVertexNearPoint", self.BlocksOp)
12190             self._autoPublish(anObj, theName, "vertex")
12191             return anObj
12192
12193         ## Get an edge, found in the given shape by two given vertices.
12194         #  @param theShape Block or a compound of blocks.
12195         #  @param thePoint1,thePoint2 Points, close to the ends of the desired edge.
12196         #  @param theName Object name; when specified, this parameter is used
12197         #         for result publication in the study. Otherwise, if automatic
12198         #         publication is switched on, default value is used for result name.
12199         #
12200         #  @return New GEOM.GEOM_Object, containing the found edge.
12201         #
12202         #  @ref swig_GetEdge "Example"
12203         @ManageTransactions("BlocksOp")
12204         def GetEdge(self, theShape, thePoint1, thePoint2, theName=None):
12205             """
12206             Get an edge, found in the given shape by two given vertices.
12207
12208             Parameters:
12209                 theShape Block or a compound of blocks.
12210                 thePoint1,thePoint2 Points, close to the ends of the desired edge.
12211                 theName Object name; when specified, this parameter is used
12212                         for result publication in the study. Otherwise, if automatic
12213                         publication is switched on, default value is used for result name.
12214
12215             Returns:
12216                 New GEOM.GEOM_Object, containing the found edge.
12217             """
12218             # Example: see GEOM_Spanner.py
12219             anObj = self.BlocksOp.GetEdge(theShape, thePoint1, thePoint2)
12220             RaiseIfFailed("GetEdge", self.BlocksOp)
12221             self._autoPublish(anObj, theName, "edge")
12222             return anObj
12223
12224         ## Find an edge of the given shape, which has minimal distance to the given point.
12225         #  @param theShape Block or a compound of blocks.
12226         #  @param thePoint Point, close to the desired edge.
12227         #  @param theName Object name; when specified, this parameter is used
12228         #         for result publication in the study. Otherwise, if automatic
12229         #         publication is switched on, default value is used for result name.
12230         #
12231         #  @return New GEOM.GEOM_Object, containing the found edge.
12232         #
12233         #  @ref swig_GetEdgeNearPoint "Example"
12234         @ManageTransactions("BlocksOp")
12235         def GetEdgeNearPoint(self, theShape, thePoint, theName=None):
12236             """
12237             Find an edge of the given shape, which has minimal distance to the given point.
12238
12239             Parameters:
12240                 theShape Block or a compound of blocks.
12241                 thePoint Point, close to the desired edge.
12242                 theName Object name; when specified, this parameter is used
12243                         for result publication in the study. Otherwise, if automatic
12244                         publication is switched on, default value is used for result name.
12245
12246             Returns:
12247                 New GEOM.GEOM_Object, containing the found edge.
12248             """
12249             # Example: see GEOM_TestOthers.py
12250             anObj = self.BlocksOp.GetEdgeNearPoint(theShape, thePoint)
12251             RaiseIfFailed("GetEdgeNearPoint", self.BlocksOp)
12252             self._autoPublish(anObj, theName, "edge")
12253             return anObj
12254
12255         ## Returns a face, found in the given shape by four given corner vertices.
12256         #  @param theShape Block or a compound of blocks.
12257         #  @param thePoint1,thePoint2,thePoint3,thePoint4 Points, close to the corners of the desired face.
12258         #  @param theName Object name; when specified, this parameter is used
12259         #         for result publication in the study. Otherwise, if automatic
12260         #         publication is switched on, default value is used for result name.
12261         #
12262         #  @return New GEOM.GEOM_Object, containing the found face.
12263         #
12264         #  @ref swig_todo "Example"
12265         @ManageTransactions("BlocksOp")
12266         def GetFaceByPoints(self, theShape, thePoint1, thePoint2, thePoint3, thePoint4, theName=None):
12267             """
12268             Returns a face, found in the given shape by four given corner vertices.
12269
12270             Parameters:
12271                 theShape Block or a compound of blocks.
12272                 thePoint1,thePoint2,thePoint3,thePoint4 Points, close to the corners of the desired face.
12273                 theName Object name; when specified, this parameter is used
12274                         for result publication in the study. Otherwise, if automatic
12275                         publication is switched on, default value is used for result name.
12276
12277             Returns:
12278                 New GEOM.GEOM_Object, containing the found face.
12279             """
12280             # Example: see GEOM_Spanner.py
12281             anObj = self.BlocksOp.GetFaceByPoints(theShape, thePoint1, thePoint2, thePoint3, thePoint4)
12282             RaiseIfFailed("GetFaceByPoints", self.BlocksOp)
12283             self._autoPublish(anObj, theName, "face")
12284             return anObj
12285
12286         ## Get a face of block, found in the given shape by two given edges.
12287         #  @param theShape Block or a compound of blocks.
12288         #  @param theEdge1,theEdge2 Edges, close to the edges of the desired face.
12289         #  @param theName Object name; when specified, this parameter is used
12290         #         for result publication in the study. Otherwise, if automatic
12291         #         publication is switched on, default value is used for result name.
12292         #
12293         #  @return New GEOM.GEOM_Object, containing the found face.
12294         #
12295         #  @ref swig_todo "Example"
12296         @ManageTransactions("BlocksOp")
12297         def GetFaceByEdges(self, theShape, theEdge1, theEdge2, theName=None):
12298             """
12299             Get a face of block, found in the given shape by two given edges.
12300
12301             Parameters:
12302                 theShape Block or a compound of blocks.
12303                 theEdge1,theEdge2 Edges, close to the edges of the desired face.
12304                 theName Object name; when specified, this parameter is used
12305                         for result publication in the study. Otherwise, if automatic
12306                         publication is switched on, default value is used for result name.
12307
12308             Returns:
12309                 New GEOM.GEOM_Object, containing the found face.
12310             """
12311             # Example: see GEOM_Spanner.py
12312             anObj = self.BlocksOp.GetFaceByEdges(theShape, theEdge1, theEdge2)
12313             RaiseIfFailed("GetFaceByEdges", self.BlocksOp)
12314             self._autoPublish(anObj, theName, "face")
12315             return anObj
12316
12317         ## Find a face, opposite to the given one in the given block.
12318         #  @param theBlock Must be a hexahedral solid.
12319         #  @param theFace Face of \a theBlock, opposite to the desired face.
12320         #  @param theName Object name; when specified, this parameter is used
12321         #         for result publication in the study. Otherwise, if automatic
12322         #         publication is switched on, default value is used for result name.
12323         #
12324         #  @return New GEOM.GEOM_Object, containing the found face.
12325         #
12326         #  @ref swig_GetOppositeFace "Example"
12327         @ManageTransactions("BlocksOp")
12328         def GetOppositeFace(self, theBlock, theFace, theName=None):
12329             """
12330             Find a face, opposite to the given one in the given block.
12331
12332             Parameters:
12333                 theBlock Must be a hexahedral solid.
12334                 theFace Face of theBlock, opposite to the desired face.
12335                 theName Object name; when specified, this parameter is used
12336                         for result publication in the study. Otherwise, if automatic
12337                         publication is switched on, default value is used for result name.
12338
12339             Returns:
12340                 New GEOM.GEOM_Object, containing the found face.
12341             """
12342             # Example: see GEOM_Spanner.py
12343             anObj = self.BlocksOp.GetOppositeFace(theBlock, theFace)
12344             RaiseIfFailed("GetOppositeFace", self.BlocksOp)
12345             self._autoPublish(anObj, theName, "face")
12346             return anObj
12347
12348         ## Find a face of the given shape, which has minimal distance to the given point.
12349         #  @param theShape Block or a compound of blocks.
12350         #  @param thePoint Point, close to the desired face.
12351         #  @param theName Object name; when specified, this parameter is used
12352         #         for result publication in the study. Otherwise, if automatic
12353         #         publication is switched on, default value is used for result name.
12354         #
12355         #  @return New GEOM.GEOM_Object, containing the found face.
12356         #
12357         #  @ref swig_GetFaceNearPoint "Example"
12358         @ManageTransactions("BlocksOp")
12359         def GetFaceNearPoint(self, theShape, thePoint, theName=None):
12360             """
12361             Find a face of the given shape, which has minimal distance to the given point.
12362
12363             Parameters:
12364                 theShape Block or a compound of blocks.
12365                 thePoint Point, close to the desired face.
12366                 theName Object name; when specified, this parameter is used
12367                         for result publication in the study. Otherwise, if automatic
12368                         publication is switched on, default value is used for result name.
12369
12370             Returns:
12371                 New GEOM.GEOM_Object, containing the found face.
12372             """
12373             # Example: see GEOM_Spanner.py
12374             anObj = self.BlocksOp.GetFaceNearPoint(theShape, thePoint)
12375             RaiseIfFailed("GetFaceNearPoint", self.BlocksOp)
12376             self._autoPublish(anObj, theName, "face")
12377             return anObj
12378
12379         ## Find a face of block, whose outside normale has minimal angle with the given vector.
12380         #  @param theBlock Block or a compound of blocks.
12381         #  @param theVector Vector, close to the normale of the desired face.
12382         #  @param theName Object name; when specified, this parameter is used
12383         #         for result publication in the study. Otherwise, if automatic
12384         #         publication is switched on, default value is used for result name.
12385         #
12386         #  @return New GEOM.GEOM_Object, containing the found face.
12387         #
12388         #  @ref swig_todo "Example"
12389         @ManageTransactions("BlocksOp")
12390         def GetFaceByNormale(self, theBlock, theVector, theName=None):
12391             """
12392             Find a face of block, whose outside normale has minimal angle with the given vector.
12393
12394             Parameters:
12395                 theBlock Block or a compound of blocks.
12396                 theVector Vector, close to the normale of the desired face.
12397                 theName Object name; when specified, this parameter is used
12398                         for result publication in the study. Otherwise, if automatic
12399                         publication is switched on, default value is used for result name.
12400
12401             Returns:
12402                 New GEOM.GEOM_Object, containing the found face.
12403             """
12404             # Example: see GEOM_Spanner.py
12405             anObj = self.BlocksOp.GetFaceByNormale(theBlock, theVector)
12406             RaiseIfFailed("GetFaceByNormale", self.BlocksOp)
12407             self._autoPublish(anObj, theName, "face")
12408             return anObj
12409
12410         ## Find all sub-shapes of type \a theShapeType of the given shape,
12411         #  which have minimal distance to the given point.
12412         #  @param theShape Any shape.
12413         #  @param thePoint Point, close to the desired shape.
12414         #  @param theShapeType Defines what kind of sub-shapes is searched GEOM::shape_type
12415         #  @param theTolerance The tolerance for distances comparison. All shapes
12416         #                      with distances to the given point in interval
12417         #                      [minimal_distance, minimal_distance + theTolerance] will be gathered.
12418         #  @param theName Object name; when specified, this parameter is used
12419         #         for result publication in the study. Otherwise, if automatic
12420         #         publication is switched on, default value is used for result name.
12421         #
12422         #  @return New GEOM_Object, containing a group of all found shapes.
12423         #
12424         #  @ref swig_GetShapesNearPoint "Example"
12425         @ManageTransactions("BlocksOp")
12426         def GetShapesNearPoint(self, theShape, thePoint, theShapeType, theTolerance = 1e-07, theName=None):
12427             """
12428             Find all sub-shapes of type theShapeType of the given shape,
12429             which have minimal distance to the given point.
12430
12431             Parameters:
12432                 theShape Any shape.
12433                 thePoint Point, close to the desired shape.
12434                 theShapeType Defines what kind of sub-shapes is searched (see GEOM::shape_type)
12435                 theTolerance The tolerance for distances comparison. All shapes
12436                                 with distances to the given point in interval
12437                                 [minimal_distance, minimal_distance + theTolerance] will be gathered.
12438                 theName Object name; when specified, this parameter is used
12439                         for result publication in the study. Otherwise, if automatic
12440                         publication is switched on, default value is used for result name.
12441
12442             Returns:
12443                 New GEOM_Object, containing a group of all found shapes.
12444             """
12445             # Example: see GEOM_TestOthers.py
12446             anObj = self.BlocksOp.GetShapesNearPoint(theShape, thePoint, theShapeType, theTolerance)
12447             RaiseIfFailed("GetShapesNearPoint", self.BlocksOp)
12448             self._autoPublish(anObj, theName, "group")
12449             return anObj
12450
12451         # end of l3_blocks_op
12452         ## @}
12453
12454         ## @addtogroup l4_blocks_measure
12455         ## @{
12456
12457         ## Check, if the compound of blocks is given.
12458         #  To be considered as a compound of blocks, the
12459         #  given shape must satisfy the following conditions:
12460         #  - Each element of the compound should be a Block (6 faces).
12461         #  - Each face should be a quadrangle, i.e. it should have only 1 wire
12462         #       with 4 edges. If <VAR>theIsUseC1</VAR> is set to True and
12463         #       there are more than 4 edges in the only wire of a face,
12464         #       this face is considered to be quadrangle if it has 4 bounds
12465         #       (1 or more edge) of C1 continuity.
12466         #  - A connection between two Blocks should be an entire quadrangle face or an entire edge.
12467         #  - The compound should be connexe.
12468         #  - The glue between two quadrangle faces should be applied.
12469         #  @param theCompound The compound to check.
12470         #  @param theIsUseC1 Flag to check if there are 4 bounds on a face
12471         #         taking into account C1 continuity.
12472         #  @param theAngTolerance the angular tolerance to check if two neighbor
12473         #         edges are codirectional in the common vertex with this
12474         #         tolerance. This parameter is used only if
12475         #         <VAR>theIsUseC1</VAR> is set to True.
12476         #  @return TRUE, if the given shape is a compound of blocks.
12477         #  If theCompound is not valid, prints all discovered errors.
12478         #
12479         #  @ref tui_check_compound_of_blocks_page "Example 1"
12480         #  \n @ref swig_CheckCompoundOfBlocks "Example 2"
12481         @ManageTransactions("BlocksOp")
12482         def CheckCompoundOfBlocks(self,theCompound, theIsUseC1 = False,
12483                                   theAngTolerance = 1.e-12):
12484             """
12485             Check, if the compound of blocks is given.
12486             To be considered as a compound of blocks, the
12487             given shape must satisfy the following conditions:
12488             - Each element of the compound should be a Block (6 faces).
12489             - Each face should be a quadrangle, i.e. it should have only 1 wire
12490                  with 4 edges. If theIsUseC1 is set to True and
12491                  there are more than 4 edges in the only wire of a face,
12492                  this face is considered to be quadrangle if it has 4 bounds
12493                  (1 or more edge) of C1 continuity.
12494             - A connection between two Blocks should be an entire quadrangle face or an entire edge.
12495             - The compound should be connexe.
12496             - The glue between two quadrangle faces should be applied.
12497
12498             Parameters:
12499                 theCompound The compound to check.
12500                 theIsUseC1 Flag to check if there are 4 bounds on a face
12501                            taking into account C1 continuity.
12502                 theAngTolerance the angular tolerance to check if two neighbor
12503                            edges are codirectional in the common vertex with this
12504                            tolerance. This parameter is used only if
12505                            theIsUseC1 is set to True.
12506
12507             Returns:
12508                 TRUE, if the given shape is a compound of blocks.
12509                 If theCompound is not valid, prints all discovered errors.
12510             """
12511             # Example: see GEOM_Spanner.py
12512             aTolerance = -1.0
12513             if theIsUseC1:
12514                 aTolerance = theAngTolerance
12515             (IsValid, BCErrors) = self.BlocksOp.CheckCompoundOfBlocks(theCompound, aTolerance)
12516             RaiseIfFailed("CheckCompoundOfBlocks", self.BlocksOp)
12517             if IsValid == 0:
12518                 Descr = self.BlocksOp.PrintBCErrors(theCompound, BCErrors)
12519                 print(Descr)
12520             return IsValid
12521
12522         ## Retrieve all non blocks solids and faces from \a theShape.
12523         #  @param theShape The shape to explore.
12524         #  @param theIsUseC1 Flag to check if there are 4 bounds on a face
12525         #         taking into account C1 continuity.
12526         #  @param theAngTolerance the angular tolerance to check if two neighbor
12527         #         edges are codirectional in the common vertex with this
12528         #         tolerance. This parameter is used only if
12529         #         <VAR>theIsUseC1</VAR> is set to True.
12530         #  @param theName Object name; when specified, this parameter is used
12531         #         for result publication in the study. Otherwise, if automatic
12532         #         publication is switched on, default value is used for result name.
12533         #
12534         #  @return A tuple of two GEOM_Objects. The first object is a group of all
12535         #          non block solids (= not 6 faces, or with 6 faces, but with the
12536         #          presence of non-quadrangular faces). The second object is a
12537         #          group of all non quadrangular faces (= faces with more then
12538         #          1 wire or, if <VAR>theIsUseC1</VAR> is set to True, faces
12539         #          with 1 wire with not 4 edges that do not form 4 bounds of
12540         #          C1 continuity).
12541         #
12542         #  @ref tui_get_non_blocks_page "Example 1"
12543         #  \n @ref swig_GetNonBlocks "Example 2"
12544         @ManageTransactions("BlocksOp")
12545         def GetNonBlocks (self, theShape, theIsUseC1 = False,
12546                           theAngTolerance = 1.e-12, theName=None):
12547             """
12548             Retrieve all non blocks solids and faces from theShape.
12549
12550             Parameters:
12551                 theShape The shape to explore.
12552                 theIsUseC1 Flag to check if there are 4 bounds on a face
12553                            taking into account C1 continuity.
12554                 theAngTolerance the angular tolerance to check if two neighbor
12555                            edges are codirectional in the common vertex with this
12556                            tolerance. This parameter is used only if
12557                            theIsUseC1 is set to True.
12558                 theName Object name; when specified, this parameter is used
12559                         for result publication in the study. Otherwise, if automatic
12560                         publication is switched on, default value is used for result name.
12561
12562             Returns:
12563                 A tuple of two GEOM_Objects. The first object is a group of all
12564                 non block solids (= not 6 faces, or with 6 faces, but with the
12565                 presence of non-quadrangular faces). The second object is a
12566                 group of all non quadrangular faces (= faces with more then
12567                 1 wire or, if <VAR>theIsUseC1</VAR> is set to True, faces
12568                 with 1 wire with not 4 edges that do not form 4 bounds of
12569                 C1 continuity).
12570
12571             Usage:
12572                 (res_sols, res_faces) = geompy.GetNonBlocks(myShape1)
12573             """
12574             # Example: see GEOM_Spanner.py
12575             aTolerance = -1.0
12576             if theIsUseC1:
12577                 aTolerance = theAngTolerance
12578             aTuple = self.BlocksOp.GetNonBlocks(theShape, aTolerance)
12579             RaiseIfFailed("GetNonBlocks", self.BlocksOp)
12580             self._autoPublish(aTuple, theName, ("groupNonHexas", "groupNonQuads"))
12581             return aTuple
12582
12583         ## Remove all seam and degenerated edges from \a theShape.
12584         #  Unite faces and edges, sharing one surface. It means that
12585         #  this faces must have references to one C++ surface object (handle).
12586         #  @param theShape The compound or single solid to remove irregular edges from.
12587         #  @param doUnionFaces If True, then unite faces. If False (the default value),
12588         #         do not unite faces.
12589         #  @param theName Object name; when specified, this parameter is used
12590         #         for result publication in the study. Otherwise, if automatic
12591         #         publication is switched on, default value is used for result name.
12592         #
12593         #  @return Improved shape.
12594         #
12595         #  @ref swig_RemoveExtraEdges "Example"
12596         @ManageTransactions("BlocksOp")
12597         def RemoveExtraEdges(self, theShape, doUnionFaces=False, theName=None):
12598             """
12599             Remove all seam and degenerated edges from theShape.
12600             Unite faces and edges, sharing one surface. It means that
12601             this faces must have references to one C++ surface object (handle).
12602
12603             Parameters:
12604                 theShape The compound or single solid to remove irregular edges from.
12605                 doUnionFaces If True, then unite faces. If False (the default value),
12606                              do not unite faces.
12607                 theName Object name; when specified, this parameter is used
12608                         for result publication in the study. Otherwise, if automatic
12609                         publication is switched on, default value is used for result name.
12610
12611             Returns:
12612                 Improved shape.
12613             """
12614             # Example: see GEOM_TestOthers.py
12615             nbFacesOptimum = -1 # -1 means do not unite faces
12616             if doUnionFaces is True: nbFacesOptimum = 0 # 0 means unite faces
12617             anObj = self.BlocksOp.RemoveExtraEdges(theShape, nbFacesOptimum)
12618             RaiseIfFailed("RemoveExtraEdges", self.BlocksOp)
12619             self._autoPublish(anObj, theName, "removeExtraEdges")
12620             return anObj
12621
12622         ## Performs union faces of \a theShape
12623         #  Unite faces sharing one surface. It means that
12624         #  these faces must have references to one C++ surface object (handle).
12625         #  @param theShape The compound or single solid that contains faces
12626         #         to perform union.
12627         #  @param theName Object name; when specified, this parameter is used
12628         #         for result publication in the study. Otherwise, if automatic
12629         #         publication is switched on, default value is used for result name.
12630         #
12631         #  @return Improved shape.
12632         #
12633         #  @ref swig_UnionFaces "Example"
12634         @ManageTransactions("BlocksOp")
12635         def UnionFaces(self, theShape, theName=None):
12636             """
12637             Performs union faces of theShape.
12638             Unite faces sharing one surface. It means that
12639             these faces must have references to one C++ surface object (handle).
12640
12641             Parameters:
12642                 theShape The compound or single solid that contains faces
12643                          to perform union.
12644                 theName Object name; when specified, this parameter is used
12645                         for result publication in the study. Otherwise, if automatic
12646                         publication is switched on, default value is used for result name.
12647
12648             Returns:
12649                 Improved shape.
12650             """
12651             # Example: see GEOM_TestOthers.py
12652             anObj = self.BlocksOp.UnionFaces(theShape)
12653             RaiseIfFailed("UnionFaces", self.BlocksOp)
12654             self._autoPublish(anObj, theName, "unionFaces")
12655             return anObj
12656
12657         ## Check, if the given shape is a blocks compound.
12658         #  Fix all detected errors.
12659         #    \note Single block can be also fixed by this method.
12660         #  @param theShape The compound to check and improve.
12661         #  @param 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         #  @return Improved compound.
12666         #
12667         #  @ref swig_CheckAndImprove "Example"
12668         @ManageTransactions("BlocksOp")
12669         def CheckAndImprove(self, theShape, theName=None):
12670             """
12671             Check, if the given shape is a blocks compound.
12672             Fix all detected errors.
12673
12674             Note:
12675                 Single block can be also fixed by this method.
12676
12677             Parameters:
12678                 theShape The compound to check and improve.
12679                 theName Object name; when specified, this parameter is used
12680                         for result publication in the study. Otherwise, if automatic
12681                         publication is switched on, default value is used for result name.
12682
12683             Returns:
12684                 Improved compound.
12685             """
12686             # Example: see GEOM_TestOthers.py
12687             anObj = self.BlocksOp.CheckAndImprove(theShape)
12688             RaiseIfFailed("CheckAndImprove", self.BlocksOp)
12689             self._autoPublish(anObj, theName, "improved")
12690             return anObj
12691
12692         # end of l4_blocks_measure
12693         ## @}
12694
12695         ## @addtogroup l3_blocks_op
12696         ## @{
12697
12698         ## Get all the blocks, contained in the given compound.
12699         #  @param theCompound The compound to explode.
12700         #  @param theMinNbFaces If solid has lower number of faces, it is not a block.
12701         #  @param theMaxNbFaces If solid has higher number of faces, it is not a block.
12702         #  @param theName Object name; when specified, this parameter is used
12703         #         for result publication in the study. Otherwise, if automatic
12704         #         publication is switched on, default value is used for result name.
12705         #
12706         #  @note If theMaxNbFaces = 0, the maximum number of faces is not restricted.
12707         #
12708         #  @return List of GEOM.GEOM_Object, containing the retrieved blocks.
12709         #
12710         #  @ref tui_explode_on_blocks "Example 1"
12711         #  \n @ref swig_MakeBlockExplode "Example 2"
12712         @ManageTransactions("BlocksOp")
12713         def MakeBlockExplode(self, theCompound, theMinNbFaces, theMaxNbFaces, theName=None):
12714             """
12715             Get all the blocks, contained in the given compound.
12716
12717             Parameters:
12718                 theCompound The compound to explode.
12719                 theMinNbFaces If solid has lower number of faces, it is not a block.
12720                 theMaxNbFaces If solid has higher number of faces, it is not a block.
12721                 theName Object name; when specified, this parameter is used
12722                         for result publication in the study. Otherwise, if automatic
12723                         publication is switched on, default value is used for result name.
12724
12725             Note:
12726                 If theMaxNbFaces = 0, the maximum number of faces is not restricted.
12727
12728             Returns:
12729                 List of GEOM.GEOM_Object, containing the retrieved blocks.
12730             """
12731             # Example: see GEOM_TestOthers.py
12732             theMinNbFaces,theMaxNbFaces,Parameters = ParseParameters(theMinNbFaces,theMaxNbFaces)
12733             aList = self.BlocksOp.ExplodeCompoundOfBlocks(theCompound, theMinNbFaces, theMaxNbFaces)
12734             RaiseIfFailed("ExplodeCompoundOfBlocks", self.BlocksOp)
12735             for anObj in aList:
12736                 anObj.SetParameters(Parameters)
12737                 pass
12738             self._autoPublish(aList, theName, "block")
12739             return aList
12740
12741         ## Find block, containing the given point inside its volume or on boundary.
12742         #  @param theCompound Compound, to find block in.
12743         #  @param thePoint Point, close to the desired block. If the point lays on
12744         #         boundary between some blocks, we return block with nearest center.
12745         #  @param theName Object name; when specified, this parameter is used
12746         #         for result publication in the study. Otherwise, if automatic
12747         #         publication is switched on, default value is used for result name.
12748         #
12749         #  @return New GEOM.GEOM_Object, containing the found block.
12750         #
12751         #  @ref swig_todo "Example"
12752         @ManageTransactions("BlocksOp")
12753         def GetBlockNearPoint(self, theCompound, thePoint, theName=None):
12754             """
12755             Find block, containing the given point inside its volume or on boundary.
12756
12757             Parameters:
12758                 theCompound Compound, to find block in.
12759                 thePoint Point, close to the desired block. If the point lays on
12760                          boundary between some blocks, we return block with nearest center.
12761                 theName Object name; when specified, this parameter is used
12762                         for result publication in the study. Otherwise, if automatic
12763                         publication is switched on, default value is used for result name.
12764
12765             Returns:
12766                 New GEOM.GEOM_Object, containing the found block.
12767             """
12768             # Example: see GEOM_Spanner.py
12769             anObj = self.BlocksOp.GetBlockNearPoint(theCompound, thePoint)
12770             RaiseIfFailed("GetBlockNearPoint", self.BlocksOp)
12771             self._autoPublish(anObj, theName, "block")
12772             return anObj
12773
12774         ## Find block, containing all the elements, passed as the parts, or maximum quantity of them.
12775         #  @param theCompound Compound, to find block in.
12776         #  @param theParts List of faces and/or edges and/or vertices to be parts of the found block.
12777         #  @param theName Object name; when specified, this parameter is used
12778         #         for result publication in the study. Otherwise, if automatic
12779         #         publication is switched on, default value is used for result name.
12780         #
12781         #  @return New GEOM.GEOM_Object, containing the found block.
12782         #
12783         #  @ref swig_GetBlockByParts "Example"
12784         @ManageTransactions("BlocksOp")
12785         def GetBlockByParts(self, theCompound, theParts, theName=None):
12786             """
12787              Find block, containing all the elements, passed as the parts, or maximum quantity of them.
12788
12789              Parameters:
12790                 theCompound Compound, to find block in.
12791                 theParts List of faces and/or edges and/or vertices to be parts of the found block.
12792                 theName Object name; when specified, this parameter is used
12793                         for result publication in the study. Otherwise, if automatic
12794                         publication is switched on, default value is used for result name.
12795
12796             Returns:
12797                 New GEOM_Object, containing the found block.
12798             """
12799             # Example: see GEOM_TestOthers.py
12800             anObj = self.BlocksOp.GetBlockByParts(theCompound, theParts)
12801             RaiseIfFailed("GetBlockByParts", self.BlocksOp)
12802             self._autoPublish(anObj, theName, "block")
12803             return anObj
12804
12805         ## Return all blocks, containing all the elements, passed as the parts.
12806         #  @param theCompound Compound, to find blocks in.
12807         #  @param theParts List of faces and/or edges and/or vertices to be parts of the found blocks.
12808         #  @param theName Object name; when specified, this parameter is used
12809         #         for result publication in the study. Otherwise, if automatic
12810         #         publication is switched on, default value is used for result name.
12811         #
12812         #  @return List of GEOM.GEOM_Object, containing the found blocks.
12813         #
12814         #  @ref swig_todo "Example"
12815         @ManageTransactions("BlocksOp")
12816         def GetBlocksByParts(self, theCompound, theParts, theName=None):
12817             """
12818             Return all blocks, containing all the elements, passed as the parts.
12819
12820             Parameters:
12821                 theCompound Compound, to find blocks in.
12822                 theParts List of faces and/or edges and/or vertices to be parts of the found blocks.
12823                 theName Object name; when specified, this parameter is used
12824                         for result publication in the study. Otherwise, if automatic
12825                         publication is switched on, default value is used for result name.
12826
12827             Returns:
12828                 List of GEOM.GEOM_Object, containing the found blocks.
12829             """
12830             # Example: see GEOM_Spanner.py
12831             aList = self.BlocksOp.GetBlocksByParts(theCompound, theParts)
12832             RaiseIfFailed("GetBlocksByParts", self.BlocksOp)
12833             self._autoPublish(aList, theName, "block")
12834             return aList
12835
12836         ## Multi-transformate block and glue the result.
12837         #  Transformation is defined so, as to superpose direction faces.
12838         #  @param Block Hexahedral solid to be multi-transformed.
12839         #  @param DirFace1 ID of First direction face.
12840         #  @param DirFace2 ID of Second direction face.
12841         #  @param NbTimes Quantity of transformations to be done.
12842         #  @param theName Object name; when specified, this parameter is used
12843         #         for result publication in the study. Otherwise, if automatic
12844         #         publication is switched on, default value is used for result name.
12845         #
12846         #  @note Unique ID of sub-shape can be obtained, using method GetSubShapeID().
12847         #
12848         #  @return New GEOM.GEOM_Object, containing the result shape.
12849         #
12850         #  @ref tui_multi_transformation "Example"
12851         @ManageTransactions("BlocksOp")
12852         def MakeMultiTransformation1D(self, Block, DirFace1, DirFace2, NbTimes, theName=None):
12853             """
12854             Multi-transformate block and glue the result.
12855             Transformation is defined so, as to superpose direction faces.
12856
12857             Parameters:
12858                 Block Hexahedral solid to be multi-transformed.
12859                 DirFace1 ID of First direction face.
12860                 DirFace2 ID of Second direction face.
12861                 NbTimes Quantity of transformations to be done.
12862                 theName Object name; when specified, this parameter is used
12863                         for result publication in the study. Otherwise, if automatic
12864                         publication is switched on, default value is used for result name.
12865
12866             Note:
12867                 Unique ID of sub-shape can be obtained, using method GetSubShapeID().
12868
12869             Returns:
12870                 New GEOM.GEOM_Object, containing the result shape.
12871             """
12872             # Example: see GEOM_Spanner.py
12873             DirFace1,DirFace2,NbTimes,Parameters = ParseParameters(DirFace1,DirFace2,NbTimes)
12874             anObj = self.BlocksOp.MakeMultiTransformation1D(Block, DirFace1, DirFace2, NbTimes)
12875             RaiseIfFailed("MakeMultiTransformation1D", self.BlocksOp)
12876             anObj.SetParameters(Parameters)
12877             self._autoPublish(anObj, theName, "transformed")
12878             return anObj
12879
12880         ## Multi-transformate block and glue the result.
12881         #  @param Block Hexahedral solid to be multi-transformed.
12882         #  @param DirFace1U,DirFace2U IDs of Direction faces for the first transformation.
12883         #  @param DirFace1V,DirFace2V IDs of Direction faces for the second transformation.
12884         #  @param NbTimesU,NbTimesV Quantity of transformations to be done.
12885         #  @param theName Object name; when specified, this parameter is used
12886         #         for result publication in the study. Otherwise, if automatic
12887         #         publication is switched on, default value is used for result name.
12888         #
12889         #  @return New GEOM.GEOM_Object, containing the result shape.
12890         #
12891         #  @ref tui_multi_transformation "Example"
12892         @ManageTransactions("BlocksOp")
12893         def MakeMultiTransformation2D(self, Block, DirFace1U, DirFace2U, NbTimesU,
12894                                       DirFace1V, DirFace2V, NbTimesV, theName=None):
12895             """
12896             Multi-transformate block and glue the result.
12897
12898             Parameters:
12899                 Block Hexahedral solid to be multi-transformed.
12900                 DirFace1U,DirFace2U IDs of Direction faces for the first transformation.
12901                 DirFace1V,DirFace2V IDs of Direction faces for the second transformation.
12902                 NbTimesU,NbTimesV Quantity of transformations to be done.
12903                 theName Object name; when specified, this parameter is used
12904                         for result publication in the study. Otherwise, if automatic
12905                         publication is switched on, default value is used for result name.
12906
12907             Returns:
12908                 New GEOM.GEOM_Object, containing the result shape.
12909             """
12910             # Example: see GEOM_Spanner.py
12911             DirFace1U,DirFace2U,NbTimesU,DirFace1V,DirFace2V,NbTimesV,Parameters = ParseParameters(
12912               DirFace1U,DirFace2U,NbTimesU,DirFace1V,DirFace2V,NbTimesV)
12913             anObj = self.BlocksOp.MakeMultiTransformation2D(Block, DirFace1U, DirFace2U, NbTimesU,
12914                                                             DirFace1V, DirFace2V, NbTimesV)
12915             RaiseIfFailed("MakeMultiTransformation2D", self.BlocksOp)
12916             anObj.SetParameters(Parameters)
12917             self._autoPublish(anObj, theName, "transformed")
12918             return anObj
12919
12920         ## Build all possible propagation groups.
12921         #  Propagation group is a set of all edges, opposite to one (main)
12922         #  edge of this group directly or through other opposite edges.
12923         #  Notion of Opposite Edge make sense only on quadrangle face.
12924         #  @param theShape Shape to build propagation groups on.
12925         #  @param theName Object name; when specified, this parameter is used
12926         #         for result publication in the study. Otherwise, if automatic
12927         #         publication is switched on, default value is used for result name.
12928         #
12929         #  @return List of GEOM.GEOM_Object, each of them is a propagation group.
12930         #
12931         #  @ref swig_Propagate "Example"
12932         @ManageTransactions("BlocksOp")
12933         def Propagate(self, theShape, theName=None):
12934             """
12935             Build all possible propagation groups.
12936             Propagation group is a set of all edges, opposite to one (main)
12937             edge of this group directly or through other opposite edges.
12938             Notion of Opposite Edge make sense only on quadrangle face.
12939
12940             Parameters:
12941                 theShape Shape to build propagation groups on.
12942                 theName Object name; when specified, this parameter is used
12943                         for result publication in the study. Otherwise, if automatic
12944                         publication is switched on, default value is used for result name.
12945
12946             Returns:
12947                 List of GEOM.GEOM_Object, each of them is a propagation group.
12948             """
12949             # Example: see GEOM_TestOthers.py
12950             listChains = self.BlocksOp.Propagate(theShape)
12951             RaiseIfFailed("Propagate", self.BlocksOp)
12952             self._autoPublish(listChains, theName, "propagate")
12953             return listChains
12954
12955         # end of l3_blocks_op
12956         ## @}
12957
12958         ## @addtogroup l3_groups
12959         ## @{
12960
12961         ## Creates a new group which will store sub-shapes of theMainShape
12962         #  @param theMainShape is a GEOM object on which the group is selected
12963         #  @param theShapeType defines a shape type of the group (see GEOM::shape_type)
12964         #  @param theName Object name; when specified, this parameter is used
12965         #         for result publication in the study. Otherwise, if automatic
12966         #         publication is switched on, default value is used for result name.
12967         #
12968         #  @return a newly created GEOM group (GEOM.GEOM_Object)
12969         #
12970         #  @ref tui_working_with_groups_page "Example 1"
12971         #  \n @ref swig_CreateGroup "Example 2"
12972         @ManageTransactions("GroupOp")
12973         def CreateGroup(self, theMainShape, theShapeType, theName=None):
12974             """
12975             Creates a new group which will store sub-shapes of theMainShape
12976
12977             Parameters:
12978                theMainShape is a GEOM object on which the group is selected
12979                theShapeType defines a shape type of the group:"COMPOUND", "COMPSOLID",
12980                             "SOLID", "SHELL", "FACE", "WIRE", "EDGE", "VERTEX", "SHAPE".
12981                 theName Object name; when specified, this parameter is used
12982                         for result publication in the study. Otherwise, if automatic
12983                         publication is switched on, default value is used for result name.
12984
12985             Returns:
12986                a newly created GEOM group
12987
12988             Example of usage:
12989                 group = geompy.CreateGroup(Box, geompy.ShapeType["FACE"])
12990
12991             """
12992             # Example: see GEOM_TestOthers.py
12993             anObj = self.GroupOp.CreateGroup(theMainShape, theShapeType)
12994             RaiseIfFailed("CreateGroup", self.GroupOp)
12995             self._autoPublish(anObj, theName, "group")
12996             return anObj
12997
12998         ## Adds a sub-object with ID theSubShapeId to the group
12999         #  @param theGroup is a GEOM group to which the new sub-shape is added
13000         #  @param theSubShapeID is a sub-shape ID in the main object.
13001         #  \note Use method GetSubShapeID() to get an unique ID of the sub-shape
13002         #
13003         #  @ref tui_working_with_groups_page "Example"
13004         @ManageTransactions("GroupOp")
13005         def AddObject(self,theGroup, theSubShapeID):
13006             """
13007             Adds a sub-object with ID theSubShapeId to the group
13008
13009             Parameters:
13010                 theGroup       is a GEOM group to which the new sub-shape is added
13011                 theSubShapeID  is a sub-shape ID in the main object.
13012
13013             Note:
13014                 Use method GetSubShapeID() to get an unique ID of the sub-shape
13015             """
13016             # Example: see GEOM_TestOthers.py
13017             self.GroupOp.AddObject(theGroup, theSubShapeID)
13018             if self.GroupOp.GetErrorCode() != "PAL_ELEMENT_ALREADY_PRESENT":
13019                 RaiseIfFailed("AddObject", self.GroupOp)
13020                 pass
13021             pass
13022
13023         ## Removes a sub-object with ID \a theSubShapeId from the group
13024         #  @param theGroup is a GEOM group from which the new sub-shape is removed
13025         #  @param theSubShapeID is a sub-shape ID in the main object.
13026         #  \note Use method GetSubShapeID() to get an unique ID of the sub-shape
13027         #
13028         #  @ref tui_working_with_groups_page "Example"
13029         @ManageTransactions("GroupOp")
13030         def RemoveObject(self,theGroup, theSubShapeID):
13031             """
13032             Removes a sub-object with ID theSubShapeId from the group
13033
13034             Parameters:
13035                 theGroup is a GEOM group from which the new sub-shape is removed
13036                 theSubShapeID is a sub-shape ID in the main object.
13037
13038             Note:
13039                 Use method GetSubShapeID() to get an unique ID of the sub-shape
13040             """
13041             # Example: see GEOM_TestOthers.py
13042             self.GroupOp.RemoveObject(theGroup, theSubShapeID)
13043             RaiseIfFailed("RemoveObject", self.GroupOp)
13044             pass
13045
13046         ## Adds to the group all the given shapes. No errors, if some shapes are already included.
13047         #  @param theGroup is a GEOM group to which the new sub-shapes are added.
13048         #  @param theSubShapes is a list of sub-shapes to be added.
13049         #
13050         #  @ref tui_working_with_groups_page "Example"
13051         @ManageTransactions("GroupOp")
13052         def UnionList (self,theGroup, theSubShapes):
13053             """
13054             Adds to the group all the given shapes. No errors, if some shapes are already included.
13055
13056             Parameters:
13057                 theGroup is a GEOM group to which the new sub-shapes are added.
13058                 theSubShapes is a list of sub-shapes to be added.
13059             """
13060             # Example: see GEOM_TestOthers.py
13061             self.GroupOp.UnionList(theGroup, theSubShapes)
13062             RaiseIfFailed("UnionList", self.GroupOp)
13063             pass
13064
13065         ## Adds to the group all the given shapes. No errors, if some shapes are already included.
13066         #  @param theGroup is a GEOM group to which the new sub-shapes are added.
13067         #  @param theSubShapes is a list of indices of sub-shapes to be added.
13068         #
13069         #  @ref swig_UnionIDs "Example"
13070         @ManageTransactions("GroupOp")
13071         def UnionIDs(self,theGroup, theSubShapes):
13072             """
13073             Adds to the group all the given shapes. No errors, if some shapes are already included.
13074
13075             Parameters:
13076                 theGroup is a GEOM group to which the new sub-shapes are added.
13077                 theSubShapes is a list of indices of sub-shapes to be added.
13078             """
13079             # Example: see GEOM_TestOthers.py
13080             self.GroupOp.UnionIDs(theGroup, theSubShapes)
13081             RaiseIfFailed("UnionIDs", self.GroupOp)
13082             pass
13083
13084         ## Removes from the group all the given shapes. No errors, if some shapes are not included.
13085         #  @param theGroup is a GEOM group from which the sub-shapes are removed.
13086         #  @param theSubShapes is a list of sub-shapes to be removed.
13087         #
13088         #  @ref tui_working_with_groups_page "Example"
13089         @ManageTransactions("GroupOp")
13090         def DifferenceList (self,theGroup, theSubShapes):
13091             """
13092             Removes from the group all the given shapes. No errors, if some shapes are not included.
13093
13094             Parameters:
13095                 theGroup is a GEOM group from which the sub-shapes are removed.
13096                 theSubShapes is a list of sub-shapes to be removed.
13097             """
13098             # Example: see GEOM_TestOthers.py
13099             self.GroupOp.DifferenceList(theGroup, theSubShapes)
13100             RaiseIfFailed("DifferenceList", self.GroupOp)
13101             pass
13102
13103         ## Removes from the group all the given shapes. No errors, if some shapes are not included.
13104         #  @param theGroup is a GEOM group from which the sub-shapes are removed.
13105         #  @param theSubShapes is a list of indices of sub-shapes to be removed.
13106         #
13107         #  @ref swig_DifferenceIDs "Example"
13108         @ManageTransactions("GroupOp")
13109         def DifferenceIDs(self,theGroup, theSubShapes):
13110             """
13111             Removes from the group all the given shapes. No errors, if some shapes are not included.
13112
13113             Parameters:
13114                 theGroup is a GEOM group from which the sub-shapes are removed.
13115                 theSubShapes is a list of indices of sub-shapes to be removed.
13116             """
13117             # Example: see GEOM_TestOthers.py
13118             self.GroupOp.DifferenceIDs(theGroup, theSubShapes)
13119             RaiseIfFailed("DifferenceIDs", self.GroupOp)
13120             pass
13121
13122         ## Union of two groups.
13123         #  New group is created. It will contain all entities
13124         #  which are present in groups theGroup1 and theGroup2.
13125         #  @param theGroup1, theGroup2 are the initial GEOM groups
13126         #                              to create the united group from.
13127         #  @param theName Object name; when specified, this parameter is used
13128         #         for result publication in the study. Otherwise, if automatic
13129         #         publication is switched on, default value is used for result name.
13130         #
13131         #  @return a newly created GEOM group.
13132         #
13133         #  @ref tui_union_groups_anchor "Example"
13134         @ManageTransactions("GroupOp")
13135         def UnionGroups (self, theGroup1, theGroup2, theName=None):
13136             """
13137             Union of two groups.
13138             New group is created. It will contain all entities
13139             which are present in groups theGroup1 and theGroup2.
13140
13141             Parameters:
13142                 theGroup1, theGroup2 are the initial GEOM groups
13143                                      to create the united group from.
13144                 theName Object name; when specified, this parameter is used
13145                         for result publication in the study. Otherwise, if automatic
13146                         publication is switched on, default value is used for result name.
13147
13148             Returns:
13149                 a newly created GEOM group.
13150             """
13151             # Example: see GEOM_TestOthers.py
13152             aGroup = self.GroupOp.UnionGroups(theGroup1, theGroup2)
13153             RaiseIfFailed("UnionGroups", self.GroupOp)
13154             self._autoPublish(aGroup, theName, "group")
13155             return aGroup
13156
13157         ## Intersection of two groups.
13158         #  New group is created. It will contain only those entities
13159         #  which are present in both groups theGroup1 and theGroup2.
13160         #  @param theGroup1, theGroup2 are the initial GEOM groups to get common part of.
13161         #  @param theName Object name; when specified, this parameter is used
13162         #         for result publication in the study. Otherwise, if automatic
13163         #         publication is switched on, default value is used for result name.
13164         #
13165         #  @return a newly created GEOM group.
13166         #
13167         #  @ref tui_intersect_groups_anchor "Example"
13168         @ManageTransactions("GroupOp")
13169         def IntersectGroups (self, theGroup1, theGroup2, theName=None):
13170             """
13171             Intersection of two groups.
13172             New group is created. It will contain only those entities
13173             which are present in both groups theGroup1 and theGroup2.
13174
13175             Parameters:
13176                 theGroup1, theGroup2 are the initial GEOM groups to get common part of.
13177                 theName Object name; when specified, this parameter is used
13178                         for result publication in the study. Otherwise, if automatic
13179                         publication is switched on, default value is used for result name.
13180
13181             Returns:
13182                 a newly created GEOM group.
13183             """
13184             # Example: see GEOM_TestOthers.py
13185             aGroup = self.GroupOp.IntersectGroups(theGroup1, theGroup2)
13186             RaiseIfFailed("IntersectGroups", self.GroupOp)
13187             self._autoPublish(aGroup, theName, "group")
13188             return aGroup
13189
13190         ## Cut of two groups.
13191         #  New group is created. It will contain entities which are
13192         #  present in group theGroup1 but are not present in group theGroup2.
13193         #  @param theGroup1 is a GEOM group to include elements of.
13194         #  @param theGroup2 is a GEOM group to exclude elements of.
13195         #  @param theName Object name; when specified, this parameter is used
13196         #         for result publication in the study. Otherwise, if automatic
13197         #         publication is switched on, default value is used for result name.
13198         #
13199         #  @return a newly created GEOM group.
13200         #
13201         #  @ref tui_cut_groups_anchor "Example"
13202         @ManageTransactions("GroupOp")
13203         def CutGroups (self, theGroup1, theGroup2, theName=None):
13204             """
13205             Cut of two groups.
13206             New group is created. It will contain entities which are
13207             present in group theGroup1 but are not present in group theGroup2.
13208
13209             Parameters:
13210                 theGroup1 is a GEOM group to include elements of.
13211                 theGroup2 is a GEOM group to exclude elements of.
13212                 theName Object name; when specified, this parameter is used
13213                         for result publication in the study. Otherwise, if automatic
13214                         publication is switched on, default value is used for result name.
13215
13216             Returns:
13217                 a newly created GEOM group.
13218             """
13219             # Example: see GEOM_TestOthers.py
13220             aGroup = self.GroupOp.CutGroups(theGroup1, theGroup2)
13221             RaiseIfFailed("CutGroups", self.GroupOp)
13222             self._autoPublish(aGroup, theName, "group")
13223             return aGroup
13224
13225         ## Union of list of groups.
13226         #  New group is created. It will contain all entities that are
13227         #  present in groups listed in theGList.
13228         #  @param theGList is a list of GEOM groups to create the united group from.
13229         #  @param theName Object name; when specified, this parameter is used
13230         #         for result publication in the study. Otherwise, if automatic
13231         #         publication is switched on, default value is used for result name.
13232         #
13233         #  @return a newly created GEOM group.
13234         #
13235         #  @ref tui_union_groups_anchor "Example"
13236         @ManageTransactions("GroupOp")
13237         def UnionListOfGroups (self, theGList, theName=None):
13238             """
13239             Union of list of groups.
13240             New group is created. It will contain all entities that are
13241             present in groups listed in theGList.
13242
13243             Parameters:
13244                 theGList is a list of GEOM groups to create the united group from.
13245                 theName Object name; when specified, this parameter is used
13246                         for result publication in the study. Otherwise, if automatic
13247                         publication is switched on, default value is used for result name.
13248
13249             Returns:
13250                 a newly created GEOM group.
13251             """
13252             # Example: see GEOM_TestOthers.py
13253             aGroup = self.GroupOp.UnionListOfGroups(theGList)
13254             RaiseIfFailed("UnionListOfGroups", self.GroupOp)
13255             self._autoPublish(aGroup, theName, "group")
13256             return aGroup
13257
13258         ## Cut of lists of groups.
13259         #  New group is created. It will contain only entities
13260         #  which are present in groups listed in theGList.
13261         #  @param theGList is a list of GEOM groups to include elements of.
13262         #  @param theName Object name; when specified, this parameter is used
13263         #         for result publication in the study. Otherwise, if automatic
13264         #         publication is switched on, default value is used for result name.
13265         #
13266         #  @return a newly created GEOM group.
13267         #
13268         #  @ref tui_intersect_groups_anchor "Example"
13269         @ManageTransactions("GroupOp")
13270         def IntersectListOfGroups (self, theGList, theName=None):
13271             """
13272             Cut of lists of groups.
13273             New group is created. It will contain only entities
13274             which are present in groups listed in theGList.
13275
13276             Parameters:
13277                 theGList is a list of GEOM groups to include elements of.
13278                 theName Object name; when specified, this parameter is used
13279                         for result publication in the study. Otherwise, if automatic
13280                         publication is switched on, default value is used for result name.
13281
13282             Returns:
13283                 a newly created GEOM group.
13284             """
13285             # Example: see GEOM_TestOthers.py
13286             aGroup = self.GroupOp.IntersectListOfGroups(theGList)
13287             RaiseIfFailed("IntersectListOfGroups", self.GroupOp)
13288             self._autoPublish(aGroup, theName, "group")
13289             return aGroup
13290
13291         ## Cut of lists of groups.
13292         #  New group is created. It will contain only entities
13293         #  which are present in groups listed in theGList1 but
13294         #  are not present in groups from theGList2.
13295         #  @param theGList1 is a list of GEOM groups to include elements of.
13296         #  @param theGList2 is a list of GEOM groups to exclude elements of.
13297         #  @param theName Object name; when specified, this parameter is used
13298         #         for result publication in the study. Otherwise, if automatic
13299         #         publication is switched on, default value is used for result name.
13300         #
13301         #  @return a newly created GEOM group.
13302         #
13303         #  @ref tui_cut_groups_anchor "Example"
13304         @ManageTransactions("GroupOp")
13305         def CutListOfGroups (self, theGList1, theGList2, theName=None):
13306             """
13307             Cut of lists of groups.
13308             New group is created. It will contain only entities
13309             which are present in groups listed in theGList1 but
13310             are not present in groups from theGList2.
13311
13312             Parameters:
13313                 theGList1 is a list of GEOM groups to include elements of.
13314                 theGList2 is a list of GEOM groups to exclude elements of.
13315                 theName Object name; when specified, this parameter is used
13316                         for result publication in the study. Otherwise, if automatic
13317                         publication is switched on, default value is used for result name.
13318
13319             Returns:
13320                 a newly created GEOM group.
13321             """
13322             # Example: see GEOM_TestOthers.py
13323             aGroup = self.GroupOp.CutListOfGroups(theGList1, theGList2)
13324             RaiseIfFailed("CutListOfGroups", self.GroupOp)
13325             self._autoPublish(aGroup, theName, "group")
13326             return aGroup
13327
13328         ## Returns a list of sub-objects ID stored in the group
13329         #  @param theGroup is a GEOM group for which a list of IDs is requested
13330         #
13331         #  @ref swig_GetObjectIDs "Example"
13332         @ManageTransactions("GroupOp")
13333         def GetObjectIDs(self,theGroup):
13334             """
13335             Returns a list of sub-objects ID stored in the group
13336
13337             Parameters:
13338                 theGroup is a GEOM group for which a list of IDs is requested
13339             """
13340             # Example: see GEOM_TestOthers.py
13341             ListIDs = self.GroupOp.GetObjects(theGroup)
13342             RaiseIfFailed("GetObjects", self.GroupOp)
13343             return ListIDs
13344
13345         ## Returns a type of sub-objects stored in the group
13346         #  @param theGroup is a GEOM group which type is returned.
13347         #
13348         #  @ref swig_GetType "Example"
13349         @ManageTransactions("GroupOp")
13350         def GetType(self,theGroup):
13351             """
13352             Returns a type of sub-objects stored in the group
13353
13354             Parameters:
13355                 theGroup is a GEOM group which type is returned.
13356             """
13357             # Example: see GEOM_TestOthers.py
13358             aType = self.GroupOp.GetType(theGroup)
13359             RaiseIfFailed("GetType", self.GroupOp)
13360             return aType
13361
13362         ## Convert a type of geom object from id to string value
13363         #  @param theId is a GEOM object type id.
13364         #  @return type of geom object (POINT, VECTOR, PLANE, LINE, TORUS, ... )
13365         #  @ref swig_GetType "Example"
13366         def ShapeIdToType(self, theId):
13367             """
13368             Convert a type of geom object from id to string value
13369
13370             Parameters:
13371                 theId is a GEOM object type id.
13372
13373             Returns:
13374                 type of geom object (POINT, VECTOR, PLANE, LINE, TORUS, ... )
13375             """
13376             if theId == 0:
13377                 return "COPY"
13378             if theId == 1:
13379                 return "IMPORT"
13380             if theId == 2:
13381                 return "POINT"
13382             if theId == 3:
13383                 return "VECTOR"
13384             if theId == 4:
13385                 return "PLANE"
13386             if theId == 5:
13387                 return "LINE"
13388             if theId == 6:
13389                 return "TORUS"
13390             if theId == 7:
13391                 return "BOX"
13392             if theId == 8:
13393                 return "CYLINDER"
13394             if theId == 9:
13395                 return "CONE"
13396             if theId == 10:
13397                 return "SPHERE"
13398             if theId == 11:
13399                 return "PRISM"
13400             if theId == 12:
13401                 return "REVOLUTION"
13402             if theId == 13:
13403                 return "BOOLEAN"
13404             if theId == 14:
13405                 return "PARTITION"
13406             if theId == 15:
13407                 return "POLYLINE"
13408             if theId == 16:
13409                 return "CIRCLE"
13410             if theId == 17:
13411                 return "SPLINE"
13412             if theId == 18:
13413                 return "ELLIPSE"
13414             if theId == 19:
13415                 return "CIRC_ARC"
13416             if theId == 20:
13417                 return "FILLET"
13418             if theId == 21:
13419                 return "CHAMFER"
13420             if theId == 22:
13421                 return "EDGE"
13422             if theId == 23:
13423                 return "WIRE"
13424             if theId == 24:
13425                 return "FACE"
13426             if theId == 25:
13427                 return "SHELL"
13428             if theId == 26:
13429                 return "SOLID"
13430             if theId == 27:
13431                 return "COMPOUND"
13432             if theId == 28:
13433                 return "SUBSHAPE"
13434             if theId == 29:
13435                 return "PIPE"
13436             if theId == 30:
13437                 return "ARCHIMEDE"
13438             if theId == 31:
13439                 return "FILLING"
13440             if theId == 32:
13441                 return "EXPLODE"
13442             if theId == 33:
13443                 return "GLUED"
13444             if theId == 34:
13445                 return "SKETCHER"
13446             if theId == 35:
13447                 return "CDG"
13448             if theId == 36:
13449                 return "FREE_BOUNDS"
13450             if theId == 37:
13451                 return "GROUP"
13452             if theId == 38:
13453                 return "BLOCK"
13454             if theId == 39:
13455                 return "MARKER"
13456             if theId == 40:
13457                 return "THRUSECTIONS"
13458             if theId == 41:
13459                 return "COMPOUNDFILTER"
13460             if theId == 42:
13461                 return "SHAPES_ON_SHAPE"
13462             if theId == 43:
13463                 return "ELLIPSE_ARC"
13464             if theId == 44:
13465                 return "3DSKETCHER"
13466             if theId == 45:
13467                 return "FILLET_2D"
13468             if theId == 46:
13469                 return "FILLET_1D"
13470             if theId == 201:
13471                 return "PIPETSHAPE"
13472             return "Shape Id not exist."
13473
13474         ## Returns a main shape associated with the group
13475         #  @param theGroup is a GEOM group for which a main shape object is requested
13476         #  @return a GEOM object which is a main shape for theGroup
13477         #
13478         #  @ref swig_GetMainShape "Example"
13479         @ManageTransactions("GroupOp")
13480         def GetMainShape(self,theGroup):
13481             """
13482             Returns a main shape associated with the group
13483
13484             Parameters:
13485                 theGroup is a GEOM group for which a main shape object is requested
13486
13487             Returns:
13488                 a GEOM object which is a main shape for theGroup
13489
13490             Example of usage: BoxCopy = geompy.GetMainShape(CreateGroup)
13491             """
13492             # Example: see GEOM_TestOthers.py
13493             anObj = self.GroupOp.GetMainShape(theGroup)
13494             RaiseIfFailed("GetMainShape", self.GroupOp)
13495             return anObj
13496
13497         ## Create group of edges of theShape, whose length is in range [min_length, max_length].
13498         #  If include_min/max == 0, edges with length == min/max_length will not be included in result.
13499         #  @param theShape given shape (see GEOM.GEOM_Object)
13500         #  @param min_length minimum length of edges of theShape
13501         #  @param max_length maximum length of edges of theShape
13502         #  @param include_max indicating if edges with length == max_length should be included in result, 1-yes, 0-no (default=1)
13503         #  @param include_min indicating if edges with length == min_length should be included in result, 1-yes, 0-no (default=1)
13504         #  @param theName Object name; when specified, this parameter is used
13505         #         for result publication in the study. Otherwise, if automatic
13506         #         publication is switched on, default value is used for result name.
13507         #
13508         #  @return a newly created GEOM group of edges
13509         #
13510         #  @@ref swig_todo "Example"
13511         def GetEdgesByLength (self, theShape, min_length, max_length, include_min = 1, include_max = 1, theName=None):
13512             """
13513             Create group of edges of theShape, whose length is in range [min_length, max_length].
13514             If include_min/max == 0, edges with length == min/max_length will not be included in result.
13515
13516             Parameters:
13517                 theShape given shape
13518                 min_length minimum length of edges of theShape
13519                 max_length maximum length of edges of theShape
13520                 include_max indicating if edges with length == max_length should be included in result, 1-yes, 0-no (default=1)
13521                 include_min indicating if edges with length == min_length should be included in result, 1-yes, 0-no (default=1)
13522                 theName Object name; when specified, this parameter is used
13523                         for result publication in the study. Otherwise, if automatic
13524                         publication is switched on, default value is used for result name.
13525
13526              Returns:
13527                 a newly created GEOM group of edges.
13528             """
13529             edges = self.SubShapeAll(theShape, self.ShapeType["EDGE"])
13530             edges_in_range = []
13531             for edge in edges:
13532                 Props = self.BasicProperties(edge)
13533                 if min_length <= Props[0] and Props[0] <= max_length:
13534                     if (not include_min) and (min_length == Props[0]):
13535                         skip = 1
13536                     else:
13537                         if (not include_max) and (Props[0] == max_length):
13538                             skip = 1
13539                         else:
13540                             edges_in_range.append(edge)
13541
13542             if len(edges_in_range) <= 0:
13543                 print("No edges found by given criteria")
13544                 return None
13545
13546             # note: auto-publishing is done in self.CreateGroup()
13547             group_edges = self.CreateGroup(theShape, self.ShapeType["EDGE"], theName)
13548             self.UnionList(group_edges, edges_in_range)
13549
13550             return group_edges
13551
13552         ## Create group of edges of selected shape, whose length is in range [min_length, max_length].
13553         #  If include_min/max == 0, edges with length == min/max_length will not be included in result.
13554         #  @param min_length minimum length of edges of selected shape
13555         #  @param max_length maximum length of edges of selected shape
13556         #  @param include_max indicating if edges with length == max_length should be included in result, 1-yes, 0-no (default=1)
13557         #  @param include_min indicating if edges with length == min_length should be included in result, 1-yes, 0-no (default=1)
13558         #  @return a newly created GEOM group of edges
13559         #  @ref swig_todo "Example"
13560         def SelectEdges (self, min_length, max_length, include_min = 1, include_max = 1):
13561             """
13562             Create group of edges of selected shape, whose length is in range [min_length, max_length].
13563             If include_min/max == 0, edges with length == min/max_length will not be included in result.
13564
13565             Parameters:
13566                 min_length minimum length of edges of selected shape
13567                 max_length maximum length of edges of selected shape
13568                 include_max indicating if edges with length == max_length should be included in result, 1-yes, 0-no (default=1)
13569                 include_min indicating if edges with length == min_length should be included in result, 1-yes, 0-no (default=1)
13570
13571              Returns:
13572                 a newly created GEOM group of edges.
13573             """
13574             nb_selected = sg.SelectedCount()
13575             if nb_selected < 1:
13576                 print("Select a shape before calling this function, please.")
13577                 return 0
13578             if nb_selected > 1:
13579                 print("Only one shape must be selected")
13580                 return 0
13581
13582             id_shape = sg.getSelected(0)
13583             shape = IDToObject( id_shape )
13584
13585             group_edges = self.GetEdgesByLength(shape, min_length, max_length, include_min, include_max)
13586
13587             left_str  = " < "
13588             right_str = " < "
13589             if include_min: left_str  = " <= "
13590             if include_max: right_str  = " <= "
13591
13592             self.addToStudyInFather(shape, group_edges, "Group of edges with " + repr(min_length)
13593                                     + left_str + "length" + right_str + repr(max_length))
13594
13595             sg.updateObjBrowser()
13596
13597             return group_edges
13598
13599         # end of l3_groups
13600         ## @}
13601
13602         #@@ insert new functions before this line @@ do not remove this line @@#
13603
13604         ## Create a copy of the given object
13605         #
13606         #  @param theOriginal geometry object for copy
13607         #  @param theName Object name; when specified, this parameter is used
13608         #         for result publication in the study. Otherwise, if automatic
13609         #         publication is switched on, default value is used for result name.
13610         #
13611         #  @return New GEOM_Object, containing the copied shape.
13612         #
13613         #  @ingroup l1_geomBuilder_auxiliary
13614         #  @ref swig_MakeCopy "Example"
13615         @ManageTransactions("InsertOp")
13616         def MakeCopy(self, theOriginal, theName=None):
13617             """
13618             Create a copy of the given object
13619
13620             Parameters:
13621                 theOriginal geometry object for copy
13622                 theName Object name; when specified, this parameter is used
13623                         for result publication in the study. Otherwise, if automatic
13624                         publication is switched on, default value is used for result name.
13625
13626             Returns:
13627                 New GEOM_Object, containing the copied shape.
13628
13629             Example of usage: Copy = geompy.MakeCopy(Box)
13630             """
13631             # Example: see GEOM_TestAll.py
13632             anObj = self.InsertOp.MakeCopy(theOriginal)
13633             RaiseIfFailed("MakeCopy", self.InsertOp)
13634             self._autoPublish(anObj, theName, "copy")
13635             return anObj
13636
13637         ## Add Path to load python scripts from
13638         #  @param Path a path to load python scripts from
13639         #  @ingroup l1_geomBuilder_auxiliary
13640         def addPath(self,Path):
13641             """
13642             Add Path to load python scripts from
13643
13644             Parameters:
13645                 Path a path to load python scripts from
13646             """
13647             if (sys.path.count(Path) < 1):
13648                 sys.path.append(Path)
13649                 pass
13650             pass
13651
13652         ## Load marker texture from the file
13653         #  @param Path a path to the texture file
13654         #  @return unique texture identifier
13655         #  @ingroup l1_geomBuilder_auxiliary
13656         @ManageTransactions("InsertOp")
13657         def LoadTexture(self, Path):
13658             """
13659             Load marker texture from the file
13660
13661             Parameters:
13662                 Path a path to the texture file
13663
13664             Returns:
13665                 unique texture identifier
13666             """
13667             # Example: see GEOM_TestAll.py
13668             ID = self.InsertOp.LoadTexture(Path)
13669             RaiseIfFailed("LoadTexture", self.InsertOp)
13670             return ID
13671
13672         ## Get internal name of the object based on its study entry
13673         #  @note This method does not provide an unique identifier of the geometry object.
13674         #  @note This is internal function of GEOM component, though it can be used outside it for
13675         #  appropriate reason (e.g. for identification of geometry object).
13676         #  @param obj geometry object
13677         #  @return unique object identifier
13678         #  @ingroup l1_geomBuilder_auxiliary
13679         def getObjectID(self, obj):
13680             """
13681             Get internal name of the object based on its study entry.
13682             Note: this method does not provide an unique identifier of the geometry object.
13683             It is an internal function of GEOM component, though it can be used outside GEOM for
13684             appropriate reason (e.g. for identification of geometry object).
13685
13686             Parameters:
13687                 obj geometry object
13688
13689             Returns:
13690                 unique object identifier
13691             """
13692             ID = ""
13693             entry = salome.ObjectToID(obj)
13694             if entry is not None:
13695                 lst = entry.split(":")
13696                 if len(lst) > 0:
13697                     ID = lst[-1] # -1 means last item in the list
13698                     return "GEOM_" + ID
13699             return ID
13700
13701
13702
13703         ## Add marker texture. @a Width and @a Height parameters
13704         #  specify width and height of the texture in pixels.
13705         #  If @a RowData is @c True, @a Texture parameter should represent texture data
13706         #  packed into the byte array. If @a RowData is @c False (default), @a Texture
13707         #  parameter should be unpacked string, in which '1' symbols represent opaque
13708         #  pixels and '0' represent transparent pixels of the texture bitmap.
13709         #
13710         #  @param Width texture width in pixels
13711         #  @param Height texture height in pixels
13712         #  @param Texture texture data
13713         #  @param RowData if @c True, @a Texture data are packed in the byte stream
13714         #  @return unique texture identifier
13715         #  @ingroup l1_geomBuilder_auxiliary
13716         @ManageTransactions("InsertOp")
13717         def AddTexture(self, Width, Height, Texture, RowData=False):
13718             """
13719             Add marker texture. Width and Height parameters
13720             specify width and height of the texture in pixels.
13721             If RowData is True, Texture parameter should represent texture data
13722             packed into the byte array. If RowData is False (default), Texture
13723             parameter should be unpacked string, in which '1' symbols represent opaque
13724             pixels and '0' represent transparent pixels of the texture bitmap.
13725
13726             Parameters:
13727                 Width texture width in pixels
13728                 Height texture height in pixels
13729                 Texture texture data
13730                 RowData if True, Texture data are packed in the byte stream
13731
13732             Returns:
13733                 return unique texture identifier
13734             """
13735             if not RowData: Texture = PackData(Texture)
13736             ID = self.InsertOp.AddTexture(Width, Height, Texture)
13737             RaiseIfFailed("AddTexture", self.InsertOp)
13738             return ID
13739
13740         ## Transfer not topological data from one GEOM object to another.
13741         #
13742         #  @param theObjectFrom the source object of non-topological data
13743         #  @param theObjectTo the destination object of non-topological data
13744         #  @param theFindMethod method to search sub-shapes of theObjectFrom
13745         #         in shape theObjectTo. Possible values are: GEOM.FSM_GetInPlace,
13746         #         GEOM.FSM_GetInPlaceByHistory and GEOM.FSM_GetInPlace_Old.
13747         #         Other values of GEOM.find_shape_method are not supported.
13748         #
13749         #  @return True in case of success; False otherwise.
13750         #
13751         #  @ingroup l1_geomBuilder_auxiliary
13752         #
13753         #  @ref swig_TransferData "Example"
13754         @ManageTransactions("InsertOp")
13755         def TransferData(self, theObjectFrom, theObjectTo,
13756                          theFindMethod=GEOM.FSM_GetInPlace):
13757             """
13758             Transfer not topological data from one GEOM object to another.
13759
13760             Parameters:
13761                 theObjectFrom the source object of non-topological data
13762                 theObjectTo the destination object of non-topological data
13763                 theFindMethod method to search sub-shapes of theObjectFrom
13764                               in shape theObjectTo. Possible values are:
13765                               GEOM.FSM_GetInPlace, GEOM.FSM_GetInPlaceByHistory
13766                               and GEOM.FSM_GetInPlace_Old. Other values of
13767                               GEOM.find_shape_method are not supported.
13768
13769             Returns:
13770                 True in case of success; False otherwise.
13771
13772             # Example: see GEOM_TestOthers.py
13773             """
13774             # Example: see GEOM_TestAll.py
13775             isOk = self.InsertOp.TransferData(theObjectFrom,
13776                                                theObjectTo, theFindMethod)
13777             RaiseIfFailed("TransferData", self.InsertOp)
13778             return isOk
13779
13780         ## Creates a new folder object. It is a container for any GEOM objects.
13781         #  @param Name name of the container
13782         #  @param Father parent object. If None,
13783         #         folder under 'Geometry' root object will be created.
13784         #  @return a new created folder
13785         #  @ingroup l1_publish_data
13786         def NewFolder(self, Name, Father=None):
13787             """
13788             Create a new folder object. It is an auxiliary container for any GEOM objects.
13789
13790             Parameters:
13791                 Name name of the container
13792                 Father parent object. If None,
13793                 folder under 'Geometry' root object will be created.
13794
13795             Returns:
13796                 a new created folder
13797             """
13798             if not Father: Father = self.father
13799             return self.CreateFolder(Name, Father)
13800
13801         ## Move object to the specified folder
13802         #  @param Object object to move
13803         #  @param Folder target folder
13804         #  @ingroup l1_publish_data
13805         def PutToFolder(self, Object, Folder):
13806             """
13807             Move object to the specified folder
13808
13809             Parameters:
13810                 Object object to move
13811                 Folder target folder
13812             """
13813             self.MoveToFolder(Object, Folder)
13814             pass
13815
13816         ## Move list of objects to the specified folder
13817         #  @param ListOfSO list of objects to move
13818         #  @param Folder target folder
13819         #  @ingroup l1_publish_data
13820         def PutListToFolder(self, ListOfSO, Folder):
13821             """
13822             Move list of objects to the specified folder
13823
13824             Parameters:
13825                 ListOfSO list of objects to move
13826                 Folder target folder
13827             """
13828             self.MoveListToFolder(ListOfSO, Folder)
13829             pass
13830
13831         ## @addtogroup l2_field
13832         ## @{
13833
13834         ## Creates a field
13835         #  @param shape the shape the field lies on
13836         #  @param name the field name
13837         #  @param type type of field data: 0 - bool, 1 - int, 2 - double, 3 - string
13838         #  @param dimension dimension of the shape the field lies on
13839         #         0 - VERTEX, 1 - EDGE, 2 - FACE, 3 - SOLID, -1 - whole shape
13840         #  @param componentNames names of components
13841         #  @return a created field
13842         @ManageTransactions("FieldOp")
13843         def CreateField(self, shape, name, type, dimension, componentNames):
13844             """
13845             Creates a field
13846
13847             Parameters:
13848                 shape the shape the field lies on
13849                 name  the field name
13850                 type  type of field data
13851                 dimension dimension of the shape the field lies on
13852                           0 - VERTEX, 1 - EDGE, 2 - FACE, 3 - SOLID, -1 - whole shape
13853                 componentNames names of components
13854
13855             Returns:
13856                 a created field
13857             """
13858             if isinstance( type, int ):
13859                 if type < 0 or type > 3:
13860                     raise RuntimeError("CreateField : Error: data type must be within [0-3] range")
13861                 type = [GEOM.FDT_Bool,GEOM.FDT_Int,GEOM.FDT_Double,GEOM.FDT_String][type]
13862
13863             f = self.FieldOp.CreateField( shape, name, type, dimension, componentNames)
13864             RaiseIfFailed("CreateField", self.FieldOp)
13865             global geom
13866             geom._autoPublish( f, "", name)
13867             return f
13868
13869         ## Removes a field from the GEOM component
13870         #  @param field the field to remove
13871         def RemoveField(self, field):
13872             "Removes a field from the GEOM component"
13873             global geom
13874             if isinstance( field, GEOM._objref_GEOM_Field ):
13875                 geom.RemoveObject( field )
13876             elif isinstance( field, geomField ):
13877                 geom.RemoveObject( field.field )
13878             else:
13879                 raise RuntimeError("RemoveField() : the object is not a field")
13880             return
13881
13882         ## Returns number of fields on a shape
13883         @ManageTransactions("FieldOp")
13884         def CountFields(self, shape):
13885             "Returns number of fields on a shape"
13886             nb = self.FieldOp.CountFields( shape )
13887             RaiseIfFailed("CountFields", self.FieldOp)
13888             return nb
13889
13890         ## Returns all fields on a shape
13891         @ManageTransactions("FieldOp")
13892         def GetFields(self, shape):
13893             "Returns all fields on a shape"
13894             ff = self.FieldOp.GetFields( shape )
13895             RaiseIfFailed("GetFields", self.FieldOp)
13896             return ff
13897
13898         ## Returns a field on a shape by its name
13899         @ManageTransactions("FieldOp")
13900         def GetField(self, shape, name):
13901             "Returns a field on a shape by its name"
13902             f = self.FieldOp.GetField( shape, name )
13903             RaiseIfFailed("GetField", self.FieldOp)
13904             return f
13905
13906         # end of l2_field
13907         ## @}
13908
13909
13910 # Register the new proxy for GEOM_Gen
13911 omniORB.registerObjref(GEOM._objref_GEOM_Gen._NP_RepositoryId, geomBuilder)
13912
13913
13914 ## Field on Geometry
13915 #  @ingroup l2_field
13916 class geomField( GEOM._objref_GEOM_Field ):
13917
13918     def __init__(self, *args):
13919         GEOM._objref_GEOM_Field.__init__(self, *args)
13920         self.field = GEOM._objref_GEOM_Field
13921         return
13922
13923     ## Returns the shape the field lies on
13924     def getShape(self):
13925         "Returns the shape the field lies on"
13926         return self.field.GetShape(self)
13927
13928     ## Returns the field name
13929     def getName(self):
13930         "Returns the field name"
13931         return self.field.GetName(self)
13932
13933     ## Returns type of field data as integer [0-3]
13934     def getType(self):
13935         "Returns type of field data"
13936         return EnumToLong(self.field.GetDataType(self))
13937
13938     ## Returns type of field data:
13939     #  one of GEOM.FDT_Bool, GEOM.FDT_Int, GEOM.FDT_Double, GEOM.FDT_String
13940     def getTypeEnum(self):
13941         "Returns type of field data"
13942         return self.field.GetDataType(self)
13943
13944     ## Returns dimension of the shape the field lies on:
13945     #  0 - VERTEX, 1 - EDGE, 2 - FACE, 3 - SOLID, -1 - whole shape
13946     def getDimension(self):
13947         """Returns dimension of the shape the field lies on:
13948         0 - VERTEX, 1 - EDGE, 2 - FACE, 3 - SOLID, -1 - whole shape"""
13949         return self.field.GetDimension(self)
13950
13951     ## Returns names of components
13952     def getComponents(self):
13953         "Returns names of components"
13954         return self.field.GetComponents(self)
13955
13956     ## Adds a time step to the field
13957     #  @param step the time step number further used as the step identifier
13958     #  @param stamp the time step time
13959     #  @param values the values of the time step
13960     def addStep(self, step, stamp, values):
13961         "Adds a time step to the field"
13962         stp = self.field.AddStep( self, step, stamp )
13963         if not stp:
13964             raise RuntimeError("Field.addStep() : Error: step %s already exists in this field"%step)
13965         global geom
13966         geom._autoPublish( stp, "", "Step %s, %s"%(step,stamp))
13967         self.setValues( step, values )
13968         return stp
13969
13970     ## Remove a time step from the field
13971     def removeStep(self,step):
13972         "Remove a time step from the field"
13973         stepSO = None
13974         try:
13975             stepObj = self.field.GetStep( self, step )
13976             if stepObj:
13977                 stepSO = geom.myStudy.FindObjectID( stepObj.GetStudyEntry() )
13978         except:
13979             #import traceback
13980             #traceback.print_exc()
13981             pass
13982         self.field.RemoveStep( self, step )
13983         if stepSO:
13984             geom.myBuilder.RemoveObjectWithChildren( stepSO )
13985         return
13986
13987     ## Returns number of time steps in the field
13988     def countSteps(self):
13989         "Returns number of time steps in the field"
13990         return self.field.CountSteps(self)
13991
13992     ## Returns a list of time step IDs in the field
13993     def getSteps(self):
13994         "Returns a list of time step IDs in the field"
13995         return self.field.GetSteps(self)
13996
13997     ## Returns a time step by its ID
13998     def getStep(self,step):
13999         "Returns a time step by its ID"
14000         stp = self.field.GetStep(self, step)
14001         if not stp:
14002             raise RuntimeError("Step %s is missing from this field"%step)
14003         return stp
14004
14005     ## Returns the time of the field step
14006     def getStamp(self,step):
14007         "Returns the time of the field step"
14008         return self.getStep(step).GetStamp()
14009
14010     ## Changes the time of the field step
14011     def setStamp(self, step, stamp):
14012         "Changes the time of the field step"
14013         return self.getStep(step).SetStamp(stamp)
14014
14015     ## Returns values of the field step
14016     def getValues(self, step):
14017         "Returns values of the field step"
14018         return self.getStep(step).GetValues()
14019
14020     ## Changes values of the field step
14021     def setValues(self, step, values):
14022         "Changes values of the field step"
14023         stp = self.getStep(step)
14024         errBeg = "Field.setValues(values) : Error: "
14025         try:
14026             ok = stp.SetValues( values )
14027         except Exception as e:
14028             excStr = str(e)
14029             if excStr.find("WrongPythonType") > 0:
14030                 raise RuntimeError(errBeg +\
14031                       "wrong type of values, %s values are expected"%str(self.getTypeEnum())[4:])
14032             raise RuntimeError(errBeg + str(e))
14033         if not ok:
14034             nbOK = self.field.GetArraySize(self)
14035             nbKO = len(values)
14036             if nbOK != nbKO:
14037                 raise RuntimeError(errBeg + "len(values) must be %s but not %s"%(nbOK,nbKO))
14038             else:
14039                 raise RuntimeError(errBeg + "failed")
14040         return
14041
14042     pass # end of class geomField
14043
14044 # Register the new proxy for GEOM_Field
14045 omniORB.registerObjref(GEOM._objref_GEOM_Field._NP_RepositoryId, geomField)
14046
14047
14048 ## Create a new geomBuilder instance.The geomBuilder class provides the Python
14049 #  interface to GEOM operations.
14050 #
14051 #  Typical use is:
14052 #  \code
14053 #    import salome
14054 #    salome.salome_init()
14055 #    from salome.geom import geomBuilder
14056 #    geompy = geomBuilder.New()
14057 #  \endcode
14058 #  @param  instance  CORBA proxy of GEOM Engine. If None, the default Engine is used.
14059 #  @return geomBuilder instance
14060 def New( instance=None):
14061     """
14062     Create a new geomBuilder instance.The geomBuilder class provides the Python
14063     interface to GEOM operations.
14064
14065     Typical use is:
14066         import salome
14067         salome.salome_init()
14068         from salome.geom import geomBuilder
14069         geompy = geomBuilder.New()
14070
14071     Parameters:
14072         instance  CORBA proxy of GEOM Engine. If None, the default Engine is used.
14073     Returns:
14074         geomBuilder instance
14075     """
14076     #print "New geomBuilder ", study, instance
14077     global engine
14078     global geom
14079     global doLcc
14080     if instance and isinstance( instance, SALOMEDS._objref_Study ):
14081         import sys
14082         sys.stderr.write("Warning: 'study' argument is no more needed in geomBuilder.New(). Consider updating your script!!!\n\n")
14083         instance = None
14084     engine = instance
14085     if engine is None:
14086       doLcc = True
14087     geom = geomBuilder()
14088     assert isinstance(geom,geomBuilder), "Geom engine class is %s but should be geomBuilder.geomBuilder. Import geomBuilder before creating the instance."%geom.__class__
14089     geom.init_geom()
14090     return geom
14091
14092
14093 # Register methods from the plug-ins in the geomBuilder class 
14094 plugins_var = os.environ.get( "GEOM_PluginsList" )
14095
14096 plugins = None
14097 if plugins_var is not None:
14098     plugins = plugins_var.split( ":" )
14099     plugins=[x for x in plugins if len(x)>0]
14100 if plugins is not None:
14101     for pluginName in plugins:
14102         pluginBuilderName = pluginName + "Builder"
14103         try:
14104             exec( "from salome.%s.%s import *" % (pluginName, pluginBuilderName))
14105         except Exception as e:
14106             from salome_utils import verbose
14107             print("Exception while loading %s: %s" % ( pluginBuilderName, e ))
14108             continue
14109         exec( "from salome.%s import %s" % (pluginName, pluginBuilderName))
14110         plugin = eval( pluginBuilderName )
14111         
14112         # add methods from plugin module to the geomBuilder class
14113         for k in dir( plugin ):
14114             if k[0] == '_': continue
14115             method = getattr( plugin, k )
14116             if type( method ).__name__ == 'function':
14117                 if not hasattr( geomBuilder, k ):
14118                     setattr( geomBuilder, k, method )
14119                 pass
14120             pass
14121         del pluginName
14122         pass
14123     pass