Salome HOME
6f3f010d61addce619abc40a8990d3ebe4a99dfa
[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 ##   @defgroup l2_testing       Testing
241
242 ## @}
243
244 import omniORB
245
246 # initialize SALOME session in try/except block
247 # to avoid problems in some cases, e.g. when generating documentation
248 try:
249     import salome
250     salome.salome_init()
251     from salome import *
252 except:
253     pass
254
255 from salome_notebook import *
256
257 import GEOM
258 import math
259 import os
260 import functools
261
262 from salome.geom.gsketcher import Sketcher3D, Sketcher2D, Polyline2D
263
264 # In case the omniORBpy EnumItem class does not fully support Python 3
265 # (for instance in version 4.2.1-2), the comparison ordering methods must be
266 # defined
267 #
268 try:
269     GEOM.COMPOUND < GEOM.SOLID
270 except TypeError:
271     def enumitem_eq(self, other):
272         try:
273             if isinstance(other, omniORB.EnumItem):
274                 if other._parent_id == self._parent_id:
275                     return self._v == other._v
276                 else:
277                     return self._parent_id == other._parent_id
278             else:
279                 return id(self) == id(other)
280         except:
281             return id(self) == id(other)
282
283     def enumitem_lt(self, other):
284         try:
285             if isinstance(other, omniORB.EnumItem):
286                 if other._parent_id == self._parent_id:
287                     return self._v < other._v
288                 else:
289                     return self._parent_id < other._parent_id
290             else:
291                 return id(self) < id(other)
292         except:
293             return id(self) < id(other)
294
295     def enumitem_le(self, other):
296         try:
297             if isinstance(other, omniORB.EnumItem):
298                 if other._parent_id == self._parent_id:
299                     return self._v <= other._v
300                 else:
301                     return self._parent_id <= other._parent_id
302             else:
303                 return id(self) <= id(other)
304         except:
305             return id(self) <= id(other)
306
307     def enumitem_gt(self, other):
308         try:
309             if isinstance(other, omniORB.EnumItem):
310                 if other._parent_id == self._parent_id:
311                     return self._v > other._v
312                 else:
313                     return self._parent_id > other._parent_id
314             else:
315                 return id(self) > id(other)
316         except:
317             return id(self) > id(other)
318
319     def enumitem_ge(self, other):
320         try:
321             if isinstance(other, omniORB.EnumItem):
322                 if other._parent_id == self._parent_id:
323                     return self._v >= other._v
324                 else:
325                     return self._parent_id >= other._parent_id
326             else:
327                 return id(self) >= id(other)
328         except:
329             return id(self) >= id(other)
330
331     GEOM.omniORB.EnumItem.__eq__ = enumitem_eq
332     GEOM.omniORB.EnumItem.__lt__ = enumitem_lt
333     GEOM.omniORB.EnumItem.__le__ = enumitem_le
334     GEOM.omniORB.EnumItem.__gt__ = enumitem_gt
335     GEOM.omniORB.EnumItem.__ge__ = enumitem_ge
336     omniORB.EnumItem.__eq__ = enumitem_eq
337     omniORB.EnumItem.__lt__ = enumitem_lt
338     omniORB.EnumItem.__le__ = enumitem_le
339     omniORB.EnumItem.__gt__ = enumitem_gt
340     omniORB.EnumItem.__ge__ = enumitem_ge
341
342 # service function
343 def _toListOfNames(_names, _size=-1):
344     l = []
345     import types
346     if type(_names) in [list, tuple]:
347         for i in _names: l.append(i)
348     elif _names:
349         l.append(_names)
350     if l and len(l) < _size:
351         for i in range(len(l), _size): l.append("%s_%d"%(l[0],i))
352     return l
353
354 # Decorator function to manage transactions for all geometric operations.
355 def ManageTransactions(theOpeName):
356     def MTDecorator(theFunction):
357         # To keep the original function name an documentation.
358         @functools.wraps(theFunction)
359         def OpenCallClose(self, *args, **kwargs):
360             # Open transaction
361             anOperation = getattr(self, theOpeName)
362             anOperation.StartOperation()
363             try:
364                 # Call the function
365                 res = theFunction(self, *args, **kwargs)
366                 # Commit transaction
367                 anOperation.FinishOperation()
368                 return res
369             except:
370                 # Abort transaction
371                 anOperation.AbortOperation()
372                 raise
373         return OpenCallClose
374     return MTDecorator
375
376 ## Raise an Error, containing the Method_name, if Operation is Failed
377 ## @ingroup l1_geomBuilder_auxiliary
378 def RaiseIfFailed (Method_name, Operation):
379     if not Operation.IsDone() and Operation.GetErrorCode() != "NOT_FOUND_ANY":
380         raise RuntimeError(Method_name + " : " + Operation.GetErrorCode())
381
382 ## Return list of variables value from salome notebook
383 ## @ingroup l1_geomBuilder_auxiliary
384 def ParseParameters(*parameters):
385     Result = []
386     StringResult = []
387     for parameter in parameters:
388         if isinstance(parameter, list):
389             lResults = ParseParameters(*parameter)
390             if len(lResults) > 0:
391                 Result.append(lResults[:-1])
392                 StringResult += lResults[-1].split(":")
393                 pass
394             pass
395         else:
396             if isinstance(parameter,str):
397                 if notebook.isVariable(parameter):
398                     Result.append(notebook.get(parameter))
399                 else:
400                     raise RuntimeError("Variable with name '" + parameter + "' doesn't exist!!!")
401                 pass
402             else:
403                 Result.append(parameter)
404                 pass
405             StringResult.append(str(parameter))
406             pass
407         pass
408     if Result:
409         Result.append(":".join(StringResult))
410     else:
411         Result = ":".join(StringResult)
412     return Result
413
414 ## Return list of variables value from salome notebook
415 ## @ingroup l1_geomBuilder_auxiliary
416 def ParseList(list):
417     Result = []
418     StringResult = ""
419     for parameter in list:
420         if isinstance(parameter,str) and notebook.isVariable(parameter):
421             Result.append(str(notebook.get(parameter)))
422             pass
423         else:
424             Result.append(str(parameter))
425             pass
426
427         StringResult = StringResult + str(parameter)
428         StringResult = StringResult + ":"
429         pass
430     StringResult = StringResult[:len(StringResult)-1]
431     return Result, StringResult
432
433 ## Return list of variables value from salome notebook
434 ## @ingroup l1_geomBuilder_auxiliary
435 def ParseSketcherCommand(command):
436     Result = ""
437     StringResult = ""
438     sections = command.split(":")
439     for section in sections:
440         parameters = section.split(" ")
441         paramIndex = 1
442         for parameter in parameters:
443             if paramIndex > 1 and parameter.find("'") != -1:
444                 parameter = parameter.replace("'","")
445                 if notebook.isVariable(parameter):
446                     Result = Result + str(notebook.get(parameter)) + " "
447                     pass
448                 else:
449                     raise RuntimeError("Variable with name '" + parameter + "' doesn't exist!!!")
450                     pass
451                 pass
452             else:
453                 Result = Result + str(parameter) + " "
454                 pass
455             if paramIndex > 1:
456                 StringResult = StringResult + parameter
457                 StringResult = StringResult + ":"
458                 pass
459             paramIndex = paramIndex + 1
460             pass
461         Result = Result[:len(Result)-1] + ":"
462         pass
463     Result = Result[:len(Result)-1]
464     return Result, StringResult
465
466 ## Helper function which can be used to pack the passed string to the byte data.
467 ## Only '1' an '0' symbols are valid for the string. The missing bits are replaced by zeroes.
468 ## If the string contains invalid symbol (neither '1' nor '0'), the function raises an exception.
469 ## For example,
470 ## \code
471 ## val = PackData("10001110") # val = 0xAE
472 ## val = PackData("1")        # val = 0x80
473 ## \endcode
474 ## @param data unpacked data - a string containing '1' and '0' symbols
475 ## @return data packed to the byte stream
476 ## @ingroup l1_geomBuilder_auxiliary
477 def PackData(data):
478     """
479     Helper function which can be used to pack the passed string to the byte data.
480     Only '1' an '0' symbols are valid for the string. The missing bits are replaced by zeroes.
481     If the string contains invalid symbol (neither '1' nor '0'), the function raises an exception.
482
483     Parameters:
484         data unpacked data - a string containing '1' and '0' symbols
485
486     Returns:
487         data packed to the byte stream
488
489     Example of usage:
490         val = PackData("10001110") # val = 0xAE
491         val = PackData("1")        # val = 0x80
492     """
493     bytes = len(data)/8
494     if len(data)%8: bytes += 1
495     res = ""
496     for b in range(bytes):
497         d = data[b*8:(b+1)*8]
498         val = 0
499         for i in range(8):
500             val *= 2
501             if i < len(d):
502                 if d[i] == "1": val += 1
503                 elif d[i] != "0":
504                     raise "Invalid symbol %s" % d[i]
505                 pass
506             pass
507         res += chr(val)
508         pass
509     return res
510
511 ## Read bitmap texture from the text file.
512 ## In that file, any non-zero symbol represents '1' opaque pixel of the bitmap.
513 ## A zero symbol ('0') represents transparent pixel of the texture bitmap.
514 ## The function returns width and height of the pixmap in pixels and byte stream representing
515 ## texture bitmap itself.
516 ##
517 ## This function can be used to read the texture to the byte stream in order to pass it to
518 ## the AddTexture() function of geomBuilder class.
519 ## For example,
520 ## \code
521 ## from salome.geom import geomBuilder
522 ## geompy = geomBuilder.New()
523 ## texture = geompy.readtexture('mytexture.dat')
524 ## texture = geompy.AddTexture(*texture)
525 ## obj.SetMarkerTexture(texture)
526 ## \endcode
527 ## @param fname texture file name
528 ## @return sequence of tree values: texture's width, height in pixels and its byte stream
529 ## @ingroup l1_geomBuilder_auxiliary
530 def ReadTexture(fname):
531     """
532     Read bitmap texture from the text file.
533     In that file, any non-zero symbol represents '1' opaque pixel of the bitmap.
534     A zero symbol ('0') represents transparent pixel of the texture bitmap.
535     The function returns width and height of the pixmap in pixels and byte stream representing
536     texture bitmap itself.
537     This function can be used to read the texture to the byte stream in order to pass it to
538     the AddTexture() function of geomBuilder class.
539
540     Parameters:
541         fname texture file name
542
543     Returns:
544         sequence of tree values: texture's width, height in pixels and its byte stream
545
546     Example of usage:
547         from salome.geom import geomBuilder
548         geompy = geomBuilder.New()
549         texture = geompy.readtexture('mytexture.dat')
550         texture = geompy.AddTexture(*texture)
551         obj.SetMarkerTexture(texture)
552     """
553     try:
554         f = open(fname)
555         lines = [ l.strip() for l in f.readlines()]
556         f.close()
557         maxlen = 0
558         if lines: maxlen = max([len(x) for x in lines])
559         lenbytes = maxlen/8
560         if maxlen%8: lenbytes += 1
561         bytedata=""
562         for line in lines:
563             if len(line)%8:
564                 lenline = (len(line)/8+1)*8
565                 pass
566             else:
567                 lenline = (len(line)/8)*8
568                 pass
569             for i in range(lenline/8):
570                 byte=""
571                 for j in range(8):
572                     if i*8+j < len(line) and line[i*8+j] != "0": byte += "1"
573                     else: byte += "0"
574                     pass
575                 bytedata += PackData(byte)
576                 pass
577             for i in range(lenline/8, lenbytes):
578                 bytedata += PackData("0")
579             pass
580         return lenbytes*8, len(lines), bytedata
581     except:
582         pass
583     return 0, 0, ""
584
585 ## Returns a long value from enumeration type
586 #  Can be used for CORBA enumerator types like GEOM.shape_type
587 #  @param theItem enumeration type
588 #  @ingroup l1_geomBuilder_auxiliary
589 def EnumToLong(theItem):
590     """
591     Returns a long value from enumeration type
592     Can be used for CORBA enumerator types like geomBuilder.ShapeType
593
594     Parameters:
595         theItem enumeration type
596     """
597     ret = theItem
598     if hasattr(theItem, "_v"): ret = theItem._v
599     return ret
600
601 ## Pack an argument into a list
602 def ToList( arg ):
603     if isinstance( arg, list ):
604         return arg
605     if hasattr( arg, "__getitem__" ):
606         return list( arg )
607     return [ arg ]
608
609 ## Information about closed/unclosed state of shell or wire
610 #  @ingroup l1_geomBuilder_auxiliary
611 class info:
612     """
613     Information about closed/unclosed state of shell or wire
614     """
615     UNKNOWN  = 0
616     CLOSED   = 1
617     UNCLOSED = 2
618
619 ## Private class used to bind calls of plugin operations to geomBuilder
620 class PluginOperation:
621   def __init__(self, operation, function):
622     self.operation = operation
623     self.function = function
624     pass
625
626   @ManageTransactions("operation")
627   def __call__(self, *args):
628     res = self.function(self.operation, *args)
629     RaiseIfFailed(self.function.__name__, self.operation)
630     return res
631
632 # Warning: geom is a singleton
633 geom = None
634 engine = None
635 doLcc = False
636 created = False
637
638 class geomBuilder(GEOM._objref_GEOM_Gen):
639
640         ## Enumeration ShapeType as a dictionary. \n
641         ## Topological types of shapes (like Open Cascade types). See GEOM::shape_type for details.
642         #  @ingroup l1_geomBuilder_auxiliary
643         ShapeType = {"AUTO":-1, "COMPOUND":0, "COMPSOLID":1, "SOLID":2, "SHELL":3, "FACE":4, "WIRE":5, "EDGE":6, "VERTEX":7, "SHAPE":8, "FLAT":9}
644
645         ## Kinds of shape in terms of <VAR>GEOM.GEOM_IKindOfShape.shape_kind</VAR> enumeration
646         #  and a list of parameters, describing the shape.
647         #  List of parameters, describing the shape:
648         #  - COMPOUND:            [nb_solids  nb_faces  nb_edges  nb_vertices]
649         #  - COMPSOLID:           [nb_solids  nb_faces  nb_edges  nb_vertices]
650         #
651         #  - SHELL:       [info.CLOSED / info.UNCLOSED  nb_faces  nb_edges  nb_vertices]
652         #
653         #  - WIRE:        [info.CLOSED / info.UNCLOSED nb_edges  nb_vertices]
654         #
655         #  - SPHERE:       [xc yc zc            R]
656         #  - CYLINDER:     [xb yb zb  dx dy dz  R         H]
657         #  - BOX:          [xc yc zc                      ax ay az]
658         #  - ROTATED_BOX:  [xc yc zc  zx zy zz  xx xy xz  ax ay az]
659         #  - TORUS:        [xc yc zc  dx dy dz  R_1  R_2]
660         #  - CONE:         [xb yb zb  dx dy dz  R_1  R_2  H]
661         #  - POLYHEDRON:                       [nb_faces  nb_edges  nb_vertices]
662         #  - SOLID:                            [nb_faces  nb_edges  nb_vertices]
663         #
664         #  - SPHERE2D:     [xc yc zc            R]
665         #  - CYLINDER2D:   [xb yb zb  dx dy dz  R         H]
666         #  - TORUS2D:      [xc yc zc  dx dy dz  R_1  R_2]
667         #  - CONE2D:       [xc yc zc  dx dy dz  R_1  R_2  H]
668         #  - DISK_CIRCLE:  [xc yc zc  dx dy dz  R]
669         #  - DISK_ELLIPSE: [xc yc zc  dx dy dz  R_1  R_2]
670         #  - POLYGON:      [xo yo zo  dx dy dz            nb_edges  nb_vertices]
671         #  - PLANE:        [xo yo zo  dx dy dz]
672         #  - PLANAR:       [xo yo zo  dx dy dz            nb_edges  nb_vertices]
673         #  - FACE:                                       [nb_edges  nb_vertices]
674         #
675         #  - CIRCLE:       [xc yc zc  dx dy dz  R]
676         #  - ARC_CIRCLE:   [xc yc zc  dx dy dz  R         x1 y1 z1  x2 y2 z2]
677         #  - ELLIPSE:      [xc yc zc  dx dy dz  R_1  R_2]
678         #  - ARC_ELLIPSE:  [xc yc zc  dx dy dz  R_1  R_2  x1 y1 z1  x2 y2 z2]
679         #  - LINE:         [xo yo zo  dx dy dz]
680         #  - SEGMENT:      [x1 y1 z1  x2 y2 z2]
681         #  - EDGE:                                                 [nb_vertices]
682         #
683         #  - VERTEX:       [x  y  z]
684         #
685         #  - LCS:          [x y z  xx xy xz  yx yy yz  zx zy zz]
686         #  @ingroup l1_geomBuilder_auxiliary
687         kind = GEOM.GEOM_IKindOfShape
688
689         def __new__(cls, *args):
690             global engine
691             global geom
692             global doLcc
693             global created
694             #print "==== __new__ ", engine, geom, doLcc, created
695             if geom is None:
696                 # geom engine is either retrieved from engine, or created
697                 geom = engine
698                 # Following test avoids a recursive loop
699                 if doLcc:
700                     if geom is not None:
701                         # geom engine not created: existing engine found
702                         doLcc = False
703                     if doLcc and not created:
704                         doLcc = False
705                         # FindOrLoadComponent called:
706                         # 1. CORBA resolution of server
707                         # 2. the __new__ method is called again
708                         #print "==== FindOrLoadComponent ", engine, geom, doLcc, created
709                         geom = lcc.FindOrLoadComponent( "FactoryServer", "GEOM" )
710                         #print "====1 ",geom
711                 else:
712                     # FindOrLoadComponent not called
713                     if geom is None:
714                         # geomBuilder instance is created from lcc.FindOrLoadComponent
715                         #print "==== super ", engine, geom, doLcc, created
716                         geom = super(geomBuilder,cls).__new__(cls)
717                         #print "====2 ",geom
718                     else:
719                         # geom engine not created: existing engine found
720                         #print "==== existing ", engine, geom, doLcc, created
721                         pass
722                 #print "return geom 1 ", geom
723                 return geom
724
725             #print "return geom 2 ", geom
726             return geom
727
728         def __init__(self, *args):
729             global created
730             #print "-------- geomBuilder __init__ --- ", created, self
731             if not created:
732               created = True
733               GEOM._objref_GEOM_Gen.__init__(self, *args)
734               self.myMaxNbSubShapesAllowed = 0 # auto-publishing is disabled by default
735               self.myBuilder = None
736               self.BasicOp  = None
737               self.CurvesOp = None
738               self.PrimOp   = None
739               self.ShapesOp = None
740               self.HealOp   = None
741               self.InsertOp = None
742               self.BoolOp   = None
743               self.TrsfOp   = None
744               self.LocalOp  = None
745               self.MeasuOp  = None
746               self.BlocksOp = None
747               self.GroupOp  = None
748               self.FieldOp  = None
749               self.TestOp   = None
750             pass
751
752         ## Process object publication in the study, as follows:
753         #  - if @a theName is specified (not None), the object is published in the study
754         #    with this name, not taking into account "auto-publishing" option;
755         #  - if @a theName is NOT specified, the object is published in the study
756         #    (using default name, which can be customized using @a theDefaultName parameter)
757         #    only if auto-publishing is switched on.
758         #
759         #  @param theObj  object, a subject for publishing
760         #  @param theName object name for study
761         #  @param theDefaultName default name for the auto-publishing
762         #
763         #  @sa addToStudyAuto()
764         def _autoPublish(self, theObj, theName, theDefaultName="noname"):
765             # ---
766             def _item_name(_names, _defname, _idx=-1):
767                 if not _names: _names = _defname
768                 if type(_names) in [list, tuple]:
769                     if _idx >= 0:
770                         if _idx >= len(_names) or not _names[_idx]:
771                             if type(_defname) not in [list, tuple]:
772                                 _name = "%s_%d"%(_defname, _idx+1)
773                             elif len(_defname) > 0 and _idx >= 0 and _idx < len(_defname):
774                                 _name = _defname[_idx]
775                             else:
776                                 _name = "%noname_%d"%(dn, _idx+1)
777                             pass
778                         else:
779                             _name = _names[_idx]
780                         pass
781                     else:
782                         # must be wrong  usage
783                         _name = _names[0]
784                     pass
785                 else:
786                     if _idx >= 0:
787                         _name = "%s_%d"%(_names, _idx+1)
788                     else:
789                         _name = _names
790                     pass
791                 return _name
792             # ---
793             def _publish( _name, _obj ):
794                 fatherObj = None
795                 if isinstance( _obj, GEOM._objref_GEOM_Field ):
796                     fatherObj = _obj.GetShape()
797                 elif isinstance( _obj, GEOM._objref_GEOM_FieldStep ):
798                     fatherObj = _obj.GetField()
799                 elif not _obj.IsMainShape():
800                     fatherObj = _obj.GetMainShape()
801                     pass
802                 if fatherObj and fatherObj.GetStudyEntry():
803                     self.addToStudyInFather(fatherObj, _obj, _name)
804                 else:
805                     self.addToStudy(_obj, _name)
806                     pass
807                 return
808             # ---
809             if not theObj:
810                 return # null object
811             if not theName and not self.myMaxNbSubShapesAllowed:
812                 return # nothing to do: auto-publishing is disabled
813             if not theName and not theDefaultName:
814                 return # neither theName nor theDefaultName is given
815             import types
816             if type(theObj) in [list, tuple]:
817                 # list of objects is being published
818                 idx = 0
819                 for obj in theObj:
820                     if not obj: continue # bad object
821                     name = _item_name(theName, theDefaultName, idx)
822                     _publish( name, obj )
823                     idx = idx+1
824                     if not theName and idx == self.myMaxNbSubShapesAllowed: break
825                     pass
826                 pass
827             else:
828                 # single object is published
829                 name = _item_name(theName, theDefaultName)
830                 _publish( name, theObj )
831             pass
832
833         ## @addtogroup l1_geomBuilder_auxiliary
834         ## @{
835         def init_geom(self):
836             self.myStudy = salome.myStudy
837             self.myBuilder = self.myStudy.NewBuilder()
838
839             # load data from the study file, if necessary
840             component = self.myStudy.FindComponent("GEOM")
841             if component:
842                 self.myBuilder.LoadWith(component, self)
843
844             self.BasicOp  = self.GetIBasicOperations    ()
845             self.CurvesOp = self.GetICurvesOperations   ()
846             self.PrimOp   = self.GetI3DPrimOperations   ()
847             self.ShapesOp = self.GetIShapesOperations   ()
848             self.HealOp   = self.GetIHealingOperations  ()
849             self.InsertOp = self.GetIInsertOperations   ()
850             self.BoolOp   = self.GetIBooleanOperations  ()
851             self.TrsfOp   = self.GetITransformOperations()
852             self.LocalOp  = self.GetILocalOperations    ()
853             self.MeasuOp  = self.GetIMeasureOperations  ()
854             self.BlocksOp = self.GetIBlocksOperations   ()
855             self.GroupOp  = self.GetIGroupOperations    ()
856             self.FieldOp  = self.GetIFieldOperations    ()
857             self.TestOp   = self.GetITestOperations     ()
858
859             notebook.myStudy = self.myStudy
860             pass
861
862         def GetPluginOperations(self, libraryName):
863             op = GEOM._objref_GEOM_Gen.GetPluginOperations(self, libraryName)
864             return op
865
866         ## Enable / disable results auto-publishing
867         #
868         #  The automatic publishing is managed in the following way:
869         #  - if @a maxNbSubShapes = 0, automatic publishing is disabled.
870         #  - if @a maxNbSubShapes = -1 (default), automatic publishing is enabled and
871         #  maximum number of sub-shapes allowed for publishing is unlimited; any negative
872         #  value passed as parameter has the same effect.
873         #  - if @a maxNbSubShapes is any positive value, automatic publishing is enabled and
874         #  maximum number of sub-shapes allowed for publishing is set to specified value.
875         #
876         #  @param maxNbSubShapes maximum number of sub-shapes allowed for publishing.
877         #  @ingroup l1_publish_data
878         def addToStudyAuto(self, maxNbSubShapes=-1):
879             """
880             Enable / disable results auto-publishing
881
882             The automatic publishing is managed in the following way:
883             - if @a maxNbSubShapes = 0, automatic publishing is disabled;
884             - if @a maxNbSubShapes = -1 (default), automatic publishing is enabled and
885             maximum number of sub-shapes allowed for publishing is unlimited; any negative
886             value passed as parameter has the same effect.
887             - if @a maxNbSubShapes is any positive value, automatic publishing is enabled and
888             maximum number of sub-shapes allowed for publishing is set to this value.
889
890             Parameters:
891                 maxNbSubShapes maximum number of sub-shapes allowed for publishing.
892
893             Example of usage:
894                 geompy.addToStudyAuto()   # enable auto-publishing
895                 geompy.MakeBoxDXDYDZ(100) # box is created and published with default name
896                 geompy.addToStudyAuto(0)  # disable auto-publishing
897             """
898             self.myMaxNbSubShapesAllowed = max(-1, maxNbSubShapes)
899             pass
900
901         ## Dump component to the Python script
902         #  This method overrides IDL function to allow default values for the parameters.
903         def DumpPython(self, theIsPublished=True, theIsMultiFile=True):
904             """
905             Dump component to the Python script
906             This method overrides IDL function to allow default values for the parameters.
907             """
908             return GEOM._objref_GEOM_Gen.DumpPython(self, theIsPublished, theIsMultiFile)
909
910         ## Get name for sub-shape aSubObj of shape aMainObj
911         #
912         # @ref swig_SubShapeName "Example"
913         @ManageTransactions("ShapesOp")
914         def SubShapeName(self,aSubObj, aMainObj):
915             """
916             Get name for sub-shape aSubObj of shape aMainObj
917             """
918             # Example: see GEOM_TestAll.py
919
920             #aSubId  = orb.object_to_string(aSubObj)
921             #aMainId = orb.object_to_string(aMainObj)
922             #index = gg.getIndexTopology(aSubId, aMainId)
923             #name = gg.getShapeTypeString(aSubId) + "_%d"%(index)
924             index = self.ShapesOp.GetTopologyIndex(aMainObj, aSubObj)
925             name = self.ShapesOp.GetShapeTypeString(aSubObj) + "_%d"%(index)
926             return name
927
928         ## Publish in study aShape with name aName
929         #
930         #  \param aShape the shape to be published
931         #  \param aName  the name for the shape
932         #  \param doRestoreSubShapes if True, finds and publishes also
933         #         sub-shapes of <VAR>aShape</VAR>, corresponding to its arguments
934         #         and published sub-shapes of arguments
935         #  \param theArgs,theFindMethod,theInheritFirstArg see RestoreSubShapes() for
936         #                                                  these arguments description
937         #  \return study entry of the published shape in form of string
938         #
939         #  @ingroup l1_publish_data
940         #  @ref swig_all_addtostudy "Example"
941         def addToStudy(self, aShape, aName, doRestoreSubShapes=False,
942                        theArgs=[], theFindMethod=GEOM.FSM_GetInPlace, theInheritFirstArg=False):
943             """
944             Publish in study aShape with name aName
945
946             Parameters:
947                 aShape the shape to be published
948                 aName  the name for the shape
949                 doRestoreSubShapes if True, finds and publishes also
950                                    sub-shapes of aShape, corresponding to its arguments
951                                    and published sub-shapes of arguments
952                 theArgs,theFindMethod,theInheritFirstArg see geompy.RestoreSubShapes() for
953                                                          these arguments description
954
955             Returns:
956                 study entry of the published shape in form of string
957
958             Example of usage:
959                 id_block1 = geompy.addToStudy(Block1, "Block 1")
960             """
961             # Example: see GEOM_TestAll.py
962             try:
963                 aSObject = self.AddInStudy(aShape, aName, None)
964                 if aSObject and aName: aSObject.SetAttrString("AttributeName", aName)
965                 if doRestoreSubShapes:
966                     self.RestoreSubShapesSO(aSObject, theArgs,
967                                             theFindMethod, theInheritFirstArg, True )
968             except:
969                 print("addToStudy() failed")
970                 return ""
971             return aShape.GetStudyEntry()
972
973         ## Publish in study aShape with name aName as sub-object of previously published aFather
974         #  \param aFather previously published object
975         #  \param aShape the shape to be published as sub-object of <VAR>aFather</VAR>
976         #  \param aName  the name for the shape
977         #
978         #  \return study entry of the published shape in form of string
979         #
980         #  @ingroup l1_publish_data
981         #  @ref swig_all_addtostudyInFather "Example"
982         def addToStudyInFather(self, aFather, aShape, aName):
983             """
984             Publish in study aShape with name aName as sub-object of previously published aFather
985
986             Parameters:
987                 aFather previously published object
988                 aShape the shape to be published as sub-object of aFather
989                 aName  the name for the shape
990
991             Returns:
992                 study entry of the published shape in form of string
993             """
994             # Example: see GEOM_TestAll.py
995             try:
996                 aSObject = self.AddInStudy(aShape, aName, aFather)
997                 if aSObject and aName: aSObject.SetAttrString("AttributeName", aName)
998             except:
999                 print("addToStudyInFather() failed")
1000                 return ""
1001             return aShape.GetStudyEntry()
1002
1003         ## Unpublish object in study
1004         #
1005         #  \param obj the object to be unpublished
1006         def hideInStudy(self, obj):
1007             """
1008             Unpublish object in study
1009
1010             Parameters:
1011                 obj the object to be unpublished
1012             """
1013             ior = salome.orb.object_to_string(obj)
1014             aSObject = self.myStudy.FindObjectIOR(ior)
1015             if aSObject is not None:
1016                 genericAttribute = self.myBuilder.FindOrCreateAttribute(aSObject, "AttributeDrawable")
1017                 drwAttribute = genericAttribute._narrow(SALOMEDS.AttributeDrawable)
1018                 drwAttribute.SetDrawable(False)
1019                 # hide references if any
1020                 vso = self.myStudy.FindDependances(aSObject);
1021                 for refObj in vso :
1022                     genericAttribute = self.myBuilder.FindOrCreateAttribute(refObj, "AttributeDrawable")
1023                     drwAttribute = genericAttribute._narrow(SALOMEDS.AttributeDrawable)
1024                     drwAttribute.SetDrawable(False)
1025                     pass
1026                 pass
1027
1028         # end of l1_geomBuilder_auxiliary
1029         ## @}
1030
1031         ## @addtogroup l3_restore_ss
1032         ## @{
1033
1034         ## Publish sub-shapes, standing for arguments and sub-shapes of arguments
1035         #  To be used from python scripts out of addToStudy() (non-default usage)
1036         #  \param theObject published GEOM.GEOM_Object, arguments of which will be published
1037         #  \param theArgs   list of GEOM.GEOM_Object, operation arguments to be published.
1038         #                   If this list is empty, all operation arguments will be published
1039         #  \param theFindMethod method to search sub-shapes, corresponding to arguments and
1040         #                       their sub-shapes. Value from enumeration GEOM.find_shape_method.
1041         #  \param theInheritFirstArg set properties of the first argument for <VAR>theObject</VAR>.
1042         #                            Do not publish sub-shapes in place of arguments, but only
1043         #                            in place of sub-shapes of the first argument,
1044         #                            because the whole shape corresponds to the first argument.
1045         #                            Mainly to be used after transformations, but it also can be
1046         #                            useful after partition with one object shape, and some other
1047         #                            operations, where only the first argument has to be considered.
1048         #                            If theObject has only one argument shape, this flag is automatically
1049         #                            considered as True, not regarding really passed value.
1050         #  \param theAddPrefix add prefix "from_" to names of restored sub-shapes,
1051         #                      and prefix "from_subshapes_of_" to names of partially restored sub-shapes.
1052         #  \return list of published sub-shapes
1053         #
1054         #  @ref tui_restore_prs_params "Example"
1055         def RestoreSubShapes (self, theObject, theArgs=[], theFindMethod=GEOM.FSM_GetInPlace,
1056                               theInheritFirstArg=False, theAddPrefix=True):
1057             """
1058             Publish sub-shapes, standing for arguments and sub-shapes of arguments
1059             To be used from python scripts out of geompy.addToStudy (non-default usage)
1060
1061             Parameters:
1062                 theObject published GEOM.GEOM_Object, arguments of which will be published
1063                 theArgs   list of GEOM.GEOM_Object, operation arguments to be published.
1064                           If this list is empty, all operation arguments will be published
1065                 theFindMethod method to search sub-shapes, corresponding to arguments and
1066                               their sub-shapes. Value from enumeration GEOM.find_shape_method.
1067                 theInheritFirstArg set properties of the first argument for theObject.
1068                                    Do not publish sub-shapes in place of arguments, but only
1069                                    in place of sub-shapes of the first argument,
1070                                    because the whole shape corresponds to the first argument.
1071                                    Mainly to be used after transformations, but it also can be
1072                                    useful after partition with one object shape, and some other
1073                                    operations, where only the first argument has to be considered.
1074                                    If theObject has only one argument shape, this flag is automatically
1075                                    considered as True, not regarding really passed value.
1076                 theAddPrefix add prefix "from_" to names of restored sub-shapes,
1077                              and prefix "from_subshapes_of_" to names of partially restored sub-shapes.
1078             Returns:
1079                 list of published sub-shapes
1080             """
1081             # Example: see GEOM_TestAll.py
1082             return self.RestoreSubShapesO(theObject, theArgs,
1083                                           theFindMethod, theInheritFirstArg, theAddPrefix)
1084
1085         ## Publish sub-shapes, standing for arguments and sub-shapes of arguments
1086         #  To be used from python scripts out of addToStudy() (non-default usage)
1087         #  \param theObject published GEOM.GEOM_Object, arguments of which will be published
1088         #  \param theArgs   list of GEOM.GEOM_Object, operation arguments to be published.
1089         #                   If this list is empty, all operation arguments will be published
1090         #  \param theFindMethod method to search sub-shapes, corresponding to arguments and
1091         #                       their sub-shapes. Value from enumeration GEOM::find_shape_method.
1092         #  \param theInheritFirstArg set properties of the first argument for <VAR>theObject</VAR>.
1093         #                            Do not publish sub-shapes in place of arguments, but only
1094         #                            in place of sub-shapes of the first argument,
1095         #                            because the whole shape corresponds to the first argument.
1096         #                            Mainly to be used after transformations, but it also can be
1097         #                            useful after partition with one object shape, and some other
1098         #                            operations, where only the first argument has to be considered.
1099         #                            If theObject has only one argument shape, this flag is automatically
1100         #                            considered as True, not regarding really passed value.
1101         #  \param theAddPrefix add prefix "from_" to names of restored sub-shapes,
1102         #                      and prefix "from_subshapes_of_" to names of partially restored sub-shapes.
1103         #  \return list of published sub-shapes
1104         #
1105         #  @ref tui_restore_prs_params "Example"
1106         def RestoreGivenSubShapes (self, theObject, theArgs=[], theFindMethod=GEOM.FSM_GetInPlace,
1107                                    theInheritFirstArg=False, theAddPrefix=True):
1108             """
1109             Publish sub-shapes, standing for arguments and sub-shapes of arguments
1110             To be used from python scripts out of geompy.addToStudy() (non-default usage)
1111
1112             Parameters:
1113                 theObject published GEOM.GEOM_Object, arguments of which will be published
1114                 theArgs   list of GEOM.GEOM_Object, operation arguments to be published.
1115                           If this list is empty, all operation arguments will be published
1116                 theFindMethod method to search sub-shapes, corresponding to arguments and
1117                               their sub-shapes. Value from enumeration GEOM::find_shape_method.
1118                 theInheritFirstArg set properties of the first argument for theObject.
1119                                    Do not publish sub-shapes in place of arguments, but only
1120                                    in place of sub-shapes of the first argument,
1121                                    because the whole shape corresponds to the first argument.
1122                                    Mainly to be used after transformations, but it also can be
1123                                    useful after partition with one object shape, and some other
1124                                    operations, where only the first argument has to be considered.
1125                                    If theObject has only one argument shape, this flag is automatically
1126                                    considered as True, not regarding really passed value.
1127                 theAddPrefix add prefix "from_" to names of restored sub-shapes,
1128                              and prefix "from_subshapes_of_" to names of partially restored sub-shapes.
1129
1130             Returns:
1131                 list of published sub-shapes
1132             """
1133             # Example: see GEOM_TestAll.py
1134             return self.RestoreGivenSubShapesO(theObject, theArgs,
1135                                                theFindMethod, theInheritFirstArg, theAddPrefix)
1136
1137         # end of l3_restore_ss
1138         ## @}
1139
1140         ## @addtogroup l3_basic_go
1141         ## @{
1142
1143         ## Create point by three coordinates.
1144         #  @param theX The X coordinate of the point.
1145         #  @param theY The Y coordinate of the point.
1146         #  @param theZ The Z coordinate of the point.
1147         #  @param theName Object name; when specified, this parameter is used
1148         #         for result publication in the study. Otherwise, if automatic
1149         #         publication is switched on, default value is used for result name.
1150         #
1151         #  @return New GEOM.GEOM_Object, containing the created point.
1152         #
1153         #  @ref tui_creation_point "Example"
1154         @ManageTransactions("BasicOp")
1155         def MakeVertex(self, theX, theY, theZ, theName=None):
1156             """
1157             Create point by three coordinates.
1158
1159             Parameters:
1160                 theX The X coordinate of the point.
1161                 theY The Y coordinate of the point.
1162                 theZ The Z coordinate of the point.
1163                 theName Object name; when specified, this parameter is used
1164                         for result publication in the study. Otherwise, if automatic
1165                         publication is switched on, default value is used for result name.
1166
1167             Returns:
1168                 New GEOM.GEOM_Object, containing the created point.
1169             """
1170             # Example: see GEOM_TestAll.py
1171             theX,theY,theZ,Parameters = ParseParameters(theX, theY, theZ)
1172             anObj = self.BasicOp.MakePointXYZ(theX, theY, theZ)
1173             RaiseIfFailed("MakePointXYZ", self.BasicOp)
1174             anObj.SetParameters(Parameters)
1175             self._autoPublish(anObj, theName, "vertex")
1176             return anObj
1177
1178         ## Create a point, distant from the referenced point
1179         #  on the given distances along the coordinate axes.
1180         #  @param theReference The referenced point.
1181         #  @param theX Displacement from the referenced point along OX axis.
1182         #  @param theY Displacement from the referenced point along OY axis.
1183         #  @param theZ Displacement from the referenced point along OZ axis.
1184         #  @param theName Object name; when specified, this parameter is used
1185         #         for result publication in the study. Otherwise, if automatic
1186         #         publication is switched on, default value is used for result name.
1187         #
1188         #  @return New GEOM.GEOM_Object, containing the created point.
1189         #
1190         #  @ref tui_creation_point "Example"
1191         @ManageTransactions("BasicOp")
1192         def MakeVertexWithRef(self, theReference, theX, theY, theZ, theName=None):
1193             """
1194             Create a point, distant from the referenced point
1195             on the given distances along the coordinate axes.
1196
1197             Parameters:
1198                 theReference The referenced point.
1199                 theX Displacement from the referenced point along OX axis.
1200                 theY Displacement from the referenced point along OY axis.
1201                 theZ Displacement from the referenced point along OZ axis.
1202                 theName Object name; when specified, this parameter is used
1203                         for result publication in the study. Otherwise, if automatic
1204                         publication is switched on, default value is used for result name.
1205
1206             Returns:
1207                 New GEOM.GEOM_Object, containing the created point.
1208             """
1209             # Example: see GEOM_TestAll.py
1210             theX,theY,theZ,Parameters = ParseParameters(theX, theY, theZ)
1211             anObj = self.BasicOp.MakePointWithReference(theReference, theX, theY, theZ)
1212             RaiseIfFailed("MakePointWithReference", self.BasicOp)
1213             anObj.SetParameters(Parameters)
1214             self._autoPublish(anObj, theName, "vertex")
1215             return anObj
1216
1217         ## Create a point, corresponding to the given parameter on the given curve.
1218         #  @param theRefCurve The referenced curve.
1219         #  @param theParameter Value of parameter on the referenced curve.
1220         #  @param takeOrientationIntoAccount flag that tells if it is necessary
1221         #         to take the curve's orientation into account for the
1222         #         operation. I.e. if this flag is set, the results for the same
1223         #         parameters (except the value 0.5) is different for forward
1224         #         and reversed curves. If it is not set the result is the same.
1225         #  @param theName Object name; when specified, this parameter is used
1226         #         for result publication in the study. Otherwise, if automatic
1227         #         publication is switched on, default value is used for result name.
1228         #
1229         #  @return New GEOM.GEOM_Object, containing the created point.
1230         #
1231         #  @ref tui_creation_point "Example"
1232         @ManageTransactions("BasicOp")
1233         def MakeVertexOnCurve(self, theRefCurve, theParameter,
1234                               takeOrientationIntoAccount=False, theName=None):
1235             """
1236             Create a point, corresponding to the given parameter on the given curve.
1237
1238             Parameters:
1239                 theRefCurve The referenced curve.
1240                 theParameter Value of parameter on the referenced curve.
1241                 takeOrientationIntoAccount flag that tells if it is necessary
1242                         to take the curve's orientation into account for the
1243                         operation. I.e. if this flag is set, the results for
1244                         the same parameters (except the value 0.5) is different
1245                         for forward and reversed curves. If it is not set
1246                         the result is the same.
1247                 theName Object name; when specified, this parameter is used
1248                         for result publication in the study. Otherwise, if automatic
1249                         publication is switched on, default value is used for result name.
1250
1251             Returns:
1252                 New GEOM.GEOM_Object, containing the created point.
1253
1254             Example of usage:
1255                 p_on_arc = geompy.MakeVertexOnCurve(Arc, 0.25)
1256             """
1257             # Example: see GEOM_TestAll.py
1258             theParameter, takeOrientationIntoAccount, Parameters = ParseParameters(
1259                 theParameter, takeOrientationIntoAccount)
1260             anObj = self.BasicOp.MakePointOnCurve(theRefCurve, theParameter,
1261                                                   takeOrientationIntoAccount)
1262             RaiseIfFailed("MakePointOnCurve", self.BasicOp)
1263             anObj.SetParameters(Parameters)
1264             self._autoPublish(anObj, theName, "vertex")
1265             return anObj
1266
1267         ## Create a point by projection give coordinates on the given curve
1268         #  @param theRefCurve The referenced curve.
1269         #  @param theX X-coordinate in 3D space
1270         #  @param theY Y-coordinate in 3D space
1271         #  @param theZ Z-coordinate in 3D space
1272         #  @param theName Object name; when specified, this parameter is used
1273         #         for result publication in the study. Otherwise, if automatic
1274         #         publication is switched on, default value is used for result name.
1275         #
1276         #  @return New GEOM.GEOM_Object, containing the created point.
1277         #
1278         #  @ref tui_creation_point "Example"
1279         @ManageTransactions("BasicOp")
1280         def MakeVertexOnCurveByCoord(self, theRefCurve, theX, theY, theZ, theName=None):
1281             """
1282             Create a point by projection give coordinates on the given curve
1283
1284             Parameters:
1285                 theRefCurve The referenced curve.
1286                 theX X-coordinate in 3D space
1287                 theY Y-coordinate in 3D space
1288                 theZ Z-coordinate in 3D space
1289                 theName Object name; when specified, this parameter is used
1290                         for result publication in the study. Otherwise, if automatic
1291                         publication is switched on, default value is used for result name.
1292
1293             Returns:
1294                 New GEOM.GEOM_Object, containing the created point.
1295
1296             Example of usage:
1297                 p_on_arc3 = geompy.MakeVertexOnCurveByCoord(Arc, 100, -10, 10)
1298             """
1299             # Example: see GEOM_TestAll.py
1300             theX, theY, theZ, Parameters = ParseParameters(theX, theY, theZ)
1301             anObj = self.BasicOp.MakePointOnCurveByCoord(theRefCurve, theX, theY, theZ)
1302             RaiseIfFailed("MakeVertexOnCurveByCoord", self.BasicOp)
1303             anObj.SetParameters(Parameters)
1304             self._autoPublish(anObj, theName, "vertex")
1305             return anObj
1306
1307         ## Create a point, corresponding to the given length on the given curve.
1308         #  @param theRefCurve The referenced curve.
1309         #  @param theLength Length on the referenced curve. It can be negative.
1310         #  @param theStartPoint Point allowing to choose the direction for the calculation
1311         #                       of the length. If None, start from the first point of theRefCurve.
1312         #  @param theName Object name; when specified, this parameter is used
1313         #         for result publication in the study. Otherwise, if automatic
1314         #         publication is switched on, default value is used for result name.
1315         #
1316         #  @return New GEOM.GEOM_Object, containing the created point.
1317         #
1318         #  @ref tui_creation_point "Example"
1319         @ManageTransactions("BasicOp")
1320         def MakeVertexOnCurveByLength(self, theRefCurve, theLength, theStartPoint = None, theName=None):
1321             """
1322             Create a point, corresponding to the given length on the given curve.
1323
1324             Parameters:
1325                 theRefCurve The referenced curve.
1326                 theLength Length on the referenced curve. It can be negative.
1327                 theStartPoint Point allowing to choose the direction for the calculation
1328                               of the length. If None, start from the first point of theRefCurve.
1329                 theName Object name; when specified, this parameter is used
1330                         for result publication in the study. Otherwise, if automatic
1331                         publication is switched on, default value is used for result name.
1332
1333             Returns:
1334                 New GEOM.GEOM_Object, containing the created point.
1335             """
1336             # Example: see GEOM_TestAll.py
1337             theLength, Parameters = ParseParameters(theLength)
1338             anObj = self.BasicOp.MakePointOnCurveByLength(theRefCurve, theLength, theStartPoint)
1339             RaiseIfFailed("MakePointOnCurveByLength", self.BasicOp)
1340             anObj.SetParameters(Parameters)
1341             self._autoPublish(anObj, theName, "vertex")
1342             return anObj
1343
1344         ## Create a point, corresponding to the given parameters on the
1345         #    given surface.
1346         #  @param theRefSurf The referenced surface.
1347         #  @param theUParameter Value of U-parameter on the referenced surface.
1348         #  @param theVParameter Value of V-parameter on the referenced surface.
1349         #  @param theName Object name; when specified, this parameter is used
1350         #         for result publication in the study. Otherwise, if automatic
1351         #         publication is switched on, default value is used for result name.
1352         #
1353         #  @return New GEOM.GEOM_Object, containing the created point.
1354         #
1355         #  @ref swig_MakeVertexOnSurface "Example"
1356         @ManageTransactions("BasicOp")
1357         def MakeVertexOnSurface(self, theRefSurf, theUParameter, theVParameter, theName=None):
1358             """
1359             Create a point, corresponding to the given parameters on the
1360             given surface.
1361
1362             Parameters:
1363                 theRefSurf The referenced surface.
1364                 theUParameter Value of U-parameter on the referenced surface.
1365                 theVParameter Value of V-parameter on the referenced surface.
1366                 theName Object name; when specified, this parameter is used
1367                         for result publication in the study. Otherwise, if automatic
1368                         publication is switched on, default value is used for result name.
1369
1370             Returns:
1371                 New GEOM.GEOM_Object, containing the created point.
1372
1373             Example of usage:
1374                 p_on_face = geompy.MakeVertexOnSurface(Face, 0.1, 0.8)
1375             """
1376             theUParameter, theVParameter, Parameters = ParseParameters(theUParameter, theVParameter)
1377             # Example: see GEOM_TestAll.py
1378             anObj = self.BasicOp.MakePointOnSurface(theRefSurf, theUParameter, theVParameter)
1379             RaiseIfFailed("MakePointOnSurface", self.BasicOp)
1380             anObj.SetParameters(Parameters);
1381             self._autoPublish(anObj, theName, "vertex")
1382             return anObj
1383
1384         ## Create a point by projection give coordinates on the given surface
1385         #  @param theRefSurf The referenced surface.
1386         #  @param theX X-coordinate in 3D space
1387         #  @param theY Y-coordinate in 3D space
1388         #  @param theZ Z-coordinate in 3D space
1389         #  @param theName Object name; when specified, this parameter is used
1390         #         for result publication in the study. Otherwise, if automatic
1391         #         publication is switched on, default value is used for result name.
1392         #
1393         #  @return New GEOM.GEOM_Object, containing the created point.
1394         #
1395         #  @ref swig_MakeVertexOnSurfaceByCoord "Example"
1396         @ManageTransactions("BasicOp")
1397         def MakeVertexOnSurfaceByCoord(self, theRefSurf, theX, theY, theZ, theName=None):
1398             """
1399             Create a point by projection give coordinates on the given surface
1400
1401             Parameters:
1402                 theRefSurf The referenced surface.
1403                 theX X-coordinate in 3D space
1404                 theY Y-coordinate in 3D space
1405                 theZ Z-coordinate in 3D space
1406                 theName Object name; when specified, this parameter is used
1407                         for result publication in the study. Otherwise, if automatic
1408                         publication is switched on, default value is used for result name.
1409
1410             Returns:
1411                 New GEOM.GEOM_Object, containing the created point.
1412
1413             Example of usage:
1414                 p_on_face2 = geompy.MakeVertexOnSurfaceByCoord(Face, 0., 0., 0.)
1415             """
1416             theX, theY, theZ, Parameters = ParseParameters(theX, theY, theZ)
1417             # Example: see GEOM_TestAll.py
1418             anObj = self.BasicOp.MakePointOnSurfaceByCoord(theRefSurf, theX, theY, theZ)
1419             RaiseIfFailed("MakeVertexOnSurfaceByCoord", self.BasicOp)
1420             anObj.SetParameters(Parameters);
1421             self._autoPublish(anObj, theName, "vertex")
1422             return anObj
1423
1424         ## Create a point, which lays on the given face.
1425         #  The point will lay in arbitrary place of the face.
1426         #  The only condition on it is a non-zero distance to the face boundary.
1427         #  Such point can be used to uniquely identify the face inside any
1428         #  shape in case, when the shape does not contain overlapped faces.
1429         #  @param theFace The referenced face.
1430         #  @param theName Object name; when specified, this parameter is used
1431         #         for result publication in the study. Otherwise, if automatic
1432         #         publication is switched on, default value is used for result name.
1433         #
1434         #  @return New GEOM.GEOM_Object, containing the created point.
1435         #
1436         #  @ref swig_MakeVertexInsideFace "Example"
1437         @ManageTransactions("BasicOp")
1438         def MakeVertexInsideFace (self, theFace, theName=None):
1439             """
1440             Create a point, which lays on the given face.
1441             The point will lay in arbitrary place of the face.
1442             The only condition on it is a non-zero distance to the face boundary.
1443             Such point can be used to uniquely identify the face inside any
1444             shape in case, when the shape does not contain overlapped faces.
1445
1446             Parameters:
1447                 theFace The referenced face.
1448                 theName Object name; when specified, this parameter is used
1449                         for result publication in the study. Otherwise, if automatic
1450                         publication is switched on, default value is used for result name.
1451
1452             Returns:
1453                 New GEOM.GEOM_Object, containing the created point.
1454
1455             Example of usage:
1456                 p_on_face = geompy.MakeVertexInsideFace(Face)
1457             """
1458             # Example: see GEOM_TestAll.py
1459             anObj = self.BasicOp.MakePointOnFace(theFace)
1460             RaiseIfFailed("MakeVertexInsideFace", self.BasicOp)
1461             self._autoPublish(anObj, theName, "vertex")
1462             return anObj
1463
1464         ## Create a point on intersection of two lines.
1465         #  @param theRefLine1, theRefLine2 The referenced lines.
1466         #  @param theName Object name; when specified, this parameter is used
1467         #         for result publication in the study. Otherwise, if automatic
1468         #         publication is switched on, default value is used for result name.
1469         #
1470         #  @return New GEOM.GEOM_Object, containing the created point.
1471         #
1472         #  @ref swig_MakeVertexOnLinesIntersection "Example"
1473         @ManageTransactions("BasicOp")
1474         def MakeVertexOnLinesIntersection(self, theRefLine1, theRefLine2, theName=None):
1475             """
1476             Create a point on intersection of two lines.
1477
1478             Parameters:
1479                 theRefLine1, theRefLine2 The referenced lines.
1480                 theName Object name; when specified, this parameter is used
1481                         for result publication in the study. Otherwise, if automatic
1482                         publication is switched on, default value is used for result name.
1483
1484             Returns:
1485                 New GEOM.GEOM_Object, containing the created point.
1486             """
1487             # Example: see GEOM_TestAll.py
1488             anObj = self.BasicOp.MakePointOnLinesIntersection(theRefLine1, theRefLine2)
1489             RaiseIfFailed("MakePointOnLinesIntersection", self.BasicOp)
1490             self._autoPublish(anObj, theName, "vertex")
1491             return anObj
1492
1493         ## Create a tangent, corresponding to the given parameter on the given curve.
1494         #  @param theRefCurve The referenced curve.
1495         #  @param theParameter Value of parameter on the referenced curve.
1496         #  @param theName Object name; when specified, this parameter is used
1497         #         for result publication in the study. Otherwise, if automatic
1498         #         publication is switched on, default value is used for result name.
1499         #
1500         #  @return New GEOM.GEOM_Object, containing the created tangent.
1501         #
1502         #  @ref swig_MakeTangentOnCurve "Example"
1503         @ManageTransactions("BasicOp")
1504         def MakeTangentOnCurve(self, theRefCurve, theParameter, theName=None):
1505             """
1506             Create a tangent, corresponding to the given parameter on the given curve.
1507
1508             Parameters:
1509                 theRefCurve The referenced curve.
1510                 theParameter Value of parameter on the referenced curve.
1511                 theName Object name; when specified, this parameter is used
1512                         for result publication in the study. Otherwise, if automatic
1513                         publication is switched on, default value is used for result name.
1514
1515             Returns:
1516                 New GEOM.GEOM_Object, containing the created tangent.
1517
1518             Example of usage:
1519                 tan_on_arc = geompy.MakeTangentOnCurve(Arc, 0.7)
1520             """
1521             anObj = self.BasicOp.MakeTangentOnCurve(theRefCurve, theParameter)
1522             RaiseIfFailed("MakeTangentOnCurve", self.BasicOp)
1523             self._autoPublish(anObj, theName, "tangent")
1524             return anObj
1525
1526         ## Create a tangent plane, corresponding to the given parameter on the given face.
1527         #  @param theFace The face for which tangent plane should be built.
1528         #  @param theParameterV vertical value of the center point (0.0 - 1.0).
1529         #  @param theParameterU horisontal value of the center point (0.0 - 1.0).
1530         #  @param theTrimSize the size of plane.
1531         #  @param theName Object name; when specified, this parameter is used
1532         #         for result publication in the study. Otherwise, if automatic
1533         #         publication is switched on, default value is used for result name.
1534         #
1535         #  @return New GEOM.GEOM_Object, containing the created tangent.
1536         #
1537         #  @ref swig_MakeTangentPlaneOnFace "Example"
1538         @ManageTransactions("BasicOp")
1539         def MakeTangentPlaneOnFace(self, theFace, theParameterU, theParameterV, theTrimSize, theName=None):
1540             """
1541             Create a tangent plane, corresponding to the given parameter on the given face.
1542
1543             Parameters:
1544                 theFace The face for which tangent plane should be built.
1545                 theParameterV vertical value of the center point (0.0 - 1.0).
1546                 theParameterU horisontal value of the center point (0.0 - 1.0).
1547                 theTrimSize the size of plane.
1548                 theName Object name; when specified, this parameter is used
1549                         for result publication in the study. Otherwise, if automatic
1550                         publication is switched on, default value is used for result name.
1551
1552            Returns:
1553                 New GEOM.GEOM_Object, containing the created tangent.
1554
1555            Example of usage:
1556                 an_on_face = geompy.MakeTangentPlaneOnFace(tan_extrusion, 0.7, 0.5, 150)
1557             """
1558             anObj = self.BasicOp.MakeTangentPlaneOnFace(theFace, theParameterU, theParameterV, theTrimSize)
1559             RaiseIfFailed("MakeTangentPlaneOnFace", self.BasicOp)
1560             self._autoPublish(anObj, theName, "tangent")
1561             return anObj
1562
1563         ## Create a vector with the given components.
1564         #  @param theDX X component of the vector.
1565         #  @param theDY Y component of the vector.
1566         #  @param theDZ Z component of the vector.
1567         #  @param theName Object name; when specified, this parameter is used
1568         #         for result publication in the study. Otherwise, if automatic
1569         #         publication is switched on, default value is used for result name.
1570         #
1571         #  @return New GEOM.GEOM_Object, containing the created vector.
1572         #
1573         #  @ref tui_creation_vector "Example"
1574         @ManageTransactions("BasicOp")
1575         def MakeVectorDXDYDZ(self, theDX, theDY, theDZ, theName=None):
1576             """
1577             Create a vector with the given components.
1578
1579             Parameters:
1580                 theDX X component of the vector.
1581                 theDY Y component of the vector.
1582                 theDZ Z component of the vector.
1583                 theName Object name; when specified, this parameter is used
1584                         for result publication in the study. Otherwise, if automatic
1585                         publication is switched on, default value is used for result name.
1586
1587             Returns:
1588                 New GEOM.GEOM_Object, containing the created vector.
1589             """
1590             # Example: see GEOM_TestAll.py
1591             theDX,theDY,theDZ,Parameters = ParseParameters(theDX, theDY, theDZ)
1592             anObj = self.BasicOp.MakeVectorDXDYDZ(theDX, theDY, theDZ)
1593             RaiseIfFailed("MakeVectorDXDYDZ", self.BasicOp)
1594             anObj.SetParameters(Parameters)
1595             self._autoPublish(anObj, theName, "vector")
1596             return anObj
1597
1598         ## Create a vector between two points.
1599         #  @param thePnt1 Start point for the vector.
1600         #  @param thePnt2 End point for the vector.
1601         #  @param theName Object name; when specified, this parameter is used
1602         #         for result publication in the study. Otherwise, if automatic
1603         #         publication is switched on, default value is used for result name.
1604         #
1605         #  @return New GEOM.GEOM_Object, containing the created vector.
1606         #
1607         #  @ref tui_creation_vector "Example"
1608         @ManageTransactions("BasicOp")
1609         def MakeVector(self, thePnt1, thePnt2, theName=None):
1610             """
1611             Create a vector between two points.
1612
1613             Parameters:
1614                 thePnt1 Start point for the vector.
1615                 thePnt2 End point for the vector.
1616                 theName Object name; when specified, this parameter is used
1617                         for result publication in the study. Otherwise, if automatic
1618                         publication is switched on, default value is used for result name.
1619
1620             Returns:
1621                 New GEOM.GEOM_Object, containing the created vector.
1622             """
1623             # Example: see GEOM_TestAll.py
1624             anObj = self.BasicOp.MakeVectorTwoPnt(thePnt1, thePnt2)
1625             RaiseIfFailed("MakeVectorTwoPnt", self.BasicOp)
1626             self._autoPublish(anObj, theName, "vector")
1627             return anObj
1628
1629         ## Create a line, passing through the given point
1630         #  and parallel to the given direction
1631         #  @param thePnt Point. The resulting line will pass through it.
1632         #  @param theDir Direction. The resulting line will be parallel to it.
1633         #  @param theName Object name; when specified, this parameter is used
1634         #         for result publication in the study. Otherwise, if automatic
1635         #         publication is switched on, default value is used for result name.
1636         #
1637         #  @return New GEOM.GEOM_Object, containing the created line.
1638         #
1639         #  @ref tui_creation_line "Example"
1640         @ManageTransactions("BasicOp")
1641         def MakeLine(self, thePnt, theDir, theName=None):
1642             """
1643             Create a line, passing through the given point
1644             and parallel to the given direction
1645
1646             Parameters:
1647                 thePnt Point. The resulting line will pass through it.
1648                 theDir Direction. The resulting line will be parallel to it.
1649                 theName Object name; when specified, this parameter is used
1650                         for result publication in the study. Otherwise, if automatic
1651                         publication is switched on, default value is used for result name.
1652
1653             Returns:
1654                 New GEOM.GEOM_Object, containing the created line.
1655             """
1656             # Example: see GEOM_TestAll.py
1657             anObj = self.BasicOp.MakeLine(thePnt, theDir)
1658             RaiseIfFailed("MakeLine", self.BasicOp)
1659             self._autoPublish(anObj, theName, "line")
1660             return anObj
1661
1662         ## Create a line, passing through the given points
1663         #  @param thePnt1 First of two points, defining the line.
1664         #  @param thePnt2 Second of two points, defining the line.
1665         #  @param theName Object name; when specified, this parameter is used
1666         #         for result publication in the study. Otherwise, if automatic
1667         #         publication is switched on, default value is used for result name.
1668         #
1669         #  @return New GEOM.GEOM_Object, containing the created line.
1670         #
1671         #  @ref tui_creation_line "Example"
1672         @ManageTransactions("BasicOp")
1673         def MakeLineTwoPnt(self, thePnt1, thePnt2, theName=None):
1674             """
1675             Create a line, passing through the given points
1676
1677             Parameters:
1678                 thePnt1 First of two points, defining the line.
1679                 thePnt2 Second of two points, defining the line.
1680                 theName Object name; when specified, this parameter is used
1681                         for result publication in the study. Otherwise, if automatic
1682                         publication is switched on, default value is used for result name.
1683
1684             Returns:
1685                 New GEOM.GEOM_Object, containing the created line.
1686             """
1687             # Example: see GEOM_TestAll.py
1688             anObj = self.BasicOp.MakeLineTwoPnt(thePnt1, thePnt2)
1689             RaiseIfFailed("MakeLineTwoPnt", self.BasicOp)
1690             self._autoPublish(anObj, theName, "line")
1691             return anObj
1692
1693         ## Create a line on two faces intersection.
1694         #  @param theFace1 First of two faces, defining the line.
1695         #  @param theFace2 Second of two faces, defining the line.
1696         #  @param theName Object name; when specified, this parameter is used
1697         #         for result publication in the study. Otherwise, if automatic
1698         #         publication is switched on, default value is used for result name.
1699         #
1700         #  @return New GEOM.GEOM_Object, containing the created line.
1701         #
1702         #  @ref swig_MakeLineTwoFaces "Example"
1703         @ManageTransactions("BasicOp")
1704         def MakeLineTwoFaces(self, theFace1, theFace2, theName=None):
1705             """
1706             Create a line on two faces intersection.
1707
1708             Parameters:
1709                 theFace1 First of two faces, defining the line.
1710                 theFace2 Second of two faces, defining the line.
1711                 theName Object name; when specified, this parameter is used
1712                         for result publication in the study. Otherwise, if automatic
1713                         publication is switched on, default value is used for result name.
1714
1715             Returns:
1716                 New GEOM.GEOM_Object, containing the created line.
1717             """
1718             # Example: see GEOM_TestAll.py
1719             anObj = self.BasicOp.MakeLineTwoFaces(theFace1, theFace2)
1720             RaiseIfFailed("MakeLineTwoFaces", self.BasicOp)
1721             self._autoPublish(anObj, theName, "line")
1722             return anObj
1723
1724         ## Create a plane, passing through the given point
1725         #  and normal to the given vector.
1726         #  @param thePnt Point, the plane has to pass through.
1727         #  @param theVec Vector, defining the plane normal direction.
1728         #  @param theTrimSize Half size of a side of quadrangle face, representing the plane.
1729         #  @param theName Object name; when specified, this parameter is used
1730         #         for result publication in the study. Otherwise, if automatic
1731         #         publication is switched on, default value is used for result name.
1732         #
1733         #  @return New GEOM.GEOM_Object, containing the created plane.
1734         #
1735         #  @ref tui_creation_plane "Example"
1736         @ManageTransactions("BasicOp")
1737         def MakePlane(self, thePnt, theVec, theTrimSize, theName=None):
1738             """
1739             Create a plane, passing through the given point
1740             and normal to the given vector.
1741
1742             Parameters:
1743                 thePnt Point, the plane has to pass through.
1744                 theVec Vector, defining the plane normal direction.
1745                 theTrimSize Half size of a side of quadrangle face, representing the plane.
1746                 theName Object name; when specified, this parameter is used
1747                         for result publication in the study. Otherwise, if automatic
1748                         publication is switched on, default value is used for result name.
1749
1750             Returns:
1751                 New GEOM.GEOM_Object, containing the created plane.
1752             """
1753             # Example: see GEOM_TestAll.py
1754             theTrimSize, Parameters = ParseParameters(theTrimSize);
1755             anObj = self.BasicOp.MakePlanePntVec(thePnt, theVec, theTrimSize)
1756             RaiseIfFailed("MakePlanePntVec", self.BasicOp)
1757             anObj.SetParameters(Parameters)
1758             self._autoPublish(anObj, theName, "plane")
1759             return anObj
1760
1761         ## Create a plane, passing through the three given points
1762         #  @param thePnt1 First of three points, defining the plane.
1763         #  @param thePnt2 Second of three points, defining the plane.
1764         #  @param thePnt3 Third of three points, defining the plane.
1765         #  @param theTrimSize Half size of a side of quadrangle face, representing the plane.
1766         #  @param theName Object name; when specified, this parameter is used
1767         #         for result publication in the study. Otherwise, if automatic
1768         #         publication is switched on, default value is used for result name.
1769         #
1770         #  @return New GEOM.GEOM_Object, containing the created plane.
1771         #
1772         #  @ref tui_creation_plane "Example"
1773         @ManageTransactions("BasicOp")
1774         def MakePlaneThreePnt(self, thePnt1, thePnt2, thePnt3, theTrimSize, theName=None):
1775             """
1776             Create a plane, passing through the three given points
1777
1778             Parameters:
1779                 thePnt1 First of three points, defining the plane.
1780                 thePnt2 Second of three points, defining the plane.
1781                 thePnt3 Third of three points, defining the plane.
1782                 theTrimSize Half size of a side of quadrangle face, representing the plane.
1783                 theName Object name; when specified, this parameter is used
1784                         for result publication in the study. Otherwise, if automatic
1785                         publication is switched on, default value is used for result name.
1786
1787             Returns:
1788                 New GEOM.GEOM_Object, containing the created plane.
1789             """
1790             # Example: see GEOM_TestAll.py
1791             theTrimSize, Parameters = ParseParameters(theTrimSize);
1792             anObj = self.BasicOp.MakePlaneThreePnt(thePnt1, thePnt2, thePnt3, theTrimSize)
1793             RaiseIfFailed("MakePlaneThreePnt", self.BasicOp)
1794             anObj.SetParameters(Parameters)
1795             self._autoPublish(anObj, theName, "plane")
1796             return anObj
1797
1798         ## Create a plane, similar to the existing one, but with another size of representing face.
1799         #  @param theFace Referenced plane or LCS(Marker).
1800         #  @param theTrimSize New half size of a side of quadrangle face, representing the plane.
1801         #  @param theName Object name; when specified, this parameter is used
1802         #         for result publication in the study. Otherwise, if automatic
1803         #         publication is switched on, default value is used for result name.
1804         #
1805         #  @return New GEOM.GEOM_Object, containing the created plane.
1806         #
1807         #  @ref tui_creation_plane "Example"
1808         @ManageTransactions("BasicOp")
1809         def MakePlaneFace(self, theFace, theTrimSize, theName=None):
1810             """
1811             Create a plane, similar to the existing one, but with another size of representing face.
1812
1813             Parameters:
1814                 theFace Referenced plane or LCS(Marker).
1815                 theTrimSize New half size of a side of quadrangle face, representing the plane.
1816                 theName Object name; when specified, this parameter is used
1817                         for result publication in the study. Otherwise, if automatic
1818                         publication is switched on, default value is used for result name.
1819
1820             Returns:
1821                 New GEOM.GEOM_Object, containing the created plane.
1822             """
1823             # Example: see GEOM_TestAll.py
1824             theTrimSize, Parameters = ParseParameters(theTrimSize);
1825             anObj = self.BasicOp.MakePlaneFace(theFace, theTrimSize)
1826             RaiseIfFailed("MakePlaneFace", self.BasicOp)
1827             anObj.SetParameters(Parameters)
1828             self._autoPublish(anObj, theName, "plane")
1829             return anObj
1830
1831         ## Create a plane, passing through the 2 vectors
1832         #  with center in a start point of the first vector.
1833         #  @param theVec1 Vector, defining center point and plane direction.
1834         #  @param theVec2 Vector, defining the plane normal direction.
1835         #  @param theTrimSize Half size of a side of quadrangle face, representing the plane.
1836         #  @param theName Object name; when specified, this parameter is used
1837         #         for result publication in the study. Otherwise, if automatic
1838         #         publication is switched on, default value is used for result name.
1839         #
1840         #  @return New GEOM.GEOM_Object, containing the created plane.
1841         #
1842         #  @ref tui_creation_plane "Example"
1843         @ManageTransactions("BasicOp")
1844         def MakePlane2Vec(self, theVec1, theVec2, theTrimSize, theName=None):
1845             """
1846             Create a plane, passing through the 2 vectors
1847             with center in a start point of the first vector.
1848
1849             Parameters:
1850                 theVec1 Vector, defining center point and plane direction.
1851                 theVec2 Vector, defining the plane normal direction.
1852                 theTrimSize Half size of a side of quadrangle face, representing the plane.
1853                 theName Object name; when specified, this parameter is used
1854                         for result publication in the study. Otherwise, if automatic
1855                         publication is switched on, default value is used for result name.
1856
1857             Returns:
1858                 New GEOM.GEOM_Object, containing the created plane.
1859             """
1860             # Example: see GEOM_TestAll.py
1861             theTrimSize, Parameters = ParseParameters(theTrimSize);
1862             anObj = self.BasicOp.MakePlane2Vec(theVec1, theVec2, theTrimSize)
1863             RaiseIfFailed("MakePlane2Vec", self.BasicOp)
1864             anObj.SetParameters(Parameters)
1865             self._autoPublish(anObj, theName, "plane")
1866             return anObj
1867
1868         ## Create a plane, based on a Local coordinate system.
1869         #  @param theLCS  coordinate system, defining plane.
1870         #  @param theTrimSize Half size of a side of quadrangle face, representing the plane.
1871         #  @param theOrientation OXY, OYZ or OZX orientation - (1, 2 or 3)
1872         #  @param theName Object name; when specified, this parameter is used
1873         #         for result publication in the study. Otherwise, if automatic
1874         #         publication is switched on, default value is used for result name.
1875         #
1876         #  @return New GEOM.GEOM_Object, containing the created plane.
1877         #
1878         #  @ref tui_creation_plane "Example"
1879         @ManageTransactions("BasicOp")
1880         def MakePlaneLCS(self, theLCS, theTrimSize, theOrientation, theName=None):
1881             """
1882             Create a plane, based on a Local coordinate system.
1883
1884            Parameters:
1885                 theLCS  coordinate system, defining plane.
1886                 theTrimSize Half size of a side of quadrangle face, representing the plane.
1887                 theOrientation OXY, OYZ or OZX orientation - (1, 2 or 3)
1888                 theName Object name; when specified, this parameter is used
1889                         for result publication in the study. Otherwise, if automatic
1890                         publication is switched on, default value is used for result name.
1891
1892             Returns:
1893                 New GEOM.GEOM_Object, containing the created plane.
1894             """
1895             # Example: see GEOM_TestAll.py
1896             theTrimSize, Parameters = ParseParameters(theTrimSize);
1897             anObj = self.BasicOp.MakePlaneLCS(theLCS, theTrimSize, theOrientation)
1898             RaiseIfFailed("MakePlaneLCS", self.BasicOp)
1899             anObj.SetParameters(Parameters)
1900             self._autoPublish(anObj, theName, "plane")
1901             return anObj
1902
1903         ## Create a local coordinate system.
1904         #  @param OX,OY,OZ Three coordinates of coordinate system origin.
1905         #  @param XDX,XDY,XDZ Three components of OX direction
1906         #  @param YDX,YDY,YDZ Three components of OY direction
1907         #  @param theName Object name; when specified, this parameter is used
1908         #         for result publication in the study. Otherwise, if automatic
1909         #         publication is switched on, default value is used for result name.
1910         #
1911         #  @return New GEOM.GEOM_Object, containing the created coordinate system.
1912         #
1913         #  @ref swig_MakeMarker "Example"
1914         @ManageTransactions("BasicOp")
1915         def MakeMarker(self, OX,OY,OZ, XDX,XDY,XDZ, YDX,YDY,YDZ, theName=None):
1916             """
1917             Create a local coordinate system.
1918
1919             Parameters:
1920                 OX,OY,OZ Three coordinates of coordinate system origin.
1921                 XDX,XDY,XDZ Three components of OX direction
1922                 YDX,YDY,YDZ Three components of OY direction
1923                 theName Object name; when specified, this parameter is used
1924                         for result publication in the study. Otherwise, if automatic
1925                         publication is switched on, default value is used for result name.
1926
1927             Returns:
1928                 New GEOM.GEOM_Object, containing the created coordinate system.
1929             """
1930             # Example: see GEOM_TestAll.py
1931             OX,OY,OZ, XDX,XDY,XDZ, YDX,YDY,YDZ, Parameters = ParseParameters(OX,OY,OZ, XDX,XDY,XDZ, YDX,YDY,YDZ);
1932             anObj = self.BasicOp.MakeMarker(OX,OY,OZ, XDX,XDY,XDZ, YDX,YDY,YDZ)
1933             RaiseIfFailed("MakeMarker", self.BasicOp)
1934             anObj.SetParameters(Parameters)
1935             self._autoPublish(anObj, theName, "lcs")
1936             return anObj
1937
1938         ## Create a local coordinate system from shape.
1939         #  @param theShape The initial shape to detect the coordinate system.
1940         #  @param theName Object name; when specified, this parameter is used
1941         #         for result publication in the study. Otherwise, if automatic
1942         #         publication is switched on, default value is used for result name.
1943         #
1944         #  @return New GEOM.GEOM_Object, containing the created coordinate system.
1945         #
1946         #  @ref tui_creation_lcs "Example"
1947         @ManageTransactions("BasicOp")
1948         def MakeMarkerFromShape(self, theShape, theName=None):
1949             """
1950             Create a local coordinate system from shape.
1951
1952             Parameters:
1953                 theShape The initial shape to detect the coordinate system.
1954                 theName Object name; when specified, this parameter is used
1955                         for result publication in the study. Otherwise, if automatic
1956                         publication is switched on, default value is used for result name.
1957
1958             Returns:
1959                 New GEOM.GEOM_Object, containing the created coordinate system.
1960             """
1961             anObj = self.BasicOp.MakeMarkerFromShape(theShape)
1962             RaiseIfFailed("MakeMarkerFromShape", self.BasicOp)
1963             self._autoPublish(anObj, theName, "lcs")
1964             return anObj
1965
1966         ## Create a local coordinate system from point and two vectors.
1967         #  @param theOrigin Point of coordinate system origin.
1968         #  @param theXVec Vector of X direction
1969         #  @param theYVec Vector of Y direction
1970         #  @param theName Object name; when specified, this parameter is used
1971         #         for result publication in the study. Otherwise, if automatic
1972         #         publication is switched on, default value is used for result name.
1973         #
1974         #  @return New GEOM.GEOM_Object, containing the created coordinate system.
1975         #
1976         #  @ref tui_creation_lcs "Example"
1977         @ManageTransactions("BasicOp")
1978         def MakeMarkerPntTwoVec(self, theOrigin, theXVec, theYVec, theName=None):
1979             """
1980             Create a local coordinate system from point and two vectors.
1981
1982             Parameters:
1983                 theOrigin Point of coordinate system origin.
1984                 theXVec Vector of X direction
1985                 theYVec Vector of Y direction
1986                 theName Object name; when specified, this parameter is used
1987                         for result publication in the study. Otherwise, if automatic
1988                         publication is switched on, default value is used for result name.
1989
1990             Returns:
1991                 New GEOM.GEOM_Object, containing the created coordinate system.
1992
1993             """
1994             anObj = self.BasicOp.MakeMarkerPntTwoVec(theOrigin, theXVec, theYVec)
1995             RaiseIfFailed("MakeMarkerPntTwoVec", self.BasicOp)
1996             self._autoPublish(anObj, theName, "lcs")
1997             return anObj
1998
1999         # end of l3_basic_go
2000         ## @}
2001
2002         ## @addtogroup l4_curves
2003         ## @{
2004
2005         ##  Create an arc of circle, passing through three given points.
2006         #  @param thePnt1 Start point of the arc.
2007         #  @param thePnt2 Middle point of the arc.
2008         #  @param thePnt3 End point of the arc.
2009         #  @param theName Object name; when specified, this parameter is used
2010         #         for result publication in the study. Otherwise, if automatic
2011         #         publication is switched on, default value is used for result name.
2012         #
2013         #  @return New GEOM.GEOM_Object, containing the created arc.
2014         #
2015         #  @ref swig_MakeArc "Example"
2016         @ManageTransactions("CurvesOp")
2017         def MakeArc(self, thePnt1, thePnt2, thePnt3, theName=None):
2018             """
2019             Create an arc of circle, passing through three given points.
2020
2021             Parameters:
2022                 thePnt1 Start point of the arc.
2023                 thePnt2 Middle point of the arc.
2024                 thePnt3 End point of the arc.
2025                 theName Object name; when specified, this parameter is used
2026                         for result publication in the study. Otherwise, if automatic
2027                         publication is switched on, default value is used for result name.
2028
2029             Returns:
2030                 New GEOM.GEOM_Object, containing the created arc.
2031             """
2032             # Example: see GEOM_TestAll.py
2033             anObj = self.CurvesOp.MakeArc(thePnt1, thePnt2, thePnt3)
2034             RaiseIfFailed("MakeArc", self.CurvesOp)
2035             self._autoPublish(anObj, theName, "arc")
2036             return anObj
2037
2038         ##  Create an arc of circle from a center and 2 points.
2039         #  @param thePnt1 Center of the arc
2040         #  @param thePnt2 Start point of the arc. (Gives also the radius of the arc)
2041         #  @param thePnt3 End point of the arc (Gives also a direction)
2042         #  @param theSense Orientation of the arc
2043         #  @param theName Object name; when specified, this parameter is used
2044         #         for result publication in the study. Otherwise, if automatic
2045         #         publication is switched on, default value is used for result name.
2046         #
2047         #  @return New GEOM.GEOM_Object, containing the created arc.
2048         #
2049         #  @ref swig_MakeArc "Example"
2050         @ManageTransactions("CurvesOp")
2051         def MakeArcCenter(self, thePnt1, thePnt2, thePnt3, theSense=False, theName=None):
2052             """
2053             Create an arc of circle from a center and 2 points.
2054
2055             Parameters:
2056                 thePnt1 Center of the arc
2057                 thePnt2 Start point of the arc. (Gives also the radius of the arc)
2058                 thePnt3 End point of the arc (Gives also a direction)
2059                 theSense Orientation of the arc
2060                 theName Object name; when specified, this parameter is used
2061                         for result publication in the study. Otherwise, if automatic
2062                         publication is switched on, default value is used for result name.
2063
2064             Returns:
2065                 New GEOM.GEOM_Object, containing the created arc.
2066             """
2067             # Example: see GEOM_TestAll.py
2068             anObj = self.CurvesOp.MakeArcCenter(thePnt1, thePnt2, thePnt3, theSense)
2069             RaiseIfFailed("MakeArcCenter", self.CurvesOp)
2070             self._autoPublish(anObj, theName, "arc")
2071             return anObj
2072
2073         ##  Create an arc of ellipse, of center and two points.
2074         #  @param theCenter Center of the arc.
2075         #  @param thePnt1 defines major radius of the arc by distance from Pnt1 to Pnt2.
2076         #  @param thePnt2 defines plane of ellipse and minor radius as distance from Pnt3 to line from Pnt1 to Pnt2.
2077         #  @param theName Object name; when specified, this parameter is used
2078         #         for result publication in the study. Otherwise, if automatic
2079         #         publication is switched on, default value is used for result name.
2080         #
2081         #  @return New GEOM.GEOM_Object, containing the created arc.
2082         #
2083         #  @ref swig_MakeArc "Example"
2084         @ManageTransactions("CurvesOp")
2085         def MakeArcOfEllipse(self, theCenter, thePnt1, thePnt2, theName=None):
2086             """
2087             Create an arc of ellipse, of center and two points.
2088
2089             Parameters:
2090                 theCenter Center of the arc.
2091                 thePnt1 defines major radius of the arc by distance from Pnt1 to Pnt2.
2092                 thePnt2 defines plane of ellipse and minor radius as distance from Pnt3 to line from Pnt1 to Pnt2.
2093                 theName Object name; when specified, this parameter is used
2094                         for result publication in the study. Otherwise, if automatic
2095                         publication is switched on, default value is used for result name.
2096
2097             Returns:
2098                 New GEOM.GEOM_Object, containing the created arc.
2099             """
2100             # Example: see GEOM_TestAll.py
2101             anObj = self.CurvesOp.MakeArcOfEllipse(theCenter, thePnt1, thePnt2)
2102             RaiseIfFailed("MakeArcOfEllipse", self.CurvesOp)
2103             self._autoPublish(anObj, theName, "arc")
2104             return anObj
2105
2106         ## Create a circle with given center, normal vector and radius.
2107         #  @param thePnt Circle center.
2108         #  @param theVec Vector, normal to the plane of the circle.
2109         #  @param theR Circle radius.
2110         #  @param theName Object name; when specified, this parameter is used
2111         #         for result publication in the study. Otherwise, if automatic
2112         #         publication is switched on, default value is used for result name.
2113         #
2114         #  @return New GEOM.GEOM_Object, containing the created circle.
2115         #
2116         #  @ref tui_creation_circle "Example"
2117         @ManageTransactions("CurvesOp")
2118         def MakeCircle(self, thePnt, theVec, theR, theName=None):
2119             """
2120             Create a circle with given center, normal vector and radius.
2121
2122             Parameters:
2123                 thePnt Circle center.
2124                 theVec Vector, normal to the plane of the circle.
2125                 theR Circle radius.
2126                 theName Object name; when specified, this parameter is used
2127                         for result publication in the study. Otherwise, if automatic
2128                         publication is switched on, default value is used for result name.
2129
2130             Returns:
2131                 New GEOM.GEOM_Object, containing the created circle.
2132             """
2133             # Example: see GEOM_TestAll.py
2134             theR, Parameters = ParseParameters(theR)
2135             anObj = self.CurvesOp.MakeCirclePntVecR(thePnt, theVec, theR)
2136             RaiseIfFailed("MakeCirclePntVecR", self.CurvesOp)
2137             anObj.SetParameters(Parameters)
2138             self._autoPublish(anObj, theName, "circle")
2139             return anObj
2140
2141         ## Create a circle with given radius.
2142         #  Center of the circle will be in the origin of global
2143         #  coordinate system and normal vector will be codirected with Z axis
2144         #  @param theR Circle radius.
2145         #  @param theName Object name; when specified, this parameter is used
2146         #         for result publication in the study. Otherwise, if automatic
2147         #         publication is switched on, default value is used for result name.
2148         #
2149         #  @return New GEOM.GEOM_Object, containing the created circle.
2150         @ManageTransactions("CurvesOp")
2151         def MakeCircleR(self, theR, theName=None):
2152             """
2153             Create a circle with given radius.
2154             Center of the circle will be in the origin of global
2155             coordinate system and normal vector will be codirected with Z axis
2156
2157             Parameters:
2158                 theR Circle radius.
2159                 theName Object name; when specified, this parameter is used
2160                         for result publication in the study. Otherwise, if automatic
2161                         publication is switched on, default value is used for result name.
2162
2163             Returns:
2164                 New GEOM.GEOM_Object, containing the created circle.
2165             """
2166             anObj = self.CurvesOp.MakeCirclePntVecR(None, None, theR)
2167             RaiseIfFailed("MakeCirclePntVecR", self.CurvesOp)
2168             self._autoPublish(anObj, theName, "circle")
2169             return anObj
2170
2171         ## Create a circle, passing through three given points
2172         #  @param thePnt1,thePnt2,thePnt3 Points, defining the circle.
2173         #  @param theName Object name; when specified, this parameter is used
2174         #         for result publication in the study. Otherwise, if automatic
2175         #         publication is switched on, default value is used for result name.
2176         #
2177         #  @return New GEOM.GEOM_Object, containing the created circle.
2178         #
2179         #  @ref tui_creation_circle "Example"
2180         @ManageTransactions("CurvesOp")
2181         def MakeCircleThreePnt(self, thePnt1, thePnt2, thePnt3, theName=None):
2182             """
2183             Create a circle, passing through three given points
2184
2185             Parameters:
2186                 thePnt1,thePnt2,thePnt3 Points, defining the circle.
2187                 theName Object name; when specified, this parameter is used
2188                         for result publication in the study. Otherwise, if automatic
2189                         publication is switched on, default value is used for result name.
2190
2191             Returns:
2192                 New GEOM.GEOM_Object, containing the created circle.
2193             """
2194             # Example: see GEOM_TestAll.py
2195             anObj = self.CurvesOp.MakeCircleThreePnt(thePnt1, thePnt2, thePnt3)
2196             RaiseIfFailed("MakeCircleThreePnt", self.CurvesOp)
2197             self._autoPublish(anObj, theName, "circle")
2198             return anObj
2199
2200         ## Create a circle, with given point1 as center,
2201         #  passing through the point2 as radius and laying in the plane,
2202         #  defined by all three given points.
2203         #  @param thePnt1,thePnt2,thePnt3 Points, defining the circle.
2204         #  @param theName Object name; when specified, this parameter is used
2205         #         for result publication in the study. Otherwise, if automatic
2206         #         publication is switched on, default value is used for result name.
2207         #
2208         #  @return New GEOM.GEOM_Object, containing the created circle.
2209         #
2210         #  @ref swig_MakeCircle "Example"
2211         @ManageTransactions("CurvesOp")
2212         def MakeCircleCenter2Pnt(self, thePnt1, thePnt2, thePnt3, theName=None):
2213             """
2214             Create a circle, with given point1 as center,
2215             passing through the point2 as radius and laying in the plane,
2216             defined by all three given points.
2217
2218             Parameters:
2219                 thePnt1,thePnt2,thePnt3 Points, defining the circle.
2220                 theName Object name; when specified, this parameter is used
2221                         for result publication in the study. Otherwise, if automatic
2222                         publication is switched on, default value is used for result name.
2223
2224             Returns:
2225                 New GEOM.GEOM_Object, containing the created circle.
2226             """
2227             # Example: see GEOM_example6.py
2228             anObj = self.CurvesOp.MakeCircleCenter2Pnt(thePnt1, thePnt2, thePnt3)
2229             RaiseIfFailed("MakeCircleCenter2Pnt", self.CurvesOp)
2230             self._autoPublish(anObj, theName, "circle")
2231             return anObj
2232
2233         ## Create an ellipse with given center, normal vector and radiuses.
2234         #  @param thePnt Ellipse center.
2235         #  @param theVec Vector, normal to the plane of the ellipse.
2236         #  @param theRMajor Major ellipse radius.
2237         #  @param theRMinor Minor ellipse radius.
2238         #  @param theVecMaj Vector, direction of the ellipse's main axis.
2239         #  @param theName Object name; when specified, this parameter is used
2240         #         for result publication in the study. Otherwise, if automatic
2241         #         publication is switched on, default value is used for result name.
2242         #
2243         #  @return New GEOM.GEOM_Object, containing the created ellipse.
2244         #
2245         #  @ref tui_creation_ellipse "Example"
2246         @ManageTransactions("CurvesOp")
2247         def MakeEllipse(self, thePnt, theVec, theRMajor, theRMinor, theVecMaj=None, theName=None):
2248             """
2249             Create an ellipse with given center, normal vector and radiuses.
2250
2251             Parameters:
2252                 thePnt Ellipse center.
2253                 theVec Vector, normal to the plane of the ellipse.
2254                 theRMajor Major ellipse radius.
2255                 theRMinor Minor ellipse radius.
2256                 theVecMaj Vector, direction of the ellipse's main axis.
2257                 theName Object name; when specified, this parameter is used
2258                         for result publication in the study. Otherwise, if automatic
2259                         publication is switched on, default value is used for result name.
2260
2261             Returns:
2262                 New GEOM.GEOM_Object, containing the created ellipse.
2263             """
2264             # Example: see GEOM_TestAll.py
2265             theRMajor, theRMinor, Parameters = ParseParameters(theRMajor, theRMinor)
2266             if theVecMaj is not None:
2267                 anObj = self.CurvesOp.MakeEllipseVec(thePnt, theVec, theRMajor, theRMinor, theVecMaj)
2268             else:
2269                 anObj = self.CurvesOp.MakeEllipse(thePnt, theVec, theRMajor, theRMinor)
2270                 pass
2271             RaiseIfFailed("MakeEllipse", self.CurvesOp)
2272             anObj.SetParameters(Parameters)
2273             self._autoPublish(anObj, theName, "ellipse")
2274             return anObj
2275
2276         ## Create an ellipse with given radiuses.
2277         #  Center of the ellipse will be in the origin of global
2278         #  coordinate system and normal vector will be codirected with Z axis
2279         #  @param theRMajor Major ellipse radius.
2280         #  @param theRMinor Minor ellipse radius.
2281         #  @param theName Object name; when specified, this parameter is used
2282         #         for result publication in the study. Otherwise, if automatic
2283         #         publication is switched on, default value is used for result name.
2284         #
2285         #  @return New GEOM.GEOM_Object, containing the created ellipse.
2286         @ManageTransactions("CurvesOp")
2287         def MakeEllipseRR(self, theRMajor, theRMinor, theName=None):
2288             """
2289             Create an ellipse with given radiuses.
2290             Center of the ellipse will be in the origin of global
2291             coordinate system and normal vector will be codirected with Z axis
2292
2293             Parameters:
2294                 theRMajor Major ellipse radius.
2295                 theRMinor Minor ellipse radius.
2296                 theName Object name; when specified, this parameter is used
2297                         for result publication in the study. Otherwise, if automatic
2298                         publication is switched on, default value is used for result name.
2299
2300             Returns:
2301             New GEOM.GEOM_Object, containing the created ellipse.
2302             """
2303             anObj = self.CurvesOp.MakeEllipse(None, None, theRMajor, theRMinor)
2304             RaiseIfFailed("MakeEllipse", self.CurvesOp)
2305             self._autoPublish(anObj, theName, "ellipse")
2306             return anObj
2307
2308         ## Create a polyline on the set of points.
2309         #  @param thePoints Sequence of points for the polyline.
2310         #  @param theIsClosed If True, build a closed wire.
2311         #  @param theName Object name; when specified, this parameter is used
2312         #         for result publication in the study. Otherwise, if automatic
2313         #         publication is switched on, default value is used for result name.
2314         #
2315         #  @return New GEOM.GEOM_Object, containing the created polyline.
2316         #
2317         #  @ref tui_creation_curve "Example"
2318         @ManageTransactions("CurvesOp")
2319         def MakePolyline(self, thePoints, theIsClosed=False, theName=None):
2320             """
2321             Create a polyline on the set of points.
2322
2323             Parameters:
2324                 thePoints Sequence of points for the polyline.
2325                 theIsClosed If True, build a closed wire.
2326                 theName Object name; when specified, this parameter is used
2327                         for result publication in the study. Otherwise, if automatic
2328                         publication is switched on, default value is used for result name.
2329
2330             Returns:
2331                 New GEOM.GEOM_Object, containing the created polyline.
2332             """
2333             # Example: see GEOM_TestAll.py
2334             anObj = self.CurvesOp.MakePolyline(thePoints, theIsClosed)
2335             RaiseIfFailed("MakePolyline", self.CurvesOp)
2336             self._autoPublish(anObj, theName, "polyline")
2337             return anObj
2338
2339         ## Create bezier curve on the set of points.
2340         #  @param thePoints Sequence of points for the bezier curve.
2341         #  @param theIsClosed If True, build a closed curve.
2342         #  @param theName Object name; when specified, this parameter is used
2343         #         for result publication in the study. Otherwise, if automatic
2344         #         publication is switched on, default value is used for result name.
2345         #
2346         #  @return New GEOM.GEOM_Object, containing the created bezier curve.
2347         #
2348         #  @ref tui_creation_curve "Example"
2349         @ManageTransactions("CurvesOp")
2350         def MakeBezier(self, thePoints, theIsClosed=False, theName=None):
2351             """
2352             Create bezier curve on the set of points.
2353
2354             Parameters:
2355                 thePoints Sequence of points for the bezier curve.
2356                 theIsClosed If True, build a closed curve.
2357                 theName Object name; when specified, this parameter is used
2358                         for result publication in the study. Otherwise, if automatic
2359                         publication is switched on, default value is used for result name.
2360
2361             Returns:
2362                 New GEOM.GEOM_Object, containing the created bezier curve.
2363             """
2364             # Example: see GEOM_TestAll.py
2365             anObj = self.CurvesOp.MakeSplineBezier(thePoints, theIsClosed)
2366             RaiseIfFailed("MakeSplineBezier", self.CurvesOp)
2367             self._autoPublish(anObj, theName, "bezier")
2368             return anObj
2369
2370         ## Create B-Spline curve on the set of points.
2371         #  @param thePoints Sequence of points for the B-Spline curve.
2372         #  @param theIsClosed If True, build a closed curve.
2373         #  @param theDoReordering If TRUE, the algo does not follow the order of
2374         #                         \a thePoints but searches for the closest vertex.
2375         #  @param theName Object name; when specified, this parameter is used
2376         #         for result publication in the study. Otherwise, if automatic
2377         #         publication is switched on, default value is used for result name.
2378         #
2379         #  @return New GEOM.GEOM_Object, containing the created B-Spline curve.
2380         #
2381         #  @ref tui_creation_curve "Example"
2382         @ManageTransactions("CurvesOp")
2383         def MakeInterpol(self, thePoints, theIsClosed=False, theDoReordering=False, theName=None):
2384             """
2385             Create B-Spline curve on the set of points.
2386
2387             Parameters:
2388                 thePoints Sequence of points for the B-Spline curve.
2389                 theIsClosed If True, build a closed curve.
2390                 theDoReordering If True, the algo does not follow the order of
2391                                 thePoints but searches for the closest vertex.
2392                 theName Object name; when specified, this parameter is used
2393                         for result publication in the study. Otherwise, if automatic
2394                         publication is switched on, default value is used for result name.
2395
2396             Returns:
2397                 New GEOM.GEOM_Object, containing the created B-Spline curve.
2398             """
2399             # Example: see GEOM_TestAll.py
2400             anObj = self.CurvesOp.MakeSplineInterpolation(thePoints, theIsClosed, theDoReordering)
2401             RaiseIfFailed("MakeInterpol", self.CurvesOp)
2402             self._autoPublish(anObj, theName, "bspline")
2403             return anObj
2404
2405         ## Create B-Spline curve on the set of points.
2406         #  @param thePoints Sequence of points for the B-Spline curve.
2407         #  @param theFirstVec Vector object, defining the curve direction at its first point.
2408         #  @param theLastVec Vector object, defining the curve direction at its last point.
2409         #  @param theName Object name; when specified, this parameter is used
2410         #         for result publication in the study. Otherwise, if automatic
2411         #         publication is switched on, default value is used for result name.
2412         #
2413         #  @return New GEOM.GEOM_Object, containing the created B-Spline curve.
2414         #
2415         #  @ref tui_creation_curve "Example"
2416         @ManageTransactions("CurvesOp")
2417         def MakeInterpolWithTangents(self, thePoints, theFirstVec, theLastVec, theName=None):
2418             """
2419             Create B-Spline curve on the set of points.
2420
2421             Parameters:
2422                 thePoints Sequence of points for the B-Spline curve.
2423                 theFirstVec Vector object, defining the curve direction at its first point.
2424                 theLastVec Vector object, defining the curve direction at its last point.
2425                 theName Object name; when specified, this parameter is used
2426                         for result publication in the study. Otherwise, if automatic
2427                         publication is switched on, default value is used for result name.
2428
2429             Returns:
2430                 New GEOM.GEOM_Object, containing the created B-Spline curve.
2431             """
2432             # Example: see GEOM_TestAll.py
2433             anObj = self.CurvesOp.MakeSplineInterpolWithTangents(thePoints, theFirstVec, theLastVec)
2434             RaiseIfFailed("MakeInterpolWithTangents", self.CurvesOp)
2435             self._autoPublish(anObj, theName, "bspline")
2436             return anObj
2437
2438         ## Creates a curve using the parametric definition of the basic points.
2439         #  @param thexExpr parametric equation of the coordinates X.
2440         #  @param theyExpr parametric equation of the coordinates Y.
2441         #  @param thezExpr parametric equation of the coordinates Z.
2442         #  @param theParamMin the minimal value of the parameter.
2443         #  @param theParamMax the maximum value of the parameter.
2444         #  @param theParamStep the number of steps if theNewMethod = True, else step value of the parameter.
2445         #  @param theCurveType the type of the curve,
2446         #         one of GEOM.Polyline, GEOM.Bezier, GEOM.Interpolation.
2447         #  @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.
2448         #  @param theName Object name; when specified, this parameter is used
2449         #         for result publication in the study. Otherwise, if automatic
2450         #         publication is switched on, default value is used for result name.
2451         #
2452         #  @return New GEOM.GEOM_Object, containing the created curve.
2453         #
2454         #  @ref tui_creation_curve "Example"
2455         @ManageTransactions("CurvesOp")
2456         def MakeCurveParametric(self, thexExpr, theyExpr, thezExpr,
2457                                 theParamMin, theParamMax, theParamStep, theCurveType, theNewMethod=False, theName=None ):
2458             """
2459             Creates a curve using the parametric definition of the basic points.
2460
2461             Parameters:
2462                 thexExpr parametric equation of the coordinates X.
2463                 theyExpr parametric equation of the coordinates Y.
2464                 thezExpr parametric equation of the coordinates Z.
2465                 theParamMin the minimal value of the parameter.
2466                 theParamMax the maximum value of the parameter.
2467                 theParamStep the number of steps if theNewMethod = True, else step value of the parameter.
2468                 theCurveType the type of the curve,
2469                              one of GEOM.Polyline, GEOM.Bezier, GEOM.Interpolation.
2470                 theNewMethod flag for switching to the new method if the flag is set to false a deprecated
2471                              method is used which can lead to a bug.
2472                 theName Object name; when specified, this parameter is used
2473                         for result publication in the study. Otherwise, if automatic
2474                         publication is switched on, default value is used for result name.
2475
2476             Returns:
2477                 New GEOM.GEOM_Object, containing the created curve.
2478             """
2479             theParamMin,theParamMax,theParamStep,Parameters = ParseParameters(theParamMin,theParamMax,theParamStep)
2480             if theNewMethod:
2481               anObj = self.CurvesOp.MakeCurveParametricNew(thexExpr,theyExpr,thezExpr,theParamMin,theParamMax,theParamStep,theCurveType)
2482             else:
2483               anObj = self.CurvesOp.MakeCurveParametric(thexExpr,theyExpr,thezExpr,theParamMin,theParamMax,theParamStep,theCurveType)
2484             RaiseIfFailed("MakeCurveParametric", self.CurvesOp)
2485             anObj.SetParameters(Parameters)
2486             self._autoPublish(anObj, theName, "curve")
2487             return anObj
2488
2489         ## Create an isoline curve on a face.
2490         #  @param theFace the face for which an isoline is created.
2491         #  @param IsUIsoline True for U-isoline creation; False for V-isoline
2492         #         creation.
2493         #  @param theParameter the U parameter for U-isoline or V parameter
2494         #         for V-isoline.
2495         #  @param theName Object name; when specified, this parameter is used
2496         #         for result publication in the study. Otherwise, if automatic
2497         #         publication is switched on, default value is used for result name.
2498         #
2499         #  @return New GEOM.GEOM_Object, containing the created isoline edge or
2500         #          a compound of edges.
2501         #
2502         #  @ref tui_creation_curve "Example"
2503         @ManageTransactions("CurvesOp")
2504         def MakeIsoline(self, theFace, IsUIsoline, theParameter, theName=None):
2505             """
2506             Create an isoline curve on a face.
2507
2508             Parameters:
2509                 theFace the face for which an isoline is created.
2510                 IsUIsoline True for U-isoline creation; False for V-isoline
2511                            creation.
2512                 theParameter the U parameter for U-isoline or V parameter
2513                              for V-isoline.
2514                 theName Object name; when specified, this parameter is used
2515                         for result publication in the study. Otherwise, if automatic
2516                         publication is switched on, default value is used for result name.
2517
2518             Returns:
2519                 New GEOM.GEOM_Object, containing the created isoline edge or a
2520                 compound of edges.
2521             """
2522             # Example: see GEOM_TestAll.py
2523             anObj = self.CurvesOp.MakeIsoline(theFace, IsUIsoline, theParameter)
2524             RaiseIfFailed("MakeIsoline", self.CurvesOp)
2525             if IsUIsoline:
2526                 self._autoPublish(anObj, theName, "U-Isoline")
2527             else:
2528                 self._autoPublish(anObj, theName, "V-Isoline")
2529             return anObj
2530
2531         # end of l4_curves
2532         ## @}
2533
2534         ## @addtogroup l3_sketcher
2535         ## @{
2536
2537         ## Create a sketcher (wire or face), following the textual description,
2538         #  passed through <VAR>theCommand</VAR> argument. \n
2539         #  Edges of the resulting wire or face will be arcs of circles and/or linear segments. \n
2540         #  Format of the description string have to be the following:
2541         #
2542         #  "Sketcher[:F x1 y1]:CMD[:CMD[:CMD...]]"
2543         #
2544         #  Where:
2545         #  - x1, y1 are coordinates of the first sketcher point (zero by default),
2546         #  - CMD is one of
2547         #     - "R angle" : Set the direction by angle
2548         #     - "D dx dy" : Set the direction by DX & DY
2549         #     .
2550         #       \n
2551         #     - "TT x y" : Create segment by point at X & Y
2552         #     - "T dx dy" : Create segment by point with DX & DY
2553         #     - "L length" : Create segment by direction & Length
2554         #     - "IX x" : Create segment by direction & Intersect. X
2555         #     - "IY y" : Create segment by direction & Intersect. Y
2556         #     .
2557         #       \n
2558         #     - "C radius length" : Create arc by direction, radius and length(in degree)
2559         #     - "AA x y": Create arc by point at X & Y
2560         #     - "A dx dy" : Create arc by point with DX & DY
2561         #     - "UU x y radius flag1": Create arc by point at X & Y with given radiUs
2562         #     - "U dx dy radius flag1" : Create arc by point with DX & DY with given radiUs
2563         #     - "EE x y xc yc flag1 flag2": Create arc by point at X & Y with given cEnter coordinates
2564         #     - "E dx dy dxc dyc radius flag1 flag2" : Create arc by point with DX & DY with given cEnter coordinates
2565         #     .
2566         #       \n
2567         #     - "WW" : Close Wire (to finish)
2568         #     - "WF" : Close Wire and build face (to finish)
2569         #     .
2570         #        \n
2571         #  - Flag1 (= reverse) is 0 or 2 ...
2572         #     - if 0 the drawn arc is the one of lower angle (< Pi)
2573         #     - if 2 the drawn arc ius the one of greater angle (> Pi)
2574         #     .
2575         #        \n
2576         #  - Flag2 (= control tolerance) is 0 or 1 ...
2577         #     - if 0 the specified end point can be at a distance of the arc greater than the tolerance (10^-7)
2578         #     - if 1 the wire is built only if the end point is on the arc
2579         #       with a tolerance of 10^-7 on the distance else the creation fails
2580         #
2581         #  @param theCommand String, defining the sketcher in local
2582         #                    coordinates of the working plane.
2583         #  @param theWorkingPlane Nine double values, defining origin,
2584         #                         OZ and OX directions of the working plane.
2585         #  @param theName Object name; when specified, this parameter is used
2586         #         for result publication in the study. Otherwise, if automatic
2587         #         publication is switched on, default value is used for result name.
2588         #
2589         #  @return New GEOM.GEOM_Object, containing the created wire.
2590         #
2591         #  @ref tui_sketcher_page "Example"
2592         @ManageTransactions("CurvesOp")
2593         def MakeSketcher(self, theCommand, theWorkingPlane = [0,0,0, 0,0,1, 1,0,0], theName=None):
2594             """
2595             Create a sketcher (wire or face), following the textual description, passed
2596             through theCommand argument.
2597             Edges of the resulting wire or face will be arcs of circles and/or linear segments.
2598             Format of the description string have to be the following:
2599                 "Sketcher[:F x1 y1]:CMD[:CMD[:CMD...]]"
2600             Where:
2601             - x1, y1 are coordinates of the first sketcher point (zero by default),
2602             - CMD is one of
2603                - "R angle" : Set the direction by angle
2604                - "D dx dy" : Set the direction by DX & DY
2605
2606                - "TT x y" : Create segment by point at X & Y
2607                - "T dx dy" : Create segment by point with DX & DY
2608                - "L length" : Create segment by direction & Length
2609                - "IX x" : Create segment by direction & Intersect. X
2610                - "IY y" : Create segment by direction & Intersect. Y
2611
2612                - "C radius length" : Create arc by direction, radius and length(in degree)
2613                - "AA x y": Create arc by point at X & Y
2614                - "A dx dy" : Create arc by point with DX & DY
2615                - "UU x y radius flag1": Create arc by point at X & Y with given radiUs
2616                - "U dx dy radius flag1" : Create arc by point with DX & DY with given radiUs
2617                - "EE x y xc yc flag1 flag2": Create arc by point at X & Y with given cEnter coordinates
2618                - "E dx dy dxc dyc radius flag1 flag2" : Create arc by point with DX & DY with given cEnter coordinates
2619
2620                - "WW" : Close Wire (to finish)
2621                - "WF" : Close Wire and build face (to finish)
2622
2623             - Flag1 (= reverse) is 0 or 2 ...
2624                - if 0 the drawn arc is the one of lower angle (< Pi)
2625                - if 2 the drawn arc ius the one of greater angle (> Pi)
2626
2627             - Flag2 (= control tolerance) is 0 or 1 ...
2628                - if 0 the specified end point can be at a distance of the arc greater than the tolerance (10^-7)
2629                - if 1 the wire is built only if the end point is on the arc
2630                  with a tolerance of 10^-7 on the distance else the creation fails
2631
2632             Parameters:
2633                 theCommand String, defining the sketcher in local
2634                            coordinates of the working plane.
2635                 theWorkingPlane Nine double values, defining origin,
2636                                 OZ and OX directions of the working plane.
2637                 theName Object name; when specified, this parameter is used
2638                         for result publication in the study. Otherwise, if automatic
2639                         publication is switched on, default value is used for result name.
2640
2641             Returns:
2642                 New GEOM.GEOM_Object, containing the created wire.
2643             """
2644             # Example: see GEOM_TestAll.py
2645             theCommand,Parameters = ParseSketcherCommand(theCommand)
2646             anObj = self.CurvesOp.MakeSketcher(theCommand, theWorkingPlane)
2647             RaiseIfFailed("MakeSketcher", self.CurvesOp)
2648             anObj.SetParameters(Parameters)
2649             self._autoPublish(anObj, theName, "wire")
2650             return anObj
2651
2652         ## Create a sketcher (wire or face), following the textual description,
2653         #  passed through <VAR>theCommand</VAR> argument. \n
2654         #  For format of the description string see MakeSketcher() method.\n
2655         #  @param theCommand String, defining the sketcher in local
2656         #                    coordinates of the working plane.
2657         #  @param theWorkingPlane Planar Face or LCS(Marker) of the working plane.
2658         #  @param theName Object name; when specified, this parameter is used
2659         #         for result publication in the study. Otherwise, if automatic
2660         #         publication is switched on, default value is used for result name.
2661         #
2662         #  @return New GEOM.GEOM_Object, containing the created wire.
2663         #
2664         #  @ref tui_sketcher_page "Example"
2665         @ManageTransactions("CurvesOp")
2666         def MakeSketcherOnPlane(self, theCommand, theWorkingPlane, theName=None):
2667             """
2668             Create a sketcher (wire or face), following the textual description,
2669             passed through theCommand argument.
2670             For format of the description string see geompy.MakeSketcher() method.
2671
2672             Parameters:
2673                 theCommand String, defining the sketcher in local
2674                            coordinates of the working plane.
2675                 theWorkingPlane Planar Face or LCS(Marker) of the working plane.
2676                 theName Object name; when specified, this parameter is used
2677                         for result publication in the study. Otherwise, if automatic
2678                         publication is switched on, default value is used for result name.
2679
2680             Returns:
2681                 New GEOM.GEOM_Object, containing the created wire.
2682             """
2683             theCommand,Parameters = ParseSketcherCommand(theCommand)
2684             anObj = self.CurvesOp.MakeSketcherOnPlane(theCommand, theWorkingPlane)
2685             RaiseIfFailed("MakeSketcherOnPlane", self.CurvesOp)
2686             anObj.SetParameters(Parameters)
2687             self._autoPublish(anObj, theName, "wire")
2688             return anObj
2689
2690         ## Obtain a 2D sketcher interface
2691         #  @return An instance of @ref gsketcher.Sketcher2D "Sketcher2D" interface
2692         def Sketcher2D (self):
2693             """
2694             Obtain a 2D sketcher interface.
2695
2696             Example of usage:
2697                sk = geompy.Sketcher2D()
2698                sk.addPoint(20, 20)
2699                sk.addSegmentRelative(15, 70)
2700                sk.addSegmentPerpY(50)
2701                sk.addArcRadiusRelative(25, 15, 14.5, 0)
2702                sk.addArcCenterAbsolute(1, 1, 50, 50, 0, 0)
2703                sk.addArcDirectionRadiusLength(20, 20, 101, 162.13)
2704                sk.close()
2705                Sketch_1 = sk.wire(geomObj_1)
2706             """
2707             sk = Sketcher2D (self)
2708             return sk
2709
2710         ## Create a sketcher wire, following the numerical description,
2711         #  passed through <VAR>theCoordinates</VAR> argument. \n
2712         #  @param theCoordinates double values, defining points to create a wire,
2713         #                                                      passing from it.
2714         #  @param theName Object name; when specified, this parameter is used
2715         #         for result publication in the study. Otherwise, if automatic
2716         #         publication is switched on, default value is used for result name.
2717         #
2718         #  @return New GEOM.GEOM_Object, containing the created wire.
2719         #
2720         #  @ref tui_3dsketcher_page "Example"
2721         @ManageTransactions("CurvesOp")
2722         def Make3DSketcher(self, theCoordinates, theName=None):
2723             """
2724             Create a sketcher wire, following the numerical description,
2725             passed through theCoordinates argument.
2726
2727             Parameters:
2728                 theCoordinates double values, defining points to create a wire,
2729                                passing from it.
2730                 theName Object name; when specified, this parameter is used
2731                         for result publication in the study. Otherwise, if automatic
2732                         publication is switched on, default value is used for result name.
2733
2734             Returns:
2735                 New GEOM_Object, containing the created wire.
2736             """
2737             theCoordinates,Parameters = ParseParameters(theCoordinates)
2738             anObj = self.CurvesOp.Make3DSketcher(theCoordinates)
2739             RaiseIfFailed("Make3DSketcher", self.CurvesOp)
2740             anObj.SetParameters(Parameters)
2741             self._autoPublish(anObj, theName, "wire")
2742             return anObj
2743
2744         ## Obtain a 3D sketcher interface
2745         #  @return An instance of @ref gsketcher.Sketcher3D "Sketcher3D" interface
2746         #
2747         #  @ref tui_3dsketcher_page "Example"
2748         def Sketcher3D (self):
2749             """
2750             Obtain a 3D sketcher interface.
2751
2752             Example of usage:
2753                 sk = geompy.Sketcher3D()
2754                 sk.addPointsAbsolute(0,0,0, 70,0,0)
2755                 sk.addPointsRelative(0, 0, 130)
2756                 sk.addPointAnglesLength("OXY", 50, 0, 100)
2757                 sk.addPointAnglesLength("OXZ", 30, 80, 130)
2758                 sk.close()
2759                 a3D_Sketcher_1 = sk.wire()
2760             """
2761             sk = Sketcher3D (self)
2762             return sk
2763
2764         ## Obtain a 2D polyline creation interface
2765         #  @return An instance of @ref gsketcher.Polyline2D "Polyline2D" interface
2766         #
2767         #  @ref tui_3dsketcher_page "Example"
2768         def Polyline2D (self):
2769             """
2770             Obtain a 2D polyline creation interface.
2771
2772             Example of usage:
2773                 pl = geompy.Polyline2D()
2774                 pl.addSection("section 1", GEOM.Polyline, True)
2775                 pl.addPoints(0, 0, 10, 0, 10, 10)
2776                 pl.addSection("section 2", GEOM.Interpolation, False)
2777                 pl.addPoints(20, 0, 30, 0, 30, 10)
2778                 resultObj = pl.result(WorkingPlane)
2779             """
2780             pl = Polyline2D (self)
2781             return pl
2782
2783         # end of l3_sketcher
2784         ## @}
2785
2786         ## @addtogroup l3_3d_primitives
2787         ## @{
2788
2789         ## Create a box by coordinates of two opposite vertices.
2790         #
2791         #  @param x1,y1,z1 double values, defining first point it.
2792         #  @param x2,y2,z2 double values, defining first point it.
2793         #  @param theName Object name; when specified, this parameter is used
2794         #         for result publication in the study. Otherwise, if automatic
2795         #         publication is switched on, default value is used for result name.
2796         #
2797         #  @return New GEOM.GEOM_Object, containing the created box.
2798         #
2799         #  @ref tui_creation_box "Example"
2800         def MakeBox(self, x1, y1, z1, x2, y2, z2, theName=None):
2801             """
2802             Create a box by coordinates of two opposite vertices.
2803
2804             Parameters:
2805                 x1,y1,z1 double values, defining first point.
2806                 x2,y2,z2 double values, defining second point.
2807                 theName Object name; when specified, this parameter is used
2808                         for result publication in the study. Otherwise, if automatic
2809                         publication is switched on, default value is used for result name.
2810
2811             Returns:
2812                 New GEOM.GEOM_Object, containing the created box.
2813             """
2814             # Example: see GEOM_TestAll.py
2815             pnt1 = self.MakeVertex(x1,y1,z1)
2816             pnt2 = self.MakeVertex(x2,y2,z2)
2817             # note: auto-publishing is done in self.MakeBoxTwoPnt()
2818             return self.MakeBoxTwoPnt(pnt1, pnt2, theName)
2819
2820         ## Create a box with specified dimensions along the coordinate axes
2821         #  and with edges, parallel to the coordinate axes.
2822         #  Center of the box will be at point (DX/2, DY/2, DZ/2).
2823         #  @param theDX Length of Box edges, parallel to OX axis.
2824         #  @param theDY Length of Box edges, parallel to OY axis.
2825         #  @param theDZ Length of Box edges, parallel to OZ axis.
2826         #  @param theName Object name; when specified, this parameter is used
2827         #         for result publication in the study. Otherwise, if automatic
2828         #         publication is switched on, default value is used for result name.
2829         #
2830         #  @return New GEOM.GEOM_Object, containing the created box.
2831         #
2832         #  @ref tui_creation_box "Example"
2833         @ManageTransactions("PrimOp")
2834         def MakeBoxDXDYDZ(self, theDX, theDY, theDZ, theName=None):
2835             """
2836             Create a box with specified dimensions along the coordinate axes
2837             and with edges, parallel to the coordinate axes.
2838             Center of the box will be at point (DX/2, DY/2, DZ/2).
2839
2840             Parameters:
2841                 theDX Length of Box edges, parallel to OX axis.
2842                 theDY Length of Box edges, parallel to OY axis.
2843                 theDZ Length of Box edges, parallel to OZ axis.
2844                 theName Object name; when specified, this parameter is used
2845                         for result publication in the study. Otherwise, if automatic
2846                         publication is switched on, default value is used for result name.
2847
2848             Returns:
2849                 New GEOM.GEOM_Object, containing the created box.
2850             """
2851             # Example: see GEOM_TestAll.py
2852             theDX,theDY,theDZ,Parameters = ParseParameters(theDX, theDY, theDZ)
2853             anObj = self.PrimOp.MakeBoxDXDYDZ(theDX, theDY, theDZ)
2854             RaiseIfFailed("MakeBoxDXDYDZ", self.PrimOp)
2855             anObj.SetParameters(Parameters)
2856             self._autoPublish(anObj, theName, "box")
2857             return anObj
2858
2859         ## Create a box with two specified opposite vertices,
2860         #  and with edges, parallel to the coordinate axes
2861         #  @param thePnt1 First of two opposite vertices.
2862         #  @param thePnt2 Second of two opposite vertices.
2863         #  @param theName Object name; when specified, this parameter is used
2864         #         for result publication in the study. Otherwise, if automatic
2865         #         publication is switched on, default value is used for result name.
2866         #
2867         #  @return New GEOM.GEOM_Object, containing the created box.
2868         #
2869         #  @ref tui_creation_box "Example"
2870         @ManageTransactions("PrimOp")
2871         def MakeBoxTwoPnt(self, thePnt1, thePnt2, theName=None):
2872             """
2873             Create a box with two specified opposite vertices,
2874             and with edges, parallel to the coordinate axes
2875
2876             Parameters:
2877                 thePnt1 First of two opposite vertices.
2878                 thePnt2 Second of two opposite vertices.
2879                 theName Object name; when specified, this parameter is used
2880                         for result publication in the study. Otherwise, if automatic
2881                         publication is switched on, default value is used for result name.
2882
2883             Returns:
2884                 New GEOM.GEOM_Object, containing the created box.
2885             """
2886             # Example: see GEOM_TestAll.py
2887             anObj = self.PrimOp.MakeBoxTwoPnt(thePnt1, thePnt2)
2888             RaiseIfFailed("MakeBoxTwoPnt", self.PrimOp)
2889             self._autoPublish(anObj, theName, "box")
2890             return anObj
2891
2892         ## Create a face with specified dimensions with edges parallel to coordinate axes.
2893         #  @param theH height of Face.
2894         #  @param theW width of Face.
2895         #  @param theOrientation face orientation: 1-OXY, 2-OYZ, 3-OZX
2896         #  @param theName Object name; when specified, this parameter is used
2897         #         for result publication in the study. Otherwise, if automatic
2898         #         publication is switched on, default value is used for result name.
2899         #
2900         #  @return New GEOM.GEOM_Object, containing the created face.
2901         #
2902         #  @ref tui_creation_face "Example"
2903         @ManageTransactions("PrimOp")
2904         def MakeFaceHW(self, theH, theW, theOrientation, theName=None):
2905             """
2906             Create a face with specified dimensions with edges parallel to coordinate axes.
2907
2908             Parameters:
2909                 theH height of Face.
2910                 theW width of Face.
2911                 theOrientation face orientation: 1-OXY, 2-OYZ, 3-OZX
2912                 theName Object name; when specified, this parameter is used
2913                         for result publication in the study. Otherwise, if automatic
2914                         publication is switched on, default value is used for result name.
2915
2916             Returns:
2917                 New GEOM.GEOM_Object, containing the created face.
2918             """
2919             # Example: see GEOM_TestAll.py
2920             theH,theW,Parameters = ParseParameters(theH, theW)
2921             anObj = self.PrimOp.MakeFaceHW(theH, theW, theOrientation)
2922             RaiseIfFailed("MakeFaceHW", self.PrimOp)
2923             anObj.SetParameters(Parameters)
2924             self._autoPublish(anObj, theName, "rectangle")
2925             return anObj
2926
2927         ## Create a face from another plane and two sizes,
2928         #  vertical size and horisontal size.
2929         #  @param theObj   Normale vector to the creating face or
2930         #  the face object.
2931         #  @param theH     Height (vertical size).
2932         #  @param theW     Width (horisontal size).
2933         #  @param theName Object name; when specified, this parameter is used
2934         #         for result publication in the study. Otherwise, if automatic
2935         #         publication is switched on, default value is used for result name.
2936         #
2937         #  @return New GEOM.GEOM_Object, containing the created face.
2938         #
2939         #  @ref tui_creation_face "Example"
2940         @ManageTransactions("PrimOp")
2941         def MakeFaceObjHW(self, theObj, theH, theW, theName=None):
2942             """
2943             Create a face from another plane and two sizes,
2944             vertical size and horisontal size.
2945
2946             Parameters:
2947                 theObj   Normale vector to the creating face or
2948                          the face object.
2949                 theH     Height (vertical size).
2950                 theW     Width (horisontal size).
2951                 theName Object name; when specified, this parameter is used
2952                         for result publication in the study. Otherwise, if automatic
2953                         publication is switched on, default value is used for result name.
2954
2955             Returns:
2956                 New GEOM_Object, containing the created face.
2957             """
2958             # Example: see GEOM_TestAll.py
2959             theH,theW,Parameters = ParseParameters(theH, theW)
2960             anObj = self.PrimOp.MakeFaceObjHW(theObj, theH, theW)
2961             RaiseIfFailed("MakeFaceObjHW", self.PrimOp)
2962             anObj.SetParameters(Parameters)
2963             self._autoPublish(anObj, theName, "rectangle")
2964             return anObj
2965
2966         ## Create a disk with given center, normal vector and radius.
2967         #  @param thePnt Disk center.
2968         #  @param theVec Vector, normal to the plane of the disk.
2969         #  @param theR Disk radius.
2970         #  @param theName Object name; when specified, this parameter is used
2971         #         for result publication in the study. Otherwise, if automatic
2972         #         publication is switched on, default value is used for result name.
2973         #
2974         #  @return New GEOM.GEOM_Object, containing the created disk.
2975         #
2976         #  @ref tui_creation_disk "Example"
2977         @ManageTransactions("PrimOp")
2978         def MakeDiskPntVecR(self, thePnt, theVec, theR, theName=None):
2979             """
2980             Create a disk with given center, normal vector and radius.
2981
2982             Parameters:
2983                 thePnt Disk center.
2984                 theVec Vector, normal to the plane of the disk.
2985                 theR Disk radius.
2986                 theName Object name; when specified, this parameter is used
2987                         for result publication in the study. Otherwise, if automatic
2988                         publication is switched on, default value is used for result name.
2989
2990             Returns:
2991                 New GEOM.GEOM_Object, containing the created disk.
2992             """
2993             # Example: see GEOM_TestAll.py
2994             theR,Parameters = ParseParameters(theR)
2995             anObj = self.PrimOp.MakeDiskPntVecR(thePnt, theVec, theR)
2996             RaiseIfFailed("MakeDiskPntVecR", self.PrimOp)
2997             anObj.SetParameters(Parameters)
2998             self._autoPublish(anObj, theName, "disk")
2999             return anObj
3000
3001         ## Create a disk, passing through three given points
3002         #  @param thePnt1,thePnt2,thePnt3 Points, defining the disk.
3003         #  @param theName Object name; when specified, this parameter is used
3004         #         for result publication in the study. Otherwise, if automatic
3005         #         publication is switched on, default value is used for result name.
3006         #
3007         #  @return New GEOM.GEOM_Object, containing the created disk.
3008         #
3009         #  @ref tui_creation_disk "Example"
3010         @ManageTransactions("PrimOp")
3011         def MakeDiskThreePnt(self, thePnt1, thePnt2, thePnt3, theName=None):
3012             """
3013             Create a disk, passing through three given points
3014
3015             Parameters:
3016                 thePnt1,thePnt2,thePnt3 Points, defining the disk.
3017                 theName Object name; when specified, this parameter is used
3018                         for result publication in the study. Otherwise, if automatic
3019                         publication is switched on, default value is used for result name.
3020
3021             Returns:
3022                 New GEOM.GEOM_Object, containing the created disk.
3023             """
3024             # Example: see GEOM_TestAll.py
3025             anObj = self.PrimOp.MakeDiskThreePnt(thePnt1, thePnt2, thePnt3)
3026             RaiseIfFailed("MakeDiskThreePnt", self.PrimOp)
3027             self._autoPublish(anObj, theName, "disk")
3028             return anObj
3029
3030         ## Create a disk with specified dimensions along OX-OY coordinate axes.
3031         #  @param theR Radius of Face.
3032         #  @param theOrientation set the orientation belong axis OXY or OYZ or OZX
3033         #  @param theName Object name; when specified, this parameter is used
3034         #         for result publication in the study. Otherwise, if automatic
3035         #         publication is switched on, default value is used for result name.
3036         #
3037         #  @return New GEOM.GEOM_Object, containing the created disk.
3038         #
3039         #  @ref tui_creation_face "Example"
3040         @ManageTransactions("PrimOp")
3041         def MakeDiskR(self, theR, theOrientation, theName=None):
3042             """
3043             Create a disk with specified dimensions along OX-OY coordinate axes.
3044
3045             Parameters:
3046                 theR Radius of Face.
3047                 theOrientation set the orientation belong axis OXY or OYZ or OZX
3048                 theName Object name; when specified, this parameter is used
3049                         for result publication in the study. Otherwise, if automatic
3050                         publication is switched on, default value is used for result name.
3051
3052             Returns:
3053                 New GEOM.GEOM_Object, containing the created disk.
3054
3055             Example of usage:
3056                 Disk3 = geompy.MakeDiskR(100., 1)
3057             """
3058             # Example: see GEOM_TestAll.py
3059             theR,Parameters = ParseParameters(theR)
3060             anObj = self.PrimOp.MakeDiskR(theR, theOrientation)
3061             RaiseIfFailed("MakeDiskR", self.PrimOp)
3062             anObj.SetParameters(Parameters)
3063             self._autoPublish(anObj, theName, "disk")
3064             return anObj
3065
3066         ## Create a cylinder with given base point, axis, radius and height.
3067         #  @param thePnt Central point of cylinder base.
3068         #  @param theAxis Cylinder axis.
3069         #  @param theR Cylinder radius.
3070         #  @param theH Cylinder height.
3071         #  @param theName Object name; when specified, this parameter is used
3072         #         for result publication in the study. Otherwise, if automatic
3073         #         publication is switched on, default value is used for result name.
3074         #
3075         #  @return New GEOM.GEOM_Object, containing the created cylinder.
3076         #
3077         #  @ref tui_creation_cylinder "Example"
3078         @ManageTransactions("PrimOp")
3079         def MakeCylinder(self, thePnt, theAxis, theR, theH, theName=None):
3080             """
3081             Create a cylinder with given base point, axis, radius and height.
3082
3083             Parameters:
3084                 thePnt Central point of cylinder base.
3085                 theAxis Cylinder axis.
3086                 theR Cylinder radius.
3087                 theH Cylinder height.
3088                 theName Object name; when specified, this parameter is used
3089                         for result publication in the study. Otherwise, if automatic
3090                         publication is switched on, default value is used for result name.
3091
3092             Returns:
3093                 New GEOM.GEOM_Object, containing the created cylinder.
3094             """
3095             # Example: see GEOM_TestAll.py
3096             theR,theH,Parameters = ParseParameters(theR, theH)
3097             anObj = self.PrimOp.MakeCylinderPntVecRH(thePnt, theAxis, theR, theH)
3098             RaiseIfFailed("MakeCylinderPntVecRH", self.PrimOp)
3099             anObj.SetParameters(Parameters)
3100             self._autoPublish(anObj, theName, "cylinder")
3101             return anObj
3102             
3103         ## Create a portion of cylinder with given base point, axis, radius, height and angle.
3104         #  @param thePnt Central point of cylinder base.
3105         #  @param theAxis Cylinder axis.
3106         #  @param theR Cylinder radius.
3107         #  @param theH Cylinder height.
3108         #  @param theA Cylinder angle in radians.
3109         #  @param theName Object name; when specified, this parameter is used
3110         #         for result publication in the study. Otherwise, if automatic
3111         #         publication is switched on, default value is used for result name.
3112         #
3113         #  @return New GEOM.GEOM_Object, containing the created cylinder.
3114         #
3115         #  @ref tui_creation_cylinder "Example"
3116         @ManageTransactions("PrimOp")
3117         def MakeCylinderA(self, thePnt, theAxis, theR, theH, theA, theName=None):
3118             """
3119             Create a portion of cylinder with given base point, axis, radius, height and angle.
3120
3121             Parameters:
3122                 thePnt Central point of cylinder base.
3123                 theAxis Cylinder axis.
3124                 theR Cylinder radius.
3125                 theH Cylinder height.
3126                 theA Cylinder angle in radians.
3127                 theName Object name; when specified, this parameter is used
3128                         for result publication in the study. Otherwise, if automatic
3129                         publication is switched on, default value is used for result name.
3130
3131             Returns:
3132                 New GEOM.GEOM_Object, containing the created cylinder.
3133             """
3134             # Example: see GEOM_TestAll.py
3135             flag = False
3136             if isinstance(theA,str):
3137                 flag = True
3138             theR,theH,theA,Parameters = ParseParameters(theR, theH, theA)
3139             if flag:
3140                 theA = theA*math.pi/180.
3141             if theA<=0. or theA>=2*math.pi:
3142                 raise ValueError("The angle parameter should be strictly between 0 and 2*pi.")
3143             anObj = self.PrimOp.MakeCylinderPntVecRHA(thePnt, theAxis, theR, theH, theA)
3144             RaiseIfFailed("MakeCylinderPntVecRHA", self.PrimOp)
3145             anObj.SetParameters(Parameters)
3146             self._autoPublish(anObj, theName, "cylinder")
3147             return anObj
3148
3149         ## Create a cylinder with given radius and height at
3150         #  the origin of coordinate system. Axis of the cylinder
3151         #  will be collinear to the OZ axis of the coordinate system.
3152         #  @param theR Cylinder radius.
3153         #  @param theH Cylinder height.
3154         #  @param theName Object name; when specified, this parameter is used
3155         #         for result publication in the study. Otherwise, if automatic
3156         #         publication is switched on, default value is used for result name.
3157         #
3158         #  @return New GEOM.GEOM_Object, containing the created cylinder.
3159         #
3160         #  @ref tui_creation_cylinder "Example"
3161         @ManageTransactions("PrimOp")
3162         def MakeCylinderRH(self, theR, theH, theName=None):
3163             """
3164             Create a cylinder with given radius and height at
3165             the origin of coordinate system. Axis of the cylinder
3166             will be collinear to the OZ axis of the coordinate system.
3167
3168             Parameters:
3169                 theR Cylinder radius.
3170                 theH Cylinder height.
3171                 theName Object name; when specified, this parameter is used
3172                         for result publication in the study. Otherwise, if automatic
3173                         publication is switched on, default value is used for result name.
3174
3175             Returns:
3176                 New GEOM.GEOM_Object, containing the created cylinder.
3177             """
3178             # Example: see GEOM_TestAll.py
3179             theR,theH,Parameters = ParseParameters(theR, theH)
3180             anObj = self.PrimOp.MakeCylinderRH(theR, theH)
3181             RaiseIfFailed("MakeCylinderRH", self.PrimOp)
3182             anObj.SetParameters(Parameters)
3183             self._autoPublish(anObj, theName, "cylinder")
3184             return anObj
3185             
3186         ## Create a portion of cylinder with given radius, height and angle at
3187         #  the origin of coordinate system. Axis of the cylinder
3188         #  will be collinear to the OZ axis of the coordinate system.
3189         #  @param theR Cylinder radius.
3190         #  @param theH Cylinder height.
3191         #  @param theA Cylinder angle in radians.
3192         #  @param theName Object name; when specified, this parameter is used
3193         #         for result publication in the study. Otherwise, if automatic
3194         #         publication is switched on, default value is used for result name.
3195         #
3196         #  @return New GEOM.GEOM_Object, containing the created cylinder.
3197         #
3198         #  @ref tui_creation_cylinder "Example"
3199         @ManageTransactions("PrimOp")
3200         def MakeCylinderRHA(self, theR, theH, theA, theName=None):
3201             """
3202             Create a portion of cylinder with given radius, height and angle at
3203             the origin of coordinate system. Axis of the cylinder
3204             will be collinear to the OZ axis of the coordinate system.
3205
3206             Parameters:
3207                 theR Cylinder radius.
3208                 theH Cylinder height.
3209                 theA Cylinder angle in radians.
3210                 theName Object name; when specified, this parameter is used
3211                         for result publication in the study. Otherwise, if automatic
3212                         publication is switched on, default value is used for result name.
3213
3214             Returns:
3215                 New GEOM.GEOM_Object, containing the created cylinder.
3216             """
3217             # Example: see GEOM_TestAll.py
3218             flag = False
3219             if isinstance(theA,str):
3220                 flag = True
3221             theR,theH,theA,Parameters = ParseParameters(theR, theH, theA)
3222             if flag:
3223                 theA = theA*math.pi/180.
3224             if theA<=0. or theA>=2*math.pi:
3225                 raise ValueError("The angle parameter should be strictly between 0 and 2*pi.")
3226             anObj = self.PrimOp.MakeCylinderRHA(theR, theH, theA)
3227             RaiseIfFailed("MakeCylinderRHA", self.PrimOp)
3228             anObj.SetParameters(Parameters)
3229             self._autoPublish(anObj, theName, "cylinder")
3230             return anObj
3231
3232         ## Create a sphere with given center and radius.
3233         #  @param thePnt Sphere center.
3234         #  @param theR Sphere radius.
3235         #  @param theName Object name; when specified, this parameter is used
3236         #         for result publication in the study. Otherwise, if automatic
3237         #         publication is switched on, default value is used for result name.
3238         #
3239         #  @return New GEOM.GEOM_Object, containing the created sphere.
3240         #
3241         #  @ref tui_creation_sphere "Example"
3242         @ManageTransactions("PrimOp")
3243         def MakeSpherePntR(self, thePnt, theR, theName=None):
3244             """
3245             Create a sphere with given center and radius.
3246
3247             Parameters:
3248                 thePnt Sphere center.
3249                 theR Sphere radius.
3250                 theName Object name; when specified, this parameter is used
3251                         for result publication in the study. Otherwise, if automatic
3252                         publication is switched on, default value is used for result name.
3253
3254             Returns:
3255                 New GEOM.GEOM_Object, containing the created sphere.
3256             """
3257             # Example: see GEOM_TestAll.py
3258             theR,Parameters = ParseParameters(theR)
3259             anObj = self.PrimOp.MakeSpherePntR(thePnt, theR)
3260             RaiseIfFailed("MakeSpherePntR", self.PrimOp)
3261             anObj.SetParameters(Parameters)
3262             self._autoPublish(anObj, theName, "sphere")
3263             return anObj
3264
3265         ## Create a sphere with given center and radius.
3266         #  @param x,y,z Coordinates of sphere center.
3267         #  @param theR Sphere radius.
3268         #  @param theName Object name; when specified, this parameter is used
3269         #         for result publication in the study. Otherwise, if automatic
3270         #         publication is switched on, default value is used for result name.
3271         #
3272         #  @return New GEOM.GEOM_Object, containing the created sphere.
3273         #
3274         #  @ref tui_creation_sphere "Example"
3275         def MakeSphere(self, x, y, z, theR, theName=None):
3276             """
3277             Create a sphere with given center and radius.
3278
3279             Parameters:
3280                 x,y,z Coordinates of sphere center.
3281                 theR Sphere radius.
3282                 theName Object name; when specified, this parameter is used
3283                         for result publication in the study. Otherwise, if automatic
3284                         publication is switched on, default value is used for result name.
3285
3286             Returns:
3287                 New GEOM.GEOM_Object, containing the created sphere.
3288             """
3289             # Example: see GEOM_TestAll.py
3290             point = self.MakeVertex(x, y, z)
3291             # note: auto-publishing is done in self.MakeSpherePntR()
3292             anObj = self.MakeSpherePntR(point, theR, theName)
3293             return anObj
3294
3295         ## Create a sphere with given radius at the origin of coordinate system.
3296         #  @param theR Sphere radius.
3297         #  @param theName Object name; when specified, this parameter is used
3298         #         for result publication in the study. Otherwise, if automatic
3299         #         publication is switched on, default value is used for result name.
3300         #
3301         #  @return New GEOM.GEOM_Object, containing the created sphere.
3302         #
3303         #  @ref tui_creation_sphere "Example"
3304         @ManageTransactions("PrimOp")
3305         def MakeSphereR(self, theR, theName=None):
3306             """
3307             Create a sphere with given radius at the origin of coordinate system.
3308
3309             Parameters:
3310                 theR Sphere radius.
3311                 theName Object name; when specified, this parameter is used
3312                         for result publication in the study. Otherwise, if automatic
3313                         publication is switched on, default value is used for result name.
3314
3315             Returns:
3316                 New GEOM.GEOM_Object, containing the created sphere.
3317             """
3318             # Example: see GEOM_TestAll.py
3319             theR,Parameters = ParseParameters(theR)
3320             anObj = self.PrimOp.MakeSphereR(theR)
3321             RaiseIfFailed("MakeSphereR", self.PrimOp)
3322             anObj.SetParameters(Parameters)
3323             self._autoPublish(anObj, theName, "sphere")
3324             return anObj
3325
3326         ## Create a cone with given base point, axis, height and radiuses.
3327         #  @param thePnt Central point of the first cone base.
3328         #  @param theAxis Cone axis.
3329         #  @param theR1 Radius of the first cone base.
3330         #  @param theR2 Radius of the second cone base.
3331         #    \note If both radiuses are non-zero, the cone will be truncated.
3332         #    \note If the radiuses are equal, a cylinder will be created instead.
3333         #  @param theH Cone height.
3334         #  @param theName Object name; when specified, this parameter is used
3335         #         for result publication in the study. Otherwise, if automatic
3336         #         publication is switched on, default value is used for result name.
3337         #
3338         #  @return New GEOM.GEOM_Object, containing the created cone.
3339         #
3340         #  @ref tui_creation_cone "Example"
3341         @ManageTransactions("PrimOp")
3342         def MakeCone(self, thePnt, theAxis, theR1, theR2, theH, theName=None):
3343             """
3344             Create a cone with given base point, axis, height and radiuses.
3345
3346             Parameters:
3347                 thePnt Central point of the first cone base.
3348                 theAxis Cone axis.
3349                 theR1 Radius of the first cone base.
3350                 theR2 Radius of the second cone base.
3351                 theH Cone height.
3352                 theName Object name; when specified, this parameter is used
3353                         for result publication in the study. Otherwise, if automatic
3354                         publication is switched on, default value is used for result name.
3355
3356             Note:
3357                 If both radiuses are non-zero, the cone will be truncated.
3358                 If the radiuses are equal, a cylinder will be created instead.
3359
3360             Returns:
3361                 New GEOM.GEOM_Object, containing the created cone.
3362             """
3363             # Example: see GEOM_TestAll.py
3364             theR1,theR2,theH,Parameters = ParseParameters(theR1,theR2,theH)
3365             anObj = self.PrimOp.MakeConePntVecR1R2H(thePnt, theAxis, theR1, theR2, theH)
3366             RaiseIfFailed("MakeConePntVecR1R2H", self.PrimOp)
3367             anObj.SetParameters(Parameters)
3368             self._autoPublish(anObj, theName, "cone")
3369             return anObj
3370
3371         ## Create a cone with given height and radiuses at
3372         #  the origin of coordinate system. Axis of the cone will
3373         #  be collinear to the OZ axis of the coordinate system.
3374         #  @param theR1 Radius of the first cone base.
3375         #  @param theR2 Radius of the second cone base.
3376         #    \note If both radiuses are non-zero, the cone will be truncated.
3377         #    \note If the radiuses are equal, a cylinder will be created instead.
3378         #  @param theH Cone height.
3379         #  @param theName Object name; when specified, this parameter is used
3380         #         for result publication in the study. Otherwise, if automatic
3381         #         publication is switched on, default value is used for result name.
3382         #
3383         #  @return New GEOM.GEOM_Object, containing the created cone.
3384         #
3385         #  @ref tui_creation_cone "Example"
3386         @ManageTransactions("PrimOp")
3387         def MakeConeR1R2H(self, theR1, theR2, theH, theName=None):
3388             """
3389             Create a cone with given height and radiuses at
3390             the origin of coordinate system. Axis of the cone will
3391             be collinear to the OZ axis of the coordinate system.
3392
3393             Parameters:
3394                 theR1 Radius of the first cone base.
3395                 theR2 Radius of the second cone base.
3396                 theH Cone height.
3397                 theName Object name; when specified, this parameter is used
3398                         for result publication in the study. Otherwise, if automatic
3399                         publication is switched on, default value is used for result name.
3400
3401             Note:
3402                 If both radiuses are non-zero, the cone will be truncated.
3403                 If the radiuses are equal, a cylinder will be created instead.
3404
3405             Returns:
3406                 New GEOM.GEOM_Object, containing the created cone.
3407             """
3408             # Example: see GEOM_TestAll.py
3409             theR1,theR2,theH,Parameters = ParseParameters(theR1,theR2,theH)
3410             anObj = self.PrimOp.MakeConeR1R2H(theR1, theR2, theH)
3411             RaiseIfFailed("MakeConeR1R2H", self.PrimOp)
3412             anObj.SetParameters(Parameters)
3413             self._autoPublish(anObj, theName, "cone")
3414             return anObj
3415
3416         ## Create a torus with given center, normal vector and radiuses.
3417         #  @param thePnt Torus central point.
3418         #  @param theVec Torus axis of symmetry.
3419         #  @param theRMajor Torus major radius.
3420         #  @param theRMinor Torus minor radius.
3421         #  @param theName Object name; when specified, this parameter is used
3422         #         for result publication in the study. Otherwise, if automatic
3423         #         publication is switched on, default value is used for result name.
3424         #
3425         #  @return New GEOM.GEOM_Object, containing the created torus.
3426         #
3427         #  @ref tui_creation_torus "Example"
3428         @ManageTransactions("PrimOp")
3429         def MakeTorus(self, thePnt, theVec, theRMajor, theRMinor, theName=None):
3430             """
3431             Create a torus with given center, normal vector and radiuses.
3432
3433             Parameters:
3434                 thePnt Torus central point.
3435                 theVec Torus axis of symmetry.
3436                 theRMajor Torus major radius.
3437                 theRMinor Torus minor radius.
3438                 theName Object name; when specified, this parameter is used
3439                         for result publication in the study. Otherwise, if automatic
3440                         publication is switched on, default value is used for result name.
3441
3442            Returns:
3443                 New GEOM.GEOM_Object, containing the created torus.
3444             """
3445             # Example: see GEOM_TestAll.py
3446             theRMajor,theRMinor,Parameters = ParseParameters(theRMajor,theRMinor)
3447             anObj = self.PrimOp.MakeTorusPntVecRR(thePnt, theVec, theRMajor, theRMinor)
3448             RaiseIfFailed("MakeTorusPntVecRR", self.PrimOp)
3449             anObj.SetParameters(Parameters)
3450             self._autoPublish(anObj, theName, "torus")
3451             return anObj
3452
3453         ## Create a torus with given radiuses at the origin of coordinate system.
3454         #  @param theRMajor Torus major radius.
3455         #  @param theRMinor Torus minor radius.
3456         #  @param theName Object name; when specified, this parameter is used
3457         #         for result publication in the study. Otherwise, if automatic
3458         #         publication is switched on, default value is used for result name.
3459         #
3460         #  @return New GEOM.GEOM_Object, containing the created torus.
3461         #
3462         #  @ref tui_creation_torus "Example"
3463         @ManageTransactions("PrimOp")
3464         def MakeTorusRR(self, theRMajor, theRMinor, theName=None):
3465             """
3466            Create a torus with given radiuses at the origin of coordinate system.
3467
3468            Parameters:
3469                 theRMajor Torus major radius.
3470                 theRMinor Torus minor radius.
3471                 theName Object name; when specified, this parameter is used
3472                         for result publication in the study. Otherwise, if automatic
3473                         publication is switched on, default value is used for result name.
3474
3475            Returns:
3476                 New GEOM.GEOM_Object, containing the created torus.
3477             """
3478             # Example: see GEOM_TestAll.py
3479             theRMajor,theRMinor,Parameters = ParseParameters(theRMajor,theRMinor)
3480             anObj = self.PrimOp.MakeTorusRR(theRMajor, theRMinor)
3481             RaiseIfFailed("MakeTorusRR", self.PrimOp)
3482             anObj.SetParameters(Parameters)
3483             self._autoPublish(anObj, theName, "torus")
3484             return anObj
3485
3486         # end of l3_3d_primitives
3487         ## @}
3488
3489         ## @addtogroup l3_complex
3490         ## @{
3491
3492         ## Create a shape by extrusion of the base shape along a vector, defined by two points.
3493         #  @param theBase Base shape to be extruded.
3494         #  @param thePoint1 First end of extrusion vector.
3495         #  @param thePoint2 Second end of extrusion vector.
3496         #  @param theScaleFactor Use it to make prism with scaled second base.
3497         #                        Nagative value means not scaled second base.
3498         #  @param theName Object name; when specified, this parameter is used
3499         #         for result publication in the study. Otherwise, if automatic
3500         #         publication is switched on, default value is used for result name.
3501         #
3502         #  @return New GEOM.GEOM_Object, containing the created prism.
3503         #
3504         #  @ref tui_creation_prism "Example"
3505         @ManageTransactions("PrimOp")
3506         def MakePrism(self, theBase, thePoint1, thePoint2, theScaleFactor = -1.0, theName=None):
3507             """
3508             Create a shape by extrusion of the base shape along a vector, defined by two points.
3509
3510             Parameters:
3511                 theBase Base shape to be extruded.
3512                 thePoint1 First end of extrusion vector.
3513                 thePoint2 Second end of extrusion vector.
3514                 theScaleFactor Use it to make prism with scaled second base.
3515                                Nagative value means not scaled second base.
3516                 theName Object name; when specified, this parameter is used
3517                         for result publication in the study. Otherwise, if automatic
3518                         publication is switched on, default value is used for result name.
3519
3520             Returns:
3521                 New GEOM.GEOM_Object, containing the created prism.
3522             """
3523             # Example: see GEOM_TestAll.py
3524             anObj = None
3525             Parameters = ""
3526             if theScaleFactor > 0:
3527                 theScaleFactor,Parameters = ParseParameters(theScaleFactor)
3528                 anObj = self.PrimOp.MakePrismTwoPntWithScaling(theBase, thePoint1, thePoint2, theScaleFactor)
3529             else:
3530                 anObj = self.PrimOp.MakePrismTwoPnt(theBase, thePoint1, thePoint2)
3531             RaiseIfFailed("MakePrismTwoPnt", self.PrimOp)
3532             anObj.SetParameters(Parameters)
3533             self._autoPublish(anObj, theName, "prism")
3534             return anObj
3535
3536         ## Create a shape by extrusion of the base shape along a
3537         #  vector, defined by two points, in 2 Ways (forward/backward).
3538         #  @param theBase Base shape to be extruded.
3539         #  @param thePoint1 First end of extrusion vector.
3540         #  @param thePoint2 Second end of extrusion vector.
3541         #  @param theName Object name; when specified, this parameter is used
3542         #         for result publication in the study. Otherwise, if automatic
3543         #         publication is switched on, default value is used for result name.
3544         #
3545         #  @return New GEOM.GEOM_Object, containing the created prism.
3546         #
3547         #  @ref tui_creation_prism "Example"
3548         @ManageTransactions("PrimOp")
3549         def MakePrism2Ways(self, theBase, thePoint1, thePoint2, theName=None):
3550             """
3551             Create a shape by extrusion of the base shape along a
3552             vector, defined by two points, in 2 Ways (forward/backward).
3553
3554             Parameters:
3555                 theBase Base shape to be extruded.
3556                 thePoint1 First end of extrusion vector.
3557                 thePoint2 Second end of extrusion vector.
3558                 theName Object name; when specified, this parameter is used
3559                         for result publication in the study. Otherwise, if automatic
3560                         publication is switched on, default value is used for result name.
3561
3562             Returns:
3563                 New GEOM.GEOM_Object, containing the created prism.
3564             """
3565             # Example: see GEOM_TestAll.py
3566             anObj = self.PrimOp.MakePrismTwoPnt2Ways(theBase, thePoint1, thePoint2)
3567             RaiseIfFailed("MakePrismTwoPnt", self.PrimOp)
3568             self._autoPublish(anObj, theName, "prism")
3569             return anObj
3570
3571         ## Create a shape by extrusion of the base shape along the vector,
3572         #  i.e. all the space, transfixed by the base shape during its translation
3573         #  along the vector on the given distance.
3574         #  @param theBase Base shape to be extruded.
3575         #  @param theVec Direction of extrusion.
3576         #  @param theH Prism dimension along theVec.
3577         #  @param theScaleFactor Use it to make prism with scaled second base.
3578         #                        Negative value means not scaled second base.
3579         #  @param theName Object name; when specified, this parameter is used
3580         #         for result publication in the study. Otherwise, if automatic
3581         #         publication is switched on, default value is used for result name.
3582         #
3583         #  @return New GEOM.GEOM_Object, containing the created prism.
3584         #
3585         #  @ref tui_creation_prism "Example"
3586         @ManageTransactions("PrimOp")
3587         def MakePrismVecH(self, theBase, theVec, theH, theScaleFactor = -1.0, theName=None):
3588             """
3589             Create a shape by extrusion of the base shape along the vector,
3590             i.e. all the space, transfixed by the base shape during its translation
3591             along the vector on the given distance.
3592
3593             Parameters:
3594                 theBase Base shape to be extruded.
3595                 theVec Direction of extrusion.
3596                 theH Prism dimension along theVec.
3597                 theScaleFactor Use it to make prism with scaled second base.
3598                                Negative value means not scaled second base.
3599                 theName Object name; when specified, this parameter is used
3600                         for result publication in the study. Otherwise, if automatic
3601                         publication is switched on, default value is used for result name.
3602
3603             Returns:
3604                 New GEOM.GEOM_Object, containing the created prism.
3605             """
3606             # Example: see GEOM_TestAll.py
3607             anObj = None
3608             Parameters = ""
3609             if theScaleFactor > 0:
3610                 theH,theScaleFactor,Parameters = ParseParameters(theH,theScaleFactor)
3611                 anObj = self.PrimOp.MakePrismVecHWithScaling(theBase, theVec, theH, theScaleFactor)
3612             else:
3613                 theH,Parameters = ParseParameters(theH)
3614                 anObj = self.PrimOp.MakePrismVecH(theBase, theVec, theH)
3615             RaiseIfFailed("MakePrismVecH", self.PrimOp)
3616             anObj.SetParameters(Parameters)
3617             self._autoPublish(anObj, theName, "prism")
3618             return anObj
3619
3620         ## Create a shape by extrusion of the base shape along the vector,
3621         #  i.e. all the space, transfixed by the base shape during its translation
3622         #  along the vector on the given distance in 2 Ways (forward/backward).
3623         #  @param theBase Base shape to be extruded.
3624         #  @param theVec Direction of extrusion.
3625         #  @param theH Prism dimension along theVec in forward direction.
3626         #  @param theName Object name; when specified, this parameter is used
3627         #         for result publication in the study. Otherwise, if automatic
3628         #         publication is switched on, default value is used for result name.
3629         #
3630         #  @return New GEOM.GEOM_Object, containing the created prism.
3631         #
3632         #  @ref tui_creation_prism "Example"
3633         @ManageTransactions("PrimOp")
3634         def MakePrismVecH2Ways(self, theBase, theVec, theH, theName=None):
3635             """
3636             Create a shape by extrusion of the base shape along the vector,
3637             i.e. all the space, transfixed by the base shape during its translation
3638             along the vector on the given distance in 2 Ways (forward/backward).
3639
3640             Parameters:
3641                 theBase Base shape to be extruded.
3642                 theVec Direction of extrusion.
3643                 theH Prism dimension along theVec in forward direction.
3644                 theName Object name; when specified, this parameter is used
3645                         for result publication in the study. Otherwise, if automatic
3646                         publication is switched on, default value is used for result name.
3647
3648             Returns:
3649                 New GEOM.GEOM_Object, containing the created prism.
3650             """
3651             # Example: see GEOM_TestAll.py
3652             theH,Parameters = ParseParameters(theH)
3653             anObj = self.PrimOp.MakePrismVecH2Ways(theBase, theVec, theH)
3654             RaiseIfFailed("MakePrismVecH2Ways", self.PrimOp)
3655             anObj.SetParameters(Parameters)
3656             self._autoPublish(anObj, theName, "prism")
3657             return anObj
3658
3659         ## Create a shape by extrusion of the base shape along the dx, dy, dz direction
3660         #  @param theBase Base shape to be extruded.
3661         #  @param theDX, theDY, theDZ Directions of extrusion.
3662         #  @param theScaleFactor Use it to make prism with scaled second base.
3663         #                        Nagative value means not scaled second base.
3664         #  @param theName Object name; when specified, this parameter is used
3665         #         for result publication in the study. Otherwise, if automatic
3666         #         publication is switched on, default value is used for result name.
3667         #
3668         #  @return New GEOM.GEOM_Object, containing the created prism.
3669         #
3670         #  @ref tui_creation_prism "Example"
3671         @ManageTransactions("PrimOp")
3672         def MakePrismDXDYDZ(self, theBase, theDX, theDY, theDZ, theScaleFactor = -1.0, theName=None):
3673             """
3674             Create a shape by extrusion of the base shape along the dx, dy, dz direction
3675
3676             Parameters:
3677                 theBase Base shape to be extruded.
3678                 theDX, theDY, theDZ Directions of extrusion.
3679                 theScaleFactor Use it to make prism with scaled second base.
3680                                Nagative value means not scaled second base.
3681                 theName Object name; when specified, this parameter is used
3682                         for result publication in the study. Otherwise, if automatic
3683                         publication is switched on, default value is used for result name.
3684
3685             Returns:
3686                 New GEOM.GEOM_Object, containing the created prism.
3687             """
3688             # Example: see GEOM_TestAll.py
3689             anObj = None
3690             Parameters = ""
3691             if theScaleFactor > 0:
3692                 theDX,theDY,theDZ,theScaleFactor,Parameters = ParseParameters(theDX, theDY, theDZ, theScaleFactor)
3693                 anObj = self.PrimOp.MakePrismDXDYDZWithScaling(theBase, theDX, theDY, theDZ, theScaleFactor)
3694             else:
3695                 theDX,theDY,theDZ,Parameters = ParseParameters(theDX, theDY, theDZ)
3696                 anObj = self.PrimOp.MakePrismDXDYDZ(theBase, theDX, theDY, theDZ)
3697             RaiseIfFailed("MakePrismDXDYDZ", self.PrimOp)
3698             anObj.SetParameters(Parameters)
3699             self._autoPublish(anObj, theName, "prism")
3700             return anObj
3701
3702         ## Create a shape by extrusion of the base shape along the dx, dy, dz direction
3703         #  i.e. all the space, transfixed by the base shape during its translation
3704         #  along the vector on the given distance in 2 Ways (forward/backward).
3705         #  @param theBase Base shape to be extruded.
3706         #  @param theDX, theDY, theDZ Directions of extrusion.
3707         #  @param theName Object name; when specified, this parameter is used
3708         #         for result publication in the study. Otherwise, if automatic
3709         #         publication is switched on, default value is used for result name.
3710         #
3711         #  @return New GEOM.GEOM_Object, containing the created prism.
3712         #
3713         #  @ref tui_creation_prism "Example"
3714         @ManageTransactions("PrimOp")
3715         def MakePrismDXDYDZ2Ways(self, theBase, theDX, theDY, theDZ, theName=None):
3716             """
3717             Create a shape by extrusion of the base shape along the dx, dy, dz direction
3718             i.e. all the space, transfixed by the base shape during its translation
3719             along the vector on the given distance in 2 Ways (forward/backward).
3720
3721             Parameters:
3722                 theBase Base shape to be extruded.
3723                 theDX, theDY, theDZ Directions of extrusion.
3724                 theName Object name; when specified, this parameter is used
3725                         for result publication in the study. Otherwise, if automatic
3726                         publication is switched on, default value is used for result name.
3727
3728             Returns:
3729                 New GEOM.GEOM_Object, containing the created prism.
3730             """
3731             # Example: see GEOM_TestAll.py
3732             theDX,theDY,theDZ,Parameters = ParseParameters(theDX, theDY, theDZ)
3733             anObj = self.PrimOp.MakePrismDXDYDZ2Ways(theBase, theDX, theDY, theDZ)
3734             RaiseIfFailed("MakePrismDXDYDZ2Ways", self.PrimOp)
3735             anObj.SetParameters(Parameters)
3736             self._autoPublish(anObj, theName, "prism")
3737             return anObj
3738
3739         ## Create a shape by revolution of the base shape around the axis
3740         #  on the given angle, i.e. all the space, transfixed by the base
3741         #  shape during its rotation around the axis on the given angle.
3742         #  @param theBase Base shape to be rotated.
3743         #  @param theAxis Rotation axis.
3744         #  @param theAngle Rotation angle in radians.
3745         #  @param theName Object name; when specified, this parameter is used
3746         #         for result publication in the study. Otherwise, if automatic
3747         #         publication is switched on, default value is used for result name.
3748         #
3749         #  @return New GEOM.GEOM_Object, containing the created revolution.
3750         #
3751         #  @ref tui_creation_revolution "Example"
3752         @ManageTransactions("PrimOp")
3753         def MakeRevolution(self, theBase, theAxis, theAngle, theName=None):
3754             """
3755             Create a shape by revolution of the base shape around the axis
3756             on the given angle, i.e. all the space, transfixed by the base
3757             shape during its rotation around the axis on the given angle.
3758
3759             Parameters:
3760                 theBase Base shape to be rotated.
3761                 theAxis Rotation axis.
3762                 theAngle Rotation angle in radians.
3763                 theName Object name; when specified, this parameter is used
3764                         for result publication in the study. Otherwise, if automatic
3765                         publication is switched on, default value is used for result name.
3766
3767             Returns:
3768                 New GEOM.GEOM_Object, containing the created revolution.
3769             """
3770             # Example: see GEOM_TestAll.py
3771             theAngle,Parameters = ParseParameters(theAngle)
3772             anObj = self.PrimOp.MakeRevolutionAxisAngle(theBase, theAxis, theAngle)
3773             RaiseIfFailed("MakeRevolutionAxisAngle", self.PrimOp)
3774             anObj.SetParameters(Parameters)
3775             self._autoPublish(anObj, theName, "revolution")
3776             return anObj
3777
3778         ## Create a shape by revolution of the base shape around the axis
3779         #  on the given angle, i.e. all the space, transfixed by the base
3780         #  shape during its rotation around the axis on the given angle in
3781         #  both directions (forward/backward)
3782         #  @param theBase Base shape to be rotated.
3783         #  @param theAxis Rotation axis.
3784         #  @param theAngle Rotation angle in radians.
3785         #  @param theName Object name; when specified, this parameter is used
3786         #         for result publication in the study. Otherwise, if automatic
3787         #         publication is switched on, default value is used for result name.
3788         #
3789         #  @return New GEOM.GEOM_Object, containing the created revolution.
3790         #
3791         #  @ref tui_creation_revolution "Example"
3792         @ManageTransactions("PrimOp")
3793         def MakeRevolution2Ways(self, theBase, theAxis, theAngle, theName=None):
3794             """
3795             Create a shape by revolution of the base shape around the axis
3796             on the given angle, i.e. all the space, transfixed by the base
3797             shape during its rotation around the axis on the given angle in
3798             both directions (forward/backward).
3799
3800             Parameters:
3801                 theBase Base shape to be rotated.
3802                 theAxis Rotation axis.
3803                 theAngle Rotation angle in radians.
3804                 theName Object name; when specified, this parameter is used
3805                         for result publication in the study. Otherwise, if automatic
3806                         publication is switched on, default value is used for result name.
3807
3808             Returns:
3809                 New GEOM.GEOM_Object, containing the created revolution.
3810             """
3811             theAngle,Parameters = ParseParameters(theAngle)
3812             anObj = self.PrimOp.MakeRevolutionAxisAngle2Ways(theBase, theAxis, theAngle)
3813             RaiseIfFailed("MakeRevolutionAxisAngle2Ways", self.PrimOp)
3814             anObj.SetParameters(Parameters)
3815             self._autoPublish(anObj, theName, "revolution")
3816             return anObj
3817
3818         ## Create a face from a given set of contours.
3819         #  @param theContours either a list or a compound of edges/wires.
3820         #  @param theMinDeg a minimal degree of BSpline surface to create.
3821         #  @param theMaxDeg a maximal degree of BSpline surface to create.
3822         #  @param theTol2D a 2d tolerance to be reached.
3823         #  @param theTol3D a 3d tolerance to be reached.
3824         #  @param theNbIter a number of iteration of approximation algorithm.
3825         #  @param theMethod Kind of method to perform filling operation
3826         #         (see GEOM.filling_oper_method enum).
3827         #  @param isApprox if True, BSpline curves are generated in the process
3828         #                  of surface construction. By default it is False, that means
3829         #                  the surface is created using given curves. The usage of
3830         #                  Approximation makes the algorithm work slower, but allows
3831         #                  building the surface for rather complex cases.
3832         #  @param theName Object name; when specified, this parameter is used
3833         #         for result publication in the study. Otherwise, if automatic
3834         #         publication is switched on, default value is used for result name.
3835         #
3836         #  @return New GEOM.GEOM_Object (face), containing the created filling surface.
3837         #
3838         #  @ref tui_creation_filling "Example"
3839         @ManageTransactions("PrimOp")
3840         def MakeFilling(self, theContours, theMinDeg=2, theMaxDeg=5, theTol2D=0.0001,
3841                         theTol3D=0.0001, theNbIter=0, theMethod=GEOM.FOM_Default, isApprox=0, theName=None):
3842             """
3843             Create a face from a given set of contours.
3844
3845             Parameters:
3846                 theContours either a list or a compound of edges/wires.
3847                 theMinDeg a minimal degree of BSpline surface to create.
3848                 theMaxDeg a maximal degree of BSpline surface to create.
3849                 theTol2D a 2d tolerance to be reached.
3850                 theTol3D a 3d tolerance to be reached.
3851                 theNbIter a number of iteration of approximation algorithm.
3852                 theMethod Kind of method to perform filling operation
3853                           (see GEOM.filling_oper_method enum).
3854                 isApprox if True, BSpline curves are generated in the process
3855                          of surface construction. By default it is False, that means
3856                          the surface is created using given curves. The usage of
3857                          Approximation makes the algorithm work slower, but allows
3858                          building the surface for rather complex cases.
3859                 theName Object name; when specified, this parameter is used
3860                         for result publication in the study. Otherwise, if automatic
3861                         publication is switched on, default value is used for result name.
3862
3863             Returns:
3864                 New GEOM.GEOM_Object (face), containing the created filling surface.
3865
3866             Example of usage:
3867                 filling = geompy.MakeFilling(compound, 2, 5, 0.0001, 0.0001, 5)
3868             """
3869             # Example: see GEOM_TestAll.py
3870             theMinDeg,theMaxDeg,theTol2D,theTol3D,theNbIter,Parameters = ParseParameters(theMinDeg, theMaxDeg, theTol2D, theTol3D, theNbIter)
3871             anObj = self.PrimOp.MakeFilling(ToList(theContours), theMinDeg, theMaxDeg,
3872                                             theTol2D, theTol3D, theNbIter,
3873                                             theMethod, isApprox)
3874             RaiseIfFailed("MakeFilling", self.PrimOp)
3875             anObj.SetParameters(Parameters)
3876             self._autoPublish(anObj, theName, "filling")
3877             return anObj
3878
3879
3880         ## Create a face from a given set of contours.
3881         #  This method corresponds to MakeFilling() with isApprox=True.
3882         #  @param theContours either a list or a compound of edges/wires.
3883         #  @param theMinDeg a minimal degree of BSpline surface to create.
3884         #  @param theMaxDeg a maximal degree of BSpline surface to create.
3885         #  @param theTol3D a 3d tolerance to be reached.
3886         #  @param theName Object name; when specified, this parameter is used
3887         #         for result publication in the study. Otherwise, if automatic
3888         #         publication is switched on, default value is used for result name.
3889         #
3890         #  @return New GEOM.GEOM_Object (face), containing the created filling surface.
3891         #
3892         #  @ref tui_creation_filling "Example"
3893         @ManageTransactions("PrimOp")
3894         def MakeFillingNew(self, theContours, theMinDeg=2, theMaxDeg=5, theTol3D=0.0001, theName=None):
3895             """
3896             Create a filling from the given compound of contours.
3897             This method corresponds to MakeFilling() with isApprox=True.
3898
3899             Parameters:
3900                 theContours either a list or a compound of edges/wires.
3901                 theMinDeg a minimal degree of BSpline surface to create.
3902                 theMaxDeg a maximal degree of BSpline surface to create.
3903                 theTol3D a 3d tolerance to be reached.
3904                 theName Object name; when specified, this parameter is used
3905                         for result publication in the study. Otherwise, if automatic
3906                         publication is switched on, default value is used for result name.
3907
3908             Returns:
3909                 New GEOM.GEOM_Object (face), containing the created filling surface.
3910
3911             Example of usage:
3912                 filling = geompy.MakeFillingNew(compound, 2, 5, 0.0001)
3913             """
3914             # Example: see GEOM_TestAll.py
3915             theMinDeg,theMaxDeg,theTol3D,Parameters = ParseParameters(theMinDeg, theMaxDeg, theTol3D)
3916             anObj = self.PrimOp.MakeFilling(ToList(theContours), theMinDeg, theMaxDeg,
3917                                             0, theTol3D, 0, GEOM.FOM_Default, True)
3918             RaiseIfFailed("MakeFillingNew", self.PrimOp)
3919             anObj.SetParameters(Parameters)
3920             self._autoPublish(anObj, theName, "filling")
3921             return anObj
3922
3923         ## Create a shell or solid passing through set of sections.Sections should be wires,edges or vertices.
3924         #  @param theSeqSections - set of specified sections.
3925         #  @param theModeSolid - mode defining building solid or shell
3926         #  @param thePreci - precision 3D used for smoothing
3927         #  @param theRuled - mode defining type of the result surfaces (ruled or smoothed).
3928         #  @param theName Object name; when specified, this parameter is used
3929         #         for result publication in the study. Otherwise, if automatic
3930         #         publication is switched on, default value is used for result name.
3931         #
3932         #  @return New GEOM.GEOM_Object, containing the created shell or solid.
3933         #
3934         #  @ref swig_todo "Example"
3935         @ManageTransactions("PrimOp")
3936         def MakeThruSections(self, theSeqSections, theModeSolid, thePreci, theRuled, theName=None):
3937             """
3938             Create a shell or solid passing through set of sections.Sections should be wires,edges or vertices.
3939
3940             Parameters:
3941                 theSeqSections - set of specified sections.
3942                 theModeSolid - mode defining building solid or shell
3943                 thePreci - precision 3D used for smoothing
3944                 theRuled - mode defining type of the result surfaces (ruled or smoothed).
3945                 theName Object name; when specified, this parameter is used
3946                         for result publication in the study. Otherwise, if automatic
3947                         publication is switched on, default value is used for result name.
3948
3949             Returns:
3950                 New GEOM.GEOM_Object, containing the created shell or solid.
3951             """
3952             # Example: see GEOM_TestAll.py
3953             anObj = self.PrimOp.MakeThruSections(theSeqSections,theModeSolid,thePreci,theRuled)
3954             RaiseIfFailed("MakeThruSections", self.PrimOp)
3955             self._autoPublish(anObj, theName, "filling")
3956             return anObj
3957
3958         ## Create a shape by extrusion of the base shape along
3959         #  the path shape. The path shape can be a wire or an edge. It is
3960         #  possible to generate groups along with the result by means of
3961         #  setting the flag \a IsGenerateGroups.<BR>
3962         #  If \a thePath is a closed edge or wire and \a IsGenerateGroups is
3963         #  set, an error is occurred. If \a thePath is not closed edge/wire,
3964         #  the following groups are returned:
3965         #  - If \a theBase is unclosed edge or wire: "Down", "Up", "Side1",
3966         #    "Side2";
3967         #  - If \a theBase is closed edge or wire, face or shell: "Down", "Up",
3968         #    "Other".
3969         #  .
3970         #  "Down" and "Up" groups contain:
3971         #  - Edges if \a theBase is edge or wire;
3972         #  - Faces if \a theBase is face or shell.<BR>
3973         #  .
3974         #  "Side1" and "Side2" groups contain edges generated from the first
3975         #  and last vertices of \a theBase. The first and last vertices are
3976         #  determined taking into account edge/wire orientation.<BR>
3977         #  "Other" group represents faces generated from the bounding edges of
3978         #  \a theBase.
3979         #
3980         #  @param theBase Base shape to be extruded.
3981         #  @param thePath Path shape to extrude the base shape along it.
3982         #  @param IsGenerateGroups flag that tells if it is necessary to
3983         #         create groups. It is equal to False by default.
3984         #  @param theName Object name; when specified, this parameter is used
3985         #         for result publication in the study. Otherwise, if automatic
3986         #         publication is switched on, default value is used for result name.
3987         #
3988         #  @return New GEOM.GEOM_Object, containing the created pipe if 
3989         #          \a IsGenerateGroups is not set. Otherwise it returns a
3990         #          list of GEOM.GEOM_Object. Its first element is the created pipe, the
3991         #          remaining ones are created groups.
3992         #
3993         #  @ref tui_creation_pipe "Example"
3994         @ManageTransactions("PrimOp")
3995         def MakePipe(self, theBase, thePath,
3996                      IsGenerateGroups=False, theName=None):
3997             """
3998             Create a shape by extrusion of the base shape along
3999             the path shape. The path shape can be a wire or an edge. It is
4000             possible to generate groups along with the result by means of
4001             setting the flag IsGenerateGroups.
4002             If thePath is a closed edge or wire and IsGenerateGroups is
4003             set, an error is occurred. If thePath is not closed edge/wire,
4004             the following groups are returned:
4005             - If theBase is unclosed edge or wire: "Down", "Up", "Side1",
4006               "Side2";
4007             - If theBase is closed edge or wire, face or shell: "Down", "Up",
4008               "Other".
4009             "Down" and "Up" groups contain:
4010             - Edges if theBase is edge or wire;
4011             - Faces if theBase is face or shell.
4012             "Side1" and "Side2" groups contain edges generated from the first
4013             and last vertices of theBase. The first and last vertices are
4014             determined taking into account edge/wire orientation.
4015             "Other" group represents faces generated from the bounding edges of
4016             theBase.
4017
4018             Parameters:
4019                 theBase Base shape to be extruded.
4020                 thePath Path shape to extrude the base shape along it.
4021                 IsGenerateGroups flag that tells if it is necessary to
4022                         create groups. It is equal to False by default.
4023                 theName Object name; when specified, this parameter is used
4024                         for result publication in the study. Otherwise, if automatic
4025                         publication is switched on, default value is used for result name.
4026
4027             Returns:
4028                 New GEOM.GEOM_Object, containing the created pipe if 
4029                 IsGenerateGroups is not set. Otherwise it returns a
4030                 list of GEOM.GEOM_Object. Its first element is the created pipe, the
4031                 remaining ones are created groups.
4032             """
4033             # Example: see GEOM_TestAll.py
4034             aList = self.PrimOp.MakePipe(theBase, thePath, IsGenerateGroups)
4035             RaiseIfFailed("MakePipe", self.PrimOp)
4036
4037             if IsGenerateGroups:
4038               self._autoPublish(aList, theName, "pipe")
4039               return aList
4040
4041             self._autoPublish(aList[0], theName, "pipe")
4042             return aList[0]
4043
4044         ## Create a shape by extrusion of the profile shape along
4045         #  the path shape. The path shape can be a wire or an edge.
4046         #  the several profiles can be specified in the several locations of path.
4047         #  It is possible to generate groups along with the result by means of
4048         #  setting the flag \a IsGenerateGroups. For detailed information on
4049         #  groups that can be created please see the method MakePipe().
4050         #  @param theSeqBases - list of  Bases shape to be extruded.
4051         #  @param theLocations - list of locations on the path corresponding
4052         #                        specified list of the Bases shapes. Number of locations
4053         #                        should be equal to number of bases or list of locations can be empty.
4054         #  @param thePath - Path shape to extrude the base shape along it.
4055         #  @param theWithContact - the mode defining that the section is translated to be in
4056         #                          contact with the spine.
4057         #  @param theWithCorrection - defining that the section is rotated to be
4058         #                             orthogonal to the spine tangent in the correspondent point
4059         #  @param IsGenerateGroups - flag that tells if it is necessary to
4060         #                          create groups. It is equal to False by default.
4061         #  @param theName Object name; when specified, this parameter is used
4062         #         for result publication in the study. Otherwise, if automatic
4063         #         publication is switched on, default value is used for result name.
4064         #
4065         #  @return New GEOM.GEOM_Object, containing the created pipe if 
4066         #          \a IsGenerateGroups is not set. Otherwise it returns new
4067         #          GEOM.ListOfGO. Its first element is the created pipe, the
4068         #          remaining ones are created groups.
4069         #
4070         #  @ref tui_creation_pipe_with_diff_sec "Example"
4071         @ManageTransactions("PrimOp")
4072         def MakePipeWithDifferentSections(self, theSeqBases,
4073                                           theLocations, thePath,
4074                                           theWithContact, theWithCorrection,
4075                                           IsGenerateGroups=False, theName=None):
4076             """
4077             Create a shape by extrusion of the profile shape along
4078             the path shape. The path shape can be a wire or an edge.
4079             the several profiles can be specified in the several locations of path.
4080             It is possible to generate groups along with the result by means of
4081             setting the flag IsGenerateGroups. For detailed information on
4082             groups that can be created please see the method geompy.MakePipe().
4083
4084             Parameters:
4085                 theSeqBases - list of  Bases shape to be extruded.
4086                 theLocations - list of locations on the path corresponding
4087                                specified list of the Bases shapes. Number of locations
4088                                should be equal to number of bases or list of locations can be empty.
4089                 thePath - Path shape to extrude the base shape along it.
4090                 theWithContact - the mode defining that the section is translated to be in
4091                                  contact with the spine(0/1)
4092                 theWithCorrection - defining that the section is rotated to be
4093                                     orthogonal to the spine tangent in the correspondent point (0/1)
4094                 IsGenerateGroups - flag that tells if it is necessary to
4095                                  create groups. It is equal to False by default.
4096                 theName Object name; when specified, this parameter is used
4097                         for result publication in the study. Otherwise, if automatic
4098                         publication is switched on, default value is used for result name.
4099
4100             Returns:
4101                 New GEOM.GEOM_Object, containing the created pipe if 
4102                 IsGenerateGroups is not set. Otherwise it returns new
4103                 GEOM.ListOfGO. Its first element is the created pipe, the
4104                 remaining ones are created groups.
4105             """
4106             aList = self.PrimOp.MakePipeWithDifferentSections(theSeqBases,
4107                                                               theLocations, thePath,
4108                                                               theWithContact, theWithCorrection,
4109                                                               False, IsGenerateGroups)
4110             RaiseIfFailed("MakePipeWithDifferentSections", self.PrimOp)
4111
4112             if IsGenerateGroups:
4113               self._autoPublish(aList, theName, "pipe")
4114               return aList
4115
4116             self._autoPublish(aList[0], theName, "pipe")
4117             return aList[0]
4118
4119         ## Create a shape by extrusion of the profile shape along
4120         #  the path shape. This function is a version of
4121         #  MakePipeWithDifferentSections() with the same parameters, except
4122         #  eliminated theWithContact and theWithCorrection. So it is
4123         #  possible to find the description of all parameters is in this
4124         #  method. The difference is that this method performs the operation
4125         #  step by step, i.e. it creates pipes between each pair of neighbor
4126         #  sections and fuses them into a single shape.
4127         #
4128         #  @ref tui_creation_pipe_with_diff_sec "Example"
4129         @ManageTransactions("PrimOp")
4130         def MakePipeWithDifferentSectionsBySteps(self, theSeqBases,
4131                                                  theLocations, thePath,
4132                                                  IsGenerateGroups=False, theName=None):
4133             """
4134             Create a shape by extrusion of the profile shape along
4135             the path shape. This function is a version of
4136             MakePipeWithDifferentSections() with the same parameters, except
4137             eliminated theWithContact and theWithCorrection. So it is
4138             possible to find the description of all parameters is in this
4139             method. The difference is that this method performs the operation
4140             step by step, i.e. it creates pipes between each pair of neighbor
4141             sections and fuses them into a single shape.
4142             """
4143             aList = self.PrimOp.MakePipeWithDifferentSections(theSeqBases,
4144                                                               theLocations, thePath,
4145                                                               False, False,
4146                                                               True, IsGenerateGroups)
4147             RaiseIfFailed("MakePipeWithDifferentSectionsBySteps", self.PrimOp)
4148
4149             if IsGenerateGroups:
4150               self._autoPublish(aList, theName, "pipe")
4151               return aList
4152
4153             self._autoPublish(aList[0], theName, "pipe")
4154             return aList[0]
4155
4156         ## Create a shape by extrusion of the profile shape along
4157         #  the path shape. The path shape can be a wire or an edge.
4158         #  the several profiles can be specified in the several locations of path.
4159         #  It is possible to generate groups along with the result by means of
4160         #  setting the flag \a IsGenerateGroups. For detailed information on
4161         #  groups that can be created please see the method MakePipe().
4162         #  @param theSeqBases - list of  Bases shape to be extruded. Base shape must be
4163         #                       shell or face. If number of faces in neighbour sections
4164         #                       aren't coincided result solid between such sections will
4165         #                       be created using external boundaries of this shells.
4166         #  @param theSeqSubBases - list of corresponding sub-shapes of section shapes.
4167         #                          This list is used for searching correspondences between
4168         #                          faces in the sections. Size of this list must be equal
4169         #                          to size of list of base shapes.
4170         #  @param theLocations - list of locations on the path corresponding
4171         #                        specified list of the Bases shapes. Number of locations
4172         #                        should be equal to number of bases. First and last
4173         #                        locations must be coincided with first and last vertexes
4174         #                        of path correspondingly.
4175         #  @param thePath - Path shape to extrude the base shape along it.
4176         #  @param theWithContact - the mode defining that the section is translated to be in
4177         #                          contact with the spine.
4178         #  @param theWithCorrection - defining that the section is rotated to be
4179         #                             orthogonal to the spine tangent in the correspondent point
4180         #  @param IsGenerateGroups - flag that tells if it is necessary to
4181         #                          create groups. It is equal to False by default.
4182         #  @param theName Object name; when specified, this parameter is used
4183         #         for result publication in the study. Otherwise, if automatic
4184         #         publication is switched on, default value is used for result name.
4185         #
4186         #  @return New GEOM.GEOM_Object, containing the created solids if 
4187         #          \a IsGenerateGroups is not set. Otherwise it returns new
4188         #          GEOM.ListOfGO. Its first element is the created solids, the
4189         #          remaining ones are created groups.
4190         #
4191         #  @ref tui_creation_pipe_with_shell_sec "Example"
4192         @ManageTransactions("PrimOp")
4193         def MakePipeWithShellSections(self, theSeqBases, theSeqSubBases,
4194                                       theLocations, thePath,
4195                                       theWithContact, theWithCorrection,
4196                                       IsGenerateGroups=False, theName=None):
4197             """
4198             Create a shape by extrusion of the profile shape along
4199             the path shape. The path shape can be a wire or an edge.
4200             the several profiles can be specified in the several locations of path.
4201             It is possible to generate groups along with the result by means of
4202             setting the flag IsGenerateGroups. For detailed information on
4203             groups that can be created please see the method geompy.MakePipe().
4204
4205             Parameters:
4206                 theSeqBases - list of  Bases shape to be extruded. Base shape must be
4207                               shell or face. If number of faces in neighbour sections
4208                               aren't coincided result solid between such sections will
4209                               be created using external boundaries of this shells.
4210                 theSeqSubBases - list of corresponding sub-shapes of section shapes.
4211                                  This list is used for searching correspondences between
4212                                  faces in the sections. Size of this list must be equal
4213                                  to size of list of base shapes.
4214                 theLocations - list of locations on the path corresponding
4215                                specified list of the Bases shapes. Number of locations
4216                                should be equal to number of bases. First and last
4217                                locations must be coincided with first and last vertexes
4218                                of path correspondingly.
4219                 thePath - Path shape to extrude the base shape along it.
4220                 theWithContact - the mode defining that the section is translated to be in
4221                                  contact with the spine (0/1)
4222                 theWithCorrection - defining that the section is rotated to be
4223                                     orthogonal to the spine tangent in the correspondent point (0/1)
4224                 IsGenerateGroups - flag that tells if it is necessary to
4225                                  create groups. It is equal to False by default.
4226                 theName Object name; when specified, this parameter is used
4227                         for result publication in the study. Otherwise, if automatic
4228                         publication is switched on, default value is used for result name.
4229
4230             Returns:
4231                 New GEOM.GEOM_Object, containing the created solids if 
4232                 IsGenerateGroups is not set. Otherwise it returns new
4233                 GEOM.ListOfGO. Its first element is the created solids, the
4234                 remaining ones are created groups.
4235             """
4236             aList = self.PrimOp.MakePipeWithShellSections(theSeqBases, theSeqSubBases,
4237                                                           theLocations, thePath,
4238                                                           theWithContact, theWithCorrection,
4239                                                           IsGenerateGroups)
4240             RaiseIfFailed("MakePipeWithShellSections", self.PrimOp)
4241
4242             if IsGenerateGroups:
4243               self._autoPublish(aList, theName, "pipe")
4244               return aList
4245
4246             self._autoPublish(aList[0], theName, "pipe")
4247             return aList[0]
4248
4249         ## Create a shape by extrusion of the profile shape along
4250         #  the path shape. This function is used only for debug pipe
4251         #  functionality - it is a version of function MakePipeWithShellSections()
4252         #  which give a possibility to receive information about
4253         #  creating pipe between each pair of sections step by step.
4254         @ManageTransactions("PrimOp")
4255         def MakePipeWithShellSectionsBySteps(self, theSeqBases, theSeqSubBases,
4256                                              theLocations, thePath,
4257                                              theWithContact, theWithCorrection,
4258                                              IsGenerateGroups=False, theName=None):
4259             """
4260             Create a shape by extrusion of the profile shape along
4261             the path shape. This function is used only for debug pipe
4262             functionality - it is a version of previous function
4263             geompy.MakePipeWithShellSections() which give a possibility to
4264             receive information about creating pipe between each pair of
4265             sections step by step.
4266             """
4267             res = []
4268             nbsect = len(theSeqBases)
4269             nbsubsect = len(theSeqSubBases)
4270             #print "nbsect = ",nbsect
4271             for i in range(1,nbsect):
4272                 #print "  i = ",i
4273                 tmpSeqBases = [ theSeqBases[i-1], theSeqBases[i] ]
4274                 tmpLocations = [ theLocations[i-1], theLocations[i] ]
4275                 tmpSeqSubBases = []
4276                 if nbsubsect>0: tmpSeqSubBases = [ theSeqSubBases[i-1], theSeqSubBases[i] ]
4277                 aList = self.PrimOp.MakePipeWithShellSections(tmpSeqBases, tmpSeqSubBases,
4278                                                               tmpLocations, thePath,
4279                                                               theWithContact, theWithCorrection,
4280                                                               IsGenerateGroups)
4281                 if self.PrimOp.IsDone() == 0:
4282                     print("Problems with pipe creation between ",i," and ",i+1," sections")
4283                     RaiseIfFailed("MakePipeWithShellSections", self.PrimOp)
4284                     break
4285                 else:
4286                     print("Pipe between ",i," and ",i+1," sections is OK")
4287                     res.append(aList[0])
4288                     pass
4289                 pass
4290
4291             resc = self.MakeCompound(res)
4292             #resc = self.MakeSewing(res, 0.001)
4293             #print "resc: ",resc
4294             self._autoPublish(resc, theName, "pipe")
4295             return resc
4296
4297         ## Create solids between given sections.
4298         #  It is possible to generate groups along with the result by means of
4299         #  setting the flag \a IsGenerateGroups. For detailed information on
4300         #  groups that can be created please see the method MakePipe().
4301         #  @param theSeqBases - list of sections (shell or face).
4302         #  @param theLocations - list of corresponding vertexes
4303         #  @param IsGenerateGroups - flag that tells if it is necessary to
4304         #         create groups. It is equal to False by default.
4305         #  @param theName Object name; when specified, this parameter is used
4306         #         for result publication in the study. Otherwise, if automatic
4307         #         publication is switched on, default value is used for result name.
4308         #
4309         #  @return New GEOM.GEOM_Object, containing the created solids if 
4310         #          \a IsGenerateGroups is not set. Otherwise it returns new
4311         #          GEOM.ListOfGO. Its first element is the created solids, the
4312         #          remaining ones are created groups.
4313         #
4314         #  @ref tui_creation_pipe_without_path "Example"
4315         @ManageTransactions("PrimOp")
4316         def MakePipeShellsWithoutPath(self, theSeqBases, theLocations,
4317                                       IsGenerateGroups=False, theName=None):
4318             """
4319             Create solids between given sections.
4320             It is possible to generate groups along with the result by means of
4321             setting the flag IsGenerateGroups. For detailed information on
4322             groups that can be created please see the method geompy.MakePipe().
4323
4324             Parameters:
4325                 theSeqBases - list of sections (shell or face).
4326                 theLocations - list of corresponding vertexes
4327                 IsGenerateGroups - flag that tells if it is necessary to
4328                                  create groups. It is equal to False by default.
4329                 theName Object name; when specified, this parameter is used
4330                         for result publication in the study. Otherwise, if automatic
4331                         publication is switched on, default value is used for result name.
4332
4333             Returns:
4334                 New GEOM.GEOM_Object, containing the created solids if 
4335                 IsGenerateGroups is not set. Otherwise it returns new
4336                 GEOM.ListOfGO. Its first element is the created solids, the
4337                 remaining ones are created groups.
4338             """
4339             aList = self.PrimOp.MakePipeShellsWithoutPath(theSeqBases, theLocations,
4340                                                           IsGenerateGroups)
4341             RaiseIfFailed("MakePipeShellsWithoutPath", self.PrimOp)
4342
4343             if IsGenerateGroups:
4344               self._autoPublish(aList, theName, "pipe")
4345               return aList
4346
4347             self._autoPublish(aList[0], theName, "pipe")
4348             return aList[0]
4349
4350         ## Create a shape by extrusion of the base shape along
4351         #  the path shape with constant bi-normal direction along the given vector.
4352         #  The path shape can be a wire or an edge.
4353         #  It is possible to generate groups along with the result by means of
4354         #  setting the flag \a IsGenerateGroups. For detailed information on
4355         #  groups that can be created please see the method MakePipe().
4356         #  @param theBase Base shape to be extruded.
4357         #  @param thePath Path shape to extrude the base shape along it.
4358         #  @param theVec Vector defines a constant binormal direction to keep the
4359         #                same angle between the direction and the sections
4360         #                along the sweep surface.
4361         #  @param IsGenerateGroups flag that tells if it is necessary to
4362         #         create groups. It is equal to False by default.
4363         #  @param theName Object name; when specified, this parameter is used
4364         #         for result publication in the study. Otherwise, if automatic
4365         #         publication is switched on, default value is used for result name.
4366         #
4367         #  @return New GEOM.GEOM_Object, containing the created pipe if 
4368         #          \a IsGenerateGroups is not set. Otherwise it returns new
4369         #          GEOM.ListOfGO. Its first element is the created pipe, the
4370         #          remaining ones are created groups.
4371         #
4372         #  @ref tui_creation_pipe "Example"
4373         @ManageTransactions("PrimOp")
4374         def MakePipeBiNormalAlongVector(self, theBase, thePath, theVec,
4375                                         IsGenerateGroups=False, theName=None):
4376             """
4377             Create a shape by extrusion of the base shape along
4378             the path shape with constant bi-normal direction along the given vector.
4379             The path shape can be a wire or an edge.
4380             It is possible to generate groups along with the result by means of
4381             setting the flag IsGenerateGroups. For detailed information on
4382             groups that can be created please see the method geompy.MakePipe().
4383
4384             Parameters:
4385                 theBase Base shape to be extruded.
4386                 thePath Path shape to extrude the base shape along it.
4387                 theVec Vector defines a constant binormal direction to keep the
4388                        same angle between the direction and the sections
4389                        along the sweep surface.
4390                 IsGenerateGroups flag that tells if it is necessary to
4391                                  create groups. It is equal to False by default.
4392                 theName Object name; when specified, this parameter is used
4393                         for result publication in the study. Otherwise, if automatic
4394                         publication is switched on, default value is used for result name.
4395
4396             Returns:
4397                 New GEOM.GEOM_Object, containing the created pipe if 
4398                 IsGenerateGroups is not set. Otherwise it returns new
4399                 GEOM.ListOfGO. Its first element is the created pipe, the
4400                 remaining ones are created groups.
4401             """
4402             # Example: see GEOM_TestAll.py
4403             aList = self.PrimOp.MakePipeBiNormalAlongVector(theBase, thePath,
4404                           theVec, IsGenerateGroups)
4405             RaiseIfFailed("MakePipeBiNormalAlongVector", self.PrimOp)
4406
4407             if IsGenerateGroups:
4408               self._autoPublish(aList, theName, "pipe")
4409               return aList
4410
4411             self._autoPublish(aList[0], theName, "pipe")
4412             return aList[0]
4413
4414         ## Makes a thick solid from a shape. If the input is a surface shape
4415         #  (face or shell) the result is a thick solid. If an input shape is
4416         #  a solid the result is a hollowed solid with removed faces.
4417         #  @param theShape Face or Shell to get thick solid or solid to get
4418         #         hollowed solid.
4419         #  @param theThickness Thickness of the resulting solid
4420         #  @param theFacesIDs the list of face IDs to be removed from the
4421         #         result. It is ignored if \a theShape is a face or a shell.
4422         #         It is empty by default. 
4423         #  @param theInside If true the thickness is applied towards inside
4424         #  @param theName Object name; when specified, this parameter is used
4425         #         for result publication in the study. Otherwise, if automatic
4426         #         publication is switched on, default value is used for result name.
4427         #
4428         #  @return New GEOM.GEOM_Object, containing the created solid
4429         #
4430         #  @ref tui_creation_thickness "Example"
4431         @ManageTransactions("PrimOp")
4432         def MakeThickSolid(self, theShape, theThickness,
4433                            theFacesIDs=[], theInside=False, theName=None):
4434             """
4435             Make a thick solid from a shape. If the input is a surface shape
4436             (face or shell) the result is a thick solid. If an input shape is
4437             a solid the result is a hollowed solid with removed faces.
4438
4439             Parameters:
4440                  theShape Face or Shell to get thick solid or solid to get
4441                           hollowed solid.
4442                  theThickness Thickness of the resulting solid
4443                  theFacesIDs the list of face IDs to be removed from the
4444                           result. It is ignored if theShape is a face or a
4445                           shell. It is empty by default. 
4446                  theInside If true the thickness is applied towards inside
4447                  theName Object name; when specified, this parameter is used
4448                          for result publication in the study. Otherwise, if automatic
4449                          publication is switched on, default value is used for result name.
4450
4451             Returns:
4452                 New GEOM.GEOM_Object, containing the created solid
4453             """
4454             # Example: see GEOM_TestAll.py
4455             theThickness,Parameters = ParseParameters(theThickness)
4456             anObj = self.PrimOp.MakeThickening(theShape, theFacesIDs,
4457                                                theThickness, True, theInside)
4458             RaiseIfFailed("MakeThickSolid", self.PrimOp)
4459             anObj.SetParameters(Parameters)
4460             self._autoPublish(anObj, theName, "thickSolid")
4461             return anObj
4462
4463
4464         ## Modifies a shape to make it a thick solid. If the input is a surface
4465         #  shape (face or shell) the result is a thick solid. If an input shape
4466         #  is a solid the result is a hollowed solid with removed faces.
4467         #  @param theShape Face or Shell to get thick solid or solid to get
4468         #         hollowed solid.
4469         #  @param theThickness Thickness of the resulting solid
4470         #  @param theFacesIDs the list of face IDs to be removed from the
4471         #         result. It is ignored if \a theShape is a face or a shell.
4472         #         It is empty by default. 
4473         #  @param theInside If true the thickness is applied towards inside
4474         #
4475         #  @return The modified shape
4476         #
4477         #  @ref tui_creation_thickness "Example"
4478         @ManageTransactions("PrimOp")
4479         def Thicken(self, theShape, theThickness, theFacesIDs=[], theInside=False):
4480             """
4481             Modifies a shape to make it a thick solid. If the input is a
4482             surface shape (face or shell) the result is a thick solid. If
4483             an input shape is a solid the result is a hollowed solid with
4484             removed faces.
4485
4486             Parameters:
4487                 theShape Face or Shell to get thick solid or solid to get
4488                          hollowed solid.
4489                 theThickness Thickness of the resulting solid
4490                 theFacesIDs the list of face IDs to be removed from the
4491                          result. It is ignored if \a theShape is a face or
4492                          a shell. It is empty by default. 
4493                 theInside If true the thickness is applied towards inside
4494
4495             Returns:
4496                 The modified shape
4497             """
4498             # Example: see GEOM_TestAll.py
4499             theThickness,Parameters = ParseParameters(theThickness)
4500             anObj = self.PrimOp.MakeThickening(theShape, theFacesIDs,
4501                                                theThickness, False, theInside)
4502             RaiseIfFailed("Thicken", self.PrimOp)
4503             anObj.SetParameters(Parameters)
4504             return anObj
4505
4506         ## Build a middle path of a pipe-like shape.
4507         #  The path shape can be a wire or an edge.
4508         #  @param theShape It can be closed or unclosed pipe-like shell
4509         #                  or a pipe-like solid.
4510         #  @param theBase1, theBase2 Two bases of the supposed pipe. This
4511         #                            should be wires or faces of theShape.
4512         #  @param theName Object name; when specified, this parameter is used
4513         #         for result publication in the study. Otherwise, if automatic
4514         #         publication is switched on, default value is used for result name.
4515         #
4516         #  @note It is not assumed that exact or approximate copy of theShape
4517         #        can be obtained by applying existing Pipe operation on the
4518         #        resulting "Path" wire taking theBase1 as the base - it is not
4519         #        always possible; though in some particular cases it might work
4520         #        it is not guaranteed. Thus, RestorePath function should not be
4521         #        considered as an exact reverse operation of the Pipe.
4522         #
4523         #  @return New GEOM.GEOM_Object, containing an edge or wire that represent
4524         #                                source pipe's "path".
4525         #
4526         #  @ref tui_creation_pipe_path "Example"
4527         @ManageTransactions("PrimOp")
4528         def RestorePath (self, theShape, theBase1, theBase2, theName=None):
4529             """
4530             Build a middle path of a pipe-like shape.
4531             The path shape can be a wire or an edge.
4532
4533             Parameters:
4534                 theShape It can be closed or unclosed pipe-like shell
4535                          or a pipe-like solid.
4536                 theBase1, theBase2 Two bases of the supposed pipe. This
4537                                    should be wires or faces of theShape.
4538                 theName Object name; when specified, this parameter is used
4539                         for result publication in the study. Otherwise, if automatic
4540                         publication is switched on, default value is used for result name.
4541
4542             Returns:
4543                 New GEOM_Object, containing an edge or wire that represent
4544                                  source pipe's path.
4545             """
4546             anObj = self.PrimOp.RestorePath(theShape, theBase1, theBase2)
4547             RaiseIfFailed("RestorePath", self.PrimOp)
4548             self._autoPublish(anObj, theName, "path")
4549             return anObj
4550
4551         ## Build a middle path of a pipe-like shape.
4552         #  The path shape can be a wire or an edge.
4553         #  @param theShape It can be closed or unclosed pipe-like shell
4554         #                  or a pipe-like solid.
4555         #  @param listEdges1, listEdges2 Two bases of the supposed pipe. This
4556         #                                should be lists of edges of theShape.
4557         #  @param theName Object name; when specified, this parameter is used
4558         #         for result publication in the study. Otherwise, if automatic
4559         #         publication is switched on, default value is used for result name.
4560         #
4561         #  @note It is not assumed that exact or approximate copy of theShape
4562         #        can be obtained by applying existing Pipe operation on the
4563         #        resulting "Path" wire taking theBase1 as the base - it is not
4564         #        always possible; though in some particular cases it might work
4565         #        it is not guaranteed. Thus, RestorePath function should not be
4566         #        considered as an exact reverse operation of the Pipe.
4567         #
4568         #  @return New GEOM.GEOM_Object, containing an edge or wire that represent
4569         #                                source pipe's "path".
4570         #
4571         #  @ref tui_creation_pipe_path "Example"
4572         @ManageTransactions("PrimOp")
4573         def RestorePathEdges (self, theShape, listEdges1, listEdges2, theName=None):
4574             """
4575             Build a middle path of a pipe-like shape.
4576             The path shape can be a wire or an edge.
4577
4578             Parameters:
4579                 theShape It can be closed or unclosed pipe-like shell
4580                          or a pipe-like solid.
4581                 listEdges1, listEdges2 Two bases of the supposed pipe. This
4582                                        should be lists of edges of theShape.
4583                 theName Object name; when specified, this parameter is used
4584                         for result publication in the study. Otherwise, if automatic
4585                         publication is switched on, default value is used for result name.
4586
4587             Returns:
4588                 New GEOM_Object, containing an edge or wire that represent
4589                                  source pipe's path.
4590             """
4591             anObj = self.PrimOp.RestorePathEdges(theShape, listEdges1, listEdges2)
4592             RaiseIfFailed("RestorePath", self.PrimOp)
4593             self._autoPublish(anObj, theName, "path")
4594             return anObj
4595
4596         # end of l3_complex
4597         ## @}
4598
4599         ## @addtogroup l3_basic_go
4600         ## @{
4601
4602         ## Create a linear edge with specified ends.
4603         #  @param thePnt1 Point for the first end of edge.
4604         #  @param thePnt2 Point for the second end of edge.
4605         #  @param theName Object name; when specified, this parameter is used
4606         #         for result publication in the study. Otherwise, if automatic
4607         #         publication is switched on, default value is used for result name.
4608         #
4609         #  @return New GEOM.GEOM_Object, containing the created edge.
4610         #
4611         #  @ref tui_creation_edge "Example"
4612         @ManageTransactions("ShapesOp")
4613         def MakeEdge(self, thePnt1, thePnt2, theName=None):
4614             """
4615             Create a linear edge with specified ends.
4616
4617             Parameters:
4618                 thePnt1 Point for the first end of edge.
4619                 thePnt2 Point for the second end of edge.
4620                 theName Object name; when specified, this parameter is used
4621                         for result publication in the study. Otherwise, if automatic
4622                         publication is switched on, default value is used for result name.
4623
4624             Returns:
4625                 New GEOM.GEOM_Object, containing the created edge.
4626             """
4627             # Example: see GEOM_TestAll.py
4628             anObj = self.ShapesOp.MakeEdge(thePnt1, thePnt2)
4629             RaiseIfFailed("MakeEdge", self.ShapesOp)
4630             self._autoPublish(anObj, theName, "edge")
4631             return anObj
4632
4633         ## Create a new edge, corresponding to the given length on the given curve.
4634         #  @param theRefCurve The referenced curve (edge).
4635         #  @param theLength Length on the referenced curve. It can be negative.
4636         #  @param theStartPoint Any point can be selected for it, the new edge will begin
4637         #                       at the end of \a theRefCurve, close to the selected point.
4638         #                       If None, start from the first point of \a theRefCurve.
4639         #  @param theName Object name; when specified, this parameter is used
4640         #         for result publication in the study. Otherwise, if automatic
4641         #         publication is switched on, default value is used for result name.
4642         #
4643         #  @return New GEOM.GEOM_Object, containing the created edge.
4644         #
4645         #  @ref tui_creation_edge "Example"
4646         @ManageTransactions("ShapesOp")
4647         def MakeEdgeOnCurveByLength(self, theRefCurve, theLength, theStartPoint = None, theName=None):
4648             """
4649             Create a new edge, corresponding to the given length on the given curve.
4650
4651             Parameters:
4652                 theRefCurve The referenced curve (edge).
4653                 theLength Length on the referenced curve. It can be negative.
4654                 theStartPoint Any point can be selected for it, the new edge will begin
4655                               at the end of theRefCurve, close to the selected point.
4656                               If None, start from the first point of theRefCurve.
4657                 theName Object name; when specified, this parameter is used
4658                         for result publication in the study. Otherwise, if automatic
4659                         publication is switched on, default value is used for result name.
4660
4661             Returns:
4662                 New GEOM.GEOM_Object, containing the created edge.
4663             """
4664             # Example: see GEOM_TestAll.py
4665             theLength, Parameters = ParseParameters(theLength)
4666             anObj = self.ShapesOp.MakeEdgeOnCurveByLength(theRefCurve, theLength, theStartPoint)
4667             RaiseIfFailed("MakeEdgeOnCurveByLength", self.ShapesOp)
4668             anObj.SetParameters(Parameters)
4669             self._autoPublish(anObj, theName, "edge")
4670             return anObj
4671
4672         ## Create an edge from specified wire.
4673         #  @param theWire source Wire
4674         #  @param theLinearTolerance linear tolerance value (default = 1e-07)
4675         #  @param theAngularTolerance angular tolerance value (default = 1e-12)
4676         #  @param theName Object name; when specified, this parameter is used
4677         #         for result publication in the study. Otherwise, if automatic
4678         #         publication is switched on, default value is used for result name.
4679         #
4680         #  @return New GEOM.GEOM_Object, containing the created edge.
4681         #
4682         #  @ref tui_creation_edge "Example"
4683         @ManageTransactions("ShapesOp")
4684         def MakeEdgeWire(self, theWire, theLinearTolerance = 1e-07, theAngularTolerance = 1e-12, theName=None):
4685             """
4686             Create an edge from specified wire.
4687
4688             Parameters:
4689                 theWire source Wire
4690                 theLinearTolerance linear tolerance value (default = 1e-07)
4691                 theAngularTolerance angular tolerance value (default = 1e-12)
4692                 theName Object name; when specified, this parameter is used
4693                         for result publication in the study. Otherwise, if automatic
4694                         publication is switched on, default value is used for result name.
4695
4696             Returns:
4697                 New GEOM.GEOM_Object, containing the created edge.
4698             """
4699             # Example: see GEOM_TestAll.py
4700             anObj = self.ShapesOp.MakeEdgeWire(theWire, theLinearTolerance, theAngularTolerance)
4701             RaiseIfFailed("MakeEdgeWire", self.ShapesOp)
4702             self._autoPublish(anObj, theName, "edge")
4703             return anObj
4704
4705         ## Create a wire from the set of edges and wires.
4706         #  @param theEdgesAndWires List of edges and/or wires.
4707         #  @param theTolerance Maximum distance between vertices, that will be merged.
4708         #                      Values less than 1e-07 are equivalent to 1e-07 (Precision::Confusion())
4709         #  @param theName Object name; when specified, this parameter is used
4710         #         for result publication in the study. Otherwise, if automatic
4711         #         publication is switched on, default value is used for result name.
4712         #
4713         #  @return New GEOM.GEOM_Object, containing the created wire.
4714         #
4715         #  @ref tui_creation_wire "Example"
4716         @ManageTransactions("ShapesOp")
4717         def MakeWire(self, theEdgesAndWires, theTolerance = 1e-07, theName=None):
4718             """
4719             Create a wire from the set of edges and wires.
4720
4721             Parameters:
4722                 theEdgesAndWires List of edges and/or wires.
4723                 theTolerance Maximum distance between vertices, that will be merged.
4724                              Values less than 1e-07 are equivalent to 1e-07 (Precision::Confusion()).
4725                 theName Object name; when specified, this parameter is used
4726                         for result publication in the study. Otherwise, if automatic
4727                         publication is switched on, default value is used for result name.
4728
4729             Returns:
4730                 New GEOM.GEOM_Object, containing the created wire.
4731             """
4732             # Example: see GEOM_TestAll.py
4733             anObj = self.ShapesOp.MakeWire(theEdgesAndWires, theTolerance)
4734             RaiseIfFailed("MakeWire", self.ShapesOp)
4735             self._autoPublish(anObj, theName, "wire")
4736             return anObj
4737
4738         ## Create a face on the given wire.
4739         #  @param theWire closed Wire or Edge to build the face on.
4740         #  @param isPlanarWanted If TRUE, the algorithm tries to build a planar face.
4741         #                        If the tolerance of the obtained planar face is less
4742         #                        than 1e-06, this face will be returned, otherwise the
4743         #                        algorithm tries to build any suitable face on the given
4744         #                        wire and prints a warning message.
4745         #  @param theName Object name; when specified, this parameter is used
4746         #         for result publication in the study. Otherwise, if automatic
4747         #         publication is switched on, default value is used for result name.
4748         #
4749         #  @return New GEOM.GEOM_Object, containing the created face (compound of faces).
4750         #
4751         #  @ref tui_creation_face "Example"
4752         @ManageTransactions("ShapesOp")
4753         def MakeFace(self, theWire, isPlanarWanted, theName=None):
4754             """
4755             Create a face on the given wire.
4756
4757             Parameters:
4758                 theWire closed Wire or Edge to build the face on.
4759                 isPlanarWanted If TRUE, the algorithm tries to build a planar face.
4760                                If the tolerance of the obtained planar face is less
4761                                than 1e-06, this face will be returned, otherwise the
4762                                algorithm tries to build any suitable face on the given
4763                                wire and prints a warning message.
4764                 theName Object name; when specified, this parameter is used
4765                         for result publication in the study. Otherwise, if automatic
4766                         publication is switched on, default value is used for result name.
4767
4768             Returns:
4769                 New GEOM.GEOM_Object, containing the created face (compound of faces).
4770             """
4771             # Example: see GEOM_TestAll.py
4772             anObj = self.ShapesOp.MakeFace(theWire, isPlanarWanted)
4773             if isPlanarWanted and anObj is not None and self.ShapesOp.GetErrorCode() == "MAKE_FACE_TOLERANCE_TOO_BIG":
4774                 print("WARNING: Cannot build a planar face: required tolerance is too big. Non-planar face is built.")
4775             else:
4776                 RaiseIfFailed("MakeFace", self.ShapesOp)
4777             self._autoPublish(anObj, theName, "face")
4778             return anObj
4779
4780         ## Create a face on the given wires set.
4781         #  @param theWires List of closed wires or edges to build the face on.
4782         #  @param isPlanarWanted If TRUE, the algorithm tries to build a planar face.
4783         #                        If the tolerance of the obtained planar face is less
4784         #                        than 1e-06, this face will be returned, otherwise the
4785         #                        algorithm tries to build any suitable face on the given
4786         #                        wire and prints a warning message.
4787         #  @param theName Object name; when specified, this parameter is used
4788         #         for result publication in the study. Otherwise, if automatic
4789         #         publication is switched on, default value is used for result name.
4790         #
4791         #  @return New GEOM.GEOM_Object, containing the created face (compound of faces).
4792         #
4793         #  @ref tui_creation_face "Example"
4794         @ManageTransactions("ShapesOp")
4795         def MakeFaceWires(self, theWires, isPlanarWanted, theName=None):
4796             """
4797             Create a face on the given wires set.
4798
4799             Parameters:
4800                 theWires List of closed wires or edges to build the face on.
4801                 isPlanarWanted If TRUE, the algorithm tries to build a planar face.
4802                                If the tolerance of the obtained planar face is less
4803                                than 1e-06, this face will be returned, otherwise the
4804                                algorithm tries to build any suitable face on the given
4805                                wire and prints a warning message.
4806                 theName Object name; when specified, this parameter is used
4807                         for result publication in the study. Otherwise, if automatic
4808                         publication is switched on, default value is used for result name.
4809
4810             Returns:
4811                 New GEOM.GEOM_Object, containing the created face (compound of faces).
4812             """
4813             # Example: see GEOM_TestAll.py
4814             anObj = self.ShapesOp.MakeFaceWires(ToList(theWires), isPlanarWanted)
4815             if isPlanarWanted and anObj is not None and self.ShapesOp.GetErrorCode() == "MAKE_FACE_TOLERANCE_TOO_BIG":
4816                 print("WARNING: Cannot build a planar face: required tolerance is too big. Non-planar face is built.")
4817             else:
4818                 RaiseIfFailed("MakeFaceWires", self.ShapesOp)
4819             self._autoPublish(anObj, theName, "face")
4820             return anObj
4821
4822         ## See MakeFaceWires() method for details.
4823         #
4824         #  @ref tui_creation_face "Example 1"
4825         #  \n @ref swig_MakeFaces  "Example 2"
4826         def MakeFaces(self, theWires, isPlanarWanted, theName=None):
4827             """
4828             See geompy.MakeFaceWires() method for details.
4829             """
4830             # Example: see GEOM_TestOthers.py
4831             # note: auto-publishing is done in self.MakeFaceWires()
4832             anObj = self.MakeFaceWires(theWires, isPlanarWanted, theName)
4833             return anObj
4834
4835         ## Create a face based on a surface from given face bounded
4836         #  by given wire.
4837         #  @param theFace the face whose surface is used to create a new face.
4838         #  @param theWire the wire that will bound a new face.
4839         #  @param theName Object name; when specified, this parameter is used
4840         #         for result publication in the study. Otherwise, if automatic
4841         #         publication is switched on, default value is used for result name.
4842         #
4843         #  @return New GEOM.GEOM_Object, containing the created face.
4844         #
4845         #  @ref tui_creation_face "Example"
4846         @ManageTransactions("ShapesOp")
4847         def MakeFaceFromSurface(self, theFace, theWire, theName=None):
4848             """
4849             Create a face based on a surface from given face bounded
4850             by given wire.
4851
4852             Parameters:
4853                 theFace the face whose surface is used to create a new face.
4854                 theWire the wire that will bound a new face.
4855                 theName Object name; when specified, this parameter is used
4856                         for result publication in the study. Otherwise, if automatic
4857                         publication is switched on, default value is used for result name.
4858
4859             Returns:
4860                 New GEOM.GEOM_Object, containing the created face.
4861             """
4862             # Example: see GEOM_TestAll.py
4863             anObj = self.ShapesOp.MakeFaceFromSurface(theFace, theWire)
4864             RaiseIfFailed("MakeFaceFromSurface", self.ShapesOp)
4865             self._autoPublish(anObj, theName, "face")
4866             return anObj
4867           
4868         ## Create a face from a set of edges with the given constraints.
4869         #  @param theConstraints List of edges and constraint faces (as a sequence of a Edge + Face couples):
4870         #         - edges should form a closed wire;
4871         #         - for each edge, constraint face is optional: if a constraint face is missing
4872         #           for some edge, this means that there no constraint associated with this edge.
4873         #  @param theName Object name; when specified, this parameter is used
4874         #         for result publication in the study. Otherwise, if automatic
4875         #         publication is switched on, default value is used for result name.
4876         # 
4877         # @return New GEOM.GEOM_Object, containing the created face.
4878         # 
4879         # @ref tui_creation_face "Example"
4880         @ManageTransactions("ShapesOp")
4881         def MakeFaceWithConstraints(self, theConstraints, theName=None):
4882             """
4883             Create a face from a set of edges with the given constraints.
4884
4885             Parameters:
4886                 theConstraints List of edges and constraint faces (as a sequence of a Edge + Face couples):
4887                         - edges should form a closed wire;
4888                         - for each edge, constraint face is optional: if a constraint face is missing
4889                           for some edge, this means that there no constraint associated with this edge.
4890                 theName Object name; when specified, this parameter is used
4891                         for result publication in the study. Otherwise, if automatic
4892                         publication is switched on, default value is used for result name.
4893
4894             Returns:
4895                 New GEOM.GEOM_Object, containing the created face.
4896             """
4897             # Example: see GEOM_TestAll.py
4898             anObj = self.ShapesOp.MakeFaceWithConstraints(theConstraints)
4899             if anObj is None:
4900                 RaiseIfFailed("MakeFaceWithConstraints", self.ShapesOp)
4901             self._autoPublish(anObj, theName, "face")
4902             return anObj
4903
4904         ## Create a shell from the set of faces, shells and/or compounds of faces.
4905         #  @param theFacesAndShells List of faces, shells and/or compounds of faces.
4906         #  @param theName Object name; when specified, this parameter is used
4907         #         for result publication in the study. Otherwise, if automatic
4908         #         publication is switched on, default value is used for result name.
4909         #
4910         #  @return New GEOM.GEOM_Object, containing the created shell (compound of shells).
4911         #
4912         #  @ref tui_creation_shell "Example"
4913         @ManageTransactions("ShapesOp")
4914         def MakeShell(self, theFacesAndShells, theName=None):
4915             """
4916             Create a shell from the set of faces and shells.
4917
4918             Parameters:
4919                 theFacesAndShells List of faces and/or shells.
4920                 theName Object name; when specified, this parameter is used
4921                         for result publication in the study. Otherwise, if automatic
4922                         publication is switched on, default value is used for result name.
4923
4924             Returns:
4925                 New GEOM.GEOM_Object, containing the created shell (compound of shells).
4926             """
4927             # Example: see GEOM_TestAll.py
4928             anObj = self.ShapesOp.MakeShell( ToList( theFacesAndShells ))
4929             RaiseIfFailed("MakeShell", self.ShapesOp)
4930             self._autoPublish(anObj, theName, "shell")
4931             return anObj
4932
4933         ## Create a solid, bounded by the given shells.
4934         #  @param theShells Sequence of bounding shells.
4935         #  @param theName Object name; when specified, this parameter is used
4936         #         for result publication in the study. Otherwise, if automatic
4937         #         publication is switched on, default value is used for result name.
4938         #
4939         #  @return New GEOM.GEOM_Object, containing the created solid.
4940         #
4941         #  @ref tui_creation_solid "Example"
4942         @ManageTransactions("ShapesOp")
4943         def MakeSolid(self, theShells, theName=None):
4944             """
4945             Create a solid, bounded by the given shells.
4946
4947             Parameters:
4948                 theShells Sequence of bounding shells.
4949                 theName Object name; when specified, this parameter is used
4950                         for result publication in the study. Otherwise, if automatic
4951                         publication is switched on, default value is used for result name.
4952
4953             Returns:
4954                 New GEOM.GEOM_Object, containing the created solid.
4955             """
4956             # Example: see GEOM_TestAll.py
4957             theShells = ToList(theShells)
4958             if len(theShells) == 1:
4959                 descr = self._IsGoodForSolid(theShells[0])
4960                 #if len(descr) > 0:
4961                 #    raise RuntimeError, "MakeSolidShells : " + descr
4962                 if descr == "WRN_SHAPE_UNCLOSED":
4963                     raise RuntimeError("MakeSolidShells : Unable to create solid from unclosed shape")
4964             anObj = self.ShapesOp.MakeSolidShells(theShells)
4965             RaiseIfFailed("MakeSolidShells", self.ShapesOp)
4966             self._autoPublish(anObj, theName, "solid")
4967             return anObj
4968
4969         ## Create a compound of the given shapes.
4970         #  @param theShapes List of shapes to put in compound.
4971         #  @param theName Object name; when specified, this parameter is used
4972         #         for result publication in the study. Otherwise, if automatic
4973         #         publication is switched on, default value is used for result name.
4974         #
4975         #  @return New GEOM.GEOM_Object, containing the created compound.
4976         #
4977         #  @ref tui_creation_compound "Example"
4978         @ManageTransactions("ShapesOp")
4979         def MakeCompound(self, theShapes, theName=None):
4980             """
4981             Create a compound of the given shapes.
4982
4983             Parameters:
4984                 theShapes List of shapes to put in compound.
4985                 theName Object name; when specified, this parameter is used
4986                         for result publication in the study. Otherwise, if automatic
4987                         publication is switched on, default value is used for result name.
4988
4989             Returns:
4990                 New GEOM.GEOM_Object, containing the created compound.
4991             """
4992             # Example: see GEOM_TestAll.py
4993             anObj = self.ShapesOp.MakeCompound(ToList(theShapes))
4994             RaiseIfFailed("MakeCompound", self.ShapesOp)
4995             self._autoPublish(anObj, theName, "compound")
4996             return anObj
4997         
4998         ## Create a solid (or solids) from the set of faces and/or shells.
4999         #  @param theFacesOrShells List of faces and/or shells.
5000         #  @param isIntersect If TRUE, forces performing intersections
5001         #         between arguments; otherwise (default) intersection is not performed.
5002         #  @param theName Object name; when specified, this parameter is used
5003         #         for result publication in the study. Otherwise, if automatic
5004         #         publication is switched on, default value is used for result name.
5005         #
5006         #  @return New GEOM.GEOM_Object, containing the created solid (or compound of solids).
5007         #
5008         #  @ref tui_creation_solid_from_faces "Example"
5009         @ManageTransactions("ShapesOp")
5010         def MakeSolidFromConnectedFaces(self, theFacesOrShells, isIntersect = False, theName=None):
5011             """
5012             Create a solid (or solids) from the set of connected faces and/or shells.
5013
5014             Parameters:
5015                 theFacesOrShells List of faces and/or shells.
5016                 isIntersect If TRUE, forces performing intersections
5017                         between arguments; otherwise (default) intersection is not performed
5018                 theName Object name; when specified, this parameter is used.
5019                         for result publication in the study. Otherwise, if automatic
5020                         publication is switched on, default value is used for result name.
5021
5022             Returns:
5023                 New GEOM.GEOM_Object, containing the created solid (or compound of solids).
5024             """
5025             # Example: see GEOM_TestAll.py
5026             anObj = self.ShapesOp.MakeSolidFromConnectedFaces(theFacesOrShells, isIntersect)
5027             RaiseIfFailed("MakeSolidFromConnectedFaces", self.ShapesOp)
5028             self._autoPublish(anObj, theName, "solid")
5029             return anObj
5030
5031         # end of l3_basic_go
5032         ## @}
5033
5034         ## @addtogroup l2_measure
5035         ## @{
5036
5037         ## Gives quantity of faces in the given shape.
5038         #  @param theShape Shape to count faces of.
5039         #  @return Quantity of faces.
5040         #
5041         #  @ref swig_NumberOf "Example"
5042         @ManageTransactions("ShapesOp")
5043         def NumberOfFaces(self, theShape):
5044             """
5045             Gives quantity of faces in the given shape.
5046
5047             Parameters:
5048                 theShape Shape to count faces of.
5049
5050             Returns:
5051                 Quantity of faces.
5052             """
5053             # Example: see GEOM_TestOthers.py
5054             nb_faces = self.ShapesOp.NumberOfFaces(theShape)
5055             RaiseIfFailed("NumberOfFaces", self.ShapesOp)
5056             return nb_faces
5057
5058         ## Gives quantity of edges in the given shape.
5059         #  @param theShape Shape to count edges of.
5060         #  @return Quantity of edges.
5061         #
5062         #  @ref swig_NumberOf "Example"
5063         @ManageTransactions("ShapesOp")
5064         def NumberOfEdges(self, theShape):
5065             """
5066             Gives quantity of edges in the given shape.
5067
5068             Parameters:
5069                 theShape Shape to count edges of.
5070
5071             Returns:
5072                 Quantity of edges.
5073             """
5074             # Example: see GEOM_TestOthers.py
5075             nb_edges = self.ShapesOp.NumberOfEdges(theShape)
5076             RaiseIfFailed("NumberOfEdges", self.ShapesOp)
5077             return nb_edges
5078
5079         ## Gives quantity of sub-shapes of type theShapeType in the given shape.
5080         #  @param theShape Shape to count sub-shapes of.
5081         #  @param theShapeType Type of sub-shapes to count (see ShapeType())
5082         #  @return Quantity of sub-shapes of given type.
5083         #
5084         #  @ref swig_NumberOf "Example"
5085         @ManageTransactions("ShapesOp")
5086         def NumberOfSubShapes(self, theShape, theShapeType):
5087             """
5088             Gives quantity of sub-shapes of type theShapeType in the given shape.
5089
5090             Parameters:
5091                 theShape Shape to count sub-shapes of.
5092                 theShapeType Type of sub-shapes to count (see geompy.ShapeType)
5093
5094             Returns:
5095                 Quantity of sub-shapes of given type.
5096             """
5097             # Example: see GEOM_TestOthers.py
5098             nb_ss = self.ShapesOp.NumberOfSubShapes(theShape, theShapeType)
5099             RaiseIfFailed("NumberOfSubShapes", self.ShapesOp)
5100             return nb_ss
5101
5102         ## Gives quantity of solids in the given shape.
5103         #  @param theShape Shape to count solids in.
5104         #  @return Quantity of solids.
5105         #
5106         #  @ref swig_NumberOf "Example"
5107         @ManageTransactions("ShapesOp")
5108         def NumberOfSolids(self, theShape):
5109             """
5110             Gives quantity of solids in the given shape.
5111
5112             Parameters:
5113                 theShape Shape to count solids in.
5114
5115             Returns:
5116                 Quantity of solids.
5117             """
5118             # Example: see GEOM_TestOthers.py
5119             nb_solids = self.ShapesOp.NumberOfSubShapes(theShape, self.ShapeType["SOLID"])
5120             RaiseIfFailed("NumberOfSolids", self.ShapesOp)
5121             return nb_solids
5122
5123         # end of l2_measure
5124         ## @}
5125
5126         ## @addtogroup l3_healing
5127         ## @{
5128
5129         ## Reverses an orientation the given shape.
5130         #  @param theShape Shape to be reversed.
5131         #  @param theName Object name; when specified, this parameter is used
5132         #         for result publication in the study. Otherwise, if automatic
5133         #         publication is switched on, default value is used for result name.
5134         #
5135         #  @return The reversed copy of theShape.
5136         #
5137         #  @ref swig_ChangeOrientation "Example"
5138         @ManageTransactions("ShapesOp")
5139         def ChangeOrientation(self, theShape, theName=None):
5140             """
5141             Reverses an orientation the given shape.
5142
5143             Parameters:
5144                 theShape Shape to be reversed.
5145                 theName Object name; when specified, this parameter is used
5146                         for result publication in the study. Otherwise, if automatic
5147                         publication is switched on, default value is used for result name.
5148
5149             Returns:
5150                 The reversed copy of theShape.
5151             """
5152             # Example: see GEOM_TestAll.py
5153             anObj = self.ShapesOp.ChangeOrientation(theShape)
5154             RaiseIfFailed("ChangeOrientation", self.ShapesOp)
5155             self._autoPublish(anObj, theName, "reversed")
5156             return anObj
5157
5158         ## See ChangeOrientation() method for details.
5159         #
5160         #  @ref swig_OrientationChange "Example"
5161         def OrientationChange(self, theShape, theName=None):
5162             """
5163             See geompy.ChangeOrientation method for details.
5164             """
5165             # Example: see GEOM_TestOthers.py
5166             # note: auto-publishing is done in self.ChangeOrientation()
5167             anObj = self.ChangeOrientation(theShape, theName)
5168             return anObj
5169
5170         # end of l3_healing
5171         ## @}
5172
5173         ## @addtogroup l4_obtain
5174         ## @{
5175
5176         ## Retrieve all free faces from the given shape.
5177         #  Free face is a face, which is not shared between two shells of the shape.
5178         #  @param theShape Shape to find free faces in.
5179         #  @return List of IDs of all free faces, contained in theShape.
5180         #
5181         #  @ref tui_free_faces_page "Example"
5182         @ManageTransactions("ShapesOp")
5183         def GetFreeFacesIDs(self,theShape):
5184             """
5185             Retrieve all free faces from the given shape.
5186             Free face is a face, which is not shared between two shells of the shape.
5187
5188             Parameters:
5189                 theShape Shape to find free faces in.
5190
5191             Returns:
5192                 List of IDs of all free faces, contained in theShape.
5193             """
5194             # Example: see GEOM_TestOthers.py
5195             anIDs = self.ShapesOp.GetFreeFacesIDs(theShape)
5196             RaiseIfFailed("GetFreeFacesIDs", self.ShapesOp)
5197             return anIDs
5198
5199         ## Get all sub-shapes of theShape1 of the given type, shared with theShape2.
5200         #  @param theShape1 Shape to find sub-shapes in.
5201         #  @param theShape2 Shape to find shared sub-shapes with.
5202         #  @param theShapeType Type of sub-shapes to be retrieved.
5203         #  @param theName Object name; when specified, this parameter is used
5204         #         for result publication in the study. Otherwise, if automatic
5205         #         publication is switched on, default value is used for result name.
5206         #
5207         #  @return List of sub-shapes of theShape1, shared with theShape2.
5208         #
5209         #  @ref swig_GetSharedShapes "Example"
5210         @ManageTransactions("ShapesOp")
5211         def GetSharedShapes(self, theShape1, theShape2, theShapeType, theName=None):
5212             """
5213             Get all sub-shapes of theShape1 of the given type, shared with theShape2.
5214
5215             Parameters:
5216                 theShape1 Shape to find sub-shapes in.
5217                 theShape2 Shape to find shared sub-shapes with.
5218                 theShapeType Type of sub-shapes to be retrieved.
5219                 theName Object name; when specified, this parameter is used
5220                         for result publication in the study. Otherwise, if automatic
5221                         publication is switched on, default value is used for result name.
5222
5223             Returns:
5224                 List of sub-shapes of theShape1, shared with theShape2.
5225             """
5226             # Example: see GEOM_TestOthers.py
5227             aList = self.ShapesOp.GetSharedShapes(theShape1, theShape2, theShapeType)
5228             RaiseIfFailed("GetSharedShapes", self.ShapesOp)
5229             self._autoPublish(aList, theName, "shared")
5230             return aList
5231
5232         ## Get sub-shapes, shared by input shapes.
5233         #  @param theShapes Either a list or compound of shapes to find common sub-shapes of.
5234         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType()).
5235         #  @param theMultiShare Specifies what type of shares should be checked:
5236         #         - @c True (default): search sub-shapes from 1st input shape shared with all other input shapes;
5237         #         - @c False: causes to search sub-shapes shared between couples of input shapes.
5238         #  @param theName Object name; when specified, this parameter is used
5239         #         for result publication in the study. Otherwise, if automatic
5240         #         publication is switched on, default value is used for result name.
5241         #
5242         #  @note If @a theShapes contains single compound, the shares between all possible couples of 
5243         #        its top-level shapes are returned; otherwise, only shares between 1st input shape
5244         #        and all rest input shapes are returned.
5245         #
5246         #  @return List of all found sub-shapes.
5247         #
5248         #  Examples:
5249         #  - @ref tui_shared_shapes "Example 1"
5250         #  - @ref swig_GetSharedShapes "Example 2"
5251         @ManageTransactions("ShapesOp")
5252         def GetSharedShapesMulti(self, theShapes, theShapeType, theMultiShare=True, theName=None):
5253             """
5254             Get sub-shapes, shared by input shapes.
5255
5256             Parameters:
5257                 theShapes Either a list or compound of shapes to find common sub-shapes of.
5258                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType).
5259                 theMultiShare Specifies what type of shares should be checked:
5260                   - True (default): search sub-shapes from 1st input shape shared with all other input shapes;
5261                   - False: causes to search sub-shapes shared between couples of input shapes.
5262                 theName Object name; when specified, this parameter is used
5263                         for result publication in the study. Otherwise, if automatic
5264                         publication is switched on, default value is used for result name.
5265
5266             Note: if theShapes contains single compound, the shares between all possible couples of 
5267                   its top-level shapes are returned; otherwise, only shares between 1st input shape
5268                   and all rest input shapes are returned.
5269
5270             Returns:
5271                 List of all found sub-shapes.
5272             """
5273             # Example: see GEOM_TestOthers.py
5274             aList = self.ShapesOp.GetSharedShapesMulti(ToList(theShapes), theShapeType, theMultiShare)
5275             RaiseIfFailed("GetSharedShapesMulti", self.ShapesOp)
5276             self._autoPublish(aList, theName, "shared")
5277             return aList
5278
5279         ## Find in <VAR>theShape</VAR> all sub-shapes of type <VAR>theShapeType</VAR>,
5280         #  situated relatively the specified plane by the certain way,
5281         #  defined through <VAR>theState</VAR> parameter.
5282         #  @param theShape Shape to find sub-shapes of.
5283         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5284         #  @param theAx1 Vector (or line, or linear edge), specifying normal
5285         #                direction and location of the plane to find shapes on.
5286         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5287         #  @param theName Object name; when specified, this parameter is used
5288         #         for result publication in the study. Otherwise, if automatic
5289         #         publication is switched on, default value is used for result name.
5290         #
5291         #  @return List of all found sub-shapes.
5292         #
5293         #  @ref swig_GetShapesOnPlane "Example"
5294         @ManageTransactions("ShapesOp")
5295         def GetShapesOnPlane(self, theShape, theShapeType, theAx1, theState, theName=None):
5296             """
5297             Find in theShape all sub-shapes of type theShapeType,
5298             situated relatively the specified plane by the certain way,
5299             defined through theState parameter.
5300
5301             Parameters:
5302                 theShape Shape to find sub-shapes of.
5303                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5304                 theAx1 Vector (or line, or linear edge), specifying normal
5305                        direction and location of the plane to find shapes on.
5306                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5307                 theName Object name; when specified, this parameter is used
5308                         for result publication in the study. Otherwise, if automatic
5309                         publication is switched on, default value is used for result name.
5310
5311             Returns:
5312                 List of all found sub-shapes.
5313             """
5314             # Example: see GEOM_TestOthers.py
5315             aList = self.ShapesOp.GetShapesOnPlane(theShape, theShapeType, theAx1, theState)
5316             RaiseIfFailed("GetShapesOnPlane", self.ShapesOp)
5317             self._autoPublish(aList, theName, "shapeOnPlane")
5318             return aList
5319
5320         ## Find in <VAR>theShape</VAR> all sub-shapes of type <VAR>theShapeType</VAR>,
5321         #  situated relatively the specified plane by the certain way,
5322         #  defined through <VAR>theState</VAR> parameter.
5323         #  @param theShape Shape to find sub-shapes of.
5324         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5325         #  @param theAx1 Vector (or line, or linear edge), specifying normal
5326         #                direction and location of the plane to find shapes on.
5327         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5328         #
5329         #  @return List of all found sub-shapes indices.
5330         #
5331         #  @ref swig_GetShapesOnPlaneIDs "Example"
5332         @ManageTransactions("ShapesOp")
5333         def GetShapesOnPlaneIDs(self, theShape, theShapeType, theAx1, theState):
5334             """
5335             Find in theShape all sub-shapes of type theShapeType,
5336             situated relatively the specified plane by the certain way,
5337             defined through theState parameter.
5338
5339             Parameters:
5340                 theShape Shape to find sub-shapes of.
5341                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5342                 theAx1 Vector (or line, or linear edge), specifying normal
5343                        direction and location of the plane to find shapes on.
5344                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5345
5346             Returns:
5347                 List of all found sub-shapes indices.
5348             """
5349             # Example: see GEOM_TestOthers.py
5350             aList = self.ShapesOp.GetShapesOnPlaneIDs(theShape, theShapeType, theAx1, theState)
5351             RaiseIfFailed("GetShapesOnPlaneIDs", self.ShapesOp)
5352             return aList
5353
5354         ## Find in <VAR>theShape</VAR> all sub-shapes of type <VAR>theShapeType</VAR>,
5355         #  situated relatively the specified plane by the certain way,
5356         #  defined through <VAR>theState</VAR> parameter.
5357         #  @param theShape Shape to find sub-shapes of.
5358         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5359         #  @param theAx1 Vector (or line, or linear edge), specifying normal
5360         #                direction of the plane to find shapes on.
5361         #  @param thePnt Point specifying location of the plane to find shapes on.
5362         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5363         #  @param theName Object name; when specified, this parameter is used
5364         #         for result publication in the study. Otherwise, if automatic
5365         #         publication is switched on, default value is used for result name.
5366         #
5367         #  @return List of all found sub-shapes.
5368         #
5369         #  @ref swig_GetShapesOnPlaneWithLocation "Example"
5370         @ManageTransactions("ShapesOp")
5371         def GetShapesOnPlaneWithLocation(self, theShape, theShapeType, theAx1, thePnt, theState, theName=None):
5372             """
5373             Find in theShape all sub-shapes of type theShapeType,
5374             situated relatively the specified plane by the certain way,
5375             defined through theState parameter.
5376
5377             Parameters:
5378                 theShape Shape to find sub-shapes of.
5379                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5380                 theAx1 Vector (or line, or linear edge), specifying normal
5381                        direction and location of the plane to find shapes on.
5382                 thePnt Point specifying location of the plane to find shapes on.
5383                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5384                 theName Object name; when specified, this parameter is used
5385                         for result publication in the study. Otherwise, if automatic
5386                         publication is switched on, default value is used for result name.
5387
5388             Returns:
5389                 List of all found sub-shapes.
5390             """
5391             # Example: see GEOM_TestOthers.py
5392             aList = self.ShapesOp.GetShapesOnPlaneWithLocation(theShape, theShapeType,
5393                                                                theAx1, thePnt, theState)
5394             RaiseIfFailed("GetShapesOnPlaneWithLocation", self.ShapesOp)
5395             self._autoPublish(aList, theName, "shapeOnPlane")
5396             return aList
5397
5398         ## Find in <VAR>theShape</VAR> all sub-shapes of type <VAR>theShapeType</VAR>,
5399         #  situated relatively the specified plane by the certain way,
5400         #  defined through <VAR>theState</VAR> parameter.
5401         #  @param theShape Shape to find sub-shapes of.
5402         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5403         #  @param theAx1 Vector (or line, or linear edge), specifying normal
5404         #                direction of the plane to find shapes on.
5405         #  @param thePnt Point specifying location of the plane to find shapes on.
5406         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5407         #
5408         #  @return List of all found sub-shapes indices.
5409         #
5410         #  @ref swig_GetShapesOnPlaneWithLocationIDs "Example"
5411         @ManageTransactions("ShapesOp")
5412         def GetShapesOnPlaneWithLocationIDs(self, theShape, theShapeType, theAx1, thePnt, theState):
5413             """
5414             Find in theShape all sub-shapes of type theShapeType,
5415             situated relatively the specified plane by the certain way,
5416             defined through theState parameter.
5417
5418             Parameters:
5419                 theShape Shape to find sub-shapes of.
5420                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5421                 theAx1 Vector (or line, or linear edge), specifying normal
5422                        direction and location of the plane to find shapes on.
5423                 thePnt Point specifying location of the plane to find shapes on.
5424                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5425
5426             Returns:
5427                 List of all found sub-shapes indices.
5428             """
5429             # Example: see GEOM_TestOthers.py
5430             aList = self.ShapesOp.GetShapesOnPlaneWithLocationIDs(theShape, theShapeType,
5431                                                                   theAx1, thePnt, theState)
5432             RaiseIfFailed("GetShapesOnPlaneWithLocationIDs", self.ShapesOp)
5433             return aList
5434
5435         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
5436         #  the specified cylinder by the certain way, defined through \a theState parameter.
5437         #  @param theShape Shape to find sub-shapes of.
5438         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5439         #  @param theAxis Vector (or line, or linear edge), specifying
5440         #                 axis of the cylinder to find shapes on.
5441         #  @param theRadius Radius of the cylinder to find shapes on.
5442         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5443         #  @param theName Object name; when specified, this parameter is used
5444         #         for result publication in the study. Otherwise, if automatic
5445         #         publication is switched on, default value is used for result name.
5446         #
5447         #  @return List of all found sub-shapes.
5448         #
5449         #  @ref swig_GetShapesOnCylinder "Example"
5450         @ManageTransactions("ShapesOp")
5451         def GetShapesOnCylinder(self, theShape, theShapeType, theAxis, theRadius, theState, theName=None):
5452             """
5453             Find in theShape all sub-shapes of type theShapeType, situated relatively
5454             the specified cylinder by the certain way, defined through theState parameter.
5455
5456             Parameters:
5457                 theShape Shape to find sub-shapes of.
5458                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5459                 theAxis Vector (or line, or linear edge), specifying
5460                         axis of the cylinder to find shapes on.
5461                 theRadius Radius of the cylinder to find shapes on.
5462                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5463                 theName Object name; when specified, this parameter is used
5464                         for result publication in the study. Otherwise, if automatic
5465                         publication is switched on, default value is used for result name.
5466
5467             Returns:
5468                 List of all found sub-shapes.
5469             """
5470             # Example: see GEOM_TestOthers.py
5471             aList = self.ShapesOp.GetShapesOnCylinder(theShape, theShapeType, theAxis, theRadius, theState)
5472             RaiseIfFailed("GetShapesOnCylinder", self.ShapesOp)
5473             self._autoPublish(aList, theName, "shapeOnCylinder")
5474             return aList
5475
5476         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
5477         #  the specified cylinder by the certain way, defined through \a theState parameter.
5478         #  @param theShape Shape to find sub-shapes of.
5479         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5480         #  @param theAxis Vector (or line, or linear edge), specifying
5481         #                 axis of the cylinder to find shapes on.
5482         #  @param theRadius Radius of the cylinder to find shapes on.
5483         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5484         #
5485         #  @return List of all found sub-shapes indices.
5486         #
5487         #  @ref swig_GetShapesOnCylinderIDs "Example"
5488         @ManageTransactions("ShapesOp")
5489         def GetShapesOnCylinderIDs(self, theShape, theShapeType, theAxis, theRadius, theState):
5490             """
5491             Find in theShape all sub-shapes of type theShapeType, situated relatively
5492             the specified cylinder by the certain way, defined through theState parameter.
5493
5494             Parameters:
5495                 theShape Shape to find sub-shapes of.
5496                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5497                 theAxis Vector (or line, or linear edge), specifying
5498                         axis of the cylinder to find shapes on.
5499                 theRadius Radius of the cylinder to find shapes on.
5500                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5501
5502             Returns:
5503                 List of all found sub-shapes indices.
5504             """
5505             # Example: see GEOM_TestOthers.py
5506             aList = self.ShapesOp.GetShapesOnCylinderIDs(theShape, theShapeType, theAxis, theRadius, theState)
5507             RaiseIfFailed("GetShapesOnCylinderIDs", self.ShapesOp)
5508             return aList
5509
5510         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
5511         #  the specified cylinder by the certain way, defined through \a theState parameter.
5512         #  @param theShape Shape to find sub-shapes of.
5513         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5514         #  @param theAxis Vector (or line, or linear edge), specifying
5515         #                 axis of the cylinder to find shapes on.
5516         #  @param thePnt Point specifying location of the bottom of the cylinder.
5517         #  @param theRadius Radius of the cylinder to find shapes on.
5518         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5519         #  @param theName Object name; when specified, this parameter is used
5520         #         for result publication in the study. Otherwise, if automatic
5521         #         publication is switched on, default value is used for result name.
5522         #
5523         #  @return List of all found sub-shapes.
5524         #
5525         #  @ref swig_GetShapesOnCylinderWithLocation "Example"
5526         @ManageTransactions("ShapesOp")
5527         def GetShapesOnCylinderWithLocation(self, theShape, theShapeType, theAxis, thePnt, theRadius, theState, theName=None):
5528             """
5529             Find in theShape all sub-shapes of type theShapeType, situated relatively
5530             the specified cylinder by the certain way, defined through theState parameter.
5531
5532             Parameters:
5533                 theShape Shape to find sub-shapes of.
5534                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5535                 theAxis Vector (or line, or linear edge), specifying
5536                         axis of the cylinder to find shapes on.
5537                 theRadius Radius of the cylinder to find shapes on.
5538                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5539                 theName Object name; when specified, this parameter is used
5540                         for result publication in the study. Otherwise, if automatic
5541                         publication is switched on, default value is used for result name.
5542
5543             Returns:
5544                 List of all found sub-shapes.
5545             """
5546             # Example: see GEOM_TestOthers.py
5547             aList = self.ShapesOp.GetShapesOnCylinderWithLocation(theShape, theShapeType, theAxis, thePnt, theRadius, theState)
5548             RaiseIfFailed("GetShapesOnCylinderWithLocation", self.ShapesOp)
5549             self._autoPublish(aList, theName, "shapeOnCylinder")
5550             return aList
5551
5552         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
5553         #  the specified cylinder by the certain way, defined through \a theState parameter.
5554         #  @param theShape Shape to find sub-shapes of.
5555         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5556         #  @param theAxis Vector (or line, or linear edge), specifying
5557         #                 axis of the cylinder to find shapes on.
5558         #  @param thePnt Point specifying location of the bottom of the cylinder.
5559         #  @param theRadius Radius of the cylinder to find shapes on.
5560         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5561         #
5562         #  @return List of all found sub-shapes indices
5563         #
5564         #  @ref swig_GetShapesOnCylinderWithLocationIDs "Example"
5565         @ManageTransactions("ShapesOp")
5566         def GetShapesOnCylinderWithLocationIDs(self, theShape, theShapeType, theAxis, thePnt, theRadius, theState):
5567             """
5568             Find in theShape all sub-shapes of type theShapeType, situated relatively
5569             the specified cylinder by the certain way, defined through theState parameter.
5570
5571             Parameters:
5572                 theShape Shape to find sub-shapes of.
5573                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5574                 theAxis Vector (or line, or linear edge), specifying
5575                         axis of the cylinder to find shapes on.
5576                 theRadius Radius of the cylinder to find shapes on.
5577                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5578
5579             Returns:
5580                 List of all found sub-shapes indices.
5581             """
5582             # Example: see GEOM_TestOthers.py
5583             aList = self.ShapesOp.GetShapesOnCylinderWithLocationIDs(theShape, theShapeType, theAxis, thePnt, theRadius, theState)
5584             RaiseIfFailed("GetShapesOnCylinderWithLocationIDs", self.ShapesOp)
5585             return aList
5586
5587         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
5588         #  the specified sphere by the certain way, defined through \a theState parameter.
5589         #  @param theShape Shape to find sub-shapes of.
5590         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5591         #  @param theCenter Point, specifying center of the sphere to find shapes on.
5592         #  @param theRadius Radius of the sphere to find shapes on.
5593         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5594         #  @param theName Object name; when specified, this parameter is used
5595         #         for result publication in the study. Otherwise, if automatic
5596         #         publication is switched on, default value is used for result name.
5597         #
5598         #  @return List of all found sub-shapes.
5599         #
5600         #  @ref swig_GetShapesOnSphere "Example"
5601         @ManageTransactions("ShapesOp")
5602         def GetShapesOnSphere(self, theShape, theShapeType, theCenter, theRadius, theState, theName=None):
5603             """
5604             Find in theShape all sub-shapes of type theShapeType, situated relatively
5605             the specified sphere by the certain way, defined through theState parameter.
5606
5607             Parameters:
5608                 theShape Shape to find sub-shapes of.
5609                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5610                 theCenter Point, specifying center of the sphere to find shapes on.
5611                 theRadius Radius of the sphere to find shapes on.
5612                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5613                 theName Object name; when specified, this parameter is used
5614                         for result publication in the study. Otherwise, if automatic
5615                         publication is switched on, default value is used for result name.
5616
5617             Returns:
5618                 List of all found sub-shapes.
5619             """
5620             # Example: see GEOM_TestOthers.py
5621             aList = self.ShapesOp.GetShapesOnSphere(theShape, theShapeType, theCenter, theRadius, theState)
5622             RaiseIfFailed("GetShapesOnSphere", self.ShapesOp)
5623             self._autoPublish(aList, theName, "shapeOnSphere")
5624             return aList
5625
5626         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
5627         #  the specified sphere by the certain way, defined through \a theState parameter.
5628         #  @param theShape Shape to find sub-shapes of.
5629         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5630         #  @param theCenter Point, specifying center of the sphere to find shapes on.
5631         #  @param theRadius Radius of the sphere to find shapes on.
5632         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5633         #
5634         #  @return List of all found sub-shapes indices.
5635         #
5636         #  @ref swig_GetShapesOnSphereIDs "Example"
5637         @ManageTransactions("ShapesOp")
5638         def GetShapesOnSphereIDs(self, theShape, theShapeType, theCenter, theRadius, theState):
5639             """
5640             Find in theShape all sub-shapes of type theShapeType, situated relatively
5641             the specified sphere by the certain way, defined through theState parameter.
5642
5643             Parameters:
5644                 theShape Shape to find sub-shapes of.
5645                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5646                 theCenter Point, specifying center of the sphere to find shapes on.
5647                 theRadius Radius of the sphere to find shapes on.
5648                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5649
5650             Returns:
5651                 List of all found sub-shapes indices.
5652             """
5653             # Example: see GEOM_TestOthers.py
5654             aList = self.ShapesOp.GetShapesOnSphereIDs(theShape, theShapeType, theCenter, theRadius, theState)
5655             RaiseIfFailed("GetShapesOnSphereIDs", self.ShapesOp)
5656             return aList
5657
5658         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
5659         #  the specified quadrangle by the certain way, defined through \a theState parameter.
5660         #  @param theShape Shape to find sub-shapes of.
5661         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5662         #  @param theTopLeftPoint Point, specifying top left corner of a quadrangle
5663         #  @param theTopRightPoint Point, specifying top right corner of a quadrangle
5664         #  @param theBottomLeftPoint Point, specifying bottom left corner of a quadrangle
5665         #  @param theBottomRightPoint Point, specifying bottom right corner of a quadrangle
5666         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5667         #  @param theName Object name; when specified, this parameter is used
5668         #         for result publication in the study. Otherwise, if automatic
5669         #         publication is switched on, default value is used for result name.
5670         #
5671         #  @return List of all found sub-shapes.
5672         #
5673         #  @ref swig_GetShapesOnQuadrangle "Example"
5674         @ManageTransactions("ShapesOp")
5675         def GetShapesOnQuadrangle(self, theShape, theShapeType,
5676                                   theTopLeftPoint, theTopRightPoint,
5677                                   theBottomLeftPoint, theBottomRightPoint, theState, theName=None):
5678             """
5679             Find in theShape all sub-shapes of type theShapeType, situated relatively
5680             the specified quadrangle by the certain way, defined through theState parameter.
5681
5682             Parameters:
5683                 theShape Shape to find sub-shapes of.
5684                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5685                 theTopLeftPoint Point, specifying top left corner of a quadrangle
5686                 theTopRightPoint Point, specifying top right corner of a quadrangle
5687                 theBottomLeftPoint Point, specifying bottom left corner of a quadrangle
5688                 theBottomRightPoint Point, specifying bottom right corner of a quadrangle
5689                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5690                 theName Object name; when specified, this parameter is used
5691                         for result publication in the study. Otherwise, if automatic
5692                         publication is switched on, default value is used for result name.
5693
5694             Returns:
5695                 List of all found sub-shapes.
5696             """
5697             # Example: see GEOM_TestOthers.py
5698             aList = self.ShapesOp.GetShapesOnQuadrangle(theShape, theShapeType,
5699                                                         theTopLeftPoint, theTopRightPoint,
5700                                                         theBottomLeftPoint, theBottomRightPoint, theState)
5701             RaiseIfFailed("GetShapesOnQuadrangle", self.ShapesOp)
5702             self._autoPublish(aList, theName, "shapeOnQuadrangle")
5703             return aList
5704
5705         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
5706         #  the specified quadrangle by the certain way, defined through \a theState parameter.
5707         #  @param theShape Shape to find sub-shapes of.
5708         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5709         #  @param theTopLeftPoint Point, specifying top left corner of a quadrangle
5710         #  @param theTopRightPoint Point, specifying top right corner of a quadrangle
5711         #  @param theBottomLeftPoint Point, specifying bottom left corner of a quadrangle
5712         #  @param theBottomRightPoint Point, specifying bottom right corner of a quadrangle
5713         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5714         #
5715         #  @return List of all found sub-shapes indices.
5716         #
5717         #  @ref swig_GetShapesOnQuadrangleIDs "Example"
5718         @ManageTransactions("ShapesOp")
5719         def GetShapesOnQuadrangleIDs(self, theShape, theShapeType,
5720                                      theTopLeftPoint, theTopRightPoint,
5721                                      theBottomLeftPoint, theBottomRightPoint, theState):
5722             """
5723             Find in theShape all sub-shapes of type theShapeType, situated relatively
5724             the specified quadrangle by the certain way, defined through theState parameter.
5725
5726             Parameters:
5727                 theShape Shape to find sub-shapes of.
5728                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5729                 theTopLeftPoint Point, specifying top left corner of a quadrangle
5730                 theTopRightPoint Point, specifying top right corner of a quadrangle
5731                 theBottomLeftPoint Point, specifying bottom left corner of a quadrangle
5732                 theBottomRightPoint Point, specifying bottom right corner of a quadrangle
5733                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5734
5735             Returns:
5736                 List of all found sub-shapes indices.
5737             """
5738
5739             # Example: see GEOM_TestOthers.py
5740             aList = self.ShapesOp.GetShapesOnQuadrangleIDs(theShape, theShapeType,
5741                                                            theTopLeftPoint, theTopRightPoint,
5742                                                            theBottomLeftPoint, theBottomRightPoint, theState)
5743             RaiseIfFailed("GetShapesOnQuadrangleIDs", self.ShapesOp)
5744             return aList
5745
5746         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
5747         #  the specified \a theBox by the certain way, defined through \a theState parameter.
5748         #  @param theBox Shape for relative comparing.
5749         #  @param theShape Shape to find sub-shapes of.
5750         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5751         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5752         #  @param theName Object name; when specified, this parameter is used
5753         #         for result publication in the study. Otherwise, if automatic
5754         #         publication is switched on, default value is used for result name.
5755         #
5756         #  @return List of all found sub-shapes.
5757         #
5758         #  @ref swig_GetShapesOnBox "Example"
5759         @ManageTransactions("ShapesOp")
5760         def GetShapesOnBox(self, theBox, theShape, theShapeType, theState, theName=None):
5761             """
5762             Find in theShape all sub-shapes of type theShapeType, situated relatively
5763             the specified theBox by the certain way, defined through theState parameter.
5764
5765             Parameters:
5766                 theBox Shape for relative comparing.
5767                 theShape Shape to find sub-shapes of.
5768                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5769                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5770                 theName Object name; when specified, this parameter is used
5771                         for result publication in the study. Otherwise, if automatic
5772                         publication is switched on, default value is used for result name.
5773
5774             Returns:
5775                 List of all found sub-shapes.
5776             """
5777             # Example: see GEOM_TestOthers.py
5778             aList = self.ShapesOp.GetShapesOnBox(theBox, theShape, theShapeType, theState)
5779             RaiseIfFailed("GetShapesOnBox", self.ShapesOp)
5780             self._autoPublish(aList, theName, "shapeOnBox")
5781             return aList
5782
5783         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
5784         #  the specified \a theBox by the certain way, defined through \a theState parameter.
5785         #  @param theBox Shape for relative comparing.
5786         #  @param theShape Shape to find sub-shapes of.
5787         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5788         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5789         #
5790         #  @return List of all found sub-shapes indices.
5791         #
5792         #  @ref swig_GetShapesOnBoxIDs "Example"
5793         @ManageTransactions("ShapesOp")
5794         def GetShapesOnBoxIDs(self, theBox, theShape, theShapeType, theState):
5795             """
5796             Find in theShape all sub-shapes of type theShapeType, situated relatively
5797             the specified theBox by the certain way, defined through theState parameter.
5798
5799             Parameters:
5800                 theBox Shape for relative comparing.
5801                 theShape Shape to find sub-shapes of.
5802                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5803                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5804
5805             Returns:
5806                 List of all found sub-shapes indices.
5807             """
5808             # Example: see GEOM_TestOthers.py
5809             aList = self.ShapesOp.GetShapesOnBoxIDs(theBox, theShape, theShapeType, theState)
5810             RaiseIfFailed("GetShapesOnBoxIDs", self.ShapesOp)
5811             return aList
5812
5813         ## Find in \a theShape all sub-shapes of type \a theShapeType,
5814         #  situated relatively the specified \a theCheckShape by the
5815         #  certain way, defined through \a theState parameter.
5816         #  @param theCheckShape Shape for relative comparing. It must be a solid.
5817         #  @param theShape Shape to find sub-shapes of.
5818         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5819         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5820         #  @param theName Object name; when specified, this parameter is used
5821         #         for result publication in the study. Otherwise, if automatic
5822         #         publication is switched on, default value is used for result name.
5823         #
5824         #  @return List of all found sub-shapes.
5825         #
5826         #  @ref swig_GetShapesOnShape "Example"
5827         @ManageTransactions("ShapesOp")
5828         def GetShapesOnShape(self, theCheckShape, theShape, theShapeType, theState, theName=None):
5829             """
5830             Find in theShape all sub-shapes of type theShapeType,
5831             situated relatively the specified theCheckShape by the
5832             certain way, defined through theState parameter.
5833
5834             Parameters:
5835                 theCheckShape Shape for relative comparing. It must be a solid.
5836                 theShape Shape to find sub-shapes of.
5837                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5838                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5839                 theName Object name; when specified, this parameter is used
5840                         for result publication in the study. Otherwise, if automatic
5841                         publication is switched on, default value is used for result name.
5842
5843             Returns:
5844                 List of all found sub-shapes.
5845             """
5846             # Example: see GEOM_TestOthers.py
5847             aList = self.ShapesOp.GetShapesOnShape(theCheckShape, theShape,
5848                                                    theShapeType, theState)
5849             RaiseIfFailed("GetShapesOnShape", self.ShapesOp)
5850             self._autoPublish(aList, theName, "shapeOnShape")
5851             return aList
5852
5853         ## Find in \a theShape all sub-shapes of type \a theShapeType,
5854         #  situated relatively the specified \a theCheckShape by the
5855         #  certain way, defined through \a theState parameter.
5856         #  @param theCheckShape Shape for relative comparing. It must be a solid.
5857         #  @param theShape Shape to find sub-shapes of.
5858         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5859         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5860         #  @param theName Object name; when specified, this parameter is used
5861         #         for result publication in the study. Otherwise, if automatic
5862         #         publication is switched on, default value is used for result name.
5863         #
5864         #  @return All found sub-shapes as compound.
5865         #
5866         #  @ref swig_GetShapesOnShapeAsCompound "Example"
5867         @ManageTransactions("ShapesOp")
5868         def GetShapesOnShapeAsCompound(self, theCheckShape, theShape, theShapeType, theState, theName=None):
5869             """
5870             Find in theShape all sub-shapes of type theShapeType,
5871             situated relatively the specified theCheckShape by the
5872             certain way, defined through theState parameter.
5873
5874             Parameters:
5875                 theCheckShape Shape for relative comparing. It must be a solid.
5876                 theShape Shape to find sub-shapes of.
5877                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5878                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5879                 theName Object name; when specified, this parameter is used
5880                         for result publication in the study. Otherwise, if automatic
5881                         publication is switched on, default value is used for result name.
5882
5883             Returns:
5884                 All found sub-shapes as compound.
5885             """
5886             # Example: see GEOM_TestOthers.py
5887             anObj = self.ShapesOp.GetShapesOnShapeAsCompound(theCheckShape, theShape,
5888                                                              theShapeType, theState)
5889             RaiseIfFailed("GetShapesOnShapeAsCompound", self.ShapesOp)
5890             self._autoPublish(anObj, theName, "shapeOnShape")
5891             return anObj
5892
5893         ## Find in \a theShape all sub-shapes of type \a theShapeType,
5894         #  situated relatively the specified \a theCheckShape by the
5895         #  certain way, defined through \a theState parameter.
5896         #  @param theCheckShape Shape for relative comparing. It must be a solid.
5897         #  @param theShape Shape to find sub-shapes of.
5898         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5899         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5900         #
5901         #  @return List of all found sub-shapes indices.
5902         #
5903         #  @ref swig_GetShapesOnShapeIDs "Example"
5904         @ManageTransactions("ShapesOp")
5905         def GetShapesOnShapeIDs(self, theCheckShape, theShape, theShapeType, theState):
5906             """
5907             Find in theShape all sub-shapes of type theShapeType,
5908             situated relatively the specified theCheckShape by the
5909             certain way, defined through theState parameter.
5910
5911             Parameters:
5912                 theCheckShape Shape for relative comparing. It must be a solid.
5913                 theShape Shape to find sub-shapes of.
5914                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5915                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5916
5917             Returns:
5918                 List of all found sub-shapes indices.
5919             """
5920             # Example: see GEOM_TestOthers.py
5921             aList = self.ShapesOp.GetShapesOnShapeIDs(theCheckShape, theShape,
5922                                                       theShapeType, theState)
5923             RaiseIfFailed("GetShapesOnShapeIDs", self.ShapesOp)
5924             return aList
5925
5926         ## Get sub-shape(s) of theShapeWhere, which are
5927         #  coincident with \a theShapeWhat or could be a part of it.
5928         #  @param theShapeWhere Shape to find sub-shapes of.
5929         #  @param theShapeWhat Shape, specifying what to find.
5930         #  @param isNewImplementation implementation of GetInPlace functionality
5931         #             (default = False, old alghorithm based on shape properties)
5932         #  @param theName Object name; when specified, this parameter is used
5933         #         for result publication in the study. Otherwise, if automatic
5934         #         publication is switched on, default value is used for result name.
5935         #
5936         #  @return Compound which includes all found sub-shapes if they have different types; 
5937         #          or group of all found shapes of the equal type; or a single found sub-shape.
5938         #
5939         #  @note This function has a restriction on argument shapes.
5940         #        If \a theShapeWhere has curved parts with significantly
5941         #        outstanding centres (i.e. the mass centre of a part is closer to
5942         #        \a theShapeWhat than to the part), such parts will not be found.
5943         #        @image html get_in_place_lost_part.png
5944         #
5945         #  @ref swig_GetInPlace "Example"
5946         @ManageTransactions("ShapesOp")
5947         def GetInPlace(self, theShapeWhere, theShapeWhat, isNewImplementation = False, theName=None):
5948             """
5949             Get sub-shape(s) of theShapeWhere, which are
5950             coincident with  theShapeWhat or could be a part of it.
5951
5952             Parameters:
5953                 theShapeWhere Shape to find sub-shapes of.
5954                 theShapeWhat Shape, specifying what to find.
5955                 isNewImplementation Implementation of GetInPlace functionality
5956                                     (default = False, old alghorithm based on shape properties)
5957                 theName Object name; when specified, this parameter is used
5958                         for result publication in the study. Otherwise, if automatic
5959                         publication is switched on, default value is used for result name.
5960
5961             Returns:
5962                 Compound which includes all found sub-shapes if they have different types; 
5963                 or group of all found shapes of the equal type; or a single found sub-shape.
5964
5965
5966             Note:
5967                 This function has a restriction on argument shapes.
5968                 If theShapeWhere has curved parts with significantly
5969                 outstanding centres (i.e. the mass centre of a part is closer to
5970                 theShapeWhat than to the part), such parts will not be found.
5971             """
5972             # Example: see GEOM_TestOthers.py
5973             anObj = None
5974             if isNewImplementation:
5975                 anObj = self.ShapesOp.GetInPlace(theShapeWhere, theShapeWhat)
5976             else:
5977                 anObj = self.ShapesOp.GetInPlaceOld(theShapeWhere, theShapeWhat)
5978                 pass
5979             RaiseIfFailed("GetInPlace", self.ShapesOp)
5980             self._autoPublish(anObj, theName, "inplace")
5981             return anObj
5982
5983         ## Get sub-shape(s) of \a theShapeWhere, which are
5984         #  coincident with \a theShapeWhat or could be a part of it.
5985         #
5986         #  Implementation of this method is based on a saved history of an operation,
5987         #  produced \a theShapeWhere. The \a theShapeWhat must be among this operation's
5988         #  arguments (an argument shape or a sub-shape of an argument shape).
5989         #  The operation could be the Partition or one of boolean operations,
5990         #  performed on simple shapes (not on compounds).
5991         #
5992         #  @param theShapeWhere Shape to find sub-shapes of.
5993         #  @param theShapeWhat Shape, specifying what to find (must be in the
5994         #                      building history of the ShapeWhere).
5995         #  @param theName Object name; when specified, this parameter is used
5996         #         for result publication in the study. Otherwise, if automatic
5997         #         publication is switched on, default value is used for result name.
5998         #
5999         #  @return Compound which includes all found sub-shapes if they have different types; 
6000         #          or group of all found shapes of the equal type; or a single found sub-shape.
6001         #
6002         #  @ref swig_GetInPlace "Example"
6003         @ManageTransactions("ShapesOp")
6004         def GetInPlaceByHistory(self, theShapeWhere, theShapeWhat, theName=None):
6005             """
6006             Implementation of this method is based on a saved history of an operation,
6007             produced theShapeWhere. The theShapeWhat must be among this operation's
6008             arguments (an argument shape or a sub-shape of an argument shape).
6009             The operation could be the Partition or one of boolean operations,
6010             performed on simple shapes (not on compounds).
6011
6012             Parameters:
6013                 theShapeWhere Shape to find sub-shapes of.
6014                 theShapeWhat Shape, specifying what to find (must be in the
6015                                 building history of the ShapeWhere).
6016                 theName Object name; when specified, this parameter is used
6017                         for result publication in the study. Otherwise, if automatic
6018                         publication is switched on, default value is used for result name.
6019
6020             Returns:
6021                 Compound which includes all found sub-shapes if they have different types; 
6022                 or group of all found shapes of the equal type; or a single found sub-shape.
6023             """
6024             # Example: see GEOM_TestOthers.py
6025             anObj = self.ShapesOp.GetInPlaceByHistory(theShapeWhere, theShapeWhat)
6026             RaiseIfFailed("GetInPlaceByHistory", self.ShapesOp)
6027             self._autoPublish(anObj, theName, "inplace")
6028             return anObj
6029
6030         ## A sort of GetInPlace functionality, returning IDs of sub-shapes.
6031         #  For each sub-shape ID of @a theShapeWhat return a list of corresponding sub-shape
6032         #  IDs of @a theShapeWhere.
6033         #  For example, if theShapeWhat is a box and theShapeWhere is this box cut into 
6034         #  two parts by a plane, then the result can be as this: 
6035         #    len( result_list ) = 35,
6036         #    result_list[ 1 ] = [ 2, 36 ], which means that the box  (ID 1) turned into two
6037         #  solids with IDs 2 and 36 within theShapeWhere
6038         #
6039         #  @param theShapeWhere Shape to find sub-shapes of.
6040         #  @param theShapeWhat Shape, specifying what to find.
6041         #  @return List of lists of sub-shape IDS of theShapeWhere.
6042         def GetInPlaceMap(self, theShapeWhere, theShapeWhat):
6043             """
6044             A sort of GetInPlace functionality, returning IDs of sub-shapes.
6045             For each sub-shape ID of @a theShapeWhat return a list of corresponding sub-shape
6046             IDs of @a theShapeWhere.
6047             For example, if theShapeWhat is a box and theShapeWhere is this box cut into 
6048             two parts by a plane, then the result can be as this: 
6049               len( result_list ) = 35,
6050               result_list[ 1 ] = [ 2, 36 ], which means that the box (ID 1) turned into two
6051             solids with IDs 2 and 36 within theShapeWhere
6052
6053             Parameters:
6054                 theShapeWhere Shape to find sub-shapes of.
6055                 theShapeWhat Shape, specifying what to find.
6056
6057             Returns:
6058                 List of lists of sub-shape IDS of theShapeWhere.
6059             """
6060             return self.ShapesOp.GetInPlaceMap(theShapeWhere, theShapeWhat)
6061
6062         ## Get sub-shape of theShapeWhere, which is
6063         #  equal to \a theShapeWhat.
6064         #  @param theShapeWhere Shape to find sub-shape of.
6065         #  @param theShapeWhat Shape, specifying what to find.
6066         #  @param theName Object name; when specified, this parameter is used
6067         #         for result publication in the study. Otherwise, if automatic
6068         #         publication is switched on, default value is used for result name.
6069         #
6070         #  @return New GEOM.GEOM_Object for found sub-shape.
6071         #
6072         #  @ref swig_GetSame "Example"
6073         @ManageTransactions("ShapesOp")
6074         def GetSame(self, theShapeWhere, theShapeWhat, theName=None):
6075             """
6076             Get sub-shape of theShapeWhere, which is
6077             equal to theShapeWhat.
6078
6079             Parameters:
6080                 theShapeWhere Shape to find sub-shape of.
6081                 theShapeWhat Shape, specifying what to find.
6082                 theName Object name; when specified, this parameter is used
6083                         for result publication in the study. Otherwise, if automatic
6084                         publication is switched on, default value is used for result name.
6085
6086             Returns:
6087                 New GEOM.GEOM_Object for found sub-shape.
6088             """
6089             anObj = self.ShapesOp.GetSame(theShapeWhere, theShapeWhat)
6090             RaiseIfFailed("GetSame", self.ShapesOp)
6091             self._autoPublish(anObj, theName, "sameShape")
6092             return anObj
6093
6094
6095         ## Get sub-shape indices of theShapeWhere, which is
6096         #  equal to \a theShapeWhat.
6097         #  @param theShapeWhere Shape to find sub-shape of.
6098         #  @param theShapeWhat Shape, specifying what to find.
6099         #  @return List of all found sub-shapes indices.
6100         #
6101         #  @ref swig_GetSame "Example"
6102         @ManageTransactions("ShapesOp")
6103         def GetSameIDs(self, theShapeWhere, theShapeWhat):
6104             """
6105             Get sub-shape indices of theShapeWhere, which is
6106             equal to theShapeWhat.
6107
6108             Parameters:
6109                 theShapeWhere Shape to find sub-shape of.
6110                 theShapeWhat Shape, specifying what to find.
6111
6112             Returns:
6113                 List of all found sub-shapes indices.
6114             """
6115             anObj = self.ShapesOp.GetSameIDs(theShapeWhere, theShapeWhat)
6116             RaiseIfFailed("GetSameIDs", self.ShapesOp)
6117             return anObj
6118
6119         ## Resize the input edge with the new Min and Max parameters.
6120         #  The input edge parameters range is [0, 1]. If theMin parameter is
6121         #  negative, the input edge is extended, otherwise it is shrinked by
6122         #  theMin parameter. If theMax is greater than 1, the edge is extended,
6123         #  otherwise it is shrinked by theMax parameter.
6124         #  @param theEdge the input edge to be resized.
6125         #  @param theMin the minimal parameter value.
6126         #  @param theMax the maximal parameter value.
6127         #  @param theName Object name; when specified, this parameter is used
6128         #         for result publication in the study. Otherwise, if automatic
6129         #         publication is switched on, default value is used for result name.
6130         #  @return New GEOM.GEOM_Object, containing the created edge.
6131         #
6132         #  @ref tui_extend "Example"
6133         @ManageTransactions("ShapesOp")
6134         def ExtendEdge(self, theEdge, theMin, theMax, theName=None):
6135             """
6136             Resize the input edge with the new Min and Max parameters.
6137             The input edge parameters range is [0, 1]. If theMin parameter is
6138             negative, the input edge is extended, otherwise it is shrinked by
6139             theMin parameter. If theMax is greater than 1, the edge is extended,
6140             otherwise it is shrinked by theMax parameter.
6141
6142             Parameters:
6143                 theEdge the input edge to be resized.
6144                 theMin the minimal parameter value.
6145                 theMax the maximal parameter value.
6146                 theName Object name; when specified, this parameter is used
6147                         for result publication in the study. Otherwise, if automatic
6148                         publication is switched on, default value is used for result name.
6149
6150             Returns:
6151                 New GEOM.GEOM_Object, containing the created edge.
6152             """
6153             theMin, theMax, Parameters = ParseParameters(theMin, theMax)
6154             anObj = self.ShapesOp.ExtendEdge(theEdge, theMin, theMax)
6155             RaiseIfFailed("ExtendEdge", self.ShapesOp)
6156             anObj.SetParameters(Parameters)
6157             self._autoPublish(anObj, theName, "edge")
6158             return anObj
6159
6160         ## Resize the input face with the new UMin, UMax, VMin and VMax
6161         #  parameters. The input face U and V parameters range is [0, 1]. If
6162         #  theUMin parameter is negative, the input face is extended, otherwise
6163         #  it is shrinked along U direction by theUMin parameter. If theUMax is
6164         #  greater than 1, the face is extended, otherwise it is shrinked along
6165         #  U direction by theUMax parameter. So as for theVMin, theVMax and
6166         #  V direction of the input face.
6167         #  @param theFace the input face to be resized.
6168         #  @param theUMin the minimal U parameter value.
6169         #  @param theUMax the maximal U parameter value.
6170         #  @param theVMin the minimal V parameter value.
6171         #  @param theVMax the maximal V parameter value.
6172         #  @param theName Object name; when specified, this parameter is used
6173         #         for result publication in the study. Otherwise, if automatic
6174         #         publication is switched on, default value is used for result name.
6175         #  @return New GEOM.GEOM_Object, containing the created face.
6176         #
6177         #  @ref tui_extend "Example"
6178         @ManageTransactions("ShapesOp")
6179         def ExtendFace(self, theFace, theUMin, theUMax,
6180                        theVMin, theVMax, theName=None):
6181             """
6182             Resize the input face with the new UMin, UMax, VMin and VMax
6183             parameters. The input face U and V parameters range is [0, 1]. If
6184             theUMin parameter is negative, the input face is extended, otherwise
6185             it is shrinked along U direction by theUMin parameter. If theUMax is
6186             greater than 1, the face is extended, otherwise it is shrinked along
6187             U direction by theUMax parameter. So as for theVMin, theVMax and
6188             V direction of the input face.
6189
6190             Parameters:
6191                 theFace the input face to be resized.
6192                 theUMin the minimal U parameter value.
6193                 theUMax the maximal U parameter value.
6194                 theVMin the minimal V parameter value.
6195                 theVMax the maximal V parameter value.
6196                 theName Object name; when specified, this parameter is used
6197                         for result publication in the study. Otherwise, if automatic
6198                         publication is switched on, default value is used for result name.
6199
6200             Returns:
6201                 New GEOM.GEOM_Object, containing the created face.
6202             """
6203             theUMin, theUMax, theVMin, theVMax, Parameters = ParseParameters(theUMin, theUMax, theVMin, theVMax)
6204             anObj = self.ShapesOp.ExtendFace(theFace, theUMin, theUMax,
6205                                              theVMin, theVMax)
6206             RaiseIfFailed("ExtendFace", self.ShapesOp)
6207             anObj.SetParameters(Parameters)
6208             self._autoPublish(anObj, theName, "face")
6209             return anObj
6210
6211         ## This function takes some face as input parameter and creates new
6212         #  GEOM_Object, i.e. topological shape by extracting underlying surface
6213         #  of the source face and limiting it by the Umin, Umax, Vmin, Vmax
6214         #  parameters of the source face (in the parametrical space).
6215         #  @param theFace the input face.
6216         #  @param theName Object name; when specified, this parameter is used
6217         #         for result publication in the study. Otherwise, if automatic
6218         #         publication is switched on, default value is used for result name.
6219         #  @return New GEOM.GEOM_Object, containing the created face.
6220         #
6221         #  @ref tui_creation_surface "Example"
6222         @ManageTransactions("ShapesOp")
6223         def MakeSurfaceFromFace(self, theFace, theName=None):
6224             """
6225             This function takes some face as input parameter and creates new
6226             GEOM_Object, i.e. topological shape by extracting underlying surface
6227             of the source face and limiting it by the Umin, Umax, Vmin, Vmax
6228             parameters of the source face (in the parametrical space).
6229
6230             Parameters:
6231                 theFace the input face.
6232                 theName Object name; when specified, this parameter is used
6233                         for result publication in the study. Otherwise, if automatic
6234                         publication is switched on, default value is used for result name.
6235
6236             Returns:
6237                 New GEOM.GEOM_Object, containing the created face.
6238             """
6239             anObj = self.ShapesOp.MakeSurfaceFromFace(theFace)
6240             RaiseIfFailed("MakeSurfaceFromFace", self.ShapesOp)
6241             self._autoPublish(anObj, theName, "surface")
6242             return anObj
6243
6244         # end of l4_obtain
6245         ## @}
6246
6247         ## @addtogroup l4_access
6248         ## @{
6249
6250         ## Obtain a composite sub-shape of <VAR>aShape</VAR>, composed from sub-shapes
6251         #  of aShape, selected by their unique IDs inside <VAR>aShape</VAR>
6252         #  @param aShape Shape to get sub-shape of.
6253         #  @param ListOfID List of sub-shapes indices.
6254         #  @param theName Object name; when specified, this parameter is used
6255         #         for result publication in the study. Otherwise, if automatic
6256         #         publication is switched on, default value is used for result name.
6257         #
6258         #  @return Found sub-shape.
6259         #
6260         #  @ref swig_all_decompose "Example"
6261         def GetSubShape(self, aShape, ListOfID, theName=None):
6262             """
6263             Obtain a composite sub-shape of aShape, composed from sub-shapes
6264             of aShape, selected by their unique IDs inside aShape
6265
6266             Parameters:
6267                 aShape Shape to get sub-shape of.
6268                 ListOfID List of sub-shapes indices.
6269                 theName Object name; when specified, this parameter is used
6270                         for result publication in the study. Otherwise, if automatic
6271                         publication is switched on, default value is used for result name.
6272
6273             Returns:
6274                 Found sub-shape.
6275             """
6276             # Example: see GEOM_TestAll.py
6277             anObj = self.AddSubShape(aShape,ListOfID)
6278             self._autoPublish(anObj, theName, "subshape")
6279             return anObj
6280
6281         ## Obtain unique ID of sub-shape <VAR>aSubShape</VAR> inside <VAR>aShape</VAR>
6282         #  of aShape, selected by their unique IDs inside <VAR>aShape</VAR>
6283         #  @param aShape Shape to get sub-shape of.
6284         #  @param aSubShape Sub-shapes of aShape.
6285         #  @return ID of found sub-shape.
6286         #
6287         #  @ref swig_all_decompose "Example"
6288         @ManageTransactions("LocalOp")
6289         def GetSubShapeID(self, aShape, aSubShape):
6290             """
6291             Obtain unique ID of sub-shape aSubShape inside aShape
6292             of aShape, selected by their unique IDs inside aShape
6293
6294             Parameters:
6295                aShape Shape to get sub-shape of.
6296                aSubShape Sub-shapes of aShape.
6297
6298             Returns:
6299                ID of found sub-shape.
6300             """
6301             # Example: see GEOM_TestAll.py
6302             anID = self.LocalOp.GetSubShapeIndex(aShape, aSubShape)
6303             RaiseIfFailed("GetSubShapeIndex", self.LocalOp)
6304             return anID
6305
6306         ## Obtain unique IDs of sub-shapes <VAR>aSubShapes</VAR> inside <VAR>aShape</VAR>
6307         #  This function is provided for performance purpose. The complexity is O(n) with n
6308         #  the number of subobjects of aShape
6309         #  @param aShape Shape to get sub-shape of.
6310         #  @param aSubShapes Sub-shapes of aShape.
6311         #  @return list of IDs of found sub-shapes.
6312         #
6313         #  @ref swig_all_decompose "Example"
6314         @ManageTransactions("ShapesOp")
6315         def GetSubShapesIDs(self, aShape, aSubShapes):
6316             """
6317             Obtain a list of IDs of sub-shapes aSubShapes inside aShape
6318             This function is provided for performance purpose. The complexity is O(n) with n
6319             the number of subobjects of aShape
6320
6321             Parameters:
6322                aShape Shape to get sub-shape of.
6323                aSubShapes Sub-shapes of aShape.
6324
6325             Returns:
6326                List of IDs of found sub-shape.
6327             """
6328             # Example: see GEOM_TestAll.py
6329             anIDs = self.ShapesOp.GetSubShapesIndices(aShape, aSubShapes)
6330             RaiseIfFailed("GetSubShapesIndices", self.ShapesOp)
6331             return anIDs
6332
6333         # end of l4_access
6334         ## @}
6335
6336         ## @addtogroup l4_decompose
6337         ## @{
6338
6339         ## Get all sub-shapes and groups of \a theShape,
6340         #  that were created already by any other methods.
6341         #  @param theShape Any shape.
6342         #  @param theGroupsOnly If this parameter is TRUE, only groups will be
6343         #                       returned, else all found sub-shapes and groups.
6344         #  @return List of existing sub-objects of \a theShape.
6345         #
6346         #  @ref swig_all_decompose "Example"
6347         @ManageTransactions("ShapesOp")
6348         def GetExistingSubObjects(self, theShape, theGroupsOnly = False):
6349             """
6350             Get all sub-shapes and groups of theShape,
6351             that were created already by any other methods.
6352
6353             Parameters:
6354                 theShape Any shape.
6355                 theGroupsOnly If this parameter is TRUE, only groups will be
6356                                  returned, else all found sub-shapes and groups.
6357
6358             Returns:
6359                 List of existing sub-objects of theShape.
6360             """
6361             # Example: see GEOM_TestAll.py
6362             ListObj = self.ShapesOp.GetExistingSubObjects(theShape, theGroupsOnly)
6363             RaiseIfFailed("GetExistingSubObjects", self.ShapesOp)
6364             return ListObj
6365
6366         ## Get all groups of \a theShape,
6367         #  that were created already by any other methods.
6368         #  @param theShape Any shape.
6369         #  @return List of existing groups of \a theShape.
6370         #
6371         #  @ref swig_all_decompose "Example"
6372         @ManageTransactions("ShapesOp")
6373         def GetGroups(self, theShape):
6374             """
6375             Get all groups of theShape,
6376             that were created already by any other methods.
6377
6378             Parameters:
6379                 theShape Any shape.
6380
6381             Returns:
6382                 List of existing groups of theShape.
6383             """
6384             # Example: see GEOM_TestAll.py
6385             ListObj = self.ShapesOp.GetExistingSubObjects(theShape, True)
6386             RaiseIfFailed("GetExistingSubObjects", self.ShapesOp)
6387             return ListObj
6388
6389         ## Explode a shape on sub-shapes of a given type.
6390         #  If the shape itself matches the type, it is also returned.
6391         #  @param aShape Shape to be exploded.
6392         #  @param aType Type of sub-shapes to be retrieved (see ShapeType())
6393         #  @param theName Object name; when specified, this parameter is used
6394         #         for result publication in the study. Otherwise, if automatic
6395         #         publication is switched on, default value is used for result name.
6396         #
6397         #  @return List of sub-shapes of type theShapeType, contained in theShape.
6398         #
6399         #  @ref swig_all_decompose "Example"
6400         @ManageTransactions("ShapesOp")
6401         def SubShapeAll(self, aShape, aType, theName=None):
6402             """
6403             Explode a shape on sub-shapes of a given type.
6404             If the shape itself matches the type, it is also returned.
6405
6406             Parameters:
6407                 aShape Shape to be exploded.
6408                 aType Type of sub-shapes to be retrieved (see geompy.ShapeType)
6409                 theName Object name; when specified, this parameter is used
6410                         for result publication in the study. Otherwise, if automatic
6411                         publication is switched on, default value is used for result name.
6412
6413             Returns:
6414                 List of sub-shapes of type theShapeType, contained in theShape.
6415             """
6416             # Example: see GEOM_TestAll.py
6417             ListObj = self.ShapesOp.MakeAllSubShapes(aShape, EnumToLong( aType ), False)
6418             RaiseIfFailed("SubShapeAll", self.ShapesOp)
6419             self._autoPublish(ListObj, theName, "subshape")
6420             return ListObj
6421
6422         ## Explode a shape on sub-shapes of a given type.
6423         #  @param aShape Shape to be exploded.
6424         #  @param aType Type of sub-shapes to be retrieved (see ShapeType())
6425         #  @return List of IDs of sub-shapes.
6426         #
6427         #  @ref swig_all_decompose "Example"
6428         @ManageTransactions("ShapesOp")
6429         def SubShapeAllIDs(self, aShape, aType):
6430             """
6431             Explode a shape on sub-shapes of a given type.
6432
6433             Parameters:
6434                 aShape Shape to be exploded (see geompy.ShapeType)
6435                 aType Type of sub-shapes to be retrieved (see geompy.ShapeType)
6436
6437             Returns:
6438                 List of IDs of sub-shapes.
6439             """
6440             ListObj = self.ShapesOp.GetAllSubShapesIDs(aShape, EnumToLong( aType ), False)
6441             RaiseIfFailed("SubShapeAllIDs", self.ShapesOp)
6442             return ListObj
6443
6444         ## Obtain a compound of sub-shapes of <VAR>aShape</VAR>,
6445         #  selected by their indices in list of all sub-shapes of type <VAR>aType</VAR>.
6446         #  Each index is in range [1, Nb_Sub-Shapes_Of_Given_Type]
6447         #  @param aShape Shape to get sub-shape of.
6448         #  @param ListOfInd List of sub-shapes indices.
6449         #  @param aType Type of sub-shapes to be retrieved (see ShapeType())
6450         #  @param theName Object name; when specified, this parameter is used
6451         #         for result publication in the study. Otherwise, if automatic
6452         #         publication is switched on, default value is used for result name.
6453         #
6454         #  @return A compound of sub-shapes of aShape.
6455         #
6456         #  @ref swig_all_decompose "Example"
6457         def SubShape(self, aShape, aType, ListOfInd, theName=None):
6458             """
6459             Obtain a compound of sub-shapes of aShape,
6460             selected by their indices in list of all sub-shapes of type aType.
6461             Each index is in range [1, Nb_Sub-Shapes_Of_Given_Type]
6462
6463             Parameters:
6464                 aShape Shape to get sub-shape of.
6465                 ListOfID List of sub-shapes indices.
6466                 aType Type of sub-shapes to be retrieved (see geompy.ShapeType)
6467                 theName Object name; when specified, this parameter is used
6468                         for result publication in the study. Otherwise, if automatic
6469                         publication is switched on, default value is used for result name.
6470
6471             Returns:
6472                 A compound of sub-shapes of aShape.
6473             """
6474             # Example: see GEOM_TestAll.py
6475             ListOfIDs = []
6476             AllShapeIDsList = self.SubShapeAllIDs(aShape, EnumToLong( aType ))
6477             for ind in ListOfInd:
6478                 ListOfIDs.append(AllShapeIDsList[ind - 1])
6479             # note: auto-publishing is done in self.GetSubShape()
6480             anObj = self.GetSubShape(aShape, ListOfIDs, theName)
6481             return anObj
6482
6483         ## Explode a shape on sub-shapes of a given type.
6484         #  Sub-shapes will be sorted taking into account their gravity centers,
6485         #  to provide stable order of sub-shapes. Please see
6486         #  @ref sorting_shapes_page "Description of Sorting Shapes Algorithm".
6487         #  If the shape itself matches the type, it is also returned.
6488         #  @param aShape Shape to be exploded.
6489         #  @param aType Type of sub-shapes to be retrieved (see ShapeType())
6490         #  @param theName Object name; when specified, this parameter is used
6491         #         for result publication in the study. Otherwise, if automatic
6492         #         publication is switched on, default value is used for result name.
6493         #
6494         #  @return List of sub-shapes of type theShapeType, contained in theShape.
6495         #
6496         #  @ref swig_SubShapeAllSorted "Example"
6497         @ManageTransactions("ShapesOp")
6498         def SubShapeAllSortedCentres(self, aShape, aType, theName=None):
6499             """
6500             Explode a shape on sub-shapes of a given type.
6501             Sub-shapes will be sorted taking into account their gravity centers,
6502             to provide stable order of sub-shapes.
6503             If the shape itself matches the type, it is also returned.
6504
6505             Parameters:
6506                 aShape Shape to be exploded.
6507                 aType Type of sub-shapes to be retrieved (see geompy.ShapeType)
6508                 theName Object name; when specified, this parameter is used
6509                         for result publication in the study. Otherwise, if automatic
6510                         publication is switched on, default value is used for result name.
6511
6512             Returns:
6513                 List of sub-shapes of type theShapeType, contained in theShape.
6514             """
6515             # Example: see GEOM_TestAll.py
6516             ListObj = self.ShapesOp.MakeAllSubShapes(aShape, EnumToLong( aType ), True)
6517             RaiseIfFailed("SubShapeAllSortedCentres", self.ShapesOp)
6518             self._autoPublish(ListObj, theName, "subshape")
6519             return ListObj
6520
6521         ## Explode a shape on sub-shapes of a given type.
6522         #  Sub-shapes will be sorted taking into account their gravity centers,
6523         #  to provide stable order of sub-shapes. Please see
6524         #  @ref sorting_shapes_page "Description of Sorting Shapes Algorithm".
6525         #  @param aShape Shape to be exploded.
6526         #  @param aType Type of sub-shapes to be retrieved (see ShapeType())
6527         #  @return List of IDs of sub-shapes.
6528         #
6529         #  @ref swig_all_decompose "Example"
6530         @ManageTransactions("ShapesOp")
6531         def SubShapeAllSortedCentresIDs(self, aShape, aType):
6532             """
6533             Explode a shape on sub-shapes of a given type.
6534             Sub-shapes will be sorted taking into account their gravity centers,
6535             to provide stable order of sub-shapes.
6536
6537             Parameters:
6538                 aShape Shape to be exploded.
6539                 aType Type of sub-shapes to be retrieved (see geompy.ShapeType)
6540
6541             Returns:
6542                 List of IDs of sub-shapes.
6543             """
6544             ListIDs = self.ShapesOp.GetAllSubShapesIDs(aShape, EnumToLong( aType ), True)
6545             RaiseIfFailed("SubShapeAllIDs", self.ShapesOp)
6546             return ListIDs
6547
6548         ## Obtain a compound of sub-shapes of <VAR>aShape</VAR>,
6549         #  selected by they indices in sorted list of all sub-shapes of type <VAR>aType</VAR>.
6550         #  Please see @ref sorting_shapes_page "Description of Sorting Shapes Algorithm".
6551         #  Each index is in range [1, Nb_Sub-Shapes_Of_Given_Type]
6552         #  @param aShape Shape to get sub-shape of.
6553         #  @param ListOfInd List of sub-shapes indices.
6554         #  @param aType Type of sub-shapes to be retrieved (see ShapeType())
6555         #  @param theName Object name; when specified, this parameter is used
6556         #         for result publication in the study. Otherwise, if automatic
6557         #         publication is switched on, default value is used for result name.
6558         #
6559         #  @return A compound of sub-shapes of aShape.
6560         #
6561         #  @ref swig_all_decompose "Example"
6562         def SubShapeSortedCentres(self, aShape, aType, ListOfInd, theName=None):
6563             """
6564             Obtain a compound of sub-shapes of aShape,
6565             selected by they indices in sorted list of all sub-shapes of type aType.
6566             Each index is in range [1, Nb_Sub-Shapes_Of_Given_Type]
6567
6568             Parameters:
6569                 aShape Shape to get sub-shape of.
6570                 ListOfID List of sub-shapes indices.
6571                 aType Type of sub-shapes to be retrieved (see geompy.ShapeType)
6572                 theName Object name; when specified, this parameter is used
6573                         for result publication in the study. Otherwise, if automatic
6574                         publication is switched on, default value is used for result name.
6575
6576             Returns:
6577                 A compound of sub-shapes of aShape.
6578             """
6579             # Example: see GEOM_TestAll.py
6580             ListOfIDs = []
6581             AllShapeIDsList = self.SubShapeAllSortedCentresIDs(aShape, EnumToLong( aType ))
6582             for ind in ListOfInd:
6583                 ListOfIDs.append(AllShapeIDsList[ind - 1])
6584             # note: auto-publishing is done in self.GetSubShape()
6585             anObj = self.GetSubShape(aShape, ListOfIDs, theName)
6586             return anObj
6587
6588         ## Extract shapes (excluding the main shape) of given type.
6589         #  @param aShape The shape.
6590         #  @param aType  The shape type (see ShapeType())
6591         #  @param isSorted Boolean flag to switch sorting on/off. Please see
6592         #         @ref sorting_shapes_page "Description of Sorting Shapes Algorithm".
6593         #  @param theName Object name; when specified, this parameter is used
6594         #         for result publication in the study. Otherwise, if automatic
6595         #         publication is switched on, default value is used for result name.
6596         #
6597         #  @return List of sub-shapes of type aType, contained in aShape.
6598         #
6599         #  @ref swig_FilletChamfer "Example"
6600         @ManageTransactions("ShapesOp")
6601         def ExtractShapes(self, aShape, aType, isSorted = False, theName=None):
6602             """
6603             Extract shapes (excluding the main shape) of given type.
6604
6605             Parameters:
6606                 aShape The shape.
6607                 aType  The shape type (see geompy.ShapeType)
6608                 isSorted Boolean flag to switch sorting on/off.
6609                 theName Object name; when specified, this parameter is used
6610                         for result publication in the study. Otherwise, if automatic
6611                         publication is switched on, default value is used for result name.
6612
6613             Returns:
6614                 List of sub-shapes of type aType, contained in aShape.
6615             """
6616             # Example: see GEOM_TestAll.py
6617             ListObj = self.ShapesOp.ExtractSubShapes(aShape, EnumToLong( aType ), isSorted)
6618             RaiseIfFailed("ExtractSubShapes", self.ShapesOp)
6619             self._autoPublish(ListObj, theName, "subshape")
6620             return ListObj
6621
6622         ## Get a set of sub-shapes defined by their unique IDs inside <VAR>aShape</VAR>
6623         #  @param aShape Main shape.
6624         #  @param anIDs List of unique IDs of sub-shapes inside <VAR>aShape</VAR>.
6625         #  @param theName Object name; when specified, this parameter is used
6626         #         for result publication in the study. Otherwise, if automatic
6627         #         publication is switched on, default value is used for result name.
6628         #  @return List of GEOM.GEOM_Object, corresponding to found sub-shapes.
6629         #
6630         #  @ref swig_all_decompose "Example"
6631         @ManageTransactions("ShapesOp")
6632         def SubShapes(self, aShape, anIDs, theName=None):
6633             """
6634             Get a set of sub-shapes defined by their unique IDs inside theMainShape
6635
6636             Parameters:
6637                 aShape Main shape.
6638                 anIDs List of unique IDs of sub-shapes inside theMainShape.
6639                 theName Object name; when specified, this parameter is used
6640                         for result publication in the study. Otherwise, if automatic
6641                         publication is switched on, default value is used for result name.
6642
6643             Returns:
6644                 List of GEOM.GEOM_Object, corresponding to found sub-shapes.
6645             """
6646             # Example: see GEOM_TestAll.py
6647             ListObj = self.ShapesOp.MakeSubShapes(aShape, anIDs)
6648             RaiseIfFailed("SubShapes", self.ShapesOp)
6649             self._autoPublish(ListObj, theName, "subshape")
6650             return ListObj
6651
6652         ## Explode a shape into edges sorted in a row from a starting point.
6653         #  @param theShape the shape to be exploded on edges.
6654         #  @param theStartPoint the starting point.
6655         #  @param theName Object name; when specified, this parameter is used
6656         #         for result publication in the study. Otherwise, if automatic
6657         #         publication is switched on, default value is used for result name.
6658         #  @return List of GEOM.GEOM_Object that is actually an ordered list
6659         #          of edges sorted in a row from a starting point.
6660         #
6661         #  @ref swig_GetSubShapeEdgeSorted "Example"
6662         @ManageTransactions("ShapesOp")
6663         def GetSubShapeEdgeSorted(self, theShape, theStartPoint, theName=None):
6664             """
6665             Explode a shape into edges sorted in a row from a starting point.
6666
6667             Parameters:
6668                 theShape the shape to be exploded on edges.
6669                 theStartPoint the starting point.
6670                 theName Object name; when specified, this parameter is used
6671                         for result publication in the study. Otherwise, if automatic
6672                         publication is switched on, default value is used for result name.
6673
6674             Returns:
6675                 List of GEOM.GEOM_Object that is actually an ordered list
6676                 of edges sorted in a row from a starting point.
6677             """
6678             # Example: see GEOM_TestAll.py
6679             ListObj = self.ShapesOp.GetSubShapeEdgeSorted(theShape, theStartPoint)
6680             RaiseIfFailed("GetSubShapeEdgeSorted", self.ShapesOp)
6681             self._autoPublish(ListObj, theName, "SortedEdges")
6682             return ListObj
6683
6684         ##
6685         # Return the list of subshapes that satisfies a certain tolerance
6686         # criterion. The user defines the type of shapes to be returned, the
6687         # condition and the tolerance value. The operation is defined for
6688         # faces, edges and vertices only. E.g. for theShapeType FACE,
6689         # theCondition GEOM::CC_GT and theTolerance 1.e-7 this method returns
6690         # all faces of theShape that have tolerances greater then 1.e7.
6691         #
6692         #  @param theShape the shape to be exploded
6693         #  @param theShapeType the type of sub-shapes to be returned (see
6694         #         ShapeType()). Can have the values FACE, EDGE and VERTEX only.
6695         #  @param theCondition the condition type (see GEOM::comparison_condition).
6696         #  @param theTolerance the tolerance filter.
6697         #  @param theName Object name; when specified, this parameter is used
6698         #         for result publication in the study. Otherwise, if automatic
6699         #         publication is switched on, default value is used for result name.
6700         #  @return the list of shapes that satisfy the conditions.
6701         #
6702         #  @ref swig_GetSubShapesWithTolerance "Example"
6703         @ManageTransactions("ShapesOp")
6704         def GetSubShapesWithTolerance(self, theShape, theShapeType,
6705                                       theCondition, theTolerance, theName=None):
6706             """
6707             Return the list of subshapes that satisfies a certain tolerance
6708             criterion. The user defines the type of shapes to be returned, the
6709             condition and the tolerance value. The operation is defined for
6710             faces, edges and vertices only. E.g. for theShapeType FACE,
6711             theCondition GEOM::CC_GT and theTolerance 1.e-7 this method returns
6712             all faces of theShape that have tolerances greater then 1.e7.
6713             
6714             Parameters:
6715                 theShape the shape to be exploded
6716                 theShapeType the type of sub-shapes to be returned (see
6717                              ShapeType()). Can have the values FACE,
6718                              EDGE and VERTEX only.
6719                 theCondition the condition type (see GEOM::comparison_condition).
6720                 theTolerance the tolerance filter.
6721                 theName Object name; when specified, this parameter is used
6722                         for result publication in the study. Otherwise, if automatic
6723                         publication is switched on, default value is used for result name.
6724
6725             Returns:
6726                 The list of shapes that satisfy the conditions.
6727             """
6728             # Example: see GEOM_TestAll.py
6729             ListObj = self.ShapesOp.GetSubShapesWithTolerance(theShape, EnumToLong(theShapeType),
6730                                                               theCondition, theTolerance)
6731             RaiseIfFailed("GetSubShapesWithTolerance", self.ShapesOp)
6732             self._autoPublish(ListObj, theName, "SubShapeWithTolerance")
6733             return ListObj
6734
6735         ## Check if the object is a sub-object of another GEOM object.
6736         #  @param aSubObject Checked sub-object (or its parent object, in case if
6737         #         \a theSubObjectIndex is non-zero).
6738         #  @param anObject An object that is checked for ownership (or its parent object,
6739         #         in case if \a theObjectIndex is non-zero).
6740         #  @param aSubObjectIndex When non-zero, specifies a sub-shape index that
6741         #         identifies a sub-object within its parent specified via \a theSubObject.
6742         #  @param anObjectIndex When non-zero, specifies a sub-shape index that
6743         #         identifies an object within its parent specified via \a theObject.
6744         #  @return TRUE, if the given object contains sub-object.
6745         @ManageTransactions("ShapesOp")
6746         def IsSubShapeBelongsTo(self, aSubObject, anObject, aSubObjectIndex = 0, anObjectIndex = 0):
6747             """
6748             Check if the object is a sub-object of another GEOM object.
6749             
6750             Parameters:
6751                 aSubObject Checked sub-object (or its parent object, in case if
6752                     \a theSubObjectIndex is non-zero).
6753                 anObject An object that is checked for ownership (or its parent object,
6754                     in case if \a theObjectIndex is non-zero).
6755                 aSubObjectIndex When non-zero, specifies a sub-shape index that
6756                     identifies a sub-object within its parent specified via \a theSubObject.
6757                 anObjectIndex When non-zero, specifies a sub-shape index that
6758                     identifies an object within its parent specified via \a theObject.
6759
6760             Returns
6761                 TRUE, if the given object contains sub-object.
6762             """
6763             IsOk = self.ShapesOp.IsSubShapeBelongsTo(aSubObject, aSubObjectIndex, anObject, anObjectIndex)
6764             RaiseIfFailed("IsSubShapeBelongsTo", self.ShapesOp)
6765             return IsOk
6766
6767         ## Perform extraction of sub-shapes from the main shape.
6768         #
6769         #  @param theShape the main shape
6770         #  @param theListOfID the list of sub-shape IDs to be extracted from
6771         #         the main shape.
6772         #  @return New GEOM.GEOM_Object, containing the shape without
6773         #          extracted sub-shapes.
6774         #
6775         #  @ref swig_MakeExtraction "Example"
6776         @ManageTransactions("ShapesOp")
6777         def MakeExtraction(self, theShape, theListOfID, theName=None):
6778             """
6779             Perform extraction of sub-shapes from the main shape.
6780
6781             Parameters:
6782                 theShape the main shape
6783                 theListOfID the list of sub-shape IDs to be extracted from
6784                             the main shape.
6785
6786             Returns
6787                 New GEOM.GEOM_Object, containing the shape without
6788                 extracted sub-shapes.
6789             """
6790             # Example: see GEOM_TestAll.py
6791             (anObj, aStat) = self.ShapesOp.MakeExtraction(theShape, theListOfID)
6792             RaiseIfFailed("MakeExtraction", self.ShapesOp)
6793             self._autoPublish(anObj, theName, "Extraction")
6794             return anObj
6795
6796         # end of l4_decompose
6797         ## @}
6798
6799         ## @addtogroup l4_decompose_d
6800         ## @{
6801
6802         ## Deprecated method
6803         #  It works like SubShapeAllSortedCentres(), but wrongly
6804         #  defines centres of faces, shells and solids.
6805         @ManageTransactions("ShapesOp")
6806         def SubShapeAllSorted(self, aShape, aType, theName=None):
6807             """
6808             Deprecated method
6809             It works like geompy.SubShapeAllSortedCentres, but wrongly
6810             defines centres of faces, shells and solids.
6811             """
6812             ListObj = self.ShapesOp.MakeExplode(aShape, EnumToLong( aType ), True)
6813             RaiseIfFailed("MakeExplode", self.ShapesOp)
6814             self._autoPublish(ListObj, theName, "subshape")
6815             return ListObj
6816
6817         ## Deprecated method
6818         #  It works like SubShapeAllSortedCentresIDs(), but wrongly
6819         #  defines centres of faces, shells and solids.
6820         @ManageTransactions("ShapesOp")
6821         def SubShapeAllSortedIDs(self, aShape, aType):
6822             """
6823             Deprecated method
6824             It works like geompy.SubShapeAllSortedCentresIDs, but wrongly
6825             defines centres of faces, shells and solids.
6826             """
6827             ListIDs = self.ShapesOp.SubShapeAllIDs(aShape, EnumToLong( aType ), True)
6828             RaiseIfFailed("SubShapeAllIDs", self.ShapesOp)
6829             return ListIDs
6830
6831         ## Deprecated method
6832         #  It works like SubShapeSortedCentres(), but has a bug
6833         #  (wrongly defines centres of faces, shells and solids).
6834         def SubShapeSorted(self, aShape, aType, ListOfInd, theName=None):
6835             """
6836             Deprecated method
6837             It works like geompy.SubShapeSortedCentres, but has a bug
6838             (wrongly defines centres of faces, shells and solids).
6839             """
6840             ListOfIDs = []
6841             AllShapeIDsList = self.SubShapeAllSortedIDs(aShape, EnumToLong( aType ))
6842             for ind in ListOfInd:
6843                 ListOfIDs.append(AllShapeIDsList[ind - 1])
6844             # note: auto-publishing is done in self.GetSubShape()
6845             anObj = self.GetSubShape(aShape, ListOfIDs, theName)
6846             return anObj
6847
6848         # end of l4_decompose_d
6849         ## @}
6850
6851         ## @addtogroup l3_healing
6852         ## @{
6853
6854         ## Apply a sequence of Shape Healing operators to the given object.
6855         #  @param theShape Shape to be processed.
6856         #  @param theOperators List of names of operators ("FixShape", "SplitClosedFaces", etc.).
6857         #  @param theParameters List of names of parameters
6858         #                    ("FixShape.Tolerance3d", "SplitClosedFaces.NbSplitPoints", etc.).
6859         #  @param theValues List of values of parameters, in the same order
6860         #                    as parameters are listed in <VAR>theParameters</VAR> list.
6861         #  @param theName Object name; when specified, this parameter is used
6862         #         for result publication in the study. Otherwise, if automatic
6863         #         publication is switched on, default value is used for result name.
6864         #
6865         #  <b> Operators and Parameters: </b> \n
6866         #
6867         #  * \b FixShape - corrects invalid shapes. \n
6868         #  - \b FixShape.Tolerance3d - work tolerance for detection of the problems and correction of them. \n
6869         #  - \b FixShape.MaxTolerance3d - maximal possible tolerance of the shape after correction. \n
6870         #
6871         #  * \b FixFaceSize - removes small faces, such as spots and strips.\n
6872         #  - \b FixFaceSize.Tolerance - defines minimum possible face size. \n
6873         #  - \b DropSmallEdges - removes edges, which merge with neighbouring edges. \n
6874         #  - \b DropSmallEdges.Tolerance3d - defines minimum possible distance between two parallel edges.\n
6875         #  - \b DropSmallSolids - either removes small solids or merges them with neighboring ones. \n
6876         #  - \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
6877         #  - \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
6878         #  - \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
6879         #
6880         #  * \b SplitAngle - splits faces based on conical surfaces, surfaces of revolution and cylindrical
6881         #    surfaces in segments using a certain angle. \n
6882         #  - \b SplitAngle.Angle - the central angle of the resulting segments (i.e. we obtain two segments
6883         #    if Angle=180, four if Angle=90, etc). \n
6884         #  - \b SplitAngle.MaxTolerance - maximum possible tolerance among the resulting segments.\n
6885         #
6886         #  * \b SplitClosedFaces - splits closed faces in segments.
6887         #    The number of segments depends on the number of splitting points.\n
6888         #  - \b SplitClosedFaces.NbSplitPoints - the number of splitting points.\n
6889         #
6890         #  * \b SplitContinuity - splits shapes to reduce continuities of curves and surfaces.\n
6891         #  - \b SplitContinuity.Tolerance3d - 3D tolerance for correction of geometry.\n
6892         #  - \b SplitContinuity.SurfaceContinuity - required continuity for surfaces.\n
6893         #  - \b SplitContinuity.CurveContinuity - required continuity for curves.\n
6894         #   This and the previous parameters can take the following values:\n
6895         #   \b Parametric \b Continuity \n
6896         #   \b C0 (Positional Continuity): curves are joined (the end positions of curves or surfaces
6897         #   are coincidental. The curves or surfaces may still meet at an angle, giving rise to a sharp corner or edge).\n
6898         #   \b C1 (Tangential Continuity): first derivatives are equal (the end vectors of curves or surfaces are parallel,
6899         #    ruling out sharp edges).\n
6900         #   \b C2 (Curvature Continuity): first and second derivatives are equal (the end vectors of curves or surfaces
6901         #       are of the same magnitude).\n
6902         #   \b CN N-th derivatives are equal (both the direction and the magnitude of the Nth derivatives of curves
6903         #    or surfaces (d/du C(u)) are the same at junction. \n
6904         #   \b Geometric \b Continuity \n
6905         #   \b G1: first derivatives are proportional at junction.\n
6906         #   The curve tangents thus have the same direction, but not necessarily the same magnitude.
6907         #      i.e., C1'(1) = (a,b,c) and C2'(0) = (k*a, k*b, k*c).\n
6908         #   \b G2: first and second derivatives are proportional at junction.
6909         #   As the names imply, geometric continuity requires the geometry to be continuous, while parametric
6910         #    continuity requires that the underlying parameterization was continuous as well.
6911         #   Parametric continuity of order n implies geometric continuity of order n, but not vice-versa.\n
6912         #
6913         #  * \b BsplineRestriction - converts curves and surfaces to Bsplines and processes them with the following parameters:\n
6914         #  - \b BSplineRestriction.SurfaceMode - approximation of surfaces if restriction is necessary.\n
6915         #  - \b BSplineRestriction.Curve3dMode - conversion of any 3D curve to BSpline and approximation.\n
6916         #  - \b BSplineRestriction.Curve2dMode - conversion of any 2D curve to BSpline and approximation.\n
6917         #  - \b BSplineRestriction.Tolerance3d - defines the possibility of surfaces and 3D curves approximation
6918         #       with the specified parameters.\n
6919         #  - \b BSplineRestriction.Tolerance2d - defines the possibility of surfaces and 2D curves approximation
6920         #       with the specified parameters.\n
6921         #  - \b BSplineRestriction.RequiredDegree - required degree of the resulting BSplines.\n
6922         #  - \b BSplineRestriction.RequiredNbSegments - required maximum number of segments of resultant BSplines.\n
6923         #  - \b BSplineRestriction.Continuity3d - continuity of the resulting surfaces and 3D curves.\n
6924         #  - \b BSplineRestriction.Continuity2d - continuity of the resulting 2D curves.\n
6925         #
6926         #  * \b ToBezier - converts curves and surfaces of any type to Bezier curves and surfaces.\n
6927         #  - \b ToBezier.SurfaceMode - if checked in, allows conversion of surfaces.\n
6928         #  - \b ToBezier.Curve3dMode - if checked in, allows conversion of 3D curves.\n
6929         #  - \b ToBezier.Curve2dMode - if checked in, allows conversion of 2D curves.\n
6930         #  - \b ToBezier.MaxTolerance - defines tolerance for detection and correction of problems.\n
6931         #
6932         #  * \b SameParameter - fixes edges of 2D and 3D curves not having the same parameter.\n
6933         #  - \b SameParameter.Tolerance3d - defines tolerance for fixing of edges.\n
6934         #
6935         #
6936         #  @return New GEOM.GEOM_Object, containing processed shape.
6937         #
6938         #  \n @ref tui_shape_processing "Example"
6939         @ManageTransactions("HealOp")
6940         def ProcessShape(self, theShape, theOperators, theParameters, theValues, theName=None):
6941             """
6942             Apply a sequence of Shape Healing operators to the given object.
6943
6944             Parameters:
6945                 theShape Shape to be processed.
6946                 theValues List of values of parameters, in the same order
6947                           as parameters are listed in theParameters list.
6948                 theOperators List of names of operators ('FixShape', 'SplitClosedFaces', etc.).
6949                 theParameters List of names of parameters
6950                               ('FixShape.Tolerance3d', 'SplitClosedFaces.NbSplitPoints', etc.).
6951                 theName Object name; when specified, this parameter is used
6952                         for result publication in the study. Otherwise, if automatic
6953                         publication is switched on, default value is used for result name.
6954
6955                 Operators and Parameters:
6956
6957                  * FixShape - corrects invalid shapes.
6958                      * FixShape.Tolerance3d - work tolerance for detection of the problems and correction of them.
6959                      * FixShape.MaxTolerance3d - maximal possible tolerance of the shape after correction.
6960                  * FixFaceSize - removes small faces, such as spots and strips.
6961                      * FixFaceSize.Tolerance - defines minimum possible face size.
6962                  * DropSmallEdges - removes edges, which merge with neighbouring edges.
6963                      * DropSmallEdges.Tolerance3d - defines minimum possible distance between two parallel edges.
6964                  * DropSmallSolids - either removes small solids or merges them with neighboring ones.
6965                      * 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.
6966                      * 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.
6967                      * 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.
6968
6969                  * SplitAngle - splits faces based on conical surfaces, surfaces of revolution and cylindrical surfaces
6970                                 in segments using a certain angle.
6971                      * SplitAngle.Angle - the central angle of the resulting segments (i.e. we obtain two segments
6972                                           if Angle=180, four if Angle=90, etc).
6973                      * SplitAngle.MaxTolerance - maximum possible tolerance among the resulting segments.
6974                  * SplitClosedFaces - splits closed faces in segments. The number of segments depends on the number of
6975                                       splitting points.
6976                      * SplitClosedFaces.NbSplitPoints - the number of splitting points.
6977                  * SplitContinuity - splits shapes to reduce continuities of curves and surfaces.
6978                      * SplitContinuity.Tolerance3d - 3D tolerance for correction of geometry.
6979                      * SplitContinuity.SurfaceContinuity - required continuity for surfaces.
6980                      * SplitContinuity.CurveContinuity - required continuity for curves.
6981                        This and the previous parameters can take the following values:
6982
6983                        Parametric Continuity:
6984                        C0 (Positional Continuity): curves are joined (the end positions of curves or surfaces are
6985                                                    coincidental. The curves or surfaces may still meet at an angle,
6986                                                    giving rise to a sharp corner or edge).
6987                        C1 (Tangential Continuity): first derivatives are equal (the end vectors of curves or surfaces
6988                                                    are parallel, ruling out sharp edges).
6989                        C2 (Curvature Continuity): first and second derivatives are equal (the end vectors of curves
6990                                                   or surfaces are of the same magnitude).
6991                        CN N-th derivatives are equal (both the direction and the magnitude of the Nth derivatives of
6992                           curves or surfaces (d/du C(u)) are the same at junction.
6993
6994                        Geometric Continuity:
6995                        G1: first derivatives are proportional at junction.
6996                            The curve tangents thus have the same direction, but not necessarily the same magnitude.
6997                            i.e., C1'(1) = (a,b,c) and C2'(0) = (k*a, k*b, k*c).
6998                        G2: first and second derivatives are proportional at junction. As the names imply,
6999                            geometric continuity requires the geometry to be continuous, while parametric continuity requires
7000                            that the underlying parameterization was continuous as well. Parametric continuity of order n implies
7001                            geometric continuity of order n, but not vice-versa.
7002                  * BsplineRestriction - converts curves and surfaces to Bsplines and processes them with the following parameters:
7003                      * BSplineRestriction.SurfaceMode - approximation of surfaces if restriction is necessary.
7004                      * BSplineRestriction.Curve3dMode - conversion of any 3D curve to BSpline and approximation.
7005                      * BSplineRestriction.Curve2dMode - conversion of any 2D curve to BSpline and approximation.
7006                      * BSplineRestriction.Tolerance3d - defines the possibility of surfaces and 3D curves approximation with
7007                                                         the specified parameters.
7008                      * BSplineRestriction.Tolerance2d - defines the possibility of surfaces and 2D curves approximation with
7009                                                         the specified parameters.
7010                      * BSplineRestriction.RequiredDegree - required degree of the resulting BSplines.
7011                      * BSplineRestriction.RequiredNbSegments - required maximum number of segments of resultant BSplines.
7012                      * BSplineRestriction.Continuity3d - continuity of the resulting surfaces and 3D curves.
7013                      * BSplineRestriction.Continuity2d - continuity of the resulting 2D curves.
7014                  * ToBezier - converts curves and surfaces of any type to Bezier curves and surfaces.
7015                      * ToBezier.SurfaceMode - if checked in, allows conversion of surfaces.
7016                      * ToBezier.Curve3dMode - if checked in, allows conversion of 3D curves.
7017                      * ToBezier.Curve2dMode - if checked in, allows conversion of 2D curves.
7018                      * ToBezier.MaxTolerance - defines tolerance for detection and correction of problems.
7019                  * SameParameter - fixes edges of 2D and 3D curves not having the same parameter.
7020                      * SameParameter.Tolerance3d - defines tolerance for fixing of edges.
7021
7022             Returns:
7023                 New GEOM.GEOM_Object, containing processed shape.
7024
7025             Note: For more information look through SALOME Geometry User's Guide->
7026                   -> Introduction to Geometry-> Repairing Operations-> Shape Processing
7027             """
7028             # Example: see GEOM_TestHealing.py
7029             theValues,Parameters = ParseList(theValues)
7030             anObj = self.HealOp.ProcessShape(theShape, theOperators, theParameters, theValues)
7031             # To avoid script failure in case of good argument shape
7032             if self.HealOp.GetErrorCode() == "ShHealOper_NotError_msg":
7033                 return theShape
7034             RaiseIfFailed("ProcessShape", self.HealOp)
7035             for string in (theOperators + theParameters):
7036                 Parameters = ":" + Parameters
7037                 pass
7038             anObj.SetParameters(Parameters)
7039             self._autoPublish(anObj, theName, "healed")
7040             return anObj
7041
7042         ## Remove faces from the given object (shape).
7043         #  @param theObject Shape to be processed.
7044         #  @param theFaces Indices of faces to be removed, if EMPTY then the method
7045         #                  removes ALL faces of the given object.
7046         #  @param theName Object name; when specified, this parameter is used
7047         #         for result publication in the study. Otherwise, if automatic
7048         #         publication is switched on, default value is used for result name.
7049         #
7050         #  @return New GEOM.GEOM_Object, containing processed shape.
7051         #
7052         #  @ref tui_suppress_faces "Example"
7053         @ManageTransactions("HealOp")
7054         def SuppressFaces(self, theObject, theFaces, theName=None):
7055             """
7056             Remove faces from the given object (shape).
7057
7058             Parameters:
7059                 theObject Shape to be processed.
7060                 theFaces Indices of faces to be removed, if EMPTY then the method
7061                          removes ALL faces of the given object.
7062                 theName Object name; when specified, this parameter is used
7063                         for result publication in the study. Otherwise, if automatic
7064                         publication is switched on, default value is used for result name.
7065
7066             Returns:
7067                 New GEOM.GEOM_Object, containing processed shape.
7068             """
7069             # Example: see GEOM_TestHealing.py
7070             anObj = self.HealOp.SuppressFaces(theObject, theFaces)
7071             RaiseIfFailed("SuppressFaces", self.HealOp)
7072             self._autoPublish(anObj, theName, "suppressFaces")
7073             return anObj
7074
7075         ## Sewing of faces into a single shell.
7076         #  @param ListShape Shapes to be processed.
7077         #  @param theTolerance Required tolerance value.
7078         #  @param AllowNonManifold Flag that allows non-manifold sewing.
7079         #  @param theName Object name; when specified, this parameter is used
7080         #         for result publication in the study. Otherwise, if automatic
7081         #         publication is switched on, default value is used for result name.
7082         #
7083         #  @return New GEOM.GEOM_Object, containing a result shell.
7084         #
7085         #  @ref tui_sewing "Example"
7086         def MakeSewing(self, ListShape, theTolerance, AllowNonManifold=False, theName=None):
7087             """
7088             Sewing of faces into a single shell.
7089
7090             Parameters:
7091                 ListShape Shapes to be processed.
7092                 theTolerance Required tolerance value.
7093                 AllowNonManifold Flag that allows non-manifold sewing.
7094                 theName Object name; when specified, this parameter is used
7095                         for result publication in the study. Otherwise, if automatic
7096                         publication is switched on, default value is used for result name.
7097
7098             Returns:
7099                 New GEOM.GEOM_Object, containing containing a result shell.
7100             """
7101             # Example: see GEOM_TestHealing.py
7102             # note: auto-publishing is done in self.Sew()
7103             anObj = self.Sew(ListShape, theTolerance, AllowNonManifold, theName)
7104             return anObj
7105
7106         ## Sewing of faces into a single shell.
7107         #  @param ListShape Shapes to be processed.
7108         #  @param theTolerance Required tolerance value.
7109         #  @param AllowNonManifold Flag that allows non-manifold sewing.
7110         #  @param theName Object name; when specified, this parameter is used
7111         #         for result publication in the study. Otherwise, if automatic
7112         #         publication is switched on, default value is used for result name.
7113         #
7114         #  @return New GEOM.GEOM_Object, containing a result shell.
7115         @ManageTransactions("HealOp")
7116         def Sew(self, ListShape, theTolerance, AllowNonManifold=False, theName=None):
7117             """
7118             Sewing of faces into a single shell.
7119
7120             Parameters:
7121                 ListShape Shapes to be processed.
7122                 theTolerance Required tolerance value.
7123                 AllowNonManifold Flag that allows non-manifold sewing.
7124                 theName Object name; when specified, this parameter is used
7125                         for result publication in the study. Otherwise, if automatic
7126                         publication is switched on, default value is used for result name.
7127
7128             Returns:
7129                 New GEOM.GEOM_Object, containing a result shell.
7130             """
7131             # Example: see MakeSewing() above
7132             theTolerance,Parameters = ParseParameters(theTolerance)
7133             if AllowNonManifold:
7134                 anObj = self.HealOp.SewAllowNonManifold( ToList( ListShape ), theTolerance)
7135             else:
7136                 anObj = self.HealOp.Sew( ToList( ListShape ), theTolerance)
7137             # To avoid script failure in case of good argument shape
7138             # (Fix of test cases geom/bugs11/L7,L8)
7139             if self.HealOp.GetErrorCode() == "ShHealOper_NotError_msg":
7140                 return anObj
7141             RaiseIfFailed("Sew", self.HealOp)
7142             anObj.SetParameters(Parameters)
7143             self._autoPublish(anObj, theName, "sewed")
7144             return anObj
7145
7146         ## Rebuild the topology of theSolids by removing
7147         #  the faces that are shared by several solids.
7148         #  @param theSolids A compound or a list of solids to be processed.
7149         #  @param theName Object name; when specified, this parameter is used
7150         #         for result publication in the study. Otherwise, if automatic
7151         #         publication is switched on, default value is used for result name.
7152         #
7153         #  @return New GEOM.GEOM_Object, containing processed shape.
7154         #
7155         #  @ref tui_remove_webs "Example"
7156         @ManageTransactions("HealOp")
7157         def RemoveInternalFaces (self, theSolids, theName=None):
7158             """
7159             Rebuild the topology of theSolids by removing
7160             the faces that are shared by several solids.
7161
7162             Parameters:
7163                 theSolids A compound or a list of solids to be processed.
7164                 theName Object name; when specified, this parameter is used
7165                         for result publication in the study. Otherwise, if automatic
7166                         publication is switched on, default value is used for result name.
7167
7168             Returns:
7169                 New GEOM.GEOM_Object, containing processed shape.
7170             """
7171             # Example: see GEOM_TestHealing.py
7172             anObj = self.HealOp.RemoveInternalFaces(ToList(theSolids))
7173             RaiseIfFailed("RemoveInternalFaces", self.HealOp)
7174             self._autoPublish(anObj, theName, "removeWebs")
7175             return anObj
7176
7177         ## Remove internal wires and edges from the given object (face).
7178         #  @param theObject Shape to be processed.
7179         #  @param theWires Indices of wires to be removed, if EMPTY then the method
7180         #                  removes ALL internal wires of the given object.
7181         #  @param theName Object name; when specified, this parameter is used
7182         #         for result publication in the study. Otherwise, if automatic
7183         #         publication is switched on, default value is used for result name.
7184         #
7185         #  @return New GEOM.GEOM_Object, containing processed shape.
7186         #
7187         #  @ref tui_suppress_internal_wires "Example"
7188         @ManageTransactions("HealOp")
7189         def SuppressInternalWires(self, theObject, theWires, theName=None):
7190             """
7191             Remove internal wires and edges from the given object (face).
7192
7193             Parameters:
7194                 theObject Shape to be processed.
7195                 theWires Indices of wires to be removed, if EMPTY then the method
7196                          removes ALL internal wires of the given object.
7197                 theName Object name; when specified, this parameter is used
7198                         for result publication in the study. Otherwise, if automatic
7199                         publication is switched on, default value is used for result name.
7200
7201             Returns:
7202                 New GEOM.GEOM_Object, containing processed shape.
7203             """
7204             # Example: see GEOM_TestHealing.py
7205             anObj = self.HealOp.RemoveIntWires(theObject, theWires)
7206             RaiseIfFailed("RemoveIntWires", self.HealOp)
7207             self._autoPublish(anObj, theName, "suppressWires")
7208             return anObj
7209
7210         ## Remove internal closed contours (holes) from the given object.
7211         #  @param theObject Shape to be processed.
7212         #  @param theWires Indices of wires to be removed, if EMPTY then the method
7213         #                  removes ALL internal holes of the given object
7214         #  @param theName Object name; when specified, this parameter is used
7215         #         for result publication in the study. Otherwise, if automatic
7216         #         publication is switched on, default value is used for result name.
7217         #
7218         #  @return New GEOM.GEOM_Object, containing processed shape.
7219         #
7220         #  @ref tui_suppress_holes "Example"
7221         @ManageTransactions("HealOp")
7222         def SuppressHoles(self, theObject, theWires, theName=None):
7223             """
7224             Remove internal closed contours (holes) from the given object.
7225
7226             Parameters:
7227                 theObject Shape to be processed.
7228                 theWires Indices of wires to be removed, if EMPTY then the method
7229                          removes ALL internal holes of the given object
7230                 theName Object name; when specified, this parameter is used
7231                         for result publication in the study. Otherwise, if automatic
7232                         publication is switched on, default value is used for result name.
7233
7234             Returns:
7235                 New GEOM.GEOM_Object, containing processed shape.
7236             """
7237             # Example: see GEOM_TestHealing.py
7238             anObj = self.HealOp.FillHoles(theObject, theWires)
7239             RaiseIfFailed("FillHoles", self.HealOp)
7240             self._autoPublish(anObj, theName, "suppressHoles")
7241             return anObj
7242
7243         ## Close an open wire.
7244         #  @param theObject Shape to be processed.
7245         #  @param theWires Indexes of edge(s) and wire(s) to be closed within <VAR>theObject</VAR>'s shape,
7246         #                  if [ ], then <VAR>theObject</VAR> itself is a wire.
7247         #  @param isCommonVertex If True  : closure by creation of a common vertex,
7248         #                        If False : closure by creation of an edge between ends.
7249         #  @param theName Object name; when specified, this parameter is used
7250         #         for result publication in the study. Otherwise, if automatic
7251         #         publication is switched on, default value is used for result name.
7252         #
7253         #  @return New GEOM.GEOM_Object, containing processed shape.
7254         #
7255         #  @ref tui_close_contour "Example"
7256         @ManageTransactions("HealOp")
7257         def CloseContour(self,theObject, theWires, isCommonVertex, theName=None):
7258             """
7259             Close an open wire.
7260
7261             Parameters:
7262                 theObject Shape to be processed.
7263                 theWires Indexes of edge(s) and wire(s) to be closed within theObject's shape,
7264                          if [ ], then theObject itself is a wire.
7265                 isCommonVertex If True  : closure by creation of a common vertex,
7266                                If False : closure by creation of an edge between ends.
7267                 theName Object name; when specified, this parameter is used
7268                         for result publication in the study. Otherwise, if automatic
7269                         publication is switched on, default value is used for result name.
7270
7271             Returns:
7272                 New GEOM.GEOM_Object, containing processed shape.
7273             """
7274             # Example: see GEOM_TestHealing.py
7275             anObj = self.HealOp.CloseContour(theObject, theWires, isCommonVertex)
7276             RaiseIfFailed("CloseContour", self.HealOp)
7277             self._autoPublish(anObj, theName, "closeContour")
7278             return anObj
7279
7280         ## Addition of a point to a given edge object.
7281         #  @param theObject Shape to be processed.
7282         #  @param theEdgeIndex Index of edge to be divided within theObject's shape,
7283         #                      if -1, then theObject itself is the edge.
7284         #  @param theValue Value of parameter on edge or length parameter,
7285         #                  depending on \a isByParameter.
7286         #  @param isByParameter If TRUE : \a theValue is treated as a curve parameter [0..1], \n
7287         #                       if FALSE : \a theValue is treated as a length parameter [0..1]
7288         #  @param theName Object name; when specified, this parameter is used
7289         #         for result publication in the study. Otherwise, if automatic
7290         #         publication is switched on, default value is used for result name.
7291         #
7292         #  @return New GEOM.GEOM_Object, containing processed shape.
7293         #
7294         #  @ref tui_add_point_on_edge "Example"
7295         @ManageTransactions("HealOp")
7296         def DivideEdge(self, theObject, theEdgeIndex, theValue, isByParameter, theName=None):
7297             """
7298             Addition of a point to a given edge object.
7299
7300             Parameters:
7301                 theObject Shape to be processed.
7302                 theEdgeIndex Index of edge to be divided within theObject's shape,
7303                              if -1, then theObject itself is the edge.
7304                 theValue Value of parameter on edge or length parameter,
7305                          depending on isByParameter.
7306                 isByParameter If TRUE :  theValue is treated as a curve parameter [0..1],
7307                               if FALSE : theValue is treated as a length parameter [0..1]
7308                 theName Object name; when specified, this parameter is used
7309                         for result publication in the study. Otherwise, if automatic
7310                         publication is switched on, default value is used for result name.
7311
7312             Returns:
7313                 New GEOM.GEOM_Object, containing processed shape.
7314             """
7315             # Example: see GEOM_TestHealing.py
7316             theEdgeIndex,theValue,isByParameter,Parameters = ParseParameters(theEdgeIndex,theValue,isByParameter)
7317             anObj = self.HealOp.DivideEdge(theObject, theEdgeIndex, theValue, isByParameter)
7318             RaiseIfFailed("DivideEdge", self.HealOp)
7319             anObj.SetParameters(Parameters)
7320             self._autoPublish(anObj, theName, "divideEdge")
7321             return anObj
7322
7323         ## Addition of points to a given edge of \a theObject by projecting
7324         #  other points to the given edge.
7325         #  @param theObject Shape to be processed.
7326         #  @param theEdgeIndex Index of edge to be divided within theObject's shape,
7327         #                      if -1, then theObject itself is the edge.
7328         #  @param thePoints List of points to project to theEdgeIndex-th edge.
7329         #  @param theName Object name; when specified, this parameter is used
7330         #         for result publication in the study. Otherwise, if automatic
7331         #         publication is switched on, default value is used for result name.
7332         #
7333         #  @return New GEOM.GEOM_Object, containing processed shape.
7334         #
7335         #  @ref tui_add_point_on_edge "Example"
7336         @ManageTransactions("HealOp")
7337         def DivideEdgeByPoint(self, theObject, theEdgeIndex, thePoints, theName=None):
7338             """
7339             Addition of points to a given edge of \a theObject by projecting
7340             other points to the given edge.
7341
7342             Parameters:
7343                 theObject Shape to be processed.
7344                 theEdgeIndex The edge or its index to be divided within theObject's shape,
7345                              if -1, then theObject itself is the edge.
7346                 thePoints List of points to project to theEdgeIndex-th edge.
7347                 theName Object name; when specified, this parameter is used
7348                         for result publication in the study. Otherwise, if automatic
7349                         publication is switched on, default value is used for result name.
7350
7351             Returns:
7352                 New GEOM.GEOM_Object, containing processed shape.
7353             """
7354             # Example: see GEOM_TestHealing.py
7355             if isinstance( theEdgeIndex, GEOM._objref_GEOM_Object ):
7356                 theEdgeIndex = self.GetSubShapeID( theObject, theEdgeIndex )
7357             anObj = self.HealOp.DivideEdgeByPoint(theObject, theEdgeIndex, ToList( thePoints ))
7358             RaiseIfFailed("DivideEdgeByPoint", self.HealOp)
7359             self._autoPublish(anObj, theName, "divideEdge")
7360             return anObj
7361
7362         ## Suppress the vertices in the wire in case if adjacent edges are C1 continuous.
7363         #  @param theWire Wire to minimize the number of C1 continuous edges in.
7364         #  @param theVertices A list of vertices to suppress. If the list
7365         #                     is empty, all vertices in a wire will be assumed.
7366         #  @param theName Object name; when specified, this parameter is used
7367         #         for result publication in the study. Otherwise, if automatic
7368         #         publication is switched on, default value is used for result name.
7369         #
7370         #  @return New GEOM.GEOM_Object with modified wire.
7371         #
7372         #  @ref tui_fuse_collinear_edges "Example"
7373         @ManageTransactions("HealOp")
7374         def FuseCollinearEdgesWithinWire(self, theWire, theVertices = [], theName=None):
7375             """
7376             Suppress the vertices in the wire in case if adjacent edges are C1 continuous.
7377
7378             Parameters:
7379                 theWire Wire to minimize the number of C1 continuous edges in.
7380                 theVertices A list of vertices to suppress. If the list
7381                             is empty, all vertices in a wire will be assumed.
7382                 theName Object name; when specified, this parameter is used
7383                         for result publication in the study. Otherwise, if automatic
7384                         publication is switched on, default value is used for result name.
7385
7386             Returns:
7387                 New GEOM.GEOM_Object with modified wire.
7388             """
7389             anObj = self.HealOp.FuseCollinearEdgesWithinWire(theWire, theVertices)
7390             RaiseIfFailed("FuseCollinearEdgesWithinWire", self.HealOp)
7391             self._autoPublish(anObj, theName, "fuseEdges")
7392             return anObj
7393
7394         ## Change orientation of the given object. Updates given shape.
7395         #  @param theObject Shape to be processed.
7396         #  @return Updated <var>theObject</var>
7397         #
7398         #  @ref swig_todo "Example"
7399         @ManageTransactions("HealOp")
7400         def ChangeOrientationShell(self,theObject):
7401             """
7402             Change orientation of the given object. Updates given shape.
7403
7404             Parameters:
7405                 theObject Shape to be processed.
7406
7407             Returns:
7408                 Updated theObject
7409             """
7410             theObject = self.HealOp.ChangeOrientation(theObject)
7411             RaiseIfFailed("ChangeOrientation", self.HealOp)
7412             pass
7413
7414         ## Change orientation of the given object.
7415         #  @param theObject Shape to be processed.
7416         #  @param theName Object name; when specified, this parameter is used
7417         #         for result publication in the study. Otherwise, if automatic
7418         #         publication is switched on, default value is used for result name.
7419         #
7420         #  @return New GEOM.GEOM_Object, containing processed shape.
7421         #
7422         #  @ref swig_todo "Example"
7423         @ManageTransactions("HealOp")
7424         def ChangeOrientationShellCopy(self, theObject, theName=None):
7425             """
7426             Change orientation of the given object.
7427
7428             Parameters:
7429                 theObject Shape to be processed.
7430                 theName Object name; when specified, this parameter is used
7431                         for result publication in the study. Otherwise, if automatic
7432                         publication is switched on, default value is used for result name.
7433
7434             Returns:
7435                 New GEOM.GEOM_Object, containing processed shape.
7436             """
7437             anObj = self.HealOp.ChangeOrientationCopy(theObject)
7438             RaiseIfFailed("ChangeOrientationCopy", self.HealOp)
7439             self._autoPublish(anObj, theName, "reversed")
7440             return anObj
7441
7442         ## Try to limit tolerance of the given object by value \a theTolerance.
7443         #  @param theObject Shape to be processed.
7444         #  @param theTolerance Required tolerance value.
7445         #  @param theName Object name; when specified, this parameter is used
7446         #         for result publication in the study. Otherwise, if automatic
7447         #         publication is switched on, default value is used for result name.
7448         #
7449         #  @return New GEOM.GEOM_Object, containing processed shape.
7450         #
7451         #  @ref tui_limit_tolerance "Example"
7452         @ManageTransactions("HealOp")
7453         def LimitTolerance(self, theObject, theTolerance = 1e-07, theName=None):
7454             """
7455             Try to limit tolerance of the given object by value theTolerance.
7456
7457             Parameters:
7458                 theObject Shape to be processed.
7459                 theTolerance Required tolerance value.
7460                 theName Object name; when specified, this parameter is used
7461                         for result publication in the study. Otherwise, if automatic
7462                         publication is switched on, default value is used for result name.
7463
7464             Returns:
7465                 New GEOM.GEOM_Object, containing processed shape.
7466             """
7467             anObj = self.HealOp.LimitTolerance(theObject, theTolerance)
7468             RaiseIfFailed("LimitTolerance", self.HealOp)
7469             self._autoPublish(anObj, theName, "limitTolerance")
7470             return anObj
7471
7472         ## Get a list of wires (wrapped in GEOM.GEOM_Object-s),
7473         #  that constitute a free boundary of the given shape.
7474         #  @param theObject Shape to get free boundary of.
7475         #  @param theName Object name; when specified, this parameter is used
7476         #         for result publication in the study. Otherwise, if automatic
7477         #         publication is switched on, default value is used for result name.
7478         #
7479         #  @return [\a status, \a theClosedWires, \a theOpenWires]
7480         #  \n \a status: FALSE, if an error(s) occurred during the method execution.
7481         #  \n \a theClosedWires: Closed wires on the free boundary of the given shape.
7482         #  \n \a theOpenWires: Open wires on the free boundary of the given shape.
7483         #
7484         #  @ref tui_free_boundaries_page "Example"
7485         @ManageTransactions("HealOp")
7486         def GetFreeBoundary(self, theObject, theName=None):
7487             """
7488             Get a list of wires (wrapped in GEOM.GEOM_Object-s),
7489             that constitute a free boundary of the given shape.
7490
7491             Parameters:
7492                 theObject Shape to get free boundary of.
7493                 theName Object name; when specified, this parameter is used
7494                         for result publication in the study. Otherwise, if automatic
7495                         publication is switched on, default value is used for result name.
7496
7497             Returns:
7498                 [status, theClosedWires, theOpenWires]
7499                  status: FALSE, if an error(s) occurred during the method execution.
7500                  theClosedWires: Closed wires on the free boundary of the given shape.
7501                  theOpenWires: Open wires on the free boundary of the given shape.
7502             """
7503             # Example: see GEOM_TestHealing.py
7504             anObj = self.HealOp.GetFreeBoundary( ToList( theObject ))
7505             RaiseIfFailed("GetFreeBoundary", self.HealOp)
7506             self._autoPublish(anObj[1], theName, "closedWire")
7507             self._autoPublish(anObj[2], theName, "openWire")
7508             return anObj
7509
7510         ## Replace coincident faces in \a theShapes by one face.
7511         #  @param theShapes Initial shapes, either a list or compound of shapes.
7512         #  @param theTolerance Maximum distance between faces, which can be considered as coincident.
7513         #  @param doKeepNonSolids If FALSE, only solids will present in the result,
7514         #                         otherwise all initial shapes.
7515         #  @param theName Object name; when specified, this parameter is used
7516         #         for result publication in the study. Otherwise, if automatic
7517         #         publication is switched on, default value is used for result name.
7518         #
7519         #  @return New GEOM.GEOM_Object, containing copies of theShapes without coincident faces.
7520         #
7521         #  @ref tui_glue_faces "Example"
7522         @ManageTransactions("ShapesOp")
7523         def MakeGlueFaces(self, theShapes, theTolerance, doKeepNonSolids=True, theName=None):
7524             """
7525             Replace coincident faces in theShapes by one face.
7526
7527             Parameters:
7528                 theShapes Initial shapes, either a list or compound of shapes.
7529                 theTolerance Maximum distance between faces, which can be considered as coincident.
7530                 doKeepNonSolids If FALSE, only solids will present in the result,
7531                                 otherwise all initial shapes.
7532                 theName Object name; when specified, this parameter is used
7533                         for result publication in the study. Otherwise, if automatic
7534                         publication is switched on, default value is used for result name.
7535
7536             Returns:
7537                 New GEOM.GEOM_Object, containing copies of theShapes without coincident faces.
7538             """
7539             # Example: see GEOM_Spanner.py
7540             theTolerance,Parameters = ParseParameters(theTolerance)
7541             anObj = self.ShapesOp.MakeGlueFaces(ToList(theShapes), theTolerance, doKeepNonSolids)
7542             if anObj is None:
7543                 raise RuntimeError("MakeGlueFaces : " + self.ShapesOp.GetErrorCode())
7544             anObj.SetParameters(Parameters)
7545             self._autoPublish(anObj, theName, "glueFaces")
7546             return anObj
7547
7548         ## Find coincident faces in \a theShapes for possible gluing.
7549         #  @param theShapes Initial shapes, either a list or compound of shapes.
7550         #  @param theTolerance Maximum distance between faces,
7551         #                      which can be considered as coincident.
7552         #  @param theName Object name; when specified, this parameter is used
7553         #         for result publication in the study. Otherwise, if automatic
7554         #         publication is switched on, default value is used for result name.
7555         #
7556         #  @return GEOM.ListOfGO
7557         #
7558         #  @ref tui_glue_faces "Example"
7559         @ManageTransactions("ShapesOp")
7560         def GetGlueFaces(self, theShapes, theTolerance, theName=None):
7561             """
7562             Find coincident faces in theShapes for possible gluing.
7563
7564             Parameters:
7565                 theShapes Initial shapes, either a list or compound of shapes.
7566                 theTolerance Maximum distance between faces,
7567                              which can be considered as coincident.
7568                 theName Object name; when specified, this parameter is used
7569                         for result publication in the study. Otherwise, if automatic
7570                         publication is switched on, default value is used for result name.
7571
7572             Returns:
7573                 GEOM.ListOfGO
7574             """
7575             anObj = self.ShapesOp.GetGlueFaces(ToList(theShapes), theTolerance)
7576             RaiseIfFailed("GetGlueFaces", self.ShapesOp)
7577             self._autoPublish(anObj, theName, "facesToGlue")
7578             return anObj
7579
7580         ## Replace coincident faces in \a theShapes by one face
7581         #  in compliance with given list of faces
7582         #  @param theShapes Initial shapes, either a list or compound of shapes.
7583         #  @param theTolerance Maximum distance between faces,
7584         #                      which can be considered as coincident.
7585         #  @param theFaces List of faces for gluing.
7586         #  @param doKeepNonSolids If FALSE, only solids will present in the result,
7587         #                         otherwise all initial shapes.
7588         #  @param doGlueAllEdges If TRUE, all coincident edges of <VAR>theShape</VAR>
7589         #                        will be glued, otherwise only the edges,
7590         #                        belonging to <VAR>theFaces</VAR>.
7591         #  @param theName Object name; when specified, this parameter is used
7592         #         for result publication in the study. Otherwise, if automatic
7593         #         publication is switched on, default value is used for result name.
7594         #
7595         #  @return New GEOM.GEOM_Object, containing copies of theShapes without coincident faces.
7596         #
7597         #  @ref tui_glue_faces "Example"
7598         @ManageTransactions("ShapesOp")
7599         def MakeGlueFacesByList(self, theShapes, theTolerance, theFaces,
7600                                 doKeepNonSolids=True, doGlueAllEdges=True, theName=None):
7601             """
7602             Replace coincident faces in theShapes by one face
7603             in compliance with given list of faces
7604
7605             Parameters:
7606                 theShapes theShapes Initial shapes, either a list or compound of shapes.
7607                 theTolerance Maximum distance between faces,
7608                              which can be considered as coincident.
7609                 theFaces List of faces for gluing.
7610                 doKeepNonSolids If FALSE, only solids will present in the result,
7611                                 otherwise all initial shapes.
7612                 doGlueAllEdges If TRUE, all coincident edges of theShape
7613                                will be glued, otherwise only the edges,
7614                                belonging to theFaces.
7615                 theName Object name; when specified, this parameter is used
7616                         for result publication in the study. Otherwise, if automatic
7617                         publication is switched on, default value is used for result name.
7618
7619             Returns:
7620                 New GEOM.GEOM_Object, containing copies of theShapes without coincident faces.
7621             """
7622             anObj = self.ShapesOp.MakeGlueFacesByList(ToList(theShapes), theTolerance, ToList(theFaces),
7623                                                       doKeepNonSolids, doGlueAllEdges)
7624             if anObj is None:
7625                 raise RuntimeError("MakeGlueFacesByList : " + self.ShapesOp.GetErrorCode())
7626             self._autoPublish(anObj, theName, "glueFaces")
7627             return anObj
7628
7629         ## Replace coincident edges in \a theShapes by one edge.
7630         #  @param theShapes Initial shapes, either a list or compound of shapes.
7631         #  @param theTolerance Maximum distance between edges, which can be considered as coincident.
7632         #  @param theName Object name; when specified, this parameter is used
7633         #         for result publication in the study. Otherwise, if automatic
7634         #         publication is switched on, default value is used for result name.
7635         #
7636         #  @return New GEOM.GEOM_Object, containing copies of theShapes without coincident edges.
7637         #
7638         #  @ref tui_glue_edges "Example"
7639         @ManageTransactions("ShapesOp")
7640         def MakeGlueEdges(self, theShapes, theTolerance, theName=None):
7641             """
7642             Replace coincident edges in theShapes by one edge.
7643
7644             Parameters:
7645                 theShapes Initial shapes, either a list or compound of shapes.
7646                 theTolerance Maximum distance between edges, which can be considered as coincident.
7647                 theName Object name; when specified, this parameter is used
7648                         for result publication in the study. Otherwise, if automatic
7649                         publication is switched on, default value is used for result name.
7650
7651             Returns:
7652                 New GEOM.GEOM_Object, containing copies of theShapes without coincident edges.
7653             """
7654             theTolerance,Parameters = ParseParameters(theTolerance)
7655             anObj = self.ShapesOp.MakeGlueEdges(ToList(theShapes), theTolerance)
7656             if anObj is None:
7657                 raise RuntimeError("MakeGlueEdges : " + self.ShapesOp.GetErrorCode())
7658             anObj.SetParameters(Parameters)
7659             self._autoPublish(anObj, theName, "glueEdges")
7660             return anObj
7661
7662         ## Find coincident edges in \a theShapes for possible gluing.
7663         #  @param theShapes Initial shapes, either a list or compound of shapes.
7664         #  @param theTolerance Maximum distance between edges,
7665         #                      which can be considered as coincident.
7666         #  @param theName Object name; when specified, this parameter is used
7667         #         for result publication in the study. Otherwise, if automatic
7668         #         publication is switched on, default value is used for result name.
7669         #
7670         #  @return GEOM.ListOfGO
7671         #
7672         #  @ref tui_glue_edges "Example"
7673         @ManageTransactions("ShapesOp")
7674         def GetGlueEdges(self, theShapes, theTolerance, theName=None):
7675             """
7676             Find coincident edges in theShapes for possible gluing.
7677
7678             Parameters:
7679                 theShapes Initial shapes, either a list or compound of shapes.
7680                 theTolerance Maximum distance between edges,
7681                              which can be considered as coincident.
7682                 theName Object name; when specified, this parameter is used
7683                         for result publication in the study. Otherwise, if automatic
7684                         publication is switched on, default value is used for result name.
7685
7686             Returns:
7687                 GEOM.ListOfGO
7688             """
7689             anObj = self.ShapesOp.GetGlueEdges(ToList(theShapes), theTolerance)
7690             RaiseIfFailed("GetGlueEdges", self.ShapesOp)
7691             self._autoPublish(anObj, theName, "edgesToGlue")
7692             return anObj
7693
7694         ## Replace coincident edges in theShapes by one edge
7695         #  in compliance with given list of edges.
7696         #  @param theShapes Initial shapes, either a list or compound of shapes.
7697         #  @param theTolerance Maximum distance between edges,
7698         #                      which can be considered as coincident.
7699         #  @param theEdges List of edges for gluing.
7700         #  @param theName Object name; when specified, this parameter is used
7701         #         for result publication in the study. Otherwise, if automatic
7702         #         publication is switched on, default value is used for result name.
7703         #
7704         #  @return New GEOM.GEOM_Object, containing copies of theShapes without coincident edges.
7705         #
7706         #  @ref tui_glue_edges "Example"
7707         @ManageTransactions("ShapesOp")
7708         def MakeGlueEdgesByList(self, theShapes, theTolerance, theEdges, theName=None):
7709             """
7710             Replace coincident edges in theShapes by one edge
7711             in compliance with given list of edges.
7712
7713             Parameters:
7714                 theShapes Initial shapes, either a list or compound of shapes.
7715                 theTolerance Maximum distance between edges,
7716                              which can be considered as coincident.
7717                 theEdges List of edges for gluing.
7718                 theName Object name; when specified, this parameter is used
7719                         for result publication in the study. Otherwise, if automatic
7720                         publication is switched on, default value is used for result name.
7721
7722             Returns:
7723                 New GEOM.GEOM_Object, containing copies of theShapes without coincident edges.
7724             """
7725             anObj = self.ShapesOp.MakeGlueEdgesByList(ToList(theShapes), theTolerance, theEdges)
7726             if anObj is None:
7727                 raise RuntimeError("MakeGlueEdgesByList : " + self.ShapesOp.GetErrorCode())
7728             self._autoPublish(anObj, theName, "glueEdges")
7729             return anObj
7730
7731         # end of l3_healing
7732         ## @}
7733
7734         ## @addtogroup l3_boolean Boolean Operations
7735         ## @{
7736
7737         # -----------------------------------------------------------------------------
7738         # Boolean (Common, Cut, Fuse, Section)
7739         # -----------------------------------------------------------------------------
7740
7741         ## Perform one of boolean operations on two given shapes.
7742         #  @param theShape1 First argument for boolean operation.
7743         #  @param theShape2 Second argument for boolean operation.
7744         #  @param theOperation Indicates the operation to be done:\n
7745         #                      1 - Common, 2 - Cut, 3 - Fuse, 4 - Section.
7746         #  @param checkSelfInte The flag that tells if the arguments should
7747         #         be checked for self-intersection prior to the operation.
7748         #  @param theName Object name; when specified, this parameter is used
7749         #         for result publication in the study. Otherwise, if automatic
7750         #         publication is switched on, default value is used for result name.
7751         #
7752         #  @note This algorithm doesn't find all types of self-intersections.
7753         #        It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7754         #        vertex/face and edge/face intersections. Face/face
7755         #        intersections detection is switched off as it is a
7756         #        time-consuming operation that gives an impact on performance.
7757         #        To find all self-intersections please use
7758         #        CheckSelfIntersections() method.
7759         #
7760         #  @return New GEOM.GEOM_Object, containing the result shape.
7761         #
7762         #  @ref tui_fuse "Example"
7763         @ManageTransactions("BoolOp")
7764         def MakeBoolean(self, theShape1, theShape2, theOperation, checkSelfInte=False, theName=None):
7765             """
7766             Perform one of boolean operations on two given shapes.
7767
7768             Parameters:
7769                 theShape1 First argument for boolean operation.
7770                 theShape2 Second argument for boolean operation.
7771                 theOperation Indicates the operation to be done:
7772                              1 - Common, 2 - Cut, 3 - Fuse, 4 - Section.
7773                 checkSelfInte The flag that tells if the arguments should
7774                               be checked for self-intersection prior to
7775                               the operation.
7776                 theName Object name; when specified, this parameter is used
7777                         for result publication in the study. Otherwise, if automatic
7778                         publication is switched on, default value is used for result name.
7779
7780             Note:
7781                     This algorithm doesn't find all types of self-intersections.
7782                     It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7783                     vertex/face and edge/face intersections. Face/face
7784                     intersections detection is switched off as it is a
7785                     time-consuming operation that gives an impact on performance.
7786                     To find all self-intersections please use
7787                     CheckSelfIntersections() method.
7788
7789             Returns:
7790                 New GEOM.GEOM_Object, containing the result shape.
7791             """
7792             # Example: see GEOM_TestAll.py
7793             anObj = self.BoolOp.MakeBoolean(theShape1, theShape2, theOperation, checkSelfInte)
7794             RaiseIfFailed("MakeBoolean", self.BoolOp)
7795             def_names = { 1: "common", 2: "cut", 3: "fuse", 4: "section" }
7796             self._autoPublish(anObj, theName, def_names[theOperation])
7797             return anObj
7798
7799         ## Perform Common boolean operation on two given shapes.
7800         #  @param theShape1 First argument for boolean operation.
7801         #  @param theShape2 Second argument for boolean operation.
7802         #  @param checkSelfInte The flag that tells if the arguments should
7803         #         be checked for self-intersection prior to the operation.
7804         #  @param theName Object name; when specified, this parameter is used
7805         #         for result publication in the study. Otherwise, if automatic
7806         #         publication is switched on, default value is used for result name.
7807         #
7808         #  @note This algorithm doesn't find all types of self-intersections.
7809         #        It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7810         #        vertex/face and edge/face intersections. Face/face
7811         #        intersections detection is switched off as it is a
7812         #        time-consuming operation that gives an impact on performance.
7813         #        To find all self-intersections please use
7814         #        CheckSelfIntersections() method.
7815         #
7816         #  @return New GEOM.GEOM_Object, containing the result shape.
7817         #
7818         #  @ref tui_common "Example 1"
7819         #  \n @ref swig_MakeCommon "Example 2"
7820         def MakeCommon(self, theShape1, theShape2, checkSelfInte=False, theName=None):
7821             """
7822             Perform Common boolean operation on two given shapes.
7823
7824             Parameters:
7825                 theShape1 First argument for boolean operation.
7826                 theShape2 Second argument for boolean operation.
7827                 checkSelfInte The flag that tells if the arguments should
7828                               be checked for self-intersection prior to
7829                               the operation.
7830                 theName Object name; when specified, this parameter is used
7831                         for result publication in the study. Otherwise, if automatic
7832                         publication is switched on, default value is used for result name.
7833
7834             Note:
7835                     This algorithm doesn't find all types of self-intersections.
7836                     It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7837                     vertex/face and edge/face intersections. Face/face
7838                     intersections detection is switched off as it is a
7839                     time-consuming operation that gives an impact on performance.
7840                     To find all self-intersections please use
7841                     CheckSelfIntersections() method.
7842
7843             Returns:
7844                 New GEOM.GEOM_Object, containing the result shape.
7845             """
7846             # Example: see GEOM_TestOthers.py
7847             # note: auto-publishing is done in self.MakeBoolean()
7848             return self.MakeBoolean(theShape1, theShape2, 1, checkSelfInte, theName)
7849
7850         ## Perform Cut boolean operation on two given shapes.
7851         #  @param theShape1 First argument for boolean operation.
7852         #  @param theShape2 Second argument for boolean operation.
7853         #  @param checkSelfInte The flag that tells if the arguments should
7854         #         be checked for self-intersection prior to the operation.
7855         #  @param theName Object name; when specified, this parameter is used
7856         #         for result publication in the study. Otherwise, if automatic
7857         #         publication is switched on, default value is used for result name.
7858         #
7859         #  @note This algorithm doesn't find all types of self-intersections.
7860         #        It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7861         #        vertex/face and edge/face intersections. Face/face
7862         #        intersections detection is switched off as it is a
7863         #        time-consuming operation that gives an impact on performance.
7864         #        To find all self-intersections please use
7865         #        CheckSelfIntersections() method.
7866         #
7867         #  @return New GEOM.GEOM_Object, containing the result shape.
7868         #
7869         #  @ref tui_cut "Example 1"
7870         #  \n @ref swig_MakeCommon "Example 2"
7871         def MakeCut(self, theShape1, theShape2, checkSelfInte=False, theName=None):
7872             """
7873             Perform Cut boolean operation on two given shapes.
7874
7875             Parameters:
7876                 theShape1 First argument for boolean operation.
7877                 theShape2 Second argument for boolean operation.
7878                 checkSelfInte The flag that tells if the arguments should
7879                               be checked for self-intersection prior to
7880                               the operation.
7881                 theName Object name; when specified, this parameter is used
7882                         for result publication in the study. Otherwise, if automatic
7883                         publication is switched on, default value is used for result name.
7884
7885             Note:
7886                     This algorithm doesn't find all types of self-intersections.
7887                     It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7888                     vertex/face and edge/face intersections. Face/face
7889                     intersections detection is switched off as it is a
7890                     time-consuming operation that gives an impact on performance.
7891                     To find all self-intersections please use
7892                     CheckSelfIntersections() method.
7893
7894             Returns:
7895                 New GEOM.GEOM_Object, containing the result shape.
7896
7897             """
7898             # Example: see GEOM_TestOthers.py
7899             # note: auto-publishing is done in self.MakeBoolean()
7900             return self.MakeBoolean(theShape1, theShape2, 2, checkSelfInte, theName)
7901
7902         ## Perform Fuse boolean operation on two given shapes.
7903         #  @param theShape1 First argument for boolean operation.
7904         #  @param theShape2 Second argument for boolean operation.
7905         #  @param checkSelfInte The flag that tells if the arguments should
7906         #         be checked for self-intersection prior to the operation.
7907         #  @param rmExtraEdges The flag that tells if Remove Extra Edges
7908         #         operation should be performed during the operation.
7909         #  @param theName Object name; when specified, this parameter is used
7910         #         for result publication in the study. Otherwise, if automatic
7911         #         publication is switched on, default value is used for result name.
7912         #
7913         #  @note This algorithm doesn't find all types of self-intersections.
7914         #        It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7915         #        vertex/face and edge/face intersections. Face/face
7916         #        intersections detection is switched off as it is a
7917         #        time-consuming operation that gives an impact on performance.
7918         #        To find all self-intersections please use
7919         #        CheckSelfIntersections() method.
7920         #
7921         #  @return New GEOM.GEOM_Object, containing the result shape.
7922         #
7923         #  @ref tui_fuse "Example 1"
7924         #  \n @ref swig_MakeCommon "Example 2"
7925         @ManageTransactions("BoolOp")
7926         def MakeFuse(self, theShape1, theShape2, checkSelfInte=False,
7927                      rmExtraEdges=False, theName=None):
7928             """
7929             Perform Fuse boolean operation on two given shapes.
7930
7931             Parameters:
7932                 theShape1 First argument for boolean operation.
7933                 theShape2 Second argument for boolean operation.
7934                 checkSelfInte The flag that tells if the arguments should
7935                               be checked for self-intersection prior to
7936                               the operation.
7937                 rmExtraEdges The flag that tells if Remove Extra Edges
7938                              operation should be performed during the operation.
7939                 theName Object name; when specified, this parameter is used
7940                         for result publication in the study. Otherwise, if automatic
7941                         publication is switched on, default value is used for result name.
7942
7943             Note:
7944                     This algorithm doesn't find all types of self-intersections.
7945                     It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7946                     vertex/face and edge/face intersections. Face/face
7947                     intersections detection is switched off as it is a
7948                     time-consuming operation that gives an impact on performance.
7949                     To find all self-intersections please use
7950                     CheckSelfIntersections() method.
7951
7952             Returns:
7953                 New GEOM.GEOM_Object, containing the result shape.
7954
7955             """
7956             # Example: see GEOM_TestOthers.py
7957             anObj = self.BoolOp.MakeFuse(theShape1, theShape2,
7958                                          checkSelfInte, rmExtraEdges)
7959             RaiseIfFailed("MakeFuse", self.BoolOp)
7960             self._autoPublish(anObj, theName, "fuse")
7961             return anObj
7962
7963         ## Perform Section boolean operation on two given shapes.
7964         #  @param theShape1 First argument for boolean operation.
7965         #  @param theShape2 Second argument for boolean operation.
7966         #  @param checkSelfInte The flag that tells if the arguments should
7967         #         be checked for self-intersection prior to the operation.
7968         #         If a self-intersection detected the operation fails.
7969         #  @param theName Object name; when specified, this parameter is used
7970         #         for result publication in the study. Otherwise, if automatic
7971         #         publication is switched on, default value is used for result name.
7972         #  @return New GEOM.GEOM_Object, containing the result shape.
7973         #
7974         #  @ref tui_section "Example 1"
7975         #  \n @ref swig_MakeCommon "Example 2"
7976         def MakeSection(self, theShape1, theShape2, checkSelfInte=False, theName=None):
7977             """
7978             Perform Section boolean operation on two given shapes.
7979
7980             Parameters:
7981                 theShape1 First argument for boolean operation.
7982                 theShape2 Second argument for boolean operation.
7983                 checkSelfInte The flag that tells if the arguments should
7984                               be checked for self-intersection prior to the operation.
7985                               If a self-intersection detected the operation fails.
7986                 theName Object name; when specified, this parameter is used
7987                         for result publication in the study. Otherwise, if automatic
7988                         publication is switched on, default value is used for result name.
7989             Returns:
7990                 New GEOM.GEOM_Object, containing the result shape.
7991
7992             """
7993             # Example: see GEOM_TestOthers.py
7994             # note: auto-publishing is done in self.MakeBoolean()
7995             return self.MakeBoolean(theShape1, theShape2, 4, checkSelfInte, theName)
7996
7997         ## Perform Fuse boolean operation on the list of shapes.
7998         #  @param theShapesList Shapes to be fused.
7999         #  @param checkSelfInte The flag that tells if the arguments should
8000         #         be checked for self-intersection prior to the operation.
8001         #  @param rmExtraEdges The flag that tells if Remove Extra Edges
8002         #         operation should be performed during the operation.
8003         #  @param theName Object name; when specified, this parameter is used
8004         #         for result publication in the study. Otherwise, if automatic
8005         #         publication is switched on, default value is used for result name.
8006         #
8007         #  @note This algorithm doesn't find all types of self-intersections.
8008         #        It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
8009         #        vertex/face and edge/face intersections. Face/face
8010         #        intersections detection is switched off as it is a
8011         #        time-consuming operation that gives an impact on performance.
8012         #        To find all self-intersections please use
8013         #        CheckSelfIntersections() method.
8014         #
8015         #  @return New GEOM.GEOM_Object, containing the result shape.
8016         #
8017         #  @ref tui_fuse "Example 1"
8018         #  \n @ref swig_MakeCommon "Example 2"
8019         @ManageTransactions("BoolOp")
8020         def MakeFuseList(self, theShapesList, checkSelfInte=False,
8021                          rmExtraEdges=False, theName=None):
8022             """
8023             Perform Fuse boolean operation on the list of shapes.
8024
8025             Parameters:
8026                 theShapesList Shapes to be fused.
8027                 checkSelfInte The flag that tells if the arguments should
8028                               be checked for self-intersection prior to
8029                               the operation.
8030                 rmExtraEdges The flag that tells if Remove Extra Edges
8031                              operation should be performed during the operation.
8032                 theName Object name; when specified, this parameter is used
8033                         for result publication in the study. Otherwise, if automatic
8034                         publication is switched on, default value is used for result name.
8035
8036             Note:
8037                     This algorithm doesn't find all types of self-intersections.
8038                     It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
8039                     vertex/face and edge/face intersections. Face/face
8040                     intersections detection is switched off as it is a
8041                     time-consuming operation that gives an impact on performance.
8042                     To find all self-intersections please use
8043                     CheckSelfIntersections() method.
8044
8045             Returns:
8046                 New GEOM.GEOM_Object, containing the result shape.
8047
8048             """
8049             # Example: see GEOM_TestOthers.py
8050             anObj = self.BoolOp.MakeFuseList(theShapesList, checkSelfInte,
8051                                              rmExtraEdges)
8052             RaiseIfFailed("MakeFuseList", self.BoolOp)
8053             self._autoPublish(anObj, theName, "fuse")
8054             return anObj
8055
8056         ## Perform Common boolean operation on the list of shapes.
8057         #  @param theShapesList Shapes for Common operation.
8058         #  @param checkSelfInte The flag that tells if the arguments should
8059         #         be checked for self-intersection prior to the operation.
8060         #  @param theName Object name; when specified, this parameter is used
8061         #         for result publication in the study. Otherwise, if automatic
8062         #         publication is switched on, default value is used for result name.
8063         #
8064         #  @note This algorithm doesn't find all types of self-intersections.
8065         #        It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
8066         #        vertex/face and edge/face intersections. Face/face
8067         #        intersections detection is switched off as it is a
8068         #        time-consuming operation that gives an impact on performance.
8069         #        To find all self-intersections please use
8070         #        CheckSelfIntersections() method.
8071         #
8072         #  @return New GEOM.GEOM_Object, containing the result shape.
8073         #
8074         #  @ref tui_common "Example 1"
8075         #  \n @ref swig_MakeCommon "Example 2"
8076         @ManageTransactions("BoolOp")
8077         def MakeCommonList(self, theShapesList, checkSelfInte=False, theName=None):
8078             """
8079             Perform Common boolean operation on the list of shapes.
8080
8081             Parameters:
8082                 theShapesList Shapes for Common operation.
8083                 checkSelfInte The flag that tells if the arguments should
8084                               be checked for self-intersection prior to
8085                               the operation.
8086                 theName Object name; when specified, this parameter is used
8087                         for result publication in the study. Otherwise, if automatic
8088                         publication is switched on, default value is used for result name.
8089
8090             Note:
8091                     This algorithm doesn't find all types of self-intersections.
8092                     It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
8093                     vertex/face and edge/face intersections. Face/face
8094                     intersections detection is switched off as it is a
8095                     time-consuming operation that gives an impact on performance.
8096                     To find all self-intersections please use
8097                     CheckSelfIntersections() method.
8098
8099             Returns:
8100                 New GEOM.GEOM_Object, containing the result shape.
8101
8102             """
8103             # Example: see GEOM_TestOthers.py
8104             anObj = self.BoolOp.MakeCommonList(theShapesList, checkSelfInte)
8105             RaiseIfFailed("MakeCommonList", self.BoolOp)
8106             self._autoPublish(anObj, theName, "common")
8107             return anObj
8108
8109         ## Perform Cut boolean operation on one object and the list of tools.
8110         #  @param theMainShape The object of the operation.
8111         #  @param theShapesList The list of tools of the operation.
8112         #  @param checkSelfInte The flag that tells if the arguments should
8113         #         be checked for self-intersection prior to the operation.
8114         #  @param theName Object name; when specified, this parameter is used
8115         #         for result publication in the study. Otherwise, if automatic
8116         #         publication is switched on, default value is used for result name.
8117         #
8118         #  @note This algorithm doesn't find all types of self-intersections.
8119         #        It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
8120         #        vertex/face and edge/face intersections. Face/face
8121         #        intersections detection is switched off as it is a
8122         #        time-consuming operation that gives an impact on performance.
8123         #        To find all self-intersections please use
8124         #        CheckSelfIntersections() method.
8125         #
8126         #  @return New GEOM.GEOM_Object, containing the result shape.
8127         #
8128         #  @ref tui_cut "Example 1"
8129         #  \n @ref swig_MakeCommon "Example 2"
8130         @ManageTransactions("BoolOp")
8131         def MakeCutList(self, theMainShape, theShapesList, checkSelfInte=False, theName=None):
8132             """
8133             Perform Cut boolean operation on one object and the list of tools.
8134
8135             Parameters:
8136                 theMainShape The object of the operation.
8137                 theShapesList The list of tools of the operation.
8138                 checkSelfInte The flag that tells if the arguments should
8139                               be checked for self-intersection prior to
8140                               the operation.
8141                 theName Object name; when specified, this parameter is used
8142                         for result publication in the study. Otherwise, if automatic
8143                         publication is switched on, default value is used for result name.
8144
8145             Note:
8146                     This algorithm doesn't find all types of self-intersections.
8147                     It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
8148                     vertex/face and edge/face intersections. Face/face
8149                     intersections detection is switched off as it is a
8150                     time-consuming operation that gives an impact on performance.
8151                     To find all self-intersections please use
8152                     CheckSelfIntersections() method.
8153
8154             Returns:
8155                 New GEOM.GEOM_Object, containing the result shape.
8156
8157             """
8158             # Example: see GEOM_TestOthers.py
8159             anObj = self.BoolOp.MakeCutList(theMainShape, theShapesList, checkSelfInte)
8160             RaiseIfFailed("MakeCutList", self.BoolOp)
8161             self._autoPublish(anObj, theName, "cut")
8162             return anObj
8163
8164         # end of l3_boolean
8165         ## @}
8166
8167         ## @addtogroup l3_basic_op
8168         ## @{
8169
8170         ## Perform partition operation.
8171         #  @param ListShapes Shapes to be intersected.
8172         #  @param ListTools Shapes to intersect theShapes.
8173         #  @param Limit Type of resulting shapes (see ShapeType()).\n
8174         #         If this parameter is set to -1 ("Auto"), most appropriate shape limit
8175         #         type will be detected automatically.
8176         #  @param KeepNonlimitShapes if this parameter == 0, then only shapes of
8177         #                             target type (equal to Limit) are kept in the result,
8178         #                             else standalone shapes of lower dimension
8179         #                             are kept also (if they exist).
8180         #
8181         #  @param theName Object name; when specified, this parameter is used
8182         #         for result publication in the study. Otherwise, if automatic
8183         #         publication is switched on, default value is used for result name.
8184         #
8185         #  @note Each compound from ListShapes and ListTools will be exploded
8186         #        in order to avoid possible intersection between shapes from this compound.
8187         #
8188         #  After implementation new version of PartitionAlgo (October 2006)
8189         #  other parameters are ignored by current functionality. They are kept
8190         #  in this function only for support old versions.
8191         #      @param ListKeepInside Shapes, outside which the results will be deleted.
8192         #         Each shape from theKeepInside must belong to theShapes also.
8193         #      @param ListRemoveInside Shapes, inside which the results will be deleted.
8194         #         Each shape from theRemoveInside must belong to theShapes also.
8195         #      @param RemoveWebs If TRUE, perform Glue 3D algorithm.
8196         #      @param ListMaterials Material indices for each shape. Make sense,
8197         #         only if theRemoveWebs is TRUE.
8198         #
8199         #  @return New GEOM.GEOM_Object, containing the result shapes.
8200         #
8201         #  @ref tui_partition "Example"
8202         @ManageTransactions("BoolOp")
8203         def MakePartition(self, ListShapes, ListTools=[], ListKeepInside=[], ListRemoveInside=[],
8204                           Limit=ShapeType["AUTO"], RemoveWebs=0, ListMaterials=[],
8205                           KeepNonlimitShapes=0, theName=None):
8206             """
8207             Perform partition operation.
8208
8209             Parameters:
8210                 ListShapes Shapes to be intersected.
8211                 ListTools Shapes to intersect theShapes.
8212                 Limit Type of resulting shapes (see geompy.ShapeType)
8213                       If this parameter is set to -1 ("Auto"), most appropriate shape limit
8214                       type will be detected automatically.
8215                 KeepNonlimitShapes if this parameter == 0, then only shapes of
8216                                     target type (equal to Limit) are kept in the result,
8217                                     else standalone shapes of lower dimension
8218                                     are kept also (if they exist).
8219
8220                 theName Object name; when specified, this parameter is used
8221                         for result publication in the study. Otherwise, if automatic
8222                         publication is switched on, default value is used for result name.
8223             Note:
8224                     Each compound from ListShapes and ListTools will be exploded
8225                     in order to avoid possible intersection between shapes from
8226                     this compound.
8227
8228             After implementation new version of PartitionAlgo (October 2006) other
8229             parameters are ignored by current functionality. They are kept in this
8230             function only for support old versions.
8231
8232             Ignored parameters:
8233                 ListKeepInside Shapes, outside which the results will be deleted.
8234                                Each shape from theKeepInside must belong to theShapes also.
8235                 ListRemoveInside Shapes, inside which the results will be deleted.
8236                                  Each shape from theRemoveInside must belong to theShapes also.
8237                 RemoveWebs If TRUE, perform Glue 3D algorithm.
8238                 ListMaterials Material indices for each shape. Make sense, only if theRemoveWebs is TRUE.
8239
8240             Returns:
8241                 New GEOM.GEOM_Object, containing the result shapes.
8242             """
8243             # Example: see GEOM_TestAll.py
8244             if Limit == self.ShapeType["AUTO"]:
8245                 # automatic detection of the most appropriate shape limit type
8246                 lim = GEOM.SHAPE
8247                 for s in ListShapes: lim = min(lim, s.GetMaxShapeType())
8248                 Limit = EnumToLong(lim)
8249                 pass
8250             anObj = self.BoolOp.MakePartition(ListShapes, ListTools,
8251                                               ListKeepInside, ListRemoveInside,
8252                                               Limit, RemoveWebs, ListMaterials,
8253                                               KeepNonlimitShapes);
8254             RaiseIfFailed("MakePartition", self.BoolOp)
8255             self._autoPublish(anObj, theName, "partition")
8256             return anObj
8257
8258         ## Perform partition operation.
8259         #  This method may be useful if it is needed to make a partition for
8260         #  compound contains nonintersected shapes. Performance will be better
8261         #  since intersection between shapes from compound is not performed.
8262         #
8263         #  Description of all parameters as in previous method MakePartition().
8264         #  One additional parameter is provided:
8265         #  @param checkSelfInte The flag that tells if the arguments should
8266         #         be checked for self-intersection prior to the operation.
8267         #
8268         #  @note This algorithm doesn't find all types of self-intersections.
8269         #        It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
8270         #        vertex/face and edge/face intersections. Face/face
8271         #        intersections detection is switched off as it is a
8272         #        time-consuming operation that gives an impact on performance.
8273         #        To find all self-intersections please use
8274         #        CheckSelfIntersections() method.
8275         #
8276         #  @note Passed compounds (via ListShapes or via ListTools)
8277         #           have to consist of nonintersecting shapes.
8278         #
8279         #  @return New GEOM.GEOM_Object, containing the result shapes.
8280         #
8281         #  @ref swig_todo "Example"
8282         @ManageTransactions("BoolOp")
8283         def MakePartitionNonSelfIntersectedShape(self, ListShapes, ListTools=[],
8284                                                  ListKeepInside=[], ListRemoveInside=[],
8285                                                  Limit=ShapeType["AUTO"], RemoveWebs=0,
8286                                                  ListMaterials=[], KeepNonlimitShapes=0,
8287                                                  checkSelfInte=False, theName=None):
8288             """
8289             Perform partition operation.
8290             This method may be useful if it is needed to make a partition for
8291             compound contains nonintersected shapes. Performance will be better
8292             since intersection between shapes from compound is not performed.
8293
8294             Parameters:
8295                 Description of all parameters as in method geompy.MakePartition.
8296                 One additional parameter is provided:
8297                 checkSelfInte The flag that tells if the arguments should
8298                               be checked for self-intersection prior to
8299                               the operation.
8300
8301             Note:
8302                     This algorithm doesn't find all types of self-intersections.
8303                     It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
8304                     vertex/face and edge/face intersections. Face/face
8305                     intersections detection is switched off as it is a
8306                     time-consuming operation that gives an impact on performance.
8307                     To find all self-intersections please use
8308                     CheckSelfIntersections() method.
8309
8310             NOTE:
8311                 Passed compounds (via ListShapes or via ListTools)
8312                 have to consist of nonintersecting shapes.
8313
8314             Returns:
8315                 New GEOM.GEOM_Object, containing the result shapes.
8316             """
8317             if Limit == self.ShapeType["AUTO"]:
8318                 # automatic detection of the most appropriate shape limit type
8319                 lim = GEOM.SHAPE
8320                 for s in ListShapes: lim = min(lim, s.GetMaxShapeType())
8321                 Limit = EnumToLong(lim)
8322                 pass
8323             anObj = self.BoolOp.MakePartitionNonSelfIntersectedShape(ListShapes, ListTools,
8324                                                                      ListKeepInside, ListRemoveInside,
8325                                                                      Limit, RemoveWebs, ListMaterials,
8326                                                                      KeepNonlimitShapes, checkSelfInte);
8327             RaiseIfFailed("MakePartitionNonSelfIntersectedShape", self.BoolOp)
8328             self._autoPublish(anObj, theName, "partition")
8329             return anObj
8330
8331         ## See method MakePartition() for more information.
8332         #
8333         #  @ref tui_partition "Example 1"
8334         #  \n @ref swig_Partition "Example 2"
8335         def Partition(self, ListShapes, ListTools=[], ListKeepInside=[], ListRemoveInside=[],
8336                       Limit=ShapeType["AUTO"], RemoveWebs=0, ListMaterials=[],
8337                       KeepNonlimitShapes=0, theName=None):
8338             """
8339             See method geompy.MakePartition for more information.
8340             """
8341             # Example: see GEOM_TestOthers.py
8342             # note: auto-publishing is done in self.MakePartition()
8343             anObj = self.MakePartition(ListShapes, ListTools,
8344                                        ListKeepInside, ListRemoveInside,
8345                                        Limit, RemoveWebs, ListMaterials,
8346                                        KeepNonlimitShapes, theName);
8347             return anObj
8348
8349         ## Perform partition of the Shape with the Plane
8350         #  @param theShape Shape to be intersected.
8351         #  @param thePlane Tool shape, to intersect theShape.
8352         #  @param theName Object name; when specified, this parameter is used
8353         #         for result publication in the study. Otherwise, if automatic
8354         #         publication is switched on, default value is used for result name.
8355         #
8356         #  @return New GEOM.GEOM_Object, containing the result shape.
8357         #
8358         #  @note This operation is a shortcut to the more general @ref MakePartition
8359         #  operation, where @a theShape specifies single "object" (shape being partitioned)
8360         #  and @a thePlane specifies single "tool" (intersector shape). Other parameters of
8361         #  @ref MakePartition operation have default values:
8362         #  - @a Limit: GEOM::SHAPE (shape limit corresponds to the type of @a theShape)
8363         #  - @a KeepNonlimitShapes: 0
8364         #  - @a KeepInside, @a RemoveInside, @a RemoveWebs,
8365         #    @a Materials (obsolete parameters): empty
8366         #
8367         #  @note I.e. the following two operations are equivalent:
8368         #  @code
8369         #  Result = geompy.MakeHalfPartition(Object, Plane)
8370         #  Result = geompy.MakePartition([Object], [Plane])
8371         #  @endcode
8372         #
8373         #  @sa MakePartition, MakePartitionNonSelfIntersectedShape
8374         #
8375         #  @ref tui_partition "Example"
8376         @ManageTransactions("BoolOp")
8377         def MakeHalfPartition(self, theShape, thePlane, theName=None):
8378             """
8379             Perform partition of the Shape with the Plane
8380
8381             Parameters:
8382                 theShape Shape to be intersected.
8383                 thePlane Tool shape, to intersect theShape.
8384                 theName Object name; when specified, this parameter is used
8385                         for result publication in the study. Otherwise, if automatic
8386                         publication is switched on, default value is used for result name.
8387
8388             Returns:
8389                 New GEOM.GEOM_Object, containing the result shape.
8390          
8391             Note: This operation is a shortcut to the more general MakePartition
8392             operation, where theShape specifies single "object" (shape being partitioned)
8393             and thePlane specifies single "tool" (intersector shape). Other parameters of
8394             MakePartition operation have default values:
8395             - Limit: GEOM::SHAPE (shape limit corresponds to the type of theShape)
8396             - KeepNonlimitShapes: 0
8397             - KeepInside, RemoveInside, RemoveWebs, Materials (obsolete parameters): empty
8398          
8399             I.e. the following two operations are equivalent:
8400               Result = geompy.MakeHalfPartition(Object, Plane)
8401               Result = geompy.MakePartition([Object], [Plane])
8402             """
8403             # Example: see GEOM_TestAll.py
8404             anObj = self.BoolOp.MakeHalfPartition(theShape, thePlane)
8405             RaiseIfFailed("MakeHalfPartition", self.BoolOp)
8406             self._autoPublish(anObj, theName, "partition")
8407             return anObj
8408
8409         # end of l3_basic_op
8410         ## @}
8411
8412         ## @addtogroup l3_transform
8413         ## @{
8414
8415         ## Translate the given object along the vector, specified
8416         #  by its end points.
8417         #  @param theObject The object to be translated.
8418         #  @param thePoint1 Start point of translation vector.
8419         #  @param thePoint2 End point of translation vector.
8420         #  @param theCopy Flag used to translate object itself or create a copy.
8421         #  @return Translated @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
8422         #  new GEOM.GEOM_Object, containing the translated object if @a theCopy flag is @c True.
8423         @ManageTransactions("TrsfOp")
8424         def TranslateTwoPoints(self, theObject, thePoint1, thePoint2, theCopy=False):
8425             """
8426             Translate the given object along the vector, specified by its end points.
8427
8428             Parameters:
8429                 theObject The object to be translated.
8430                 thePoint1 Start point of translation vector.
8431                 thePoint2 End point of translation vector.
8432                 theCopy Flag used to translate object itself or create a copy.
8433
8434             Returns:
8435                 Translated theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
8436                 new GEOM.GEOM_Object, containing the translated object if theCopy flag is True.
8437             """
8438             if theCopy:
8439                 anObj = self.TrsfOp.TranslateTwoPointsCopy(theObject, thePoint1, thePoint2)
8440             else:
8441                 anObj = self.TrsfOp.TranslateTwoPoints(theObject, thePoint1, thePoint2)
8442             RaiseIfFailed("TranslateTwoPoints", self.TrsfOp)
8443             return anObj
8444
8445         ## Translate the given object along the vector, specified
8446         #  by its end points, creating its copy before the translation.
8447         #  @param theObject The object to be translated.
8448         #  @param thePoint1 Start point of translation vector.
8449         #  @param thePoint2 End point of translation vector.
8450         #  @param theName Object name; when specified, this parameter is used
8451         #         for result publication in the study. Otherwise, if automatic
8452         #         publication is switched on, default value is used for result name.
8453         #
8454         #  @return New GEOM.GEOM_Object, containing the translated object.
8455         #
8456         #  @ref tui_translation "Example 1"
8457         #  \n @ref swig_MakeTranslationTwoPoints "Example 2"
8458         @ManageTransactions("TrsfOp")
8459         def MakeTranslationTwoPoints(self, theObject, thePoint1, thePoint2, theName=None):
8460             """
8461             Translate the given object along the vector, specified
8462             by its end points, creating its copy before the translation.
8463
8464             Parameters:
8465                 theObject The object to be translated.
8466                 thePoint1 Start point of translation vector.
8467                 thePoint2 End point of translation vector.
8468                 theName Object name; when specified, this parameter is used
8469                         for result publication in the study. Otherwise, if automatic
8470                         publication is switched on, default value is used for result name.
8471
8472             Returns:
8473                 New GEOM.GEOM_Object, containing the translated object.
8474             """
8475             # Example: see GEOM_TestAll.py
8476             anObj = self.TrsfOp.TranslateTwoPointsCopy(theObject, thePoint1, thePoint2)
8477             RaiseIfFailed("TranslateTwoPointsCopy", self.TrsfOp)
8478             self._autoPublish(anObj, theName, "translated")
8479             return anObj
8480
8481         ## Translate the given object along the vector, specified by its components.
8482         #  @param theObject The object to be translated.
8483         #  @param theDX,theDY,theDZ Components of translation vector.
8484         #  @param theCopy Flag used to translate object itself or create a copy.
8485         #  @return Translated @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
8486         #  new GEOM.GEOM_Object, containing the translated object if @a theCopy flag is @c True.
8487         #
8488         #  @ref tui_translation "Example"
8489         @ManageTransactions("TrsfOp")
8490         def TranslateDXDYDZ(self, theObject, theDX, theDY, theDZ, theCopy=False):
8491             """
8492             Translate the given object along the vector, specified by its components.
8493
8494             Parameters:
8495                 theObject The object to be translated.
8496                 theDX,theDY,theDZ Components of translation vector.
8497                 theCopy Flag used to translate object itself or create a copy.
8498
8499             Returns:
8500                 Translated theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
8501                 new GEOM.GEOM_Object, containing the translated object if theCopy flag is True.
8502             """
8503             # Example: see GEOM_TestAll.py
8504             theDX, theDY, theDZ, Parameters = ParseParameters(theDX, theDY, theDZ)
8505             if theCopy:
8506                 anObj = self.TrsfOp.TranslateDXDYDZCopy(theObject, theDX, theDY, theDZ)
8507             else:
8508                 anObj = self.TrsfOp.TranslateDXDYDZ(theObject, theDX, theDY, theDZ)
8509             anObj.SetParameters(Parameters)
8510             RaiseIfFailed("TranslateDXDYDZ", self.TrsfOp)
8511             return anObj
8512
8513         ## Translate the given object along the vector, specified
8514         #  by its components, creating its copy before the translation.
8515         #  @param theObject The object to be translated.
8516         #  @param theDX,theDY,theDZ Components of translation vector.
8517         #  @param theName Object name; when specified, this parameter is used
8518         #         for result publication in the study. Otherwise, if automatic
8519         #         publication is switched on, default value is used for result name.
8520         #
8521         #  @return New GEOM.GEOM_Object, containing the translated object.
8522         #
8523         #  @ref tui_translation "Example"
8524         @ManageTransactions("TrsfOp")
8525         def MakeTranslation(self,theObject, theDX, theDY, theDZ, theName=None):
8526             """
8527             Translate the given object along the vector, specified
8528             by its components, creating its copy before the translation.
8529
8530             Parameters:
8531                 theObject The object to be translated.
8532                 theDX,theDY,theDZ Components of translation vector.
8533                 theName Object name; when specified, this parameter is used
8534                         for result publication in the study. Otherwise, if automatic
8535                         publication is switched on, default value is used for result name.
8536
8537             Returns:
8538                 New GEOM.GEOM_Object, containing the translated object.
8539             """
8540             # Example: see GEOM_TestAll.py
8541             theDX, theDY, theDZ, Parameters = ParseParameters(theDX, theDY, theDZ)
8542             anObj = self.TrsfOp.TranslateDXDYDZCopy(theObject, theDX, theDY, theDZ)
8543             anObj.SetParameters(Parameters)
8544             RaiseIfFailed("TranslateDXDYDZ", self.TrsfOp)
8545             self._autoPublish(anObj, theName, "translated")
8546             return anObj
8547
8548         ## Translate the given object along the given vector.
8549         #  @param theObject The object to be translated.
8550         #  @param theVector The translation vector.
8551         #  @param theCopy Flag used to translate object itself or create a copy.
8552         #  @return Translated @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
8553         #  new GEOM.GEOM_Object, containing the translated object if @a theCopy flag is @c True.
8554         @ManageTransactions("TrsfOp")
8555         def TranslateVector(self, theObject, theVector, theCopy=False):
8556             """
8557             Translate the given object along the given vector.
8558
8559             Parameters:
8560                 theObject The object to be translated.
8561                 theVector The translation vector.
8562                 theCopy Flag used to translate object itself or create a copy.
8563
8564             Returns:
8565                 Translated theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
8566                 new GEOM.GEOM_Object, containing the translated object if theCopy flag is True.
8567             """
8568             if theCopy:
8569                 anObj = self.TrsfOp.TranslateVectorCopy(theObject, theVector)
8570             else:
8571                 anObj = self.TrsfOp.TranslateVector(theObject, theVector)
8572             RaiseIfFailed("TranslateVector", self.TrsfOp)
8573             return anObj
8574
8575         ## Translate the given object along the given vector,
8576         #  creating its copy before the translation.
8577         #  @param theObject The object to be translated.
8578         #  @param theVector The translation vector.
8579         #  @param theName Object name; when specified, this parameter is used
8580         #         for result publication in the study. Otherwise, if automatic
8581         #         publication is switched on, default value is used for result name.
8582         #
8583         #  @return New GEOM.GEOM_Object, containing the translated object.
8584         #
8585         #  @ref tui_translation "Example"
8586         @ManageTransactions("TrsfOp")
8587         def MakeTranslationVector(self, theObject, theVector, theName=None):
8588             """
8589             Translate the given object along the given vector,
8590             creating its copy before the translation.
8591
8592             Parameters:
8593                 theObject The object to be translated.
8594                 theVector The translation vector.
8595                 theName Object name; when specified, this parameter is used
8596                         for result publication in the study. Otherwise, if automatic
8597                         publication is switched on, default value is used for result name.
8598
8599             Returns:
8600                 New GEOM.GEOM_Object, containing the translated object.
8601             """
8602             # Example: see GEOM_TestAll.py
8603             anObj = self.TrsfOp.TranslateVectorCopy(theObject, theVector)
8604             RaiseIfFailed("TranslateVectorCopy", self.TrsfOp)
8605             self._autoPublish(anObj, theName, "translated")
8606             return anObj
8607
8608         ## Translate the given object along the given vector on given distance.
8609         #  @param theObject The object to be translated.
8610         #  @param theVector The translation vector.
8611         #  @param theDistance The translation distance.
8612         #  @param theCopy Flag used to translate object itself or create a copy.
8613         #  @return Translated @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
8614         #  new GEOM.GEOM_Object, containing the translated object if @a theCopy flag is @c True.
8615         #
8616         #  @ref tui_translation "Example"
8617         @ManageTransactions("TrsfOp")
8618         def TranslateVectorDistance(self, theObject, theVector, theDistance, theCopy=False):
8619             """
8620             Translate the given object along the given vector on given distance.
8621
8622             Parameters:
8623                 theObject The object to be translated.
8624                 theVector The translation vector.
8625                 theDistance The translation distance.
8626                 theCopy Flag used to translate object itself or create a copy.
8627
8628             Returns:
8629                 Translated theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
8630                 new GEOM.GEOM_Object, containing the translated object if theCopy flag is True.
8631             """
8632             # Example: see GEOM_TestAll.py
8633             theDistance,Parameters = ParseParameters(theDistance)
8634             anObj = self.TrsfOp.TranslateVectorDistance(theObject, theVector, theDistance, theCopy)
8635             RaiseIfFailed("TranslateVectorDistance", self.TrsfOp)
8636             anObj.SetParameters(Parameters)
8637             return anObj
8638
8639         ## Translate the given object along the given vector on given distance,
8640         #  creating its copy before the translation.
8641         #  @param theObject The object to be translated.
8642         #  @param theVector The translation vector.
8643         #  @param theDistance The translation distance.
8644         #  @param theName Object name; when specified, this parameter is used
8645         #         for result publication in the study. Otherwise, if automatic
8646         #         publication is switched on, default value is used for result name.
8647         #
8648         #  @return New GEOM.GEOM_Object, containing the translated object.
8649         #
8650         #  @ref tui_translation "Example"
8651         @ManageTransactions("TrsfOp")
8652         def MakeTranslationVectorDistance(self, theObject, theVector, theDistance, theName=None):
8653             """
8654             Translate the given object along the given vector on given distance,
8655             creating its copy before the translation.
8656
8657             Parameters:
8658                 theObject The object to be translated.
8659                 theVector The translation vector.
8660                 theDistance The translation distance.
8661                 theName Object name; when specified, this parameter is used
8662                         for result publication in the study. Otherwise, if automatic
8663                         publication is switched on, default value is used for result name.
8664
8665             Returns:
8666                 New GEOM.GEOM_Object, containing the translated object.
8667             """
8668             # Example: see GEOM_TestAll.py
8669             theDistance,Parameters = ParseParameters(theDistance)
8670             anObj = self.TrsfOp.TranslateVectorDistance(theObject, theVector, theDistance, 1)
8671             RaiseIfFailed("TranslateVectorDistance", self.TrsfOp)
8672             anObj.SetParameters(Parameters)
8673             self._autoPublish(anObj, theName, "translated")
8674             return anObj
8675
8676         ## Rotate the given object around the given axis on the given angle.
8677         #  @param theObject The object to be rotated.
8678         #  @param theAxis Rotation axis.
8679         #  @param theAngle Rotation angle in radians.
8680         #  @param theCopy Flag used to rotate object itself or create a copy.
8681         #
8682         #  @return Rotated @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
8683         #  new GEOM.GEOM_Object, containing the rotated object if @a theCopy flag is @c True.
8684         #
8685         #  @ref tui_rotation "Example"
8686         @ManageTransactions("TrsfOp")
8687         def Rotate(self, theObject, theAxis, theAngle, theCopy=False):
8688             """
8689             Rotate the given object around the given axis on the given angle.
8690
8691             Parameters:
8692                 theObject The object to be rotated.
8693                 theAxis Rotation axis.
8694                 theAngle Rotation angle in radians.
8695                 theCopy Flag used to rotate object itself or create a copy.
8696
8697             Returns:
8698                 Rotated theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
8699                 new GEOM.GEOM_Object, containing the rotated object if theCopy flag is True.
8700             """
8701             # Example: see GEOM_TestAll.py
8702             flag = False
8703             if isinstance(theAngle,str):
8704                 flag = True
8705             theAngle, Parameters = ParseParameters(theAngle)
8706             if flag:
8707                 theAngle = theAngle*math.pi/180.0
8708             if theCopy:
8709                 anObj = self.TrsfOp.RotateCopy(theObject, theAxis, theAngle)
8710             else:
8711                 anObj = self.TrsfOp.Rotate(theObject, theAxis, theAngle)
8712             RaiseIfFailed("Rotate", self.TrsfOp)
8713             anObj.SetParameters(Parameters)
8714             return anObj
8715
8716         ## Rotate the given object around the given axis
8717         #  on the given angle, creating its copy before the rotation.
8718         #  @param theObject The object to be rotated.
8719         #  @param theAxis Rotation axis.
8720         #  @param theAngle Rotation angle in radians.
8721         #  @param theName Object name; when specified, this parameter is used
8722         #         for result publication in the study. Otherwise, if automatic
8723         #         publication is switched on, default value is used for result name.
8724         #
8725         #  @return New GEOM.GEOM_Object, containing the rotated object.
8726         #
8727         #  @ref tui_rotation "Example"
8728         @ManageTransactions("TrsfOp")
8729         def MakeRotation(self, theObject, theAxis, theAngle, theName=None):
8730             """
8731             Rotate the given object around the given axis
8732             on the given angle, creating its copy before the rotatation.
8733
8734             Parameters:
8735                 theObject The object to be rotated.
8736                 theAxis Rotation axis.
8737                 theAngle Rotation angle in radians.
8738                 theName Object name; when specified, this parameter is used
8739                         for result publication in the study. Otherwise, if automatic
8740                         publication is switched on, default value is used for result name.
8741
8742             Returns:
8743                 New GEOM.GEOM_Object, containing the rotated object.
8744             """
8745             # Example: see GEOM_TestAll.py
8746             flag = False
8747             if isinstance(theAngle,str):
8748                 flag = True
8749             theAngle, Parameters = ParseParameters(theAngle)
8750             if flag:
8751                 theAngle = theAngle*math.pi/180.0
8752             anObj = self.TrsfOp.RotateCopy(theObject, theAxis, theAngle)
8753             RaiseIfFailed("RotateCopy", self.TrsfOp)
8754             anObj.SetParameters(Parameters)
8755             self._autoPublish(anObj, theName, "rotated")
8756             return anObj
8757
8758         ## Rotate given object around vector perpendicular to plane
8759         #  containing three points.
8760         #  @param theObject The object to be rotated.
8761         #  @param theCentPoint central point the axis is the vector perpendicular to the plane
8762         #  containing the three points.
8763         #  @param thePoint1,thePoint2 points in a perpendicular plane of the axis.
8764         #  @param theCopy Flag used to rotate object itself or create a copy.
8765         #  @return Rotated @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
8766         #  new GEOM.GEOM_Object, containing the rotated object if @a theCopy flag is @c True.
8767         @ManageTransactions("TrsfOp")
8768         def RotateThreePoints(self, theObject, theCentPoint, thePoint1, thePoint2, theCopy=False):
8769             """
8770             Rotate given object around vector perpendicular to plane
8771             containing three points.
8772
8773             Parameters:
8774                 theObject The object to be rotated.
8775                 theCentPoint central point  the axis is the vector perpendicular to the plane
8776                              containing the three points.
8777                 thePoint1,thePoint2 points in a perpendicular plane of the axis.
8778                 theCopy Flag used to rotate object itself or create a copy.
8779
8780             Returns:
8781                 Rotated theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
8782                 new GEOM.GEOM_Object, containing the rotated object if theCopy flag is True.
8783             """
8784             if theCopy:
8785                 anObj = self.TrsfOp.RotateThreePointsCopy(theObject, theCentPoint, thePoint1, thePoint2)
8786             else:
8787                 anObj = self.TrsfOp.RotateThreePoints(theObject, theCentPoint, thePoint1, thePoint2)
8788             RaiseIfFailed("RotateThreePoints", self.TrsfOp)
8789             return anObj
8790
8791         ## Rotate given object around vector perpendicular to plane
8792         #  containing three points, creating its copy before the rotatation.
8793         #  @param theObject The object to be rotated.
8794         #  @param theCentPoint central point the axis is the vector perpendicular to the plane
8795         #  containing the three points.
8796         #  @param thePoint1,thePoint2 in a perpendicular plane of the axis.
8797         #  @param theName Object name; when specified, this parameter is used
8798         #         for result publication in the study. Otherwise, if automatic
8799         #         publication is switched on, default value is used for result name.
8800         #
8801         #  @return New GEOM.GEOM_Object, containing the rotated object.
8802         #
8803         #  @ref tui_rotation "Example"
8804         @ManageTransactions("TrsfOp")
8805         def MakeRotationThreePoints(self, theObject, theCentPoint, thePoint1, thePoint2, theName=None):
8806             """
8807             Rotate given object around vector perpendicular to plane
8808             containing three points, creating its copy before the rotatation.
8809
8810             Parameters:
8811                 theObject The object to be rotated.
8812                 theCentPoint central point  the axis is the vector perpendicular to the plane
8813                              containing the three points.
8814                 thePoint1,thePoint2  in a perpendicular plane of the axis.
8815                 theName Object name; when specified, this parameter is used
8816                         for result publication in the study. Otherwise, if automatic
8817                         publication is switched on, default value is used for result name.
8818
8819             Returns:
8820                 New GEOM.GEOM_Object, containing the rotated object.
8821             """
8822             # Example: see GEOM_TestAll.py
8823             anObj = self.TrsfOp.RotateThreePointsCopy(theObject, theCentPoint, thePoint1, thePoint2)
8824             RaiseIfFailed("RotateThreePointsCopy", self.TrsfOp)
8825             self._autoPublish(anObj, theName, "rotated")
8826             return anObj
8827
8828         ## Scale the given object by the specified factor.
8829         #  @param theObject The object to be scaled.
8830         #  @param thePoint Center point for scaling.
8831         #                  Passing None for it means scaling relatively the origin of global CS.
8832         #  @param theFactor Scaling factor value.
8833         #  @param theCopy Flag used to scale object itself or create a copy.
8834         #  @return Scaled @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
8835         #  new GEOM.GEOM_Object, containing the scaled object if @a theCopy flag is @c True.
8836         @ManageTransactions("TrsfOp")
8837         def Scale(self, theObject, thePoint, theFactor, theCopy=False):
8838             """
8839             Scale the given object by the specified factor.
8840
8841             Parameters:
8842                 theObject The object to be scaled.
8843                 thePoint Center point for scaling.
8844                          Passing None for it means scaling relatively the origin of global CS.
8845                 theFactor Scaling factor value.
8846                 theCopy Flag used to scale object itself or create a copy.
8847
8848             Returns:
8849                 Scaled theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
8850                 new GEOM.GEOM_Object, containing the scaled object if theCopy flag is True.
8851             """
8852             # Example: see GEOM_TestAll.py
8853             theFactor, Parameters = ParseParameters(theFactor)
8854             if theCopy:
8855                 anObj = self.TrsfOp.ScaleShapeCopy(theObject, thePoint, theFactor)
8856             else:
8857                 anObj = self.TrsfOp.ScaleShape(theObject, thePoint, theFactor)
8858             RaiseIfFailed("Scale", self.TrsfOp)
8859             anObj.SetParameters(Parameters)
8860             return anObj
8861
8862         ## Scale the given object by the factor, creating its copy before the scaling.
8863         #  @param theObject The object to be scaled.
8864         #  @param thePoint Center point for scaling.
8865         #                  Passing None for it means scaling relatively the origin of global CS.
8866         #  @param theFactor Scaling factor value.
8867         #  @param theName Object name; when specified, this parameter is used
8868         #         for result publication in the study. Otherwise, if automatic
8869         #         publication is switched on, default value is used for result name.
8870         #
8871         #  @return New GEOM.GEOM_Object, containing the scaled shape.
8872         #
8873         #  @ref tui_scale "Example"
8874         @ManageTransactions("TrsfOp")
8875         def MakeScaleTransform(self, theObject, thePoint, theFactor, theName=None):
8876             """
8877             Scale the given object by the factor, creating its copy before the scaling.
8878
8879             Parameters:
8880                 theObject The object to be scaled.
8881                 thePoint Center point for scaling.
8882                          Passing None for it means scaling relatively the origin of global CS.
8883                 theFactor Scaling factor value.
8884                 theName Object name; when specified, this parameter is used
8885                         for result publication in the study. Otherwise, if automatic
8886                         publication is switched on, default value is used for result name.
8887
8888             Returns:
8889                 New GEOM.GEOM_Object, containing the scaled shape.
8890             """
8891             # Example: see GEOM_TestAll.py
8892             theFactor, Parameters = ParseParameters(theFactor)
8893             anObj = self.TrsfOp.ScaleShapeCopy(theObject, thePoint, theFactor)
8894             RaiseIfFailed("ScaleShapeCopy", self.TrsfOp)
8895             anObj.SetParameters(Parameters)
8896             self._autoPublish(anObj, theName, "scaled")
8897             return anObj
8898
8899         ## Scale the given object by different factors along coordinate axes.
8900         #  @param theObject The object to be scaled.
8901         #  @param thePoint Center point for scaling.
8902         #                  Passing None for it means scaling relatively the origin of global CS.
8903         #  @param theFactorX,theFactorY,theFactorZ Scaling factors along each axis.
8904         #  @param theCopy Flag used to scale object itself or create a copy.
8905         #  @return Scaled @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
8906         #  new GEOM.GEOM_Object, containing the scaled object if @a theCopy flag is @c True.
8907         @ManageTransactions("TrsfOp")
8908         def ScaleAlongAxes(self, theObject, thePoint, theFactorX, theFactorY, theFactorZ, theCopy=False):
8909             """
8910             Scale the given object by different factors along coordinate axes.
8911
8912             Parameters:
8913                 theObject The object to be scaled.
8914                 thePoint Center point for scaling.
8915                             Passing None for it means scaling relatively the origin of global CS.
8916                 theFactorX,theFactorY,theFactorZ Scaling factors along each axis.
8917                 theCopy Flag used to scale object itself or create a copy.
8918
8919             Returns:
8920                 Scaled theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
8921                 new GEOM.GEOM_Object, containing the scaled object if theCopy flag is True.
8922             """
8923             # Example: see GEOM_TestAll.py
8924             theFactorX, theFactorY, theFactorZ, Parameters = ParseParameters(theFactorX, theFactorY, theFactorZ)
8925             if theCopy:
8926                 anObj = self.TrsfOp.ScaleShapeAlongAxesCopy(theObject, thePoint,
8927                                                             theFactorX, theFactorY, theFactorZ)
8928             else:
8929                 anObj = self.TrsfOp.ScaleShapeAlongAxes(theObject, thePoint,
8930                                                         theFactorX, theFactorY, theFactorZ)
8931             RaiseIfFailed("ScaleAlongAxes", self.TrsfOp)
8932             anObj.SetParameters(Parameters)
8933             return anObj
8934
8935         ## Scale the given object by different factors along coordinate axes,
8936         #  creating its copy before the scaling.
8937         #  @param theObject The object to be scaled.
8938         #  @param thePoint Center point for scaling.
8939         #                  Passing None for it means scaling relatively the origin of global CS.
8940         #  @param theFactorX,theFactorY,theFactorZ Scaling factors along each axis.
8941         #  @param theName Object name; when specified, this parameter is used
8942         #         for result publication in the study. Otherwise, if automatic
8943         #         publication is switched on, default value is used for result name.
8944         #
8945         #  @return New GEOM.GEOM_Object, containing the scaled shape.
8946         #
8947         #  @ref swig_scale "Example"
8948         @ManageTransactions("TrsfOp")
8949         def MakeScaleAlongAxes(self, theObject, thePoint, theFactorX, theFactorY, theFactorZ, theName=None):
8950             """
8951             Scale the given object by different factors along coordinate axes,
8952             creating its copy before the scaling.
8953
8954             Parameters:
8955                 theObject The object to be scaled.
8956                 thePoint Center point for scaling.
8957                             Passing None for it means scaling relatively the origin of global CS.
8958                 theFactorX,theFactorY,theFactorZ Scaling factors along each axis.
8959                 theName Object name; when specified, this parameter is used
8960                         for result publication in the study. Otherwise, if automatic
8961                         publication is switched on, default value is used for result name.
8962
8963             Returns:
8964                 New GEOM.GEOM_Object, containing the scaled shape.
8965             """
8966             # Example: see GEOM_TestAll.py
8967             theFactorX, theFactorY, theFactorZ, Parameters = ParseParameters(theFactorX, theFactorY, theFactorZ)
8968             anObj = self.TrsfOp.ScaleShapeAlongAxesCopy(theObject, thePoint,
8969                                                         theFactorX, theFactorY, theFactorZ)
8970             RaiseIfFailed("MakeScaleAlongAxes", self.TrsfOp)
8971             anObj.SetParameters(Parameters)
8972             self._autoPublish(anObj, theName, "scaled")
8973             return anObj
8974
8975         ## Mirror an object relatively the given plane.
8976         #  @param theObject The object to be mirrored.
8977         #  @param thePlane Plane of symmetry.
8978         #  @param theCopy Flag used to mirror object itself or create a copy.
8979         #  @return Mirrored @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
8980         #  new GEOM.GEOM_Object, containing the mirrored object if @a theCopy flag is @c True.
8981         @ManageTransactions("TrsfOp")
8982         def MirrorByPlane(self, theObject, thePlane, theCopy=False):
8983             """
8984             Mirror an object relatively the given plane.
8985
8986             Parameters:
8987                 theObject The object to be mirrored.
8988                 thePlane Plane of symmetry.
8989                 theCopy Flag used to mirror object itself or create a copy.
8990
8991             Returns:
8992                 Mirrored theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
8993                 new GEOM.GEOM_Object, containing the mirrored object if theCopy flag is True.
8994             """
8995             if theCopy:
8996                 anObj = self.TrsfOp.MirrorPlaneCopy(theObject, thePlane)
8997             else:
8998                 anObj = self.TrsfOp.MirrorPlane(theObject, thePlane)
8999             RaiseIfFailed("MirrorByPlane", self.TrsfOp)
9000             return anObj
9001
9002         ## Create an object, symmetrical
9003         #  to the given one relatively the given plane.
9004         #  @param theObject The object to be mirrored.
9005         #  @param thePlane Plane of symmetry.
9006         #  @param theName Object name; when specified, this parameter is used
9007         #         for result publication in the study. Otherwise, if automatic
9008         #         publication is switched on, default value is used for result name.
9009         #
9010         #  @return New GEOM.GEOM_Object, containing the mirrored shape.
9011         #
9012         #  @ref tui_mirror "Example"
9013         @ManageTransactions("TrsfOp")
9014         def MakeMirrorByPlane(self, theObject, thePlane, theName=None):
9015             """
9016             Create an object, symmetrical to the given one relatively the given plane.
9017
9018             Parameters:
9019                 theObject The object to be mirrored.
9020                 thePlane Plane of symmetry.
9021                 theName Object name; when specified, this parameter is used
9022                         for result publication in the study. Otherwise, if automatic
9023                         publication is switched on, default value is used for result name.
9024
9025             Returns:
9026                 New GEOM.GEOM_Object, containing the mirrored shape.
9027             """
9028             # Example: see GEOM_TestAll.py
9029             anObj = self.TrsfOp.MirrorPlaneCopy(theObject, thePlane)
9030             RaiseIfFailed("MirrorPlaneCopy", self.TrsfOp)
9031             self._autoPublish(anObj, theName, "mirrored")
9032             return anObj
9033
9034         ## Mirror an object relatively the given axis.
9035         #  @param theObject The object to be mirrored.
9036         #  @param theAxis Axis of symmetry.
9037         #  @param theCopy Flag used to mirror object itself or create a copy.
9038         #  @return Mirrored @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
9039         #  new GEOM.GEOM_Object, containing the mirrored object if @a theCopy flag is @c True.
9040         @ManageTransactions("TrsfOp")
9041         def MirrorByAxis(self, theObject, theAxis, theCopy=False):
9042             """
9043             Mirror an object relatively the given axis.
9044
9045             Parameters:
9046                 theObject The object to be mirrored.
9047                 theAxis Axis of symmetry.
9048                 theCopy Flag used to mirror object itself or create a copy.
9049
9050             Returns:
9051                 Mirrored theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
9052                 new GEOM.GEOM_Object, containing the mirrored object if theCopy flag is True.
9053             """
9054             if theCopy:
9055                 anObj = self.TrsfOp.MirrorAxisCopy(theObject, theAxis)
9056             else:
9057                 anObj = self.TrsfOp.MirrorAxis(theObject, theAxis)
9058             RaiseIfFailed("MirrorByAxis", self.TrsfOp)
9059             return anObj
9060
9061         ## Create an object, symmetrical
9062         #  to the given one relatively the given axis.
9063         #  @param theObject The object to be mirrored.
9064         #  @param theAxis Axis of symmetry.
9065         #  @param theName Object name; when specified, this parameter is used
9066         #         for result publication in the study. Otherwise, if automatic
9067         #         publication is switched on, default value is used for result name.
9068         #
9069         #  @return New GEOM.GEOM_Object, containing the mirrored shape.
9070         #
9071         #  @ref tui_mirror "Example"
9072         @ManageTransactions("TrsfOp")
9073         def MakeMirrorByAxis(self, theObject, theAxis, theName=None):
9074             """
9075             Create an object, symmetrical to the given one relatively the given axis.
9076
9077             Parameters:
9078                 theObject The object to be mirrored.
9079                 theAxis Axis of symmetry.
9080                 theName Object name; when specified, this parameter is used
9081                         for result publication in the study. Otherwise, if automatic
9082                         publication is switched on, default value is used for result name.
9083
9084             Returns:
9085                 New GEOM.GEOM_Object, containing the mirrored shape.
9086             """
9087             # Example: see GEOM_TestAll.py
9088             anObj = self.TrsfOp.MirrorAxisCopy(theObject, theAxis)
9089             RaiseIfFailed("MirrorAxisCopy", self.TrsfOp)
9090             self._autoPublish(anObj, theName, "mirrored")
9091             return anObj
9092
9093         ## Mirror an object relatively the given point.
9094         #  @param theObject The object to be mirrored.
9095         #  @param thePoint Point of symmetry.
9096         #  @param theCopy Flag used to mirror object itself or create a copy.
9097         #  @return Mirrored @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
9098         #  new GEOM.GEOM_Object, containing the mirrored object if @a theCopy flag is @c True.
9099         @ManageTransactions("TrsfOp")
9100         def MirrorByPoint(self, theObject, thePoint, theCopy=False):
9101             """
9102             Mirror an object relatively the given point.
9103
9104             Parameters:
9105                 theObject The object to be mirrored.
9106                 thePoint Point of symmetry.
9107                 theCopy Flag used to mirror object itself or create a copy.
9108
9109             Returns:
9110                 Mirrored theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
9111                 new GEOM.GEOM_Object, containing the mirrored object if theCopy flag is True.
9112             """
9113             # Example: see GEOM_TestAll.py
9114             if theCopy:
9115                 anObj = self.TrsfOp.MirrorPointCopy(theObject, thePoint)
9116             else:
9117                 anObj = self.TrsfOp.MirrorPoint(theObject, thePoint)
9118             RaiseIfFailed("MirrorByPoint", self.TrsfOp)
9119             return anObj
9120
9121         ## Create an object, symmetrical
9122         #  to the given one relatively the given point.
9123         #  @param theObject The object to be mirrored.
9124         #  @param thePoint Point of symmetry.
9125         #  @param theName Object name; when specified, this parameter is used
9126         #         for result publication in the study. Otherwise, if automatic
9127         #         publication is switched on, default value is used for result name.
9128         #
9129         #  @return New GEOM.GEOM_Object, containing the mirrored shape.
9130         #
9131         #  @ref tui_mirror "Example"
9132         @ManageTransactions("TrsfOp")
9133         def MakeMirrorByPoint(self, theObject, thePoint, theName=None):
9134             """
9135             Create an object, symmetrical
9136             to the given one relatively the given point.
9137
9138             Parameters:
9139                 theObject The object to be mirrored.
9140                 thePoint Point of symmetry.
9141                 theName Object name; when specified, this parameter is used
9142                         for result publication in the study. Otherwise, if automatic
9143                         publication is switched on, default value is used for result name.
9144
9145             Returns:
9146                 New GEOM.GEOM_Object, containing the mirrored shape.
9147             """
9148             # Example: see GEOM_TestAll.py
9149             anObj = self.TrsfOp.MirrorPointCopy(theObject, thePoint)
9150             RaiseIfFailed("MirrorPointCopy", self.TrsfOp)
9151             self._autoPublish(anObj, theName, "mirrored")
9152             return anObj
9153
9154         ## Modify the location of the given object.
9155         #  @param theObject The object to be displaced.
9156         #  @param theStartLCS Coordinate system to perform displacement from it.\n
9157         #                     If \a theStartLCS is NULL, displacement
9158         #                     will be performed from global CS.\n
9159         #                     If \a theObject itself is used as \a theStartLCS,
9160         #                     its location will be changed to \a theEndLCS.
9161         #  @param theEndLCS Coordinate system to perform displacement to it.
9162         #  @param theCopy Flag used to displace object itself or create a copy.
9163         #  @return Displaced @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
9164         #  new GEOM.GEOM_Object, containing the displaced object if @a theCopy flag is @c True.
9165         @ManageTransactions("TrsfOp")
9166         def Position(self, theObject, theStartLCS, theEndLCS, theCopy=False):
9167             """
9168             Modify the Location of the given object by LCS, creating its copy before the setting.
9169
9170             Parameters:
9171                 theObject The object to be displaced.
9172                 theStartLCS Coordinate system to perform displacement from it.
9173                             If theStartLCS is NULL, displacement
9174                             will be performed from global CS.
9175                             If theObject itself is used as theStartLCS,
9176                             its location will be changed to theEndLCS.
9177                 theEndLCS Coordinate system to perform displacement to it.
9178                 theCopy Flag used to displace object itself or create a copy.
9179
9180             Returns:
9181                 Displaced theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
9182                 new GEOM.GEOM_Object, containing the displaced object if theCopy flag is True.
9183             """
9184             # Example: see GEOM_TestAll.py
9185             if theCopy:
9186                 anObj = self.TrsfOp.PositionShapeCopy(theObject, theStartLCS, theEndLCS)
9187             else:
9188                 anObj = self.TrsfOp.PositionShape(theObject, theStartLCS, theEndLCS)
9189             RaiseIfFailed("Displace", self.TrsfOp)
9190             return anObj
9191
9192         ## Modify the Location of the given object by LCS,
9193         #  creating its copy before the setting.
9194         #  @param theObject The object to be displaced.
9195         #  @param theStartLCS Coordinate system to perform displacement from it.\n
9196         #                     If \a theStartLCS is NULL, displacement
9197         #                     will be performed from global CS.\n
9198         #                     If \a theObject itself is used as \a theStartLCS,
9199         #                     its location will be changed to \a theEndLCS.
9200         #  @param theEndLCS Coordinate system to perform displacement to it.
9201         #  @param theName Object name; when specified, this parameter is used
9202         #         for result publication in the study. Otherwise, if automatic
9203         #         publication is switched on, default value is used for result name.
9204         #
9205         #  @return New GEOM.GEOM_Object, containing the displaced shape.
9206         #
9207         #  @ref tui_modify_location "Example"
9208         @ManageTransactions("TrsfOp")
9209         def MakePosition(self, theObject, theStartLCS, theEndLCS, theName=None):
9210             """
9211             Modify the Location of the given object by LCS, creating its copy before the setting.
9212
9213             Parameters:
9214                 theObject The object to be displaced.
9215                 theStartLCS Coordinate system to perform displacement from it.
9216                             If theStartLCS is NULL, displacement
9217                             will be performed from global CS.
9218                             If theObject itself is used as theStartLCS,
9219                             its location will be changed to theEndLCS.
9220                 theEndLCS Coordinate system to perform displacement to it.
9221                 theName Object name; when specified, this parameter is used
9222                         for result publication in the study. Otherwise, if automatic
9223                         publication is switched on, default value is used for result name.
9224
9225             Returns:
9226                 New GEOM.GEOM_Object, containing the displaced shape.
9227
9228             Example of usage:
9229                 # create local coordinate systems
9230                 cs1 = geompy.MakeMarker( 0, 0, 0, 1,0,0, 0,1,0)
9231                 cs2 = geompy.MakeMarker(30,40,40, 1,0,0, 0,1,0)
9232                 # modify the location of the given object
9233                 position = geompy.MakePosition(cylinder, cs1, cs2)
9234             """
9235             # Example: see GEOM_TestAll.py
9236             anObj = self.TrsfOp.PositionShapeCopy(theObject, theStartLCS, theEndLCS)
9237             RaiseIfFailed("PositionShapeCopy", self.TrsfOp)
9238             self._autoPublish(anObj, theName, "displaced")
9239             return anObj
9240
9241         ## Modify the Location of the given object by Path.
9242         #  @param  theObject The object to be displaced.
9243         #  @param  thePath Wire or Edge along that the object will be translated.
9244         #  @param  theDistance progress of Path (0 = start location, 1 = end of path location).
9245         #  @param  theCopy is to create a copy objects if true.
9246         #  @param  theReverse  0 - for usual direction, 1 - to reverse path direction.
9247         #  @return Displaced @a theObject (GEOM.GEOM_Object) if @a theCopy is @c False or
9248         #          new GEOM.GEOM_Object, containing the displaced shape if @a theCopy is @c True.
9249         #
9250         #  @ref tui_modify_location "Example"
9251         @ManageTransactions("TrsfOp")
9252         def PositionAlongPath(self,theObject, thePath, theDistance, theCopy, theReverse):
9253             """
9254             Modify the Location of the given object by Path.
9255
9256             Parameters:
9257                  theObject The object to be displaced.
9258                  thePath Wire or Edge along that the object will be translated.
9259                  theDistance progress of Path (0 = start location, 1 = end of path location).
9260                  theCopy is to create a copy objects if true.
9261                  theReverse  0 - for usual direction, 1 - to reverse path direction.
9262
9263             Returns:
9264                  Displaced theObject (GEOM.GEOM_Object) if theCopy is False or
9265                  new GEOM.GEOM_Object, containing the displaced shape if theCopy is True.
9266
9267             Example of usage:
9268                 position = geompy.PositionAlongPath(cylinder, circle, 0.75, 1, 1)
9269             """
9270             # Example: see GEOM_TestAll.py
9271             anObj = self.TrsfOp.PositionAlongPath(theObject, thePath, theDistance, theCopy, theReverse)
9272             RaiseIfFailed("PositionAlongPath", self.TrsfOp)
9273             return anObj
9274
9275         ## Modify the Location of the given object by Path, creating its copy before the operation.
9276         #  @param theObject The object to be displaced.
9277         #  @param thePath Wire or Edge along that the object will be translated.
9278         #  @param theDistance progress of Path (0 = start location, 1 = end of path location).
9279         #  @param theReverse  0 - for usual direction, 1 - to reverse path direction.
9280         #  @param theName Object name; when specified, this parameter is used
9281         #         for result publication in the study. Otherwise, if automatic
9282         #         publication is switched on, default value is used for result name.
9283         #
9284         #  @return New GEOM.GEOM_Object, containing the displaced shape.
9285         @ManageTransactions("TrsfOp")
9286         def MakePositionAlongPath(self, theObject, thePath, theDistance, theReverse, theName=None):
9287             """
9288             Modify the Location of the given object by Path, creating its copy before the operation.
9289
9290             Parameters:
9291                  theObject The object to be displaced.
9292                  thePath Wire or Edge along that the object will be translated.
9293                  theDistance progress of Path (0 = start location, 1 = end of path location).
9294                  theReverse  0 - for usual direction, 1 - to reverse path direction.
9295                  theName Object name; when specified, this parameter is used
9296                          for result publication in the study. Otherwise, if automatic
9297                          publication is switched on, default value is used for result name.
9298
9299             Returns:
9300                 New GEOM.GEOM_Object, containing the displaced shape.
9301             """
9302             # Example: see GEOM_TestAll.py
9303             anObj = self.TrsfOp.PositionAlongPath(theObject, thePath, theDistance, 1, theReverse)
9304             RaiseIfFailed("PositionAlongPath", self.TrsfOp)
9305             self._autoPublish(anObj, theName, "displaced")
9306             return anObj
9307
9308         ## Offset given shape.
9309         #  @param theObject The base object for the offset.
9310         #  @param theOffset Offset value.
9311         #  @param theCopy Flag used to offset object itself or create a copy.
9312         #  @return Modified @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
9313         #  new GEOM.GEOM_Object, containing the result of offset operation if @a theCopy flag is @c True.
9314         @ManageTransactions("TrsfOp")
9315         def Offset(self, theObject, theOffset, theCopy=False):
9316             """
9317             Offset given shape.
9318
9319             Parameters:
9320                 theObject The base object for the offset.
9321                 theOffset Offset value.
9322                 theCopy Flag used to offset object itself or create a copy.
9323
9324             Returns:
9325                 Modified theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
9326                 new GEOM.GEOM_Object, containing the result of offset operation if theCopy flag is True.
9327             """
9328             theOffset, Parameters = ParseParameters(theOffset)
9329             if theCopy:
9330                 anObj = self.TrsfOp.OffsetShapeCopy(theObject, theOffset, True)
9331             else:
9332                 anObj = self.TrsfOp.OffsetShape(theObject, theOffset, True)
9333             RaiseIfFailed("Offset", self.TrsfOp)
9334             anObj.SetParameters(Parameters)
9335             return anObj
9336
9337         ## Create new object as offset of the given one. Gap between two adjacent
9338         #  offset surfaces is filled by a pipe.
9339         #  @param theObject The base object for the offset.
9340         #  @param theOffset Offset value.
9341         #  @param theName Object name; when specified, this parameter is used
9342         #         for result publication in the study. Otherwise, if automatic
9343         #         publication is switched on, default value is used for result name.
9344         #
9345         #  @return New GEOM.GEOM_Object, containing the offset object.
9346         #
9347         #  @sa MakeOffsetIntersectionJoin
9348         #  @ref tui_offset "Example"
9349         @ManageTransactions("TrsfOp")
9350         def MakeOffset(self, theObject, theOffset, theName=None):
9351             """
9352             Create new object as offset of the given one. Gap between adjacent
9353             offset surfaces is filled by a pipe.
9354
9355             Parameters:
9356                 theObject The base object for the offset.
9357                 theOffset Offset value.
9358                 theName Object name; when specified, this parameter is used
9359                         for result publication in the study. Otherwise, if automatic
9360                         publication is switched on, default value is used for result name.
9361
9362             Returns:
9363                 New GEOM.GEOM_Object, containing the offset object.
9364
9365             Example of usage:
9366                  box = geompy.MakeBox(20, 20, 20, 200, 200, 200)
9367                  # create a new object as offset of the given object
9368                  offset = geompy.MakeOffset(box, 70.)
9369             """
9370             # Example: see GEOM_TestAll.py
9371             theOffset, Parameters = ParseParameters(theOffset)
9372             anObj = self.TrsfOp.OffsetShapeCopy( theObject, theOffset, True )
9373             RaiseIfFailed("OffsetShapeCopy", self.TrsfOp)
9374             anObj.SetParameters(Parameters)
9375             self._autoPublish(anObj, theName, "offset")
9376             return anObj
9377
9378         ## Create new object as offset of the given one. Gap between adjacent
9379         #  offset surfaces is filled by extending and intersecting them.
9380         #  @param theObject The base object for the offset.
9381         #  @param theOffset Offset value.
9382         #  @param theName Object name; when specified, this parameter is used
9383         #         for result publication in the study. Otherwise, if automatic
9384         #         publication is switched on, default value is used for result name.
9385         #
9386         #  @return New GEOM.GEOM_Object, containing the offset object.
9387         #
9388         #  @sa MakeOffset
9389         #  @ref tui_offset "Example"
9390         @ManageTransactions("TrsfOp")
9391         def MakeOffsetIntersectionJoin(self, theObject, theOffset, theName=None):
9392             """
9393             Create new object as offset of the given one. Gap between adjacent
9394             offset surfaces is filled by extending and intersecting them.
9395
9396             Parameters:
9397                 theObject The base object for the offset.
9398                 theOffset Offset value.
9399                 theName Object name; when specified, this parameter is used
9400                         for result publication in the study. Otherwise, if automatic
9401                         publication is switched on, default value is used for result name.
9402
9403             Returns:
9404                 New GEOM.GEOM_Object, containing the offset object.
9405
9406             Example of usage:
9407                  box = geompy.MakeBox(20, 20, 20, 200, 200, 200)
9408                  # create a new box extended by 70
9409                  offset = geompy.MakeOffsetIntersectionJoin(box, 70.)
9410             """
9411             # Example: see GEOM_TestAll.py
9412             theOffset, Parameters = ParseParameters( theOffset )
9413             anObj = self.TrsfOp.OffsetShapeCopy( theObject, theOffset, False )
9414             RaiseIfFailed("OffsetShapeCopy", self.TrsfOp)
9415             anObj.SetParameters(Parameters)
9416             self._autoPublish(anObj, theName, "offset")
9417             return anObj
9418
9419         ## Create new object as projection of the given one on another.
9420         #  @param theSource The source object for the projection. It can be a point, edge or wire.
9421         #         Edge and wire are acceptable if @a theTarget is a face.
9422         #  @param theTarget The target object. It can be planar or cylindrical face, edge or wire.
9423         #  @param theName Object name; when specified, this parameter is used
9424         #         for result publication in the study. Otherwise, if automatic
9425         #         publication is switched on, default value is used for result name.
9426         #
9427         #  @return New GEOM.GEOM_Object, containing the projection.
9428         #
9429         #  @ref tui_projection "Example"
9430         @ManageTransactions("TrsfOp")
9431         def MakeProjection(self, theSource, theTarget, theName=None):
9432             """
9433             Create new object as projection of the given one on another.
9434
9435             Parameters:
9436                 theSource The source object for the projection. It can be a point, edge or wire.
9437                           Edge and wire are acceptable if theTarget is a face.
9438                 theTarget The target object. It can be planar or cylindrical face, edge or wire.
9439                 theName Object name; when specified, this parameter is used
9440                         for result publication in the study. Otherwise, if automatic
9441                         publication is switched on, default value is used for result name.
9442
9443             Returns:
9444                 New GEOM.GEOM_Object, containing the projection.
9445             """
9446             # Example: see GEOM_TestAll.py
9447             anObj = self.TrsfOp.ProjectShapeCopy(theSource, theTarget)
9448             RaiseIfFailed("ProjectShapeCopy", self.TrsfOp)
9449             self._autoPublish(anObj, theName, "projection")
9450             return anObj
9451
9452         ## Create a projection of the given point on a wire or an edge.
9453         #  If there are no solutions or there are 2 or more solutions It throws an
9454         #  exception.
9455         #  @param thePoint the point to be projected.
9456         #  @param theWire the wire. The edge is accepted as well.
9457         #  @param theName Object name; when specified, this parameter is used
9458         #         for result publication in the study. Otherwise, if automatic
9459         #         publication is switched on, default value is used for result name.
9460         #
9461         #  @return [\a u, \a PointOnEdge, \a EdgeInWireIndex]
9462         #  \n \a u: The parameter of projection point on edge.
9463         #  \n \a PointOnEdge: The projection point.
9464         #  \n \a EdgeInWireIndex: The index of an edge in a wire.
9465         #
9466         #  @ref tui_projection "Example"
9467         @ManageTransactions("TrsfOp")
9468         def MakeProjectionOnWire(self, thePoint, theWire, theName=None):
9469             """
9470             Create a projection of the given point on a wire or an edge.
9471             If there are no solutions or there are 2 or more solutions It throws an
9472             exception.
9473
9474             Parameters:
9475                 thePoint the point to be projected.
9476                 theWire the wire. The edge is accepted as well.
9477                 theName Object name; when specified, this parameter is used
9478                         for result publication in the study. Otherwise, if automatic
9479                         publication is switched on, default value is used for result name.
9480
9481             Returns:
9482                 [u, PointOnEdge, EdgeInWireIndex]
9483                  u: The parameter of projection point on edge.
9484                  PointOnEdge: The projection point.
9485                  EdgeInWireIndex: The index of an edge in a wire.
9486             """
9487             # Example: see GEOM_TestAll.py
9488             anObj = self.TrsfOp.ProjectPointOnWire(thePoint, theWire)
9489             RaiseIfFailed("ProjectPointOnWire", self.TrsfOp)
9490             self._autoPublish(anObj[1], theName, "projection")
9491             return anObj
9492
9493         # -----------------------------------------------------------------------------
9494         # Patterns
9495         # -----------------------------------------------------------------------------
9496
9497         ## Translate the given object along the given vector a given number times
9498         #  @param theObject The object to be translated.
9499         #  @param theVector Direction of the translation. DX if None.
9500         #  @param theStep Distance to translate on.
9501         #  @param theNbTimes Quantity of translations to be done.
9502         #  @param theName Object name; when specified, this parameter is used
9503         #         for result publication in the study. Otherwise, if automatic
9504         #         publication is switched on, default value is used for result name.
9505         #
9506         #  @return New GEOM.GEOM_Object, containing compound of all
9507         #          the shapes, obtained after each translation.
9508         #
9509         #  @ref tui_multi_translation "Example"
9510         @ManageTransactions("TrsfOp")
9511         def MakeMultiTranslation1D(self, theObject, theVector, theStep, theNbTimes, theName=None):
9512             """
9513             Translate the given object along the given vector a given number times
9514
9515             Parameters:
9516                 theObject The object to be translated.
9517                 theVector Direction of the translation. DX if None.
9518                 theStep Distance to translate on.
9519                 theNbTimes Quantity of translations to be done.
9520                 theName Object name; when specified, this parameter is used
9521                         for result publication in the study. Otherwise, if automatic
9522                         publication is switched on, default value is used for result name.
9523
9524             Returns:
9525                 New GEOM.GEOM_Object, containing compound of all
9526                 the shapes, obtained after each translation.
9527
9528             Example of usage:
9529                 r1d = geompy.MakeMultiTranslation1D(prism, vect, 20, 4)
9530             """
9531             # Example: see GEOM_TestAll.py
9532             theStep, theNbTimes, Parameters = ParseParameters(theStep, theNbTimes)
9533             anObj = self.TrsfOp.MultiTranslate1D(theObject, theVector, theStep, theNbTimes)
9534             RaiseIfFailed("MultiTranslate1D", self.TrsfOp)
9535             anObj.SetParameters(Parameters)
9536             self._autoPublish(anObj, theName, "multitranslation")
9537             return anObj
9538
9539         ## Conseqently apply two specified translations to theObject specified number of times.
9540         #  @param theObject The object to be translated.
9541         #  @param theVector1 Direction of the first translation. DX if None.
9542         #  @param theStep1 Step of the first translation.
9543         #  @param theNbTimes1 Quantity of translations to be done along theVector1.
9544         #  @param theVector2 Direction of the second translation. DY if None.
9545         #  @param theStep2 Step of the second translation.
9546         #  @param theNbTimes2 Quantity of translations to be done along theVector2.
9547         #  @param theName Object name; when specified, this parameter is used
9548         #         for result publication in the study. Otherwise, if automatic
9549         #         publication is switched on, default value is used for result name.
9550         #
9551         #  @return New GEOM.GEOM_Object, containing compound of all
9552         #          the shapes, obtained after each translation.
9553         #
9554         #  @ref tui_multi_translation "Example"
9555         @ManageTransactions("TrsfOp")
9556         def MakeMultiTranslation2D(self, theObject, theVector1, theStep1, theNbTimes1,
9557                                    theVector2, theStep2, theNbTimes2, theName=None):
9558             """
9559             Conseqently apply two specified translations to theObject specified number of times.
9560
9561             Parameters:
9562                 theObject The object to be translated.
9563                 theVector1 Direction of the first translation. DX if None.
9564                 theStep1 Step of the first translation.
9565                 theNbTimes1 Quantity of translations to be done along theVector1.
9566                 theVector2 Direction of the second translation. DY if None.
9567                 theStep2 Step of the second translation.
9568                 theNbTimes2 Quantity of translations to be done along theVector2.
9569                 theName Object name; when specified, this parameter is used
9570                         for result publication in the study. Otherwise, if automatic
9571                         publication is switched on, default value is used for result name.
9572
9573             Returns:
9574                 New GEOM.GEOM_Object, containing compound of all
9575                 the shapes, obtained after each translation.
9576
9577             Example of usage:
9578                 tr2d = geompy.MakeMultiTranslation2D(prism, vect1, 20, 4, vect2, 80, 3)
9579             """
9580             # Example: see GEOM_TestAll.py
9581             theStep1,theNbTimes1,theStep2,theNbTimes2, Parameters = ParseParameters(theStep1,theNbTimes1,theStep2,theNbTimes2)
9582             anObj = self.TrsfOp.MultiTranslate2D(theObject, theVector1, theStep1, theNbTimes1,
9583                                                  theVector2, theStep2, theNbTimes2)
9584             RaiseIfFailed("MultiTranslate2D", self.TrsfOp)
9585             anObj.SetParameters(Parameters)
9586             self._autoPublish(anObj, theName, "multitranslation")
9587             return anObj
9588
9589         ## Rotate the given object around the given axis a given number times.
9590         #  Rotation angle will be 2*PI/theNbTimes.
9591         #  @param theObject The object to be rotated.
9592         #  @param theAxis The rotation axis. DZ if None.
9593         #  @param theNbTimes Quantity of rotations to be done.
9594         #  @param theName Object name; when specified, this parameter is used
9595         #         for result publication in the study. Otherwise, if automatic
9596         #         publication is switched on, default value is used for result name.
9597         #
9598         #  @return New GEOM.GEOM_Object, containing compound of all the
9599         #          shapes, obtained after each rotation.
9600         #
9601         #  @ref tui_multi_rotation "Example"
9602         @ManageTransactions("TrsfOp")
9603         def MultiRotate1DNbTimes (self, theObject, theAxis, theNbTimes, theName=None):
9604             """
9605             Rotate the given object around the given axis a given number times.
9606             Rotation angle will be 2*PI/theNbTimes.
9607
9608             Parameters:
9609                 theObject The object to be rotated.
9610                 theAxis The rotation axis. DZ if None.
9611                 theNbTimes Quantity of rotations to be done.
9612                 theName Object name; when specified, this parameter is used
9613                         for result publication in the study. Otherwise, if automatic
9614                         publication is switched on, default value is used for result name.
9615
9616             Returns:
9617                 New GEOM.GEOM_Object, containing compound of all the
9618                 shapes, obtained after each rotation.
9619
9620             Example of usage:
9621                 rot1d = geompy.MultiRotate1DNbTimes(prism, vect, 4)
9622             """
9623             # Example: see GEOM_TestAll.py
9624             theNbTimes, Parameters = ParseParameters(theNbTimes)
9625             anObj = self.TrsfOp.MultiRotate1D(theObject, theAxis, theNbTimes)
9626             RaiseIfFailed("MultiRotate1DNbTimes", self.TrsfOp)
9627             anObj.SetParameters(Parameters)
9628             self._autoPublish(anObj, theName, "multirotation")
9629             return anObj
9630
9631         ## Rotate the given object around the given axis
9632         #  a given number times on the given angle.
9633         #  @param theObject The object to be rotated.
9634         #  @param theAxis The rotation axis. DZ if None.
9635         #  @param theAngleStep Rotation angle in radians.
9636         #  @param theNbTimes Quantity of rotations to be done.
9637         #  @param theName Object name; when specified, this parameter is used
9638         #         for result publication in the study. Otherwise, if automatic
9639         #         publication is switched on, default value is used for result name.
9640         #
9641         #  @return New GEOM.GEOM_Object, containing compound of all the
9642         #          shapes, obtained after each rotation.
9643         #
9644         #  @ref tui_multi_rotation "Example"
9645         @ManageTransactions("TrsfOp")
9646         def MultiRotate1DByStep(self, theObject, theAxis, theAngleStep, theNbTimes, theName=None):
9647             """
9648             Rotate the given object around the given axis
9649             a given number times on the given angle.
9650
9651             Parameters:
9652                 theObject The object to be rotated.
9653                 theAxis The rotation axis. DZ if None.
9654                 theAngleStep Rotation angle in radians.
9655                 theNbTimes Quantity of rotations to be done.
9656                 theName Object name; when specified, this parameter is used
9657                         for result publication in the study. Otherwise, if automatic
9658                         publication is switched on, default value is used for result name.
9659
9660             Returns:
9661                 New GEOM.GEOM_Object, containing compound of all the
9662                 shapes, obtained after each rotation.
9663
9664             Example of usage:
9665                 rot1d = geompy.MultiRotate1DByStep(prism, vect, math.pi/4, 4)
9666             """
9667             # Example: see GEOM_TestAll.py
9668             theAngleStep, theNbTimes, Parameters = ParseParameters(theAngleStep, theNbTimes)
9669             anObj = self.TrsfOp.MultiRotate1DByStep(theObject, theAxis, theAngleStep, theNbTimes)
9670             RaiseIfFailed("MultiRotate1DByStep", self.TrsfOp)
9671             anObj.SetParameters(Parameters)
9672             self._autoPublish(anObj, theName, "multirotation")
9673             return anObj
9674
9675         ## Rotate the given object around the given axis a given
9676         #  number times and multi-translate each rotation result.
9677         #  Rotation angle will be 2*PI/theNbTimes1.
9678         #  Translation direction passes through center of gravity
9679         #  of rotated shape and its projection on the rotation axis.
9680         #  @param theObject The object to be rotated.
9681         #  @param theAxis Rotation axis. DZ if None.
9682         #  @param theNbTimes1 Quantity of rotations to be done.
9683         #  @param theRadialStep Translation distance.
9684         #  @param theNbTimes2 Quantity of translations to be done.
9685         #  @param theName Object name; when specified, this parameter is used
9686         #         for result publication in the study. Otherwise, if automatic
9687         #         publication is switched on, default value is used for result name.
9688         #
9689         #  @return New GEOM.GEOM_Object, containing compound of all the
9690         #          shapes, obtained after each transformation.
9691         #
9692         #  @ref tui_multi_rotation "Example"
9693         @ManageTransactions("TrsfOp")
9694         def MultiRotate2DNbTimes(self, theObject, theAxis, theNbTimes1, theRadialStep, theNbTimes2, theName=None):
9695             """
9696             Rotate the given object around the
9697             given axis on the given angle a given number
9698             times and multi-translate each rotation result.
9699             Translation direction passes through center of gravity
9700             of rotated shape and its projection on the rotation axis.
9701
9702             Parameters:
9703                 theObject The object to be rotated.
9704                 theAxis Rotation axis. DZ if None.
9705                 theNbTimes1 Quantity of rotations to be done.
9706                 theRadialStep Translation distance.
9707                 theNbTimes2 Quantity of translations to be done.
9708                 theName Object name; when specified, this parameter is used
9709                         for result publication in the study. Otherwise, if automatic
9710                         publication is switched on, default value is used for result name.
9711
9712             Returns:
9713                 New GEOM.GEOM_Object, containing compound of all the
9714                 shapes, obtained after each transformation.
9715
9716             Example of usage:
9717                 rot2d = geompy.MultiRotate2D(prism, vect, 60, 4, 50, 5)
9718             """
9719             # Example: see GEOM_TestAll.py
9720             theNbTimes1, theRadialStep, theNbTimes2, Parameters = ParseParameters(theNbTimes1, theRadialStep, theNbTimes2)
9721             anObj = self.TrsfOp.MultiRotate2DNbTimes(theObject, theAxis, theNbTimes1, theRadialStep, theNbTimes2)
9722             RaiseIfFailed("MultiRotate2DNbTimes", self.TrsfOp)
9723             anObj.SetParameters(Parameters)
9724             self._autoPublish(anObj, theName, "multirotation")
9725             return anObj
9726
9727         ## Rotate the given object around the
9728         #  given axis on the given angle a given number
9729         #  times and multi-translate each rotation result.
9730         #  Translation direction passes through center of gravity
9731         #  of rotated shape and its projection on the rotation axis.
9732         #  @param theObject The object to be rotated.
9733         #  @param theAxis Rotation axis. DZ if None.
9734         #  @param theAngleStep Rotation angle in radians.
9735         #  @param theNbTimes1 Quantity of rotations to be done.
9736         #  @param theRadialStep Translation distance.
9737         #  @param theNbTimes2 Quantity of translations to be done.
9738         #  @param theName Object name; when specified, this parameter is used
9739         #         for result publication in the study. Otherwise, if automatic
9740         #         publication is switched on, default value is used for result name.
9741         #
9742         #  @return New GEOM.GEOM_Object, containing compound of all the
9743         #          shapes, obtained after each transformation.
9744         #
9745         #  @ref tui_multi_rotation "Example"
9746         @ManageTransactions("TrsfOp")
9747         def MultiRotate2DByStep (self, theObject, theAxis, theAngleStep, theNbTimes1, theRadialStep, theNbTimes2, theName=None):
9748             """
9749             Rotate the given object around the
9750             given axis on the given angle a given number
9751             times and multi-translate each rotation result.
9752             Translation direction passes through center of gravity
9753             of rotated shape and its projection on the rotation axis.
9754
9755             Parameters:
9756                 theObject The object to be rotated.
9757                 theAxis Rotation axis. DZ if None.
9758                 theAngleStep Rotation angle in radians.
9759                 theNbTimes1 Quantity of rotations to be done.
9760                 theRadialStep Translation distance.
9761                 theNbTimes2 Quantity of translations to be done.
9762                 theName Object name; when specified, this parameter is used
9763                         for result publication in the study. Otherwise, if automatic
9764                         publication is switched on, default value is used for result name.
9765
9766             Returns:
9767                 New GEOM.GEOM_Object, containing compound of all the
9768                 shapes, obtained after each transformation.
9769
9770             Example of usage:
9771                 rot2d = geompy.MultiRotate2D(prism, vect, math.pi/3, 4, 50, 5)
9772             """
9773             # Example: see GEOM_TestAll.py
9774             theAngleStep, theNbTimes1, theRadialStep, theNbTimes2, Parameters = ParseParameters(theAngleStep, theNbTimes1, theRadialStep, theNbTimes2)
9775             anObj = self.TrsfOp.MultiRotate2DByStep(theObject, theAxis, theAngleStep, theNbTimes1, theRadialStep, theNbTimes2)
9776             RaiseIfFailed("MultiRotate2DByStep", self.TrsfOp)
9777             anObj.SetParameters(Parameters)
9778             self._autoPublish(anObj, theName, "multirotation")
9779             return anObj
9780
9781         ## The same, as MultiRotate1DNbTimes(), but axis is given by direction and point
9782         #
9783         #  @ref swig_MakeMultiRotation "Example"
9784         def MakeMultiRotation1DNbTimes(self, aShape, aDir, aPoint, aNbTimes, theName=None):
9785             """
9786             The same, as geompy.MultiRotate1DNbTimes, but axis is given by direction and point
9787
9788             Example of usage:
9789                 pz = geompy.MakeVertex(0, 0, 100)
9790                 vy = geompy.MakeVectorDXDYDZ(0, 100, 0)
9791                 MultiRot1D = geompy.MakeMultiRotation1DNbTimes(prism, vy, pz, 6)
9792             """
9793             # Example: see GEOM_TestOthers.py
9794             aVec = self.MakeLine(aPoint,aDir)
9795             # note: auto-publishing is done in self.MultiRotate1D()
9796             anObj = self.MultiRotate1DNbTimes(aShape, aVec, aNbTimes, theName)
9797             return anObj
9798
9799         ## The same, as MultiRotate1DByStep(), but axis is given by direction and point
9800         #
9801         #  @ref swig_MakeMultiRotation "Example"
9802         def MakeMultiRotation1DByStep(self, aShape, aDir, aPoint, anAngle, aNbTimes, theName=None):
9803             """
9804             The same, as geompy.MultiRotate1D, but axis is given by direction and point
9805
9806             Example of usage:
9807                 pz = geompy.MakeVertex(0, 0, 100)
9808                 vy = geompy.MakeVectorDXDYDZ(0, 100, 0)
9809                 MultiRot1D = geompy.MakeMultiRotation1DByStep(prism, vy, pz, math.pi/3, 6)
9810             """
9811             # Example: see GEOM_TestOthers.py
9812             aVec = self.MakeLine(aPoint,aDir)
9813             # note: auto-publishing is done in self.MultiRotate1D()
9814             anObj = self.MultiRotate1DByStep(aShape, aVec, anAngle, aNbTimes, theName)
9815             return anObj
9816
9817         ## The same, as MultiRotate2DNbTimes(), but axis is given by direction and point
9818         #
9819         #  @ref swig_MakeMultiRotation "Example"
9820         def MakeMultiRotation2DNbTimes(self, aShape, aDir, aPoint, nbtimes1, aStep, nbtimes2, theName=None):
9821             """
9822             The same, as MultiRotate2DNbTimes(), but axis is given by direction and point
9823
9824             Example of usage:
9825                 pz = geompy.MakeVertex(0, 0, 100)
9826                 vy = geompy.MakeVectorDXDYDZ(0, 100, 0)
9827                 MultiRot2D = geompy.MakeMultiRotation2DNbTimes(f12, vy, pz, 6, 30, 3)
9828             """
9829             # Example: see GEOM_TestOthers.py
9830             aVec = self.MakeLine(aPoint,aDir)
9831             # note: auto-publishing is done in self.MultiRotate2DNbTimes()
9832             anObj = self.MultiRotate2DNbTimes(aShape, aVec, nbtimes1, aStep, nbtimes2, theName)
9833             return anObj
9834
9835         ## The same, as MultiRotate2DByStep(), but axis is given by direction and point
9836         #
9837         #  @ref swig_MakeMultiRotation "Example"
9838         def MakeMultiRotation2DByStep(self, aShape, aDir, aPoint, anAngle, nbtimes1, aStep, nbtimes2, theName=None):
9839             """
9840             The same, as MultiRotate2DByStep(), but axis is given by direction and point
9841
9842             Example of usage:
9843                 pz = geompy.MakeVertex(0, 0, 100)
9844                 vy = geompy.MakeVectorDXDYDZ(0, 100, 0)
9845                 MultiRot2D = geompy.MakeMultiRotation2DByStep(f12, vy, pz, math.pi/4, 6, 30, 3)
9846             """
9847             # Example: see GEOM_TestOthers.py
9848             aVec = self.MakeLine(aPoint,aDir)
9849             # note: auto-publishing is done in self.MultiRotate2D()
9850             anObj = self.MultiRotate2DByStep(aShape, aVec, anAngle, nbtimes1, aStep, nbtimes2, theName)
9851             return anObj
9852
9853         ##
9854         #  Compute a wire or a face that represents a projection of the source
9855         #  shape onto cylinder. The cylinder's coordinate system is the same
9856         #  as the global coordinate system.
9857         #
9858         #  @param theObject The object to be projected. It can be either
9859         #         a planar wire or a face.
9860         #  @param theRadius The radius of the cylinder.
9861         #  @param theStartAngle The starting angle in radians from
9862         #         the cylinder's X axis around Z axis. The angle from which
9863         #         the projection is started.
9864         #  @param theAngleLength The projection length angle in radians.
9865         #         The angle in which to project the total length of the wire.
9866         #         If it is negative the projection is not scaled and natural
9867         #         wire length is kept for the projection.
9868         #  @param theAngleRotation The desired angle in radians between
9869         #         the tangent vector to the first curve at the first point of
9870         #         the theObject's projection in 2D space and U-direction of
9871         #         cylinder's 2D space.
9872         #  @param theName Object name; when specified, this parameter is used
9873         #         for result publication in the study. Otherwise, if automatic
9874         #         publication is switched on, default value is used for result name.
9875         #
9876         #  @return New GEOM.GEOM_Object, containing the result shape. The result
9877         #         represents a wire or a face that represents a projection of
9878         #         the source shape onto a cylinder.
9879         #
9880         #  @ref tui_projection "Example"
9881         def MakeProjectionOnCylinder (self, theObject, theRadius,
9882                                       theStartAngle=0.0, theAngleLength=-1.0,
9883                                       theAngleRotation=0.0,
9884                                       theName=None):
9885             """
9886             Compute a wire or a face that represents a projection of the source
9887             shape onto cylinder. The cylinder's coordinate system is the same
9888             as the global coordinate system.
9889
9890             Parameters:
9891                 theObject The object to be projected. It can be either
9892                         a planar wire or a face.
9893                 theRadius The radius of the cylinder.
9894                 theStartAngle The starting angle in radians from the cylinder's X axis
9895                         around Z axis. The angle from which the projection is started.
9896                 theAngleLength The projection length angle in radians. The angle in which
9897                         to project the total length of the wire. If it is negative the
9898                         projection is not scaled and natural wire length is kept for
9899                         the projection.
9900                 theAngleRotation The desired angle in radians between
9901                         the tangent vector to the first curve at the first
9902                         point of the theObject's projection in 2D space and
9903                         U-direction of cylinder's 2D space.
9904                 theName Object name; when specified, this parameter is used
9905                         for result publication in the study. Otherwise, if automatic
9906                         publication is switched on, default value is used for result name.
9907
9908             Returns:
9909                 New GEOM.GEOM_Object, containing the result shape. The result
9910                 represents a wire or a face that represents a projection of
9911                 the source shape onto a cylinder.
9912             """
9913             # Example: see GEOM_TestAll.py
9914             flagStartAngle = False
9915             if isinstance(theStartAngle,str):
9916                 flagStartAngle = True
9917             flagAngleLength = False
9918             if isinstance(theAngleLength,str):
9919                 flagAngleLength = True
9920             flagAngleRotation = False
9921             if isinstance(theAngleRotation,str):
9922                 flagAngleRotation = True
9923             theRadius, theStartAngle, theAngleLength, theAngleRotation, Parameters = ParseParameters(
9924               theRadius, theStartAngle, theAngleLength, theAngleRotation)
9925             if flagStartAngle:
9926                 theStartAngle = theStartAngle*math.pi/180.
9927             if flagAngleLength:
9928                 theAngleLength = theAngleLength*math.pi/180.
9929             if flagAngleRotation:
9930                 theAngleRotation = theAngleRotation*math.pi/180.
9931             anObj = self.TrsfOp.MakeProjectionOnCylinder(theObject, theRadius,
9932                 theStartAngle, theAngleLength, theAngleRotation)
9933             RaiseIfFailed("MakeProjectionOnCylinder", self.TrsfOp)
9934             anObj.SetParameters(Parameters)
9935             self._autoPublish(anObj, theName, "projection")
9936             return anObj
9937
9938         # end of l3_transform
9939         ## @}
9940
9941         ## @addtogroup l3_transform_d
9942         ## @{
9943
9944         ## Deprecated method. Use MultiRotate1DNbTimes instead.
9945         def MultiRotate1D(self, theObject, theAxis, theNbTimes, theName=None):
9946             """
9947             Deprecated method. Use MultiRotate1DNbTimes instead.
9948             """
9949             print("The method MultiRotate1D is DEPRECATED. Use MultiRotate1DNbTimes instead.")
9950             return self.MultiRotate1DNbTimes(theObject, theAxis, theNbTimes, theName)
9951
9952         ## The same, as MultiRotate2DByStep(), but theAngle is in degrees.
9953         #  This method is DEPRECATED. Use MultiRotate2DByStep() instead.
9954         @ManageTransactions("TrsfOp")
9955         def MultiRotate2D(self, theObject, theAxis, theAngle, theNbTimes1, theStep, theNbTimes2, theName=None):
9956             """
9957             The same, as MultiRotate2DByStep(), but theAngle is in degrees.
9958             This method is DEPRECATED. Use MultiRotate2DByStep() instead.
9959
9960             Example of usage:
9961                 rot2d = geompy.MultiRotate2D(prism, vect, 60, 4, 50, 5)
9962             """
9963             print("The method MultiRotate2D is DEPRECATED. Use MultiRotate2DByStep instead.")
9964             theAngle, theNbTimes1, theStep, theNbTimes2, Parameters = ParseParameters(theAngle, theNbTimes1, theStep, theNbTimes2)
9965             anObj = self.TrsfOp.MultiRotate2D(theObject, theAxis, theAngle, theNbTimes1, theStep, theNbTimes2)
9966             RaiseIfFailed("MultiRotate2D", self.TrsfOp)
9967             anObj.SetParameters(Parameters)
9968             self._autoPublish(anObj, theName, "multirotation")
9969             return anObj
9970
9971         ## The same, as MultiRotate1D(), but axis is given by direction and point
9972         #  This method is DEPRECATED. Use MakeMultiRotation1DNbTimes instead.
9973         def MakeMultiRotation1D(self, aShape, aDir, aPoint, aNbTimes, theName=None):
9974             """
9975             The same, as geompy.MultiRotate1D, but axis is given by direction and point.
9976             This method is DEPRECATED. Use MakeMultiRotation1DNbTimes instead.
9977
9978             Example of usage:
9979                 pz = geompy.MakeVertex(0, 0, 100)
9980                 vy = geompy.MakeVectorDXDYDZ(0, 100, 0)
9981                 MultiRot1D = geompy.MakeMultiRotation1D(prism, vy, pz, 6)
9982             """
9983             print("The method MakeMultiRotation1D is DEPRECATED. Use MakeMultiRotation1DNbTimes instead.")
9984             aVec = self.MakeLine(aPoint,aDir)
9985             # note: auto-publishing is done in self.MultiRotate1D()
9986             anObj = self.MultiRotate1D(aShape, aVec, aNbTimes, theName)
9987             return anObj
9988
9989         ## The same, as MultiRotate2D(), but axis is given by direction and point
9990         #  This method is DEPRECATED. Use MakeMultiRotation2DByStep instead.
9991         def MakeMultiRotation2D(self, aShape, aDir, aPoint, anAngle, nbtimes1, aStep, nbtimes2, theName=None):
9992             """
9993             The same, as MultiRotate2D(), but axis is given by direction and point
9994             This method is DEPRECATED. Use MakeMultiRotation2DByStep instead.
9995
9996             Example of usage:
9997                 pz = geompy.MakeVertex(0, 0, 100)
9998                 vy = geompy.MakeVectorDXDYDZ(0, 100, 0)
9999                 MultiRot2D = geompy.MakeMultiRotation2D(f12, vy, pz, 45, 6, 30, 3)
10000             """
10001             print("The method MakeMultiRotation2D is DEPRECATED. Use MakeMultiRotation2DByStep instead.")
10002             aVec = self.MakeLine(aPoint,aDir)
10003             # note: auto-publishing is done in self.MultiRotate2D()
10004             anObj = self.MultiRotate2D(aShape, aVec, anAngle, nbtimes1, aStep, nbtimes2, theName)
10005             return anObj
10006
10007         # end of l3_transform_d
10008         ## @}
10009
10010         ## @addtogroup l3_local
10011         ## @{
10012
10013         ## Perform a fillet on all edges of the given shape.
10014         #  @param theShape Shape, to perform fillet on.
10015         #  @param theR Fillet radius.
10016         #  @param theName Object name; when specified, this parameter is used
10017         #         for result publication in the study. Otherwise, if automatic
10018         #         publication is switched on, default value is used for result name.
10019         #
10020         #  @return New GEOM.GEOM_Object, containing the result shape.
10021         #
10022         #  @ref tui_fillet "Example 1"
10023         #  \n @ref swig_MakeFilletAll "Example 2"
10024         @ManageTransactions("LocalOp")
10025         def MakeFilletAll(self, theShape, theR, theName=None):
10026             """
10027             Perform a fillet on all edges of the given shape.
10028
10029             Parameters:
10030                 theShape Shape, to perform fillet on.
10031                 theR Fillet radius.
10032                 theName Object name; when specified, this parameter is used
10033                         for result publication in the study. Otherwise, if automatic
10034                         publication is switched on, default value is used for result name.
10035
10036             Returns:
10037                 New GEOM.GEOM_Object, containing the result shape.
10038
10039             Example of usage:
10040                filletall = geompy.MakeFilletAll(prism, 10.)
10041             """
10042             # Example: see GEOM_TestOthers.py
10043             theR,Parameters = ParseParameters(theR)
10044             anObj = self.LocalOp.MakeFilletAll(theShape, theR)
10045             RaiseIfFailed("MakeFilletAll", self.LocalOp)
10046             anObj.SetParameters(Parameters)
10047             self._autoPublish(anObj, theName, "fillet")
10048             return anObj
10049
10050         ## Perform a fillet on the specified edges/faces of the given shape
10051         #  @param theShape Shape, to perform fillet on.
10052         #  @param theR Fillet radius.
10053         #  @param theShapeType Type of shapes in <VAR>theListShapes</VAR> (see ShapeType())
10054         #  @param theListShapes Global indices of edges/faces to perform fillet on.
10055         #  @param theName Object name; when specified, this parameter is used
10056         #         for result publication in the study. Otherwise, if automatic
10057         #         publication is switched on, default value is used for result name.
10058         #
10059         #  @note Global index of sub-shape can be obtained, using method GetSubShapeID().
10060         #
10061         #  @return New GEOM.GEOM_Object, containing the result shape.
10062         #
10063         #  @ref tui_fillet "Example"
10064         @ManageTransactions("LocalOp")
10065         def MakeFillet(self, theShape, theR, theShapeType, theListShapes, theName=None):
10066             """
10067             Perform a fillet on the specified edges/faces of the given shape
10068
10069             Parameters:
10070                 theShape Shape, to perform fillet on.
10071                 theR Fillet radius.
10072                 theShapeType Type of shapes in theListShapes (see geompy.ShapeTypes)
10073                 theListShapes Global indices of edges/faces to perform fillet on.
10074                 theName Object name; when specified, this parameter is used
10075                         for result publication in the study. Otherwise, if automatic
10076                         publication is switched on, default value is used for result name.
10077
10078             Note:
10079                 Global index of sub-shape can be obtained, using method geompy.GetSubShapeID
10080
10081             Returns:
10082                 New GEOM.GEOM_Object, containing the result shape.
10083
10084             Example of usage:
10085                 # get the list of IDs (IDList) for the fillet
10086                 prism_edges = geompy.SubShapeAllSortedCentres(prism, geompy.ShapeType["EDGE"])
10087                 IDlist_e = []
10088                 IDlist_e.append(geompy.GetSubShapeID(prism, prism_edges[0]))
10089                 IDlist_e.append(geompy.GetSubShapeID(prism, prism_edges[1]))
10090                 IDlist_e.append(geompy.GetSubShapeID(prism, prism_edges[2]))
10091                 # make a fillet on the specified edges of the given shape
10092                 fillet = geompy.MakeFillet(prism, 10., geompy.ShapeType["EDGE"], IDlist_e)
10093             """
10094             # Example: see GEOM_TestAll.py
10095             theR,Parameters = ParseParameters(theR)
10096             anObj = None
10097             if theShapeType == self.ShapeType["EDGE"]:
10098                 anObj = self.LocalOp.MakeFilletEdges(theShape, theR, theListShapes)
10099                 RaiseIfFailed("MakeFilletEdges", self.LocalOp)
10100             else:
10101                 anObj = self.LocalOp.MakeFilletFaces(theShape, theR, theListShapes)
10102                 RaiseIfFailed("MakeFilletFaces", self.LocalOp)
10103             anObj.SetParameters(Parameters)
10104             self._autoPublish(anObj, theName, "fillet")
10105             return anObj
10106
10107         ## The same that MakeFillet() but with two Fillet Radius R1 and R2
10108         @ManageTransactions("LocalOp")
10109         def MakeFilletR1R2(self, theShape, theR1, theR2, theShapeType, theListShapes, theName=None):
10110             """
10111             The same that geompy.MakeFillet but with two Fillet Radius R1 and R2
10112
10113             Example of usage:
10114                 # get the list of IDs (IDList) for the fillet
10115                 prism_edges = geompy.SubShapeAllSortedCentres(prism, geompy.ShapeType["EDGE"])
10116                 IDlist_e = []
10117                 IDlist_e.append(geompy.GetSubShapeID(prism, prism_edges[0]))
10118                 IDlist_e.append(geompy.GetSubShapeID(prism, prism_edges[1]))
10119                 IDlist_e.append(geompy.GetSubShapeID(prism, prism_edges[2]))
10120                 # make a fillet on the specified edges of the given shape
10121                 fillet = geompy.MakeFillet(prism, 10., 15., geompy.ShapeType["EDGE"], IDlist_e)
10122             """
10123             theR1,theR2,Parameters = ParseParameters(theR1,theR2)
10124             anObj = None
10125             if theShapeType == self.ShapeType["EDGE"]:
10126                 anObj = self.LocalOp.MakeFilletEdgesR1R2(theShape, theR1, theR2, theListShapes)
10127                 RaiseIfFailed("MakeFilletEdgesR1R2", self.LocalOp)
10128             else:
10129                 anObj = self.LocalOp.MakeFilletFacesR1R2(theShape, theR1, theR2, theListShapes)
10130                 RaiseIfFailed("MakeFilletFacesR1R2", self.LocalOp)
10131             anObj.SetParameters(Parameters)
10132             self._autoPublish(anObj, theName, "fillet")
10133             return anObj
10134
10135         ## Perform a fillet on the specified edges of the given shape
10136         #  @param theShape  Wire Shape to perform fillet on.
10137         #  @param theR  Fillet radius.
10138         #  @param theListOfVertexes Global indices of vertexes to perform fillet on.
10139         #    \note Global index of sub-shape can be obtained, using method GetSubShapeID()
10140         #    \note The list of vertices could be empty,
10141         #          in this case fillet will done done at all vertices in wire
10142         #  @param doIgnoreSecantVertices If FALSE, fillet radius is always limited
10143         #         by the length of the edges, nearest to the fillet vertex.
10144         #         But sometimes the next edge is C1 continuous with the one, nearest to
10145         #         the fillet point, and such two (or more) edges can be united to allow
10146         #         bigger radius. Set this flag to TRUE to allow collinear edges union,
10147         #         thus ignoring the secant vertex (vertices).
10148         #  @param theName Object name; when specified, this parameter is used
10149         #         for result publication in the study. Otherwise, if automatic
10150         #         publication is switched on, default value is used for result name.
10151         #
10152         #  @return New GEOM.GEOM_Object, containing the result shape.
10153         #
10154         #  @ref tui_fillet2d "Example"
10155         @ManageTransactions("LocalOp")
10156         def MakeFillet1D(self, theShape, theR, theListOfVertexes, doIgnoreSecantVertices = True, theName=None):
10157             """
10158             Perform a fillet on the specified edges of the given shape
10159
10160             Parameters:
10161                 theShape  Wire Shape to perform fillet on.
10162                 theR  Fillet radius.
10163                 theListOfVertexes Global indices of vertexes to perform fillet on.
10164                 doIgnoreSecantVertices If FALSE, fillet radius is always limited
10165                     by the length of the edges, nearest to the fillet vertex.
10166                     But sometimes the next edge is C1 continuous with the one, nearest to
10167                     the fillet point, and such two (or more) edges can be united to allow
10168                     bigger radius. Set this flag to TRUE to allow collinear edges union,
10169                     thus ignoring the secant vertex (vertices).
10170                 theName Object name; when specified, this parameter is used
10171                         for result publication in the study. Otherwise, if automatic
10172                         publication is switched on, default value is used for result name.
10173             Note:
10174                 Global index of sub-shape can be obtained, using method geompy.GetSubShapeID
10175
10176                 The list of vertices could be empty,in this case fillet will done done at all vertices in wire
10177
10178             Returns:
10179                 New GEOM.GEOM_Object, containing the result shape.
10180
10181             Example of usage:
10182                 # create wire
10183                 Wire_1 = geompy.MakeWire([Edge_12, Edge_7, Edge_11, Edge_6, Edge_1,Edge_4])
10184                 # make fillet at given wire vertices with giver radius
10185                 Fillet_1D_1 = geompy.MakeFillet1D(Wire_1, 55, [3, 4, 6, 8, 10])
10186             """
10187             # Example: see GEOM_TestAll.py
10188             theR,doIgnoreSecantVertices,Parameters = ParseParameters(theR,doIgnoreSecantVertices)
10189             anObj = self.LocalOp.MakeFillet1D(theShape, theR, theListOfVertexes, doIgnoreSecantVertices)
10190             RaiseIfFailed("MakeFillet1D", self.LocalOp)
10191             anObj.SetParameters(Parameters)
10192             self._autoPublish(anObj, theName, "fillet")
10193             return anObj
10194
10195         ## Perform a fillet at the specified vertices of the given face/shell.
10196         #  @param theShape Face or Shell shape to perform fillet on.
10197         #  @param theR Fillet radius.
10198         #  @param theListOfVertexes Global indices of vertexes to perform fillet on.
10199         #  @param theName Object name; when specified, this parameter is used
10200         #         for result publication in the study. Otherwise, if automatic
10201         #         publication is switched on, default value is used for result name.
10202         #
10203         #  @note Global index of sub-shape can be obtained, using method GetSubShapeID().
10204         #
10205         #  @return New GEOM.GEOM_Object, containing the result shape.
10206         #
10207         #  @ref tui_fillet2d "Example"
10208         @ManageTransactions("LocalOp")
10209         def MakeFillet2D(self, theShape, theR, theListOfVertexes, theName=None):
10210             """
10211             Perform a fillet at the specified vertices of the given face/shell.
10212
10213             Parameters:
10214                 theShape  Face or Shell shape to perform fillet on.
10215                 theR  Fillet radius.
10216                 theListOfVertexes Global indices of vertexes to perform fillet on.
10217                 theName Object name; when specified, this parameter is used
10218                         for result publication in the study. Otherwise, if automatic
10219                         publication is switched on, default value is used for result name.
10220             Note:
10221                 Global index of sub-shape can be obtained, using method geompy.GetSubShapeID
10222
10223             Returns:
10224                 New GEOM.GEOM_Object, containing the result shape.
10225
10226             Example of usage:
10227                 face = geompy.MakeFaceHW(100, 100, 1)
10228                 fillet2d = geompy.MakeFillet2D(face, 30, [7, 9])
10229             """
10230             # Example: see GEOM_TestAll.py
10231             theR,Parameters = ParseParameters(theR)
10232             anObj = self.LocalOp.MakeFillet2D(theShape, theR, theListOfVertexes)
10233             RaiseIfFailed("MakeFillet2D", self.LocalOp)
10234             anObj.SetParameters(Parameters)
10235             self._autoPublish(anObj, theName, "fillet")
10236             return anObj
10237
10238         ## Perform a symmetric chamfer on all edges of the given shape.
10239         #  @param theShape Shape, to perform chamfer on.
10240         #  @param theD Chamfer size along each face.
10241         #  @param theName Object name; when specified, this parameter is used
10242         #         for result publication in the study. Otherwise, if automatic
10243         #         publication is switched on, default value is used for result name.
10244         #
10245         #  @return New GEOM.GEOM_Object, containing the result shape.
10246         #
10247         #  @ref tui_chamfer "Example 1"
10248         #  \n @ref swig_MakeChamferAll "Example 2"
10249         @ManageTransactions("LocalOp")
10250         def MakeChamferAll(self, theShape, theD, theName=None):
10251             """
10252             Perform a symmetric chamfer on all edges of the given shape.
10253
10254             Parameters:
10255                 theShape Shape, to perform chamfer on.
10256                 theD Chamfer size along each face.
10257                 theName Object name; when specified, this parameter is used
10258                         for result publication in the study. Otherwise, if automatic
10259                         publication is switched on, default value is used for result name.
10260
10261             Returns:
10262                 New GEOM.GEOM_Object, containing the result shape.
10263
10264             Example of usage:
10265                 chamfer_all = geompy.MakeChamferAll(prism, 10.)
10266             """
10267             # Example: see GEOM_TestOthers.py
10268             theD,Parameters = ParseParameters(theD)
10269             anObj = self.LocalOp.MakeChamferAll(theShape, theD)
10270             RaiseIfFailed("MakeChamferAll", self.LocalOp)
10271             anObj.SetParameters(Parameters)
10272             self._autoPublish(anObj, theName, "chamfer")
10273             return anObj
10274
10275         ## Perform a chamfer on edges, common to the specified faces,
10276         #  with distance D1 on the Face1
10277         #  @param theShape Shape, to perform chamfer on.
10278         #  @param theD1 Chamfer size along \a theFace1.
10279         #  @param theD2 Chamfer size along \a theFace2.
10280         #  @param theFace1,theFace2 Global indices of two faces of \a theShape.
10281         #  @param theName Object name; when specified, this parameter is used
10282         #         for result publication in the study. Otherwise, if automatic
10283         #         publication is switched on, default value is used for result name.
10284         #
10285         #  @note Global index of sub-shape can be obtained, using method GetSubShapeID().
10286         #
10287         #  @return New GEOM.GEOM_Object, containing the result shape.
10288         #
10289         #  @ref tui_chamfer "Example"
10290         @ManageTransactions("LocalOp")
10291         def MakeChamferEdge(self, theShape, theD1, theD2, theFace1, theFace2, theName=None):
10292             """
10293             Perform a chamfer on edges, common to the specified faces,
10294             with distance D1 on the Face1
10295
10296             Parameters:
10297                 theShape Shape, to perform chamfer on.
10298                 theD1 Chamfer size along theFace1.
10299                 theD2 Chamfer size along theFace2.
10300                 theFace1,theFace2 Global indices of two faces of theShape.
10301                 theName Object name; when specified, this parameter is used
10302                         for result publication in the study. Otherwise, if automatic
10303                         publication is switched on, default value is used for result name.
10304
10305             Note:
10306                 Global index of sub-shape can be obtained, using method geompy.GetSubShapeID
10307
10308             Returns:
10309                 New GEOM.GEOM_Object, containing the result shape.
10310
10311             Example of usage:
10312                 prism_faces = geompy.SubShapeAllSortedCentres(prism, geompy.ShapeType["FACE"])
10313                 f_ind_1 = geompy.GetSubShapeID(prism, prism_faces[0])
10314                 f_ind_2 = geompy.GetSubShapeID(prism, prism_faces[1])
10315                 chamfer_e = geompy.MakeChamferEdge(prism, 10., 10., f_ind_1, f_ind_2)
10316             """
10317             # Example: see GEOM_TestAll.py
10318             theD1,theD2,Parameters = ParseParameters(theD1,theD2)
10319             anObj = self.LocalOp.MakeChamferEdge(theShape, theD1, theD2, theFace1, theFace2)
10320             RaiseIfFailed("MakeChamferEdge", self.LocalOp)
10321             anObj.SetParameters(Parameters)
10322             self._autoPublish(anObj, theName, "chamfer")
10323             return anObj
10324
10325         ## Perform a chamfer on edges
10326         #  @param theShape Shape, to perform chamfer on.
10327         #  @param theD Chamfer length
10328         #  @param theAngle Angle of chamfer (angle in radians or a name of variable which defines angle in degrees)
10329         #  @param theFace1,theFace2 Global indices of two faces of \a theShape.
10330         #  @param theName Object name; when specified, this parameter is used
10331         #         for result publication in the study. Otherwise, if automatic
10332         #         publication is switched on, default value is used for result name.
10333         #
10334         #  @note Global index of sub-shape can be obtained, using method GetSubShapeID().
10335         #
10336         #  @return New GEOM.GEOM_Object, containing the result shape.
10337         @ManageTransactions("LocalOp")
10338         def MakeChamferEdgeAD(self, theShape, theD, theAngle, theFace1, theFace2, theName=None):
10339             """
10340             Perform a chamfer on edges
10341
10342             Parameters:
10343                 theShape Shape, to perform chamfer on.
10344                 theD1 Chamfer size along theFace1.
10345                 theAngle Angle of chamfer (angle in radians or a name of variable which defines angle in degrees).
10346                 theFace1,theFace2 Global indices of two faces of theShape.
10347                 theName Object name; when specified, this parameter is used
10348                         for result publication in the study. Otherwise, if automatic
10349                         publication is switched on, default value is used for result name.
10350
10351             Note:
10352                 Global index of sub-shape can be obtained, using method geompy.GetSubShapeID
10353
10354             Returns:
10355                 New GEOM.GEOM_Object, containing the result shape.
10356
10357             Example of usage:
10358                 prism_faces = geompy.SubShapeAllSortedCentres(prism, geompy.ShapeType["FACE"])
10359                 f_ind_1 = geompy.GetSubShapeID(prism, prism_faces[0])
10360                 f_ind_2 = geompy.GetSubShapeID(prism, prism_faces[1])
10361                 ang = 30
10362                 chamfer_e = geompy.MakeChamferEdge(prism, 10., ang, f_ind_1, f_ind_2)
10363             """
10364             flag = False
10365             if isinstance(theAngle,str):
10366                 flag = True
10367             theD,theAngle,Parameters = ParseParameters(theD,theAngle)
10368             if flag:
10369                 theAngle = theAngle*math.pi/180.0
10370             anObj = self.LocalOp.MakeChamferEdgeAD(theShape, theD, theAngle, theFace1, theFace2)
10371             RaiseIfFailed("MakeChamferEdgeAD", self.LocalOp)
10372             anObj.SetParameters(Parameters)
10373             self._autoPublish(anObj, theName, "chamfer")
10374             return anObj
10375
10376         ## Perform a chamfer on all edges of the specified faces,
10377         #  with distance D1 on the first specified face (if several for one edge)
10378         #  @param theShape Shape, to perform chamfer on.
10379         #  @param theD1 Chamfer size along face from \a theFaces. If both faces,
10380         #               connected to the edge, are in \a theFaces, \a theD1
10381         #               will be get along face, which is nearer to \a theFaces beginning.
10382         #  @param theD2 Chamfer size along another of two faces, connected to the edge.
10383         #  @param theFaces Sequence of global indices of faces of \a theShape.
10384         #  @param theName Object name; when specified, this parameter is used
10385         #         for result publication in the study. Otherwise, if automatic
10386         #         publication is switched on, default value is used for result name.
10387         #
10388         #  @note Global index of sub-shape can be obtained, using method GetSubShapeID().
10389         #
10390         #  @return New GEOM.GEOM_Object, containing the result shape.
10391         #
10392         #  @ref tui_chamfer "Example"
10393         @ManageTransactions("LocalOp")
10394         def MakeChamferFaces(self, theShape, theD1, theD2, theFaces, theName=None):
10395             """
10396             Perform a chamfer on all edges of the specified faces,
10397             with distance D1 on the first specified face (if several for one edge)
10398
10399             Parameters:
10400                 theShape Shape, to perform chamfer on.
10401                 theD1 Chamfer size along face from  theFaces. If both faces,
10402                       connected to the edge, are in theFaces, theD1
10403                       will be get along face, which is nearer to theFaces beginning.
10404                 theD2 Chamfer size along another of two faces, connected to the edge.
10405                 theFaces Sequence of global indices of faces of theShape.
10406                 theName Object name; when specified, this parameter is used
10407                         for result publication in the study. Otherwise, if automatic
10408                         publication is switched on, default value is used for result name.
10409
10410             Note: Global index of sub-shape can be obtained, using method geompy.GetSubShapeID().
10411
10412             Returns:
10413                 New GEOM.GEOM_Object, containing the result shape.
10414             """
10415             # Example: see GEOM_TestAll.py
10416             theD1,theD2,Parameters = ParseParameters(theD1,theD2)
10417             anObj = self.LocalOp.MakeChamferFaces(theShape, theD1, theD2, theFaces)
10418             RaiseIfFailed("MakeChamferFaces", self.LocalOp)
10419             anObj.SetParameters(Parameters)
10420             self._autoPublish(anObj, theName, "chamfer")
10421             return anObj
10422
10423         ## The Same that MakeChamferFaces() but with params theD is chamfer length and
10424         #  theAngle is Angle of chamfer (angle in radians or a name of variable which defines angle in degrees)
10425         #
10426         #  @ref swig_FilletChamfer "Example"
10427         @ManageTransactions("LocalOp")
10428         def MakeChamferFacesAD(self, theShape, theD, theAngle, theFaces, theName=None):
10429             """
10430             The Same that geompy.MakeChamferFaces but with params theD is chamfer length and
10431             theAngle is Angle of chamfer (angle in radians or a name of variable which defines angle in degrees)
10432             """
10433             flag = False
10434             if isinstance(theAngle,str):
10435                 flag = True
10436             theD,theAngle,Parameters = ParseParameters(theD,theAngle)
10437             if flag:
10438                 theAngle = theAngle*math.pi/180.0
10439             anObj = self.LocalOp.MakeChamferFacesAD(theShape, theD, theAngle, theFaces)
10440             RaiseIfFailed("MakeChamferFacesAD", self.LocalOp)
10441             anObj.SetParameters(Parameters)
10442             self._autoPublish(anObj, theName, "chamfer")
10443             return anObj
10444
10445         ## Perform a chamfer on edges,
10446         #  with distance D1 on the first specified face (if several for one edge)
10447         #  @param theShape Shape, to perform chamfer on.
10448         #  @param theD1,theD2 Chamfer size
10449         #  @param theEdges Sequence of edges of \a theShape.
10450         #  @param theName Object name; when specified, this parameter is used
10451         #         for result publication in the study. Otherwise, if automatic
10452         #         publication is switched on, default value is used for result name.
10453         #
10454         #  @return New GEOM.GEOM_Object, containing the result shape.
10455         #
10456         #  @ref swig_FilletChamfer "Example"
10457         @ManageTransactions("LocalOp")
10458         def MakeChamferEdges(self, theShape, theD1, theD2, theEdges, theName=None):
10459             """
10460             Perform a chamfer on edges,
10461             with distance D1 on the first specified face (if several for one edge)
10462
10463             Parameters:
10464                 theShape Shape, to perform chamfer on.
10465                 theD1,theD2 Chamfer size
10466                 theEdges Sequence of edges of theShape.
10467                 theName Object name; when specified, this parameter is used
10468                         for result publication in the study. Otherwise, if automatic
10469                         publication is switched on, default value is used for result name.
10470
10471             Returns:
10472                 New GEOM.GEOM_Object, containing the result shape.
10473             """
10474             theD1,theD2,Parameters = ParseParameters(theD1,theD2)
10475             anObj = self.LocalOp.MakeChamferEdges(theShape, theD1, theD2, theEdges)
10476             RaiseIfFailed("MakeChamferEdges", self.LocalOp)
10477             anObj.SetParameters(Parameters)
10478             self._autoPublish(anObj, theName, "chamfer")
10479             return anObj
10480
10481         ## The Same that MakeChamferEdges() but with params theD is chamfer length and
10482         #  theAngle is Angle of chamfer (angle in radians or a name of variable which defines angle in degrees)
10483         @ManageTransactions("LocalOp")
10484         def MakeChamferEdgesAD(self, theShape, theD, theAngle, theEdges, theName=None):
10485             """
10486             The Same that geompy.MakeChamferEdges but with params theD is chamfer length and
10487             theAngle is Angle of chamfer (angle in radians or a name of variable which defines angle in degrees)
10488             """
10489             flag = False
10490             if isinstance(theAngle,str):
10491                 flag = True
10492             theD,theAngle,Parameters = ParseParameters(theD,theAngle)
10493             if flag:
10494                 theAngle = theAngle*math.pi/180.0
10495             anObj = self.LocalOp.MakeChamferEdgesAD(theShape, theD, theAngle, theEdges)
10496             RaiseIfFailed("MakeChamferEdgesAD", self.LocalOp)
10497             anObj.SetParameters(Parameters)
10498             self._autoPublish(anObj, theName, "chamfer")
10499             return anObj
10500
10501         ## @sa MakeChamferEdge(), MakeChamferFaces()
10502         #
10503         #  @ref swig_MakeChamfer "Example"
10504         def MakeChamfer(self, aShape, d1, d2, aShapeType, ListShape, theName=None):
10505             """
10506             See geompy.MakeChamferEdge() and geompy.MakeChamferFaces() functions for more information.
10507             """
10508             # Example: see GEOM_TestOthers.py
10509             anObj = None
10510             # note: auto-publishing is done in self.MakeChamferEdge() or self.MakeChamferFaces()
10511             if aShapeType == self.ShapeType["EDGE"]:
10512                 anObj = self.MakeChamferEdge(aShape,d1,d2,ListShape[0],ListShape[1],theName)
10513             else:
10514                 anObj = self.MakeChamferFaces(aShape,d1,d2,ListShape,theName)
10515             return anObj
10516
10517         ## Remove material from a solid by extrusion of the base shape on the given distance.
10518         #  @param theInit Shape to remove material from. It must be a solid or
10519         #  a compound made of a single solid.
10520         #  @param theBase Closed edge or wire defining the base shape to be extruded.
10521         #  @param theH Prism dimension along the normal to theBase
10522         #  @param theAngle Draft angle in degrees.
10523         #  @param theInvert If true material changes the direction
10524         #  @param theName Object name; when specified, this parameter is used
10525         #         for result publication in the study. Otherwise, if automatic
10526         #         publication is switched on, default value is used for result name.
10527         #
10528         #  @return New GEOM.GEOM_Object, containing the initial shape with removed material
10529         #
10530         #  @ref tui_creation_prism "Example"
10531         @ManageTransactions("PrimOp")
10532         def MakeExtrudedCut(self, theInit, theBase, theH, theAngle, theInvert=False, theName=None):
10533             """
10534             Add material to a solid by extrusion of the base shape on the given distance.
10535
10536             Parameters:
10537                 theInit Shape to remove material from. It must be a solid or a compound made of a single solid.
10538                 theBase Closed edge or wire defining the base shape to be extruded.
10539                 theH Prism dimension along the normal to theBase
10540                 theAngle Draft angle in degrees.
10541                 theInvert If true material changes the direction.
10542                 theName Object name; when specified, this parameter is used
10543                         for result publication in the study. Otherwise, if automatic
10544                         publication is switched on, default value is used for result name.
10545
10546             Returns:
10547                 New GEOM.GEOM_Object,  containing the initial shape with removed material.
10548             """
10549             # Example: see GEOM_TestAll.py
10550             theH,theAngle,Parameters = ParseParameters(theH,theAngle)
10551             anObj = self.PrimOp.MakeDraftPrism(theInit, theBase, theH, theAngle, False, theInvert)
10552             RaiseIfFailed("MakeExtrudedBoss", self.PrimOp)
10553             anObj.SetParameters(Parameters)
10554             self._autoPublish(anObj, theName, "extrudedCut")
10555             return anObj
10556
10557         ## Add material to a solid by extrusion of the base shape on the given distance.
10558         #  @param theInit Shape to add material to. It must be a solid or
10559         #  a compound made of a single solid.
10560         #  @param theBase Closed edge or wire defining the base shape to be extruded.
10561         #  @param theH Prism dimension along the normal to theBase
10562         #  @param theAngle Draft angle in degrees.
10563         #  @param theInvert If true material changes the direction
10564         #  @param theName Object name; when specified, this parameter is used
10565         #         for result publication in the study. Otherwise, if automatic
10566         #         publication is switched on, default value is used for result name.
10567         #
10568         #  @return New GEOM.GEOM_Object, containing the initial shape with added material
10569         #
10570         #  @ref tui_creation_prism "Example"
10571         @ManageTransactions("PrimOp")
10572         def MakeExtrudedBoss(self, theInit, theBase, theH, theAngle, theInvert=False, theName=None):
10573             """
10574             Add material to a solid by extrusion of the base shape on the given distance.
10575
10576             Parameters:
10577                 theInit Shape to add material to. It must be a solid or a compound made of a single solid.
10578                 theBase Closed edge or wire defining the base shape to be extruded.
10579                 theH Prism dimension along the normal to theBase
10580                 theAngle Draft angle in degrees.
10581                 theInvert If true material changes the direction.
10582                 theName Object name; when specified, this parameter is used
10583                         for result publication in the study. Otherwise, if automatic
10584                         publication is switched on, default value is used for result name.
10585
10586             Returns:
10587                 New GEOM.GEOM_Object,  containing the initial shape with added material.
10588             """
10589             # Example: see GEOM_TestAll.py
10590             theH,theAngle,Parameters = ParseParameters(theH,theAngle)
10591             anObj = self.PrimOp.MakeDraftPrism(theInit, theBase, theH, theAngle, True, theInvert)
10592             RaiseIfFailed("MakeExtrudedBoss", self.PrimOp)
10593             anObj.SetParameters(Parameters)
10594             self._autoPublish(anObj, theName, "extrudedBoss")
10595             return anObj
10596
10597         # end of l3_local
10598         ## @}
10599
10600         ## @addtogroup l3_basic_op
10601         ## @{
10602
10603         ## Perform an Archimde operation on the given shape with given parameters.
10604         #  The object presenting the resulting face is returned.
10605         #  @param theShape Shape to be put in water.
10606         #  @param theWeight Weight of the shape.
10607         #  @param theWaterDensity Density of the water.
10608         #  @param theMeshDeflection Deflection of the mesh, using to compute the section.
10609         #  @param theName Object name; when specified, this parameter is used
10610         #         for result publication in the study. Otherwise, if automatic
10611         #         publication is switched on, default value is used for result name.
10612         #
10613         #  @return New GEOM.GEOM_Object, containing a section of \a theShape
10614         #          by a plane, corresponding to water level.
10615         #
10616         #  @ref tui_archimede "Example"
10617         @ManageTransactions("LocalOp")
10618         def Archimede(self, theShape, theWeight, theWaterDensity, theMeshDeflection, theName=None):
10619             """
10620             Perform an Archimde operation on the given shape with given parameters.
10621             The object presenting the resulting face is returned.
10622
10623             Parameters:
10624                 theShape Shape to be put in water.
10625                 theWeight Weight of the shape.
10626                 theWaterDensity Density of the water.
10627                 theMeshDeflection Deflection of the mesh, using to compute the section.
10628                 theName Object name; when specified, this parameter is used
10629                         for result publication in the study. Otherwise, if automatic
10630                         publication is switched on, default value is used for result name.
10631
10632             Returns:
10633                 New GEOM.GEOM_Object, containing a section of theShape
10634                 by a plane, corresponding to water level.
10635             """
10636             # Example: see GEOM_TestAll.py
10637             theWeight,theWaterDensity,theMeshDeflection,Parameters = ParseParameters(
10638               theWeight,theWaterDensity,theMeshDeflection)
10639             anObj = self.LocalOp.MakeArchimede(theShape, theWeight, theWaterDensity, theMeshDeflection)
10640             RaiseIfFailed("MakeArchimede", self.LocalOp)
10641             anObj.SetParameters(Parameters)
10642             self._autoPublish(anObj, theName, "archimede")
10643             return anObj
10644
10645         # end of l3_basic_op
10646         ## @}
10647
10648         ## @addtogroup l2_measure
10649         ## @{
10650
10651         ## Get point coordinates
10652         #  @return [x, y, z]
10653         #
10654         #  @ref tui_point_coordinates_page "Example"
10655         @ManageTransactions("MeasuOp")
10656         def PointCoordinates(self,Point):
10657             """
10658             Get point coordinates
10659
10660             Returns:
10661                 [x, y, z]
10662             """
10663             # Example: see GEOM_TestMeasures.py
10664             aTuple = self.MeasuOp.PointCoordinates(Point)
10665             RaiseIfFailed("PointCoordinates", self.MeasuOp)
10666             return aTuple
10667
10668         ## Get vector coordinates
10669         #  @return [x, y, z]
10670         #
10671         #  @ref tui_measurement_tools_page "Example"
10672         def VectorCoordinates(self,Vector):
10673             """
10674             Get vector coordinates
10675
10676             Returns:
10677                 [x, y, z]
10678             """
10679
10680             p1=self.GetFirstVertex(Vector)
10681             p2=self.GetLastVertex(Vector)
10682
10683             X1=self.PointCoordinates(p1)
10684             X2=self.PointCoordinates(p2)
10685
10686             return (X2[0]-X1[0],X2[1]-X1[1],X2[2]-X1[2])
10687
10688
10689         ## Compute cross product
10690         #  @return vector w=u^v
10691         #
10692         #  @ref tui_measurement_tools_page "Example"
10693         def CrossProduct(self, Vector1, Vector2):
10694             """
10695             Compute cross product
10696
10697             Returns: vector w=u^v
10698             """
10699             u=self.VectorCoordinates(Vector1)
10700             v=self.VectorCoordinates(Vector2)
10701             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])
10702
10703             return w
10704
10705         ## Compute cross product
10706         #  @return dot product  p=u.v
10707         #
10708         #  @ref tui_measurement_tools_page "Example"
10709         def DotProduct(self, Vector1, Vector2):
10710             """
10711             Compute cross product
10712
10713             Returns: dot product  p=u.v
10714             """
10715             u=self.VectorCoordinates(Vector1)
10716             v=self.VectorCoordinates(Vector2)
10717             p=u[0]*v[0]+u[1]*v[1]+u[2]*v[2]
10718
10719             return p
10720
10721
10722         ## Get summarized length of all wires,
10723         #  area of surface and volume of the given shape.
10724         #  @param theShape Shape to define properties of.
10725         #  @param theTolerance maximal relative error of area
10726         #         and volume computation.
10727         #  @return [theLength, theSurfArea, theVolume]\n
10728         #  theLength:   Summarized length of all wires of the given shape.\n
10729         #  theSurfArea: Area of surface of the given shape.\n
10730         #  theVolume:   Volume of the given shape.
10731         #
10732         #  @ref tui_basic_properties_page "Example"
10733         @ManageTransactions("MeasuOp")
10734         def BasicProperties(self,theShape, theTolerance=1.e-6):
10735             """
10736             Get summarized length of all wires,
10737             area of surface and volume of the given shape.
10738
10739             Parameters:
10740                 theShape Shape to define properties of.
10741                 theTolerance maximal relative error of area
10742                              and volume computation.
10743
10744             Returns:
10745                 [theLength, theSurfArea, theVolume]
10746                  theLength:   Summarized length of all wires of the given shape.
10747                  theSurfArea: Area of surface of the given shape.
10748                  theVolume:   Volume of the given shape.
10749             """
10750             # Example: see GEOM_TestMeasures.py
10751             aTuple = self.MeasuOp.GetBasicProperties(theShape, theTolerance)
10752             RaiseIfFailed("GetBasicProperties", self.MeasuOp)
10753             return aTuple
10754
10755         ## Get parameters of bounding box of the given shape
10756         #  @param theShape Shape to obtain bounding box of.
10757         #  @param precise TRUE for precise computation; FALSE for fast one.
10758         #  @return [Xmin,Xmax, Ymin,Ymax, Zmin,Zmax]
10759         #  Xmin,Xmax: Limits of shape along OX axis.
10760         #  Ymin,Ymax: Limits of shape along OY axis.
10761         #  Zmin,Zmax: Limits of shape along OZ axis.
10762         #
10763         #  @ref tui_bounding_box_page "Example"
10764         @ManageTransactions("MeasuOp")
10765         def BoundingBox (self, theShape, precise=False):
10766             """
10767             Get parameters of bounding box of the given shape
10768
10769             Parameters:
10770                 theShape Shape to obtain bounding box of.
10771                 precise TRUE for precise computation; FALSE for fast one.
10772
10773             Returns:
10774                 [Xmin,Xmax, Ymin,Ymax, Zmin,Zmax]
10775                  Xmin,Xmax: Limits of shape along OX axis.
10776                  Ymin,Ymax: Limits of shape along OY axis.
10777                  Zmin,Zmax: Limits of shape along OZ axis.
10778             """
10779             # Example: see GEOM_TestMeasures.py
10780             aTuple = self.MeasuOp.GetBoundingBox(theShape, precise)
10781             RaiseIfFailed("GetBoundingBox", self.MeasuOp)
10782             return aTuple
10783
10784         ## Get bounding box of the given shape
10785         #  @param theShape Shape to obtain bounding box of.
10786         #  @param precise TRUE for precise computation; FALSE for fast one.
10787         #  @param theName Object name; when specified, this parameter is used
10788         #         for result publication in the study. Otherwise, if automatic
10789         #         publication is switched on, default value is used for result name.
10790         #
10791         #  @return New GEOM.GEOM_Object, containing the created box.
10792         #
10793         #  @ref tui_bounding_box_page "Example"
10794         @ManageTransactions("MeasuOp")
10795         def MakeBoundingBox (self, theShape, precise=False, theName=None):
10796             """
10797             Get bounding box of the given shape
10798
10799             Parameters:
10800                 theShape Shape to obtain bounding box of.
10801                 precise TRUE for precise computation; FALSE for fast one.
10802                 theName Object name; when specified, this parameter is used
10803                         for result publication in the study. Otherwise, if automatic
10804                         publication is switched on, default value is used for result name.
10805
10806             Returns:
10807                 New GEOM.GEOM_Object, containing the created box.
10808             """
10809             # Example: see GEOM_TestMeasures.py
10810             anObj = self.MeasuOp.MakeBoundingBox(theShape, precise)
10811             RaiseIfFailed("MakeBoundingBox", self.MeasuOp)
10812             self._autoPublish(anObj, theName, "bndbox")
10813             return anObj
10814
10815         ## Get inertia matrix and moments of inertia of theShape.
10816         #  @param theShape Shape to calculate inertia of.
10817         #  @return [I11,I12,I13, I21,I22,I23, I31,I32,I33, Ix,Iy,Iz]
10818         #  I(1-3)(1-3): Components of the inertia matrix of the given shape.
10819         #  Ix,Iy,Iz:    Moments of inertia of the given shape.
10820         #
10821         #  @ref tui_inertia_page "Example"
10822         @ManageTransactions("MeasuOp")
10823         def Inertia(self,theShape):
10824             """
10825             Get inertia matrix and moments of inertia of theShape.
10826
10827             Parameters:
10828                 theShape Shape to calculate inertia of.
10829
10830             Returns:
10831                 [I11,I12,I13, I21,I22,I23, I31,I32,I33, Ix,Iy,Iz]
10832                  I(1-3)(1-3): Components of the inertia matrix of the given shape.
10833                  Ix,Iy,Iz:    Moments of inertia of the given shape.
10834             """
10835             # Example: see GEOM_TestMeasures.py
10836             aTuple = self.MeasuOp.GetInertia(theShape)
10837             RaiseIfFailed("GetInertia", self.MeasuOp)
10838             return aTuple
10839
10840         ## Get if coords are included in the shape (ST_IN or ST_ON)
10841         #  @param theShape Shape
10842         #  @param coords list of points coordinates [x1, y1, z1, x2, y2, z2, ...]
10843         #  @param tolerance to be used (default is 1.0e-7)
10844         #  @return list_of_boolean = [res1, res2, ...]
10845         @ManageTransactions("MeasuOp")
10846         def AreCoordsInside(self, theShape, coords, tolerance=1.e-7):
10847             """
10848             Get if coords are included in the shape (ST_IN or ST_ON)
10849
10850             Parameters:
10851                 theShape Shape
10852                 coords list of points coordinates [x1, y1, z1, x2, y2, z2, ...]
10853                 tolerance to be used (default is 1.0e-7)
10854
10855             Returns:
10856                 list_of_boolean = [res1, res2, ...]
10857             """
10858             return self.MeasuOp.AreCoordsInside(theShape, coords, tolerance)
10859
10860         ## Get minimal distance between the given shapes.
10861         #  @param theShape1,theShape2 Shapes to find minimal distance between.
10862         #  @return Value of the minimal distance between the given shapes.
10863         #
10864         #  @ref tui_min_distance_page "Example"
10865         @ManageTransactions("MeasuOp")
10866         def MinDistance(self, theShape1, theShape2):
10867             """
10868             Get minimal distance between the given shapes.
10869
10870             Parameters:
10871                 theShape1,theShape2 Shapes to find minimal distance between.
10872
10873             Returns:
10874                 Value of the minimal distance between the given shapes.
10875             """
10876             # Example: see GEOM_TestMeasures.py
10877             aTuple = self.MeasuOp.GetMinDistance(theShape1, theShape2)
10878             RaiseIfFailed("GetMinDistance", self.MeasuOp)
10879             return aTuple[0]
10880
10881         ## Get minimal distance between the given shapes.
10882         #  @param theShape1,theShape2 Shapes to find minimal distance between.
10883         #  @return Value of the minimal distance between the given shapes, in form of list
10884         #          [Distance, DX, DY, DZ].
10885         #
10886         #  @ref tui_min_distance_page "Example"
10887         @ManageTransactions("MeasuOp")
10888         def MinDistanceComponents(self, theShape1, theShape2):
10889             """
10890             Get minimal distance between the given shapes.
10891
10892             Parameters:
10893                 theShape1,theShape2 Shapes to find minimal distance between.
10894
10895             Returns:
10896                 Value of the minimal distance between the given shapes, in form of list
10897                 [Distance, DX, DY, DZ]
10898             """
10899             # Example: see GEOM_TestMeasures.py
10900             aTuple = self.MeasuOp.GetMinDistance(theShape1, theShape2)
10901             RaiseIfFailed("GetMinDistance", self.MeasuOp)
10902             aRes = [aTuple[0], aTuple[4] - aTuple[1], aTuple[5] - aTuple[2], aTuple[6] - aTuple[3]]
10903             return aRes
10904
10905         ## Get closest points of the given shapes.
10906         #  @param theShape1,theShape2 Shapes to find closest points of.
10907         #  @return The number of found solutions (-1 in case of infinite number of
10908         #          solutions) and a list of (X, Y, Z) coordinates for all couples of points.
10909         #
10910         #  @ref tui_min_distance_page "Example"
10911         @ManageTransactions("MeasuOp")
10912         def ClosestPoints (self, theShape1, theShape2):
10913             """
10914             Get closest points of the given shapes.
10915
10916             Parameters:
10917                 theShape1,theShape2 Shapes to find closest points of.
10918
10919             Returns:
10920                 The number of found solutions (-1 in case of infinite number of
10921                 solutions) and a list of (X, Y, Z) coordinates for all couples of points.
10922             """
10923             # Example: see GEOM_TestMeasures.py
10924             aTuple = self.MeasuOp.ClosestPoints(theShape1, theShape2)
10925             RaiseIfFailed("ClosestPoints", self.MeasuOp)
10926             return aTuple
10927
10928         ## Get angle between the given shapes in degrees.
10929         #  @param theShape1,theShape2 Lines or linear edges to find angle between.
10930         #  @note If both arguments are vectors, the angle is computed in accordance
10931         #        with their orientations, otherwise the minimum angle is computed.
10932         #  @return Value of the angle between the given shapes in degrees.
10933         #
10934         #  @ref tui_angle_page "Example"
10935         @ManageTransactions("MeasuOp")
10936         def GetAngle(self, theShape1, theShape2):
10937             """
10938             Get angle between the given shapes in degrees.
10939
10940             Parameters:
10941                 theShape1,theShape2 Lines or linear edges to find angle between.
10942
10943             Note:
10944                 If both arguments are vectors, the angle is computed in accordance
10945                 with their orientations, otherwise the minimum angle is computed.
10946
10947             Returns:
10948                 Value of the angle between the given shapes in degrees.
10949             """
10950             # Example: see GEOM_TestMeasures.py
10951             anAngle = self.MeasuOp.GetAngle(theShape1, theShape2)
10952             RaiseIfFailed("GetAngle", self.MeasuOp)
10953             return anAngle
10954
10955         ## Get angle between the given shapes in radians.
10956         #  @param theShape1,theShape2 Lines or linear edges to find angle between.
10957         #  @note If both arguments are vectors, the angle is computed in accordance
10958         #        with their orientations, otherwise the minimum angle is computed.
10959         #  @return Value of the angle between the given shapes in radians.
10960         #
10961         #  @ref tui_angle_page "Example"
10962         @ManageTransactions("MeasuOp")
10963         def GetAngleRadians(self, theShape1, theShape2):
10964             """
10965             Get angle between the given shapes in radians.
10966
10967             Parameters:
10968                 theShape1,theShape2 Lines or linear edges to find angle between.
10969
10970
10971             Note:
10972                 If both arguments are vectors, the angle is computed in accordance
10973                 with their orientations, otherwise the minimum angle is computed.
10974
10975             Returns:
10976                 Value of the angle between the given shapes in radians.
10977             """
10978             # Example: see GEOM_TestMeasures.py
10979             anAngle = self.MeasuOp.GetAngle(theShape1, theShape2)*math.pi/180.
10980             RaiseIfFailed("GetAngle", self.MeasuOp)
10981             return anAngle
10982
10983         ## Get angle between the given vectors in degrees.
10984         #  @param theShape1,theShape2 Vectors to find angle between.
10985         #  @param theFlag If True, the normal vector is defined by the two vectors cross,
10986         #                 if False, the opposite vector to the normal vector is used.
10987         #  @return Value of the angle between the given vectors in degrees.
10988         #
10989         #  @ref tui_angle_page "Example"
10990         @ManageTransactions("MeasuOp")
10991         def GetAngleVectors(self, theShape1, theShape2, theFlag = True):
10992             """
10993             Get angle between the given vectors in degrees.
10994
10995             Parameters:
10996                 theShape1,theShape2 Vectors to find angle between.
10997                 theFlag If True, the normal vector is defined by the two vectors cross,
10998                         if False, the opposite vector to the normal vector is used.
10999
11000             Returns:
11001                 Value of the angle between the given vectors in degrees.
11002             """
11003             anAngle = self.MeasuOp.GetAngleBtwVectors(theShape1, theShape2)
11004             if not theFlag:
11005                 anAngle = 360. - anAngle
11006             RaiseIfFailed("GetAngleVectors", self.MeasuOp)
11007             return anAngle
11008
11009         ## The same as GetAngleVectors, but the result is in radians.
11010         def GetAngleRadiansVectors(self, theShape1, theShape2, theFlag = True):
11011             """
11012             Get angle between the given vectors in radians.
11013
11014             Parameters:
11015                 theShape1,theShape2 Vectors to find angle between.
11016                 theFlag If True, the normal vector is defined by the two vectors cross,
11017                         if False, the opposite vector to the normal vector is used.
11018
11019             Returns:
11020                 Value of the angle between the given vectors in radians.
11021             """
11022             anAngle = self.GetAngleVectors(theShape1, theShape2, theFlag)*math.pi/180.
11023             return anAngle
11024
11025         ## @name Curve Curvature Measurement
11026         #  Methods for receiving radius of curvature of curves
11027         #  in the given point
11028         ## @{
11029
11030         ## Measure curvature of a curve at a point, set by parameter.
11031         #  @param theCurve a curve.
11032         #  @param theParam parameter.
11033         #  @return radius of curvature of \a theCurve.
11034         #
11035         #  @ref swig_todo "Example"
11036         @ManageTransactions("MeasuOp")
11037         def CurveCurvatureByParam(self, theCurve, theParam):
11038             """
11039             Measure curvature of a curve at a point, set by parameter.
11040
11041             Parameters:
11042                 theCurve a curve.
11043                 theParam parameter.
11044
11045             Returns:
11046                 radius of curvature of theCurve.
11047             """
11048             # Example: see GEOM_TestMeasures.py
11049             aCurv = self.MeasuOp.CurveCurvatureByParam(theCurve,theParam)
11050             RaiseIfFailed("CurveCurvatureByParam", self.MeasuOp)
11051             return aCurv
11052
11053         ## Measure curvature of a curve at a point.
11054         #  @param theCurve a curve.
11055         #  @param thePoint given point.
11056         #  @return radius of curvature of \a theCurve.
11057         #
11058         #  @ref swig_todo "Example"
11059         @ManageTransactions("MeasuOp")
11060         def CurveCurvatureByPoint(self, theCurve, thePoint):
11061             """
11062             Measure curvature of a curve at a point.
11063
11064             Parameters:
11065                 theCurve a curve.
11066                 thePoint given point.
11067
11068             Returns:
11069                 radius of curvature of theCurve.
11070             """
11071             aCurv = self.MeasuOp.CurveCurvatureByPoint(theCurve,thePoint)
11072             RaiseIfFailed("CurveCurvatureByPoint", self.MeasuOp)
11073             return aCurv
11074         ## @}
11075
11076         ## @name Surface Curvature Measurement
11077         #  Methods for receiving max and min radius of curvature of surfaces
11078         #  in the given point
11079         ## @{
11080
11081         ## Measure max radius of curvature of surface.
11082         #  @param theSurf the given surface.
11083         #  @param theUParam Value of U-parameter on the referenced surface.
11084         #  @param theVParam Value of V-parameter on the referenced surface.
11085         #  @return max radius of curvature of theSurf.
11086         #
11087         ## @ref swig_todo "Example"
11088         @ManageTransactions("MeasuOp")
11089         def MaxSurfaceCurvatureByParam(self, theSurf, theUParam, theVParam):
11090             """
11091             Measure max radius of curvature of surface.
11092
11093             Parameters:
11094                 theSurf the given surface.
11095                 theUParam Value of U-parameter on the referenced surface.
11096                 theVParam Value of V-parameter on the referenced surface.
11097
11098             Returns:
11099                 max radius of curvature of theSurf.
11100             """
11101             # Example: see GEOM_TestMeasures.py
11102             aSurf = self.MeasuOp.MaxSurfaceCurvatureByParam(theSurf,theUParam,theVParam)
11103             RaiseIfFailed("MaxSurfaceCurvatureByParam", self.MeasuOp)
11104             return aSurf
11105
11106         ## Measure max radius of curvature of surface in the given point
11107         #  @param theSurf the given surface.
11108         #  @param thePoint given point.
11109         #  @return max radius of curvature of theSurf.
11110         #
11111         ## @ref swig_todo "Example"
11112         @ManageTransactions("MeasuOp")
11113         def MaxSurfaceCurvatureByPoint(self, theSurf, thePoint):
11114             """
11115             Measure max radius of curvature of surface in the given point.
11116
11117             Parameters:
11118                 theSurf the given surface.
11119                 thePoint given point.
11120
11121             Returns:
11122                 max radius of curvature of theSurf.
11123             """
11124             aSurf = self.MeasuOp.MaxSurfaceCurvatureByPoint(theSurf,thePoint)
11125             RaiseIfFailed("MaxSurfaceCurvatureByPoint", self.MeasuOp)
11126             return aSurf
11127
11128         ## Measure min radius of curvature of surface.
11129         #  @param theSurf the given surface.
11130         #  @param theUParam Value of U-parameter on the referenced surface.
11131         #  @param theVParam Value of V-parameter on the referenced surface.
11132         #  @return min radius of curvature of theSurf.
11133         #
11134         ## @ref swig_todo "Example"
11135         @ManageTransactions("MeasuOp")
11136         def MinSurfaceCurvatureByParam(self, theSurf, theUParam, theVParam):
11137             """
11138             Measure min radius of curvature of surface.
11139
11140             Parameters:
11141                 theSurf the given surface.
11142                 theUParam Value of U-parameter on the referenced surface.
11143                 theVParam Value of V-parameter on the referenced surface.
11144
11145             Returns:
11146                 Min radius of curvature of theSurf.
11147             """
11148             aSurf = self.MeasuOp.MinSurfaceCurvatureByParam(theSurf,theUParam,theVParam)
11149             RaiseIfFailed("MinSurfaceCurvatureByParam", self.MeasuOp)
11150             return aSurf
11151
11152         ## Measure min radius of curvature of surface in the given point
11153         #  @param theSurf the given surface.
11154         #  @param thePoint given point.
11155         #  @return min radius of curvature of theSurf.
11156         #
11157         ## @ref swig_todo "Example"
11158         @ManageTransactions("MeasuOp")
11159         def MinSurfaceCurvatureByPoint(self, theSurf, thePoint):
11160             """
11161             Measure min radius of curvature of surface in the given point.
11162
11163             Parameters:
11164                 theSurf the given surface.
11165                 thePoint given point.
11166
11167             Returns:
11168                 Min radius of curvature of theSurf.
11169             """
11170             aSurf = self.MeasuOp.MinSurfaceCurvatureByPoint(theSurf,thePoint)
11171             RaiseIfFailed("MinSurfaceCurvatureByPoint", self.MeasuOp)
11172             return aSurf
11173         ## @}
11174
11175         ## Get min and max tolerances of sub-shapes of theShape
11176         #  @param theShape Shape, to get tolerances of.
11177         #  @return [FaceMin,FaceMax, EdgeMin,EdgeMax, VertMin,VertMax]\n
11178         #  FaceMin,FaceMax: Min and max tolerances of the faces.\n
11179         #  EdgeMin,EdgeMax: Min and max tolerances of the edges.\n
11180         #  VertMin,VertMax: Min and max tolerances of the vertices.
11181         #
11182         #  @ref tui_tolerance_page "Example"
11183         @ManageTransactions("MeasuOp")
11184         def Tolerance(self,theShape):
11185             """
11186             Get min and max tolerances of sub-shapes of theShape
11187
11188             Parameters:
11189                 theShape Shape, to get tolerances of.
11190
11191             Returns:
11192                 [FaceMin,FaceMax, EdgeMin,EdgeMax, VertMin,VertMax]
11193                  FaceMin,FaceMax: Min and max tolerances of the faces.
11194                  EdgeMin,EdgeMax: Min and max tolerances of the edges.
11195                  VertMin,VertMax: Min and max tolerances of the vertices.
11196             """
11197             # Example: see GEOM_TestMeasures.py
11198             aTuple = self.MeasuOp.GetTolerance(theShape)
11199             RaiseIfFailed("GetTolerance", self.MeasuOp)
11200             return aTuple
11201
11202         ## Obtain description of the given shape (number of sub-shapes of each type)
11203         #  @param theShape Shape to be described.
11204         #  @return Description of the given shape.
11205         #
11206         #  @ref tui_whatis_page "Example"
11207         @ManageTransactions("MeasuOp")
11208         def WhatIs(self,theShape):
11209             """
11210             Obtain description of the given shape (number of sub-shapes of each type)
11211
11212             Parameters:
11213                 theShape Shape to be described.
11214
11215             Returns:
11216                 Description of the given shape.
11217             """
11218             # Example: see GEOM_TestMeasures.py
11219             aDescr = self.MeasuOp.WhatIs(theShape)
11220             RaiseIfFailed("WhatIs", self.MeasuOp)
11221             return aDescr
11222
11223         ## Obtain quantity of shapes of the given type in \a theShape.
11224         #  If \a theShape is of type \a theType, it is also counted.
11225         #  @param theShape Shape to be described.
11226         #  @param theType the given ShapeType().
11227         #  @return Quantity of shapes of type \a theType in \a theShape.
11228         #
11229         #  @ref tui_measurement_tools_page "Example"
11230         def NbShapes (self, theShape, theType):
11231             """
11232             Obtain quantity of shapes of the given type in theShape.
11233             If theShape is of type theType, it is also counted.
11234
11235             Parameters:
11236                 theShape Shape to be described.
11237                 theType the given geompy.ShapeType
11238
11239             Returns:
11240                 Quantity of shapes of type theType in theShape.
11241             """
11242             # Example: see GEOM_TestMeasures.py
11243             listSh = self.SubShapeAllIDs(theShape, theType)
11244             Nb = len(listSh)
11245             return Nb
11246
11247         ## Obtain quantity of shapes of each type in \a theShape.
11248         #  The \a theShape is also counted.
11249         #  @param theShape Shape to be described.
11250         #  @return Dictionary of ShapeType() with bound quantities of shapes.
11251         #
11252         #  @ref tui_measurement_tools_page "Example"
11253         def ShapeInfo (self, theShape):
11254             """
11255             Obtain quantity of shapes of each type in theShape.
11256             The theShape is also counted.
11257
11258             Parameters:
11259                 theShape Shape to be described.
11260
11261             Returns:
11262                 Dictionary of geompy.ShapeType with bound quantities of shapes.
11263             """
11264             # Example: see GEOM_TestMeasures.py
11265             aDict = {}
11266             for typeSh in self.ShapeType:
11267                 if typeSh in ( "AUTO", "SHAPE" ): continue
11268                 listSh = self.SubShapeAllIDs(theShape, self.ShapeType[typeSh])
11269                 Nb = len(listSh)
11270                 aDict[typeSh] = Nb
11271                 pass
11272             return aDict
11273
11274         def GetCreationInformation(self, theShape):
11275             res = ''
11276             infos = theShape.GetCreationInformation()
11277             for info in infos:
11278                 # operationName
11279                 opName = info.operationName
11280                 if not opName: opName = "no info available"
11281                 if res: res += "\n"
11282                 res += "Operation: " + opName
11283                 # parameters
11284                 for parVal in info.params:
11285                     res += "\n \t%s = %s" % ( parVal.name, parVal.value )
11286             return res
11287
11288         ## Get a point, situated at the centre of mass of theShape.
11289         #  @param theShape Shape to define centre of mass of.
11290         #  @param theName Object name; when specified, this parameter is used
11291         #         for result publication in the study. Otherwise, if automatic
11292         #         publication is switched on, default value is used for result name.
11293         #
11294         #  @return New GEOM.GEOM_Object, containing the created point.
11295         #
11296         #  @ref tui_center_of_mass_page "Example"
11297         @ManageTransactions("MeasuOp")
11298         def MakeCDG(self, theShape, theName=None):
11299             """
11300             Get a point, situated at the centre of mass of theShape.
11301
11302             Parameters:
11303                 theShape Shape to define centre of mass of.
11304                 theName Object name; when specified, this parameter is used
11305                         for result publication in the study. Otherwise, if automatic
11306                         publication is switched on, default value is used for result name.
11307
11308             Returns:
11309                 New GEOM.GEOM_Object, containing the created point.
11310             """
11311             # Example: see GEOM_TestMeasures.py
11312             anObj = self.MeasuOp.GetCentreOfMass(theShape)
11313             RaiseIfFailed("GetCentreOfMass", self.MeasuOp)
11314             self._autoPublish(anObj, theName, "centerOfMass")
11315             return anObj
11316
11317         ## Get a vertex sub-shape by index.
11318         #  @param theShape Shape to find sub-shape.
11319         #  @param theIndex Index to find vertex by this index (starting from zero)
11320         #  @param theUseOri To consider edge/wire orientation or not
11321         #  @param theName Object name; when specified, this parameter is used
11322         #         for result publication in the study. Otherwise, if automatic
11323         #         publication is switched on, default value is used for result name.
11324         #
11325         #  @return New GEOM.GEOM_Object, containing the created vertex.
11326         #
11327         #  @ref tui_measurement_tools_page "Example"
11328         @ManageTransactions("MeasuOp")
11329         def GetVertexByIndex(self, theShape, theIndex, theUseOri=True, theName=None):
11330             """
11331             Get a vertex sub-shape by index.
11332
11333             Parameters:
11334                 theShape Shape to find sub-shape.
11335                 theIndex Index to find vertex by this index (starting from zero)
11336                 theUseOri To consider edge/wire orientation or not
11337                 theName Object name; when specified, this parameter is used
11338                         for result publication in the study. Otherwise, if automatic
11339                         publication is switched on, default value is used for result name.
11340
11341             Returns:
11342                 New GEOM.GEOM_Object, containing the created vertex.
11343             """
11344             # Example: see GEOM_TestMeasures.py
11345             if isinstance( theUseOri, str ): # theUseOri was inserted before theName
11346                 theUseOri, theName = True, theUseOri
11347             anObj = self.MeasuOp.GetVertexByIndex(theShape, theIndex, theUseOri)
11348             RaiseIfFailed("GetVertexByIndex", self.MeasuOp)
11349             self._autoPublish(anObj, theName, "vertex")
11350             return anObj
11351
11352         ## Get the first vertex of wire/edge depended orientation.
11353         #  @param theShape Shape to find first vertex.
11354         #  @param theName Object name; when specified, this parameter is used
11355         #         for result publication in the study. Otherwise, if automatic
11356         #         publication is switched on, default value is used for result name.
11357         #
11358         #  @return New GEOM.GEOM_Object, containing the created vertex.
11359         #
11360         #  @ref tui_measurement_tools_page "Example"
11361         def GetFirstVertex(self, theShape, theName=None):
11362             """
11363             Get the first vertex of wire/edge depended orientation.
11364
11365             Parameters:
11366                 theShape Shape to find first vertex.
11367                 theName Object name; when specified, this parameter is used
11368                         for result publication in the study. Otherwise, if automatic
11369                         publication is switched on, default value is used for result name.
11370
11371             Returns:
11372                 New GEOM.GEOM_Object, containing the created vertex.
11373             """
11374             # Example: see GEOM_TestMeasures.py
11375             # note: auto-publishing is done in self.GetVertexByIndex()
11376             return self.GetVertexByIndex(theShape, 0, True, theName)
11377
11378         ## Get the last vertex of wire/edge depended orientation.
11379         #  @param theShape Shape to find last vertex.
11380         #  @param theName Object name; when specified, this parameter is used
11381         #         for result publication in the study. Otherwise, if automatic
11382         #         publication is switched on, default value is used for result name.
11383         #
11384         #  @return New GEOM.GEOM_Object, containing the created vertex.
11385         #
11386         #  @ref tui_measurement_tools_page "Example"
11387         def GetLastVertex(self, theShape, theName=None):
11388             """
11389             Get the last vertex of wire/edge depended orientation.
11390
11391             Parameters:
11392                 theShape Shape to find last vertex.
11393                 theName Object name; when specified, this parameter is used
11394                         for result publication in the study. Otherwise, if automatic
11395                         publication is switched on, default value is used for result name.
11396
11397             Returns:
11398                 New GEOM.GEOM_Object, containing the created vertex.
11399             """
11400             # Example: see GEOM_TestMeasures.py
11401             nb_vert =  self.NumberOfSubShapes(theShape, self.ShapeType["VERTEX"])
11402             # note: auto-publishing is done in self.GetVertexByIndex()
11403             return self.GetVertexByIndex(theShape, (nb_vert-1), True, theName)
11404
11405         ## Get a normale to the given face. If the point is not given,
11406         #  the normale is calculated at the center of mass.
11407         #  @param theFace Face to define normale of.
11408         #  @param theOptionalPoint Point to compute the normale at.
11409         #  @param theName Object name; when specified, this parameter is used
11410         #         for result publication in the study. Otherwise, if automatic
11411         #         publication is switched on, default value is used for result name.
11412         #
11413         #  @return New GEOM.GEOM_Object, containing the created vector.
11414         #
11415         #  @ref swig_todo "Example"
11416         @ManageTransactions("MeasuOp")
11417         def GetNormal(self, theFace, theOptionalPoint = None, theName=None):
11418             """
11419             Get a normale to the given face. If the point is not given,
11420             the normale is calculated at the center of mass.
11421
11422             Parameters:
11423                 theFace Face to define normale of.
11424                 theOptionalPoint Point to compute the normale at.
11425                 theName Object name; when specified, this parameter is used
11426                         for result publication in the study. Otherwise, if automatic
11427                         publication is switched on, default value is used for result name.
11428
11429             Returns:
11430                 New GEOM.GEOM_Object, containing the created vector.
11431             """
11432             # Example: see GEOM_TestMeasures.py
11433             anObj = self.MeasuOp.GetNormal(theFace, theOptionalPoint)
11434             RaiseIfFailed("GetNormal", self.MeasuOp)
11435             self._autoPublish(anObj, theName, "normal")
11436             return anObj
11437
11438         ## Print shape errors obtained from CheckShape.
11439         #  @param theShape Shape that was checked.
11440         #  @param theShapeErrors the shape errors obtained by CheckShape.
11441         #  @param theReturnStatus If 0 the description of problem is printed.
11442         #                         If 1 the description of problem is returned.
11443         #  @return If theReturnStatus is equal to 1 the description is returned.
11444         #          Otherwise doesn't return anything.
11445         #
11446         #  @ref tui_check_shape_page "Example"
11447         @ManageTransactions("MeasuOp")
11448         def PrintShapeErrors(self, theShape, theShapeErrors, theReturnStatus = 0):
11449             """
11450             Print shape errors obtained from CheckShape.
11451
11452             Parameters:
11453                 theShape Shape that was checked.
11454                 theShapeErrors the shape errors obtained by CheckShape.
11455                 theReturnStatus If 0 the description of problem is printed.
11456                                 If 1 the description of problem is returned.
11457
11458             Returns:
11459                 If theReturnStatus is equal to 1 the description is returned.
11460                   Otherwise doesn't return anything.
11461             """
11462             # Example: see GEOM_TestMeasures.py
11463             Descr = self.MeasuOp.PrintShapeErrors(theShape, theShapeErrors)
11464             if theReturnStatus == 1:
11465                 return Descr
11466             print(Descr)
11467             pass
11468
11469         ## Check a topology of the given shape.
11470         #  @param theShape Shape to check validity of.
11471         #  @param theIsCheckGeom If FALSE, only the shape's topology will be checked, \n
11472         #                        if TRUE, the shape's geometry will be checked also.
11473         #  @param theReturnStatus If 0 and if theShape is invalid, a description
11474         #                         of problem is printed.
11475         #                         If 1 isValid flag and the description of
11476         #                         problem is returned.
11477         #                         If 2 isValid flag and the list of error data
11478         #                         is returned.
11479         #  @return TRUE, if the shape "seems to be valid".
11480         #          If theShape is invalid, prints a description of problem.
11481         #          If theReturnStatus is equal to 1 the description is returned
11482         #          along with IsValid flag.
11483         #          If theReturnStatus is equal to 2 the list of error data is
11484         #          returned along with IsValid flag.
11485         #
11486         #  @ref tui_check_shape_page "Example"
11487         @ManageTransactions("MeasuOp")
11488         def CheckShape(self,theShape, theIsCheckGeom = 0, theReturnStatus = 0):
11489             """
11490             Check a topology of the given shape.
11491
11492             Parameters:
11493                 theShape Shape to check validity of.
11494                 theIsCheckGeom If FALSE, only the shape's topology will be checked,
11495                                if TRUE, the shape's geometry will be checked also.
11496                 theReturnStatus If 0 and if theShape is invalid, a description
11497                                 of problem is printed.
11498                                 If 1 IsValid flag and the description of
11499                                 problem is returned.
11500                                 If 2 IsValid flag and the list of error data
11501                                 is returned.
11502
11503             Returns:
11504                 TRUE, if the shape "seems to be valid".
11505                 If theShape is invalid, prints a description of problem.
11506                 If theReturnStatus is equal to 1 the description is returned
11507                 along with IsValid flag.
11508                 If theReturnStatus is equal to 2 the list of error data is
11509                 returned along with IsValid flag.
11510             """
11511             # Example: see GEOM_TestMeasures.py
11512             if theIsCheckGeom:
11513                 (IsValid, ShapeErrors) = self.MeasuOp.CheckShapeWithGeometry(theShape)
11514                 RaiseIfFailed("CheckShapeWithGeometry", self.MeasuOp)
11515             else:
11516                 (IsValid, ShapeErrors) = self.MeasuOp.CheckShape(theShape)
11517                 RaiseIfFailed("CheckShape", self.MeasuOp)
11518             if IsValid == 0:
11519                 if theReturnStatus == 0:
11520                     Descr = self.MeasuOp.PrintShapeErrors(theShape, ShapeErrors)
11521                     print(Descr)
11522             if theReturnStatus == 1:
11523               Descr = self.MeasuOp.PrintShapeErrors(theShape, ShapeErrors)
11524               return (IsValid, Descr)
11525             elif theReturnStatus == 2:
11526               return (IsValid, ShapeErrors)
11527             return IsValid
11528
11529         ## Detect self-intersections in the given shape.
11530         #  @param theShape Shape to check.
11531         #  @param theCheckLevel is the level of self-intersection check.
11532         #         Possible input values are:
11533         #         - GEOM.SI_V_V(0) - only V/V interferences
11534         #         - GEOM.SI_V_E(1) - V/V and V/E interferences
11535         #         - GEOM.SI_E_E(2) - V/V, V/E and E/E interferences
11536         #         - GEOM.SI_V_F(3) - V/V, V/E, E/E and V/F interferences
11537         #         - GEOM.SI_E_F(4) - V/V, V/E, E/E, V/F and E/F interferences
11538         #         - GEOM.SI_ALL(5) - all interferences.
11539         #  @return TRUE, if the shape contains no self-intersections.
11540         #
11541         #  @ref tui_check_self_intersections_page "Example"
11542         @ManageTransactions("MeasuOp")
11543         def CheckSelfIntersections(self, theShape, theCheckLevel = GEOM.SI_ALL):
11544             """
11545             Detect self-intersections in the given shape.
11546
11547             Parameters:
11548                 theShape Shape to check.
11549                 theCheckLevel is the level of self-intersection check.
11550                   Possible input values are:
11551                    - GEOM.SI_V_V(0) - only V/V interferences
11552                    - GEOM.SI_V_E(1) - V/V and V/E interferences
11553                    - GEOM.SI_E_E(2) - V/V, V/E and E/E interferences
11554                    - GEOM.SI_V_F(3) - V/V, V/E, E/E and V/F interferences
11555                    - GEOM.SI_E_F(4) - V/V, V/E, E/E, V/F and E/F interferences
11556                    - GEOM.SI_ALL(5) - all interferences.
11557  
11558             Returns:
11559                 TRUE, if the shape contains no self-intersections.
11560             """
11561             # Example: see GEOM_TestMeasures.py
11562             (IsValid, Pairs) = self.MeasuOp.CheckSelfIntersections(theShape, EnumToLong(theCheckLevel))
11563             RaiseIfFailed("CheckSelfIntersections", self.MeasuOp)
11564             return IsValid
11565
11566         ## Detect self-intersections of the given shape with algorithm based on mesh intersections.
11567         #  @param theShape Shape to check.
11568         #  @param theDeflection Linear deflection coefficient that specifies quality of tessellation:
11569         #         - if \a theDeflection <= 0, default deflection 0.001 is used
11570         #  @param theTolerance Specifies a distance between sub-shapes used for detecting gaps:
11571         #         - if \a theTolerance <= 0, algorithm detects intersections (default behavior)
11572         #         - if \a theTolerance > 0, algorithm detects gaps
11573         #  @return TRUE, if the shape contains no self-intersections.
11574         #
11575         #  @ref tui_check_self_intersections_fast_page "Example"
11576         @ManageTransactions("MeasuOp")
11577         def CheckSelfIntersectionsFast(self, theShape, theDeflection = 0.001, theTolerance = 0.0):
11578             """
11579             Detect self-intersections of the given shape with algorithm based on mesh intersections.
11580
11581             Parameters:
11582                 theShape Shape to check.
11583                 theDeflection Linear deflection coefficient that specifies quality of tessellation:
11584                     - if theDeflection <= 0, default deflection 0.001 is used
11585                 theTolerance Specifies a distance between shapes used for detecting gaps:
11586                     - if theTolerance <= 0, algorithm detects intersections (default behavior)
11587                     - if theTolerance > 0, algorithm detects gaps
11588  
11589             Returns:
11590                 TRUE, if the shape contains no self-intersections.
11591             """
11592             # Example: see GEOM_TestMeasures.py
11593             (IsValid, Pairs) = self.MeasuOp.CheckSelfIntersectionsFast(theShape, theDeflection, theTolerance)
11594             RaiseIfFailed("CheckSelfIntersectionsFast", self.MeasuOp)
11595             return IsValid
11596
11597         ## Check boolean and partition operations arguments.
11598         #  @param theShape the argument of an operation to be checked
11599         #  @return TRUE if the argument is valid for a boolean or partition
11600         #          operation; FALSE otherwise.
11601         @ManageTransactions("MeasuOp")
11602         def CheckBOPArguments(self, theShape):
11603             """
11604             Check boolean and partition operations arguments.
11605
11606             Parameters:
11607                 theShape the argument of an operation to be checked
11608
11609             Returns:
11610                 TRUE if the argument is valid for a boolean or partition
11611                 operation; FALSE otherwise.
11612             """
11613             return self.MeasuOp.CheckBOPArguments(theShape)
11614
11615         ## Detect intersections of the given shapes with algorithm based on mesh intersections.
11616         #  @param theShape1 First source object
11617         #  @param theShape2 Second source object
11618         #  @param theTolerance Specifies a distance between shapes used for detecting gaps:
11619         #         - if \a theTolerance <= 0, algorithm detects intersections (default behavior)
11620         #         - if \a theTolerance > 0, algorithm detects gaps
11621         #  @param theDeflection Linear deflection coefficient that specifies quality of tessellation:
11622         #         - if \a theDeflection <= 0, default deflection 0.001 is used
11623         #  @return TRUE, if there are intersections (gaps) between source shapes
11624         #  @return List of sub-shapes IDs from 1st shape that localize intersection.
11625         #  @return List of sub-shapes IDs from 2nd shape that localize intersection.
11626         #
11627         #  @ref tui_fast_intersection_page "Example"
11628         @ManageTransactions("MeasuOp")
11629         def FastIntersect(self, theShape1, theShape2, theTolerance = 0.0, theDeflection = 0.001):
11630             """
11631             Detect intersections of the given shapes with algorithm based on mesh intersections.
11632
11633             Parameters:
11634                 theShape1 First source object
11635                 theShape2 Second source object
11636                 theTolerance Specifies a distance between shapes used for detecting gaps:
11637                     - if theTolerance <= 0, algorithm detects intersections (default behavior)
11638                     - if theTolerance > 0, algorithm detects gaps
11639                 theDeflection Linear deflection coefficient that specifies quality of tessellation:
11640                     - if theDeflection <= 0, default deflection 0.001 is used
11641  
11642             Returns:
11643                 TRUE, if there are intersections (gaps) between source shapes
11644                 List of sub-shapes IDs from 1st shape that localize intersection.
11645                 List of sub-shapes IDs from 2nd shape that localize intersection.
11646             """
11647             # Example: see GEOM_TestMeasures.py
11648             IsOk, Res1, Res2 = self.MeasuOp.FastIntersect(theShape1, theShape2, theTolerance, theDeflection)
11649             RaiseIfFailed("FastIntersect", self.MeasuOp)
11650             return IsOk, Res1, Res2
11651
11652         ## Get position (LCS) of theShape.
11653         #
11654         #  Origin of the LCS is situated at the shape's center of mass.
11655         #  Axes of the LCS are obtained from shape's location or,
11656         #  if the shape is a planar face, from position of its plane.
11657         #
11658         #  @param theShape Shape to calculate position of.
11659         #  @return [Ox,Oy,Oz, Zx,Zy,Zz, Xx,Xy,Xz].
11660         #          Ox,Oy,Oz: Coordinates of shape's LCS origin.
11661         #          Zx,Zy,Zz: Coordinates of shape's LCS normal(main) direction.
11662         #          Xx,Xy,Xz: Coordinates of shape's LCS X direction.
11663         #
11664         #  @ref swig_todo "Example"
11665         @ManageTransactions("MeasuOp")
11666         def GetPosition(self,theShape):
11667             """
11668             Get position (LCS) of theShape.
11669             Origin of the LCS is situated at the shape's center of mass.
11670             Axes of the LCS are obtained from shape's location or,
11671             if the shape is a planar face, from position of its plane.
11672
11673             Parameters:
11674                 theShape Shape to calculate position of.
11675
11676             Returns:
11677                 [Ox,Oy,Oz, Zx,Zy,Zz, Xx,Xy,Xz].
11678                  Ox,Oy,Oz: Coordinates of shape's LCS origin.
11679                  Zx,Zy,Zz: Coordinates of shape's LCS normal(main) direction.
11680                  Xx,Xy,Xz: Coordinates of shape's LCS X direction.
11681             """
11682             # Example: see GEOM_TestMeasures.py
11683             aTuple = self.MeasuOp.GetPosition(theShape)
11684             RaiseIfFailed("GetPosition", self.MeasuOp)
11685             return aTuple
11686
11687         ## Get kind of theShape.
11688         #
11689         #  @param theShape Shape to get a kind of.
11690         #  @return Returns a kind of shape in terms of <VAR>GEOM.GEOM_IKindOfShape.shape_kind</VAR> enumeration
11691         #          and a list of parameters, describing the shape.
11692         #  @note  Concrete meaning of each value, returned via \a theIntegers
11693         #         or \a theDoubles list depends on the kind() of the shape.
11694         #
11695         #  @ref swig_todo "Example"
11696         @ManageTransactions("MeasuOp")
11697         def KindOfShape(self,theShape):
11698             """
11699             Get kind of theShape.
11700
11701             Parameters:
11702                 theShape Shape to get a kind of.
11703
11704             Returns:
11705                 a kind of shape in terms of GEOM_IKindOfShape.shape_kind enumeration
11706                     and a list of parameters, describing the shape.
11707             Note:
11708                 Concrete meaning of each value, returned via theIntegers
11709                 or theDoubles list depends on the geompy.kind of the shape
11710             """
11711             # Example: see GEOM_TestMeasures.py
11712             aRoughTuple = self.MeasuOp.KindOfShape(theShape)
11713             RaiseIfFailed("KindOfShape", self.MeasuOp)
11714
11715             aKind  = aRoughTuple[0]
11716             anInts = aRoughTuple[1]
11717             aDbls  = aRoughTuple[2]
11718
11719             # Now there is no exception from this rule:
11720             aKindTuple = [aKind] + aDbls + anInts
11721
11722             # If they are we will regroup parameters for such kind of shape.
11723             # For example:
11724             #if aKind == kind.SOME_KIND:
11725             #    #  SOME_KIND     int int double int double double
11726             #    aKindTuple = [aKind, anInts[0], anInts[1], aDbls[0], anInts[2], aDbls[1], aDbls[2]]
11727
11728             return aKindTuple
11729
11730         ## Returns the string that describes if the shell is good for solid.
11731         #  This is a support method for MakeSolid.
11732         #
11733         #  @param theShell the shell to be checked.
11734         #  @return Returns a string that describes the shell validity for
11735         #          solid construction.
11736         @ManageTransactions("MeasuOp")
11737         def _IsGoodForSolid(self, theShell):
11738             """
11739             Returns the string that describes if the shell is good for solid.
11740             This is a support method for MakeSolid.
11741
11742             Parameter:
11743                 theShell the shell to be checked.
11744
11745             Returns:
11746                 Returns a string that describes the shell validity for
11747                 solid construction.
11748             """
11749             aDescr = self.MeasuOp.IsGoodForSolid(theShell)
11750             return aDescr
11751
11752         # end of l2_measure
11753         ## @}
11754
11755         ## @addtogroup l2_import_export
11756         ## @{
11757
11758         ## Import a shape from the BREP, IGES, STEP or other file
11759         #  (depends on given format) with given name.
11760         #
11761         #  Note: this function is deprecated, it is kept for backward compatibility only
11762         #  Use Import<FormatName> instead, where <FormatName> is a name of desirable format to import.
11763         #
11764         #  @param theFileName The file, containing the shape.
11765         #  @param theFormatName Specify format for the file reading.
11766         #         Available formats can be obtained with InsertOp.ImportTranslators() method.
11767         #         If format 'IGES_SCALE' is used instead of 'IGES' or
11768         #            format 'STEP_SCALE' is used instead of 'STEP',
11769         #            length unit will be set to 'meter' and result model will be scaled.
11770         #  @param theName Object name; when specified, this parameter is used
11771         #         for result publication in the study. Otherwise, if automatic
11772         #         publication is switched on, default value is used for result name.
11773         #
11774         #  @return New GEOM.GEOM_Object, containing the imported shape.
11775         #          If material names are imported it returns the list of
11776         #          objects. The first one is the imported object followed by
11777         #          material groups.
11778         #  @note Auto publishing is allowed for the shape itself. Imported
11779         #        material groups are not automatically published.
11780         #
11781         #  @ref swig_Import_Export "Example"
11782         @ManageTransactions("InsertOp")
11783         def ImportFile(self, theFileName, theFormatName, theName=None):
11784             """
11785             Import a shape from the BREP, IGES, STEP or other file
11786             (depends on given format) with given name.
11787
11788             Note: this function is deprecated, it is kept for backward compatibility only
11789             Use Import<FormatName> instead, where <FormatName> is a name of desirable format to import.
11790
11791             Parameters: 
11792                 theFileName The file, containing the shape.
11793                 theFormatName Specify format for the file reading.
11794                     Available formats can be obtained with geompy.InsertOp.ImportTranslators() method.
11795                     If format 'IGES_SCALE' is used instead of 'IGES' or
11796                        format 'STEP_SCALE' is used instead of 'STEP',
11797                        length unit will be set to 'meter' and result model will be scaled.
11798                 theName Object name; when specified, this parameter is used
11799                         for result publication in the study. Otherwise, if automatic
11800                         publication is switched on, default value is used for result name.
11801
11802             Returns:
11803                 New GEOM.GEOM_Object, containing the imported shape.
11804                 If material names are imported it returns the list of
11805                 objects. The first one is the imported object followed by
11806                 material groups.
11807             Note:
11808                 Auto publishing is allowed for the shape itself. Imported
11809                 material groups are not automatically published.
11810             """
11811             # Example: see GEOM_TestOthers.py
11812             print("""
11813             WARNING: Function ImportFile is deprecated, use Import<FormatName> instead,
11814             where <FormatName> is a name of desirable format for importing.
11815             """)
11816             aListObj = self.InsertOp.ImportFile(theFileName, theFormatName)
11817             RaiseIfFailed("ImportFile", self.InsertOp)
11818             aNbObj = len(aListObj)
11819             if aNbObj > 0:
11820                 self._autoPublish(aListObj[0], theName, "imported")
11821             if aNbObj == 1:
11822                 return aListObj[0]
11823             return aListObj
11824
11825         ## Deprecated analog of ImportFile()
11826         def Import(self, theFileName, theFormatName, theName=None):
11827             """
11828             Deprecated analog of geompy.ImportFile, kept for backward compatibility only.
11829             """
11830             # note: auto-publishing is done in self.ImportFile()
11831             return self.ImportFile(theFileName, theFormatName, theName)
11832
11833         ## Read a shape from the binary stream, containing its bounding representation (BRep).
11834         #
11835         #  @note As the byte-stream representing the shape data can be quite large, this method
11836         #  is not automatically dumped to the Python script with the DumpStudy functionality;
11837         #  so please use this method carefully, only for strong reasons.
11838         #  
11839         #  @note GEOM.GEOM_Object.GetShapeStream() method can be used to obtain the shape's
11840         #  data stream.
11841         #
11842         #  @param theStream The BRep binary stream.
11843         #  @param theName Object name; when specified, this parameter is used
11844         #         for result publication in the study. Otherwise, if automatic
11845         #         publication is switched on, default value is used for result name.
11846         #
11847         #  @return New GEOM_Object, containing the shape, read from theStream.
11848         #
11849         #  @ref swig_Import_Export "Example"
11850         @ManageTransactions("InsertOp")
11851         def RestoreShape (self, theStream, theName=None):
11852             """
11853             Read a shape from the binary stream, containing its bounding representation (BRep).
11854
11855             Note:
11856                 shape.GetShapeStream() method can be used to obtain the shape's BRep stream.
11857
11858             Parameters:
11859                 theStream The BRep binary stream.
11860                 theName Object name; when specified, this parameter is used
11861                         for result publication in the study. Otherwise, if automatic
11862                         publication is switched on, default value is used for result name.
11863
11864             Returns:
11865                 New GEOM_Object, containing the shape, read from theStream.
11866             """
11867             # Example: see GEOM_TestOthers.py
11868             if not theStream:
11869                 # this is the workaround to ignore invalid case when data stream is empty
11870                 if int(os.getenv("GEOM_IGNORE_RESTORE_SHAPE", "0")) > 0:
11871                     print("WARNING: Result of RestoreShape is a NULL shape!")
11872                     return None
11873             anObj = self.InsertOp.RestoreShape(theStream)
11874             RaiseIfFailed("RestoreShape", self.InsertOp)
11875             self._autoPublish(anObj, theName, "restored")
11876             return anObj
11877
11878         ## Export the given shape into a file with given name.
11879         #
11880         #  Note: this function is deprecated, it is kept for backward compatibility only
11881         #  Use Export<FormatName> instead, where <FormatName> is a name of desirable format to export.
11882         #
11883         #  @param theObject Shape to be stored in the file.
11884         #  @param theFileName Name of the file to store the given shape in.
11885         #  @param theFormatName Specify format for the shape storage.
11886         #         Available formats can be obtained with
11887         #         geompy.InsertOp.ExportTranslators()[0] method.
11888         #
11889         #  @ref swig_Import_Export "Example"
11890         @ManageTransactions("InsertOp")
11891         def Export(self, theObject, theFileName, theFormatName):
11892             """
11893             Export the given shape into a file with given name.
11894
11895             Note: this function is deprecated, it is kept for backward compatibility only
11896             Use Export<FormatName> instead, where <FormatName> is a name of desirable format to export.
11897             
11898             Parameters: 
11899                 theObject Shape to be stored in the file.
11900                 theFileName Name of the file to store the given shape in.
11901                 theFormatName Specify format for the shape storage.
11902                               Available formats can be obtained with
11903                               geompy.InsertOp.ExportTranslators()[0] method.
11904             """
11905             # Example: see GEOM_TestOthers.py
11906             print("""
11907             WARNING: Function Export is deprecated, use Export<FormatName> instead,
11908             where <FormatName> is a name of desirable format for exporting.
11909             """)
11910             self.InsertOp.Export(theObject, theFileName, theFormatName)
11911             if self.InsertOp.IsDone() == 0:
11912                 raise RuntimeError("Export : " + self.InsertOp.GetErrorCode())
11913                 pass
11914             pass
11915
11916         # end of l2_import_export
11917         ## @}
11918
11919         ## @addtogroup l3_blocks
11920         ## @{
11921
11922         ## Create a quadrangle face from four edges. Order of Edges is not
11923         #  important. It is not necessary that edges share the same vertex.
11924         #  @param E1,E2,E3,E4 Edges for the face bound.
11925         #  @param theName Object name; when specified, this parameter is used
11926         #         for result publication in the study. Otherwise, if automatic
11927         #         publication is switched on, default value is used for result name.
11928         #
11929         #  @return New GEOM.GEOM_Object, containing the created face.
11930         #
11931         #  @ref tui_building_by_blocks_page "Example"
11932         @ManageTransactions("BlocksOp")
11933         def MakeQuad(self, E1, E2, E3, E4, theName=None):
11934             """
11935             Create a quadrangle face from four edges. Order of Edges is not
11936             important. It is not necessary that edges share the same vertex.
11937
11938             Parameters:
11939                 E1,E2,E3,E4 Edges for the face bound.
11940                 theName Object name; when specified, this parameter is used
11941                         for result publication in the study. Otherwise, if automatic
11942                         publication is switched on, default value is used for result name.
11943
11944             Returns:
11945                 New GEOM.GEOM_Object, containing the created face.
11946
11947             Example of usage:
11948                 qface1 = geompy.MakeQuad(edge1, edge2, edge3, edge4)
11949             """
11950             # Example: see GEOM_Spanner.py
11951             anObj = self.BlocksOp.MakeQuad(E1, E2, E3, E4)
11952             RaiseIfFailed("MakeQuad", self.BlocksOp)
11953             self._autoPublish(anObj, theName, "quad")
11954             return anObj
11955
11956         ## Create a quadrangle face on two edges.
11957         #  The missing edges will be built by creating the shortest ones.
11958         #  @param E1,E2 Two opposite edges for the face.
11959         #  @param theName Object name; when specified, this parameter is used
11960         #         for result publication in the study. Otherwise, if automatic
11961         #         publication is switched on, default value is used for result name.
11962         #
11963         #  @return New GEOM.GEOM_Object, containing the created face.
11964         #
11965         #  @ref tui_building_by_blocks_page "Example"
11966         @ManageTransactions("BlocksOp")
11967         def MakeQuad2Edges(self, E1, E2, theName=None):
11968             """
11969             Create a quadrangle face on two edges.
11970             The missing edges will be built by creating the shortest ones.
11971
11972             Parameters:
11973                 E1,E2 Two opposite edges for the face.
11974                 theName Object name; when specified, this parameter is used
11975                         for result publication in the study. Otherwise, if automatic
11976                         publication is switched on, default value is used for result name.
11977
11978             Returns:
11979                 New GEOM.GEOM_Object, containing the created face.
11980
11981             Example of usage:
11982                 # create vertices
11983                 p1 = geompy.MakeVertex(  0.,   0.,   0.)
11984                 p2 = geompy.MakeVertex(150.,  30.,   0.)
11985                 p3 = geompy.MakeVertex(  0., 120.,  50.)
11986                 p4 = geompy.MakeVertex(  0.,  40.,  70.)
11987                 # create edges
11988                 edge1 = geompy.MakeEdge(p1, p2)
11989                 edge2 = geompy.MakeEdge(p3, p4)
11990                 # create a quadrangle face from two edges
11991                 qface2 = geompy.MakeQuad2Edges(edge1, edge2)
11992             """
11993             # Example: see GEOM_Spanner.py
11994             anObj = self.BlocksOp.MakeQuad2Edges(E1, E2)
11995             RaiseIfFailed("MakeQuad2Edges", self.BlocksOp)
11996             self._autoPublish(anObj, theName, "quad")
11997             return anObj
11998
11999         ## Create a quadrangle face with specified corners.
12000         #  The missing edges will be built by creating the shortest ones.
12001         #  @param V1,V2,V3,V4 Corner vertices for the face.
12002         #  @param theName Object name; when specified, this parameter is used
12003         #         for result publication in the study. Otherwise, if automatic
12004         #         publication is switched on, default value is used for result name.
12005         #
12006         #  @return New GEOM.GEOM_Object, containing the created face.
12007         #
12008         #  @ref tui_building_by_blocks_page "Example 1"
12009         #  \n @ref swig_MakeQuad4Vertices "Example 2"
12010         @ManageTransactions("BlocksOp")
12011         def MakeQuad4Vertices(self, V1, V2, V3, V4, theName=None):
12012             """
12013             Create a quadrangle face with specified corners.
12014             The missing edges will be built by creating the shortest ones.
12015
12016             Parameters:
12017                 V1,V2,V3,V4 Corner vertices for the face.
12018                 theName Object name; when specified, this parameter is used
12019                         for result publication in the study. Otherwise, if automatic
12020                         publication is switched on, default value is used for result name.
12021
12022             Returns:
12023                 New GEOM.GEOM_Object, containing the created face.
12024
12025             Example of usage:
12026                 # create vertices
12027                 p1 = geompy.MakeVertex(  0.,   0.,   0.)
12028                 p2 = geompy.MakeVertex(150.,  30.,   0.)
12029                 p3 = geompy.MakeVertex(  0., 120.,  50.)
12030                 p4 = geompy.MakeVertex(  0.,  40.,  70.)
12031                 # create a quadrangle from four points in its corners
12032                 qface3 = geompy.MakeQuad4Vertices(p1, p2, p3, p4)
12033             """
12034             # Example: see GEOM_Spanner.py
12035             anObj = self.BlocksOp.MakeQuad4Vertices(V1, V2, V3, V4)
12036             RaiseIfFailed("MakeQuad4Vertices", self.BlocksOp)
12037             self._autoPublish(anObj, theName, "quad")
12038             return anObj
12039
12040         ## Create a hexahedral solid, bounded by the six given faces. Order of
12041         #  faces is not important. It is not necessary that Faces share the same edge.
12042         #  @param F1,F2,F3,F4,F5,F6 Faces for the hexahedral solid.
12043         #  @param theName Object name; when specified, this parameter is used
12044         #         for result publication in the study. Otherwise, if automatic
12045         #         publication is switched on, default value is used for result name.
12046         #
12047         #  @return New GEOM.GEOM_Object, containing the created solid.
12048         #
12049         #  @ref tui_building_by_blocks_page "Example 1"
12050         #  \n @ref swig_MakeHexa "Example 2"
12051         @ManageTransactions("BlocksOp")
12052         def MakeHexa(self, F1, F2, F3, F4, F5, F6, theName=None):
12053             """
12054             Create a hexahedral solid, bounded by the six given faces. Order of
12055             faces is not important. It is not necessary that Faces share the same edge.
12056
12057             Parameters:
12058                 F1,F2,F3,F4,F5,F6 Faces for the hexahedral solid.
12059                 theName Object name; when specified, this parameter is used
12060                         for result publication in the study. Otherwise, if automatic
12061                         publication is switched on, default value is used for result name.
12062
12063             Returns:
12064                 New GEOM.GEOM_Object, containing the created solid.
12065
12066             Example of usage:
12067                 solid = geompy.MakeHexa(qface1, qface2, qface3, qface4, qface5, qface6)
12068             """
12069             # Example: see GEOM_Spanner.py
12070             anObj = self.BlocksOp.MakeHexa(F1, F2, F3, F4, F5, F6)
12071             RaiseIfFailed("MakeHexa", self.BlocksOp)
12072             self._autoPublish(anObj, theName, "hexa")
12073             return anObj
12074
12075         ## Create a hexahedral solid between two given faces.
12076         #  The missing faces will be built by creating the smallest ones.
12077         #  @param F1,F2 Two opposite faces for the hexahedral solid.
12078         #  @param theName Object name; when specified, this parameter is used
12079         #         for result publication in the study. Otherwise, if automatic
12080         #         publication is switched on, default value is used for result name.
12081         #
12082         #  @return New GEOM.GEOM_Object, containing the created solid.
12083         #
12084         #  @ref tui_building_by_blocks_page "Example 1"
12085         #  \n @ref swig_MakeHexa2Faces "Example 2"
12086         @ManageTransactions("BlocksOp")
12087         def MakeHexa2Faces(self, F1, F2, theName=None):
12088             """
12089             Create a hexahedral solid between two given faces.
12090             The missing faces will be built by creating the smallest ones.
12091
12092             Parameters:
12093                 F1,F2 Two opposite faces for the hexahedral solid.
12094                 theName Object name; when specified, this parameter is used
12095                         for result publication in the study. Otherwise, if automatic
12096                         publication is switched on, default value is used for result name.
12097
12098             Returns:
12099                 New GEOM.GEOM_Object, containing the created solid.
12100
12101             Example of usage:
12102                 solid1 = geompy.MakeHexa2Faces(qface1, qface2)
12103             """
12104             # Example: see GEOM_Spanner.py
12105             anObj = self.BlocksOp.MakeHexa2Faces(F1, F2)
12106             RaiseIfFailed("MakeHexa2Faces", self.BlocksOp)
12107             self._autoPublish(anObj, theName, "hexa")
12108             return anObj
12109
12110         # end of l3_blocks
12111         ## @}
12112
12113         ## @addtogroup l3_blocks_op
12114         ## @{
12115
12116         ## Get a vertex, found in the given shape by its coordinates.
12117         #  @param theShape Block or a compound of blocks.
12118         #  @param theX,theY,theZ Coordinates of the sought vertex.
12119         #  @param theEpsilon Maximum allowed distance between the resulting
12120         #                    vertex and point with the given coordinates.
12121         #  @param theName Object name; when specified, this parameter is used
12122         #         for result publication in the study. Otherwise, if automatic
12123         #         publication is switched on, default value is used for result name.
12124         #
12125         #  @return New GEOM.GEOM_Object, containing the found vertex.
12126         #
12127         #  @ref swig_GetPoint "Example"
12128         @ManageTransactions("BlocksOp")
12129         def GetPoint(self, theShape, theX, theY, theZ, theEpsilon, theName=None):
12130             """
12131             Get a vertex, found in the given shape by its coordinates.
12132
12133             Parameters:
12134                 theShape Block or a compound of blocks.
12135                 theX,theY,theZ Coordinates of the sought vertex.
12136                 theEpsilon Maximum allowed distance between the resulting
12137                            vertex and point with the given coordinates.
12138                 theName Object name; when specified, this parameter is used
12139                         for result publication in the study. Otherwise, if automatic
12140                         publication is switched on, default value is used for result name.
12141
12142             Returns:
12143                 New GEOM.GEOM_Object, containing the found vertex.
12144
12145             Example of usage:
12146                 pnt = geompy.GetPoint(shape, -50,  50,  50, 0.01)
12147             """
12148             # Example: see GEOM_TestOthers.py
12149             anObj = self.BlocksOp.GetPoint(theShape, theX, theY, theZ, theEpsilon)
12150             RaiseIfFailed("GetPoint", self.BlocksOp)
12151             self._autoPublish(anObj, theName, "vertex")
12152             return anObj
12153
12154         ## Find a vertex of the given shape, which has minimal distance to the given point.
12155         #  @param theShape Any shape.
12156         #  @param thePoint Point, close to the desired vertex.
12157         #  @param theName Object name; when specified, this parameter is used
12158         #         for result publication in the study. Otherwise, if automatic
12159         #         publication is switched on, default value is used for result name.
12160         #
12161         #  @return New GEOM.GEOM_Object, containing the found vertex.
12162         #
12163         #  @ref swig_GetVertexNearPoint "Example"
12164         @ManageTransactions("BlocksOp")
12165         def GetVertexNearPoint(self, theShape, thePoint, theName=None):
12166             """
12167             Find a vertex of the given shape, which has minimal distance to the given point.
12168
12169             Parameters:
12170                 theShape Any shape.
12171                 thePoint Point, close to the desired vertex.
12172                 theName Object name; when specified, this parameter is used
12173                         for result publication in the study. Otherwise, if automatic
12174                         publication is switched on, default value is used for result name.
12175
12176             Returns:
12177                 New GEOM.GEOM_Object, containing the found vertex.
12178
12179             Example of usage:
12180                 pmidle = geompy.MakeVertex(50, 0, 50)
12181                 edge1 = geompy.GetEdgeNearPoint(blocksComp, pmidle)
12182             """
12183             # Example: see GEOM_TestOthers.py
12184             anObj = self.BlocksOp.GetVertexNearPoint(theShape, thePoint)
12185             RaiseIfFailed("GetVertexNearPoint", self.BlocksOp)
12186             self._autoPublish(anObj, theName, "vertex")
12187             return anObj
12188
12189         ## Get an edge, found in the given shape by two given vertices.
12190         #  @param theShape Block or a compound of blocks.
12191         #  @param thePoint1,thePoint2 Points, close to the ends of the desired edge.
12192         #  @param theName Object name; when specified, this parameter is used
12193         #         for result publication in the study. Otherwise, if automatic
12194         #         publication is switched on, default value is used for result name.
12195         #
12196         #  @return New GEOM.GEOM_Object, containing the found edge.
12197         #
12198         #  @ref swig_GetEdge "Example"
12199         @ManageTransactions("BlocksOp")
12200         def GetEdge(self, theShape, thePoint1, thePoint2, theName=None):
12201             """
12202             Get an edge, found in the given shape by two given vertices.
12203
12204             Parameters:
12205                 theShape Block or a compound of blocks.
12206                 thePoint1,thePoint2 Points, close to the ends of the desired edge.
12207                 theName Object name; when specified, this parameter is used
12208                         for result publication in the study. Otherwise, if automatic
12209                         publication is switched on, default value is used for result name.
12210
12211             Returns:
12212                 New GEOM.GEOM_Object, containing the found edge.
12213             """
12214             # Example: see GEOM_Spanner.py
12215             anObj = self.BlocksOp.GetEdge(theShape, thePoint1, thePoint2)
12216             RaiseIfFailed("GetEdge", self.BlocksOp)
12217             self._autoPublish(anObj, theName, "edge")
12218             return anObj
12219
12220         ## Find an edge of the given shape, which has minimal distance to the given point.
12221         #  @param theShape Block or a compound of blocks.
12222         #  @param thePoint Point, close to the desired edge.
12223         #  @param theName Object name; when specified, this parameter is used
12224         #         for result publication in the study. Otherwise, if automatic
12225         #         publication is switched on, default value is used for result name.
12226         #
12227         #  @return New GEOM.GEOM_Object, containing the found edge.
12228         #
12229         #  @ref swig_GetEdgeNearPoint "Example"
12230         @ManageTransactions("BlocksOp")
12231         def GetEdgeNearPoint(self, theShape, thePoint, theName=None):
12232             """
12233             Find an edge of the given shape, which has minimal distance to the given point.
12234
12235             Parameters:
12236                 theShape Block or a compound of blocks.
12237                 thePoint Point, close to the desired edge.
12238                 theName Object name; when specified, this parameter is used
12239                         for result publication in the study. Otherwise, if automatic
12240                         publication is switched on, default value is used for result name.
12241
12242             Returns:
12243                 New GEOM.GEOM_Object, containing the found edge.
12244             """
12245             # Example: see GEOM_TestOthers.py
12246             anObj = self.BlocksOp.GetEdgeNearPoint(theShape, thePoint)
12247             RaiseIfFailed("GetEdgeNearPoint", self.BlocksOp)
12248             self._autoPublish(anObj, theName, "edge")
12249             return anObj
12250
12251         ## Returns a face, found in the given shape by four given corner vertices.
12252         #  @param theShape Block or a compound of blocks.
12253         #  @param thePoint1,thePoint2,thePoint3,thePoint4 Points, close to the corners of the desired face.
12254         #  @param theName Object name; when specified, this parameter is used
12255         #         for result publication in the study. Otherwise, if automatic
12256         #         publication is switched on, default value is used for result name.
12257         #
12258         #  @return New GEOM.GEOM_Object, containing the found face.
12259         #
12260         #  @ref swig_todo "Example"
12261         @ManageTransactions("BlocksOp")
12262         def GetFaceByPoints(self, theShape, thePoint1, thePoint2, thePoint3, thePoint4, theName=None):
12263             """
12264             Returns a face, found in the given shape by four given corner vertices.
12265
12266             Parameters:
12267                 theShape Block or a compound of blocks.
12268                 thePoint1,thePoint2,thePoint3,thePoint4 Points, close to the corners of the desired face.
12269                 theName Object name; when specified, this parameter is used
12270                         for result publication in the study. Otherwise, if automatic
12271                         publication is switched on, default value is used for result name.
12272
12273             Returns:
12274                 New GEOM.GEOM_Object, containing the found face.
12275             """
12276             # Example: see GEOM_Spanner.py
12277             anObj = self.BlocksOp.GetFaceByPoints(theShape, thePoint1, thePoint2, thePoint3, thePoint4)
12278             RaiseIfFailed("GetFaceByPoints", self.BlocksOp)
12279             self._autoPublish(anObj, theName, "face")
12280             return anObj
12281
12282         ## Get a face of block, found in the given shape by two given edges.
12283         #  @param theShape Block or a compound of blocks.
12284         #  @param theEdge1,theEdge2 Edges, close to the edges of the desired face.
12285         #  @param theName Object name; when specified, this parameter is used
12286         #         for result publication in the study. Otherwise, if automatic
12287         #         publication is switched on, default value is used for result name.
12288         #
12289         #  @return New GEOM.GEOM_Object, containing the found face.
12290         #
12291         #  @ref swig_todo "Example"
12292         @ManageTransactions("BlocksOp")
12293         def GetFaceByEdges(self, theShape, theEdge1, theEdge2, theName=None):
12294             """
12295             Get a face of block, found in the given shape by two given edges.
12296
12297             Parameters:
12298                 theShape Block or a compound of blocks.
12299                 theEdge1,theEdge2 Edges, close to the edges of the desired face.
12300                 theName Object name; when specified, this parameter is used
12301                         for result publication in the study. Otherwise, if automatic
12302                         publication is switched on, default value is used for result name.
12303
12304             Returns:
12305                 New GEOM.GEOM_Object, containing the found face.
12306             """
12307             # Example: see GEOM_Spanner.py
12308             anObj = self.BlocksOp.GetFaceByEdges(theShape, theEdge1, theEdge2)
12309             RaiseIfFailed("GetFaceByEdges", self.BlocksOp)
12310             self._autoPublish(anObj, theName, "face")
12311             return anObj
12312
12313         ## Find a face, opposite to the given one in the given block.
12314         #  @param theBlock Must be a hexahedral solid.
12315         #  @param theFace Face of \a theBlock, opposite to the desired face.
12316         #  @param theName Object name; when specified, this parameter is used
12317         #         for result publication in the study. Otherwise, if automatic
12318         #         publication is switched on, default value is used for result name.
12319         #
12320         #  @return New GEOM.GEOM_Object, containing the found face.
12321         #
12322         #  @ref swig_GetOppositeFace "Example"
12323         @ManageTransactions("BlocksOp")
12324         def GetOppositeFace(self, theBlock, theFace, theName=None):
12325             """
12326             Find a face, opposite to the given one in the given block.
12327
12328             Parameters:
12329                 theBlock Must be a hexahedral solid.
12330                 theFace Face of theBlock, opposite to the desired face.
12331                 theName Object name; when specified, this parameter is used
12332                         for result publication in the study. Otherwise, if automatic
12333                         publication is switched on, default value is used for result name.
12334
12335             Returns:
12336                 New GEOM.GEOM_Object, containing the found face.
12337             """
12338             # Example: see GEOM_Spanner.py
12339             anObj = self.BlocksOp.GetOppositeFace(theBlock, theFace)
12340             RaiseIfFailed("GetOppositeFace", self.BlocksOp)
12341             self._autoPublish(anObj, theName, "face")
12342             return anObj
12343
12344         ## Find a face of the given shape, which has minimal distance to the given point.
12345         #  @param theShape Block or a compound of blocks.
12346         #  @param thePoint Point, close to the desired face.
12347         #  @param theName Object name; when specified, this parameter is used
12348         #         for result publication in the study. Otherwise, if automatic
12349         #         publication is switched on, default value is used for result name.
12350         #
12351         #  @return New GEOM.GEOM_Object, containing the found face.
12352         #
12353         #  @ref swig_GetFaceNearPoint "Example"
12354         @ManageTransactions("BlocksOp")
12355         def GetFaceNearPoint(self, theShape, thePoint, theName=None):
12356             """
12357             Find a face of the given shape, which has minimal distance to the given point.
12358
12359             Parameters:
12360                 theShape Block or a compound of blocks.
12361                 thePoint Point, close to the desired face.
12362                 theName Object name; when specified, this parameter is used
12363                         for result publication in the study. Otherwise, if automatic
12364                         publication is switched on, default value is used for result name.
12365
12366             Returns:
12367                 New GEOM.GEOM_Object, containing the found face.
12368             """
12369             # Example: see GEOM_Spanner.py
12370             anObj = self.BlocksOp.GetFaceNearPoint(theShape, thePoint)
12371             RaiseIfFailed("GetFaceNearPoint", self.BlocksOp)
12372             self._autoPublish(anObj, theName, "face")
12373             return anObj
12374
12375         ## Find a face of block, whose outside normale has minimal angle with the given vector.
12376         #  @param theBlock Block or a compound of blocks.
12377         #  @param theVector Vector, close to the normale of the desired face.
12378         #  @param theName Object name; when specified, this parameter is used
12379         #         for result publication in the study. Otherwise, if automatic
12380         #         publication is switched on, default value is used for result name.
12381         #
12382         #  @return New GEOM.GEOM_Object, containing the found face.
12383         #
12384         #  @ref swig_todo "Example"
12385         @ManageTransactions("BlocksOp")
12386         def GetFaceByNormale(self, theBlock, theVector, theName=None):
12387             """
12388             Find a face of block, whose outside normale has minimal angle with the given vector.
12389
12390             Parameters:
12391                 theBlock Block or a compound of blocks.
12392                 theVector Vector, close to the normale of the desired face.
12393                 theName Object name; when specified, this parameter is used
12394                         for result publication in the study. Otherwise, if automatic
12395                         publication is switched on, default value is used for result name.
12396
12397             Returns:
12398                 New GEOM.GEOM_Object, containing the found face.
12399             """
12400             # Example: see GEOM_Spanner.py
12401             anObj = self.BlocksOp.GetFaceByNormale(theBlock, theVector)
12402             RaiseIfFailed("GetFaceByNormale", self.BlocksOp)
12403             self._autoPublish(anObj, theName, "face")
12404             return anObj
12405
12406         ## Find all sub-shapes of type \a theShapeType of the given shape,
12407         #  which have minimal distance to the given point.
12408         #  @param theShape Any shape.
12409         #  @param thePoint Point, close to the desired shape.
12410         #  @param theShapeType Defines what kind of sub-shapes is searched GEOM::shape_type
12411         #  @param theTolerance The tolerance for distances comparison. All shapes
12412         #                      with distances to the given point in interval
12413         #                      [minimal_distance, minimal_distance + theTolerance] will be gathered.
12414         #  @param theName Object name; when specified, this parameter is used
12415         #         for result publication in the study. Otherwise, if automatic
12416         #         publication is switched on, default value is used for result name.
12417         #
12418         #  @return New GEOM_Object, containing a group of all found shapes.
12419         #
12420         #  @ref swig_GetShapesNearPoint "Example"
12421         @ManageTransactions("BlocksOp")
12422         def GetShapesNearPoint(self, theShape, thePoint, theShapeType, theTolerance = 1e-07, theName=None):
12423             """
12424             Find all sub-shapes of type theShapeType of the given shape,
12425             which have minimal distance to the given point.
12426
12427             Parameters:
12428                 theShape Any shape.
12429                 thePoint Point, close to the desired shape.
12430                 theShapeType Defines what kind of sub-shapes is searched (see GEOM::shape_type)
12431                 theTolerance The tolerance for distances comparison. All shapes
12432                                 with distances to the given point in interval
12433                                 [minimal_distance, minimal_distance + theTolerance] will be gathered.
12434                 theName Object name; when specified, this parameter is used
12435                         for result publication in the study. Otherwise, if automatic
12436                         publication is switched on, default value is used for result name.
12437
12438             Returns:
12439                 New GEOM_Object, containing a group of all found shapes.
12440             """
12441             # Example: see GEOM_TestOthers.py
12442             anObj = self.BlocksOp.GetShapesNearPoint(theShape, thePoint, theShapeType, theTolerance)
12443             RaiseIfFailed("GetShapesNearPoint", self.BlocksOp)
12444             self._autoPublish(anObj, theName, "group")
12445             return anObj
12446
12447         # end of l3_blocks_op
12448         ## @}
12449
12450         ## @addtogroup l4_blocks_measure
12451         ## @{
12452
12453         ## Check, if the compound of blocks is given.
12454         #  To be considered as a compound of blocks, the
12455         #  given shape must satisfy the following conditions:
12456         #  - Each element of the compound should be a Block (6 faces).
12457         #  - Each face should be a quadrangle, i.e. it should have only 1 wire
12458         #       with 4 edges. If <VAR>theIsUseC1</VAR> is set to True and
12459         #       there are more than 4 edges in the only wire of a face,
12460         #       this face is considered to be quadrangle if it has 4 bounds
12461         #       (1 or more edge) of C1 continuity.
12462         #  - A connection between two Blocks should be an entire quadrangle face or an entire edge.
12463         #  - The compound should be connexe.
12464         #  - The glue between two quadrangle faces should be applied.
12465         #  @param theCompound The compound to check.
12466         #  @param theIsUseC1 Flag to check if there are 4 bounds on a face
12467         #         taking into account C1 continuity.
12468         #  @param theAngTolerance the angular tolerance to check if two neighbor
12469         #         edges are codirectional in the common vertex with this
12470         #         tolerance. This parameter is used only if
12471         #         <VAR>theIsUseC1</VAR> is set to True.
12472         #  @return TRUE, if the given shape is a compound of blocks.
12473         #  If theCompound is not valid, prints all discovered errors.
12474         #
12475         #  @ref tui_check_compound_of_blocks_page "Example 1"
12476         #  \n @ref swig_CheckCompoundOfBlocks "Example 2"
12477         @ManageTransactions("BlocksOp")
12478         def CheckCompoundOfBlocks(self,theCompound, theIsUseC1 = False,
12479                                   theAngTolerance = 1.e-12):
12480             """
12481             Check, if the compound of blocks is given.
12482             To be considered as a compound of blocks, the
12483             given shape must satisfy the following conditions:
12484             - Each element of the compound should be a Block (6 faces).
12485             - Each face should be a quadrangle, i.e. it should have only 1 wire
12486                  with 4 edges. If theIsUseC1 is set to True and
12487                  there are more than 4 edges in the only wire of a face,
12488                  this face is considered to be quadrangle if it has 4 bounds
12489                  (1 or more edge) of C1 continuity.
12490             - A connection between two Blocks should be an entire quadrangle face or an entire edge.
12491             - The compound should be connexe.
12492             - The glue between two quadrangle faces should be applied.
12493
12494             Parameters:
12495                 theCompound The compound to check.
12496                 theIsUseC1 Flag to check if there are 4 bounds on a face
12497                            taking into account C1 continuity.
12498                 theAngTolerance the angular tolerance to check if two neighbor
12499                            edges are codirectional in the common vertex with this
12500                            tolerance. This parameter is used only if
12501                            theIsUseC1 is set to True.
12502
12503             Returns:
12504                 TRUE, if the given shape is a compound of blocks.
12505                 If theCompound is not valid, prints all discovered errors.
12506             """
12507             # Example: see GEOM_Spanner.py
12508             aTolerance = -1.0
12509             if theIsUseC1:
12510                 aTolerance = theAngTolerance
12511             (IsValid, BCErrors) = self.BlocksOp.CheckCompoundOfBlocks(theCompound, aTolerance)
12512             RaiseIfFailed("CheckCompoundOfBlocks", self.BlocksOp)
12513             if IsValid == 0:
12514                 Descr = self.BlocksOp.PrintBCErrors(theCompound, BCErrors)
12515                 print(Descr)
12516             return IsValid
12517
12518         ## Retrieve all non blocks solids and faces from \a theShape.
12519         #  @param theShape The shape to explore.
12520         #  @param theIsUseC1 Flag to check if there are 4 bounds on a face
12521         #         taking into account C1 continuity.
12522         #  @param theAngTolerance the angular tolerance to check if two neighbor
12523         #         edges are codirectional in the common vertex with this
12524         #         tolerance. This parameter is used only if
12525         #         <VAR>theIsUseC1</VAR> is set to True.
12526         #  @param theName Object name; when specified, this parameter is used
12527         #         for result publication in the study. Otherwise, if automatic
12528         #         publication is switched on, default value is used for result name.
12529         #
12530         #  @return A tuple of two GEOM_Objects. The first object is a group of all
12531         #          non block solids (= not 6 faces, or with 6 faces, but with the
12532         #          presence of non-quadrangular faces). The second object is a
12533         #          group of all non quadrangular faces (= faces with more then
12534         #          1 wire or, if <VAR>theIsUseC1</VAR> is set to True, faces
12535         #          with 1 wire with not 4 edges that do not form 4 bounds of
12536         #          C1 continuity).
12537         #
12538         #  @ref tui_get_non_blocks_page "Example 1"
12539         #  \n @ref swig_GetNonBlocks "Example 2"
12540         @ManageTransactions("BlocksOp")
12541         def GetNonBlocks (self, theShape, theIsUseC1 = False,
12542                           theAngTolerance = 1.e-12, theName=None):
12543             """
12544             Retrieve all non blocks solids and faces from theShape.
12545
12546             Parameters:
12547                 theShape The shape to explore.
12548                 theIsUseC1 Flag to check if there are 4 bounds on a face
12549                            taking into account C1 continuity.
12550                 theAngTolerance the angular tolerance to check if two neighbor
12551                            edges are codirectional in the common vertex with this
12552                            tolerance. This parameter is used only if
12553                            theIsUseC1 is set to True.
12554                 theName Object name; when specified, this parameter is used
12555                         for result publication in the study. Otherwise, if automatic
12556                         publication is switched on, default value is used for result name.
12557
12558             Returns:
12559                 A tuple of two GEOM_Objects. The first object is a group of all
12560                 non block solids (= not 6 faces, or with 6 faces, but with the
12561                 presence of non-quadrangular faces). The second object is a
12562                 group of all non quadrangular faces (= faces with more then
12563                 1 wire or, if <VAR>theIsUseC1</VAR> is set to True, faces
12564                 with 1 wire with not 4 edges that do not form 4 bounds of
12565                 C1 continuity).
12566
12567             Usage:
12568                 (res_sols, res_faces) = geompy.GetNonBlocks(myShape1)
12569             """
12570             # Example: see GEOM_Spanner.py
12571             aTolerance = -1.0
12572             if theIsUseC1:
12573                 aTolerance = theAngTolerance
12574             aTuple = self.BlocksOp.GetNonBlocks(theShape, aTolerance)
12575             RaiseIfFailed("GetNonBlocks", self.BlocksOp)
12576             self._autoPublish(aTuple, theName, ("groupNonHexas", "groupNonQuads"))
12577             return aTuple
12578
12579         ## Remove all seam and degenerated edges from \a theShape.
12580         #  Unite faces and edges, sharing one surface. It means that
12581         #  this faces must have references to one C++ surface object (handle).
12582         #  @param theShape The compound or single solid to remove irregular edges from.
12583         #  @param doUnionFaces If True, then unite faces. If False (the default value),
12584         #         do not unite faces.
12585         #  @param theName Object name; when specified, this parameter is used
12586         #         for result publication in the study. Otherwise, if automatic
12587         #         publication is switched on, default value is used for result name.
12588         #
12589         #  @return Improved shape.
12590         #
12591         #  @ref swig_RemoveExtraEdges "Example"
12592         @ManageTransactions("BlocksOp")
12593         def RemoveExtraEdges(self, theShape, doUnionFaces=False, theName=None):
12594             """
12595             Remove all seam and degenerated edges from theShape.
12596             Unite faces and edges, sharing one surface. It means that
12597             this faces must have references to one C++ surface object (handle).
12598
12599             Parameters:
12600                 theShape The compound or single solid to remove irregular edges from.
12601                 doUnionFaces If True, then unite faces. If False (the default value),
12602                              do not unite faces.
12603                 theName Object name; when specified, this parameter is used
12604                         for result publication in the study. Otherwise, if automatic
12605                         publication is switched on, default value is used for result name.
12606
12607             Returns:
12608                 Improved shape.
12609             """
12610             # Example: see GEOM_TestOthers.py
12611             nbFacesOptimum = -1 # -1 means do not unite faces
12612             if doUnionFaces is True: nbFacesOptimum = 0 # 0 means unite faces
12613             anObj = self.BlocksOp.RemoveExtraEdges(theShape, nbFacesOptimum)
12614             RaiseIfFailed("RemoveExtraEdges", self.BlocksOp)
12615             self._autoPublish(anObj, theName, "removeExtraEdges")
12616             return anObj
12617
12618         ## Performs union faces of \a theShape
12619         #  Unite faces sharing one surface. It means that
12620         #  these faces must have references to one C++ surface object (handle).
12621         #  @param theShape The compound or single solid that contains faces
12622         #         to perform union.
12623         #  @param theName Object name; when specified, this parameter is used
12624         #         for result publication in the study. Otherwise, if automatic
12625         #         publication is switched on, default value is used for result name.
12626         #
12627         #  @return Improved shape.
12628         #
12629         #  @ref swig_UnionFaces "Example"
12630         @ManageTransactions("BlocksOp")
12631         def UnionFaces(self, theShape, theName=None):
12632             """
12633             Performs union faces of theShape.
12634             Unite faces sharing one surface. It means that
12635             these faces must have references to one C++ surface object (handle).
12636
12637             Parameters:
12638                 theShape The compound or single solid that contains faces
12639                          to perform union.
12640                 theName Object name; when specified, this parameter is used
12641                         for result publication in the study. Otherwise, if automatic
12642                         publication is switched on, default value is used for result name.
12643
12644             Returns:
12645                 Improved shape.
12646             """
12647             # Example: see GEOM_TestOthers.py
12648             anObj = self.BlocksOp.UnionFaces(theShape)
12649             RaiseIfFailed("UnionFaces", self.BlocksOp)
12650             self._autoPublish(anObj, theName, "unionFaces")
12651             return anObj
12652
12653         ## Check, if the given shape is a blocks compound.
12654         #  Fix all detected errors.
12655         #    \note Single block can be also fixed by this method.
12656         #  @param theShape The compound to check and improve.
12657         #  @param theName Object name; when specified, this parameter is used
12658         #         for result publication in the study. Otherwise, if automatic
12659         #         publication is switched on, default value is used for result name.
12660         #
12661         #  @return Improved compound.
12662         #
12663         #  @ref swig_CheckAndImprove "Example"
12664         @ManageTransactions("BlocksOp")
12665         def CheckAndImprove(self, theShape, theName=None):
12666             """
12667             Check, if the given shape is a blocks compound.
12668             Fix all detected errors.
12669
12670             Note:
12671                 Single block can be also fixed by this method.
12672
12673             Parameters:
12674                 theShape The compound to check and improve.
12675                 theName Object name; when specified, this parameter is used
12676                         for result publication in the study. Otherwise, if automatic
12677                         publication is switched on, default value is used for result name.
12678
12679             Returns:
12680                 Improved compound.
12681             """
12682             # Example: see GEOM_TestOthers.py
12683             anObj = self.BlocksOp.CheckAndImprove(theShape)
12684             RaiseIfFailed("CheckAndImprove", self.BlocksOp)
12685             self._autoPublish(anObj, theName, "improved")
12686             return anObj
12687
12688         # end of l4_blocks_measure
12689         ## @}
12690
12691         ## @addtogroup l3_blocks_op
12692         ## @{
12693
12694         ## Get all the blocks, contained in the given compound.
12695         #  @param theCompound The compound to explode.
12696         #  @param theMinNbFaces If solid has lower number of faces, it is not a block.
12697         #  @param theMaxNbFaces If solid has higher number of faces, it is not a block.
12698         #  @param theName Object name; when specified, this parameter is used
12699         #         for result publication in the study. Otherwise, if automatic
12700         #         publication is switched on, default value is used for result name.
12701         #
12702         #  @note If theMaxNbFaces = 0, the maximum number of faces is not restricted.
12703         #
12704         #  @return List of GEOM.GEOM_Object, containing the retrieved blocks.
12705         #
12706         #  @ref tui_explode_on_blocks "Example 1"
12707         #  \n @ref swig_MakeBlockExplode "Example 2"
12708         @ManageTransactions("BlocksOp")
12709         def MakeBlockExplode(self, theCompound, theMinNbFaces, theMaxNbFaces, theName=None):
12710             """
12711             Get all the blocks, contained in the given compound.
12712
12713             Parameters:
12714                 theCompound The compound to explode.
12715                 theMinNbFaces If solid has lower number of faces, it is not a block.
12716                 theMaxNbFaces If solid has higher number of faces, it is not a block.
12717                 theName Object name; when specified, this parameter is used
12718                         for result publication in the study. Otherwise, if automatic
12719                         publication is switched on, default value is used for result name.
12720
12721             Note:
12722                 If theMaxNbFaces = 0, the maximum number of faces is not restricted.
12723
12724             Returns:
12725                 List of GEOM.GEOM_Object, containing the retrieved blocks.
12726             """
12727             # Example: see GEOM_TestOthers.py
12728             theMinNbFaces,theMaxNbFaces,Parameters = ParseParameters(theMinNbFaces,theMaxNbFaces)
12729             aList = self.BlocksOp.ExplodeCompoundOfBlocks(theCompound, theMinNbFaces, theMaxNbFaces)
12730             RaiseIfFailed("ExplodeCompoundOfBlocks", self.BlocksOp)
12731             for anObj in aList:
12732                 anObj.SetParameters(Parameters)
12733                 pass
12734             self._autoPublish(aList, theName, "block")
12735             return aList
12736
12737         ## Find block, containing the given point inside its volume or on boundary.
12738         #  @param theCompound Compound, to find block in.
12739         #  @param thePoint Point, close to the desired block. If the point lays on
12740         #         boundary between some blocks, we return block with nearest center.
12741         #  @param theName Object name; when specified, this parameter is used
12742         #         for result publication in the study. Otherwise, if automatic
12743         #         publication is switched on, default value is used for result name.
12744         #
12745         #  @return New GEOM.GEOM_Object, containing the found block.
12746         #
12747         #  @ref swig_todo "Example"
12748         @ManageTransactions("BlocksOp")
12749         def GetBlockNearPoint(self, theCompound, thePoint, theName=None):
12750             """
12751             Find block, containing the given point inside its volume or on boundary.
12752
12753             Parameters:
12754                 theCompound Compound, to find block in.
12755                 thePoint Point, close to the desired block. If the point lays on
12756                          boundary between some blocks, we return block with nearest center.
12757                 theName Object name; when specified, this parameter is used
12758                         for result publication in the study. Otherwise, if automatic
12759                         publication is switched on, default value is used for result name.
12760
12761             Returns:
12762                 New GEOM.GEOM_Object, containing the found block.
12763             """
12764             # Example: see GEOM_Spanner.py
12765             anObj = self.BlocksOp.GetBlockNearPoint(theCompound, thePoint)
12766             RaiseIfFailed("GetBlockNearPoint", self.BlocksOp)
12767             self._autoPublish(anObj, theName, "block")
12768             return anObj
12769
12770         ## Find block, containing all the elements, passed as the parts, or maximum quantity of them.
12771         #  @param theCompound Compound, to find block in.
12772         #  @param theParts List of faces and/or edges and/or vertices to be parts of the found block.
12773         #  @param theName Object name; when specified, this parameter is used
12774         #         for result publication in the study. Otherwise, if automatic
12775         #         publication is switched on, default value is used for result name.
12776         #
12777         #  @return New GEOM.GEOM_Object, containing the found block.
12778         #
12779         #  @ref swig_GetBlockByParts "Example"
12780         @ManageTransactions("BlocksOp")
12781         def GetBlockByParts(self, theCompound, theParts, theName=None):
12782             """
12783              Find block, containing all the elements, passed as the parts, or maximum quantity of them.
12784
12785              Parameters:
12786                 theCompound Compound, to find block in.
12787                 theParts List of faces and/or edges and/or vertices to be parts of the found block.
12788                 theName Object name; when specified, this parameter is used
12789                         for result publication in the study. Otherwise, if automatic
12790                         publication is switched on, default value is used for result name.
12791
12792             Returns:
12793                 New GEOM_Object, containing the found block.
12794             """
12795             # Example: see GEOM_TestOthers.py
12796             anObj = self.BlocksOp.GetBlockByParts(theCompound, theParts)
12797             RaiseIfFailed("GetBlockByParts", self.BlocksOp)
12798             self._autoPublish(anObj, theName, "block")
12799             return anObj
12800
12801         ## Return all blocks, containing all the elements, passed as the parts.
12802         #  @param theCompound Compound, to find blocks in.
12803         #  @param theParts List of faces and/or edges and/or vertices to be parts of the found blocks.
12804         #  @param theName Object name; when specified, this parameter is used
12805         #         for result publication in the study. Otherwise, if automatic
12806         #         publication is switched on, default value is used for result name.
12807         #
12808         #  @return List of GEOM.GEOM_Object, containing the found blocks.
12809         #
12810         #  @ref swig_todo "Example"
12811         @ManageTransactions("BlocksOp")
12812         def GetBlocksByParts(self, theCompound, theParts, theName=None):
12813             """
12814             Return all blocks, containing all the elements, passed as the parts.
12815
12816             Parameters:
12817                 theCompound Compound, to find blocks in.
12818                 theParts List of faces and/or edges and/or vertices to be parts of the found blocks.
12819                 theName Object name; when specified, this parameter is used
12820                         for result publication in the study. Otherwise, if automatic
12821                         publication is switched on, default value is used for result name.
12822
12823             Returns:
12824                 List of GEOM.GEOM_Object, containing the found blocks.
12825             """
12826             # Example: see GEOM_Spanner.py
12827             aList = self.BlocksOp.GetBlocksByParts(theCompound, theParts)
12828             RaiseIfFailed("GetBlocksByParts", self.BlocksOp)
12829             self._autoPublish(aList, theName, "block")
12830             return aList
12831
12832         ## Multi-transformate block and glue the result.
12833         #  Transformation is defined so, as to superpose direction faces.
12834         #  @param Block Hexahedral solid to be multi-transformed.
12835         #  @param DirFace1 ID of First direction face.
12836         #  @param DirFace2 ID of Second direction face.
12837         #  @param NbTimes Quantity of transformations to be done.
12838         #  @param theName Object name; when specified, this parameter is used
12839         #         for result publication in the study. Otherwise, if automatic
12840         #         publication is switched on, default value is used for result name.
12841         #
12842         #  @note Unique ID of sub-shape can be obtained, using method GetSubShapeID().
12843         #
12844         #  @return New GEOM.GEOM_Object, containing the result shape.
12845         #
12846         #  @ref tui_multi_transformation "Example"
12847         @ManageTransactions("BlocksOp")
12848         def MakeMultiTransformation1D(self, Block, DirFace1, DirFace2, NbTimes, theName=None):
12849             """
12850             Multi-transformate block and glue the result.
12851             Transformation is defined so, as to superpose direction faces.
12852
12853             Parameters:
12854                 Block Hexahedral solid to be multi-transformed.
12855                 DirFace1 ID of First direction face.
12856                 DirFace2 ID of Second direction face.
12857                 NbTimes Quantity of transformations to be done.
12858                 theName Object name; when specified, this parameter is used
12859                         for result publication in the study. Otherwise, if automatic
12860                         publication is switched on, default value is used for result name.
12861
12862             Note:
12863                 Unique ID of sub-shape can be obtained, using method GetSubShapeID().
12864
12865             Returns:
12866                 New GEOM.GEOM_Object, containing the result shape.
12867             """
12868             # Example: see GEOM_Spanner.py
12869             DirFace1,DirFace2,NbTimes,Parameters = ParseParameters(DirFace1,DirFace2,NbTimes)
12870             anObj = self.BlocksOp.MakeMultiTransformation1D(Block, DirFace1, DirFace2, NbTimes)
12871             RaiseIfFailed("MakeMultiTransformation1D", self.BlocksOp)
12872             anObj.SetParameters(Parameters)
12873             self._autoPublish(anObj, theName, "transformed")
12874             return anObj
12875
12876         ## Multi-transformate block and glue the result.
12877         #  @param Block Hexahedral solid to be multi-transformed.
12878         #  @param DirFace1U,DirFace2U IDs of Direction faces for the first transformation.
12879         #  @param DirFace1V,DirFace2V IDs of Direction faces for the second transformation.
12880         #  @param NbTimesU,NbTimesV Quantity of transformations to be done.
12881         #  @param theName Object name; when specified, this parameter is used
12882         #         for result publication in the study. Otherwise, if automatic
12883         #         publication is switched on, default value is used for result name.
12884         #
12885         #  @return New GEOM.GEOM_Object, containing the result shape.
12886         #
12887         #  @ref tui_multi_transformation "Example"
12888         @ManageTransactions("BlocksOp")
12889         def MakeMultiTransformation2D(self, Block, DirFace1U, DirFace2U, NbTimesU,
12890                                       DirFace1V, DirFace2V, NbTimesV, theName=None):
12891             """
12892             Multi-transformate block and glue the result.
12893
12894             Parameters:
12895                 Block Hexahedral solid to be multi-transformed.
12896                 DirFace1U,DirFace2U IDs of Direction faces for the first transformation.
12897                 DirFace1V,DirFace2V IDs of Direction faces for the second transformation.
12898                 NbTimesU,NbTimesV Quantity of transformations to be done.
12899                 theName Object name; when specified, this parameter is used
12900                         for result publication in the study. Otherwise, if automatic
12901                         publication is switched on, default value is used for result name.
12902
12903             Returns:
12904                 New GEOM.GEOM_Object, containing the result shape.
12905             """
12906             # Example: see GEOM_Spanner.py
12907             DirFace1U,DirFace2U,NbTimesU,DirFace1V,DirFace2V,NbTimesV,Parameters = ParseParameters(
12908               DirFace1U,DirFace2U,NbTimesU,DirFace1V,DirFace2V,NbTimesV)
12909             anObj = self.BlocksOp.MakeMultiTransformation2D(Block, DirFace1U, DirFace2U, NbTimesU,
12910                                                             DirFace1V, DirFace2V, NbTimesV)
12911             RaiseIfFailed("MakeMultiTransformation2D", self.BlocksOp)
12912             anObj.SetParameters(Parameters)
12913             self._autoPublish(anObj, theName, "transformed")
12914             return anObj
12915
12916         ## Build all possible propagation groups.
12917         #  Propagation group is a set of all edges, opposite to one (main)
12918         #  edge of this group directly or through other opposite edges.
12919         #  Notion of Opposite Edge make sense only on quadrangle face.
12920         #  @param theShape Shape to build propagation groups on.
12921         #  @param theName Object name; when specified, this parameter is used
12922         #         for result publication in the study. Otherwise, if automatic
12923         #         publication is switched on, default value is used for result name.
12924         #
12925         #  @return List of GEOM.GEOM_Object, each of them is a propagation group.
12926         #
12927         #  @ref swig_Propagate "Example"
12928         @ManageTransactions("BlocksOp")
12929         def Propagate(self, theShape, theName=None):
12930             """
12931             Build all possible propagation groups.
12932             Propagation group is a set of all edges, opposite to one (main)
12933             edge of this group directly or through other opposite edges.
12934             Notion of Opposite Edge make sense only on quadrangle face.
12935
12936             Parameters:
12937                 theShape Shape to build propagation groups on.
12938                 theName Object name; when specified, this parameter is used
12939                         for result publication in the study. Otherwise, if automatic
12940                         publication is switched on, default value is used for result name.
12941
12942             Returns:
12943                 List of GEOM.GEOM_Object, each of them is a propagation group.
12944             """
12945             # Example: see GEOM_TestOthers.py
12946             listChains = self.BlocksOp.Propagate(theShape)
12947             RaiseIfFailed("Propagate", self.BlocksOp)
12948             self._autoPublish(listChains, theName, "propagate")
12949             return listChains
12950
12951         # end of l3_blocks_op
12952         ## @}
12953
12954         ## @addtogroup l3_groups
12955         ## @{
12956
12957         ## Creates a new group which will store sub-shapes of theMainShape
12958         #  @param theMainShape is a GEOM object on which the group is selected
12959         #  @param theShapeType defines a shape type of the group (see GEOM::shape_type)
12960         #  @param theName Object name; when specified, this parameter is used
12961         #         for result publication in the study. Otherwise, if automatic
12962         #         publication is switched on, default value is used for result name.
12963         #
12964         #  @return a newly created GEOM group (GEOM.GEOM_Object)
12965         #
12966         #  @ref tui_working_with_groups_page "Example 1"
12967         #  \n @ref swig_CreateGroup "Example 2"
12968         @ManageTransactions("GroupOp")
12969         def CreateGroup(self, theMainShape, theShapeType, theName=None):
12970             """
12971             Creates a new group which will store sub-shapes of theMainShape
12972
12973             Parameters:
12974                theMainShape is a GEOM object on which the group is selected
12975                theShapeType defines a shape type of the group:"COMPOUND", "COMPSOLID",
12976                             "SOLID", "SHELL", "FACE", "WIRE", "EDGE", "VERTEX", "SHAPE".
12977                 theName Object name; when specified, this parameter is used
12978                         for result publication in the study. Otherwise, if automatic
12979                         publication is switched on, default value is used for result name.
12980
12981             Returns:
12982                a newly created GEOM group
12983
12984             Example of usage:
12985                 group = geompy.CreateGroup(Box, geompy.ShapeType["FACE"])
12986
12987             """
12988             # Example: see GEOM_TestOthers.py
12989             anObj = self.GroupOp.CreateGroup(theMainShape, theShapeType)
12990             RaiseIfFailed("CreateGroup", self.GroupOp)
12991             self._autoPublish(anObj, theName, "group")
12992             return anObj
12993
12994         ## Adds a sub-object with ID theSubShapeId to the group
12995         #  @param theGroup is a GEOM group to which the new sub-shape is added
12996         #  @param theSubShapeID is a sub-shape ID in the main object.
12997         #  \note Use method GetSubShapeID() to get an unique ID of the sub-shape
12998         #
12999         #  @ref tui_working_with_groups_page "Example"
13000         @ManageTransactions("GroupOp")
13001         def AddObject(self,theGroup, theSubShapeID):
13002             """
13003             Adds a sub-object with ID theSubShapeId to the group
13004
13005             Parameters:
13006                 theGroup       is a GEOM group to which the new sub-shape is added
13007                 theSubShapeID  is a sub-shape ID in the main object.
13008
13009             Note:
13010                 Use method GetSubShapeID() to get an unique ID of the sub-shape
13011             """
13012             # Example: see GEOM_TestOthers.py
13013             self.GroupOp.AddObject(theGroup, theSubShapeID)
13014             if self.GroupOp.GetErrorCode() != "PAL_ELEMENT_ALREADY_PRESENT":
13015                 RaiseIfFailed("AddObject", self.GroupOp)
13016                 pass
13017             pass
13018
13019         ## Removes a sub-object with ID \a theSubShapeId from the group
13020         #  @param theGroup is a GEOM group from which the new sub-shape is removed
13021         #  @param theSubShapeID is a sub-shape ID in the main object.
13022         #  \note Use method GetSubShapeID() to get an unique ID of the sub-shape
13023         #
13024         #  @ref tui_working_with_groups_page "Example"
13025         @ManageTransactions("GroupOp")
13026         def RemoveObject(self,theGroup, theSubShapeID):
13027             """
13028             Removes a sub-object with ID theSubShapeId from the group
13029
13030             Parameters:
13031                 theGroup is a GEOM group from which the new sub-shape is removed
13032                 theSubShapeID is a sub-shape ID in the main object.
13033
13034             Note:
13035                 Use method GetSubShapeID() to get an unique ID of the sub-shape
13036             """
13037             # Example: see GEOM_TestOthers.py
13038             self.GroupOp.RemoveObject(theGroup, theSubShapeID)
13039             RaiseIfFailed("RemoveObject", self.GroupOp)
13040             pass
13041
13042         ## Adds to the group all the given shapes. No errors, if some shapes are already included.
13043         #  @param theGroup is a GEOM group to which the new sub-shapes are added.
13044         #  @param theSubShapes is a list of sub-shapes to be added.
13045         #
13046         #  @ref tui_working_with_groups_page "Example"
13047         @ManageTransactions("GroupOp")
13048         def UnionList (self,theGroup, theSubShapes):
13049             """
13050             Adds to the group all the given shapes. No errors, if some shapes are already included.
13051
13052             Parameters:
13053                 theGroup is a GEOM group to which the new sub-shapes are added.
13054                 theSubShapes is a list of sub-shapes to be added.
13055             """
13056             # Example: see GEOM_TestOthers.py
13057             self.GroupOp.UnionList(theGroup, theSubShapes)
13058             RaiseIfFailed("UnionList", self.GroupOp)
13059             pass
13060
13061         ## Adds to the group all the given shapes. No errors, if some shapes are already included.
13062         #  @param theGroup is a GEOM group to which the new sub-shapes are added.
13063         #  @param theSubShapes is a list of indices of sub-shapes to be added.
13064         #
13065         #  @ref swig_UnionIDs "Example"
13066         @ManageTransactions("GroupOp")
13067         def UnionIDs(self,theGroup, theSubShapes):
13068             """
13069             Adds to the group all the given shapes. No errors, if some shapes are already included.
13070
13071             Parameters:
13072                 theGroup is a GEOM group to which the new sub-shapes are added.
13073                 theSubShapes is a list of indices of sub-shapes to be added.
13074             """
13075             # Example: see GEOM_TestOthers.py
13076             self.GroupOp.UnionIDs(theGroup, theSubShapes)
13077             RaiseIfFailed("UnionIDs", self.GroupOp)
13078             pass
13079
13080         ## Removes from the group all the given shapes. No errors, if some shapes are not included.
13081         #  @param theGroup is a GEOM group from which the sub-shapes are removed.
13082         #  @param theSubShapes is a list of sub-shapes to be removed.
13083         #
13084         #  @ref tui_working_with_groups_page "Example"
13085         @ManageTransactions("GroupOp")
13086         def DifferenceList (self,theGroup, theSubShapes):
13087             """
13088             Removes from the group all the given shapes. No errors, if some shapes are not included.
13089
13090             Parameters:
13091                 theGroup is a GEOM group from which the sub-shapes are removed.
13092                 theSubShapes is a list of sub-shapes to be removed.
13093             """
13094             # Example: see GEOM_TestOthers.py
13095             self.GroupOp.DifferenceList(theGroup, theSubShapes)
13096             RaiseIfFailed("DifferenceList", self.GroupOp)
13097             pass
13098
13099         ## Removes from the group all the given shapes. No errors, if some shapes are not included.
13100         #  @param theGroup is a GEOM group from which the sub-shapes are removed.
13101         #  @param theSubShapes is a list of indices of sub-shapes to be removed.
13102         #
13103         #  @ref swig_DifferenceIDs "Example"
13104         @ManageTransactions("GroupOp")
13105         def DifferenceIDs(self,theGroup, theSubShapes):
13106             """
13107             Removes from the group all the given shapes. No errors, if some shapes are not included.
13108
13109             Parameters:
13110                 theGroup is a GEOM group from which the sub-shapes are removed.
13111                 theSubShapes is a list of indices of sub-shapes to be removed.
13112             """
13113             # Example: see GEOM_TestOthers.py
13114             self.GroupOp.DifferenceIDs(theGroup, theSubShapes)
13115             RaiseIfFailed("DifferenceIDs", self.GroupOp)
13116             pass
13117
13118         ## Union of two groups.
13119         #  New group is created. It will contain all entities
13120         #  which are present in groups theGroup1 and theGroup2.
13121         #  @param theGroup1, theGroup2 are the initial GEOM groups
13122         #                              to create the united group from.
13123         #  @param theName Object name; when specified, this parameter is used
13124         #         for result publication in the study. Otherwise, if automatic
13125         #         publication is switched on, default value is used for result name.
13126         #
13127         #  @return a newly created GEOM group.
13128         #
13129         #  @ref tui_union_groups_anchor "Example"
13130         @ManageTransactions("GroupOp")
13131         def UnionGroups (self, theGroup1, theGroup2, theName=None):
13132             """
13133             Union of two groups.
13134             New group is created. It will contain all entities
13135             which are present in groups theGroup1 and theGroup2.
13136
13137             Parameters:
13138                 theGroup1, theGroup2 are the initial GEOM groups
13139                                      to create the united group from.
13140                 theName Object name; when specified, this parameter is used
13141                         for result publication in the study. Otherwise, if automatic
13142                         publication is switched on, default value is used for result name.
13143
13144             Returns:
13145                 a newly created GEOM group.
13146             """
13147             # Example: see GEOM_TestOthers.py
13148             aGroup = self.GroupOp.UnionGroups(theGroup1, theGroup2)
13149             RaiseIfFailed("UnionGroups", self.GroupOp)
13150             self._autoPublish(aGroup, theName, "group")
13151             return aGroup
13152
13153         ## Intersection of two groups.
13154         #  New group is created. It will contain only those entities
13155         #  which are present in both groups theGroup1 and theGroup2.
13156         #  @param theGroup1, theGroup2 are the initial GEOM groups to get common part of.
13157         #  @param theName Object name; when specified, this parameter is used
13158         #         for result publication in the study. Otherwise, if automatic
13159         #         publication is switched on, default value is used for result name.
13160         #
13161         #  @return a newly created GEOM group.
13162         #
13163         #  @ref tui_intersect_groups_anchor "Example"
13164         @ManageTransactions("GroupOp")
13165         def IntersectGroups (self, theGroup1, theGroup2, theName=None):
13166             """
13167             Intersection of two groups.
13168             New group is created. It will contain only those entities
13169             which are present in both groups theGroup1 and theGroup2.
13170
13171             Parameters:
13172                 theGroup1, theGroup2 are the initial GEOM groups to get common part of.
13173                 theName Object name; when specified, this parameter is used
13174                         for result publication in the study. Otherwise, if automatic
13175                         publication is switched on, default value is used for result name.
13176
13177             Returns:
13178                 a newly created GEOM group.
13179             """
13180             # Example: see GEOM_TestOthers.py
13181             aGroup = self.GroupOp.IntersectGroups(theGroup1, theGroup2)
13182             RaiseIfFailed("IntersectGroups", self.GroupOp)
13183             self._autoPublish(aGroup, theName, "group")
13184             return aGroup
13185
13186         ## Cut of two groups.
13187         #  New group is created. It will contain entities which are
13188         #  present in group theGroup1 but are not present in group theGroup2.
13189         #  @param theGroup1 is a GEOM group to include elements of.
13190         #  @param theGroup2 is a GEOM group to exclude elements of.
13191         #  @param theName Object name; when specified, this parameter is used
13192         #         for result publication in the study. Otherwise, if automatic
13193         #         publication is switched on, default value is used for result name.
13194         #
13195         #  @return a newly created GEOM group.
13196         #
13197         #  @ref tui_cut_groups_anchor "Example"
13198         @ManageTransactions("GroupOp")
13199         def CutGroups (self, theGroup1, theGroup2, theName=None):
13200             """
13201             Cut of two groups.
13202             New group is created. It will contain entities which are
13203             present in group theGroup1 but are not present in group theGroup2.
13204
13205             Parameters:
13206                 theGroup1 is a GEOM group to include elements of.
13207                 theGroup2 is a GEOM group to exclude elements of.
13208                 theName Object name; when specified, this parameter is used
13209                         for result publication in the study. Otherwise, if automatic
13210                         publication is switched on, default value is used for result name.
13211
13212             Returns:
13213                 a newly created GEOM group.
13214             """
13215             # Example: see GEOM_TestOthers.py
13216             aGroup = self.GroupOp.CutGroups(theGroup1, theGroup2)
13217             RaiseIfFailed("CutGroups", self.GroupOp)
13218             self._autoPublish(aGroup, theName, "group")
13219             return aGroup
13220
13221         ## Union of list of groups.
13222         #  New group is created. It will contain all entities that are
13223         #  present in groups listed in theGList.
13224         #  @param theGList is a list of GEOM groups to create the united group from.
13225         #  @param theName Object name; when specified, this parameter is used
13226         #         for result publication in the study. Otherwise, if automatic
13227         #         publication is switched on, default value is used for result name.
13228         #
13229         #  @return a newly created GEOM group.
13230         #
13231         #  @ref tui_union_groups_anchor "Example"
13232         @ManageTransactions("GroupOp")
13233         def UnionListOfGroups (self, theGList, theName=None):
13234             """
13235             Union of list of groups.
13236             New group is created. It will contain all entities that are
13237             present in groups listed in theGList.
13238
13239             Parameters:
13240                 theGList is a list of GEOM groups to create the united group from.
13241                 theName Object name; when specified, this parameter is used
13242                         for result publication in the study. Otherwise, if automatic
13243                         publication is switched on, default value is used for result name.
13244
13245             Returns:
13246                 a newly created GEOM group.
13247             """
13248             # Example: see GEOM_TestOthers.py
13249             aGroup = self.GroupOp.UnionListOfGroups(theGList)
13250             RaiseIfFailed("UnionListOfGroups", self.GroupOp)
13251             self._autoPublish(aGroup, theName, "group")
13252             return aGroup
13253
13254         ## Cut of lists of groups.
13255         #  New group is created. It will contain only entities
13256         #  which are present in groups listed in theGList.
13257         #  @param theGList is a list of GEOM groups to include elements of.
13258         #  @param theName Object name; when specified, this parameter is used
13259         #         for result publication in the study. Otherwise, if automatic
13260         #         publication is switched on, default value is used for result name.
13261         #
13262         #  @return a newly created GEOM group.
13263         #
13264         #  @ref tui_intersect_groups_anchor "Example"
13265         @ManageTransactions("GroupOp")
13266         def IntersectListOfGroups (self, theGList, theName=None):
13267             """
13268             Cut of lists of groups.
13269             New group is created. It will contain only entities
13270             which are present in groups listed in theGList.
13271
13272             Parameters:
13273                 theGList is a list of GEOM groups to include elements of.
13274                 theName Object name; when specified, this parameter is used
13275                         for result publication in the study. Otherwise, if automatic
13276                         publication is switched on, default value is used for result name.
13277
13278             Returns:
13279                 a newly created GEOM group.
13280             """
13281             # Example: see GEOM_TestOthers.py
13282             aGroup = self.GroupOp.IntersectListOfGroups(theGList)
13283             RaiseIfFailed("IntersectListOfGroups", self.GroupOp)
13284             self._autoPublish(aGroup, theName, "group")
13285             return aGroup
13286
13287         ## Cut of lists of groups.
13288         #  New group is created. It will contain only entities
13289         #  which are present in groups listed in theGList1 but
13290         #  are not present in groups from theGList2.
13291         #  @param theGList1 is a list of GEOM groups to include elements of.
13292         #  @param theGList2 is a list of GEOM groups to exclude elements of.
13293         #  @param theName Object name; when specified, this parameter is used
13294         #         for result publication in the study. Otherwise, if automatic
13295         #         publication is switched on, default value is used for result name.
13296         #
13297         #  @return a newly created GEOM group.
13298         #
13299         #  @ref tui_cut_groups_anchor "Example"
13300         @ManageTransactions("GroupOp")
13301         def CutListOfGroups (self, theGList1, theGList2, theName=None):
13302             """
13303             Cut of lists of groups.
13304             New group is created. It will contain only entities
13305             which are present in groups listed in theGList1 but
13306             are not present in groups from theGList2.
13307
13308             Parameters:
13309                 theGList1 is a list of GEOM groups to include elements of.
13310                 theGList2 is a list of GEOM groups to exclude elements of.
13311                 theName Object name; when specified, this parameter is used
13312                         for result publication in the study. Otherwise, if automatic
13313                         publication is switched on, default value is used for result name.
13314
13315             Returns:
13316                 a newly created GEOM group.
13317             """
13318             # Example: see GEOM_TestOthers.py
13319             aGroup = self.GroupOp.CutListOfGroups(theGList1, theGList2)
13320             RaiseIfFailed("CutListOfGroups", self.GroupOp)
13321             self._autoPublish(aGroup, theName, "group")
13322             return aGroup
13323
13324         ## Returns a list of sub-objects ID stored in the group
13325         #  @param theGroup is a GEOM group for which a list of IDs is requested
13326         #
13327         #  @ref swig_GetObjectIDs "Example"
13328         @ManageTransactions("GroupOp")
13329         def GetObjectIDs(self,theGroup):
13330             """
13331             Returns a list of sub-objects ID stored in the group
13332
13333             Parameters:
13334                 theGroup is a GEOM group for which a list of IDs is requested
13335             """
13336             # Example: see GEOM_TestOthers.py
13337             ListIDs = self.GroupOp.GetObjects(theGroup)
13338             RaiseIfFailed("GetObjects", self.GroupOp)
13339             return ListIDs
13340
13341         ## Returns a type of sub-objects stored in the group
13342         #  @param theGroup is a GEOM group which type is returned.
13343         #
13344         #  @ref swig_GetType "Example"
13345         @ManageTransactions("GroupOp")
13346         def GetType(self,theGroup):
13347             """
13348             Returns a type of sub-objects stored in the group
13349
13350             Parameters:
13351                 theGroup is a GEOM group which type is returned.
13352             """
13353             # Example: see GEOM_TestOthers.py
13354             aType = self.GroupOp.GetType(theGroup)
13355             RaiseIfFailed("GetType", self.GroupOp)
13356             return aType
13357
13358         ## Convert a type of geom object from id to string value
13359         #  @param theId is a GEOM object type id.
13360         #  @return type of geom object (POINT, VECTOR, PLANE, LINE, TORUS, ... )
13361         #  @ref swig_GetType "Example"
13362         def ShapeIdToType(self, theId):
13363             """
13364             Convert a type of geom object from id to string value
13365
13366             Parameters:
13367                 theId is a GEOM object type id.
13368
13369             Returns:
13370                 type of geom object (POINT, VECTOR, PLANE, LINE, TORUS, ... )
13371             """
13372             if theId == 0:
13373                 return "COPY"
13374             if theId == 1:
13375                 return "IMPORT"
13376             if theId == 2:
13377                 return "POINT"
13378             if theId == 3:
13379                 return "VECTOR"
13380             if theId == 4:
13381                 return "PLANE"
13382             if theId == 5:
13383                 return "LINE"
13384             if theId == 6:
13385                 return "TORUS"
13386             if theId == 7:
13387                 return "BOX"
13388             if theId == 8:
13389                 return "CYLINDER"
13390             if theId == 9:
13391                 return "CONE"
13392             if theId == 10:
13393                 return "SPHERE"
13394             if theId == 11:
13395                 return "PRISM"
13396             if theId == 12:
13397                 return "REVOLUTION"
13398             if theId == 13:
13399                 return "BOOLEAN"
13400             if theId == 14:
13401                 return "PARTITION"
13402             if theId == 15:
13403                 return "POLYLINE"
13404             if theId == 16:
13405                 return "CIRCLE"
13406             if theId == 17:
13407                 return "SPLINE"
13408             if theId == 18:
13409                 return "ELLIPSE"
13410             if theId == 19:
13411                 return "CIRC_ARC"
13412             if theId == 20:
13413                 return "FILLET"
13414             if theId == 21:
13415                 return "CHAMFER"
13416             if theId == 22:
13417                 return "EDGE"
13418             if theId == 23:
13419                 return "WIRE"
13420             if theId == 24:
13421                 return "FACE"
13422             if theId == 25:
13423                 return "SHELL"
13424             if theId == 26:
13425                 return "SOLID"
13426             if theId == 27:
13427                 return "COMPOUND"
13428             if theId == 28:
13429                 return "SUBSHAPE"
13430             if theId == 29:
13431                 return "PIPE"
13432             if theId == 30:
13433                 return "ARCHIMEDE"
13434             if theId == 31:
13435                 return "FILLING"
13436             if theId == 32:
13437                 return "EXPLODE"
13438             if theId == 33:
13439                 return "GLUED"
13440             if theId == 34:
13441                 return "SKETCHER"
13442             if theId == 35:
13443                 return "CDG"
13444             if theId == 36:
13445                 return "FREE_BOUNDS"
13446             if theId == 37:
13447                 return "GROUP"
13448             if theId == 38:
13449                 return "BLOCK"
13450             if theId == 39:
13451                 return "MARKER"
13452             if theId == 40:
13453                 return "THRUSECTIONS"
13454             if theId == 41:
13455                 return "COMPOUNDFILTER"
13456             if theId == 42:
13457                 return "SHAPES_ON_SHAPE"
13458             if theId == 43:
13459                 return "ELLIPSE_ARC"
13460             if theId == 44:
13461                 return "3DSKETCHER"
13462             if theId == 45:
13463                 return "FILLET_2D"
13464             if theId == 46:
13465                 return "FILLET_1D"
13466             if theId == 201:
13467                 return "PIPETSHAPE"
13468             return "Shape Id not exist."
13469
13470         ## Returns a main shape associated with the group
13471         #  @param theGroup is a GEOM group for which a main shape object is requested
13472         #  @return a GEOM object which is a main shape for theGroup
13473         #
13474         #  @ref swig_GetMainShape "Example"
13475         @ManageTransactions("GroupOp")
13476         def GetMainShape(self,theGroup):
13477             """
13478             Returns a main shape associated with the group
13479
13480             Parameters:
13481                 theGroup is a GEOM group for which a main shape object is requested
13482
13483             Returns:
13484                 a GEOM object which is a main shape for theGroup
13485
13486             Example of usage: BoxCopy = geompy.GetMainShape(CreateGroup)
13487             """
13488             # Example: see GEOM_TestOthers.py
13489             anObj = self.GroupOp.GetMainShape(theGroup)
13490             RaiseIfFailed("GetMainShape", self.GroupOp)
13491             return anObj
13492
13493         ## Create group of edges of theShape, whose length is in range [min_length, max_length].
13494         #  If include_min/max == 0, edges with length == min/max_length will not be included in result.
13495         #  @param theShape given shape (see GEOM.GEOM_Object)
13496         #  @param min_length minimum length of edges of theShape
13497         #  @param max_length maximum length of edges of theShape
13498         #  @param include_max indicating if edges with length == max_length should be included in result, 1-yes, 0-no (default=1)
13499         #  @param include_min indicating if edges with length == min_length should be included in result, 1-yes, 0-no (default=1)
13500         #  @param theName Object name; when specified, this parameter is used
13501         #         for result publication in the study. Otherwise, if automatic
13502         #         publication is switched on, default value is used for result name.
13503         #
13504         #  @return a newly created GEOM group of edges
13505         #
13506         #  @@ref swig_todo "Example"
13507         def GetEdgesByLength (self, theShape, min_length, max_length, include_min = 1, include_max = 1, theName=None):
13508             """
13509             Create group of edges of theShape, whose length is in range [min_length, max_length].
13510             If include_min/max == 0, edges with length == min/max_length will not be included in result.
13511
13512             Parameters:
13513                 theShape given shape
13514                 min_length minimum length of edges of theShape
13515                 max_length maximum length of edges of theShape
13516                 include_max indicating if edges with length == max_length should be included in result, 1-yes, 0-no (default=1)
13517                 include_min indicating if edges with length == min_length should be included in result, 1-yes, 0-no (default=1)
13518                 theName Object name; when specified, this parameter is used
13519                         for result publication in the study. Otherwise, if automatic
13520                         publication is switched on, default value is used for result name.
13521
13522              Returns:
13523                 a newly created GEOM group of edges.
13524             """
13525             edges = self.SubShapeAll(theShape, self.ShapeType["EDGE"])
13526             edges_in_range = []
13527             for edge in edges:
13528                 Props = self.BasicProperties(edge)
13529                 if min_length <= Props[0] and Props[0] <= max_length:
13530                     if (not include_min) and (min_length == Props[0]):
13531                         skip = 1
13532                     else:
13533                         if (not include_max) and (Props[0] == max_length):
13534                             skip = 1
13535                         else:
13536                             edges_in_range.append(edge)
13537
13538             if len(edges_in_range) <= 0:
13539                 print("No edges found by given criteria")
13540                 return None
13541
13542             # note: auto-publishing is done in self.CreateGroup()
13543             group_edges = self.CreateGroup(theShape, self.ShapeType["EDGE"], theName)
13544             self.UnionList(group_edges, edges_in_range)
13545
13546             return group_edges
13547
13548         ## Create group of edges of selected shape, whose length is in range [min_length, max_length].
13549         #  If include_min/max == 0, edges with length == min/max_length will not be included in result.
13550         #  @param min_length minimum length of edges of selected shape
13551         #  @param max_length maximum length of edges of selected shape
13552         #  @param include_max indicating if edges with length == max_length should be included in result, 1-yes, 0-no (default=1)
13553         #  @param include_min indicating if edges with length == min_length should be included in result, 1-yes, 0-no (default=1)
13554         #  @return a newly created GEOM group of edges
13555         #  @ref swig_todo "Example"
13556         def SelectEdges (self, min_length, max_length, include_min = 1, include_max = 1):
13557             """
13558             Create group of edges of selected shape, whose length is in range [min_length, max_length].
13559             If include_min/max == 0, edges with length == min/max_length will not be included in result.
13560
13561             Parameters:
13562                 min_length minimum length of edges of selected shape
13563                 max_length maximum length of edges of selected shape
13564                 include_max indicating if edges with length == max_length should be included in result, 1-yes, 0-no (default=1)
13565                 include_min indicating if edges with length == min_length should be included in result, 1-yes, 0-no (default=1)
13566
13567              Returns:
13568                 a newly created GEOM group of edges.
13569             """
13570             nb_selected = sg.SelectedCount()
13571             if nb_selected < 1:
13572                 print("Select a shape before calling this function, please.")
13573                 return 0
13574             if nb_selected > 1:
13575                 print("Only one shape must be selected")
13576                 return 0
13577
13578             id_shape = sg.getSelected(0)
13579             shape = IDToObject( id_shape )
13580
13581             group_edges = self.GetEdgesByLength(shape, min_length, max_length, include_min, include_max)
13582
13583             left_str  = " < "
13584             right_str = " < "
13585             if include_min: left_str  = " <= "
13586             if include_max: right_str  = " <= "
13587
13588             self.addToStudyInFather(shape, group_edges, "Group of edges with " + repr(min_length)
13589                                     + left_str + "length" + right_str + repr(max_length))
13590
13591             sg.updateObjBrowser()
13592
13593             return group_edges
13594
13595         # end of l3_groups
13596         ## @}
13597
13598         #@@ insert new functions before this line @@ do not remove this line @@#
13599
13600         ## Create a copy of the given object
13601         #
13602         #  @param theOriginal geometry object for copy
13603         #  @param theName Object name; when specified, this parameter is used
13604         #         for result publication in the study. Otherwise, if automatic
13605         #         publication is switched on, default value is used for result name.
13606         #
13607         #  @return New GEOM_Object, containing the copied shape.
13608         #
13609         #  @ingroup l1_geomBuilder_auxiliary
13610         #  @ref swig_MakeCopy "Example"
13611         @ManageTransactions("InsertOp")
13612         def MakeCopy(self, theOriginal, theName=None):
13613             """
13614             Create a copy of the given object
13615
13616             Parameters:
13617                 theOriginal geometry object for copy
13618                 theName Object name; when specified, this parameter is used
13619                         for result publication in the study. Otherwise, if automatic
13620                         publication is switched on, default value is used for result name.
13621
13622             Returns:
13623                 New GEOM_Object, containing the copied shape.
13624
13625             Example of usage: Copy = geompy.MakeCopy(Box)
13626             """
13627             # Example: see GEOM_TestAll.py
13628             anObj = self.InsertOp.MakeCopy(theOriginal)
13629             RaiseIfFailed("MakeCopy", self.InsertOp)
13630             self._autoPublish(anObj, theName, "copy")
13631             return anObj
13632
13633         ## Add Path to load python scripts from
13634         #  @param Path a path to load python scripts from
13635         #  @ingroup l1_geomBuilder_auxiliary
13636         def addPath(self,Path):
13637             """
13638             Add Path to load python scripts from
13639
13640             Parameters:
13641                 Path a path to load python scripts from
13642             """
13643             if (sys.path.count(Path) < 1):
13644                 sys.path.append(Path)
13645                 pass
13646             pass
13647
13648         ## Load marker texture from the file
13649         #  @param Path a path to the texture file
13650         #  @return unique texture identifier
13651         #  @ingroup l1_geomBuilder_auxiliary
13652         @ManageTransactions("InsertOp")
13653         def LoadTexture(self, Path):
13654             """
13655             Load marker texture from the file
13656
13657             Parameters:
13658                 Path a path to the texture file
13659
13660             Returns:
13661                 unique texture identifier
13662             """
13663             # Example: see GEOM_TestAll.py
13664             ID = self.InsertOp.LoadTexture(Path)
13665             RaiseIfFailed("LoadTexture", self.InsertOp)
13666             return ID
13667
13668         ## Get internal name of the object based on its study entry
13669         #  @note This method does not provide an unique identifier of the geometry object.
13670         #  @note This is internal function of GEOM component, though it can be used outside it for
13671         #  appropriate reason (e.g. for identification of geometry object).
13672         #  @param obj geometry object
13673         #  @return unique object identifier
13674         #  @ingroup l1_geomBuilder_auxiliary
13675         def getObjectID(self, obj):
13676             """
13677             Get internal name of the object based on its study entry.
13678             Note: this method does not provide an unique identifier of the geometry object.
13679             It is an internal function of GEOM component, though it can be used outside GEOM for
13680             appropriate reason (e.g. for identification of geometry object).
13681
13682             Parameters:
13683                 obj geometry object
13684
13685             Returns:
13686                 unique object identifier
13687             """
13688             ID = ""
13689             entry = salome.ObjectToID(obj)
13690             if entry is not None:
13691                 lst = entry.split(":")
13692                 if len(lst) > 0:
13693                     ID = lst[-1] # -1 means last item in the list
13694                     return "GEOM_" + ID
13695             return ID
13696
13697
13698
13699         ## Add marker texture. @a Width and @a Height parameters
13700         #  specify width and height of the texture in pixels.
13701         #  If @a RowData is @c True, @a Texture parameter should represent texture data
13702         #  packed into the byte array. If @a RowData is @c False (default), @a Texture
13703         #  parameter should be unpacked string, in which '1' symbols represent opaque
13704         #  pixels and '0' represent transparent pixels of the texture bitmap.
13705         #
13706         #  @param Width texture width in pixels
13707         #  @param Height texture height in pixels
13708         #  @param Texture texture data
13709         #  @param RowData if @c True, @a Texture data are packed in the byte stream
13710         #  @return unique texture identifier
13711         #  @ingroup l1_geomBuilder_auxiliary
13712         @ManageTransactions("InsertOp")
13713         def AddTexture(self, Width, Height, Texture, RowData=False):
13714             """
13715             Add marker texture. Width and Height parameters
13716             specify width and height of the texture in pixels.
13717             If RowData is True, Texture parameter should represent texture data
13718             packed into the byte array. If RowData is False (default), Texture
13719             parameter should be unpacked string, in which '1' symbols represent opaque
13720             pixels and '0' represent transparent pixels of the texture bitmap.
13721
13722             Parameters:
13723                 Width texture width in pixels
13724                 Height texture height in pixels
13725                 Texture texture data
13726                 RowData if True, Texture data are packed in the byte stream
13727
13728             Returns:
13729                 return unique texture identifier
13730             """
13731             if not RowData: Texture = PackData(Texture)
13732             ID = self.InsertOp.AddTexture(Width, Height, Texture)
13733             RaiseIfFailed("AddTexture", self.InsertOp)
13734             return ID
13735
13736         ## Transfer not topological data from one GEOM object to another.
13737         #
13738         #  @param theObjectFrom the source object of non-topological data
13739         #  @param theObjectTo the destination object of non-topological data
13740         #  @param theFindMethod method to search sub-shapes of theObjectFrom
13741         #         in shape theObjectTo. Possible values are: GEOM.FSM_GetInPlace,
13742         #         GEOM.FSM_GetInPlaceByHistory and GEOM.FSM_GetInPlace_Old.
13743         #         Other values of GEOM.find_shape_method are not supported.
13744         #
13745         #  @return True in case of success; False otherwise.
13746         #
13747         #  @ingroup l1_geomBuilder_auxiliary
13748         #
13749         #  @ref swig_TransferData "Example"
13750         @ManageTransactions("InsertOp")
13751         def TransferData(self, theObjectFrom, theObjectTo,
13752                          theFindMethod=GEOM.FSM_GetInPlace):
13753             """
13754             Transfer not topological data from one GEOM object to another.
13755
13756             Parameters:
13757                 theObjectFrom the source object of non-topological data
13758                 theObjectTo the destination object of non-topological data
13759                 theFindMethod method to search sub-shapes of theObjectFrom
13760                               in shape theObjectTo. Possible values are:
13761                               GEOM.FSM_GetInPlace, GEOM.FSM_GetInPlaceByHistory
13762                               and GEOM.FSM_GetInPlace_Old. Other values of
13763                               GEOM.find_shape_method are not supported.
13764
13765             Returns:
13766                 True in case of success; False otherwise.
13767
13768             # Example: see GEOM_TestOthers.py
13769             """
13770             # Example: see GEOM_TestAll.py
13771             isOk = self.InsertOp.TransferData(theObjectFrom,
13772                                                theObjectTo, theFindMethod)
13773             RaiseIfFailed("TransferData", self.InsertOp)
13774             return isOk
13775
13776         ## Creates a new folder object. It is a container for any GEOM objects.
13777         #  @param Name name of the container
13778         #  @param Father parent object. If None,
13779         #         folder under 'Geometry' root object will be created.
13780         #  @return a new created folder
13781         #  @ingroup l1_publish_data
13782         def NewFolder(self, Name, Father=None):
13783             """
13784             Create a new folder object. It is an auxiliary container for any GEOM objects.
13785
13786             Parameters:
13787                 Name name of the container
13788                 Father parent object. If None,
13789                 folder under 'Geometry' root object will be created.
13790
13791             Returns:
13792                 a new created folder
13793             """
13794             return self.CreateFolder(Name, Father)
13795
13796         ## Move object to the specified folder
13797         #  @param Object object to move
13798         #  @param Folder target folder
13799         #  @ingroup l1_publish_data
13800         def PutToFolder(self, Object, Folder):
13801             """
13802             Move object to the specified folder
13803
13804             Parameters:
13805                 Object object to move
13806                 Folder target folder
13807             """
13808             self.MoveToFolder(Object, Folder)
13809             pass
13810
13811         ## Move list of objects to the specified folder
13812         #  @param ListOfSO list of objects to move
13813         #  @param Folder target folder
13814         #  @ingroup l1_publish_data
13815         def PutListToFolder(self, ListOfSO, Folder):
13816             """
13817             Move list of objects to the specified folder
13818
13819             Parameters:
13820                 ListOfSO list of objects to move
13821                 Folder target folder
13822             """
13823             self.MoveListToFolder(ListOfSO, Folder)
13824             pass
13825
13826         ## @addtogroup l2_field
13827         ## @{
13828
13829         ## Creates a field
13830         #  @param shape the shape the field lies on
13831         #  @param name the field name
13832         #  @param type type of field data: 0 - bool, 1 - int, 2 - double, 3 - string
13833         #  @param dimension dimension of the shape the field lies on
13834         #         0 - VERTEX, 1 - EDGE, 2 - FACE, 3 - SOLID, -1 - whole shape
13835         #  @param componentNames names of components
13836         #  @return a created field
13837         @ManageTransactions("FieldOp")
13838         def CreateField(self, shape, name, type, dimension, componentNames):
13839             """
13840             Creates a field
13841
13842             Parameters:
13843                 shape the shape the field lies on
13844                 name  the field name
13845                 type  type of field data
13846                 dimension dimension of the shape the field lies on
13847                           0 - VERTEX, 1 - EDGE, 2 - FACE, 3 - SOLID, -1 - whole shape
13848                 componentNames names of components
13849
13850             Returns:
13851                 a created field
13852             """
13853             if isinstance( type, int ):
13854                 if type < 0 or type > 3:
13855                     raise RuntimeError("CreateField : Error: data type must be within [0-3] range")
13856                 type = [GEOM.FDT_Bool,GEOM.FDT_Int,GEOM.FDT_Double,GEOM.FDT_String][type]
13857
13858             f = self.FieldOp.CreateField( shape, name, type, dimension, componentNames)
13859             RaiseIfFailed("CreateField", self.FieldOp)
13860             global geom
13861             geom._autoPublish( f, "", name)
13862             return f
13863
13864         ## Removes a field from the GEOM component
13865         #  @param field the field to remove
13866         def RemoveField(self, field):
13867             "Removes a field from the GEOM component"
13868             global geom
13869             if isinstance( field, GEOM._objref_GEOM_Field ):
13870                 geom.RemoveObject( field )
13871             elif isinstance( field, geomField ):
13872                 geom.RemoveObject( field.field )
13873             else:
13874                 raise RuntimeError("RemoveField() : the object is not a field")
13875             return
13876
13877         ## Returns number of fields on a shape
13878         @ManageTransactions("FieldOp")
13879         def CountFields(self, shape):
13880             "Returns number of fields on a shape"
13881             nb = self.FieldOp.CountFields( shape )
13882             RaiseIfFailed("CountFields", self.FieldOp)
13883             return nb
13884
13885         ## Returns all fields on a shape
13886         @ManageTransactions("FieldOp")
13887         def GetFields(self, shape):
13888             "Returns all fields on a shape"
13889             ff = self.FieldOp.GetFields( shape )
13890             RaiseIfFailed("GetFields", self.FieldOp)
13891             return ff
13892
13893         ## Returns a field on a shape by its name
13894         @ManageTransactions("FieldOp")
13895         def GetField(self, shape, name):
13896             "Returns a field on a shape by its name"
13897             f = self.FieldOp.GetField( shape, name )
13898             RaiseIfFailed("GetField", self.FieldOp)
13899             return f
13900
13901         # end of l2_field
13902         ## @}
13903
13904         ## @addtogroup l2_testing
13905         ## @{
13906
13907         ## Build a mesh on the given shape.
13908         # @param shape the source shape
13909         # @param linear_deflection linear deflection coefficient
13910         # @param is_relative says if given value of deflection is relative to shape's bounding box
13911         # @param angular_deflection angular deflection for edges in degrees
13912         # @return True in case of success; otherwise False.
13913         @ManageTransactions("TestOp")
13914         def Tesselate(self, shape, linear_deflection=0, is_relative=True, angular_deflection=0):
13915             """Build a mesh on the given shape.
13916
13917             Parameters:
13918                 shape the source shape
13919                 linear_deflection linear deflection coefficient
13920                 is_relative says if given value of deflection is relative to shape's bounding box
13921                 angular_deflection angular deflection for edges in degrees
13922
13923             Returns:
13924                 True in case of success; otherwise False.
13925             """
13926             if angular_deflection > 0:
13927                 angular_deflection = angular_deflection * math.pi / 180.
13928             r = self.TestOp.Tesselate(shape, linear_deflection, is_relative, angular_deflection)
13929             RaiseIfFailed("Tesselate", self.TestOp)
13930             return r
13931
13932         # end of l2_testing
13933         ## @}
13934
13935
13936 # Register the new proxy for GEOM_Gen
13937 omniORB.registerObjref(GEOM._objref_GEOM_Gen._NP_RepositoryId, geomBuilder)
13938
13939
13940 ## Field on Geometry
13941 #  @ingroup l2_field
13942 class geomField( GEOM._objref_GEOM_Field ):
13943
13944     def __init__(self, *args):
13945         GEOM._objref_GEOM_Field.__init__(self, *args)
13946         self.field = GEOM._objref_GEOM_Field
13947         return
13948
13949     ## Returns the shape the field lies on
13950     def getShape(self):
13951         "Returns the shape the field lies on"
13952         return self.field.GetShape(self)
13953
13954     ## Returns the field name
13955     def getName(self):
13956         "Returns the field name"
13957         return self.field.GetName(self)
13958
13959     ## Returns type of field data as integer [0-3]
13960     def getType(self):
13961         "Returns type of field data"
13962         return EnumToLong(self.field.GetDataType(self))
13963
13964     ## Returns type of field data:
13965     #  one of GEOM.FDT_Bool, GEOM.FDT_Int, GEOM.FDT_Double, GEOM.FDT_String
13966     def getTypeEnum(self):
13967         "Returns type of field data"
13968         return self.field.GetDataType(self)
13969
13970     ## Returns dimension of the shape the field lies on:
13971     #  0 - VERTEX, 1 - EDGE, 2 - FACE, 3 - SOLID, -1 - whole shape
13972     def getDimension(self):
13973         """Returns dimension of the shape the field lies on:
13974         0 - VERTEX, 1 - EDGE, 2 - FACE, 3 - SOLID, -1 - whole shape"""
13975         return self.field.GetDimension(self)
13976
13977     ## Returns names of components
13978     def getComponents(self):
13979         "Returns names of components"
13980         return self.field.GetComponents(self)
13981
13982     ## Adds a time step to the field
13983     #  @param step the time step number further used as the step identifier
13984     #  @param stamp the time step time
13985     #  @param values the values of the time step
13986     def addStep(self, step, stamp, values):
13987         "Adds a time step to the field"
13988         stp = self.field.AddStep( self, step, stamp )
13989         if not stp:
13990             raise RuntimeError("Field.addStep() : Error: step %s already exists in this field"%step)
13991         global geom
13992         geom._autoPublish( stp, "", "Step %s, %s"%(step,stamp))
13993         self.setValues( step, values )
13994         return stp
13995
13996     ## Remove a time step from the field
13997     def removeStep(self,step):
13998         "Remove a time step from the field"
13999         stepSO = None
14000         try:
14001             stepObj = self.field.GetStep( self, step )
14002             if stepObj:
14003                 stepSO = geom.myStudy.FindObjectID( stepObj.GetStudyEntry() )
14004         except:
14005             #import traceback
14006             #traceback.print_exc()
14007             pass
14008         self.field.RemoveStep( self, step )
14009         if stepSO:
14010             geom.myBuilder.RemoveObjectWithChildren( stepSO )
14011         return
14012
14013     ## Returns number of time steps in the field
14014     def countSteps(self):
14015         "Returns number of time steps in the field"
14016         return self.field.CountSteps(self)
14017
14018     ## Returns a list of time step IDs in the field
14019     def getSteps(self):
14020         "Returns a list of time step IDs in the field"
14021         return self.field.GetSteps(self)
14022
14023     ## Returns a time step by its ID
14024     def getStep(self,step):
14025         "Returns a time step by its ID"
14026         stp = self.field.GetStep(self, step)
14027         if not stp:
14028             raise RuntimeError("Step %s is missing from this field"%step)
14029         return stp
14030
14031     ## Returns the time of the field step
14032     def getStamp(self,step):
14033         "Returns the time of the field step"
14034         return self.getStep(step).GetStamp()
14035
14036     ## Changes the time of the field step
14037     def setStamp(self, step, stamp):
14038         "Changes the time of the field step"
14039         return self.getStep(step).SetStamp(stamp)
14040
14041     ## Returns values of the field step
14042     def getValues(self, step):
14043         "Returns values of the field step"
14044         return self.getStep(step).GetValues()
14045
14046     ## Changes values of the field step
14047     def setValues(self, step, values):
14048         "Changes values of the field step"
14049         stp = self.getStep(step)
14050         errBeg = "Field.setValues(values) : Error: "
14051         try:
14052             ok = stp.SetValues( values )
14053         except Exception as e:
14054             excStr = str(e)
14055             if excStr.find("WrongPythonType") > 0:
14056                 raise RuntimeError(errBeg +\
14057                       "wrong type of values, %s values are expected"%str(self.getTypeEnum())[4:])
14058             raise RuntimeError(errBeg + str(e))
14059         if not ok:
14060             nbOK = self.field.GetArraySize(self)
14061             nbKO = len(values)
14062             if nbOK != nbKO:
14063                 raise RuntimeError(errBeg + "len(values) must be %s but not %s"%(nbOK,nbKO))
14064             else:
14065                 raise RuntimeError(errBeg + "failed")
14066         return
14067
14068     pass # end of class geomField
14069
14070 # Register the new proxy for GEOM_Field
14071 omniORB.registerObjref(GEOM._objref_GEOM_Field._NP_RepositoryId, geomField)
14072
14073
14074 ## Create a new geomBuilder instance.The geomBuilder class provides the Python
14075 #  interface to GEOM operations.
14076 #
14077 #  Typical use is:
14078 #  \code
14079 #    import salome
14080 #    salome.salome_init()
14081 #    from salome.geom import geomBuilder
14082 #    geompy = geomBuilder.New()
14083 #  \endcode
14084 #  @param  instance  CORBA proxy of GEOM Engine. If None, the default Engine is used.
14085 #  @return geomBuilder instance
14086 def New( instance=None):
14087     """
14088     Create a new geomBuilder instance.The geomBuilder class provides the Python
14089     interface to GEOM operations.
14090
14091     Typical use is:
14092         import salome
14093         salome.salome_init()
14094         from salome.geom import geomBuilder
14095         geompy = geomBuilder.New()
14096
14097     Parameters:
14098         instance  CORBA proxy of GEOM Engine. If None, the default Engine is used.
14099     Returns:
14100         geomBuilder instance
14101     """
14102     #print "New geomBuilder ", study, instance
14103     global engine
14104     global geom
14105     global doLcc
14106     if instance and isinstance( instance, SALOMEDS._objref_Study ):
14107         import sys
14108         sys.stderr.write("Warning: 'study' argument is no more needed in geomBuilder.New(). Consider updating your script!!!\n\n")
14109         instance = None
14110     engine = instance
14111     if engine is None:
14112       doLcc = True
14113     geom = geomBuilder()
14114     assert isinstance(geom,geomBuilder), "Geom engine class is %s but should be geomBuilder.geomBuilder. Import geomBuilder before creating the instance."%geom.__class__
14115     geom.init_geom()
14116     return geom
14117
14118
14119 # Register methods from the plug-ins in the geomBuilder class 
14120 plugins_var = os.environ.get( "GEOM_PluginsList" )
14121
14122 plugins = None
14123 if plugins_var is not None:
14124     plugins = plugins_var.split( ":" )
14125     plugins=[x for x in plugins if len(x)>0]
14126 if plugins is not None:
14127     for pluginName in plugins:
14128         pluginBuilderName = pluginName + "Builder"
14129         try:
14130             exec( "from salome.%s.%s import *" % (pluginName, pluginBuilderName))
14131         except Exception as e:
14132             from salome_utils import verbose
14133             print("Exception while loading %s: %s" % ( pluginBuilderName, e ))
14134             continue
14135         exec( "from salome.%s import %s" % (pluginName, pluginBuilderName))
14136         plugin = eval( pluginBuilderName )
14137         
14138         # add methods from plugin module to the geomBuilder class
14139         for k in dir( plugin ):
14140             if k[0] == '_': continue
14141             method = getattr( plugin, k )
14142             if type( method ).__name__ == 'function':
14143                 if not hasattr( geomBuilder, k ):
14144                     setattr( geomBuilder, k, method )
14145                 pass
14146             pass
14147         del pluginName
14148         pass
14149     pass