Salome HOME
efb57f1270a91ac59e0246edb2c25a66799ce205
[modules/geom.git] / src / GEOM_SWIG / geomBuilder.py
1 #  -*- coding: iso-8859-1 -*-
2 # Copyright (C) 2007-2021  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.BasicOp  = None
736               self.CurvesOp = None
737               self.PrimOp   = None
738               self.ShapesOp = None
739               self.HealOp   = None
740               self.InsertOp = None
741               self.BoolOp   = None
742               self.TrsfOp   = None
743               self.LocalOp  = None
744               self.MeasuOp  = None
745               self.BlocksOp = None
746               self.GroupOp  = None
747               self.FieldOp  = None
748             pass
749
750         ## Process object publication in the study, as follows:
751         #  - if @a theName is specified (not None), the object is published in the study
752         #    with this name, not taking into account "auto-publishing" option;
753         #  - if @a theName is NOT specified, the object is published in the study
754         #    (using default name, which can be customized using @a theDefaultName parameter)
755         #    only if auto-publishing is switched on.
756         #
757         #  @param theObj  object, a subject for publishing
758         #  @param theName object name for study
759         #  @param theDefaultName default name for the auto-publishing
760         #
761         #  @sa addToStudyAuto()
762         def _autoPublish(self, theObj, theName, theDefaultName="noname"):
763             # ---
764             def _item_name(_names, _defname, _idx=-1):
765                 if not _names: _names = _defname
766                 if type(_names) in [list, tuple]:
767                     if _idx >= 0:
768                         if _idx >= len(_names) or not _names[_idx]:
769                             if type(_defname) not in [list, tuple]:
770                                 _name = "%s_%d"%(_defname, _idx+1)
771                             elif len(_defname) > 0 and _idx >= 0 and _idx < len(_defname):
772                                 _name = _defname[_idx]
773                             else:
774                                 _name = "%noname_%d"%(dn, _idx+1)
775                             pass
776                         else:
777                             _name = _names[_idx]
778                         pass
779                     else:
780                         # must be wrong  usage
781                         _name = _names[0]
782                     pass
783                 else:
784                     if _idx >= 0:
785                         _name = "%s_%d"%(_names, _idx+1)
786                     else:
787                         _name = _names
788                     pass
789                 return _name
790             # ---
791             def _publish( _name, _obj ):
792                 fatherObj = None
793                 if isinstance( _obj, GEOM._objref_GEOM_Field ):
794                     fatherObj = _obj.GetShape()
795                 elif isinstance( _obj, GEOM._objref_GEOM_FieldStep ):
796                     fatherObj = _obj.GetField()
797                 elif not _obj.IsMainShape():
798                     fatherObj = _obj.GetMainShape()
799                     pass
800                 if fatherObj and fatherObj.GetStudyEntry():
801                     self.addToStudyInFather(fatherObj, _obj, _name)
802                 else:
803                     self.addToStudy(_obj, _name)
804                     pass
805                 return
806             # ---
807             if not theObj:
808                 return # null object
809             if not theName and not self.myMaxNbSubShapesAllowed:
810                 return # nothing to do: auto-publishing is disabled
811             if not theName and not theDefaultName:
812                 return # neither theName nor theDefaultName is given
813             import types
814             if type(theObj) in [list, tuple]:
815                 # list of objects is being published
816                 idx = 0
817                 for obj in theObj:
818                     if not obj: continue # bad object
819                     name = _item_name(theName, theDefaultName, idx)
820                     _publish( name, obj )
821                     idx = idx+1
822                     if not theName and idx == self.myMaxNbSubShapesAllowed: break
823                     pass
824                 pass
825             else:
826                 # single object is published
827                 name = _item_name(theName, theDefaultName)
828                 _publish( name, theObj )
829             pass
830
831         ## @addtogroup l1_geomBuilder_auxiliary
832         ## @{
833         def init_geom(self):
834             self.myStudy = salome.myStudy
835             self.myBuilder = self.myStudy.NewBuilder()
836
837             # load data from the study file, if necessary
838             component = self.myStudy.FindComponent("GEOM")
839             if component:
840                 self.myBuilder.LoadWith(component, self)
841
842             self.BasicOp  = self.GetIBasicOperations    ()
843             self.CurvesOp = self.GetICurvesOperations   ()
844             self.PrimOp   = self.GetI3DPrimOperations   ()
845             self.ShapesOp = self.GetIShapesOperations   ()
846             self.HealOp   = self.GetIHealingOperations  ()
847             self.InsertOp = self.GetIInsertOperations   ()
848             self.BoolOp   = self.GetIBooleanOperations  ()
849             self.TrsfOp   = self.GetITransformOperations()
850             self.LocalOp  = self.GetILocalOperations    ()
851             self.MeasuOp  = self.GetIMeasureOperations  ()
852             self.BlocksOp = self.GetIBlocksOperations   ()
853             self.GroupOp  = self.GetIGroupOperations    ()
854             self.FieldOp  = self.GetIFieldOperations    ()
855
856             notebook.myStudy = self.myStudy
857             pass
858
859         def GetPluginOperations(self, libraryName):
860             op = GEOM._objref_GEOM_Gen.GetPluginOperations(self, libraryName)
861             return op
862
863         ## Enable / disable results auto-publishing
864         #
865         #  The automatic publishing is managed in the following way:
866         #  - if @a maxNbSubShapes = 0, automatic publishing is disabled.
867         #  - if @a maxNbSubShapes = -1 (default), automatic publishing is enabled and
868         #  maximum number of sub-shapes allowed for publishing is unlimited; any negative
869         #  value passed as parameter has the same effect.
870         #  - if @a maxNbSubShapes is any positive value, automatic publishing is enabled and
871         #  maximum number of sub-shapes allowed for publishing is set to specified value.
872         #
873         #  @param maxNbSubShapes maximum number of sub-shapes allowed for publishing.
874         #  @ingroup l1_publish_data
875         def addToStudyAuto(self, maxNbSubShapes=-1):
876             """
877             Enable / disable results auto-publishing
878
879             The automatic publishing is managed in the following way:
880             - if @a maxNbSubShapes = 0, automatic publishing is disabled;
881             - if @a maxNbSubShapes = -1 (default), automatic publishing is enabled and
882             maximum number of sub-shapes allowed for publishing is unlimited; any negative
883             value passed as parameter has the same effect.
884             - if @a maxNbSubShapes is any positive value, automatic publishing is enabled and
885             maximum number of sub-shapes allowed for publishing is set to this value.
886
887             Parameters:
888                 maxNbSubShapes maximum number of sub-shapes allowed for publishing.
889
890             Example of usage:
891                 geompy.addToStudyAuto()   # enable auto-publishing
892                 geompy.MakeBoxDXDYDZ(100) # box is created and published with default name
893                 geompy.addToStudyAuto(0)  # disable auto-publishing
894             """
895             self.myMaxNbSubShapesAllowed = max(-1, maxNbSubShapes)
896             pass
897
898         ## Dump component to the Python script
899         #  This method overrides IDL function to allow default values for the parameters.
900         def DumpPython(self, theIsPublished=True, theIsMultiFile=True):
901             """
902             Dump component to the Python script
903             This method overrides IDL function to allow default values for the parameters.
904             """
905             return GEOM._objref_GEOM_Gen.DumpPython(self, theIsPublished, theIsMultiFile)
906
907         ## Get name for sub-shape aSubObj of shape aMainObj
908         #
909         # @ref swig_SubShapeName "Example"
910         @ManageTransactions("ShapesOp")
911         def SubShapeName(self,aSubObj, aMainObj):
912             """
913             Get name for sub-shape aSubObj of shape aMainObj
914             """
915             # Example: see GEOM_TestAll.py
916
917             #aSubId  = orb.object_to_string(aSubObj)
918             #aMainId = orb.object_to_string(aMainObj)
919             #index = gg.getIndexTopology(aSubId, aMainId)
920             #name = gg.getShapeTypeString(aSubId) + "_%d"%(index)
921             index = self.ShapesOp.GetTopologyIndex(aMainObj, aSubObj)
922             name = self.ShapesOp.GetShapeTypeString(aSubObj) + "_%d"%(index)
923             return name
924
925         ## Publish in study aShape with name aName
926         #
927         #  \param aShape the shape to be published
928         #  \param aName  the name for the shape
929         #  \param doRestoreSubShapes if True, finds and publishes also
930         #         sub-shapes of <VAR>aShape</VAR>, corresponding to its arguments
931         #         and published sub-shapes of arguments
932         #  \param theArgs,theFindMethod,theInheritFirstArg see RestoreSubShapes() for
933         #                                                  these arguments description
934         #  \return study entry of the published shape in form of string
935         #
936         #  @ingroup l1_publish_data
937         #  @ref swig_all_addtostudy "Example"
938         def addToStudy(self, aShape, aName, doRestoreSubShapes=False,
939                        theArgs=[], theFindMethod=GEOM.FSM_GetInPlace, theInheritFirstArg=False):
940             """
941             Publish in study aShape with name aName
942
943             Parameters:
944                 aShape the shape to be published
945                 aName  the name for the shape
946                 doRestoreSubShapes if True, finds and publishes also
947                                    sub-shapes of aShape, corresponding to its arguments
948                                    and published sub-shapes of arguments
949                 theArgs,theFindMethod,theInheritFirstArg see geompy.RestoreSubShapes() for
950                                                          these arguments description
951
952             Returns:
953                 study entry of the published shape in form of string
954
955             Example of usage:
956                 id_block1 = geompy.addToStudy(Block1, "Block 1")
957             """
958             # Example: see GEOM_TestAll.py
959             try:
960                 aSObject = self.AddInStudy(aShape, aName, None)
961                 if aSObject and aName: aSObject.SetAttrString("AttributeName", aName)
962                 if doRestoreSubShapes:
963                     self.RestoreSubShapesSO(aSObject, theArgs,
964                                             theFindMethod, theInheritFirstArg, True )
965             except:
966                 print("addToStudy() failed")
967                 return ""
968             return aShape.GetStudyEntry()
969
970         ## Publish in study aShape with name aName as sub-object of previously published aFather
971         #  \param aFather previously published object
972         #  \param aShape the shape to be published as sub-object of <VAR>aFather</VAR>
973         #  \param aName  the name for the shape
974         #
975         #  \return study entry of the published shape in form of string
976         #
977         #  @ingroup l1_publish_data
978         #  @ref swig_all_addtostudyInFather "Example"
979         def addToStudyInFather(self, aFather, aShape, aName):
980             """
981             Publish in study aShape with name aName as sub-object of previously published aFather
982
983             Parameters:
984                 aFather previously published object
985                 aShape the shape to be published as sub-object of aFather
986                 aName  the name for the shape
987
988             Returns:
989                 study entry of the published shape in form of string
990             """
991             # Example: see GEOM_TestAll.py
992             try:
993                 aSObject = self.AddInStudy(aShape, aName, aFather)
994                 if aSObject and aName: aSObject.SetAttrString("AttributeName", aName)
995             except:
996                 print("addToStudyInFather() failed")
997                 return ""
998             return aShape.GetStudyEntry()
999
1000         ## Unpublish object in study
1001         #
1002         #  \param obj the object to be unpublished
1003         def hideInStudy(self, obj):
1004             """
1005             Unpublish object in study
1006
1007             Parameters:
1008                 obj the object to be unpublished
1009             """
1010             ior = salome.orb.object_to_string(obj)
1011             aSObject = self.myStudy.FindObjectIOR(ior)
1012             if aSObject is not None:
1013                 genericAttribute = self.myBuilder.FindOrCreateAttribute(aSObject, "AttributeDrawable")
1014                 drwAttribute = genericAttribute._narrow(SALOMEDS.AttributeDrawable)
1015                 drwAttribute.SetDrawable(False)
1016                 # hide references if any
1017                 vso = self.myStudy.FindDependances(aSObject);
1018                 for refObj in vso :
1019                     genericAttribute = self.myBuilder.FindOrCreateAttribute(refObj, "AttributeDrawable")
1020                     drwAttribute = genericAttribute._narrow(SALOMEDS.AttributeDrawable)
1021                     drwAttribute.SetDrawable(False)
1022                     pass
1023                 pass
1024
1025         # end of l1_geomBuilder_auxiliary
1026         ## @}
1027
1028         ## @addtogroup l3_restore_ss
1029         ## @{
1030
1031         ## Publish sub-shapes, standing for arguments and sub-shapes of arguments
1032         #  To be used from python scripts out of addToStudy() (non-default usage)
1033         #  \param theObject published GEOM.GEOM_Object, arguments of which will be published
1034         #  \param theArgs   list of GEOM.GEOM_Object, operation arguments to be published.
1035         #                   If this list is empty, all operation arguments will be published
1036         #  \param theFindMethod method to search sub-shapes, corresponding to arguments and
1037         #                       their sub-shapes. Value from enumeration GEOM.find_shape_method.
1038         #  \param theInheritFirstArg set properties of the first argument for <VAR>theObject</VAR>.
1039         #                            Do not publish sub-shapes in place of arguments, but only
1040         #                            in place of sub-shapes of the first argument,
1041         #                            because the whole shape corresponds to the first argument.
1042         #                            Mainly to be used after transformations, but it also can be
1043         #                            useful after partition with one object shape, and some other
1044         #                            operations, where only the first argument has to be considered.
1045         #                            If theObject has only one argument shape, this flag is automatically
1046         #                            considered as True, not regarding really passed value.
1047         #  \param theAddPrefix add prefix "from_" to names of restored sub-shapes,
1048         #                      and prefix "from_subshapes_of_" to names of partially restored sub-shapes.
1049         #  \return list of published sub-shapes
1050         #
1051         #  @ref tui_restore_prs_params "Example"
1052         def RestoreSubShapes (self, theObject, theArgs=[], theFindMethod=GEOM.FSM_GetInPlace,
1053                               theInheritFirstArg=False, theAddPrefix=True):
1054             """
1055             Publish sub-shapes, standing for arguments and sub-shapes of arguments
1056             To be used from python scripts out of geompy.addToStudy (non-default usage)
1057
1058             Parameters:
1059                 theObject published GEOM.GEOM_Object, arguments of which will be published
1060                 theArgs   list of GEOM.GEOM_Object, operation arguments to be published.
1061                           If this list is empty, all operation arguments will be published
1062                 theFindMethod method to search sub-shapes, corresponding to arguments and
1063                               their sub-shapes. Value from enumeration GEOM.find_shape_method.
1064                 theInheritFirstArg set properties of the first argument for theObject.
1065                                    Do not publish sub-shapes in place of arguments, but only
1066                                    in place of sub-shapes of the first argument,
1067                                    because the whole shape corresponds to the first argument.
1068                                    Mainly to be used after transformations, but it also can be
1069                                    useful after partition with one object shape, and some other
1070                                    operations, where only the first argument has to be considered.
1071                                    If theObject has only one argument shape, this flag is automatically
1072                                    considered as True, not regarding really passed value.
1073                 theAddPrefix add prefix "from_" to names of restored sub-shapes,
1074                              and prefix "from_subshapes_of_" to names of partially restored sub-shapes.
1075             Returns:
1076                 list of published sub-shapes
1077             """
1078             # Example: see GEOM_TestAll.py
1079             return self.RestoreSubShapesO(theObject, theArgs,
1080                                           theFindMethod, theInheritFirstArg, theAddPrefix)
1081
1082         ## Publish sub-shapes, standing for arguments and sub-shapes of arguments
1083         #  To be used from python scripts out of addToStudy() (non-default usage)
1084         #  \param theObject published GEOM.GEOM_Object, arguments of which will be published
1085         #  \param theArgs   list of GEOM.GEOM_Object, operation arguments to be published.
1086         #                   If this list is empty, all operation arguments will be published
1087         #  \param theFindMethod method to search sub-shapes, corresponding to arguments and
1088         #                       their sub-shapes. Value from enumeration GEOM::find_shape_method.
1089         #  \param theInheritFirstArg set properties of the first argument for <VAR>theObject</VAR>.
1090         #                            Do not publish sub-shapes in place of arguments, but only
1091         #                            in place of sub-shapes of the first argument,
1092         #                            because the whole shape corresponds to the first argument.
1093         #                            Mainly to be used after transformations, but it also can be
1094         #                            useful after partition with one object shape, and some other
1095         #                            operations, where only the first argument has to be considered.
1096         #                            If theObject has only one argument shape, this flag is automatically
1097         #                            considered as True, not regarding really passed value.
1098         #  \param theAddPrefix add prefix "from_" to names of restored sub-shapes,
1099         #                      and prefix "from_subshapes_of_" to names of partially restored sub-shapes.
1100         #  \return list of published sub-shapes
1101         #
1102         #  @ref tui_restore_prs_params "Example"
1103         def RestoreGivenSubShapes (self, theObject, theArgs=[], theFindMethod=GEOM.FSM_GetInPlace,
1104                                    theInheritFirstArg=False, theAddPrefix=True):
1105             """
1106             Publish sub-shapes, standing for arguments and sub-shapes of arguments
1107             To be used from python scripts out of geompy.addToStudy() (non-default usage)
1108
1109             Parameters:
1110                 theObject published GEOM.GEOM_Object, arguments of which will be published
1111                 theArgs   list of GEOM.GEOM_Object, operation arguments to be published.
1112                           If this list is empty, all operation arguments will be published
1113                 theFindMethod method to search sub-shapes, corresponding to arguments and
1114                               their sub-shapes. Value from enumeration GEOM::find_shape_method.
1115                 theInheritFirstArg set properties of the first argument for theObject.
1116                                    Do not publish sub-shapes in place of arguments, but only
1117                                    in place of sub-shapes of the first argument,
1118                                    because the whole shape corresponds to the first argument.
1119                                    Mainly to be used after transformations, but it also can be
1120                                    useful after partition with one object shape, and some other
1121                                    operations, where only the first argument has to be considered.
1122                                    If theObject has only one argument shape, this flag is automatically
1123                                    considered as True, not regarding really passed value.
1124                 theAddPrefix add prefix "from_" to names of restored sub-shapes,
1125                              and prefix "from_subshapes_of_" to names of partially restored sub-shapes.
1126
1127             Returns:
1128                 list of published sub-shapes
1129             """
1130             # Example: see GEOM_TestAll.py
1131             return self.RestoreGivenSubShapesO(theObject, theArgs,
1132                                                theFindMethod, theInheritFirstArg, theAddPrefix)
1133
1134         # end of l3_restore_ss
1135         ## @}
1136
1137         ## @addtogroup l3_basic_go
1138         ## @{
1139
1140         ## Create point by three coordinates.
1141         #  @param theX The X coordinate of the point.
1142         #  @param theY The Y coordinate of the point.
1143         #  @param theZ The Z coordinate of the point.
1144         #  @param theName Object name; when specified, this parameter is used
1145         #         for result publication in the study. Otherwise, if automatic
1146         #         publication is switched on, default value is used for result name.
1147         #
1148         #  @return New GEOM.GEOM_Object, containing the created point.
1149         #
1150         #  @ref tui_creation_point "Example"
1151         @ManageTransactions("BasicOp")
1152         def MakeVertex(self, theX, theY, theZ, theName=None):
1153             """
1154             Create point by three coordinates.
1155
1156             Parameters:
1157                 theX The X coordinate of the point.
1158                 theY The Y coordinate of the point.
1159                 theZ The Z coordinate of the point.
1160                 theName Object name; when specified, this parameter is used
1161                         for result publication in the study. Otherwise, if automatic
1162                         publication is switched on, default value is used for result name.
1163
1164             Returns:
1165                 New GEOM.GEOM_Object, containing the created point.
1166             """
1167             # Example: see GEOM_TestAll.py
1168             theX,theY,theZ,Parameters = ParseParameters(theX, theY, theZ)
1169             anObj = self.BasicOp.MakePointXYZ(theX, theY, theZ)
1170             RaiseIfFailed("MakePointXYZ", self.BasicOp)
1171             anObj.SetParameters(Parameters)
1172             self._autoPublish(anObj, theName, "vertex")
1173             return anObj
1174
1175         ## Create a point, distant from the referenced point
1176         #  on the given distances along the coordinate axes.
1177         #  @param theReference The referenced point.
1178         #  @param theX Displacement from the referenced point along OX axis.
1179         #  @param theY Displacement from the referenced point along OY axis.
1180         #  @param theZ Displacement from the referenced point along OZ axis.
1181         #  @param theName Object name; when specified, this parameter is used
1182         #         for result publication in the study. Otherwise, if automatic
1183         #         publication is switched on, default value is used for result name.
1184         #
1185         #  @return New GEOM.GEOM_Object, containing the created point.
1186         #
1187         #  @ref tui_creation_point "Example"
1188         @ManageTransactions("BasicOp")
1189         def MakeVertexWithRef(self, theReference, theX, theY, theZ, theName=None):
1190             """
1191             Create a point, distant from the referenced point
1192             on the given distances along the coordinate axes.
1193
1194             Parameters:
1195                 theReference The referenced point.
1196                 theX Displacement from the referenced point along OX axis.
1197                 theY Displacement from the referenced point along OY axis.
1198                 theZ Displacement from the referenced point along OZ axis.
1199                 theName Object name; when specified, this parameter is used
1200                         for result publication in the study. Otherwise, if automatic
1201                         publication is switched on, default value is used for result name.
1202
1203             Returns:
1204                 New GEOM.GEOM_Object, containing the created point.
1205             """
1206             # Example: see GEOM_TestAll.py
1207             theX,theY,theZ,Parameters = ParseParameters(theX, theY, theZ)
1208             anObj = self.BasicOp.MakePointWithReference(theReference, theX, theY, theZ)
1209             RaiseIfFailed("MakePointWithReference", self.BasicOp)
1210             anObj.SetParameters(Parameters)
1211             self._autoPublish(anObj, theName, "vertex")
1212             return anObj
1213
1214         ## Create a point, corresponding to the given parameter on the given curve.
1215         #  @param theRefCurve The referenced curve.
1216         #  @param theParameter Value of parameter on the referenced curve.
1217         #  @param takeOrientationIntoAccount flag that tells if it is necessary
1218         #         to take the curve's orientation into account for the
1219         #         operation. I.e. if this flag is set, the results for the same
1220         #         parameters (except the value 0.5) is different for forward
1221         #         and reversed curves. If it is not set the result is the same.
1222         #  @param theName Object name; when specified, this parameter is used
1223         #         for result publication in the study. Otherwise, if automatic
1224         #         publication is switched on, default value is used for result name.
1225         #
1226         #  @return New GEOM.GEOM_Object, containing the created point.
1227         #
1228         #  @ref tui_creation_point "Example"
1229         @ManageTransactions("BasicOp")
1230         def MakeVertexOnCurve(self, theRefCurve, theParameter,
1231                               takeOrientationIntoAccount=False, theName=None):
1232             """
1233             Create a point, corresponding to the given parameter on the given curve.
1234
1235             Parameters:
1236                 theRefCurve The referenced curve.
1237                 theParameter Value of parameter on the referenced curve.
1238                 takeOrientationIntoAccount flag that tells if it is necessary
1239                         to take the curve's orientation into account for the
1240                         operation. I.e. if this flag is set, the results for
1241                         the same parameters (except the value 0.5) is different
1242                         for forward and reversed curves. If it is not set
1243                         the result is the same.
1244                 theName Object name; when specified, this parameter is used
1245                         for result publication in the study. Otherwise, if automatic
1246                         publication is switched on, default value is used for result name.
1247
1248             Returns:
1249                 New GEOM.GEOM_Object, containing the created point.
1250
1251             Example of usage:
1252                 p_on_arc = geompy.MakeVertexOnCurve(Arc, 0.25)
1253             """
1254             # Example: see GEOM_TestAll.py
1255             theParameter, takeOrientationIntoAccount, Parameters = ParseParameters(
1256                 theParameter, takeOrientationIntoAccount)
1257             anObj = self.BasicOp.MakePointOnCurve(theRefCurve, theParameter,
1258                                                   takeOrientationIntoAccount)
1259             RaiseIfFailed("MakePointOnCurve", self.BasicOp)
1260             anObj.SetParameters(Parameters)
1261             self._autoPublish(anObj, theName, "vertex")
1262             return anObj
1263
1264         ## Create a point by projection give coordinates on the given curve
1265         #  @param theRefCurve The referenced curve.
1266         #  @param theX X-coordinate in 3D space
1267         #  @param theY Y-coordinate in 3D space
1268         #  @param theZ Z-coordinate in 3D space
1269         #  @param theName Object name; when specified, this parameter is used
1270         #         for result publication in the study. Otherwise, if automatic
1271         #         publication is switched on, default value is used for result name.
1272         #
1273         #  @return New GEOM.GEOM_Object, containing the created point.
1274         #
1275         #  @ref tui_creation_point "Example"
1276         @ManageTransactions("BasicOp")
1277         def MakeVertexOnCurveByCoord(self, theRefCurve, theX, theY, theZ, theName=None):
1278             """
1279             Create a point by projection give coordinates on the given curve
1280
1281             Parameters:
1282                 theRefCurve The referenced curve.
1283                 theX X-coordinate in 3D space
1284                 theY Y-coordinate in 3D space
1285                 theZ Z-coordinate in 3D space
1286                 theName Object name; when specified, this parameter is used
1287                         for result publication in the study. Otherwise, if automatic
1288                         publication is switched on, default value is used for result name.
1289
1290             Returns:
1291                 New GEOM.GEOM_Object, containing the created point.
1292
1293             Example of usage:
1294                 p_on_arc3 = geompy.MakeVertexOnCurveByCoord(Arc, 100, -10, 10)
1295             """
1296             # Example: see GEOM_TestAll.py
1297             theX, theY, theZ, Parameters = ParseParameters(theX, theY, theZ)
1298             anObj = self.BasicOp.MakePointOnCurveByCoord(theRefCurve, theX, theY, theZ)
1299             RaiseIfFailed("MakeVertexOnCurveByCoord", self.BasicOp)
1300             anObj.SetParameters(Parameters)
1301             self._autoPublish(anObj, theName, "vertex")
1302             return anObj
1303
1304         ## Create a point, corresponding to the given length on the given curve.
1305         #  @param theRefCurve The referenced curve.
1306         #  @param theLength Length on the referenced curve. It can be negative.
1307         #  @param theStartPoint Point allowing to choose the direction for the calculation
1308         #                       of the length. If None, start from the first point of theRefCurve.
1309         #  @param theName Object name; when specified, this parameter is used
1310         #         for result publication in the study. Otherwise, if automatic
1311         #         publication is switched on, default value is used for result name.
1312         #
1313         #  @return New GEOM.GEOM_Object, containing the created point.
1314         #
1315         #  @ref tui_creation_point "Example"
1316         @ManageTransactions("BasicOp")
1317         def MakeVertexOnCurveByLength(self, theRefCurve, theLength, theStartPoint = None, theName=None):
1318             """
1319             Create a point, corresponding to the given length on the given curve.
1320
1321             Parameters:
1322                 theRefCurve The referenced curve.
1323                 theLength Length on the referenced curve. It can be negative.
1324                 theStartPoint Point allowing to choose the direction for the calculation
1325                               of the length. If None, start from the first point of theRefCurve.
1326                 theName Object name; when specified, this parameter is used
1327                         for result publication in the study. Otherwise, if automatic
1328                         publication is switched on, default value is used for result name.
1329
1330             Returns:
1331                 New GEOM.GEOM_Object, containing the created point.
1332             """
1333             # Example: see GEOM_TestAll.py
1334             theLength, Parameters = ParseParameters(theLength)
1335             anObj = self.BasicOp.MakePointOnCurveByLength(theRefCurve, theLength, theStartPoint)
1336             RaiseIfFailed("MakePointOnCurveByLength", self.BasicOp)
1337             anObj.SetParameters(Parameters)
1338             self._autoPublish(anObj, theName, "vertex")
1339             return anObj
1340
1341         ## Create a point, corresponding to the given parameters on the
1342         #    given surface.
1343         #  @param theRefSurf The referenced surface.
1344         #  @param theUParameter Value of U-parameter on the referenced surface.
1345         #  @param theVParameter Value of V-parameter on the referenced surface.
1346         #  @param theName Object name; when specified, this parameter is used
1347         #         for result publication in the study. Otherwise, if automatic
1348         #         publication is switched on, default value is used for result name.
1349         #
1350         #  @return New GEOM.GEOM_Object, containing the created point.
1351         #
1352         #  @ref swig_MakeVertexOnSurface "Example"
1353         @ManageTransactions("BasicOp")
1354         def MakeVertexOnSurface(self, theRefSurf, theUParameter, theVParameter, theName=None):
1355             """
1356             Create a point, corresponding to the given parameters on the
1357             given surface.
1358
1359             Parameters:
1360                 theRefSurf The referenced surface.
1361                 theUParameter Value of U-parameter on the referenced surface.
1362                 theVParameter Value of V-parameter on the referenced surface.
1363                 theName Object name; when specified, this parameter is used
1364                         for result publication in the study. Otherwise, if automatic
1365                         publication is switched on, default value is used for result name.
1366
1367             Returns:
1368                 New GEOM.GEOM_Object, containing the created point.
1369
1370             Example of usage:
1371                 p_on_face = geompy.MakeVertexOnSurface(Face, 0.1, 0.8)
1372             """
1373             theUParameter, theVParameter, Parameters = ParseParameters(theUParameter, theVParameter)
1374             # Example: see GEOM_TestAll.py
1375             anObj = self.BasicOp.MakePointOnSurface(theRefSurf, theUParameter, theVParameter)
1376             RaiseIfFailed("MakePointOnSurface", self.BasicOp)
1377             anObj.SetParameters(Parameters);
1378             self._autoPublish(anObj, theName, "vertex")
1379             return anObj
1380
1381         ## Create a point by projection give coordinates on the given surface
1382         #  @param theRefSurf The referenced surface.
1383         #  @param theX X-coordinate in 3D space
1384         #  @param theY Y-coordinate in 3D space
1385         #  @param theZ Z-coordinate in 3D space
1386         #  @param theName Object name; when specified, this parameter is used
1387         #         for result publication in the study. Otherwise, if automatic
1388         #         publication is switched on, default value is used for result name.
1389         #
1390         #  @return New GEOM.GEOM_Object, containing the created point.
1391         #
1392         #  @ref swig_MakeVertexOnSurfaceByCoord "Example"
1393         @ManageTransactions("BasicOp")
1394         def MakeVertexOnSurfaceByCoord(self, theRefSurf, theX, theY, theZ, theName=None):
1395             """
1396             Create a point by projection give coordinates on the given surface
1397
1398             Parameters:
1399                 theRefSurf The referenced surface.
1400                 theX X-coordinate in 3D space
1401                 theY Y-coordinate in 3D space
1402                 theZ Z-coordinate in 3D space
1403                 theName Object name; when specified, this parameter is used
1404                         for result publication in the study. Otherwise, if automatic
1405                         publication is switched on, default value is used for result name.
1406
1407             Returns:
1408                 New GEOM.GEOM_Object, containing the created point.
1409
1410             Example of usage:
1411                 p_on_face2 = geompy.MakeVertexOnSurfaceByCoord(Face, 0., 0., 0.)
1412             """
1413             theX, theY, theZ, Parameters = ParseParameters(theX, theY, theZ)
1414             # Example: see GEOM_TestAll.py
1415             anObj = self.BasicOp.MakePointOnSurfaceByCoord(theRefSurf, theX, theY, theZ)
1416             RaiseIfFailed("MakeVertexOnSurfaceByCoord", self.BasicOp)
1417             anObj.SetParameters(Parameters);
1418             self._autoPublish(anObj, theName, "vertex")
1419             return anObj
1420
1421         ## Create a point, which lays on the given face.
1422         #  The point will lay in arbitrary place of the face.
1423         #  The only condition on it is a non-zero distance to the face boundary.
1424         #  Such point can be used to uniquely identify the face inside any
1425         #  shape in case, when the shape does not contain overlapped faces.
1426         #  @param theFace The referenced face.
1427         #  @param theName Object name; when specified, this parameter is used
1428         #         for result publication in the study. Otherwise, if automatic
1429         #         publication is switched on, default value is used for result name.
1430         #
1431         #  @return New GEOM.GEOM_Object, containing the created point.
1432         #
1433         #  @ref swig_MakeVertexInsideFace "Example"
1434         @ManageTransactions("BasicOp")
1435         def MakeVertexInsideFace (self, theFace, theName=None):
1436             """
1437             Create a point, which lays on the given face.
1438             The point will lay in arbitrary place of the face.
1439             The only condition on it is a non-zero distance to the face boundary.
1440             Such point can be used to uniquely identify the face inside any
1441             shape in case, when the shape does not contain overlapped faces.
1442
1443             Parameters:
1444                 theFace The referenced face.
1445                 theName Object name; when specified, this parameter is used
1446                         for result publication in the study. Otherwise, if automatic
1447                         publication is switched on, default value is used for result name.
1448
1449             Returns:
1450                 New GEOM.GEOM_Object, containing the created point.
1451
1452             Example of usage:
1453                 p_on_face = geompy.MakeVertexInsideFace(Face)
1454             """
1455             # Example: see GEOM_TestAll.py
1456             anObj = self.BasicOp.MakePointOnFace(theFace)
1457             RaiseIfFailed("MakeVertexInsideFace", self.BasicOp)
1458             self._autoPublish(anObj, theName, "vertex")
1459             return anObj
1460
1461         ## Create a point on intersection of two lines.
1462         #  @param theRefLine1, theRefLine2 The referenced lines.
1463         #  @param theName Object name; when specified, this parameter is used
1464         #         for result publication in the study. Otherwise, if automatic
1465         #         publication is switched on, default value is used for result name.
1466         #
1467         #  @return New GEOM.GEOM_Object, containing the created point.
1468         #
1469         #  @ref swig_MakeVertexOnLinesIntersection "Example"
1470         @ManageTransactions("BasicOp")
1471         def MakeVertexOnLinesIntersection(self, theRefLine1, theRefLine2, theName=None):
1472             """
1473             Create a point on intersection of two lines.
1474
1475             Parameters:
1476                 theRefLine1, theRefLine2 The referenced lines.
1477                 theName Object name; when specified, this parameter is used
1478                         for result publication in the study. Otherwise, if automatic
1479                         publication is switched on, default value is used for result name.
1480
1481             Returns:
1482                 New GEOM.GEOM_Object, containing the created point.
1483             """
1484             # Example: see GEOM_TestAll.py
1485             anObj = self.BasicOp.MakePointOnLinesIntersection(theRefLine1, theRefLine2)
1486             RaiseIfFailed("MakePointOnLinesIntersection", self.BasicOp)
1487             self._autoPublish(anObj, theName, "vertex")
1488             return anObj
1489
1490         ## Create a tangent, corresponding to the given parameter on the given curve.
1491         #  @param theRefCurve The referenced curve.
1492         #  @param theParameter Value of parameter on the referenced curve.
1493         #  @param theName Object name; when specified, this parameter is used
1494         #         for result publication in the study. Otherwise, if automatic
1495         #         publication is switched on, default value is used for result name.
1496         #
1497         #  @return New GEOM.GEOM_Object, containing the created tangent.
1498         #
1499         #  @ref swig_MakeTangentOnCurve "Example"
1500         @ManageTransactions("BasicOp")
1501         def MakeTangentOnCurve(self, theRefCurve, theParameter, theName=None):
1502             """
1503             Create a tangent, corresponding to the given parameter on the given curve.
1504
1505             Parameters:
1506                 theRefCurve The referenced curve.
1507                 theParameter Value of parameter on the referenced curve.
1508                 theName Object name; when specified, this parameter is used
1509                         for result publication in the study. Otherwise, if automatic
1510                         publication is switched on, default value is used for result name.
1511
1512             Returns:
1513                 New GEOM.GEOM_Object, containing the created tangent.
1514
1515             Example of usage:
1516                 tan_on_arc = geompy.MakeTangentOnCurve(Arc, 0.7)
1517             """
1518             anObj = self.BasicOp.MakeTangentOnCurve(theRefCurve, theParameter)
1519             RaiseIfFailed("MakeTangentOnCurve", self.BasicOp)
1520             self._autoPublish(anObj, theName, "tangent")
1521             return anObj
1522
1523         ## Create a tangent plane, corresponding to the given parameter on the given face.
1524         #  @param theFace The face for which tangent plane should be built.
1525         #  @param theParameterV vertical value of the center point (0.0 - 1.0).
1526         #  @param theParameterU horisontal value of the center point (0.0 - 1.0).
1527         #  @param theTrimSize the size of plane.
1528         #  @param theName Object name; when specified, this parameter is used
1529         #         for result publication in the study. Otherwise, if automatic
1530         #         publication is switched on, default value is used for result name.
1531         #
1532         #  @return New GEOM.GEOM_Object, containing the created tangent.
1533         #
1534         #  @ref swig_MakeTangentPlaneOnFace "Example"
1535         @ManageTransactions("BasicOp")
1536         def MakeTangentPlaneOnFace(self, theFace, theParameterU, theParameterV, theTrimSize, theName=None):
1537             """
1538             Create a tangent plane, corresponding to the given parameter on the given face.
1539
1540             Parameters:
1541                 theFace The face for which tangent plane should be built.
1542                 theParameterV vertical value of the center point (0.0 - 1.0).
1543                 theParameterU horisontal value of the center point (0.0 - 1.0).
1544                 theTrimSize the size of plane.
1545                 theName Object name; when specified, this parameter is used
1546                         for result publication in the study. Otherwise, if automatic
1547                         publication is switched on, default value is used for result name.
1548
1549            Returns:
1550                 New GEOM.GEOM_Object, containing the created tangent.
1551
1552            Example of usage:
1553                 an_on_face = geompy.MakeTangentPlaneOnFace(tan_extrusion, 0.7, 0.5, 150)
1554             """
1555             anObj = self.BasicOp.MakeTangentPlaneOnFace(theFace, theParameterU, theParameterV, theTrimSize)
1556             RaiseIfFailed("MakeTangentPlaneOnFace", self.BasicOp)
1557             self._autoPublish(anObj, theName, "tangent")
1558             return anObj
1559
1560         ## Create a vector with the given components.
1561         #  @param theDX X component of the vector.
1562         #  @param theDY Y component of the vector.
1563         #  @param theDZ Z component of the vector.
1564         #  @param theName Object name; when specified, this parameter is used
1565         #         for result publication in the study. Otherwise, if automatic
1566         #         publication is switched on, default value is used for result name.
1567         #
1568         #  @return New GEOM.GEOM_Object, containing the created vector.
1569         #
1570         #  @ref tui_creation_vector "Example"
1571         @ManageTransactions("BasicOp")
1572         def MakeVectorDXDYDZ(self, theDX, theDY, theDZ, theName=None):
1573             """
1574             Create a vector with the given components.
1575
1576             Parameters:
1577                 theDX X component of the vector.
1578                 theDY Y component of the vector.
1579                 theDZ Z component of the vector.
1580                 theName Object name; when specified, this parameter is used
1581                         for result publication in the study. Otherwise, if automatic
1582                         publication is switched on, default value is used for result name.
1583
1584             Returns:
1585                 New GEOM.GEOM_Object, containing the created vector.
1586             """
1587             # Example: see GEOM_TestAll.py
1588             theDX,theDY,theDZ,Parameters = ParseParameters(theDX, theDY, theDZ)
1589             anObj = self.BasicOp.MakeVectorDXDYDZ(theDX, theDY, theDZ)
1590             RaiseIfFailed("MakeVectorDXDYDZ", self.BasicOp)
1591             anObj.SetParameters(Parameters)
1592             self._autoPublish(anObj, theName, "vector")
1593             return anObj
1594
1595         ## Create a vector between two points.
1596         #  @param thePnt1 Start point for the vector.
1597         #  @param thePnt2 End point for the vector.
1598         #  @param theName Object name; when specified, this parameter is used
1599         #         for result publication in the study. Otherwise, if automatic
1600         #         publication is switched on, default value is used for result name.
1601         #
1602         #  @return New GEOM.GEOM_Object, containing the created vector.
1603         #
1604         #  @ref tui_creation_vector "Example"
1605         @ManageTransactions("BasicOp")
1606         def MakeVector(self, thePnt1, thePnt2, theName=None):
1607             """
1608             Create a vector between two points.
1609
1610             Parameters:
1611                 thePnt1 Start point for the vector.
1612                 thePnt2 End point for the vector.
1613                 theName Object name; when specified, this parameter is used
1614                         for result publication in the study. Otherwise, if automatic
1615                         publication is switched on, default value is used for result name.
1616
1617             Returns:
1618                 New GEOM.GEOM_Object, containing the created vector.
1619             """
1620             # Example: see GEOM_TestAll.py
1621             anObj = self.BasicOp.MakeVectorTwoPnt(thePnt1, thePnt2)
1622             RaiseIfFailed("MakeVectorTwoPnt", self.BasicOp)
1623             self._autoPublish(anObj, theName, "vector")
1624             return anObj
1625
1626         ## Create a line, passing through the given point
1627         #  and parallel to the given direction
1628         #  @param thePnt Point. The resulting line will pass through it.
1629         #  @param theDir Direction. The resulting line will be parallel to it.
1630         #  @param theName Object name; when specified, this parameter is used
1631         #         for result publication in the study. Otherwise, if automatic
1632         #         publication is switched on, default value is used for result name.
1633         #
1634         #  @return New GEOM.GEOM_Object, containing the created line.
1635         #
1636         #  @ref tui_creation_line "Example"
1637         @ManageTransactions("BasicOp")
1638         def MakeLine(self, thePnt, theDir, theName=None):
1639             """
1640             Create a line, passing through the given point
1641             and parallel to the given direction
1642
1643             Parameters:
1644                 thePnt Point. The resulting line will pass through it.
1645                 theDir Direction. The resulting line will be parallel to it.
1646                 theName Object name; when specified, this parameter is used
1647                         for result publication in the study. Otherwise, if automatic
1648                         publication is switched on, default value is used for result name.
1649
1650             Returns:
1651                 New GEOM.GEOM_Object, containing the created line.
1652             """
1653             # Example: see GEOM_TestAll.py
1654             anObj = self.BasicOp.MakeLine(thePnt, theDir)
1655             RaiseIfFailed("MakeLine", self.BasicOp)
1656             self._autoPublish(anObj, theName, "line")
1657             return anObj
1658
1659         ## Create a line, passing through the given points
1660         #  @param thePnt1 First of two points, defining the line.
1661         #  @param thePnt2 Second of two points, defining the line.
1662         #  @param theName Object name; when specified, this parameter is used
1663         #         for result publication in the study. Otherwise, if automatic
1664         #         publication is switched on, default value is used for result name.
1665         #
1666         #  @return New GEOM.GEOM_Object, containing the created line.
1667         #
1668         #  @ref tui_creation_line "Example"
1669         @ManageTransactions("BasicOp")
1670         def MakeLineTwoPnt(self, thePnt1, thePnt2, theName=None):
1671             """
1672             Create a line, passing through the given points
1673
1674             Parameters:
1675                 thePnt1 First of two points, defining the line.
1676                 thePnt2 Second of two points, defining the line.
1677                 theName Object name; when specified, this parameter is used
1678                         for result publication in the study. Otherwise, if automatic
1679                         publication is switched on, default value is used for result name.
1680
1681             Returns:
1682                 New GEOM.GEOM_Object, containing the created line.
1683             """
1684             # Example: see GEOM_TestAll.py
1685             anObj = self.BasicOp.MakeLineTwoPnt(thePnt1, thePnt2)
1686             RaiseIfFailed("MakeLineTwoPnt", self.BasicOp)
1687             self._autoPublish(anObj, theName, "line")
1688             return anObj
1689
1690         ## Create a line on two faces intersection.
1691         #  @param theFace1 First of two faces, defining the line.
1692         #  @param theFace2 Second of two faces, defining the line.
1693         #  @param theName Object name; when specified, this parameter is used
1694         #         for result publication in the study. Otherwise, if automatic
1695         #         publication is switched on, default value is used for result name.
1696         #
1697         #  @return New GEOM.GEOM_Object, containing the created line.
1698         #
1699         #  @ref swig_MakeLineTwoFaces "Example"
1700         @ManageTransactions("BasicOp")
1701         def MakeLineTwoFaces(self, theFace1, theFace2, theName=None):
1702             """
1703             Create a line on two faces intersection.
1704
1705             Parameters:
1706                 theFace1 First of two faces, defining the line.
1707                 theFace2 Second of two faces, defining the line.
1708                 theName Object name; when specified, this parameter is used
1709                         for result publication in the study. Otherwise, if automatic
1710                         publication is switched on, default value is used for result name.
1711
1712             Returns:
1713                 New GEOM.GEOM_Object, containing the created line.
1714             """
1715             # Example: see GEOM_TestAll.py
1716             anObj = self.BasicOp.MakeLineTwoFaces(theFace1, theFace2)
1717             RaiseIfFailed("MakeLineTwoFaces", self.BasicOp)
1718             self._autoPublish(anObj, theName, "line")
1719             return anObj
1720
1721         ## Create a plane, passing through the given point
1722         #  and normal to the given vector.
1723         #  @param thePnt Point, the plane has to pass through.
1724         #  @param theVec Vector, defining the plane normal direction.
1725         #  @param theTrimSize Half size of a side of quadrangle face, representing the plane.
1726         #  @param theName Object name; when specified, this parameter is used
1727         #         for result publication in the study. Otherwise, if automatic
1728         #         publication is switched on, default value is used for result name.
1729         #
1730         #  @return New GEOM.GEOM_Object, containing the created plane.
1731         #
1732         #  @ref tui_creation_plane "Example"
1733         @ManageTransactions("BasicOp")
1734         def MakePlane(self, thePnt, theVec, theTrimSize, theName=None):
1735             """
1736             Create a plane, passing through the given point
1737             and normal to the given vector.
1738
1739             Parameters:
1740                 thePnt Point, the plane has to pass through.
1741                 theVec Vector, defining the plane normal direction.
1742                 theTrimSize Half size of a side of quadrangle face, representing the plane.
1743                 theName Object name; when specified, this parameter is used
1744                         for result publication in the study. Otherwise, if automatic
1745                         publication is switched on, default value is used for result name.
1746
1747             Returns:
1748                 New GEOM.GEOM_Object, containing the created plane.
1749             """
1750             # Example: see GEOM_TestAll.py
1751             theTrimSize, Parameters = ParseParameters(theTrimSize);
1752             anObj = self.BasicOp.MakePlanePntVec(thePnt, theVec, theTrimSize)
1753             RaiseIfFailed("MakePlanePntVec", self.BasicOp)
1754             anObj.SetParameters(Parameters)
1755             self._autoPublish(anObj, theName, "plane")
1756             return anObj
1757
1758         ## Create a plane, passing through the three given points
1759         #  @param thePnt1 First of three points, defining the plane.
1760         #  @param thePnt2 Second of three points, defining the plane.
1761         #  @param thePnt3 Third of three points, defining the plane.
1762         #  @param theTrimSize Half size of a side of quadrangle face, representing the plane.
1763         #  @param theName Object name; when specified, this parameter is used
1764         #         for result publication in the study. Otherwise, if automatic
1765         #         publication is switched on, default value is used for result name.
1766         #
1767         #  @return New GEOM.GEOM_Object, containing the created plane.
1768         #
1769         #  @ref tui_creation_plane "Example"
1770         @ManageTransactions("BasicOp")
1771         def MakePlaneThreePnt(self, thePnt1, thePnt2, thePnt3, theTrimSize, theName=None):
1772             """
1773             Create a plane, passing through the three given points
1774
1775             Parameters:
1776                 thePnt1 First of three points, defining the plane.
1777                 thePnt2 Second of three points, defining the plane.
1778                 thePnt3 Third of three points, defining the plane.
1779                 theTrimSize Half size of a side of quadrangle face, representing the plane.
1780                 theName Object name; when specified, this parameter is used
1781                         for result publication in the study. Otherwise, if automatic
1782                         publication is switched on, default value is used for result name.
1783
1784             Returns:
1785                 New GEOM.GEOM_Object, containing the created plane.
1786             """
1787             # Example: see GEOM_TestAll.py
1788             theTrimSize, Parameters = ParseParameters(theTrimSize);
1789             anObj = self.BasicOp.MakePlaneThreePnt(thePnt1, thePnt2, thePnt3, theTrimSize)
1790             RaiseIfFailed("MakePlaneThreePnt", self.BasicOp)
1791             anObj.SetParameters(Parameters)
1792             self._autoPublish(anObj, theName, "plane")
1793             return anObj
1794
1795         ## Create a plane, similar to the existing one, but with another size of representing face.
1796         #  @param theFace Referenced plane or LCS(Marker).
1797         #  @param theTrimSize New half size of a side of quadrangle face, representing the plane.
1798         #  @param theName Object name; when specified, this parameter is used
1799         #         for result publication in the study. Otherwise, if automatic
1800         #         publication is switched on, default value is used for result name.
1801         #
1802         #  @return New GEOM.GEOM_Object, containing the created plane.
1803         #
1804         #  @ref tui_creation_plane "Example"
1805         @ManageTransactions("BasicOp")
1806         def MakePlaneFace(self, theFace, theTrimSize, theName=None):
1807             """
1808             Create a plane, similar to the existing one, but with another size of representing face.
1809
1810             Parameters:
1811                 theFace Referenced plane or LCS(Marker).
1812                 theTrimSize New half size of a side of quadrangle face, representing the plane.
1813                 theName Object name; when specified, this parameter is used
1814                         for result publication in the study. Otherwise, if automatic
1815                         publication is switched on, default value is used for result name.
1816
1817             Returns:
1818                 New GEOM.GEOM_Object, containing the created plane.
1819             """
1820             # Example: see GEOM_TestAll.py
1821             theTrimSize, Parameters = ParseParameters(theTrimSize);
1822             anObj = self.BasicOp.MakePlaneFace(theFace, theTrimSize)
1823             RaiseIfFailed("MakePlaneFace", self.BasicOp)
1824             anObj.SetParameters(Parameters)
1825             self._autoPublish(anObj, theName, "plane")
1826             return anObj
1827
1828         ## Create a plane, passing through the 2 vectors
1829         #  with center in a start point of the first vector.
1830         #  @param theVec1 Vector, defining center point and plane direction.
1831         #  @param theVec2 Vector, defining the plane normal direction.
1832         #  @param theTrimSize Half size of a side of quadrangle face, representing the plane.
1833         #  @param theName Object name; when specified, this parameter is used
1834         #         for result publication in the study. Otherwise, if automatic
1835         #         publication is switched on, default value is used for result name.
1836         #
1837         #  @return New GEOM.GEOM_Object, containing the created plane.
1838         #
1839         #  @ref tui_creation_plane "Example"
1840         @ManageTransactions("BasicOp")
1841         def MakePlane2Vec(self, theVec1, theVec2, theTrimSize, theName=None):
1842             """
1843             Create a plane, passing through the 2 vectors
1844             with center in a start point of the first vector.
1845
1846             Parameters:
1847                 theVec1 Vector, defining center point and plane direction.
1848                 theVec2 Vector, defining the plane normal direction.
1849                 theTrimSize Half size of a side of quadrangle face, representing the plane.
1850                 theName Object name; when specified, this parameter is used
1851                         for result publication in the study. Otherwise, if automatic
1852                         publication is switched on, default value is used for result name.
1853
1854             Returns:
1855                 New GEOM.GEOM_Object, containing the created plane.
1856             """
1857             # Example: see GEOM_TestAll.py
1858             theTrimSize, Parameters = ParseParameters(theTrimSize);
1859             anObj = self.BasicOp.MakePlane2Vec(theVec1, theVec2, theTrimSize)
1860             RaiseIfFailed("MakePlane2Vec", self.BasicOp)
1861             anObj.SetParameters(Parameters)
1862             self._autoPublish(anObj, theName, "plane")
1863             return anObj
1864
1865         ## Create a plane, based on a Local coordinate system.
1866         #  @param theLCS  coordinate system, defining plane.
1867         #  @param theTrimSize Half size of a side of quadrangle face, representing the plane.
1868         #  @param theOrientation OXY, OYZ or OZX orientation - (1, 2 or 3)
1869         #  @param theName Object name; when specified, this parameter is used
1870         #         for result publication in the study. Otherwise, if automatic
1871         #         publication is switched on, default value is used for result name.
1872         #
1873         #  @return New GEOM.GEOM_Object, containing the created plane.
1874         #
1875         #  @ref tui_creation_plane "Example"
1876         @ManageTransactions("BasicOp")
1877         def MakePlaneLCS(self, theLCS, theTrimSize, theOrientation, theName=None):
1878             """
1879             Create a plane, based on a Local coordinate system.
1880
1881            Parameters:
1882                 theLCS  coordinate system, defining plane.
1883                 theTrimSize Half size of a side of quadrangle face, representing the plane.
1884                 theOrientation OXY, OYZ or OZX orientation - (1, 2 or 3)
1885                 theName Object name; when specified, this parameter is used
1886                         for result publication in the study. Otherwise, if automatic
1887                         publication is switched on, default value is used for result name.
1888
1889             Returns:
1890                 New GEOM.GEOM_Object, containing the created plane.
1891             """
1892             # Example: see GEOM_TestAll.py
1893             theTrimSize, Parameters = ParseParameters(theTrimSize);
1894             anObj = self.BasicOp.MakePlaneLCS(theLCS, theTrimSize, theOrientation)
1895             RaiseIfFailed("MakePlaneLCS", self.BasicOp)
1896             anObj.SetParameters(Parameters)
1897             self._autoPublish(anObj, theName, "plane")
1898             return anObj
1899
1900         ## Create a local coordinate system.
1901         #  @param OX,OY,OZ Three coordinates of coordinate system origin.
1902         #  @param XDX,XDY,XDZ Three components of OX direction
1903         #  @param YDX,YDY,YDZ Three components of OY direction
1904         #  @param theName Object name; when specified, this parameter is used
1905         #         for result publication in the study. Otherwise, if automatic
1906         #         publication is switched on, default value is used for result name.
1907         #
1908         #  @return New GEOM.GEOM_Object, containing the created coordinate system.
1909         #
1910         #  @ref swig_MakeMarker "Example"
1911         @ManageTransactions("BasicOp")
1912         def MakeMarker(self, OX,OY,OZ, XDX,XDY,XDZ, YDX,YDY,YDZ, theName=None):
1913             """
1914             Create a local coordinate system.
1915
1916             Parameters:
1917                 OX,OY,OZ Three coordinates of coordinate system origin.
1918                 XDX,XDY,XDZ Three components of OX direction
1919                 YDX,YDY,YDZ Three components of OY direction
1920                 theName Object name; when specified, this parameter is used
1921                         for result publication in the study. Otherwise, if automatic
1922                         publication is switched on, default value is used for result name.
1923
1924             Returns:
1925                 New GEOM.GEOM_Object, containing the created coordinate system.
1926             """
1927             # Example: see GEOM_TestAll.py
1928             OX,OY,OZ, XDX,XDY,XDZ, YDX,YDY,YDZ, Parameters = ParseParameters(OX,OY,OZ, XDX,XDY,XDZ, YDX,YDY,YDZ);
1929             anObj = self.BasicOp.MakeMarker(OX,OY,OZ, XDX,XDY,XDZ, YDX,YDY,YDZ)
1930             RaiseIfFailed("MakeMarker", self.BasicOp)
1931             anObj.SetParameters(Parameters)
1932             self._autoPublish(anObj, theName, "lcs")
1933             return anObj
1934
1935         ## Create a local coordinate system from shape.
1936         #  @param theShape The initial shape to detect the coordinate system.
1937         #  @param theName Object name; when specified, this parameter is used
1938         #         for result publication in the study. Otherwise, if automatic
1939         #         publication is switched on, default value is used for result name.
1940         #
1941         #  @return New GEOM.GEOM_Object, containing the created coordinate system.
1942         #
1943         #  @ref tui_creation_lcs "Example"
1944         @ManageTransactions("BasicOp")
1945         def MakeMarkerFromShape(self, theShape, theName=None):
1946             """
1947             Create a local coordinate system from shape.
1948
1949             Parameters:
1950                 theShape The initial shape to detect the coordinate system.
1951                 theName Object name; when specified, this parameter is used
1952                         for result publication in the study. Otherwise, if automatic
1953                         publication is switched on, default value is used for result name.
1954
1955             Returns:
1956                 New GEOM.GEOM_Object, containing the created coordinate system.
1957             """
1958             anObj = self.BasicOp.MakeMarkerFromShape(theShape)
1959             RaiseIfFailed("MakeMarkerFromShape", self.BasicOp)
1960             self._autoPublish(anObj, theName, "lcs")
1961             return anObj
1962
1963         ## Create a local coordinate system from point and two vectors.
1964         #  @param theOrigin Point of coordinate system origin.
1965         #  @param theXVec Vector of X direction
1966         #  @param theYVec Vector of Y direction
1967         #  @param theName Object name; when specified, this parameter is used
1968         #         for result publication in the study. Otherwise, if automatic
1969         #         publication is switched on, default value is used for result name.
1970         #
1971         #  @return New GEOM.GEOM_Object, containing the created coordinate system.
1972         #
1973         #  @ref tui_creation_lcs "Example"
1974         @ManageTransactions("BasicOp")
1975         def MakeMarkerPntTwoVec(self, theOrigin, theXVec, theYVec, theName=None):
1976             """
1977             Create a local coordinate system from point and two vectors.
1978
1979             Parameters:
1980                 theOrigin Point of coordinate system origin.
1981                 theXVec Vector of X direction
1982                 theYVec Vector of Y direction
1983                 theName Object name; when specified, this parameter is used
1984                         for result publication in the study. Otherwise, if automatic
1985                         publication is switched on, default value is used for result name.
1986
1987             Returns:
1988                 New GEOM.GEOM_Object, containing the created coordinate system.
1989
1990             """
1991             anObj = self.BasicOp.MakeMarkerPntTwoVec(theOrigin, theXVec, theYVec)
1992             RaiseIfFailed("MakeMarkerPntTwoVec", self.BasicOp)
1993             self._autoPublish(anObj, theName, "lcs")
1994             return anObj
1995
1996         # end of l3_basic_go
1997         ## @}
1998
1999         ## @addtogroup l4_curves
2000         ## @{
2001
2002         ##  Create an arc of circle, passing through three given points.
2003         #  @param thePnt1 Start point of the arc.
2004         #  @param thePnt2 Middle point of the arc.
2005         #  @param thePnt3 End point of the arc.
2006         #  @param theName Object name; when specified, this parameter is used
2007         #         for result publication in the study. Otherwise, if automatic
2008         #         publication is switched on, default value is used for result name.
2009         #
2010         #  @return New GEOM.GEOM_Object, containing the created arc.
2011         #
2012         #  @ref swig_MakeArc "Example"
2013         @ManageTransactions("CurvesOp")
2014         def MakeArc(self, thePnt1, thePnt2, thePnt3, theName=None):
2015             """
2016             Create an arc of circle, passing through three given points.
2017
2018             Parameters:
2019                 thePnt1 Start point of the arc.
2020                 thePnt2 Middle point of the arc.
2021                 thePnt3 End point of the arc.
2022                 theName Object name; when specified, this parameter is used
2023                         for result publication in the study. Otherwise, if automatic
2024                         publication is switched on, default value is used for result name.
2025
2026             Returns:
2027                 New GEOM.GEOM_Object, containing the created arc.
2028             """
2029             # Example: see GEOM_TestAll.py
2030             anObj = self.CurvesOp.MakeArc(thePnt1, thePnt2, thePnt3)
2031             RaiseIfFailed("MakeArc", self.CurvesOp)
2032             self._autoPublish(anObj, theName, "arc")
2033             return anObj
2034
2035         ##  Create an arc of circle from a center and 2 points.
2036         #  @param thePnt1 Center of the arc
2037         #  @param thePnt2 Start point of the arc. (Gives also the radius of the arc)
2038         #  @param thePnt3 End point of the arc (Gives also a direction)
2039         #  @param theSense Orientation of the arc
2040         #  @param theName Object name; when specified, this parameter is used
2041         #         for result publication in the study. Otherwise, if automatic
2042         #         publication is switched on, default value is used for result name.
2043         #
2044         #  @return New GEOM.GEOM_Object, containing the created arc.
2045         #
2046         #  @ref swig_MakeArc "Example"
2047         @ManageTransactions("CurvesOp")
2048         def MakeArcCenter(self, thePnt1, thePnt2, thePnt3, theSense=False, theName=None):
2049             """
2050             Create an arc of circle from a center and 2 points.
2051
2052             Parameters:
2053                 thePnt1 Center of the arc
2054                 thePnt2 Start point of the arc. (Gives also the radius of the arc)
2055                 thePnt3 End point of the arc (Gives also a direction)
2056                 theSense Orientation of the arc
2057                 theName Object name; when specified, this parameter is used
2058                         for result publication in the study. Otherwise, if automatic
2059                         publication is switched on, default value is used for result name.
2060
2061             Returns:
2062                 New GEOM.GEOM_Object, containing the created arc.
2063             """
2064             # Example: see GEOM_TestAll.py
2065             anObj = self.CurvesOp.MakeArcCenter(thePnt1, thePnt2, thePnt3, theSense)
2066             RaiseIfFailed("MakeArcCenter", self.CurvesOp)
2067             self._autoPublish(anObj, theName, "arc")
2068             return anObj
2069
2070         ##  Create an arc of ellipse, of center and two points.
2071         #  @param theCenter Center of the arc.
2072         #  @param thePnt1 defines major radius of the arc by distance from Pnt1 to Pnt2.
2073         #  @param thePnt2 defines plane of ellipse and minor radius as distance from Pnt3 to line from Pnt1 to Pnt2.
2074         #  @param theName Object name; when specified, this parameter is used
2075         #         for result publication in the study. Otherwise, if automatic
2076         #         publication is switched on, default value is used for result name.
2077         #
2078         #  @return New GEOM.GEOM_Object, containing the created arc.
2079         #
2080         #  @ref swig_MakeArc "Example"
2081         @ManageTransactions("CurvesOp")
2082         def MakeArcOfEllipse(self, theCenter, thePnt1, thePnt2, theName=None):
2083             """
2084             Create an arc of ellipse, of center and two points.
2085
2086             Parameters:
2087                 theCenter Center of the arc.
2088                 thePnt1 defines major radius of the arc by distance from Pnt1 to Pnt2.
2089                 thePnt2 defines plane of ellipse and minor radius as distance from Pnt3 to line from Pnt1 to Pnt2.
2090                 theName Object name; when specified, this parameter is used
2091                         for result publication in the study. Otherwise, if automatic
2092                         publication is switched on, default value is used for result name.
2093
2094             Returns:
2095                 New GEOM.GEOM_Object, containing the created arc.
2096             """
2097             # Example: see GEOM_TestAll.py
2098             anObj = self.CurvesOp.MakeArcOfEllipse(theCenter, thePnt1, thePnt2)
2099             RaiseIfFailed("MakeArcOfEllipse", self.CurvesOp)
2100             self._autoPublish(anObj, theName, "arc")
2101             return anObj
2102
2103         ## Create a circle with given center, normal vector and radius.
2104         #  @param thePnt Circle center.
2105         #  @param theVec Vector, normal to the plane of the circle.
2106         #  @param theR Circle radius.
2107         #  @param theName Object name; when specified, this parameter is used
2108         #         for result publication in the study. Otherwise, if automatic
2109         #         publication is switched on, default value is used for result name.
2110         #
2111         #  @return New GEOM.GEOM_Object, containing the created circle.
2112         #
2113         #  @ref tui_creation_circle "Example"
2114         @ManageTransactions("CurvesOp")
2115         def MakeCircle(self, thePnt, theVec, theR, theName=None):
2116             """
2117             Create a circle with given center, normal vector and radius.
2118
2119             Parameters:
2120                 thePnt Circle center.
2121                 theVec Vector, normal to the plane of the circle.
2122                 theR Circle radius.
2123                 theName Object name; when specified, this parameter is used
2124                         for result publication in the study. Otherwise, if automatic
2125                         publication is switched on, default value is used for result name.
2126
2127             Returns:
2128                 New GEOM.GEOM_Object, containing the created circle.
2129             """
2130             # Example: see GEOM_TestAll.py
2131             theR, Parameters = ParseParameters(theR)
2132             anObj = self.CurvesOp.MakeCirclePntVecR(thePnt, theVec, theR)
2133             RaiseIfFailed("MakeCirclePntVecR", self.CurvesOp)
2134             anObj.SetParameters(Parameters)
2135             self._autoPublish(anObj, theName, "circle")
2136             return anObj
2137
2138         ## Create a circle with given radius.
2139         #  Center of the circle will be in the origin of global
2140         #  coordinate system and normal vector will be codirected with Z axis
2141         #  @param theR Circle radius.
2142         #  @param theName Object name; when specified, this parameter is used
2143         #         for result publication in the study. Otherwise, if automatic
2144         #         publication is switched on, default value is used for result name.
2145         #
2146         #  @return New GEOM.GEOM_Object, containing the created circle.
2147         @ManageTransactions("CurvesOp")
2148         def MakeCircleR(self, theR, theName=None):
2149             """
2150             Create a circle with given radius.
2151             Center of the circle will be in the origin of global
2152             coordinate system and normal vector will be codirected with Z axis
2153
2154             Parameters:
2155                 theR Circle radius.
2156                 theName Object name; when specified, this parameter is used
2157                         for result publication in the study. Otherwise, if automatic
2158                         publication is switched on, default value is used for result name.
2159
2160             Returns:
2161                 New GEOM.GEOM_Object, containing the created circle.
2162             """
2163             anObj = self.CurvesOp.MakeCirclePntVecR(None, None, theR)
2164             RaiseIfFailed("MakeCirclePntVecR", self.CurvesOp)
2165             self._autoPublish(anObj, theName, "circle")
2166             return anObj
2167
2168         ## Create a circle, passing through three given points
2169         #  @param thePnt1,thePnt2,thePnt3 Points, defining the circle.
2170         #  @param theName Object name; when specified, this parameter is used
2171         #         for result publication in the study. Otherwise, if automatic
2172         #         publication is switched on, default value is used for result name.
2173         #
2174         #  @return New GEOM.GEOM_Object, containing the created circle.
2175         #
2176         #  @ref tui_creation_circle "Example"
2177         @ManageTransactions("CurvesOp")
2178         def MakeCircleThreePnt(self, thePnt1, thePnt2, thePnt3, theName=None):
2179             """
2180             Create a circle, passing through three given points
2181
2182             Parameters:
2183                 thePnt1,thePnt2,thePnt3 Points, defining the circle.
2184                 theName Object name; when specified, this parameter is used
2185                         for result publication in the study. Otherwise, if automatic
2186                         publication is switched on, default value is used for result name.
2187
2188             Returns:
2189                 New GEOM.GEOM_Object, containing the created circle.
2190             """
2191             # Example: see GEOM_TestAll.py
2192             anObj = self.CurvesOp.MakeCircleThreePnt(thePnt1, thePnt2, thePnt3)
2193             RaiseIfFailed("MakeCircleThreePnt", self.CurvesOp)
2194             self._autoPublish(anObj, theName, "circle")
2195             return anObj
2196
2197         ## Create a circle, with given point1 as center,
2198         #  passing through the point2 as radius and laying in the plane,
2199         #  defined by all three given points.
2200         #  @param thePnt1,thePnt2,thePnt3 Points, defining the circle.
2201         #  @param theName Object name; when specified, this parameter is used
2202         #         for result publication in the study. Otherwise, if automatic
2203         #         publication is switched on, default value is used for result name.
2204         #
2205         #  @return New GEOM.GEOM_Object, containing the created circle.
2206         #
2207         #  @ref swig_MakeCircle "Example"
2208         @ManageTransactions("CurvesOp")
2209         def MakeCircleCenter2Pnt(self, thePnt1, thePnt2, thePnt3, theName=None):
2210             """
2211             Create a circle, with given point1 as center,
2212             passing through the point2 as radius and laying in the plane,
2213             defined by all three given points.
2214
2215             Parameters:
2216                 thePnt1,thePnt2,thePnt3 Points, defining the circle.
2217                 theName Object name; when specified, this parameter is used
2218                         for result publication in the study. Otherwise, if automatic
2219                         publication is switched on, default value is used for result name.
2220
2221             Returns:
2222                 New GEOM.GEOM_Object, containing the created circle.
2223             """
2224             # Example: see GEOM_example6.py
2225             anObj = self.CurvesOp.MakeCircleCenter2Pnt(thePnt1, thePnt2, thePnt3)
2226             RaiseIfFailed("MakeCircleCenter2Pnt", self.CurvesOp)
2227             self._autoPublish(anObj, theName, "circle")
2228             return anObj
2229
2230         ## Create an ellipse with given center, normal vector and radiuses.
2231         #  @param thePnt Ellipse center.
2232         #  @param theVec Vector, normal to the plane of the ellipse.
2233         #  @param theRMajor Major ellipse radius.
2234         #  @param theRMinor Minor ellipse radius.
2235         #  @param theVecMaj Vector, direction of the ellipse's main axis.
2236         #  @param theName Object name; when specified, this parameter is used
2237         #         for result publication in the study. Otherwise, if automatic
2238         #         publication is switched on, default value is used for result name.
2239         #
2240         #  @return New GEOM.GEOM_Object, containing the created ellipse.
2241         #
2242         #  @ref tui_creation_ellipse "Example"
2243         @ManageTransactions("CurvesOp")
2244         def MakeEllipse(self, thePnt, theVec, theRMajor, theRMinor, theVecMaj=None, theName=None):
2245             """
2246             Create an ellipse with given center, normal vector and radiuses.
2247
2248             Parameters:
2249                 thePnt Ellipse center.
2250                 theVec Vector, normal to the plane of the ellipse.
2251                 theRMajor Major ellipse radius.
2252                 theRMinor Minor ellipse radius.
2253                 theVecMaj Vector, direction of the ellipse's main axis.
2254                 theName Object name; when specified, this parameter is used
2255                         for result publication in the study. Otherwise, if automatic
2256                         publication is switched on, default value is used for result name.
2257
2258             Returns:
2259                 New GEOM.GEOM_Object, containing the created ellipse.
2260             """
2261             # Example: see GEOM_TestAll.py
2262             theRMajor, theRMinor, Parameters = ParseParameters(theRMajor, theRMinor)
2263             if theVecMaj is not None:
2264                 anObj = self.CurvesOp.MakeEllipseVec(thePnt, theVec, theRMajor, theRMinor, theVecMaj)
2265             else:
2266                 anObj = self.CurvesOp.MakeEllipse(thePnt, theVec, theRMajor, theRMinor)
2267                 pass
2268             RaiseIfFailed("MakeEllipse", self.CurvesOp)
2269             anObj.SetParameters(Parameters)
2270             self._autoPublish(anObj, theName, "ellipse")
2271             return anObj
2272
2273         ## Create an ellipse with given radiuses.
2274         #  Center of the ellipse will be in the origin of global
2275         #  coordinate system and normal vector will be codirected with Z axis
2276         #  @param theRMajor Major ellipse radius.
2277         #  @param theRMinor Minor ellipse radius.
2278         #  @param theName Object name; when specified, this parameter is used
2279         #         for result publication in the study. Otherwise, if automatic
2280         #         publication is switched on, default value is used for result name.
2281         #
2282         #  @return New GEOM.GEOM_Object, containing the created ellipse.
2283         @ManageTransactions("CurvesOp")
2284         def MakeEllipseRR(self, theRMajor, theRMinor, theName=None):
2285             """
2286             Create an ellipse with given radiuses.
2287             Center of the ellipse will be in the origin of global
2288             coordinate system and normal vector will be codirected with Z axis
2289
2290             Parameters:
2291                 theRMajor Major ellipse radius.
2292                 theRMinor Minor ellipse radius.
2293                 theName Object name; when specified, this parameter is used
2294                         for result publication in the study. Otherwise, if automatic
2295                         publication is switched on, default value is used for result name.
2296
2297             Returns:
2298             New GEOM.GEOM_Object, containing the created ellipse.
2299             """
2300             anObj = self.CurvesOp.MakeEllipse(None, None, theRMajor, theRMinor)
2301             RaiseIfFailed("MakeEllipse", self.CurvesOp)
2302             self._autoPublish(anObj, theName, "ellipse")
2303             return anObj
2304
2305         ## Create a polyline on the set of points.
2306         #  @param thePoints Sequence of points for the polyline.
2307         #  @param theIsClosed If True, build a closed wire.
2308         #  @param theName Object name; when specified, this parameter is used
2309         #         for result publication in the study. Otherwise, if automatic
2310         #         publication is switched on, default value is used for result name.
2311         #
2312         #  @return New GEOM.GEOM_Object, containing the created polyline.
2313         #
2314         #  @ref tui_creation_curve "Example"
2315         @ManageTransactions("CurvesOp")
2316         def MakePolyline(self, thePoints, theIsClosed=False, theName=None):
2317             """
2318             Create a polyline on the set of points.
2319
2320             Parameters:
2321                 thePoints Sequence of points for the polyline.
2322                 theIsClosed If True, build a closed wire.
2323                 theName Object name; when specified, this parameter is used
2324                         for result publication in the study. Otherwise, if automatic
2325                         publication is switched on, default value is used for result name.
2326
2327             Returns:
2328                 New GEOM.GEOM_Object, containing the created polyline.
2329             """
2330             # Example: see GEOM_TestAll.py
2331             anObj = self.CurvesOp.MakePolyline(thePoints, theIsClosed)
2332             RaiseIfFailed("MakePolyline", self.CurvesOp)
2333             self._autoPublish(anObj, theName, "polyline")
2334             return anObj
2335
2336         ## Create bezier curve on the set of points.
2337         #  @param thePoints Sequence of points for the bezier curve.
2338         #  @param theIsClosed If True, build a closed curve.
2339         #  @param theName Object name; when specified, this parameter is used
2340         #         for result publication in the study. Otherwise, if automatic
2341         #         publication is switched on, default value is used for result name.
2342         #
2343         #  @return New GEOM.GEOM_Object, containing the created bezier curve.
2344         #
2345         #  @ref tui_creation_curve "Example"
2346         @ManageTransactions("CurvesOp")
2347         def MakeBezier(self, thePoints, theIsClosed=False, theName=None):
2348             """
2349             Create bezier curve on the set of points.
2350
2351             Parameters:
2352                 thePoints Sequence of points for the bezier curve.
2353                 theIsClosed If True, build a closed curve.
2354                 theName Object name; when specified, this parameter is used
2355                         for result publication in the study. Otherwise, if automatic
2356                         publication is switched on, default value is used for result name.
2357
2358             Returns:
2359                 New GEOM.GEOM_Object, containing the created bezier curve.
2360             """
2361             # Example: see GEOM_TestAll.py
2362             anObj = self.CurvesOp.MakeSplineBezier(thePoints, theIsClosed)
2363             RaiseIfFailed("MakeSplineBezier", self.CurvesOp)
2364             self._autoPublish(anObj, theName, "bezier")
2365             return anObj
2366
2367         ## Create B-Spline curve on the set of points.
2368         #  @param thePoints Sequence of points for the B-Spline curve.
2369         #  @param theIsClosed If True, build a closed curve.
2370         #  @param theDoReordering If TRUE, the algo does not follow the order of
2371         #                         \a thePoints but searches for the closest vertex.
2372         #  @param theName Object name; when specified, this parameter is used
2373         #         for result publication in the study. Otherwise, if automatic
2374         #         publication is switched on, default value is used for result name.
2375         #
2376         #  @return New GEOM.GEOM_Object, containing the created B-Spline curve.
2377         #
2378         #  @ref tui_creation_curve "Example"
2379         @ManageTransactions("CurvesOp")
2380         def MakeInterpol(self, thePoints, theIsClosed=False, theDoReordering=False, theName=None):
2381             """
2382             Create B-Spline curve on the set of points.
2383
2384             Parameters:
2385                 thePoints Sequence of points for the B-Spline curve.
2386                 theIsClosed If True, build a closed curve.
2387                 theDoReordering If True, the algo does not follow the order of
2388                                 thePoints but searches for the closest vertex.
2389                 theName Object name; when specified, this parameter is used
2390                         for result publication in the study. Otherwise, if automatic
2391                         publication is switched on, default value is used for result name.
2392
2393             Returns:
2394                 New GEOM.GEOM_Object, containing the created B-Spline curve.
2395             """
2396             # Example: see GEOM_TestAll.py
2397             anObj = self.CurvesOp.MakeSplineInterpolation(thePoints, theIsClosed, theDoReordering)
2398             RaiseIfFailed("MakeInterpol", self.CurvesOp)
2399             self._autoPublish(anObj, theName, "bspline")
2400             return anObj
2401
2402         ## Create B-Spline curve on the set of points.
2403         #  @param thePoints Sequence of points for the B-Spline curve.
2404         #  @param theFirstVec Vector object, defining the curve direction at its first point.
2405         #  @param theLastVec Vector object, defining the curve direction at its last point.
2406         #  @param theName Object name; when specified, this parameter is used
2407         #         for result publication in the study. Otherwise, if automatic
2408         #         publication is switched on, default value is used for result name.
2409         #
2410         #  @return New GEOM.GEOM_Object, containing the created B-Spline curve.
2411         #
2412         #  @ref tui_creation_curve "Example"
2413         @ManageTransactions("CurvesOp")
2414         def MakeInterpolWithTangents(self, thePoints, theFirstVec, theLastVec, theName=None):
2415             """
2416             Create B-Spline curve on the set of points.
2417
2418             Parameters:
2419                 thePoints Sequence of points for the B-Spline curve.
2420                 theFirstVec Vector object, defining the curve direction at its first point.
2421                 theLastVec Vector object, defining the curve direction at its last point.
2422                 theName Object name; when specified, this parameter is used
2423                         for result publication in the study. Otherwise, if automatic
2424                         publication is switched on, default value is used for result name.
2425
2426             Returns:
2427                 New GEOM.GEOM_Object, containing the created B-Spline curve.
2428             """
2429             # Example: see GEOM_TestAll.py
2430             anObj = self.CurvesOp.MakeSplineInterpolWithTangents(thePoints, theFirstVec, theLastVec)
2431             RaiseIfFailed("MakeInterpolWithTangents", self.CurvesOp)
2432             self._autoPublish(anObj, theName, "bspline")
2433             return anObj
2434
2435         ## Creates a curve using the parametric definition of the basic points.
2436         #  @param thexExpr parametric equation of the coordinates X.
2437         #  @param theyExpr parametric equation of the coordinates Y.
2438         #  @param thezExpr parametric equation of the coordinates Z.
2439         #  @param theParamMin the minimal value of the parameter.
2440         #  @param theParamMax the maximum value of the parameter.
2441         #  @param theParamStep the number of steps if theNewMethod = True, else step value of the parameter.
2442         #  @param theCurveType the type of the curve,
2443         #         one of GEOM.Polyline, GEOM.Bezier, GEOM.Interpolation.
2444         #  @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.
2445         #  @param theName Object name; when specified, this parameter is used
2446         #         for result publication in the study. Otherwise, if automatic
2447         #         publication is switched on, default value is used for result name.
2448         #
2449         #  @return New GEOM.GEOM_Object, containing the created curve.
2450         #
2451         #  @ref tui_creation_curve "Example"
2452         @ManageTransactions("CurvesOp")
2453         def MakeCurveParametric(self, thexExpr, theyExpr, thezExpr,
2454                                 theParamMin, theParamMax, theParamStep, theCurveType, theNewMethod=False, theName=None ):
2455             """
2456             Creates a curve using the parametric definition of the basic points.
2457
2458             Parameters:
2459                 thexExpr parametric equation of the coordinates X.
2460                 theyExpr parametric equation of the coordinates Y.
2461                 thezExpr parametric equation of the coordinates Z.
2462                 theParamMin the minimal value of the parameter.
2463                 theParamMax the maximum value of the parameter.
2464                 theParamStep the number of steps if theNewMethod = True, else step value of the parameter.
2465                 theCurveType the type of the curve,
2466                              one of GEOM.Polyline, GEOM.Bezier, GEOM.Interpolation.
2467                 theNewMethod flag for switching to the new method if the flag is set to false a deprecated
2468                              method is used which can lead to a bug.
2469                 theName Object name; when specified, this parameter is used
2470                         for result publication in the study. Otherwise, if automatic
2471                         publication is switched on, default value is used for result name.
2472
2473             Returns:
2474                 New GEOM.GEOM_Object, containing the created curve.
2475             """
2476             theParamMin,theParamMax,theParamStep,Parameters = ParseParameters(theParamMin,theParamMax,theParamStep)
2477             if theNewMethod:
2478               anObj = self.CurvesOp.MakeCurveParametricNew(thexExpr,theyExpr,thezExpr,theParamMin,theParamMax,theParamStep,theCurveType)
2479             else:
2480               anObj = self.CurvesOp.MakeCurveParametric(thexExpr,theyExpr,thezExpr,theParamMin,theParamMax,theParamStep,theCurveType)
2481             RaiseIfFailed("MakeCurveParametric", self.CurvesOp)
2482             anObj.SetParameters(Parameters)
2483             self._autoPublish(anObj, theName, "curve")
2484             return anObj
2485
2486         ## Create an isoline curve on a face.
2487         #  @param theFace the face for which an isoline is created.
2488         #  @param IsUIsoline True for U-isoline creation; False for V-isoline
2489         #         creation.
2490         #  @param theParameter the U parameter for U-isoline or V parameter
2491         #         for V-isoline.
2492         #  @param theName Object name; when specified, this parameter is used
2493         #         for result publication in the study. Otherwise, if automatic
2494         #         publication is switched on, default value is used for result name.
2495         #
2496         #  @return New GEOM.GEOM_Object, containing the created isoline edge or
2497         #          a compound of edges.
2498         #
2499         #  @ref tui_creation_curve "Example"
2500         @ManageTransactions("CurvesOp")
2501         def MakeIsoline(self, theFace, IsUIsoline, theParameter, theName=None):
2502             """
2503             Create an isoline curve on a face.
2504
2505             Parameters:
2506                 theFace the face for which an isoline is created.
2507                 IsUIsoline True for U-isoline creation; False for V-isoline
2508                            creation.
2509                 theParameter the U parameter for U-isoline or V parameter
2510                              for V-isoline.
2511                 theName Object name; when specified, this parameter is used
2512                         for result publication in the study. Otherwise, if automatic
2513                         publication is switched on, default value is used for result name.
2514
2515             Returns:
2516                 New GEOM.GEOM_Object, containing the created isoline edge or a
2517                 compound of edges.
2518             """
2519             # Example: see GEOM_TestAll.py
2520             anObj = self.CurvesOp.MakeIsoline(theFace, IsUIsoline, theParameter)
2521             RaiseIfFailed("MakeIsoline", self.CurvesOp)
2522             if IsUIsoline:
2523                 self._autoPublish(anObj, theName, "U-Isoline")
2524             else:
2525                 self._autoPublish(anObj, theName, "V-Isoline")
2526             return anObj
2527
2528         # end of l4_curves
2529         ## @}
2530
2531         ## @addtogroup l3_sketcher
2532         ## @{
2533
2534         ## Create a sketcher (wire or face), following the textual description,
2535         #  passed through <VAR>theCommand</VAR> argument. \n
2536         #  Edges of the resulting wire or face will be arcs of circles and/or linear segments. \n
2537         #  Format of the description string have to be the following:
2538         #
2539         #  "Sketcher[:F x1 y1]:CMD[:CMD[:CMD...]]"
2540         #
2541         #  Where:
2542         #  - x1, y1 are coordinates of the first sketcher point (zero by default),
2543         #  - CMD is one of
2544         #     - "R angle" : Set the direction by angle
2545         #     - "D dx dy" : Set the direction by DX & DY
2546         #     .
2547         #       \n
2548         #     - "TT x y" : Create segment by point at X & Y
2549         #     - "T dx dy" : Create segment by point with DX & DY
2550         #     - "L length" : Create segment by direction & Length
2551         #     - "IX x" : Create segment by direction & Intersect. X
2552         #     - "IY y" : Create segment by direction & Intersect. Y
2553         #     .
2554         #       \n
2555         #     - "C radius length" : Create arc by direction, radius and length(in degree)
2556         #     - "AA x y": Create arc by point at X & Y
2557         #     - "A dx dy" : Create arc by point with DX & DY
2558         #     - "UU x y radius flag1": Create arc by point at X & Y with given radiUs
2559         #     - "U dx dy radius flag1" : Create arc by point with DX & DY with given radiUs
2560         #     - "EE x y xc yc flag1 flag2": Create arc by point at X & Y with given cEnter coordinates
2561         #     - "E dx dy dxc dyc radius flag1 flag2" : Create arc by point with DX & DY with given cEnter coordinates
2562         #     .
2563         #       \n
2564         #     - "WW" : Close Wire (to finish)
2565         #     - "WF" : Close Wire and build face (to finish)
2566         #     .
2567         #        \n
2568         #  - Flag1 (= reverse) is 0 or 2 ...
2569         #     - if 0 the drawn arc is the one of lower angle (< Pi)
2570         #     - if 2 the drawn arc ius the one of greater angle (> Pi)
2571         #     .
2572         #        \n
2573         #  - Flag2 (= control tolerance) is 0 or 1 ...
2574         #     - if 0 the specified end point can be at a distance of the arc greater than the tolerance (10^-7)
2575         #     - if 1 the wire is built only if the end point is on the arc
2576         #       with a tolerance of 10^-7 on the distance else the creation fails
2577         #
2578         #  @param theCommand String, defining the sketcher in local
2579         #                    coordinates of the working plane.
2580         #  @param theWorkingPlane Nine double values, defining origin,
2581         #                         OZ and OX directions of the working plane.
2582         #  @param theName Object name; when specified, this parameter is used
2583         #         for result publication in the study. Otherwise, if automatic
2584         #         publication is switched on, default value is used for result name.
2585         #
2586         #  @return New GEOM.GEOM_Object, containing the created wire.
2587         #
2588         #  @ref tui_sketcher_page "Example"
2589         @ManageTransactions("CurvesOp")
2590         def MakeSketcher(self, theCommand, theWorkingPlane = [0,0,0, 0,0,1, 1,0,0], theName=None):
2591             """
2592             Create a sketcher (wire or face), following the textual description, passed
2593             through theCommand argument.
2594             Edges of the resulting wire or face will be arcs of circles and/or linear segments.
2595             Format of the description string have to be the following:
2596                 "Sketcher[:F x1 y1]:CMD[:CMD[:CMD...]]"
2597             Where:
2598             - x1, y1 are coordinates of the first sketcher point (zero by default),
2599             - CMD is one of
2600                - "R angle" : Set the direction by angle
2601                - "D dx dy" : Set the direction by DX & DY
2602
2603                - "TT x y" : Create segment by point at X & Y
2604                - "T dx dy" : Create segment by point with DX & DY
2605                - "L length" : Create segment by direction & Length
2606                - "IX x" : Create segment by direction & Intersect. X
2607                - "IY y" : Create segment by direction & Intersect. Y
2608
2609                - "C radius length" : Create arc by direction, radius and length(in degree)
2610                - "AA x y": Create arc by point at X & Y
2611                - "A dx dy" : Create arc by point with DX & DY
2612                - "UU x y radius flag1": Create arc by point at X & Y with given radiUs
2613                - "U dx dy radius flag1" : Create arc by point with DX & DY with given radiUs
2614                - "EE x y xc yc flag1 flag2": Create arc by point at X & Y with given cEnter coordinates
2615                - "E dx dy dxc dyc radius flag1 flag2" : Create arc by point with DX & DY with given cEnter coordinates
2616
2617                - "WW" : Close Wire (to finish)
2618                - "WF" : Close Wire and build face (to finish)
2619
2620             - Flag1 (= reverse) is 0 or 2 ...
2621                - if 0 the drawn arc is the one of lower angle (< Pi)
2622                - if 2 the drawn arc ius the one of greater angle (> Pi)
2623
2624             - Flag2 (= control tolerance) is 0 or 1 ...
2625                - if 0 the specified end point can be at a distance of the arc greater than the tolerance (10^-7)
2626                - if 1 the wire is built only if the end point is on the arc
2627                  with a tolerance of 10^-7 on the distance else the creation fails
2628
2629             Parameters:
2630                 theCommand String, defining the sketcher in local
2631                            coordinates of the working plane.
2632                 theWorkingPlane Nine double values, defining origin,
2633                                 OZ and OX directions of the working plane.
2634                 theName Object name; when specified, this parameter is used
2635                         for result publication in the study. Otherwise, if automatic
2636                         publication is switched on, default value is used for result name.
2637
2638             Returns:
2639                 New GEOM.GEOM_Object, containing the created wire.
2640             """
2641             # Example: see GEOM_TestAll.py
2642             theCommand,Parameters = ParseSketcherCommand(theCommand)
2643             anObj = self.CurvesOp.MakeSketcher(theCommand, theWorkingPlane)
2644             RaiseIfFailed("MakeSketcher", self.CurvesOp)
2645             anObj.SetParameters(Parameters)
2646             self._autoPublish(anObj, theName, "wire")
2647             return anObj
2648
2649         ## Create a sketcher (wire or face), following the textual description,
2650         #  passed through <VAR>theCommand</VAR> argument. \n
2651         #  For format of the description string see MakeSketcher() method.\n
2652         #  @param theCommand String, defining the sketcher in local
2653         #                    coordinates of the working plane.
2654         #  @param theWorkingPlane Planar Face or LCS(Marker) of the working plane.
2655         #  @param theName Object name; when specified, this parameter is used
2656         #         for result publication in the study. Otherwise, if automatic
2657         #         publication is switched on, default value is used for result name.
2658         #
2659         #  @return New GEOM.GEOM_Object, containing the created wire.
2660         #
2661         #  @ref tui_sketcher_page "Example"
2662         @ManageTransactions("CurvesOp")
2663         def MakeSketcherOnPlane(self, theCommand, theWorkingPlane, theName=None):
2664             """
2665             Create a sketcher (wire or face), following the textual description,
2666             passed through theCommand argument.
2667             For format of the description string see geompy.MakeSketcher() method.
2668
2669             Parameters:
2670                 theCommand String, defining the sketcher in local
2671                            coordinates of the working plane.
2672                 theWorkingPlane Planar Face or LCS(Marker) of the working plane.
2673                 theName Object name; when specified, this parameter is used
2674                         for result publication in the study. Otherwise, if automatic
2675                         publication is switched on, default value is used for result name.
2676
2677             Returns:
2678                 New GEOM.GEOM_Object, containing the created wire.
2679             """
2680             theCommand,Parameters = ParseSketcherCommand(theCommand)
2681             anObj = self.CurvesOp.MakeSketcherOnPlane(theCommand, theWorkingPlane)
2682             RaiseIfFailed("MakeSketcherOnPlane", self.CurvesOp)
2683             anObj.SetParameters(Parameters)
2684             self._autoPublish(anObj, theName, "wire")
2685             return anObj
2686
2687         ## Obtain a 2D sketcher interface
2688         #  @return An instance of @ref gsketcher.Sketcher2D "Sketcher2D" interface
2689         def Sketcher2D (self):
2690             """
2691             Obtain a 2D sketcher interface.
2692
2693             Example of usage:
2694                sk = geompy.Sketcher2D()
2695                sk.addPoint(20, 20)
2696                sk.addSegmentRelative(15, 70)
2697                sk.addSegmentPerpY(50)
2698                sk.addArcRadiusRelative(25, 15, 14.5, 0)
2699                sk.addArcCenterAbsolute(1, 1, 50, 50, 0, 0)
2700                sk.addArcDirectionRadiusLength(20, 20, 101, 162.13)
2701                sk.close()
2702                Sketch_1 = sk.wire(geomObj_1)
2703             """
2704             sk = Sketcher2D (self)
2705             return sk
2706
2707         ## Create a sketcher wire, following the numerical description,
2708         #  passed through <VAR>theCoordinates</VAR> argument. \n
2709         #  @param theCoordinates double values, defining points to create a wire,
2710         #                                                      passing from it.
2711         #  @param theName Object name; when specified, this parameter is used
2712         #         for result publication in the study. Otherwise, if automatic
2713         #         publication is switched on, default value is used for result name.
2714         #
2715         #  @return New GEOM.GEOM_Object, containing the created wire.
2716         #
2717         #  @ref tui_3dsketcher_page "Example"
2718         @ManageTransactions("CurvesOp")
2719         def Make3DSketcher(self, theCoordinates, theName=None):
2720             """
2721             Create a sketcher wire, following the numerical description,
2722             passed through theCoordinates argument.
2723
2724             Parameters:
2725                 theCoordinates double values, defining points to create a wire,
2726                                passing from it.
2727                 theName Object name; when specified, this parameter is used
2728                         for result publication in the study. Otherwise, if automatic
2729                         publication is switched on, default value is used for result name.
2730
2731             Returns:
2732                 New GEOM_Object, containing the created wire.
2733             """
2734             theCoordinates,Parameters = ParseParameters(theCoordinates)
2735             anObj = self.CurvesOp.Make3DSketcher(theCoordinates)
2736             RaiseIfFailed("Make3DSketcher", self.CurvesOp)
2737             anObj.SetParameters(Parameters)
2738             self._autoPublish(anObj, theName, "wire")
2739             return anObj
2740
2741         ## Obtain a 3D sketcher interface
2742         #  @return An instance of @ref gsketcher.Sketcher3D "Sketcher3D" interface
2743         #
2744         #  @ref tui_3dsketcher_page "Example"
2745         def Sketcher3D (self):
2746             """
2747             Obtain a 3D sketcher interface.
2748
2749             Example of usage:
2750                 sk = geompy.Sketcher3D()
2751                 sk.addPointsAbsolute(0,0,0, 70,0,0)
2752                 sk.addPointsRelative(0, 0, 130)
2753                 sk.addPointAnglesLength("OXY", 50, 0, 100)
2754                 sk.addPointAnglesLength("OXZ", 30, 80, 130)
2755                 sk.close()
2756                 a3D_Sketcher_1 = sk.wire()
2757             """
2758             sk = Sketcher3D (self)
2759             return sk
2760
2761         ## Obtain a 2D polyline creation interface
2762         #  @return An instance of @ref gsketcher.Polyline2D "Polyline2D" interface
2763         #
2764         #  @ref tui_3dsketcher_page "Example"
2765         def Polyline2D (self):
2766             """
2767             Obtain a 2D polyline creation interface.
2768
2769             Example of usage:
2770                 pl = geompy.Polyline2D()
2771                 pl.addSection("section 1", GEOM.Polyline, True)
2772                 pl.addPoints(0, 0, 10, 0, 10, 10)
2773                 pl.addSection("section 2", GEOM.Interpolation, False)
2774                 pl.addPoints(20, 0, 30, 0, 30, 10)
2775                 resultObj = pl.result(WorkingPlane)
2776             """
2777             pl = Polyline2D (self)
2778             return pl
2779
2780         # end of l3_sketcher
2781         ## @}
2782
2783         ## @addtogroup l3_3d_primitives
2784         ## @{
2785
2786         ## Create a box by coordinates of two opposite vertices.
2787         #
2788         #  @param x1,y1,z1 double values, defining first point it.
2789         #  @param x2,y2,z2 double values, defining first point it.
2790         #  @param theName Object name; when specified, this parameter is used
2791         #         for result publication in the study. Otherwise, if automatic
2792         #         publication is switched on, default value is used for result name.
2793         #
2794         #  @return New GEOM.GEOM_Object, containing the created box.
2795         #
2796         #  @ref tui_creation_box "Example"
2797         def MakeBox(self, x1, y1, z1, x2, y2, z2, theName=None):
2798             """
2799             Create a box by coordinates of two opposite vertices.
2800
2801             Parameters:
2802                 x1,y1,z1 double values, defining first point.
2803                 x2,y2,z2 double values, defining second point.
2804                 theName Object name; when specified, this parameter is used
2805                         for result publication in the study. Otherwise, if automatic
2806                         publication is switched on, default value is used for result name.
2807
2808             Returns:
2809                 New GEOM.GEOM_Object, containing the created box.
2810             """
2811             # Example: see GEOM_TestAll.py
2812             pnt1 = self.MakeVertex(x1,y1,z1)
2813             pnt2 = self.MakeVertex(x2,y2,z2)
2814             # note: auto-publishing is done in self.MakeBoxTwoPnt()
2815             return self.MakeBoxTwoPnt(pnt1, pnt2, theName)
2816
2817         ## Create a box with specified dimensions along the coordinate axes
2818         #  and with edges, parallel to the coordinate axes.
2819         #  Center of the box will be at point (DX/2, DY/2, DZ/2).
2820         #  @param theDX Length of Box edges, parallel to OX axis.
2821         #  @param theDY Length of Box edges, parallel to OY axis.
2822         #  @param theDZ Length of Box edges, parallel to OZ axis.
2823         #  @param theName Object name; when specified, this parameter is used
2824         #         for result publication in the study. Otherwise, if automatic
2825         #         publication is switched on, default value is used for result name.
2826         #
2827         #  @return New GEOM.GEOM_Object, containing the created box.
2828         #
2829         #  @ref tui_creation_box "Example"
2830         @ManageTransactions("PrimOp")
2831         def MakeBoxDXDYDZ(self, theDX, theDY, theDZ, theName=None):
2832             """
2833             Create a box with specified dimensions along the coordinate axes
2834             and with edges, parallel to the coordinate axes.
2835             Center of the box will be at point (DX/2, DY/2, DZ/2).
2836
2837             Parameters:
2838                 theDX Length of Box edges, parallel to OX axis.
2839                 theDY Length of Box edges, parallel to OY axis.
2840                 theDZ Length of Box edges, parallel to OZ axis.
2841                 theName Object name; when specified, this parameter is used
2842                         for result publication in the study. Otherwise, if automatic
2843                         publication is switched on, default value is used for result name.
2844
2845             Returns:
2846                 New GEOM.GEOM_Object, containing the created box.
2847             """
2848             # Example: see GEOM_TestAll.py
2849             theDX,theDY,theDZ,Parameters = ParseParameters(theDX, theDY, theDZ)
2850             anObj = self.PrimOp.MakeBoxDXDYDZ(theDX, theDY, theDZ)
2851             RaiseIfFailed("MakeBoxDXDYDZ", self.PrimOp)
2852             anObj.SetParameters(Parameters)
2853             self._autoPublish(anObj, theName, "box")
2854             return anObj
2855
2856         ## Create a box with two specified opposite vertices,
2857         #  and with edges, parallel to the coordinate axes
2858         #  @param thePnt1 First of two opposite vertices.
2859         #  @param thePnt2 Second of two opposite vertices.
2860         #  @param theName Object name; when specified, this parameter is used
2861         #         for result publication in the study. Otherwise, if automatic
2862         #         publication is switched on, default value is used for result name.
2863         #
2864         #  @return New GEOM.GEOM_Object, containing the created box.
2865         #
2866         #  @ref tui_creation_box "Example"
2867         @ManageTransactions("PrimOp")
2868         def MakeBoxTwoPnt(self, thePnt1, thePnt2, theName=None):
2869             """
2870             Create a box with two specified opposite vertices,
2871             and with edges, parallel to the coordinate axes
2872
2873             Parameters:
2874                 thePnt1 First of two opposite vertices.
2875                 thePnt2 Second of two opposite vertices.
2876                 theName Object name; when specified, this parameter is used
2877                         for result publication in the study. Otherwise, if automatic
2878                         publication is switched on, default value is used for result name.
2879
2880             Returns:
2881                 New GEOM.GEOM_Object, containing the created box.
2882             """
2883             # Example: see GEOM_TestAll.py
2884             anObj = self.PrimOp.MakeBoxTwoPnt(thePnt1, thePnt2)
2885             RaiseIfFailed("MakeBoxTwoPnt", self.PrimOp)
2886             self._autoPublish(anObj, theName, "box")
2887             return anObj
2888
2889         ## Create a face with specified dimensions with edges parallel to coordinate axes.
2890         #  @param theH height of Face.
2891         #  @param theW width of Face.
2892         #  @param theOrientation face orientation: 1-OXY, 2-OYZ, 3-OZX
2893         #  @param theName Object name; when specified, this parameter is used
2894         #         for result publication in the study. Otherwise, if automatic
2895         #         publication is switched on, default value is used for result name.
2896         #
2897         #  @return New GEOM.GEOM_Object, containing the created face.
2898         #
2899         #  @ref tui_creation_face "Example"
2900         @ManageTransactions("PrimOp")
2901         def MakeFaceHW(self, theH, theW, theOrientation, theName=None):
2902             """
2903             Create a face with specified dimensions with edges parallel to coordinate axes.
2904
2905             Parameters:
2906                 theH height of Face.
2907                 theW width of Face.
2908                 theOrientation face orientation: 1-OXY, 2-OYZ, 3-OZX
2909                 theName Object name; when specified, this parameter is used
2910                         for result publication in the study. Otherwise, if automatic
2911                         publication is switched on, default value is used for result name.
2912
2913             Returns:
2914                 New GEOM.GEOM_Object, containing the created face.
2915             """
2916             # Example: see GEOM_TestAll.py
2917             theH,theW,Parameters = ParseParameters(theH, theW)
2918             anObj = self.PrimOp.MakeFaceHW(theH, theW, theOrientation)
2919             RaiseIfFailed("MakeFaceHW", self.PrimOp)
2920             anObj.SetParameters(Parameters)
2921             self._autoPublish(anObj, theName, "rectangle")
2922             return anObj
2923
2924         ## Create a face from another plane and two sizes,
2925         #  vertical size and horisontal size.
2926         #  @param theObj   Normale vector to the creating face or
2927         #  the face object.
2928         #  @param theH     Height (vertical size).
2929         #  @param theW     Width (horisontal size).
2930         #  @param theName Object name; when specified, this parameter is used
2931         #         for result publication in the study. Otherwise, if automatic
2932         #         publication is switched on, default value is used for result name.
2933         #
2934         #  @return New GEOM.GEOM_Object, containing the created face.
2935         #
2936         #  @ref tui_creation_face "Example"
2937         @ManageTransactions("PrimOp")
2938         def MakeFaceObjHW(self, theObj, theH, theW, theName=None):
2939             """
2940             Create a face from another plane and two sizes,
2941             vertical size and horisontal size.
2942
2943             Parameters:
2944                 theObj   Normale vector to the creating face or
2945                          the face object.
2946                 theH     Height (vertical size).
2947                 theW     Width (horisontal size).
2948                 theName Object name; when specified, this parameter is used
2949                         for result publication in the study. Otherwise, if automatic
2950                         publication is switched on, default value is used for result name.
2951
2952             Returns:
2953                 New GEOM_Object, containing the created face.
2954             """
2955             # Example: see GEOM_TestAll.py
2956             theH,theW,Parameters = ParseParameters(theH, theW)
2957             anObj = self.PrimOp.MakeFaceObjHW(theObj, theH, theW)
2958             RaiseIfFailed("MakeFaceObjHW", self.PrimOp)
2959             anObj.SetParameters(Parameters)
2960             self._autoPublish(anObj, theName, "rectangle")
2961             return anObj
2962
2963         ## Create a disk with given center, normal vector and radius.
2964         #  @param thePnt Disk center.
2965         #  @param theVec Vector, normal to the plane of the disk.
2966         #  @param theR Disk radius.
2967         #  @param theName Object name; when specified, this parameter is used
2968         #         for result publication in the study. Otherwise, if automatic
2969         #         publication is switched on, default value is used for result name.
2970         #
2971         #  @return New GEOM.GEOM_Object, containing the created disk.
2972         #
2973         #  @ref tui_creation_disk "Example"
2974         @ManageTransactions("PrimOp")
2975         def MakeDiskPntVecR(self, thePnt, theVec, theR, theName=None):
2976             """
2977             Create a disk with given center, normal vector and radius.
2978
2979             Parameters:
2980                 thePnt Disk center.
2981                 theVec Vector, normal to the plane of the disk.
2982                 theR Disk radius.
2983                 theName Object name; when specified, this parameter is used
2984                         for result publication in the study. Otherwise, if automatic
2985                         publication is switched on, default value is used for result name.
2986
2987             Returns:
2988                 New GEOM.GEOM_Object, containing the created disk.
2989             """
2990             # Example: see GEOM_TestAll.py
2991             theR,Parameters = ParseParameters(theR)
2992             anObj = self.PrimOp.MakeDiskPntVecR(thePnt, theVec, theR)
2993             RaiseIfFailed("MakeDiskPntVecR", self.PrimOp)
2994             anObj.SetParameters(Parameters)
2995             self._autoPublish(anObj, theName, "disk")
2996             return anObj
2997
2998         ## Create a disk, passing through three given points
2999         #  @param thePnt1,thePnt2,thePnt3 Points, defining the disk.
3000         #  @param theName Object name; when specified, this parameter is used
3001         #         for result publication in the study. Otherwise, if automatic
3002         #         publication is switched on, default value is used for result name.
3003         #
3004         #  @return New GEOM.GEOM_Object, containing the created disk.
3005         #
3006         #  @ref tui_creation_disk "Example"
3007         @ManageTransactions("PrimOp")
3008         def MakeDiskThreePnt(self, thePnt1, thePnt2, thePnt3, theName=None):
3009             """
3010             Create a disk, passing through three given points
3011
3012             Parameters:
3013                 thePnt1,thePnt2,thePnt3 Points, defining the disk.
3014                 theName Object name; when specified, this parameter is used
3015                         for result publication in the study. Otherwise, if automatic
3016                         publication is switched on, default value is used for result name.
3017
3018             Returns:
3019                 New GEOM.GEOM_Object, containing the created disk.
3020             """
3021             # Example: see GEOM_TestAll.py
3022             anObj = self.PrimOp.MakeDiskThreePnt(thePnt1, thePnt2, thePnt3)
3023             RaiseIfFailed("MakeDiskThreePnt", self.PrimOp)
3024             self._autoPublish(anObj, theName, "disk")
3025             return anObj
3026
3027         ## Create a disk with specified dimensions along OX-OY coordinate axes.
3028         #  @param theR Radius of Face.
3029         #  @param theOrientation set the orientation belong axis OXY or OYZ or OZX
3030         #  @param theName Object name; when specified, this parameter is used
3031         #         for result publication in the study. Otherwise, if automatic
3032         #         publication is switched on, default value is used for result name.
3033         #
3034         #  @return New GEOM.GEOM_Object, containing the created disk.
3035         #
3036         #  @ref tui_creation_face "Example"
3037         @ManageTransactions("PrimOp")
3038         def MakeDiskR(self, theR, theOrientation, theName=None):
3039             """
3040             Create a disk with specified dimensions along OX-OY coordinate axes.
3041
3042             Parameters:
3043                 theR Radius of Face.
3044                 theOrientation set the orientation belong axis OXY or OYZ or OZX
3045                 theName Object name; when specified, this parameter is used
3046                         for result publication in the study. Otherwise, if automatic
3047                         publication is switched on, default value is used for result name.
3048
3049             Returns:
3050                 New GEOM.GEOM_Object, containing the created disk.
3051
3052             Example of usage:
3053                 Disk3 = geompy.MakeDiskR(100., 1)
3054             """
3055             # Example: see GEOM_TestAll.py
3056             theR,Parameters = ParseParameters(theR)
3057             anObj = self.PrimOp.MakeDiskR(theR, theOrientation)
3058             RaiseIfFailed("MakeDiskR", self.PrimOp)
3059             anObj.SetParameters(Parameters)
3060             self._autoPublish(anObj, theName, "disk")
3061             return anObj
3062
3063         ## Create a cylinder with given base point, axis, radius and height.
3064         #  @param thePnt Central point of cylinder base.
3065         #  @param theAxis Cylinder axis.
3066         #  @param theR Cylinder radius.
3067         #  @param theH Cylinder height.
3068         #  @param theName Object name; when specified, this parameter is used
3069         #         for result publication in the study. Otherwise, if automatic
3070         #         publication is switched on, default value is used for result name.
3071         #
3072         #  @return New GEOM.GEOM_Object, containing the created cylinder.
3073         #
3074         #  @ref tui_creation_cylinder "Example"
3075         @ManageTransactions("PrimOp")
3076         def MakeCylinder(self, thePnt, theAxis, theR, theH, theName=None):
3077             """
3078             Create a cylinder with given base point, axis, radius and height.
3079
3080             Parameters:
3081                 thePnt Central point of cylinder base.
3082                 theAxis Cylinder axis.
3083                 theR Cylinder radius.
3084                 theH Cylinder height.
3085                 theName Object name; when specified, this parameter is used
3086                         for result publication in the study. Otherwise, if automatic
3087                         publication is switched on, default value is used for result name.
3088
3089             Returns:
3090                 New GEOM.GEOM_Object, containing the created cylinder.
3091             """
3092             # Example: see GEOM_TestAll.py
3093             theR,theH,Parameters = ParseParameters(theR, theH)
3094             anObj = self.PrimOp.MakeCylinderPntVecRH(thePnt, theAxis, theR, theH)
3095             RaiseIfFailed("MakeCylinderPntVecRH", self.PrimOp)
3096             anObj.SetParameters(Parameters)
3097             self._autoPublish(anObj, theName, "cylinder")
3098             return anObj
3099             
3100         ## Create a portion of cylinder with given base point, axis, radius, height and angle.
3101         #  @param thePnt Central point of cylinder base.
3102         #  @param theAxis Cylinder axis.
3103         #  @param theR Cylinder radius.
3104         #  @param theH Cylinder height.
3105         #  @param theA Cylinder angle in radians.
3106         #  @param theName Object name; when specified, this parameter is used
3107         #         for result publication in the study. Otherwise, if automatic
3108         #         publication is switched on, default value is used for result name.
3109         #
3110         #  @return New GEOM.GEOM_Object, containing the created cylinder.
3111         #
3112         #  @ref tui_creation_cylinder "Example"
3113         @ManageTransactions("PrimOp")
3114         def MakeCylinderA(self, thePnt, theAxis, theR, theH, theA, theName=None):
3115             """
3116             Create a portion of cylinder with given base point, axis, radius, height and angle.
3117
3118             Parameters:
3119                 thePnt Central point of cylinder base.
3120                 theAxis Cylinder axis.
3121                 theR Cylinder radius.
3122                 theH Cylinder height.
3123                 theA Cylinder angle in radians.
3124                 theName Object name; when specified, this parameter is used
3125                         for result publication in the study. Otherwise, if automatic
3126                         publication is switched on, default value is used for result name.
3127
3128             Returns:
3129                 New GEOM.GEOM_Object, containing the created cylinder.
3130             """
3131             # Example: see GEOM_TestAll.py
3132             flag = False
3133             if isinstance(theA,str):
3134                 flag = True
3135             theR,theH,theA,Parameters = ParseParameters(theR, theH, theA)
3136             if flag:
3137                 theA = theA*math.pi/180.
3138             if theA<=0. or theA>=2*math.pi:
3139                 raise ValueError("The angle parameter should be strictly between 0 and 2*pi.")
3140             anObj = self.PrimOp.MakeCylinderPntVecRHA(thePnt, theAxis, theR, theH, theA)
3141             RaiseIfFailed("MakeCylinderPntVecRHA", self.PrimOp)
3142             anObj.SetParameters(Parameters)
3143             self._autoPublish(anObj, theName, "cylinder")
3144             return anObj
3145
3146         ## Create a cylinder with given radius and height at
3147         #  the origin of coordinate system. Axis of the cylinder
3148         #  will be collinear to the OZ axis of the coordinate system.
3149         #  @param theR Cylinder radius.
3150         #  @param theH Cylinder height.
3151         #  @param theName Object name; when specified, this parameter is used
3152         #         for result publication in the study. Otherwise, if automatic
3153         #         publication is switched on, default value is used for result name.
3154         #
3155         #  @return New GEOM.GEOM_Object, containing the created cylinder.
3156         #
3157         #  @ref tui_creation_cylinder "Example"
3158         @ManageTransactions("PrimOp")
3159         def MakeCylinderRH(self, theR, theH, theName=None):
3160             """
3161             Create a cylinder with given radius and height at
3162             the origin of coordinate system. Axis of the cylinder
3163             will be collinear to the OZ axis of the coordinate system.
3164
3165             Parameters:
3166                 theR Cylinder radius.
3167                 theH Cylinder height.
3168                 theName Object name; when specified, this parameter is used
3169                         for result publication in the study. Otherwise, if automatic
3170                         publication is switched on, default value is used for result name.
3171
3172             Returns:
3173                 New GEOM.GEOM_Object, containing the created cylinder.
3174             """
3175             # Example: see GEOM_TestAll.py
3176             theR,theH,Parameters = ParseParameters(theR, theH)
3177             anObj = self.PrimOp.MakeCylinderRH(theR, theH)
3178             RaiseIfFailed("MakeCylinderRH", self.PrimOp)
3179             anObj.SetParameters(Parameters)
3180             self._autoPublish(anObj, theName, "cylinder")
3181             return anObj
3182             
3183         ## Create a portion of cylinder with given radius, height and angle at
3184         #  the origin of coordinate system. Axis of the cylinder
3185         #  will be collinear to the OZ axis of the coordinate system.
3186         #  @param theR Cylinder radius.
3187         #  @param theH Cylinder height.
3188         #  @param theA Cylinder angle in radians.
3189         #  @param theName Object name; when specified, this parameter is used
3190         #         for result publication in the study. Otherwise, if automatic
3191         #         publication is switched on, default value is used for result name.
3192         #
3193         #  @return New GEOM.GEOM_Object, containing the created cylinder.
3194         #
3195         #  @ref tui_creation_cylinder "Example"
3196         @ManageTransactions("PrimOp")
3197         def MakeCylinderRHA(self, theR, theH, theA, theName=None):
3198             """
3199             Create a portion of cylinder with given radius, height and angle at
3200             the origin of coordinate system. Axis of the cylinder
3201             will be collinear to the OZ axis of the coordinate system.
3202
3203             Parameters:
3204                 theR Cylinder radius.
3205                 theH Cylinder height.
3206                 theA Cylinder angle in radians.
3207                 theName Object name; when specified, this parameter is used
3208                         for result publication in the study. Otherwise, if automatic
3209                         publication is switched on, default value is used for result name.
3210
3211             Returns:
3212                 New GEOM.GEOM_Object, containing the created cylinder.
3213             """
3214             # Example: see GEOM_TestAll.py
3215             flag = False
3216             if isinstance(theA,str):
3217                 flag = True
3218             theR,theH,theA,Parameters = ParseParameters(theR, theH, theA)
3219             if flag:
3220                 theA = theA*math.pi/180.
3221             if theA<=0. or theA>=2*math.pi:
3222                 raise ValueError("The angle parameter should be strictly between 0 and 2*pi.")
3223             anObj = self.PrimOp.MakeCylinderRHA(theR, theH, theA)
3224             RaiseIfFailed("MakeCylinderRHA", self.PrimOp)
3225             anObj.SetParameters(Parameters)
3226             self._autoPublish(anObj, theName, "cylinder")
3227             return anObj
3228
3229         ## Create a sphere with given center and radius.
3230         #  @param thePnt Sphere center.
3231         #  @param theR Sphere radius.
3232         #  @param theName Object name; when specified, this parameter is used
3233         #         for result publication in the study. Otherwise, if automatic
3234         #         publication is switched on, default value is used for result name.
3235         #
3236         #  @return New GEOM.GEOM_Object, containing the created sphere.
3237         #
3238         #  @ref tui_creation_sphere "Example"
3239         @ManageTransactions("PrimOp")
3240         def MakeSpherePntR(self, thePnt, theR, theName=None):
3241             """
3242             Create a sphere with given center and radius.
3243
3244             Parameters:
3245                 thePnt Sphere center.
3246                 theR Sphere radius.
3247                 theName Object name; when specified, this parameter is used
3248                         for result publication in the study. Otherwise, if automatic
3249                         publication is switched on, default value is used for result name.
3250
3251             Returns:
3252                 New GEOM.GEOM_Object, containing the created sphere.
3253             """
3254             # Example: see GEOM_TestAll.py
3255             theR,Parameters = ParseParameters(theR)
3256             anObj = self.PrimOp.MakeSpherePntR(thePnt, theR)
3257             RaiseIfFailed("MakeSpherePntR", self.PrimOp)
3258             anObj.SetParameters(Parameters)
3259             self._autoPublish(anObj, theName, "sphere")
3260             return anObj
3261
3262         ## Create a sphere with given center and radius.
3263         #  @param x,y,z Coordinates of sphere center.
3264         #  @param theR Sphere radius.
3265         #  @param theName Object name; when specified, this parameter is used
3266         #         for result publication in the study. Otherwise, if automatic
3267         #         publication is switched on, default value is used for result name.
3268         #
3269         #  @return New GEOM.GEOM_Object, containing the created sphere.
3270         #
3271         #  @ref tui_creation_sphere "Example"
3272         def MakeSphere(self, x, y, z, theR, theName=None):
3273             """
3274             Create a sphere with given center and radius.
3275
3276             Parameters:
3277                 x,y,z Coordinates of sphere center.
3278                 theR Sphere radius.
3279                 theName Object name; when specified, this parameter is used
3280                         for result publication in the study. Otherwise, if automatic
3281                         publication is switched on, default value is used for result name.
3282
3283             Returns:
3284                 New GEOM.GEOM_Object, containing the created sphere.
3285             """
3286             # Example: see GEOM_TestAll.py
3287             point = self.MakeVertex(x, y, z)
3288             # note: auto-publishing is done in self.MakeSpherePntR()
3289             anObj = self.MakeSpherePntR(point, theR, theName)
3290             return anObj
3291
3292         ## Create a sphere with given radius at the origin of coordinate system.
3293         #  @param theR Sphere radius.
3294         #  @param theName Object name; when specified, this parameter is used
3295         #         for result publication in the study. Otherwise, if automatic
3296         #         publication is switched on, default value is used for result name.
3297         #
3298         #  @return New GEOM.GEOM_Object, containing the created sphere.
3299         #
3300         #  @ref tui_creation_sphere "Example"
3301         @ManageTransactions("PrimOp")
3302         def MakeSphereR(self, theR, theName=None):
3303             """
3304             Create a sphere with given radius at the origin of coordinate system.
3305
3306             Parameters:
3307                 theR Sphere radius.
3308                 theName Object name; when specified, this parameter is used
3309                         for result publication in the study. Otherwise, if automatic
3310                         publication is switched on, default value is used for result name.
3311
3312             Returns:
3313                 New GEOM.GEOM_Object, containing the created sphere.
3314             """
3315             # Example: see GEOM_TestAll.py
3316             theR,Parameters = ParseParameters(theR)
3317             anObj = self.PrimOp.MakeSphereR(theR)
3318             RaiseIfFailed("MakeSphereR", self.PrimOp)
3319             anObj.SetParameters(Parameters)
3320             self._autoPublish(anObj, theName, "sphere")
3321             return anObj
3322
3323         ## Create a cone with given base point, axis, height and radiuses.
3324         #  @param thePnt Central point of the first cone base.
3325         #  @param theAxis Cone axis.
3326         #  @param theR1 Radius of the first cone base.
3327         #  @param theR2 Radius of the second cone base.
3328         #    \note If both radiuses are non-zero, the cone will be truncated.
3329         #    \note If the radiuses are equal, a cylinder will be created instead.
3330         #  @param theH Cone height.
3331         #  @param theName Object name; when specified, this parameter is used
3332         #         for result publication in the study. Otherwise, if automatic
3333         #         publication is switched on, default value is used for result name.
3334         #
3335         #  @return New GEOM.GEOM_Object, containing the created cone.
3336         #
3337         #  @ref tui_creation_cone "Example"
3338         @ManageTransactions("PrimOp")
3339         def MakeCone(self, thePnt, theAxis, theR1, theR2, theH, theName=None):
3340             """
3341             Create a cone with given base point, axis, height and radiuses.
3342
3343             Parameters:
3344                 thePnt Central point of the first cone base.
3345                 theAxis Cone axis.
3346                 theR1 Radius of the first cone base.
3347                 theR2 Radius of the second cone base.
3348                 theH Cone height.
3349                 theName Object name; when specified, this parameter is used
3350                         for result publication in the study. Otherwise, if automatic
3351                         publication is switched on, default value is used for result name.
3352
3353             Note:
3354                 If both radiuses are non-zero, the cone will be truncated.
3355                 If the radiuses are equal, a cylinder will be created instead.
3356
3357             Returns:
3358                 New GEOM.GEOM_Object, containing the created cone.
3359             """
3360             # Example: see GEOM_TestAll.py
3361             theR1,theR2,theH,Parameters = ParseParameters(theR1,theR2,theH)
3362             anObj = self.PrimOp.MakeConePntVecR1R2H(thePnt, theAxis, theR1, theR2, theH)
3363             RaiseIfFailed("MakeConePntVecR1R2H", self.PrimOp)
3364             anObj.SetParameters(Parameters)
3365             self._autoPublish(anObj, theName, "cone")
3366             return anObj
3367
3368         ## Create a cone with given height and radiuses at
3369         #  the origin of coordinate system. Axis of the cone will
3370         #  be collinear to the OZ axis of the coordinate system.
3371         #  @param theR1 Radius of the first cone base.
3372         #  @param theR2 Radius of the second cone base.
3373         #    \note If both radiuses are non-zero, the cone will be truncated.
3374         #    \note If the radiuses are equal, a cylinder will be created instead.
3375         #  @param theH Cone height.
3376         #  @param theName Object name; when specified, this parameter is used
3377         #         for result publication in the study. Otherwise, if automatic
3378         #         publication is switched on, default value is used for result name.
3379         #
3380         #  @return New GEOM.GEOM_Object, containing the created cone.
3381         #
3382         #  @ref tui_creation_cone "Example"
3383         @ManageTransactions("PrimOp")
3384         def MakeConeR1R2H(self, theR1, theR2, theH, theName=None):
3385             """
3386             Create a cone with given height and radiuses at
3387             the origin of coordinate system. Axis of the cone will
3388             be collinear to the OZ axis of the coordinate system.
3389
3390             Parameters:
3391                 theR1 Radius of the first cone base.
3392                 theR2 Radius of the second cone base.
3393                 theH Cone height.
3394                 theName Object name; when specified, this parameter is used
3395                         for result publication in the study. Otherwise, if automatic
3396                         publication is switched on, default value is used for result name.
3397
3398             Note:
3399                 If both radiuses are non-zero, the cone will be truncated.
3400                 If the radiuses are equal, a cylinder will be created instead.
3401
3402             Returns:
3403                 New GEOM.GEOM_Object, containing the created cone.
3404             """
3405             # Example: see GEOM_TestAll.py
3406             theR1,theR2,theH,Parameters = ParseParameters(theR1,theR2,theH)
3407             anObj = self.PrimOp.MakeConeR1R2H(theR1, theR2, theH)
3408             RaiseIfFailed("MakeConeR1R2H", self.PrimOp)
3409             anObj.SetParameters(Parameters)
3410             self._autoPublish(anObj, theName, "cone")
3411             return anObj
3412
3413         ## Create a torus with given center, normal vector and radiuses.
3414         #  @param thePnt Torus central point.
3415         #  @param theVec Torus axis of symmetry.
3416         #  @param theRMajor Torus major radius.
3417         #  @param theRMinor Torus minor radius.
3418         #  @param theName Object name; when specified, this parameter is used
3419         #         for result publication in the study. Otherwise, if automatic
3420         #         publication is switched on, default value is used for result name.
3421         #
3422         #  @return New GEOM.GEOM_Object, containing the created torus.
3423         #
3424         #  @ref tui_creation_torus "Example"
3425         @ManageTransactions("PrimOp")
3426         def MakeTorus(self, thePnt, theVec, theRMajor, theRMinor, theName=None):
3427             """
3428             Create a torus with given center, normal vector and radiuses.
3429
3430             Parameters:
3431                 thePnt Torus central point.
3432                 theVec Torus axis of symmetry.
3433                 theRMajor Torus major radius.
3434                 theRMinor Torus minor radius.
3435                 theName Object name; when specified, this parameter is used
3436                         for result publication in the study. Otherwise, if automatic
3437                         publication is switched on, default value is used for result name.
3438
3439            Returns:
3440                 New GEOM.GEOM_Object, containing the created torus.
3441             """
3442             # Example: see GEOM_TestAll.py
3443             theRMajor,theRMinor,Parameters = ParseParameters(theRMajor,theRMinor)
3444             anObj = self.PrimOp.MakeTorusPntVecRR(thePnt, theVec, theRMajor, theRMinor)
3445             RaiseIfFailed("MakeTorusPntVecRR", self.PrimOp)
3446             anObj.SetParameters(Parameters)
3447             self._autoPublish(anObj, theName, "torus")
3448             return anObj
3449
3450         ## Create a torus with given radiuses at the origin of coordinate system.
3451         #  @param theRMajor Torus major radius.
3452         #  @param theRMinor Torus minor radius.
3453         #  @param theName Object name; when specified, this parameter is used
3454         #         for result publication in the study. Otherwise, if automatic
3455         #         publication is switched on, default value is used for result name.
3456         #
3457         #  @return New GEOM.GEOM_Object, containing the created torus.
3458         #
3459         #  @ref tui_creation_torus "Example"
3460         @ManageTransactions("PrimOp")
3461         def MakeTorusRR(self, theRMajor, theRMinor, theName=None):
3462             """
3463            Create a torus with given radiuses at the origin of coordinate system.
3464
3465            Parameters:
3466                 theRMajor Torus major radius.
3467                 theRMinor Torus minor radius.
3468                 theName Object name; when specified, this parameter is used
3469                         for result publication in the study. Otherwise, if automatic
3470                         publication is switched on, default value is used for result name.
3471
3472            Returns:
3473                 New GEOM.GEOM_Object, containing the created torus.
3474             """
3475             # Example: see GEOM_TestAll.py
3476             theRMajor,theRMinor,Parameters = ParseParameters(theRMajor,theRMinor)
3477             anObj = self.PrimOp.MakeTorusRR(theRMajor, theRMinor)
3478             RaiseIfFailed("MakeTorusRR", self.PrimOp)
3479             anObj.SetParameters(Parameters)
3480             self._autoPublish(anObj, theName, "torus")
3481             return anObj
3482
3483         # end of l3_3d_primitives
3484         ## @}
3485
3486         ## @addtogroup l3_complex
3487         ## @{
3488
3489         ## Create a shape by extrusion of the base shape along a vector, defined by two points.
3490         #  @param theBase Base shape to be extruded.
3491         #  @param thePoint1 First end of extrusion vector.
3492         #  @param thePoint2 Second end of extrusion vector.
3493         #  @param theScaleFactor Use it to make prism with scaled second base.
3494         #                        Nagative value means not scaled second base.
3495         #  @param theName Object name; when specified, this parameter is used
3496         #         for result publication in the study. Otherwise, if automatic
3497         #         publication is switched on, default value is used for result name.
3498         #
3499         #  @return New GEOM.GEOM_Object, containing the created prism.
3500         #
3501         #  @ref tui_creation_prism "Example"
3502         @ManageTransactions("PrimOp")
3503         def MakePrism(self, theBase, thePoint1, thePoint2, theScaleFactor = -1.0, theName=None):
3504             """
3505             Create a shape by extrusion of the base shape along a vector, defined by two points.
3506
3507             Parameters:
3508                 theBase Base shape to be extruded.
3509                 thePoint1 First end of extrusion vector.
3510                 thePoint2 Second end of extrusion vector.
3511                 theScaleFactor Use it to make prism with scaled second base.
3512                                Nagative value means not scaled second base.
3513                 theName Object name; when specified, this parameter is used
3514                         for result publication in the study. Otherwise, if automatic
3515                         publication is switched on, default value is used for result name.
3516
3517             Returns:
3518                 New GEOM.GEOM_Object, containing the created prism.
3519             """
3520             # Example: see GEOM_TestAll.py
3521             anObj = None
3522             Parameters = ""
3523             if theScaleFactor > 0:
3524                 theScaleFactor,Parameters = ParseParameters(theScaleFactor)
3525                 anObj = self.PrimOp.MakePrismTwoPntWithScaling(theBase, thePoint1, thePoint2, theScaleFactor)
3526             else:
3527                 anObj = self.PrimOp.MakePrismTwoPnt(theBase, thePoint1, thePoint2)
3528             RaiseIfFailed("MakePrismTwoPnt", self.PrimOp)
3529             anObj.SetParameters(Parameters)
3530             self._autoPublish(anObj, theName, "prism")
3531             return anObj
3532
3533         ## Create a shape by extrusion of the base shape along a
3534         #  vector, defined by two points, in 2 Ways (forward/backward).
3535         #  @param theBase Base shape to be extruded.
3536         #  @param thePoint1 First end of extrusion vector.
3537         #  @param thePoint2 Second end of extrusion vector.
3538         #  @param theName Object name; when specified, this parameter is used
3539         #         for result publication in the study. Otherwise, if automatic
3540         #         publication is switched on, default value is used for result name.
3541         #
3542         #  @return New GEOM.GEOM_Object, containing the created prism.
3543         #
3544         #  @ref tui_creation_prism "Example"
3545         @ManageTransactions("PrimOp")
3546         def MakePrism2Ways(self, theBase, thePoint1, thePoint2, theName=None):
3547             """
3548             Create a shape by extrusion of the base shape along a
3549             vector, defined by two points, in 2 Ways (forward/backward).
3550
3551             Parameters:
3552                 theBase Base shape to be extruded.
3553                 thePoint1 First end of extrusion vector.
3554                 thePoint2 Second end of extrusion vector.
3555                 theName Object name; when specified, this parameter is used
3556                         for result publication in the study. Otherwise, if automatic
3557                         publication is switched on, default value is used for result name.
3558
3559             Returns:
3560                 New GEOM.GEOM_Object, containing the created prism.
3561             """
3562             # Example: see GEOM_TestAll.py
3563             anObj = self.PrimOp.MakePrismTwoPnt2Ways(theBase, thePoint1, thePoint2)
3564             RaiseIfFailed("MakePrismTwoPnt", self.PrimOp)
3565             self._autoPublish(anObj, theName, "prism")
3566             return anObj
3567
3568         ## Create a shape by extrusion of the base shape along the vector,
3569         #  i.e. all the space, transfixed by the base shape during its translation
3570         #  along the vector on the given distance.
3571         #  @param theBase Base shape to be extruded.
3572         #  @param theVec Direction of extrusion.
3573         #  @param theH Prism dimension along theVec.
3574         #  @param theScaleFactor Use it to make prism with scaled second base.
3575         #                        Negative value means not scaled second base.
3576         #  @param theName Object name; when specified, this parameter is used
3577         #         for result publication in the study. Otherwise, if automatic
3578         #         publication is switched on, default value is used for result name.
3579         #
3580         #  @return New GEOM.GEOM_Object, containing the created prism.
3581         #
3582         #  @ref tui_creation_prism "Example"
3583         @ManageTransactions("PrimOp")
3584         def MakePrismVecH(self, theBase, theVec, theH, theScaleFactor = -1.0, theName=None):
3585             """
3586             Create a shape by extrusion of the base shape along the vector,
3587             i.e. all the space, transfixed by the base shape during its translation
3588             along the vector on the given distance.
3589
3590             Parameters:
3591                 theBase Base shape to be extruded.
3592                 theVec Direction of extrusion.
3593                 theH Prism dimension along theVec.
3594                 theScaleFactor Use it to make prism with scaled second base.
3595                                Negative value means not scaled second base.
3596                 theName Object name; when specified, this parameter is used
3597                         for result publication in the study. Otherwise, if automatic
3598                         publication is switched on, default value is used for result name.
3599
3600             Returns:
3601                 New GEOM.GEOM_Object, containing the created prism.
3602             """
3603             # Example: see GEOM_TestAll.py
3604             anObj = None
3605             Parameters = ""
3606             if theScaleFactor > 0:
3607                 theH,theScaleFactor,Parameters = ParseParameters(theH,theScaleFactor)
3608                 anObj = self.PrimOp.MakePrismVecHWithScaling(theBase, theVec, theH, theScaleFactor)
3609             else:
3610                 theH,Parameters = ParseParameters(theH)
3611                 anObj = self.PrimOp.MakePrismVecH(theBase, theVec, theH)
3612             RaiseIfFailed("MakePrismVecH", self.PrimOp)
3613             anObj.SetParameters(Parameters)
3614             self._autoPublish(anObj, theName, "prism")
3615             return anObj
3616
3617         ## Create a shape by extrusion of the base shape along the vector,
3618         #  i.e. all the space, transfixed by the base shape during its translation
3619         #  along the vector on the given distance in 2 Ways (forward/backward).
3620         #  @param theBase Base shape to be extruded.
3621         #  @param theVec Direction of extrusion.
3622         #  @param theH Prism dimension along theVec in forward direction.
3623         #  @param theName Object name; when specified, this parameter is used
3624         #         for result publication in the study. Otherwise, if automatic
3625         #         publication is switched on, default value is used for result name.
3626         #
3627         #  @return New GEOM.GEOM_Object, containing the created prism.
3628         #
3629         #  @ref tui_creation_prism "Example"
3630         @ManageTransactions("PrimOp")
3631         def MakePrismVecH2Ways(self, theBase, theVec, theH, theName=None):
3632             """
3633             Create a shape by extrusion of the base shape along the vector,
3634             i.e. all the space, transfixed by the base shape during its translation
3635             along the vector on the given distance in 2 Ways (forward/backward).
3636
3637             Parameters:
3638                 theBase Base shape to be extruded.
3639                 theVec Direction of extrusion.
3640                 theH Prism dimension along theVec in forward direction.
3641                 theName Object name; when specified, this parameter is used
3642                         for result publication in the study. Otherwise, if automatic
3643                         publication is switched on, default value is used for result name.
3644
3645             Returns:
3646                 New GEOM.GEOM_Object, containing the created prism.
3647             """
3648             # Example: see GEOM_TestAll.py
3649             theH,Parameters = ParseParameters(theH)
3650             anObj = self.PrimOp.MakePrismVecH2Ways(theBase, theVec, theH)
3651             RaiseIfFailed("MakePrismVecH2Ways", self.PrimOp)
3652             anObj.SetParameters(Parameters)
3653             self._autoPublish(anObj, theName, "prism")
3654             return anObj
3655
3656         ## Create a shape by extrusion of the base shape along the dx, dy, dz direction
3657         #  @param theBase Base shape to be extruded.
3658         #  @param theDX, theDY, theDZ Directions of extrusion.
3659         #  @param theScaleFactor Use it to make prism with scaled second base.
3660         #                        Nagative value means not scaled second base.
3661         #  @param theName Object name; when specified, this parameter is used
3662         #         for result publication in the study. Otherwise, if automatic
3663         #         publication is switched on, default value is used for result name.
3664         #
3665         #  @return New GEOM.GEOM_Object, containing the created prism.
3666         #
3667         #  @ref tui_creation_prism "Example"
3668         @ManageTransactions("PrimOp")
3669         def MakePrismDXDYDZ(self, theBase, theDX, theDY, theDZ, theScaleFactor = -1.0, theName=None):
3670             """
3671             Create a shape by extrusion of the base shape along the dx, dy, dz direction
3672
3673             Parameters:
3674                 theBase Base shape to be extruded.
3675                 theDX, theDY, theDZ Directions of extrusion.
3676                 theScaleFactor Use it to make prism with scaled second base.
3677                                Nagative value means not scaled second base.
3678                 theName Object name; when specified, this parameter is used
3679                         for result publication in the study. Otherwise, if automatic
3680                         publication is switched on, default value is used for result name.
3681
3682             Returns:
3683                 New GEOM.GEOM_Object, containing the created prism.
3684             """
3685             # Example: see GEOM_TestAll.py
3686             anObj = None
3687             Parameters = ""
3688             if theScaleFactor > 0:
3689                 theDX,theDY,theDZ,theScaleFactor,Parameters = ParseParameters(theDX, theDY, theDZ, theScaleFactor)
3690                 anObj = self.PrimOp.MakePrismDXDYDZWithScaling(theBase, theDX, theDY, theDZ, theScaleFactor)
3691             else:
3692                 theDX,theDY,theDZ,Parameters = ParseParameters(theDX, theDY, theDZ)
3693                 anObj = self.PrimOp.MakePrismDXDYDZ(theBase, theDX, theDY, theDZ)
3694             RaiseIfFailed("MakePrismDXDYDZ", self.PrimOp)
3695             anObj.SetParameters(Parameters)
3696             self._autoPublish(anObj, theName, "prism")
3697             return anObj
3698
3699         ## Create a shape by extrusion of the base shape along the dx, dy, dz direction
3700         #  i.e. all the space, transfixed by the base shape during its translation
3701         #  along the vector on the given distance in 2 Ways (forward/backward).
3702         #  @param theBase Base shape to be extruded.
3703         #  @param theDX, theDY, theDZ Directions of extrusion.
3704         #  @param theName Object name; when specified, this parameter is used
3705         #         for result publication in the study. Otherwise, if automatic
3706         #         publication is switched on, default value is used for result name.
3707         #
3708         #  @return New GEOM.GEOM_Object, containing the created prism.
3709         #
3710         #  @ref tui_creation_prism "Example"
3711         @ManageTransactions("PrimOp")
3712         def MakePrismDXDYDZ2Ways(self, theBase, theDX, theDY, theDZ, theName=None):
3713             """
3714             Create a shape by extrusion of the base shape along the dx, dy, dz direction
3715             i.e. all the space, transfixed by the base shape during its translation
3716             along the vector on the given distance in 2 Ways (forward/backward).
3717
3718             Parameters:
3719                 theBase Base shape to be extruded.
3720                 theDX, theDY, theDZ Directions of extrusion.
3721                 theName Object name; when specified, this parameter is used
3722                         for result publication in the study. Otherwise, if automatic
3723                         publication is switched on, default value is used for result name.
3724
3725             Returns:
3726                 New GEOM.GEOM_Object, containing the created prism.
3727             """
3728             # Example: see GEOM_TestAll.py
3729             theDX,theDY,theDZ,Parameters = ParseParameters(theDX, theDY, theDZ)
3730             anObj = self.PrimOp.MakePrismDXDYDZ2Ways(theBase, theDX, theDY, theDZ)
3731             RaiseIfFailed("MakePrismDXDYDZ2Ways", self.PrimOp)
3732             anObj.SetParameters(Parameters)
3733             self._autoPublish(anObj, theName, "prism")
3734             return anObj
3735
3736         ## Create a shape by revolution of the base shape around the axis
3737         #  on the given angle, i.e. all the space, transfixed by the base
3738         #  shape during its rotation around the axis on the given angle.
3739         #  @param theBase Base shape to be rotated.
3740         #  @param theAxis Rotation axis.
3741         #  @param theAngle Rotation angle in radians.
3742         #  @param theName Object name; when specified, this parameter is used
3743         #         for result publication in the study. Otherwise, if automatic
3744         #         publication is switched on, default value is used for result name.
3745         #
3746         #  @return New GEOM.GEOM_Object, containing the created revolution.
3747         #
3748         #  @ref tui_creation_revolution "Example"
3749         @ManageTransactions("PrimOp")
3750         def MakeRevolution(self, theBase, theAxis, theAngle, theName=None):
3751             """
3752             Create a shape by revolution of the base shape around the axis
3753             on the given angle, i.e. all the space, transfixed by the base
3754             shape during its rotation around the axis on the given angle.
3755
3756             Parameters:
3757                 theBase Base shape to be rotated.
3758                 theAxis Rotation axis.
3759                 theAngle Rotation angle in radians.
3760                 theName Object name; when specified, this parameter is used
3761                         for result publication in the study. Otherwise, if automatic
3762                         publication is switched on, default value is used for result name.
3763
3764             Returns:
3765                 New GEOM.GEOM_Object, containing the created revolution.
3766             """
3767             # Example: see GEOM_TestAll.py
3768             theAngle,Parameters = ParseParameters(theAngle)
3769             anObj = self.PrimOp.MakeRevolutionAxisAngle(theBase, theAxis, theAngle)
3770             RaiseIfFailed("MakeRevolutionAxisAngle", self.PrimOp)
3771             anObj.SetParameters(Parameters)
3772             self._autoPublish(anObj, theName, "revolution")
3773             return anObj
3774
3775         ## Create a shape by revolution of the base shape around the axis
3776         #  on the given angle, i.e. all the space, transfixed by the base
3777         #  shape during its rotation around the axis on the given angle in
3778         #  both directions (forward/backward)
3779         #  @param theBase Base shape to be rotated.
3780         #  @param theAxis Rotation axis.
3781         #  @param theAngle Rotation angle in radians.
3782         #  @param theName Object name; when specified, this parameter is used
3783         #         for result publication in the study. Otherwise, if automatic
3784         #         publication is switched on, default value is used for result name.
3785         #
3786         #  @return New GEOM.GEOM_Object, containing the created revolution.
3787         #
3788         #  @ref tui_creation_revolution "Example"
3789         @ManageTransactions("PrimOp")
3790         def MakeRevolution2Ways(self, theBase, theAxis, theAngle, theName=None):
3791             """
3792             Create a shape by revolution of the base shape around the axis
3793             on the given angle, i.e. all the space, transfixed by the base
3794             shape during its rotation around the axis on the given angle in
3795             both directions (forward/backward).
3796
3797             Parameters:
3798                 theBase Base shape to be rotated.
3799                 theAxis Rotation axis.
3800                 theAngle Rotation angle in radians.
3801                 theName Object name; when specified, this parameter is used
3802                         for result publication in the study. Otherwise, if automatic
3803                         publication is switched on, default value is used for result name.
3804
3805             Returns:
3806                 New GEOM.GEOM_Object, containing the created revolution.
3807             """
3808             theAngle,Parameters = ParseParameters(theAngle)
3809             anObj = self.PrimOp.MakeRevolutionAxisAngle2Ways(theBase, theAxis, theAngle)
3810             RaiseIfFailed("MakeRevolutionAxisAngle2Ways", self.PrimOp)
3811             anObj.SetParameters(Parameters)
3812             self._autoPublish(anObj, theName, "revolution")
3813             return anObj
3814
3815         ## Create a face from a given set of contours.
3816         #  @param theContours either a list or a compound of edges/wires.
3817         #  @param theMinDeg a minimal degree of BSpline surface to create.
3818         #  @param theMaxDeg a maximal degree of BSpline surface to create.
3819         #  @param theTol2D a 2d tolerance to be reached.
3820         #  @param theTol3D a 3d tolerance to be reached.
3821         #  @param theNbIter a number of iteration of approximation algorithm.
3822         #  @param theMethod Kind of method to perform filling operation
3823         #         (see GEOM.filling_oper_method enum).
3824         #  @param isApprox if True, BSpline curves are generated in the process
3825         #                  of surface construction. By default it is False, that means
3826         #                  the surface is created using given curves. The usage of
3827         #                  Approximation makes the algorithm work slower, but allows
3828         #                  building the surface for rather complex cases.
3829         #  @param theName Object name; when specified, this parameter is used
3830         #         for result publication in the study. Otherwise, if automatic
3831         #         publication is switched on, default value is used for result name.
3832         #
3833         #  @return New GEOM.GEOM_Object (face), containing the created filling surface.
3834         #
3835         #  @ref tui_creation_filling "Example"
3836         @ManageTransactions("PrimOp")
3837         def MakeFilling(self, theContours, theMinDeg=2, theMaxDeg=5, theTol2D=0.0001,
3838                         theTol3D=0.0001, theNbIter=0, theMethod=GEOM.FOM_Default, isApprox=0, theName=None):
3839             """
3840             Create a face from a given set of contours.
3841
3842             Parameters:
3843                 theContours either a list or a compound of edges/wires.
3844                 theMinDeg a minimal degree of BSpline surface to create.
3845                 theMaxDeg a maximal degree of BSpline surface to create.
3846                 theTol2D a 2d tolerance to be reached.
3847                 theTol3D a 3d tolerance to be reached.
3848                 theNbIter a number of iteration of approximation algorithm.
3849                 theMethod Kind of method to perform filling operation
3850                           (see GEOM.filling_oper_method enum).
3851                 isApprox if True, BSpline curves are generated in the process
3852                          of surface construction. By default it is False, that means
3853                          the surface is created using given curves. The usage of
3854                          Approximation makes the algorithm work slower, but allows
3855                          building the surface for rather complex cases.
3856                 theName Object name; when specified, this parameter is used
3857                         for result publication in the study. Otherwise, if automatic
3858                         publication is switched on, default value is used for result name.
3859
3860             Returns:
3861                 New GEOM.GEOM_Object (face), containing the created filling surface.
3862
3863             Example of usage:
3864                 filling = geompy.MakeFilling(compound, 2, 5, 0.0001, 0.0001, 5)
3865             """
3866             # Example: see GEOM_TestAll.py
3867             theMinDeg,theMaxDeg,theTol2D,theTol3D,theNbIter,Parameters = ParseParameters(theMinDeg, theMaxDeg, theTol2D, theTol3D, theNbIter)
3868             anObj = self.PrimOp.MakeFilling(ToList(theContours), theMinDeg, theMaxDeg,
3869                                             theTol2D, theTol3D, theNbIter,
3870                                             theMethod, isApprox)
3871             RaiseIfFailed("MakeFilling", self.PrimOp)
3872             anObj.SetParameters(Parameters)
3873             self._autoPublish(anObj, theName, "filling")
3874             return anObj
3875
3876
3877         ## Create a face from a given set of contours.
3878         #  This method corresponds to MakeFilling() with isApprox=True.
3879         #  @param theContours either a list or a compound of edges/wires.
3880         #  @param theMinDeg a minimal degree of BSpline surface to create.
3881         #  @param theMaxDeg a maximal degree of BSpline surface to create.
3882         #  @param theTol3D a 3d tolerance to be reached.
3883         #  @param theName Object name; when specified, this parameter is used
3884         #         for result publication in the study. Otherwise, if automatic
3885         #         publication is switched on, default value is used for result name.
3886         #
3887         #  @return New GEOM.GEOM_Object (face), containing the created filling surface.
3888         #
3889         #  @ref tui_creation_filling "Example"
3890         @ManageTransactions("PrimOp")
3891         def MakeFillingNew(self, theContours, theMinDeg=2, theMaxDeg=5, theTol3D=0.0001, theName=None):
3892             """
3893             Create a filling from the given compound of contours.
3894             This method corresponds to MakeFilling() with isApprox=True.
3895
3896             Parameters:
3897                 theContours either a list or a compound of edges/wires.
3898                 theMinDeg a minimal degree of BSpline surface to create.
3899                 theMaxDeg a maximal degree of BSpline surface to create.
3900                 theTol3D a 3d tolerance to be reached.
3901                 theName Object name; when specified, this parameter is used
3902                         for result publication in the study. Otherwise, if automatic
3903                         publication is switched on, default value is used for result name.
3904
3905             Returns:
3906                 New GEOM.GEOM_Object (face), containing the created filling surface.
3907
3908             Example of usage:
3909                 filling = geompy.MakeFillingNew(compound, 2, 5, 0.0001)
3910             """
3911             # Example: see GEOM_TestAll.py
3912             theMinDeg,theMaxDeg,theTol3D,Parameters = ParseParameters(theMinDeg, theMaxDeg, theTol3D)
3913             anObj = self.PrimOp.MakeFilling(ToList(theContours), theMinDeg, theMaxDeg,
3914                                             0, theTol3D, 0, GEOM.FOM_Default, True)
3915             RaiseIfFailed("MakeFillingNew", self.PrimOp)
3916             anObj.SetParameters(Parameters)
3917             self._autoPublish(anObj, theName, "filling")
3918             return anObj
3919
3920         ## Create a shell or solid passing through set of sections.Sections should be wires,edges or vertices.
3921         #  @param theSeqSections - set of specified sections.
3922         #  @param theModeSolid - mode defining building solid or shell
3923         #  @param thePreci - precision 3D used for smoothing
3924         #  @param theRuled - mode defining type of the result surfaces (ruled or smoothed).
3925         #  @param theName Object name; when specified, this parameter is used
3926         #         for result publication in the study. Otherwise, if automatic
3927         #         publication is switched on, default value is used for result name.
3928         #
3929         #  @return New GEOM.GEOM_Object, containing the created shell or solid.
3930         #
3931         #  @ref swig_todo "Example"
3932         @ManageTransactions("PrimOp")
3933         def MakeThruSections(self, theSeqSections, theModeSolid, thePreci, theRuled, theName=None):
3934             """
3935             Create a shell or solid passing through set of sections.Sections should be wires,edges or vertices.
3936
3937             Parameters:
3938                 theSeqSections - set of specified sections.
3939                 theModeSolid - mode defining building solid or shell
3940                 thePreci - precision 3D used for smoothing
3941                 theRuled - mode defining type of the result surfaces (ruled or smoothed).
3942                 theName Object name; when specified, this parameter is used
3943                         for result publication in the study. Otherwise, if automatic
3944                         publication is switched on, default value is used for result name.
3945
3946             Returns:
3947                 New GEOM.GEOM_Object, containing the created shell or solid.
3948             """
3949             # Example: see GEOM_TestAll.py
3950             anObj = self.PrimOp.MakeThruSections(theSeqSections,theModeSolid,thePreci,theRuled)
3951             RaiseIfFailed("MakeThruSections", self.PrimOp)
3952             self._autoPublish(anObj, theName, "filling")
3953             return anObj
3954
3955         ## Create a shape by extrusion of the base shape along
3956         #  the path shape. The path shape can be a wire or an edge. It is
3957         #  possible to generate groups along with the result by means of
3958         #  setting the flag \a IsGenerateGroups.<BR>
3959         #  If \a thePath is a closed edge or wire and \a IsGenerateGroups is
3960         #  set, an error is occurred. If \a thePath is not closed edge/wire,
3961         #  the following groups are returned:
3962         #  - If \a theBase is unclosed edge or wire: "Down", "Up", "Side1",
3963         #    "Side2";
3964         #  - If \a theBase is closed edge or wire, face or shell: "Down", "Up",
3965         #    "Other".
3966         #  .
3967         #  "Down" and "Up" groups contain:
3968         #  - Edges if \a theBase is edge or wire;
3969         #  - Faces if \a theBase is face or shell.<BR>
3970         #  .
3971         #  "Side1" and "Side2" groups contain edges generated from the first
3972         #  and last vertices of \a theBase. The first and last vertices are
3973         #  determined taking into account edge/wire orientation.<BR>
3974         #  "Other" group represents faces generated from the bounding edges of
3975         #  \a theBase.
3976         #
3977         #  @param theBase Base shape to be extruded.
3978         #  @param thePath Path shape to extrude the base shape along it.
3979         #  @param IsGenerateGroups flag that tells if it is necessary to
3980         #         create groups. It is equal to False by default.
3981         #  @param theName Object name; when specified, this parameter is used
3982         #         for result publication in the study. Otherwise, if automatic
3983         #         publication is switched on, default value is used for result name.
3984         #
3985         #  @return New GEOM.GEOM_Object, containing the created pipe if 
3986         #          \a IsGenerateGroups is not set. Otherwise it returns a
3987         #          list of GEOM.GEOM_Object. Its first element is the created pipe, the
3988         #          remaining ones are created groups.
3989         #
3990         #  @ref tui_creation_pipe "Example"
3991         @ManageTransactions("PrimOp")
3992         def MakePipe(self, theBase, thePath,
3993                      IsGenerateGroups=False, theName=None):
3994             """
3995             Create a shape by extrusion of the base shape along
3996             the path shape. The path shape can be a wire or an edge. It is
3997             possible to generate groups along with the result by means of
3998             setting the flag IsGenerateGroups.
3999             If thePath is a closed edge or wire and IsGenerateGroups is
4000             set, an error is occurred. If thePath is not closed edge/wire,
4001             the following groups are returned:
4002             - If theBase is unclosed edge or wire: "Down", "Up", "Side1",
4003               "Side2";
4004             - If theBase is closed edge or wire, face or shell: "Down", "Up",
4005               "Other".
4006             "Down" and "Up" groups contain:
4007             - Edges if theBase is edge or wire;
4008             - Faces if theBase is face or shell.
4009             "Side1" and "Side2" groups contain edges generated from the first
4010             and last vertices of theBase. The first and last vertices are
4011             determined taking into account edge/wire orientation.
4012             "Other" group represents faces generated from the bounding edges of
4013             theBase.
4014
4015             Parameters:
4016                 theBase Base shape to be extruded.
4017                 thePath Path shape to extrude the base shape along it.
4018                 IsGenerateGroups flag that tells if it is necessary to
4019                         create groups. It is equal to False by default.
4020                 theName Object name; when specified, this parameter is used
4021                         for result publication in the study. Otherwise, if automatic
4022                         publication is switched on, default value is used for result name.
4023
4024             Returns:
4025                 New GEOM.GEOM_Object, containing the created pipe if 
4026                 IsGenerateGroups is not set. Otherwise it returns a
4027                 list of GEOM.GEOM_Object. Its first element is the created pipe, the
4028                 remaining ones are created groups.
4029             """
4030             # Example: see GEOM_TestAll.py
4031             aList = self.PrimOp.MakePipe(theBase, thePath, IsGenerateGroups)
4032             RaiseIfFailed("MakePipe", self.PrimOp)
4033
4034             if IsGenerateGroups:
4035               self._autoPublish(aList, theName, "pipe")
4036               return aList
4037
4038             self._autoPublish(aList[0], theName, "pipe")
4039             return aList[0]
4040
4041         ## Create a shape by extrusion of the profile shape along
4042         #  the path shape. The path shape can be a wire or an edge.
4043         #  the several profiles can be specified in the several locations of path.
4044         #  It is possible to generate groups along with the result by means of
4045         #  setting the flag \a IsGenerateGroups. For detailed information on
4046         #  groups that can be created please see the method MakePipe().
4047         #  @param theSeqBases - list of  Bases shape to be extruded.
4048         #  @param theLocations - list of locations on the path corresponding
4049         #                        specified list of the Bases shapes. Number of locations
4050         #                        should be equal to number of bases or list of locations can be empty.
4051         #  @param thePath - Path shape to extrude the base shape along it.
4052         #  @param theWithContact - the mode defining that the section is translated to be in
4053         #                          contact with the spine.
4054         #  @param theWithCorrection - defining that the section is rotated to be
4055         #                             orthogonal to the spine tangent in the correspondent point
4056         #  @param IsGenerateGroups - flag that tells if it is necessary to
4057         #                          create groups. It is equal to False by default.
4058         #  @param theName Object name; when specified, this parameter is used
4059         #         for result publication in the study. Otherwise, if automatic
4060         #         publication is switched on, default value is used for result name.
4061         #
4062         #  @return New GEOM.GEOM_Object, containing the created pipe if 
4063         #          \a IsGenerateGroups is not set. Otherwise it returns new
4064         #          GEOM.ListOfGO. Its first element is the created pipe, the
4065         #          remaining ones are created groups.
4066         #
4067         #  @ref tui_creation_pipe_with_diff_sec "Example"
4068         @ManageTransactions("PrimOp")
4069         def MakePipeWithDifferentSections(self, theSeqBases,
4070                                           theLocations, thePath,
4071                                           theWithContact, theWithCorrection,
4072                                           IsGenerateGroups=False, theName=None):
4073             """
4074             Create a shape by extrusion of the profile shape along
4075             the path shape. The path shape can be a wire or an edge.
4076             the several profiles can be specified in the several locations of path.
4077             It is possible to generate groups along with the result by means of
4078             setting the flag IsGenerateGroups. For detailed information on
4079             groups that can be created please see the method geompy.MakePipe().
4080
4081             Parameters:
4082                 theSeqBases - list of  Bases shape to be extruded.
4083                 theLocations - list of locations on the path corresponding
4084                                specified list of the Bases shapes. Number of locations
4085                                should be equal to number of bases or list of locations can be empty.
4086                 thePath - Path shape to extrude the base shape along it.
4087                 theWithContact - the mode defining that the section is translated to be in
4088                                  contact with the spine(0/1)
4089                 theWithCorrection - defining that the section is rotated to be
4090                                     orthogonal to the spine tangent in the correspondent point (0/1)
4091                 IsGenerateGroups - flag that tells if it is necessary to
4092                                  create groups. It is equal to False by default.
4093                 theName Object name; when specified, this parameter is used
4094                         for result publication in the study. Otherwise, if automatic
4095                         publication is switched on, default value is used for result name.
4096
4097             Returns:
4098                 New GEOM.GEOM_Object, containing the created pipe if 
4099                 IsGenerateGroups is not set. Otherwise it returns new
4100                 GEOM.ListOfGO. Its first element is the created pipe, the
4101                 remaining ones are created groups.
4102             """
4103             aList = self.PrimOp.MakePipeWithDifferentSections(theSeqBases,
4104                                                               theLocations, thePath,
4105                                                               theWithContact, theWithCorrection,
4106                                                               False, IsGenerateGroups)
4107             RaiseIfFailed("MakePipeWithDifferentSections", self.PrimOp)
4108
4109             if IsGenerateGroups:
4110               self._autoPublish(aList, theName, "pipe")
4111               return aList
4112
4113             self._autoPublish(aList[0], theName, "pipe")
4114             return aList[0]
4115
4116         ## Create a shape by extrusion of the profile shape along
4117         #  the path shape. This function is a version of
4118         #  MakePipeWithDifferentSections() with the same parameters, except
4119         #  eliminated theWithContact and theWithCorrection. So it is
4120         #  possible to find the description of all parameters is in this
4121         #  method. The difference is that this method performs the operation
4122         #  step by step, i.e. it creates pipes between each pair of neighbor
4123         #  sections and fuses them into a single shape.
4124         #
4125         #  @ref tui_creation_pipe_with_diff_sec "Example"
4126         @ManageTransactions("PrimOp")
4127         def MakePipeWithDifferentSectionsBySteps(self, theSeqBases,
4128                                                  theLocations, thePath,
4129                                                  IsGenerateGroups=False, theName=None):
4130             """
4131             Create a shape by extrusion of the profile shape along
4132             the path shape. This function is a version of
4133             MakePipeWithDifferentSections() with the same parameters, except
4134             eliminated theWithContact and theWithCorrection. So it is
4135             possible to find the description of all parameters is in this
4136             method. The difference is that this method performs the operation
4137             step by step, i.e. it creates pipes between each pair of neighbor
4138             sections and fuses them into a single shape.
4139             """
4140             aList = self.PrimOp.MakePipeWithDifferentSections(theSeqBases,
4141                                                               theLocations, thePath,
4142                                                               False, False,
4143                                                               True, IsGenerateGroups)
4144             RaiseIfFailed("MakePipeWithDifferentSectionsBySteps", self.PrimOp)
4145
4146             if IsGenerateGroups:
4147               self._autoPublish(aList, theName, "pipe")
4148               return aList
4149
4150             self._autoPublish(aList[0], theName, "pipe")
4151             return aList[0]
4152
4153         ## Create a shape by extrusion of the profile shape along
4154         #  the path shape. The path shape can be a wire or an edge.
4155         #  the several profiles can be specified in the several locations of path.
4156         #  It is possible to generate groups along with the result by means of
4157         #  setting the flag \a IsGenerateGroups. For detailed information on
4158         #  groups that can be created please see the method MakePipe().
4159         #  @param theSeqBases - list of  Bases shape to be extruded. Base shape must be
4160         #                       shell or face. If number of faces in neighbour sections
4161         #                       aren't coincided result solid between such sections will
4162         #                       be created using external boundaries of this shells.
4163         #  @param theSeqSubBases - list of corresponding sub-shapes of section shapes.
4164         #                          This list is used for searching correspondences between
4165         #                          faces in the sections. Size of this list must be equal
4166         #                          to size of list of base shapes.
4167         #  @param theLocations - list of locations on the path corresponding
4168         #                        specified list of the Bases shapes. Number of locations
4169         #                        should be equal to number of bases. First and last
4170         #                        locations must be coincided with first and last vertexes
4171         #                        of path correspondingly.
4172         #  @param thePath - Path shape to extrude the base shape along it.
4173         #  @param theWithContact - the mode defining that the section is translated to be in
4174         #                          contact with the spine.
4175         #  @param theWithCorrection - defining that the section is rotated to be
4176         #                             orthogonal to the spine tangent in the correspondent point
4177         #  @param IsGenerateGroups - flag that tells if it is necessary to
4178         #                          create groups. It is equal to False by default.
4179         #  @param theName Object name; when specified, this parameter is used
4180         #         for result publication in the study. Otherwise, if automatic
4181         #         publication is switched on, default value is used for result name.
4182         #
4183         #  @return New GEOM.GEOM_Object, containing the created solids if 
4184         #          \a IsGenerateGroups is not set. Otherwise it returns new
4185         #          GEOM.ListOfGO. Its first element is the created solids, the
4186         #          remaining ones are created groups.
4187         #
4188         #  @ref tui_creation_pipe_with_shell_sec "Example"
4189         @ManageTransactions("PrimOp")
4190         def MakePipeWithShellSections(self, theSeqBases, theSeqSubBases,
4191                                       theLocations, thePath,
4192                                       theWithContact, theWithCorrection,
4193                                       IsGenerateGroups=False, theName=None):
4194             """
4195             Create a shape by extrusion of the profile shape along
4196             the path shape. The path shape can be a wire or an edge.
4197             the several profiles can be specified in the several locations of path.
4198             It is possible to generate groups along with the result by means of
4199             setting the flag IsGenerateGroups. For detailed information on
4200             groups that can be created please see the method geompy.MakePipe().
4201
4202             Parameters:
4203                 theSeqBases - list of  Bases shape to be extruded. Base shape must be
4204                               shell or face. If number of faces in neighbour sections
4205                               aren't coincided result solid between such sections will
4206                               be created using external boundaries of this shells.
4207                 theSeqSubBases - list of corresponding sub-shapes of section shapes.
4208                                  This list is used for searching correspondences between
4209                                  faces in the sections. Size of this list must be equal
4210                                  to size of list of base shapes.
4211                 theLocations - list of locations on the path corresponding
4212                                specified list of the Bases shapes. Number of locations
4213                                should be equal to number of bases. First and last
4214                                locations must be coincided with first and last vertexes
4215                                of path correspondingly.
4216                 thePath - Path shape to extrude the base shape along it.
4217                 theWithContact - the mode defining that the section is translated to be in
4218                                  contact with the spine (0/1)
4219                 theWithCorrection - defining that the section is rotated to be
4220                                     orthogonal to the spine tangent in the correspondent point (0/1)
4221                 IsGenerateGroups - flag that tells if it is necessary to
4222                                  create groups. It is equal to False by default.
4223                 theName Object name; when specified, this parameter is used
4224                         for result publication in the study. Otherwise, if automatic
4225                         publication is switched on, default value is used for result name.
4226
4227             Returns:
4228                 New GEOM.GEOM_Object, containing the created solids if 
4229                 IsGenerateGroups is not set. Otherwise it returns new
4230                 GEOM.ListOfGO. Its first element is the created solids, the
4231                 remaining ones are created groups.
4232             """
4233             aList = self.PrimOp.MakePipeWithShellSections(theSeqBases, theSeqSubBases,
4234                                                           theLocations, thePath,
4235                                                           theWithContact, theWithCorrection,
4236                                                           IsGenerateGroups)
4237             RaiseIfFailed("MakePipeWithShellSections", self.PrimOp)
4238
4239             if IsGenerateGroups:
4240               self._autoPublish(aList, theName, "pipe")
4241               return aList
4242
4243             self._autoPublish(aList[0], theName, "pipe")
4244             return aList[0]
4245
4246         ## Create a shape by extrusion of the profile shape along
4247         #  the path shape. This function is used only for debug pipe
4248         #  functionality - it is a version of function MakePipeWithShellSections()
4249         #  which give a possibility to receive information about
4250         #  creating pipe between each pair of sections step by step.
4251         @ManageTransactions("PrimOp")
4252         def MakePipeWithShellSectionsBySteps(self, theSeqBases, theSeqSubBases,
4253                                              theLocations, thePath,
4254                                              theWithContact, theWithCorrection,
4255                                              IsGenerateGroups=False, theName=None):
4256             """
4257             Create a shape by extrusion of the profile shape along
4258             the path shape. This function is used only for debug pipe
4259             functionality - it is a version of previous function
4260             geompy.MakePipeWithShellSections() which give a possibility to
4261             receive information about creating pipe between each pair of
4262             sections step by step.
4263             """
4264             res = []
4265             nbsect = len(theSeqBases)
4266             nbsubsect = len(theSeqSubBases)
4267             #print "nbsect = ",nbsect
4268             for i in range(1,nbsect):
4269                 #print "  i = ",i
4270                 tmpSeqBases = [ theSeqBases[i-1], theSeqBases[i] ]
4271                 tmpLocations = [ theLocations[i-1], theLocations[i] ]
4272                 tmpSeqSubBases = []
4273                 if nbsubsect>0: tmpSeqSubBases = [ theSeqSubBases[i-1], theSeqSubBases[i] ]
4274                 aList = self.PrimOp.MakePipeWithShellSections(tmpSeqBases, tmpSeqSubBases,
4275                                                               tmpLocations, thePath,
4276                                                               theWithContact, theWithCorrection,
4277                                                               IsGenerateGroups)
4278                 if self.PrimOp.IsDone() == 0:
4279                     print("Problems with pipe creation between ",i," and ",i+1," sections")
4280                     RaiseIfFailed("MakePipeWithShellSections", self.PrimOp)
4281                     break
4282                 else:
4283                     print("Pipe between ",i," and ",i+1," sections is OK")
4284                     res.append(aList[0])
4285                     pass
4286                 pass
4287
4288             resc = self.MakeCompound(res)
4289             #resc = self.MakeSewing(res, 0.001)
4290             #print "resc: ",resc
4291             self._autoPublish(resc, theName, "pipe")
4292             return resc
4293
4294         ## Create solids between given sections.
4295         #  It is possible to generate groups along with the result by means of
4296         #  setting the flag \a IsGenerateGroups. For detailed information on
4297         #  groups that can be created please see the method MakePipe().
4298         #  @param theSeqBases - list of sections (shell or face).
4299         #  @param theLocations - list of corresponding vertexes
4300         #  @param IsGenerateGroups - flag that tells if it is necessary to
4301         #         create groups. It is equal to False by default.
4302         #  @param theName Object name; when specified, this parameter is used
4303         #         for result publication in the study. Otherwise, if automatic
4304         #         publication is switched on, default value is used for result name.
4305         #
4306         #  @return New GEOM.GEOM_Object, containing the created solids if 
4307         #          \a IsGenerateGroups is not set. Otherwise it returns new
4308         #          GEOM.ListOfGO. Its first element is the created solids, the
4309         #          remaining ones are created groups.
4310         #
4311         #  @ref tui_creation_pipe_without_path "Example"
4312         @ManageTransactions("PrimOp")
4313         def MakePipeShellsWithoutPath(self, theSeqBases, theLocations,
4314                                       IsGenerateGroups=False, theName=None):
4315             """
4316             Create solids between given sections.
4317             It is possible to generate groups along with the result by means of
4318             setting the flag IsGenerateGroups. For detailed information on
4319             groups that can be created please see the method geompy.MakePipe().
4320
4321             Parameters:
4322                 theSeqBases - list of sections (shell or face).
4323                 theLocations - list of corresponding vertexes
4324                 IsGenerateGroups - flag that tells if it is necessary to
4325                                  create groups. It is equal to False by default.
4326                 theName Object name; when specified, this parameter is used
4327                         for result publication in the study. Otherwise, if automatic
4328                         publication is switched on, default value is used for result name.
4329
4330             Returns:
4331                 New GEOM.GEOM_Object, containing the created solids if 
4332                 IsGenerateGroups is not set. Otherwise it returns new
4333                 GEOM.ListOfGO. Its first element is the created solids, the
4334                 remaining ones are created groups.
4335             """
4336             aList = self.PrimOp.MakePipeShellsWithoutPath(theSeqBases, theLocations,
4337                                                           IsGenerateGroups)
4338             RaiseIfFailed("MakePipeShellsWithoutPath", self.PrimOp)
4339
4340             if IsGenerateGroups:
4341               self._autoPublish(aList, theName, "pipe")
4342               return aList
4343
4344             self._autoPublish(aList[0], theName, "pipe")
4345             return aList[0]
4346
4347         ## Create a shape by extrusion of the base shape along
4348         #  the path shape with constant bi-normal direction along the given vector.
4349         #  The path shape can be a wire or an edge.
4350         #  It is possible to generate groups along with the result by means of
4351         #  setting the flag \a IsGenerateGroups. For detailed information on
4352         #  groups that can be created please see the method MakePipe().
4353         #  @param theBase Base shape to be extruded.
4354         #  @param thePath Path shape to extrude the base shape along it.
4355         #  @param theVec Vector defines a constant binormal direction to keep the
4356         #                same angle between the direction and the sections
4357         #                along the sweep surface.
4358         #  @param IsGenerateGroups flag that tells if it is necessary to
4359         #         create groups. It is equal to False by default.
4360         #  @param theName Object name; when specified, this parameter is used
4361         #         for result publication in the study. Otherwise, if automatic
4362         #         publication is switched on, default value is used for result name.
4363         #
4364         #  @return New GEOM.GEOM_Object, containing the created pipe if 
4365         #          \a IsGenerateGroups is not set. Otherwise it returns new
4366         #          GEOM.ListOfGO. Its first element is the created pipe, the
4367         #          remaining ones are created groups.
4368         #
4369         #  @ref tui_creation_pipe "Example"
4370         @ManageTransactions("PrimOp")
4371         def MakePipeBiNormalAlongVector(self, theBase, thePath, theVec,
4372                                         IsGenerateGroups=False, theName=None):
4373             """
4374             Create a shape by extrusion of the base shape along
4375             the path shape with constant bi-normal direction along the given vector.
4376             The path shape can be a wire or an edge.
4377             It is possible to generate groups along with the result by means of
4378             setting the flag IsGenerateGroups. For detailed information on
4379             groups that can be created please see the method geompy.MakePipe().
4380
4381             Parameters:
4382                 theBase Base shape to be extruded.
4383                 thePath Path shape to extrude the base shape along it.
4384                 theVec Vector defines a constant binormal direction to keep the
4385                        same angle between the direction and the sections
4386                        along the sweep surface.
4387                 IsGenerateGroups flag that tells if it is necessary to
4388                                  create groups. It is equal to False by default.
4389                 theName Object name; when specified, this parameter is used
4390                         for result publication in the study. Otherwise, if automatic
4391                         publication is switched on, default value is used for result name.
4392
4393             Returns:
4394                 New GEOM.GEOM_Object, containing the created pipe if 
4395                 IsGenerateGroups is not set. Otherwise it returns new
4396                 GEOM.ListOfGO. Its first element is the created pipe, the
4397                 remaining ones are created groups.
4398             """
4399             # Example: see GEOM_TestAll.py
4400             aList = self.PrimOp.MakePipeBiNormalAlongVector(theBase, thePath,
4401                           theVec, IsGenerateGroups)
4402             RaiseIfFailed("MakePipeBiNormalAlongVector", self.PrimOp)
4403
4404             if IsGenerateGroups:
4405               self._autoPublish(aList, theName, "pipe")
4406               return aList
4407
4408             self._autoPublish(aList[0], theName, "pipe")
4409             return aList[0]
4410
4411         ## Makes a thick solid from a shape. If the input is a surface shape
4412         #  (face or shell) the result is a thick solid. If an input shape is
4413         #  a solid the result is a hollowed solid with removed faces.
4414         #  @param theShape Face or Shell to get thick solid or solid to get
4415         #         hollowed solid.
4416         #  @param theThickness Thickness of the resulting solid
4417         #  @param theFacesIDs the list of face IDs to be removed from the
4418         #         result. It is ignored if \a theShape is a face or a shell.
4419         #         It is empty by default. 
4420         #  @param theInside If true the thickness is applied towards inside
4421         #  @param theName Object name; when specified, this parameter is used
4422         #         for result publication in the study. Otherwise, if automatic
4423         #         publication is switched on, default value is used for result name.
4424         #
4425         #  @return New GEOM.GEOM_Object, containing the created solid
4426         #
4427         #  @ref tui_creation_thickness "Example"
4428         @ManageTransactions("PrimOp")
4429         def MakeThickSolid(self, theShape, theThickness,
4430                            theFacesIDs=[], theInside=False, theName=None):
4431             """
4432             Make a thick solid from a shape. If the input is a surface shape
4433             (face or shell) the result is a thick solid. If an input shape is
4434             a solid the result is a hollowed solid with removed faces.
4435
4436             Parameters:
4437                  theShape Face or Shell to get thick solid or solid to get
4438                           hollowed solid.
4439                  theThickness Thickness of the resulting solid
4440                  theFacesIDs the list of face IDs to be removed from the
4441                           result. It is ignored if theShape is a face or a
4442                           shell. It is empty by default. 
4443                  theInside If true the thickness is applied towards inside
4444                  theName Object name; when specified, this parameter is used
4445                          for result publication in the study. Otherwise, if automatic
4446                          publication is switched on, default value is used for result name.
4447
4448             Returns:
4449                 New GEOM.GEOM_Object, containing the created solid
4450             """
4451             # Example: see GEOM_TestAll.py
4452             theThickness,Parameters = ParseParameters(theThickness)
4453             anObj = self.PrimOp.MakeThickening(theShape, theFacesIDs,
4454                                                theThickness, True, theInside)
4455             RaiseIfFailed("MakeThickSolid", self.PrimOp)
4456             anObj.SetParameters(Parameters)
4457             self._autoPublish(anObj, theName, "thickSolid")
4458             return anObj
4459
4460
4461         ## Modifies a shape to make it a thick solid. If the input is a surface
4462         #  shape (face or shell) the result is a thick solid. If an input shape
4463         #  is a solid the result is a hollowed solid with removed faces.
4464         #  @param theShape Face or Shell to get thick solid or solid to get
4465         #         hollowed solid.
4466         #  @param theThickness Thickness of the resulting solid
4467         #  @param theFacesIDs the list of face IDs to be removed from the
4468         #         result. It is ignored if \a theShape is a face or a shell.
4469         #         It is empty by default. 
4470         #  @param theInside If true the thickness is applied towards inside
4471         #
4472         #  @return The modified shape
4473         #
4474         #  @ref tui_creation_thickness "Example"
4475         @ManageTransactions("PrimOp")
4476         def Thicken(self, theShape, theThickness, theFacesIDs=[], theInside=False):
4477             """
4478             Modifies a shape to make it a thick solid. If the input is a
4479             surface shape (face or shell) the result is a thick solid. If
4480             an input shape is a solid the result is a hollowed solid with
4481             removed faces.
4482
4483             Parameters:
4484                 theShape Face or Shell to get thick solid or solid to get
4485                          hollowed solid.
4486                 theThickness Thickness of the resulting solid
4487                 theFacesIDs the list of face IDs to be removed from the
4488                          result. It is ignored if \a theShape is a face or
4489                          a shell. It is empty by default. 
4490                 theInside If true the thickness is applied towards inside
4491
4492             Returns:
4493                 The modified shape
4494             """
4495             # Example: see GEOM_TestAll.py
4496             theThickness,Parameters = ParseParameters(theThickness)
4497             anObj = self.PrimOp.MakeThickening(theShape, theFacesIDs,
4498                                                theThickness, False, theInside)
4499             RaiseIfFailed("Thicken", self.PrimOp)
4500             anObj.SetParameters(Parameters)
4501             return anObj
4502
4503         ## Build a middle path of a pipe-like shape.
4504         #  The path shape can be a wire or an edge.
4505         #  @param theShape It can be closed or unclosed pipe-like shell
4506         #                  or a pipe-like solid.
4507         #  @param theBase1, theBase2 Two bases of the supposed pipe. This
4508         #                            should be wires or faces of theShape.
4509         #  @param theName Object name; when specified, this parameter is used
4510         #         for result publication in the study. Otherwise, if automatic
4511         #         publication is switched on, default value is used for result name.
4512         #
4513         #  @note It is not assumed that exact or approximate copy of theShape
4514         #        can be obtained by applying existing Pipe operation on the
4515         #        resulting "Path" wire taking theBase1 as the base - it is not
4516         #        always possible; though in some particular cases it might work
4517         #        it is not guaranteed. Thus, RestorePath function should not be
4518         #        considered as an exact reverse operation of the Pipe.
4519         #
4520         #  @return New GEOM.GEOM_Object, containing an edge or wire that represent
4521         #                                source pipe's "path".
4522         #
4523         #  @ref tui_creation_pipe_path "Example"
4524         @ManageTransactions("PrimOp")
4525         def RestorePath (self, theShape, theBase1, theBase2, theName=None):
4526             """
4527             Build a middle path of a pipe-like shape.
4528             The path shape can be a wire or an edge.
4529
4530             Parameters:
4531                 theShape It can be closed or unclosed pipe-like shell
4532                          or a pipe-like solid.
4533                 theBase1, theBase2 Two bases of the supposed pipe. This
4534                                    should be wires or faces of theShape.
4535                 theName Object name; when specified, this parameter is used
4536                         for result publication in the study. Otherwise, if automatic
4537                         publication is switched on, default value is used for result name.
4538
4539             Returns:
4540                 New GEOM_Object, containing an edge or wire that represent
4541                                  source pipe's path.
4542             """
4543             anObj = self.PrimOp.RestorePath(theShape, theBase1, theBase2)
4544             RaiseIfFailed("RestorePath", self.PrimOp)
4545             self._autoPublish(anObj, theName, "path")
4546             return anObj
4547
4548         ## Build a middle path of a pipe-like shape.
4549         #  The path shape can be a wire or an edge.
4550         #  @param theShape It can be closed or unclosed pipe-like shell
4551         #                  or a pipe-like solid.
4552         #  @param listEdges1, listEdges2 Two bases of the supposed pipe. This
4553         #                                should be lists of edges of theShape.
4554         #  @param theName Object name; when specified, this parameter is used
4555         #         for result publication in the study. Otherwise, if automatic
4556         #         publication is switched on, default value is used for result name.
4557         #
4558         #  @note It is not assumed that exact or approximate copy of theShape
4559         #        can be obtained by applying existing Pipe operation on the
4560         #        resulting "Path" wire taking theBase1 as the base - it is not
4561         #        always possible; though in some particular cases it might work
4562         #        it is not guaranteed. Thus, RestorePath function should not be
4563         #        considered as an exact reverse operation of the Pipe.
4564         #
4565         #  @return New GEOM.GEOM_Object, containing an edge or wire that represent
4566         #                                source pipe's "path".
4567         #
4568         #  @ref tui_creation_pipe_path "Example"
4569         @ManageTransactions("PrimOp")
4570         def RestorePathEdges (self, theShape, listEdges1, listEdges2, theName=None):
4571             """
4572             Build a middle path of a pipe-like shape.
4573             The path shape can be a wire or an edge.
4574
4575             Parameters:
4576                 theShape It can be closed or unclosed pipe-like shell
4577                          or a pipe-like solid.
4578                 listEdges1, listEdges2 Two bases of the supposed pipe. This
4579                                        should be lists of edges of theShape.
4580                 theName Object name; when specified, this parameter is used
4581                         for result publication in the study. Otherwise, if automatic
4582                         publication is switched on, default value is used for result name.
4583
4584             Returns:
4585                 New GEOM_Object, containing an edge or wire that represent
4586                                  source pipe's path.
4587             """
4588             anObj = self.PrimOp.RestorePathEdges(theShape, listEdges1, listEdges2)
4589             RaiseIfFailed("RestorePath", self.PrimOp)
4590             self._autoPublish(anObj, theName, "path")
4591             return anObj
4592
4593         # end of l3_complex
4594         ## @}
4595
4596         ## @addtogroup l3_basic_go
4597         ## @{
4598
4599         ## Create a linear edge with specified ends.
4600         #  @param thePnt1 Point for the first end of edge.
4601         #  @param thePnt2 Point for the second end of edge.
4602         #  @param theName Object name; when specified, this parameter is used
4603         #         for result publication in the study. Otherwise, if automatic
4604         #         publication is switched on, default value is used for result name.
4605         #
4606         #  @return New GEOM.GEOM_Object, containing the created edge.
4607         #
4608         #  @ref tui_creation_edge "Example"
4609         @ManageTransactions("ShapesOp")
4610         def MakeEdge(self, thePnt1, thePnt2, theName=None):
4611             """
4612             Create a linear edge with specified ends.
4613
4614             Parameters:
4615                 thePnt1 Point for the first end of edge.
4616                 thePnt2 Point for the second end of edge.
4617                 theName Object name; when specified, this parameter is used
4618                         for result publication in the study. Otherwise, if automatic
4619                         publication is switched on, default value is used for result name.
4620
4621             Returns:
4622                 New GEOM.GEOM_Object, containing the created edge.
4623             """
4624             # Example: see GEOM_TestAll.py
4625             anObj = self.ShapesOp.MakeEdge(thePnt1, thePnt2)
4626             RaiseIfFailed("MakeEdge", self.ShapesOp)
4627             self._autoPublish(anObj, theName, "edge")
4628             return anObj
4629
4630         ## Create a new edge, corresponding to the given length on the given curve.
4631         #  @param theRefCurve The referenced curve (edge).
4632         #  @param theLength Length on the referenced curve. It can be negative.
4633         #  @param theStartPoint Any point can be selected for it, the new edge will begin
4634         #                       at the end of \a theRefCurve, close to the selected point.
4635         #                       If None, start from the first point of \a theRefCurve.
4636         #  @param theName Object name; when specified, this parameter is used
4637         #         for result publication in the study. Otherwise, if automatic
4638         #         publication is switched on, default value is used for result name.
4639         #
4640         #  @return New GEOM.GEOM_Object, containing the created edge.
4641         #
4642         #  @ref tui_creation_edge "Example"
4643         @ManageTransactions("ShapesOp")
4644         def MakeEdgeOnCurveByLength(self, theRefCurve, theLength, theStartPoint = None, theName=None):
4645             """
4646             Create a new edge, corresponding to the given length on the given curve.
4647
4648             Parameters:
4649                 theRefCurve The referenced curve (edge).
4650                 theLength Length on the referenced curve. It can be negative.
4651                 theStartPoint Any point can be selected for it, the new edge will begin
4652                               at the end of theRefCurve, close to the selected point.
4653                               If None, start from the first point of theRefCurve.
4654                 theName Object name; when specified, this parameter is used
4655                         for result publication in the study. Otherwise, if automatic
4656                         publication is switched on, default value is used for result name.
4657
4658             Returns:
4659                 New GEOM.GEOM_Object, containing the created edge.
4660             """
4661             # Example: see GEOM_TestAll.py
4662             theLength, Parameters = ParseParameters(theLength)
4663             anObj = self.ShapesOp.MakeEdgeOnCurveByLength(theRefCurve, theLength, theStartPoint)
4664             RaiseIfFailed("MakeEdgeOnCurveByLength", self.ShapesOp)
4665             anObj.SetParameters(Parameters)
4666             self._autoPublish(anObj, theName, "edge")
4667             return anObj
4668
4669         ## Create an edge from specified wire.
4670         #  @param theWire source Wire
4671         #  @param theLinearTolerance linear tolerance value (default = 1e-07)
4672         #  @param theAngularTolerance angular tolerance value (default = 1e-12)
4673         #  @param theName Object name; when specified, this parameter is used
4674         #         for result publication in the study. Otherwise, if automatic
4675         #         publication is switched on, default value is used for result name.
4676         #
4677         #  @return New GEOM.GEOM_Object, containing the created edge.
4678         #
4679         #  @ref tui_creation_edge "Example"
4680         @ManageTransactions("ShapesOp")
4681         def MakeEdgeWire(self, theWire, theLinearTolerance = 1e-07, theAngularTolerance = 1e-12, theName=None):
4682             """
4683             Create an edge from specified wire.
4684
4685             Parameters:
4686                 theWire source Wire
4687                 theLinearTolerance linear tolerance value (default = 1e-07)
4688                 theAngularTolerance angular tolerance value (default = 1e-12)
4689                 theName Object name; when specified, this parameter is used
4690                         for result publication in the study. Otherwise, if automatic
4691                         publication is switched on, default value is used for result name.
4692
4693             Returns:
4694                 New GEOM.GEOM_Object, containing the created edge.
4695             """
4696             # Example: see GEOM_TestAll.py
4697             anObj = self.ShapesOp.MakeEdgeWire(theWire, theLinearTolerance, theAngularTolerance)
4698             RaiseIfFailed("MakeEdgeWire", self.ShapesOp)
4699             self._autoPublish(anObj, theName, "edge")
4700             return anObj
4701
4702         ## Create a wire from the set of edges and wires.
4703         #  @param theEdgesAndWires List of edges and/or wires.
4704         #  @param theTolerance Maximum distance between vertices, that will be merged.
4705         #                      Values less than 1e-07 are equivalent to 1e-07 (Precision::Confusion())
4706         #  @param theName Object name; when specified, this parameter is used
4707         #         for result publication in the study. Otherwise, if automatic
4708         #         publication is switched on, default value is used for result name.
4709         #
4710         #  @return New GEOM.GEOM_Object, containing the created wire.
4711         #
4712         #  @ref tui_creation_wire "Example"
4713         @ManageTransactions("ShapesOp")
4714         def MakeWire(self, theEdgesAndWires, theTolerance = 1e-07, theName=None):
4715             """
4716             Create a wire from the set of edges and wires.
4717
4718             Parameters:
4719                 theEdgesAndWires List of edges and/or wires.
4720                 theTolerance Maximum distance between vertices, that will be merged.
4721                              Values less than 1e-07 are equivalent to 1e-07 (Precision::Confusion()).
4722                 theName Object name; when specified, this parameter is used
4723                         for result publication in the study. Otherwise, if automatic
4724                         publication is switched on, default value is used for result name.
4725
4726             Returns:
4727                 New GEOM.GEOM_Object, containing the created wire.
4728             """
4729             # Example: see GEOM_TestAll.py
4730             anObj = self.ShapesOp.MakeWire(theEdgesAndWires, theTolerance)
4731             RaiseIfFailed("MakeWire", self.ShapesOp)
4732             self._autoPublish(anObj, theName, "wire")
4733             return anObj
4734
4735         ## Create a face on the given wire.
4736         #  @param theWire closed Wire or Edge to build the face on.
4737         #  @param isPlanarWanted If TRUE, the algorithm tries to build a planar face.
4738         #                        If the tolerance of the obtained planar face is less
4739         #                        than 1e-06, this face will be returned, otherwise the
4740         #                        algorithm tries to build any suitable face on the given
4741         #                        wire and prints a warning message.
4742         #  @param theName Object name; when specified, this parameter is used
4743         #         for result publication in the study. Otherwise, if automatic
4744         #         publication is switched on, default value is used for result name.
4745         #
4746         #  @return New GEOM.GEOM_Object, containing the created face (compound of faces).
4747         #
4748         #  @ref tui_creation_face "Example"
4749         @ManageTransactions("ShapesOp")
4750         def MakeFace(self, theWire, isPlanarWanted, theName=None):
4751             """
4752             Create a face on the given wire.
4753
4754             Parameters:
4755                 theWire closed Wire or Edge to build the face on.
4756                 isPlanarWanted If TRUE, the algorithm tries to build a planar face.
4757                                If the tolerance of the obtained planar face is less
4758                                than 1e-06, this face will be returned, otherwise the
4759                                algorithm tries to build any suitable face on the given
4760                                wire and prints a warning message.
4761                 theName Object name; when specified, this parameter is used
4762                         for result publication in the study. Otherwise, if automatic
4763                         publication is switched on, default value is used for result name.
4764
4765             Returns:
4766                 New GEOM.GEOM_Object, containing the created face (compound of faces).
4767             """
4768             # Example: see GEOM_TestAll.py
4769             anObj = self.ShapesOp.MakeFace(theWire, isPlanarWanted)
4770             if isPlanarWanted and anObj is not None and self.ShapesOp.GetErrorCode() == "MAKE_FACE_TOLERANCE_TOO_BIG":
4771                 print("WARNING: Cannot build a planar face: required tolerance is too big. Non-planar face is built.")
4772             else:
4773                 RaiseIfFailed("MakeFace", self.ShapesOp)
4774             self._autoPublish(anObj, theName, "face")
4775             return anObj
4776
4777         ## Create a face on the given wires set.
4778         #  @param theWires List of closed wires or edges to build the face on.
4779         #  @param isPlanarWanted If TRUE, the algorithm tries to build a planar face.
4780         #                        If the tolerance of the obtained planar face is less
4781         #                        than 1e-06, this face will be returned, otherwise the
4782         #                        algorithm tries to build any suitable face on the given
4783         #                        wire and prints a warning message.
4784         #  @param theName Object name; when specified, this parameter is used
4785         #         for result publication in the study. Otherwise, if automatic
4786         #         publication is switched on, default value is used for result name.
4787         #
4788         #  @return New GEOM.GEOM_Object, containing the created face (compound of faces).
4789         #
4790         #  @ref tui_creation_face "Example"
4791         @ManageTransactions("ShapesOp")
4792         def MakeFaceWires(self, theWires, isPlanarWanted, theName=None):
4793             """
4794             Create a face on the given wires set.
4795
4796             Parameters:
4797                 theWires List of closed wires or edges to build the face on.
4798                 isPlanarWanted If TRUE, the algorithm tries to build a planar face.
4799                                If the tolerance of the obtained planar face is less
4800                                than 1e-06, this face will be returned, otherwise the
4801                                algorithm tries to build any suitable face on the given
4802                                wire and prints a warning message.
4803                 theName Object name; when specified, this parameter is used
4804                         for result publication in the study. Otherwise, if automatic
4805                         publication is switched on, default value is used for result name.
4806
4807             Returns:
4808                 New GEOM.GEOM_Object, containing the created face (compound of faces).
4809             """
4810             # Example: see GEOM_TestAll.py
4811             anObj = self.ShapesOp.MakeFaceWires(ToList(theWires), isPlanarWanted)
4812             if isPlanarWanted and anObj is not None and self.ShapesOp.GetErrorCode() == "MAKE_FACE_TOLERANCE_TOO_BIG":
4813                 print("WARNING: Cannot build a planar face: required tolerance is too big. Non-planar face is built.")
4814             else:
4815                 RaiseIfFailed("MakeFaceWires", self.ShapesOp)
4816             self._autoPublish(anObj, theName, "face")
4817             return anObj
4818
4819         ## See MakeFaceWires() method for details.
4820         #
4821         #  @ref tui_creation_face "Example 1"
4822         #  \n @ref swig_MakeFaces  "Example 2"
4823         def MakeFaces(self, theWires, isPlanarWanted, theName=None):
4824             """
4825             See geompy.MakeFaceWires() method for details.
4826             """
4827             # Example: see GEOM_TestOthers.py
4828             # note: auto-publishing is done in self.MakeFaceWires()
4829             anObj = self.MakeFaceWires(theWires, isPlanarWanted, theName)
4830             return anObj
4831
4832         ## Create a face based on a surface from given face bounded
4833         #  by given wire.
4834         #  @param theFace the face whose surface is used to create a new face.
4835         #  @param theWire the wire that will bound a new face.
4836         #  @param theName Object name; when specified, this parameter is used
4837         #         for result publication in the study. Otherwise, if automatic
4838         #         publication is switched on, default value is used for result name.
4839         #
4840         #  @return New GEOM.GEOM_Object, containing the created face.
4841         #
4842         #  @ref tui_creation_face "Example"
4843         @ManageTransactions("ShapesOp")
4844         def MakeFaceFromSurface(self, theFace, theWire, theName=None):
4845             """
4846             Create a face based on a surface from given face bounded
4847             by given wire.
4848
4849             Parameters:
4850                 theFace the face whose surface is used to create a new face.
4851                 theWire the wire that will bound a new face.
4852                 theName Object name; when specified, this parameter is used
4853                         for result publication in the study. Otherwise, if automatic
4854                         publication is switched on, default value is used for result name.
4855
4856             Returns:
4857                 New GEOM.GEOM_Object, containing the created face.
4858             """
4859             # Example: see GEOM_TestAll.py
4860             anObj = self.ShapesOp.MakeFaceFromSurface(theFace, theWire)
4861             RaiseIfFailed("MakeFaceFromSurface", self.ShapesOp)
4862             self._autoPublish(anObj, theName, "face")
4863             return anObj
4864           
4865         ## Create a face from a set of edges with the given constraints.
4866         #  @param theConstraints List of edges and constraint faces (as a sequence of a Edge + Face couples):
4867         #         - edges should form a closed wire;
4868         #         - for each edge, constraint face is optional: if a constraint face is missing
4869         #           for some edge, this means that there no constraint associated with this edge.
4870         #  @param theName Object name; when specified, this parameter is used
4871         #         for result publication in the study. Otherwise, if automatic
4872         #         publication is switched on, default value is used for result name.
4873         # 
4874         # @return New GEOM.GEOM_Object, containing the created face.
4875         # 
4876         # @ref tui_creation_face "Example"
4877         @ManageTransactions("ShapesOp")
4878         def MakeFaceWithConstraints(self, theConstraints, theName=None):
4879             """
4880             Create a face from a set of edges with the given constraints.
4881
4882             Parameters:
4883                 theConstraints List of edges and constraint faces (as a sequence of a Edge + Face couples):
4884                         - edges should form a closed wire;
4885                         - for each edge, constraint face is optional: if a constraint face is missing
4886                           for some edge, this means that there no constraint associated with this edge.
4887                 theName Object name; when specified, this parameter is used
4888                         for result publication in the study. Otherwise, if automatic
4889                         publication is switched on, default value is used for result name.
4890
4891             Returns:
4892                 New GEOM.GEOM_Object, containing the created face.
4893             """
4894             # Example: see GEOM_TestAll.py
4895             anObj = self.ShapesOp.MakeFaceWithConstraints(theConstraints)
4896             if anObj is None:
4897                 RaiseIfFailed("MakeFaceWithConstraints", self.ShapesOp)
4898             self._autoPublish(anObj, theName, "face")
4899             return anObj
4900
4901         ## Create a shell from the set of faces, shells and/or compounds of faces.
4902         #  @param theFacesAndShells List of faces, shells and/or compounds of faces.
4903         #  @param theName Object name; when specified, this parameter is used
4904         #         for result publication in the study. Otherwise, if automatic
4905         #         publication is switched on, default value is used for result name.
4906         #
4907         #  @return New GEOM.GEOM_Object, containing the created shell (compound of shells).
4908         #
4909         #  @ref tui_creation_shell "Example"
4910         @ManageTransactions("ShapesOp")
4911         def MakeShell(self, theFacesAndShells, theName=None):
4912             """
4913             Create a shell from the set of faces and shells.
4914
4915             Parameters:
4916                 theFacesAndShells List of faces and/or shells.
4917                 theName Object name; when specified, this parameter is used
4918                         for result publication in the study. Otherwise, if automatic
4919                         publication is switched on, default value is used for result name.
4920
4921             Returns:
4922                 New GEOM.GEOM_Object, containing the created shell (compound of shells).
4923             """
4924             # Example: see GEOM_TestAll.py
4925             anObj = self.ShapesOp.MakeShell( ToList( theFacesAndShells ))
4926             RaiseIfFailed("MakeShell", self.ShapesOp)
4927             self._autoPublish(anObj, theName, "shell")
4928             return anObj
4929
4930         ## Create a solid, bounded by the given shells.
4931         #  @param theShells Sequence of bounding shells.
4932         #  @param theName Object name; when specified, this parameter is used
4933         #         for result publication in the study. Otherwise, if automatic
4934         #         publication is switched on, default value is used for result name.
4935         #
4936         #  @return New GEOM.GEOM_Object, containing the created solid.
4937         #
4938         #  @ref tui_creation_solid "Example"
4939         @ManageTransactions("ShapesOp")
4940         def MakeSolid(self, theShells, theName=None):
4941             """
4942             Create a solid, bounded by the given shells.
4943
4944             Parameters:
4945                 theShells Sequence of bounding shells.
4946                 theName Object name; when specified, this parameter is used
4947                         for result publication in the study. Otherwise, if automatic
4948                         publication is switched on, default value is used for result name.
4949
4950             Returns:
4951                 New GEOM.GEOM_Object, containing the created solid.
4952             """
4953             # Example: see GEOM_TestAll.py
4954             theShells = ToList(theShells)
4955             if len(theShells) == 1:
4956                 descr = self._IsGoodForSolid(theShells[0])
4957                 #if len(descr) > 0:
4958                 #    raise RuntimeError, "MakeSolidShells : " + descr
4959                 if descr == "WRN_SHAPE_UNCLOSED":
4960                     raise RuntimeError("MakeSolidShells : Unable to create solid from unclosed shape")
4961             anObj = self.ShapesOp.MakeSolidShells(theShells)
4962             RaiseIfFailed("MakeSolidShells", self.ShapesOp)
4963             self._autoPublish(anObj, theName, "solid")
4964             return anObj
4965
4966         ## Create a compound of the given shapes.
4967         #  @param theShapes List of shapes to put in compound.
4968         #  @param theName Object name; when specified, this parameter is used
4969         #         for result publication in the study. Otherwise, if automatic
4970         #         publication is switched on, default value is used for result name.
4971         #
4972         #  @return New GEOM.GEOM_Object, containing the created compound.
4973         #
4974         #  @ref tui_creation_compound "Example"
4975         @ManageTransactions("ShapesOp")
4976         def MakeCompound(self, theShapes, theName=None):
4977             """
4978             Create a compound of the given shapes.
4979
4980             Parameters:
4981                 theShapes List of shapes to put in compound.
4982                 theName Object name; when specified, this parameter is used
4983                         for result publication in the study. Otherwise, if automatic
4984                         publication is switched on, default value is used for result name.
4985
4986             Returns:
4987                 New GEOM.GEOM_Object, containing the created compound.
4988             """
4989             # Example: see GEOM_TestAll.py
4990             anObj = self.ShapesOp.MakeCompound(ToList(theShapes))
4991             RaiseIfFailed("MakeCompound", self.ShapesOp)
4992             self._autoPublish(anObj, theName, "compound")
4993             return anObj
4994         
4995         ## Create a solid (or solids) from the set of faces and/or shells.
4996         #  @param theFacesOrShells List of faces and/or shells.
4997         #  @param isIntersect If TRUE, forces performing intersections
4998         #         between arguments; otherwise (default) intersection is not performed.
4999         #  @param theName Object name; when specified, this parameter is used
5000         #         for result publication in the study. Otherwise, if automatic
5001         #         publication is switched on, default value is used for result name.
5002         #
5003         #  @return New GEOM.GEOM_Object, containing the created solid (or compound of solids).
5004         #
5005         #  @ref tui_creation_solid_from_faces "Example"
5006         @ManageTransactions("ShapesOp")
5007         def MakeSolidFromConnectedFaces(self, theFacesOrShells, isIntersect = False, theName=None):
5008             """
5009             Create a solid (or solids) from the set of connected faces and/or shells.
5010
5011             Parameters:
5012                 theFacesOrShells List of faces and/or shells.
5013                 isIntersect If TRUE, forces performing intersections
5014                         between arguments; otherwise (default) intersection is not performed
5015                 theName Object name; when specified, this parameter is used.
5016                         for result publication in the study. Otherwise, if automatic
5017                         publication is switched on, default value is used for result name.
5018
5019             Returns:
5020                 New GEOM.GEOM_Object, containing the created solid (or compound of solids).
5021             """
5022             # Example: see GEOM_TestAll.py
5023             anObj = self.ShapesOp.MakeSolidFromConnectedFaces(theFacesOrShells, isIntersect)
5024             RaiseIfFailed("MakeSolidFromConnectedFaces", self.ShapesOp)
5025             self._autoPublish(anObj, theName, "solid")
5026             return anObj
5027
5028         # end of l3_basic_go
5029         ## @}
5030
5031         ## @addtogroup l2_measure
5032         ## @{
5033
5034         ## Gives quantity of faces in the given shape.
5035         #  @param theShape Shape to count faces of.
5036         #  @return Quantity of faces.
5037         #
5038         #  @ref swig_NumberOf "Example"
5039         @ManageTransactions("ShapesOp")
5040         def NumberOfFaces(self, theShape):
5041             """
5042             Gives quantity of faces in the given shape.
5043
5044             Parameters:
5045                 theShape Shape to count faces of.
5046
5047             Returns:
5048                 Quantity of faces.
5049             """
5050             # Example: see GEOM_TestOthers.py
5051             nb_faces = self.ShapesOp.NumberOfFaces(theShape)
5052             RaiseIfFailed("NumberOfFaces", self.ShapesOp)
5053             return nb_faces
5054
5055         ## Gives quantity of edges in the given shape.
5056         #  @param theShape Shape to count edges of.
5057         #  @return Quantity of edges.
5058         #
5059         #  @ref swig_NumberOf "Example"
5060         @ManageTransactions("ShapesOp")
5061         def NumberOfEdges(self, theShape):
5062             """
5063             Gives quantity of edges in the given shape.
5064
5065             Parameters:
5066                 theShape Shape to count edges of.
5067
5068             Returns:
5069                 Quantity of edges.
5070             """
5071             # Example: see GEOM_TestOthers.py
5072             nb_edges = self.ShapesOp.NumberOfEdges(theShape)
5073             RaiseIfFailed("NumberOfEdges", self.ShapesOp)
5074             return nb_edges
5075
5076         ## Gives quantity of sub-shapes of type theShapeType in the given shape.
5077         #  @param theShape Shape to count sub-shapes of.
5078         #  @param theShapeType Type of sub-shapes to count (see ShapeType())
5079         #  @return Quantity of sub-shapes of given type.
5080         #
5081         #  @ref swig_NumberOf "Example"
5082         @ManageTransactions("ShapesOp")
5083         def NumberOfSubShapes(self, theShape, theShapeType):
5084             """
5085             Gives quantity of sub-shapes of type theShapeType in the given shape.
5086
5087             Parameters:
5088                 theShape Shape to count sub-shapes of.
5089                 theShapeType Type of sub-shapes to count (see geompy.ShapeType)
5090
5091             Returns:
5092                 Quantity of sub-shapes of given type.
5093             """
5094             # Example: see GEOM_TestOthers.py
5095             nb_ss = self.ShapesOp.NumberOfSubShapes(theShape, theShapeType)
5096             RaiseIfFailed("NumberOfSubShapes", self.ShapesOp)
5097             return nb_ss
5098
5099         ## Gives quantity of solids in the given shape.
5100         #  @param theShape Shape to count solids in.
5101         #  @return Quantity of solids.
5102         #
5103         #  @ref swig_NumberOf "Example"
5104         @ManageTransactions("ShapesOp")
5105         def NumberOfSolids(self, theShape):
5106             """
5107             Gives quantity of solids in the given shape.
5108
5109             Parameters:
5110                 theShape Shape to count solids in.
5111
5112             Returns:
5113                 Quantity of solids.
5114             """
5115             # Example: see GEOM_TestOthers.py
5116             nb_solids = self.ShapesOp.NumberOfSubShapes(theShape, self.ShapeType["SOLID"])
5117             RaiseIfFailed("NumberOfSolids", self.ShapesOp)
5118             return nb_solids
5119
5120         # end of l2_measure
5121         ## @}
5122
5123         ## @addtogroup l3_healing
5124         ## @{
5125
5126         ## Reverses an orientation the given shape.
5127         #  @param theShape Shape to be reversed.
5128         #  @param theName Object name; when specified, this parameter is used
5129         #         for result publication in the study. Otherwise, if automatic
5130         #         publication is switched on, default value is used for result name.
5131         #
5132         #  @return The reversed copy of theShape.
5133         #
5134         #  @ref swig_ChangeOrientation "Example"
5135         @ManageTransactions("ShapesOp")
5136         def ChangeOrientation(self, theShape, theName=None):
5137             """
5138             Reverses an orientation the given shape.
5139
5140             Parameters:
5141                 theShape Shape to be reversed.
5142                 theName Object name; when specified, this parameter is used
5143                         for result publication in the study. Otherwise, if automatic
5144                         publication is switched on, default value is used for result name.
5145
5146             Returns:
5147                 The reversed copy of theShape.
5148             """
5149             # Example: see GEOM_TestAll.py
5150             anObj = self.ShapesOp.ChangeOrientation(theShape)
5151             RaiseIfFailed("ChangeOrientation", self.ShapesOp)
5152             self._autoPublish(anObj, theName, "reversed")
5153             return anObj
5154
5155         ## See ChangeOrientation() method for details.
5156         #
5157         #  @ref swig_OrientationChange "Example"
5158         def OrientationChange(self, theShape, theName=None):
5159             """
5160             See geompy.ChangeOrientation method for details.
5161             """
5162             # Example: see GEOM_TestOthers.py
5163             # note: auto-publishing is done in self.ChangeOrientation()
5164             anObj = self.ChangeOrientation(theShape, theName)
5165             return anObj
5166
5167         # end of l3_healing
5168         ## @}
5169
5170         ## @addtogroup l4_obtain
5171         ## @{
5172
5173         ## Retrieve all free faces from the given shape.
5174         #  Free face is a face, which is not shared between two shells of the shape.
5175         #  @param theShape Shape to find free faces in.
5176         #  @return List of IDs of all free faces, contained in theShape.
5177         #
5178         #  @ref tui_free_faces_page "Example"
5179         @ManageTransactions("ShapesOp")
5180         def GetFreeFacesIDs(self,theShape):
5181             """
5182             Retrieve all free faces from the given shape.
5183             Free face is a face, which is not shared between two shells of the shape.
5184
5185             Parameters:
5186                 theShape Shape to find free faces in.
5187
5188             Returns:
5189                 List of IDs of all free faces, contained in theShape.
5190             """
5191             # Example: see GEOM_TestOthers.py
5192             anIDs = self.ShapesOp.GetFreeFacesIDs(theShape)
5193             RaiseIfFailed("GetFreeFacesIDs", self.ShapesOp)
5194             return anIDs
5195
5196         ## Get all sub-shapes of theShape1 of the given type, shared with theShape2.
5197         #  @param theShape1 Shape to find sub-shapes in.
5198         #  @param theShape2 Shape to find shared sub-shapes with.
5199         #  @param theShapeType Type of sub-shapes to be retrieved.
5200         #  @param theName Object name; when specified, this parameter is used
5201         #         for result publication in the study. Otherwise, if automatic
5202         #         publication is switched on, default value is used for result name.
5203         #
5204         #  @return List of sub-shapes of theShape1, shared with theShape2.
5205         #
5206         #  @ref swig_GetSharedShapes "Example"
5207         @ManageTransactions("ShapesOp")
5208         def GetSharedShapes(self, theShape1, theShape2, theShapeType, theName=None):
5209             """
5210             Get all sub-shapes of theShape1 of the given type, shared with theShape2.
5211
5212             Parameters:
5213                 theShape1 Shape to find sub-shapes in.
5214                 theShape2 Shape to find shared sub-shapes with.
5215                 theShapeType Type of sub-shapes to be retrieved.
5216                 theName Object name; when specified, this parameter is used
5217                         for result publication in the study. Otherwise, if automatic
5218                         publication is switched on, default value is used for result name.
5219
5220             Returns:
5221                 List of sub-shapes of theShape1, shared with theShape2.
5222             """
5223             # Example: see GEOM_TestOthers.py
5224             aList = self.ShapesOp.GetSharedShapes(theShape1, theShape2, theShapeType)
5225             RaiseIfFailed("GetSharedShapes", self.ShapesOp)
5226             self._autoPublish(aList, theName, "shared")
5227             return aList
5228
5229         ## Get sub-shapes, shared by input shapes.
5230         #  @param theShapes Either a list or compound of shapes to find common sub-shapes of.
5231         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType()).
5232         #  @param theMultiShare Specifies what type of shares should be checked:
5233         #         - @c True (default): search sub-shapes from 1st input shape shared with all other input shapes;
5234         #         - @c False: causes to search sub-shapes shared between couples of input shapes.
5235         #  @param theName Object name; when specified, this parameter is used
5236         #         for result publication in the study. Otherwise, if automatic
5237         #         publication is switched on, default value is used for result name.
5238         #
5239         #  @note If @a theShapes contains single compound, the shares between all possible couples of 
5240         #        its top-level shapes are returned; otherwise, only shares between 1st input shape
5241         #        and all rest input shapes are returned.
5242         #
5243         #  @return List of all found sub-shapes.
5244         #
5245         #  Examples:
5246         #  - @ref tui_shared_shapes "Example 1"
5247         #  - @ref swig_GetSharedShapes "Example 2"
5248         @ManageTransactions("ShapesOp")
5249         def GetSharedShapesMulti(self, theShapes, theShapeType, theMultiShare=True, theName=None):
5250             """
5251             Get sub-shapes, shared by input shapes.
5252
5253             Parameters:
5254                 theShapes Either a list or compound of shapes to find common sub-shapes of.
5255                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType).
5256                 theMultiShare Specifies what type of shares should be checked:
5257                   - True (default): search sub-shapes from 1st input shape shared with all other input shapes;
5258                   - False: causes to search sub-shapes shared between couples of input shapes.
5259                 theName Object name; when specified, this parameter is used
5260                         for result publication in the study. Otherwise, if automatic
5261                         publication is switched on, default value is used for result name.
5262
5263             Note: if theShapes contains single compound, the shares between all possible couples of 
5264                   its top-level shapes are returned; otherwise, only shares between 1st input shape
5265                   and all rest input shapes are returned.
5266
5267             Returns:
5268                 List of all found sub-shapes.
5269             """
5270             # Example: see GEOM_TestOthers.py
5271             aList = self.ShapesOp.GetSharedShapesMulti(ToList(theShapes), theShapeType, theMultiShare)
5272             RaiseIfFailed("GetSharedShapesMulti", self.ShapesOp)
5273             self._autoPublish(aList, theName, "shared")
5274             return aList
5275
5276         ## Find in <VAR>theShape</VAR> all sub-shapes of type <VAR>theShapeType</VAR>,
5277         #  situated relatively the specified plane by the certain way,
5278         #  defined through <VAR>theState</VAR> parameter.
5279         #  @param theShape Shape to find sub-shapes of.
5280         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5281         #  @param theAx1 Vector (or line, or linear edge), specifying normal
5282         #                direction and location of the plane to find shapes on.
5283         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5284         #  @param theName Object name; when specified, this parameter is used
5285         #         for result publication in the study. Otherwise, if automatic
5286         #         publication is switched on, default value is used for result name.
5287         #
5288         #  @return List of all found sub-shapes.
5289         #
5290         #  @ref swig_GetShapesOnPlane "Example"
5291         @ManageTransactions("ShapesOp")
5292         def GetShapesOnPlane(self, theShape, theShapeType, theAx1, theState, theName=None):
5293             """
5294             Find in theShape all sub-shapes of type theShapeType,
5295             situated relatively the specified plane by the certain way,
5296             defined through theState parameter.
5297
5298             Parameters:
5299                 theShape Shape to find sub-shapes of.
5300                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5301                 theAx1 Vector (or line, or linear edge), specifying normal
5302                        direction and location of the plane to find shapes on.
5303                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5304                 theName Object name; when specified, this parameter is used
5305                         for result publication in the study. Otherwise, if automatic
5306                         publication is switched on, default value is used for result name.
5307
5308             Returns:
5309                 List of all found sub-shapes.
5310             """
5311             # Example: see GEOM_TestOthers.py
5312             aList = self.ShapesOp.GetShapesOnPlane(theShape, theShapeType, theAx1, theState)
5313             RaiseIfFailed("GetShapesOnPlane", self.ShapesOp)
5314             self._autoPublish(aList, theName, "shapeOnPlane")
5315             return aList
5316
5317         ## Find in <VAR>theShape</VAR> all sub-shapes of type <VAR>theShapeType</VAR>,
5318         #  situated relatively the specified plane by the certain way,
5319         #  defined through <VAR>theState</VAR> parameter.
5320         #  @param theShape Shape to find sub-shapes of.
5321         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5322         #  @param theAx1 Vector (or line, or linear edge), specifying normal
5323         #                direction and location of the plane to find shapes on.
5324         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5325         #
5326         #  @return List of all found sub-shapes indices.
5327         #
5328         #  @ref swig_GetShapesOnPlaneIDs "Example"
5329         @ManageTransactions("ShapesOp")
5330         def GetShapesOnPlaneIDs(self, theShape, theShapeType, theAx1, theState):
5331             """
5332             Find in theShape all sub-shapes of type theShapeType,
5333             situated relatively the specified plane by the certain way,
5334             defined through theState parameter.
5335
5336             Parameters:
5337                 theShape Shape to find sub-shapes of.
5338                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5339                 theAx1 Vector (or line, or linear edge), specifying normal
5340                        direction and location of the plane to find shapes on.
5341                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5342
5343             Returns:
5344                 List of all found sub-shapes indices.
5345             """
5346             # Example: see GEOM_TestOthers.py
5347             aList = self.ShapesOp.GetShapesOnPlaneIDs(theShape, theShapeType, theAx1, theState)
5348             RaiseIfFailed("GetShapesOnPlaneIDs", self.ShapesOp)
5349             return aList
5350
5351         ## Find in <VAR>theShape</VAR> all sub-shapes of type <VAR>theShapeType</VAR>,
5352         #  situated relatively the specified plane by the certain way,
5353         #  defined through <VAR>theState</VAR> parameter.
5354         #  @param theShape Shape to find sub-shapes of.
5355         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5356         #  @param theAx1 Vector (or line, or linear edge), specifying normal
5357         #                direction of the plane to find shapes on.
5358         #  @param thePnt Point specifying location of the plane to find shapes on.
5359         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5360         #  @param theName Object name; when specified, this parameter is used
5361         #         for result publication in the study. Otherwise, if automatic
5362         #         publication is switched on, default value is used for result name.
5363         #
5364         #  @return List of all found sub-shapes.
5365         #
5366         #  @ref swig_GetShapesOnPlaneWithLocation "Example"
5367         @ManageTransactions("ShapesOp")
5368         def GetShapesOnPlaneWithLocation(self, theShape, theShapeType, theAx1, thePnt, theState, theName=None):
5369             """
5370             Find in theShape all sub-shapes of type theShapeType,
5371             situated relatively the specified plane by the certain way,
5372             defined through theState parameter.
5373
5374             Parameters:
5375                 theShape Shape to find sub-shapes of.
5376                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5377                 theAx1 Vector (or line, or linear edge), specifying normal
5378                        direction and location of the plane to find shapes on.
5379                 thePnt Point specifying location of the plane to find shapes on.
5380                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5381                 theName Object name; when specified, this parameter is used
5382                         for result publication in the study. Otherwise, if automatic
5383                         publication is switched on, default value is used for result name.
5384
5385             Returns:
5386                 List of all found sub-shapes.
5387             """
5388             # Example: see GEOM_TestOthers.py
5389             aList = self.ShapesOp.GetShapesOnPlaneWithLocation(theShape, theShapeType,
5390                                                                theAx1, thePnt, theState)
5391             RaiseIfFailed("GetShapesOnPlaneWithLocation", self.ShapesOp)
5392             self._autoPublish(aList, theName, "shapeOnPlane")
5393             return aList
5394
5395         ## Find in <VAR>theShape</VAR> all sub-shapes of type <VAR>theShapeType</VAR>,
5396         #  situated relatively the specified plane by the certain way,
5397         #  defined through <VAR>theState</VAR> parameter.
5398         #  @param theShape Shape to find sub-shapes of.
5399         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5400         #  @param theAx1 Vector (or line, or linear edge), specifying normal
5401         #                direction of the plane to find shapes on.
5402         #  @param thePnt Point specifying location of the plane to find shapes on.
5403         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5404         #
5405         #  @return List of all found sub-shapes indices.
5406         #
5407         #  @ref swig_GetShapesOnPlaneWithLocationIDs "Example"
5408         @ManageTransactions("ShapesOp")
5409         def GetShapesOnPlaneWithLocationIDs(self, theShape, theShapeType, theAx1, thePnt, theState):
5410             """
5411             Find in theShape all sub-shapes of type theShapeType,
5412             situated relatively the specified plane by the certain way,
5413             defined through theState parameter.
5414
5415             Parameters:
5416                 theShape Shape to find sub-shapes of.
5417                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5418                 theAx1 Vector (or line, or linear edge), specifying normal
5419                        direction and location of the plane to find shapes on.
5420                 thePnt Point specifying location of the plane to find shapes on.
5421                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5422
5423             Returns:
5424                 List of all found sub-shapes indices.
5425             """
5426             # Example: see GEOM_TestOthers.py
5427             aList = self.ShapesOp.GetShapesOnPlaneWithLocationIDs(theShape, theShapeType,
5428                                                                   theAx1, thePnt, theState)
5429             RaiseIfFailed("GetShapesOnPlaneWithLocationIDs", self.ShapesOp)
5430             return aList
5431
5432         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
5433         #  the specified cylinder by the certain way, defined through \a theState parameter.
5434         #  @param theShape Shape to find sub-shapes of.
5435         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5436         #  @param theAxis Vector (or line, or linear edge), specifying
5437         #                 axis of the cylinder to find shapes on.
5438         #  @param theRadius Radius of the cylinder to find shapes on.
5439         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5440         #  @param theName Object name; when specified, this parameter is used
5441         #         for result publication in the study. Otherwise, if automatic
5442         #         publication is switched on, default value is used for result name.
5443         #
5444         #  @return List of all found sub-shapes.
5445         #
5446         #  @ref swig_GetShapesOnCylinder "Example"
5447         @ManageTransactions("ShapesOp")
5448         def GetShapesOnCylinder(self, theShape, theShapeType, theAxis, theRadius, theState, theName=None):
5449             """
5450             Find in theShape all sub-shapes of type theShapeType, situated relatively
5451             the specified cylinder by the certain way, defined through theState parameter.
5452
5453             Parameters:
5454                 theShape Shape to find sub-shapes of.
5455                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5456                 theAxis Vector (or line, or linear edge), specifying
5457                         axis of the cylinder to find shapes on.
5458                 theRadius Radius of the cylinder to find shapes on.
5459                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5460                 theName Object name; when specified, this parameter is used
5461                         for result publication in the study. Otherwise, if automatic
5462                         publication is switched on, default value is used for result name.
5463
5464             Returns:
5465                 List of all found sub-shapes.
5466             """
5467             # Example: see GEOM_TestOthers.py
5468             aList = self.ShapesOp.GetShapesOnCylinder(theShape, theShapeType, theAxis, theRadius, theState)
5469             RaiseIfFailed("GetShapesOnCylinder", self.ShapesOp)
5470             self._autoPublish(aList, theName, "shapeOnCylinder")
5471             return aList
5472
5473         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
5474         #  the specified cylinder by the certain way, defined through \a theState parameter.
5475         #  @param theShape Shape to find sub-shapes of.
5476         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5477         #  @param theAxis Vector (or line, or linear edge), specifying
5478         #                 axis of the cylinder to find shapes on.
5479         #  @param theRadius Radius of the cylinder to find shapes on.
5480         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5481         #
5482         #  @return List of all found sub-shapes indices.
5483         #
5484         #  @ref swig_GetShapesOnCylinderIDs "Example"
5485         @ManageTransactions("ShapesOp")
5486         def GetShapesOnCylinderIDs(self, theShape, theShapeType, theAxis, theRadius, theState):
5487             """
5488             Find in theShape all sub-shapes of type theShapeType, situated relatively
5489             the specified cylinder by the certain way, defined through theState parameter.
5490
5491             Parameters:
5492                 theShape Shape to find sub-shapes of.
5493                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5494                 theAxis Vector (or line, or linear edge), specifying
5495                         axis of the cylinder to find shapes on.
5496                 theRadius Radius of the cylinder to find shapes on.
5497                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5498
5499             Returns:
5500                 List of all found sub-shapes indices.
5501             """
5502             # Example: see GEOM_TestOthers.py
5503             aList = self.ShapesOp.GetShapesOnCylinderIDs(theShape, theShapeType, theAxis, theRadius, theState)
5504             RaiseIfFailed("GetShapesOnCylinderIDs", self.ShapesOp)
5505             return aList
5506
5507         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
5508         #  the specified cylinder by the certain way, defined through \a theState parameter.
5509         #  @param theShape Shape to find sub-shapes of.
5510         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5511         #  @param theAxis Vector (or line, or linear edge), specifying
5512         #                 axis of the cylinder to find shapes on.
5513         #  @param thePnt Point specifying location of the bottom of the cylinder.
5514         #  @param theRadius Radius of the cylinder to find shapes on.
5515         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5516         #  @param theName Object name; when specified, this parameter is used
5517         #         for result publication in the study. Otherwise, if automatic
5518         #         publication is switched on, default value is used for result name.
5519         #
5520         #  @return List of all found sub-shapes.
5521         #
5522         #  @ref swig_GetShapesOnCylinderWithLocation "Example"
5523         @ManageTransactions("ShapesOp")
5524         def GetShapesOnCylinderWithLocation(self, theShape, theShapeType, theAxis, thePnt, theRadius, theState, theName=None):
5525             """
5526             Find in theShape all sub-shapes of type theShapeType, situated relatively
5527             the specified cylinder by the certain way, defined through theState parameter.
5528
5529             Parameters:
5530                 theShape Shape to find sub-shapes of.
5531                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5532                 theAxis Vector (or line, or linear edge), specifying
5533                         axis of the cylinder to find shapes on.
5534                 theRadius Radius of the cylinder to find shapes on.
5535                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5536                 theName Object name; when specified, this parameter is used
5537                         for result publication in the study. Otherwise, if automatic
5538                         publication is switched on, default value is used for result name.
5539
5540             Returns:
5541                 List of all found sub-shapes.
5542             """
5543             # Example: see GEOM_TestOthers.py
5544             aList = self.ShapesOp.GetShapesOnCylinderWithLocation(theShape, theShapeType, theAxis, thePnt, theRadius, theState)
5545             RaiseIfFailed("GetShapesOnCylinderWithLocation", self.ShapesOp)
5546             self._autoPublish(aList, theName, "shapeOnCylinder")
5547             return aList
5548
5549         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
5550         #  the specified cylinder by the certain way, defined through \a theState parameter.
5551         #  @param theShape Shape to find sub-shapes of.
5552         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5553         #  @param theAxis Vector (or line, or linear edge), specifying
5554         #                 axis of the cylinder to find shapes on.
5555         #  @param thePnt Point specifying location of the bottom of the cylinder.
5556         #  @param theRadius Radius of the cylinder to find shapes on.
5557         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5558         #
5559         #  @return List of all found sub-shapes indices
5560         #
5561         #  @ref swig_GetShapesOnCylinderWithLocationIDs "Example"
5562         @ManageTransactions("ShapesOp")
5563         def GetShapesOnCylinderWithLocationIDs(self, theShape, theShapeType, theAxis, thePnt, theRadius, theState):
5564             """
5565             Find in theShape all sub-shapes of type theShapeType, situated relatively
5566             the specified cylinder by the certain way, defined through theState parameter.
5567
5568             Parameters:
5569                 theShape Shape to find sub-shapes of.
5570                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5571                 theAxis Vector (or line, or linear edge), specifying
5572                         axis of the cylinder to find shapes on.
5573                 theRadius Radius of the cylinder to find shapes on.
5574                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5575
5576             Returns:
5577                 List of all found sub-shapes indices.
5578             """
5579             # Example: see GEOM_TestOthers.py
5580             aList = self.ShapesOp.GetShapesOnCylinderWithLocationIDs(theShape, theShapeType, theAxis, thePnt, theRadius, theState)
5581             RaiseIfFailed("GetShapesOnCylinderWithLocationIDs", self.ShapesOp)
5582             return aList
5583
5584         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
5585         #  the specified sphere by the certain way, defined through \a theState parameter.
5586         #  @param theShape Shape to find sub-shapes of.
5587         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5588         #  @param theCenter Point, specifying center of the sphere to find shapes on.
5589         #  @param theRadius Radius of the sphere to find shapes on.
5590         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5591         #  @param theName Object name; when specified, this parameter is used
5592         #         for result publication in the study. Otherwise, if automatic
5593         #         publication is switched on, default value is used for result name.
5594         #
5595         #  @return List of all found sub-shapes.
5596         #
5597         #  @ref swig_GetShapesOnSphere "Example"
5598         @ManageTransactions("ShapesOp")
5599         def GetShapesOnSphere(self, theShape, theShapeType, theCenter, theRadius, theState, theName=None):
5600             """
5601             Find in theShape all sub-shapes of type theShapeType, situated relatively
5602             the specified sphere by the certain way, defined through theState parameter.
5603
5604             Parameters:
5605                 theShape Shape to find sub-shapes of.
5606                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5607                 theCenter Point, specifying center of the sphere to find shapes on.
5608                 theRadius Radius of the sphere to find shapes on.
5609                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5610                 theName Object name; when specified, this parameter is used
5611                         for result publication in the study. Otherwise, if automatic
5612                         publication is switched on, default value is used for result name.
5613
5614             Returns:
5615                 List of all found sub-shapes.
5616             """
5617             # Example: see GEOM_TestOthers.py
5618             aList = self.ShapesOp.GetShapesOnSphere(theShape, theShapeType, theCenter, theRadius, theState)
5619             RaiseIfFailed("GetShapesOnSphere", self.ShapesOp)
5620             self._autoPublish(aList, theName, "shapeOnSphere")
5621             return aList
5622
5623         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
5624         #  the specified sphere by the certain way, defined through \a theState parameter.
5625         #  @param theShape Shape to find sub-shapes of.
5626         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5627         #  @param theCenter Point, specifying center of the sphere to find shapes on.
5628         #  @param theRadius Radius of the sphere to find shapes on.
5629         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5630         #
5631         #  @return List of all found sub-shapes indices.
5632         #
5633         #  @ref swig_GetShapesOnSphereIDs "Example"
5634         @ManageTransactions("ShapesOp")
5635         def GetShapesOnSphereIDs(self, theShape, theShapeType, theCenter, theRadius, theState):
5636             """
5637             Find in theShape all sub-shapes of type theShapeType, situated relatively
5638             the specified sphere by the certain way, defined through theState parameter.
5639
5640             Parameters:
5641                 theShape Shape to find sub-shapes of.
5642                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5643                 theCenter Point, specifying center of the sphere to find shapes on.
5644                 theRadius Radius of the sphere to find shapes on.
5645                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5646
5647             Returns:
5648                 List of all found sub-shapes indices.
5649             """
5650             # Example: see GEOM_TestOthers.py
5651             aList = self.ShapesOp.GetShapesOnSphereIDs(theShape, theShapeType, theCenter, theRadius, theState)
5652             RaiseIfFailed("GetShapesOnSphereIDs", self.ShapesOp)
5653             return aList
5654
5655         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
5656         #  the specified quadrangle by the certain way, defined through \a theState parameter.
5657         #  @param theShape Shape to find sub-shapes of.
5658         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5659         #  @param theTopLeftPoint Point, specifying top left corner of a quadrangle
5660         #  @param theTopRightPoint Point, specifying top right corner of a quadrangle
5661         #  @param theBottomLeftPoint Point, specifying bottom left corner of a quadrangle
5662         #  @param theBottomRightPoint Point, specifying bottom right corner of a quadrangle
5663         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5664         #  @param theName Object name; when specified, this parameter is used
5665         #         for result publication in the study. Otherwise, if automatic
5666         #         publication is switched on, default value is used for result name.
5667         #
5668         #  @return List of all found sub-shapes.
5669         #
5670         #  @ref swig_GetShapesOnQuadrangle "Example"
5671         @ManageTransactions("ShapesOp")
5672         def GetShapesOnQuadrangle(self, theShape, theShapeType,
5673                                   theTopLeftPoint, theTopRightPoint,
5674                                   theBottomLeftPoint, theBottomRightPoint, theState, theName=None):
5675             """
5676             Find in theShape all sub-shapes of type theShapeType, situated relatively
5677             the specified quadrangle by the certain way, defined through theState parameter.
5678
5679             Parameters:
5680                 theShape Shape to find sub-shapes of.
5681                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5682                 theTopLeftPoint Point, specifying top left corner of a quadrangle
5683                 theTopRightPoint Point, specifying top right corner of a quadrangle
5684                 theBottomLeftPoint Point, specifying bottom left corner of a quadrangle
5685                 theBottomRightPoint Point, specifying bottom right corner of a quadrangle
5686                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5687                 theName Object name; when specified, this parameter is used
5688                         for result publication in the study. Otherwise, if automatic
5689                         publication is switched on, default value is used for result name.
5690
5691             Returns:
5692                 List of all found sub-shapes.
5693             """
5694             # Example: see GEOM_TestOthers.py
5695             aList = self.ShapesOp.GetShapesOnQuadrangle(theShape, theShapeType,
5696                                                         theTopLeftPoint, theTopRightPoint,
5697                                                         theBottomLeftPoint, theBottomRightPoint, theState)
5698             RaiseIfFailed("GetShapesOnQuadrangle", self.ShapesOp)
5699             self._autoPublish(aList, theName, "shapeOnQuadrangle")
5700             return aList
5701
5702         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
5703         #  the specified quadrangle by the certain way, defined through \a theState parameter.
5704         #  @param theShape Shape to find sub-shapes of.
5705         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5706         #  @param theTopLeftPoint Point, specifying top left corner of a quadrangle
5707         #  @param theTopRightPoint Point, specifying top right corner of a quadrangle
5708         #  @param theBottomLeftPoint Point, specifying bottom left corner of a quadrangle
5709         #  @param theBottomRightPoint Point, specifying bottom right corner of a quadrangle
5710         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5711         #
5712         #  @return List of all found sub-shapes indices.
5713         #
5714         #  @ref swig_GetShapesOnQuadrangleIDs "Example"
5715         @ManageTransactions("ShapesOp")
5716         def GetShapesOnQuadrangleIDs(self, theShape, theShapeType,
5717                                      theTopLeftPoint, theTopRightPoint,
5718                                      theBottomLeftPoint, theBottomRightPoint, theState):
5719             """
5720             Find in theShape all sub-shapes of type theShapeType, situated relatively
5721             the specified quadrangle by the certain way, defined through theState parameter.
5722
5723             Parameters:
5724                 theShape Shape to find sub-shapes of.
5725                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5726                 theTopLeftPoint Point, specifying top left corner of a quadrangle
5727                 theTopRightPoint Point, specifying top right corner of a quadrangle
5728                 theBottomLeftPoint Point, specifying bottom left corner of a quadrangle
5729                 theBottomRightPoint Point, specifying bottom right corner of a quadrangle
5730                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5731
5732             Returns:
5733                 List of all found sub-shapes indices.
5734             """
5735
5736             # Example: see GEOM_TestOthers.py
5737             aList = self.ShapesOp.GetShapesOnQuadrangleIDs(theShape, theShapeType,
5738                                                            theTopLeftPoint, theTopRightPoint,
5739                                                            theBottomLeftPoint, theBottomRightPoint, theState)
5740             RaiseIfFailed("GetShapesOnQuadrangleIDs", self.ShapesOp)
5741             return aList
5742
5743         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
5744         #  the specified \a theBox by the certain way, defined through \a theState parameter.
5745         #  @param theBox Shape for relative comparing.
5746         #  @param theShape Shape to find sub-shapes of.
5747         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5748         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5749         #  @param theName Object name; when specified, this parameter is used
5750         #         for result publication in the study. Otherwise, if automatic
5751         #         publication is switched on, default value is used for result name.
5752         #
5753         #  @return List of all found sub-shapes.
5754         #
5755         #  @ref swig_GetShapesOnBox "Example"
5756         @ManageTransactions("ShapesOp")
5757         def GetShapesOnBox(self, theBox, theShape, theShapeType, theState, theName=None):
5758             """
5759             Find in theShape all sub-shapes of type theShapeType, situated relatively
5760             the specified theBox by the certain way, defined through theState parameter.
5761
5762             Parameters:
5763                 theBox Shape for relative comparing.
5764                 theShape Shape to find sub-shapes of.
5765                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5766                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5767                 theName Object name; when specified, this parameter is used
5768                         for result publication in the study. Otherwise, if automatic
5769                         publication is switched on, default value is used for result name.
5770
5771             Returns:
5772                 List of all found sub-shapes.
5773             """
5774             # Example: see GEOM_TestOthers.py
5775             aList = self.ShapesOp.GetShapesOnBox(theBox, theShape, theShapeType, theState)
5776             RaiseIfFailed("GetShapesOnBox", self.ShapesOp)
5777             self._autoPublish(aList, theName, "shapeOnBox")
5778             return aList
5779
5780         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
5781         #  the specified \a theBox by the certain way, defined through \a theState parameter.
5782         #  @param theBox Shape for relative comparing.
5783         #  @param theShape Shape to find sub-shapes of.
5784         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5785         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5786         #
5787         #  @return List of all found sub-shapes indices.
5788         #
5789         #  @ref swig_GetShapesOnBoxIDs "Example"
5790         @ManageTransactions("ShapesOp")
5791         def GetShapesOnBoxIDs(self, theBox, theShape, theShapeType, theState):
5792             """
5793             Find in theShape all sub-shapes of type theShapeType, situated relatively
5794             the specified theBox by the certain way, defined through theState parameter.
5795
5796             Parameters:
5797                 theBox Shape for relative comparing.
5798                 theShape Shape to find sub-shapes of.
5799                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5800                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5801
5802             Returns:
5803                 List of all found sub-shapes indices.
5804             """
5805             # Example: see GEOM_TestOthers.py
5806             aList = self.ShapesOp.GetShapesOnBoxIDs(theBox, theShape, theShapeType, theState)
5807             RaiseIfFailed("GetShapesOnBoxIDs", self.ShapesOp)
5808             return aList
5809
5810         ## Find in \a theShape all sub-shapes of type \a theShapeType,
5811         #  situated relatively the specified \a theCheckShape by the
5812         #  certain way, defined through \a theState parameter.
5813         #  @param theCheckShape Shape for relative comparing. It must be a solid.
5814         #  @param theShape Shape to find sub-shapes of.
5815         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5816         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5817         #  @param theName Object name; when specified, this parameter is used
5818         #         for result publication in the study. Otherwise, if automatic
5819         #         publication is switched on, default value is used for result name.
5820         #
5821         #  @return List of all found sub-shapes.
5822         #
5823         #  @ref swig_GetShapesOnShape "Example"
5824         @ManageTransactions("ShapesOp")
5825         def GetShapesOnShape(self, theCheckShape, theShape, theShapeType, theState, theName=None):
5826             """
5827             Find in theShape all sub-shapes of type theShapeType,
5828             situated relatively the specified theCheckShape by the
5829             certain way, defined through theState parameter.
5830
5831             Parameters:
5832                 theCheckShape Shape for relative comparing. It must be a solid.
5833                 theShape Shape to find sub-shapes of.
5834                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5835                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5836                 theName Object name; when specified, this parameter is used
5837                         for result publication in the study. Otherwise, if automatic
5838                         publication is switched on, default value is used for result name.
5839
5840             Returns:
5841                 List of all found sub-shapes.
5842             """
5843             # Example: see GEOM_TestOthers.py
5844             aList = self.ShapesOp.GetShapesOnShape(theCheckShape, theShape,
5845                                                    theShapeType, theState)
5846             RaiseIfFailed("GetShapesOnShape", self.ShapesOp)
5847             self._autoPublish(aList, theName, "shapeOnShape")
5848             return aList
5849
5850         ## Find in \a theShape all sub-shapes of type \a theShapeType,
5851         #  situated relatively the specified \a theCheckShape by the
5852         #  certain way, defined through \a theState parameter.
5853         #  @param theCheckShape Shape for relative comparing. It must be a solid.
5854         #  @param theShape Shape to find sub-shapes of.
5855         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5856         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5857         #  @param theName Object name; when specified, this parameter is used
5858         #         for result publication in the study. Otherwise, if automatic
5859         #         publication is switched on, default value is used for result name.
5860         #
5861         #  @return All found sub-shapes as compound.
5862         #
5863         #  @ref swig_GetShapesOnShapeAsCompound "Example"
5864         @ManageTransactions("ShapesOp")
5865         def GetShapesOnShapeAsCompound(self, theCheckShape, theShape, theShapeType, theState, theName=None):
5866             """
5867             Find in theShape all sub-shapes of type theShapeType,
5868             situated relatively the specified theCheckShape by the
5869             certain way, defined through theState parameter.
5870
5871             Parameters:
5872                 theCheckShape Shape for relative comparing. It must be a solid.
5873                 theShape Shape to find sub-shapes of.
5874                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5875                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5876                 theName Object name; when specified, this parameter is used
5877                         for result publication in the study. Otherwise, if automatic
5878                         publication is switched on, default value is used for result name.
5879
5880             Returns:
5881                 All found sub-shapes as compound.
5882             """
5883             # Example: see GEOM_TestOthers.py
5884             anObj = self.ShapesOp.GetShapesOnShapeAsCompound(theCheckShape, theShape,
5885                                                              theShapeType, theState)
5886             RaiseIfFailed("GetShapesOnShapeAsCompound", self.ShapesOp)
5887             self._autoPublish(anObj, theName, "shapeOnShape")
5888             return anObj
5889
5890         ## Find in \a theShape all sub-shapes of type \a theShapeType,
5891         #  situated relatively the specified \a theCheckShape by the
5892         #  certain way, defined through \a theState parameter.
5893         #  @param theCheckShape Shape for relative comparing. It must be a solid.
5894         #  @param theShape Shape to find sub-shapes of.
5895         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5896         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5897         #
5898         #  @return List of all found sub-shapes indices.
5899         #
5900         #  @ref swig_GetShapesOnShapeIDs "Example"
5901         @ManageTransactions("ShapesOp")
5902         def GetShapesOnShapeIDs(self, theCheckShape, theShape, theShapeType, theState):
5903             """
5904             Find in theShape all sub-shapes of type theShapeType,
5905             situated relatively the specified theCheckShape by the
5906             certain way, defined through theState parameter.
5907
5908             Parameters:
5909                 theCheckShape Shape for relative comparing. It must be a solid.
5910                 theShape Shape to find sub-shapes of.
5911                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5912                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5913
5914             Returns:
5915                 List of all found sub-shapes indices.
5916             """
5917             # Example: see GEOM_TestOthers.py
5918             aList = self.ShapesOp.GetShapesOnShapeIDs(theCheckShape, theShape,
5919                                                       theShapeType, theState)
5920             RaiseIfFailed("GetShapesOnShapeIDs", self.ShapesOp)
5921             return aList
5922
5923         ## Get sub-shape(s) of theShapeWhere, which are
5924         #  coincident with \a theShapeWhat or could be a part of it.
5925         #  @param theShapeWhere Shape to find sub-shapes of.
5926         #  @param theShapeWhat Shape, specifying what to find.
5927         #  @param isNewImplementation implementation of GetInPlace functionality
5928         #             (default = False, old alghorithm based on shape properties)
5929         #  @param theName Object name; when specified, this parameter is used
5930         #         for result publication in the study. Otherwise, if automatic
5931         #         publication is switched on, default value is used for result name.
5932         #
5933         #  @return Compound which includes all found sub-shapes if they have different types; 
5934         #          or group of all found shapes of the equal type; or a single found sub-shape.
5935         #
5936         #  @note This function has a restriction on argument shapes.
5937         #        If \a theShapeWhere has curved parts with significantly
5938         #        outstanding centres (i.e. the mass centre of a part is closer to
5939         #        \a theShapeWhat than to the part), such parts will not be found.
5940         #        @image html get_in_place_lost_part.png
5941         #
5942         #  @ref swig_GetInPlace "Example"
5943         @ManageTransactions("ShapesOp")
5944         def GetInPlace(self, theShapeWhere, theShapeWhat, isNewImplementation = False, theName=None):
5945             """
5946             Get sub-shape(s) of theShapeWhere, which are
5947             coincident with  theShapeWhat or could be a part of it.
5948
5949             Parameters:
5950                 theShapeWhere Shape to find sub-shapes of.
5951                 theShapeWhat Shape, specifying what to find.
5952                 isNewImplementation Implementation of GetInPlace functionality
5953                                     (default = False, old alghorithm based on shape properties)
5954                 theName Object name; when specified, this parameter is used
5955                         for result publication in the study. Otherwise, if automatic
5956                         publication is switched on, default value is used for result name.
5957
5958             Returns:
5959                 Compound which includes all found sub-shapes if they have different types; 
5960                 or group of all found shapes of the equal type; or a single found sub-shape.
5961
5962
5963             Note:
5964                 This function has a restriction on argument shapes.
5965                 If theShapeWhere has curved parts with significantly
5966                 outstanding centres (i.e. the mass centre of a part is closer to
5967                 theShapeWhat than to the part), such parts will not be found.
5968             """
5969             # Example: see GEOM_TestOthers.py
5970             anObj = None
5971             if isNewImplementation:
5972                 anObj = self.ShapesOp.GetInPlace(theShapeWhere, theShapeWhat)
5973             else:
5974                 anObj = self.ShapesOp.GetInPlaceOld(theShapeWhere, theShapeWhat)
5975                 pass
5976             RaiseIfFailed("GetInPlace", self.ShapesOp)
5977             self._autoPublish(anObj, theName, "inplace")
5978             return anObj
5979
5980         ## Get sub-shape(s) of \a theShapeWhere, which are
5981         #  coincident with \a theShapeWhat or could be a part of it.
5982         #
5983         #  Implementation of this method is based on a saved history of an operation,
5984         #  produced \a theShapeWhere. The \a theShapeWhat must be among this operation's
5985         #  arguments (an argument shape or a sub-shape of an argument shape).
5986         #  The operation could be the Partition or one of boolean operations,
5987         #  performed on simple shapes (not on compounds).
5988         #
5989         #  @param theShapeWhere Shape to find sub-shapes of.
5990         #  @param theShapeWhat Shape, specifying what to find (must be in the
5991         #                      building history of the ShapeWhere).
5992         #  @param theName Object name; when specified, this parameter is used
5993         #         for result publication in the study. Otherwise, if automatic
5994         #         publication is switched on, default value is used for result name.
5995         #
5996         #  @return Compound which includes all found sub-shapes if they have different types; 
5997         #          or group of all found shapes of the equal type; or a single found sub-shape.
5998         #
5999         #  @ref swig_GetInPlace "Example"
6000         @ManageTransactions("ShapesOp")
6001         def GetInPlaceByHistory(self, theShapeWhere, theShapeWhat, theName=None):
6002             """
6003             Implementation of this method is based on a saved history of an operation,
6004             produced theShapeWhere. The theShapeWhat must be among this operation's
6005             arguments (an argument shape or a sub-shape of an argument shape).
6006             The operation could be the Partition or one of boolean operations,
6007             performed on simple shapes (not on compounds).
6008
6009             Parameters:
6010                 theShapeWhere Shape to find sub-shapes of.
6011                 theShapeWhat Shape, specifying what to find (must be in the
6012                                 building history of the ShapeWhere).
6013                 theName Object name; when specified, this parameter is used
6014                         for result publication in the study. Otherwise, if automatic
6015                         publication is switched on, default value is used for result name.
6016
6017             Returns:
6018                 Compound which includes all found sub-shapes if they have different types; 
6019                 or group of all found shapes of the equal type; or a single found sub-shape.
6020             """
6021             # Example: see GEOM_TestOthers.py
6022             anObj = self.ShapesOp.GetInPlaceByHistory(theShapeWhere, theShapeWhat)
6023             RaiseIfFailed("GetInPlaceByHistory", self.ShapesOp)
6024             self._autoPublish(anObj, theName, "inplace")
6025             return anObj
6026
6027         ## A sort of GetInPlace functionality, returning IDs of sub-shapes.
6028         #  For each sub-shape ID of @a theShapeWhat return a list of corresponding sub-shape
6029         #  IDs of @a theShapeWhere.
6030         #  For example, if theShapeWhat is a box and theShapeWhere is this box cut into 
6031         #  two parts by a plane, then the result can be as this: 
6032         #    len( result_list ) = 35,
6033         #    result_list[ 1 ] = [ 2, 36 ], which means that the box  (ID 1) turned into two
6034         #  solids with IDs 2 and 36 within theShapeWhere
6035         #
6036         #  @param theShapeWhere Shape to find sub-shapes of.
6037         #  @param theShapeWhat Shape, specifying what to find.
6038         #  @return List of lists of sub-shape IDS of theShapeWhere.
6039         def GetInPlaceMap(self, theShapeWhere, theShapeWhat):
6040             """
6041             A sort of GetInPlace functionality, returning IDs of sub-shapes.
6042             For each sub-shape ID of @a theShapeWhat return a list of corresponding sub-shape
6043             IDs of @a theShapeWhere.
6044             For example, if theShapeWhat is a box and theShapeWhere is this box cut into 
6045             two parts by a plane, then the result can be as this: 
6046               len( result_list ) = 35,
6047               result_list[ 1 ] = [ 2, 36 ], which means that the box (ID 1) turned into two
6048             solids with IDs 2 and 36 within theShapeWhere
6049
6050             Parameters:
6051                 theShapeWhere Shape to find sub-shapes of.
6052                 theShapeWhat Shape, specifying what to find.
6053
6054             Returns:
6055                 List of lists of sub-shape IDS of theShapeWhere.
6056             """
6057             return self.ShapesOp.GetInPlaceMap(theShapeWhere, theShapeWhat)
6058
6059         ## Get sub-shape of theShapeWhere, which is
6060         #  equal to \a theShapeWhat.
6061         #  @param theShapeWhere Shape to find sub-shape of.
6062         #  @param theShapeWhat Shape, specifying what to find.
6063         #  @param theName Object name; when specified, this parameter is used
6064         #         for result publication in the study. Otherwise, if automatic
6065         #         publication is switched on, default value is used for result name.
6066         #
6067         #  @return New GEOM.GEOM_Object for found sub-shape.
6068         #
6069         #  @ref swig_GetSame "Example"
6070         @ManageTransactions("ShapesOp")
6071         def GetSame(self, theShapeWhere, theShapeWhat, theName=None):
6072             """
6073             Get sub-shape of theShapeWhere, which is
6074             equal to theShapeWhat.
6075
6076             Parameters:
6077                 theShapeWhere Shape to find sub-shape of.
6078                 theShapeWhat Shape, specifying what to find.
6079                 theName Object name; when specified, this parameter is used
6080                         for result publication in the study. Otherwise, if automatic
6081                         publication is switched on, default value is used for result name.
6082
6083             Returns:
6084                 New GEOM.GEOM_Object for found sub-shape.
6085             """
6086             anObj = self.ShapesOp.GetSame(theShapeWhere, theShapeWhat)
6087             RaiseIfFailed("GetSame", self.ShapesOp)
6088             self._autoPublish(anObj, theName, "sameShape")
6089             return anObj
6090
6091
6092         ## Get sub-shape indices of theShapeWhere, which is
6093         #  equal to \a theShapeWhat.
6094         #  @param theShapeWhere Shape to find sub-shape of.
6095         #  @param theShapeWhat Shape, specifying what to find.
6096         #  @return List of all found sub-shapes indices.
6097         #
6098         #  @ref swig_GetSame "Example"
6099         @ManageTransactions("ShapesOp")
6100         def GetSameIDs(self, theShapeWhere, theShapeWhat):
6101             """
6102             Get sub-shape indices of theShapeWhere, which is
6103             equal to theShapeWhat.
6104
6105             Parameters:
6106                 theShapeWhere Shape to find sub-shape of.
6107                 theShapeWhat Shape, specifying what to find.
6108
6109             Returns:
6110                 List of all found sub-shapes indices.
6111             """
6112             anObj = self.ShapesOp.GetSameIDs(theShapeWhere, theShapeWhat)
6113             RaiseIfFailed("GetSameIDs", self.ShapesOp)
6114             return anObj
6115
6116         ## Resize the input edge with the new Min and Max parameters.
6117         #  The input edge parameters range is [0, 1]. If theMin parameter is
6118         #  negative, the input edge is extended, otherwise it is shrinked by
6119         #  theMin parameter. If theMax is greater than 1, the edge is extended,
6120         #  otherwise it is shrinked by theMax parameter.
6121         #  @param theEdge the input edge to be resized.
6122         #  @param theMin the minimal parameter value.
6123         #  @param theMax the maximal parameter value.
6124         #  @param theName Object name; when specified, this parameter is used
6125         #         for result publication in the study. Otherwise, if automatic
6126         #         publication is switched on, default value is used for result name.
6127         #  @return New GEOM.GEOM_Object, containing the created edge.
6128         #
6129         #  @ref tui_extend "Example"
6130         @ManageTransactions("ShapesOp")
6131         def ExtendEdge(self, theEdge, theMin, theMax, theName=None):
6132             """
6133             Resize the input edge with the new Min and Max parameters.
6134             The input edge parameters range is [0, 1]. If theMin parameter is
6135             negative, the input edge is extended, otherwise it is shrinked by
6136             theMin parameter. If theMax is greater than 1, the edge is extended,
6137             otherwise it is shrinked by theMax parameter.
6138
6139             Parameters:
6140                 theEdge the input edge to be resized.
6141                 theMin the minimal parameter value.
6142                 theMax the maximal parameter value.
6143                 theName Object name; when specified, this parameter is used
6144                         for result publication in the study. Otherwise, if automatic
6145                         publication is switched on, default value is used for result name.
6146
6147             Returns:
6148                 New GEOM.GEOM_Object, containing the created edge.
6149             """
6150             theMin, theMax, Parameters = ParseParameters(theMin, theMax)
6151             anObj = self.ShapesOp.ExtendEdge(theEdge, theMin, theMax)
6152             RaiseIfFailed("ExtendEdge", self.ShapesOp)
6153             anObj.SetParameters(Parameters)
6154             self._autoPublish(anObj, theName, "edge")
6155             return anObj
6156
6157         ## Resize the input face with the new UMin, UMax, VMin and VMax
6158         #  parameters. The input face U and V parameters range is [0, 1]. If
6159         #  theUMin parameter is negative, the input face is extended, otherwise
6160         #  it is shrinked along U direction by theUMin parameter. If theUMax is
6161         #  greater than 1, the face is extended, otherwise it is shrinked along
6162         #  U direction by theUMax parameter. So as for theVMin, theVMax and
6163         #  V direction of the input face.
6164         #  @param theFace the input face to be resized.
6165         #  @param theUMin the minimal U parameter value.
6166         #  @param theUMax the maximal U parameter value.
6167         #  @param theVMin the minimal V parameter value.
6168         #  @param theVMax the maximal V parameter value.
6169         #  @param theName Object name; when specified, this parameter is used
6170         #         for result publication in the study. Otherwise, if automatic
6171         #         publication is switched on, default value is used for result name.
6172         #  @return New GEOM.GEOM_Object, containing the created face.
6173         #
6174         #  @ref tui_extend "Example"
6175         @ManageTransactions("ShapesOp")
6176         def ExtendFace(self, theFace, theUMin, theUMax,
6177                        theVMin, theVMax, theName=None):
6178             """
6179             Resize the input face with the new UMin, UMax, VMin and VMax
6180             parameters. The input face U and V parameters range is [0, 1]. If
6181             theUMin parameter is negative, the input face is extended, otherwise
6182             it is shrinked along U direction by theUMin parameter. If theUMax is
6183             greater than 1, the face is extended, otherwise it is shrinked along
6184             U direction by theUMax parameter. So as for theVMin, theVMax and
6185             V direction of the input face.
6186
6187             Parameters:
6188                 theFace the input face to be resized.
6189                 theUMin the minimal U parameter value.
6190                 theUMax the maximal U parameter value.
6191                 theVMin the minimal V parameter value.
6192                 theVMax the maximal V parameter value.
6193                 theName Object name; when specified, this parameter is used
6194                         for result publication in the study. Otherwise, if automatic
6195                         publication is switched on, default value is used for result name.
6196
6197             Returns:
6198                 New GEOM.GEOM_Object, containing the created face.
6199             """
6200             theUMin, theUMax, theVMin, theVMax, Parameters = ParseParameters(theUMin, theUMax, theVMin, theVMax)
6201             anObj = self.ShapesOp.ExtendFace(theFace, theUMin, theUMax,
6202                                              theVMin, theVMax)
6203             RaiseIfFailed("ExtendFace", self.ShapesOp)
6204             anObj.SetParameters(Parameters)
6205             self._autoPublish(anObj, theName, "face")
6206             return anObj
6207
6208         ## This function takes some face as input parameter and creates new
6209         #  GEOM_Object, i.e. topological shape by extracting underlying surface
6210         #  of the source face and limiting it by the Umin, Umax, Vmin, Vmax
6211         #  parameters of the source face (in the parametrical space).
6212         #  @param theFace the input face.
6213         #  @param theName Object name; when specified, this parameter is used
6214         #         for result publication in the study. Otherwise, if automatic
6215         #         publication is switched on, default value is used for result name.
6216         #  @return New GEOM.GEOM_Object, containing the created face.
6217         #
6218         #  @ref tui_creation_surface "Example"
6219         @ManageTransactions("ShapesOp")
6220         def MakeSurfaceFromFace(self, theFace, theName=None):
6221             """
6222             This function takes some face as input parameter and creates new
6223             GEOM_Object, i.e. topological shape by extracting underlying surface
6224             of the source face and limiting it by the Umin, Umax, Vmin, Vmax
6225             parameters of the source face (in the parametrical space).
6226
6227             Parameters:
6228                 theFace the input face.
6229                 theName Object name; when specified, this parameter is used
6230                         for result publication in the study. Otherwise, if automatic
6231                         publication is switched on, default value is used for result name.
6232
6233             Returns:
6234                 New GEOM.GEOM_Object, containing the created face.
6235             """
6236             anObj = self.ShapesOp.MakeSurfaceFromFace(theFace)
6237             RaiseIfFailed("MakeSurfaceFromFace", self.ShapesOp)
6238             self._autoPublish(anObj, theName, "surface")
6239             return anObj
6240
6241         # end of l4_obtain
6242         ## @}
6243
6244         ## @addtogroup l4_access
6245         ## @{
6246
6247         ## Obtain a composite sub-shape of <VAR>aShape</VAR>, composed from sub-shapes
6248         #  of aShape, selected by their unique IDs inside <VAR>aShape</VAR>
6249         #  @param aShape Shape to get sub-shape of.
6250         #  @param ListOfID List of sub-shapes indices.
6251         #  @param theName Object name; when specified, this parameter is used
6252         #         for result publication in the study. Otherwise, if automatic
6253         #         publication is switched on, default value is used for result name.
6254         #
6255         #  @return Found sub-shape.
6256         #
6257         #  @ref swig_all_decompose "Example"
6258         def GetSubShape(self, aShape, ListOfID, theName=None):
6259             """
6260             Obtain a composite sub-shape of aShape, composed from sub-shapes
6261             of aShape, selected by their unique IDs inside aShape
6262
6263             Parameters:
6264                 aShape Shape to get sub-shape of.
6265                 ListOfID List of sub-shapes indices.
6266                 theName Object name; when specified, this parameter is used
6267                         for result publication in the study. Otherwise, if automatic
6268                         publication is switched on, default value is used for result name.
6269
6270             Returns:
6271                 Found sub-shape.
6272             """
6273             # Example: see GEOM_TestAll.py
6274             anObj = self.AddSubShape(aShape,ListOfID)
6275             self._autoPublish(anObj, theName, "subshape")
6276             return anObj
6277
6278         ## Obtain unique ID of sub-shape <VAR>aSubShape</VAR> inside <VAR>aShape</VAR>
6279         #  of aShape, selected by their unique IDs inside <VAR>aShape</VAR>
6280         #  @param aShape Shape to get sub-shape of.
6281         #  @param aSubShape Sub-shapes of aShape.
6282         #  @return ID of found sub-shape.
6283         #
6284         #  @ref swig_all_decompose "Example"
6285         @ManageTransactions("LocalOp")
6286         def GetSubShapeID(self, aShape, aSubShape):
6287             """
6288             Obtain unique ID of sub-shape aSubShape inside aShape
6289             of aShape, selected by their unique IDs inside aShape
6290
6291             Parameters:
6292                aShape Shape to get sub-shape of.
6293                aSubShape Sub-shapes of aShape.
6294
6295             Returns:
6296                ID of found sub-shape.
6297             """
6298             # Example: see GEOM_TestAll.py
6299             anID = self.LocalOp.GetSubShapeIndex(aShape, aSubShape)
6300             RaiseIfFailed("GetSubShapeIndex", self.LocalOp)
6301             return anID
6302
6303         ## Obtain unique IDs of sub-shapes <VAR>aSubShapes</VAR> inside <VAR>aShape</VAR>
6304         #  This function is provided for performance purpose. The complexity is O(n) with n
6305         #  the number of subobjects of aShape
6306         #  @param aShape Shape to get sub-shape of.
6307         #  @param aSubShapes Sub-shapes of aShape.
6308         #  @return list of IDs of found sub-shapes.
6309         #
6310         #  @ref swig_all_decompose "Example"
6311         @ManageTransactions("ShapesOp")
6312         def GetSubShapesIDs(self, aShape, aSubShapes):
6313             """
6314             Obtain a list of IDs of sub-shapes aSubShapes inside aShape
6315             This function is provided for performance purpose. The complexity is O(n) with n
6316             the number of subobjects of aShape
6317
6318             Parameters:
6319                aShape Shape to get sub-shape of.
6320                aSubShapes Sub-shapes of aShape.
6321
6322             Returns:
6323                List of IDs of found sub-shape.
6324             """
6325             # Example: see GEOM_TestAll.py
6326             anIDs = self.ShapesOp.GetSubShapesIndices(aShape, aSubShapes)
6327             RaiseIfFailed("GetSubShapesIndices", self.ShapesOp)
6328             return anIDs
6329
6330         # end of l4_access
6331         ## @}
6332
6333         ## @addtogroup l4_decompose
6334         ## @{
6335
6336         ## Get all sub-shapes and groups of \a theShape,
6337         #  that were created already by any other methods.
6338         #  @param theShape Any shape.
6339         #  @param theGroupsOnly If this parameter is TRUE, only groups will be
6340         #                       returned, else all found sub-shapes and groups.
6341         #  @return List of existing sub-objects of \a theShape.
6342         #
6343         #  @ref swig_all_decompose "Example"
6344         @ManageTransactions("ShapesOp")
6345         def GetExistingSubObjects(self, theShape, theGroupsOnly = False):
6346             """
6347             Get all sub-shapes and groups of theShape,
6348             that were created already by any other methods.
6349
6350             Parameters:
6351                 theShape Any shape.
6352                 theGroupsOnly If this parameter is TRUE, only groups will be
6353                                  returned, else all found sub-shapes and groups.
6354
6355             Returns:
6356                 List of existing sub-objects of theShape.
6357             """
6358             # Example: see GEOM_TestAll.py
6359             ListObj = self.ShapesOp.GetExistingSubObjects(theShape, theGroupsOnly)
6360             RaiseIfFailed("GetExistingSubObjects", self.ShapesOp)
6361             return ListObj
6362
6363         ## Get all groups of \a theShape,
6364         #  that were created already by any other methods.
6365         #  @param theShape Any shape.
6366         #  @return List of existing groups of \a theShape.
6367         #
6368         #  @ref swig_all_decompose "Example"
6369         @ManageTransactions("ShapesOp")
6370         def GetGroups(self, theShape):
6371             """
6372             Get all groups of theShape,
6373             that were created already by any other methods.
6374
6375             Parameters:
6376                 theShape Any shape.
6377
6378             Returns:
6379                 List of existing groups of theShape.
6380             """
6381             # Example: see GEOM_TestAll.py
6382             ListObj = self.ShapesOp.GetExistingSubObjects(theShape, True)
6383             RaiseIfFailed("GetExistingSubObjects", self.ShapesOp)
6384             return ListObj
6385
6386         ## Explode a shape on sub-shapes of a given type.
6387         #  If the shape itself matches the type, it is also returned.
6388         #  @param aShape Shape to be exploded.
6389         #  @param aType Type of sub-shapes to be retrieved (see ShapeType())
6390         #  @param theName Object name; when specified, this parameter is used
6391         #         for result publication in the study. Otherwise, if automatic
6392         #         publication is switched on, default value is used for result name.
6393         #
6394         #  @return List of sub-shapes of type theShapeType, contained in theShape.
6395         #
6396         #  @ref swig_all_decompose "Example"
6397         @ManageTransactions("ShapesOp")
6398         def SubShapeAll(self, aShape, aType, theName=None):
6399             """
6400             Explode a shape on sub-shapes of a given type.
6401             If the shape itself matches the type, it is also returned.
6402
6403             Parameters:
6404                 aShape Shape to be exploded.
6405                 aType Type of sub-shapes to be retrieved (see geompy.ShapeType)
6406                 theName Object name; when specified, this parameter is used
6407                         for result publication in the study. Otherwise, if automatic
6408                         publication is switched on, default value is used for result name.
6409
6410             Returns:
6411                 List of sub-shapes of type theShapeType, contained in theShape.
6412             """
6413             # Example: see GEOM_TestAll.py
6414             ListObj = self.ShapesOp.MakeAllSubShapes(aShape, EnumToLong( aType ), False)
6415             RaiseIfFailed("SubShapeAll", self.ShapesOp)
6416             self._autoPublish(ListObj, theName, "subshape")
6417             return ListObj
6418
6419         ## Explode a shape on sub-shapes of a given type.
6420         #  @param aShape Shape to be exploded.
6421         #  @param aType Type of sub-shapes to be retrieved (see ShapeType())
6422         #  @return List of IDs of sub-shapes.
6423         #
6424         #  @ref swig_all_decompose "Example"
6425         @ManageTransactions("ShapesOp")
6426         def SubShapeAllIDs(self, aShape, aType):
6427             """
6428             Explode a shape on sub-shapes of a given type.
6429
6430             Parameters:
6431                 aShape Shape to be exploded (see geompy.ShapeType)
6432                 aType Type of sub-shapes to be retrieved (see geompy.ShapeType)
6433
6434             Returns:
6435                 List of IDs of sub-shapes.
6436             """
6437             ListObj = self.ShapesOp.GetAllSubShapesIDs(aShape, EnumToLong( aType ), False)
6438             RaiseIfFailed("SubShapeAllIDs", self.ShapesOp)
6439             return ListObj
6440
6441         ## Obtain a compound of sub-shapes of <VAR>aShape</VAR>,
6442         #  selected by their indices in list of all sub-shapes of type <VAR>aType</VAR>.
6443         #  Each index is in range [1, Nb_Sub-Shapes_Of_Given_Type]
6444         #  @param aShape Shape to get sub-shape of.
6445         #  @param ListOfInd List of sub-shapes indices.
6446         #  @param aType Type of sub-shapes to be retrieved (see ShapeType())
6447         #  @param theName Object name; when specified, this parameter is used
6448         #         for result publication in the study. Otherwise, if automatic
6449         #         publication is switched on, default value is used for result name.
6450         #
6451         #  @return A compound of sub-shapes of aShape.
6452         #
6453         #  @ref swig_all_decompose "Example"
6454         def SubShape(self, aShape, aType, ListOfInd, theName=None):
6455             """
6456             Obtain a compound of sub-shapes of aShape,
6457             selected by their indices in list of all sub-shapes of type aType.
6458             Each index is in range [1, Nb_Sub-Shapes_Of_Given_Type]
6459
6460             Parameters:
6461                 aShape Shape to get sub-shape of.
6462                 ListOfID List of sub-shapes indices.
6463                 aType Type of sub-shapes to be retrieved (see geompy.ShapeType)
6464                 theName Object name; when specified, this parameter is used
6465                         for result publication in the study. Otherwise, if automatic
6466                         publication is switched on, default value is used for result name.
6467
6468             Returns:
6469                 A compound of sub-shapes of aShape.
6470             """
6471             # Example: see GEOM_TestAll.py
6472             ListOfIDs = []
6473             AllShapeIDsList = self.SubShapeAllIDs(aShape, EnumToLong( aType ))
6474             for ind in ListOfInd:
6475                 ListOfIDs.append(AllShapeIDsList[ind - 1])
6476             # note: auto-publishing is done in self.GetSubShape()
6477             anObj = self.GetSubShape(aShape, ListOfIDs, theName)
6478             return anObj
6479
6480         ## Explode a shape on sub-shapes of a given type.
6481         #  Sub-shapes will be sorted taking into account their gravity centers,
6482         #  to provide stable order of sub-shapes. Please see
6483         #  @ref sorting_shapes_page "Description of Sorting Shapes Algorithm".
6484         #  If the shape itself matches the type, it is also returned.
6485         #  @param aShape Shape to be exploded.
6486         #  @param aType Type of sub-shapes to be retrieved (see ShapeType())
6487         #  @param theName Object name; when specified, this parameter is used
6488         #         for result publication in the study. Otherwise, if automatic
6489         #         publication is switched on, default value is used for result name.
6490         #
6491         #  @return List of sub-shapes of type theShapeType, contained in theShape.
6492         #
6493         #  @ref swig_SubShapeAllSorted "Example"
6494         @ManageTransactions("ShapesOp")
6495         def SubShapeAllSortedCentres(self, aShape, aType, theName=None):
6496             """
6497             Explode a shape on sub-shapes of a given type.
6498             Sub-shapes will be sorted taking into account their gravity centers,
6499             to provide stable order of sub-shapes.
6500             If the shape itself matches the type, it is also returned.
6501
6502             Parameters:
6503                 aShape Shape to be exploded.
6504                 aType Type of sub-shapes to be retrieved (see geompy.ShapeType)
6505                 theName Object name; when specified, this parameter is used
6506                         for result publication in the study. Otherwise, if automatic
6507                         publication is switched on, default value is used for result name.
6508
6509             Returns:
6510                 List of sub-shapes of type theShapeType, contained in theShape.
6511             """
6512             # Example: see GEOM_TestAll.py
6513             ListObj = self.ShapesOp.MakeAllSubShapes(aShape, EnumToLong( aType ), True)
6514             RaiseIfFailed("SubShapeAllSortedCentres", self.ShapesOp)
6515             self._autoPublish(ListObj, theName, "subshape")
6516             return ListObj
6517
6518         ## Explode a shape on sub-shapes of a given type.
6519         #  Sub-shapes will be sorted taking into account their gravity centers,
6520         #  to provide stable order of sub-shapes. Please see
6521         #  @ref sorting_shapes_page "Description of Sorting Shapes Algorithm".
6522         #  @param aShape Shape to be exploded.
6523         #  @param aType Type of sub-shapes to be retrieved (see ShapeType())
6524         #  @return List of IDs of sub-shapes.
6525         #
6526         #  @ref swig_all_decompose "Example"
6527         @ManageTransactions("ShapesOp")
6528         def SubShapeAllSortedCentresIDs(self, aShape, aType):
6529             """
6530             Explode a shape on sub-shapes of a given type.
6531             Sub-shapes will be sorted taking into account their gravity centers,
6532             to provide stable order of sub-shapes.
6533
6534             Parameters:
6535                 aShape Shape to be exploded.
6536                 aType Type of sub-shapes to be retrieved (see geompy.ShapeType)
6537
6538             Returns:
6539                 List of IDs of sub-shapes.
6540             """
6541             ListIDs = self.ShapesOp.GetAllSubShapesIDs(aShape, EnumToLong( aType ), True)
6542             RaiseIfFailed("SubShapeAllIDs", self.ShapesOp)
6543             return ListIDs
6544
6545         ## Obtain a compound of sub-shapes of <VAR>aShape</VAR>,
6546         #  selected by they indices in sorted list of all sub-shapes of type <VAR>aType</VAR>.
6547         #  Please see @ref sorting_shapes_page "Description of Sorting Shapes Algorithm".
6548         #  Each index is in range [1, Nb_Sub-Shapes_Of_Given_Type]
6549         #  @param aShape Shape to get sub-shape of.
6550         #  @param ListOfInd List of sub-shapes indices.
6551         #  @param aType Type of sub-shapes to be retrieved (see ShapeType())
6552         #  @param theName Object name; when specified, this parameter is used
6553         #         for result publication in the study. Otherwise, if automatic
6554         #         publication is switched on, default value is used for result name.
6555         #
6556         #  @return A compound of sub-shapes of aShape.
6557         #
6558         #  @ref swig_all_decompose "Example"
6559         def SubShapeSortedCentres(self, aShape, aType, ListOfInd, theName=None):
6560             """
6561             Obtain a compound of sub-shapes of aShape,
6562             selected by they indices in sorted list of all sub-shapes of type aType.
6563             Each index is in range [1, Nb_Sub-Shapes_Of_Given_Type]
6564
6565             Parameters:
6566                 aShape Shape to get sub-shape of.
6567                 ListOfID List of sub-shapes indices.
6568                 aType Type of sub-shapes to be retrieved (see geompy.ShapeType)
6569                 theName Object name; when specified, this parameter is used
6570                         for result publication in the study. Otherwise, if automatic
6571                         publication is switched on, default value is used for result name.
6572
6573             Returns:
6574                 A compound of sub-shapes of aShape.
6575             """
6576             # Example: see GEOM_TestAll.py
6577             ListOfIDs = []
6578             AllShapeIDsList = self.SubShapeAllSortedCentresIDs(aShape, EnumToLong( aType ))
6579             for ind in ListOfInd:
6580                 ListOfIDs.append(AllShapeIDsList[ind - 1])
6581             # note: auto-publishing is done in self.GetSubShape()
6582             anObj = self.GetSubShape(aShape, ListOfIDs, theName)
6583             return anObj
6584
6585         ## Extract shapes (excluding the main shape) of given type.
6586         #  @param aShape The shape.
6587         #  @param aType  The shape type (see ShapeType())
6588         #  @param isSorted Boolean flag to switch sorting on/off. Please see
6589         #         @ref sorting_shapes_page "Description of Sorting Shapes Algorithm".
6590         #  @param theName Object name; when specified, this parameter is used
6591         #         for result publication in the study. Otherwise, if automatic
6592         #         publication is switched on, default value is used for result name.
6593         #
6594         #  @return List of sub-shapes of type aType, contained in aShape.
6595         #
6596         #  @ref swig_FilletChamfer "Example"
6597         @ManageTransactions("ShapesOp")
6598         def ExtractShapes(self, aShape, aType, isSorted = False, theName=None):
6599             """
6600             Extract shapes (excluding the main shape) of given type.
6601
6602             Parameters:
6603                 aShape The shape.
6604                 aType  The shape type (see geompy.ShapeType)
6605                 isSorted Boolean flag to switch sorting on/off.
6606                 theName Object name; when specified, this parameter is used
6607                         for result publication in the study. Otherwise, if automatic
6608                         publication is switched on, default value is used for result name.
6609
6610             Returns:
6611                 List of sub-shapes of type aType, contained in aShape.
6612             """
6613             # Example: see GEOM_TestAll.py
6614             ListObj = self.ShapesOp.ExtractSubShapes(aShape, EnumToLong( aType ), isSorted)
6615             RaiseIfFailed("ExtractSubShapes", self.ShapesOp)
6616             self._autoPublish(ListObj, theName, "subshape")
6617             return ListObj
6618
6619         ## Get a set of sub-shapes defined by their unique IDs inside <VAR>aShape</VAR>
6620         #  @param aShape Main shape.
6621         #  @param anIDs List of unique IDs of sub-shapes inside <VAR>aShape</VAR>.
6622         #  @param theName Object name; when specified, this parameter is used
6623         #         for result publication in the study. Otherwise, if automatic
6624         #         publication is switched on, default value is used for result name.
6625         #  @return List of GEOM.GEOM_Object, corresponding to found sub-shapes.
6626         #
6627         #  @ref swig_all_decompose "Example"
6628         @ManageTransactions("ShapesOp")
6629         def SubShapes(self, aShape, anIDs, theName=None):
6630             """
6631             Get a set of sub-shapes defined by their unique IDs inside theMainShape
6632
6633             Parameters:
6634                 aShape Main shape.
6635                 anIDs List of unique IDs of sub-shapes inside theMainShape.
6636                 theName Object name; when specified, this parameter is used
6637                         for result publication in the study. Otherwise, if automatic
6638                         publication is switched on, default value is used for result name.
6639
6640             Returns:
6641                 List of GEOM.GEOM_Object, corresponding to found sub-shapes.
6642             """
6643             # Example: see GEOM_TestAll.py
6644             ListObj = self.ShapesOp.MakeSubShapes(aShape, anIDs)
6645             RaiseIfFailed("SubShapes", self.ShapesOp)
6646             self._autoPublish(ListObj, theName, "subshape")
6647             return ListObj
6648
6649         ## Explode a shape into edges sorted in a row from a starting point.
6650         #  @param theShape the shape to be exploded on edges.
6651         #  @param theStartPoint the starting point.
6652         #  @param theName Object name; when specified, this parameter is used
6653         #         for result publication in the study. Otherwise, if automatic
6654         #         publication is switched on, default value is used for result name.
6655         #  @return List of GEOM.GEOM_Object that is actually an ordered list
6656         #          of edges sorted in a row from a starting point.
6657         #
6658         #  @ref swig_GetSubShapeEdgeSorted "Example"
6659         @ManageTransactions("ShapesOp")
6660         def GetSubShapeEdgeSorted(self, theShape, theStartPoint, theName=None):
6661             """
6662             Explode a shape into edges sorted in a row from a starting point.
6663
6664             Parameters:
6665                 theShape the shape to be exploded on edges.
6666                 theStartPoint the starting point.
6667                 theName Object name; when specified, this parameter is used
6668                         for result publication in the study. Otherwise, if automatic
6669                         publication is switched on, default value is used for result name.
6670
6671             Returns:
6672                 List of GEOM.GEOM_Object that is actually an ordered list
6673                 of edges sorted in a row from a starting point.
6674             """
6675             # Example: see GEOM_TestAll.py
6676             ListObj = self.ShapesOp.GetSubShapeEdgeSorted(theShape, theStartPoint)
6677             RaiseIfFailed("GetSubShapeEdgeSorted", self.ShapesOp)
6678             self._autoPublish(ListObj, theName, "SortedEdges")
6679             return ListObj
6680
6681         ##
6682         # Return the list of subshapes that satisfies a certain tolerance
6683         # criterion. The user defines the type of shapes to be returned, the
6684         # condition and the tolerance value. The operation is defined for
6685         # faces, edges and vertices only. E.g. for theShapeType FACE,
6686         # theCondition GEOM::CC_GT and theTolerance 1.e-7 this method returns
6687         # all faces of theShape that have tolerances greater then 1.e7.
6688         #
6689         #  @param theShape the shape to be exploded
6690         #  @param theShapeType the type of sub-shapes to be returned (see
6691         #         ShapeType()). Can have the values FACE, EDGE and VERTEX only.
6692         #  @param theCondition the condition type (see GEOM::comparison_condition).
6693         #  @param theTolerance the tolerance filter.
6694         #  @param theName Object name; when specified, this parameter is used
6695         #         for result publication in the study. Otherwise, if automatic
6696         #         publication is switched on, default value is used for result name.
6697         #  @return the list of shapes that satisfy the conditions.
6698         #
6699         #  @ref swig_GetSubShapesWithTolerance "Example"
6700         @ManageTransactions("ShapesOp")
6701         def GetSubShapesWithTolerance(self, theShape, theShapeType,
6702                                       theCondition, theTolerance, theName=None):
6703             """
6704             Return the list of subshapes that satisfies a certain tolerance
6705             criterion. The user defines the type of shapes to be returned, the
6706             condition and the tolerance value. The operation is defined for
6707             faces, edges and vertices only. E.g. for theShapeType FACE,
6708             theCondition GEOM::CC_GT and theTolerance 1.e-7 this method returns
6709             all faces of theShape that have tolerances greater then 1.e7.
6710             
6711             Parameters:
6712                 theShape the shape to be exploded
6713                 theShapeType the type of sub-shapes to be returned (see
6714                              ShapeType()). Can have the values FACE,
6715                              EDGE and VERTEX only.
6716                 theCondition the condition type (see GEOM::comparison_condition).
6717                 theTolerance the tolerance filter.
6718                 theName Object name; when specified, this parameter is used
6719                         for result publication in the study. Otherwise, if automatic
6720                         publication is switched on, default value is used for result name.
6721
6722             Returns:
6723                 The list of shapes that satisfy the conditions.
6724             """
6725             # Example: see GEOM_TestAll.py
6726             ListObj = self.ShapesOp.GetSubShapesWithTolerance(theShape, EnumToLong(theShapeType),
6727                                                               theCondition, theTolerance)
6728             RaiseIfFailed("GetSubShapesWithTolerance", self.ShapesOp)
6729             self._autoPublish(ListObj, theName, "SubShapeWithTolerance")
6730             return ListObj
6731
6732         ## Check if the object is a sub-object of another GEOM object.
6733         #  @param aSubObject Checked sub-object (or its parent object, in case if
6734         #         \a theSubObjectIndex is non-zero).
6735         #  @param anObject An object that is checked for ownership (or its parent object,
6736         #         in case if \a theObjectIndex is non-zero).
6737         #  @param aSubObjectIndex When non-zero, specifies a sub-shape index that
6738         #         identifies a sub-object within its parent specified via \a theSubObject.
6739         #  @param anObjectIndex When non-zero, specifies a sub-shape index that
6740         #         identifies an object within its parent specified via \a theObject.
6741         #  @return TRUE, if the given object contains sub-object.
6742         @ManageTransactions("ShapesOp")
6743         def IsSubShapeBelongsTo(self, aSubObject, anObject, aSubObjectIndex = 0, anObjectIndex = 0):
6744             """
6745             Check if the object is a sub-object of another GEOM object.
6746             
6747             Parameters:
6748                 aSubObject Checked sub-object (or its parent object, in case if
6749                     \a theSubObjectIndex is non-zero).
6750                 anObject An object that is checked for ownership (or its parent object,
6751                     in case if \a theObjectIndex is non-zero).
6752                 aSubObjectIndex When non-zero, specifies a sub-shape index that
6753                     identifies a sub-object within its parent specified via \a theSubObject.
6754                 anObjectIndex When non-zero, specifies a sub-shape index that
6755                     identifies an object within its parent specified via \a theObject.
6756
6757             Returns
6758                 TRUE, if the given object contains sub-object.
6759             """
6760             IsOk = self.ShapesOp.IsSubShapeBelongsTo(aSubObject, aSubObjectIndex, anObject, anObjectIndex)
6761             RaiseIfFailed("IsSubShapeBelongsTo", self.ShapesOp)
6762             return IsOk
6763
6764         ## Perform extraction of sub-shapes from the main shape.
6765         #
6766         #  @param theShape the main shape
6767         #  @param theListOfID the list of sub-shape IDs to be extracted from
6768         #         the main shape.
6769         #  @return New GEOM.GEOM_Object, containing the shape without
6770         #          extracted sub-shapes.
6771         #
6772         #  @ref swig_MakeExtraction "Example"
6773         @ManageTransactions("ShapesOp")
6774         def MakeExtraction(self, theShape, theListOfID, theName=None):
6775             """
6776             Perform extraction of sub-shapes from the main shape.
6777
6778             Parameters:
6779                 theShape the main shape
6780                 theListOfID the list of sub-shape IDs to be extracted from
6781                             the main shape.
6782
6783             Returns
6784                 New GEOM.GEOM_Object, containing the shape without
6785                 extracted sub-shapes.
6786             """
6787             # Example: see GEOM_TestAll.py
6788             (anObj, aStat) = self.ShapesOp.MakeExtraction(theShape, theListOfID)
6789             RaiseIfFailed("MakeExtraction", self.ShapesOp)
6790             self._autoPublish(anObj, theName, "Extraction")
6791             return anObj
6792
6793         # end of l4_decompose
6794         ## @}
6795
6796         ## @addtogroup l4_decompose_d
6797         ## @{
6798
6799         ## Deprecated method
6800         #  It works like SubShapeAllSortedCentres(), but wrongly
6801         #  defines centres of faces, shells and solids.
6802         @ManageTransactions("ShapesOp")
6803         def SubShapeAllSorted(self, aShape, aType, theName=None):
6804             """
6805             Deprecated method
6806             It works like geompy.SubShapeAllSortedCentres, but wrongly
6807             defines centres of faces, shells and solids.
6808             """
6809             ListObj = self.ShapesOp.MakeExplode(aShape, EnumToLong( aType ), True)
6810             RaiseIfFailed("MakeExplode", self.ShapesOp)
6811             self._autoPublish(ListObj, theName, "subshape")
6812             return ListObj
6813
6814         ## Deprecated method
6815         #  It works like SubShapeAllSortedCentresIDs(), but wrongly
6816         #  defines centres of faces, shells and solids.
6817         @ManageTransactions("ShapesOp")
6818         def SubShapeAllSortedIDs(self, aShape, aType):
6819             """
6820             Deprecated method
6821             It works like geompy.SubShapeAllSortedCentresIDs, but wrongly
6822             defines centres of faces, shells and solids.
6823             """
6824             ListIDs = self.ShapesOp.SubShapeAllIDs(aShape, EnumToLong( aType ), True)
6825             RaiseIfFailed("SubShapeAllIDs", self.ShapesOp)
6826             return ListIDs
6827
6828         ## Deprecated method
6829         #  It works like SubShapeSortedCentres(), but has a bug
6830         #  (wrongly defines centres of faces, shells and solids).
6831         def SubShapeSorted(self, aShape, aType, ListOfInd, theName=None):
6832             """
6833             Deprecated method
6834             It works like geompy.SubShapeSortedCentres, but has a bug
6835             (wrongly defines centres of faces, shells and solids).
6836             """
6837             ListOfIDs = []
6838             AllShapeIDsList = self.SubShapeAllSortedIDs(aShape, EnumToLong( aType ))
6839             for ind in ListOfInd:
6840                 ListOfIDs.append(AllShapeIDsList[ind - 1])
6841             # note: auto-publishing is done in self.GetSubShape()
6842             anObj = self.GetSubShape(aShape, ListOfIDs, theName)
6843             return anObj
6844
6845         # end of l4_decompose_d
6846         ## @}
6847
6848         ## @addtogroup l3_healing
6849         ## @{
6850
6851         ## Apply a sequence of Shape Healing operators to the given object.
6852         #  @param theShape Shape to be processed.
6853         #  @param theOperators List of names of operators ("FixShape", "SplitClosedFaces", etc.).
6854         #  @param theParameters List of names of parameters
6855         #                    ("FixShape.Tolerance3d", "SplitClosedFaces.NbSplitPoints", etc.).
6856         #  @param theValues List of values of parameters, in the same order
6857         #                    as parameters are listed in <VAR>theParameters</VAR> list.
6858         #  @param theName Object name; when specified, this parameter is used
6859         #         for result publication in the study. Otherwise, if automatic
6860         #         publication is switched on, default value is used for result name.
6861         #
6862         #  <b> Operators and Parameters: </b> \n
6863         #
6864         #  * \b FixShape - corrects invalid shapes. \n
6865         #  - \b FixShape.Tolerance3d - work tolerance for detection of the problems and correction of them. \n
6866         #  - \b FixShape.MaxTolerance3d - maximal possible tolerance of the shape after correction. \n
6867         #
6868         #  * \b FixFaceSize - removes small faces, such as spots and strips.\n
6869         #  - \b FixFaceSize.Tolerance - defines minimum possible face size. \n
6870         #  - \b DropSmallEdges - removes edges, which merge with neighbouring edges. \n
6871         #  - \b DropSmallEdges.Tolerance3d - defines minimum possible distance between two parallel edges.\n
6872         #  - \b DropSmallSolids - either removes small solids or merges them with neighboring ones. \n
6873         #  - \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
6874         #  - \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
6875         #  - \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
6876         #
6877         #  * \b SplitAngle - splits faces based on conical surfaces, surfaces of revolution and cylindrical
6878         #    surfaces in segments using a certain angle. \n
6879         #  - \b SplitAngle.Angle - the central angle of the resulting segments (i.e. we obtain two segments
6880         #    if Angle=180, four if Angle=90, etc). \n
6881         #  - \b SplitAngle.MaxTolerance - maximum possible tolerance among the resulting segments.\n
6882         #
6883         #  * \b SplitClosedFaces - splits closed faces in segments.
6884         #    The number of segments depends on the number of splitting points.\n
6885         #  - \b SplitClosedFaces.NbSplitPoints - the number of splitting points.\n
6886         #
6887         #  * \b SplitContinuity - splits shapes to reduce continuities of curves and surfaces.\n
6888         #  - \b SplitContinuity.Tolerance3d - 3D tolerance for correction of geometry.\n
6889         #  - \b SplitContinuity.SurfaceContinuity - required continuity for surfaces.\n
6890         #  - \b SplitContinuity.CurveContinuity - required continuity for curves.\n
6891         #   This and the previous parameters can take the following values:\n
6892         #   \b Parametric \b Continuity \n
6893         #   \b C0 (Positional Continuity): curves are joined (the end positions of curves or surfaces
6894         #   are coincidental. The curves or surfaces may still meet at an angle, giving rise to a sharp corner or edge).\n
6895         #   \b C1 (Tangential Continuity): first derivatives are equal (the end vectors of curves or surfaces are parallel,
6896         #    ruling out sharp edges).\n
6897         #   \b C2 (Curvature Continuity): first and second derivatives are equal (the end vectors of curves or surfaces
6898         #       are of the same magnitude).\n
6899         #   \b CN N-th derivatives are equal (both the direction and the magnitude of the Nth derivatives of curves
6900         #    or surfaces (d/du C(u)) are the same at junction. \n
6901         #   \b Geometric \b Continuity \n
6902         #   \b G1: first derivatives are proportional at junction.\n
6903         #   The curve tangents thus have the same direction, but not necessarily the same magnitude.
6904         #      i.e., C1'(1) = (a,b,c) and C2'(0) = (k*a, k*b, k*c).\n
6905         #   \b G2: first and second derivatives are proportional at junction.
6906         #   As the names imply, geometric continuity requires the geometry to be continuous, while parametric
6907         #    continuity requires that the underlying parameterization was continuous as well.
6908         #   Parametric continuity of order n implies geometric continuity of order n, but not vice-versa.\n
6909         #
6910         #  * \b BsplineRestriction - converts curves and surfaces to Bsplines and processes them with the following parameters:\n
6911         #  - \b BSplineRestriction.SurfaceMode - approximation of surfaces if restriction is necessary.\n
6912         #  - \b BSplineRestriction.Curve3dMode - conversion of any 3D curve to BSpline and approximation.\n
6913         #  - \b BSplineRestriction.Curve2dMode - conversion of any 2D curve to BSpline and approximation.\n
6914         #  - \b BSplineRestriction.Tolerance3d - defines the possibility of surfaces and 3D curves approximation
6915         #       with the specified parameters.\n
6916         #  - \b BSplineRestriction.Tolerance2d - defines the possibility of surfaces and 2D curves approximation
6917         #       with the specified parameters.\n
6918         #  - \b BSplineRestriction.RequiredDegree - required degree of the resulting BSplines.\n
6919         #  - \b BSplineRestriction.RequiredNbSegments - required maximum number of segments of resultant BSplines.\n
6920         #  - \b BSplineRestriction.Continuity3d - continuity of the resulting surfaces and 3D curves.\n
6921         #  - \b BSplineRestriction.Continuity2d - continuity of the resulting 2D curves.\n
6922         #
6923         #  * \b ToBezier - converts curves and surfaces of any type to Bezier curves and surfaces.\n
6924         #  - \b ToBezier.SurfaceMode - if checked in, allows conversion of surfaces.\n
6925         #  - \b ToBezier.Curve3dMode - if checked in, allows conversion of 3D curves.\n
6926         #  - \b ToBezier.Curve2dMode - if checked in, allows conversion of 2D curves.\n
6927         #  - \b ToBezier.MaxTolerance - defines tolerance for detection and correction of problems.\n
6928         #
6929         #  * \b SameParameter - fixes edges of 2D and 3D curves not having the same parameter.\n
6930         #  - \b SameParameter.Tolerance3d - defines tolerance for fixing of edges.\n
6931         #
6932         #
6933         #  @return New GEOM.GEOM_Object, containing processed shape.
6934         #
6935         #  \n @ref tui_shape_processing "Example"
6936         @ManageTransactions("HealOp")
6937         def ProcessShape(self, theShape, theOperators, theParameters, theValues, theName=None):
6938             """
6939             Apply a sequence of Shape Healing operators to the given object.
6940
6941             Parameters:
6942                 theShape Shape to be processed.
6943                 theValues List of values of parameters, in the same order
6944                           as parameters are listed in theParameters list.
6945                 theOperators List of names of operators ('FixShape', 'SplitClosedFaces', etc.).
6946                 theParameters List of names of parameters
6947                               ('FixShape.Tolerance3d', 'SplitClosedFaces.NbSplitPoints', etc.).
6948                 theName Object name; when specified, this parameter is used
6949                         for result publication in the study. Otherwise, if automatic
6950                         publication is switched on, default value is used for result name.
6951
6952                 Operators and Parameters:
6953
6954                  * FixShape - corrects invalid shapes.
6955                      * FixShape.Tolerance3d - work tolerance for detection of the problems and correction of them.
6956                      * FixShape.MaxTolerance3d - maximal possible tolerance of the shape after correction.
6957                  * FixFaceSize - removes small faces, such as spots and strips.
6958                      * FixFaceSize.Tolerance - defines minimum possible face size.
6959                  * DropSmallEdges - removes edges, which merge with neighbouring edges.
6960                      * DropSmallEdges.Tolerance3d - defines minimum possible distance between two parallel edges.
6961                  * DropSmallSolids - either removes small solids or merges them with neighboring ones.
6962                      * 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.
6963                      * 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.
6964                      * 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.
6965
6966                  * SplitAngle - splits faces based on conical surfaces, surfaces of revolution and cylindrical surfaces
6967                                 in segments using a certain angle.
6968                      * SplitAngle.Angle - the central angle of the resulting segments (i.e. we obtain two segments
6969                                           if Angle=180, four if Angle=90, etc).
6970                      * SplitAngle.MaxTolerance - maximum possible tolerance among the resulting segments.
6971                  * SplitClosedFaces - splits closed faces in segments. The number of segments depends on the number of
6972                                       splitting points.
6973                      * SplitClosedFaces.NbSplitPoints - the number of splitting points.
6974                  * SplitContinuity - splits shapes to reduce continuities of curves and surfaces.
6975                      * SplitContinuity.Tolerance3d - 3D tolerance for correction of geometry.
6976                      * SplitContinuity.SurfaceContinuity - required continuity for surfaces.
6977                      * SplitContinuity.CurveContinuity - required continuity for curves.
6978                        This and the previous parameters can take the following values:
6979
6980                        Parametric Continuity:
6981                        C0 (Positional Continuity): curves are joined (the end positions of curves or surfaces are
6982                                                    coincidental. The curves or surfaces may still meet at an angle,
6983                                                    giving rise to a sharp corner or edge).
6984                        C1 (Tangential Continuity): first derivatives are equal (the end vectors of curves or surfaces
6985                                                    are parallel, ruling out sharp edges).
6986                        C2 (Curvature Continuity): first and second derivatives are equal (the end vectors of curves
6987                                                   or surfaces are of the same magnitude).
6988                        CN N-th derivatives are equal (both the direction and the magnitude of the Nth derivatives of
6989                           curves or surfaces (d/du C(u)) are the same at junction.
6990
6991                        Geometric Continuity:
6992                        G1: first derivatives are proportional at junction.
6993                            The curve tangents thus have the same direction, but not necessarily the same magnitude.
6994                            i.e., C1'(1) = (a,b,c) and C2'(0) = (k*a, k*b, k*c).
6995                        G2: first and second derivatives are proportional at junction. As the names imply,
6996                            geometric continuity requires the geometry to be continuous, while parametric continuity requires
6997                            that the underlying parameterization was continuous as well. Parametric continuity of order n implies
6998                            geometric continuity of order n, but not vice-versa.
6999                  * BsplineRestriction - converts curves and surfaces to Bsplines and processes them with the following parameters:
7000                      * BSplineRestriction.SurfaceMode - approximation of surfaces if restriction is necessary.
7001                      * BSplineRestriction.Curve3dMode - conversion of any 3D curve to BSpline and approximation.
7002                      * BSplineRestriction.Curve2dMode - conversion of any 2D curve to BSpline and approximation.
7003                      * BSplineRestriction.Tolerance3d - defines the possibility of surfaces and 3D curves approximation with
7004                                                         the specified parameters.
7005                      * BSplineRestriction.Tolerance2d - defines the possibility of surfaces and 2D curves approximation with
7006                                                         the specified parameters.
7007                      * BSplineRestriction.RequiredDegree - required degree of the resulting BSplines.
7008                      * BSplineRestriction.RequiredNbSegments - required maximum number of segments of resultant BSplines.
7009                      * BSplineRestriction.Continuity3d - continuity of the resulting surfaces and 3D curves.
7010                      * BSplineRestriction.Continuity2d - continuity of the resulting 2D curves.
7011                  * ToBezier - converts curves and surfaces of any type to Bezier curves and surfaces.
7012                      * ToBezier.SurfaceMode - if checked in, allows conversion of surfaces.
7013                      * ToBezier.Curve3dMode - if checked in, allows conversion of 3D curves.
7014                      * ToBezier.Curve2dMode - if checked in, allows conversion of 2D curves.
7015                      * ToBezier.MaxTolerance - defines tolerance for detection and correction of problems.
7016                  * SameParameter - fixes edges of 2D and 3D curves not having the same parameter.
7017                      * SameParameter.Tolerance3d - defines tolerance for fixing of edges.
7018
7019             Returns:
7020                 New GEOM.GEOM_Object, containing processed shape.
7021
7022             Note: For more information look through SALOME Geometry User's Guide->
7023                   -> Introduction to Geometry-> Repairing Operations-> Shape Processing
7024             """
7025             # Example: see GEOM_TestHealing.py
7026             theValues,Parameters = ParseList(theValues)
7027             anObj = self.HealOp.ProcessShape(theShape, theOperators, theParameters, theValues)
7028             # To avoid script failure in case of good argument shape
7029             if self.HealOp.GetErrorCode() == "ShHealOper_NotError_msg":
7030                 return theShape
7031             RaiseIfFailed("ProcessShape", self.HealOp)
7032             for string in (theOperators + theParameters):
7033                 Parameters = ":" + Parameters
7034                 pass
7035             anObj.SetParameters(Parameters)
7036             self._autoPublish(anObj, theName, "healed")
7037             return anObj
7038
7039         ## Remove faces from the given object (shape).
7040         #  @param theObject Shape to be processed.
7041         #  @param theFaces Indices of faces to be removed, if EMPTY then the method
7042         #                  removes ALL faces of the given object.
7043         #  @param theName Object name; when specified, this parameter is used
7044         #         for result publication in the study. Otherwise, if automatic
7045         #         publication is switched on, default value is used for result name.
7046         #
7047         #  @return New GEOM.GEOM_Object, containing processed shape.
7048         #
7049         #  @ref tui_suppress_faces "Example"
7050         @ManageTransactions("HealOp")
7051         def SuppressFaces(self, theObject, theFaces, theName=None):
7052             """
7053             Remove faces from the given object (shape).
7054
7055             Parameters:
7056                 theObject Shape to be processed.
7057                 theFaces Indices of faces to be removed, if EMPTY then the method
7058                          removes ALL faces of the given object.
7059                 theName Object name; when specified, this parameter is used
7060                         for result publication in the study. Otherwise, if automatic
7061                         publication is switched on, default value is used for result name.
7062
7063             Returns:
7064                 New GEOM.GEOM_Object, containing processed shape.
7065             """
7066             # Example: see GEOM_TestHealing.py
7067             anObj = self.HealOp.SuppressFaces(theObject, theFaces)
7068             RaiseIfFailed("SuppressFaces", self.HealOp)
7069             self._autoPublish(anObj, theName, "suppressFaces")
7070             return anObj
7071
7072         ## Sewing of faces into a single shell.
7073         #  @param ListShape Shapes to be processed.
7074         #  @param theTolerance Required tolerance value.
7075         #  @param AllowNonManifold Flag that allows non-manifold sewing.
7076         #  @param theName Object name; when specified, this parameter is used
7077         #         for result publication in the study. Otherwise, if automatic
7078         #         publication is switched on, default value is used for result name.
7079         #
7080         #  @return New GEOM.GEOM_Object, containing a result shell.
7081         #
7082         #  @ref tui_sewing "Example"
7083         def MakeSewing(self, ListShape, theTolerance, AllowNonManifold=False, theName=None):
7084             """
7085             Sewing of faces into a single shell.
7086
7087             Parameters:
7088                 ListShape Shapes to be processed.
7089                 theTolerance Required tolerance value.
7090                 AllowNonManifold Flag that allows non-manifold sewing.
7091                 theName Object name; when specified, this parameter is used
7092                         for result publication in the study. Otherwise, if automatic
7093                         publication is switched on, default value is used for result name.
7094
7095             Returns:
7096                 New GEOM.GEOM_Object, containing containing a result shell.
7097             """
7098             # Example: see GEOM_TestHealing.py
7099             # note: auto-publishing is done in self.Sew()
7100             anObj = self.Sew(ListShape, theTolerance, AllowNonManifold, theName)
7101             return anObj
7102
7103         ## Sewing of faces into a single shell.
7104         #  @param ListShape Shapes to be processed.
7105         #  @param theTolerance Required tolerance value.
7106         #  @param AllowNonManifold Flag that allows non-manifold sewing.
7107         #  @param theName Object name; when specified, this parameter is used
7108         #         for result publication in the study. Otherwise, if automatic
7109         #         publication is switched on, default value is used for result name.
7110         #
7111         #  @return New GEOM.GEOM_Object, containing a result shell.
7112         @ManageTransactions("HealOp")
7113         def Sew(self, ListShape, theTolerance, AllowNonManifold=False, theName=None):
7114             """
7115             Sewing of faces into a single shell.
7116
7117             Parameters:
7118                 ListShape Shapes to be processed.
7119                 theTolerance Required tolerance value.
7120                 AllowNonManifold Flag that allows non-manifold sewing.
7121                 theName Object name; when specified, this parameter is used
7122                         for result publication in the study. Otherwise, if automatic
7123                         publication is switched on, default value is used for result name.
7124
7125             Returns:
7126                 New GEOM.GEOM_Object, containing a result shell.
7127             """
7128             # Example: see MakeSewing() above
7129             theTolerance,Parameters = ParseParameters(theTolerance)
7130             if AllowNonManifold:
7131                 anObj = self.HealOp.SewAllowNonManifold( ToList( ListShape ), theTolerance)
7132             else:
7133                 anObj = self.HealOp.Sew( ToList( ListShape ), theTolerance)
7134             # To avoid script failure in case of good argument shape
7135             # (Fix of test cases geom/bugs11/L7,L8)
7136             if self.HealOp.GetErrorCode() == "ShHealOper_NotError_msg":
7137                 return anObj
7138             RaiseIfFailed("Sew", self.HealOp)
7139             anObj.SetParameters(Parameters)
7140             self._autoPublish(anObj, theName, "sewed")
7141             return anObj
7142
7143         ## Rebuild the topology of theSolids by removing
7144         #  the faces that are shared by several solids.
7145         #  @param theSolids A compound or a list of solids to be processed.
7146         #  @param theName Object name; when specified, this parameter is used
7147         #         for result publication in the study. Otherwise, if automatic
7148         #         publication is switched on, default value is used for result name.
7149         #
7150         #  @return New GEOM.GEOM_Object, containing processed shape.
7151         #
7152         #  @ref tui_remove_webs "Example"
7153         @ManageTransactions("HealOp")
7154         def RemoveInternalFaces (self, theSolids, theName=None):
7155             """
7156             Rebuild the topology of theSolids by removing
7157             the faces that are shared by several solids.
7158
7159             Parameters:
7160                 theSolids A compound or a list of solids to be processed.
7161                 theName Object name; when specified, this parameter is used
7162                         for result publication in the study. Otherwise, if automatic
7163                         publication is switched on, default value is used for result name.
7164
7165             Returns:
7166                 New GEOM.GEOM_Object, containing processed shape.
7167             """
7168             # Example: see GEOM_TestHealing.py
7169             anObj = self.HealOp.RemoveInternalFaces(ToList(theSolids))
7170             RaiseIfFailed("RemoveInternalFaces", self.HealOp)
7171             self._autoPublish(anObj, theName, "removeWebs")
7172             return anObj
7173
7174         ## Remove internal wires and edges from the given object (face).
7175         #  @param theObject Shape to be processed.
7176         #  @param theWires Indices of wires to be removed, if EMPTY then the method
7177         #                  removes ALL internal wires of the given object.
7178         #  @param theName Object name; when specified, this parameter is used
7179         #         for result publication in the study. Otherwise, if automatic
7180         #         publication is switched on, default value is used for result name.
7181         #
7182         #  @return New GEOM.GEOM_Object, containing processed shape.
7183         #
7184         #  @ref tui_suppress_internal_wires "Example"
7185         @ManageTransactions("HealOp")
7186         def SuppressInternalWires(self, theObject, theWires, theName=None):
7187             """
7188             Remove internal wires and edges from the given object (face).
7189
7190             Parameters:
7191                 theObject Shape to be processed.
7192                 theWires Indices of wires to be removed, if EMPTY then the method
7193                          removes ALL internal wires of the given object.
7194                 theName Object name; when specified, this parameter is used
7195                         for result publication in the study. Otherwise, if automatic
7196                         publication is switched on, default value is used for result name.
7197
7198             Returns:
7199                 New GEOM.GEOM_Object, containing processed shape.
7200             """
7201             # Example: see GEOM_TestHealing.py
7202             anObj = self.HealOp.RemoveIntWires(theObject, theWires)
7203             RaiseIfFailed("RemoveIntWires", self.HealOp)
7204             self._autoPublish(anObj, theName, "suppressWires")
7205             return anObj
7206
7207         ## Remove internal closed contours (holes) from the given object.
7208         #  @param theObject Shape to be processed.
7209         #  @param theWires Indices of wires to be removed, if EMPTY then the method
7210         #                  removes ALL internal holes of the given object
7211         #  @param theName Object name; when specified, this parameter is used
7212         #         for result publication in the study. Otherwise, if automatic
7213         #         publication is switched on, default value is used for result name.
7214         #
7215         #  @return New GEOM.GEOM_Object, containing processed shape.
7216         #
7217         #  @ref tui_suppress_holes "Example"
7218         @ManageTransactions("HealOp")
7219         def SuppressHoles(self, theObject, theWires, theName=None):
7220             """
7221             Remove internal closed contours (holes) from the given object.
7222
7223             Parameters:
7224                 theObject Shape to be processed.
7225                 theWires Indices of wires to be removed, if EMPTY then the method
7226                          removes ALL internal holes of the given object
7227                 theName Object name; when specified, this parameter is used
7228                         for result publication in the study. Otherwise, if automatic
7229                         publication is switched on, default value is used for result name.
7230
7231             Returns:
7232                 New GEOM.GEOM_Object, containing processed shape.
7233             """
7234             # Example: see GEOM_TestHealing.py
7235             anObj = self.HealOp.FillHoles(theObject, theWires)
7236             RaiseIfFailed("FillHoles", self.HealOp)
7237             self._autoPublish(anObj, theName, "suppressHoles")
7238             return anObj
7239
7240         ## Close an open wire.
7241         #  @param theObject Shape to be processed.
7242         #  @param theWires Indexes of edge(s) and wire(s) to be closed within <VAR>theObject</VAR>'s shape,
7243         #                  if [ ], then <VAR>theObject</VAR> itself is a wire.
7244         #  @param isCommonVertex If True  : closure by creation of a common vertex,
7245         #                        If False : closure by creation of an edge between ends.
7246         #  @param theName Object name; when specified, this parameter is used
7247         #         for result publication in the study. Otherwise, if automatic
7248         #         publication is switched on, default value is used for result name.
7249         #
7250         #  @return New GEOM.GEOM_Object, containing processed shape.
7251         #
7252         #  @ref tui_close_contour "Example"
7253         @ManageTransactions("HealOp")
7254         def CloseContour(self,theObject, theWires, isCommonVertex, theName=None):
7255             """
7256             Close an open wire.
7257
7258             Parameters:
7259                 theObject Shape to be processed.
7260                 theWires Indexes of edge(s) and wire(s) to be closed within theObject's shape,
7261                          if [ ], then theObject itself is a wire.
7262                 isCommonVertex If True  : closure by creation of a common vertex,
7263                                If False : closure by creation of an edge between ends.
7264                 theName Object name; when specified, this parameter is used
7265                         for result publication in the study. Otherwise, if automatic
7266                         publication is switched on, default value is used for result name.
7267
7268             Returns:
7269                 New GEOM.GEOM_Object, containing processed shape.
7270             """
7271             # Example: see GEOM_TestHealing.py
7272             anObj = self.HealOp.CloseContour(theObject, theWires, isCommonVertex)
7273             RaiseIfFailed("CloseContour", self.HealOp)
7274             self._autoPublish(anObj, theName, "closeContour")
7275             return anObj
7276
7277         ## Addition of a point to a given edge object.
7278         #  @param theObject Shape to be processed.
7279         #  @param theEdgeIndex Index of edge to be divided within theObject's shape,
7280         #                      if -1, then theObject itself is the edge.
7281         #  @param theValue Value of parameter on edge or length parameter,
7282         #                  depending on \a isByParameter.
7283         #  @param isByParameter If TRUE : \a theValue is treated as a curve parameter [0..1], \n
7284         #                       if FALSE : \a theValue is treated as a length parameter [0..1]
7285         #  @param theName Object name; when specified, this parameter is used
7286         #         for result publication in the study. Otherwise, if automatic
7287         #         publication is switched on, default value is used for result name.
7288         #
7289         #  @return New GEOM.GEOM_Object, containing processed shape.
7290         #
7291         #  @ref tui_add_point_on_edge "Example"
7292         @ManageTransactions("HealOp")
7293         def DivideEdge(self, theObject, theEdgeIndex, theValue, isByParameter, theName=None):
7294             """
7295             Addition of a point to a given edge object.
7296
7297             Parameters:
7298                 theObject Shape to be processed.
7299                 theEdgeIndex Index of edge to be divided within theObject's shape,
7300                              if -1, then theObject itself is the edge.
7301                 theValue Value of parameter on edge or length parameter,
7302                          depending on isByParameter.
7303                 isByParameter If TRUE :  theValue is treated as a curve parameter [0..1],
7304                               if FALSE : theValue is treated as a length parameter [0..1]
7305                 theName Object name; when specified, this parameter is used
7306                         for result publication in the study. Otherwise, if automatic
7307                         publication is switched on, default value is used for result name.
7308
7309             Returns:
7310                 New GEOM.GEOM_Object, containing processed shape.
7311             """
7312             # Example: see GEOM_TestHealing.py
7313             theEdgeIndex,theValue,isByParameter,Parameters = ParseParameters(theEdgeIndex,theValue,isByParameter)
7314             anObj = self.HealOp.DivideEdge(theObject, theEdgeIndex, theValue, isByParameter)
7315             RaiseIfFailed("DivideEdge", self.HealOp)
7316             anObj.SetParameters(Parameters)
7317             self._autoPublish(anObj, theName, "divideEdge")
7318             return anObj
7319
7320         ## Addition of points to a given edge of \a theObject by projecting
7321         #  other points to the given edge.
7322         #  @param theObject Shape to be processed.
7323         #  @param theEdgeIndex Index of edge to be divided within theObject's shape,
7324         #                      if -1, then theObject itself is the edge.
7325         #  @param thePoints List of points to project to theEdgeIndex-th edge.
7326         #  @param theName Object name; when specified, this parameter is used
7327         #         for result publication in the study. Otherwise, if automatic
7328         #         publication is switched on, default value is used for result name.
7329         #
7330         #  @return New GEOM.GEOM_Object, containing processed shape.
7331         #
7332         #  @ref tui_add_point_on_edge "Example"
7333         @ManageTransactions("HealOp")
7334         def DivideEdgeByPoint(self, theObject, theEdgeIndex, thePoints, theName=None):
7335             """
7336             Addition of points to a given edge of \a theObject by projecting
7337             other points to the given edge.
7338
7339             Parameters:
7340                 theObject Shape to be processed.
7341                 theEdgeIndex The edge or its index to be divided within theObject's shape,
7342                              if -1, then theObject itself is the edge.
7343                 thePoints List of points to project to theEdgeIndex-th edge.
7344                 theName Object name; when specified, this parameter is used
7345                         for result publication in the study. Otherwise, if automatic
7346                         publication is switched on, default value is used for result name.
7347
7348             Returns:
7349                 New GEOM.GEOM_Object, containing processed shape.
7350             """
7351             # Example: see GEOM_TestHealing.py
7352             if isinstance( theEdgeIndex, GEOM._objref_GEOM_Object ):
7353                 theEdgeIndex = self.GetSubShapeID( theObject, theEdgeIndex )
7354             anObj = self.HealOp.DivideEdgeByPoint(theObject, theEdgeIndex, ToList( thePoints ))
7355             RaiseIfFailed("DivideEdgeByPoint", self.HealOp)
7356             self._autoPublish(anObj, theName, "divideEdge")
7357             return anObj
7358
7359         ## Suppress the vertices in the wire in case if adjacent edges are C1 continuous.
7360         #  @param theWire Wire to minimize the number of C1 continuous edges in.
7361         #  @param theVertices A list of vertices to suppress. If the list
7362         #                     is empty, all vertices in a wire will be assumed.
7363         #  @param theName Object name; when specified, this parameter is used
7364         #         for result publication in the study. Otherwise, if automatic
7365         #         publication is switched on, default value is used for result name.
7366         #
7367         #  @return New GEOM.GEOM_Object with modified wire.
7368         #
7369         #  @ref tui_fuse_collinear_edges "Example"
7370         @ManageTransactions("HealOp")
7371         def FuseCollinearEdgesWithinWire(self, theWire, theVertices = [], theName=None):
7372             """
7373             Suppress the vertices in the wire in case if adjacent edges are C1 continuous.
7374
7375             Parameters:
7376                 theWire Wire to minimize the number of C1 continuous edges in.
7377                 theVertices A list of vertices to suppress. If the list
7378                             is empty, all vertices in a wire will be assumed.
7379                 theName Object name; when specified, this parameter is used
7380                         for result publication in the study. Otherwise, if automatic
7381                         publication is switched on, default value is used for result name.
7382
7383             Returns:
7384                 New GEOM.GEOM_Object with modified wire.
7385             """
7386             anObj = self.HealOp.FuseCollinearEdgesWithinWire(theWire, theVertices)
7387             RaiseIfFailed("FuseCollinearEdgesWithinWire", self.HealOp)
7388             self._autoPublish(anObj, theName, "fuseEdges")
7389             return anObj
7390
7391         ## Change orientation of the given object. Updates given shape.
7392         #  @param theObject Shape to be processed.
7393         #  @return Updated <var>theObject</var>
7394         #
7395         #  @ref swig_todo "Example"
7396         @ManageTransactions("HealOp")
7397         def ChangeOrientationShell(self,theObject):
7398             """
7399             Change orientation of the given object. Updates given shape.
7400
7401             Parameters:
7402                 theObject Shape to be processed.
7403
7404             Returns:
7405                 Updated theObject
7406             """
7407             theObject = self.HealOp.ChangeOrientation(theObject)
7408             RaiseIfFailed("ChangeOrientation", self.HealOp)
7409             pass
7410
7411         ## Change orientation of the given object.
7412         #  @param theObject Shape to be processed.
7413         #  @param theName Object name; when specified, this parameter is used
7414         #         for result publication in the study. Otherwise, if automatic
7415         #         publication is switched on, default value is used for result name.
7416         #
7417         #  @return New GEOM.GEOM_Object, containing processed shape.
7418         #
7419         #  @ref swig_todo "Example"
7420         @ManageTransactions("HealOp")
7421         def ChangeOrientationShellCopy(self, theObject, theName=None):
7422             """
7423             Change orientation of the given object.
7424
7425             Parameters:
7426                 theObject Shape to be processed.
7427                 theName Object name; when specified, this parameter is used
7428                         for result publication in the study. Otherwise, if automatic
7429                         publication is switched on, default value is used for result name.
7430
7431             Returns:
7432                 New GEOM.GEOM_Object, containing processed shape.
7433             """
7434             anObj = self.HealOp.ChangeOrientationCopy(theObject)
7435             RaiseIfFailed("ChangeOrientationCopy", self.HealOp)
7436             self._autoPublish(anObj, theName, "reversed")
7437             return anObj
7438
7439         ## Try to limit tolerance of the given object by value \a theTolerance.
7440         #  @param theObject Shape to be processed.
7441         #  @param theTolerance Required tolerance value.
7442         #  @param theName Object name; when specified, this parameter is used
7443         #         for result publication in the study. Otherwise, if automatic
7444         #         publication is switched on, default value is used for result name.
7445         #
7446         #  @return New GEOM.GEOM_Object, containing processed shape.
7447         #
7448         #  @ref tui_limit_tolerance "Example"
7449         @ManageTransactions("HealOp")
7450         def LimitTolerance(self, theObject, theTolerance = 1e-07, theName=None):
7451             """
7452             Try to limit tolerance of the given object by value theTolerance.
7453
7454             Parameters:
7455                 theObject Shape to be processed.
7456                 theTolerance Required tolerance value.
7457                 theName Object name; when specified, this parameter is used
7458                         for result publication in the study. Otherwise, if automatic
7459                         publication is switched on, default value is used for result name.
7460
7461             Returns:
7462                 New GEOM.GEOM_Object, containing processed shape.
7463             """
7464             anObj = self.HealOp.LimitTolerance(theObject, theTolerance)
7465             RaiseIfFailed("LimitTolerance", self.HealOp)
7466             self._autoPublish(anObj, theName, "limitTolerance")
7467             return anObj
7468
7469         ## Get a list of wires (wrapped in GEOM.GEOM_Object-s),
7470         #  that constitute a free boundary of the given shape.
7471         #  @param theObject Shape to get free boundary of.
7472         #  @param theName Object name; when specified, this parameter is used
7473         #         for result publication in the study. Otherwise, if automatic
7474         #         publication is switched on, default value is used for result name.
7475         #
7476         #  @return [\a status, \a theClosedWires, \a theOpenWires]
7477         #  \n \a status: FALSE, if an error(s) occurred during the method execution.
7478         #  \n \a theClosedWires: Closed wires on the free boundary of the given shape.
7479         #  \n \a theOpenWires: Open wires on the free boundary of the given shape.
7480         #
7481         #  @ref tui_free_boundaries_page "Example"
7482         @ManageTransactions("HealOp")
7483         def GetFreeBoundary(self, theObject, theName=None):
7484             """
7485             Get a list of wires (wrapped in GEOM.GEOM_Object-s),
7486             that constitute a free boundary of the given shape.
7487
7488             Parameters:
7489                 theObject Shape to get free boundary of.
7490                 theName Object name; when specified, this parameter is used
7491                         for result publication in the study. Otherwise, if automatic
7492                         publication is switched on, default value is used for result name.
7493
7494             Returns:
7495                 [status, theClosedWires, theOpenWires]
7496                  status: FALSE, if an error(s) occurred during the method execution.
7497                  theClosedWires: Closed wires on the free boundary of the given shape.
7498                  theOpenWires: Open wires on the free boundary of the given shape.
7499             """
7500             # Example: see GEOM_TestHealing.py
7501             anObj = self.HealOp.GetFreeBoundary( ToList( theObject ))
7502             RaiseIfFailed("GetFreeBoundary", self.HealOp)
7503             self._autoPublish(anObj[1], theName, "closedWire")
7504             self._autoPublish(anObj[2], theName, "openWire")
7505             return anObj
7506
7507         ## Replace coincident faces in \a theShapes by one face.
7508         #  @param theShapes Initial shapes, either a list or compound of shapes.
7509         #  @param theTolerance Maximum distance between faces, which can be considered as coincident.
7510         #  @param doKeepNonSolids If FALSE, only solids will present in the result,
7511         #                         otherwise all initial shapes.
7512         #  @param theName Object name; when specified, this parameter is used
7513         #         for result publication in the study. Otherwise, if automatic
7514         #         publication is switched on, default value is used for result name.
7515         #
7516         #  @return New GEOM.GEOM_Object, containing copies of theShapes without coincident faces.
7517         #
7518         #  @ref tui_glue_faces "Example"
7519         @ManageTransactions("ShapesOp")
7520         def MakeGlueFaces(self, theShapes, theTolerance, doKeepNonSolids=True, theName=None):
7521             """
7522             Replace coincident faces in theShapes by one face.
7523
7524             Parameters:
7525                 theShapes Initial shapes, either a list or compound of shapes.
7526                 theTolerance Maximum distance between faces, which can be considered as coincident.
7527                 doKeepNonSolids If FALSE, only solids will present in the result,
7528                                 otherwise all initial shapes.
7529                 theName Object name; when specified, this parameter is used
7530                         for result publication in the study. Otherwise, if automatic
7531                         publication is switched on, default value is used for result name.
7532
7533             Returns:
7534                 New GEOM.GEOM_Object, containing copies of theShapes without coincident faces.
7535             """
7536             # Example: see GEOM_Spanner.py
7537             theTolerance,Parameters = ParseParameters(theTolerance)
7538             anObj = self.ShapesOp.MakeGlueFaces(ToList(theShapes), theTolerance, doKeepNonSolids)
7539             if anObj is None:
7540                 raise RuntimeError("MakeGlueFaces : " + self.ShapesOp.GetErrorCode())
7541             anObj.SetParameters(Parameters)
7542             self._autoPublish(anObj, theName, "glueFaces")
7543             return anObj
7544
7545         ## Find coincident faces in \a theShapes for possible gluing.
7546         #  @param theShapes Initial shapes, either a list or compound of shapes.
7547         #  @param theTolerance Maximum distance between faces,
7548         #                      which can be considered as coincident.
7549         #  @param theName Object name; when specified, this parameter is used
7550         #         for result publication in the study. Otherwise, if automatic
7551         #         publication is switched on, default value is used for result name.
7552         #
7553         #  @return GEOM.ListOfGO
7554         #
7555         #  @ref tui_glue_faces "Example"
7556         @ManageTransactions("ShapesOp")
7557         def GetGlueFaces(self, theShapes, theTolerance, theName=None):
7558             """
7559             Find coincident faces in theShapes for possible gluing.
7560
7561             Parameters:
7562                 theShapes Initial shapes, either a list or compound of shapes.
7563                 theTolerance Maximum distance between faces,
7564                              which can be considered as coincident.
7565                 theName Object name; when specified, this parameter is used
7566                         for result publication in the study. Otherwise, if automatic
7567                         publication is switched on, default value is used for result name.
7568
7569             Returns:
7570                 GEOM.ListOfGO
7571             """
7572             anObj = self.ShapesOp.GetGlueFaces(ToList(theShapes), theTolerance)
7573             RaiseIfFailed("GetGlueFaces", self.ShapesOp)
7574             self._autoPublish(anObj, theName, "facesToGlue")
7575             return anObj
7576
7577         ## Replace coincident faces in \a theShapes by one face
7578         #  in compliance with given list of faces
7579         #  @param theShapes Initial shapes, either a list or compound of shapes.
7580         #  @param theTolerance Maximum distance between faces,
7581         #                      which can be considered as coincident.
7582         #  @param theFaces List of faces for gluing.
7583         #  @param doKeepNonSolids If FALSE, only solids will present in the result,
7584         #                         otherwise all initial shapes.
7585         #  @param doGlueAllEdges If TRUE, all coincident edges of <VAR>theShape</VAR>
7586         #                        will be glued, otherwise only the edges,
7587         #                        belonging to <VAR>theFaces</VAR>.
7588         #  @param theName Object name; when specified, this parameter is used
7589         #         for result publication in the study. Otherwise, if automatic
7590         #         publication is switched on, default value is used for result name.
7591         #
7592         #  @return New GEOM.GEOM_Object, containing copies of theShapes without coincident faces.
7593         #
7594         #  @ref tui_glue_faces "Example"
7595         @ManageTransactions("ShapesOp")
7596         def MakeGlueFacesByList(self, theShapes, theTolerance, theFaces,
7597                                 doKeepNonSolids=True, doGlueAllEdges=True, theName=None):
7598             """
7599             Replace coincident faces in theShapes by one face
7600             in compliance with given list of faces
7601
7602             Parameters:
7603                 theShapes theShapes Initial shapes, either a list or compound of shapes.
7604                 theTolerance Maximum distance between faces,
7605                              which can be considered as coincident.
7606                 theFaces List of faces for gluing.
7607                 doKeepNonSolids If FALSE, only solids will present in the result,
7608                                 otherwise all initial shapes.
7609                 doGlueAllEdges If TRUE, all coincident edges of theShape
7610                                will be glued, otherwise only the edges,
7611                                belonging to theFaces.
7612                 theName Object name; when specified, this parameter is used
7613                         for result publication in the study. Otherwise, if automatic
7614                         publication is switched on, default value is used for result name.
7615
7616             Returns:
7617                 New GEOM.GEOM_Object, containing copies of theShapes without coincident faces.
7618             """
7619             anObj = self.ShapesOp.MakeGlueFacesByList(ToList(theShapes), theTolerance, ToList(theFaces),
7620                                                       doKeepNonSolids, doGlueAllEdges)
7621             if anObj is None:
7622                 raise RuntimeError("MakeGlueFacesByList : " + self.ShapesOp.GetErrorCode())
7623             self._autoPublish(anObj, theName, "glueFaces")
7624             return anObj
7625
7626         ## Replace coincident edges in \a theShapes by one edge.
7627         #  @param theShapes Initial shapes, either a list or compound of shapes.
7628         #  @param theTolerance Maximum distance between edges, which can be considered as coincident.
7629         #  @param theName Object name; when specified, this parameter is used
7630         #         for result publication in the study. Otherwise, if automatic
7631         #         publication is switched on, default value is used for result name.
7632         #
7633         #  @return New GEOM.GEOM_Object, containing copies of theShapes without coincident edges.
7634         #
7635         #  @ref tui_glue_edges "Example"
7636         @ManageTransactions("ShapesOp")
7637         def MakeGlueEdges(self, theShapes, theTolerance, theName=None):
7638             """
7639             Replace coincident edges in theShapes by one edge.
7640
7641             Parameters:
7642                 theShapes Initial shapes, either a list or compound of shapes.
7643                 theTolerance Maximum distance between edges, which can be considered as coincident.
7644                 theName Object name; when specified, this parameter is used
7645                         for result publication in the study. Otherwise, if automatic
7646                         publication is switched on, default value is used for result name.
7647
7648             Returns:
7649                 New GEOM.GEOM_Object, containing copies of theShapes without coincident edges.
7650             """
7651             theTolerance,Parameters = ParseParameters(theTolerance)
7652             anObj = self.ShapesOp.MakeGlueEdges(ToList(theShapes), theTolerance)
7653             if anObj is None:
7654                 raise RuntimeError("MakeGlueEdges : " + self.ShapesOp.GetErrorCode())
7655             anObj.SetParameters(Parameters)
7656             self._autoPublish(anObj, theName, "glueEdges")
7657             return anObj
7658
7659         ## Find coincident edges in \a theShapes for possible gluing.
7660         #  @param theShapes Initial shapes, either a list or compound of shapes.
7661         #  @param theTolerance Maximum distance between edges,
7662         #                      which can be considered as coincident.
7663         #  @param theName Object name; when specified, this parameter is used
7664         #         for result publication in the study. Otherwise, if automatic
7665         #         publication is switched on, default value is used for result name.
7666         #
7667         #  @return GEOM.ListOfGO
7668         #
7669         #  @ref tui_glue_edges "Example"
7670         @ManageTransactions("ShapesOp")
7671         def GetGlueEdges(self, theShapes, theTolerance, theName=None):
7672             """
7673             Find coincident edges in theShapes for possible gluing.
7674
7675             Parameters:
7676                 theShapes Initial shapes, either a list or compound of shapes.
7677                 theTolerance Maximum distance between edges,
7678                              which can be considered as coincident.
7679                 theName Object name; when specified, this parameter is used
7680                         for result publication in the study. Otherwise, if automatic
7681                         publication is switched on, default value is used for result name.
7682
7683             Returns:
7684                 GEOM.ListOfGO
7685             """
7686             anObj = self.ShapesOp.GetGlueEdges(ToList(theShapes), theTolerance)
7687             RaiseIfFailed("GetGlueEdges", self.ShapesOp)
7688             self._autoPublish(anObj, theName, "edgesToGlue")
7689             return anObj
7690
7691         ## Replace coincident edges in theShapes by one edge
7692         #  in compliance with given list of edges.
7693         #  @param theShapes Initial shapes, either a list or compound of shapes.
7694         #  @param theTolerance Maximum distance between edges,
7695         #                      which can be considered as coincident.
7696         #  @param theEdges List of edges for gluing.
7697         #  @param theName Object name; when specified, this parameter is used
7698         #         for result publication in the study. Otherwise, if automatic
7699         #         publication is switched on, default value is used for result name.
7700         #
7701         #  @return New GEOM.GEOM_Object, containing copies of theShapes without coincident edges.
7702         #
7703         #  @ref tui_glue_edges "Example"
7704         @ManageTransactions("ShapesOp")
7705         def MakeGlueEdgesByList(self, theShapes, theTolerance, theEdges, theName=None):
7706             """
7707             Replace coincident edges in theShapes by one edge
7708             in compliance with given list of edges.
7709
7710             Parameters:
7711                 theShapes Initial shapes, either a list or compound of shapes.
7712                 theTolerance Maximum distance between edges,
7713                              which can be considered as coincident.
7714                 theEdges List of edges for gluing.
7715                 theName Object name; when specified, this parameter is used
7716                         for result publication in the study. Otherwise, if automatic
7717                         publication is switched on, default value is used for result name.
7718
7719             Returns:
7720                 New GEOM.GEOM_Object, containing copies of theShapes without coincident edges.
7721             """
7722             anObj = self.ShapesOp.MakeGlueEdgesByList(ToList(theShapes), theTolerance, theEdges)
7723             if anObj is None:
7724                 raise RuntimeError("MakeGlueEdgesByList : " + self.ShapesOp.GetErrorCode())
7725             self._autoPublish(anObj, theName, "glueEdges")
7726             return anObj
7727
7728         # end of l3_healing
7729         ## @}
7730
7731         ## @addtogroup l3_boolean Boolean Operations
7732         ## @{
7733
7734         # -----------------------------------------------------------------------------
7735         # Boolean (Common, Cut, Fuse, Section)
7736         # -----------------------------------------------------------------------------
7737
7738         ## Perform one of boolean operations on two given shapes.
7739         #  @param theShape1 First argument for boolean operation.
7740         #  @param theShape2 Second argument for boolean operation.
7741         #  @param theOperation Indicates the operation to be done:\n
7742         #                      1 - Common, 2 - Cut, 3 - Fuse, 4 - Section.
7743         #  @param checkSelfInte The flag that tells if the arguments should
7744         #         be checked for self-intersection prior to the operation.
7745         #  @param theName Object name; when specified, this parameter is used
7746         #         for result publication in the study. Otherwise, if automatic
7747         #         publication is switched on, default value is used for result name.
7748         #
7749         #  @note This algorithm doesn't find all types of self-intersections.
7750         #        It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7751         #        vertex/face and edge/face intersections. Face/face
7752         #        intersections detection is switched off as it is a
7753         #        time-consuming operation that gives an impact on performance.
7754         #        To find all self-intersections please use
7755         #        CheckSelfIntersections() method.
7756         #
7757         #  @return New GEOM.GEOM_Object, containing the result shape.
7758         #
7759         #  @ref tui_fuse "Example"
7760         @ManageTransactions("BoolOp")
7761         def MakeBoolean(self, theShape1, theShape2, theOperation, checkSelfInte=False, theName=None):
7762             """
7763             Perform one of boolean operations on two given shapes.
7764
7765             Parameters:
7766                 theShape1 First argument for boolean operation.
7767                 theShape2 Second argument for boolean operation.
7768                 theOperation Indicates the operation to be done:
7769                              1 - Common, 2 - Cut, 3 - Fuse, 4 - Section.
7770                 checkSelfInte The flag that tells if the arguments should
7771                               be checked for self-intersection prior to
7772                               the operation.
7773                 theName Object name; when specified, this parameter is used
7774                         for result publication in the study. Otherwise, if automatic
7775                         publication is switched on, default value is used for result name.
7776
7777             Note:
7778                     This algorithm doesn't find all types of self-intersections.
7779                     It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7780                     vertex/face and edge/face intersections. Face/face
7781                     intersections detection is switched off as it is a
7782                     time-consuming operation that gives an impact on performance.
7783                     To find all self-intersections please use
7784                     CheckSelfIntersections() method.
7785
7786             Returns:
7787                 New GEOM.GEOM_Object, containing the result shape.
7788             """
7789             # Example: see GEOM_TestAll.py
7790             anObj = self.BoolOp.MakeBoolean(theShape1, theShape2, theOperation, checkSelfInte)
7791             RaiseIfFailed("MakeBoolean", self.BoolOp)
7792             def_names = { 1: "common", 2: "cut", 3: "fuse", 4: "section" }
7793             self._autoPublish(anObj, theName, def_names[theOperation])
7794             return anObj
7795
7796         ## Perform Common boolean operation on two given shapes.
7797         #  @param theShape1 First argument for boolean operation.
7798         #  @param theShape2 Second argument for boolean operation.
7799         #  @param checkSelfInte The flag that tells if the arguments should
7800         #         be checked for self-intersection prior to the operation.
7801         #  @param theName Object name; when specified, this parameter is used
7802         #         for result publication in the study. Otherwise, if automatic
7803         #         publication is switched on, default value is used for result name.
7804         #
7805         #  @note This algorithm doesn't find all types of self-intersections.
7806         #        It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7807         #        vertex/face and edge/face intersections. Face/face
7808         #        intersections detection is switched off as it is a
7809         #        time-consuming operation that gives an impact on performance.
7810         #        To find all self-intersections please use
7811         #        CheckSelfIntersections() method.
7812         #
7813         #  @return New GEOM.GEOM_Object, containing the result shape.
7814         #
7815         #  @ref tui_common "Example 1"
7816         #  \n @ref swig_MakeCommon "Example 2"
7817         def MakeCommon(self, theShape1, theShape2, checkSelfInte=False, theName=None):
7818             """
7819             Perform Common boolean operation on two given shapes.
7820
7821             Parameters:
7822                 theShape1 First argument for boolean operation.
7823                 theShape2 Second argument for boolean operation.
7824                 checkSelfInte The flag that tells if the arguments should
7825                               be checked for self-intersection prior to
7826                               the operation.
7827                 theName Object name; when specified, this parameter is used
7828                         for result publication in the study. Otherwise, if automatic
7829                         publication is switched on, default value is used for result name.
7830
7831             Note:
7832                     This algorithm doesn't find all types of self-intersections.
7833                     It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7834                     vertex/face and edge/face intersections. Face/face
7835                     intersections detection is switched off as it is a
7836                     time-consuming operation that gives an impact on performance.
7837                     To find all self-intersections please use
7838                     CheckSelfIntersections() method.
7839
7840             Returns:
7841                 New GEOM.GEOM_Object, containing the result shape.
7842             """
7843             # Example: see GEOM_TestOthers.py
7844             # note: auto-publishing is done in self.MakeBoolean()
7845             return self.MakeBoolean(theShape1, theShape2, 1, checkSelfInte, theName)
7846
7847         ## Perform Cut boolean operation on two given shapes.
7848         #  @param theShape1 First argument for boolean operation.
7849         #  @param theShape2 Second argument for boolean operation.
7850         #  @param checkSelfInte The flag that tells if the arguments should
7851         #         be checked for self-intersection prior to the operation.
7852         #  @param theName Object name; when specified, this parameter is used
7853         #         for result publication in the study. Otherwise, if automatic
7854         #         publication is switched on, default value is used for result name.
7855         #
7856         #  @note This algorithm doesn't find all types of self-intersections.
7857         #        It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7858         #        vertex/face and edge/face intersections. Face/face
7859         #        intersections detection is switched off as it is a
7860         #        time-consuming operation that gives an impact on performance.
7861         #        To find all self-intersections please use
7862         #        CheckSelfIntersections() method.
7863         #
7864         #  @return New GEOM.GEOM_Object, containing the result shape.
7865         #
7866         #  @ref tui_cut "Example 1"
7867         #  \n @ref swig_MakeCommon "Example 2"
7868         def MakeCut(self, theShape1, theShape2, checkSelfInte=False, theName=None):
7869             """
7870             Perform Cut boolean operation on two given shapes.
7871
7872             Parameters:
7873                 theShape1 First argument for boolean operation.
7874                 theShape2 Second argument for boolean operation.
7875                 checkSelfInte The flag that tells if the arguments should
7876                               be checked for self-intersection prior to
7877                               the operation.
7878                 theName Object name; when specified, this parameter is used
7879                         for result publication in the study. Otherwise, if automatic
7880                         publication is switched on, default value is used for result name.
7881
7882             Note:
7883                     This algorithm doesn't find all types of self-intersections.
7884                     It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7885                     vertex/face and edge/face intersections. Face/face
7886                     intersections detection is switched off as it is a
7887                     time-consuming operation that gives an impact on performance.
7888                     To find all self-intersections please use
7889                     CheckSelfIntersections() method.
7890
7891             Returns:
7892                 New GEOM.GEOM_Object, containing the result shape.
7893
7894             """
7895             # Example: see GEOM_TestOthers.py
7896             # note: auto-publishing is done in self.MakeBoolean()
7897             return self.MakeBoolean(theShape1, theShape2, 2, checkSelfInte, theName)
7898
7899         ## Perform Fuse boolean operation on two given shapes.
7900         #  @param theShape1 First argument for boolean operation.
7901         #  @param theShape2 Second argument for boolean operation.
7902         #  @param checkSelfInte The flag that tells if the arguments should
7903         #         be checked for self-intersection prior to the operation.
7904         #  @param rmExtraEdges The flag that tells if Remove Extra Edges
7905         #         operation should be performed during the operation.
7906         #  @param theName Object name; when specified, this parameter is used
7907         #         for result publication in the study. Otherwise, if automatic
7908         #         publication is switched on, default value is used for result name.
7909         #
7910         #  @note This algorithm doesn't find all types of self-intersections.
7911         #        It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7912         #        vertex/face and edge/face intersections. Face/face
7913         #        intersections detection is switched off as it is a
7914         #        time-consuming operation that gives an impact on performance.
7915         #        To find all self-intersections please use
7916         #        CheckSelfIntersections() method.
7917         #
7918         #  @return New GEOM.GEOM_Object, containing the result shape.
7919         #
7920         #  @ref tui_fuse "Example 1"
7921         #  \n @ref swig_MakeCommon "Example 2"
7922         @ManageTransactions("BoolOp")
7923         def MakeFuse(self, theShape1, theShape2, checkSelfInte=False,
7924                      rmExtraEdges=False, theName=None):
7925             """
7926             Perform Fuse boolean operation on two given shapes.
7927
7928             Parameters:
7929                 theShape1 First argument for boolean operation.
7930                 theShape2 Second argument for boolean operation.
7931                 checkSelfInte The flag that tells if the arguments should
7932                               be checked for self-intersection prior to
7933                               the operation.
7934                 rmExtraEdges The flag that tells if Remove Extra Edges
7935                              operation should be performed during the operation.
7936                 theName Object name; when specified, this parameter is used
7937                         for result publication in the study. Otherwise, if automatic
7938                         publication is switched on, default value is used for result name.
7939
7940             Note:
7941                     This algorithm doesn't find all types of self-intersections.
7942                     It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7943                     vertex/face and edge/face intersections. Face/face
7944                     intersections detection is switched off as it is a
7945                     time-consuming operation that gives an impact on performance.
7946                     To find all self-intersections please use
7947                     CheckSelfIntersections() method.
7948
7949             Returns:
7950                 New GEOM.GEOM_Object, containing the result shape.
7951
7952             """
7953             # Example: see GEOM_TestOthers.py
7954             anObj = self.BoolOp.MakeFuse(theShape1, theShape2,
7955                                          checkSelfInte, rmExtraEdges)
7956             RaiseIfFailed("MakeFuse", self.BoolOp)
7957             self._autoPublish(anObj, theName, "fuse")
7958             return anObj
7959
7960         ## Perform Section boolean operation on two given shapes.
7961         #  @param theShape1 First argument for boolean operation.
7962         #  @param theShape2 Second argument for boolean operation.
7963         #  @param checkSelfInte The flag that tells if the arguments should
7964         #         be checked for self-intersection prior to the operation.
7965         #         If a self-intersection detected the operation fails.
7966         #  @param theName Object name; when specified, this parameter is used
7967         #         for result publication in the study. Otherwise, if automatic
7968         #         publication is switched on, default value is used for result name.
7969         #  @return New GEOM.GEOM_Object, containing the result shape.
7970         #
7971         #  @ref tui_section "Example 1"
7972         #  \n @ref swig_MakeCommon "Example 2"
7973         def MakeSection(self, theShape1, theShape2, checkSelfInte=False, theName=None):
7974             """
7975             Perform Section boolean operation on two given shapes.
7976
7977             Parameters:
7978                 theShape1 First argument for boolean operation.
7979                 theShape2 Second argument for boolean operation.
7980                 checkSelfInte The flag that tells if the arguments should
7981                               be checked for self-intersection prior to the operation.
7982                               If a self-intersection detected the operation fails.
7983                 theName Object name; when specified, this parameter is used
7984                         for result publication in the study. Otherwise, if automatic
7985                         publication is switched on, default value is used for result name.
7986             Returns:
7987                 New GEOM.GEOM_Object, containing the result shape.
7988
7989             """
7990             # Example: see GEOM_TestOthers.py
7991             # note: auto-publishing is done in self.MakeBoolean()
7992             return self.MakeBoolean(theShape1, theShape2, 4, checkSelfInte, theName)
7993
7994         ## Perform Fuse boolean operation on the list of shapes.
7995         #  @param theShapesList Shapes to be fused.
7996         #  @param checkSelfInte The flag that tells if the arguments should
7997         #         be checked for self-intersection prior to the operation.
7998         #  @param rmExtraEdges The flag that tells if Remove Extra Edges
7999         #         operation should be performed during the operation.
8000         #  @param theName Object name; when specified, this parameter is used
8001         #         for result publication in the study. Otherwise, if automatic
8002         #         publication is switched on, default value is used for result name.
8003         #
8004         #  @note This algorithm doesn't find all types of self-intersections.
8005         #        It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
8006         #        vertex/face and edge/face intersections. Face/face
8007         #        intersections detection is switched off as it is a
8008         #        time-consuming operation that gives an impact on performance.
8009         #        To find all self-intersections please use
8010         #        CheckSelfIntersections() method.
8011         #
8012         #  @return New GEOM.GEOM_Object, containing the result shape.
8013         #
8014         #  @ref tui_fuse "Example 1"
8015         #  \n @ref swig_MakeCommon "Example 2"
8016         @ManageTransactions("BoolOp")
8017         def MakeFuseList(self, theShapesList, checkSelfInte=False,
8018                          rmExtraEdges=False, theName=None):
8019             """
8020             Perform Fuse boolean operation on the list of shapes.
8021
8022             Parameters:
8023                 theShapesList Shapes to be fused.
8024                 checkSelfInte The flag that tells if the arguments should
8025                               be checked for self-intersection prior to
8026                               the operation.
8027                 rmExtraEdges The flag that tells if Remove Extra Edges
8028                              operation should be performed during the operation.
8029                 theName Object name; when specified, this parameter is used
8030                         for result publication in the study. Otherwise, if automatic
8031                         publication is switched on, default value is used for result name.
8032
8033             Note:
8034                     This algorithm doesn't find all types of self-intersections.
8035                     It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
8036                     vertex/face and edge/face intersections. Face/face
8037                     intersections detection is switched off as it is a
8038                     time-consuming operation that gives an impact on performance.
8039                     To find all self-intersections please use
8040                     CheckSelfIntersections() method.
8041
8042             Returns:
8043                 New GEOM.GEOM_Object, containing the result shape.
8044
8045             """
8046             # Example: see GEOM_TestOthers.py
8047             anObj = self.BoolOp.MakeFuseList(theShapesList, checkSelfInte,
8048                                              rmExtraEdges)
8049             RaiseIfFailed("MakeFuseList", self.BoolOp)
8050             self._autoPublish(anObj, theName, "fuse")
8051             return anObj
8052
8053         ## Perform Common boolean operation on the list of shapes.
8054         #  @param theShapesList Shapes for Common operation.
8055         #  @param checkSelfInte The flag that tells if the arguments should
8056         #         be checked for self-intersection prior to the operation.
8057         #  @param theName Object name; when specified, this parameter is used
8058         #         for result publication in the study. Otherwise, if automatic
8059         #         publication is switched on, default value is used for result name.
8060         #
8061         #  @note This algorithm doesn't find all types of self-intersections.
8062         #        It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
8063         #        vertex/face and edge/face intersections. Face/face
8064         #        intersections detection is switched off as it is a
8065         #        time-consuming operation that gives an impact on performance.
8066         #        To find all self-intersections please use
8067         #        CheckSelfIntersections() method.
8068         #
8069         #  @return New GEOM.GEOM_Object, containing the result shape.
8070         #
8071         #  @ref tui_common "Example 1"
8072         #  \n @ref swig_MakeCommon "Example 2"
8073         @ManageTransactions("BoolOp")
8074         def MakeCommonList(self, theShapesList, checkSelfInte=False, theName=None):
8075             """
8076             Perform Common boolean operation on the list of shapes.
8077
8078             Parameters:
8079                 theShapesList Shapes for Common operation.
8080                 checkSelfInte The flag that tells if the arguments should
8081                               be checked for self-intersection prior to
8082                               the operation.
8083                 theName Object name; when specified, this parameter is used
8084                         for result publication in the study. Otherwise, if automatic
8085                         publication is switched on, default value is used for result name.
8086
8087             Note:
8088                     This algorithm doesn't find all types of self-intersections.
8089                     It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
8090                     vertex/face and edge/face intersections. Face/face
8091                     intersections detection is switched off as it is a
8092                     time-consuming operation that gives an impact on performance.
8093                     To find all self-intersections please use
8094                     CheckSelfIntersections() method.
8095
8096             Returns:
8097                 New GEOM.GEOM_Object, containing the result shape.
8098
8099             """
8100             # Example: see GEOM_TestOthers.py
8101             anObj = self.BoolOp.MakeCommonList(theShapesList, checkSelfInte)
8102             RaiseIfFailed("MakeCommonList", self.BoolOp)
8103             self._autoPublish(anObj, theName, "common")
8104             return anObj
8105
8106         ## Perform Cut boolean operation on one object and the list of tools.
8107         #  @param theMainShape The object of the operation.
8108         #  @param theShapesList The list of tools of the operation.
8109         #  @param checkSelfInte The flag that tells if the arguments should
8110         #         be checked for self-intersection prior to the operation.
8111         #  @param theName Object name; when specified, this parameter is used
8112         #         for result publication in the study. Otherwise, if automatic
8113         #         publication is switched on, default value is used for result name.
8114         #
8115         #  @note This algorithm doesn't find all types of self-intersections.
8116         #        It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
8117         #        vertex/face and edge/face intersections. Face/face
8118         #        intersections detection is switched off as it is a
8119         #        time-consuming operation that gives an impact on performance.
8120         #        To find all self-intersections please use
8121         #        CheckSelfIntersections() method.
8122         #
8123         #  @return New GEOM.GEOM_Object, containing the result shape.
8124         #
8125         #  @ref tui_cut "Example 1"
8126         #  \n @ref swig_MakeCommon "Example 2"
8127         @ManageTransactions("BoolOp")
8128         def MakeCutList(self, theMainShape, theShapesList, checkSelfInte=False, theName=None):
8129             """
8130             Perform Cut boolean operation on one object and the list of tools.
8131
8132             Parameters:
8133                 theMainShape The object of the operation.
8134                 theShapesList The list of tools of the operation.
8135                 checkSelfInte The flag that tells if the arguments should
8136                               be checked for self-intersection prior to
8137                               the operation.
8138                 theName Object name; when specified, this parameter is used
8139                         for result publication in the study. Otherwise, if automatic
8140                         publication is switched on, default value is used for result name.
8141
8142             Note:
8143                     This algorithm doesn't find all types of self-intersections.
8144                     It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
8145                     vertex/face and edge/face intersections. Face/face
8146                     intersections detection is switched off as it is a
8147                     time-consuming operation that gives an impact on performance.
8148                     To find all self-intersections please use
8149                     CheckSelfIntersections() method.
8150
8151             Returns:
8152                 New GEOM.GEOM_Object, containing the result shape.
8153
8154             """
8155             # Example: see GEOM_TestOthers.py
8156             anObj = self.BoolOp.MakeCutList(theMainShape, theShapesList, checkSelfInte)
8157             RaiseIfFailed("MakeCutList", self.BoolOp)
8158             self._autoPublish(anObj, theName, "cut")
8159             return anObj
8160
8161         # end of l3_boolean
8162         ## @}
8163
8164         ## @addtogroup l3_basic_op
8165         ## @{
8166
8167         ## Perform partition operation.
8168         #  @param ListShapes Shapes to be intersected.
8169         #  @param ListTools Shapes to intersect theShapes.
8170         #  @param Limit Type of resulting shapes (see ShapeType()).\n
8171         #         If this parameter is set to -1 ("Auto"), most appropriate shape limit
8172         #         type will be detected automatically.
8173         #  @param KeepNonlimitShapes if this parameter == 0, then only shapes of
8174         #                             target type (equal to Limit) are kept in the result,
8175         #                             else standalone shapes of lower dimension
8176         #                             are kept also (if they exist).
8177         #
8178         #  @param theName Object name; when specified, this parameter is used
8179         #         for result publication in the study. Otherwise, if automatic
8180         #         publication is switched on, default value is used for result name.
8181         #
8182         #  @note Each compound from ListShapes and ListTools will be exploded
8183         #        in order to avoid possible intersection between shapes from this compound.
8184         #
8185         #  After implementation new version of PartitionAlgo (October 2006)
8186         #  other parameters are ignored by current functionality. They are kept
8187         #  in this function only for support old versions.
8188         #      @param ListKeepInside Shapes, outside which the results will be deleted.
8189         #         Each shape from theKeepInside must belong to theShapes also.
8190         #      @param ListRemoveInside Shapes, inside which the results will be deleted.
8191         #         Each shape from theRemoveInside must belong to theShapes also.
8192         #      @param RemoveWebs If TRUE, perform Glue 3D algorithm.
8193         #      @param ListMaterials Material indices for each shape. Make sense,
8194         #         only if theRemoveWebs is TRUE.
8195         #
8196         #  @return New GEOM.GEOM_Object, containing the result shapes.
8197         #
8198         #  @ref tui_partition "Example"
8199         @ManageTransactions("BoolOp")
8200         def MakePartition(self, ListShapes, ListTools=[], ListKeepInside=[], ListRemoveInside=[],
8201                           Limit=ShapeType["AUTO"], RemoveWebs=0, ListMaterials=[],
8202                           KeepNonlimitShapes=0, theName=None):
8203             """
8204             Perform partition operation.
8205
8206             Parameters:
8207                 ListShapes Shapes to be intersected.
8208                 ListTools Shapes to intersect theShapes.
8209                 Limit Type of resulting shapes (see geompy.ShapeType)
8210                       If this parameter is set to -1 ("Auto"), most appropriate shape limit
8211                       type will be detected automatically.
8212                 KeepNonlimitShapes if this parameter == 0, then only shapes of
8213                                     target type (equal to Limit) are kept in the result,
8214                                     else standalone shapes of lower dimension
8215                                     are kept also (if they exist).
8216
8217                 theName Object name; when specified, this parameter is used
8218                         for result publication in the study. Otherwise, if automatic
8219                         publication is switched on, default value is used for result name.
8220             Note:
8221                     Each compound from ListShapes and ListTools will be exploded
8222                     in order to avoid possible intersection between shapes from
8223                     this compound.
8224
8225             After implementation new version of PartitionAlgo (October 2006) other
8226             parameters are ignored by current functionality. They are kept in this
8227             function only for support old versions.
8228
8229             Ignored parameters:
8230                 ListKeepInside Shapes, outside which the results will be deleted.
8231                                Each shape from theKeepInside must belong to theShapes also.
8232                 ListRemoveInside Shapes, inside which the results will be deleted.
8233                                  Each shape from theRemoveInside must belong to theShapes also.
8234                 RemoveWebs If TRUE, perform Glue 3D algorithm.
8235                 ListMaterials Material indices for each shape. Make sense, only if theRemoveWebs is TRUE.
8236
8237             Returns:
8238                 New GEOM.GEOM_Object, containing the result shapes.
8239             """
8240             # Example: see GEOM_TestAll.py
8241             if Limit == self.ShapeType["AUTO"]:
8242                 # automatic detection of the most appropriate shape limit type
8243                 lim = GEOM.SHAPE
8244                 for s in ListShapes: lim = min(lim, s.GetMaxShapeType())
8245                 Limit = EnumToLong(lim)
8246                 pass
8247             anObj = self.BoolOp.MakePartition(ListShapes, ListTools,
8248                                               ListKeepInside, ListRemoveInside,
8249                                               Limit, RemoveWebs, ListMaterials,
8250                                               KeepNonlimitShapes);
8251             RaiseIfFailed("MakePartition", self.BoolOp)
8252             self._autoPublish(anObj, theName, "partition")
8253             return anObj
8254
8255         ## Perform partition operation.
8256         #  This method may be useful if it is needed to make a partition for
8257         #  compound contains nonintersected shapes. Performance will be better
8258         #  since intersection between shapes from compound is not performed.
8259         #
8260         #  Description of all parameters as in previous method MakePartition().
8261         #  One additional parameter is provided:
8262         #  @param checkSelfInte The flag that tells if the arguments should
8263         #         be checked for self-intersection prior to the operation.
8264         #
8265         #  @note This algorithm doesn't find all types of self-intersections.
8266         #        It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
8267         #        vertex/face and edge/face intersections. Face/face
8268         #        intersections detection is switched off as it is a
8269         #        time-consuming operation that gives an impact on performance.
8270         #        To find all self-intersections please use
8271         #        CheckSelfIntersections() method.
8272         #
8273         #  @note Passed compounds (via ListShapes or via ListTools)
8274         #           have to consist of nonintersecting shapes.
8275         #
8276         #  @return New GEOM.GEOM_Object, containing the result shapes.
8277         #
8278         #  @ref swig_todo "Example"
8279         @ManageTransactions("BoolOp")
8280         def MakePartitionNonSelfIntersectedShape(self, ListShapes, ListTools=[],
8281                                                  ListKeepInside=[], ListRemoveInside=[],
8282                                                  Limit=ShapeType["AUTO"], RemoveWebs=0,
8283                                                  ListMaterials=[], KeepNonlimitShapes=0,
8284                                                  checkSelfInte=False, theName=None):
8285             """
8286             Perform partition operation.
8287             This method may be useful if it is needed to make a partition for
8288             compound contains nonintersected shapes. Performance will be better
8289             since intersection between shapes from compound is not performed.
8290
8291             Parameters:
8292                 Description of all parameters as in method geompy.MakePartition.
8293                 One additional parameter is provided:
8294                 checkSelfInte The flag that tells if the arguments should
8295                               be checked for self-intersection prior to
8296                               the operation.
8297
8298             Note:
8299                     This algorithm doesn't find all types of self-intersections.
8300                     It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
8301                     vertex/face and edge/face intersections. Face/face
8302                     intersections detection is switched off as it is a
8303                     time-consuming operation that gives an impact on performance.
8304                     To find all self-intersections please use
8305                     CheckSelfIntersections() method.
8306
8307             NOTE:
8308                 Passed compounds (via ListShapes or via ListTools)
8309                 have to consist of nonintersecting shapes.
8310
8311             Returns:
8312                 New GEOM.GEOM_Object, containing the result shapes.
8313             """
8314             if Limit == self.ShapeType["AUTO"]:
8315                 # automatic detection of the most appropriate shape limit type
8316                 lim = GEOM.SHAPE
8317                 for s in ListShapes: lim = min(lim, s.GetMaxShapeType())
8318                 Limit = EnumToLong(lim)
8319                 pass
8320             anObj = self.BoolOp.MakePartitionNonSelfIntersectedShape(ListShapes, ListTools,
8321                                                                      ListKeepInside, ListRemoveInside,
8322                                                                      Limit, RemoveWebs, ListMaterials,
8323                                                                      KeepNonlimitShapes, checkSelfInte);
8324             RaiseIfFailed("MakePartitionNonSelfIntersectedShape", self.BoolOp)
8325             self._autoPublish(anObj, theName, "partition")
8326             return anObj
8327
8328         ## See method MakePartition() for more information.
8329         #
8330         #  @ref tui_partition "Example 1"
8331         #  \n @ref swig_Partition "Example 2"
8332         def Partition(self, ListShapes, ListTools=[], ListKeepInside=[], ListRemoveInside=[],
8333                       Limit=ShapeType["AUTO"], RemoveWebs=0, ListMaterials=[],
8334                       KeepNonlimitShapes=0, theName=None):
8335             """
8336             See method geompy.MakePartition for more information.
8337             """
8338             # Example: see GEOM_TestOthers.py
8339             # note: auto-publishing is done in self.MakePartition()
8340             anObj = self.MakePartition(ListShapes, ListTools,
8341                                        ListKeepInside, ListRemoveInside,
8342                                        Limit, RemoveWebs, ListMaterials,
8343                                        KeepNonlimitShapes, theName);
8344             return anObj
8345
8346         ## Perform partition of the Shape with the Plane
8347         #  @param theShape Shape to be intersected.
8348         #  @param thePlane Tool shape, to intersect theShape.
8349         #  @param theName Object name; when specified, this parameter is used
8350         #         for result publication in the study. Otherwise, if automatic
8351         #         publication is switched on, default value is used for result name.
8352         #
8353         #  @return New GEOM.GEOM_Object, containing the result shape.
8354         #
8355         #  @note This operation is a shortcut to the more general @ref MakePartition
8356         #  operation, where @a theShape specifies single "object" (shape being partitioned)
8357         #  and @a thePlane specifies single "tool" (intersector shape). Other parameters of
8358         #  @ref MakePartition operation have default values:
8359         #  - @a Limit: GEOM::SHAPE (shape limit corresponds to the type of @a theShape)
8360         #  - @a KeepNonlimitShapes: 0
8361         #  - @a KeepInside, @a RemoveInside, @a RemoveWebs,
8362         #    @a Materials (obsolete parameters): empty
8363         #
8364         #  @note I.e. the following two operations are equivalent:
8365         #  @code
8366         #  Result = geompy.MakeHalfPartition(Object, Plane)
8367         #  Result = geompy.MakePartition([Object], [Plane])
8368         #  @endcode
8369         #
8370         #  @sa MakePartition, MakePartitionNonSelfIntersectedShape
8371         #
8372         #  @ref tui_partition "Example"
8373         @ManageTransactions("BoolOp")
8374         def MakeHalfPartition(self, theShape, thePlane, theName=None):
8375             """
8376             Perform partition of the Shape with the Plane
8377
8378             Parameters:
8379                 theShape Shape to be intersected.
8380                 thePlane Tool shape, to intersect theShape.
8381                 theName Object name; when specified, this parameter is used
8382                         for result publication in the study. Otherwise, if automatic
8383                         publication is switched on, default value is used for result name.
8384
8385             Returns:
8386                 New GEOM.GEOM_Object, containing the result shape.
8387          
8388             Note: This operation is a shortcut to the more general MakePartition
8389             operation, where theShape specifies single "object" (shape being partitioned)
8390             and thePlane specifies single "tool" (intersector shape). Other parameters of
8391             MakePartition operation have default values:
8392             - Limit: GEOM::SHAPE (shape limit corresponds to the type of theShape)
8393             - KeepNonlimitShapes: 0
8394             - KeepInside, RemoveInside, RemoveWebs, Materials (obsolete parameters): empty
8395          
8396             I.e. the following two operations are equivalent:
8397               Result = geompy.MakeHalfPartition(Object, Plane)
8398               Result = geompy.MakePartition([Object], [Plane])
8399             """
8400             # Example: see GEOM_TestAll.py
8401             anObj = self.BoolOp.MakeHalfPartition(theShape, thePlane)
8402             RaiseIfFailed("MakeHalfPartition", self.BoolOp)
8403             self._autoPublish(anObj, theName, "partition")
8404             return anObj
8405
8406         # end of l3_basic_op
8407         ## @}
8408
8409         ## @addtogroup l3_transform
8410         ## @{
8411
8412         ## Translate the given object along the vector, specified
8413         #  by its end points.
8414         #  @param theObject The object to be translated.
8415         #  @param thePoint1 Start point of translation vector.
8416         #  @param thePoint2 End point of translation vector.
8417         #  @param theCopy Flag used to translate object itself or create a copy.
8418         #  @return Translated @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
8419         #  new GEOM.GEOM_Object, containing the translated object if @a theCopy flag is @c True.
8420         @ManageTransactions("TrsfOp")
8421         def TranslateTwoPoints(self, theObject, thePoint1, thePoint2, theCopy=False):
8422             """
8423             Translate the given object along the vector, specified by its end points.
8424
8425             Parameters:
8426                 theObject The object to be translated.
8427                 thePoint1 Start point of translation vector.
8428                 thePoint2 End point of translation vector.
8429                 theCopy Flag used to translate object itself or create a copy.
8430
8431             Returns:
8432                 Translated theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
8433                 new GEOM.GEOM_Object, containing the translated object if theCopy flag is True.
8434             """
8435             if theCopy:
8436                 anObj = self.TrsfOp.TranslateTwoPointsCopy(theObject, thePoint1, thePoint2)
8437             else:
8438                 anObj = self.TrsfOp.TranslateTwoPoints(theObject, thePoint1, thePoint2)
8439             RaiseIfFailed("TranslateTwoPoints", self.TrsfOp)
8440             return anObj
8441
8442         ## Translate the given object along the vector, specified
8443         #  by its end points, creating its copy before the translation.
8444         #  @param theObject The object to be translated.
8445         #  @param thePoint1 Start point of translation vector.
8446         #  @param thePoint2 End point of translation vector.
8447         #  @param theName Object name; when specified, this parameter is used
8448         #         for result publication in the study. Otherwise, if automatic
8449         #         publication is switched on, default value is used for result name.
8450         #
8451         #  @return New GEOM.GEOM_Object, containing the translated object.
8452         #
8453         #  @ref tui_translation "Example 1"
8454         #  \n @ref swig_MakeTranslationTwoPoints "Example 2"
8455         @ManageTransactions("TrsfOp")
8456         def MakeTranslationTwoPoints(self, theObject, thePoint1, thePoint2, theName=None):
8457             """
8458             Translate the given object along the vector, specified
8459             by its end points, creating its copy before the translation.
8460
8461             Parameters:
8462                 theObject The object to be translated.
8463                 thePoint1 Start point of translation vector.
8464                 thePoint2 End point of translation vector.
8465                 theName Object name; when specified, this parameter is used
8466                         for result publication in the study. Otherwise, if automatic
8467                         publication is switched on, default value is used for result name.
8468
8469             Returns:
8470                 New GEOM.GEOM_Object, containing the translated object.
8471             """
8472             # Example: see GEOM_TestAll.py
8473             anObj = self.TrsfOp.TranslateTwoPointsCopy(theObject, thePoint1, thePoint2)
8474             RaiseIfFailed("TranslateTwoPointsCopy", self.TrsfOp)
8475             self._autoPublish(anObj, theName, "translated")
8476             return anObj
8477
8478         ## Translate the given object along the vector, specified by its components.
8479         #  @param theObject The object to be translated.
8480         #  @param theDX,theDY,theDZ Components of translation vector.
8481         #  @param theCopy Flag used to translate object itself or create a copy.
8482         #  @return Translated @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
8483         #  new GEOM.GEOM_Object, containing the translated object if @a theCopy flag is @c True.
8484         #
8485         #  @ref tui_translation "Example"
8486         @ManageTransactions("TrsfOp")
8487         def TranslateDXDYDZ(self, theObject, theDX, theDY, theDZ, theCopy=False):
8488             """
8489             Translate the given object along the vector, specified by its components.
8490
8491             Parameters:
8492                 theObject The object to be translated.
8493                 theDX,theDY,theDZ Components of translation vector.
8494                 theCopy Flag used to translate object itself or create a copy.
8495
8496             Returns:
8497                 Translated theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
8498                 new GEOM.GEOM_Object, containing the translated object if theCopy flag is True.
8499             """
8500             # Example: see GEOM_TestAll.py
8501             theDX, theDY, theDZ, Parameters = ParseParameters(theDX, theDY, theDZ)
8502             if theCopy:
8503                 anObj = self.TrsfOp.TranslateDXDYDZCopy(theObject, theDX, theDY, theDZ)
8504             else:
8505                 anObj = self.TrsfOp.TranslateDXDYDZ(theObject, theDX, theDY, theDZ)
8506             anObj.SetParameters(Parameters)
8507             RaiseIfFailed("TranslateDXDYDZ", self.TrsfOp)
8508             return anObj
8509
8510         ## Translate the given object along the vector, specified
8511         #  by its components, creating its copy before the translation.
8512         #  @param theObject The object to be translated.
8513         #  @param theDX,theDY,theDZ Components of translation vector.
8514         #  @param theName Object name; when specified, this parameter is used
8515         #         for result publication in the study. Otherwise, if automatic
8516         #         publication is switched on, default value is used for result name.
8517         #
8518         #  @return New GEOM.GEOM_Object, containing the translated object.
8519         #
8520         #  @ref tui_translation "Example"
8521         @ManageTransactions("TrsfOp")
8522         def MakeTranslation(self,theObject, theDX, theDY, theDZ, theName=None):
8523             """
8524             Translate the given object along the vector, specified
8525             by its components, creating its copy before the translation.
8526
8527             Parameters:
8528                 theObject The object to be translated.
8529                 theDX,theDY,theDZ Components of translation vector.
8530                 theName Object name; when specified, this parameter is used
8531                         for result publication in the study. Otherwise, if automatic
8532                         publication is switched on, default value is used for result name.
8533
8534             Returns:
8535                 New GEOM.GEOM_Object, containing the translated object.
8536             """
8537             # Example: see GEOM_TestAll.py
8538             theDX, theDY, theDZ, Parameters = ParseParameters(theDX, theDY, theDZ)
8539             anObj = self.TrsfOp.TranslateDXDYDZCopy(theObject, theDX, theDY, theDZ)
8540             anObj.SetParameters(Parameters)
8541             RaiseIfFailed("TranslateDXDYDZ", self.TrsfOp)
8542             self._autoPublish(anObj, theName, "translated")
8543             return anObj
8544
8545         ## Translate the given object along the given vector.
8546         #  @param theObject The object to be translated.
8547         #  @param theVector The translation vector.
8548         #  @param theCopy Flag used to translate object itself or create a copy.
8549         #  @return Translated @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
8550         #  new GEOM.GEOM_Object, containing the translated object if @a theCopy flag is @c True.
8551         @ManageTransactions("TrsfOp")
8552         def TranslateVector(self, theObject, theVector, theCopy=False):
8553             """
8554             Translate the given object along the given vector.
8555
8556             Parameters:
8557                 theObject The object to be translated.
8558                 theVector The translation vector.
8559                 theCopy Flag used to translate object itself or create a copy.
8560
8561             Returns:
8562                 Translated theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
8563                 new GEOM.GEOM_Object, containing the translated object if theCopy flag is True.
8564             """
8565             if theCopy:
8566                 anObj = self.TrsfOp.TranslateVectorCopy(theObject, theVector)
8567             else:
8568                 anObj = self.TrsfOp.TranslateVector(theObject, theVector)
8569             RaiseIfFailed("TranslateVector", self.TrsfOp)
8570             return anObj
8571
8572         ## Translate the given object along the given vector,
8573         #  creating its copy before the translation.
8574         #  @param theObject The object to be translated.
8575         #  @param theVector The translation vector.
8576         #  @param theName Object name; when specified, this parameter is used
8577         #         for result publication in the study. Otherwise, if automatic
8578         #         publication is switched on, default value is used for result name.
8579         #
8580         #  @return New GEOM.GEOM_Object, containing the translated object.
8581         #
8582         #  @ref tui_translation "Example"
8583         @ManageTransactions("TrsfOp")
8584         def MakeTranslationVector(self, theObject, theVector, theName=None):
8585             """
8586             Translate the given object along the given vector,
8587             creating its copy before the translation.
8588
8589             Parameters:
8590                 theObject The object to be translated.
8591                 theVector The translation vector.
8592                 theName Object name; when specified, this parameter is used
8593                         for result publication in the study. Otherwise, if automatic
8594                         publication is switched on, default value is used for result name.
8595
8596             Returns:
8597                 New GEOM.GEOM_Object, containing the translated object.
8598             """
8599             # Example: see GEOM_TestAll.py
8600             anObj = self.TrsfOp.TranslateVectorCopy(theObject, theVector)
8601             RaiseIfFailed("TranslateVectorCopy", self.TrsfOp)
8602             self._autoPublish(anObj, theName, "translated")
8603             return anObj
8604
8605         ## Translate the given object along the given vector on given distance.
8606         #  @param theObject The object to be translated.
8607         #  @param theVector The translation vector.
8608         #  @param theDistance The translation distance.
8609         #  @param theCopy Flag used to translate object itself or create a copy.
8610         #  @return Translated @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
8611         #  new GEOM.GEOM_Object, containing the translated object if @a theCopy flag is @c True.
8612         #
8613         #  @ref tui_translation "Example"
8614         @ManageTransactions("TrsfOp")
8615         def TranslateVectorDistance(self, theObject, theVector, theDistance, theCopy=False):
8616             """
8617             Translate the given object along the given vector on given distance.
8618
8619             Parameters:
8620                 theObject The object to be translated.
8621                 theVector The translation vector.
8622                 theDistance The translation distance.
8623                 theCopy Flag used to translate object itself or create a copy.
8624
8625             Returns:
8626                 Translated theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
8627                 new GEOM.GEOM_Object, containing the translated object if theCopy flag is True.
8628             """
8629             # Example: see GEOM_TestAll.py
8630             theDistance,Parameters = ParseParameters(theDistance)
8631             anObj = self.TrsfOp.TranslateVectorDistance(theObject, theVector, theDistance, theCopy)
8632             RaiseIfFailed("TranslateVectorDistance", self.TrsfOp)
8633             anObj.SetParameters(Parameters)
8634             return anObj
8635
8636         ## Translate the given object along the given vector on given distance,
8637         #  creating its copy before the translation.
8638         #  @param theObject The object to be translated.
8639         #  @param theVector The translation vector.
8640         #  @param theDistance The translation distance.
8641         #  @param theName Object name; when specified, this parameter is used
8642         #         for result publication in the study. Otherwise, if automatic
8643         #         publication is switched on, default value is used for result name.
8644         #
8645         #  @return New GEOM.GEOM_Object, containing the translated object.
8646         #
8647         #  @ref tui_translation "Example"
8648         @ManageTransactions("TrsfOp")
8649         def MakeTranslationVectorDistance(self, theObject, theVector, theDistance, theName=None):
8650             """
8651             Translate the given object along the given vector on given distance,
8652             creating its copy before the translation.
8653
8654             Parameters:
8655                 theObject The object to be translated.
8656                 theVector The translation vector.
8657                 theDistance The translation distance.
8658                 theName Object name; when specified, this parameter is used
8659                         for result publication in the study. Otherwise, if automatic
8660                         publication is switched on, default value is used for result name.
8661
8662             Returns:
8663                 New GEOM.GEOM_Object, containing the translated object.
8664             """
8665             # Example: see GEOM_TestAll.py
8666             theDistance,Parameters = ParseParameters(theDistance)
8667             anObj = self.TrsfOp.TranslateVectorDistance(theObject, theVector, theDistance, 1)
8668             RaiseIfFailed("TranslateVectorDistance", self.TrsfOp)
8669             anObj.SetParameters(Parameters)
8670             self._autoPublish(anObj, theName, "translated")
8671             return anObj
8672
8673         ## Rotate the given object around the given axis on the given angle.
8674         #  @param theObject The object to be rotated.
8675         #  @param theAxis Rotation axis.
8676         #  @param theAngle Rotation angle in radians.
8677         #  @param theCopy Flag used to rotate object itself or create a copy.
8678         #
8679         #  @return Rotated @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
8680         #  new GEOM.GEOM_Object, containing the rotated object if @a theCopy flag is @c True.
8681         #
8682         #  @ref tui_rotation "Example"
8683         @ManageTransactions("TrsfOp")
8684         def Rotate(self, theObject, theAxis, theAngle, theCopy=False):
8685             """
8686             Rotate the given object around the given axis on the given angle.
8687
8688             Parameters:
8689                 theObject The object to be rotated.
8690                 theAxis Rotation axis.
8691                 theAngle Rotation angle in radians.
8692                 theCopy Flag used to rotate object itself or create a copy.
8693
8694             Returns:
8695                 Rotated theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
8696                 new GEOM.GEOM_Object, containing the rotated object if theCopy flag is True.
8697             """
8698             # Example: see GEOM_TestAll.py
8699             flag = False
8700             if isinstance(theAngle,str):
8701                 flag = True
8702             theAngle, Parameters = ParseParameters(theAngle)
8703             if flag:
8704                 theAngle = theAngle*math.pi/180.0
8705             if theCopy:
8706                 anObj = self.TrsfOp.RotateCopy(theObject, theAxis, theAngle)
8707             else:
8708                 anObj = self.TrsfOp.Rotate(theObject, theAxis, theAngle)
8709             RaiseIfFailed("Rotate", self.TrsfOp)
8710             anObj.SetParameters(Parameters)
8711             return anObj
8712
8713         ## Rotate the given object around the given axis
8714         #  on the given angle, creating its copy before the rotation.
8715         #  @param theObject The object to be rotated.
8716         #  @param theAxis Rotation axis.
8717         #  @param theAngle Rotation angle in radians.
8718         #  @param theName Object name; when specified, this parameter is used
8719         #         for result publication in the study. Otherwise, if automatic
8720         #         publication is switched on, default value is used for result name.
8721         #
8722         #  @return New GEOM.GEOM_Object, containing the rotated object.
8723         #
8724         #  @ref tui_rotation "Example"
8725         @ManageTransactions("TrsfOp")
8726         def MakeRotation(self, theObject, theAxis, theAngle, theName=None):
8727             """
8728             Rotate the given object around the given axis
8729             on the given angle, creating its copy before the rotatation.
8730
8731             Parameters:
8732                 theObject The object to be rotated.
8733                 theAxis Rotation axis.
8734                 theAngle Rotation angle in radians.
8735                 theName Object name; when specified, this parameter is used
8736                         for result publication in the study. Otherwise, if automatic
8737                         publication is switched on, default value is used for result name.
8738
8739             Returns:
8740                 New GEOM.GEOM_Object, containing the rotated object.
8741             """
8742             # Example: see GEOM_TestAll.py
8743             flag = False
8744             if isinstance(theAngle,str):
8745                 flag = True
8746             theAngle, Parameters = ParseParameters(theAngle)
8747             if flag:
8748                 theAngle = theAngle*math.pi/180.0
8749             anObj = self.TrsfOp.RotateCopy(theObject, theAxis, theAngle)
8750             RaiseIfFailed("RotateCopy", self.TrsfOp)
8751             anObj.SetParameters(Parameters)
8752             self._autoPublish(anObj, theName, "rotated")
8753             return anObj
8754
8755         ## Rotate given object around vector perpendicular to plane
8756         #  containing three points.
8757         #  @param theObject The object to be rotated.
8758         #  @param theCentPoint central point the axis is the vector perpendicular to the plane
8759         #  containing the three points.
8760         #  @param thePoint1,thePoint2 points in a perpendicular plane of the axis.
8761         #  @param theCopy Flag used to rotate object itself or create a copy.
8762         #  @return Rotated @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
8763         #  new GEOM.GEOM_Object, containing the rotated object if @a theCopy flag is @c True.
8764         @ManageTransactions("TrsfOp")
8765         def RotateThreePoints(self, theObject, theCentPoint, thePoint1, thePoint2, theCopy=False):
8766             """
8767             Rotate given object around vector perpendicular to plane
8768             containing three points.
8769
8770             Parameters:
8771                 theObject The object to be rotated.
8772                 theCentPoint central point  the axis is the vector perpendicular to the plane
8773                              containing the three points.
8774                 thePoint1,thePoint2 points in a perpendicular plane of the axis.
8775                 theCopy Flag used to rotate object itself or create a copy.
8776
8777             Returns:
8778                 Rotated theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
8779                 new GEOM.GEOM_Object, containing the rotated object if theCopy flag is True.
8780             """
8781             if theCopy:
8782                 anObj = self.TrsfOp.RotateThreePointsCopy(theObject, theCentPoint, thePoint1, thePoint2)
8783             else:
8784                 anObj = self.TrsfOp.RotateThreePoints(theObject, theCentPoint, thePoint1, thePoint2)
8785             RaiseIfFailed("RotateThreePoints", self.TrsfOp)
8786             return anObj
8787
8788         ## Rotate given object around vector perpendicular to plane
8789         #  containing three points, creating its copy before the rotatation.
8790         #  @param theObject The object to be rotated.
8791         #  @param theCentPoint central point the axis is the vector perpendicular to the plane
8792         #  containing the three points.
8793         #  @param thePoint1,thePoint2 in a perpendicular plane of the axis.
8794         #  @param theName Object name; when specified, this parameter is used
8795         #         for result publication in the study. Otherwise, if automatic
8796         #         publication is switched on, default value is used for result name.
8797         #
8798         #  @return New GEOM.GEOM_Object, containing the rotated object.
8799         #
8800         #  @ref tui_rotation "Example"
8801         @ManageTransactions("TrsfOp")
8802         def MakeRotationThreePoints(self, theObject, theCentPoint, thePoint1, thePoint2, theName=None):
8803             """
8804             Rotate given object around vector perpendicular to plane
8805             containing three points, creating its copy before the rotatation.
8806
8807             Parameters:
8808                 theObject The object to be rotated.
8809                 theCentPoint central point  the axis is the vector perpendicular to the plane
8810                              containing the three points.
8811                 thePoint1,thePoint2  in a perpendicular plane of the axis.
8812                 theName Object name; when specified, this parameter is used
8813                         for result publication in the study. Otherwise, if automatic
8814                         publication is switched on, default value is used for result name.
8815
8816             Returns:
8817                 New GEOM.GEOM_Object, containing the rotated object.
8818             """
8819             # Example: see GEOM_TestAll.py
8820             anObj = self.TrsfOp.RotateThreePointsCopy(theObject, theCentPoint, thePoint1, thePoint2)
8821             RaiseIfFailed("RotateThreePointsCopy", self.TrsfOp)
8822             self._autoPublish(anObj, theName, "rotated")
8823             return anObj
8824
8825         ## Scale the given object by the specified factor.
8826         #  @param theObject The object to be scaled.
8827         #  @param thePoint Center point for scaling.
8828         #                  Passing None for it means scaling relatively the origin of global CS.
8829         #  @param theFactor Scaling factor value.
8830         #  @param theCopy Flag used to scale object itself or create a copy.
8831         #  @return Scaled @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
8832         #  new GEOM.GEOM_Object, containing the scaled object if @a theCopy flag is @c True.
8833         @ManageTransactions("TrsfOp")
8834         def Scale(self, theObject, thePoint, theFactor, theCopy=False):
8835             """
8836             Scale the given object by the specified factor.
8837
8838             Parameters:
8839                 theObject The object to be scaled.
8840                 thePoint Center point for scaling.
8841                          Passing None for it means scaling relatively the origin of global CS.
8842                 theFactor Scaling factor value.
8843                 theCopy Flag used to scale object itself or create a copy.
8844
8845             Returns:
8846                 Scaled theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
8847                 new GEOM.GEOM_Object, containing the scaled object if theCopy flag is True.
8848             """
8849             # Example: see GEOM_TestAll.py
8850             theFactor, Parameters = ParseParameters(theFactor)
8851             if theCopy:
8852                 anObj = self.TrsfOp.ScaleShapeCopy(theObject, thePoint, theFactor)
8853             else:
8854                 anObj = self.TrsfOp.ScaleShape(theObject, thePoint, theFactor)
8855             RaiseIfFailed("Scale", self.TrsfOp)
8856             anObj.SetParameters(Parameters)
8857             return anObj
8858
8859         ## Scale the given object by the factor, creating its copy before the scaling.
8860         #  @param theObject The object to be scaled.
8861         #  @param thePoint Center point for scaling.
8862         #                  Passing None for it means scaling relatively the origin of global CS.
8863         #  @param theFactor Scaling factor value.
8864         #  @param theName Object name; when specified, this parameter is used
8865         #         for result publication in the study. Otherwise, if automatic
8866         #         publication is switched on, default value is used for result name.
8867         #
8868         #  @return New GEOM.GEOM_Object, containing the scaled shape.
8869         #
8870         #  @ref tui_scale "Example"
8871         @ManageTransactions("TrsfOp")
8872         def MakeScaleTransform(self, theObject, thePoint, theFactor, theName=None):
8873             """
8874             Scale the given object by the factor, creating its copy before the scaling.
8875
8876             Parameters:
8877                 theObject The object to be scaled.
8878                 thePoint Center point for scaling.
8879                          Passing None for it means scaling relatively the origin of global CS.
8880                 theFactor Scaling factor value.
8881                 theName Object name; when specified, this parameter is used
8882                         for result publication in the study. Otherwise, if automatic
8883                         publication is switched on, default value is used for result name.
8884
8885             Returns:
8886                 New GEOM.GEOM_Object, containing the scaled shape.
8887             """
8888             # Example: see GEOM_TestAll.py
8889             theFactor, Parameters = ParseParameters(theFactor)
8890             anObj = self.TrsfOp.ScaleShapeCopy(theObject, thePoint, theFactor)
8891             RaiseIfFailed("ScaleShapeCopy", self.TrsfOp)
8892             anObj.SetParameters(Parameters)
8893             self._autoPublish(anObj, theName, "scaled")
8894             return anObj
8895
8896         ## Scale the given object by different factors along coordinate axes.
8897         #  @param theObject The object to be scaled.
8898         #  @param thePoint Center point for scaling.
8899         #                  Passing None for it means scaling relatively the origin of global CS.
8900         #  @param theFactorX,theFactorY,theFactorZ Scaling factors along each axis.
8901         #  @param theCopy Flag used to scale object itself or create a copy.
8902         #  @return Scaled @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
8903         #  new GEOM.GEOM_Object, containing the scaled object if @a theCopy flag is @c True.
8904         @ManageTransactions("TrsfOp")
8905         def ScaleAlongAxes(self, theObject, thePoint, theFactorX, theFactorY, theFactorZ, theCopy=False):
8906             """
8907             Scale the given object by different factors along coordinate axes.
8908
8909             Parameters:
8910                 theObject The object to be scaled.
8911                 thePoint Center point for scaling.
8912                             Passing None for it means scaling relatively the origin of global CS.
8913                 theFactorX,theFactorY,theFactorZ Scaling factors along each axis.
8914                 theCopy Flag used to scale object itself or create a copy.
8915
8916             Returns:
8917                 Scaled theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
8918                 new GEOM.GEOM_Object, containing the scaled object if theCopy flag is True.
8919             """
8920             # Example: see GEOM_TestAll.py
8921             theFactorX, theFactorY, theFactorZ, Parameters = ParseParameters(theFactorX, theFactorY, theFactorZ)
8922             if theCopy:
8923                 anObj = self.TrsfOp.ScaleShapeAlongAxesCopy(theObject, thePoint,
8924                                                             theFactorX, theFactorY, theFactorZ)
8925             else:
8926                 anObj = self.TrsfOp.ScaleShapeAlongAxes(theObject, thePoint,
8927                                                         theFactorX, theFactorY, theFactorZ)
8928             RaiseIfFailed("ScaleAlongAxes", self.TrsfOp)
8929             anObj.SetParameters(Parameters)
8930             return anObj
8931
8932         ## Scale the given object by different factors along coordinate axes,
8933         #  creating its copy before the scaling.
8934         #  @param theObject The object to be scaled.
8935         #  @param thePoint Center point for scaling.
8936         #                  Passing None for it means scaling relatively the origin of global CS.
8937         #  @param theFactorX,theFactorY,theFactorZ Scaling factors along each axis.
8938         #  @param theName Object name; when specified, this parameter is used
8939         #         for result publication in the study. Otherwise, if automatic
8940         #         publication is switched on, default value is used for result name.
8941         #
8942         #  @return New GEOM.GEOM_Object, containing the scaled shape.
8943         #
8944         #  @ref swig_scale "Example"
8945         @ManageTransactions("TrsfOp")
8946         def MakeScaleAlongAxes(self, theObject, thePoint, theFactorX, theFactorY, theFactorZ, theName=None):
8947             """
8948             Scale the given object by different factors along coordinate axes,
8949             creating its copy before the scaling.
8950
8951             Parameters:
8952                 theObject The object to be scaled.
8953                 thePoint Center point for scaling.
8954                             Passing None for it means scaling relatively the origin of global CS.
8955                 theFactorX,theFactorY,theFactorZ Scaling factors along each axis.
8956                 theName Object name; when specified, this parameter is used
8957                         for result publication in the study. Otherwise, if automatic
8958                         publication is switched on, default value is used for result name.
8959
8960             Returns:
8961                 New GEOM.GEOM_Object, containing the scaled shape.
8962             """
8963             # Example: see GEOM_TestAll.py
8964             theFactorX, theFactorY, theFactorZ, Parameters = ParseParameters(theFactorX, theFactorY, theFactorZ)
8965             anObj = self.TrsfOp.ScaleShapeAlongAxesCopy(theObject, thePoint,
8966                                                         theFactorX, theFactorY, theFactorZ)
8967             RaiseIfFailed("MakeScaleAlongAxes", self.TrsfOp)
8968             anObj.SetParameters(Parameters)
8969             self._autoPublish(anObj, theName, "scaled")
8970             return anObj
8971
8972         ## Mirror an object relatively the given plane.
8973         #  @param theObject The object to be mirrored.
8974         #  @param thePlane Plane of symmetry.
8975         #  @param theCopy Flag used to mirror object itself or create a copy.
8976         #  @return Mirrored @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
8977         #  new GEOM.GEOM_Object, containing the mirrored object if @a theCopy flag is @c True.
8978         @ManageTransactions("TrsfOp")
8979         def MirrorByPlane(self, theObject, thePlane, theCopy=False):
8980             """
8981             Mirror an object relatively the given plane.
8982
8983             Parameters:
8984                 theObject The object to be mirrored.
8985                 thePlane Plane of symmetry.
8986                 theCopy Flag used to mirror object itself or create a copy.
8987
8988             Returns:
8989                 Mirrored theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
8990                 new GEOM.GEOM_Object, containing the mirrored object if theCopy flag is True.
8991             """
8992             if theCopy:
8993                 anObj = self.TrsfOp.MirrorPlaneCopy(theObject, thePlane)
8994             else:
8995                 anObj = self.TrsfOp.MirrorPlane(theObject, thePlane)
8996             RaiseIfFailed("MirrorByPlane", self.TrsfOp)
8997             return anObj
8998
8999         ## Create an object, symmetrical
9000         #  to the given one relatively the given plane.
9001         #  @param theObject The object to be mirrored.
9002         #  @param thePlane Plane of symmetry.
9003         #  @param theName Object name; when specified, this parameter is used
9004         #         for result publication in the study. Otherwise, if automatic
9005         #         publication is switched on, default value is used for result name.
9006         #
9007         #  @return New GEOM.GEOM_Object, containing the mirrored shape.
9008         #
9009         #  @ref tui_mirror "Example"
9010         @ManageTransactions("TrsfOp")
9011         def MakeMirrorByPlane(self, theObject, thePlane, theName=None):
9012             """
9013             Create an object, symmetrical to the given one relatively the given plane.
9014
9015             Parameters:
9016                 theObject The object to be mirrored.
9017                 thePlane Plane of symmetry.
9018                 theName Object name; when specified, this parameter is used
9019                         for result publication in the study. Otherwise, if automatic
9020                         publication is switched on, default value is used for result name.
9021
9022             Returns:
9023                 New GEOM.GEOM_Object, containing the mirrored shape.
9024             """
9025             # Example: see GEOM_TestAll.py
9026             anObj = self.TrsfOp.MirrorPlaneCopy(theObject, thePlane)
9027             RaiseIfFailed("MirrorPlaneCopy", self.TrsfOp)
9028             self._autoPublish(anObj, theName, "mirrored")
9029             return anObj
9030
9031         ## Mirror an object relatively the given axis.
9032         #  @param theObject The object to be mirrored.
9033         #  @param theAxis Axis of symmetry.
9034         #  @param theCopy Flag used to mirror object itself or create a copy.
9035         #  @return Mirrored @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
9036         #  new GEOM.GEOM_Object, containing the mirrored object if @a theCopy flag is @c True.
9037         @ManageTransactions("TrsfOp")
9038         def MirrorByAxis(self, theObject, theAxis, theCopy=False):
9039             """
9040             Mirror an object relatively the given axis.
9041
9042             Parameters:
9043                 theObject The object to be mirrored.
9044                 theAxis Axis of symmetry.
9045                 theCopy Flag used to mirror object itself or create a copy.
9046
9047             Returns:
9048                 Mirrored theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
9049                 new GEOM.GEOM_Object, containing the mirrored object if theCopy flag is True.
9050             """
9051             if theCopy:
9052                 anObj = self.TrsfOp.MirrorAxisCopy(theObject, theAxis)
9053             else:
9054                 anObj = self.TrsfOp.MirrorAxis(theObject, theAxis)
9055             RaiseIfFailed("MirrorByAxis", self.TrsfOp)
9056             return anObj
9057
9058         ## Create an object, symmetrical
9059         #  to the given one relatively the given axis.
9060         #  @param theObject The object to be mirrored.
9061         #  @param theAxis Axis of symmetry.
9062         #  @param theName Object name; when specified, this parameter is used
9063         #         for result publication in the study. Otherwise, if automatic
9064         #         publication is switched on, default value is used for result name.
9065         #
9066         #  @return New GEOM.GEOM_Object, containing the mirrored shape.
9067         #
9068         #  @ref tui_mirror "Example"
9069         @ManageTransactions("TrsfOp")
9070         def MakeMirrorByAxis(self, theObject, theAxis, theName=None):
9071             """
9072             Create an object, symmetrical to the given one relatively the given axis.
9073
9074             Parameters:
9075                 theObject The object to be mirrored.
9076                 theAxis Axis of symmetry.
9077                 theName Object name; when specified, this parameter is used
9078                         for result publication in the study. Otherwise, if automatic
9079                         publication is switched on, default value is used for result name.
9080
9081             Returns:
9082                 New GEOM.GEOM_Object, containing the mirrored shape.
9083             """
9084             # Example: see GEOM_TestAll.py
9085             anObj = self.TrsfOp.MirrorAxisCopy(theObject, theAxis)
9086             RaiseIfFailed("MirrorAxisCopy", self.TrsfOp)
9087             self._autoPublish(anObj, theName, "mirrored")
9088             return anObj
9089
9090         ## Mirror an object relatively the given point.
9091         #  @param theObject The object to be mirrored.
9092         #  @param thePoint Point of symmetry.
9093         #  @param theCopy Flag used to mirror object itself or create a copy.
9094         #  @return Mirrored @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
9095         #  new GEOM.GEOM_Object, containing the mirrored object if @a theCopy flag is @c True.
9096         @ManageTransactions("TrsfOp")
9097         def MirrorByPoint(self, theObject, thePoint, theCopy=False):
9098             """
9099             Mirror an object relatively the given point.
9100
9101             Parameters:
9102                 theObject The object to be mirrored.
9103                 thePoint Point of symmetry.
9104                 theCopy Flag used to mirror object itself or create a copy.
9105
9106             Returns:
9107                 Mirrored theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
9108                 new GEOM.GEOM_Object, containing the mirrored object if theCopy flag is True.
9109             """
9110             # Example: see GEOM_TestAll.py
9111             if theCopy:
9112                 anObj = self.TrsfOp.MirrorPointCopy(theObject, thePoint)
9113             else:
9114                 anObj = self.TrsfOp.MirrorPoint(theObject, thePoint)
9115             RaiseIfFailed("MirrorByPoint", self.TrsfOp)
9116             return anObj
9117
9118         ## Create an object, symmetrical
9119         #  to the given one relatively the given point.
9120         #  @param theObject The object to be mirrored.
9121         #  @param thePoint Point of symmetry.
9122         #  @param theName Object name; when specified, this parameter is used
9123         #         for result publication in the study. Otherwise, if automatic
9124         #         publication is switched on, default value is used for result name.
9125         #
9126         #  @return New GEOM.GEOM_Object, containing the mirrored shape.
9127         #
9128         #  @ref tui_mirror "Example"
9129         @ManageTransactions("TrsfOp")
9130         def MakeMirrorByPoint(self, theObject, thePoint, theName=None):
9131             """
9132             Create an object, symmetrical
9133             to the given one relatively the given point.
9134
9135             Parameters:
9136                 theObject The object to be mirrored.
9137                 thePoint Point of symmetry.
9138                 theName Object name; when specified, this parameter is used
9139                         for result publication in the study. Otherwise, if automatic
9140                         publication is switched on, default value is used for result name.
9141
9142             Returns:
9143                 New GEOM.GEOM_Object, containing the mirrored shape.
9144             """
9145             # Example: see GEOM_TestAll.py
9146             anObj = self.TrsfOp.MirrorPointCopy(theObject, thePoint)
9147             RaiseIfFailed("MirrorPointCopy", self.TrsfOp)
9148             self._autoPublish(anObj, theName, "mirrored")
9149             return anObj
9150
9151         ## Modify the location of the given object.
9152         #  @param theObject The object to be displaced.
9153         #  @param theStartLCS Coordinate system to perform displacement from it.\n
9154         #                     If \a theStartLCS is NULL, displacement
9155         #                     will be performed from global CS.\n
9156         #                     If \a theObject itself is used as \a theStartLCS,
9157         #                     its location will be changed to \a theEndLCS.
9158         #  @param theEndLCS Coordinate system to perform displacement to it.
9159         #  @param theCopy Flag used to displace object itself or create a copy.
9160         #  @return Displaced @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
9161         #  new GEOM.GEOM_Object, containing the displaced object if @a theCopy flag is @c True.
9162         @ManageTransactions("TrsfOp")
9163         def Position(self, theObject, theStartLCS, theEndLCS, theCopy=False):
9164             """
9165             Modify the Location of the given object by LCS, creating its copy before the setting.
9166
9167             Parameters:
9168                 theObject The object to be displaced.
9169                 theStartLCS Coordinate system to perform displacement from it.
9170                             If theStartLCS is NULL, displacement
9171                             will be performed from global CS.
9172                             If theObject itself is used as theStartLCS,
9173                             its location will be changed to theEndLCS.
9174                 theEndLCS Coordinate system to perform displacement to it.
9175                 theCopy Flag used to displace object itself or create a copy.
9176
9177             Returns:
9178                 Displaced theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
9179                 new GEOM.GEOM_Object, containing the displaced object if theCopy flag is True.
9180             """
9181             # Example: see GEOM_TestAll.py
9182             if theCopy:
9183                 anObj = self.TrsfOp.PositionShapeCopy(theObject, theStartLCS, theEndLCS)
9184             else:
9185                 anObj = self.TrsfOp.PositionShape(theObject, theStartLCS, theEndLCS)
9186             RaiseIfFailed("Displace", self.TrsfOp)
9187             return anObj
9188
9189         ## Modify the Location of the given object by LCS,
9190         #  creating its copy before the setting.
9191         #  @param theObject The object to be displaced.
9192         #  @param theStartLCS Coordinate system to perform displacement from it.\n
9193         #                     If \a theStartLCS is NULL, displacement
9194         #                     will be performed from global CS.\n
9195         #                     If \a theObject itself is used as \a theStartLCS,
9196         #                     its location will be changed to \a theEndLCS.
9197         #  @param theEndLCS Coordinate system to perform displacement to it.
9198         #  @param theName Object name; when specified, this parameter is used
9199         #         for result publication in the study. Otherwise, if automatic
9200         #         publication is switched on, default value is used for result name.
9201         #
9202         #  @return New GEOM.GEOM_Object, containing the displaced shape.
9203         #
9204         #  @ref tui_modify_location "Example"
9205         @ManageTransactions("TrsfOp")
9206         def MakePosition(self, theObject, theStartLCS, theEndLCS, theName=None):
9207             """
9208             Modify the Location of the given object by LCS, creating its copy before the setting.
9209
9210             Parameters:
9211                 theObject The object to be displaced.
9212                 theStartLCS Coordinate system to perform displacement from it.
9213                             If theStartLCS is NULL, displacement
9214                             will be performed from global CS.
9215                             If theObject itself is used as theStartLCS,
9216                             its location will be changed to theEndLCS.
9217                 theEndLCS Coordinate system to perform displacement to it.
9218                 theName Object name; when specified, this parameter is used
9219                         for result publication in the study. Otherwise, if automatic
9220                         publication is switched on, default value is used for result name.
9221
9222             Returns:
9223                 New GEOM.GEOM_Object, containing the displaced shape.
9224
9225             Example of usage:
9226                 # create local coordinate systems
9227                 cs1 = geompy.MakeMarker( 0, 0, 0, 1,0,0, 0,1,0)
9228                 cs2 = geompy.MakeMarker(30,40,40, 1,0,0, 0,1,0)
9229                 # modify the location of the given object
9230                 position = geompy.MakePosition(cylinder, cs1, cs2)
9231             """
9232             # Example: see GEOM_TestAll.py
9233             anObj = self.TrsfOp.PositionShapeCopy(theObject, theStartLCS, theEndLCS)
9234             RaiseIfFailed("PositionShapeCopy", self.TrsfOp)
9235             self._autoPublish(anObj, theName, "displaced")
9236             return anObj
9237
9238         ## Modify the Location of the given object by Path.
9239         #  @param  theObject The object to be displaced.
9240         #  @param  thePath Wire or Edge along that the object will be translated.
9241         #  @param  theDistance progress of Path (0 = start location, 1 = end of path location).
9242         #  @param  theCopy is to create a copy objects if true.
9243         #  @param  theReverse  0 - for usual direction, 1 - to reverse path direction.
9244         #  @return Displaced @a theObject (GEOM.GEOM_Object) if @a theCopy is @c False or
9245         #          new GEOM.GEOM_Object, containing the displaced shape if @a theCopy is @c True.
9246         #
9247         #  @ref tui_modify_location "Example"
9248         @ManageTransactions("TrsfOp")
9249         def PositionAlongPath(self,theObject, thePath, theDistance, theCopy, theReverse):
9250             """
9251             Modify the Location of the given object by Path.
9252
9253             Parameters:
9254                  theObject The object to be displaced.
9255                  thePath Wire or Edge along that the object will be translated.
9256                  theDistance progress of Path (0 = start location, 1 = end of path location).
9257                  theCopy is to create a copy objects if true.
9258                  theReverse  0 - for usual direction, 1 - to reverse path direction.
9259
9260             Returns:
9261                  Displaced theObject (GEOM.GEOM_Object) if theCopy is False or
9262                  new GEOM.GEOM_Object, containing the displaced shape if theCopy is True.
9263
9264             Example of usage:
9265                 position = geompy.PositionAlongPath(cylinder, circle, 0.75, 1, 1)
9266             """
9267             # Example: see GEOM_TestAll.py
9268             anObj = self.TrsfOp.PositionAlongPath(theObject, thePath, theDistance, theCopy, theReverse)
9269             RaiseIfFailed("PositionAlongPath", self.TrsfOp)
9270             return anObj
9271
9272         ## Modify the Location of the given object by Path, creating its copy before the operation.
9273         #  @param theObject The object to be displaced.
9274         #  @param thePath Wire or Edge along that the object will be translated.
9275         #  @param theDistance progress of Path (0 = start location, 1 = end of path location).
9276         #  @param theReverse  0 - for usual direction, 1 - to reverse path direction.
9277         #  @param theName Object name; when specified, this parameter is used
9278         #         for result publication in the study. Otherwise, if automatic
9279         #         publication is switched on, default value is used for result name.
9280         #
9281         #  @return New GEOM.GEOM_Object, containing the displaced shape.
9282         @ManageTransactions("TrsfOp")
9283         def MakePositionAlongPath(self, theObject, thePath, theDistance, theReverse, theName=None):
9284             """
9285             Modify the Location of the given object by Path, creating its copy before the operation.
9286
9287             Parameters:
9288                  theObject The object to be displaced.
9289                  thePath Wire or Edge along that the object will be translated.
9290                  theDistance progress of Path (0 = start location, 1 = end of path location).
9291                  theReverse  0 - for usual direction, 1 - to reverse path direction.
9292                  theName Object name; when specified, this parameter is used
9293                          for result publication in the study. Otherwise, if automatic
9294                          publication is switched on, default value is used for result name.
9295
9296             Returns:
9297                 New GEOM.GEOM_Object, containing the displaced shape.
9298             """
9299             # Example: see GEOM_TestAll.py
9300             anObj = self.TrsfOp.PositionAlongPath(theObject, thePath, theDistance, 1, theReverse)
9301             RaiseIfFailed("PositionAlongPath", self.TrsfOp)
9302             self._autoPublish(anObj, theName, "displaced")
9303             return anObj
9304
9305         ## Offset given shape.
9306         #  @param theObject The base object for the offset.
9307         #  @param theOffset Offset value.
9308         #  @param theCopy Flag used to offset object itself or create a copy.
9309         #  @return Modified @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
9310         #  new GEOM.GEOM_Object, containing the result of offset operation if @a theCopy flag is @c True.
9311         @ManageTransactions("TrsfOp")
9312         def Offset(self, theObject, theOffset, theCopy=False):
9313             """
9314             Offset given shape.
9315
9316             Parameters:
9317                 theObject The base object for the offset.
9318                 theOffset Offset value.
9319                 theCopy Flag used to offset object itself or create a copy.
9320
9321             Returns:
9322                 Modified theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
9323                 new GEOM.GEOM_Object, containing the result of offset operation if theCopy flag is True.
9324             """
9325             theOffset, Parameters = ParseParameters(theOffset)
9326             if theCopy:
9327                 anObj = self.TrsfOp.OffsetShapeCopy(theObject, theOffset, True)
9328             else:
9329                 anObj = self.TrsfOp.OffsetShape(theObject, theOffset, True)
9330             RaiseIfFailed("Offset", self.TrsfOp)
9331             anObj.SetParameters(Parameters)
9332             return anObj
9333
9334         ## Create new object as offset of the given one. Gap between two adjacent
9335         #  offset surfaces is filled by a pipe.
9336         #  @param theObject The base object for the offset.
9337         #  @param theOffset Offset value.
9338         #  @param theName Object name; when specified, this parameter is used
9339         #         for result publication in the study. Otherwise, if automatic
9340         #         publication is switched on, default value is used for result name.
9341         #
9342         #  @return New GEOM.GEOM_Object, containing the offset object.
9343         #
9344         #  @sa MakeOffsetIntersectionJoin
9345         #  @ref tui_offset "Example"
9346         @ManageTransactions("TrsfOp")
9347         def MakeOffset(self, theObject, theOffset, theName=None):
9348             """
9349             Create new object as offset of the given one. Gap between adjacent
9350             offset surfaces is filled by a pipe.
9351
9352             Parameters:
9353                 theObject The base object for the offset.
9354                 theOffset Offset value.
9355                 theName Object name; when specified, this parameter is used
9356                         for result publication in the study. Otherwise, if automatic
9357                         publication is switched on, default value is used for result name.
9358
9359             Returns:
9360                 New GEOM.GEOM_Object, containing the offset object.
9361
9362             Example of usage:
9363                  box = geompy.MakeBox(20, 20, 20, 200, 200, 200)
9364                  # create a new object as offset of the given object
9365                  offset = geompy.MakeOffset(box, 70.)
9366             """
9367             # Example: see GEOM_TestAll.py
9368             theOffset, Parameters = ParseParameters(theOffset)
9369             anObj = self.TrsfOp.OffsetShapeCopy( theObject, theOffset, True )
9370             RaiseIfFailed("OffsetShapeCopy", self.TrsfOp)
9371             anObj.SetParameters(Parameters)
9372             self._autoPublish(anObj, theName, "offset")
9373             return anObj
9374
9375         ## Create new object as offset of the given one. Gap between adjacent
9376         #  offset surfaces is filled by extending and intersecting them.
9377         #  @param theObject The base object for the offset.
9378         #  @param theOffset Offset value.
9379         #  @param theName Object name; when specified, this parameter is used
9380         #         for result publication in the study. Otherwise, if automatic
9381         #         publication is switched on, default value is used for result name.
9382         #
9383         #  @return New GEOM.GEOM_Object, containing the offset object.
9384         #
9385         #  @sa MakeOffset
9386         #  @ref tui_offset "Example"
9387         @ManageTransactions("TrsfOp")
9388         def MakeOffsetIntersectionJoin(self, theObject, theOffset, theName=None):
9389             """
9390             Create new object as offset of the given one. Gap between adjacent
9391             offset surfaces is filled by extending and intersecting them.
9392
9393             Parameters:
9394                 theObject The base object for the offset.
9395                 theOffset Offset value.
9396                 theName Object name; when specified, this parameter is used
9397                         for result publication in the study. Otherwise, if automatic
9398                         publication is switched on, default value is used for result name.
9399
9400             Returns:
9401                 New GEOM.GEOM_Object, containing the offset object.
9402
9403             Example of usage:
9404                  box = geompy.MakeBox(20, 20, 20, 200, 200, 200)
9405                  # create a new box extended by 70
9406                  offset = geompy.MakeOffsetIntersectionJoin(box, 70.)
9407             """
9408             # Example: see GEOM_TestAll.py
9409             theOffset, Parameters = ParseParameters( theOffset )
9410             anObj = self.TrsfOp.OffsetShapeCopy( theObject, theOffset, False )
9411             RaiseIfFailed("OffsetShapeCopy", self.TrsfOp)
9412             anObj.SetParameters(Parameters)
9413             self._autoPublish(anObj, theName, "offset")
9414             return anObj
9415
9416         ## Create new object as projection of the given one on another.
9417         #  @param theSource The source object for the projection. It can be a point, edge or wire.
9418         #         Edge and wire are acceptable if @a theTarget is a face.
9419         #  @param theTarget The target object. It can be planar or cylindrical face, edge or wire.
9420         #  @param theName Object name; when specified, this parameter is used
9421         #         for result publication in the study. Otherwise, if automatic
9422         #         publication is switched on, default value is used for result name.
9423         #
9424         #  @return New GEOM.GEOM_Object, containing the projection.
9425         #
9426         #  @ref tui_projection "Example"
9427         @ManageTransactions("TrsfOp")
9428         def MakeProjection(self, theSource, theTarget, theName=None):
9429             """
9430             Create new object as projection of the given one on another.
9431
9432             Parameters:
9433                 theSource The source object for the projection. It can be a point, edge or wire.
9434                           Edge and wire are acceptable if theTarget is a face.
9435                 theTarget The target object. It can be planar or cylindrical face, edge or wire.
9436                 theName Object name; when specified, this parameter is used
9437                         for result publication in the study. Otherwise, if automatic
9438                         publication is switched on, default value is used for result name.
9439
9440             Returns:
9441                 New GEOM.GEOM_Object, containing the projection.
9442             """
9443             # Example: see GEOM_TestAll.py
9444             anObj = self.TrsfOp.ProjectShapeCopy(theSource, theTarget)
9445             RaiseIfFailed("ProjectShapeCopy", self.TrsfOp)
9446             self._autoPublish(anObj, theName, "projection")
9447             return anObj
9448
9449         ## Create a projection of the given point on a wire or an edge.
9450         #  If there are no solutions or there are 2 or more solutions It throws an
9451         #  exception.
9452         #  @param thePoint the point to be projected.
9453         #  @param theWire the wire. The edge is accepted as well.
9454         #  @param theName Object name; when specified, this parameter is used
9455         #         for result publication in the study. Otherwise, if automatic
9456         #         publication is switched on, default value is used for result name.
9457         #
9458         #  @return [\a u, \a PointOnEdge, \a EdgeInWireIndex]
9459         #  \n \a u: The parameter of projection point on edge.
9460         #  \n \a PointOnEdge: The projection point.
9461         #  \n \a EdgeInWireIndex: The index of an edge in a wire.
9462         #
9463         #  @ref tui_projection "Example"
9464         @ManageTransactions("TrsfOp")
9465         def MakeProjectionOnWire(self, thePoint, theWire, theName=None):
9466             """
9467             Create a projection of the given point on a wire or an edge.
9468             If there are no solutions or there are 2 or more solutions It throws an
9469             exception.
9470
9471             Parameters:
9472                 thePoint the point to be projected.
9473                 theWire the wire. The edge is accepted as well.
9474                 theName Object name; when specified, this parameter is used
9475                         for result publication in the study. Otherwise, if automatic
9476                         publication is switched on, default value is used for result name.
9477
9478             Returns:
9479                 [u, PointOnEdge, EdgeInWireIndex]
9480                  u: The parameter of projection point on edge.
9481                  PointOnEdge: The projection point.
9482                  EdgeInWireIndex: The index of an edge in a wire.
9483             """
9484             # Example: see GEOM_TestAll.py
9485             anObj = self.TrsfOp.ProjectPointOnWire(thePoint, theWire)
9486             RaiseIfFailed("ProjectPointOnWire", self.TrsfOp)
9487             self._autoPublish(anObj[1], theName, "projection")
9488             return anObj
9489
9490         # -----------------------------------------------------------------------------
9491         # Patterns
9492         # -----------------------------------------------------------------------------
9493
9494         ## Translate the given object along the given vector a given number times
9495         #  @param theObject The object to be translated.
9496         #  @param theVector Direction of the translation. DX if None.
9497         #  @param theStep Distance to translate on.
9498         #  @param theNbTimes Quantity of translations to be done.
9499         #  @param theName Object name; when specified, this parameter is used
9500         #         for result publication in the study. Otherwise, if automatic
9501         #         publication is switched on, default value is used for result name.
9502         #
9503         #  @return New GEOM.GEOM_Object, containing compound of all
9504         #          the shapes, obtained after each translation.
9505         #
9506         #  @ref tui_multi_translation "Example"
9507         @ManageTransactions("TrsfOp")
9508         def MakeMultiTranslation1D(self, theObject, theVector, theStep, theNbTimes, theName=None):
9509             """
9510             Translate the given object along the given vector a given number times
9511
9512             Parameters:
9513                 theObject The object to be translated.
9514                 theVector Direction of the translation. DX if None.
9515                 theStep Distance to translate on.
9516                 theNbTimes Quantity of translations to be done.
9517                 theName Object name; when specified, this parameter is used
9518                         for result publication in the study. Otherwise, if automatic
9519                         publication is switched on, default value is used for result name.
9520
9521             Returns:
9522                 New GEOM.GEOM_Object, containing compound of all
9523                 the shapes, obtained after each translation.
9524
9525             Example of usage:
9526                 r1d = geompy.MakeMultiTranslation1D(prism, vect, 20, 4)
9527             """
9528             # Example: see GEOM_TestAll.py
9529             theStep, theNbTimes, Parameters = ParseParameters(theStep, theNbTimes)
9530             anObj = self.TrsfOp.MultiTranslate1D(theObject, theVector, theStep, theNbTimes)
9531             RaiseIfFailed("MultiTranslate1D", self.TrsfOp)
9532             anObj.SetParameters(Parameters)
9533             self._autoPublish(anObj, theName, "multitranslation")
9534             return anObj
9535
9536         ## Conseqently apply two specified translations to theObject specified number of times.
9537         #  @param theObject The object to be translated.
9538         #  @param theVector1 Direction of the first translation. DX if None.
9539         #  @param theStep1 Step of the first translation.
9540         #  @param theNbTimes1 Quantity of translations to be done along theVector1.
9541         #  @param theVector2 Direction of the second translation. DY if None.
9542         #  @param theStep2 Step of the second translation.
9543         #  @param theNbTimes2 Quantity of translations to be done along theVector2.
9544         #  @param theName Object name; when specified, this parameter is used
9545         #         for result publication in the study. Otherwise, if automatic
9546         #         publication is switched on, default value is used for result name.
9547         #
9548         #  @return New GEOM.GEOM_Object, containing compound of all
9549         #          the shapes, obtained after each translation.
9550         #
9551         #  @ref tui_multi_translation "Example"
9552         @ManageTransactions("TrsfOp")
9553         def MakeMultiTranslation2D(self, theObject, theVector1, theStep1, theNbTimes1,
9554                                    theVector2, theStep2, theNbTimes2, theName=None):
9555             """
9556             Conseqently apply two specified translations to theObject specified number of times.
9557
9558             Parameters:
9559                 theObject The object to be translated.
9560                 theVector1 Direction of the first translation. DX if None.
9561                 theStep1 Step of the first translation.
9562                 theNbTimes1 Quantity of translations to be done along theVector1.
9563                 theVector2 Direction of the second translation. DY if None.
9564                 theStep2 Step of the second translation.
9565                 theNbTimes2 Quantity of translations to be done along theVector2.
9566                 theName Object name; when specified, this parameter is used
9567                         for result publication in the study. Otherwise, if automatic
9568                         publication is switched on, default value is used for result name.
9569
9570             Returns:
9571                 New GEOM.GEOM_Object, containing compound of all
9572                 the shapes, obtained after each translation.
9573
9574             Example of usage:
9575                 tr2d = geompy.MakeMultiTranslation2D(prism, vect1, 20, 4, vect2, 80, 3)
9576             """
9577             # Example: see GEOM_TestAll.py
9578             theStep1,theNbTimes1,theStep2,theNbTimes2, Parameters = ParseParameters(theStep1,theNbTimes1,theStep2,theNbTimes2)
9579             anObj = self.TrsfOp.MultiTranslate2D(theObject, theVector1, theStep1, theNbTimes1,
9580                                                  theVector2, theStep2, theNbTimes2)
9581             RaiseIfFailed("MultiTranslate2D", self.TrsfOp)
9582             anObj.SetParameters(Parameters)
9583             self._autoPublish(anObj, theName, "multitranslation")
9584             return anObj
9585
9586         ## Rotate the given object around the given axis a given number times.
9587         #  Rotation angle will be 2*PI/theNbTimes.
9588         #  @param theObject The object to be rotated.
9589         #  @param theAxis The rotation axis. DZ if None.
9590         #  @param theNbTimes Quantity of rotations to be done.
9591         #  @param theName Object name; when specified, this parameter is used
9592         #         for result publication in the study. Otherwise, if automatic
9593         #         publication is switched on, default value is used for result name.
9594         #
9595         #  @return New GEOM.GEOM_Object, containing compound of all the
9596         #          shapes, obtained after each rotation.
9597         #
9598         #  @ref tui_multi_rotation "Example"
9599         @ManageTransactions("TrsfOp")
9600         def MultiRotate1DNbTimes (self, theObject, theAxis, theNbTimes, theName=None):
9601             """
9602             Rotate the given object around the given axis a given number times.
9603             Rotation angle will be 2*PI/theNbTimes.
9604
9605             Parameters:
9606                 theObject The object to be rotated.
9607                 theAxis The rotation axis. DZ if None.
9608                 theNbTimes Quantity of rotations to be done.
9609                 theName Object name; when specified, this parameter is used
9610                         for result publication in the study. Otherwise, if automatic
9611                         publication is switched on, default value is used for result name.
9612
9613             Returns:
9614                 New GEOM.GEOM_Object, containing compound of all the
9615                 shapes, obtained after each rotation.
9616
9617             Example of usage:
9618                 rot1d = geompy.MultiRotate1DNbTimes(prism, vect, 4)
9619             """
9620             # Example: see GEOM_TestAll.py
9621             theNbTimes, Parameters = ParseParameters(theNbTimes)
9622             anObj = self.TrsfOp.MultiRotate1D(theObject, theAxis, theNbTimes)
9623             RaiseIfFailed("MultiRotate1DNbTimes", self.TrsfOp)
9624             anObj.SetParameters(Parameters)
9625             self._autoPublish(anObj, theName, "multirotation")
9626             return anObj
9627
9628         ## Rotate the given object around the given axis
9629         #  a given number times on the given angle.
9630         #  @param theObject The object to be rotated.
9631         #  @param theAxis The rotation axis. DZ if None.
9632         #  @param theAngleStep Rotation angle in radians.
9633         #  @param theNbTimes Quantity of rotations to be done.
9634         #  @param theName Object name; when specified, this parameter is used
9635         #         for result publication in the study. Otherwise, if automatic
9636         #         publication is switched on, default value is used for result name.
9637         #
9638         #  @return New GEOM.GEOM_Object, containing compound of all the
9639         #          shapes, obtained after each rotation.
9640         #
9641         #  @ref tui_multi_rotation "Example"
9642         @ManageTransactions("TrsfOp")
9643         def MultiRotate1DByStep(self, theObject, theAxis, theAngleStep, theNbTimes, theName=None):
9644             """
9645             Rotate the given object around the given axis
9646             a given number times on the given angle.
9647
9648             Parameters:
9649                 theObject The object to be rotated.
9650                 theAxis The rotation axis. DZ if None.
9651                 theAngleStep Rotation angle in radians.
9652                 theNbTimes Quantity of rotations to be done.
9653                 theName Object name; when specified, this parameter is used
9654                         for result publication in the study. Otherwise, if automatic
9655                         publication is switched on, default value is used for result name.
9656
9657             Returns:
9658                 New GEOM.GEOM_Object, containing compound of all the
9659                 shapes, obtained after each rotation.
9660
9661             Example of usage:
9662                 rot1d = geompy.MultiRotate1DByStep(prism, vect, math.pi/4, 4)
9663             """
9664             # Example: see GEOM_TestAll.py
9665             theAngleStep, theNbTimes, Parameters = ParseParameters(theAngleStep, theNbTimes)
9666             anObj = self.TrsfOp.MultiRotate1DByStep(theObject, theAxis, theAngleStep, theNbTimes)
9667             RaiseIfFailed("MultiRotate1DByStep", self.TrsfOp)
9668             anObj.SetParameters(Parameters)
9669             self._autoPublish(anObj, theName, "multirotation")
9670             return anObj
9671
9672         ## Rotate the given object around the given axis a given
9673         #  number times and multi-translate each rotation result.
9674         #  Rotation angle will be 2*PI/theNbTimes1.
9675         #  Translation direction passes through center of gravity
9676         #  of rotated shape and its projection on the rotation axis.
9677         #  @param theObject The object to be rotated.
9678         #  @param theAxis Rotation axis. DZ if None.
9679         #  @param theNbTimes1 Quantity of rotations to be done.
9680         #  @param theRadialStep Translation distance.
9681         #  @param theNbTimes2 Quantity of translations to be done.
9682         #  @param theName Object name; when specified, this parameter is used
9683         #         for result publication in the study. Otherwise, if automatic
9684         #         publication is switched on, default value is used for result name.
9685         #
9686         #  @return New GEOM.GEOM_Object, containing compound of all the
9687         #          shapes, obtained after each transformation.
9688         #
9689         #  @ref tui_multi_rotation "Example"
9690         @ManageTransactions("TrsfOp")
9691         def MultiRotate2DNbTimes(self, theObject, theAxis, theNbTimes1, theRadialStep, theNbTimes2, theName=None):
9692             """
9693             Rotate the given object around the
9694             given axis on the given angle a given number
9695             times and multi-translate each rotation result.
9696             Translation direction passes through center of gravity
9697             of rotated shape and its projection on the rotation axis.
9698
9699             Parameters:
9700                 theObject The object to be rotated.
9701                 theAxis Rotation axis. DZ if None.
9702                 theNbTimes1 Quantity of rotations to be done.
9703                 theRadialStep Translation distance.
9704                 theNbTimes2 Quantity of translations to be done.
9705                 theName Object name; when specified, this parameter is used
9706                         for result publication in the study. Otherwise, if automatic
9707                         publication is switched on, default value is used for result name.
9708
9709             Returns:
9710                 New GEOM.GEOM_Object, containing compound of all the
9711                 shapes, obtained after each transformation.
9712
9713             Example of usage:
9714                 rot2d = geompy.MultiRotate2D(prism, vect, 60, 4, 50, 5)
9715             """
9716             # Example: see GEOM_TestAll.py
9717             theNbTimes1, theRadialStep, theNbTimes2, Parameters = ParseParameters(theNbTimes1, theRadialStep, theNbTimes2)
9718             anObj = self.TrsfOp.MultiRotate2DNbTimes(theObject, theAxis, theNbTimes1, theRadialStep, theNbTimes2)
9719             RaiseIfFailed("MultiRotate2DNbTimes", self.TrsfOp)
9720             anObj.SetParameters(Parameters)
9721             self._autoPublish(anObj, theName, "multirotation")
9722             return anObj
9723
9724         ## Rotate the given object around the
9725         #  given axis on the given angle a given number
9726         #  times and multi-translate each rotation result.
9727         #  Translation direction passes through center of gravity
9728         #  of rotated shape and its projection on the rotation axis.
9729         #  @param theObject The object to be rotated.
9730         #  @param theAxis Rotation axis. DZ if None.
9731         #  @param theAngleStep Rotation angle in radians.
9732         #  @param theNbTimes1 Quantity of rotations to be done.
9733         #  @param theRadialStep Translation distance.
9734         #  @param theNbTimes2 Quantity of translations to be done.
9735         #  @param theName Object name; when specified, this parameter is used
9736         #         for result publication in the study. Otherwise, if automatic
9737         #         publication is switched on, default value is used for result name.
9738         #
9739         #  @return New GEOM.GEOM_Object, containing compound of all the
9740         #          shapes, obtained after each transformation.
9741         #
9742         #  @ref tui_multi_rotation "Example"
9743         @ManageTransactions("TrsfOp")
9744         def MultiRotate2DByStep (self, theObject, theAxis, theAngleStep, theNbTimes1, theRadialStep, theNbTimes2, theName=None):
9745             """
9746             Rotate the given object around the
9747             given axis on the given angle a given number
9748             times and multi-translate each rotation result.
9749             Translation direction passes through center of gravity
9750             of rotated shape and its projection on the rotation axis.
9751
9752             Parameters:
9753                 theObject The object to be rotated.
9754                 theAxis Rotation axis. DZ if None.
9755                 theAngleStep Rotation angle in radians.
9756                 theNbTimes1 Quantity of rotations to be done.
9757                 theRadialStep Translation distance.
9758                 theNbTimes2 Quantity of translations to be done.
9759                 theName Object name; when specified, this parameter is used
9760                         for result publication in the study. Otherwise, if automatic
9761                         publication is switched on, default value is used for result name.
9762
9763             Returns:
9764                 New GEOM.GEOM_Object, containing compound of all the
9765                 shapes, obtained after each transformation.
9766
9767             Example of usage:
9768                 rot2d = geompy.MultiRotate2D(prism, vect, math.pi/3, 4, 50, 5)
9769             """
9770             # Example: see GEOM_TestAll.py
9771             theAngleStep, theNbTimes1, theRadialStep, theNbTimes2, Parameters = ParseParameters(theAngleStep, theNbTimes1, theRadialStep, theNbTimes2)
9772             anObj = self.TrsfOp.MultiRotate2DByStep(theObject, theAxis, theAngleStep, theNbTimes1, theRadialStep, theNbTimes2)
9773             RaiseIfFailed("MultiRotate2DByStep", self.TrsfOp)
9774             anObj.SetParameters(Parameters)
9775             self._autoPublish(anObj, theName, "multirotation")
9776             return anObj
9777
9778         ## The same, as MultiRotate1DNbTimes(), but axis is given by direction and point
9779         #
9780         #  @ref swig_MakeMultiRotation "Example"
9781         def MakeMultiRotation1DNbTimes(self, aShape, aDir, aPoint, aNbTimes, theName=None):
9782             """
9783             The same, as geompy.MultiRotate1DNbTimes, but axis is given by direction and point
9784
9785             Example of usage:
9786                 pz = geompy.MakeVertex(0, 0, 100)
9787                 vy = geompy.MakeVectorDXDYDZ(0, 100, 0)
9788                 MultiRot1D = geompy.MakeMultiRotation1DNbTimes(prism, vy, pz, 6)
9789             """
9790             # Example: see GEOM_TestOthers.py
9791             aVec = self.MakeLine(aPoint,aDir)
9792             # note: auto-publishing is done in self.MultiRotate1D()
9793             anObj = self.MultiRotate1DNbTimes(aShape, aVec, aNbTimes, theName)
9794             return anObj
9795
9796         ## The same, as MultiRotate1DByStep(), but axis is given by direction and point
9797         #
9798         #  @ref swig_MakeMultiRotation "Example"
9799         def MakeMultiRotation1DByStep(self, aShape, aDir, aPoint, anAngle, aNbTimes, theName=None):
9800             """
9801             The same, as geompy.MultiRotate1D, but axis is given by direction and point
9802
9803             Example of usage:
9804                 pz = geompy.MakeVertex(0, 0, 100)
9805                 vy = geompy.MakeVectorDXDYDZ(0, 100, 0)
9806                 MultiRot1D = geompy.MakeMultiRotation1DByStep(prism, vy, pz, math.pi/3, 6)
9807             """
9808             # Example: see GEOM_TestOthers.py
9809             aVec = self.MakeLine(aPoint,aDir)
9810             # note: auto-publishing is done in self.MultiRotate1D()
9811             anObj = self.MultiRotate1DByStep(aShape, aVec, anAngle, aNbTimes, theName)
9812             return anObj
9813
9814         ## The same, as MultiRotate2DNbTimes(), but axis is given by direction and point
9815         #
9816         #  @ref swig_MakeMultiRotation "Example"
9817         def MakeMultiRotation2DNbTimes(self, aShape, aDir, aPoint, nbtimes1, aStep, nbtimes2, theName=None):
9818             """
9819             The same, as MultiRotate2DNbTimes(), but axis is given by direction and point
9820
9821             Example of usage:
9822                 pz = geompy.MakeVertex(0, 0, 100)
9823                 vy = geompy.MakeVectorDXDYDZ(0, 100, 0)
9824                 MultiRot2D = geompy.MakeMultiRotation2DNbTimes(f12, vy, pz, 6, 30, 3)
9825             """
9826             # Example: see GEOM_TestOthers.py
9827             aVec = self.MakeLine(aPoint,aDir)
9828             # note: auto-publishing is done in self.MultiRotate2DNbTimes()
9829             anObj = self.MultiRotate2DNbTimes(aShape, aVec, nbtimes1, aStep, nbtimes2, theName)
9830             return anObj
9831
9832         ## The same, as MultiRotate2DByStep(), but axis is given by direction and point
9833         #
9834         #  @ref swig_MakeMultiRotation "Example"
9835         def MakeMultiRotation2DByStep(self, aShape, aDir, aPoint, anAngle, nbtimes1, aStep, nbtimes2, theName=None):
9836             """
9837             The same, as MultiRotate2DByStep(), but axis is given by direction and point
9838
9839             Example of usage:
9840                 pz = geompy.MakeVertex(0, 0, 100)
9841                 vy = geompy.MakeVectorDXDYDZ(0, 100, 0)
9842                 MultiRot2D = geompy.MakeMultiRotation2DByStep(f12, vy, pz, math.pi/4, 6, 30, 3)
9843             """
9844             # Example: see GEOM_TestOthers.py
9845             aVec = self.MakeLine(aPoint,aDir)
9846             # note: auto-publishing is done in self.MultiRotate2D()
9847             anObj = self.MultiRotate2DByStep(aShape, aVec, anAngle, nbtimes1, aStep, nbtimes2, theName)
9848             return anObj
9849
9850         ##
9851         #  Compute a wire or a face that represents a projection of the source
9852         #  shape onto cylinder. The cylinder's coordinate system is the same
9853         #  as the global coordinate system.
9854         #
9855         #  @param theObject The object to be projected. It can be either
9856         #         a planar wire or a face.
9857         #  @param theRadius The radius of the cylinder.
9858         #  @param theStartAngle The starting angle in radians from
9859         #         the cylinder's X axis around Z axis. The angle from which
9860         #         the projection is started.
9861         #  @param theAngleLength The projection length angle in radians.
9862         #         The angle in which to project the total length of the wire.
9863         #         If it is negative the projection is not scaled and natural
9864         #         wire length is kept for the projection.
9865         #  @param theAngleRotation The desired angle in radians between
9866         #         the tangent vector to the first curve at the first point of
9867         #         the theObject's projection in 2D space and U-direction of
9868         #         cylinder's 2D space.
9869         #  @param theName Object name; when specified, this parameter is used
9870         #         for result publication in the study. Otherwise, if automatic
9871         #         publication is switched on, default value is used for result name.
9872         #
9873         #  @return New GEOM.GEOM_Object, containing the result shape. The result
9874         #         represents a wire or a face that represents a projection of
9875         #         the source shape onto a cylinder.
9876         #
9877         #  @ref tui_projection "Example"
9878         def MakeProjectionOnCylinder (self, theObject, theRadius,
9879                                       theStartAngle=0.0, theAngleLength=-1.0,
9880                                       theAngleRotation=0.0,
9881                                       theName=None):
9882             """
9883             Compute a wire or a face that represents a projection of the source
9884             shape onto cylinder. The cylinder's coordinate system is the same
9885             as the global coordinate system.
9886
9887             Parameters:
9888                 theObject The object to be projected. It can be either
9889                         a planar wire or a face.
9890                 theRadius The radius of the cylinder.
9891                 theStartAngle The starting angle in radians from the cylinder's X axis
9892                         around Z axis. The angle from which the projection is started.
9893                 theAngleLength The projection length angle in radians. The angle in which
9894                         to project the total length of the wire. If it is negative the
9895                         projection is not scaled and natural wire length is kept for
9896                         the projection.
9897                 theAngleRotation The desired angle in radians between
9898                         the tangent vector to the first curve at the first
9899                         point of the theObject's projection in 2D space and
9900                         U-direction of cylinder's 2D space.
9901                 theName Object name; when specified, this parameter is used
9902                         for result publication in the study. Otherwise, if automatic
9903                         publication is switched on, default value is used for result name.
9904
9905             Returns:
9906                 New GEOM.GEOM_Object, containing the result shape. The result
9907                 represents a wire or a face that represents a projection of
9908                 the source shape onto a cylinder.
9909             """
9910             # Example: see GEOM_TestAll.py
9911             flagStartAngle = False
9912             if isinstance(theStartAngle,str):
9913                 flagStartAngle = True
9914             flagAngleLength = False
9915             if isinstance(theAngleLength,str):
9916                 flagAngleLength = True
9917             flagAngleRotation = False
9918             if isinstance(theAngleRotation,str):
9919                 flagAngleRotation = True
9920             theRadius, theStartAngle, theAngleLength, theAngleRotation, Parameters = ParseParameters(
9921               theRadius, theStartAngle, theAngleLength, theAngleRotation)
9922             if flagStartAngle:
9923                 theStartAngle = theStartAngle*math.pi/180.
9924             if flagAngleLength:
9925                 theAngleLength = theAngleLength*math.pi/180.
9926             if flagAngleRotation:
9927                 theAngleRotation = theAngleRotation*math.pi/180.
9928             anObj = self.TrsfOp.MakeProjectionOnCylinder(theObject, theRadius,
9929                 theStartAngle, theAngleLength, theAngleRotation)
9930             RaiseIfFailed("MakeProjectionOnCylinder", self.TrsfOp)
9931             anObj.SetParameters(Parameters)
9932             self._autoPublish(anObj, theName, "projection")
9933             return anObj
9934
9935         # end of l3_transform
9936         ## @}
9937
9938         ## @addtogroup l3_transform_d
9939         ## @{
9940
9941         ## Deprecated method. Use MultiRotate1DNbTimes instead.
9942         def MultiRotate1D(self, theObject, theAxis, theNbTimes, theName=None):
9943             """
9944             Deprecated method. Use MultiRotate1DNbTimes instead.
9945             """
9946             print("The method MultiRotate1D is DEPRECATED. Use MultiRotate1DNbTimes instead.")
9947             return self.MultiRotate1DNbTimes(theObject, theAxis, theNbTimes, theName)
9948
9949         ## The same, as MultiRotate2DByStep(), but theAngle is in degrees.
9950         #  This method is DEPRECATED. Use MultiRotate2DByStep() instead.
9951         @ManageTransactions("TrsfOp")
9952         def MultiRotate2D(self, theObject, theAxis, theAngle, theNbTimes1, theStep, theNbTimes2, theName=None):
9953             """
9954             The same, as MultiRotate2DByStep(), but theAngle is in degrees.
9955             This method is DEPRECATED. Use MultiRotate2DByStep() instead.
9956
9957             Example of usage:
9958                 rot2d = geompy.MultiRotate2D(prism, vect, 60, 4, 50, 5)
9959             """
9960             print("The method MultiRotate2D is DEPRECATED. Use MultiRotate2DByStep instead.")
9961             theAngle, theNbTimes1, theStep, theNbTimes2, Parameters = ParseParameters(theAngle, theNbTimes1, theStep, theNbTimes2)
9962             anObj = self.TrsfOp.MultiRotate2D(theObject, theAxis, theAngle, theNbTimes1, theStep, theNbTimes2)
9963             RaiseIfFailed("MultiRotate2D", self.TrsfOp)
9964             anObj.SetParameters(Parameters)
9965             self._autoPublish(anObj, theName, "multirotation")
9966             return anObj
9967
9968         ## The same, as MultiRotate1D(), but axis is given by direction and point
9969         #  This method is DEPRECATED. Use MakeMultiRotation1DNbTimes instead.
9970         def MakeMultiRotation1D(self, aShape, aDir, aPoint, aNbTimes, theName=None):
9971             """
9972             The same, as geompy.MultiRotate1D, but axis is given by direction and point.
9973             This method is DEPRECATED. Use MakeMultiRotation1DNbTimes instead.
9974
9975             Example of usage:
9976                 pz = geompy.MakeVertex(0, 0, 100)
9977                 vy = geompy.MakeVectorDXDYDZ(0, 100, 0)
9978                 MultiRot1D = geompy.MakeMultiRotation1D(prism, vy, pz, 6)
9979             """
9980             print("The method MakeMultiRotation1D is DEPRECATED. Use MakeMultiRotation1DNbTimes instead.")
9981             aVec = self.MakeLine(aPoint,aDir)
9982             # note: auto-publishing is done in self.MultiRotate1D()
9983             anObj = self.MultiRotate1D(aShape, aVec, aNbTimes, theName)
9984             return anObj
9985
9986         ## The same, as MultiRotate2D(), but axis is given by direction and point
9987         #  This method is DEPRECATED. Use MakeMultiRotation2DByStep instead.
9988         def MakeMultiRotation2D(self, aShape, aDir, aPoint, anAngle, nbtimes1, aStep, nbtimes2, theName=None):
9989             """
9990             The same, as MultiRotate2D(), but axis is given by direction and point
9991             This method is DEPRECATED. Use MakeMultiRotation2DByStep instead.
9992
9993             Example of usage:
9994                 pz = geompy.MakeVertex(0, 0, 100)
9995                 vy = geompy.MakeVectorDXDYDZ(0, 100, 0)
9996                 MultiRot2D = geompy.MakeMultiRotation2D(f12, vy, pz, 45, 6, 30, 3)
9997             """
9998             print("The method MakeMultiRotation2D is DEPRECATED. Use MakeMultiRotation2DByStep instead.")
9999             aVec = self.MakeLine(aPoint,aDir)
10000             # note: auto-publishing is done in self.MultiRotate2D()
10001             anObj = self.MultiRotate2D(aShape, aVec, anAngle, nbtimes1, aStep, nbtimes2, theName)
10002             return anObj
10003
10004         # end of l3_transform_d
10005         ## @}
10006
10007         ## @addtogroup l3_local
10008         ## @{
10009
10010         ## Perform a fillet on all edges of the given shape.
10011         #  @param theShape Shape, to perform fillet on.
10012         #  @param theR Fillet radius.
10013         #  @param theName Object name; when specified, this parameter is used
10014         #         for result publication in the study. Otherwise, if automatic
10015         #         publication is switched on, default value is used for result name.
10016         #
10017         #  @return New GEOM.GEOM_Object, containing the result shape.
10018         #
10019         #  @ref tui_fillet "Example 1"
10020         #  \n @ref swig_MakeFilletAll "Example 2"
10021         @ManageTransactions("LocalOp")
10022         def MakeFilletAll(self, theShape, theR, theName=None):
10023             """
10024             Perform a fillet on all edges of the given shape.
10025
10026             Parameters:
10027                 theShape Shape, to perform fillet on.
10028                 theR Fillet radius.
10029                 theName Object name; when specified, this parameter is used
10030                         for result publication in the study. Otherwise, if automatic
10031                         publication is switched on, default value is used for result name.
10032
10033             Returns:
10034                 New GEOM.GEOM_Object, containing the result shape.
10035
10036             Example of usage:
10037                filletall = geompy.MakeFilletAll(prism, 10.)
10038             """
10039             # Example: see GEOM_TestOthers.py
10040             theR,Parameters = ParseParameters(theR)
10041             anObj = self.LocalOp.MakeFilletAll(theShape, theR)
10042             RaiseIfFailed("MakeFilletAll", self.LocalOp)
10043             anObj.SetParameters(Parameters)
10044             self._autoPublish(anObj, theName, "fillet")
10045             return anObj
10046
10047         ## Perform a fillet on the specified edges/faces of the given shape
10048         #  @param theShape Shape, to perform fillet on.
10049         #  @param theR Fillet radius.
10050         #  @param theShapeType Type of shapes in <VAR>theListShapes</VAR> (see ShapeType())
10051         #  @param theListShapes Global indices of edges/faces to perform fillet on.
10052         #  @param theName Object name; when specified, this parameter is used
10053         #         for result publication in the study. Otherwise, if automatic
10054         #         publication is switched on, default value is used for result name.
10055         #
10056         #  @note Global index of sub-shape can be obtained, using method GetSubShapeID().
10057         #
10058         #  @return New GEOM.GEOM_Object, containing the result shape.
10059         #
10060         #  @ref tui_fillet "Example"
10061         @ManageTransactions("LocalOp")
10062         def MakeFillet(self, theShape, theR, theShapeType, theListShapes, theName=None):
10063             """
10064             Perform a fillet on the specified edges/faces of the given shape
10065
10066             Parameters:
10067                 theShape Shape, to perform fillet on.
10068                 theR Fillet radius.
10069                 theShapeType Type of shapes in theListShapes (see geompy.ShapeTypes)
10070                 theListShapes Global indices of edges/faces to perform fillet on.
10071                 theName Object name; when specified, this parameter is used
10072                         for result publication in the study. Otherwise, if automatic
10073                         publication is switched on, default value is used for result name.
10074
10075             Note:
10076                 Global index of sub-shape can be obtained, using method geompy.GetSubShapeID
10077
10078             Returns:
10079                 New GEOM.GEOM_Object, containing the result shape.
10080
10081             Example of usage:
10082                 # get the list of IDs (IDList) for the fillet
10083                 prism_edges = geompy.SubShapeAllSortedCentres(prism, geompy.ShapeType["EDGE"])
10084                 IDlist_e = []
10085                 IDlist_e.append(geompy.GetSubShapeID(prism, prism_edges[0]))
10086                 IDlist_e.append(geompy.GetSubShapeID(prism, prism_edges[1]))
10087                 IDlist_e.append(geompy.GetSubShapeID(prism, prism_edges[2]))
10088                 # make a fillet on the specified edges of the given shape
10089                 fillet = geompy.MakeFillet(prism, 10., geompy.ShapeType["EDGE"], IDlist_e)
10090             """
10091             # Example: see GEOM_TestAll.py
10092             theR,Parameters = ParseParameters(theR)
10093             anObj = None
10094             if theShapeType == self.ShapeType["EDGE"]:
10095                 anObj = self.LocalOp.MakeFilletEdges(theShape, theR, theListShapes)
10096                 RaiseIfFailed("MakeFilletEdges", self.LocalOp)
10097             else:
10098                 anObj = self.LocalOp.MakeFilletFaces(theShape, theR, theListShapes)
10099                 RaiseIfFailed("MakeFilletFaces", self.LocalOp)
10100             anObj.SetParameters(Parameters)
10101             self._autoPublish(anObj, theName, "fillet")
10102             return anObj
10103
10104         ## The same that MakeFillet() but with two Fillet Radius R1 and R2
10105         @ManageTransactions("LocalOp")
10106         def MakeFilletR1R2(self, theShape, theR1, theR2, theShapeType, theListShapes, theName=None):
10107             """
10108             The same that geompy.MakeFillet but with two Fillet Radius R1 and R2
10109
10110             Example of usage:
10111                 # get the list of IDs (IDList) for the fillet
10112                 prism_edges = geompy.SubShapeAllSortedCentres(prism, geompy.ShapeType["EDGE"])
10113                 IDlist_e = []
10114                 IDlist_e.append(geompy.GetSubShapeID(prism, prism_edges[0]))
10115                 IDlist_e.append(geompy.GetSubShapeID(prism, prism_edges[1]))
10116                 IDlist_e.append(geompy.GetSubShapeID(prism, prism_edges[2]))
10117                 # make a fillet on the specified edges of the given shape
10118                 fillet = geompy.MakeFillet(prism, 10., 15., geompy.ShapeType["EDGE"], IDlist_e)
10119             """
10120             theR1,theR2,Parameters = ParseParameters(theR1,theR2)
10121             anObj = None
10122             if theShapeType == self.ShapeType["EDGE"]:
10123                 anObj = self.LocalOp.MakeFilletEdgesR1R2(theShape, theR1, theR2, theListShapes)
10124                 RaiseIfFailed("MakeFilletEdgesR1R2", self.LocalOp)
10125             else:
10126                 anObj = self.LocalOp.MakeFilletFacesR1R2(theShape, theR1, theR2, theListShapes)
10127                 RaiseIfFailed("MakeFilletFacesR1R2", self.LocalOp)
10128             anObj.SetParameters(Parameters)
10129             self._autoPublish(anObj, theName, "fillet")
10130             return anObj
10131
10132         ## Perform a fillet on the specified edges of the given shape
10133         #  @param theShape  Wire Shape to perform fillet on.
10134         #  @param theR  Fillet radius.
10135         #  @param theListOfVertexes Global indices of vertexes to perform fillet on.
10136         #    \note Global index of sub-shape can be obtained, using method GetSubShapeID()
10137         #    \note The list of vertices could be empty,
10138         #          in this case fillet will done done at all vertices in wire
10139         #  @param doIgnoreSecantVertices If FALSE, fillet radius is always limited
10140         #         by the length of the edges, nearest to the fillet vertex.
10141         #         But sometimes the next edge is C1 continuous with the one, nearest to
10142         #         the fillet point, and such two (or more) edges can be united to allow
10143         #         bigger radius. Set this flag to TRUE to allow collinear edges union,
10144         #         thus ignoring the secant vertex (vertices).
10145         #  @param theName Object name; when specified, this parameter is used
10146         #         for result publication in the study. Otherwise, if automatic
10147         #         publication is switched on, default value is used for result name.
10148         #
10149         #  @return New GEOM.GEOM_Object, containing the result shape.
10150         #
10151         #  @ref tui_fillet2d "Example"
10152         @ManageTransactions("LocalOp")
10153         def MakeFillet1D(self, theShape, theR, theListOfVertexes, doIgnoreSecantVertices = True, theName=None):
10154             """
10155             Perform a fillet on the specified edges of the given shape
10156
10157             Parameters:
10158                 theShape  Wire Shape to perform fillet on.
10159                 theR  Fillet radius.
10160                 theListOfVertexes Global indices of vertexes to perform fillet on.
10161                 doIgnoreSecantVertices If FALSE, fillet radius is always limited
10162                     by the length of the edges, nearest to the fillet vertex.
10163                     But sometimes the next edge is C1 continuous with the one, nearest to
10164                     the fillet point, and such two (or more) edges can be united to allow
10165                     bigger radius. Set this flag to TRUE to allow collinear edges union,
10166                     thus ignoring the secant vertex (vertices).
10167                 theName Object name; when specified, this parameter is used
10168                         for result publication in the study. Otherwise, if automatic
10169                         publication is switched on, default value is used for result name.
10170             Note:
10171                 Global index of sub-shape can be obtained, using method geompy.GetSubShapeID
10172
10173                 The list of vertices could be empty,in this case fillet will done done at all vertices in wire
10174
10175             Returns:
10176                 New GEOM.GEOM_Object, containing the result shape.
10177
10178             Example of usage:
10179                 # create wire
10180                 Wire_1 = geompy.MakeWire([Edge_12, Edge_7, Edge_11, Edge_6, Edge_1,Edge_4])
10181                 # make fillet at given wire vertices with giver radius
10182                 Fillet_1D_1 = geompy.MakeFillet1D(Wire_1, 55, [3, 4, 6, 8, 10])
10183             """
10184             # Example: see GEOM_TestAll.py
10185             theR,doIgnoreSecantVertices,Parameters = ParseParameters(theR,doIgnoreSecantVertices)
10186             anObj = self.LocalOp.MakeFillet1D(theShape, theR, theListOfVertexes, doIgnoreSecantVertices)
10187             RaiseIfFailed("MakeFillet1D", self.LocalOp)
10188             anObj.SetParameters(Parameters)
10189             self._autoPublish(anObj, theName, "fillet")
10190             return anObj
10191
10192         ## Perform a fillet at the specified vertices of the given face/shell.
10193         #  @param theShape Face or Shell shape to perform fillet on.
10194         #  @param theR Fillet radius.
10195         #  @param theListOfVertexes Global indices of vertexes to perform fillet on.
10196         #  @param theName Object name; when specified, this parameter is used
10197         #         for result publication in the study. Otherwise, if automatic
10198         #         publication is switched on, default value is used for result name.
10199         #
10200         #  @note Global index of sub-shape can be obtained, using method GetSubShapeID().
10201         #
10202         #  @return New GEOM.GEOM_Object, containing the result shape.
10203         #
10204         #  @ref tui_fillet2d "Example"
10205         @ManageTransactions("LocalOp")
10206         def MakeFillet2D(self, theShape, theR, theListOfVertexes, theName=None):
10207             """
10208             Perform a fillet at the specified vertices of the given face/shell.
10209
10210             Parameters:
10211                 theShape  Face or Shell shape to perform fillet on.
10212                 theR  Fillet radius.
10213                 theListOfVertexes Global indices of vertexes to perform fillet on.
10214                 theName Object name; when specified, this parameter is used
10215                         for result publication in the study. Otherwise, if automatic
10216                         publication is switched on, default value is used for result name.
10217             Note:
10218                 Global index of sub-shape can be obtained, using method geompy.GetSubShapeID
10219
10220             Returns:
10221                 New GEOM.GEOM_Object, containing the result shape.
10222
10223             Example of usage:
10224                 face = geompy.MakeFaceHW(100, 100, 1)
10225                 fillet2d = geompy.MakeFillet2D(face, 30, [7, 9])
10226             """
10227             # Example: see GEOM_TestAll.py
10228             theR,Parameters = ParseParameters(theR)
10229             anObj = self.LocalOp.MakeFillet2D(theShape, theR, theListOfVertexes)
10230             RaiseIfFailed("MakeFillet2D", self.LocalOp)
10231             anObj.SetParameters(Parameters)
10232             self._autoPublish(anObj, theName, "fillet")
10233             return anObj
10234
10235         ## Perform a symmetric chamfer on all edges of the given shape.
10236         #  @param theShape Shape, to perform chamfer on.
10237         #  @param theD Chamfer size along each face.
10238         #  @param theName Object name; when specified, this parameter is used
10239         #         for result publication in the study. Otherwise, if automatic
10240         #         publication is switched on, default value is used for result name.
10241         #
10242         #  @return New GEOM.GEOM_Object, containing the result shape.
10243         #
10244         #  @ref tui_chamfer "Example 1"
10245         #  \n @ref swig_MakeChamferAll "Example 2"
10246         @ManageTransactions("LocalOp")
10247         def MakeChamferAll(self, theShape, theD, theName=None):
10248             """
10249             Perform a symmetric chamfer on all edges of the given shape.
10250
10251             Parameters:
10252                 theShape Shape, to perform chamfer on.
10253                 theD Chamfer size along each face.
10254                 theName Object name; when specified, this parameter is used
10255                         for result publication in the study. Otherwise, if automatic
10256                         publication is switched on, default value is used for result name.
10257
10258             Returns:
10259                 New GEOM.GEOM_Object, containing the result shape.
10260
10261             Example of usage:
10262                 chamfer_all = geompy.MakeChamferAll(prism, 10.)
10263             """
10264             # Example: see GEOM_TestOthers.py
10265             theD,Parameters = ParseParameters(theD)
10266             anObj = self.LocalOp.MakeChamferAll(theShape, theD)
10267             RaiseIfFailed("MakeChamferAll", self.LocalOp)
10268             anObj.SetParameters(Parameters)
10269             self._autoPublish(anObj, theName, "chamfer")
10270             return anObj
10271
10272         ## Perform a chamfer on edges, common to the specified faces,
10273         #  with distance D1 on the Face1
10274         #  @param theShape Shape, to perform chamfer on.
10275         #  @param theD1 Chamfer size along \a theFace1.
10276         #  @param theD2 Chamfer size along \a theFace2.
10277         #  @param theFace1,theFace2 Global indices of two faces of \a theShape.
10278         #  @param theName Object name; when specified, this parameter is used
10279         #         for result publication in the study. Otherwise, if automatic
10280         #         publication is switched on, default value is used for result name.
10281         #
10282         #  @note Global index of sub-shape can be obtained, using method GetSubShapeID().
10283         #
10284         #  @return New GEOM.GEOM_Object, containing the result shape.
10285         #
10286         #  @ref tui_chamfer "Example"
10287         @ManageTransactions("LocalOp")
10288         def MakeChamferEdge(self, theShape, theD1, theD2, theFace1, theFace2, theName=None):
10289             """
10290             Perform a chamfer on edges, common to the specified faces,
10291             with distance D1 on the Face1
10292
10293             Parameters:
10294                 theShape Shape, to perform chamfer on.
10295                 theD1 Chamfer size along theFace1.
10296                 theD2 Chamfer size along theFace2.
10297                 theFace1,theFace2 Global indices of two faces of theShape.
10298                 theName Object name; when specified, this parameter is used
10299                         for result publication in the study. Otherwise, if automatic
10300                         publication is switched on, default value is used for result name.
10301
10302             Note:
10303                 Global index of sub-shape can be obtained, using method geompy.GetSubShapeID
10304
10305             Returns:
10306                 New GEOM.GEOM_Object, containing the result shape.
10307
10308             Example of usage:
10309                 prism_faces = geompy.SubShapeAllSortedCentres(prism, geompy.ShapeType["FACE"])
10310                 f_ind_1 = geompy.GetSubShapeID(prism, prism_faces[0])
10311                 f_ind_2 = geompy.GetSubShapeID(prism, prism_faces[1])
10312                 chamfer_e = geompy.MakeChamferEdge(prism, 10., 10., f_ind_1, f_ind_2)
10313             """
10314             # Example: see GEOM_TestAll.py
10315             theD1,theD2,Parameters = ParseParameters(theD1,theD2)
10316             anObj = self.LocalOp.MakeChamferEdge(theShape, theD1, theD2, theFace1, theFace2)
10317             RaiseIfFailed("MakeChamferEdge", self.LocalOp)
10318             anObj.SetParameters(Parameters)
10319             self._autoPublish(anObj, theName, "chamfer")
10320             return anObj
10321
10322         ## Perform a chamfer on edges
10323         #  @param theShape Shape, to perform chamfer on.
10324         #  @param theD Chamfer length
10325         #  @param theAngle Angle of chamfer (angle in radians or a name of variable which defines angle in degrees)
10326         #  @param theFace1,theFace2 Global indices of two faces of \a theShape.
10327         #  @param theName Object name; when specified, this parameter is used
10328         #         for result publication in the study. Otherwise, if automatic
10329         #         publication is switched on, default value is used for result name.
10330         #
10331         #  @note Global index of sub-shape can be obtained, using method GetSubShapeID().
10332         #
10333         #  @return New GEOM.GEOM_Object, containing the result shape.
10334         @ManageTransactions("LocalOp")
10335         def MakeChamferEdgeAD(self, theShape, theD, theAngle, theFace1, theFace2, theName=None):
10336             """
10337             Perform a chamfer on edges
10338
10339             Parameters:
10340                 theShape Shape, to perform chamfer on.
10341                 theD1 Chamfer size along theFace1.
10342                 theAngle Angle of chamfer (angle in radians or a name of variable which defines angle in degrees).
10343                 theFace1,theFace2 Global indices of two faces of theShape.
10344                 theName Object name; when specified, this parameter is used
10345                         for result publication in the study. Otherwise, if automatic
10346                         publication is switched on, default value is used for result name.
10347
10348             Note:
10349                 Global index of sub-shape can be obtained, using method geompy.GetSubShapeID
10350
10351             Returns:
10352                 New GEOM.GEOM_Object, containing the result shape.
10353
10354             Example of usage:
10355                 prism_faces = geompy.SubShapeAllSortedCentres(prism, geompy.ShapeType["FACE"])
10356                 f_ind_1 = geompy.GetSubShapeID(prism, prism_faces[0])
10357                 f_ind_2 = geompy.GetSubShapeID(prism, prism_faces[1])
10358                 ang = 30
10359                 chamfer_e = geompy.MakeChamferEdge(prism, 10., ang, f_ind_1, f_ind_2)
10360             """
10361             flag = False
10362             if isinstance(theAngle,str):
10363                 flag = True
10364             theD,theAngle,Parameters = ParseParameters(theD,theAngle)
10365             if flag:
10366                 theAngle = theAngle*math.pi/180.0
10367             anObj = self.LocalOp.MakeChamferEdgeAD(theShape, theD, theAngle, theFace1, theFace2)
10368             RaiseIfFailed("MakeChamferEdgeAD", self.LocalOp)
10369             anObj.SetParameters(Parameters)
10370             self._autoPublish(anObj, theName, "chamfer")
10371             return anObj
10372
10373         ## Perform a chamfer on all edges of the specified faces,
10374         #  with distance D1 on the first specified face (if several for one edge)
10375         #  @param theShape Shape, to perform chamfer on.
10376         #  @param theD1 Chamfer size along face from \a theFaces. If both faces,
10377         #               connected to the edge, are in \a theFaces, \a theD1
10378         #               will be get along face, which is nearer to \a theFaces beginning.
10379         #  @param theD2 Chamfer size along another of two faces, connected to the edge.
10380         #  @param theFaces Sequence of global indices of faces of \a theShape.
10381         #  @param theName Object name; when specified, this parameter is used
10382         #         for result publication in the study. Otherwise, if automatic
10383         #         publication is switched on, default value is used for result name.
10384         #
10385         #  @note Global index of sub-shape can be obtained, using method GetSubShapeID().
10386         #
10387         #  @return New GEOM.GEOM_Object, containing the result shape.
10388         #
10389         #  @ref tui_chamfer "Example"
10390         @ManageTransactions("LocalOp")
10391         def MakeChamferFaces(self, theShape, theD1, theD2, theFaces, theName=None):
10392             """
10393             Perform a chamfer on all edges of the specified faces,
10394             with distance D1 on the first specified face (if several for one edge)
10395
10396             Parameters:
10397                 theShape Shape, to perform chamfer on.
10398                 theD1 Chamfer size along face from  theFaces. If both faces,
10399                       connected to the edge, are in theFaces, theD1
10400                       will be get along face, which is nearer to theFaces beginning.
10401                 theD2 Chamfer size along another of two faces, connected to the edge.
10402                 theFaces Sequence of global indices of faces of theShape.
10403                 theName Object name; when specified, this parameter is used
10404                         for result publication in the study. Otherwise, if automatic
10405                         publication is switched on, default value is used for result name.
10406
10407             Note: Global index of sub-shape can be obtained, using method geompy.GetSubShapeID().
10408
10409             Returns:
10410                 New GEOM.GEOM_Object, containing the result shape.
10411             """
10412             # Example: see GEOM_TestAll.py
10413             theD1,theD2,Parameters = ParseParameters(theD1,theD2)
10414             anObj = self.LocalOp.MakeChamferFaces(theShape, theD1, theD2, theFaces)
10415             RaiseIfFailed("MakeChamferFaces", self.LocalOp)
10416             anObj.SetParameters(Parameters)
10417             self._autoPublish(anObj, theName, "chamfer")
10418             return anObj
10419
10420         ## The Same that MakeChamferFaces() but with params theD is chamfer length and
10421         #  theAngle is Angle of chamfer (angle in radians or a name of variable which defines angle in degrees)
10422         #
10423         #  @ref swig_FilletChamfer "Example"
10424         @ManageTransactions("LocalOp")
10425         def MakeChamferFacesAD(self, theShape, theD, theAngle, theFaces, theName=None):
10426             """
10427             The Same that geompy.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             flag = False
10431             if isinstance(theAngle,str):
10432                 flag = True
10433             theD,theAngle,Parameters = ParseParameters(theD,theAngle)
10434             if flag:
10435                 theAngle = theAngle*math.pi/180.0
10436             anObj = self.LocalOp.MakeChamferFacesAD(theShape, theD, theAngle, theFaces)
10437             RaiseIfFailed("MakeChamferFacesAD", self.LocalOp)
10438             anObj.SetParameters(Parameters)
10439             self._autoPublish(anObj, theName, "chamfer")
10440             return anObj
10441
10442         ## Perform a chamfer on edges,
10443         #  with distance D1 on the first specified face (if several for one edge)
10444         #  @param theShape Shape, to perform chamfer on.
10445         #  @param theD1,theD2 Chamfer size
10446         #  @param theEdges Sequence of edges of \a theShape.
10447         #  @param theName Object name; when specified, this parameter is used
10448         #         for result publication in the study. Otherwise, if automatic
10449         #         publication is switched on, default value is used for result name.
10450         #
10451         #  @return New GEOM.GEOM_Object, containing the result shape.
10452         #
10453         #  @ref swig_FilletChamfer "Example"
10454         @ManageTransactions("LocalOp")
10455         def MakeChamferEdges(self, theShape, theD1, theD2, theEdges, theName=None):
10456             """
10457             Perform a chamfer on edges,
10458             with distance D1 on the first specified face (if several for one edge)
10459
10460             Parameters:
10461                 theShape Shape, to perform chamfer on.
10462                 theD1,theD2 Chamfer size
10463                 theEdges Sequence of edges of theShape.
10464                 theName Object name; when specified, this parameter is used
10465                         for result publication in the study. Otherwise, if automatic
10466                         publication is switched on, default value is used for result name.
10467
10468             Returns:
10469                 New GEOM.GEOM_Object, containing the result shape.
10470             """
10471             theD1,theD2,Parameters = ParseParameters(theD1,theD2)
10472             anObj = self.LocalOp.MakeChamferEdges(theShape, theD1, theD2, theEdges)
10473             RaiseIfFailed("MakeChamferEdges", self.LocalOp)
10474             anObj.SetParameters(Parameters)
10475             self._autoPublish(anObj, theName, "chamfer")
10476             return anObj
10477
10478         ## The Same that MakeChamferEdges() but with params theD is chamfer length and
10479         #  theAngle is Angle of chamfer (angle in radians or a name of variable which defines angle in degrees)
10480         @ManageTransactions("LocalOp")
10481         def MakeChamferEdgesAD(self, theShape, theD, theAngle, theEdges, theName=None):
10482             """
10483             The Same that geompy.MakeChamferEdges but with params theD is chamfer length and
10484             theAngle is Angle of chamfer (angle in radians or a name of variable which defines angle in degrees)
10485             """
10486             flag = False
10487             if isinstance(theAngle,str):
10488                 flag = True
10489             theD,theAngle,Parameters = ParseParameters(theD,theAngle)
10490             if flag:
10491                 theAngle = theAngle*math.pi/180.0
10492             anObj = self.LocalOp.MakeChamferEdgesAD(theShape, theD, theAngle, theEdges)
10493             RaiseIfFailed("MakeChamferEdgesAD", self.LocalOp)
10494             anObj.SetParameters(Parameters)
10495             self._autoPublish(anObj, theName, "chamfer")
10496             return anObj
10497
10498         ## @sa MakeChamferEdge(), MakeChamferFaces()
10499         #
10500         #  @ref swig_MakeChamfer "Example"
10501         def MakeChamfer(self, aShape, d1, d2, aShapeType, ListShape, theName=None):
10502             """
10503             See geompy.MakeChamferEdge() and geompy.MakeChamferFaces() functions for more information.
10504             """
10505             # Example: see GEOM_TestOthers.py
10506             anObj = None
10507             # note: auto-publishing is done in self.MakeChamferEdge() or self.MakeChamferFaces()
10508             if aShapeType == self.ShapeType["EDGE"]:
10509                 anObj = self.MakeChamferEdge(aShape,d1,d2,ListShape[0],ListShape[1],theName)
10510             else:
10511                 anObj = self.MakeChamferFaces(aShape,d1,d2,ListShape,theName)
10512             return anObj
10513
10514         ## Remove material from a solid by extrusion of the base shape on the given distance.
10515         #  @param theInit Shape to remove material from. It must be a solid or
10516         #  a compound made of a single solid.
10517         #  @param theBase Closed edge or wire defining the base shape to be extruded.
10518         #  @param theH Prism dimension along the normal to theBase
10519         #  @param theAngle Draft angle in degrees.
10520         #  @param theInvert If true material changes the direction
10521         #  @param theName Object name; when specified, this parameter is used
10522         #         for result publication in the study. Otherwise, if automatic
10523         #         publication is switched on, default value is used for result name.
10524         #
10525         #  @return New GEOM.GEOM_Object, containing the initial shape with removed material
10526         #
10527         #  @ref tui_creation_prism "Example"
10528         @ManageTransactions("PrimOp")
10529         def MakeExtrudedCut(self, theInit, theBase, theH, theAngle, theInvert=False, theName=None):
10530             """
10531             Add material to a solid by extrusion of the base shape on the given distance.
10532
10533             Parameters:
10534                 theInit Shape to remove material from. It must be a solid or a compound made of a single solid.
10535                 theBase Closed edge or wire defining the base shape to be extruded.
10536                 theH Prism dimension along the normal to theBase
10537                 theAngle Draft angle in degrees.
10538                 theInvert If true material changes the direction.
10539                 theName Object name; when specified, this parameter is used
10540                         for result publication in the study. Otherwise, if automatic
10541                         publication is switched on, default value is used for result name.
10542
10543             Returns:
10544                 New GEOM.GEOM_Object,  containing the initial shape with removed material.
10545             """
10546             # Example: see GEOM_TestAll.py
10547             theH,theAngle,Parameters = ParseParameters(theH,theAngle)
10548             anObj = self.PrimOp.MakeDraftPrism(theInit, theBase, theH, theAngle, False, theInvert)
10549             RaiseIfFailed("MakeExtrudedBoss", self.PrimOp)
10550             anObj.SetParameters(Parameters)
10551             self._autoPublish(anObj, theName, "extrudedCut")
10552             return anObj
10553
10554         ## Add material to a solid by extrusion of the base shape on the given distance.
10555         #  @param theInit Shape to add material to. It must be a solid or
10556         #  a compound made of a single solid.
10557         #  @param theBase Closed edge or wire defining the base shape to be extruded.
10558         #  @param theH Prism dimension along the normal to theBase
10559         #  @param theAngle Draft angle in degrees.
10560         #  @param theInvert If true material changes the direction
10561         #  @param theName Object name; when specified, this parameter is used
10562         #         for result publication in the study. Otherwise, if automatic
10563         #         publication is switched on, default value is used for result name.
10564         #
10565         #  @return New GEOM.GEOM_Object, containing the initial shape with added material
10566         #
10567         #  @ref tui_creation_prism "Example"
10568         @ManageTransactions("PrimOp")
10569         def MakeExtrudedBoss(self, theInit, theBase, theH, theAngle, theInvert=False, theName=None):
10570             """
10571             Add material to a solid by extrusion of the base shape on the given distance.
10572
10573             Parameters:
10574                 theInit Shape to add material to. It must be a solid or a compound made of a single solid.
10575                 theBase Closed edge or wire defining the base shape to be extruded.
10576                 theH Prism dimension along the normal to theBase
10577                 theAngle Draft angle in degrees.
10578                 theInvert If true material changes the direction.
10579                 theName Object name; when specified, this parameter is used
10580                         for result publication in the study. Otherwise, if automatic
10581                         publication is switched on, default value is used for result name.
10582
10583             Returns:
10584                 New GEOM.GEOM_Object,  containing the initial shape with added material.
10585             """
10586             # Example: see GEOM_TestAll.py
10587             theH,theAngle,Parameters = ParseParameters(theH,theAngle)
10588             anObj = self.PrimOp.MakeDraftPrism(theInit, theBase, theH, theAngle, True, theInvert)
10589             RaiseIfFailed("MakeExtrudedBoss", self.PrimOp)
10590             anObj.SetParameters(Parameters)
10591             self._autoPublish(anObj, theName, "extrudedBoss")
10592             return anObj
10593
10594         # end of l3_local
10595         ## @}
10596
10597         ## @addtogroup l3_basic_op
10598         ## @{
10599
10600         ## Perform an Archimde operation on the given shape with given parameters.
10601         #  The object presenting the resulting face is returned.
10602         #  @param theShape Shape to be put in water.
10603         #  @param theWeight Weight of the shape.
10604         #  @param theWaterDensity Density of the water.
10605         #  @param theMeshDeflection Deflection of the mesh, using to compute the section.
10606         #  @param theName Object name; when specified, this parameter is used
10607         #         for result publication in the study. Otherwise, if automatic
10608         #         publication is switched on, default value is used for result name.
10609         #
10610         #  @return New GEOM.GEOM_Object, containing a section of \a theShape
10611         #          by a plane, corresponding to water level.
10612         #
10613         #  @ref tui_archimede "Example"
10614         @ManageTransactions("LocalOp")
10615         def Archimede(self, theShape, theWeight, theWaterDensity, theMeshDeflection, theName=None):
10616             """
10617             Perform an Archimde operation on the given shape with given parameters.
10618             The object presenting the resulting face is returned.
10619
10620             Parameters:
10621                 theShape Shape to be put in water.
10622                 theWeight Weight of the shape.
10623                 theWaterDensity Density of the water.
10624                 theMeshDeflection Deflection of the mesh, using to compute the section.
10625                 theName Object name; when specified, this parameter is used
10626                         for result publication in the study. Otherwise, if automatic
10627                         publication is switched on, default value is used for result name.
10628
10629             Returns:
10630                 New GEOM.GEOM_Object, containing a section of theShape
10631                 by a plane, corresponding to water level.
10632             """
10633             # Example: see GEOM_TestAll.py
10634             theWeight,theWaterDensity,theMeshDeflection,Parameters = ParseParameters(
10635               theWeight,theWaterDensity,theMeshDeflection)
10636             anObj = self.LocalOp.MakeArchimede(theShape, theWeight, theWaterDensity, theMeshDeflection)
10637             RaiseIfFailed("MakeArchimede", self.LocalOp)
10638             anObj.SetParameters(Parameters)
10639             self._autoPublish(anObj, theName, "archimede")
10640             return anObj
10641
10642         # end of l3_basic_op
10643         ## @}
10644
10645         ## @addtogroup l2_measure
10646         ## @{
10647
10648         ## Get point coordinates
10649         #  @return [x, y, z]
10650         #
10651         #  @ref tui_point_coordinates_page "Example"
10652         @ManageTransactions("MeasuOp")
10653         def PointCoordinates(self,Point):
10654             """
10655             Get point coordinates
10656
10657             Returns:
10658                 [x, y, z]
10659             """
10660             # Example: see GEOM_TestMeasures.py
10661             aTuple = self.MeasuOp.PointCoordinates(Point)
10662             RaiseIfFailed("PointCoordinates", self.MeasuOp)
10663             return aTuple
10664
10665         ## Get vector coordinates
10666         #  @return [x, y, z]
10667         #
10668         #  @ref tui_measurement_tools_page "Example"
10669         def VectorCoordinates(self,Vector):
10670             """
10671             Get vector coordinates
10672
10673             Returns:
10674                 [x, y, z]
10675             """
10676
10677             p1=self.GetFirstVertex(Vector)
10678             p2=self.GetLastVertex(Vector)
10679
10680             X1=self.PointCoordinates(p1)
10681             X2=self.PointCoordinates(p2)
10682
10683             return (X2[0]-X1[0],X2[1]-X1[1],X2[2]-X1[2])
10684
10685
10686         ## Compute cross product
10687         #  @return vector w=u^v
10688         #
10689         #  @ref tui_measurement_tools_page "Example"
10690         def CrossProduct(self, Vector1, Vector2):
10691             """
10692             Compute cross product
10693
10694             Returns: vector w=u^v
10695             """
10696             u=self.VectorCoordinates(Vector1)
10697             v=self.VectorCoordinates(Vector2)
10698             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])
10699
10700             return w
10701
10702         ## Compute cross product
10703         #  @return dot product  p=u.v
10704         #
10705         #  @ref tui_measurement_tools_page "Example"
10706         def DotProduct(self, Vector1, Vector2):
10707             """
10708             Compute cross product
10709
10710             Returns: dot product  p=u.v
10711             """
10712             u=self.VectorCoordinates(Vector1)
10713             v=self.VectorCoordinates(Vector2)
10714             p=u[0]*v[0]+u[1]*v[1]+u[2]*v[2]
10715
10716             return p
10717
10718
10719         ## Get summarized length of all wires,
10720         #  area of surface and volume of the given shape.
10721         #  @param theShape Shape to define properties of.
10722         #  @param theTolerance maximal relative error of area
10723         #         and volume computation.
10724         #  @return [theLength, theSurfArea, theVolume]\n
10725         #  theLength:   Summarized length of all wires of the given shape.\n
10726         #  theSurfArea: Area of surface of the given shape.\n
10727         #  theVolume:   Volume of the given shape.
10728         #
10729         #  @ref tui_basic_properties_page "Example"
10730         @ManageTransactions("MeasuOp")
10731         def BasicProperties(self,theShape, theTolerance=1.e-6):
10732             """
10733             Get summarized length of all wires,
10734             area of surface and volume of the given shape.
10735
10736             Parameters:
10737                 theShape Shape to define properties of.
10738                 theTolerance maximal relative error of area
10739                              and volume computation.
10740
10741             Returns:
10742                 [theLength, theSurfArea, theVolume]
10743                  theLength:   Summarized length of all wires of the given shape.
10744                  theSurfArea: Area of surface of the given shape.
10745                  theVolume:   Volume of the given shape.
10746             """
10747             # Example: see GEOM_TestMeasures.py
10748             aTuple = self.MeasuOp.GetBasicProperties(theShape, theTolerance)
10749             RaiseIfFailed("GetBasicProperties", self.MeasuOp)
10750             return aTuple
10751
10752         ## Get parameters of bounding box of the given shape
10753         #  @param theShape Shape to obtain bounding box of.
10754         #  @param precise TRUE for precise computation; FALSE for fast one.
10755         #  @return [Xmin,Xmax, Ymin,Ymax, Zmin,Zmax]
10756         #  Xmin,Xmax: Limits of shape along OX axis.
10757         #  Ymin,Ymax: Limits of shape along OY axis.
10758         #  Zmin,Zmax: Limits of shape along OZ axis.
10759         #
10760         #  @ref tui_bounding_box_page "Example"
10761         @ManageTransactions("MeasuOp")
10762         def BoundingBox (self, theShape, precise=False):
10763             """
10764             Get parameters of bounding box of the given shape
10765
10766             Parameters:
10767                 theShape Shape to obtain bounding box of.
10768                 precise TRUE for precise computation; FALSE for fast one.
10769
10770             Returns:
10771                 [Xmin,Xmax, Ymin,Ymax, Zmin,Zmax]
10772                  Xmin,Xmax: Limits of shape along OX axis.
10773                  Ymin,Ymax: Limits of shape along OY axis.
10774                  Zmin,Zmax: Limits of shape along OZ axis.
10775             """
10776             # Example: see GEOM_TestMeasures.py
10777             aTuple = self.MeasuOp.GetBoundingBox(theShape, precise)
10778             RaiseIfFailed("GetBoundingBox", self.MeasuOp)
10779             return aTuple
10780
10781         ## Get bounding box of the given shape
10782         #  @param theShape Shape to obtain bounding box of.
10783         #  @param precise TRUE for precise computation; FALSE for fast one.
10784         #  @param theName Object name; when specified, this parameter is used
10785         #         for result publication in the study. Otherwise, if automatic
10786         #         publication is switched on, default value is used for result name.
10787         #
10788         #  @return New GEOM.GEOM_Object, containing the created box.
10789         #
10790         #  @ref tui_bounding_box_page "Example"
10791         @ManageTransactions("MeasuOp")
10792         def MakeBoundingBox (self, theShape, precise=False, theName=None):
10793             """
10794             Get bounding box of the given shape
10795
10796             Parameters:
10797                 theShape Shape to obtain bounding box of.
10798                 precise TRUE for precise computation; FALSE for fast one.
10799                 theName Object name; when specified, this parameter is used
10800                         for result publication in the study. Otherwise, if automatic
10801                         publication is switched on, default value is used for result name.
10802
10803             Returns:
10804                 New GEOM.GEOM_Object, containing the created box.
10805             """
10806             # Example: see GEOM_TestMeasures.py
10807             anObj = self.MeasuOp.MakeBoundingBox(theShape, precise)
10808             RaiseIfFailed("MakeBoundingBox", self.MeasuOp)
10809             self._autoPublish(anObj, theName, "bndbox")
10810             return anObj
10811
10812         ## Get inertia matrix and moments of inertia of theShape.
10813         #  @param theShape Shape to calculate inertia of.
10814         #  @return [I11,I12,I13, I21,I22,I23, I31,I32,I33, Ix,Iy,Iz]
10815         #  I(1-3)(1-3): Components of the inertia matrix of the given shape.
10816         #  Ix,Iy,Iz:    Moments of inertia of the given shape.
10817         #
10818         #  @ref tui_inertia_page "Example"
10819         @ManageTransactions("MeasuOp")
10820         def Inertia(self,theShape):
10821             """
10822             Get inertia matrix and moments of inertia of theShape.
10823
10824             Parameters:
10825                 theShape Shape to calculate inertia of.
10826
10827             Returns:
10828                 [I11,I12,I13, I21,I22,I23, I31,I32,I33, Ix,Iy,Iz]
10829                  I(1-3)(1-3): Components of the inertia matrix of the given shape.
10830                  Ix,Iy,Iz:    Moments of inertia of the given shape.
10831             """
10832             # Example: see GEOM_TestMeasures.py
10833             aTuple = self.MeasuOp.GetInertia(theShape)
10834             RaiseIfFailed("GetInertia", self.MeasuOp)
10835             return aTuple
10836
10837         ## Get if coords are included in the shape (ST_IN or ST_ON)
10838         #  @param theShape Shape
10839         #  @param coords list of points coordinates [x1, y1, z1, x2, y2, z2, ...]
10840         #  @param tolerance to be used (default is 1.0e-7)
10841         #  @return list_of_boolean = [res1, res2, ...]
10842         @ManageTransactions("MeasuOp")
10843         def AreCoordsInside(self, theShape, coords, tolerance=1.e-7):
10844             """
10845             Get if coords are included in the shape (ST_IN or ST_ON)
10846
10847             Parameters:
10848                 theShape Shape
10849                 coords list of points coordinates [x1, y1, z1, x2, y2, z2, ...]
10850                 tolerance to be used (default is 1.0e-7)
10851
10852             Returns:
10853                 list_of_boolean = [res1, res2, ...]
10854             """
10855             return self.MeasuOp.AreCoordsInside(theShape, coords, tolerance)
10856
10857         ## Get minimal distance between the given shapes.
10858         #  @param theShape1,theShape2 Shapes to find minimal distance between.
10859         #  @return Value of the minimal distance between the given shapes.
10860         #
10861         #  @ref tui_min_distance_page "Example"
10862         @ManageTransactions("MeasuOp")
10863         def MinDistance(self, theShape1, theShape2):
10864             """
10865             Get minimal distance between the given shapes.
10866
10867             Parameters:
10868                 theShape1,theShape2 Shapes to find minimal distance between.
10869
10870             Returns:
10871                 Value of the minimal distance between the given shapes.
10872             """
10873             # Example: see GEOM_TestMeasures.py
10874             aTuple = self.MeasuOp.GetMinDistance(theShape1, theShape2)
10875             RaiseIfFailed("GetMinDistance", self.MeasuOp)
10876             return aTuple[0]
10877
10878         ## Get minimal distance between the given shapes.
10879         #  @param theShape1,theShape2 Shapes to find minimal distance between.
10880         #  @return Value of the minimal distance between the given shapes, in form of list
10881         #          [Distance, DX, DY, DZ].
10882         #
10883         #  @ref tui_min_distance_page "Example"
10884         @ManageTransactions("MeasuOp")
10885         def MinDistanceComponents(self, theShape1, theShape2):
10886             """
10887             Get minimal distance between the given shapes.
10888
10889             Parameters:
10890                 theShape1,theShape2 Shapes to find minimal distance between.
10891
10892             Returns:
10893                 Value of the minimal distance between the given shapes, in form of list
10894                 [Distance, DX, DY, DZ]
10895             """
10896             # Example: see GEOM_TestMeasures.py
10897             aTuple = self.MeasuOp.GetMinDistance(theShape1, theShape2)
10898             RaiseIfFailed("GetMinDistance", self.MeasuOp)
10899             aRes = [aTuple[0], aTuple[4] - aTuple[1], aTuple[5] - aTuple[2], aTuple[6] - aTuple[3]]
10900             return aRes
10901
10902         ## Get closest points of the given shapes.
10903         #  @param theShape1,theShape2 Shapes to find closest points of.
10904         #  @return The number of found solutions (-1 in case of infinite number of
10905         #          solutions) and a list of (X, Y, Z) coordinates for all couples of points.
10906         #
10907         #  @ref tui_min_distance_page "Example"
10908         @ManageTransactions("MeasuOp")
10909         def ClosestPoints (self, theShape1, theShape2):
10910             """
10911             Get closest points of the given shapes.
10912
10913             Parameters:
10914                 theShape1,theShape2 Shapes to find closest points of.
10915
10916             Returns:
10917                 The number of found solutions (-1 in case of infinite number of
10918                 solutions) and a list of (X, Y, Z) coordinates for all couples of points.
10919             """
10920             # Example: see GEOM_TestMeasures.py
10921             aTuple = self.MeasuOp.ClosestPoints(theShape1, theShape2)
10922             RaiseIfFailed("ClosestPoints", self.MeasuOp)
10923             return aTuple
10924
10925         ## Get angle between the given shapes in degrees.
10926         #  @param theShape1,theShape2 Lines or linear edges to find angle between.
10927         #  @note If both arguments are vectors, the angle is computed in accordance
10928         #        with their orientations, otherwise the minimum angle is computed.
10929         #  @return Value of the angle between the given shapes in degrees.
10930         #
10931         #  @ref tui_angle_page "Example"
10932         @ManageTransactions("MeasuOp")
10933         def GetAngle(self, theShape1, theShape2):
10934             """
10935             Get angle between the given shapes in degrees.
10936
10937             Parameters:
10938                 theShape1,theShape2 Lines or linear edges to find angle between.
10939
10940             Note:
10941                 If both arguments are vectors, the angle is computed in accordance
10942                 with their orientations, otherwise the minimum angle is computed.
10943
10944             Returns:
10945                 Value of the angle between the given shapes in degrees.
10946             """
10947             # Example: see GEOM_TestMeasures.py
10948             anAngle = self.MeasuOp.GetAngle(theShape1, theShape2)
10949             RaiseIfFailed("GetAngle", self.MeasuOp)
10950             return anAngle
10951
10952         ## Get angle between the given shapes in radians.
10953         #  @param theShape1,theShape2 Lines or linear edges to find angle between.
10954         #  @note If both arguments are vectors, the angle is computed in accordance
10955         #        with their orientations, otherwise the minimum angle is computed.
10956         #  @return Value of the angle between the given shapes in radians.
10957         #
10958         #  @ref tui_angle_page "Example"
10959         @ManageTransactions("MeasuOp")
10960         def GetAngleRadians(self, theShape1, theShape2):
10961             """
10962             Get angle between the given shapes in radians.
10963
10964             Parameters:
10965                 theShape1,theShape2 Lines or linear edges to find angle between.
10966
10967
10968             Note:
10969                 If both arguments are vectors, the angle is computed in accordance
10970                 with their orientations, otherwise the minimum angle is computed.
10971
10972             Returns:
10973                 Value of the angle between the given shapes in radians.
10974             """
10975             # Example: see GEOM_TestMeasures.py
10976             anAngle = self.MeasuOp.GetAngle(theShape1, theShape2)*math.pi/180.
10977             RaiseIfFailed("GetAngle", self.MeasuOp)
10978             return anAngle
10979
10980         ## Get angle between the given vectors in degrees.
10981         #  @param theShape1,theShape2 Vectors to find angle between.
10982         #  @param theFlag If True, the normal vector is defined by the two vectors cross,
10983         #                 if False, the opposite vector to the normal vector is used.
10984         #  @return Value of the angle between the given vectors in degrees.
10985         #
10986         #  @ref tui_angle_page "Example"
10987         @ManageTransactions("MeasuOp")
10988         def GetAngleVectors(self, theShape1, theShape2, theFlag = True):
10989             """
10990             Get angle between the given vectors in degrees.
10991
10992             Parameters:
10993                 theShape1,theShape2 Vectors to find angle between.
10994                 theFlag If True, the normal vector is defined by the two vectors cross,
10995                         if False, the opposite vector to the normal vector is used.
10996
10997             Returns:
10998                 Value of the angle between the given vectors in degrees.
10999             """
11000             anAngle = self.MeasuOp.GetAngleBtwVectors(theShape1, theShape2)
11001             if not theFlag:
11002                 anAngle = 360. - anAngle
11003             RaiseIfFailed("GetAngleVectors", self.MeasuOp)
11004             return anAngle
11005
11006         ## The same as GetAngleVectors, but the result is in radians.
11007         def GetAngleRadiansVectors(self, theShape1, theShape2, theFlag = True):
11008             """
11009             Get angle between the given vectors in radians.
11010
11011             Parameters:
11012                 theShape1,theShape2 Vectors to find angle between.
11013                 theFlag If True, the normal vector is defined by the two vectors cross,
11014                         if False, the opposite vector to the normal vector is used.
11015
11016             Returns:
11017                 Value of the angle between the given vectors in radians.
11018             """
11019             anAngle = self.GetAngleVectors(theShape1, theShape2, theFlag)*math.pi/180.
11020             return anAngle
11021
11022         ## @name Curve Curvature Measurement
11023         #  Methods for receiving radius of curvature of curves
11024         #  in the given point
11025         ## @{
11026
11027         ## Measure curvature of a curve at a point, set by parameter.
11028         #  @param theCurve a curve.
11029         #  @param theParam parameter.
11030         #  @return radius of curvature of \a theCurve.
11031         #
11032         #  @ref swig_todo "Example"
11033         @ManageTransactions("MeasuOp")
11034         def CurveCurvatureByParam(self, theCurve, theParam):
11035             """
11036             Measure curvature of a curve at a point, set by parameter.
11037
11038             Parameters:
11039                 theCurve a curve.
11040                 theParam parameter.
11041
11042             Returns:
11043                 radius of curvature of theCurve.
11044             """
11045             # Example: see GEOM_TestMeasures.py
11046             aCurv = self.MeasuOp.CurveCurvatureByParam(theCurve,theParam)
11047             RaiseIfFailed("CurveCurvatureByParam", self.MeasuOp)
11048             return aCurv
11049
11050         ## Measure curvature of a curve at a point.
11051         #  @param theCurve a curve.
11052         #  @param thePoint given point.
11053         #  @return radius of curvature of \a theCurve.
11054         #
11055         #  @ref swig_todo "Example"
11056         @ManageTransactions("MeasuOp")
11057         def CurveCurvatureByPoint(self, theCurve, thePoint):
11058             """
11059             Measure curvature of a curve at a point.
11060
11061             Parameters:
11062                 theCurve a curve.
11063                 thePoint given point.
11064
11065             Returns:
11066                 radius of curvature of theCurve.
11067             """
11068             aCurv = self.MeasuOp.CurveCurvatureByPoint(theCurve,thePoint)
11069             RaiseIfFailed("CurveCurvatureByPoint", self.MeasuOp)
11070             return aCurv
11071         ## @}
11072
11073         ## @name Surface Curvature Measurement
11074         #  Methods for receiving max and min radius of curvature of surfaces
11075         #  in the given point
11076         ## @{
11077
11078         ## Measure max radius of curvature of surface.
11079         #  @param theSurf the given surface.
11080         #  @param theUParam Value of U-parameter on the referenced surface.
11081         #  @param theVParam Value of V-parameter on the referenced surface.
11082         #  @return max radius of curvature of theSurf.
11083         #
11084         ## @ref swig_todo "Example"
11085         @ManageTransactions("MeasuOp")
11086         def MaxSurfaceCurvatureByParam(self, theSurf, theUParam, theVParam):
11087             """
11088             Measure max radius of curvature of surface.
11089
11090             Parameters:
11091                 theSurf the given surface.
11092                 theUParam Value of U-parameter on the referenced surface.
11093                 theVParam Value of V-parameter on the referenced surface.
11094
11095             Returns:
11096                 max radius of curvature of theSurf.
11097             """
11098             # Example: see GEOM_TestMeasures.py
11099             aSurf = self.MeasuOp.MaxSurfaceCurvatureByParam(theSurf,theUParam,theVParam)
11100             RaiseIfFailed("MaxSurfaceCurvatureByParam", self.MeasuOp)
11101             return aSurf
11102
11103         ## Measure max radius of curvature of surface in the given point
11104         #  @param theSurf the given surface.
11105         #  @param thePoint given point.
11106         #  @return max radius of curvature of theSurf.
11107         #
11108         ## @ref swig_todo "Example"
11109         @ManageTransactions("MeasuOp")
11110         def MaxSurfaceCurvatureByPoint(self, theSurf, thePoint):
11111             """
11112             Measure max radius of curvature of surface in the given point.
11113
11114             Parameters:
11115                 theSurf the given surface.
11116                 thePoint given point.
11117
11118             Returns:
11119                 max radius of curvature of theSurf.
11120             """
11121             aSurf = self.MeasuOp.MaxSurfaceCurvatureByPoint(theSurf,thePoint)
11122             RaiseIfFailed("MaxSurfaceCurvatureByPoint", self.MeasuOp)
11123             return aSurf
11124
11125         ## Measure min radius of curvature of surface.
11126         #  @param theSurf the given surface.
11127         #  @param theUParam Value of U-parameter on the referenced surface.
11128         #  @param theVParam Value of V-parameter on the referenced surface.
11129         #  @return min radius of curvature of theSurf.
11130         #
11131         ## @ref swig_todo "Example"
11132         @ManageTransactions("MeasuOp")
11133         def MinSurfaceCurvatureByParam(self, theSurf, theUParam, theVParam):
11134             """
11135             Measure min radius of curvature of surface.
11136
11137             Parameters:
11138                 theSurf the given surface.
11139                 theUParam Value of U-parameter on the referenced surface.
11140                 theVParam Value of V-parameter on the referenced surface.
11141
11142             Returns:
11143                 Min radius of curvature of theSurf.
11144             """
11145             aSurf = self.MeasuOp.MinSurfaceCurvatureByParam(theSurf,theUParam,theVParam)
11146             RaiseIfFailed("MinSurfaceCurvatureByParam", self.MeasuOp)
11147             return aSurf
11148
11149         ## Measure min radius of curvature of surface in the given point
11150         #  @param theSurf the given surface.
11151         #  @param thePoint given point.
11152         #  @return min radius of curvature of theSurf.
11153         #
11154         ## @ref swig_todo "Example"
11155         @ManageTransactions("MeasuOp")
11156         def MinSurfaceCurvatureByPoint(self, theSurf, thePoint):
11157             """
11158             Measure min radius of curvature of surface in the given point.
11159
11160             Parameters:
11161                 theSurf the given surface.
11162                 thePoint given point.
11163
11164             Returns:
11165                 Min radius of curvature of theSurf.
11166             """
11167             aSurf = self.MeasuOp.MinSurfaceCurvatureByPoint(theSurf,thePoint)
11168             RaiseIfFailed("MinSurfaceCurvatureByPoint", self.MeasuOp)
11169             return aSurf
11170         ## @}
11171
11172         ## Get min and max tolerances of sub-shapes of theShape
11173         #  @param theShape Shape, to get tolerances of.
11174         #  @return [FaceMin,FaceMax, EdgeMin,EdgeMax, VertMin,VertMax]\n
11175         #  FaceMin,FaceMax: Min and max tolerances of the faces.\n
11176         #  EdgeMin,EdgeMax: Min and max tolerances of the edges.\n
11177         #  VertMin,VertMax: Min and max tolerances of the vertices.
11178         #
11179         #  @ref tui_tolerance_page "Example"
11180         @ManageTransactions("MeasuOp")
11181         def Tolerance(self,theShape):
11182             """
11183             Get min and max tolerances of sub-shapes of theShape
11184
11185             Parameters:
11186                 theShape Shape, to get tolerances of.
11187
11188             Returns:
11189                 [FaceMin,FaceMax, EdgeMin,EdgeMax, VertMin,VertMax]
11190                  FaceMin,FaceMax: Min and max tolerances of the faces.
11191                  EdgeMin,EdgeMax: Min and max tolerances of the edges.
11192                  VertMin,VertMax: Min and max tolerances of the vertices.
11193             """
11194             # Example: see GEOM_TestMeasures.py
11195             aTuple = self.MeasuOp.GetTolerance(theShape)
11196             RaiseIfFailed("GetTolerance", self.MeasuOp)
11197             return aTuple
11198
11199         ## Obtain description of the given shape (number of sub-shapes of each type)
11200         #  @param theShape Shape to be described.
11201         #  @return Description of the given shape.
11202         #
11203         #  @ref tui_whatis_page "Example"
11204         @ManageTransactions("MeasuOp")
11205         def WhatIs(self,theShape):
11206             """
11207             Obtain description of the given shape (number of sub-shapes of each type)
11208
11209             Parameters:
11210                 theShape Shape to be described.
11211
11212             Returns:
11213                 Description of the given shape.
11214             """
11215             # Example: see GEOM_TestMeasures.py
11216             aDescr = self.MeasuOp.WhatIs(theShape)
11217             RaiseIfFailed("WhatIs", self.MeasuOp)
11218             return aDescr
11219
11220         ## Obtain quantity of shapes of the given type in \a theShape.
11221         #  If \a theShape is of type \a theType, it is also counted.
11222         #  @param theShape Shape to be described.
11223         #  @param theType the given ShapeType().
11224         #  @return Quantity of shapes of type \a theType in \a theShape.
11225         #
11226         #  @ref tui_measurement_tools_page "Example"
11227         def NbShapes (self, theShape, theType):
11228             """
11229             Obtain quantity of shapes of the given type in theShape.
11230             If theShape is of type theType, it is also counted.
11231
11232             Parameters:
11233                 theShape Shape to be described.
11234                 theType the given geompy.ShapeType
11235
11236             Returns:
11237                 Quantity of shapes of type theType in theShape.
11238             """
11239             # Example: see GEOM_TestMeasures.py
11240             listSh = self.SubShapeAllIDs(theShape, theType)
11241             Nb = len(listSh)
11242             return Nb
11243
11244         ## Obtain quantity of shapes of each type in \a theShape.
11245         #  The \a theShape is also counted.
11246         #  @param theShape Shape to be described.
11247         #  @return Dictionary of ShapeType() with bound quantities of shapes.
11248         #
11249         #  @ref tui_measurement_tools_page "Example"
11250         def ShapeInfo (self, theShape):
11251             """
11252             Obtain quantity of shapes of each type in theShape.
11253             The theShape is also counted.
11254
11255             Parameters:
11256                 theShape Shape to be described.
11257
11258             Returns:
11259                 Dictionary of geompy.ShapeType with bound quantities of shapes.
11260             """
11261             # Example: see GEOM_TestMeasures.py
11262             aDict = {}
11263             for typeSh in self.ShapeType:
11264                 if typeSh in ( "AUTO", "SHAPE" ): continue
11265                 listSh = self.SubShapeAllIDs(theShape, self.ShapeType[typeSh])
11266                 Nb = len(listSh)
11267                 aDict[typeSh] = Nb
11268                 pass
11269             return aDict
11270
11271         def GetCreationInformation(self, theShape):
11272             res = ''
11273             infos = theShape.GetCreationInformation()
11274             for info in infos:
11275                 # operationName
11276                 opName = info.operationName
11277                 if not opName: opName = "no info available"
11278                 if res: res += "\n"
11279                 res += "Operation: " + opName
11280                 # parameters
11281                 for parVal in info.params:
11282                     res += "\n \t%s = %s" % ( parVal.name, parVal.value )
11283             return res
11284
11285         ## Get a point, situated at the centre of mass of theShape.
11286         #  @param theShape Shape to define centre of mass of.
11287         #  @param theName Object name; when specified, this parameter is used
11288         #         for result publication in the study. Otherwise, if automatic
11289         #         publication is switched on, default value is used for result name.
11290         #
11291         #  @return New GEOM.GEOM_Object, containing the created point.
11292         #
11293         #  @ref tui_center_of_mass_page "Example"
11294         @ManageTransactions("MeasuOp")
11295         def MakeCDG(self, theShape, theName=None):
11296             """
11297             Get a point, situated at the centre of mass of theShape.
11298
11299             Parameters:
11300                 theShape Shape to define centre of mass of.
11301                 theName Object name; when specified, this parameter is used
11302                         for result publication in the study. Otherwise, if automatic
11303                         publication is switched on, default value is used for result name.
11304
11305             Returns:
11306                 New GEOM.GEOM_Object, containing the created point.
11307             """
11308             # Example: see GEOM_TestMeasures.py
11309             anObj = self.MeasuOp.GetCentreOfMass(theShape)
11310             RaiseIfFailed("GetCentreOfMass", self.MeasuOp)
11311             self._autoPublish(anObj, theName, "centerOfMass")
11312             return anObj
11313
11314         ## Get a vertex sub-shape by index.
11315         #  @param theShape Shape to find sub-shape.
11316         #  @param theIndex Index to find vertex by this index (starting from zero)
11317         #  @param theUseOri To consider edge/wire orientation or not
11318         #  @param theName Object name; when specified, this parameter is used
11319         #         for result publication in the study. Otherwise, if automatic
11320         #         publication is switched on, default value is used for result name.
11321         #
11322         #  @return New GEOM.GEOM_Object, containing the created vertex.
11323         #
11324         #  @ref tui_measurement_tools_page "Example"
11325         @ManageTransactions("MeasuOp")
11326         def GetVertexByIndex(self, theShape, theIndex, theUseOri=True, theName=None):
11327             """
11328             Get a vertex sub-shape by index.
11329
11330             Parameters:
11331                 theShape Shape to find sub-shape.
11332                 theIndex Index to find vertex by this index (starting from zero)
11333                 theUseOri To consider edge/wire orientation or not
11334                 theName Object name; when specified, this parameter is used
11335                         for result publication in the study. Otherwise, if automatic
11336                         publication is switched on, default value is used for result name.
11337
11338             Returns:
11339                 New GEOM.GEOM_Object, containing the created vertex.
11340             """
11341             # Example: see GEOM_TestMeasures.py
11342             if isinstance( theUseOri, str ): # theUseOri was inserted before theName
11343                 theUseOri, theName = True, theUseOri
11344             anObj = self.MeasuOp.GetVertexByIndex(theShape, theIndex, theUseOri)
11345             RaiseIfFailed("GetVertexByIndex", self.MeasuOp)
11346             self._autoPublish(anObj, theName, "vertex")
11347             return anObj
11348
11349         ## Get the first vertex of wire/edge depended orientation.
11350         #  @param theShape Shape to find first vertex.
11351         #  @param theName Object name; when specified, this parameter is used
11352         #         for result publication in the study. Otherwise, if automatic
11353         #         publication is switched on, default value is used for result name.
11354         #
11355         #  @return New GEOM.GEOM_Object, containing the created vertex.
11356         #
11357         #  @ref tui_measurement_tools_page "Example"
11358         def GetFirstVertex(self, theShape, theName=None):
11359             """
11360             Get the first vertex of wire/edge depended orientation.
11361
11362             Parameters:
11363                 theShape Shape to find first vertex.
11364                 theName Object name; when specified, this parameter is used
11365                         for result publication in the study. Otherwise, if automatic
11366                         publication is switched on, default value is used for result name.
11367
11368             Returns:
11369                 New GEOM.GEOM_Object, containing the created vertex.
11370             """
11371             # Example: see GEOM_TestMeasures.py
11372             # note: auto-publishing is done in self.GetVertexByIndex()
11373             return self.GetVertexByIndex(theShape, 0, True, theName)
11374
11375         ## Get the last vertex of wire/edge depended orientation.
11376         #  @param theShape Shape to find last vertex.
11377         #  @param theName Object name; when specified, this parameter is used
11378         #         for result publication in the study. Otherwise, if automatic
11379         #         publication is switched on, default value is used for result name.
11380         #
11381         #  @return New GEOM.GEOM_Object, containing the created vertex.
11382         #
11383         #  @ref tui_measurement_tools_page "Example"
11384         def GetLastVertex(self, theShape, theName=None):
11385             """
11386             Get the last vertex of wire/edge depended orientation.
11387
11388             Parameters:
11389                 theShape Shape to find last vertex.
11390                 theName Object name; when specified, this parameter is used
11391                         for result publication in the study. Otherwise, if automatic
11392                         publication is switched on, default value is used for result name.
11393
11394             Returns:
11395                 New GEOM.GEOM_Object, containing the created vertex.
11396             """
11397             # Example: see GEOM_TestMeasures.py
11398             nb_vert =  self.NumberOfSubShapes(theShape, self.ShapeType["VERTEX"])
11399             # note: auto-publishing is done in self.GetVertexByIndex()
11400             return self.GetVertexByIndex(theShape, (nb_vert-1), True, theName)
11401
11402         ## Get a normale to the given face. If the point is not given,
11403         #  the normale is calculated at the center of mass.
11404         #  @param theFace Face to define normale of.
11405         #  @param theOptionalPoint Point to compute the normale at.
11406         #  @param theName Object name; when specified, this parameter is used
11407         #         for result publication in the study. Otherwise, if automatic
11408         #         publication is switched on, default value is used for result name.
11409         #
11410         #  @return New GEOM.GEOM_Object, containing the created vector.
11411         #
11412         #  @ref swig_todo "Example"
11413         @ManageTransactions("MeasuOp")
11414         def GetNormal(self, theFace, theOptionalPoint = None, theName=None):
11415             """
11416             Get a normale to the given face. If the point is not given,
11417             the normale is calculated at the center of mass.
11418
11419             Parameters:
11420                 theFace Face to define normale of.
11421                 theOptionalPoint Point to compute the normale at.
11422                 theName Object name; when specified, this parameter is used
11423                         for result publication in the study. Otherwise, if automatic
11424                         publication is switched on, default value is used for result name.
11425
11426             Returns:
11427                 New GEOM.GEOM_Object, containing the created vector.
11428             """
11429             # Example: see GEOM_TestMeasures.py
11430             anObj = self.MeasuOp.GetNormal(theFace, theOptionalPoint)
11431             RaiseIfFailed("GetNormal", self.MeasuOp)
11432             self._autoPublish(anObj, theName, "normal")
11433             return anObj
11434
11435         ## Print shape errors obtained from CheckShape.
11436         #  @param theShape Shape that was checked.
11437         #  @param theShapeErrors the shape errors obtained by CheckShape.
11438         #  @param theReturnStatus If 0 the description of problem is printed.
11439         #                         If 1 the description of problem is returned.
11440         #  @return If theReturnStatus is equal to 1 the description is returned.
11441         #          Otherwise doesn't return anything.
11442         #
11443         #  @ref tui_check_shape_page "Example"
11444         @ManageTransactions("MeasuOp")
11445         def PrintShapeErrors(self, theShape, theShapeErrors, theReturnStatus = 0):
11446             """
11447             Print shape errors obtained from CheckShape.
11448
11449             Parameters:
11450                 theShape Shape that was checked.
11451                 theShapeErrors the shape errors obtained by CheckShape.
11452                 theReturnStatus If 0 the description of problem is printed.
11453                                 If 1 the description of problem is returned.
11454
11455             Returns:
11456                 If theReturnStatus is equal to 1 the description is returned.
11457                   Otherwise doesn't return anything.
11458             """
11459             # Example: see GEOM_TestMeasures.py
11460             Descr = self.MeasuOp.PrintShapeErrors(theShape, theShapeErrors)
11461             if theReturnStatus == 1:
11462                 return Descr
11463             print(Descr)
11464             pass
11465
11466         ## Check a topology of the given shape.
11467         #  @param theShape Shape to check validity of.
11468         #  @param theIsCheckGeom If FALSE, only the shape's topology will be checked, \n
11469         #                        if TRUE, the shape's geometry will be checked also.
11470         #  @param theReturnStatus If 0 and if theShape is invalid, a description
11471         #                         of problem is printed.
11472         #                         If 1 isValid flag and the description of
11473         #                         problem is returned.
11474         #                         If 2 isValid flag and the list of error data
11475         #                         is returned.
11476         #  @return TRUE, if the shape "seems to be valid".
11477         #          If theShape is invalid, prints a description of problem.
11478         #          If theReturnStatus is equal to 1 the description is returned
11479         #          along with IsValid flag.
11480         #          If theReturnStatus is equal to 2 the list of error data is
11481         #          returned along with IsValid flag.
11482         #
11483         #  @ref tui_check_shape_page "Example"
11484         @ManageTransactions("MeasuOp")
11485         def CheckShape(self,theShape, theIsCheckGeom = 0, theReturnStatus = 0):
11486             """
11487             Check a topology of the given shape.
11488
11489             Parameters:
11490                 theShape Shape to check validity of.
11491                 theIsCheckGeom If FALSE, only the shape's topology will be checked,
11492                                if TRUE, the shape's geometry will be checked also.
11493                 theReturnStatus If 0 and if theShape is invalid, a description
11494                                 of problem is printed.
11495                                 If 1 IsValid flag and the description of
11496                                 problem is returned.
11497                                 If 2 IsValid flag and the list of error data
11498                                 is returned.
11499
11500             Returns:
11501                 TRUE, if the shape "seems to be valid".
11502                 If theShape is invalid, prints a description of problem.
11503                 If theReturnStatus is equal to 1 the description is returned
11504                 along with IsValid flag.
11505                 If theReturnStatus is equal to 2 the list of error data is
11506                 returned along with IsValid flag.
11507             """
11508             # Example: see GEOM_TestMeasures.py
11509             if theIsCheckGeom:
11510                 (IsValid, ShapeErrors) = self.MeasuOp.CheckShapeWithGeometry(theShape)
11511                 RaiseIfFailed("CheckShapeWithGeometry", self.MeasuOp)
11512             else:
11513                 (IsValid, ShapeErrors) = self.MeasuOp.CheckShape(theShape)
11514                 RaiseIfFailed("CheckShape", self.MeasuOp)
11515             if IsValid == 0:
11516                 if theReturnStatus == 0:
11517                     Descr = self.MeasuOp.PrintShapeErrors(theShape, ShapeErrors)
11518                     print(Descr)
11519             if theReturnStatus == 1:
11520               Descr = self.MeasuOp.PrintShapeErrors(theShape, ShapeErrors)
11521               return (IsValid, Descr)
11522             elif theReturnStatus == 2:
11523               return (IsValid, ShapeErrors)
11524             return IsValid
11525
11526         ## Detect self-intersections in the given shape.
11527         #  @param theShape Shape to check.
11528         #  @param theCheckLevel is the level of self-intersection check.
11529         #         Possible input values are:
11530         #         - GEOM.SI_V_V(0) - only V/V interferences
11531         #         - GEOM.SI_V_E(1) - V/V and V/E interferences
11532         #         - GEOM.SI_E_E(2) - V/V, V/E and E/E interferences
11533         #         - GEOM.SI_V_F(3) - V/V, V/E, E/E and V/F interferences
11534         #         - GEOM.SI_E_F(4) - V/V, V/E, E/E, V/F and E/F interferences
11535         #         - GEOM.SI_ALL(5) - all interferences.
11536         #  @return TRUE, if the shape contains no self-intersections.
11537         #
11538         #  @ref tui_check_self_intersections_page "Example"
11539         @ManageTransactions("MeasuOp")
11540         def CheckSelfIntersections(self, theShape, theCheckLevel = GEOM.SI_ALL):
11541             """
11542             Detect self-intersections in the given shape.
11543
11544             Parameters:
11545                 theShape Shape to check.
11546                 theCheckLevel is the level of self-intersection check.
11547                   Possible input values are:
11548                    - GEOM.SI_V_V(0) - only V/V interferences
11549                    - GEOM.SI_V_E(1) - V/V and V/E interferences
11550                    - GEOM.SI_E_E(2) - V/V, V/E and E/E interferences
11551                    - GEOM.SI_V_F(3) - V/V, V/E, E/E and V/F interferences
11552                    - GEOM.SI_E_F(4) - V/V, V/E, E/E, V/F and E/F interferences
11553                    - GEOM.SI_ALL(5) - all interferences.
11554  
11555             Returns:
11556                 TRUE, if the shape contains no self-intersections.
11557             """
11558             # Example: see GEOM_TestMeasures.py
11559             (IsValid, Pairs) = self.MeasuOp.CheckSelfIntersections(theShape, EnumToLong(theCheckLevel))
11560             RaiseIfFailed("CheckSelfIntersections", self.MeasuOp)
11561             return IsValid
11562
11563         ## Detect self-intersections of the given shape with algorithm based on mesh intersections.
11564         #  @param theShape Shape to check.
11565         #  @param theDeflection Linear deflection coefficient that specifies quality of tessellation:
11566         #         - if \a theDeflection <= 0, default deflection 0.001 is used
11567         #  @param theTolerance Specifies a distance between sub-shapes used for detecting gaps:
11568         #         - if \a theTolerance <= 0, algorithm detects intersections (default behavior)
11569         #         - if \a theTolerance > 0, algorithm detects gaps
11570         #  @return TRUE, if the shape contains no self-intersections.
11571         #
11572         #  @ref tui_check_self_intersections_fast_page "Example"
11573         @ManageTransactions("MeasuOp")
11574         def CheckSelfIntersectionsFast(self, theShape, theDeflection = 0.001, theTolerance = 0.0):
11575             """
11576             Detect self-intersections of the given shape with algorithm based on mesh intersections.
11577
11578             Parameters:
11579                 theShape Shape to check.
11580                 theDeflection Linear deflection coefficient that specifies quality of tessellation:
11581                     - if theDeflection <= 0, default deflection 0.001 is used
11582                 theTolerance Specifies a distance between shapes used for detecting gaps:
11583                     - if theTolerance <= 0, algorithm detects intersections (default behavior)
11584                     - if theTolerance > 0, algorithm detects gaps
11585  
11586             Returns:
11587                 TRUE, if the shape contains no self-intersections.
11588             """
11589             # Example: see GEOM_TestMeasures.py
11590             (IsValid, Pairs) = self.MeasuOp.CheckSelfIntersectionsFast(theShape, theDeflection, theTolerance)
11591             RaiseIfFailed("CheckSelfIntersectionsFast", self.MeasuOp)
11592             return IsValid
11593
11594         ## Check boolean and partition operations arguments.
11595         #  @param theShape the argument of an operation to be checked
11596         #  @return TRUE if the argument is valid for a boolean or partition
11597         #          operation; FALSE otherwise.
11598         @ManageTransactions("MeasuOp")
11599         def CheckBOPArguments(self, theShape):
11600             """
11601             Check boolean and partition operations arguments.
11602
11603             Parameters:
11604                 theShape the argument of an operation to be checked
11605
11606             Returns:
11607                 TRUE if the argument is valid for a boolean or partition
11608                 operation; FALSE otherwise.
11609             """
11610             return self.MeasuOp.CheckBOPArguments(theShape)
11611
11612         ## Detect intersections of the given shapes with algorithm based on mesh intersections.
11613         #  @param theShape1 First source object
11614         #  @param theShape2 Second source object
11615         #  @param theTolerance Specifies a distance between shapes used for detecting gaps:
11616         #         - if \a theTolerance <= 0, algorithm detects intersections (default behavior)
11617         #         - if \a theTolerance > 0, algorithm detects gaps
11618         #  @param theDeflection Linear deflection coefficient that specifies quality of tessellation:
11619         #         - if \a theDeflection <= 0, default deflection 0.001 is used
11620         #  @return TRUE, if there are intersections (gaps) between source shapes
11621         #  @return List of sub-shapes IDs from 1st shape that localize intersection.
11622         #  @return List of sub-shapes IDs from 2nd shape that localize intersection.
11623         #
11624         #  @ref tui_fast_intersection_page "Example"
11625         @ManageTransactions("MeasuOp")
11626         def FastIntersect(self, theShape1, theShape2, theTolerance = 0.0, theDeflection = 0.001):
11627             """
11628             Detect intersections of the given shapes with algorithm based on mesh intersections.
11629
11630             Parameters:
11631                 theShape1 First source object
11632                 theShape2 Second source object
11633                 theTolerance Specifies a distance between shapes used for detecting gaps:
11634                     - if theTolerance <= 0, algorithm detects intersections (default behavior)
11635                     - if theTolerance > 0, algorithm detects gaps
11636                 theDeflection Linear deflection coefficient that specifies quality of tessellation:
11637                     - if theDeflection <= 0, default deflection 0.001 is used
11638  
11639             Returns:
11640                 TRUE, if there are intersections (gaps) between source shapes
11641                 List of sub-shapes IDs from 1st shape that localize intersection.
11642                 List of sub-shapes IDs from 2nd shape that localize intersection.
11643             """
11644             # Example: see GEOM_TestMeasures.py
11645             IsOk, Res1, Res2 = self.MeasuOp.FastIntersect(theShape1, theShape2, theTolerance, theDeflection)
11646             RaiseIfFailed("FastIntersect", self.MeasuOp)
11647             return IsOk, Res1, Res2
11648
11649         ## Get position (LCS) of theShape.
11650         #
11651         #  Origin of the LCS is situated at the shape's center of mass.
11652         #  Axes of the LCS are obtained from shape's location or,
11653         #  if the shape is a planar face, from position of its plane.
11654         #
11655         #  @param theShape Shape to calculate position of.
11656         #  @return [Ox,Oy,Oz, Zx,Zy,Zz, Xx,Xy,Xz].
11657         #          Ox,Oy,Oz: Coordinates of shape's LCS origin.
11658         #          Zx,Zy,Zz: Coordinates of shape's LCS normal(main) direction.
11659         #          Xx,Xy,Xz: Coordinates of shape's LCS X direction.
11660         #
11661         #  @ref swig_todo "Example"
11662         @ManageTransactions("MeasuOp")
11663         def GetPosition(self,theShape):
11664             """
11665             Get position (LCS) of theShape.
11666             Origin of the LCS is situated at the shape's center of mass.
11667             Axes of the LCS are obtained from shape's location or,
11668             if the shape is a planar face, from position of its plane.
11669
11670             Parameters:
11671                 theShape Shape to calculate position of.
11672
11673             Returns:
11674                 [Ox,Oy,Oz, Zx,Zy,Zz, Xx,Xy,Xz].
11675                  Ox,Oy,Oz: Coordinates of shape's LCS origin.
11676                  Zx,Zy,Zz: Coordinates of shape's LCS normal(main) direction.
11677                  Xx,Xy,Xz: Coordinates of shape's LCS X direction.
11678             """
11679             # Example: see GEOM_TestMeasures.py
11680             aTuple = self.MeasuOp.GetPosition(theShape)
11681             RaiseIfFailed("GetPosition", self.MeasuOp)
11682             return aTuple
11683
11684         ## Get kind of theShape.
11685         #
11686         #  @param theShape Shape to get a kind of.
11687         #  @return Returns a kind of shape in terms of <VAR>GEOM.GEOM_IKindOfShape.shape_kind</VAR> enumeration
11688         #          and a list of parameters, describing the shape.
11689         #  @note  Concrete meaning of each value, returned via \a theIntegers
11690         #         or \a theDoubles list depends on the kind() of the shape.
11691         #
11692         #  @ref swig_todo "Example"
11693         @ManageTransactions("MeasuOp")
11694         def KindOfShape(self,theShape):
11695             """
11696             Get kind of theShape.
11697
11698             Parameters:
11699                 theShape Shape to get a kind of.
11700
11701             Returns:
11702                 a kind of shape in terms of GEOM_IKindOfShape.shape_kind enumeration
11703                     and a list of parameters, describing the shape.
11704             Note:
11705                 Concrete meaning of each value, returned via theIntegers
11706                 or theDoubles list depends on the geompy.kind of the shape
11707             """
11708             # Example: see GEOM_TestMeasures.py
11709             aRoughTuple = self.MeasuOp.KindOfShape(theShape)
11710             RaiseIfFailed("KindOfShape", self.MeasuOp)
11711
11712             aKind  = aRoughTuple[0]
11713             anInts = aRoughTuple[1]
11714             aDbls  = aRoughTuple[2]
11715
11716             # Now there is no exception from this rule:
11717             aKindTuple = [aKind] + aDbls + anInts
11718
11719             # If they are we will regroup parameters for such kind of shape.
11720             # For example:
11721             #if aKind == kind.SOME_KIND:
11722             #    #  SOME_KIND     int int double int double double
11723             #    aKindTuple = [aKind, anInts[0], anInts[1], aDbls[0], anInts[2], aDbls[1], aDbls[2]]
11724
11725             return aKindTuple
11726
11727         ## Returns the string that describes if the shell is good for solid.
11728         #  This is a support method for MakeSolid.
11729         #
11730         #  @param theShell the shell to be checked.
11731         #  @return Returns a string that describes the shell validity for
11732         #          solid construction.
11733         @ManageTransactions("MeasuOp")
11734         def _IsGoodForSolid(self, theShell):
11735             """
11736             Returns the string that describes if the shell is good for solid.
11737             This is a support method for MakeSolid.
11738
11739             Parameter:
11740                 theShell the shell to be checked.
11741
11742             Returns:
11743                 Returns a string that describes the shell validity for
11744                 solid construction.
11745             """
11746             aDescr = self.MeasuOp.IsGoodForSolid(theShell)
11747             return aDescr
11748
11749         # end of l2_measure
11750         ## @}
11751
11752         ## @addtogroup l2_import_export
11753         ## @{
11754
11755         ## Import a shape from the BREP, IGES, STEP or other file
11756         #  (depends on given format) with given name.
11757         #
11758         #  Note: this function is deprecated, it is kept for backward compatibility only
11759         #  Use Import<FormatName> instead, where <FormatName> is a name of desirable format to import.
11760         #
11761         #  @param theFileName The file, containing the shape.
11762         #  @param theFormatName Specify format for the file reading.
11763         #         Available formats can be obtained with InsertOp.ImportTranslators() method.
11764         #         If format 'IGES_SCALE' is used instead of 'IGES' or
11765         #            format 'STEP_SCALE' is used instead of 'STEP',
11766         #            length unit will be set to 'meter' and result model will be scaled.
11767         #  @param theName Object name; when specified, this parameter is used
11768         #         for result publication in the study. Otherwise, if automatic
11769         #         publication is switched on, default value is used for result name.
11770         #
11771         #  @return New GEOM.GEOM_Object, containing the imported shape.
11772         #          If material names are imported it returns the list of
11773         #          objects. The first one is the imported object followed by
11774         #          material groups.
11775         #  @note Auto publishing is allowed for the shape itself. Imported
11776         #        material groups are not automatically published.
11777         #
11778         #  @ref swig_Import_Export "Example"
11779         @ManageTransactions("InsertOp")
11780         def ImportFile(self, theFileName, theFormatName, theName=None):
11781             """
11782             Import a shape from the BREP, IGES, STEP or other file
11783             (depends on given format) with given name.
11784
11785             Note: this function is deprecated, it is kept for backward compatibility only
11786             Use Import<FormatName> instead, where <FormatName> is a name of desirable format to import.
11787
11788             Parameters: 
11789                 theFileName The file, containing the shape.
11790                 theFormatName Specify format for the file reading.
11791                     Available formats can be obtained with geompy.InsertOp.ImportTranslators() method.
11792                     If format 'IGES_SCALE' is used instead of 'IGES' or
11793                        format 'STEP_SCALE' is used instead of 'STEP',
11794                        length unit will be set to 'meter' and result model will be scaled.
11795                 theName Object name; when specified, this parameter is used
11796                         for result publication in the study. Otherwise, if automatic
11797                         publication is switched on, default value is used for result name.
11798
11799             Returns:
11800                 New GEOM.GEOM_Object, containing the imported shape.
11801                 If material names are imported it returns the list of
11802                 objects. The first one is the imported object followed by
11803                 material groups.
11804             Note:
11805                 Auto publishing is allowed for the shape itself. Imported
11806                 material groups are not automatically published.
11807             """
11808             # Example: see GEOM_TestOthers.py
11809             print("""
11810             WARNING: Function ImportFile is deprecated, use Import<FormatName> instead,
11811             where <FormatName> is a name of desirable format for importing.
11812             """)
11813             aListObj = self.InsertOp.ImportFile(theFileName, theFormatName)
11814             RaiseIfFailed("ImportFile", self.InsertOp)
11815             aNbObj = len(aListObj)
11816             if aNbObj > 0:
11817                 self._autoPublish(aListObj[0], theName, "imported")
11818             if aNbObj == 1:
11819                 return aListObj[0]
11820             return aListObj
11821
11822         ## Deprecated analog of ImportFile()
11823         def Import(self, theFileName, theFormatName, theName=None):
11824             """
11825             Deprecated analog of geompy.ImportFile, kept for backward compatibility only.
11826             """
11827             # note: auto-publishing is done in self.ImportFile()
11828             return self.ImportFile(theFileName, theFormatName, theName)
11829
11830         ## Read a shape from the binary stream, containing its bounding representation (BRep).
11831         #
11832         #  @note As the byte-stream representing the shape data can be quite large, this method
11833         #  is not automatically dumped to the Python script with the DumpStudy functionality;
11834         #  so please use this method carefully, only for strong reasons.
11835         #  
11836         #  @note GEOM.GEOM_Object.GetShapeStream() method can be used to obtain the shape's
11837         #  data stream.
11838         #
11839         #  @param theStream The BRep binary stream.
11840         #  @param theName Object name; when specified, this parameter is used
11841         #         for result publication in the study. Otherwise, if automatic
11842         #         publication is switched on, default value is used for result name.
11843         #
11844         #  @return New GEOM_Object, containing the shape, read from theStream.
11845         #
11846         #  @ref swig_Import_Export "Example"
11847         @ManageTransactions("InsertOp")
11848         def RestoreShape (self, theStream, theName=None):
11849             """
11850             Read a shape from the binary stream, containing its bounding representation (BRep).
11851
11852             Note:
11853                 shape.GetShapeStream() method can be used to obtain the shape's BRep stream.
11854
11855             Parameters:
11856                 theStream The BRep binary stream.
11857                 theName Object name; when specified, this parameter is used
11858                         for result publication in the study. Otherwise, if automatic
11859                         publication is switched on, default value is used for result name.
11860
11861             Returns:
11862                 New GEOM_Object, containing the shape, read from theStream.
11863             """
11864             # Example: see GEOM_TestOthers.py
11865             if not theStream:
11866                 # this is the workaround to ignore invalid case when data stream is empty
11867                 if int(os.getenv("GEOM_IGNORE_RESTORE_SHAPE", "0")) > 0:
11868                     print("WARNING: Result of RestoreShape is a NULL shape!")
11869                     return None
11870             anObj = self.InsertOp.RestoreShape(theStream)
11871             RaiseIfFailed("RestoreShape", self.InsertOp)
11872             self._autoPublish(anObj, theName, "restored")
11873             return anObj
11874
11875         ## Export the given shape into a file with given name.
11876         #
11877         #  Note: this function is deprecated, it is kept for backward compatibility only
11878         #  Use Export<FormatName> instead, where <FormatName> is a name of desirable format to export.
11879         #
11880         #  @param theObject Shape to be stored in the file.
11881         #  @param theFileName Name of the file to store the given shape in.
11882         #  @param theFormatName Specify format for the shape storage.
11883         #         Available formats can be obtained with
11884         #         geompy.InsertOp.ExportTranslators()[0] method.
11885         #
11886         #  @ref swig_Import_Export "Example"
11887         @ManageTransactions("InsertOp")
11888         def Export(self, theObject, theFileName, theFormatName):
11889             """
11890             Export the given shape into a file with given name.
11891
11892             Note: this function is deprecated, it is kept for backward compatibility only
11893             Use Export<FormatName> instead, where <FormatName> is a name of desirable format to export.
11894             
11895             Parameters: 
11896                 theObject Shape to be stored in the file.
11897                 theFileName Name of the file to store the given shape in.
11898                 theFormatName Specify format for the shape storage.
11899                               Available formats can be obtained with
11900                               geompy.InsertOp.ExportTranslators()[0] method.
11901             """
11902             # Example: see GEOM_TestOthers.py
11903             print("""
11904             WARNING: Function Export is deprecated, use Export<FormatName> instead,
11905             where <FormatName> is a name of desirable format for exporting.
11906             """)
11907             self.InsertOp.Export(theObject, theFileName, theFormatName)
11908             if self.InsertOp.IsDone() == 0:
11909                 raise RuntimeError("Export : " + self.InsertOp.GetErrorCode())
11910                 pass
11911             pass
11912
11913         # end of l2_import_export
11914         ## @}
11915
11916         ## @addtogroup l3_blocks
11917         ## @{
11918
11919         ## Create a quadrangle face from four edges. Order of Edges is not
11920         #  important. It is not necessary that edges share the same vertex.
11921         #  @param E1,E2,E3,E4 Edges for the face bound.
11922         #  @param theName Object name; when specified, this parameter is used
11923         #         for result publication in the study. Otherwise, if automatic
11924         #         publication is switched on, default value is used for result name.
11925         #
11926         #  @return New GEOM.GEOM_Object, containing the created face.
11927         #
11928         #  @ref tui_building_by_blocks_page "Example"
11929         @ManageTransactions("BlocksOp")
11930         def MakeQuad(self, E1, E2, E3, E4, theName=None):
11931             """
11932             Create a quadrangle face from four edges. Order of Edges is not
11933             important. It is not necessary that edges share the same vertex.
11934
11935             Parameters:
11936                 E1,E2,E3,E4 Edges for the face bound.
11937                 theName Object name; when specified, this parameter is used
11938                         for result publication in the study. Otherwise, if automatic
11939                         publication is switched on, default value is used for result name.
11940
11941             Returns:
11942                 New GEOM.GEOM_Object, containing the created face.
11943
11944             Example of usage:
11945                 qface1 = geompy.MakeQuad(edge1, edge2, edge3, edge4)
11946             """
11947             # Example: see GEOM_Spanner.py
11948             anObj = self.BlocksOp.MakeQuad(E1, E2, E3, E4)
11949             RaiseIfFailed("MakeQuad", self.BlocksOp)
11950             self._autoPublish(anObj, theName, "quad")
11951             return anObj
11952
11953         ## Create a quadrangle face on two edges.
11954         #  The missing edges will be built by creating the shortest ones.
11955         #  @param E1,E2 Two opposite edges for the face.
11956         #  @param theName Object name; when specified, this parameter is used
11957         #         for result publication in the study. Otherwise, if automatic
11958         #         publication is switched on, default value is used for result name.
11959         #
11960         #  @return New GEOM.GEOM_Object, containing the created face.
11961         #
11962         #  @ref tui_building_by_blocks_page "Example"
11963         @ManageTransactions("BlocksOp")
11964         def MakeQuad2Edges(self, E1, E2, theName=None):
11965             """
11966             Create a quadrangle face on two edges.
11967             The missing edges will be built by creating the shortest ones.
11968
11969             Parameters:
11970                 E1,E2 Two opposite edges for the face.
11971                 theName Object name; when specified, this parameter is used
11972                         for result publication in the study. Otherwise, if automatic
11973                         publication is switched on, default value is used for result name.
11974
11975             Returns:
11976                 New GEOM.GEOM_Object, containing the created face.
11977
11978             Example of usage:
11979                 # create vertices
11980                 p1 = geompy.MakeVertex(  0.,   0.,   0.)
11981                 p2 = geompy.MakeVertex(150.,  30.,   0.)
11982                 p3 = geompy.MakeVertex(  0., 120.,  50.)
11983                 p4 = geompy.MakeVertex(  0.,  40.,  70.)
11984                 # create edges
11985                 edge1 = geompy.MakeEdge(p1, p2)
11986                 edge2 = geompy.MakeEdge(p3, p4)
11987                 # create a quadrangle face from two edges
11988                 qface2 = geompy.MakeQuad2Edges(edge1, edge2)
11989             """
11990             # Example: see GEOM_Spanner.py
11991             anObj = self.BlocksOp.MakeQuad2Edges(E1, E2)
11992             RaiseIfFailed("MakeQuad2Edges", self.BlocksOp)
11993             self._autoPublish(anObj, theName, "quad")
11994             return anObj
11995
11996         ## Create a quadrangle face with specified corners.
11997         #  The missing edges will be built by creating the shortest ones.
11998         #  @param V1,V2,V3,V4 Corner vertices for the face.
11999         #  @param theName Object name; when specified, this parameter is used
12000         #         for result publication in the study. Otherwise, if automatic
12001         #         publication is switched on, default value is used for result name.
12002         #
12003         #  @return New GEOM.GEOM_Object, containing the created face.
12004         #
12005         #  @ref tui_building_by_blocks_page "Example 1"
12006         #  \n @ref swig_MakeQuad4Vertices "Example 2"
12007         @ManageTransactions("BlocksOp")
12008         def MakeQuad4Vertices(self, V1, V2, V3, V4, theName=None):
12009             """
12010             Create a quadrangle face with specified corners.
12011             The missing edges will be built by creating the shortest ones.
12012
12013             Parameters:
12014                 V1,V2,V3,V4 Corner vertices for the face.
12015                 theName Object name; when specified, this parameter is used
12016                         for result publication in the study. Otherwise, if automatic
12017                         publication is switched on, default value is used for result name.
12018
12019             Returns:
12020                 New GEOM.GEOM_Object, containing the created face.
12021
12022             Example of usage:
12023                 # create vertices
12024                 p1 = geompy.MakeVertex(  0.,   0.,   0.)
12025                 p2 = geompy.MakeVertex(150.,  30.,   0.)
12026                 p3 = geompy.MakeVertex(  0., 120.,  50.)
12027                 p4 = geompy.MakeVertex(  0.,  40.,  70.)
12028                 # create a quadrangle from four points in its corners
12029                 qface3 = geompy.MakeQuad4Vertices(p1, p2, p3, p4)
12030             """
12031             # Example: see GEOM_Spanner.py
12032             anObj = self.BlocksOp.MakeQuad4Vertices(V1, V2, V3, V4)
12033             RaiseIfFailed("MakeQuad4Vertices", self.BlocksOp)
12034             self._autoPublish(anObj, theName, "quad")
12035             return anObj
12036
12037         ## Create a hexahedral solid, bounded by the six given faces. Order of
12038         #  faces is not important. It is not necessary that Faces share the same edge.
12039         #  @param F1,F2,F3,F4,F5,F6 Faces for the hexahedral solid.
12040         #  @param theName Object name; when specified, this parameter is used
12041         #         for result publication in the study. Otherwise, if automatic
12042         #         publication is switched on, default value is used for result name.
12043         #
12044         #  @return New GEOM.GEOM_Object, containing the created solid.
12045         #
12046         #  @ref tui_building_by_blocks_page "Example 1"
12047         #  \n @ref swig_MakeHexa "Example 2"
12048         @ManageTransactions("BlocksOp")
12049         def MakeHexa(self, F1, F2, F3, F4, F5, F6, theName=None):
12050             """
12051             Create a hexahedral solid, bounded by the six given faces. Order of
12052             faces is not important. It is not necessary that Faces share the same edge.
12053
12054             Parameters:
12055                 F1,F2,F3,F4,F5,F6 Faces for the hexahedral solid.
12056                 theName Object name; when specified, this parameter is used
12057                         for result publication in the study. Otherwise, if automatic
12058                         publication is switched on, default value is used for result name.
12059
12060             Returns:
12061                 New GEOM.GEOM_Object, containing the created solid.
12062
12063             Example of usage:
12064                 solid = geompy.MakeHexa(qface1, qface2, qface3, qface4, qface5, qface6)
12065             """
12066             # Example: see GEOM_Spanner.py
12067             anObj = self.BlocksOp.MakeHexa(F1, F2, F3, F4, F5, F6)
12068             RaiseIfFailed("MakeHexa", self.BlocksOp)
12069             self._autoPublish(anObj, theName, "hexa")
12070             return anObj
12071
12072         ## Create a hexahedral solid between two given faces.
12073         #  The missing faces will be built by creating the smallest ones.
12074         #  @param F1,F2 Two opposite faces for the hexahedral solid.
12075         #  @param theName Object name; when specified, this parameter is used
12076         #         for result publication in the study. Otherwise, if automatic
12077         #         publication is switched on, default value is used for result name.
12078         #
12079         #  @return New GEOM.GEOM_Object, containing the created solid.
12080         #
12081         #  @ref tui_building_by_blocks_page "Example 1"
12082         #  \n @ref swig_MakeHexa2Faces "Example 2"
12083         @ManageTransactions("BlocksOp")
12084         def MakeHexa2Faces(self, F1, F2, theName=None):
12085             """
12086             Create a hexahedral solid between two given faces.
12087             The missing faces will be built by creating the smallest ones.
12088
12089             Parameters:
12090                 F1,F2 Two opposite faces for the hexahedral solid.
12091                 theName Object name; when specified, this parameter is used
12092                         for result publication in the study. Otherwise, if automatic
12093                         publication is switched on, default value is used for result name.
12094
12095             Returns:
12096                 New GEOM.GEOM_Object, containing the created solid.
12097
12098             Example of usage:
12099                 solid1 = geompy.MakeHexa2Faces(qface1, qface2)
12100             """
12101             # Example: see GEOM_Spanner.py
12102             anObj = self.BlocksOp.MakeHexa2Faces(F1, F2)
12103             RaiseIfFailed("MakeHexa2Faces", self.BlocksOp)
12104             self._autoPublish(anObj, theName, "hexa")
12105             return anObj
12106
12107         # end of l3_blocks
12108         ## @}
12109
12110         ## @addtogroup l3_blocks_op
12111         ## @{
12112
12113         ## Get a vertex, found in the given shape by its coordinates.
12114         #  @param theShape Block or a compound of blocks.
12115         #  @param theX,theY,theZ Coordinates of the sought vertex.
12116         #  @param theEpsilon Maximum allowed distance between the resulting
12117         #                    vertex and point with the given coordinates.
12118         #  @param theName Object name; when specified, this parameter is used
12119         #         for result publication in the study. Otherwise, if automatic
12120         #         publication is switched on, default value is used for result name.
12121         #
12122         #  @return New GEOM.GEOM_Object, containing the found vertex.
12123         #
12124         #  @ref swig_GetPoint "Example"
12125         @ManageTransactions("BlocksOp")
12126         def GetPoint(self, theShape, theX, theY, theZ, theEpsilon, theName=None):
12127             """
12128             Get a vertex, found in the given shape by its coordinates.
12129
12130             Parameters:
12131                 theShape Block or a compound of blocks.
12132                 theX,theY,theZ Coordinates of the sought vertex.
12133                 theEpsilon Maximum allowed distance between the resulting
12134                            vertex and point with the given coordinates.
12135                 theName Object name; when specified, this parameter is used
12136                         for result publication in the study. Otherwise, if automatic
12137                         publication is switched on, default value is used for result name.
12138
12139             Returns:
12140                 New GEOM.GEOM_Object, containing the found vertex.
12141
12142             Example of usage:
12143                 pnt = geompy.GetPoint(shape, -50,  50,  50, 0.01)
12144             """
12145             # Example: see GEOM_TestOthers.py
12146             anObj = self.BlocksOp.GetPoint(theShape, theX, theY, theZ, theEpsilon)
12147             RaiseIfFailed("GetPoint", self.BlocksOp)
12148             self._autoPublish(anObj, theName, "vertex")
12149             return anObj
12150
12151         ## Find a vertex of the given shape, which has minimal distance to the given point.
12152         #  @param theShape Any shape.
12153         #  @param thePoint Point, close to the desired vertex.
12154         #  @param theName Object name; when specified, this parameter is used
12155         #         for result publication in the study. Otherwise, if automatic
12156         #         publication is switched on, default value is used for result name.
12157         #
12158         #  @return New GEOM.GEOM_Object, containing the found vertex.
12159         #
12160         #  @ref swig_GetVertexNearPoint "Example"
12161         @ManageTransactions("BlocksOp")
12162         def GetVertexNearPoint(self, theShape, thePoint, theName=None):
12163             """
12164             Find a vertex of the given shape, which has minimal distance to the given point.
12165
12166             Parameters:
12167                 theShape Any shape.
12168                 thePoint Point, close to the desired vertex.
12169                 theName Object name; when specified, this parameter is used
12170                         for result publication in the study. Otherwise, if automatic
12171                         publication is switched on, default value is used for result name.
12172
12173             Returns:
12174                 New GEOM.GEOM_Object, containing the found vertex.
12175
12176             Example of usage:
12177                 pmidle = geompy.MakeVertex(50, 0, 50)
12178                 edge1 = geompy.GetEdgeNearPoint(blocksComp, pmidle)
12179             """
12180             # Example: see GEOM_TestOthers.py
12181             anObj = self.BlocksOp.GetVertexNearPoint(theShape, thePoint)
12182             RaiseIfFailed("GetVertexNearPoint", self.BlocksOp)
12183             self._autoPublish(anObj, theName, "vertex")
12184             return anObj
12185
12186         ## Get an edge, found in the given shape by two given vertices.
12187         #  @param theShape Block or a compound of blocks.
12188         #  @param thePoint1,thePoint2 Points, close to the ends of the desired edge.
12189         #  @param theName Object name; when specified, this parameter is used
12190         #         for result publication in the study. Otherwise, if automatic
12191         #         publication is switched on, default value is used for result name.
12192         #
12193         #  @return New GEOM.GEOM_Object, containing the found edge.
12194         #
12195         #  @ref swig_GetEdge "Example"
12196         @ManageTransactions("BlocksOp")
12197         def GetEdge(self, theShape, thePoint1, thePoint2, theName=None):
12198             """
12199             Get an edge, found in the given shape by two given vertices.
12200
12201             Parameters:
12202                 theShape Block or a compound of blocks.
12203                 thePoint1,thePoint2 Points, close to the ends of the desired edge.
12204                 theName Object name; when specified, this parameter is used
12205                         for result publication in the study. Otherwise, if automatic
12206                         publication is switched on, default value is used for result name.
12207
12208             Returns:
12209                 New GEOM.GEOM_Object, containing the found edge.
12210             """
12211             # Example: see GEOM_Spanner.py
12212             anObj = self.BlocksOp.GetEdge(theShape, thePoint1, thePoint2)
12213             RaiseIfFailed("GetEdge", self.BlocksOp)
12214             self._autoPublish(anObj, theName, "edge")
12215             return anObj
12216
12217         ## Find an edge of the given shape, which has minimal distance to the given point.
12218         #  @param theShape Block or a compound of blocks.
12219         #  @param thePoint Point, close to the desired edge.
12220         #  @param theName Object name; when specified, this parameter is used
12221         #         for result publication in the study. Otherwise, if automatic
12222         #         publication is switched on, default value is used for result name.
12223         #
12224         #  @return New GEOM.GEOM_Object, containing the found edge.
12225         #
12226         #  @ref swig_GetEdgeNearPoint "Example"
12227         @ManageTransactions("BlocksOp")
12228         def GetEdgeNearPoint(self, theShape, thePoint, theName=None):
12229             """
12230             Find an edge of the given shape, which has minimal distance to the given point.
12231
12232             Parameters:
12233                 theShape Block or a compound of blocks.
12234                 thePoint Point, close to the desired edge.
12235                 theName Object name; when specified, this parameter is used
12236                         for result publication in the study. Otherwise, if automatic
12237                         publication is switched on, default value is used for result name.
12238
12239             Returns:
12240                 New GEOM.GEOM_Object, containing the found edge.
12241             """
12242             # Example: see GEOM_TestOthers.py
12243             anObj = self.BlocksOp.GetEdgeNearPoint(theShape, thePoint)
12244             RaiseIfFailed("GetEdgeNearPoint", self.BlocksOp)
12245             self._autoPublish(anObj, theName, "edge")
12246             return anObj
12247
12248         ## Returns a face, found in the given shape by four given corner vertices.
12249         #  @param theShape Block or a compound of blocks.
12250         #  @param thePoint1,thePoint2,thePoint3,thePoint4 Points, close to the corners of the desired face.
12251         #  @param theName Object name; when specified, this parameter is used
12252         #         for result publication in the study. Otherwise, if automatic
12253         #         publication is switched on, default value is used for result name.
12254         #
12255         #  @return New GEOM.GEOM_Object, containing the found face.
12256         #
12257         #  @ref swig_todo "Example"
12258         @ManageTransactions("BlocksOp")
12259         def GetFaceByPoints(self, theShape, thePoint1, thePoint2, thePoint3, thePoint4, theName=None):
12260             """
12261             Returns a face, found in the given shape by four given corner vertices.
12262
12263             Parameters:
12264                 theShape Block or a compound of blocks.
12265                 thePoint1,thePoint2,thePoint3,thePoint4 Points, close to the corners of the desired face.
12266                 theName Object name; when specified, this parameter is used
12267                         for result publication in the study. Otherwise, if automatic
12268                         publication is switched on, default value is used for result name.
12269
12270             Returns:
12271                 New GEOM.GEOM_Object, containing the found face.
12272             """
12273             # Example: see GEOM_Spanner.py
12274             anObj = self.BlocksOp.GetFaceByPoints(theShape, thePoint1, thePoint2, thePoint3, thePoint4)
12275             RaiseIfFailed("GetFaceByPoints", self.BlocksOp)
12276             self._autoPublish(anObj, theName, "face")
12277             return anObj
12278
12279         ## Get a face of block, found in the given shape by two given edges.
12280         #  @param theShape Block or a compound of blocks.
12281         #  @param theEdge1,theEdge2 Edges, close to the edges of the desired face.
12282         #  @param theName Object name; when specified, this parameter is used
12283         #         for result publication in the study. Otherwise, if automatic
12284         #         publication is switched on, default value is used for result name.
12285         #
12286         #  @return New GEOM.GEOM_Object, containing the found face.
12287         #
12288         #  @ref swig_todo "Example"
12289         @ManageTransactions("BlocksOp")
12290         def GetFaceByEdges(self, theShape, theEdge1, theEdge2, theName=None):
12291             """
12292             Get a face of block, found in the given shape by two given edges.
12293
12294             Parameters:
12295                 theShape Block or a compound of blocks.
12296                 theEdge1,theEdge2 Edges, close to the edges of the desired face.
12297                 theName Object name; when specified, this parameter is used
12298                         for result publication in the study. Otherwise, if automatic
12299                         publication is switched on, default value is used for result name.
12300
12301             Returns:
12302                 New GEOM.GEOM_Object, containing the found face.
12303             """
12304             # Example: see GEOM_Spanner.py
12305             anObj = self.BlocksOp.GetFaceByEdges(theShape, theEdge1, theEdge2)
12306             RaiseIfFailed("GetFaceByEdges", self.BlocksOp)
12307             self._autoPublish(anObj, theName, "face")
12308             return anObj
12309
12310         ## Find a face, opposite to the given one in the given block.
12311         #  @param theBlock Must be a hexahedral solid.
12312         #  @param theFace Face of \a theBlock, opposite to the desired face.
12313         #  @param theName Object name; when specified, this parameter is used
12314         #         for result publication in the study. Otherwise, if automatic
12315         #         publication is switched on, default value is used for result name.
12316         #
12317         #  @return New GEOM.GEOM_Object, containing the found face.
12318         #
12319         #  @ref swig_GetOppositeFace "Example"
12320         @ManageTransactions("BlocksOp")
12321         def GetOppositeFace(self, theBlock, theFace, theName=None):
12322             """
12323             Find a face, opposite to the given one in the given block.
12324
12325             Parameters:
12326                 theBlock Must be a hexahedral solid.
12327                 theFace Face of theBlock, opposite to the desired face.
12328                 theName Object name; when specified, this parameter is used
12329                         for result publication in the study. Otherwise, if automatic
12330                         publication is switched on, default value is used for result name.
12331
12332             Returns:
12333                 New GEOM.GEOM_Object, containing the found face.
12334             """
12335             # Example: see GEOM_Spanner.py
12336             anObj = self.BlocksOp.GetOppositeFace(theBlock, theFace)
12337             RaiseIfFailed("GetOppositeFace", self.BlocksOp)
12338             self._autoPublish(anObj, theName, "face")
12339             return anObj
12340
12341         ## Find a face of the given shape, which has minimal distance to the given point.
12342         #  @param theShape Block or a compound of blocks.
12343         #  @param thePoint Point, close to the desired face.
12344         #  @param theName Object name; when specified, this parameter is used
12345         #         for result publication in the study. Otherwise, if automatic
12346         #         publication is switched on, default value is used for result name.
12347         #
12348         #  @return New GEOM.GEOM_Object, containing the found face.
12349         #
12350         #  @ref swig_GetFaceNearPoint "Example"
12351         @ManageTransactions("BlocksOp")
12352         def GetFaceNearPoint(self, theShape, thePoint, theName=None):
12353             """
12354             Find a face of the given shape, which has minimal distance to the given point.
12355
12356             Parameters:
12357                 theShape Block or a compound of blocks.
12358                 thePoint Point, close to the desired face.
12359                 theName Object name; when specified, this parameter is used
12360                         for result publication in the study. Otherwise, if automatic
12361                         publication is switched on, default value is used for result name.
12362
12363             Returns:
12364                 New GEOM.GEOM_Object, containing the found face.
12365             """
12366             # Example: see GEOM_Spanner.py
12367             anObj = self.BlocksOp.GetFaceNearPoint(theShape, thePoint)
12368             RaiseIfFailed("GetFaceNearPoint", self.BlocksOp)
12369             self._autoPublish(anObj, theName, "face")
12370             return anObj
12371
12372         ## Find a face of block, whose outside normale has minimal angle with the given vector.
12373         #  @param theBlock Block or a compound of blocks.
12374         #  @param theVector Vector, close to the normale of the desired face.
12375         #  @param theName Object name; when specified, this parameter is used
12376         #         for result publication in the study. Otherwise, if automatic
12377         #         publication is switched on, default value is used for result name.
12378         #
12379         #  @return New GEOM.GEOM_Object, containing the found face.
12380         #
12381         #  @ref swig_todo "Example"
12382         @ManageTransactions("BlocksOp")
12383         def GetFaceByNormale(self, theBlock, theVector, theName=None):
12384             """
12385             Find a face of block, whose outside normale has minimal angle with the given vector.
12386
12387             Parameters:
12388                 theBlock Block or a compound of blocks.
12389                 theVector Vector, close to the normale of the desired face.
12390                 theName Object name; when specified, this parameter is used
12391                         for result publication in the study. Otherwise, if automatic
12392                         publication is switched on, default value is used for result name.
12393
12394             Returns:
12395                 New GEOM.GEOM_Object, containing the found face.
12396             """
12397             # Example: see GEOM_Spanner.py
12398             anObj = self.BlocksOp.GetFaceByNormale(theBlock, theVector)
12399             RaiseIfFailed("GetFaceByNormale", self.BlocksOp)
12400             self._autoPublish(anObj, theName, "face")
12401             return anObj
12402
12403         ## Find all sub-shapes of type \a theShapeType of the given shape,
12404         #  which have minimal distance to the given point.
12405         #  @param theShape Any shape.
12406         #  @param thePoint Point, close to the desired shape.
12407         #  @param theShapeType Defines what kind of sub-shapes is searched GEOM::shape_type
12408         #  @param theTolerance The tolerance for distances comparison. All shapes
12409         #                      with distances to the given point in interval
12410         #                      [minimal_distance, minimal_distance + theTolerance] will be gathered.
12411         #  @param theName Object name; when specified, this parameter is used
12412         #         for result publication in the study. Otherwise, if automatic
12413         #         publication is switched on, default value is used for result name.
12414         #
12415         #  @return New GEOM_Object, containing a group of all found shapes.
12416         #
12417         #  @ref swig_GetShapesNearPoint "Example"
12418         @ManageTransactions("BlocksOp")
12419         def GetShapesNearPoint(self, theShape, thePoint, theShapeType, theTolerance = 1e-07, theName=None):
12420             """
12421             Find all sub-shapes of type theShapeType of the given shape,
12422             which have minimal distance to the given point.
12423
12424             Parameters:
12425                 theShape Any shape.
12426                 thePoint Point, close to the desired shape.
12427                 theShapeType Defines what kind of sub-shapes is searched (see GEOM::shape_type)
12428                 theTolerance The tolerance for distances comparison. All shapes
12429                                 with distances to the given point in interval
12430                                 [minimal_distance, minimal_distance + theTolerance] will be gathered.
12431                 theName Object name; when specified, this parameter is used
12432                         for result publication in the study. Otherwise, if automatic
12433                         publication is switched on, default value is used for result name.
12434
12435             Returns:
12436                 New GEOM_Object, containing a group of all found shapes.
12437             """
12438             # Example: see GEOM_TestOthers.py
12439             anObj = self.BlocksOp.GetShapesNearPoint(theShape, thePoint, theShapeType, theTolerance)
12440             RaiseIfFailed("GetShapesNearPoint", self.BlocksOp)
12441             self._autoPublish(anObj, theName, "group")
12442             return anObj
12443
12444         # end of l3_blocks_op
12445         ## @}
12446
12447         ## @addtogroup l4_blocks_measure
12448         ## @{
12449
12450         ## Check, if the compound of blocks is given.
12451         #  To be considered as a compound of blocks, the
12452         #  given shape must satisfy the following conditions:
12453         #  - Each element of the compound should be a Block (6 faces).
12454         #  - Each face should be a quadrangle, i.e. it should have only 1 wire
12455         #       with 4 edges. If <VAR>theIsUseC1</VAR> is set to True and
12456         #       there are more than 4 edges in the only wire of a face,
12457         #       this face is considered to be quadrangle if it has 4 bounds
12458         #       (1 or more edge) of C1 continuity.
12459         #  - A connection between two Blocks should be an entire quadrangle face or an entire edge.
12460         #  - The compound should be connexe.
12461         #  - The glue between two quadrangle faces should be applied.
12462         #  @param theCompound The compound to check.
12463         #  @param theIsUseC1 Flag to check if there are 4 bounds on a face
12464         #         taking into account C1 continuity.
12465         #  @param theAngTolerance the angular tolerance to check if two neighbor
12466         #         edges are codirectional in the common vertex with this
12467         #         tolerance. This parameter is used only if
12468         #         <VAR>theIsUseC1</VAR> is set to True.
12469         #  @return TRUE, if the given shape is a compound of blocks.
12470         #  If theCompound is not valid, prints all discovered errors.
12471         #
12472         #  @ref tui_check_compound_of_blocks_page "Example 1"
12473         #  \n @ref swig_CheckCompoundOfBlocks "Example 2"
12474         @ManageTransactions("BlocksOp")
12475         def CheckCompoundOfBlocks(self,theCompound, theIsUseC1 = False,
12476                                   theAngTolerance = 1.e-12):
12477             """
12478             Check, if the compound of blocks is given.
12479             To be considered as a compound of blocks, the
12480             given shape must satisfy the following conditions:
12481             - Each element of the compound should be a Block (6 faces).
12482             - Each face should be a quadrangle, i.e. it should have only 1 wire
12483                  with 4 edges. If theIsUseC1 is set to True and
12484                  there are more than 4 edges in the only wire of a face,
12485                  this face is considered to be quadrangle if it has 4 bounds
12486                  (1 or more edge) of C1 continuity.
12487             - A connection between two Blocks should be an entire quadrangle face or an entire edge.
12488             - The compound should be connexe.
12489             - The glue between two quadrangle faces should be applied.
12490
12491             Parameters:
12492                 theCompound The compound to check.
12493                 theIsUseC1 Flag to check if there are 4 bounds on a face
12494                            taking into account C1 continuity.
12495                 theAngTolerance the angular tolerance to check if two neighbor
12496                            edges are codirectional in the common vertex with this
12497                            tolerance. This parameter is used only if
12498                            theIsUseC1 is set to True.
12499
12500             Returns:
12501                 TRUE, if the given shape is a compound of blocks.
12502                 If theCompound is not valid, prints all discovered errors.
12503             """
12504             # Example: see GEOM_Spanner.py
12505             aTolerance = -1.0
12506             if theIsUseC1:
12507                 aTolerance = theAngTolerance
12508             (IsValid, BCErrors) = self.BlocksOp.CheckCompoundOfBlocks(theCompound, aTolerance)
12509             RaiseIfFailed("CheckCompoundOfBlocks", self.BlocksOp)
12510             if IsValid == 0:
12511                 Descr = self.BlocksOp.PrintBCErrors(theCompound, BCErrors)
12512                 print(Descr)
12513             return IsValid
12514
12515         ## Retrieve all non blocks solids and faces from \a theShape.
12516         #  @param theShape The shape to explore.
12517         #  @param theIsUseC1 Flag to check if there are 4 bounds on a face
12518         #         taking into account C1 continuity.
12519         #  @param theAngTolerance the angular tolerance to check if two neighbor
12520         #         edges are codirectional in the common vertex with this
12521         #         tolerance. This parameter is used only if
12522         #         <VAR>theIsUseC1</VAR> is set to True.
12523         #  @param theName Object name; when specified, this parameter is used
12524         #         for result publication in the study. Otherwise, if automatic
12525         #         publication is switched on, default value is used for result name.
12526         #
12527         #  @return A tuple of two GEOM_Objects. The first object is a group of all
12528         #          non block solids (= not 6 faces, or with 6 faces, but with the
12529         #          presence of non-quadrangular faces). The second object is a
12530         #          group of all non quadrangular faces (= faces with more then
12531         #          1 wire or, if <VAR>theIsUseC1</VAR> is set to True, faces
12532         #          with 1 wire with not 4 edges that do not form 4 bounds of
12533         #          C1 continuity).
12534         #
12535         #  @ref tui_get_non_blocks_page "Example 1"
12536         #  \n @ref swig_GetNonBlocks "Example 2"
12537         @ManageTransactions("BlocksOp")
12538         def GetNonBlocks (self, theShape, theIsUseC1 = False,
12539                           theAngTolerance = 1.e-12, theName=None):
12540             """
12541             Retrieve all non blocks solids and faces from theShape.
12542
12543             Parameters:
12544                 theShape The shape to explore.
12545                 theIsUseC1 Flag to check if there are 4 bounds on a face
12546                            taking into account C1 continuity.
12547                 theAngTolerance the angular tolerance to check if two neighbor
12548                            edges are codirectional in the common vertex with this
12549                            tolerance. This parameter is used only if
12550                            theIsUseC1 is set to True.
12551                 theName Object name; when specified, this parameter is used
12552                         for result publication in the study. Otherwise, if automatic
12553                         publication is switched on, default value is used for result name.
12554
12555             Returns:
12556                 A tuple of two GEOM_Objects. The first object is a group of all
12557                 non block solids (= not 6 faces, or with 6 faces, but with the
12558                 presence of non-quadrangular faces). The second object is a
12559                 group of all non quadrangular faces (= faces with more then
12560                 1 wire or, if <VAR>theIsUseC1</VAR> is set to True, faces
12561                 with 1 wire with not 4 edges that do not form 4 bounds of
12562                 C1 continuity).
12563
12564             Usage:
12565                 (res_sols, res_faces) = geompy.GetNonBlocks(myShape1)
12566             """
12567             # Example: see GEOM_Spanner.py
12568             aTolerance = -1.0
12569             if theIsUseC1:
12570                 aTolerance = theAngTolerance
12571             aTuple = self.BlocksOp.GetNonBlocks(theShape, aTolerance)
12572             RaiseIfFailed("GetNonBlocks", self.BlocksOp)
12573             self._autoPublish(aTuple, theName, ("groupNonHexas", "groupNonQuads"))
12574             return aTuple
12575
12576         ## Remove all seam and degenerated edges from \a theShape.
12577         #  Unite faces and edges, sharing one surface. It means that
12578         #  this faces must have references to one C++ surface object (handle).
12579         #  @param theShape The compound or single solid to remove irregular edges from.
12580         #  @param doUnionFaces If True, then unite faces. If False (the default value),
12581         #         do not unite faces.
12582         #  @param theName Object name; when specified, this parameter is used
12583         #         for result publication in the study. Otherwise, if automatic
12584         #         publication is switched on, default value is used for result name.
12585         #
12586         #  @return Improved shape.
12587         #
12588         #  @ref swig_RemoveExtraEdges "Example"
12589         @ManageTransactions("BlocksOp")
12590         def RemoveExtraEdges(self, theShape, doUnionFaces=False, theName=None):
12591             """
12592             Remove all seam and degenerated edges from theShape.
12593             Unite faces and edges, sharing one surface. It means that
12594             this faces must have references to one C++ surface object (handle).
12595
12596             Parameters:
12597                 theShape The compound or single solid to remove irregular edges from.
12598                 doUnionFaces If True, then unite faces. If False (the default value),
12599                              do not unite faces.
12600                 theName Object name; when specified, this parameter is used
12601                         for result publication in the study. Otherwise, if automatic
12602                         publication is switched on, default value is used for result name.
12603
12604             Returns:
12605                 Improved shape.
12606             """
12607             # Example: see GEOM_TestOthers.py
12608             nbFacesOptimum = -1 # -1 means do not unite faces
12609             if doUnionFaces is True: nbFacesOptimum = 0 # 0 means unite faces
12610             anObj = self.BlocksOp.RemoveExtraEdges(theShape, nbFacesOptimum)
12611             RaiseIfFailed("RemoveExtraEdges", self.BlocksOp)
12612             self._autoPublish(anObj, theName, "removeExtraEdges")
12613             return anObj
12614
12615         ## Performs union faces of \a theShape
12616         #  Unite faces sharing one surface. It means that
12617         #  these faces must have references to one C++ surface object (handle).
12618         #  @param theShape The compound or single solid that contains faces
12619         #         to perform union.
12620         #  @param theName Object name; when specified, this parameter is used
12621         #         for result publication in the study. Otherwise, if automatic
12622         #         publication is switched on, default value is used for result name.
12623         #
12624         #  @return Improved shape.
12625         #
12626         #  @ref swig_UnionFaces "Example"
12627         @ManageTransactions("BlocksOp")
12628         def UnionFaces(self, theShape, theName=None):
12629             """
12630             Performs union faces of theShape.
12631             Unite faces sharing one surface. It means that
12632             these faces must have references to one C++ surface object (handle).
12633
12634             Parameters:
12635                 theShape The compound or single solid that contains faces
12636                          to perform union.
12637                 theName Object name; when specified, this parameter is used
12638                         for result publication in the study. Otherwise, if automatic
12639                         publication is switched on, default value is used for result name.
12640
12641             Returns:
12642                 Improved shape.
12643             """
12644             # Example: see GEOM_TestOthers.py
12645             anObj = self.BlocksOp.UnionFaces(theShape)
12646             RaiseIfFailed("UnionFaces", self.BlocksOp)
12647             self._autoPublish(anObj, theName, "unionFaces")
12648             return anObj
12649
12650         ## Check, if the given shape is a blocks compound.
12651         #  Fix all detected errors.
12652         #    \note Single block can be also fixed by this method.
12653         #  @param theShape The compound to check and improve.
12654         #  @param theName Object name; when specified, this parameter is used
12655         #         for result publication in the study. Otherwise, if automatic
12656         #         publication is switched on, default value is used for result name.
12657         #
12658         #  @return Improved compound.
12659         #
12660         #  @ref swig_CheckAndImprove "Example"
12661         @ManageTransactions("BlocksOp")
12662         def CheckAndImprove(self, theShape, theName=None):
12663             """
12664             Check, if the given shape is a blocks compound.
12665             Fix all detected errors.
12666
12667             Note:
12668                 Single block can be also fixed by this method.
12669
12670             Parameters:
12671                 theShape The compound to check and improve.
12672                 theName Object name; when specified, this parameter is used
12673                         for result publication in the study. Otherwise, if automatic
12674                         publication is switched on, default value is used for result name.
12675
12676             Returns:
12677                 Improved compound.
12678             """
12679             # Example: see GEOM_TestOthers.py
12680             anObj = self.BlocksOp.CheckAndImprove(theShape)
12681             RaiseIfFailed("CheckAndImprove", self.BlocksOp)
12682             self._autoPublish(anObj, theName, "improved")
12683             return anObj
12684
12685         # end of l4_blocks_measure
12686         ## @}
12687
12688         ## @addtogroup l3_blocks_op
12689         ## @{
12690
12691         ## Get all the blocks, contained in the given compound.
12692         #  @param theCompound The compound to explode.
12693         #  @param theMinNbFaces If solid has lower number of faces, it is not a block.
12694         #  @param theMaxNbFaces If solid has higher number of faces, it is not a block.
12695         #  @param theName Object name; when specified, this parameter is used
12696         #         for result publication in the study. Otherwise, if automatic
12697         #         publication is switched on, default value is used for result name.
12698         #
12699         #  @note If theMaxNbFaces = 0, the maximum number of faces is not restricted.
12700         #
12701         #  @return List of GEOM.GEOM_Object, containing the retrieved blocks.
12702         #
12703         #  @ref tui_explode_on_blocks "Example 1"
12704         #  \n @ref swig_MakeBlockExplode "Example 2"
12705         @ManageTransactions("BlocksOp")
12706         def MakeBlockExplode(self, theCompound, theMinNbFaces, theMaxNbFaces, theName=None):
12707             """
12708             Get all the blocks, contained in the given compound.
12709
12710             Parameters:
12711                 theCompound The compound to explode.
12712                 theMinNbFaces If solid has lower number of faces, it is not a block.
12713                 theMaxNbFaces If solid has higher number of faces, it is not a block.
12714                 theName Object name; when specified, this parameter is used
12715                         for result publication in the study. Otherwise, if automatic
12716                         publication is switched on, default value is used for result name.
12717
12718             Note:
12719                 If theMaxNbFaces = 0, the maximum number of faces is not restricted.
12720
12721             Returns:
12722                 List of GEOM.GEOM_Object, containing the retrieved blocks.
12723             """
12724             # Example: see GEOM_TestOthers.py
12725             theMinNbFaces,theMaxNbFaces,Parameters = ParseParameters(theMinNbFaces,theMaxNbFaces)
12726             aList = self.BlocksOp.ExplodeCompoundOfBlocks(theCompound, theMinNbFaces, theMaxNbFaces)
12727             RaiseIfFailed("ExplodeCompoundOfBlocks", self.BlocksOp)
12728             for anObj in aList:
12729                 anObj.SetParameters(Parameters)
12730                 pass
12731             self._autoPublish(aList, theName, "block")
12732             return aList
12733
12734         ## Find block, containing the given point inside its volume or on boundary.
12735         #  @param theCompound Compound, to find block in.
12736         #  @param thePoint Point, close to the desired block. If the point lays on
12737         #         boundary between some blocks, we return block with nearest center.
12738         #  @param theName Object name; when specified, this parameter is used
12739         #         for result publication in the study. Otherwise, if automatic
12740         #         publication is switched on, default value is used for result name.
12741         #
12742         #  @return New GEOM.GEOM_Object, containing the found block.
12743         #
12744         #  @ref swig_todo "Example"
12745         @ManageTransactions("BlocksOp")
12746         def GetBlockNearPoint(self, theCompound, thePoint, theName=None):
12747             """
12748             Find block, containing the given point inside its volume or on boundary.
12749
12750             Parameters:
12751                 theCompound Compound, to find block in.
12752                 thePoint Point, close to the desired block. If the point lays on
12753                          boundary between some blocks, we return block with nearest center.
12754                 theName Object name; when specified, this parameter is used
12755                         for result publication in the study. Otherwise, if automatic
12756                         publication is switched on, default value is used for result name.
12757
12758             Returns:
12759                 New GEOM.GEOM_Object, containing the found block.
12760             """
12761             # Example: see GEOM_Spanner.py
12762             anObj = self.BlocksOp.GetBlockNearPoint(theCompound, thePoint)
12763             RaiseIfFailed("GetBlockNearPoint", self.BlocksOp)
12764             self._autoPublish(anObj, theName, "block")
12765             return anObj
12766
12767         ## Find block, containing all the elements, passed as the parts, or maximum quantity of them.
12768         #  @param theCompound Compound, to find block in.
12769         #  @param theParts List of faces and/or edges and/or vertices to be parts of the found block.
12770         #  @param theName Object name; when specified, this parameter is used
12771         #         for result publication in the study. Otherwise, if automatic
12772         #         publication is switched on, default value is used for result name.
12773         #
12774         #  @return New GEOM.GEOM_Object, containing the found block.
12775         #
12776         #  @ref swig_GetBlockByParts "Example"
12777         @ManageTransactions("BlocksOp")
12778         def GetBlockByParts(self, theCompound, theParts, theName=None):
12779             """
12780              Find block, containing all the elements, passed as the parts, or maximum quantity of them.
12781
12782              Parameters:
12783                 theCompound Compound, to find block in.
12784                 theParts List of faces and/or edges and/or vertices to be parts of the found block.
12785                 theName Object name; when specified, this parameter is used
12786                         for result publication in the study. Otherwise, if automatic
12787                         publication is switched on, default value is used for result name.
12788
12789             Returns:
12790                 New GEOM_Object, containing the found block.
12791             """
12792             # Example: see GEOM_TestOthers.py
12793             anObj = self.BlocksOp.GetBlockByParts(theCompound, theParts)
12794             RaiseIfFailed("GetBlockByParts", self.BlocksOp)
12795             self._autoPublish(anObj, theName, "block")
12796             return anObj
12797
12798         ## Return all blocks, containing all the elements, passed as the parts.
12799         #  @param theCompound Compound, to find blocks in.
12800         #  @param theParts List of faces and/or edges and/or vertices to be parts of the found blocks.
12801         #  @param theName Object name; when specified, this parameter is used
12802         #         for result publication in the study. Otherwise, if automatic
12803         #         publication is switched on, default value is used for result name.
12804         #
12805         #  @return List of GEOM.GEOM_Object, containing the found blocks.
12806         #
12807         #  @ref swig_todo "Example"
12808         @ManageTransactions("BlocksOp")
12809         def GetBlocksByParts(self, theCompound, theParts, theName=None):
12810             """
12811             Return all blocks, containing all the elements, passed as the parts.
12812
12813             Parameters:
12814                 theCompound Compound, to find blocks in.
12815                 theParts List of faces and/or edges and/or vertices to be parts of the found blocks.
12816                 theName Object name; when specified, this parameter is used
12817                         for result publication in the study. Otherwise, if automatic
12818                         publication is switched on, default value is used for result name.
12819
12820             Returns:
12821                 List of GEOM.GEOM_Object, containing the found blocks.
12822             """
12823             # Example: see GEOM_Spanner.py
12824             aList = self.BlocksOp.GetBlocksByParts(theCompound, theParts)
12825             RaiseIfFailed("GetBlocksByParts", self.BlocksOp)
12826             self._autoPublish(aList, theName, "block")
12827             return aList
12828
12829         ## Multi-transformate block and glue the result.
12830         #  Transformation is defined so, as to superpose direction faces.
12831         #  @param Block Hexahedral solid to be multi-transformed.
12832         #  @param DirFace1 ID of First direction face.
12833         #  @param DirFace2 ID of Second direction face.
12834         #  @param NbTimes Quantity of transformations to be done.
12835         #  @param theName Object name; when specified, this parameter is used
12836         #         for result publication in the study. Otherwise, if automatic
12837         #         publication is switched on, default value is used for result name.
12838         #
12839         #  @note Unique ID of sub-shape can be obtained, using method GetSubShapeID().
12840         #
12841         #  @return New GEOM.GEOM_Object, containing the result shape.
12842         #
12843         #  @ref tui_multi_transformation "Example"
12844         @ManageTransactions("BlocksOp")
12845         def MakeMultiTransformation1D(self, Block, DirFace1, DirFace2, NbTimes, theName=None):
12846             """
12847             Multi-transformate block and glue the result.
12848             Transformation is defined so, as to superpose direction faces.
12849
12850             Parameters:
12851                 Block Hexahedral solid to be multi-transformed.
12852                 DirFace1 ID of First direction face.
12853                 DirFace2 ID of Second direction face.
12854                 NbTimes Quantity of transformations to be done.
12855                 theName Object name; when specified, this parameter is used
12856                         for result publication in the study. Otherwise, if automatic
12857                         publication is switched on, default value is used for result name.
12858
12859             Note:
12860                 Unique ID of sub-shape can be obtained, using method GetSubShapeID().
12861
12862             Returns:
12863                 New GEOM.GEOM_Object, containing the result shape.
12864             """
12865             # Example: see GEOM_Spanner.py
12866             DirFace1,DirFace2,NbTimes,Parameters = ParseParameters(DirFace1,DirFace2,NbTimes)
12867             anObj = self.BlocksOp.MakeMultiTransformation1D(Block, DirFace1, DirFace2, NbTimes)
12868             RaiseIfFailed("MakeMultiTransformation1D", self.BlocksOp)
12869             anObj.SetParameters(Parameters)
12870             self._autoPublish(anObj, theName, "transformed")
12871             return anObj
12872
12873         ## Multi-transformate block and glue the result.
12874         #  @param Block Hexahedral solid to be multi-transformed.
12875         #  @param DirFace1U,DirFace2U IDs of Direction faces for the first transformation.
12876         #  @param DirFace1V,DirFace2V IDs of Direction faces for the second transformation.
12877         #  @param NbTimesU,NbTimesV Quantity of transformations to be done.
12878         #  @param theName Object name; when specified, this parameter is used
12879         #         for result publication in the study. Otherwise, if automatic
12880         #         publication is switched on, default value is used for result name.
12881         #
12882         #  @return New GEOM.GEOM_Object, containing the result shape.
12883         #
12884         #  @ref tui_multi_transformation "Example"
12885         @ManageTransactions("BlocksOp")
12886         def MakeMultiTransformation2D(self, Block, DirFace1U, DirFace2U, NbTimesU,
12887                                       DirFace1V, DirFace2V, NbTimesV, theName=None):
12888             """
12889             Multi-transformate block and glue the result.
12890
12891             Parameters:
12892                 Block Hexahedral solid to be multi-transformed.
12893                 DirFace1U,DirFace2U IDs of Direction faces for the first transformation.
12894                 DirFace1V,DirFace2V IDs of Direction faces for the second transformation.
12895                 NbTimesU,NbTimesV Quantity of transformations to be done.
12896                 theName Object name; when specified, this parameter is used
12897                         for result publication in the study. Otherwise, if automatic
12898                         publication is switched on, default value is used for result name.
12899
12900             Returns:
12901                 New GEOM.GEOM_Object, containing the result shape.
12902             """
12903             # Example: see GEOM_Spanner.py
12904             DirFace1U,DirFace2U,NbTimesU,DirFace1V,DirFace2V,NbTimesV,Parameters = ParseParameters(
12905               DirFace1U,DirFace2U,NbTimesU,DirFace1V,DirFace2V,NbTimesV)
12906             anObj = self.BlocksOp.MakeMultiTransformation2D(Block, DirFace1U, DirFace2U, NbTimesU,
12907                                                             DirFace1V, DirFace2V, NbTimesV)
12908             RaiseIfFailed("MakeMultiTransformation2D", self.BlocksOp)
12909             anObj.SetParameters(Parameters)
12910             self._autoPublish(anObj, theName, "transformed")
12911             return anObj
12912
12913         ## Build all possible propagation groups.
12914         #  Propagation group is a set of all edges, opposite to one (main)
12915         #  edge of this group directly or through other opposite edges.
12916         #  Notion of Opposite Edge make sense only on quadrangle face.
12917         #  @param theShape Shape to build propagation groups on.
12918         #  @param theName Object name; when specified, this parameter is used
12919         #         for result publication in the study. Otherwise, if automatic
12920         #         publication is switched on, default value is used for result name.
12921         #
12922         #  @return List of GEOM.GEOM_Object, each of them is a propagation group.
12923         #
12924         #  @ref swig_Propagate "Example"
12925         @ManageTransactions("BlocksOp")
12926         def Propagate(self, theShape, theName=None):
12927             """
12928             Build all possible propagation groups.
12929             Propagation group is a set of all edges, opposite to one (main)
12930             edge of this group directly or through other opposite edges.
12931             Notion of Opposite Edge make sense only on quadrangle face.
12932
12933             Parameters:
12934                 theShape Shape to build propagation groups on.
12935                 theName Object name; when specified, this parameter is used
12936                         for result publication in the study. Otherwise, if automatic
12937                         publication is switched on, default value is used for result name.
12938
12939             Returns:
12940                 List of GEOM.GEOM_Object, each of them is a propagation group.
12941             """
12942             # Example: see GEOM_TestOthers.py
12943             listChains = self.BlocksOp.Propagate(theShape)
12944             RaiseIfFailed("Propagate", self.BlocksOp)
12945             self._autoPublish(listChains, theName, "propagate")
12946             return listChains
12947
12948         # end of l3_blocks_op
12949         ## @}
12950
12951         ## @addtogroup l3_groups
12952         ## @{
12953
12954         ## Creates a new group which will store sub-shapes of theMainShape
12955         #  @param theMainShape is a GEOM object on which the group is selected
12956         #  @param theShapeType defines a shape type of the group (see GEOM::shape_type)
12957         #  @param theName Object name; when specified, this parameter is used
12958         #         for result publication in the study. Otherwise, if automatic
12959         #         publication is switched on, default value is used for result name.
12960         #
12961         #  @return a newly created GEOM group (GEOM.GEOM_Object)
12962         #
12963         #  @ref tui_working_with_groups_page "Example 1"
12964         #  \n @ref swig_CreateGroup "Example 2"
12965         @ManageTransactions("GroupOp")
12966         def CreateGroup(self, theMainShape, theShapeType, theName=None):
12967             """
12968             Creates a new group which will store sub-shapes of theMainShape
12969
12970             Parameters:
12971                theMainShape is a GEOM object on which the group is selected
12972                theShapeType defines a shape type of the group:"COMPOUND", "COMPSOLID",
12973                             "SOLID", "SHELL", "FACE", "WIRE", "EDGE", "VERTEX", "SHAPE".
12974                 theName Object name; when specified, this parameter is used
12975                         for result publication in the study. Otherwise, if automatic
12976                         publication is switched on, default value is used for result name.
12977
12978             Returns:
12979                a newly created GEOM group
12980
12981             Example of usage:
12982                 group = geompy.CreateGroup(Box, geompy.ShapeType["FACE"])
12983
12984             """
12985             # Example: see GEOM_TestOthers.py
12986             anObj = self.GroupOp.CreateGroup(theMainShape, theShapeType)
12987             RaiseIfFailed("CreateGroup", self.GroupOp)
12988             self._autoPublish(anObj, theName, "group")
12989             return anObj
12990
12991         ## Adds a sub-object with ID theSubShapeId to the group
12992         #  @param theGroup is a GEOM group to which the new sub-shape is added
12993         #  @param theSubShapeID is a sub-shape ID in the main object.
12994         #  \note Use method GetSubShapeID() to get an unique ID of the sub-shape
12995         #
12996         #  @ref tui_working_with_groups_page "Example"
12997         @ManageTransactions("GroupOp")
12998         def AddObject(self,theGroup, theSubShapeID):
12999             """
13000             Adds a sub-object with ID theSubShapeId to the group
13001
13002             Parameters:
13003                 theGroup       is a GEOM group to which the new sub-shape is added
13004                 theSubShapeID  is a sub-shape ID in the main object.
13005
13006             Note:
13007                 Use method GetSubShapeID() to get an unique ID of the sub-shape
13008             """
13009             # Example: see GEOM_TestOthers.py
13010             self.GroupOp.AddObject(theGroup, theSubShapeID)
13011             if self.GroupOp.GetErrorCode() != "PAL_ELEMENT_ALREADY_PRESENT":
13012                 RaiseIfFailed("AddObject", self.GroupOp)
13013                 pass
13014             pass
13015
13016         ## Removes a sub-object with ID \a theSubShapeId from the group
13017         #  @param theGroup is a GEOM group from which the new sub-shape is removed
13018         #  @param theSubShapeID is a sub-shape ID in the main object.
13019         #  \note Use method GetSubShapeID() to get an unique ID of the sub-shape
13020         #
13021         #  @ref tui_working_with_groups_page "Example"
13022         @ManageTransactions("GroupOp")
13023         def RemoveObject(self,theGroup, theSubShapeID):
13024             """
13025             Removes a sub-object with ID theSubShapeId from the group
13026
13027             Parameters:
13028                 theGroup is a GEOM group from which the new sub-shape is removed
13029                 theSubShapeID is a sub-shape ID in the main object.
13030
13031             Note:
13032                 Use method GetSubShapeID() to get an unique ID of the sub-shape
13033             """
13034             # Example: see GEOM_TestOthers.py
13035             self.GroupOp.RemoveObject(theGroup, theSubShapeID)
13036             RaiseIfFailed("RemoveObject", self.GroupOp)
13037             pass
13038
13039         ## Adds to the group all the given shapes. No errors, if some shapes are already included.
13040         #  @param theGroup is a GEOM group to which the new sub-shapes are added.
13041         #  @param theSubShapes is a list of sub-shapes to be added.
13042         #
13043         #  @ref tui_working_with_groups_page "Example"
13044         @ManageTransactions("GroupOp")
13045         def UnionList (self,theGroup, theSubShapes):
13046             """
13047             Adds to the group all the given shapes. No errors, if some shapes are already included.
13048
13049             Parameters:
13050                 theGroup is a GEOM group to which the new sub-shapes are added.
13051                 theSubShapes is a list of sub-shapes to be added.
13052             """
13053             # Example: see GEOM_TestOthers.py
13054             self.GroupOp.UnionList(theGroup, theSubShapes)
13055             RaiseIfFailed("UnionList", self.GroupOp)
13056             pass
13057
13058         ## Adds to the group all the given shapes. No errors, if some shapes are already included.
13059         #  @param theGroup is a GEOM group to which the new sub-shapes are added.
13060         #  @param theSubShapes is a list of indices of sub-shapes to be added.
13061         #
13062         #  @ref swig_UnionIDs "Example"
13063         @ManageTransactions("GroupOp")
13064         def UnionIDs(self,theGroup, theSubShapes):
13065             """
13066             Adds to the group all the given shapes. No errors, if some shapes are already included.
13067
13068             Parameters:
13069                 theGroup is a GEOM group to which the new sub-shapes are added.
13070                 theSubShapes is a list of indices of sub-shapes to be added.
13071             """
13072             # Example: see GEOM_TestOthers.py
13073             self.GroupOp.UnionIDs(theGroup, theSubShapes)
13074             RaiseIfFailed("UnionIDs", self.GroupOp)
13075             pass
13076
13077         ## Removes from the group all the given shapes. No errors, if some shapes are not included.
13078         #  @param theGroup is a GEOM group from which the sub-shapes are removed.
13079         #  @param theSubShapes is a list of sub-shapes to be removed.
13080         #
13081         #  @ref tui_working_with_groups_page "Example"
13082         @ManageTransactions("GroupOp")
13083         def DifferenceList (self,theGroup, theSubShapes):
13084             """
13085             Removes from the group all the given shapes. No errors, if some shapes are not included.
13086
13087             Parameters:
13088                 theGroup is a GEOM group from which the sub-shapes are removed.
13089                 theSubShapes is a list of sub-shapes to be removed.
13090             """
13091             # Example: see GEOM_TestOthers.py
13092             self.GroupOp.DifferenceList(theGroup, theSubShapes)
13093             RaiseIfFailed("DifferenceList", self.GroupOp)
13094             pass
13095
13096         ## Removes from the group all the given shapes. No errors, if some shapes are not included.
13097         #  @param theGroup is a GEOM group from which the sub-shapes are removed.
13098         #  @param theSubShapes is a list of indices of sub-shapes to be removed.
13099         #
13100         #  @ref swig_DifferenceIDs "Example"
13101         @ManageTransactions("GroupOp")
13102         def DifferenceIDs(self,theGroup, theSubShapes):
13103             """
13104             Removes from the group all the given shapes. No errors, if some shapes are not included.
13105
13106             Parameters:
13107                 theGroup is a GEOM group from which the sub-shapes are removed.
13108                 theSubShapes is a list of indices of sub-shapes to be removed.
13109             """
13110             # Example: see GEOM_TestOthers.py
13111             self.GroupOp.DifferenceIDs(theGroup, theSubShapes)
13112             RaiseIfFailed("DifferenceIDs", self.GroupOp)
13113             pass
13114
13115         ## Union of two groups.
13116         #  New group is created. It will contain all entities
13117         #  which are present in groups theGroup1 and theGroup2.
13118         #  @param theGroup1, theGroup2 are the initial GEOM groups
13119         #                              to create the united group from.
13120         #  @param theName Object name; when specified, this parameter is used
13121         #         for result publication in the study. Otherwise, if automatic
13122         #         publication is switched on, default value is used for result name.
13123         #
13124         #  @return a newly created GEOM group.
13125         #
13126         #  @ref tui_union_groups_anchor "Example"
13127         @ManageTransactions("GroupOp")
13128         def UnionGroups (self, theGroup1, theGroup2, theName=None):
13129             """
13130             Union of two groups.
13131             New group is created. It will contain all entities
13132             which are present in groups theGroup1 and theGroup2.
13133
13134             Parameters:
13135                 theGroup1, theGroup2 are the initial GEOM groups
13136                                      to create the united group from.
13137                 theName Object name; when specified, this parameter is used
13138                         for result publication in the study. Otherwise, if automatic
13139                         publication is switched on, default value is used for result name.
13140
13141             Returns:
13142                 a newly created GEOM group.
13143             """
13144             # Example: see GEOM_TestOthers.py
13145             aGroup = self.GroupOp.UnionGroups(theGroup1, theGroup2)
13146             RaiseIfFailed("UnionGroups", self.GroupOp)
13147             self._autoPublish(aGroup, theName, "group")
13148             return aGroup
13149
13150         ## Intersection of two groups.
13151         #  New group is created. It will contain only those entities
13152         #  which are present in both groups theGroup1 and theGroup2.
13153         #  @param theGroup1, theGroup2 are the initial GEOM groups to get common part of.
13154         #  @param theName Object name; when specified, this parameter is used
13155         #         for result publication in the study. Otherwise, if automatic
13156         #         publication is switched on, default value is used for result name.
13157         #
13158         #  @return a newly created GEOM group.
13159         #
13160         #  @ref tui_intersect_groups_anchor "Example"
13161         @ManageTransactions("GroupOp")
13162         def IntersectGroups (self, theGroup1, theGroup2, theName=None):
13163             """
13164             Intersection of two groups.
13165             New group is created. It will contain only those entities
13166             which are present in both groups theGroup1 and theGroup2.
13167
13168             Parameters:
13169                 theGroup1, theGroup2 are the initial GEOM groups to get common part of.
13170                 theName Object name; when specified, this parameter is used
13171                         for result publication in the study. Otherwise, if automatic
13172                         publication is switched on, default value is used for result name.
13173
13174             Returns:
13175                 a newly created GEOM group.
13176             """
13177             # Example: see GEOM_TestOthers.py
13178             aGroup = self.GroupOp.IntersectGroups(theGroup1, theGroup2)
13179             RaiseIfFailed("IntersectGroups", self.GroupOp)
13180             self._autoPublish(aGroup, theName, "group")
13181             return aGroup
13182
13183         ## Cut of two groups.
13184         #  New group is created. It will contain entities which are
13185         #  present in group theGroup1 but are not present in group theGroup2.
13186         #  @param theGroup1 is a GEOM group to include elements of.
13187         #  @param theGroup2 is a GEOM group to exclude elements of.
13188         #  @param theName Object name; when specified, this parameter is used
13189         #         for result publication in the study. Otherwise, if automatic
13190         #         publication is switched on, default value is used for result name.
13191         #
13192         #  @return a newly created GEOM group.
13193         #
13194         #  @ref tui_cut_groups_anchor "Example"
13195         @ManageTransactions("GroupOp")
13196         def CutGroups (self, theGroup1, theGroup2, theName=None):
13197             """
13198             Cut of two groups.
13199             New group is created. It will contain entities which are
13200             present in group theGroup1 but are not present in group theGroup2.
13201
13202             Parameters:
13203                 theGroup1 is a GEOM group to include elements of.
13204                 theGroup2 is a GEOM group to exclude elements of.
13205                 theName Object name; when specified, this parameter is used
13206                         for result publication in the study. Otherwise, if automatic
13207                         publication is switched on, default value is used for result name.
13208
13209             Returns:
13210                 a newly created GEOM group.
13211             """
13212             # Example: see GEOM_TestOthers.py
13213             aGroup = self.GroupOp.CutGroups(theGroup1, theGroup2)
13214             RaiseIfFailed("CutGroups", self.GroupOp)
13215             self._autoPublish(aGroup, theName, "group")
13216             return aGroup
13217
13218         ## Union of list of groups.
13219         #  New group is created. It will contain all entities that are
13220         #  present in groups listed in theGList.
13221         #  @param theGList is a list of GEOM groups to create the united group from.
13222         #  @param theName Object name; when specified, this parameter is used
13223         #         for result publication in the study. Otherwise, if automatic
13224         #         publication is switched on, default value is used for result name.
13225         #
13226         #  @return a newly created GEOM group.
13227         #
13228         #  @ref tui_union_groups_anchor "Example"
13229         @ManageTransactions("GroupOp")
13230         def UnionListOfGroups (self, theGList, theName=None):
13231             """
13232             Union of list of groups.
13233             New group is created. It will contain all entities that are
13234             present in groups listed in theGList.
13235
13236             Parameters:
13237                 theGList is a list of GEOM groups to create the united group from.
13238                 theName Object name; when specified, this parameter is used
13239                         for result publication in the study. Otherwise, if automatic
13240                         publication is switched on, default value is used for result name.
13241
13242             Returns:
13243                 a newly created GEOM group.
13244             """
13245             # Example: see GEOM_TestOthers.py
13246             aGroup = self.GroupOp.UnionListOfGroups(theGList)
13247             RaiseIfFailed("UnionListOfGroups", self.GroupOp)
13248             self._autoPublish(aGroup, theName, "group")
13249             return aGroup
13250
13251         ## Cut of lists of groups.
13252         #  New group is created. It will contain only entities
13253         #  which are present in groups listed in theGList.
13254         #  @param theGList is a list of GEOM groups to include elements of.
13255         #  @param theName Object name; when specified, this parameter is used
13256         #         for result publication in the study. Otherwise, if automatic
13257         #         publication is switched on, default value is used for result name.
13258         #
13259         #  @return a newly created GEOM group.
13260         #
13261         #  @ref tui_intersect_groups_anchor "Example"
13262         @ManageTransactions("GroupOp")
13263         def IntersectListOfGroups (self, theGList, theName=None):
13264             """
13265             Cut of lists of groups.
13266             New group is created. It will contain only entities
13267             which are present in groups listed in theGList.
13268
13269             Parameters:
13270                 theGList is a list of GEOM groups to include elements of.
13271                 theName Object name; when specified, this parameter is used
13272                         for result publication in the study. Otherwise, if automatic
13273                         publication is switched on, default value is used for result name.
13274
13275             Returns:
13276                 a newly created GEOM group.
13277             """
13278             # Example: see GEOM_TestOthers.py
13279             aGroup = self.GroupOp.IntersectListOfGroups(theGList)
13280             RaiseIfFailed("IntersectListOfGroups", self.GroupOp)
13281             self._autoPublish(aGroup, theName, "group")
13282             return aGroup
13283
13284         ## Cut of lists of groups.
13285         #  New group is created. It will contain only entities
13286         #  which are present in groups listed in theGList1 but
13287         #  are not present in groups from theGList2.
13288         #  @param theGList1 is a list of GEOM groups to include elements of.
13289         #  @param theGList2 is a list of GEOM groups to exclude elements of.
13290         #  @param theName Object name; when specified, this parameter is used
13291         #         for result publication in the study. Otherwise, if automatic
13292         #         publication is switched on, default value is used for result name.
13293         #
13294         #  @return a newly created GEOM group.
13295         #
13296         #  @ref tui_cut_groups_anchor "Example"
13297         @ManageTransactions("GroupOp")
13298         def CutListOfGroups (self, theGList1, theGList2, theName=None):
13299             """
13300             Cut of lists of groups.
13301             New group is created. It will contain only entities
13302             which are present in groups listed in theGList1 but
13303             are not present in groups from theGList2.
13304
13305             Parameters:
13306                 theGList1 is a list of GEOM groups to include elements of.
13307                 theGList2 is a list of GEOM groups to exclude elements of.
13308                 theName Object name; when specified, this parameter is used
13309                         for result publication in the study. Otherwise, if automatic
13310                         publication is switched on, default value is used for result name.
13311
13312             Returns:
13313                 a newly created GEOM group.
13314             """
13315             # Example: see GEOM_TestOthers.py
13316             aGroup = self.GroupOp.CutListOfGroups(theGList1, theGList2)
13317             RaiseIfFailed("CutListOfGroups", self.GroupOp)
13318             self._autoPublish(aGroup, theName, "group")
13319             return aGroup
13320
13321         ## Returns a list of sub-objects ID stored in the group
13322         #  @param theGroup is a GEOM group for which a list of IDs is requested
13323         #
13324         #  @ref swig_GetObjectIDs "Example"
13325         @ManageTransactions("GroupOp")
13326         def GetObjectIDs(self,theGroup):
13327             """
13328             Returns a list of sub-objects ID stored in the group
13329
13330             Parameters:
13331                 theGroup is a GEOM group for which a list of IDs is requested
13332             """
13333             # Example: see GEOM_TestOthers.py
13334             ListIDs = self.GroupOp.GetObjects(theGroup)
13335             RaiseIfFailed("GetObjects", self.GroupOp)
13336             return ListIDs
13337
13338         ## Returns a type of sub-objects stored in the group
13339         #  @param theGroup is a GEOM group which type is returned.
13340         #
13341         #  @ref swig_GetType "Example"
13342         @ManageTransactions("GroupOp")
13343         def GetType(self,theGroup):
13344             """
13345             Returns a type of sub-objects stored in the group
13346
13347             Parameters:
13348                 theGroup is a GEOM group which type is returned.
13349             """
13350             # Example: see GEOM_TestOthers.py
13351             aType = self.GroupOp.GetType(theGroup)
13352             RaiseIfFailed("GetType", self.GroupOp)
13353             return aType
13354
13355         ## Convert a type of geom object from id to string value
13356         #  @param theId is a GEOM object type id.
13357         #  @return type of geom object (POINT, VECTOR, PLANE, LINE, TORUS, ... )
13358         #  @ref swig_GetType "Example"
13359         def ShapeIdToType(self, theId):
13360             """
13361             Convert a type of geom object from id to string value
13362
13363             Parameters:
13364                 theId is a GEOM object type id.
13365
13366             Returns:
13367                 type of geom object (POINT, VECTOR, PLANE, LINE, TORUS, ... )
13368             """
13369             if theId == 0:
13370                 return "COPY"
13371             if theId == 1:
13372                 return "IMPORT"
13373             if theId == 2:
13374                 return "POINT"
13375             if theId == 3:
13376                 return "VECTOR"
13377             if theId == 4:
13378                 return "PLANE"
13379             if theId == 5:
13380                 return "LINE"
13381             if theId == 6:
13382                 return "TORUS"
13383             if theId == 7:
13384                 return "BOX"
13385             if theId == 8:
13386                 return "CYLINDER"
13387             if theId == 9:
13388                 return "CONE"
13389             if theId == 10:
13390                 return "SPHERE"
13391             if theId == 11:
13392                 return "PRISM"
13393             if theId == 12:
13394                 return "REVOLUTION"
13395             if theId == 13:
13396                 return "BOOLEAN"
13397             if theId == 14:
13398                 return "PARTITION"
13399             if theId == 15:
13400                 return "POLYLINE"
13401             if theId == 16:
13402                 return "CIRCLE"
13403             if theId == 17:
13404                 return "SPLINE"
13405             if theId == 18:
13406                 return "ELLIPSE"
13407             if theId == 19:
13408                 return "CIRC_ARC"
13409             if theId == 20:
13410                 return "FILLET"
13411             if theId == 21:
13412                 return "CHAMFER"
13413             if theId == 22:
13414                 return "EDGE"
13415             if theId == 23:
13416                 return "WIRE"
13417             if theId == 24:
13418                 return "FACE"
13419             if theId == 25:
13420                 return "SHELL"
13421             if theId == 26:
13422                 return "SOLID"
13423             if theId == 27:
13424                 return "COMPOUND"
13425             if theId == 28:
13426                 return "SUBSHAPE"
13427             if theId == 29:
13428                 return "PIPE"
13429             if theId == 30:
13430                 return "ARCHIMEDE"
13431             if theId == 31:
13432                 return "FILLING"
13433             if theId == 32:
13434                 return "EXPLODE"
13435             if theId == 33:
13436                 return "GLUED"
13437             if theId == 34:
13438                 return "SKETCHER"
13439             if theId == 35:
13440                 return "CDG"
13441             if theId == 36:
13442                 return "FREE_BOUNDS"
13443             if theId == 37:
13444                 return "GROUP"
13445             if theId == 38:
13446                 return "BLOCK"
13447             if theId == 39:
13448                 return "MARKER"
13449             if theId == 40:
13450                 return "THRUSECTIONS"
13451             if theId == 41:
13452                 return "COMPOUNDFILTER"
13453             if theId == 42:
13454                 return "SHAPES_ON_SHAPE"
13455             if theId == 43:
13456                 return "ELLIPSE_ARC"
13457             if theId == 44:
13458                 return "3DSKETCHER"
13459             if theId == 45:
13460                 return "FILLET_2D"
13461             if theId == 46:
13462                 return "FILLET_1D"
13463             if theId == 201:
13464                 return "PIPETSHAPE"
13465             return "Shape Id not exist."
13466
13467         ## Returns a main shape associated with the group
13468         #  @param theGroup is a GEOM group for which a main shape object is requested
13469         #  @return a GEOM object which is a main shape for theGroup
13470         #
13471         #  @ref swig_GetMainShape "Example"
13472         @ManageTransactions("GroupOp")
13473         def GetMainShape(self,theGroup):
13474             """
13475             Returns a main shape associated with the group
13476
13477             Parameters:
13478                 theGroup is a GEOM group for which a main shape object is requested
13479
13480             Returns:
13481                 a GEOM object which is a main shape for theGroup
13482
13483             Example of usage: BoxCopy = geompy.GetMainShape(CreateGroup)
13484             """
13485             # Example: see GEOM_TestOthers.py
13486             anObj = self.GroupOp.GetMainShape(theGroup)
13487             RaiseIfFailed("GetMainShape", self.GroupOp)
13488             return anObj
13489
13490         ## Create group of edges of theShape, whose length is in range [min_length, max_length].
13491         #  If include_min/max == 0, edges with length == min/max_length will not be included in result.
13492         #  @param theShape given shape (see GEOM.GEOM_Object)
13493         #  @param min_length minimum length of edges of theShape
13494         #  @param max_length maximum length of edges of theShape
13495         #  @param include_max indicating if edges with length == max_length should be included in result, 1-yes, 0-no (default=1)
13496         #  @param include_min indicating if edges with length == min_length should be included in result, 1-yes, 0-no (default=1)
13497         #  @param theName Object name; when specified, this parameter is used
13498         #         for result publication in the study. Otherwise, if automatic
13499         #         publication is switched on, default value is used for result name.
13500         #
13501         #  @return a newly created GEOM group of edges
13502         #
13503         #  @@ref swig_todo "Example"
13504         def GetEdgesByLength (self, theShape, min_length, max_length, include_min = 1, include_max = 1, theName=None):
13505             """
13506             Create group of edges of theShape, whose length is in range [min_length, max_length].
13507             If include_min/max == 0, edges with length == min/max_length will not be included in result.
13508
13509             Parameters:
13510                 theShape given shape
13511                 min_length minimum length of edges of theShape
13512                 max_length maximum length of edges of theShape
13513                 include_max indicating if edges with length == max_length should be included in result, 1-yes, 0-no (default=1)
13514                 include_min indicating if edges with length == min_length should be included in result, 1-yes, 0-no (default=1)
13515                 theName Object name; when specified, this parameter is used
13516                         for result publication in the study. Otherwise, if automatic
13517                         publication is switched on, default value is used for result name.
13518
13519              Returns:
13520                 a newly created GEOM group of edges.
13521             """
13522             edges = self.SubShapeAll(theShape, self.ShapeType["EDGE"])
13523             edges_in_range = []
13524             for edge in edges:
13525                 Props = self.BasicProperties(edge)
13526                 if min_length <= Props[0] and Props[0] <= max_length:
13527                     if (not include_min) and (min_length == Props[0]):
13528                         skip = 1
13529                     else:
13530                         if (not include_max) and (Props[0] == max_length):
13531                             skip = 1
13532                         else:
13533                             edges_in_range.append(edge)
13534
13535             if len(edges_in_range) <= 0:
13536                 print("No edges found by given criteria")
13537                 return None
13538
13539             # note: auto-publishing is done in self.CreateGroup()
13540             group_edges = self.CreateGroup(theShape, self.ShapeType["EDGE"], theName)
13541             self.UnionList(group_edges, edges_in_range)
13542
13543             return group_edges
13544
13545         ## Create group of edges of selected shape, whose length is in range [min_length, max_length].
13546         #  If include_min/max == 0, edges with length == min/max_length will not be included in result.
13547         #  @param min_length minimum length of edges of selected shape
13548         #  @param max_length maximum length of edges of selected shape
13549         #  @param include_max indicating if edges with length == max_length should be included in result, 1-yes, 0-no (default=1)
13550         #  @param include_min indicating if edges with length == min_length should be included in result, 1-yes, 0-no (default=1)
13551         #  @return a newly created GEOM group of edges
13552         #  @ref swig_todo "Example"
13553         def SelectEdges (self, min_length, max_length, include_min = 1, include_max = 1):
13554             """
13555             Create group of edges of selected shape, whose length is in range [min_length, max_length].
13556             If include_min/max == 0, edges with length == min/max_length will not be included in result.
13557
13558             Parameters:
13559                 min_length minimum length of edges of selected shape
13560                 max_length maximum length of edges of selected shape
13561                 include_max indicating if edges with length == max_length should be included in result, 1-yes, 0-no (default=1)
13562                 include_min indicating if edges with length == min_length should be included in result, 1-yes, 0-no (default=1)
13563
13564              Returns:
13565                 a newly created GEOM group of edges.
13566             """
13567             nb_selected = sg.SelectedCount()
13568             if nb_selected < 1:
13569                 print("Select a shape before calling this function, please.")
13570                 return 0
13571             if nb_selected > 1:
13572                 print("Only one shape must be selected")
13573                 return 0
13574
13575             id_shape = sg.getSelected(0)
13576             shape = IDToObject( id_shape )
13577
13578             group_edges = self.GetEdgesByLength(shape, min_length, max_length, include_min, include_max)
13579
13580             left_str  = " < "
13581             right_str = " < "
13582             if include_min: left_str  = " <= "
13583             if include_max: right_str  = " <= "
13584
13585             self.addToStudyInFather(shape, group_edges, "Group of edges with " + repr(min_length)
13586                                     + left_str + "length" + right_str + repr(max_length))
13587
13588             sg.updateObjBrowser()
13589
13590             return group_edges
13591
13592         # end of l3_groups
13593         ## @}
13594
13595         #@@ insert new functions before this line @@ do not remove this line @@#
13596
13597         ## Create a copy of the given object
13598         #
13599         #  @param theOriginal geometry object for copy
13600         #  @param theName Object name; when specified, this parameter is used
13601         #         for result publication in the study. Otherwise, if automatic
13602         #         publication is switched on, default value is used for result name.
13603         #
13604         #  @return New GEOM_Object, containing the copied shape.
13605         #
13606         #  @ingroup l1_geomBuilder_auxiliary
13607         #  @ref swig_MakeCopy "Example"
13608         @ManageTransactions("InsertOp")
13609         def MakeCopy(self, theOriginal, theName=None):
13610             """
13611             Create a copy of the given object
13612
13613             Parameters:
13614                 theOriginal geometry object for copy
13615                 theName Object name; when specified, this parameter is used
13616                         for result publication in the study. Otherwise, if automatic
13617                         publication is switched on, default value is used for result name.
13618
13619             Returns:
13620                 New GEOM_Object, containing the copied shape.
13621
13622             Example of usage: Copy = geompy.MakeCopy(Box)
13623             """
13624             # Example: see GEOM_TestAll.py
13625             anObj = self.InsertOp.MakeCopy(theOriginal)
13626             RaiseIfFailed("MakeCopy", self.InsertOp)
13627             self._autoPublish(anObj, theName, "copy")
13628             return anObj
13629
13630         ## Add Path to load python scripts from
13631         #  @param Path a path to load python scripts from
13632         #  @ingroup l1_geomBuilder_auxiliary
13633         def addPath(self,Path):
13634             """
13635             Add Path to load python scripts from
13636
13637             Parameters:
13638                 Path a path to load python scripts from
13639             """
13640             if (sys.path.count(Path) < 1):
13641                 sys.path.append(Path)
13642                 pass
13643             pass
13644
13645         ## Load marker texture from the file
13646         #  @param Path a path to the texture file
13647         #  @return unique texture identifier
13648         #  @ingroup l1_geomBuilder_auxiliary
13649         @ManageTransactions("InsertOp")
13650         def LoadTexture(self, Path):
13651             """
13652             Load marker texture from the file
13653
13654             Parameters:
13655                 Path a path to the texture file
13656
13657             Returns:
13658                 unique texture identifier
13659             """
13660             # Example: see GEOM_TestAll.py
13661             ID = self.InsertOp.LoadTexture(Path)
13662             RaiseIfFailed("LoadTexture", self.InsertOp)
13663             return ID
13664
13665         ## Get internal name of the object based on its study entry
13666         #  @note This method does not provide an unique identifier of the geometry object.
13667         #  @note This is internal function of GEOM component, though it can be used outside it for
13668         #  appropriate reason (e.g. for identification of geometry object).
13669         #  @param obj geometry object
13670         #  @return unique object identifier
13671         #  @ingroup l1_geomBuilder_auxiliary
13672         def getObjectID(self, obj):
13673             """
13674             Get internal name of the object based on its study entry.
13675             Note: this method does not provide an unique identifier of the geometry object.
13676             It is an internal function of GEOM component, though it can be used outside GEOM for
13677             appropriate reason (e.g. for identification of geometry object).
13678
13679             Parameters:
13680                 obj geometry object
13681
13682             Returns:
13683                 unique object identifier
13684             """
13685             ID = ""
13686             entry = salome.ObjectToID(obj)
13687             if entry is not None:
13688                 lst = entry.split(":")
13689                 if len(lst) > 0:
13690                     ID = lst[-1] # -1 means last item in the list
13691                     return "GEOM_" + ID
13692             return ID
13693
13694
13695
13696         ## Add marker texture. @a Width and @a Height parameters
13697         #  specify width and height of the texture in pixels.
13698         #  If @a RowData is @c True, @a Texture parameter should represent texture data
13699         #  packed into the byte array. If @a RowData is @c False (default), @a Texture
13700         #  parameter should be unpacked string, in which '1' symbols represent opaque
13701         #  pixels and '0' represent transparent pixels of the texture bitmap.
13702         #
13703         #  @param Width texture width in pixels
13704         #  @param Height texture height in pixels
13705         #  @param Texture texture data
13706         #  @param RowData if @c True, @a Texture data are packed in the byte stream
13707         #  @return unique texture identifier
13708         #  @ingroup l1_geomBuilder_auxiliary
13709         @ManageTransactions("InsertOp")
13710         def AddTexture(self, Width, Height, Texture, RowData=False):
13711             """
13712             Add marker texture. Width and Height parameters
13713             specify width and height of the texture in pixels.
13714             If RowData is True, Texture parameter should represent texture data
13715             packed into the byte array. If RowData is False (default), Texture
13716             parameter should be unpacked string, in which '1' symbols represent opaque
13717             pixels and '0' represent transparent pixels of the texture bitmap.
13718
13719             Parameters:
13720                 Width texture width in pixels
13721                 Height texture height in pixels
13722                 Texture texture data
13723                 RowData if True, Texture data are packed in the byte stream
13724
13725             Returns:
13726                 return unique texture identifier
13727             """
13728             if not RowData: Texture = PackData(Texture)
13729             ID = self.InsertOp.AddTexture(Width, Height, Texture)
13730             RaiseIfFailed("AddTexture", self.InsertOp)
13731             return ID
13732
13733         ## Transfer not topological data from one GEOM object to another.
13734         #
13735         #  @param theObjectFrom the source object of non-topological data
13736         #  @param theObjectTo the destination object of non-topological data
13737         #  @param theFindMethod method to search sub-shapes of theObjectFrom
13738         #         in shape theObjectTo. Possible values are: GEOM.FSM_GetInPlace,
13739         #         GEOM.FSM_GetInPlaceByHistory and GEOM.FSM_GetInPlace_Old.
13740         #         Other values of GEOM.find_shape_method are not supported.
13741         #
13742         #  @return True in case of success; False otherwise.
13743         #
13744         #  @ingroup l1_geomBuilder_auxiliary
13745         #
13746         #  @ref swig_TransferData "Example"
13747         @ManageTransactions("InsertOp")
13748         def TransferData(self, theObjectFrom, theObjectTo,
13749                          theFindMethod=GEOM.FSM_GetInPlace):
13750             """
13751             Transfer not topological data from one GEOM object to another.
13752
13753             Parameters:
13754                 theObjectFrom the source object of non-topological data
13755                 theObjectTo the destination object of non-topological data
13756                 theFindMethod method to search sub-shapes of theObjectFrom
13757                               in shape theObjectTo. Possible values are:
13758                               GEOM.FSM_GetInPlace, GEOM.FSM_GetInPlaceByHistory
13759                               and GEOM.FSM_GetInPlace_Old. Other values of
13760                               GEOM.find_shape_method are not supported.
13761
13762             Returns:
13763                 True in case of success; False otherwise.
13764
13765             # Example: see GEOM_TestOthers.py
13766             """
13767             # Example: see GEOM_TestAll.py
13768             isOk = self.InsertOp.TransferData(theObjectFrom,
13769                                                theObjectTo, theFindMethod)
13770             RaiseIfFailed("TransferData", self.InsertOp)
13771             return isOk
13772
13773         ## Creates a new folder object. It is a container for any GEOM objects.
13774         #  @param Name name of the container
13775         #  @param Father parent object. If None,
13776         #         folder under 'Geometry' root object will be created.
13777         #  @return a new created folder
13778         #  @ingroup l1_publish_data
13779         def NewFolder(self, Name, Father=None):
13780             """
13781             Create a new folder object. It is an auxiliary container for any GEOM objects.
13782
13783             Parameters:
13784                 Name name of the container
13785                 Father parent object. If None,
13786                 folder under 'Geometry' root object will be created.
13787
13788             Returns:
13789                 a new created folder
13790             """
13791             return self.CreateFolder(Name, Father)
13792
13793         ## Move object to the specified folder
13794         #  @param Object object to move
13795         #  @param Folder target folder
13796         #  @ingroup l1_publish_data
13797         def PutToFolder(self, Object, Folder):
13798             """
13799             Move object to the specified folder
13800
13801             Parameters:
13802                 Object object to move
13803                 Folder target folder
13804             """
13805             self.MoveToFolder(Object, Folder)
13806             pass
13807
13808         ## Move list of objects to the specified folder
13809         #  @param ListOfSO list of objects to move
13810         #  @param Folder target folder
13811         #  @ingroup l1_publish_data
13812         def PutListToFolder(self, ListOfSO, Folder):
13813             """
13814             Move list of objects to the specified folder
13815
13816             Parameters:
13817                 ListOfSO list of objects to move
13818                 Folder target folder
13819             """
13820             self.MoveListToFolder(ListOfSO, Folder)
13821             pass
13822
13823         ## @addtogroup l2_field
13824         ## @{
13825
13826         ## Creates a field
13827         #  @param shape the shape the field lies on
13828         #  @param name the field name
13829         #  @param type type of field data: 0 - bool, 1 - int, 2 - double, 3 - string
13830         #  @param dimension dimension of the shape the field lies on
13831         #         0 - VERTEX, 1 - EDGE, 2 - FACE, 3 - SOLID, -1 - whole shape
13832         #  @param componentNames names of components
13833         #  @return a created field
13834         @ManageTransactions("FieldOp")
13835         def CreateField(self, shape, name, type, dimension, componentNames):
13836             """
13837             Creates a field
13838
13839             Parameters:
13840                 shape the shape the field lies on
13841                 name  the field name
13842                 type  type of field data
13843                 dimension dimension of the shape the field lies on
13844                           0 - VERTEX, 1 - EDGE, 2 - FACE, 3 - SOLID, -1 - whole shape
13845                 componentNames names of components
13846
13847             Returns:
13848                 a created field
13849             """
13850             if isinstance( type, int ):
13851                 if type < 0 or type > 3:
13852                     raise RuntimeError("CreateField : Error: data type must be within [0-3] range")
13853                 type = [GEOM.FDT_Bool,GEOM.FDT_Int,GEOM.FDT_Double,GEOM.FDT_String][type]
13854
13855             f = self.FieldOp.CreateField( shape, name, type, dimension, componentNames)
13856             RaiseIfFailed("CreateField", self.FieldOp)
13857             global geom
13858             geom._autoPublish( f, "", name)
13859             return f
13860
13861         ## Removes a field from the GEOM component
13862         #  @param field the field to remove
13863         def RemoveField(self, field):
13864             "Removes a field from the GEOM component"
13865             global geom
13866             if isinstance( field, GEOM._objref_GEOM_Field ):
13867                 geom.RemoveObject( field )
13868             elif isinstance( field, geomField ):
13869                 geom.RemoveObject( field.field )
13870             else:
13871                 raise RuntimeError("RemoveField() : the object is not a field")
13872             return
13873
13874         ## Returns number of fields on a shape
13875         @ManageTransactions("FieldOp")
13876         def CountFields(self, shape):
13877             "Returns number of fields on a shape"
13878             nb = self.FieldOp.CountFields( shape )
13879             RaiseIfFailed("CountFields", self.FieldOp)
13880             return nb
13881
13882         ## Returns all fields on a shape
13883         @ManageTransactions("FieldOp")
13884         def GetFields(self, shape):
13885             "Returns all fields on a shape"
13886             ff = self.FieldOp.GetFields( shape )
13887             RaiseIfFailed("GetFields", self.FieldOp)
13888             return ff
13889
13890         ## Returns a field on a shape by its name
13891         @ManageTransactions("FieldOp")
13892         def GetField(self, shape, name):
13893             "Returns a field on a shape by its name"
13894             f = self.FieldOp.GetField( shape, name )
13895             RaiseIfFailed("GetField", self.FieldOp)
13896             return f
13897
13898         # end of l2_field
13899         ## @}
13900
13901
13902 # Register the new proxy for GEOM_Gen
13903 omniORB.registerObjref(GEOM._objref_GEOM_Gen._NP_RepositoryId, geomBuilder)
13904
13905
13906 ## Field on Geometry
13907 #  @ingroup l2_field
13908 class geomField( GEOM._objref_GEOM_Field ):
13909
13910     def __init__(self, *args):
13911         GEOM._objref_GEOM_Field.__init__(self, *args)
13912         self.field = GEOM._objref_GEOM_Field
13913         return
13914
13915     ## Returns the shape the field lies on
13916     def getShape(self):
13917         "Returns the shape the field lies on"
13918         return self.field.GetShape(self)
13919
13920     ## Returns the field name
13921     def getName(self):
13922         "Returns the field name"
13923         return self.field.GetName(self)
13924
13925     ## Returns type of field data as integer [0-3]
13926     def getType(self):
13927         "Returns type of field data"
13928         return EnumToLong(self.field.GetDataType(self))
13929
13930     ## Returns type of field data:
13931     #  one of GEOM.FDT_Bool, GEOM.FDT_Int, GEOM.FDT_Double, GEOM.FDT_String
13932     def getTypeEnum(self):
13933         "Returns type of field data"
13934         return self.field.GetDataType(self)
13935
13936     ## Returns dimension of the shape the field lies on:
13937     #  0 - VERTEX, 1 - EDGE, 2 - FACE, 3 - SOLID, -1 - whole shape
13938     def getDimension(self):
13939         """Returns dimension of the shape the field lies on:
13940         0 - VERTEX, 1 - EDGE, 2 - FACE, 3 - SOLID, -1 - whole shape"""
13941         return self.field.GetDimension(self)
13942
13943     ## Returns names of components
13944     def getComponents(self):
13945         "Returns names of components"
13946         return self.field.GetComponents(self)
13947
13948     ## Adds a time step to the field
13949     #  @param step the time step number further used as the step identifier
13950     #  @param stamp the time step time
13951     #  @param values the values of the time step
13952     def addStep(self, step, stamp, values):
13953         "Adds a time step to the field"
13954         stp = self.field.AddStep( self, step, stamp )
13955         if not stp:
13956             raise RuntimeError("Field.addStep() : Error: step %s already exists in this field"%step)
13957         global geom
13958         geom._autoPublish( stp, "", "Step %s, %s"%(step,stamp))
13959         self.setValues( step, values )
13960         return stp
13961
13962     ## Remove a time step from the field
13963     def removeStep(self,step):
13964         "Remove a time step from the field"
13965         stepSO = None
13966         try:
13967             stepObj = self.field.GetStep( self, step )
13968             if stepObj:
13969                 stepSO = geom.myStudy.FindObjectID( stepObj.GetStudyEntry() )
13970         except:
13971             #import traceback
13972             #traceback.print_exc()
13973             pass
13974         self.field.RemoveStep( self, step )
13975         if stepSO:
13976             geom.myBuilder.RemoveObjectWithChildren( stepSO )
13977         return
13978
13979     ## Returns number of time steps in the field
13980     def countSteps(self):
13981         "Returns number of time steps in the field"
13982         return self.field.CountSteps(self)
13983
13984     ## Returns a list of time step IDs in the field
13985     def getSteps(self):
13986         "Returns a list of time step IDs in the field"
13987         return self.field.GetSteps(self)
13988
13989     ## Returns a time step by its ID
13990     def getStep(self,step):
13991         "Returns a time step by its ID"
13992         stp = self.field.GetStep(self, step)
13993         if not stp:
13994             raise RuntimeError("Step %s is missing from this field"%step)
13995         return stp
13996
13997     ## Returns the time of the field step
13998     def getStamp(self,step):
13999         "Returns the time of the field step"
14000         return self.getStep(step).GetStamp()
14001
14002     ## Changes the time of the field step
14003     def setStamp(self, step, stamp):
14004         "Changes the time of the field step"
14005         return self.getStep(step).SetStamp(stamp)
14006
14007     ## Returns values of the field step
14008     def getValues(self, step):
14009         "Returns values of the field step"
14010         return self.getStep(step).GetValues()
14011
14012     ## Changes values of the field step
14013     def setValues(self, step, values):
14014         "Changes values of the field step"
14015         stp = self.getStep(step)
14016         errBeg = "Field.setValues(values) : Error: "
14017         try:
14018             ok = stp.SetValues( values )
14019         except Exception as e:
14020             excStr = str(e)
14021             if excStr.find("WrongPythonType") > 0:
14022                 raise RuntimeError(errBeg +\
14023                       "wrong type of values, %s values are expected"%str(self.getTypeEnum())[4:])
14024             raise RuntimeError(errBeg + str(e))
14025         if not ok:
14026             nbOK = self.field.GetArraySize(self)
14027             nbKO = len(values)
14028             if nbOK != nbKO:
14029                 raise RuntimeError(errBeg + "len(values) must be %s but not %s"%(nbOK,nbKO))
14030             else:
14031                 raise RuntimeError(errBeg + "failed")
14032         return
14033
14034     pass # end of class geomField
14035
14036 # Register the new proxy for GEOM_Field
14037 omniORB.registerObjref(GEOM._objref_GEOM_Field._NP_RepositoryId, geomField)
14038
14039
14040 ## Create a new geomBuilder instance.The geomBuilder class provides the Python
14041 #  interface to GEOM operations.
14042 #
14043 #  Typical use is:
14044 #  \code
14045 #    import salome
14046 #    salome.salome_init()
14047 #    from salome.geom import geomBuilder
14048 #    geompy = geomBuilder.New()
14049 #  \endcode
14050 #  @param  instance  CORBA proxy of GEOM Engine. If None, the default Engine is used.
14051 #  @return geomBuilder instance
14052 def New( instance=None):
14053     """
14054     Create a new geomBuilder instance.The geomBuilder class provides the Python
14055     interface to GEOM operations.
14056
14057     Typical use is:
14058         import salome
14059         salome.salome_init()
14060         from salome.geom import geomBuilder
14061         geompy = geomBuilder.New()
14062
14063     Parameters:
14064         instance  CORBA proxy of GEOM Engine. If None, the default Engine is used.
14065     Returns:
14066         geomBuilder instance
14067     """
14068     #print "New geomBuilder ", study, instance
14069     global engine
14070     global geom
14071     global doLcc
14072     if instance and isinstance( instance, SALOMEDS._objref_Study ):
14073         import sys
14074         sys.stderr.write("Warning: 'study' argument is no more needed in geomBuilder.New(). Consider updating your script!!!\n\n")
14075         instance = None
14076     engine = instance
14077     if engine is None:
14078       doLcc = True
14079     geom = geomBuilder()
14080     assert isinstance(geom,geomBuilder), "Geom engine class is %s but should be geomBuilder.geomBuilder. Import geomBuilder before creating the instance."%geom.__class__
14081     geom.init_geom()
14082     return geom
14083
14084
14085 # Register methods from the plug-ins in the geomBuilder class 
14086 plugins_var = os.environ.get( "GEOM_PluginsList" )
14087
14088 plugins = None
14089 if plugins_var is not None:
14090     plugins = plugins_var.split( ":" )
14091     plugins=[x for x in plugins if len(x)>0]
14092 if plugins is not None:
14093     for pluginName in plugins:
14094         pluginBuilderName = pluginName + "Builder"
14095         try:
14096             exec( "from salome.%s.%s import *" % (pluginName, pluginBuilderName))
14097         except Exception as e:
14098             from salome_utils import verbose
14099             print("Exception while loading %s: %s" % ( pluginBuilderName, e ))
14100             continue
14101         exec( "from salome.%s import %s" % (pluginName, pluginBuilderName))
14102         plugin = eval( pluginBuilderName )
14103         
14104         # add methods from plugin module to the geomBuilder class
14105         for k in dir( plugin ):
14106             if k[0] == '_': continue
14107             method = getattr( plugin, k )
14108             if type( method ).__name__ == 'function':
14109                 if not hasattr( geomBuilder, k ):
14110                     setattr( geomBuilder, k, method )
14111                 pass
14112             pass
14113         del pluginName
14114         pass
14115     pass