Salome HOME
d10e9118a14fee2328e64ca0c074a042aaf1c256
[modules/geom.git] / src / GEOM_SWIG / geomBuilder.py
1 #  -*- coding: iso-8859-1 -*-
2 # Copyright (C) 2007-2022  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 def PrintOrRaise(message, raiseException=False):
383     if raiseException:
384         raise RuntimeError(message)
385     else:
386         print(message)
387
388 ## Return list of variables value from salome notebook
389 ## @ingroup l1_geomBuilder_auxiliary
390 def ParseParameters(*parameters):
391     Result = []
392     StringResult = []
393     for parameter in parameters:
394         if isinstance(parameter, list):
395             lResults = ParseParameters(*parameter)
396             if len(lResults) > 0:
397                 Result.append(lResults[:-1])
398                 StringResult += lResults[-1].split(":")
399                 pass
400             pass
401         else:
402             if isinstance(parameter,str):
403                 if notebook.isVariable(parameter):
404                     Result.append(notebook.get(parameter))
405                 else:
406                     raise RuntimeError("Variable with name '" + parameter + "' doesn't exist!!!")
407                 pass
408             else:
409                 Result.append(parameter)
410                 pass
411             StringResult.append(str(parameter))
412             pass
413         pass
414     if Result:
415         Result.append(":".join(StringResult))
416     else:
417         Result = ":".join(StringResult)
418     return Result
419
420 ## Return list of variables value from salome notebook
421 ## @ingroup l1_geomBuilder_auxiliary
422 def ParseList(list):
423     Result = []
424     StringResult = ""
425     for parameter in list:
426         if isinstance(parameter,str) and notebook.isVariable(parameter):
427             Result.append(str(notebook.get(parameter)))
428             pass
429         else:
430             Result.append(str(parameter))
431             pass
432
433         StringResult = StringResult + str(parameter)
434         StringResult = StringResult + ":"
435         pass
436     StringResult = StringResult[:len(StringResult)-1]
437     return Result, StringResult
438
439 ## Return list of variables value from salome notebook
440 ## @ingroup l1_geomBuilder_auxiliary
441 def ParseSketcherCommand(command):
442     Result = ""
443     StringResult = ""
444     sections = command.split(":")
445     for section in sections:
446         parameters = section.split(" ")
447         paramIndex = 1
448         for parameter in parameters:
449             if paramIndex > 1 and parameter.find("'") != -1:
450                 parameter = parameter.replace("'","")
451                 if notebook.isVariable(parameter):
452                     Result = Result + str(notebook.get(parameter)) + " "
453                     pass
454                 else:
455                     raise RuntimeError("Variable with name '" + parameter + "' doesn't exist!!!")
456                     pass
457                 pass
458             else:
459                 Result = Result + str(parameter) + " "
460                 pass
461             if paramIndex > 1:
462                 StringResult = StringResult + parameter
463                 StringResult = StringResult + ":"
464                 pass
465             paramIndex = paramIndex + 1
466             pass
467         Result = Result[:len(Result)-1] + ":"
468         pass
469     Result = Result[:len(Result)-1]
470     return Result, StringResult
471
472 ## Helper function which can be used to pack the passed string to the byte data.
473 ## Only '1' an '0' symbols are valid for the string. The missing bits are replaced by zeroes.
474 ## If the string contains invalid symbol (neither '1' nor '0'), the function raises an exception.
475 ## For example,
476 ## \code
477 ## val = PackData("10001110") # val = 0xAE
478 ## val = PackData("1")        # val = 0x80
479 ## \endcode
480 ## @param data unpacked data - a string containing '1' and '0' symbols
481 ## @return data packed to the byte stream
482 ## @ingroup l1_geomBuilder_auxiliary
483 def PackData(data):
484     """
485     Helper function which can be used to pack the passed string to the byte data.
486     Only '1' an '0' symbols are valid for the string. The missing bits are replaced by zeroes.
487     If the string contains invalid symbol (neither '1' nor '0'), the function raises an exception.
488
489     Parameters:
490         data unpacked data - a string containing '1' and '0' symbols
491
492     Returns:
493         data packed to the byte stream
494
495     Example of usage:
496         val = PackData("10001110") # val = 0xAE
497         val = PackData("1")        # val = 0x80
498     """
499     bytes = len(data)/8
500     if len(data)%8: bytes += 1
501     res = ""
502     for b in range(bytes):
503         d = data[b*8:(b+1)*8]
504         val = 0
505         for i in range(8):
506             val *= 2
507             if i < len(d):
508                 if d[i] == "1": val += 1
509                 elif d[i] != "0":
510                     raise "Invalid symbol %s" % d[i]
511                 pass
512             pass
513         res += chr(val)
514         pass
515     return res
516
517 ## Read bitmap texture from the text file.
518 ## In that file, any non-zero symbol represents '1' opaque pixel of the bitmap.
519 ## A zero symbol ('0') represents transparent pixel of the texture bitmap.
520 ## The function returns width and height of the pixmap in pixels and byte stream representing
521 ## texture bitmap itself.
522 ##
523 ## This function can be used to read the texture to the byte stream in order to pass it to
524 ## the AddTexture() function of geomBuilder class.
525 ## For example,
526 ## \code
527 ## from salome.geom import geomBuilder
528 ## geompy = geomBuilder.New()
529 ## texture = geompy.readtexture('mytexture.dat')
530 ## texture = geompy.AddTexture(*texture)
531 ## obj.SetMarkerTexture(texture)
532 ## \endcode
533 ## @param fname texture file name
534 ## @return sequence of tree values: texture's width, height in pixels and its byte stream
535 ## @ingroup l1_geomBuilder_auxiliary
536 def ReadTexture(fname):
537     """
538     Read bitmap texture from the text file.
539     In that file, any non-zero symbol represents '1' opaque pixel of the bitmap.
540     A zero symbol ('0') represents transparent pixel of the texture bitmap.
541     The function returns width and height of the pixmap in pixels and byte stream representing
542     texture bitmap itself.
543     This function can be used to read the texture to the byte stream in order to pass it to
544     the AddTexture() function of geomBuilder class.
545
546     Parameters:
547         fname texture file name
548
549     Returns:
550         sequence of tree values: texture's width, height in pixels and its byte stream
551
552     Example of usage:
553         from salome.geom import geomBuilder
554         geompy = geomBuilder.New()
555         texture = geompy.readtexture('mytexture.dat')
556         texture = geompy.AddTexture(*texture)
557         obj.SetMarkerTexture(texture)
558     """
559     try:
560         f = open(fname)
561         lines = [ l.strip() for l in f.readlines()]
562         f.close()
563         maxlen = 0
564         if lines: maxlen = max([len(x) for x in lines])
565         lenbytes = maxlen/8
566         if maxlen%8: lenbytes += 1
567         bytedata=""
568         for line in lines:
569             if len(line)%8:
570                 lenline = (len(line)/8+1)*8
571                 pass
572             else:
573                 lenline = (len(line)/8)*8
574                 pass
575             for i in range(lenline/8):
576                 byte=""
577                 for j in range(8):
578                     if i*8+j < len(line) and line[i*8+j] != "0": byte += "1"
579                     else: byte += "0"
580                     pass
581                 bytedata += PackData(byte)
582                 pass
583             for i in range(lenline/8, lenbytes):
584                 bytedata += PackData("0")
585             pass
586         return lenbytes*8, len(lines), bytedata
587     except:
588         pass
589     return 0, 0, ""
590
591 ## Returns a long value from enumeration type
592 #  Can be used for CORBA enumerator types like GEOM.shape_type
593 #  @param theItem enumeration type
594 #  @ingroup l1_geomBuilder_auxiliary
595 def EnumToLong(theItem):
596     """
597     Returns a long value from enumeration type
598     Can be used for CORBA enumerator types like geomBuilder.ShapeType
599
600     Parameters:
601         theItem enumeration type
602     """
603     ret = theItem
604     if hasattr(theItem, "_v"): ret = theItem._v
605     return ret
606
607 ## Pack an argument into a list
608 def ToList( arg ):
609     if isinstance( arg, list ):
610         return arg
611     if hasattr( arg, "__getitem__" ):
612         return list( arg )
613     return [ arg ]
614
615 ## Information about closed/unclosed state of shell or wire
616 #  @ingroup l1_geomBuilder_auxiliary
617 class info:
618     """
619     Information about closed/unclosed state of shell or wire
620     """
621     UNKNOWN  = 0
622     CLOSED   = 1
623     UNCLOSED = 2
624
625 ## Private class used to bind calls of plugin operations to geomBuilder
626 class PluginOperation:
627   def __init__(self, operation, function):
628     self.operation = operation
629     self.function = function
630     pass
631
632   @ManageTransactions("operation")
633   def __call__(self, *args):
634     res = self.function(self.operation, *args)
635     RaiseIfFailed(self.function.__name__, self.operation)
636     return res
637
638 # Warning: geom is a singleton
639 geom = None
640 engine = None
641 doLcc = False
642 created = False
643
644 class geomBuilder(GEOM._objref_GEOM_Gen):
645
646         ## Enumeration ShapeType as a dictionary. \n
647         ## Topological types of shapes (like Open Cascade types). See GEOM::shape_type for details.
648         #  @ingroup l1_geomBuilder_auxiliary
649         ShapeType = {"AUTO":-1, "COMPOUND":0, "COMPSOLID":1, "SOLID":2, "SHELL":3, "FACE":4, "WIRE":5, "EDGE":6, "VERTEX":7, "SHAPE":8, "FLAT":9}
650
651         ## Kinds of shape in terms of <VAR>GEOM.GEOM_IKindOfShape.shape_kind</VAR> enumeration
652         #  and a list of parameters, describing the shape.
653         #  List of parameters, describing the shape:
654         #  - COMPOUND:            [nb_solids  nb_faces  nb_edges  nb_vertices]
655         #  - COMPSOLID:           [nb_solids  nb_faces  nb_edges  nb_vertices]
656         #
657         #  - SHELL:       [info.CLOSED / info.UNCLOSED  nb_faces  nb_edges  nb_vertices]
658         #
659         #  - WIRE:        [info.CLOSED / info.UNCLOSED nb_edges  nb_vertices]
660         #
661         #  - SPHERE:       [xc yc zc            R]
662         #  - CYLINDER:     [xb yb zb  dx dy dz  R         H]
663         #  - BOX:          [xc yc zc                      ax ay az]
664         #  - ROTATED_BOX:  [xc yc zc  zx zy zz  xx xy xz  ax ay az]
665         #  - TORUS:        [xc yc zc  dx dy dz  R_1  R_2]
666         #  - CONE:         [xb yb zb  dx dy dz  R_1  R_2  H]
667         #  - POLYHEDRON:                       [nb_faces  nb_edges  nb_vertices]
668         #  - SOLID:                            [nb_faces  nb_edges  nb_vertices]
669         #
670         #  - SPHERE2D:     [xc yc zc            R]
671         #  - CYLINDER2D:   [xb yb zb  dx dy dz  R         H]
672         #  - TORUS2D:      [xc yc zc  dx dy dz  R_1  R_2]
673         #  - CONE2D:       [xc yc zc  dx dy dz  R_1  R_2  H]
674         #  - DISK_CIRCLE:  [xc yc zc  dx dy dz  R]
675         #  - DISK_ELLIPSE: [xc yc zc  dx dy dz  R_1  R_2]
676         #  - POLYGON:      [xo yo zo  dx dy dz            nb_edges  nb_vertices]
677         #  - PLANE:        [xo yo zo  dx dy dz]
678         #  - PLANAR:       [xo yo zo  dx dy dz            nb_edges  nb_vertices]
679         #  - FACE:                                       [nb_edges  nb_vertices]
680         #
681         #  - CIRCLE:       [xc yc zc  dx dy dz  R]
682         #  - ARC_CIRCLE:   [xc yc zc  dx dy dz  R         x1 y1 z1  x2 y2 z2]
683         #  - ELLIPSE:      [xc yc zc  dx dy dz  R_1  R_2]
684         #  - ARC_ELLIPSE:  [xc yc zc  dx dy dz  R_1  R_2  x1 y1 z1  x2 y2 z2]
685         #  - LINE:         [xo yo zo  dx dy dz]
686         #  - SEGMENT:      [x1 y1 z1  x2 y2 z2]
687         #  - EDGE:                                                 [nb_vertices]
688         #
689         #  - VERTEX:       [x  y  z]
690         #
691         #  - LCS:          [x y z  xx xy xz  yx yy yz  zx zy zz]
692         #  @ingroup l1_geomBuilder_auxiliary
693         kind = GEOM.GEOM_IKindOfShape
694
695         def __new__(cls, *args):
696             global engine
697             global geom
698             global doLcc
699             global created
700             #print "==== __new__ ", engine, geom, doLcc, created
701             if geom is None:
702                 # geom engine is either retrieved from engine, or created
703                 geom = engine
704                 # Following test avoids a recursive loop
705                 if doLcc:
706                     if geom is not None:
707                         # geom engine not created: existing engine found
708                         doLcc = False
709                     if doLcc and not created:
710                         doLcc = False
711                         # FindOrLoadComponent called:
712                         # 1. CORBA resolution of server
713                         # 2. the __new__ method is called again
714                         #print "==== FindOrLoadComponent ", engine, geom, doLcc, created
715                         geom = lcc.FindOrLoadComponent( "FactoryServer", "GEOM" )
716                         #print "====1 ",geom
717                 else:
718                     # FindOrLoadComponent not called
719                     if geom is None:
720                         # geomBuilder instance is created from lcc.FindOrLoadComponent
721                         #print "==== super ", engine, geom, doLcc, created
722                         geom = super(geomBuilder,cls).__new__(cls)
723                         #print "====2 ",geom
724                     else:
725                         # geom engine not created: existing engine found
726                         #print "==== existing ", engine, geom, doLcc, created
727                         pass
728                 #print "return geom 1 ", geom
729                 return geom
730
731             #print "return geom 2 ", geom
732             return geom
733
734         def __init__(self, *args):
735             global created
736             #print "-------- geomBuilder __init__ --- ", created, self
737             if not created:
738               created = True
739               GEOM._objref_GEOM_Gen.__init__(self, *args)
740               self.myMaxNbSubShapesAllowed = 0 # auto-publishing is disabled by default
741               self.myBuilder = None
742               self.BasicOp  = None
743               self.CurvesOp = None
744               self.PrimOp   = None
745               self.ShapesOp = None
746               self.HealOp   = None
747               self.InsertOp = None
748               self.BoolOp   = None
749               self.TrsfOp   = None
750               self.LocalOp  = None
751               self.MeasuOp  = None
752               self.BlocksOp = None
753               self.GroupOp  = None
754               self.FieldOp  = None
755               self.TestOp   = None
756             pass
757
758         ## Process object publication in the study, as follows:
759         #  - if @a theName is specified (not None), the object is published in the study
760         #    with this name, not taking into account "auto-publishing" option;
761         #  - if @a theName is NOT specified, the object is published in the study
762         #    (using default name, which can be customized using @a theDefaultName parameter)
763         #    only if auto-publishing is switched on.
764         #
765         #  @param theObj  object, a subject for publishing
766         #  @param theName object name for study
767         #  @param theDefaultName default name for the auto-publishing
768         #
769         #  @sa addToStudyAuto()
770         def _autoPublish(self, theObj, theName, theDefaultName="noname"):
771             # ---
772             def _item_name(_names, _defname, _idx=-1):
773                 if not _names: _names = _defname
774                 if type(_names) in [list, tuple]:
775                     if _idx >= 0:
776                         if _idx >= len(_names) or not _names[_idx]:
777                             if type(_defname) not in [list, tuple]:
778                                 _name = "%s_%d"%(_defname, _idx+1)
779                             elif len(_defname) > 0 and _idx >= 0 and _idx < len(_defname):
780                                 _name = _defname[_idx]
781                             else:
782                                 _name = "%noname_%d"%(dn, _idx+1)
783                             pass
784                         else:
785                             _name = _names[_idx]
786                         pass
787                     else:
788                         # must be wrong  usage
789                         _name = _names[0]
790                     pass
791                 else:
792                     if _idx >= 0:
793                         _name = "%s_%d"%(_names, _idx+1)
794                     else:
795                         _name = _names
796                     pass
797                 return _name
798             # ---
799             def _publish( _name, _obj ):
800                 fatherObj = None
801                 if isinstance( _obj, GEOM._objref_GEOM_Field ):
802                     fatherObj = _obj.GetShape()
803                 elif isinstance( _obj, GEOM._objref_GEOM_FieldStep ):
804                     fatherObj = _obj.GetField()
805                 elif not _obj.IsMainShape():
806                     fatherObj = _obj.GetMainShape()
807                     pass
808                 if fatherObj and fatherObj.GetStudyEntry():
809                     self.addToStudyInFather(fatherObj, _obj, _name)
810                 else:
811                     self.addToStudy(_obj, _name)
812                     pass
813                 return
814             # ---
815             if not theObj:
816                 return # null object
817             if not theName and not self.myMaxNbSubShapesAllowed:
818                 return # nothing to do: auto-publishing is disabled
819             if not theName and not theDefaultName:
820                 return # neither theName nor theDefaultName is given
821             import types
822             if type(theObj) in [list, tuple]:
823                 # list of objects is being published
824                 idx = 0
825                 for obj in theObj:
826                     if not obj: continue # bad object
827                     name = _item_name(theName, theDefaultName, idx)
828                     _publish( name, obj )
829                     idx = idx+1
830                     if not theName and idx == self.myMaxNbSubShapesAllowed: break
831                     pass
832                 pass
833             else:
834                 # single object is published
835                 name = _item_name(theName, theDefaultName)
836                 _publish( name, theObj )
837             pass
838
839         ## @addtogroup l1_geomBuilder_auxiliary
840         ## @{
841         def init_geom(self):
842             self.myStudy = salome.myStudy
843             self.myBuilder = self.myStudy.NewBuilder()
844
845             # load data from the study file, if necessary
846             component = self.myStudy.FindComponent("GEOM")
847             if component:
848                 self.myBuilder.LoadWith(component, self)
849
850             self.BasicOp  = self.GetIBasicOperations    ()
851             self.CurvesOp = self.GetICurvesOperations   ()
852             self.PrimOp   = self.GetI3DPrimOperations   ()
853             self.ShapesOp = self.GetIShapesOperations   ()
854             self.HealOp   = self.GetIHealingOperations  ()
855             self.InsertOp = self.GetIInsertOperations   ()
856             self.BoolOp   = self.GetIBooleanOperations  ()
857             self.TrsfOp   = self.GetITransformOperations()
858             self.LocalOp  = self.GetILocalOperations    ()
859             self.MeasuOp  = self.GetIMeasureOperations  ()
860             self.BlocksOp = self.GetIBlocksOperations   ()
861             self.GroupOp  = self.GetIGroupOperations    ()
862             self.FieldOp  = self.GetIFieldOperations    ()
863             self.TestOp   = self.GetITestOperations     ()
864
865             notebook.myStudy = self.myStudy
866             pass
867
868         def GetPluginOperations(self, libraryName):
869             op = GEOM._objref_GEOM_Gen.GetPluginOperations(self, libraryName)
870             return op
871
872         ## Enable / disable results auto-publishing
873         #
874         #  The automatic publishing is managed in the following way:
875         #  - if @a maxNbSubShapes = 0, automatic publishing is disabled.
876         #  - if @a maxNbSubShapes = -1 (default), automatic publishing is enabled and
877         #  maximum number of sub-shapes allowed for publishing is unlimited; any negative
878         #  value passed as parameter has the same effect.
879         #  - if @a maxNbSubShapes is any positive value, automatic publishing is enabled and
880         #  maximum number of sub-shapes allowed for publishing is set to specified value.
881         #
882         #  @param maxNbSubShapes maximum number of sub-shapes allowed for publishing.
883         #  @ingroup l1_publish_data
884         def addToStudyAuto(self, maxNbSubShapes=-1):
885             """
886             Enable / disable results auto-publishing
887
888             The automatic publishing is managed in the following way:
889             - if @a maxNbSubShapes = 0, automatic publishing is disabled;
890             - if @a maxNbSubShapes = -1 (default), automatic publishing is enabled and
891             maximum number of sub-shapes allowed for publishing is unlimited; any negative
892             value passed as parameter has the same effect.
893             - if @a maxNbSubShapes is any positive value, automatic publishing is enabled and
894             maximum number of sub-shapes allowed for publishing is set to this value.
895
896             Parameters:
897                 maxNbSubShapes maximum number of sub-shapes allowed for publishing.
898
899             Example of usage:
900                 geompy.addToStudyAuto()   # enable auto-publishing
901                 geompy.MakeBoxDXDYDZ(100) # box is created and published with default name
902                 geompy.addToStudyAuto(0)  # disable auto-publishing
903             """
904             self.myMaxNbSubShapesAllowed = max(-1, maxNbSubShapes)
905             pass
906
907         ## Dump component to the Python script
908         #  This method overrides IDL function to allow default values for the parameters.
909         def DumpPython(self, theIsPublished=True, theIsMultiFile=True):
910             """
911             Dump component to the Python script
912             This method overrides IDL function to allow default values for the parameters.
913             """
914             return GEOM._objref_GEOM_Gen.DumpPython(self, theIsPublished, theIsMultiFile)
915
916         ## Get name for sub-shape aSubObj of shape aMainObj
917         #
918         # @ref swig_SubShapeName "Example"
919         @ManageTransactions("ShapesOp")
920         def SubShapeName(self,aSubObj, aMainObj):
921             """
922             Get name for sub-shape aSubObj of shape aMainObj
923             """
924             # Example: see GEOM_TestAll.py
925
926             #aSubId  = orb.object_to_string(aSubObj)
927             #aMainId = orb.object_to_string(aMainObj)
928             #index = gg.getIndexTopology(aSubId, aMainId)
929             #name = gg.getShapeTypeString(aSubId) + "_%d"%(index)
930             index = self.ShapesOp.GetTopologyIndex(aMainObj, aSubObj)
931             name = self.ShapesOp.GetShapeTypeString(aSubObj) + "_%d"%(index)
932             return name
933
934         ## Publish in study aShape with name aName
935         #
936         #  \param aShape the shape to be published
937         #  \param aName  the name for the shape
938         #  \param doRestoreSubShapes if True, finds and publishes also
939         #         sub-shapes of <VAR>aShape</VAR>, corresponding to its arguments
940         #         and published sub-shapes of arguments
941         #  \param theArgs,theFindMethod,theInheritFirstArg see RestoreSubShapes() for
942         #                                                  these arguments description
943         #  \return study entry of the published shape in form of string
944         #
945         #  @ingroup l1_publish_data
946         #  @ref swig_all_addtostudy "Example"
947         def addToStudy(self, aShape, aName, doRestoreSubShapes=False,
948                        theArgs=[], theFindMethod=GEOM.FSM_GetInPlace, theInheritFirstArg=False):
949             """
950             Publish in study aShape with name aName
951
952             Parameters:
953                 aShape the shape to be published
954                 aName  the name for the shape
955                 doRestoreSubShapes if True, finds and publishes also
956                                    sub-shapes of aShape, corresponding to its arguments
957                                    and published sub-shapes of arguments
958                 theArgs,theFindMethod,theInheritFirstArg see geompy.RestoreSubShapes() for
959                                                          these arguments description
960
961             Returns:
962                 study entry of the published shape in form of string
963
964             Example of usage:
965                 id_block1 = geompy.addToStudy(Block1, "Block 1")
966             """
967             # Example: see GEOM_TestAll.py
968             try:
969                 aSObject = self.AddInStudy(aShape, aName, None)
970                 if aSObject and aName: aSObject.SetAttrString("AttributeName", aName)
971                 if doRestoreSubShapes:
972                     self.RestoreSubShapesSO(aSObject, theArgs,
973                                             theFindMethod, theInheritFirstArg, True )
974             except:
975                 print("addToStudy() failed")
976                 return ""
977             return aShape.GetStudyEntry()
978
979         ## Publish in study aShape with name aName as sub-object of previously published aFather
980         #  \param aFather previously published object
981         #  \param aShape the shape to be published as sub-object of <VAR>aFather</VAR>
982         #  \param aName  the name for the shape
983         #
984         #  \return study entry of the published shape in form of string
985         #
986         #  @ingroup l1_publish_data
987         #  @ref swig_all_addtostudyInFather "Example"
988         def addToStudyInFather(self, aFather, aShape, aName):
989             """
990             Publish in study aShape with name aName as sub-object of previously published aFather
991
992             Parameters:
993                 aFather previously published object
994                 aShape the shape to be published as sub-object of aFather
995                 aName  the name for the shape
996
997             Returns:
998                 study entry of the published shape in form of string
999             """
1000             # Example: see GEOM_TestAll.py
1001             try:
1002                 aSObject = self.AddInStudy(aShape, aName, aFather)
1003                 if aSObject and aName: aSObject.SetAttrString("AttributeName", aName)
1004             except:
1005                 print("addToStudyInFather() failed")
1006                 return ""
1007             return aShape.GetStudyEntry()
1008
1009         ## Unpublish object in study
1010         #
1011         #  \param obj the object to be unpublished
1012         def hideInStudy(self, obj):
1013             """
1014             Unpublish object in study
1015
1016             Parameters:
1017                 obj the object to be unpublished
1018             """
1019             ior = salome.orb.object_to_string(obj)
1020             aSObject = self.myStudy.FindObjectIOR(ior)
1021             if aSObject is not None:
1022                 genericAttribute = self.myBuilder.FindOrCreateAttribute(aSObject, "AttributeDrawable")
1023                 drwAttribute = genericAttribute._narrow(SALOMEDS.AttributeDrawable)
1024                 drwAttribute.SetDrawable(False)
1025                 # hide references if any
1026                 vso = self.myStudy.FindDependances(aSObject);
1027                 for refObj in vso :
1028                     genericAttribute = self.myBuilder.FindOrCreateAttribute(refObj, "AttributeDrawable")
1029                     drwAttribute = genericAttribute._narrow(SALOMEDS.AttributeDrawable)
1030                     drwAttribute.SetDrawable(False)
1031                     pass
1032                 pass
1033
1034         # end of l1_geomBuilder_auxiliary
1035         ## @}
1036
1037         ## @addtogroup l3_restore_ss
1038         ## @{
1039
1040         ## Publish sub-shapes, standing for arguments and sub-shapes of arguments
1041         #  To be used from python scripts out of addToStudy() (non-default usage)
1042         #  \param theObject published GEOM.GEOM_Object, arguments of which will be published
1043         #  \param theArgs   list of GEOM.GEOM_Object, operation arguments to be published.
1044         #                   If this list is empty, all operation arguments will be published
1045         #  \param theFindMethod method to search sub-shapes, corresponding to arguments and
1046         #                       their sub-shapes. Value from enumeration GEOM.find_shape_method.
1047         #  \param theInheritFirstArg set properties of the first argument for <VAR>theObject</VAR>.
1048         #                            Do not publish sub-shapes in place of arguments, but only
1049         #                            in place of sub-shapes of the first argument,
1050         #                            because the whole shape corresponds to the first argument.
1051         #                            Mainly to be used after transformations, but it also can be
1052         #                            useful after partition with one object shape, and some other
1053         #                            operations, where only the first argument has to be considered.
1054         #                            If theObject has only one argument shape, this flag is automatically
1055         #                            considered as True, not regarding really passed value.
1056         #  \param theAddPrefix add prefix "from_" to names of restored sub-shapes,
1057         #                      and prefix "from_subshapes_of_" to names of partially restored sub-shapes.
1058         #  \return list of published sub-shapes
1059         #
1060         #  @ref tui_restore_prs_params "Example"
1061         def RestoreSubShapes (self, theObject, theArgs=[], theFindMethod=GEOM.FSM_GetInPlace,
1062                               theInheritFirstArg=False, theAddPrefix=True):
1063             """
1064             Publish sub-shapes, standing for arguments and sub-shapes of arguments
1065             To be used from python scripts out of geompy.addToStudy (non-default usage)
1066
1067             Parameters:
1068                 theObject published GEOM.GEOM_Object, arguments of which will be published
1069                 theArgs   list of GEOM.GEOM_Object, operation arguments to be published.
1070                           If this list is empty, all operation arguments will be published
1071                 theFindMethod method to search sub-shapes, corresponding to arguments and
1072                               their sub-shapes. Value from enumeration GEOM.find_shape_method.
1073                 theInheritFirstArg set properties of the first argument for theObject.
1074                                    Do not publish sub-shapes in place of arguments, but only
1075                                    in place of sub-shapes of the first argument,
1076                                    because the whole shape corresponds to the first argument.
1077                                    Mainly to be used after transformations, but it also can be
1078                                    useful after partition with one object shape, and some other
1079                                    operations, where only the first argument has to be considered.
1080                                    If theObject has only one argument shape, this flag is automatically
1081                                    considered as True, not regarding really passed value.
1082                 theAddPrefix add prefix "from_" to names of restored sub-shapes,
1083                              and prefix "from_subshapes_of_" to names of partially restored sub-shapes.
1084             Returns:
1085                 list of published sub-shapes
1086             """
1087             # Example: see GEOM_TestAll.py
1088             return self.RestoreSubShapesO(theObject, theArgs,
1089                                           theFindMethod, theInheritFirstArg, theAddPrefix)
1090
1091         ## Publish sub-shapes, standing for arguments and sub-shapes of arguments
1092         #  To be used from python scripts out of addToStudy() (non-default usage)
1093         #  \param theObject published GEOM.GEOM_Object, arguments of which will be published
1094         #  \param theArgs   list of GEOM.GEOM_Object, operation arguments to be published.
1095         #                   If this list is empty, all operation arguments will be published
1096         #  \param theFindMethod method to search sub-shapes, corresponding to arguments and
1097         #                       their sub-shapes. Value from enumeration GEOM::find_shape_method.
1098         #  \param theInheritFirstArg set properties of the first argument for <VAR>theObject</VAR>.
1099         #                            Do not publish sub-shapes in place of arguments, but only
1100         #                            in place of sub-shapes of the first argument,
1101         #                            because the whole shape corresponds to the first argument.
1102         #                            Mainly to be used after transformations, but it also can be
1103         #                            useful after partition with one object shape, and some other
1104         #                            operations, where only the first argument has to be considered.
1105         #                            If theObject has only one argument shape, this flag is automatically
1106         #                            considered as True, not regarding really passed value.
1107         #  \param theAddPrefix add prefix "from_" to names of restored sub-shapes,
1108         #                      and prefix "from_subshapes_of_" to names of partially restored sub-shapes.
1109         #  \return list of published sub-shapes
1110         #
1111         #  @ref tui_restore_prs_params "Example"
1112         def RestoreGivenSubShapes (self, theObject, theArgs=[], theFindMethod=GEOM.FSM_GetInPlace,
1113                                    theInheritFirstArg=False, theAddPrefix=True):
1114             """
1115             Publish sub-shapes, standing for arguments and sub-shapes of arguments
1116             To be used from python scripts out of geompy.addToStudy() (non-default usage)
1117
1118             Parameters:
1119                 theObject published GEOM.GEOM_Object, arguments of which will be published
1120                 theArgs   list of GEOM.GEOM_Object, operation arguments to be published.
1121                           If this list is empty, all operation arguments will be published
1122                 theFindMethod method to search sub-shapes, corresponding to arguments and
1123                               their sub-shapes. Value from enumeration GEOM::find_shape_method.
1124                 theInheritFirstArg set properties of the first argument for theObject.
1125                                    Do not publish sub-shapes in place of arguments, but only
1126                                    in place of sub-shapes of the first argument,
1127                                    because the whole shape corresponds to the first argument.
1128                                    Mainly to be used after transformations, but it also can be
1129                                    useful after partition with one object shape, and some other
1130                                    operations, where only the first argument has to be considered.
1131                                    If theObject has only one argument shape, this flag is automatically
1132                                    considered as True, not regarding really passed value.
1133                 theAddPrefix add prefix "from_" to names of restored sub-shapes,
1134                              and prefix "from_subshapes_of_" to names of partially restored sub-shapes.
1135
1136             Returns:
1137                 list of published sub-shapes
1138             """
1139             # Example: see GEOM_TestAll.py
1140             return self.RestoreGivenSubShapesO(theObject, theArgs,
1141                                                theFindMethod, theInheritFirstArg, theAddPrefix)
1142
1143         # end of l3_restore_ss
1144         ## @}
1145
1146         ## @addtogroup l3_basic_go
1147         ## @{
1148
1149         ## Create point by three coordinates.
1150         #  @param theX The X coordinate of the point.
1151         #  @param theY The Y coordinate of the point.
1152         #  @param theZ The Z coordinate of the point.
1153         #  @param theName Object name; when specified, this parameter is used
1154         #         for result publication in the study. Otherwise, if automatic
1155         #         publication is switched on, default value is used for result name.
1156         #
1157         #  @return New GEOM.GEOM_Object, containing the created point.
1158         #
1159         #  @ref tui_creation_point "Example"
1160         @ManageTransactions("BasicOp")
1161         def MakeVertex(self, theX, theY, theZ, theName=None):
1162             """
1163             Create point by three coordinates.
1164
1165             Parameters:
1166                 theX The X coordinate of the point.
1167                 theY The Y coordinate of the point.
1168                 theZ The Z coordinate of the point.
1169                 theName Object name; when specified, this parameter is used
1170                         for result publication in the study. Otherwise, if automatic
1171                         publication is switched on, default value is used for result name.
1172
1173             Returns:
1174                 New GEOM.GEOM_Object, containing the created point.
1175             """
1176             # Example: see GEOM_TestAll.py
1177             theX,theY,theZ,Parameters = ParseParameters(theX, theY, theZ)
1178             anObj = self.BasicOp.MakePointXYZ(theX, theY, theZ)
1179             RaiseIfFailed("MakePointXYZ", self.BasicOp)
1180             anObj.SetParameters(Parameters)
1181             self._autoPublish(anObj, theName, "vertex")
1182             return anObj
1183
1184         ## Create a point, distant from the referenced point
1185         #  on the given distances along the coordinate axes.
1186         #  @param theReference The referenced point.
1187         #  @param theX Displacement from the referenced point along OX axis.
1188         #  @param theY Displacement from the referenced point along OY axis.
1189         #  @param theZ Displacement from the referenced point along OZ axis.
1190         #  @param theName Object name; when specified, this parameter is used
1191         #         for result publication in the study. Otherwise, if automatic
1192         #         publication is switched on, default value is used for result name.
1193         #
1194         #  @return New GEOM.GEOM_Object, containing the created point.
1195         #
1196         #  @ref tui_creation_point "Example"
1197         @ManageTransactions("BasicOp")
1198         def MakeVertexWithRef(self, theReference, theX, theY, theZ, theName=None):
1199             """
1200             Create a point, distant from the referenced point
1201             on the given distances along the coordinate axes.
1202
1203             Parameters:
1204                 theReference The referenced point.
1205                 theX Displacement from the referenced point along OX axis.
1206                 theY Displacement from the referenced point along OY axis.
1207                 theZ Displacement from the referenced point along OZ axis.
1208                 theName Object name; when specified, this parameter is used
1209                         for result publication in the study. Otherwise, if automatic
1210                         publication is switched on, default value is used for result name.
1211
1212             Returns:
1213                 New GEOM.GEOM_Object, containing the created point.
1214             """
1215             # Example: see GEOM_TestAll.py
1216             theX,theY,theZ,Parameters = ParseParameters(theX, theY, theZ)
1217             anObj = self.BasicOp.MakePointWithReference(theReference, theX, theY, theZ)
1218             RaiseIfFailed("MakePointWithReference", self.BasicOp)
1219             anObj.SetParameters(Parameters)
1220             self._autoPublish(anObj, theName, "vertex")
1221             return anObj
1222
1223         ## Create a point, corresponding to the given parameter on the given curve.
1224         #  @param theRefCurve The referenced curve.
1225         #  @param theParameter Value of parameter on the referenced curve.
1226         #  @param takeOrientationIntoAccount flag that tells if it is necessary
1227         #         to take the curve's orientation into account for the
1228         #         operation. I.e. if this flag is set, the results for the same
1229         #         parameters (except the value 0.5) is different for forward
1230         #         and reversed curves. If it is not set the result is the same.
1231         #  @param theName Object name; when specified, this parameter is used
1232         #         for result publication in the study. Otherwise, if automatic
1233         #         publication is switched on, default value is used for result name.
1234         #
1235         #  @return New GEOM.GEOM_Object, containing the created point.
1236         #
1237         #  @ref tui_creation_point "Example"
1238         @ManageTransactions("BasicOp")
1239         def MakeVertexOnCurve(self, theRefCurve, theParameter,
1240                               takeOrientationIntoAccount=False, theName=None):
1241             """
1242             Create a point, corresponding to the given parameter on the given curve.
1243
1244             Parameters:
1245                 theRefCurve The referenced curve.
1246                 theParameter Value of parameter on the referenced curve.
1247                 takeOrientationIntoAccount flag that tells if it is necessary
1248                         to take the curve's orientation into account for the
1249                         operation. I.e. if this flag is set, the results for
1250                         the same parameters (except the value 0.5) is different
1251                         for forward and reversed curves. If it is not set
1252                         the result is the same.
1253                 theName Object name; when specified, this parameter is used
1254                         for result publication in the study. Otherwise, if automatic
1255                         publication is switched on, default value is used for result name.
1256
1257             Returns:
1258                 New GEOM.GEOM_Object, containing the created point.
1259
1260             Example of usage:
1261                 p_on_arc = geompy.MakeVertexOnCurve(Arc, 0.25)
1262             """
1263             # Example: see GEOM_TestAll.py
1264             theParameter, takeOrientationIntoAccount, Parameters = ParseParameters(
1265                 theParameter, takeOrientationIntoAccount)
1266             anObj = self.BasicOp.MakePointOnCurve(theRefCurve, theParameter,
1267                                                   takeOrientationIntoAccount)
1268             RaiseIfFailed("MakePointOnCurve", self.BasicOp)
1269             anObj.SetParameters(Parameters)
1270             self._autoPublish(anObj, theName, "vertex")
1271             return anObj
1272
1273         ## Create a point by projection give coordinates on the given curve
1274         #  @param theRefCurve The referenced curve.
1275         #  @param theX X-coordinate in 3D space
1276         #  @param theY Y-coordinate in 3D space
1277         #  @param theZ Z-coordinate in 3D space
1278         #  @param theName Object name; when specified, this parameter is used
1279         #         for result publication in the study. Otherwise, if automatic
1280         #         publication is switched on, default value is used for result name.
1281         #
1282         #  @return New GEOM.GEOM_Object, containing the created point.
1283         #
1284         #  @ref tui_creation_point "Example"
1285         @ManageTransactions("BasicOp")
1286         def MakeVertexOnCurveByCoord(self, theRefCurve, theX, theY, theZ, theName=None):
1287             """
1288             Create a point by projection give coordinates on the given curve
1289
1290             Parameters:
1291                 theRefCurve The referenced curve.
1292                 theX X-coordinate in 3D space
1293                 theY Y-coordinate in 3D space
1294                 theZ Z-coordinate in 3D space
1295                 theName Object name; when specified, this parameter is used
1296                         for result publication in the study. Otherwise, if automatic
1297                         publication is switched on, default value is used for result name.
1298
1299             Returns:
1300                 New GEOM.GEOM_Object, containing the created point.
1301
1302             Example of usage:
1303                 p_on_arc3 = geompy.MakeVertexOnCurveByCoord(Arc, 100, -10, 10)
1304             """
1305             # Example: see GEOM_TestAll.py
1306             theX, theY, theZ, Parameters = ParseParameters(theX, theY, theZ)
1307             anObj = self.BasicOp.MakePointOnCurveByCoord(theRefCurve, theX, theY, theZ)
1308             RaiseIfFailed("MakeVertexOnCurveByCoord", self.BasicOp)
1309             anObj.SetParameters(Parameters)
1310             self._autoPublish(anObj, theName, "vertex")
1311             return anObj
1312
1313         ## Create a point, corresponding to the given length on the given curve.
1314         #  @param theRefCurve The referenced curve.
1315         #  @param theLength Length on the referenced curve. It can be negative.
1316         #  @param theStartPoint Point allowing to choose the direction for the calculation
1317         #                       of the length. If None, start from the first point of theRefCurve.
1318         #  @param theName Object name; when specified, this parameter is used
1319         #         for result publication in the study. Otherwise, if automatic
1320         #         publication is switched on, default value is used for result name.
1321         #
1322         #  @return New GEOM.GEOM_Object, containing the created point.
1323         #
1324         #  @ref tui_creation_point "Example"
1325         @ManageTransactions("BasicOp")
1326         def MakeVertexOnCurveByLength(self, theRefCurve, theLength, theStartPoint = None, theName=None):
1327             """
1328             Create a point, corresponding to the given length on the given curve.
1329
1330             Parameters:
1331                 theRefCurve The referenced curve.
1332                 theLength Length on the referenced curve. It can be negative.
1333                 theStartPoint Point allowing to choose the direction for the calculation
1334                               of the length. If None, start from the first point of theRefCurve.
1335                 theName Object name; when specified, this parameter is used
1336                         for result publication in the study. Otherwise, if automatic
1337                         publication is switched on, default value is used for result name.
1338
1339             Returns:
1340                 New GEOM.GEOM_Object, containing the created point.
1341             """
1342             # Example: see GEOM_TestAll.py
1343             theLength, Parameters = ParseParameters(theLength)
1344             anObj = self.BasicOp.MakePointOnCurveByLength(theRefCurve, theLength, theStartPoint)
1345             RaiseIfFailed("MakePointOnCurveByLength", self.BasicOp)
1346             anObj.SetParameters(Parameters)
1347             self._autoPublish(anObj, theName, "vertex")
1348             return anObj
1349
1350         ## Create a point, corresponding to the given parameters on the
1351         #    given surface.
1352         #  @param theRefSurf The referenced surface.
1353         #  @param theUParameter Value of U-parameter on the referenced surface.
1354         #  @param theVParameter Value of V-parameter on the referenced surface.
1355         #  @param theName Object name; when specified, this parameter is used
1356         #         for result publication in the study. Otherwise, if automatic
1357         #         publication is switched on, default value is used for result name.
1358         #
1359         #  @return New GEOM.GEOM_Object, containing the created point.
1360         #
1361         #  @ref swig_MakeVertexOnSurface "Example"
1362         @ManageTransactions("BasicOp")
1363         def MakeVertexOnSurface(self, theRefSurf, theUParameter, theVParameter, theName=None):
1364             """
1365             Create a point, corresponding to the given parameters on the
1366             given surface.
1367
1368             Parameters:
1369                 theRefSurf The referenced surface.
1370                 theUParameter Value of U-parameter on the referenced surface.
1371                 theVParameter Value of V-parameter on the referenced surface.
1372                 theName Object name; when specified, this parameter is used
1373                         for result publication in the study. Otherwise, if automatic
1374                         publication is switched on, default value is used for result name.
1375
1376             Returns:
1377                 New GEOM.GEOM_Object, containing the created point.
1378
1379             Example of usage:
1380                 p_on_face = geompy.MakeVertexOnSurface(Face, 0.1, 0.8)
1381             """
1382             theUParameter, theVParameter, Parameters = ParseParameters(theUParameter, theVParameter)
1383             # Example: see GEOM_TestAll.py
1384             anObj = self.BasicOp.MakePointOnSurface(theRefSurf, theUParameter, theVParameter)
1385             RaiseIfFailed("MakePointOnSurface", self.BasicOp)
1386             anObj.SetParameters(Parameters);
1387             self._autoPublish(anObj, theName, "vertex")
1388             return anObj
1389
1390         ## Create a point by projection give coordinates on the given surface
1391         #  @param theRefSurf The referenced surface.
1392         #  @param theX X-coordinate in 3D space
1393         #  @param theY Y-coordinate in 3D space
1394         #  @param theZ Z-coordinate in 3D space
1395         #  @param theName Object name; when specified, this parameter is used
1396         #         for result publication in the study. Otherwise, if automatic
1397         #         publication is switched on, default value is used for result name.
1398         #
1399         #  @return New GEOM.GEOM_Object, containing the created point.
1400         #
1401         #  @ref swig_MakeVertexOnSurfaceByCoord "Example"
1402         @ManageTransactions("BasicOp")
1403         def MakeVertexOnSurfaceByCoord(self, theRefSurf, theX, theY, theZ, theName=None):
1404             """
1405             Create a point by projection give coordinates on the given surface
1406
1407             Parameters:
1408                 theRefSurf The referenced surface.
1409                 theX X-coordinate in 3D space
1410                 theY Y-coordinate in 3D space
1411                 theZ Z-coordinate in 3D space
1412                 theName Object name; when specified, this parameter is used
1413                         for result publication in the study. Otherwise, if automatic
1414                         publication is switched on, default value is used for result name.
1415
1416             Returns:
1417                 New GEOM.GEOM_Object, containing the created point.
1418
1419             Example of usage:
1420                 p_on_face2 = geompy.MakeVertexOnSurfaceByCoord(Face, 0., 0., 0.)
1421             """
1422             theX, theY, theZ, Parameters = ParseParameters(theX, theY, theZ)
1423             # Example: see GEOM_TestAll.py
1424             anObj = self.BasicOp.MakePointOnSurfaceByCoord(theRefSurf, theX, theY, theZ)
1425             RaiseIfFailed("MakeVertexOnSurfaceByCoord", self.BasicOp)
1426             anObj.SetParameters(Parameters);
1427             self._autoPublish(anObj, theName, "vertex")
1428             return anObj
1429
1430         ## Create a point, which lays on the given face.
1431         #  The point will lay in arbitrary place of the face.
1432         #  The only condition on it is a non-zero distance to the face boundary.
1433         #  Such point can be used to uniquely identify the face inside any
1434         #  shape in case, when the shape does not contain overlapped faces.
1435         #  @param theFace The referenced face.
1436         #  @param theName Object name; when specified, this parameter is used
1437         #         for result publication in the study. Otherwise, if automatic
1438         #         publication is switched on, default value is used for result name.
1439         #
1440         #  @return New GEOM.GEOM_Object, containing the created point.
1441         #
1442         #  @ref swig_MakeVertexInsideFace "Example"
1443         @ManageTransactions("BasicOp")
1444         def MakeVertexInsideFace (self, theFace, theName=None):
1445             """
1446             Create a point, which lays on the given face.
1447             The point will lay in arbitrary place of the face.
1448             The only condition on it is a non-zero distance to the face boundary.
1449             Such point can be used to uniquely identify the face inside any
1450             shape in case, when the shape does not contain overlapped faces.
1451
1452             Parameters:
1453                 theFace The referenced face.
1454                 theName Object name; when specified, this parameter is used
1455                         for result publication in the study. Otherwise, if automatic
1456                         publication is switched on, default value is used for result name.
1457
1458             Returns:
1459                 New GEOM.GEOM_Object, containing the created point.
1460
1461             Example of usage:
1462                 p_on_face = geompy.MakeVertexInsideFace(Face)
1463             """
1464             # Example: see GEOM_TestAll.py
1465             anObj = self.BasicOp.MakePointOnFace(theFace)
1466             RaiseIfFailed("MakeVertexInsideFace", self.BasicOp)
1467             self._autoPublish(anObj, theName, "vertex")
1468             return anObj
1469
1470         ## Create a point on intersection of two lines.
1471         #  @param theRefLine1, theRefLine2 The referenced lines.
1472         #  @param theName Object name; when specified, this parameter is used
1473         #         for result publication in the study. Otherwise, if automatic
1474         #         publication is switched on, default value is used for result name.
1475         #
1476         #  @return New GEOM.GEOM_Object, containing the created point.
1477         #
1478         #  @ref swig_MakeVertexOnLinesIntersection "Example"
1479         @ManageTransactions("BasicOp")
1480         def MakeVertexOnLinesIntersection(self, theRefLine1, theRefLine2, theName=None):
1481             """
1482             Create a point on intersection of two lines.
1483
1484             Parameters:
1485                 theRefLine1, theRefLine2 The referenced lines.
1486                 theName Object name; when specified, this parameter is used
1487                         for result publication in the study. Otherwise, if automatic
1488                         publication is switched on, default value is used for result name.
1489
1490             Returns:
1491                 New GEOM.GEOM_Object, containing the created point.
1492             """
1493             # Example: see GEOM_TestAll.py
1494             anObj = self.BasicOp.MakePointOnLinesIntersection(theRefLine1, theRefLine2)
1495             RaiseIfFailed("MakePointOnLinesIntersection", self.BasicOp)
1496             self._autoPublish(anObj, theName, "vertex")
1497             return anObj
1498
1499         ## Create a tangent, corresponding to the given parameter on the given curve.
1500         #  @param theRefCurve The referenced curve.
1501         #  @param theParameter Value of parameter on the referenced curve.
1502         #  @param theName Object name; when specified, this parameter is used
1503         #         for result publication in the study. Otherwise, if automatic
1504         #         publication is switched on, default value is used for result name.
1505         #
1506         #  @return New GEOM.GEOM_Object, containing the created tangent.
1507         #
1508         #  @ref swig_MakeTangentOnCurve "Example"
1509         @ManageTransactions("BasicOp")
1510         def MakeTangentOnCurve(self, theRefCurve, theParameter, theName=None):
1511             """
1512             Create a tangent, corresponding to the given parameter on the given curve.
1513
1514             Parameters:
1515                 theRefCurve The referenced curve.
1516                 theParameter Value of parameter on the referenced curve.
1517                 theName Object name; when specified, this parameter is used
1518                         for result publication in the study. Otherwise, if automatic
1519                         publication is switched on, default value is used for result name.
1520
1521             Returns:
1522                 New GEOM.GEOM_Object, containing the created tangent.
1523
1524             Example of usage:
1525                 tan_on_arc = geompy.MakeTangentOnCurve(Arc, 0.7)
1526             """
1527             anObj = self.BasicOp.MakeTangentOnCurve(theRefCurve, theParameter)
1528             RaiseIfFailed("MakeTangentOnCurve", self.BasicOp)
1529             self._autoPublish(anObj, theName, "tangent")
1530             return anObj
1531
1532         ## Create a tangent plane, corresponding to the given parameter on the given face.
1533         #  @param theFace The face for which tangent plane should be built.
1534         #  @param theParameterV vertical value of the center point (0.0 - 1.0).
1535         #  @param theParameterU horisontal value of the center point (0.0 - 1.0).
1536         #  @param theTrimSize the size of plane.
1537         #  @param theName Object name; when specified, this parameter is used
1538         #         for result publication in the study. Otherwise, if automatic
1539         #         publication is switched on, default value is used for result name.
1540         #
1541         #  @return New GEOM.GEOM_Object, containing the created tangent.
1542         #
1543         #  @ref swig_MakeTangentPlaneOnFace "Example"
1544         @ManageTransactions("BasicOp")
1545         def MakeTangentPlaneOnFace(self, theFace, theParameterU, theParameterV, theTrimSize, theName=None):
1546             """
1547             Create a tangent plane, corresponding to the given parameter on the given face.
1548
1549             Parameters:
1550                 theFace The face for which tangent plane should be built.
1551                 theParameterV vertical value of the center point (0.0 - 1.0).
1552                 theParameterU horisontal value of the center point (0.0 - 1.0).
1553                 theTrimSize the size of plane.
1554                 theName Object name; when specified, this parameter is used
1555                         for result publication in the study. Otherwise, if automatic
1556                         publication is switched on, default value is used for result name.
1557
1558            Returns:
1559                 New GEOM.GEOM_Object, containing the created tangent.
1560
1561            Example of usage:
1562                 an_on_face = geompy.MakeTangentPlaneOnFace(tan_extrusion, 0.7, 0.5, 150)
1563             """
1564             anObj = self.BasicOp.MakeTangentPlaneOnFace(theFace, theParameterU, theParameterV, theTrimSize)
1565             RaiseIfFailed("MakeTangentPlaneOnFace", self.BasicOp)
1566             self._autoPublish(anObj, theName, "tangent")
1567             return anObj
1568
1569         ## Create a vector with the given components.
1570         #  @param theDX X component of the vector.
1571         #  @param theDY Y component of the vector.
1572         #  @param theDZ Z component of the vector.
1573         #  @param theName Object name; when specified, this parameter is used
1574         #         for result publication in the study. Otherwise, if automatic
1575         #         publication is switched on, default value is used for result name.
1576         #
1577         #  @return New GEOM.GEOM_Object, containing the created vector.
1578         #
1579         #  @ref tui_creation_vector "Example"
1580         @ManageTransactions("BasicOp")
1581         def MakeVectorDXDYDZ(self, theDX, theDY, theDZ, theName=None):
1582             """
1583             Create a vector with the given components.
1584
1585             Parameters:
1586                 theDX X component of the vector.
1587                 theDY Y component of the vector.
1588                 theDZ Z component of the vector.
1589                 theName Object name; when specified, this parameter is used
1590                         for result publication in the study. Otherwise, if automatic
1591                         publication is switched on, default value is used for result name.
1592
1593             Returns:
1594                 New GEOM.GEOM_Object, containing the created vector.
1595             """
1596             # Example: see GEOM_TestAll.py
1597             theDX,theDY,theDZ,Parameters = ParseParameters(theDX, theDY, theDZ)
1598             anObj = self.BasicOp.MakeVectorDXDYDZ(theDX, theDY, theDZ)
1599             RaiseIfFailed("MakeVectorDXDYDZ", self.BasicOp)
1600             anObj.SetParameters(Parameters)
1601             self._autoPublish(anObj, theName, "vector")
1602             return anObj
1603
1604         ## Create a vector between two points.
1605         #  @param thePnt1 Start point for the vector.
1606         #  @param thePnt2 End point for the vector.
1607         #  @param theName Object name; when specified, this parameter is used
1608         #         for result publication in the study. Otherwise, if automatic
1609         #         publication is switched on, default value is used for result name.
1610         #
1611         #  @return New GEOM.GEOM_Object, containing the created vector.
1612         #
1613         #  @ref tui_creation_vector "Example"
1614         @ManageTransactions("BasicOp")
1615         def MakeVector(self, thePnt1, thePnt2, theName=None):
1616             """
1617             Create a vector between two points.
1618
1619             Parameters:
1620                 thePnt1 Start point for the vector.
1621                 thePnt2 End point for the vector.
1622                 theName Object name; when specified, this parameter is used
1623                         for result publication in the study. Otherwise, if automatic
1624                         publication is switched on, default value is used for result name.
1625
1626             Returns:
1627                 New GEOM.GEOM_Object, containing the created vector.
1628             """
1629             # Example: see GEOM_TestAll.py
1630             anObj = self.BasicOp.MakeVectorTwoPnt(thePnt1, thePnt2)
1631             RaiseIfFailed("MakeVectorTwoPnt", self.BasicOp)
1632             self._autoPublish(anObj, theName, "vector")
1633             return anObj
1634
1635         ## Create a line, passing through the given point
1636         #  and parallel to the given direction
1637         #  @param thePnt Point. The resulting line will pass through it.
1638         #  @param theDir Direction. The resulting line will be parallel to it.
1639         #  @param theName Object name; when specified, this parameter is used
1640         #         for result publication in the study. Otherwise, if automatic
1641         #         publication is switched on, default value is used for result name.
1642         #
1643         #  @return New GEOM.GEOM_Object, containing the created line.
1644         #
1645         #  @ref tui_creation_line "Example"
1646         @ManageTransactions("BasicOp")
1647         def MakeLine(self, thePnt, theDir, theName=None):
1648             """
1649             Create a line, passing through the given point
1650             and parallel to the given direction
1651
1652             Parameters:
1653                 thePnt Point. The resulting line will pass through it.
1654                 theDir Direction. The resulting line will be parallel to it.
1655                 theName Object name; when specified, this parameter is used
1656                         for result publication in the study. Otherwise, if automatic
1657                         publication is switched on, default value is used for result name.
1658
1659             Returns:
1660                 New GEOM.GEOM_Object, containing the created line.
1661             """
1662             # Example: see GEOM_TestAll.py
1663             anObj = self.BasicOp.MakeLine(thePnt, theDir)
1664             RaiseIfFailed("MakeLine", self.BasicOp)
1665             self._autoPublish(anObj, theName, "line")
1666             return anObj
1667
1668         ## Create a line, passing through the given points
1669         #  @param thePnt1 First of two points, defining the line.
1670         #  @param thePnt2 Second of two points, defining the line.
1671         #  @param theName Object name; when specified, this parameter is used
1672         #         for result publication in the study. Otherwise, if automatic
1673         #         publication is switched on, default value is used for result name.
1674         #
1675         #  @return New GEOM.GEOM_Object, containing the created line.
1676         #
1677         #  @ref tui_creation_line "Example"
1678         @ManageTransactions("BasicOp")
1679         def MakeLineTwoPnt(self, thePnt1, thePnt2, theName=None):
1680             """
1681             Create a line, passing through the given points
1682
1683             Parameters:
1684                 thePnt1 First of two points, defining the line.
1685                 thePnt2 Second of two points, defining the line.
1686                 theName Object name; when specified, this parameter is used
1687                         for result publication in the study. Otherwise, if automatic
1688                         publication is switched on, default value is used for result name.
1689
1690             Returns:
1691                 New GEOM.GEOM_Object, containing the created line.
1692             """
1693             # Example: see GEOM_TestAll.py
1694             anObj = self.BasicOp.MakeLineTwoPnt(thePnt1, thePnt2)
1695             RaiseIfFailed("MakeLineTwoPnt", self.BasicOp)
1696             self._autoPublish(anObj, theName, "line")
1697             return anObj
1698
1699         ## Create a line on two faces intersection.
1700         #  @param theFace1 First of two faces, defining the line.
1701         #  @param theFace2 Second of two faces, defining the line.
1702         #  @param theName Object name; when specified, this parameter is used
1703         #         for result publication in the study. Otherwise, if automatic
1704         #         publication is switched on, default value is used for result name.
1705         #
1706         #  @return New GEOM.GEOM_Object, containing the created line.
1707         #
1708         #  @ref swig_MakeLineTwoFaces "Example"
1709         @ManageTransactions("BasicOp")
1710         def MakeLineTwoFaces(self, theFace1, theFace2, theName=None):
1711             """
1712             Create a line on two faces intersection.
1713
1714             Parameters:
1715                 theFace1 First of two faces, defining the line.
1716                 theFace2 Second of two faces, defining the line.
1717                 theName Object name; when specified, this parameter is used
1718                         for result publication in the study. Otherwise, if automatic
1719                         publication is switched on, default value is used for result name.
1720
1721             Returns:
1722                 New GEOM.GEOM_Object, containing the created line.
1723             """
1724             # Example: see GEOM_TestAll.py
1725             anObj = self.BasicOp.MakeLineTwoFaces(theFace1, theFace2)
1726             RaiseIfFailed("MakeLineTwoFaces", self.BasicOp)
1727             self._autoPublish(anObj, theName, "line")
1728             return anObj
1729
1730         ## Create a plane, passing through the given point
1731         #  and normal to the given vector.
1732         #  @param thePnt Point, the plane has to pass through.
1733         #  @param theVec Vector, defining the plane normal direction.
1734         #  @param theTrimSize Half size of a side of quadrangle face, representing the plane.
1735         #  @param theName Object name; when specified, this parameter is used
1736         #         for result publication in the study. Otherwise, if automatic
1737         #         publication is switched on, default value is used for result name.
1738         #
1739         #  @return New GEOM.GEOM_Object, containing the created plane.
1740         #
1741         #  @ref tui_creation_plane "Example"
1742         @ManageTransactions("BasicOp")
1743         def MakePlane(self, thePnt, theVec, theTrimSize, theName=None):
1744             """
1745             Create a plane, passing through the given point
1746             and normal to the given vector.
1747
1748             Parameters:
1749                 thePnt Point, the plane has to pass through.
1750                 theVec Vector, defining the plane normal direction.
1751                 theTrimSize Half size of a side of quadrangle face, representing the plane.
1752                 theName Object name; when specified, this parameter is used
1753                         for result publication in the study. Otherwise, if automatic
1754                         publication is switched on, default value is used for result name.
1755
1756             Returns:
1757                 New GEOM.GEOM_Object, containing the created plane.
1758             """
1759             # Example: see GEOM_TestAll.py
1760             theTrimSize, Parameters = ParseParameters(theTrimSize);
1761             anObj = self.BasicOp.MakePlanePntVec(thePnt, theVec, theTrimSize)
1762             RaiseIfFailed("MakePlanePntVec", self.BasicOp)
1763             anObj.SetParameters(Parameters)
1764             self._autoPublish(anObj, theName, "plane")
1765             return anObj
1766
1767         ## Create a plane, passing through the three given points
1768         #  @param thePnt1 First of three points, defining the plane.
1769         #  @param thePnt2 Second of three points, defining the plane.
1770         #  @param thePnt3 Third of three points, defining the plane.
1771         #  @param theTrimSize Half size of a side of quadrangle face, representing the plane.
1772         #  @param theName Object name; when specified, this parameter is used
1773         #         for result publication in the study. Otherwise, if automatic
1774         #         publication is switched on, default value is used for result name.
1775         #
1776         #  @return New GEOM.GEOM_Object, containing the created plane.
1777         #
1778         #  @ref tui_creation_plane "Example"
1779         @ManageTransactions("BasicOp")
1780         def MakePlaneThreePnt(self, thePnt1, thePnt2, thePnt3, theTrimSize, theName=None):
1781             """
1782             Create a plane, passing through the three given points
1783
1784             Parameters:
1785                 thePnt1 First of three points, defining the plane.
1786                 thePnt2 Second of three points, defining the plane.
1787                 thePnt3 Third of three points, defining the plane.
1788                 theTrimSize Half size of a side of quadrangle face, representing the plane.
1789                 theName Object name; when specified, this parameter is used
1790                         for result publication in the study. Otherwise, if automatic
1791                         publication is switched on, default value is used for result name.
1792
1793             Returns:
1794                 New GEOM.GEOM_Object, containing the created plane.
1795             """
1796             # Example: see GEOM_TestAll.py
1797             theTrimSize, Parameters = ParseParameters(theTrimSize);
1798             anObj = self.BasicOp.MakePlaneThreePnt(thePnt1, thePnt2, thePnt3, theTrimSize)
1799             RaiseIfFailed("MakePlaneThreePnt", self.BasicOp)
1800             anObj.SetParameters(Parameters)
1801             self._autoPublish(anObj, theName, "plane")
1802             return anObj
1803
1804         ## Create a plane, similar to the existing one, but with another size of representing face.
1805         #  @param theFace Referenced plane or LCS(Marker).
1806         #  @param theTrimSize New half size of a side of quadrangle face, representing the plane.
1807         #  @param theName Object name; when specified, this parameter is used
1808         #         for result publication in the study. Otherwise, if automatic
1809         #         publication is switched on, default value is used for result name.
1810         #
1811         #  @return New GEOM.GEOM_Object, containing the created plane.
1812         #
1813         #  @ref tui_creation_plane "Example"
1814         @ManageTransactions("BasicOp")
1815         def MakePlaneFace(self, theFace, theTrimSize, theName=None):
1816             """
1817             Create a plane, similar to the existing one, but with another size of representing face.
1818
1819             Parameters:
1820                 theFace Referenced plane or LCS(Marker).
1821                 theTrimSize New half size of a side of quadrangle face, representing the plane.
1822                 theName Object name; when specified, this parameter is used
1823                         for result publication in the study. Otherwise, if automatic
1824                         publication is switched on, default value is used for result name.
1825
1826             Returns:
1827                 New GEOM.GEOM_Object, containing the created plane.
1828             """
1829             # Example: see GEOM_TestAll.py
1830             theTrimSize, Parameters = ParseParameters(theTrimSize);
1831             anObj = self.BasicOp.MakePlaneFace(theFace, theTrimSize)
1832             RaiseIfFailed("MakePlaneFace", self.BasicOp)
1833             anObj.SetParameters(Parameters)
1834             self._autoPublish(anObj, theName, "plane")
1835             return anObj
1836
1837         ## Create a plane, passing through the 2 vectors
1838         #  with center in a start point of the first vector.
1839         #  @param theVec1 Vector, defining center point and plane direction.
1840         #  @param theVec2 Vector, defining the plane normal direction.
1841         #  @param theTrimSize Half size of a side of quadrangle face, representing the plane.
1842         #  @param theName Object name; when specified, this parameter is used
1843         #         for result publication in the study. Otherwise, if automatic
1844         #         publication is switched on, default value is used for result name.
1845         #
1846         #  @return New GEOM.GEOM_Object, containing the created plane.
1847         #
1848         #  @ref tui_creation_plane "Example"
1849         @ManageTransactions("BasicOp")
1850         def MakePlane2Vec(self, theVec1, theVec2, theTrimSize, theName=None):
1851             """
1852             Create a plane, passing through the 2 vectors
1853             with center in a start point of the first vector.
1854
1855             Parameters:
1856                 theVec1 Vector, defining center point and plane direction.
1857                 theVec2 Vector, defining the plane normal direction.
1858                 theTrimSize Half size of a side of quadrangle face, representing the plane.
1859                 theName Object name; when specified, this parameter is used
1860                         for result publication in the study. Otherwise, if automatic
1861                         publication is switched on, default value is used for result name.
1862
1863             Returns:
1864                 New GEOM.GEOM_Object, containing the created plane.
1865             """
1866             # Example: see GEOM_TestAll.py
1867             theTrimSize, Parameters = ParseParameters(theTrimSize);
1868             anObj = self.BasicOp.MakePlane2Vec(theVec1, theVec2, theTrimSize)
1869             RaiseIfFailed("MakePlane2Vec", self.BasicOp)
1870             anObj.SetParameters(Parameters)
1871             self._autoPublish(anObj, theName, "plane")
1872             return anObj
1873
1874         ## Create a plane, based on a Local coordinate system.
1875         #  @param theLCS  coordinate system, defining plane.
1876         #  @param theTrimSize Half size of a side of quadrangle face, representing the plane.
1877         #  @param theOrientation OXY, OYZ or OZX orientation - (1, 2 or 3)
1878         #  @param theName Object name; when specified, this parameter is used
1879         #         for result publication in the study. Otherwise, if automatic
1880         #         publication is switched on, default value is used for result name.
1881         #
1882         #  @return New GEOM.GEOM_Object, containing the created plane.
1883         #
1884         #  @ref tui_creation_plane "Example"
1885         @ManageTransactions("BasicOp")
1886         def MakePlaneLCS(self, theLCS, theTrimSize, theOrientation, theName=None):
1887             """
1888             Create a plane, based on a Local coordinate system.
1889
1890            Parameters:
1891                 theLCS  coordinate system, defining plane.
1892                 theTrimSize Half size of a side of quadrangle face, representing the plane.
1893                 theOrientation OXY, OYZ or OZX orientation - (1, 2 or 3)
1894                 theName Object name; when specified, this parameter is used
1895                         for result publication in the study. Otherwise, if automatic
1896                         publication is switched on, default value is used for result name.
1897
1898             Returns:
1899                 New GEOM.GEOM_Object, containing the created plane.
1900             """
1901             # Example: see GEOM_TestAll.py
1902             theTrimSize, Parameters = ParseParameters(theTrimSize);
1903             anObj = self.BasicOp.MakePlaneLCS(theLCS, theTrimSize, theOrientation)
1904             RaiseIfFailed("MakePlaneLCS", self.BasicOp)
1905             anObj.SetParameters(Parameters)
1906             self._autoPublish(anObj, theName, "plane")
1907             return anObj
1908
1909         ## Create a local coordinate system.
1910         #  @param OX,OY,OZ Three coordinates of coordinate system origin.
1911         #  @param XDX,XDY,XDZ Three components of OX direction
1912         #  @param YDX,YDY,YDZ Three components of OY direction
1913         #  @param theName Object name; when specified, this parameter is used
1914         #         for result publication in the study. Otherwise, if automatic
1915         #         publication is switched on, default value is used for result name.
1916         #
1917         #  @return New GEOM.GEOM_Object, containing the created coordinate system.
1918         #
1919         #  @ref swig_MakeMarker "Example"
1920         @ManageTransactions("BasicOp")
1921         def MakeMarker(self, OX,OY,OZ, XDX,XDY,XDZ, YDX,YDY,YDZ, theName=None):
1922             """
1923             Create a local coordinate system.
1924
1925             Parameters:
1926                 OX,OY,OZ Three coordinates of coordinate system origin.
1927                 XDX,XDY,XDZ Three components of OX direction
1928                 YDX,YDY,YDZ Three components of OY direction
1929                 theName Object name; when specified, this parameter is used
1930                         for result publication in the study. Otherwise, if automatic
1931                         publication is switched on, default value is used for result name.
1932
1933             Returns:
1934                 New GEOM.GEOM_Object, containing the created coordinate system.
1935             """
1936             # Example: see GEOM_TestAll.py
1937             OX,OY,OZ, XDX,XDY,XDZ, YDX,YDY,YDZ, Parameters = ParseParameters(OX,OY,OZ, XDX,XDY,XDZ, YDX,YDY,YDZ);
1938             anObj = self.BasicOp.MakeMarker(OX,OY,OZ, XDX,XDY,XDZ, YDX,YDY,YDZ)
1939             RaiseIfFailed("MakeMarker", self.BasicOp)
1940             anObj.SetParameters(Parameters)
1941             self._autoPublish(anObj, theName, "lcs")
1942             return anObj
1943
1944         ## Create a local coordinate system from shape.
1945         #  @param theShape The initial shape to detect the coordinate system.
1946         #  @param theName Object name; when specified, this parameter is used
1947         #         for result publication in the study. Otherwise, if automatic
1948         #         publication is switched on, default value is used for result name.
1949         #
1950         #  @return New GEOM.GEOM_Object, containing the created coordinate system.
1951         #
1952         #  @ref tui_creation_lcs "Example"
1953         @ManageTransactions("BasicOp")
1954         def MakeMarkerFromShape(self, theShape, theName=None):
1955             """
1956             Create a local coordinate system from shape.
1957
1958             Parameters:
1959                 theShape The initial shape to detect the coordinate system.
1960                 theName Object name; when specified, this parameter is used
1961                         for result publication in the study. Otherwise, if automatic
1962                         publication is switched on, default value is used for result name.
1963
1964             Returns:
1965                 New GEOM.GEOM_Object, containing the created coordinate system.
1966             """
1967             anObj = self.BasicOp.MakeMarkerFromShape(theShape)
1968             RaiseIfFailed("MakeMarkerFromShape", self.BasicOp)
1969             self._autoPublish(anObj, theName, "lcs")
1970             return anObj
1971
1972         ## Create a local coordinate system from point and two vectors.
1973         #  @param theOrigin Point of coordinate system origin.
1974         #  @param theXVec Vector of X direction
1975         #  @param theYVec Vector of Y direction
1976         #  @param theName Object name; when specified, this parameter is used
1977         #         for result publication in the study. Otherwise, if automatic
1978         #         publication is switched on, default value is used for result name.
1979         #
1980         #  @return New GEOM.GEOM_Object, containing the created coordinate system.
1981         #
1982         #  @ref tui_creation_lcs "Example"
1983         @ManageTransactions("BasicOp")
1984         def MakeMarkerPntTwoVec(self, theOrigin, theXVec, theYVec, theName=None):
1985             """
1986             Create a local coordinate system from point and two vectors.
1987
1988             Parameters:
1989                 theOrigin Point of coordinate system origin.
1990                 theXVec Vector of X direction
1991                 theYVec Vector of Y direction
1992                 theName Object name; when specified, this parameter is used
1993                         for result publication in the study. Otherwise, if automatic
1994                         publication is switched on, default value is used for result name.
1995
1996             Returns:
1997                 New GEOM.GEOM_Object, containing the created coordinate system.
1998
1999             """
2000             anObj = self.BasicOp.MakeMarkerPntTwoVec(theOrigin, theXVec, theYVec)
2001             RaiseIfFailed("MakeMarkerPntTwoVec", self.BasicOp)
2002             self._autoPublish(anObj, theName, "lcs")
2003             return anObj
2004
2005         # end of l3_basic_go
2006         ## @}
2007
2008         ## @addtogroup l4_curves
2009         ## @{
2010
2011         ##  Create an arc of circle, passing through three given points.
2012         #  @param thePnt1 Start point of the arc.
2013         #  @param thePnt2 Middle point of the arc.
2014         #  @param thePnt3 End point of the arc.
2015         #  @param theName Object name; when specified, this parameter is used
2016         #         for result publication in the study. Otherwise, if automatic
2017         #         publication is switched on, default value is used for result name.
2018         #
2019         #  @return New GEOM.GEOM_Object, containing the created arc.
2020         #
2021         #  @ref swig_MakeArc "Example"
2022         @ManageTransactions("CurvesOp")
2023         def MakeArc(self, thePnt1, thePnt2, thePnt3, theName=None):
2024             """
2025             Create an arc of circle, passing through three given points.
2026
2027             Parameters:
2028                 thePnt1 Start point of the arc.
2029                 thePnt2 Middle point of the arc.
2030                 thePnt3 End point of the arc.
2031                 theName Object name; when specified, this parameter is used
2032                         for result publication in the study. Otherwise, if automatic
2033                         publication is switched on, default value is used for result name.
2034
2035             Returns:
2036                 New GEOM.GEOM_Object, containing the created arc.
2037             """
2038             # Example: see GEOM_TestAll.py
2039             anObj = self.CurvesOp.MakeArc(thePnt1, thePnt2, thePnt3)
2040             RaiseIfFailed("MakeArc", self.CurvesOp)
2041             self._autoPublish(anObj, theName, "arc")
2042             return anObj
2043
2044         ##  Create an arc of circle from a center and 2 points.
2045         #  @param thePnt1 Center of the arc
2046         #  @param thePnt2 Start point of the arc. (Gives also the radius of the arc)
2047         #  @param thePnt3 End point of the arc (Gives also a direction)
2048         #  @param theSense Orientation of the arc
2049         #  @param theName Object name; when specified, this parameter is used
2050         #         for result publication in the study. Otherwise, if automatic
2051         #         publication is switched on, default value is used for result name.
2052         #
2053         #  @return New GEOM.GEOM_Object, containing the created arc.
2054         #
2055         #  @ref swig_MakeArc "Example"
2056         @ManageTransactions("CurvesOp")
2057         def MakeArcCenter(self, thePnt1, thePnt2, thePnt3, theSense=False, theName=None):
2058             """
2059             Create an arc of circle from a center and 2 points.
2060
2061             Parameters:
2062                 thePnt1 Center of the arc
2063                 thePnt2 Start point of the arc. (Gives also the radius of the arc)
2064                 thePnt3 End point of the arc (Gives also a direction)
2065                 theSense Orientation of the arc
2066                 theName Object name; when specified, this parameter is used
2067                         for result publication in the study. Otherwise, if automatic
2068                         publication is switched on, default value is used for result name.
2069
2070             Returns:
2071                 New GEOM.GEOM_Object, containing the created arc.
2072             """
2073             # Example: see GEOM_TestAll.py
2074             anObj = self.CurvesOp.MakeArcCenter(thePnt1, thePnt2, thePnt3, theSense)
2075             RaiseIfFailed("MakeArcCenter", self.CurvesOp)
2076             self._autoPublish(anObj, theName, "arc")
2077             return anObj
2078
2079         ##  Create an arc of ellipse, of center and two points.
2080         #  @param theCenter Center of the arc.
2081         #  @param thePnt1 defines major radius of the arc by distance from Pnt1 to Pnt2.
2082         #  @param thePnt2 defines plane of ellipse and minor radius as distance from Pnt3 to line from Pnt1 to Pnt2.
2083         #  @param theName Object name; when specified, this parameter is used
2084         #         for result publication in the study. Otherwise, if automatic
2085         #         publication is switched on, default value is used for result name.
2086         #
2087         #  @return New GEOM.GEOM_Object, containing the created arc.
2088         #
2089         #  @ref swig_MakeArc "Example"
2090         @ManageTransactions("CurvesOp")
2091         def MakeArcOfEllipse(self, theCenter, thePnt1, thePnt2, theName=None):
2092             """
2093             Create an arc of ellipse, of center and two points.
2094
2095             Parameters:
2096                 theCenter Center of the arc.
2097                 thePnt1 defines major radius of the arc by distance from Pnt1 to Pnt2.
2098                 thePnt2 defines plane of ellipse and minor radius as distance from Pnt3 to line from Pnt1 to Pnt2.
2099                 theName Object name; when specified, this parameter is used
2100                         for result publication in the study. Otherwise, if automatic
2101                         publication is switched on, default value is used for result name.
2102
2103             Returns:
2104                 New GEOM.GEOM_Object, containing the created arc.
2105             """
2106             # Example: see GEOM_TestAll.py
2107             anObj = self.CurvesOp.MakeArcOfEllipse(theCenter, thePnt1, thePnt2)
2108             RaiseIfFailed("MakeArcOfEllipse", self.CurvesOp)
2109             self._autoPublish(anObj, theName, "arc")
2110             return anObj
2111
2112         ## Create a circle with given center, normal vector and radius.
2113         #  @param thePnt Circle center.
2114         #  @param theVec Vector, normal to the plane of the circle.
2115         #  @param theR Circle radius.
2116         #  @param theName Object name; when specified, this parameter is used
2117         #         for result publication in the study. Otherwise, if automatic
2118         #         publication is switched on, default value is used for result name.
2119         #
2120         #  @return New GEOM.GEOM_Object, containing the created circle.
2121         #
2122         #  @ref tui_creation_circle "Example"
2123         @ManageTransactions("CurvesOp")
2124         def MakeCircle(self, thePnt, theVec, theR, theName=None):
2125             """
2126             Create a circle with given center, normal vector and radius.
2127
2128             Parameters:
2129                 thePnt Circle center.
2130                 theVec Vector, normal to the plane of the circle.
2131                 theR Circle radius.
2132                 theName Object name; when specified, this parameter is used
2133                         for result publication in the study. Otherwise, if automatic
2134                         publication is switched on, default value is used for result name.
2135
2136             Returns:
2137                 New GEOM.GEOM_Object, containing the created circle.
2138             """
2139             # Example: see GEOM_TestAll.py
2140             theR, Parameters = ParseParameters(theR)
2141             anObj = self.CurvesOp.MakeCirclePntVecR(thePnt, theVec, theR)
2142             RaiseIfFailed("MakeCirclePntVecR", self.CurvesOp)
2143             anObj.SetParameters(Parameters)
2144             self._autoPublish(anObj, theName, "circle")
2145             return anObj
2146
2147         ## Create a circle with given radius.
2148         #  Center of the circle will be in the origin of global
2149         #  coordinate system and normal vector will be codirected with Z axis
2150         #  @param theR Circle radius.
2151         #  @param theName Object name; when specified, this parameter is used
2152         #         for result publication in the study. Otherwise, if automatic
2153         #         publication is switched on, default value is used for result name.
2154         #
2155         #  @return New GEOM.GEOM_Object, containing the created circle.
2156         @ManageTransactions("CurvesOp")
2157         def MakeCircleR(self, theR, theName=None):
2158             """
2159             Create a circle with given radius.
2160             Center of the circle will be in the origin of global
2161             coordinate system and normal vector will be codirected with Z axis
2162
2163             Parameters:
2164                 theR Circle radius.
2165                 theName Object name; when specified, this parameter is used
2166                         for result publication in the study. Otherwise, if automatic
2167                         publication is switched on, default value is used for result name.
2168
2169             Returns:
2170                 New GEOM.GEOM_Object, containing the created circle.
2171             """
2172             anObj = self.CurvesOp.MakeCirclePntVecR(None, None, theR)
2173             RaiseIfFailed("MakeCirclePntVecR", self.CurvesOp)
2174             self._autoPublish(anObj, theName, "circle")
2175             return anObj
2176
2177         ## Create a circle, passing through three given points
2178         #  @param thePnt1,thePnt2,thePnt3 Points, defining the circle.
2179         #  @param theName Object name; when specified, this parameter is used
2180         #         for result publication in the study. Otherwise, if automatic
2181         #         publication is switched on, default value is used for result name.
2182         #
2183         #  @return New GEOM.GEOM_Object, containing the created circle.
2184         #
2185         #  @ref tui_creation_circle "Example"
2186         @ManageTransactions("CurvesOp")
2187         def MakeCircleThreePnt(self, thePnt1, thePnt2, thePnt3, theName=None):
2188             """
2189             Create a circle, passing through three given points
2190
2191             Parameters:
2192                 thePnt1,thePnt2,thePnt3 Points, defining the circle.
2193                 theName Object name; when specified, this parameter is used
2194                         for result publication in the study. Otherwise, if automatic
2195                         publication is switched on, default value is used for result name.
2196
2197             Returns:
2198                 New GEOM.GEOM_Object, containing the created circle.
2199             """
2200             # Example: see GEOM_TestAll.py
2201             anObj = self.CurvesOp.MakeCircleThreePnt(thePnt1, thePnt2, thePnt3)
2202             RaiseIfFailed("MakeCircleThreePnt", self.CurvesOp)
2203             self._autoPublish(anObj, theName, "circle")
2204             return anObj
2205
2206         ## Create a circle, with given point1 as center,
2207         #  passing through the point2 as radius and laying in the plane,
2208         #  defined by all three given points.
2209         #  @param thePnt1,thePnt2,thePnt3 Points, defining the circle.
2210         #  @param theName Object name; when specified, this parameter is used
2211         #         for result publication in the study. Otherwise, if automatic
2212         #         publication is switched on, default value is used for result name.
2213         #
2214         #  @return New GEOM.GEOM_Object, containing the created circle.
2215         #
2216         #  @ref swig_MakeCircle "Example"
2217         @ManageTransactions("CurvesOp")
2218         def MakeCircleCenter2Pnt(self, thePnt1, thePnt2, thePnt3, theName=None):
2219             """
2220             Create a circle, with given point1 as center,
2221             passing through the point2 as radius and laying in the plane,
2222             defined by all three given points.
2223
2224             Parameters:
2225                 thePnt1,thePnt2,thePnt3 Points, defining the circle.
2226                 theName Object name; when specified, this parameter is used
2227                         for result publication in the study. Otherwise, if automatic
2228                         publication is switched on, default value is used for result name.
2229
2230             Returns:
2231                 New GEOM.GEOM_Object, containing the created circle.
2232             """
2233             # Example: see GEOM_example6.py
2234             anObj = self.CurvesOp.MakeCircleCenter2Pnt(thePnt1, thePnt2, thePnt3)
2235             RaiseIfFailed("MakeCircleCenter2Pnt", self.CurvesOp)
2236             self._autoPublish(anObj, theName, "circle")
2237             return anObj
2238
2239         ## Create an ellipse with given center, normal vector and radiuses.
2240         #  @param thePnt Ellipse center.
2241         #  @param theVec Vector, normal to the plane of the ellipse.
2242         #  @param theRMajor Major ellipse radius.
2243         #  @param theRMinor Minor ellipse radius.
2244         #  @param theVecMaj Vector, direction of the ellipse's main axis.
2245         #  @param theName Object name; when specified, this parameter is used
2246         #         for result publication in the study. Otherwise, if automatic
2247         #         publication is switched on, default value is used for result name.
2248         #
2249         #  @return New GEOM.GEOM_Object, containing the created ellipse.
2250         #
2251         #  @ref tui_creation_ellipse "Example"
2252         @ManageTransactions("CurvesOp")
2253         def MakeEllipse(self, thePnt, theVec, theRMajor, theRMinor, theVecMaj=None, theName=None):
2254             """
2255             Create an ellipse with given center, normal vector and radiuses.
2256
2257             Parameters:
2258                 thePnt Ellipse center.
2259                 theVec Vector, normal to the plane of the ellipse.
2260                 theRMajor Major ellipse radius.
2261                 theRMinor Minor ellipse radius.
2262                 theVecMaj Vector, direction of the ellipse's main axis.
2263                 theName Object name; when specified, this parameter is used
2264                         for result publication in the study. Otherwise, if automatic
2265                         publication is switched on, default value is used for result name.
2266
2267             Returns:
2268                 New GEOM.GEOM_Object, containing the created ellipse.
2269             """
2270             # Example: see GEOM_TestAll.py
2271             theRMajor, theRMinor, Parameters = ParseParameters(theRMajor, theRMinor)
2272             if theVecMaj is not None:
2273                 anObj = self.CurvesOp.MakeEllipseVec(thePnt, theVec, theRMajor, theRMinor, theVecMaj)
2274             else:
2275                 anObj = self.CurvesOp.MakeEllipse(thePnt, theVec, theRMajor, theRMinor)
2276                 pass
2277             RaiseIfFailed("MakeEllipse", self.CurvesOp)
2278             anObj.SetParameters(Parameters)
2279             self._autoPublish(anObj, theName, "ellipse")
2280             return anObj
2281
2282         ## Create an ellipse with given radiuses.
2283         #  Center of the ellipse will be in the origin of global
2284         #  coordinate system and normal vector will be codirected with Z axis
2285         #  @param theRMajor Major ellipse radius.
2286         #  @param theRMinor Minor ellipse radius.
2287         #  @param theName Object name; when specified, this parameter is used
2288         #         for result publication in the study. Otherwise, if automatic
2289         #         publication is switched on, default value is used for result name.
2290         #
2291         #  @return New GEOM.GEOM_Object, containing the created ellipse.
2292         @ManageTransactions("CurvesOp")
2293         def MakeEllipseRR(self, theRMajor, theRMinor, theName=None):
2294             """
2295             Create an ellipse with given radiuses.
2296             Center of the ellipse will be in the origin of global
2297             coordinate system and normal vector will be codirected with Z axis
2298
2299             Parameters:
2300                 theRMajor Major ellipse radius.
2301                 theRMinor Minor ellipse radius.
2302                 theName Object name; when specified, this parameter is used
2303                         for result publication in the study. Otherwise, if automatic
2304                         publication is switched on, default value is used for result name.
2305
2306             Returns:
2307             New GEOM.GEOM_Object, containing the created ellipse.
2308             """
2309             anObj = self.CurvesOp.MakeEllipse(None, None, theRMajor, theRMinor)
2310             RaiseIfFailed("MakeEllipse", self.CurvesOp)
2311             self._autoPublish(anObj, theName, "ellipse")
2312             return anObj
2313
2314         ## Create a polyline on the set of points.
2315         #  @param thePoints Sequence of points for the polyline.
2316         #  @param theIsClosed If True, build a closed wire.
2317         #  @param theName Object name; when specified, this parameter is used
2318         #         for result publication in the study. Otherwise, if automatic
2319         #         publication is switched on, default value is used for result name.
2320         #
2321         #  @return New GEOM.GEOM_Object, containing the created polyline.
2322         #
2323         #  @ref tui_creation_curve "Example"
2324         @ManageTransactions("CurvesOp")
2325         def MakePolyline(self, thePoints, theIsClosed=False, theName=None):
2326             """
2327             Create a polyline on the set of points.
2328
2329             Parameters:
2330                 thePoints Sequence of points for the polyline.
2331                 theIsClosed If True, build a closed wire.
2332                 theName Object name; when specified, this parameter is used
2333                         for result publication in the study. Otherwise, if automatic
2334                         publication is switched on, default value is used for result name.
2335
2336             Returns:
2337                 New GEOM.GEOM_Object, containing the created polyline.
2338             """
2339             # Example: see GEOM_TestAll.py
2340             anObj = self.CurvesOp.MakePolyline(thePoints, theIsClosed)
2341             RaiseIfFailed("MakePolyline", self.CurvesOp)
2342             self._autoPublish(anObj, theName, "polyline")
2343             return anObj
2344
2345         ## Create bezier curve on the set of points.
2346         #  @param thePoints Sequence of points for the bezier curve.
2347         #  @param theIsClosed If True, build a closed curve.
2348         #  @param theName Object name; when specified, this parameter is used
2349         #         for result publication in the study. Otherwise, if automatic
2350         #         publication is switched on, default value is used for result name.
2351         #
2352         #  @return New GEOM.GEOM_Object, containing the created bezier curve.
2353         #
2354         #  @ref tui_creation_curve "Example"
2355         @ManageTransactions("CurvesOp")
2356         def MakeBezier(self, thePoints, theIsClosed=False, theName=None):
2357             """
2358             Create bezier curve on the set of points.
2359
2360             Parameters:
2361                 thePoints Sequence of points for the bezier curve.
2362                 theIsClosed If True, build a closed curve.
2363                 theName Object name; when specified, this parameter is used
2364                         for result publication in the study. Otherwise, if automatic
2365                         publication is switched on, default value is used for result name.
2366
2367             Returns:
2368                 New GEOM.GEOM_Object, containing the created bezier curve.
2369             """
2370             # Example: see GEOM_TestAll.py
2371             anObj = self.CurvesOp.MakeSplineBezier(thePoints, theIsClosed)
2372             RaiseIfFailed("MakeSplineBezier", self.CurvesOp)
2373             self._autoPublish(anObj, theName, "bezier")
2374             return anObj
2375
2376         ## Create B-Spline curve on the set of points.
2377         #  @param thePoints Sequence of points for the B-Spline curve.
2378         #  @param theIsClosed If True, build a closed curve.
2379         #  @param theDoReordering If TRUE, the algo does not follow the order of
2380         #                         \a thePoints but searches for the closest vertex.
2381         #  @param theName Object name; when specified, this parameter is used
2382         #         for result publication in the study. Otherwise, if automatic
2383         #         publication is switched on, default value is used for result name.
2384         #
2385         #  @return New GEOM.GEOM_Object, containing the created B-Spline curve.
2386         #
2387         #  @ref tui_creation_curve "Example"
2388         @ManageTransactions("CurvesOp")
2389         def MakeInterpol(self, thePoints, theIsClosed=False, theDoReordering=False, theName=None):
2390             """
2391             Create B-Spline curve on the set of points.
2392
2393             Parameters:
2394                 thePoints Sequence of points for the B-Spline curve.
2395                 theIsClosed If True, build a closed curve.
2396                 theDoReordering If True, the algo does not follow the order of
2397                                 thePoints but searches for the closest vertex.
2398                 theName Object name; when specified, this parameter is used
2399                         for result publication in the study. Otherwise, if automatic
2400                         publication is switched on, default value is used for result name.
2401
2402             Returns:
2403                 New GEOM.GEOM_Object, containing the created B-Spline curve.
2404             """
2405             # Example: see GEOM_TestAll.py
2406             anObj = self.CurvesOp.MakeSplineInterpolation(thePoints, theIsClosed, theDoReordering)
2407             RaiseIfFailed("MakeInterpol", self.CurvesOp)
2408             self._autoPublish(anObj, theName, "bspline")
2409             return anObj
2410
2411         ## Create B-Spline curve on the set of points.
2412         #  @param thePoints Sequence of points for the B-Spline curve.
2413         #  @param theFirstVec Vector object, defining the curve direction at its first point.
2414         #  @param theLastVec Vector object, defining the curve direction at its last point.
2415         #  @param theName Object name; when specified, this parameter is used
2416         #         for result publication in the study. Otherwise, if automatic
2417         #         publication is switched on, default value is used for result name.
2418         #
2419         #  @return New GEOM.GEOM_Object, containing the created B-Spline curve.
2420         #
2421         #  @ref tui_creation_curve "Example"
2422         @ManageTransactions("CurvesOp")
2423         def MakeInterpolWithTangents(self, thePoints, theFirstVec, theLastVec, theName=None):
2424             """
2425             Create B-Spline curve on the set of points.
2426
2427             Parameters:
2428                 thePoints Sequence of points for the B-Spline curve.
2429                 theFirstVec Vector object, defining the curve direction at its first point.
2430                 theLastVec Vector object, defining the curve direction at its last point.
2431                 theName Object name; when specified, this parameter is used
2432                         for result publication in the study. Otherwise, if automatic
2433                         publication is switched on, default value is used for result name.
2434
2435             Returns:
2436                 New GEOM.GEOM_Object, containing the created B-Spline curve.
2437             """
2438             # Example: see GEOM_TestAll.py
2439             anObj = self.CurvesOp.MakeSplineInterpolWithTangents(thePoints, theFirstVec, theLastVec)
2440             RaiseIfFailed("MakeInterpolWithTangents", self.CurvesOp)
2441             self._autoPublish(anObj, theName, "bspline")
2442             return anObj
2443
2444         ## Creates a curve using the parametric definition of the basic points.
2445         #  @param thexExpr parametric equation of the coordinates X.
2446         #  @param theyExpr parametric equation of the coordinates Y.
2447         #  @param thezExpr parametric equation of the coordinates Z.
2448         #  @param theParamMin the minimal value of the parameter.
2449         #  @param theParamMax the maximum value of the parameter.
2450         #  @param theParamStep the number of steps if theNewMethod = True, else step value of the parameter.
2451         #  @param theCurveType the type of the curve,
2452         #         one of GEOM.Polyline, GEOM.Bezier, GEOM.Interpolation.
2453         #  @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.
2454         #  @param theName Object name; when specified, this parameter is used
2455         #         for result publication in the study. Otherwise, if automatic
2456         #         publication is switched on, default value is used for result name.
2457         #
2458         #  @return New GEOM.GEOM_Object, containing the created curve.
2459         #
2460         #  @ref tui_creation_curve "Example"
2461         @ManageTransactions("CurvesOp")
2462         def MakeCurveParametric(self, thexExpr, theyExpr, thezExpr,
2463                                 theParamMin, theParamMax, theParamStep, theCurveType, theNewMethod=False, theName=None ):
2464             """
2465             Creates a curve using the parametric definition of the basic points.
2466
2467             Parameters:
2468                 thexExpr parametric equation of the coordinates X.
2469                 theyExpr parametric equation of the coordinates Y.
2470                 thezExpr parametric equation of the coordinates Z.
2471                 theParamMin the minimal value of the parameter.
2472                 theParamMax the maximum value of the parameter.
2473                 theParamStep the number of steps if theNewMethod = True, else step value of the parameter.
2474                 theCurveType the type of the curve,
2475                              one of GEOM.Polyline, GEOM.Bezier, GEOM.Interpolation.
2476                 theNewMethod flag for switching to the new method if the flag is set to false a deprecated
2477                              method is used which can lead to a bug.
2478                 theName Object name; when specified, this parameter is used
2479                         for result publication in the study. Otherwise, if automatic
2480                         publication is switched on, default value is used for result name.
2481
2482             Returns:
2483                 New GEOM.GEOM_Object, containing the created curve.
2484             """
2485             theParamMin,theParamMax,theParamStep,Parameters = ParseParameters(theParamMin,theParamMax,theParamStep)
2486             if theNewMethod:
2487               anObj = self.CurvesOp.MakeCurveParametricNew(thexExpr,theyExpr,thezExpr,theParamMin,theParamMax,theParamStep,theCurveType)
2488             else:
2489               anObj = self.CurvesOp.MakeCurveParametric(thexExpr,theyExpr,thezExpr,theParamMin,theParamMax,theParamStep,theCurveType)
2490             RaiseIfFailed("MakeCurveParametric", self.CurvesOp)
2491             anObj.SetParameters(Parameters)
2492             self._autoPublish(anObj, theName, "curve")
2493             return anObj
2494
2495         ## Create an isoline curve on a face.
2496         #  @param theFace the face for which an isoline is created.
2497         #  @param IsUIsoline True for U-isoline creation; False for V-isoline
2498         #         creation.
2499         #  @param theParameter the U parameter for U-isoline or V parameter
2500         #         for V-isoline.
2501         #  @param theName Object name; when specified, this parameter is used
2502         #         for result publication in the study. Otherwise, if automatic
2503         #         publication is switched on, default value is used for result name.
2504         #
2505         #  @return New GEOM.GEOM_Object, containing the created isoline edge or
2506         #          a compound of edges.
2507         #
2508         #  @ref tui_creation_curve "Example"
2509         @ManageTransactions("CurvesOp")
2510         def MakeIsoline(self, theFace, IsUIsoline, theParameter, theName=None):
2511             """
2512             Create an isoline curve on a face.
2513
2514             Parameters:
2515                 theFace the face for which an isoline is created.
2516                 IsUIsoline True for U-isoline creation; False for V-isoline
2517                            creation.
2518                 theParameter the U parameter for U-isoline or V parameter
2519                              for V-isoline.
2520                 theName Object name; when specified, this parameter is used
2521                         for result publication in the study. Otherwise, if automatic
2522                         publication is switched on, default value is used for result name.
2523
2524             Returns:
2525                 New GEOM.GEOM_Object, containing the created isoline edge or a
2526                 compound of edges.
2527             """
2528             # Example: see GEOM_TestAll.py
2529             anObj = self.CurvesOp.MakeIsoline(theFace, IsUIsoline, theParameter)
2530             RaiseIfFailed("MakeIsoline", self.CurvesOp)
2531             if IsUIsoline:
2532                 self._autoPublish(anObj, theName, "U-Isoline")
2533             else:
2534                 self._autoPublish(anObj, theName, "V-Isoline")
2535             return anObj
2536
2537         # end of l4_curves
2538         ## @}
2539
2540         ## @addtogroup l3_sketcher
2541         ## @{
2542
2543         ## Create a sketcher (wire or face), following the textual description,
2544         #  passed through <VAR>theCommand</VAR> argument. \n
2545         #  Edges of the resulting wire or face will be arcs of circles and/or linear segments. \n
2546         #  Format of the description string have to be the following:
2547         #
2548         #  "Sketcher[:F x1 y1]:CMD[:CMD[:CMD...]]"
2549         #
2550         #  Where:
2551         #  - x1, y1 are coordinates of the first sketcher point (zero by default),
2552         #  - CMD is one of
2553         #     - "R angle" : Set the direction by angle
2554         #     - "D dx dy" : Set the direction by DX & DY
2555         #     .
2556         #       \n
2557         #     - "TT x y" : Create segment by point at X & Y
2558         #     - "T dx dy" : Create segment by point with DX & DY
2559         #     - "L length" : Create segment by direction & Length
2560         #     - "IX x" : Create segment by direction & Intersect. X
2561         #     - "IY y" : Create segment by direction & Intersect. Y
2562         #     .
2563         #       \n
2564         #     - "C radius length" : Create arc by direction, radius and length(in degree)
2565         #     - "AA x y": Create arc by point at X & Y
2566         #     - "A dx dy" : Create arc by point with DX & DY
2567         #     - "UU x y radius flag1": Create arc by point at X & Y with given radiUs
2568         #     - "U dx dy radius flag1" : Create arc by point with DX & DY with given radiUs
2569         #     - "EE x y xc yc flag1 flag2": Create arc by point at X & Y with given cEnter coordinates
2570         #     - "E dx dy dxc dyc radius flag1 flag2" : Create arc by point with DX & DY with given cEnter coordinates
2571         #     .
2572         #       \n
2573         #     - "WW" : Close Wire (to finish)
2574         #     - "WF" : Close Wire and build face (to finish)
2575         #     .
2576         #        \n
2577         #  - Flag1 (= reverse) is 0 or 2 ...
2578         #     - if 0 the drawn arc is the one of lower angle (< Pi)
2579         #     - if 2 the drawn arc ius the one of greater angle (> Pi)
2580         #     .
2581         #        \n
2582         #  - Flag2 (= control tolerance) is 0 or 1 ...
2583         #     - if 0 the specified end point can be at a distance of the arc greater than the tolerance (10^-7)
2584         #     - if 1 the wire is built only if the end point is on the arc
2585         #       with a tolerance of 10^-7 on the distance else the creation fails
2586         #
2587         #  @param theCommand String, defining the sketcher in local
2588         #                    coordinates of the working plane.
2589         #  @param theWorkingPlane Nine double values, defining origin,
2590         #                         OZ and OX directions of the working plane.
2591         #  @param theName Object name; when specified, this parameter is used
2592         #         for result publication in the study. Otherwise, if automatic
2593         #         publication is switched on, default value is used for result name.
2594         #
2595         #  @return New GEOM.GEOM_Object, containing the created wire.
2596         #
2597         #  @ref tui_sketcher_page "Example"
2598         @ManageTransactions("CurvesOp")
2599         def MakeSketcher(self, theCommand, theWorkingPlane = [0,0,0, 0,0,1, 1,0,0], theName=None):
2600             """
2601             Create a sketcher (wire or face), following the textual description, passed
2602             through theCommand argument.
2603             Edges of the resulting wire or face will be arcs of circles and/or linear segments.
2604             Format of the description string have to be the following:
2605                 "Sketcher[:F x1 y1]:CMD[:CMD[:CMD...]]"
2606             Where:
2607             - x1, y1 are coordinates of the first sketcher point (zero by default),
2608             - CMD is one of
2609                - "R angle" : Set the direction by angle
2610                - "D dx dy" : Set the direction by DX & DY
2611
2612                - "TT x y" : Create segment by point at X & Y
2613                - "T dx dy" : Create segment by point with DX & DY
2614                - "L length" : Create segment by direction & Length
2615                - "IX x" : Create segment by direction & Intersect. X
2616                - "IY y" : Create segment by direction & Intersect. Y
2617
2618                - "C radius length" : Create arc by direction, radius and length(in degree)
2619                - "AA x y": Create arc by point at X & Y
2620                - "A dx dy" : Create arc by point with DX & DY
2621                - "UU x y radius flag1": Create arc by point at X & Y with given radiUs
2622                - "U dx dy radius flag1" : Create arc by point with DX & DY with given radiUs
2623                - "EE x y xc yc flag1 flag2": Create arc by point at X & Y with given cEnter coordinates
2624                - "E dx dy dxc dyc radius flag1 flag2" : Create arc by point with DX & DY with given cEnter coordinates
2625
2626                - "WW" : Close Wire (to finish)
2627                - "WF" : Close Wire and build face (to finish)
2628
2629             - Flag1 (= reverse) is 0 or 2 ...
2630                - if 0 the drawn arc is the one of lower angle (< Pi)
2631                - if 2 the drawn arc ius the one of greater angle (> Pi)
2632
2633             - Flag2 (= control tolerance) is 0 or 1 ...
2634                - if 0 the specified end point can be at a distance of the arc greater than the tolerance (10^-7)
2635                - if 1 the wire is built only if the end point is on the arc
2636                  with a tolerance of 10^-7 on the distance else the creation fails
2637
2638             Parameters:
2639                 theCommand String, defining the sketcher in local
2640                            coordinates of the working plane.
2641                 theWorkingPlane Nine double values, defining origin,
2642                                 OZ and OX directions of the working plane.
2643                 theName Object name; when specified, this parameter is used
2644                         for result publication in the study. Otherwise, if automatic
2645                         publication is switched on, default value is used for result name.
2646
2647             Returns:
2648                 New GEOM.GEOM_Object, containing the created wire.
2649             """
2650             # Example: see GEOM_TestAll.py
2651             theCommand,Parameters = ParseSketcherCommand(theCommand)
2652             anObj = self.CurvesOp.MakeSketcher(theCommand, theWorkingPlane)
2653             RaiseIfFailed("MakeSketcher", self.CurvesOp)
2654             anObj.SetParameters(Parameters)
2655             self._autoPublish(anObj, theName, "wire")
2656             return anObj
2657
2658         ## Create a sketcher (wire or face), following the textual description,
2659         #  passed through <VAR>theCommand</VAR> argument. \n
2660         #  For format of the description string see MakeSketcher() method.\n
2661         #  @param theCommand String, defining the sketcher in local
2662         #                    coordinates of the working plane.
2663         #  @param theWorkingPlane Planar Face or LCS(Marker) of the working plane.
2664         #  @param theName Object name; when specified, this parameter is used
2665         #         for result publication in the study. Otherwise, if automatic
2666         #         publication is switched on, default value is used for result name.
2667         #
2668         #  @return New GEOM.GEOM_Object, containing the created wire.
2669         #
2670         #  @ref tui_sketcher_page "Example"
2671         @ManageTransactions("CurvesOp")
2672         def MakeSketcherOnPlane(self, theCommand, theWorkingPlane, theName=None):
2673             """
2674             Create a sketcher (wire or face), following the textual description,
2675             passed through theCommand argument.
2676             For format of the description string see geompy.MakeSketcher() method.
2677
2678             Parameters:
2679                 theCommand String, defining the sketcher in local
2680                            coordinates of the working plane.
2681                 theWorkingPlane Planar Face or LCS(Marker) of the working plane.
2682                 theName Object name; when specified, this parameter is used
2683                         for result publication in the study. Otherwise, if automatic
2684                         publication is switched on, default value is used for result name.
2685
2686             Returns:
2687                 New GEOM.GEOM_Object, containing the created wire.
2688             """
2689             theCommand,Parameters = ParseSketcherCommand(theCommand)
2690             anObj = self.CurvesOp.MakeSketcherOnPlane(theCommand, theWorkingPlane)
2691             RaiseIfFailed("MakeSketcherOnPlane", self.CurvesOp)
2692             anObj.SetParameters(Parameters)
2693             self._autoPublish(anObj, theName, "wire")
2694             return anObj
2695
2696         ## Obtain a 2D sketcher interface
2697         #  @return An instance of @ref gsketcher.Sketcher2D "Sketcher2D" interface
2698         def Sketcher2D (self):
2699             """
2700             Obtain a 2D sketcher interface.
2701
2702             Example of usage:
2703                sk = geompy.Sketcher2D()
2704                sk.addPoint(20, 20)
2705                sk.addSegmentRelative(15, 70)
2706                sk.addSegmentPerpY(50)
2707                sk.addArcRadiusRelative(25, 15, 14.5, 0)
2708                sk.addArcCenterAbsolute(1, 1, 50, 50, 0, 0)
2709                sk.addArcDirectionRadiusLength(20, 20, 101, 162.13)
2710                sk.close()
2711                Sketch_1 = sk.wire(geomObj_1)
2712             """
2713             sk = Sketcher2D (self)
2714             return sk
2715
2716         ## Create a sketcher wire, following the numerical description,
2717         #  passed through <VAR>theCoordinates</VAR> argument. \n
2718         #  @param theCoordinates double values, defining points to create a wire,
2719         #                                                      passing from it.
2720         #  @param theName Object name; when specified, this parameter is used
2721         #         for result publication in the study. Otherwise, if automatic
2722         #         publication is switched on, default value is used for result name.
2723         #
2724         #  @return New GEOM.GEOM_Object, containing the created wire.
2725         #
2726         #  @ref tui_3dsketcher_page "Example"
2727         @ManageTransactions("CurvesOp")
2728         def Make3DSketcher(self, theCoordinates, theName=None):
2729             """
2730             Create a sketcher wire, following the numerical description,
2731             passed through theCoordinates argument.
2732
2733             Parameters:
2734                 theCoordinates double values, defining points to create a wire,
2735                                passing from it.
2736                 theName Object name; when specified, this parameter is used
2737                         for result publication in the study. Otherwise, if automatic
2738                         publication is switched on, default value is used for result name.
2739
2740             Returns:
2741                 New GEOM_Object, containing the created wire.
2742             """
2743             theCoordinates,Parameters = ParseParameters(theCoordinates)
2744             anObj = self.CurvesOp.Make3DSketcher(theCoordinates)
2745             RaiseIfFailed("Make3DSketcher", self.CurvesOp)
2746             anObj.SetParameters(Parameters)
2747             self._autoPublish(anObj, theName, "wire")
2748             return anObj
2749
2750         ## Obtain a 3D sketcher interface
2751         #  @return An instance of @ref gsketcher.Sketcher3D "Sketcher3D" interface
2752         #
2753         #  @ref tui_3dsketcher_page "Example"
2754         def Sketcher3D (self):
2755             """
2756             Obtain a 3D sketcher interface.
2757
2758             Example of usage:
2759                 sk = geompy.Sketcher3D()
2760                 sk.addPointsAbsolute(0,0,0, 70,0,0)
2761                 sk.addPointsRelative(0, 0, 130)
2762                 sk.addPointAnglesLength("OXY", 50, 0, 100)
2763                 sk.addPointAnglesLength("OXZ", 30, 80, 130)
2764                 sk.close()
2765                 a3D_Sketcher_1 = sk.wire()
2766             """
2767             sk = Sketcher3D (self)
2768             return sk
2769
2770         ## Obtain a 2D polyline creation interface
2771         #  @return An instance of @ref gsketcher.Polyline2D "Polyline2D" interface
2772         #
2773         #  @ref tui_3dsketcher_page "Example"
2774         def Polyline2D (self):
2775             """
2776             Obtain a 2D polyline creation interface.
2777
2778             Example of usage:
2779                 pl = geompy.Polyline2D()
2780                 pl.addSection("section 1", GEOM.Polyline, True)
2781                 pl.addPoints(0, 0, 10, 0, 10, 10)
2782                 pl.addSection("section 2", GEOM.Interpolation, False)
2783                 pl.addPoints(20, 0, 30, 0, 30, 10)
2784                 resultObj = pl.result(WorkingPlane)
2785             """
2786             pl = Polyline2D (self)
2787             return pl
2788
2789         # end of l3_sketcher
2790         ## @}
2791
2792         ## @addtogroup l3_3d_primitives
2793         ## @{
2794
2795         ## Create a box by coordinates of two opposite vertices.
2796         #
2797         #  @param x1,y1,z1 double values, defining first point it.
2798         #  @param x2,y2,z2 double values, defining first point it.
2799         #  @param theName Object name; when specified, this parameter is used
2800         #         for result publication in the study. Otherwise, if automatic
2801         #         publication is switched on, default value is used for result name.
2802         #
2803         #  @return New GEOM.GEOM_Object, containing the created box.
2804         #
2805         #  @ref tui_creation_box "Example"
2806         def MakeBox(self, x1, y1, z1, x2, y2, z2, theName=None):
2807             """
2808             Create a box by coordinates of two opposite vertices.
2809
2810             Parameters:
2811                 x1,y1,z1 double values, defining first point.
2812                 x2,y2,z2 double values, defining second point.
2813                 theName Object name; when specified, this parameter is used
2814                         for result publication in the study. Otherwise, if automatic
2815                         publication is switched on, default value is used for result name.
2816
2817             Returns:
2818                 New GEOM.GEOM_Object, containing the created box.
2819             """
2820             # Example: see GEOM_TestAll.py
2821             pnt1 = self.MakeVertex(x1,y1,z1)
2822             pnt2 = self.MakeVertex(x2,y2,z2)
2823             # note: auto-publishing is done in self.MakeBoxTwoPnt()
2824             return self.MakeBoxTwoPnt(pnt1, pnt2, theName)
2825
2826         ## Create a box with specified dimensions along the coordinate axes
2827         #  and with edges, parallel to the coordinate axes.
2828         #  Center of the box will be at point (DX/2, DY/2, DZ/2).
2829         #  @param theDX Length of Box edges, parallel to OX axis.
2830         #  @param theDY Length of Box edges, parallel to OY axis.
2831         #  @param theDZ Length of Box edges, parallel to OZ axis.
2832         #  @param theName Object name; when specified, this parameter is used
2833         #         for result publication in the study. Otherwise, if automatic
2834         #         publication is switched on, default value is used for result name.
2835         #
2836         #  @return New GEOM.GEOM_Object, containing the created box.
2837         #
2838         #  @ref tui_creation_box "Example"
2839         @ManageTransactions("PrimOp")
2840         def MakeBoxDXDYDZ(self, theDX, theDY, theDZ, theName=None):
2841             """
2842             Create a box with specified dimensions along the coordinate axes
2843             and with edges, parallel to the coordinate axes.
2844             Center of the box will be at point (DX/2, DY/2, DZ/2).
2845
2846             Parameters:
2847                 theDX Length of Box edges, parallel to OX axis.
2848                 theDY Length of Box edges, parallel to OY axis.
2849                 theDZ Length of Box edges, parallel to OZ axis.
2850                 theName Object name; when specified, this parameter is used
2851                         for result publication in the study. Otherwise, if automatic
2852                         publication is switched on, default value is used for result name.
2853
2854             Returns:
2855                 New GEOM.GEOM_Object, containing the created box.
2856             """
2857             # Example: see GEOM_TestAll.py
2858             theDX,theDY,theDZ,Parameters = ParseParameters(theDX, theDY, theDZ)
2859             anObj = self.PrimOp.MakeBoxDXDYDZ(theDX, theDY, theDZ)
2860             RaiseIfFailed("MakeBoxDXDYDZ", self.PrimOp)
2861             anObj.SetParameters(Parameters)
2862             self._autoPublish(anObj, theName, "box")
2863             return anObj
2864
2865         ## Create a box with two specified opposite vertices,
2866         #  and with edges, parallel to the coordinate axes
2867         #  @param thePnt1 First of two opposite vertices.
2868         #  @param thePnt2 Second of two opposite vertices.
2869         #  @param theName Object name; when specified, this parameter is used
2870         #         for result publication in the study. Otherwise, if automatic
2871         #         publication is switched on, default value is used for result name.
2872         #
2873         #  @return New GEOM.GEOM_Object, containing the created box.
2874         #
2875         #  @ref tui_creation_box "Example"
2876         @ManageTransactions("PrimOp")
2877         def MakeBoxTwoPnt(self, thePnt1, thePnt2, theName=None):
2878             """
2879             Create a box with two specified opposite vertices,
2880             and with edges, parallel to the coordinate axes
2881
2882             Parameters:
2883                 thePnt1 First of two opposite vertices.
2884                 thePnt2 Second of two opposite vertices.
2885                 theName Object name; when specified, this parameter is used
2886                         for result publication in the study. Otherwise, if automatic
2887                         publication is switched on, default value is used for result name.
2888
2889             Returns:
2890                 New GEOM.GEOM_Object, containing the created box.
2891             """
2892             # Example: see GEOM_TestAll.py
2893             anObj = self.PrimOp.MakeBoxTwoPnt(thePnt1, thePnt2)
2894             RaiseIfFailed("MakeBoxTwoPnt", self.PrimOp)
2895             self._autoPublish(anObj, theName, "box")
2896             return anObj
2897
2898         ## Create a face with specified dimensions with edges parallel to coordinate axes.
2899         #  @param theH height of Face.
2900         #  @param theW width of Face.
2901         #  @param theOrientation face orientation: 1-OXY, 2-OYZ, 3-OZX
2902         #  @param theName Object name; when specified, this parameter is used
2903         #         for result publication in the study. Otherwise, if automatic
2904         #         publication is switched on, default value is used for result name.
2905         #
2906         #  @return New GEOM.GEOM_Object, containing the created face.
2907         #
2908         #  @ref tui_creation_face "Example"
2909         @ManageTransactions("PrimOp")
2910         def MakeFaceHW(self, theH, theW, theOrientation, theName=None):
2911             """
2912             Create a face with specified dimensions with edges parallel to coordinate axes.
2913
2914             Parameters:
2915                 theH height of Face.
2916                 theW width of Face.
2917                 theOrientation face orientation: 1-OXY, 2-OYZ, 3-OZX
2918                 theName Object name; when specified, this parameter is used
2919                         for result publication in the study. Otherwise, if automatic
2920                         publication is switched on, default value is used for result name.
2921
2922             Returns:
2923                 New GEOM.GEOM_Object, containing the created face.
2924             """
2925             # Example: see GEOM_TestAll.py
2926             theH,theW,Parameters = ParseParameters(theH, theW)
2927             anObj = self.PrimOp.MakeFaceHW(theH, theW, theOrientation)
2928             RaiseIfFailed("MakeFaceHW", self.PrimOp)
2929             anObj.SetParameters(Parameters)
2930             self._autoPublish(anObj, theName, "rectangle")
2931             return anObj
2932
2933         ## Create a face from another plane and two sizes,
2934         #  vertical size and horisontal size.
2935         #  @param theObj   Normale vector to the creating face or
2936         #  the face object.
2937         #  @param theH     Height (vertical size).
2938         #  @param theW     Width (horisontal size).
2939         #  @param theName Object name; when specified, this parameter is used
2940         #         for result publication in the study. Otherwise, if automatic
2941         #         publication is switched on, default value is used for result name.
2942         #
2943         #  @return New GEOM.GEOM_Object, containing the created face.
2944         #
2945         #  @ref tui_creation_face "Example"
2946         @ManageTransactions("PrimOp")
2947         def MakeFaceObjHW(self, theObj, theH, theW, theName=None):
2948             """
2949             Create a face from another plane and two sizes,
2950             vertical size and horisontal size.
2951
2952             Parameters:
2953                 theObj   Normale vector to the creating face or
2954                          the face object.
2955                 theH     Height (vertical size).
2956                 theW     Width (horisontal size).
2957                 theName Object name; when specified, this parameter is used
2958                         for result publication in the study. Otherwise, if automatic
2959                         publication is switched on, default value is used for result name.
2960
2961             Returns:
2962                 New GEOM_Object, containing the created face.
2963             """
2964             # Example: see GEOM_TestAll.py
2965             theH,theW,Parameters = ParseParameters(theH, theW)
2966             anObj = self.PrimOp.MakeFaceObjHW(theObj, theH, theW)
2967             RaiseIfFailed("MakeFaceObjHW", self.PrimOp)
2968             anObj.SetParameters(Parameters)
2969             self._autoPublish(anObj, theName, "rectangle")
2970             return anObj
2971
2972         ## Create a disk with given center, normal vector and radius.
2973         #  @param thePnt Disk center.
2974         #  @param theVec Vector, normal to the plane of the disk.
2975         #  @param theR Disk radius.
2976         #  @param theName Object name; when specified, this parameter is used
2977         #         for result publication in the study. Otherwise, if automatic
2978         #         publication is switched on, default value is used for result name.
2979         #
2980         #  @return New GEOM.GEOM_Object, containing the created disk.
2981         #
2982         #  @ref tui_creation_disk "Example"
2983         @ManageTransactions("PrimOp")
2984         def MakeDiskPntVecR(self, thePnt, theVec, theR, theName=None):
2985             """
2986             Create a disk with given center, normal vector and radius.
2987
2988             Parameters:
2989                 thePnt Disk center.
2990                 theVec Vector, normal to the plane of the disk.
2991                 theR Disk radius.
2992                 theName Object name; when specified, this parameter is used
2993                         for result publication in the study. Otherwise, if automatic
2994                         publication is switched on, default value is used for result name.
2995
2996             Returns:
2997                 New GEOM.GEOM_Object, containing the created disk.
2998             """
2999             # Example: see GEOM_TestAll.py
3000             theR,Parameters = ParseParameters(theR)
3001             anObj = self.PrimOp.MakeDiskPntVecR(thePnt, theVec, theR)
3002             RaiseIfFailed("MakeDiskPntVecR", self.PrimOp)
3003             anObj.SetParameters(Parameters)
3004             self._autoPublish(anObj, theName, "disk")
3005             return anObj
3006
3007         ## Create a disk, passing through three given points
3008         #  @param thePnt1,thePnt2,thePnt3 Points, defining the disk.
3009         #  @param theName Object name; when specified, this parameter is used
3010         #         for result publication in the study. Otherwise, if automatic
3011         #         publication is switched on, default value is used for result name.
3012         #
3013         #  @return New GEOM.GEOM_Object, containing the created disk.
3014         #
3015         #  @ref tui_creation_disk "Example"
3016         @ManageTransactions("PrimOp")
3017         def MakeDiskThreePnt(self, thePnt1, thePnt2, thePnt3, theName=None):
3018             """
3019             Create a disk, passing through three given points
3020
3021             Parameters:
3022                 thePnt1,thePnt2,thePnt3 Points, defining the disk.
3023                 theName Object name; when specified, this parameter is used
3024                         for result publication in the study. Otherwise, if automatic
3025                         publication is switched on, default value is used for result name.
3026
3027             Returns:
3028                 New GEOM.GEOM_Object, containing the created disk.
3029             """
3030             # Example: see GEOM_TestAll.py
3031             anObj = self.PrimOp.MakeDiskThreePnt(thePnt1, thePnt2, thePnt3)
3032             RaiseIfFailed("MakeDiskThreePnt", self.PrimOp)
3033             self._autoPublish(anObj, theName, "disk")
3034             return anObj
3035
3036         ## Create a disk with specified dimensions along OX-OY coordinate axes.
3037         #  @param theR Radius of Face.
3038         #  @param theOrientation set the orientation belong axis OXY or OYZ or OZX
3039         #  @param theName Object name; when specified, this parameter is used
3040         #         for result publication in the study. Otherwise, if automatic
3041         #         publication is switched on, default value is used for result name.
3042         #
3043         #  @return New GEOM.GEOM_Object, containing the created disk.
3044         #
3045         #  @ref tui_creation_face "Example"
3046         @ManageTransactions("PrimOp")
3047         def MakeDiskR(self, theR, theOrientation, theName=None):
3048             """
3049             Create a disk with specified dimensions along OX-OY coordinate axes.
3050
3051             Parameters:
3052                 theR Radius of Face.
3053                 theOrientation set the orientation belong axis OXY or OYZ or OZX
3054                 theName Object name; when specified, this parameter is used
3055                         for result publication in the study. Otherwise, if automatic
3056                         publication is switched on, default value is used for result name.
3057
3058             Returns:
3059                 New GEOM.GEOM_Object, containing the created disk.
3060
3061             Example of usage:
3062                 Disk3 = geompy.MakeDiskR(100., 1)
3063             """
3064             # Example: see GEOM_TestAll.py
3065             theR,Parameters = ParseParameters(theR)
3066             anObj = self.PrimOp.MakeDiskR(theR, theOrientation)
3067             RaiseIfFailed("MakeDiskR", self.PrimOp)
3068             anObj.SetParameters(Parameters)
3069             self._autoPublish(anObj, theName, "disk")
3070             return anObj
3071
3072         ## Create a cylinder with given base point, axis, radius and height.
3073         #  @param thePnt Central point of cylinder base.
3074         #  @param theAxis Cylinder axis.
3075         #  @param theR Cylinder radius.
3076         #  @param theH Cylinder height.
3077         #  @param theName Object name; when specified, this parameter is used
3078         #         for result publication in the study. Otherwise, if automatic
3079         #         publication is switched on, default value is used for result name.
3080         #
3081         #  @return New GEOM.GEOM_Object, containing the created cylinder.
3082         #
3083         #  @ref tui_creation_cylinder "Example"
3084         @ManageTransactions("PrimOp")
3085         def MakeCylinder(self, thePnt, theAxis, theR, theH, theName=None):
3086             """
3087             Create a cylinder with given base point, axis, radius and height.
3088
3089             Parameters:
3090                 thePnt Central point of cylinder base.
3091                 theAxis Cylinder axis.
3092                 theR Cylinder radius.
3093                 theH Cylinder height.
3094                 theName Object name; when specified, this parameter is used
3095                         for result publication in the study. Otherwise, if automatic
3096                         publication is switched on, default value is used for result name.
3097
3098             Returns:
3099                 New GEOM.GEOM_Object, containing the created cylinder.
3100             """
3101             # Example: see GEOM_TestAll.py
3102             theR,theH,Parameters = ParseParameters(theR, theH)
3103             anObj = self.PrimOp.MakeCylinderPntVecRH(thePnt, theAxis, theR, theH)
3104             RaiseIfFailed("MakeCylinderPntVecRH", self.PrimOp)
3105             anObj.SetParameters(Parameters)
3106             self._autoPublish(anObj, theName, "cylinder")
3107             return anObj
3108             
3109         ## Create a portion of cylinder with given base point, axis, radius, height and angle.
3110         #  @param thePnt Central point of cylinder base.
3111         #  @param theAxis Cylinder axis.
3112         #  @param theR Cylinder radius.
3113         #  @param theH Cylinder height.
3114         #  @param theA Cylinder angle in radians.
3115         #  @param theName Object name; when specified, this parameter is used
3116         #         for result publication in the study. Otherwise, if automatic
3117         #         publication is switched on, default value is used for result name.
3118         #
3119         #  @return New GEOM.GEOM_Object, containing the created cylinder.
3120         #
3121         #  @ref tui_creation_cylinder "Example"
3122         @ManageTransactions("PrimOp")
3123         def MakeCylinderA(self, thePnt, theAxis, theR, theH, theA, theName=None):
3124             """
3125             Create a portion of cylinder with given base point, axis, radius, height and angle.
3126
3127             Parameters:
3128                 thePnt Central point of cylinder base.
3129                 theAxis Cylinder axis.
3130                 theR Cylinder radius.
3131                 theH Cylinder height.
3132                 theA Cylinder angle in radians.
3133                 theName Object name; when specified, this parameter is used
3134                         for result publication in the study. Otherwise, if automatic
3135                         publication is switched on, default value is used for result name.
3136
3137             Returns:
3138                 New GEOM.GEOM_Object, containing the created cylinder.
3139             """
3140             # Example: see GEOM_TestAll.py
3141             flag = False
3142             if isinstance(theA,str):
3143                 flag = True
3144             theR,theH,theA,Parameters = ParseParameters(theR, theH, theA)
3145             if flag:
3146                 theA = theA*math.pi/180.
3147             if theA<=0. or theA>=2*math.pi:
3148                 raise ValueError("The angle parameter should be strictly between 0 and 2*pi.")
3149             anObj = self.PrimOp.MakeCylinderPntVecRHA(thePnt, theAxis, theR, theH, theA)
3150             RaiseIfFailed("MakeCylinderPntVecRHA", self.PrimOp)
3151             anObj.SetParameters(Parameters)
3152             self._autoPublish(anObj, theName, "cylinder")
3153             return anObj
3154
3155         ## Create a cylinder with given radius and height at
3156         #  the origin of coordinate system. Axis of the cylinder
3157         #  will be collinear to the OZ axis of the coordinate system.
3158         #  @param theR Cylinder radius.
3159         #  @param theH Cylinder height.
3160         #  @param theName Object name; when specified, this parameter is used
3161         #         for result publication in the study. Otherwise, if automatic
3162         #         publication is switched on, default value is used for result name.
3163         #
3164         #  @return New GEOM.GEOM_Object, containing the created cylinder.
3165         #
3166         #  @ref tui_creation_cylinder "Example"
3167         @ManageTransactions("PrimOp")
3168         def MakeCylinderRH(self, theR, theH, theName=None):
3169             """
3170             Create a cylinder with given radius and height at
3171             the origin of coordinate system. Axis of the cylinder
3172             will be collinear to the OZ axis of the coordinate system.
3173
3174             Parameters:
3175                 theR Cylinder radius.
3176                 theH Cylinder height.
3177                 theName Object name; when specified, this parameter is used
3178                         for result publication in the study. Otherwise, if automatic
3179                         publication is switched on, default value is used for result name.
3180
3181             Returns:
3182                 New GEOM.GEOM_Object, containing the created cylinder.
3183             """
3184             # Example: see GEOM_TestAll.py
3185             theR,theH,Parameters = ParseParameters(theR, theH)
3186             anObj = self.PrimOp.MakeCylinderRH(theR, theH)
3187             RaiseIfFailed("MakeCylinderRH", self.PrimOp)
3188             anObj.SetParameters(Parameters)
3189             self._autoPublish(anObj, theName, "cylinder")
3190             return anObj
3191             
3192         ## Create a portion of cylinder with given radius, height and angle at
3193         #  the origin of coordinate system. Axis of the cylinder
3194         #  will be collinear to the OZ axis of the coordinate system.
3195         #  @param theR Cylinder radius.
3196         #  @param theH Cylinder height.
3197         #  @param theA Cylinder angle in radians.
3198         #  @param theName Object name; when specified, this parameter is used
3199         #         for result publication in the study. Otherwise, if automatic
3200         #         publication is switched on, default value is used for result name.
3201         #
3202         #  @return New GEOM.GEOM_Object, containing the created cylinder.
3203         #
3204         #  @ref tui_creation_cylinder "Example"
3205         @ManageTransactions("PrimOp")
3206         def MakeCylinderRHA(self, theR, theH, theA, theName=None):
3207             """
3208             Create a portion of cylinder with given radius, height and angle at
3209             the origin of coordinate system. Axis of the cylinder
3210             will be collinear to the OZ axis of the coordinate system.
3211
3212             Parameters:
3213                 theR Cylinder radius.
3214                 theH Cylinder height.
3215                 theA Cylinder angle in radians.
3216                 theName Object name; when specified, this parameter is used
3217                         for result publication in the study. Otherwise, if automatic
3218                         publication is switched on, default value is used for result name.
3219
3220             Returns:
3221                 New GEOM.GEOM_Object, containing the created cylinder.
3222             """
3223             # Example: see GEOM_TestAll.py
3224             flag = False
3225             if isinstance(theA,str):
3226                 flag = True
3227             theR,theH,theA,Parameters = ParseParameters(theR, theH, theA)
3228             if flag:
3229                 theA = theA*math.pi/180.
3230             if theA<=0. or theA>=2*math.pi:
3231                 raise ValueError("The angle parameter should be strictly between 0 and 2*pi.")
3232             anObj = self.PrimOp.MakeCylinderRHA(theR, theH, theA)
3233             RaiseIfFailed("MakeCylinderRHA", self.PrimOp)
3234             anObj.SetParameters(Parameters)
3235             self._autoPublish(anObj, theName, "cylinder")
3236             return anObj
3237
3238         ## Create a sphere with given center and radius.
3239         #  @param thePnt Sphere center.
3240         #  @param theR Sphere radius.
3241         #  @param theName Object name; when specified, this parameter is used
3242         #         for result publication in the study. Otherwise, if automatic
3243         #         publication is switched on, default value is used for result name.
3244         #
3245         #  @return New GEOM.GEOM_Object, containing the created sphere.
3246         #
3247         #  @ref tui_creation_sphere "Example"
3248         @ManageTransactions("PrimOp")
3249         def MakeSpherePntR(self, thePnt, theR, theName=None):
3250             """
3251             Create a sphere with given center and radius.
3252
3253             Parameters:
3254                 thePnt Sphere center.
3255                 theR Sphere radius.
3256                 theName Object name; when specified, this parameter is used
3257                         for result publication in the study. Otherwise, if automatic
3258                         publication is switched on, default value is used for result name.
3259
3260             Returns:
3261                 New GEOM.GEOM_Object, containing the created sphere.
3262             """
3263             # Example: see GEOM_TestAll.py
3264             theR,Parameters = ParseParameters(theR)
3265             anObj = self.PrimOp.MakeSpherePntR(thePnt, theR)
3266             RaiseIfFailed("MakeSpherePntR", self.PrimOp)
3267             anObj.SetParameters(Parameters)
3268             self._autoPublish(anObj, theName, "sphere")
3269             return anObj
3270
3271         ## Create a sphere with given center and radius.
3272         #  @param x,y,z Coordinates of sphere center.
3273         #  @param theR Sphere radius.
3274         #  @param theName Object name; when specified, this parameter is used
3275         #         for result publication in the study. Otherwise, if automatic
3276         #         publication is switched on, default value is used for result name.
3277         #
3278         #  @return New GEOM.GEOM_Object, containing the created sphere.
3279         #
3280         #  @ref tui_creation_sphere "Example"
3281         def MakeSphere(self, x, y, z, theR, theName=None):
3282             """
3283             Create a sphere with given center and radius.
3284
3285             Parameters:
3286                 x,y,z Coordinates of sphere center.
3287                 theR Sphere radius.
3288                 theName Object name; when specified, this parameter is used
3289                         for result publication in the study. Otherwise, if automatic
3290                         publication is switched on, default value is used for result name.
3291
3292             Returns:
3293                 New GEOM.GEOM_Object, containing the created sphere.
3294             """
3295             # Example: see GEOM_TestAll.py
3296             point = self.MakeVertex(x, y, z)
3297             # note: auto-publishing is done in self.MakeSpherePntR()
3298             anObj = self.MakeSpherePntR(point, theR, theName)
3299             return anObj
3300
3301         ## Create a sphere with given radius at the origin of coordinate system.
3302         #  @param theR Sphere radius.
3303         #  @param theName Object name; when specified, this parameter is used
3304         #         for result publication in the study. Otherwise, if automatic
3305         #         publication is switched on, default value is used for result name.
3306         #
3307         #  @return New GEOM.GEOM_Object, containing the created sphere.
3308         #
3309         #  @ref tui_creation_sphere "Example"
3310         @ManageTransactions("PrimOp")
3311         def MakeSphereR(self, theR, theName=None):
3312             """
3313             Create a sphere with given radius at the origin of coordinate system.
3314
3315             Parameters:
3316                 theR Sphere radius.
3317                 theName Object name; when specified, this parameter is used
3318                         for result publication in the study. Otherwise, if automatic
3319                         publication is switched on, default value is used for result name.
3320
3321             Returns:
3322                 New GEOM.GEOM_Object, containing the created sphere.
3323             """
3324             # Example: see GEOM_TestAll.py
3325             theR,Parameters = ParseParameters(theR)
3326             anObj = self.PrimOp.MakeSphereR(theR)
3327             RaiseIfFailed("MakeSphereR", self.PrimOp)
3328             anObj.SetParameters(Parameters)
3329             self._autoPublish(anObj, theName, "sphere")
3330             return anObj
3331
3332         ## Create a cone with given base point, axis, height and radiuses.
3333         #  @param thePnt Central point of the first cone base.
3334         #  @param theAxis Cone axis.
3335         #  @param theR1 Radius of the first cone base.
3336         #  @param theR2 Radius of the second cone base.
3337         #    \note If both radiuses are non-zero, the cone will be truncated.
3338         #    \note If the radiuses are equal, a cylinder will be created instead.
3339         #  @param theH Cone height.
3340         #  @param theName Object name; when specified, this parameter is used
3341         #         for result publication in the study. Otherwise, if automatic
3342         #         publication is switched on, default value is used for result name.
3343         #
3344         #  @return New GEOM.GEOM_Object, containing the created cone.
3345         #
3346         #  @ref tui_creation_cone "Example"
3347         @ManageTransactions("PrimOp")
3348         def MakeCone(self, thePnt, theAxis, theR1, theR2, theH, theName=None):
3349             """
3350             Create a cone with given base point, axis, height and radiuses.
3351
3352             Parameters:
3353                 thePnt Central point of the first cone base.
3354                 theAxis Cone axis.
3355                 theR1 Radius of the first cone base.
3356                 theR2 Radius of the second cone base.
3357                 theH Cone height.
3358                 theName Object name; when specified, this parameter is used
3359                         for result publication in the study. Otherwise, if automatic
3360                         publication is switched on, default value is used for result name.
3361
3362             Note:
3363                 If both radiuses are non-zero, the cone will be truncated.
3364                 If the radiuses are equal, a cylinder will be created instead.
3365
3366             Returns:
3367                 New GEOM.GEOM_Object, containing the created cone.
3368             """
3369             # Example: see GEOM_TestAll.py
3370             theR1,theR2,theH,Parameters = ParseParameters(theR1,theR2,theH)
3371             anObj = self.PrimOp.MakeConePntVecR1R2H(thePnt, theAxis, theR1, theR2, theH)
3372             RaiseIfFailed("MakeConePntVecR1R2H", self.PrimOp)
3373             anObj.SetParameters(Parameters)
3374             self._autoPublish(anObj, theName, "cone")
3375             return anObj
3376
3377         ## Create a cone with given height and radiuses at
3378         #  the origin of coordinate system. Axis of the cone will
3379         #  be collinear to the OZ axis of the coordinate system.
3380         #  @param theR1 Radius of the first cone base.
3381         #  @param theR2 Radius of the second cone base.
3382         #    \note If both radiuses are non-zero, the cone will be truncated.
3383         #    \note If the radiuses are equal, a cylinder will be created instead.
3384         #  @param theH Cone height.
3385         #  @param theName Object name; when specified, this parameter is used
3386         #         for result publication in the study. Otherwise, if automatic
3387         #         publication is switched on, default value is used for result name.
3388         #
3389         #  @return New GEOM.GEOM_Object, containing the created cone.
3390         #
3391         #  @ref tui_creation_cone "Example"
3392         @ManageTransactions("PrimOp")
3393         def MakeConeR1R2H(self, theR1, theR2, theH, theName=None):
3394             """
3395             Create a cone with given height and radiuses at
3396             the origin of coordinate system. Axis of the cone will
3397             be collinear to the OZ axis of the coordinate system.
3398
3399             Parameters:
3400                 theR1 Radius of the first cone base.
3401                 theR2 Radius of the second cone base.
3402                 theH Cone height.
3403                 theName Object name; when specified, this parameter is used
3404                         for result publication in the study. Otherwise, if automatic
3405                         publication is switched on, default value is used for result name.
3406
3407             Note:
3408                 If both radiuses are non-zero, the cone will be truncated.
3409                 If the radiuses are equal, a cylinder will be created instead.
3410
3411             Returns:
3412                 New GEOM.GEOM_Object, containing the created cone.
3413             """
3414             # Example: see GEOM_TestAll.py
3415             theR1,theR2,theH,Parameters = ParseParameters(theR1,theR2,theH)
3416             anObj = self.PrimOp.MakeConeR1R2H(theR1, theR2, theH)
3417             RaiseIfFailed("MakeConeR1R2H", self.PrimOp)
3418             anObj.SetParameters(Parameters)
3419             self._autoPublish(anObj, theName, "cone")
3420             return anObj
3421
3422         ## Create a torus with given center, normal vector and radiuses.
3423         #  @param thePnt Torus central point.
3424         #  @param theVec Torus axis of symmetry.
3425         #  @param theRMajor Torus major radius.
3426         #  @param theRMinor Torus minor radius.
3427         #  @param theName Object name; when specified, this parameter is used
3428         #         for result publication in the study. Otherwise, if automatic
3429         #         publication is switched on, default value is used for result name.
3430         #
3431         #  @return New GEOM.GEOM_Object, containing the created torus.
3432         #
3433         #  @ref tui_creation_torus "Example"
3434         @ManageTransactions("PrimOp")
3435         def MakeTorus(self, thePnt, theVec, theRMajor, theRMinor, theName=None):
3436             """
3437             Create a torus with given center, normal vector and radiuses.
3438
3439             Parameters:
3440                 thePnt Torus central point.
3441                 theVec Torus axis of symmetry.
3442                 theRMajor Torus major radius.
3443                 theRMinor Torus minor radius.
3444                 theName Object name; when specified, this parameter is used
3445                         for result publication in the study. Otherwise, if automatic
3446                         publication is switched on, default value is used for result name.
3447
3448            Returns:
3449                 New GEOM.GEOM_Object, containing the created torus.
3450             """
3451             # Example: see GEOM_TestAll.py
3452             theRMajor,theRMinor,Parameters = ParseParameters(theRMajor,theRMinor)
3453             anObj = self.PrimOp.MakeTorusPntVecRR(thePnt, theVec, theRMajor, theRMinor)
3454             RaiseIfFailed("MakeTorusPntVecRR", self.PrimOp)
3455             anObj.SetParameters(Parameters)
3456             self._autoPublish(anObj, theName, "torus")
3457             return anObj
3458
3459         ## Create a torus with given radiuses at the origin of coordinate system.
3460         #  @param theRMajor Torus major radius.
3461         #  @param theRMinor Torus minor radius.
3462         #  @param theName Object name; when specified, this parameter is used
3463         #         for result publication in the study. Otherwise, if automatic
3464         #         publication is switched on, default value is used for result name.
3465         #
3466         #  @return New GEOM.GEOM_Object, containing the created torus.
3467         #
3468         #  @ref tui_creation_torus "Example"
3469         @ManageTransactions("PrimOp")
3470         def MakeTorusRR(self, theRMajor, theRMinor, theName=None):
3471             """
3472            Create a torus with given radiuses at the origin of coordinate system.
3473
3474            Parameters:
3475                 theRMajor Torus major radius.
3476                 theRMinor Torus minor radius.
3477                 theName Object name; when specified, this parameter is used
3478                         for result publication in the study. Otherwise, if automatic
3479                         publication is switched on, default value is used for result name.
3480
3481            Returns:
3482                 New GEOM.GEOM_Object, containing the created torus.
3483             """
3484             # Example: see GEOM_TestAll.py
3485             theRMajor,theRMinor,Parameters = ParseParameters(theRMajor,theRMinor)
3486             anObj = self.PrimOp.MakeTorusRR(theRMajor, theRMinor)
3487             RaiseIfFailed("MakeTorusRR", self.PrimOp)
3488             anObj.SetParameters(Parameters)
3489             self._autoPublish(anObj, theName, "torus")
3490             return anObj
3491
3492         # end of l3_3d_primitives
3493         ## @}
3494
3495         ## @addtogroup l3_complex
3496         ## @{
3497
3498         ## Create a shape by extrusion of the base shape along a vector, defined by two points.
3499         #  @param theBase Base shape to be extruded.
3500         #  @param thePoint1 First end of extrusion vector.
3501         #  @param thePoint2 Second end of extrusion vector.
3502         #  @param theScaleFactor Use it to make prism with scaled second base.
3503         #                        Nagative value means not scaled second base.
3504         #  @param theName Object name; when specified, this parameter is used
3505         #         for result publication in the study. Otherwise, if automatic
3506         #         publication is switched on, default value is used for result name.
3507         #
3508         #  @return New GEOM.GEOM_Object, containing the created prism.
3509         #
3510         #  @ref tui_creation_prism "Example"
3511         @ManageTransactions("PrimOp")
3512         def MakePrism(self, theBase, thePoint1, thePoint2, theScaleFactor = -1.0, theName=None):
3513             """
3514             Create a shape by extrusion of the base shape along a vector, defined by two points.
3515
3516             Parameters:
3517                 theBase Base shape to be extruded.
3518                 thePoint1 First end of extrusion vector.
3519                 thePoint2 Second end of extrusion vector.
3520                 theScaleFactor Use it to make prism with scaled second base.
3521                                Nagative value means not scaled second base.
3522                 theName Object name; when specified, this parameter is used
3523                         for result publication in the study. Otherwise, if automatic
3524                         publication is switched on, default value is used for result name.
3525
3526             Returns:
3527                 New GEOM.GEOM_Object, containing the created prism.
3528             """
3529             # Example: see GEOM_TestAll.py
3530             anObj = None
3531             Parameters = ""
3532             if theScaleFactor > 0:
3533                 theScaleFactor,Parameters = ParseParameters(theScaleFactor)
3534                 anObj = self.PrimOp.MakePrismTwoPntWithScaling(theBase, thePoint1, thePoint2, theScaleFactor)
3535             else:
3536                 anObj = self.PrimOp.MakePrismTwoPnt(theBase, thePoint1, thePoint2)
3537             RaiseIfFailed("MakePrismTwoPnt", self.PrimOp)
3538             anObj.SetParameters(Parameters)
3539             self._autoPublish(anObj, theName, "prism")
3540             return anObj
3541
3542         ## Create a shape by extrusion of the base shape along a
3543         #  vector, defined by two points, in 2 Ways (forward/backward).
3544         #  @param theBase Base shape to be extruded.
3545         #  @param thePoint1 First end of extrusion vector.
3546         #  @param thePoint2 Second end of extrusion vector.
3547         #  @param theName Object name; when specified, this parameter is used
3548         #         for result publication in the study. Otherwise, if automatic
3549         #         publication is switched on, default value is used for result name.
3550         #
3551         #  @return New GEOM.GEOM_Object, containing the created prism.
3552         #
3553         #  @ref tui_creation_prism "Example"
3554         @ManageTransactions("PrimOp")
3555         def MakePrism2Ways(self, theBase, thePoint1, thePoint2, theName=None):
3556             """
3557             Create a shape by extrusion of the base shape along a
3558             vector, defined by two points, in 2 Ways (forward/backward).
3559
3560             Parameters:
3561                 theBase Base shape to be extruded.
3562                 thePoint1 First end of extrusion vector.
3563                 thePoint2 Second end of extrusion vector.
3564                 theName Object name; when specified, this parameter is used
3565                         for result publication in the study. Otherwise, if automatic
3566                         publication is switched on, default value is used for result name.
3567
3568             Returns:
3569                 New GEOM.GEOM_Object, containing the created prism.
3570             """
3571             # Example: see GEOM_TestAll.py
3572             anObj = self.PrimOp.MakePrismTwoPnt2Ways(theBase, thePoint1, thePoint2)
3573             RaiseIfFailed("MakePrismTwoPnt", self.PrimOp)
3574             self._autoPublish(anObj, theName, "prism")
3575             return anObj
3576
3577         ## Create a shape by extrusion of the base shape along the vector,
3578         #  i.e. all the space, transfixed by the base shape during its translation
3579         #  along the vector on the given distance.
3580         #  @param theBase Base shape to be extruded.
3581         #  @param theVec Direction of extrusion.
3582         #  @param theH Prism dimension along theVec.
3583         #  @param theScaleFactor Use it to make prism with scaled second base.
3584         #                        Negative value means not scaled second base.
3585         #  @param theName Object name; when specified, this parameter is used
3586         #         for result publication in the study. Otherwise, if automatic
3587         #         publication is switched on, default value is used for result name.
3588         #
3589         #  @return New GEOM.GEOM_Object, containing the created prism.
3590         #
3591         #  @ref tui_creation_prism "Example"
3592         @ManageTransactions("PrimOp")
3593         def MakePrismVecH(self, theBase, theVec, theH, theScaleFactor = -1.0, theName=None):
3594             """
3595             Create a shape by extrusion of the base shape along the vector,
3596             i.e. all the space, transfixed by the base shape during its translation
3597             along the vector on the given distance.
3598
3599             Parameters:
3600                 theBase Base shape to be extruded.
3601                 theVec Direction of extrusion.
3602                 theH Prism dimension along theVec.
3603                 theScaleFactor Use it to make prism with scaled second base.
3604                                Negative value means not scaled second base.
3605                 theName Object name; when specified, this parameter is used
3606                         for result publication in the study. Otherwise, if automatic
3607                         publication is switched on, default value is used for result name.
3608
3609             Returns:
3610                 New GEOM.GEOM_Object, containing the created prism.
3611             """
3612             # Example: see GEOM_TestAll.py
3613             anObj = None
3614             Parameters = ""
3615             if theScaleFactor > 0:
3616                 theH,theScaleFactor,Parameters = ParseParameters(theH,theScaleFactor)
3617                 anObj = self.PrimOp.MakePrismVecHWithScaling(theBase, theVec, theH, theScaleFactor)
3618             else:
3619                 theH,Parameters = ParseParameters(theH)
3620                 anObj = self.PrimOp.MakePrismVecH(theBase, theVec, theH)
3621             RaiseIfFailed("MakePrismVecH", self.PrimOp)
3622             anObj.SetParameters(Parameters)
3623             self._autoPublish(anObj, theName, "prism")
3624             return anObj
3625
3626         ## Create a shape by extrusion of the base shape along the vector,
3627         #  i.e. all the space, transfixed by the base shape during its translation
3628         #  along the vector on the given distance in 2 Ways (forward/backward).
3629         #  @param theBase Base shape to be extruded.
3630         #  @param theVec Direction of extrusion.
3631         #  @param theH Prism dimension along theVec in forward direction.
3632         #  @param theName Object name; when specified, this parameter is used
3633         #         for result publication in the study. Otherwise, if automatic
3634         #         publication is switched on, default value is used for result name.
3635         #
3636         #  @return New GEOM.GEOM_Object, containing the created prism.
3637         #
3638         #  @ref tui_creation_prism "Example"
3639         @ManageTransactions("PrimOp")
3640         def MakePrismVecH2Ways(self, theBase, theVec, theH, theName=None):
3641             """
3642             Create a shape by extrusion of the base shape along the vector,
3643             i.e. all the space, transfixed by the base shape during its translation
3644             along the vector on the given distance in 2 Ways (forward/backward).
3645
3646             Parameters:
3647                 theBase Base shape to be extruded.
3648                 theVec Direction of extrusion.
3649                 theH Prism dimension along theVec in forward direction.
3650                 theName Object name; when specified, this parameter is used
3651                         for result publication in the study. Otherwise, if automatic
3652                         publication is switched on, default value is used for result name.
3653
3654             Returns:
3655                 New GEOM.GEOM_Object, containing the created prism.
3656             """
3657             # Example: see GEOM_TestAll.py
3658             theH,Parameters = ParseParameters(theH)
3659             anObj = self.PrimOp.MakePrismVecH2Ways(theBase, theVec, theH)
3660             RaiseIfFailed("MakePrismVecH2Ways", self.PrimOp)
3661             anObj.SetParameters(Parameters)
3662             self._autoPublish(anObj, theName, "prism")
3663             return anObj
3664
3665         ## Create a shape by extrusion of the base shape along the dx, dy, dz direction
3666         #  @param theBase Base shape to be extruded.
3667         #  @param theDX, theDY, theDZ Directions of extrusion.
3668         #  @param theScaleFactor Use it to make prism with scaled second base.
3669         #                        Nagative value means not scaled second base.
3670         #  @param theName Object name; when specified, this parameter is used
3671         #         for result publication in the study. Otherwise, if automatic
3672         #         publication is switched on, default value is used for result name.
3673         #
3674         #  @return New GEOM.GEOM_Object, containing the created prism.
3675         #
3676         #  @ref tui_creation_prism "Example"
3677         @ManageTransactions("PrimOp")
3678         def MakePrismDXDYDZ(self, theBase, theDX, theDY, theDZ, theScaleFactor = -1.0, theName=None):
3679             """
3680             Create a shape by extrusion of the base shape along the dx, dy, dz direction
3681
3682             Parameters:
3683                 theBase Base shape to be extruded.
3684                 theDX, theDY, theDZ Directions of extrusion.
3685                 theScaleFactor Use it to make prism with scaled second base.
3686                                Nagative value means not scaled second base.
3687                 theName Object name; when specified, this parameter is used
3688                         for result publication in the study. Otherwise, if automatic
3689                         publication is switched on, default value is used for result name.
3690
3691             Returns:
3692                 New GEOM.GEOM_Object, containing the created prism.
3693             """
3694             # Example: see GEOM_TestAll.py
3695             anObj = None
3696             Parameters = ""
3697             if theScaleFactor > 0:
3698                 theDX,theDY,theDZ,theScaleFactor,Parameters = ParseParameters(theDX, theDY, theDZ, theScaleFactor)
3699                 anObj = self.PrimOp.MakePrismDXDYDZWithScaling(theBase, theDX, theDY, theDZ, theScaleFactor)
3700             else:
3701                 theDX,theDY,theDZ,Parameters = ParseParameters(theDX, theDY, theDZ)
3702                 anObj = self.PrimOp.MakePrismDXDYDZ(theBase, theDX, theDY, theDZ)
3703             RaiseIfFailed("MakePrismDXDYDZ", self.PrimOp)
3704             anObj.SetParameters(Parameters)
3705             self._autoPublish(anObj, theName, "prism")
3706             return anObj
3707
3708         ## Create a shape by extrusion of the base shape along the dx, dy, dz direction
3709         #  i.e. all the space, transfixed by the base shape during its translation
3710         #  along the vector on the given distance in 2 Ways (forward/backward).
3711         #  @param theBase Base shape to be extruded.
3712         #  @param theDX, theDY, theDZ Directions of extrusion.
3713         #  @param theName Object name; when specified, this parameter is used
3714         #         for result publication in the study. Otherwise, if automatic
3715         #         publication is switched on, default value is used for result name.
3716         #
3717         #  @return New GEOM.GEOM_Object, containing the created prism.
3718         #
3719         #  @ref tui_creation_prism "Example"
3720         @ManageTransactions("PrimOp")
3721         def MakePrismDXDYDZ2Ways(self, theBase, theDX, theDY, theDZ, theName=None):
3722             """
3723             Create a shape by extrusion of the base shape along the dx, dy, dz direction
3724             i.e. all the space, transfixed by the base shape during its translation
3725             along the vector on the given distance in 2 Ways (forward/backward).
3726
3727             Parameters:
3728                 theBase Base shape to be extruded.
3729                 theDX, theDY, theDZ Directions of extrusion.
3730                 theName Object name; when specified, this parameter is used
3731                         for result publication in the study. Otherwise, if automatic
3732                         publication is switched on, default value is used for result name.
3733
3734             Returns:
3735                 New GEOM.GEOM_Object, containing the created prism.
3736             """
3737             # Example: see GEOM_TestAll.py
3738             theDX,theDY,theDZ,Parameters = ParseParameters(theDX, theDY, theDZ)
3739             anObj = self.PrimOp.MakePrismDXDYDZ2Ways(theBase, theDX, theDY, theDZ)
3740             RaiseIfFailed("MakePrismDXDYDZ2Ways", self.PrimOp)
3741             anObj.SetParameters(Parameters)
3742             self._autoPublish(anObj, theName, "prism")
3743             return anObj
3744
3745         ## Create a shape by revolution of the base shape around the axis
3746         #  on the given angle, i.e. all the space, transfixed by the base
3747         #  shape during its rotation around the axis on the given angle.
3748         #  @param theBase Base shape to be rotated.
3749         #  @param theAxis Rotation axis.
3750         #  @param theAngle Rotation angle in radians.
3751         #  @param theName Object name; when specified, this parameter is used
3752         #         for result publication in the study. Otherwise, if automatic
3753         #         publication is switched on, default value is used for result name.
3754         #
3755         #  @return New GEOM.GEOM_Object, containing the created revolution.
3756         #
3757         #  @ref tui_creation_revolution "Example"
3758         @ManageTransactions("PrimOp")
3759         def MakeRevolution(self, theBase, theAxis, theAngle, theName=None):
3760             """
3761             Create a shape by revolution of the base shape around the axis
3762             on the given angle, i.e. all the space, transfixed by the base
3763             shape during its rotation around the axis on the given angle.
3764
3765             Parameters:
3766                 theBase Base shape to be rotated.
3767                 theAxis Rotation axis.
3768                 theAngle Rotation angle in radians.
3769                 theName Object name; when specified, this parameter is used
3770                         for result publication in the study. Otherwise, if automatic
3771                         publication is switched on, default value is used for result name.
3772
3773             Returns:
3774                 New GEOM.GEOM_Object, containing the created revolution.
3775             """
3776             # Example: see GEOM_TestAll.py
3777             theAngle,Parameters = ParseParameters(theAngle)
3778             anObj = self.PrimOp.MakeRevolutionAxisAngle(theBase, theAxis, theAngle)
3779             RaiseIfFailed("MakeRevolutionAxisAngle", self.PrimOp)
3780             anObj.SetParameters(Parameters)
3781             self._autoPublish(anObj, theName, "revolution")
3782             return anObj
3783
3784         ## Create a shape by revolution of the base shape around the axis
3785         #  on the given angle, i.e. all the space, transfixed by the base
3786         #  shape during its rotation around the axis on the given angle in
3787         #  both directions (forward/backward)
3788         #  @param theBase Base shape to be rotated.
3789         #  @param theAxis Rotation axis.
3790         #  @param theAngle Rotation angle in radians.
3791         #  @param theName Object name; when specified, this parameter is used
3792         #         for result publication in the study. Otherwise, if automatic
3793         #         publication is switched on, default value is used for result name.
3794         #
3795         #  @return New GEOM.GEOM_Object, containing the created revolution.
3796         #
3797         #  @ref tui_creation_revolution "Example"
3798         @ManageTransactions("PrimOp")
3799         def MakeRevolution2Ways(self, theBase, theAxis, theAngle, theName=None):
3800             """
3801             Create a shape by revolution of the base shape around the axis
3802             on the given angle, i.e. all the space, transfixed by the base
3803             shape during its rotation around the axis on the given angle in
3804             both directions (forward/backward).
3805
3806             Parameters:
3807                 theBase Base shape to be rotated.
3808                 theAxis Rotation axis.
3809                 theAngle Rotation angle in radians.
3810                 theName Object name; when specified, this parameter is used
3811                         for result publication in the study. Otherwise, if automatic
3812                         publication is switched on, default value is used for result name.
3813
3814             Returns:
3815                 New GEOM.GEOM_Object, containing the created revolution.
3816             """
3817             theAngle,Parameters = ParseParameters(theAngle)
3818             anObj = self.PrimOp.MakeRevolutionAxisAngle2Ways(theBase, theAxis, theAngle)
3819             RaiseIfFailed("MakeRevolutionAxisAngle2Ways", self.PrimOp)
3820             anObj.SetParameters(Parameters)
3821             self._autoPublish(anObj, theName, "revolution")
3822             return anObj
3823
3824         ## Create a face from a given set of contours.
3825         #  @param theContours either a list or a compound of edges/wires.
3826         #  @param theMinDeg a minimal degree of BSpline surface to create.
3827         #  @param theMaxDeg a maximal degree of BSpline surface to create.
3828         #  @param theTol2D a 2d tolerance to be reached.
3829         #  @param theTol3D a 3d tolerance to be reached.
3830         #  @param theNbIter a number of iteration of approximation algorithm.
3831         #  @param theMethod Kind of method to perform filling operation
3832         #         (see GEOM.filling_oper_method enum).
3833         #  @param isApprox if True, BSpline curves are generated in the process
3834         #                  of surface construction. By default it is False, that means
3835         #                  the surface is created using given curves. The usage of
3836         #                  Approximation makes the algorithm work slower, but allows
3837         #                  building the surface for rather complex cases.
3838         #  @param theName Object name; when specified, this parameter is used
3839         #         for result publication in the study. Otherwise, if automatic
3840         #         publication is switched on, default value is used for result name.
3841         #
3842         #  @return New GEOM.GEOM_Object (face), containing the created filling surface.
3843         #
3844         #  @ref tui_creation_filling "Example"
3845         @ManageTransactions("PrimOp")
3846         def MakeFilling(self, theContours, theMinDeg=2, theMaxDeg=5, theTol2D=0.0001,
3847                         theTol3D=0.0001, theNbIter=0, theMethod=GEOM.FOM_Default, isApprox=0, theName=None):
3848             """
3849             Create a face from a given set of contours.
3850
3851             Parameters:
3852                 theContours either a list or a compound of edges/wires.
3853                 theMinDeg a minimal degree of BSpline surface to create.
3854                 theMaxDeg a maximal degree of BSpline surface to create.
3855                 theTol2D a 2d tolerance to be reached.
3856                 theTol3D a 3d tolerance to be reached.
3857                 theNbIter a number of iteration of approximation algorithm.
3858                 theMethod Kind of method to perform filling operation
3859                           (see GEOM.filling_oper_method enum).
3860                 isApprox if True, BSpline curves are generated in the process
3861                          of surface construction. By default it is False, that means
3862                          the surface is created using given curves. The usage of
3863                          Approximation makes the algorithm work slower, but allows
3864                          building the surface for rather complex cases.
3865                 theName Object name; when specified, this parameter is used
3866                         for result publication in the study. Otherwise, if automatic
3867                         publication is switched on, default value is used for result name.
3868
3869             Returns:
3870                 New GEOM.GEOM_Object (face), containing the created filling surface.
3871
3872             Example of usage:
3873                 filling = geompy.MakeFilling(compound, 2, 5, 0.0001, 0.0001, 5)
3874             """
3875             # Example: see GEOM_TestAll.py
3876             theMinDeg,theMaxDeg,theTol2D,theTol3D,theNbIter,Parameters = ParseParameters(theMinDeg, theMaxDeg, theTol2D, theTol3D, theNbIter)
3877             anObj = self.PrimOp.MakeFilling(ToList(theContours), theMinDeg, theMaxDeg,
3878                                             theTol2D, theTol3D, theNbIter,
3879                                             theMethod, isApprox)
3880             RaiseIfFailed("MakeFilling", self.PrimOp)
3881             anObj.SetParameters(Parameters)
3882             self._autoPublish(anObj, theName, "filling")
3883             return anObj
3884
3885
3886         ## Create a face from a given set of contours.
3887         #  This method corresponds to MakeFilling() with isApprox=True.
3888         #  @param theContours either a list or a compound of edges/wires.
3889         #  @param theMinDeg a minimal degree of BSpline surface to create.
3890         #  @param theMaxDeg a maximal degree of BSpline surface to create.
3891         #  @param theTol3D a 3d tolerance to be reached.
3892         #  @param theName Object name; when specified, this parameter is used
3893         #         for result publication in the study. Otherwise, if automatic
3894         #         publication is switched on, default value is used for result name.
3895         #
3896         #  @return New GEOM.GEOM_Object (face), containing the created filling surface.
3897         #
3898         #  @ref tui_creation_filling "Example"
3899         @ManageTransactions("PrimOp")
3900         def MakeFillingNew(self, theContours, theMinDeg=2, theMaxDeg=5, theTol3D=0.0001, theName=None):
3901             """
3902             Create a filling from the given compound of contours.
3903             This method corresponds to MakeFilling() with isApprox=True.
3904
3905             Parameters:
3906                 theContours either a list or a compound of edges/wires.
3907                 theMinDeg a minimal degree of BSpline surface to create.
3908                 theMaxDeg a maximal degree of BSpline surface to create.
3909                 theTol3D a 3d tolerance to be reached.
3910                 theName Object name; when specified, this parameter is used
3911                         for result publication in the study. Otherwise, if automatic
3912                         publication is switched on, default value is used for result name.
3913
3914             Returns:
3915                 New GEOM.GEOM_Object (face), containing the created filling surface.
3916
3917             Example of usage:
3918                 filling = geompy.MakeFillingNew(compound, 2, 5, 0.0001)
3919             """
3920             # Example: see GEOM_TestAll.py
3921             theMinDeg,theMaxDeg,theTol3D,Parameters = ParseParameters(theMinDeg, theMaxDeg, theTol3D)
3922             anObj = self.PrimOp.MakeFilling(ToList(theContours), theMinDeg, theMaxDeg,
3923                                             0, theTol3D, 0, GEOM.FOM_Default, True)
3924             RaiseIfFailed("MakeFillingNew", self.PrimOp)
3925             anObj.SetParameters(Parameters)
3926             self._autoPublish(anObj, theName, "filling")
3927             return anObj
3928
3929         ## Create a shell or solid passing through set of sections.Sections should be wires,edges or vertices.
3930         #  @param theSeqSections - set of specified sections.
3931         #  @param theModeSolid - mode defining building solid or shell
3932         #  @param thePreci - precision 3D used for smoothing
3933         #  @param theRuled - mode defining type of the result surfaces (ruled or smoothed).
3934         #  @param theName Object name; when specified, this parameter is used
3935         #         for result publication in the study. Otherwise, if automatic
3936         #         publication is switched on, default value is used for result name.
3937         #
3938         #  @return New GEOM.GEOM_Object, containing the created shell or solid.
3939         #
3940         #  @ref swig_todo "Example"
3941         @ManageTransactions("PrimOp")
3942         def MakeThruSections(self, theSeqSections, theModeSolid, thePreci, theRuled, theName=None):
3943             """
3944             Create a shell or solid passing through set of sections.Sections should be wires,edges or vertices.
3945
3946             Parameters:
3947                 theSeqSections - set of specified sections.
3948                 theModeSolid - mode defining building solid or shell
3949                 thePreci - precision 3D used for smoothing
3950                 theRuled - mode defining type of the result surfaces (ruled or smoothed).
3951                 theName Object name; when specified, this parameter is used
3952                         for result publication in the study. Otherwise, if automatic
3953                         publication is switched on, default value is used for result name.
3954
3955             Returns:
3956                 New GEOM.GEOM_Object, containing the created shell or solid.
3957             """
3958             # Example: see GEOM_TestAll.py
3959             anObj = self.PrimOp.MakeThruSections(theSeqSections,theModeSolid,thePreci,theRuled)
3960             RaiseIfFailed("MakeThruSections", self.PrimOp)
3961             self._autoPublish(anObj, theName, "filling")
3962             return anObj
3963
3964         ## Create a shape by extrusion of the base shape along
3965         #  the path shape. The path shape can be a wire or an edge. It is
3966         #  possible to generate groups along with the result by means of
3967         #  setting the flag \a IsGenerateGroups.<BR>
3968         #  If \a thePath is a closed edge or wire and \a IsGenerateGroups is
3969         #  set, an error is occurred. If \a thePath is not closed edge/wire,
3970         #  the following groups are returned:
3971         #  - If \a theBase is unclosed edge or wire: "Down", "Up", "Side1",
3972         #    "Side2";
3973         #  - If \a theBase is closed edge or wire, face or shell: "Down", "Up",
3974         #    "Other".
3975         #  .
3976         #  "Down" and "Up" groups contain:
3977         #  - Edges if \a theBase is edge or wire;
3978         #  - Faces if \a theBase is face or shell.<BR>
3979         #  .
3980         #  "Side1" and "Side2" groups contain edges generated from the first
3981         #  and last vertices of \a theBase. The first and last vertices are
3982         #  determined taking into account edge/wire orientation.<BR>
3983         #  "Other" group represents faces generated from the bounding edges of
3984         #  \a theBase.
3985         #
3986         #  @param theBase Base shape to be extruded.
3987         #  @param thePath Path shape to extrude the base shape along it.
3988         #  @param IsGenerateGroups flag that tells if it is necessary to
3989         #         create groups. It is equal to False by default.
3990         #  @param theName Object name; when specified, this parameter is used
3991         #         for result publication in the study. Otherwise, if automatic
3992         #         publication is switched on, default value is used for result name.
3993         #
3994         #  @return New GEOM.GEOM_Object, containing the created pipe if 
3995         #          \a IsGenerateGroups is not set. Otherwise it returns a
3996         #          list of GEOM.GEOM_Object. Its first element is the created pipe, the
3997         #          remaining ones are created groups.
3998         #
3999         #  @ref tui_creation_pipe "Example"
4000         @ManageTransactions("PrimOp")
4001         def MakePipe(self, theBase, thePath,
4002                      IsGenerateGroups=False, theName=None):
4003             """
4004             Create a shape by extrusion of the base shape along
4005             the path shape. The path shape can be a wire or an edge. It is
4006             possible to generate groups along with the result by means of
4007             setting the flag IsGenerateGroups.
4008             If thePath is a closed edge or wire and IsGenerateGroups is
4009             set, an error is occurred. If thePath is not closed edge/wire,
4010             the following groups are returned:
4011             - If theBase is unclosed edge or wire: "Down", "Up", "Side1",
4012               "Side2";
4013             - If theBase is closed edge or wire, face or shell: "Down", "Up",
4014               "Other".
4015             "Down" and "Up" groups contain:
4016             - Edges if theBase is edge or wire;
4017             - Faces if theBase is face or shell.
4018             "Side1" and "Side2" groups contain edges generated from the first
4019             and last vertices of theBase. The first and last vertices are
4020             determined taking into account edge/wire orientation.
4021             "Other" group represents faces generated from the bounding edges of
4022             theBase.
4023
4024             Parameters:
4025                 theBase Base shape to be extruded.
4026                 thePath Path shape to extrude the base shape along it.
4027                 IsGenerateGroups flag that tells if it is necessary to
4028                         create groups. It is equal to False by default.
4029                 theName Object name; when specified, this parameter is used
4030                         for result publication in the study. Otherwise, if automatic
4031                         publication is switched on, default value is used for result name.
4032
4033             Returns:
4034                 New GEOM.GEOM_Object, containing the created pipe if 
4035                 IsGenerateGroups is not set. Otherwise it returns a
4036                 list of GEOM.GEOM_Object. Its first element is the created pipe, the
4037                 remaining ones are created groups.
4038             """
4039             # Example: see GEOM_TestAll.py
4040             aList = self.PrimOp.MakePipe(theBase, thePath, IsGenerateGroups)
4041             RaiseIfFailed("MakePipe", self.PrimOp)
4042
4043             if IsGenerateGroups:
4044               self._autoPublish(aList, theName, "pipe")
4045               return aList
4046
4047             self._autoPublish(aList[0], theName, "pipe")
4048             return aList[0]
4049
4050         ## Create a shape by extrusion of the profile shape along
4051         #  the path shape. The path shape can be a wire or an edge.
4052         #  the several profiles can be specified in the several locations of path.
4053         #  It is possible to generate groups along with the result by means of
4054         #  setting the flag \a IsGenerateGroups. For detailed information on
4055         #  groups that can be created please see the method MakePipe().
4056         #  @param theSeqBases - list of  Bases shape to be extruded.
4057         #  @param theLocations - list of locations on the path corresponding
4058         #                        specified list of the Bases shapes. Number of locations
4059         #                        should be equal to number of bases or list of locations can be empty.
4060         #  @param thePath - Path shape to extrude the base shape along it.
4061         #  @param theWithContact - the mode defining that the section is translated to be in
4062         #                          contact with the spine.
4063         #  @param theWithCorrection - defining that the section is rotated to be
4064         #                             orthogonal to the spine tangent in the correspondent point
4065         #  @param IsGenerateGroups - flag that tells if it is necessary to
4066         #                          create groups. It is equal to False by default.
4067         #  @param theName Object name; when specified, this parameter is used
4068         #         for result publication in the study. Otherwise, if automatic
4069         #         publication is switched on, default value is used for result name.
4070         #
4071         #  @return New GEOM.GEOM_Object, containing the created pipe if 
4072         #          \a IsGenerateGroups is not set. Otherwise it returns new
4073         #          GEOM.ListOfGO. Its first element is the created pipe, the
4074         #          remaining ones are created groups.
4075         #
4076         #  @ref tui_creation_pipe_with_diff_sec "Example"
4077         @ManageTransactions("PrimOp")
4078         def MakePipeWithDifferentSections(self, theSeqBases,
4079                                           theLocations, thePath,
4080                                           theWithContact, theWithCorrection,
4081                                           IsGenerateGroups=False, theName=None):
4082             """
4083             Create a shape by extrusion of the profile shape along
4084             the path shape. The path shape can be a wire or an edge.
4085             the several profiles can be specified in the several locations of path.
4086             It is possible to generate groups along with the result by means of
4087             setting the flag IsGenerateGroups. For detailed information on
4088             groups that can be created please see the method geompy.MakePipe().
4089
4090             Parameters:
4091                 theSeqBases - list of  Bases shape to be extruded.
4092                 theLocations - list of locations on the path corresponding
4093                                specified list of the Bases shapes. Number of locations
4094                                should be equal to number of bases or list of locations can be empty.
4095                 thePath - Path shape to extrude the base shape along it.
4096                 theWithContact - the mode defining that the section is translated to be in
4097                                  contact with the spine(0/1)
4098                 theWithCorrection - defining that the section is rotated to be
4099                                     orthogonal to the spine tangent in the correspondent point (0/1)
4100                 IsGenerateGroups - flag that tells if it is necessary to
4101                                  create groups. It is equal to False by default.
4102                 theName Object name; when specified, this parameter is used
4103                         for result publication in the study. Otherwise, if automatic
4104                         publication is switched on, default value is used for result name.
4105
4106             Returns:
4107                 New GEOM.GEOM_Object, containing the created pipe if 
4108                 IsGenerateGroups is not set. Otherwise it returns new
4109                 GEOM.ListOfGO. Its first element is the created pipe, the
4110                 remaining ones are created groups.
4111             """
4112             aList = self.PrimOp.MakePipeWithDifferentSections(theSeqBases,
4113                                                               theLocations, thePath,
4114                                                               theWithContact, theWithCorrection,
4115                                                               False, IsGenerateGroups)
4116             RaiseIfFailed("MakePipeWithDifferentSections", self.PrimOp)
4117
4118             if IsGenerateGroups:
4119               self._autoPublish(aList, theName, "pipe")
4120               return aList
4121
4122             self._autoPublish(aList[0], theName, "pipe")
4123             return aList[0]
4124
4125         ## Create a shape by extrusion of the profile shape along
4126         #  the path shape. This function is a version of
4127         #  MakePipeWithDifferentSections() with the same parameters, except
4128         #  eliminated theWithContact and theWithCorrection. So it is
4129         #  possible to find the description of all parameters is in this
4130         #  method. The difference is that this method performs the operation
4131         #  step by step, i.e. it creates pipes between each pair of neighbor
4132         #  sections and fuses them into a single shape.
4133         #
4134         #  @ref tui_creation_pipe_with_diff_sec "Example"
4135         @ManageTransactions("PrimOp")
4136         def MakePipeWithDifferentSectionsBySteps(self, theSeqBases,
4137                                                  theLocations, thePath,
4138                                                  IsGenerateGroups=False, theName=None):
4139             """
4140             Create a shape by extrusion of the profile shape along
4141             the path shape. This function is a version of
4142             MakePipeWithDifferentSections() with the same parameters, except
4143             eliminated theWithContact and theWithCorrection. So it is
4144             possible to find the description of all parameters is in this
4145             method. The difference is that this method performs the operation
4146             step by step, i.e. it creates pipes between each pair of neighbor
4147             sections and fuses them into a single shape.
4148             """
4149             aList = self.PrimOp.MakePipeWithDifferentSections(theSeqBases,
4150                                                               theLocations, thePath,
4151                                                               False, False,
4152                                                               True, IsGenerateGroups)
4153             RaiseIfFailed("MakePipeWithDifferentSectionsBySteps", self.PrimOp)
4154
4155             if IsGenerateGroups:
4156               self._autoPublish(aList, theName, "pipe")
4157               return aList
4158
4159             self._autoPublish(aList[0], theName, "pipe")
4160             return aList[0]
4161
4162         ## Create a shape by extrusion of the profile shape along
4163         #  the path shape. The path shape can be a wire or an edge.
4164         #  the several profiles can be specified in the several locations of path.
4165         #  It is possible to generate groups along with the result by means of
4166         #  setting the flag \a IsGenerateGroups. For detailed information on
4167         #  groups that can be created please see the method MakePipe().
4168         #  @param theSeqBases - list of  Bases shape to be extruded. Base shape must be
4169         #                       shell or face. If number of faces in neighbour sections
4170         #                       aren't coincided result solid between such sections will
4171         #                       be created using external boundaries of this shells.
4172         #  @param theSeqSubBases - list of corresponding sub-shapes of section shapes.
4173         #                          This list is used for searching correspondences between
4174         #                          faces in the sections. Size of this list must be equal
4175         #                          to size of list of base shapes.
4176         #  @param theLocations - list of locations on the path corresponding
4177         #                        specified list of the Bases shapes. Number of locations
4178         #                        should be equal to number of bases. First and last
4179         #                        locations must be coincided with first and last vertexes
4180         #                        of path correspondingly.
4181         #  @param thePath - Path shape to extrude the base shape along it.
4182         #  @param theWithContact - the mode defining that the section is translated to be in
4183         #                          contact with the spine.
4184         #  @param theWithCorrection - defining that the section is rotated to be
4185         #                             orthogonal to the spine tangent in the correspondent point
4186         #  @param IsGenerateGroups - flag that tells if it is necessary to
4187         #                          create groups. It is equal to False by default.
4188         #  @param theName Object name; when specified, this parameter is used
4189         #         for result publication in the study. Otherwise, if automatic
4190         #         publication is switched on, default value is used for result name.
4191         #
4192         #  @return New GEOM.GEOM_Object, containing the created solids if 
4193         #          \a IsGenerateGroups is not set. Otherwise it returns new
4194         #          GEOM.ListOfGO. Its first element is the created solids, the
4195         #          remaining ones are created groups.
4196         #
4197         #  @ref tui_creation_pipe_with_shell_sec "Example"
4198         @ManageTransactions("PrimOp")
4199         def MakePipeWithShellSections(self, theSeqBases, theSeqSubBases,
4200                                       theLocations, thePath,
4201                                       theWithContact, theWithCorrection,
4202                                       IsGenerateGroups=False, theName=None):
4203             """
4204             Create a shape by extrusion of the profile shape along
4205             the path shape. The path shape can be a wire or an edge.
4206             the several profiles can be specified in the several locations of path.
4207             It is possible to generate groups along with the result by means of
4208             setting the flag IsGenerateGroups. For detailed information on
4209             groups that can be created please see the method geompy.MakePipe().
4210
4211             Parameters:
4212                 theSeqBases - list of  Bases shape to be extruded. Base shape must be
4213                               shell or face. If number of faces in neighbour sections
4214                               aren't coincided result solid between such sections will
4215                               be created using external boundaries of this shells.
4216                 theSeqSubBases - list of corresponding sub-shapes of section shapes.
4217                                  This list is used for searching correspondences between
4218                                  faces in the sections. Size of this list must be equal
4219                                  to size of list of base shapes.
4220                 theLocations - list of locations on the path corresponding
4221                                specified list of the Bases shapes. Number of locations
4222                                should be equal to number of bases. First and last
4223                                locations must be coincided with first and last vertexes
4224                                of path correspondingly.
4225                 thePath - Path shape to extrude the base shape along it.
4226                 theWithContact - the mode defining that the section is translated to be in
4227                                  contact with the spine (0/1)
4228                 theWithCorrection - defining that the section is rotated to be
4229                                     orthogonal to the spine tangent in the correspondent point (0/1)
4230                 IsGenerateGroups - flag that tells if it is necessary to
4231                                  create groups. It is equal to False by default.
4232                 theName Object name; when specified, this parameter is used
4233                         for result publication in the study. Otherwise, if automatic
4234                         publication is switched on, default value is used for result name.
4235
4236             Returns:
4237                 New GEOM.GEOM_Object, containing the created solids if 
4238                 IsGenerateGroups is not set. Otherwise it returns new
4239                 GEOM.ListOfGO. Its first element is the created solids, the
4240                 remaining ones are created groups.
4241             """
4242             aList = self.PrimOp.MakePipeWithShellSections(theSeqBases, theSeqSubBases,
4243                                                           theLocations, thePath,
4244                                                           theWithContact, theWithCorrection,
4245                                                           IsGenerateGroups)
4246             RaiseIfFailed("MakePipeWithShellSections", self.PrimOp)
4247
4248             if IsGenerateGroups:
4249               self._autoPublish(aList, theName, "pipe")
4250               return aList
4251
4252             self._autoPublish(aList[0], theName, "pipe")
4253             return aList[0]
4254
4255         ## Create a shape by extrusion of the profile shape along
4256         #  the path shape. This function is used only for debug pipe
4257         #  functionality - it is a version of function MakePipeWithShellSections()
4258         #  which give a possibility to receive information about
4259         #  creating pipe between each pair of sections step by step.
4260         @ManageTransactions("PrimOp")
4261         def MakePipeWithShellSectionsBySteps(self, theSeqBases, theSeqSubBases,
4262                                              theLocations, thePath,
4263                                              theWithContact, theWithCorrection,
4264                                              IsGenerateGroups=False, theName=None):
4265             """
4266             Create a shape by extrusion of the profile shape along
4267             the path shape. This function is used only for debug pipe
4268             functionality - it is a version of previous function
4269             geompy.MakePipeWithShellSections() which give a possibility to
4270             receive information about creating pipe between each pair of
4271             sections step by step.
4272             """
4273             res = []
4274             nbsect = len(theSeqBases)
4275             nbsubsect = len(theSeqSubBases)
4276             #print "nbsect = ",nbsect
4277             for i in range(1,nbsect):
4278                 #print "  i = ",i
4279                 tmpSeqBases = [ theSeqBases[i-1], theSeqBases[i] ]
4280                 tmpLocations = [ theLocations[i-1], theLocations[i] ]
4281                 tmpSeqSubBases = []
4282                 if nbsubsect>0: tmpSeqSubBases = [ theSeqSubBases[i-1], theSeqSubBases[i] ]
4283                 aList = self.PrimOp.MakePipeWithShellSections(tmpSeqBases, tmpSeqSubBases,
4284                                                               tmpLocations, thePath,
4285                                                               theWithContact, theWithCorrection,
4286                                                               IsGenerateGroups)
4287                 if self.PrimOp.IsDone() == 0:
4288                     print("Problems with pipe creation between ",i," and ",i+1," sections")
4289                     RaiseIfFailed("MakePipeWithShellSections", self.PrimOp)
4290                     break
4291                 else:
4292                     print("Pipe between ",i," and ",i+1," sections is OK")
4293                     res.append(aList[0])
4294                     pass
4295                 pass
4296
4297             resc = self.MakeCompound(res)
4298             #resc = self.MakeSewing(res, 0.001)
4299             #print "resc: ",resc
4300             self._autoPublish(resc, theName, "pipe")
4301             return resc
4302
4303         ## Create solids between given sections.
4304         #  It is possible to generate groups along with the result by means of
4305         #  setting the flag \a IsGenerateGroups. For detailed information on
4306         #  groups that can be created please see the method MakePipe().
4307         #  @param theSeqBases - list of sections (shell or face).
4308         #  @param theLocations - list of corresponding vertexes
4309         #  @param IsGenerateGroups - flag that tells if it is necessary to
4310         #         create groups. It is equal to False by default.
4311         #  @param theName Object name; when specified, this parameter is used
4312         #         for result publication in the study. Otherwise, if automatic
4313         #         publication is switched on, default value is used for result name.
4314         #
4315         #  @return New GEOM.GEOM_Object, containing the created solids if 
4316         #          \a IsGenerateGroups is not set. Otherwise it returns new
4317         #          GEOM.ListOfGO. Its first element is the created solids, the
4318         #          remaining ones are created groups.
4319         #
4320         #  @ref tui_creation_pipe_without_path "Example"
4321         @ManageTransactions("PrimOp")
4322         def MakePipeShellsWithoutPath(self, theSeqBases, theLocations,
4323                                       IsGenerateGroups=False, theName=None):
4324             """
4325             Create solids between given sections.
4326             It is possible to generate groups along with the result by means of
4327             setting the flag IsGenerateGroups. For detailed information on
4328             groups that can be created please see the method geompy.MakePipe().
4329
4330             Parameters:
4331                 theSeqBases - list of sections (shell or face).
4332                 theLocations - list of corresponding vertexes
4333                 IsGenerateGroups - flag that tells if it is necessary to
4334                                  create groups. It is equal to False by default.
4335                 theName Object name; when specified, this parameter is used
4336                         for result publication in the study. Otherwise, if automatic
4337                         publication is switched on, default value is used for result name.
4338
4339             Returns:
4340                 New GEOM.GEOM_Object, containing the created solids if 
4341                 IsGenerateGroups is not set. Otherwise it returns new
4342                 GEOM.ListOfGO. Its first element is the created solids, the
4343                 remaining ones are created groups.
4344             """
4345             aList = self.PrimOp.MakePipeShellsWithoutPath(theSeqBases, theLocations,
4346                                                           IsGenerateGroups)
4347             RaiseIfFailed("MakePipeShellsWithoutPath", self.PrimOp)
4348
4349             if IsGenerateGroups:
4350               self._autoPublish(aList, theName, "pipe")
4351               return aList
4352
4353             self._autoPublish(aList[0], theName, "pipe")
4354             return aList[0]
4355
4356         ## Create a shape by extrusion of the base shape along
4357         #  the path shape with constant bi-normal direction along the given vector.
4358         #  The path shape can be a wire or an edge.
4359         #  It is possible to generate groups along with the result by means of
4360         #  setting the flag \a IsGenerateGroups. For detailed information on
4361         #  groups that can be created please see the method MakePipe().
4362         #  @param theBase Base shape to be extruded.
4363         #  @param thePath Path shape to extrude the base shape along it.
4364         #  @param theVec Vector defines a constant binormal direction to keep the
4365         #                same angle between the direction and the sections
4366         #                along the sweep surface.
4367         #  @param IsGenerateGroups flag that tells if it is necessary to
4368         #         create groups. It is equal to False by default.
4369         #  @param theName Object name; when specified, this parameter is used
4370         #         for result publication in the study. Otherwise, if automatic
4371         #         publication is switched on, default value is used for result name.
4372         #
4373         #  @return New GEOM.GEOM_Object, containing the created pipe if 
4374         #          \a IsGenerateGroups is not set. Otherwise it returns new
4375         #          GEOM.ListOfGO. Its first element is the created pipe, the
4376         #          remaining ones are created groups.
4377         #
4378         #  @ref tui_creation_pipe "Example"
4379         @ManageTransactions("PrimOp")
4380         def MakePipeBiNormalAlongVector(self, theBase, thePath, theVec,
4381                                         IsGenerateGroups=False, theName=None):
4382             """
4383             Create a shape by extrusion of the base shape along
4384             the path shape with constant bi-normal direction along the given vector.
4385             The path shape can be a wire or an edge.
4386             It is possible to generate groups along with the result by means of
4387             setting the flag IsGenerateGroups. For detailed information on
4388             groups that can be created please see the method geompy.MakePipe().
4389
4390             Parameters:
4391                 theBase Base shape to be extruded.
4392                 thePath Path shape to extrude the base shape along it.
4393                 theVec Vector defines a constant binormal direction to keep the
4394                        same angle between the direction and the sections
4395                        along the sweep surface.
4396                 IsGenerateGroups flag that tells if it is necessary to
4397                                  create groups. It is equal to False by default.
4398                 theName Object name; when specified, this parameter is used
4399                         for result publication in the study. Otherwise, if automatic
4400                         publication is switched on, default value is used for result name.
4401
4402             Returns:
4403                 New GEOM.GEOM_Object, containing the created pipe if 
4404                 IsGenerateGroups is not set. Otherwise it returns new
4405                 GEOM.ListOfGO. Its first element is the created pipe, the
4406                 remaining ones are created groups.
4407             """
4408             # Example: see GEOM_TestAll.py
4409             aList = self.PrimOp.MakePipeBiNormalAlongVector(theBase, thePath,
4410                           theVec, IsGenerateGroups)
4411             RaiseIfFailed("MakePipeBiNormalAlongVector", self.PrimOp)
4412
4413             if IsGenerateGroups:
4414               self._autoPublish(aList, theName, "pipe")
4415               return aList
4416
4417             self._autoPublish(aList[0], theName, "pipe")
4418             return aList[0]
4419
4420         ## Makes a thick solid from a shape. If the input is a surface shape
4421         #  (face or shell) the result is a thick solid. If an input shape is
4422         #  a solid the result is a hollowed solid with removed faces.
4423         #  @param theShape Face or Shell to get thick solid or solid to get
4424         #         hollowed solid.
4425         #  @param theThickness Thickness of the resulting solid
4426         #  @param theFacesIDs the list of face IDs to be removed from the
4427         #         result. It is ignored if \a theShape is a face or a shell.
4428         #         It is empty by default. 
4429         #  @param theInside If true the thickness is applied towards inside
4430         #  @param theName Object name; when specified, this parameter is used
4431         #         for result publication in the study. Otherwise, if automatic
4432         #         publication is switched on, default value is used for result name.
4433         #
4434         #  @return New GEOM.GEOM_Object, containing the created solid
4435         #
4436         #  @ref tui_creation_thickness "Example"
4437         @ManageTransactions("PrimOp")
4438         def MakeThickSolid(self, theShape, theThickness,
4439                            theFacesIDs=[], theInside=False, theName=None):
4440             """
4441             Make a thick solid from a shape. If the input is a surface shape
4442             (face or shell) the result is a thick solid. If an input shape is
4443             a solid the result is a hollowed solid with removed faces.
4444
4445             Parameters:
4446                  theShape Face or Shell to get thick solid or solid to get
4447                           hollowed solid.
4448                  theThickness Thickness of the resulting solid
4449                  theFacesIDs the list of face IDs to be removed from the
4450                           result. It is ignored if theShape is a face or a
4451                           shell. It is empty by default. 
4452                  theInside If true the thickness is applied towards inside
4453                  theName Object name; when specified, this parameter is used
4454                          for result publication in the study. Otherwise, if automatic
4455                          publication is switched on, default value is used for result name.
4456
4457             Returns:
4458                 New GEOM.GEOM_Object, containing the created solid
4459             """
4460             # Example: see GEOM_TestAll.py
4461             theThickness,Parameters = ParseParameters(theThickness)
4462             anObj = self.PrimOp.MakeThickening(theShape, theFacesIDs,
4463                                                theThickness, True, theInside)
4464             RaiseIfFailed("MakeThickSolid", self.PrimOp)
4465             anObj.SetParameters(Parameters)
4466             self._autoPublish(anObj, theName, "thickSolid")
4467             return anObj
4468
4469
4470         ## Modifies a shape to make it a thick solid. If the input is a surface
4471         #  shape (face or shell) the result is a thick solid. If an input shape
4472         #  is a solid the result is a hollowed solid with removed faces.
4473         #  @param theShape Face or Shell to get thick solid or solid to get
4474         #         hollowed solid.
4475         #  @param theThickness Thickness of the resulting solid
4476         #  @param theFacesIDs the list of face IDs to be removed from the
4477         #         result. It is ignored if \a theShape is a face or a shell.
4478         #         It is empty by default. 
4479         #  @param theInside If true the thickness is applied towards inside
4480         #
4481         #  @return The modified shape
4482         #
4483         #  @ref tui_creation_thickness "Example"
4484         @ManageTransactions("PrimOp")
4485         def Thicken(self, theShape, theThickness, theFacesIDs=[], theInside=False):
4486             """
4487             Modifies a shape to make it a thick solid. If the input is a
4488             surface shape (face or shell) the result is a thick solid. If
4489             an input shape is a solid the result is a hollowed solid with
4490             removed faces.
4491
4492             Parameters:
4493                 theShape Face or Shell to get thick solid or solid to get
4494                          hollowed solid.
4495                 theThickness Thickness of the resulting solid
4496                 theFacesIDs the list of face IDs to be removed from the
4497                          result. It is ignored if \a theShape is a face or
4498                          a shell. It is empty by default. 
4499                 theInside If true the thickness is applied towards inside
4500
4501             Returns:
4502                 The modified shape
4503             """
4504             # Example: see GEOM_TestAll.py
4505             theThickness,Parameters = ParseParameters(theThickness)
4506             anObj = self.PrimOp.MakeThickening(theShape, theFacesIDs,
4507                                                theThickness, False, theInside)
4508             RaiseIfFailed("Thicken", self.PrimOp)
4509             anObj.SetParameters(Parameters)
4510             return anObj
4511
4512         ## Build a middle path of a pipe-like shape.
4513         #  The path shape can be a wire or an edge.
4514         #  @param theShape It can be closed or unclosed pipe-like shell
4515         #                  or a pipe-like solid.
4516         #  @param theBase1, theBase2 Two bases of the supposed pipe. This
4517         #                            should be wires or faces of theShape.
4518         #  @param theName Object name; when specified, this parameter is used
4519         #         for result publication in the study. Otherwise, if automatic
4520         #         publication is switched on, default value is used for result name.
4521         #
4522         #  @note It is not assumed that exact or approximate copy of theShape
4523         #        can be obtained by applying existing Pipe operation on the
4524         #        resulting "Path" wire taking theBase1 as the base - it is not
4525         #        always possible; though in some particular cases it might work
4526         #        it is not guaranteed. Thus, RestorePath function should not be
4527         #        considered as an exact reverse operation of the Pipe.
4528         #
4529         #  @return New GEOM.GEOM_Object, containing an edge or wire that represent
4530         #                                source pipe's "path".
4531         #
4532         #  @ref tui_creation_pipe_path "Example"
4533         @ManageTransactions("PrimOp")
4534         def RestorePath (self, theShape, theBase1, theBase2, theName=None):
4535             """
4536             Build a middle path of a pipe-like shape.
4537             The path shape can be a wire or an edge.
4538
4539             Parameters:
4540                 theShape It can be closed or unclosed pipe-like shell
4541                          or a pipe-like solid.
4542                 theBase1, theBase2 Two bases of the supposed pipe. This
4543                                    should be wires or faces of theShape.
4544                 theName Object name; when specified, this parameter is used
4545                         for result publication in the study. Otherwise, if automatic
4546                         publication is switched on, default value is used for result name.
4547
4548             Returns:
4549                 New GEOM_Object, containing an edge or wire that represent
4550                                  source pipe's path.
4551             """
4552             anObj = self.PrimOp.RestorePath(theShape, theBase1, theBase2)
4553             RaiseIfFailed("RestorePath", self.PrimOp)
4554             self._autoPublish(anObj, theName, "path")
4555             return anObj
4556
4557         ## Build a middle path of a pipe-like shape.
4558         #  The path shape can be a wire or an edge.
4559         #  @param theShape It can be closed or unclosed pipe-like shell
4560         #                  or a pipe-like solid.
4561         #  @param listEdges1, listEdges2 Two bases of the supposed pipe. This
4562         #                                should be lists of edges of theShape.
4563         #  @param theName Object name; when specified, this parameter is used
4564         #         for result publication in the study. Otherwise, if automatic
4565         #         publication is switched on, default value is used for result name.
4566         #
4567         #  @note It is not assumed that exact or approximate copy of theShape
4568         #        can be obtained by applying existing Pipe operation on the
4569         #        resulting "Path" wire taking theBase1 as the base - it is not
4570         #        always possible; though in some particular cases it might work
4571         #        it is not guaranteed. Thus, RestorePath function should not be
4572         #        considered as an exact reverse operation of the Pipe.
4573         #
4574         #  @return New GEOM.GEOM_Object, containing an edge or wire that represent
4575         #                                source pipe's "path".
4576         #
4577         #  @ref tui_creation_pipe_path "Example"
4578         @ManageTransactions("PrimOp")
4579         def RestorePathEdges (self, theShape, listEdges1, listEdges2, theName=None):
4580             """
4581             Build a middle path of a pipe-like shape.
4582             The path shape can be a wire or an edge.
4583
4584             Parameters:
4585                 theShape It can be closed or unclosed pipe-like shell
4586                          or a pipe-like solid.
4587                 listEdges1, listEdges2 Two bases of the supposed pipe. This
4588                                        should be lists of edges of theShape.
4589                 theName Object name; when specified, this parameter is used
4590                         for result publication in the study. Otherwise, if automatic
4591                         publication is switched on, default value is used for result name.
4592
4593             Returns:
4594                 New GEOM_Object, containing an edge or wire that represent
4595                                  source pipe's path.
4596             """
4597             anObj = self.PrimOp.RestorePathEdges(theShape, listEdges1, listEdges2)
4598             RaiseIfFailed("RestorePath", self.PrimOp)
4599             self._autoPublish(anObj, theName, "path")
4600             return anObj
4601
4602         # end of l3_complex
4603         ## @}
4604
4605         ## @addtogroup l3_basic_go
4606         ## @{
4607
4608         ## Create a linear edge with specified ends.
4609         #  @param thePnt1 Point for the first end of edge.
4610         #  @param thePnt2 Point for the second end of edge.
4611         #  @param theName Object name; when specified, this parameter is used
4612         #         for result publication in the study. Otherwise, if automatic
4613         #         publication is switched on, default value is used for result name.
4614         #
4615         #  @return New GEOM.GEOM_Object, containing the created edge.
4616         #
4617         #  @ref tui_creation_edge "Example"
4618         @ManageTransactions("ShapesOp")
4619         def MakeEdge(self, thePnt1, thePnt2, theName=None):
4620             """
4621             Create a linear edge with specified ends.
4622
4623             Parameters:
4624                 thePnt1 Point for the first end of edge.
4625                 thePnt2 Point for the second end of edge.
4626                 theName Object name; when specified, this parameter is used
4627                         for result publication in the study. Otherwise, if automatic
4628                         publication is switched on, default value is used for result name.
4629
4630             Returns:
4631                 New GEOM.GEOM_Object, containing the created edge.
4632             """
4633             # Example: see GEOM_TestAll.py
4634             anObj = self.ShapesOp.MakeEdge(thePnt1, thePnt2)
4635             RaiseIfFailed("MakeEdge", self.ShapesOp)
4636             self._autoPublish(anObj, theName, "edge")
4637             return anObj
4638
4639         ## Create a new edge, corresponding to the given length on the given curve.
4640         #  @param theRefCurve The referenced curve (edge).
4641         #  @param theLength Length on the referenced curve. It can be negative.
4642         #  @param theStartPoint Any point can be selected for it, the new edge will begin
4643         #                       at the end of \a theRefCurve, close to the selected point.
4644         #                       If None, start from the first point of \a theRefCurve.
4645         #  @param theName Object name; when specified, this parameter is used
4646         #         for result publication in the study. Otherwise, if automatic
4647         #         publication is switched on, default value is used for result name.
4648         #
4649         #  @return New GEOM.GEOM_Object, containing the created edge.
4650         #
4651         #  @ref tui_creation_edge "Example"
4652         @ManageTransactions("ShapesOp")
4653         def MakeEdgeOnCurveByLength(self, theRefCurve, theLength, theStartPoint = None, theName=None):
4654             """
4655             Create a new edge, corresponding to the given length on the given curve.
4656
4657             Parameters:
4658                 theRefCurve The referenced curve (edge).
4659                 theLength Length on the referenced curve. It can be negative.
4660                 theStartPoint Any point can be selected for it, the new edge will begin
4661                               at the end of theRefCurve, close to the selected point.
4662                               If None, start from the first point of theRefCurve.
4663                 theName Object name; when specified, this parameter is used
4664                         for result publication in the study. Otherwise, if automatic
4665                         publication is switched on, default value is used for result name.
4666
4667             Returns:
4668                 New GEOM.GEOM_Object, containing the created edge.
4669             """
4670             # Example: see GEOM_TestAll.py
4671             theLength, Parameters = ParseParameters(theLength)
4672             anObj = self.ShapesOp.MakeEdgeOnCurveByLength(theRefCurve, theLength, theStartPoint)
4673             RaiseIfFailed("MakeEdgeOnCurveByLength", self.ShapesOp)
4674             anObj.SetParameters(Parameters)
4675             self._autoPublish(anObj, theName, "edge")
4676             return anObj
4677
4678         ## Create an edge from specified wire.
4679         #  @param theWire source Wire
4680         #  @param theLinearTolerance linear tolerance value (default = 1e-07)
4681         #  @param theAngularTolerance angular tolerance value (default = 1e-12)
4682         #  @param theName Object name; when specified, this parameter is used
4683         #         for result publication in the study. Otherwise, if automatic
4684         #         publication is switched on, default value is used for result name.
4685         #
4686         #  @return New GEOM.GEOM_Object, containing the created edge.
4687         #
4688         #  @ref tui_creation_edge "Example"
4689         @ManageTransactions("ShapesOp")
4690         def MakeEdgeWire(self, theWire, theLinearTolerance = 1e-07, theAngularTolerance = 1e-12, theName=None):
4691             """
4692             Create an edge from specified wire.
4693
4694             Parameters:
4695                 theWire source Wire
4696                 theLinearTolerance linear tolerance value (default = 1e-07)
4697                 theAngularTolerance angular tolerance value (default = 1e-12)
4698                 theName Object name; when specified, this parameter is used
4699                         for result publication in the study. Otherwise, if automatic
4700                         publication is switched on, default value is used for result name.
4701
4702             Returns:
4703                 New GEOM.GEOM_Object, containing the created edge.
4704             """
4705             # Example: see GEOM_TestAll.py
4706             anObj = self.ShapesOp.MakeEdgeWire(theWire, theLinearTolerance, theAngularTolerance)
4707             RaiseIfFailed("MakeEdgeWire", self.ShapesOp)
4708             self._autoPublish(anObj, theName, "edge")
4709             return anObj
4710
4711         ## Create a wire from the set of edges and wires.
4712         #  @param theEdgesAndWires List of edges and/or wires.
4713         #  @param theTolerance Maximum distance between vertices, that will be merged.
4714         #                      Values less than 1e-07 are equivalent to 1e-07 (Precision::Confusion())
4715         #  @param theName Object name; when specified, this parameter is used
4716         #         for result publication in the study. Otherwise, if automatic
4717         #         publication is switched on, default value is used for result name.
4718         #
4719         #  @return New GEOM.GEOM_Object, containing the created wire.
4720         #
4721         #  @ref tui_creation_wire "Example"
4722         @ManageTransactions("ShapesOp")
4723         def MakeWire(self, theEdgesAndWires, theTolerance = 1e-07, theName=None):
4724             """
4725             Create a wire from the set of edges and wires.
4726
4727             Parameters:
4728                 theEdgesAndWires List of edges and/or wires.
4729                 theTolerance Maximum distance between vertices, that will be merged.
4730                              Values less than 1e-07 are equivalent to 1e-07 (Precision::Confusion()).
4731                 theName Object name; when specified, this parameter is used
4732                         for result publication in the study. Otherwise, if automatic
4733                         publication is switched on, default value is used for result name.
4734
4735             Returns:
4736                 New GEOM.GEOM_Object, containing the created wire.
4737             """
4738             # Example: see GEOM_TestAll.py
4739             anObj = self.ShapesOp.MakeWire(theEdgesAndWires, theTolerance)
4740             RaiseIfFailed("MakeWire", self.ShapesOp)
4741             self._autoPublish(anObj, theName, "wire")
4742             return anObj
4743
4744         ## Create a face on the given wire.
4745         #  @param theWire closed Wire or Edge to build the face on.
4746         #  @param isPlanarWanted If TRUE, the algorithm tries to build a planar face.
4747         #                        If the tolerance of the obtained planar face is less
4748         #                        than 1e-06, this face will be returned, otherwise the
4749         #                        algorithm tries to build any suitable face on the given
4750         #                        wire and prints a warning message.
4751         #  @param theName Object name; when specified, this parameter is used
4752         #         for result publication in the study. Otherwise, if automatic
4753         #         publication is switched on, default value is used for result name.
4754         #
4755         #  @return New GEOM.GEOM_Object, containing the created face (compound of faces).
4756         #
4757         #  @ref tui_creation_face "Example"
4758         @ManageTransactions("ShapesOp")
4759         def MakeFace(self, theWire, isPlanarWanted, theName=None, raiseException=False):
4760             """
4761             Create a face on the given wire.
4762
4763             Parameters:
4764                 theWire closed Wire or Edge to build the face on.
4765                 isPlanarWanted If TRUE, the algorithm tries to build a planar face.
4766                                If the tolerance of the obtained planar face is less
4767                                than 1e-06, this face will be returned, otherwise the
4768                                algorithm tries to build any suitable face on the given
4769                                wire and prints a warning message.
4770                 theName Object name; when specified, this parameter is used
4771                         for result publication in the study. Otherwise, if automatic
4772                         publication is switched on, default value is used for result name.
4773
4774             Returns:
4775                 New GEOM.GEOM_Object, containing the created face (compound of faces).
4776             """
4777             # Example: see GEOM_TestAll.py
4778             anObj = self.ShapesOp.MakeFace(theWire, isPlanarWanted)
4779             if isPlanarWanted and anObj is not None and self.ShapesOp.GetErrorCode() == "MAKE_FACE_TOLERANCE_TOO_BIG":
4780                 PrintOrRaise("WARNING: Cannot build a planar face: required tolerance is too big. Non-planar face is built.",raiseException)
4781             else:
4782                 RaiseIfFailed("MakeFace", self.ShapesOp)
4783             self._autoPublish(anObj, theName, "face")
4784             return anObj
4785
4786         ## Create a face on the given wires set.
4787         #  @param theWires List of closed wires or edges to build the face on.
4788         #  @param isPlanarWanted If TRUE, the algorithm tries to build a planar face.
4789         #                        If the tolerance of the obtained planar face is less
4790         #                        than 1e-06, this face will be returned, otherwise the
4791         #                        algorithm tries to build any suitable face on the given
4792         #                        wire and prints a warning message.
4793         #  @param theName Object name; when specified, this parameter is used
4794         #         for result publication in the study. Otherwise, if automatic
4795         #         publication is switched on, default value is used for result name.
4796         #
4797         #  @return New GEOM.GEOM_Object, containing the created face (compound of faces).
4798         #
4799         #  @ref tui_creation_face "Example"
4800         @ManageTransactions("ShapesOp")
4801         def MakeFaceWires(self, theWires, isPlanarWanted, theName=None, raiseException=False):
4802             """
4803             Create a face on the given wires set.
4804
4805             Parameters:
4806                 theWires List of closed wires or edges to build the face on.
4807                 isPlanarWanted If TRUE, the algorithm tries to build a planar face.
4808                                If the tolerance of the obtained planar face is less
4809                                than 1e-06, this face will be returned, otherwise the
4810                                algorithm tries to build any suitable face on the given
4811                                wire and prints a warning message.
4812                 theName Object name; when specified, this parameter is used
4813                         for result publication in the study. Otherwise, if automatic
4814                         publication is switched on, default value is used for result name.
4815
4816             Returns:
4817                 New GEOM.GEOM_Object, containing the created face (compound of faces).
4818             """
4819             # Example: see GEOM_TestAll.py
4820             anObj = self.ShapesOp.MakeFaceWires(ToList(theWires), isPlanarWanted)
4821             if isPlanarWanted and anObj is not None and self.ShapesOp.GetErrorCode() == "MAKE_FACE_TOLERANCE_TOO_BIG":
4822                 PrintOrRaise("WARNING: Cannot build a planar face: required tolerance is too big. Non-planar face is built.",raiseException)
4823             else:
4824                 RaiseIfFailed("MakeFaceWires", self.ShapesOp)
4825             self._autoPublish(anObj, theName, "face")
4826             return anObj
4827
4828         ## See MakeFaceWires() method for details.
4829         #
4830         #  @ref tui_creation_face "Example 1"
4831         #  \n @ref swig_MakeFaces  "Example 2"
4832         def MakeFaces(self, theWires, isPlanarWanted, theName=None):
4833             """
4834             See geompy.MakeFaceWires() method for details.
4835             """
4836             # Example: see GEOM_TestOthers.py
4837             # note: auto-publishing is done in self.MakeFaceWires()
4838             anObj = self.MakeFaceWires(theWires, isPlanarWanted, theName)
4839             return anObj
4840
4841         ## Create a face based on a surface from given face bounded
4842         #  by given wire.
4843         #  @param theFace the face whose surface is used to create a new face.
4844         #  @param theWire the wire that will bound a new face.
4845         #  @param theName Object name; when specified, this parameter is used
4846         #         for result publication in the study. Otherwise, if automatic
4847         #         publication is switched on, default value is used for result name.
4848         #
4849         #  @return New GEOM.GEOM_Object, containing the created face.
4850         #
4851         #  @ref tui_creation_face "Example"
4852         @ManageTransactions("ShapesOp")
4853         def MakeFaceFromSurface(self, theFace, theWire, theName=None):
4854             """
4855             Create a face based on a surface from given face bounded
4856             by given wire.
4857
4858             Parameters:
4859                 theFace the face whose surface is used to create a new face.
4860                 theWire the wire that will bound a new face.
4861                 theName Object name; when specified, this parameter is used
4862                         for result publication in the study. Otherwise, if automatic
4863                         publication is switched on, default value is used for result name.
4864
4865             Returns:
4866                 New GEOM.GEOM_Object, containing the created face.
4867             """
4868             # Example: see GEOM_TestAll.py
4869             anObj = self.ShapesOp.MakeFaceFromSurface(theFace, theWire)
4870             RaiseIfFailed("MakeFaceFromSurface", self.ShapesOp)
4871             self._autoPublish(anObj, theName, "face")
4872             return anObj
4873           
4874         ## Create a face from a set of edges with the given constraints.
4875         #  @param theConstraints List of edges and constraint faces (as a sequence of a Edge + Face couples):
4876         #         - edges should form a closed wire;
4877         #         - for each edge, constraint face is optional: if a constraint face is missing
4878         #           for some edge, this means that there no constraint associated with this edge.
4879         #  @param theName Object name; when specified, this parameter is used
4880         #         for result publication in the study. Otherwise, if automatic
4881         #         publication is switched on, default value is used for result name.
4882         # 
4883         # @return New GEOM.GEOM_Object, containing the created face.
4884         # 
4885         # @ref tui_creation_face "Example"
4886         @ManageTransactions("ShapesOp")
4887         def MakeFaceWithConstraints(self, theConstraints, theName=None):
4888             """
4889             Create a face from a set of edges with the given constraints.
4890
4891             Parameters:
4892                 theConstraints List of edges and constraint faces (as a sequence of a Edge + Face couples):
4893                         - edges should form a closed wire;
4894                         - for each edge, constraint face is optional: if a constraint face is missing
4895                           for some edge, this means that there no constraint associated with this edge.
4896                 theName Object name; when specified, this parameter is used
4897                         for result publication in the study. Otherwise, if automatic
4898                         publication is switched on, default value is used for result name.
4899
4900             Returns:
4901                 New GEOM.GEOM_Object, containing the created face.
4902             """
4903             # Example: see GEOM_TestAll.py
4904             anObj = self.ShapesOp.MakeFaceWithConstraints(theConstraints)
4905             if anObj is None:
4906                 RaiseIfFailed("MakeFaceWithConstraints", self.ShapesOp)
4907             self._autoPublish(anObj, theName, "face")
4908             return anObj
4909
4910         ## Create a shell from the set of faces, shells and/or compounds of faces.
4911         #  @param theFacesAndShells List of faces, shells and/or compounds of faces.
4912         #  @param theName Object name; when specified, this parameter is used
4913         #         for result publication in the study. Otherwise, if automatic
4914         #         publication is switched on, default value is used for result name.
4915         #
4916         #  @return New GEOM.GEOM_Object, containing the created shell (compound of shells).
4917         #
4918         #  @ref tui_creation_shell "Example"
4919         @ManageTransactions("ShapesOp")
4920         def MakeShell(self, theFacesAndShells, theName=None):
4921             """
4922             Create a shell from the set of faces and shells.
4923
4924             Parameters:
4925                 theFacesAndShells List of faces and/or shells.
4926                 theName Object name; when specified, this parameter is used
4927                         for result publication in the study. Otherwise, if automatic
4928                         publication is switched on, default value is used for result name.
4929
4930             Returns:
4931                 New GEOM.GEOM_Object, containing the created shell (compound of shells).
4932             """
4933             # Example: see GEOM_TestAll.py
4934             anObj = self.ShapesOp.MakeShell( ToList( theFacesAndShells ))
4935             RaiseIfFailed("MakeShell", self.ShapesOp)
4936             self._autoPublish(anObj, theName, "shell")
4937             return anObj
4938
4939         ## Create a solid, bounded by the given shells.
4940         #  @param theShells Sequence of bounding shells.
4941         #  @param theName Object name; when specified, this parameter is used
4942         #         for result publication in the study. Otherwise, if automatic
4943         #         publication is switched on, default value is used for result name.
4944         #
4945         #  @return New GEOM.GEOM_Object, containing the created solid.
4946         #
4947         #  @ref tui_creation_solid "Example"
4948         @ManageTransactions("ShapesOp")
4949         def MakeSolid(self, theShells, theName=None):
4950             """
4951             Create a solid, bounded by the given shells.
4952
4953             Parameters:
4954                 theShells Sequence of bounding shells.
4955                 theName Object name; when specified, this parameter is used
4956                         for result publication in the study. Otherwise, if automatic
4957                         publication is switched on, default value is used for result name.
4958
4959             Returns:
4960                 New GEOM.GEOM_Object, containing the created solid.
4961             """
4962             # Example: see GEOM_TestAll.py
4963             theShells = ToList(theShells)
4964             if len(theShells) == 1:
4965                 descr = self._IsGoodForSolid(theShells[0])
4966                 #if len(descr) > 0:
4967                 #    raise RuntimeError, "MakeSolidShells : " + descr
4968                 if descr == "WRN_SHAPE_UNCLOSED":
4969                     raise RuntimeError("MakeSolidShells : Unable to create solid from unclosed shape")
4970             anObj = self.ShapesOp.MakeSolidShells(theShells)
4971             RaiseIfFailed("MakeSolidShells", self.ShapesOp)
4972             self._autoPublish(anObj, theName, "solid")
4973             return anObj
4974
4975         ## Create a compound of the given shapes.
4976         #  @param theShapes List of shapes to put in compound.
4977         #  @param theName Object name; when specified, this parameter is used
4978         #         for result publication in the study. Otherwise, if automatic
4979         #         publication is switched on, default value is used for result name.
4980         #
4981         #  @return New GEOM.GEOM_Object, containing the created compound.
4982         #
4983         #  @ref tui_creation_compound "Example"
4984         @ManageTransactions("ShapesOp")
4985         def MakeCompound(self, theShapes, theName=None):
4986             """
4987             Create a compound of the given shapes.
4988
4989             Parameters:
4990                 theShapes List of shapes to put in compound.
4991                 theName Object name; when specified, this parameter is used
4992                         for result publication in the study. Otherwise, if automatic
4993                         publication is switched on, default value is used for result name.
4994
4995             Returns:
4996                 New GEOM.GEOM_Object, containing the created compound.
4997             """
4998             # Example: see GEOM_TestAll.py
4999             anObj = self.ShapesOp.MakeCompound(ToList(theShapes))
5000             RaiseIfFailed("MakeCompound", self.ShapesOp)
5001             self._autoPublish(anObj, theName, "compound")
5002             return anObj
5003         
5004         ## Create a solid (or solids) from the set of faces and/or shells.
5005         #  @param theFacesOrShells List of faces and/or shells.
5006         #  @param isIntersect If TRUE, forces performing intersections
5007         #         between arguments; otherwise (default) intersection is not performed.
5008         #  @param theName Object name; when specified, this parameter is used
5009         #         for result publication in the study. Otherwise, if automatic
5010         #         publication is switched on, default value is used for result name.
5011         #
5012         #  @return New GEOM.GEOM_Object, containing the created solid (or compound of solids).
5013         #
5014         #  @ref tui_creation_solid_from_faces "Example"
5015         @ManageTransactions("ShapesOp")
5016         def MakeSolidFromConnectedFaces(self, theFacesOrShells, isIntersect = False, theName=None):
5017             """
5018             Create a solid (or solids) from the set of connected faces and/or shells.
5019
5020             Parameters:
5021                 theFacesOrShells List of faces and/or shells.
5022                 isIntersect If TRUE, forces performing intersections
5023                         between arguments; otherwise (default) intersection is not performed
5024                 theName Object name; when specified, this parameter is used.
5025                         for result publication in the study. Otherwise, if automatic
5026                         publication is switched on, default value is used for result name.
5027
5028             Returns:
5029                 New GEOM.GEOM_Object, containing the created solid (or compound of solids).
5030             """
5031             # Example: see GEOM_TestAll.py
5032             anObj = self.ShapesOp.MakeSolidFromConnectedFaces(theFacesOrShells, isIntersect)
5033             RaiseIfFailed("MakeSolidFromConnectedFaces", self.ShapesOp)
5034             self._autoPublish(anObj, theName, "solid")
5035             return anObj
5036
5037         # end of l3_basic_go
5038         ## @}
5039
5040         ## @addtogroup l2_measure
5041         ## @{
5042
5043         ## Gives quantity of faces in the given shape.
5044         #  @param theShape Shape to count faces of.
5045         #  @return Quantity of faces.
5046         #
5047         #  @ref swig_NumberOf "Example"
5048         @ManageTransactions("ShapesOp")
5049         def NumberOfFaces(self, theShape):
5050             """
5051             Gives quantity of faces in the given shape.
5052
5053             Parameters:
5054                 theShape Shape to count faces of.
5055
5056             Returns:
5057                 Quantity of faces.
5058             """
5059             # Example: see GEOM_TestOthers.py
5060             nb_faces = self.ShapesOp.NumberOfFaces(theShape)
5061             RaiseIfFailed("NumberOfFaces", self.ShapesOp)
5062             return nb_faces
5063
5064         ## Gives quantity of edges in the given shape.
5065         #  @param theShape Shape to count edges of.
5066         #  @return Quantity of edges.
5067         #
5068         #  @ref swig_NumberOf "Example"
5069         @ManageTransactions("ShapesOp")
5070         def NumberOfEdges(self, theShape):
5071             """
5072             Gives quantity of edges in the given shape.
5073
5074             Parameters:
5075                 theShape Shape to count edges of.
5076
5077             Returns:
5078                 Quantity of edges.
5079             """
5080             # Example: see GEOM_TestOthers.py
5081             nb_edges = self.ShapesOp.NumberOfEdges(theShape)
5082             RaiseIfFailed("NumberOfEdges", self.ShapesOp)
5083             return nb_edges
5084
5085         ## Gives quantity of sub-shapes of type theShapeType in the given shape.
5086         #  @param theShape Shape to count sub-shapes of.
5087         #  @param theShapeType Type of sub-shapes to count (see ShapeType())
5088         #  @return Quantity of sub-shapes of given type.
5089         #
5090         #  @ref swig_NumberOf "Example"
5091         @ManageTransactions("ShapesOp")
5092         def NumberOfSubShapes(self, theShape, theShapeType):
5093             """
5094             Gives quantity of sub-shapes of type theShapeType in the given shape.
5095
5096             Parameters:
5097                 theShape Shape to count sub-shapes of.
5098                 theShapeType Type of sub-shapes to count (see geompy.ShapeType)
5099
5100             Returns:
5101                 Quantity of sub-shapes of given type.
5102             """
5103             # Example: see GEOM_TestOthers.py
5104             nb_ss = self.ShapesOp.NumberOfSubShapes(theShape, theShapeType)
5105             RaiseIfFailed("NumberOfSubShapes", self.ShapesOp)
5106             return nb_ss
5107
5108         ## Gives quantity of solids in the given shape.
5109         #  @param theShape Shape to count solids in.
5110         #  @return Quantity of solids.
5111         #
5112         #  @ref swig_NumberOf "Example"
5113         @ManageTransactions("ShapesOp")
5114         def NumberOfSolids(self, theShape):
5115             """
5116             Gives quantity of solids in the given shape.
5117
5118             Parameters:
5119                 theShape Shape to count solids in.
5120
5121             Returns:
5122                 Quantity of solids.
5123             """
5124             # Example: see GEOM_TestOthers.py
5125             nb_solids = self.ShapesOp.NumberOfSubShapes(theShape, self.ShapeType["SOLID"])
5126             RaiseIfFailed("NumberOfSolids", self.ShapesOp)
5127             return nb_solids
5128
5129         # end of l2_measure
5130         ## @}
5131
5132         ## @addtogroup l3_healing
5133         ## @{
5134
5135         ## Reverses an orientation the given shape.
5136         #  @param theShape Shape to be reversed.
5137         #  @param theName Object name; when specified, this parameter is used
5138         #         for result publication in the study. Otherwise, if automatic
5139         #         publication is switched on, default value is used for result name.
5140         #
5141         #  @return The reversed copy of theShape.
5142         #
5143         #  @ref swig_ChangeOrientation "Example"
5144         @ManageTransactions("ShapesOp")
5145         def ChangeOrientation(self, theShape, theName=None):
5146             """
5147             Reverses an orientation the given shape.
5148
5149             Parameters:
5150                 theShape Shape to be reversed.
5151                 theName Object name; when specified, this parameter is used
5152                         for result publication in the study. Otherwise, if automatic
5153                         publication is switched on, default value is used for result name.
5154
5155             Returns:
5156                 The reversed copy of theShape.
5157             """
5158             # Example: see GEOM_TestAll.py
5159             anObj = self.ShapesOp.ChangeOrientation(theShape)
5160             RaiseIfFailed("ChangeOrientation", self.ShapesOp)
5161             self._autoPublish(anObj, theName, "reversed")
5162             return anObj
5163
5164         ## See ChangeOrientation() method for details.
5165         #
5166         #  @ref swig_OrientationChange "Example"
5167         def OrientationChange(self, theShape, theName=None):
5168             """
5169             See geompy.ChangeOrientation method for details.
5170             """
5171             # Example: see GEOM_TestOthers.py
5172             # note: auto-publishing is done in self.ChangeOrientation()
5173             anObj = self.ChangeOrientation(theShape, theName)
5174             return anObj
5175
5176         # end of l3_healing
5177         ## @}
5178
5179         ## @addtogroup l4_obtain
5180         ## @{
5181
5182         ## Retrieve all free faces from the given shape.
5183         #  Free face is a face, which is not shared between two shells of the shape.
5184         #  @param theShape Shape to find free faces in.
5185         #  @return List of IDs of all free faces, contained in theShape.
5186         #
5187         #  @ref tui_free_faces_page "Example"
5188         @ManageTransactions("ShapesOp")
5189         def GetFreeFacesIDs(self,theShape):
5190             """
5191             Retrieve all free faces from the given shape.
5192             Free face is a face, which is not shared between two shells of the shape.
5193
5194             Parameters:
5195                 theShape Shape to find free faces in.
5196
5197             Returns:
5198                 List of IDs of all free faces, contained in theShape.
5199             """
5200             # Example: see GEOM_TestOthers.py
5201             anIDs = self.ShapesOp.GetFreeFacesIDs(theShape)
5202             RaiseIfFailed("GetFreeFacesIDs", self.ShapesOp)
5203             return anIDs
5204
5205         ## Get all sub-shapes of theShape1 of the given type, shared with theShape2.
5206         #  @param theShape1 Shape to find sub-shapes in.
5207         #  @param theShape2 Shape to find shared sub-shapes with.
5208         #  @param theShapeType Type of sub-shapes to be retrieved.
5209         #  @param theName Object name; when specified, this parameter is used
5210         #         for result publication in the study. Otherwise, if automatic
5211         #         publication is switched on, default value is used for result name.
5212         #
5213         #  @return List of sub-shapes of theShape1, shared with theShape2.
5214         #
5215         #  @ref swig_GetSharedShapes "Example"
5216         @ManageTransactions("ShapesOp")
5217         def GetSharedShapes(self, theShape1, theShape2, theShapeType, theName=None):
5218             """
5219             Get all sub-shapes of theShape1 of the given type, shared with theShape2.
5220
5221             Parameters:
5222                 theShape1 Shape to find sub-shapes in.
5223                 theShape2 Shape to find shared sub-shapes with.
5224                 theShapeType Type of sub-shapes to be retrieved.
5225                 theName Object name; when specified, this parameter is used
5226                         for result publication in the study. Otherwise, if automatic
5227                         publication is switched on, default value is used for result name.
5228
5229             Returns:
5230                 List of sub-shapes of theShape1, shared with theShape2.
5231             """
5232             # Example: see GEOM_TestOthers.py
5233             aList = self.ShapesOp.GetSharedShapes(theShape1, theShape2, theShapeType)
5234             RaiseIfFailed("GetSharedShapes", self.ShapesOp)
5235             self._autoPublish(aList, theName, "shared")
5236             return aList
5237
5238         ## Get sub-shapes, shared by input shapes.
5239         #  @param theShapes Either a list or compound of shapes to find common sub-shapes of.
5240         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType()).
5241         #  @param theMultiShare Specifies what type of shares should be checked:
5242         #         - @c True (default): search sub-shapes from 1st input shape shared with all other input shapes;
5243         #         - @c False: causes to search sub-shapes shared between couples of input shapes.
5244         #  @param theName Object name; when specified, this parameter is used
5245         #         for result publication in the study. Otherwise, if automatic
5246         #         publication is switched on, default value is used for result name.
5247         #
5248         #  @note If @a theShapes contains single compound, the shares between all possible couples of 
5249         #        its top-level shapes are returned; otherwise, only shares between 1st input shape
5250         #        and all rest input shapes are returned.
5251         #
5252         #  @return List of all found sub-shapes.
5253         #
5254         #  Examples:
5255         #  - @ref tui_shared_shapes "Example 1"
5256         #  - @ref swig_GetSharedShapes "Example 2"
5257         @ManageTransactions("ShapesOp")
5258         def GetSharedShapesMulti(self, theShapes, theShapeType, theMultiShare=True, theName=None):
5259             """
5260             Get sub-shapes, shared by input shapes.
5261
5262             Parameters:
5263                 theShapes Either a list or compound of shapes to find common sub-shapes of.
5264                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType).
5265                 theMultiShare Specifies what type of shares should be checked:
5266                   - True (default): search sub-shapes from 1st input shape shared with all other input shapes;
5267                   - False: causes to search sub-shapes shared between couples of input shapes.
5268                 theName Object name; when specified, this parameter is used
5269                         for result publication in the study. Otherwise, if automatic
5270                         publication is switched on, default value is used for result name.
5271
5272             Note: if theShapes contains single compound, the shares between all possible couples of 
5273                   its top-level shapes are returned; otherwise, only shares between 1st input shape
5274                   and all rest input shapes are returned.
5275
5276             Returns:
5277                 List of all found sub-shapes.
5278             """
5279             # Example: see GEOM_TestOthers.py
5280             aList = self.ShapesOp.GetSharedShapesMulti(ToList(theShapes), theShapeType, theMultiShare)
5281             RaiseIfFailed("GetSharedShapesMulti", self.ShapesOp)
5282             self._autoPublish(aList, theName, "shared")
5283             return aList
5284
5285         ## Find in <VAR>theShape</VAR> all sub-shapes of type <VAR>theShapeType</VAR>,
5286         #  situated relatively the specified plane by the certain way,
5287         #  defined through <VAR>theState</VAR> parameter.
5288         #  @param theShape Shape to find sub-shapes of.
5289         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5290         #  @param theAx1 Vector (or line, or linear edge), specifying normal
5291         #                direction and location of the plane to find shapes on.
5292         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5293         #  @param theName Object name; when specified, this parameter is used
5294         #         for result publication in the study. Otherwise, if automatic
5295         #         publication is switched on, default value is used for result name.
5296         #
5297         #  @return List of all found sub-shapes.
5298         #
5299         #  @ref swig_GetShapesOnPlane "Example"
5300         @ManageTransactions("ShapesOp")
5301         def GetShapesOnPlane(self, theShape, theShapeType, theAx1, theState, theName=None):
5302             """
5303             Find in theShape all sub-shapes of type theShapeType,
5304             situated relatively the specified plane by the certain way,
5305             defined through theState parameter.
5306
5307             Parameters:
5308                 theShape Shape to find sub-shapes of.
5309                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5310                 theAx1 Vector (or line, or linear edge), specifying normal
5311                        direction and location of the plane to find shapes on.
5312                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5313                 theName Object name; when specified, this parameter is used
5314                         for result publication in the study. Otherwise, if automatic
5315                         publication is switched on, default value is used for result name.
5316
5317             Returns:
5318                 List of all found sub-shapes.
5319             """
5320             # Example: see GEOM_TestOthers.py
5321             aList = self.ShapesOp.GetShapesOnPlane(theShape, theShapeType, theAx1, theState)
5322             RaiseIfFailed("GetShapesOnPlane", self.ShapesOp)
5323             self._autoPublish(aList, theName, "shapeOnPlane")
5324             return aList
5325
5326         ## Find in <VAR>theShape</VAR> all sub-shapes of type <VAR>theShapeType</VAR>,
5327         #  situated relatively the specified plane by the certain way,
5328         #  defined through <VAR>theState</VAR> parameter.
5329         #  @param theShape Shape to find sub-shapes of.
5330         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5331         #  @param theAx1 Vector (or line, or linear edge), specifying normal
5332         #                direction and location of the plane to find shapes on.
5333         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5334         #
5335         #  @return List of all found sub-shapes indices.
5336         #
5337         #  @ref swig_GetShapesOnPlaneIDs "Example"
5338         @ManageTransactions("ShapesOp")
5339         def GetShapesOnPlaneIDs(self, theShape, theShapeType, theAx1, theState):
5340             """
5341             Find in theShape all sub-shapes of type theShapeType,
5342             situated relatively the specified plane by the certain way,
5343             defined through theState parameter.
5344
5345             Parameters:
5346                 theShape Shape to find sub-shapes of.
5347                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5348                 theAx1 Vector (or line, or linear edge), specifying normal
5349                        direction and location of the plane to find shapes on.
5350                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5351
5352             Returns:
5353                 List of all found sub-shapes indices.
5354             """
5355             # Example: see GEOM_TestOthers.py
5356             aList = self.ShapesOp.GetShapesOnPlaneIDs(theShape, theShapeType, theAx1, theState)
5357             RaiseIfFailed("GetShapesOnPlaneIDs", self.ShapesOp)
5358             return aList
5359
5360         ## Find in <VAR>theShape</VAR> all sub-shapes of type <VAR>theShapeType</VAR>,
5361         #  situated relatively the specified plane by the certain way,
5362         #  defined through <VAR>theState</VAR> parameter.
5363         #  @param theShape Shape to find sub-shapes of.
5364         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5365         #  @param theAx1 Vector (or line, or linear edge), specifying normal
5366         #                direction of the plane to find shapes on.
5367         #  @param thePnt Point specifying location of the plane to find shapes on.
5368         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5369         #  @param theName Object name; when specified, this parameter is used
5370         #         for result publication in the study. Otherwise, if automatic
5371         #         publication is switched on, default value is used for result name.
5372         #
5373         #  @return List of all found sub-shapes.
5374         #
5375         #  @ref swig_GetShapesOnPlaneWithLocation "Example"
5376         @ManageTransactions("ShapesOp")
5377         def GetShapesOnPlaneWithLocation(self, theShape, theShapeType, theAx1, thePnt, theState, theName=None):
5378             """
5379             Find in theShape all sub-shapes of type theShapeType,
5380             situated relatively the specified plane by the certain way,
5381             defined through theState parameter.
5382
5383             Parameters:
5384                 theShape Shape to find sub-shapes of.
5385                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5386                 theAx1 Vector (or line, or linear edge), specifying normal
5387                        direction and location of the plane to find shapes on.
5388                 thePnt Point specifying location of the plane to find shapes on.
5389                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5390                 theName Object name; when specified, this parameter is used
5391                         for result publication in the study. Otherwise, if automatic
5392                         publication is switched on, default value is used for result name.
5393
5394             Returns:
5395                 List of all found sub-shapes.
5396             """
5397             # Example: see GEOM_TestOthers.py
5398             aList = self.ShapesOp.GetShapesOnPlaneWithLocation(theShape, theShapeType,
5399                                                                theAx1, thePnt, theState)
5400             RaiseIfFailed("GetShapesOnPlaneWithLocation", self.ShapesOp)
5401             self._autoPublish(aList, theName, "shapeOnPlane")
5402             return aList
5403
5404         ## Find in <VAR>theShape</VAR> all sub-shapes of type <VAR>theShapeType</VAR>,
5405         #  situated relatively the specified plane by the certain way,
5406         #  defined through <VAR>theState</VAR> parameter.
5407         #  @param theShape Shape to find sub-shapes of.
5408         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5409         #  @param theAx1 Vector (or line, or linear edge), specifying normal
5410         #                direction of the plane to find shapes on.
5411         #  @param thePnt Point specifying location of the plane to find shapes on.
5412         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5413         #
5414         #  @return List of all found sub-shapes indices.
5415         #
5416         #  @ref swig_GetShapesOnPlaneWithLocationIDs "Example"
5417         @ManageTransactions("ShapesOp")
5418         def GetShapesOnPlaneWithLocationIDs(self, theShape, theShapeType, theAx1, thePnt, theState):
5419             """
5420             Find in theShape all sub-shapes of type theShapeType,
5421             situated relatively the specified plane by the certain way,
5422             defined through theState parameter.
5423
5424             Parameters:
5425                 theShape Shape to find sub-shapes of.
5426                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5427                 theAx1 Vector (or line, or linear edge), specifying normal
5428                        direction and location of the plane to find shapes on.
5429                 thePnt Point specifying location of the plane to find shapes on.
5430                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5431
5432             Returns:
5433                 List of all found sub-shapes indices.
5434             """
5435             # Example: see GEOM_TestOthers.py
5436             aList = self.ShapesOp.GetShapesOnPlaneWithLocationIDs(theShape, theShapeType,
5437                                                                   theAx1, thePnt, theState)
5438             RaiseIfFailed("GetShapesOnPlaneWithLocationIDs", self.ShapesOp)
5439             return aList
5440
5441         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
5442         #  the specified cylinder by the certain way, defined through \a theState parameter.
5443         #  @param theShape Shape to find sub-shapes of.
5444         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5445         #  @param theAxis Vector (or line, or linear edge), specifying
5446         #                 axis of the cylinder to find shapes on.
5447         #  @param theRadius Radius of the cylinder to find shapes on.
5448         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5449         #  @param theName Object name; when specified, this parameter is used
5450         #         for result publication in the study. Otherwise, if automatic
5451         #         publication is switched on, default value is used for result name.
5452         #
5453         #  @return List of all found sub-shapes.
5454         #
5455         #  @ref swig_GetShapesOnCylinder "Example"
5456         @ManageTransactions("ShapesOp")
5457         def GetShapesOnCylinder(self, theShape, theShapeType, theAxis, theRadius, theState, theName=None):
5458             """
5459             Find in theShape all sub-shapes of type theShapeType, situated relatively
5460             the specified cylinder by the certain way, defined through theState parameter.
5461
5462             Parameters:
5463                 theShape Shape to find sub-shapes of.
5464                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5465                 theAxis Vector (or line, or linear edge), specifying
5466                         axis of the cylinder to find shapes on.
5467                 theRadius Radius of the cylinder to find shapes on.
5468                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5469                 theName Object name; when specified, this parameter is used
5470                         for result publication in the study. Otherwise, if automatic
5471                         publication is switched on, default value is used for result name.
5472
5473             Returns:
5474                 List of all found sub-shapes.
5475             """
5476             # Example: see GEOM_TestOthers.py
5477             aList = self.ShapesOp.GetShapesOnCylinder(theShape, theShapeType, theAxis, theRadius, theState)
5478             RaiseIfFailed("GetShapesOnCylinder", self.ShapesOp)
5479             self._autoPublish(aList, theName, "shapeOnCylinder")
5480             return aList
5481
5482         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
5483         #  the specified cylinder by the certain way, defined through \a theState parameter.
5484         #  @param theShape Shape to find sub-shapes of.
5485         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5486         #  @param theAxis Vector (or line, or linear edge), specifying
5487         #                 axis of the cylinder to find shapes on.
5488         #  @param theRadius Radius of the cylinder to find shapes on.
5489         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5490         #
5491         #  @return List of all found sub-shapes indices.
5492         #
5493         #  @ref swig_GetShapesOnCylinderIDs "Example"
5494         @ManageTransactions("ShapesOp")
5495         def GetShapesOnCylinderIDs(self, theShape, theShapeType, theAxis, theRadius, theState):
5496             """
5497             Find in theShape all sub-shapes of type theShapeType, situated relatively
5498             the specified cylinder by the certain way, defined through theState parameter.
5499
5500             Parameters:
5501                 theShape Shape to find sub-shapes of.
5502                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5503                 theAxis Vector (or line, or linear edge), specifying
5504                         axis of the cylinder to find shapes on.
5505                 theRadius Radius of the cylinder to find shapes on.
5506                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5507
5508             Returns:
5509                 List of all found sub-shapes indices.
5510             """
5511             # Example: see GEOM_TestOthers.py
5512             aList = self.ShapesOp.GetShapesOnCylinderIDs(theShape, theShapeType, theAxis, theRadius, theState)
5513             RaiseIfFailed("GetShapesOnCylinderIDs", self.ShapesOp)
5514             return aList
5515
5516         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
5517         #  the specified cylinder by the certain way, defined through \a theState parameter.
5518         #  @param theShape Shape to find sub-shapes of.
5519         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5520         #  @param theAxis Vector (or line, or linear edge), specifying
5521         #                 axis of the cylinder to find shapes on.
5522         #  @param thePnt Point specifying location of the bottom of the cylinder.
5523         #  @param theRadius Radius of the cylinder to find shapes on.
5524         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5525         #  @param theName Object name; when specified, this parameter is used
5526         #         for result publication in the study. Otherwise, if automatic
5527         #         publication is switched on, default value is used for result name.
5528         #
5529         #  @return List of all found sub-shapes.
5530         #
5531         #  @ref swig_GetShapesOnCylinderWithLocation "Example"
5532         @ManageTransactions("ShapesOp")
5533         def GetShapesOnCylinderWithLocation(self, theShape, theShapeType, theAxis, thePnt, theRadius, theState, theName=None):
5534             """
5535             Find in theShape all sub-shapes of type theShapeType, situated relatively
5536             the specified cylinder by the certain way, defined through theState parameter.
5537
5538             Parameters:
5539                 theShape Shape to find sub-shapes of.
5540                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5541                 theAxis Vector (or line, or linear edge), specifying
5542                         axis of the cylinder to find shapes on.
5543                 theRadius Radius of the cylinder to find shapes on.
5544                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5545                 theName Object name; when specified, this parameter is used
5546                         for result publication in the study. Otherwise, if automatic
5547                         publication is switched on, default value is used for result name.
5548
5549             Returns:
5550                 List of all found sub-shapes.
5551             """
5552             # Example: see GEOM_TestOthers.py
5553             aList = self.ShapesOp.GetShapesOnCylinderWithLocation(theShape, theShapeType, theAxis, thePnt, theRadius, theState)
5554             RaiseIfFailed("GetShapesOnCylinderWithLocation", self.ShapesOp)
5555             self._autoPublish(aList, theName, "shapeOnCylinder")
5556             return aList
5557
5558         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
5559         #  the specified cylinder by the certain way, defined through \a theState parameter.
5560         #  @param theShape Shape to find sub-shapes of.
5561         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5562         #  @param theAxis Vector (or line, or linear edge), specifying
5563         #                 axis of the cylinder to find shapes on.
5564         #  @param thePnt Point specifying location of the bottom of the cylinder.
5565         #  @param theRadius Radius of the cylinder to find shapes on.
5566         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5567         #
5568         #  @return List of all found sub-shapes indices
5569         #
5570         #  @ref swig_GetShapesOnCylinderWithLocationIDs "Example"
5571         @ManageTransactions("ShapesOp")
5572         def GetShapesOnCylinderWithLocationIDs(self, theShape, theShapeType, theAxis, thePnt, theRadius, theState):
5573             """
5574             Find in theShape all sub-shapes of type theShapeType, situated relatively
5575             the specified cylinder by the certain way, defined through theState parameter.
5576
5577             Parameters:
5578                 theShape Shape to find sub-shapes of.
5579                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5580                 theAxis Vector (or line, or linear edge), specifying
5581                         axis of the cylinder to find shapes on.
5582                 theRadius Radius of the cylinder to find shapes on.
5583                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5584
5585             Returns:
5586                 List of all found sub-shapes indices.
5587             """
5588             # Example: see GEOM_TestOthers.py
5589             aList = self.ShapesOp.GetShapesOnCylinderWithLocationIDs(theShape, theShapeType, theAxis, thePnt, theRadius, theState)
5590             RaiseIfFailed("GetShapesOnCylinderWithLocationIDs", self.ShapesOp)
5591             return aList
5592
5593         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
5594         #  the specified sphere by the certain way, defined through \a theState parameter.
5595         #  @param theShape Shape to find sub-shapes of.
5596         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5597         #  @param theCenter Point, specifying center of the sphere to find shapes on.
5598         #  @param theRadius Radius of the sphere to find shapes on.
5599         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5600         #  @param theName Object name; when specified, this parameter is used
5601         #         for result publication in the study. Otherwise, if automatic
5602         #         publication is switched on, default value is used for result name.
5603         #
5604         #  @return List of all found sub-shapes.
5605         #
5606         #  @ref swig_GetShapesOnSphere "Example"
5607         @ManageTransactions("ShapesOp")
5608         def GetShapesOnSphere(self, theShape, theShapeType, theCenter, theRadius, theState, theName=None):
5609             """
5610             Find in theShape all sub-shapes of type theShapeType, situated relatively
5611             the specified sphere by the certain way, defined through theState parameter.
5612
5613             Parameters:
5614                 theShape Shape to find sub-shapes of.
5615                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5616                 theCenter Point, specifying center of the sphere to find shapes on.
5617                 theRadius Radius of the sphere to find shapes on.
5618                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5619                 theName Object name; when specified, this parameter is used
5620                         for result publication in the study. Otherwise, if automatic
5621                         publication is switched on, default value is used for result name.
5622
5623             Returns:
5624                 List of all found sub-shapes.
5625             """
5626             # Example: see GEOM_TestOthers.py
5627             aList = self.ShapesOp.GetShapesOnSphere(theShape, theShapeType, theCenter, theRadius, theState)
5628             RaiseIfFailed("GetShapesOnSphere", self.ShapesOp)
5629             self._autoPublish(aList, theName, "shapeOnSphere")
5630             return aList
5631
5632         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
5633         #  the specified sphere by the certain way, defined through \a theState parameter.
5634         #  @param theShape Shape to find sub-shapes of.
5635         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5636         #  @param theCenter Point, specifying center of the sphere to find shapes on.
5637         #  @param theRadius Radius of the sphere to find shapes on.
5638         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5639         #
5640         #  @return List of all found sub-shapes indices.
5641         #
5642         #  @ref swig_GetShapesOnSphereIDs "Example"
5643         @ManageTransactions("ShapesOp")
5644         def GetShapesOnSphereIDs(self, theShape, theShapeType, theCenter, theRadius, theState):
5645             """
5646             Find in theShape all sub-shapes of type theShapeType, situated relatively
5647             the specified sphere by the certain way, defined through theState parameter.
5648
5649             Parameters:
5650                 theShape Shape to find sub-shapes of.
5651                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5652                 theCenter Point, specifying center of the sphere to find shapes on.
5653                 theRadius Radius of the sphere to find shapes on.
5654                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5655
5656             Returns:
5657                 List of all found sub-shapes indices.
5658             """
5659             # Example: see GEOM_TestOthers.py
5660             aList = self.ShapesOp.GetShapesOnSphereIDs(theShape, theShapeType, theCenter, theRadius, theState)
5661             RaiseIfFailed("GetShapesOnSphereIDs", self.ShapesOp)
5662             return aList
5663
5664         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
5665         #  the specified quadrangle by the certain way, defined through \a theState parameter.
5666         #  @param theShape Shape to find sub-shapes of.
5667         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5668         #  @param theTopLeftPoint Point, specifying top left corner of a quadrangle
5669         #  @param theTopRightPoint Point, specifying top right corner of a quadrangle
5670         #  @param theBottomLeftPoint Point, specifying bottom left corner of a quadrangle
5671         #  @param theBottomRightPoint Point, specifying bottom right corner of a quadrangle
5672         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5673         #  @param theName Object name; when specified, this parameter is used
5674         #         for result publication in the study. Otherwise, if automatic
5675         #         publication is switched on, default value is used for result name.
5676         #
5677         #  @return List of all found sub-shapes.
5678         #
5679         #  @ref swig_GetShapesOnQuadrangle "Example"
5680         @ManageTransactions("ShapesOp")
5681         def GetShapesOnQuadrangle(self, theShape, theShapeType,
5682                                   theTopLeftPoint, theTopRightPoint,
5683                                   theBottomLeftPoint, theBottomRightPoint, theState, theName=None):
5684             """
5685             Find in theShape all sub-shapes of type theShapeType, situated relatively
5686             the specified quadrangle by the certain way, defined through theState parameter.
5687
5688             Parameters:
5689                 theShape Shape to find sub-shapes of.
5690                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5691                 theTopLeftPoint Point, specifying top left corner of a quadrangle
5692                 theTopRightPoint Point, specifying top right corner of a quadrangle
5693                 theBottomLeftPoint Point, specifying bottom left corner of a quadrangle
5694                 theBottomRightPoint Point, specifying bottom right corner of a quadrangle
5695                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5696                 theName Object name; when specified, this parameter is used
5697                         for result publication in the study. Otherwise, if automatic
5698                         publication is switched on, default value is used for result name.
5699
5700             Returns:
5701                 List of all found sub-shapes.
5702             """
5703             # Example: see GEOM_TestOthers.py
5704             aList = self.ShapesOp.GetShapesOnQuadrangle(theShape, theShapeType,
5705                                                         theTopLeftPoint, theTopRightPoint,
5706                                                         theBottomLeftPoint, theBottomRightPoint, theState)
5707             RaiseIfFailed("GetShapesOnQuadrangle", self.ShapesOp)
5708             self._autoPublish(aList, theName, "shapeOnQuadrangle")
5709             return aList
5710
5711         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
5712         #  the specified quadrangle by the certain way, defined through \a theState parameter.
5713         #  @param theShape Shape to find sub-shapes of.
5714         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5715         #  @param theTopLeftPoint Point, specifying top left corner of a quadrangle
5716         #  @param theTopRightPoint Point, specifying top right corner of a quadrangle
5717         #  @param theBottomLeftPoint Point, specifying bottom left corner of a quadrangle
5718         #  @param theBottomRightPoint Point, specifying bottom right corner of a quadrangle
5719         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5720         #
5721         #  @return List of all found sub-shapes indices.
5722         #
5723         #  @ref swig_GetShapesOnQuadrangleIDs "Example"
5724         @ManageTransactions("ShapesOp")
5725         def GetShapesOnQuadrangleIDs(self, theShape, theShapeType,
5726                                      theTopLeftPoint, theTopRightPoint,
5727                                      theBottomLeftPoint, theBottomRightPoint, theState):
5728             """
5729             Find in theShape all sub-shapes of type theShapeType, situated relatively
5730             the specified quadrangle by the certain way, defined through theState parameter.
5731
5732             Parameters:
5733                 theShape Shape to find sub-shapes of.
5734                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5735                 theTopLeftPoint Point, specifying top left corner of a quadrangle
5736                 theTopRightPoint Point, specifying top right corner of a quadrangle
5737                 theBottomLeftPoint Point, specifying bottom left corner of a quadrangle
5738                 theBottomRightPoint Point, specifying bottom right corner of a quadrangle
5739                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5740
5741             Returns:
5742                 List of all found sub-shapes indices.
5743             """
5744
5745             # Example: see GEOM_TestOthers.py
5746             aList = self.ShapesOp.GetShapesOnQuadrangleIDs(theShape, theShapeType,
5747                                                            theTopLeftPoint, theTopRightPoint,
5748                                                            theBottomLeftPoint, theBottomRightPoint, theState)
5749             RaiseIfFailed("GetShapesOnQuadrangleIDs", self.ShapesOp)
5750             return aList
5751
5752         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
5753         #  the specified \a theBox by the certain way, defined through \a theState parameter.
5754         #  @param theBox Shape for relative comparing.
5755         #  @param theShape Shape to find sub-shapes of.
5756         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5757         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5758         #  @param theName Object name; when specified, this parameter is used
5759         #         for result publication in the study. Otherwise, if automatic
5760         #         publication is switched on, default value is used for result name.
5761         #
5762         #  @return List of all found sub-shapes.
5763         #
5764         #  @ref swig_GetShapesOnBox "Example"
5765         @ManageTransactions("ShapesOp")
5766         def GetShapesOnBox(self, theBox, theShape, theShapeType, theState, theName=None):
5767             """
5768             Find in theShape all sub-shapes of type theShapeType, situated relatively
5769             the specified theBox by the certain way, defined through theState parameter.
5770
5771             Parameters:
5772                 theBox Shape for relative comparing.
5773                 theShape Shape to find sub-shapes of.
5774                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5775                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5776                 theName Object name; when specified, this parameter is used
5777                         for result publication in the study. Otherwise, if automatic
5778                         publication is switched on, default value is used for result name.
5779
5780             Returns:
5781                 List of all found sub-shapes.
5782             """
5783             # Example: see GEOM_TestOthers.py
5784             aList = self.ShapesOp.GetShapesOnBox(theBox, theShape, theShapeType, theState)
5785             RaiseIfFailed("GetShapesOnBox", self.ShapesOp)
5786             self._autoPublish(aList, theName, "shapeOnBox")
5787             return aList
5788
5789         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
5790         #  the specified \a theBox by the certain way, defined through \a theState parameter.
5791         #  @param theBox Shape for relative comparing.
5792         #  @param theShape Shape to find sub-shapes of.
5793         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5794         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5795         #
5796         #  @return List of all found sub-shapes indices.
5797         #
5798         #  @ref swig_GetShapesOnBoxIDs "Example"
5799         @ManageTransactions("ShapesOp")
5800         def GetShapesOnBoxIDs(self, theBox, theShape, theShapeType, theState):
5801             """
5802             Find in theShape all sub-shapes of type theShapeType, situated relatively
5803             the specified theBox by the certain way, defined through theState parameter.
5804
5805             Parameters:
5806                 theBox Shape for relative comparing.
5807                 theShape Shape to find sub-shapes of.
5808                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5809                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5810
5811             Returns:
5812                 List of all found sub-shapes indices.
5813             """
5814             # Example: see GEOM_TestOthers.py
5815             aList = self.ShapesOp.GetShapesOnBoxIDs(theBox, theShape, theShapeType, theState)
5816             RaiseIfFailed("GetShapesOnBoxIDs", self.ShapesOp)
5817             return aList
5818
5819         ## Find in \a theShape all sub-shapes of type \a theShapeType,
5820         #  situated relatively the specified \a theCheckShape by the
5821         #  certain way, defined through \a theState parameter.
5822         #  @param theCheckShape Shape for relative comparing. It must be a solid.
5823         #  @param theShape Shape to find sub-shapes of.
5824         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5825         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5826         #  @param theName Object name; when specified, this parameter is used
5827         #         for result publication in the study. Otherwise, if automatic
5828         #         publication is switched on, default value is used for result name.
5829         #
5830         #  @return List of all found sub-shapes.
5831         #
5832         #  @ref swig_GetShapesOnShape "Example"
5833         @ManageTransactions("ShapesOp")
5834         def GetShapesOnShape(self, theCheckShape, theShape, theShapeType, theState, theName=None):
5835             """
5836             Find in theShape all sub-shapes of type theShapeType,
5837             situated relatively the specified theCheckShape by the
5838             certain way, defined through theState parameter.
5839
5840             Parameters:
5841                 theCheckShape Shape for relative comparing. It must be a solid.
5842                 theShape Shape to find sub-shapes of.
5843                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5844                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5845                 theName Object name; when specified, this parameter is used
5846                         for result publication in the study. Otherwise, if automatic
5847                         publication is switched on, default value is used for result name.
5848
5849             Returns:
5850                 List of all found sub-shapes.
5851             """
5852             # Example: see GEOM_TestOthers.py
5853             aList = self.ShapesOp.GetShapesOnShape(theCheckShape, theShape,
5854                                                    theShapeType, theState)
5855             RaiseIfFailed("GetShapesOnShape", self.ShapesOp)
5856             self._autoPublish(aList, theName, "shapeOnShape")
5857             return aList
5858
5859         ## Find in \a theShape all sub-shapes of type \a theShapeType,
5860         #  situated relatively the specified \a theCheckShape by the
5861         #  certain way, defined through \a theState parameter.
5862         #  @param theCheckShape Shape for relative comparing. It must be a solid.
5863         #  @param theShape Shape to find sub-shapes of.
5864         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5865         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5866         #  @param theName Object name; when specified, this parameter is used
5867         #         for result publication in the study. Otherwise, if automatic
5868         #         publication is switched on, default value is used for result name.
5869         #
5870         #  @return All found sub-shapes as compound.
5871         #
5872         #  @ref swig_GetShapesOnShapeAsCompound "Example"
5873         @ManageTransactions("ShapesOp")
5874         def GetShapesOnShapeAsCompound(self, theCheckShape, theShape, theShapeType, theState, theName=None):
5875             """
5876             Find in theShape all sub-shapes of type theShapeType,
5877             situated relatively the specified theCheckShape by the
5878             certain way, defined through theState parameter.
5879
5880             Parameters:
5881                 theCheckShape Shape for relative comparing. It must be a solid.
5882                 theShape Shape to find sub-shapes of.
5883                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5884                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5885                 theName Object name; when specified, this parameter is used
5886                         for result publication in the study. Otherwise, if automatic
5887                         publication is switched on, default value is used for result name.
5888
5889             Returns:
5890                 All found sub-shapes as compound.
5891             """
5892             # Example: see GEOM_TestOthers.py
5893             anObj = self.ShapesOp.GetShapesOnShapeAsCompound(theCheckShape, theShape,
5894                                                              theShapeType, theState)
5895             RaiseIfFailed("GetShapesOnShapeAsCompound", self.ShapesOp)
5896             self._autoPublish(anObj, theName, "shapeOnShape")
5897             return anObj
5898
5899         ## Find in \a theShape all sub-shapes of type \a theShapeType,
5900         #  situated relatively the specified \a theCheckShape by the
5901         #  certain way, defined through \a theState parameter.
5902         #  @param theCheckShape Shape for relative comparing. It must be a solid.
5903         #  @param theShape Shape to find sub-shapes of.
5904         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5905         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5906         #
5907         #  @return List of all found sub-shapes indices.
5908         #
5909         #  @ref swig_GetShapesOnShapeIDs "Example"
5910         @ManageTransactions("ShapesOp")
5911         def GetShapesOnShapeIDs(self, theCheckShape, theShape, theShapeType, theState):
5912             """
5913             Find in theShape all sub-shapes of type theShapeType,
5914             situated relatively the specified theCheckShape by the
5915             certain way, defined through theState parameter.
5916
5917             Parameters:
5918                 theCheckShape Shape for relative comparing. It must be a solid.
5919                 theShape Shape to find sub-shapes of.
5920                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5921                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5922
5923             Returns:
5924                 List of all found sub-shapes indices.
5925             """
5926             # Example: see GEOM_TestOthers.py
5927             aList = self.ShapesOp.GetShapesOnShapeIDs(theCheckShape, theShape,
5928                                                       theShapeType, theState)
5929             RaiseIfFailed("GetShapesOnShapeIDs", self.ShapesOp)
5930             return aList
5931
5932         ## Get sub-shape(s) of theShapeWhere, which are
5933         #  coincident with \a theShapeWhat or could be a part of it.
5934         #  @param theShapeWhere Shape to find sub-shapes of.
5935         #  @param theShapeWhat Shape, specifying what to find.
5936         #  @param isNewImplementation implementation of GetInPlace functionality
5937         #             (default = False, old alghorithm based on shape properties)
5938         #  @param theName Object name; when specified, this parameter is used
5939         #         for result publication in the study. Otherwise, if automatic
5940         #         publication is switched on, default value is used for result name.
5941         #
5942         #  @return Compound which includes all found sub-shapes if they have different types; 
5943         #          or group of all found shapes of the equal type; or a single found sub-shape.
5944         #
5945         #  @note This function has a restriction on argument shapes.
5946         #        If \a theShapeWhere has curved parts with significantly
5947         #        outstanding centres (i.e. the mass centre of a part is closer to
5948         #        \a theShapeWhat than to the part), such parts will not be found.
5949         #        @image html get_in_place_lost_part.png
5950         #
5951         #  @ref swig_GetInPlace "Example"
5952         @ManageTransactions("ShapesOp")
5953         def GetInPlace(self, theShapeWhere, theShapeWhat, isNewImplementation = False, theName=None):
5954             """
5955             Get sub-shape(s) of theShapeWhere, which are
5956             coincident with  theShapeWhat or could be a part of it.
5957
5958             Parameters:
5959                 theShapeWhere Shape to find sub-shapes of.
5960                 theShapeWhat Shape, specifying what to find.
5961                 isNewImplementation Implementation of GetInPlace functionality
5962                                     (default = False, old alghorithm based on shape properties)
5963                 theName Object name; when specified, this parameter is used
5964                         for result publication in the study. Otherwise, if automatic
5965                         publication is switched on, default value is used for result name.
5966
5967             Returns:
5968                 Compound which includes all found sub-shapes if they have different types; 
5969                 or group of all found shapes of the equal type; or a single found sub-shape.
5970
5971
5972             Note:
5973                 This function has a restriction on argument shapes.
5974                 If theShapeWhere has curved parts with significantly
5975                 outstanding centres (i.e. the mass centre of a part is closer to
5976                 theShapeWhat than to the part), such parts will not be found.
5977             """
5978             # Example: see GEOM_TestOthers.py
5979             anObj = None
5980             if isNewImplementation:
5981                 anObj = self.ShapesOp.GetInPlace(theShapeWhere, theShapeWhat)
5982             else:
5983                 anObj = self.ShapesOp.GetInPlaceOld(theShapeWhere, theShapeWhat)
5984                 pass
5985             RaiseIfFailed("GetInPlace", self.ShapesOp)
5986             self._autoPublish(anObj, theName, "inplace")
5987             return anObj
5988
5989         ## Get sub-shape(s) of \a theShapeWhere, which are
5990         #  coincident with \a theShapeWhat or could be a part of it.
5991         #
5992         #  Implementation of this method is based on a saved history of an operation,
5993         #  produced \a theShapeWhere. The \a theShapeWhat must be among this operation's
5994         #  arguments (an argument shape or a sub-shape of an argument shape).
5995         #  The operation could be the Partition or one of boolean operations,
5996         #  performed on simple shapes (not on compounds).
5997         #
5998         #  @param theShapeWhere Shape to find sub-shapes of.
5999         #  @param theShapeWhat Shape, specifying what to find (must be in the
6000         #                      building history of the ShapeWhere).
6001         #  @param theName Object name; when specified, this parameter is used
6002         #         for result publication in the study. Otherwise, if automatic
6003         #         publication is switched on, default value is used for result name.
6004         #
6005         #  @return Compound which includes all found sub-shapes if they have different types; 
6006         #          or group of all found shapes of the equal type; or a single found sub-shape.
6007         #
6008         #  @ref swig_GetInPlace "Example"
6009         @ManageTransactions("ShapesOp")
6010         def GetInPlaceByHistory(self, theShapeWhere, theShapeWhat, theName=None):
6011             """
6012             Implementation of this method is based on a saved history of an operation,
6013             produced theShapeWhere. The theShapeWhat must be among this operation's
6014             arguments (an argument shape or a sub-shape of an argument shape).
6015             The operation could be the Partition or one of boolean operations,
6016             performed on simple shapes (not on compounds).
6017
6018             Parameters:
6019                 theShapeWhere Shape to find sub-shapes of.
6020                 theShapeWhat Shape, specifying what to find (must be in the
6021                                 building history of the ShapeWhere).
6022                 theName Object name; when specified, this parameter is used
6023                         for result publication in the study. Otherwise, if automatic
6024                         publication is switched on, default value is used for result name.
6025
6026             Returns:
6027                 Compound which includes all found sub-shapes if they have different types; 
6028                 or group of all found shapes of the equal type; or a single found sub-shape.
6029             """
6030             # Example: see GEOM_TestOthers.py
6031             anObj = self.ShapesOp.GetInPlaceByHistory(theShapeWhere, theShapeWhat)
6032             RaiseIfFailed("GetInPlaceByHistory", self.ShapesOp)
6033             self._autoPublish(anObj, theName, "inplace")
6034             return anObj
6035
6036         ## A sort of GetInPlace functionality, returning IDs of sub-shapes.
6037         #  For each sub-shape ID of @a theShapeWhat return a list of corresponding sub-shape
6038         #  IDs of @a theShapeWhere.
6039         #  For example, if theShapeWhat is a box and theShapeWhere is this box cut into 
6040         #  two parts by a plane, then the result can be as this: 
6041         #    len( result_list ) = 35,
6042         #    result_list[ 1 ] = [ 2, 36 ], which means that the box  (ID 1) turned into two
6043         #  solids with IDs 2 and 36 within theShapeWhere
6044         #
6045         #  @param theShapeWhere Shape to find sub-shapes of.
6046         #  @param theShapeWhat Shape, specifying what to find.
6047         #  @return List of lists of sub-shape IDS of theShapeWhere.
6048         def GetInPlaceMap(self, theShapeWhere, theShapeWhat):
6049             """
6050             A sort of GetInPlace functionality, returning IDs of sub-shapes.
6051             For each sub-shape ID of @a theShapeWhat return a list of corresponding sub-shape
6052             IDs of @a theShapeWhere.
6053             For example, if theShapeWhat is a box and theShapeWhere is this box cut into 
6054             two parts by a plane, then the result can be as this: 
6055               len( result_list ) = 35,
6056               result_list[ 1 ] = [ 2, 36 ], which means that the box (ID 1) turned into two
6057             solids with IDs 2 and 36 within theShapeWhere
6058
6059             Parameters:
6060                 theShapeWhere Shape to find sub-shapes of.
6061                 theShapeWhat Shape, specifying what to find.
6062
6063             Returns:
6064                 List of lists of sub-shape IDS of theShapeWhere.
6065             """
6066             return self.ShapesOp.GetInPlaceMap(theShapeWhere, theShapeWhat)
6067
6068         ## Get sub-shape of theShapeWhere, which is
6069         #  equal to \a theShapeWhat.
6070         #  @param theShapeWhere Shape to find sub-shape of.
6071         #  @param theShapeWhat Shape, specifying what to find.
6072         #  @param theName Object name; when specified, this parameter is used
6073         #         for result publication in the study. Otherwise, if automatic
6074         #         publication is switched on, default value is used for result name.
6075         #
6076         #  @return New GEOM.GEOM_Object for found sub-shape.
6077         #
6078         #  @ref swig_GetSame "Example"
6079         @ManageTransactions("ShapesOp")
6080         def GetSame(self, theShapeWhere, theShapeWhat, theName=None):
6081             """
6082             Get sub-shape of theShapeWhere, which is
6083             equal to theShapeWhat.
6084
6085             Parameters:
6086                 theShapeWhere Shape to find sub-shape of.
6087                 theShapeWhat Shape, specifying what to find.
6088                 theName Object name; when specified, this parameter is used
6089                         for result publication in the study. Otherwise, if automatic
6090                         publication is switched on, default value is used for result name.
6091
6092             Returns:
6093                 New GEOM.GEOM_Object for found sub-shape.
6094             """
6095             anObj = self.ShapesOp.GetSame(theShapeWhere, theShapeWhat)
6096             RaiseIfFailed("GetSame", self.ShapesOp)
6097             self._autoPublish(anObj, theName, "sameShape")
6098             return anObj
6099
6100
6101         ## Get sub-shape indices of theShapeWhere, which is
6102         #  equal to \a theShapeWhat.
6103         #  @param theShapeWhere Shape to find sub-shape of.
6104         #  @param theShapeWhat Shape, specifying what to find.
6105         #  @return List of all found sub-shapes indices.
6106         #
6107         #  @ref swig_GetSame "Example"
6108         @ManageTransactions("ShapesOp")
6109         def GetSameIDs(self, theShapeWhere, theShapeWhat):
6110             """
6111             Get sub-shape indices of theShapeWhere, which is
6112             equal to theShapeWhat.
6113
6114             Parameters:
6115                 theShapeWhere Shape to find sub-shape of.
6116                 theShapeWhat Shape, specifying what to find.
6117
6118             Returns:
6119                 List of all found sub-shapes indices.
6120             """
6121             anObj = self.ShapesOp.GetSameIDs(theShapeWhere, theShapeWhat)
6122             RaiseIfFailed("GetSameIDs", self.ShapesOp)
6123             return anObj
6124
6125         ## Resize the input edge with the new Min and Max parameters.
6126         #  The input edge parameters range is [0, 1]. If theMin parameter is
6127         #  negative, the input edge is extended, otherwise it is shrinked by
6128         #  theMin parameter. If theMax is greater than 1, the edge is extended,
6129         #  otherwise it is shrinked by theMax parameter.
6130         #  @param theEdge the input edge to be resized.
6131         #  @param theMin the minimal parameter value.
6132         #  @param theMax the maximal parameter value.
6133         #  @param theName Object name; when specified, this parameter is used
6134         #         for result publication in the study. Otherwise, if automatic
6135         #         publication is switched on, default value is used for result name.
6136         #  @return New GEOM.GEOM_Object, containing the created edge.
6137         #
6138         #  @ref tui_extend "Example"
6139         @ManageTransactions("ShapesOp")
6140         def ExtendEdge(self, theEdge, theMin, theMax, theName=None):
6141             """
6142             Resize the input edge with the new Min and Max parameters.
6143             The input edge parameters range is [0, 1]. If theMin parameter is
6144             negative, the input edge is extended, otherwise it is shrinked by
6145             theMin parameter. If theMax is greater than 1, the edge is extended,
6146             otherwise it is shrinked by theMax parameter.
6147
6148             Parameters:
6149                 theEdge the input edge to be resized.
6150                 theMin the minimal parameter value.
6151                 theMax the maximal parameter value.
6152                 theName Object name; when specified, this parameter is used
6153                         for result publication in the study. Otherwise, if automatic
6154                         publication is switched on, default value is used for result name.
6155
6156             Returns:
6157                 New GEOM.GEOM_Object, containing the created edge.
6158             """
6159             theMin, theMax, Parameters = ParseParameters(theMin, theMax)
6160             anObj = self.ShapesOp.ExtendEdge(theEdge, theMin, theMax)
6161             RaiseIfFailed("ExtendEdge", self.ShapesOp)
6162             anObj.SetParameters(Parameters)
6163             self._autoPublish(anObj, theName, "edge")
6164             return anObj
6165
6166         ## Resize the input face with the new UMin, UMax, VMin and VMax
6167         #  parameters. The input face U and V parameters range is [0, 1]. If
6168         #  theUMin parameter is negative, the input face is extended, otherwise
6169         #  it is shrinked along U direction by theUMin parameter. If theUMax is
6170         #  greater than 1, the face is extended, otherwise it is shrinked along
6171         #  U direction by theUMax parameter. So as for theVMin, theVMax and
6172         #  V direction of the input face.
6173         #  @param theFace the input face to be resized.
6174         #  @param theUMin the minimal U parameter value.
6175         #  @param theUMax the maximal U parameter value.
6176         #  @param theVMin the minimal V parameter value.
6177         #  @param theVMax the maximal V parameter value.
6178         #  @param theName Object name; when specified, this parameter is used
6179         #         for result publication in the study. Otherwise, if automatic
6180         #         publication is switched on, default value is used for result name.
6181         #  @return New GEOM.GEOM_Object, containing the created face.
6182         #
6183         #  @ref tui_extend "Example"
6184         @ManageTransactions("ShapesOp")
6185         def ExtendFace(self, theFace, theUMin, theUMax,
6186                        theVMin, theVMax, theName=None):
6187             """
6188             Resize the input face with the new UMin, UMax, VMin and VMax
6189             parameters. The input face U and V parameters range is [0, 1]. If
6190             theUMin parameter is negative, the input face is extended, otherwise
6191             it is shrinked along U direction by theUMin parameter. If theUMax is
6192             greater than 1, the face is extended, otherwise it is shrinked along
6193             U direction by theUMax parameter. So as for theVMin, theVMax and
6194             V direction of the input face.
6195
6196             Parameters:
6197                 theFace the input face to be resized.
6198                 theUMin the minimal U parameter value.
6199                 theUMax the maximal U parameter value.
6200                 theVMin the minimal V parameter value.
6201                 theVMax the maximal V parameter value.
6202                 theName Object name; when specified, this parameter is used
6203                         for result publication in the study. Otherwise, if automatic
6204                         publication is switched on, default value is used for result name.
6205
6206             Returns:
6207                 New GEOM.GEOM_Object, containing the created face.
6208             """
6209             theUMin, theUMax, theVMin, theVMax, Parameters = ParseParameters(theUMin, theUMax, theVMin, theVMax)
6210             anObj = self.ShapesOp.ExtendFace(theFace, theUMin, theUMax,
6211                                              theVMin, theVMax)
6212             RaiseIfFailed("ExtendFace", self.ShapesOp)
6213             anObj.SetParameters(Parameters)
6214             self._autoPublish(anObj, theName, "face")
6215             return anObj
6216
6217         ## This function takes some face as input parameter and creates new
6218         #  GEOM_Object, i.e. topological shape by extracting underlying surface
6219         #  of the source face and limiting it by the Umin, Umax, Vmin, Vmax
6220         #  parameters of the source face (in the parametrical space).
6221         #  @param theFace the input face.
6222         #  @param theName Object name; when specified, this parameter is used
6223         #         for result publication in the study. Otherwise, if automatic
6224         #         publication is switched on, default value is used for result name.
6225         #  @return New GEOM.GEOM_Object, containing the created face.
6226         #
6227         #  @ref tui_creation_surface "Example"
6228         @ManageTransactions("ShapesOp")
6229         def MakeSurfaceFromFace(self, theFace, theName=None):
6230             """
6231             This function takes some face as input parameter and creates new
6232             GEOM_Object, i.e. topological shape by extracting underlying surface
6233             of the source face and limiting it by the Umin, Umax, Vmin, Vmax
6234             parameters of the source face (in the parametrical space).
6235
6236             Parameters:
6237                 theFace the input face.
6238                 theName Object name; when specified, this parameter is used
6239                         for result publication in the study. Otherwise, if automatic
6240                         publication is switched on, default value is used for result name.
6241
6242             Returns:
6243                 New GEOM.GEOM_Object, containing the created face.
6244             """
6245             anObj = self.ShapesOp.MakeSurfaceFromFace(theFace)
6246             RaiseIfFailed("MakeSurfaceFromFace", self.ShapesOp)
6247             self._autoPublish(anObj, theName, "surface")
6248             return anObj
6249
6250         # end of l4_obtain
6251         ## @}
6252
6253         ## @addtogroup l4_access
6254         ## @{
6255
6256         ## Obtain a composite sub-shape of <VAR>aShape</VAR>, composed from sub-shapes
6257         #  of aShape, selected by their unique IDs inside <VAR>aShape</VAR>
6258         #  @param aShape Shape to get sub-shape of.
6259         #  @param ListOfID List of sub-shapes indices.
6260         #  @param theName Object name; when specified, this parameter is used
6261         #         for result publication in the study. Otherwise, if automatic
6262         #         publication is switched on, default value is used for result name.
6263         #
6264         #  @return Found sub-shape.
6265         #
6266         #  @ref swig_all_decompose "Example"
6267         def GetSubShape(self, aShape, ListOfID, theName=None):
6268             """
6269             Obtain a composite sub-shape of aShape, composed from sub-shapes
6270             of aShape, selected by their unique IDs inside aShape
6271
6272             Parameters:
6273                 aShape Shape to get sub-shape of.
6274                 ListOfID List of sub-shapes indices.
6275                 theName Object name; when specified, this parameter is used
6276                         for result publication in the study. Otherwise, if automatic
6277                         publication is switched on, default value is used for result name.
6278
6279             Returns:
6280                 Found sub-shape.
6281             """
6282             # Example: see GEOM_TestAll.py
6283             anObj = self.AddSubShape(aShape,ListOfID)
6284             self._autoPublish(anObj, theName, "subshape")
6285             return anObj
6286
6287         ## Obtain unique ID of sub-shape <VAR>aSubShape</VAR> inside <VAR>aShape</VAR>
6288         #  of aShape, selected by their unique IDs inside <VAR>aShape</VAR>
6289         #  @param aShape Shape to get sub-shape of.
6290         #  @param aSubShape Sub-shapes of aShape.
6291         #  @return ID of found sub-shape.
6292         #
6293         #  @ref swig_all_decompose "Example"
6294         @ManageTransactions("LocalOp")
6295         def GetSubShapeID(self, aShape, aSubShape):
6296             """
6297             Obtain unique ID of sub-shape aSubShape inside aShape
6298             of aShape, selected by their unique IDs inside aShape
6299
6300             Parameters:
6301                aShape Shape to get sub-shape of.
6302                aSubShape Sub-shapes of aShape.
6303
6304             Returns:
6305                ID of found sub-shape.
6306             """
6307             # Example: see GEOM_TestAll.py
6308             anID = self.LocalOp.GetSubShapeIndex(aShape, aSubShape)
6309             RaiseIfFailed("GetSubShapeIndex", self.LocalOp)
6310             return anID
6311
6312         ## Obtain unique IDs of sub-shapes <VAR>aSubShapes</VAR> inside <VAR>aShape</VAR>
6313         #  This function is provided for performance purpose. The complexity is O(n) with n
6314         #  the number of subobjects of aShape
6315         #  @param aShape Shape to get sub-shape of.
6316         #  @param aSubShapes Sub-shapes of aShape.
6317         #  @return list of IDs of found sub-shapes.
6318         #
6319         #  @ref swig_all_decompose "Example"
6320         @ManageTransactions("ShapesOp")
6321         def GetSubShapesIDs(self, aShape, aSubShapes):
6322             """
6323             Obtain a list of IDs of sub-shapes aSubShapes inside aShape
6324             This function is provided for performance purpose. The complexity is O(n) with n
6325             the number of subobjects of aShape
6326
6327             Parameters:
6328                aShape Shape to get sub-shape of.
6329                aSubShapes Sub-shapes of aShape.
6330
6331             Returns:
6332                List of IDs of found sub-shape.
6333             """
6334             # Example: see GEOM_TestAll.py
6335             anIDs = self.ShapesOp.GetSubShapesIndices(aShape, aSubShapes)
6336             RaiseIfFailed("GetSubShapesIndices", self.ShapesOp)
6337             return anIDs
6338
6339         # end of l4_access
6340         ## @}
6341
6342         ## @addtogroup l4_decompose
6343         ## @{
6344
6345         ## Get all sub-shapes and groups of \a theShape,
6346         #  that were created already by any other methods.
6347         #  @param theShape Any shape.
6348         #  @param theGroupsOnly If this parameter is TRUE, only groups will be
6349         #                       returned, else all found sub-shapes and groups.
6350         #  @return List of existing sub-objects of \a theShape.
6351         #
6352         #  @ref swig_all_decompose "Example"
6353         @ManageTransactions("ShapesOp")
6354         def GetExistingSubObjects(self, theShape, theGroupsOnly = False):
6355             """
6356             Get all sub-shapes and groups of theShape,
6357             that were created already by any other methods.
6358
6359             Parameters:
6360                 theShape Any shape.
6361                 theGroupsOnly If this parameter is TRUE, only groups will be
6362                                  returned, else all found sub-shapes and groups.
6363
6364             Returns:
6365                 List of existing sub-objects of theShape.
6366             """
6367             # Example: see GEOM_TestAll.py
6368             ListObj = self.ShapesOp.GetExistingSubObjects(theShape, theGroupsOnly)
6369             RaiseIfFailed("GetExistingSubObjects", self.ShapesOp)
6370             return ListObj
6371
6372         ## Get all groups of \a theShape,
6373         #  that were created already by any other methods.
6374         #  @param theShape Any shape.
6375         #  @return List of existing groups of \a theShape.
6376         #
6377         #  @ref swig_all_decompose "Example"
6378         @ManageTransactions("ShapesOp")
6379         def GetGroups(self, theShape):
6380             """
6381             Get all groups of theShape,
6382             that were created already by any other methods.
6383
6384             Parameters:
6385                 theShape Any shape.
6386
6387             Returns:
6388                 List of existing groups of theShape.
6389             """
6390             # Example: see GEOM_TestAll.py
6391             ListObj = self.ShapesOp.GetExistingSubObjects(theShape, True)
6392             RaiseIfFailed("GetExistingSubObjects", self.ShapesOp)
6393             return ListObj
6394
6395         ## Explode a shape on sub-shapes of a given type.
6396         #  If the shape itself matches the type, it is also returned.
6397         #  @param aShape Shape to be exploded.
6398         #  @param aType Type of sub-shapes to be retrieved (see ShapeType())
6399         #  @param theName Object name; when specified, this parameter is used
6400         #         for result publication in the study. Otherwise, if automatic
6401         #         publication is switched on, default value is used for result name.
6402         #
6403         #  @return List of sub-shapes of type theShapeType, contained in theShape.
6404         #
6405         #  @ref swig_all_decompose "Example"
6406         @ManageTransactions("ShapesOp")
6407         def SubShapeAll(self, aShape, aType, theName=None):
6408             """
6409             Explode a shape on sub-shapes of a given type.
6410             If the shape itself matches the type, it is also returned.
6411
6412             Parameters:
6413                 aShape Shape to be exploded.
6414                 aType Type of sub-shapes to be retrieved (see geompy.ShapeType)
6415                 theName Object name; when specified, this parameter is used
6416                         for result publication in the study. Otherwise, if automatic
6417                         publication is switched on, default value is used for result name.
6418
6419             Returns:
6420                 List of sub-shapes of type theShapeType, contained in theShape.
6421             """
6422             # Example: see GEOM_TestAll.py
6423             ListObj = self.ShapesOp.MakeAllSubShapes(aShape, EnumToLong( aType ), False)
6424             RaiseIfFailed("SubShapeAll", self.ShapesOp)
6425             self._autoPublish(ListObj, theName, "subshape")
6426             return ListObj
6427
6428         ## Explode a shape on sub-shapes of a given type.
6429         #  @param aShape Shape to be exploded.
6430         #  @param aType Type of sub-shapes to be retrieved (see ShapeType())
6431         #  @return List of IDs of sub-shapes.
6432         #
6433         #  @ref swig_all_decompose "Example"
6434         @ManageTransactions("ShapesOp")
6435         def SubShapeAllIDs(self, aShape, aType):
6436             """
6437             Explode a shape on sub-shapes of a given type.
6438
6439             Parameters:
6440                 aShape Shape to be exploded (see geompy.ShapeType)
6441                 aType Type of sub-shapes to be retrieved (see geompy.ShapeType)
6442
6443             Returns:
6444                 List of IDs of sub-shapes.
6445             """
6446             ListObj = self.ShapesOp.GetAllSubShapesIDs(aShape, EnumToLong( aType ), False)
6447             RaiseIfFailed("SubShapeAllIDs", self.ShapesOp)
6448             return ListObj
6449
6450         ## Obtain a compound of sub-shapes of <VAR>aShape</VAR>,
6451         #  selected by their indices in list of all sub-shapes of type <VAR>aType</VAR>.
6452         #  Each index is in range [1, Nb_Sub-Shapes_Of_Given_Type]
6453         #  @param aShape Shape to get sub-shape of.
6454         #  @param ListOfInd List of sub-shapes indices.
6455         #  @param aType Type of sub-shapes to be retrieved (see ShapeType())
6456         #  @param theName Object name; when specified, this parameter is used
6457         #         for result publication in the study. Otherwise, if automatic
6458         #         publication is switched on, default value is used for result name.
6459         #
6460         #  @return A compound of sub-shapes of aShape.
6461         #
6462         #  @ref swig_all_decompose "Example"
6463         def SubShape(self, aShape, aType, ListOfInd, theName=None):
6464             """
6465             Obtain a compound of sub-shapes of aShape,
6466             selected by their indices in list of all sub-shapes of type aType.
6467             Each index is in range [1, Nb_Sub-Shapes_Of_Given_Type]
6468
6469             Parameters:
6470                 aShape Shape to get sub-shape of.
6471                 ListOfID List of sub-shapes indices.
6472                 aType Type of sub-shapes to be retrieved (see geompy.ShapeType)
6473                 theName Object name; when specified, this parameter is used
6474                         for result publication in the study. Otherwise, if automatic
6475                         publication is switched on, default value is used for result name.
6476
6477             Returns:
6478                 A compound of sub-shapes of aShape.
6479             """
6480             # Example: see GEOM_TestAll.py
6481             ListOfIDs = []
6482             AllShapeIDsList = self.SubShapeAllIDs(aShape, EnumToLong( aType ))
6483             for ind in ListOfInd:
6484                 ListOfIDs.append(AllShapeIDsList[ind - 1])
6485             # note: auto-publishing is done in self.GetSubShape()
6486             anObj = self.GetSubShape(aShape, ListOfIDs, theName)
6487             return anObj
6488
6489         ## Explode a shape on sub-shapes of a given type.
6490         #  Sub-shapes will be sorted taking into account their gravity centers,
6491         #  to provide stable order of sub-shapes. Please see
6492         #  @ref sorting_shapes_page "Description of Sorting Shapes Algorithm".
6493         #  If the shape itself matches the type, it is also returned.
6494         #  @param aShape Shape to be exploded.
6495         #  @param aType Type of sub-shapes to be retrieved (see ShapeType())
6496         #  @param theName Object name; when specified, this parameter is used
6497         #         for result publication in the study. Otherwise, if automatic
6498         #         publication is switched on, default value is used for result name.
6499         #
6500         #  @return List of sub-shapes of type theShapeType, contained in theShape.
6501         #
6502         #  @ref swig_SubShapeAllSorted "Example"
6503         @ManageTransactions("ShapesOp")
6504         def SubShapeAllSortedCentres(self, aShape, aType, theName=None):
6505             """
6506             Explode a shape on sub-shapes of a given type.
6507             Sub-shapes will be sorted taking into account their gravity centers,
6508             to provide stable order of sub-shapes.
6509             If the shape itself matches the type, it is also returned.
6510
6511             Parameters:
6512                 aShape Shape to be exploded.
6513                 aType Type of sub-shapes to be retrieved (see geompy.ShapeType)
6514                 theName Object name; when specified, this parameter is used
6515                         for result publication in the study. Otherwise, if automatic
6516                         publication is switched on, default value is used for result name.
6517
6518             Returns:
6519                 List of sub-shapes of type theShapeType, contained in theShape.
6520             """
6521             # Example: see GEOM_TestAll.py
6522             ListObj = self.ShapesOp.MakeAllSubShapes(aShape, EnumToLong( aType ), True)
6523             RaiseIfFailed("SubShapeAllSortedCentres", self.ShapesOp)
6524             self._autoPublish(ListObj, theName, "subshape")
6525             return ListObj
6526
6527         ## Explode a shape on sub-shapes of a given type.
6528         #  Sub-shapes will be sorted taking into account their gravity centers,
6529         #  to provide stable order of sub-shapes. Please see
6530         #  @ref sorting_shapes_page "Description of Sorting Shapes Algorithm".
6531         #  @param aShape Shape to be exploded.
6532         #  @param aType Type of sub-shapes to be retrieved (see ShapeType())
6533         #  @return List of IDs of sub-shapes.
6534         #
6535         #  @ref swig_all_decompose "Example"
6536         @ManageTransactions("ShapesOp")
6537         def SubShapeAllSortedCentresIDs(self, aShape, aType):
6538             """
6539             Explode a shape on sub-shapes of a given type.
6540             Sub-shapes will be sorted taking into account their gravity centers,
6541             to provide stable order of sub-shapes.
6542
6543             Parameters:
6544                 aShape Shape to be exploded.
6545                 aType Type of sub-shapes to be retrieved (see geompy.ShapeType)
6546
6547             Returns:
6548                 List of IDs of sub-shapes.
6549             """
6550             ListIDs = self.ShapesOp.GetAllSubShapesIDs(aShape, EnumToLong( aType ), True)
6551             RaiseIfFailed("SubShapeAllIDs", self.ShapesOp)
6552             return ListIDs
6553
6554         ## Obtain a compound of sub-shapes of <VAR>aShape</VAR>,
6555         #  selected by they indices in sorted list of all sub-shapes of type <VAR>aType</VAR>.
6556         #  Please see @ref sorting_shapes_page "Description of Sorting Shapes Algorithm".
6557         #  Each index is in range [1, Nb_Sub-Shapes_Of_Given_Type]
6558         #  @param aShape Shape to get sub-shape of.
6559         #  @param ListOfInd List of sub-shapes indices.
6560         #  @param aType Type of sub-shapes to be retrieved (see ShapeType())
6561         #  @param theName Object name; when specified, this parameter is used
6562         #         for result publication in the study. Otherwise, if automatic
6563         #         publication is switched on, default value is used for result name.
6564         #
6565         #  @return A compound of sub-shapes of aShape.
6566         #
6567         #  @ref swig_all_decompose "Example"
6568         def SubShapeSortedCentres(self, aShape, aType, ListOfInd, theName=None):
6569             """
6570             Obtain a compound of sub-shapes of aShape,
6571             selected by they indices in sorted list of all sub-shapes of type aType.
6572             Each index is in range [1, Nb_Sub-Shapes_Of_Given_Type]
6573
6574             Parameters:
6575                 aShape Shape to get sub-shape of.
6576                 ListOfID List of sub-shapes indices.
6577                 aType Type of sub-shapes to be retrieved (see geompy.ShapeType)
6578                 theName Object name; when specified, this parameter is used
6579                         for result publication in the study. Otherwise, if automatic
6580                         publication is switched on, default value is used for result name.
6581
6582             Returns:
6583                 A compound of sub-shapes of aShape.
6584             """
6585             # Example: see GEOM_TestAll.py
6586             ListOfIDs = []
6587             AllShapeIDsList = self.SubShapeAllSortedCentresIDs(aShape, EnumToLong( aType ))
6588             for ind in ListOfInd:
6589                 ListOfIDs.append(AllShapeIDsList[ind - 1])
6590             # note: auto-publishing is done in self.GetSubShape()
6591             anObj = self.GetSubShape(aShape, ListOfIDs, theName)
6592             return anObj
6593
6594         ## Extract shapes (excluding the main shape) of given type.
6595         #  @param aShape The shape.
6596         #  @param aType  The shape type (see ShapeType())
6597         #  @param isSorted Boolean flag to switch sorting on/off. Please see
6598         #         @ref sorting_shapes_page "Description of Sorting Shapes Algorithm".
6599         #  @param theName Object name; when specified, this parameter is used
6600         #         for result publication in the study. Otherwise, if automatic
6601         #         publication is switched on, default value is used for result name.
6602         #
6603         #  @return List of sub-shapes of type aType, contained in aShape.
6604         #
6605         #  @ref swig_FilletChamfer "Example"
6606         @ManageTransactions("ShapesOp")
6607         def ExtractShapes(self, aShape, aType, isSorted = False, theName=None):
6608             """
6609             Extract shapes (excluding the main shape) of given type.
6610
6611             Parameters:
6612                 aShape The shape.
6613                 aType  The shape type (see geompy.ShapeType)
6614                 isSorted Boolean flag to switch sorting on/off.
6615                 theName Object name; when specified, this parameter is used
6616                         for result publication in the study. Otherwise, if automatic
6617                         publication is switched on, default value is used for result name.
6618
6619             Returns:
6620                 List of sub-shapes of type aType, contained in aShape.
6621             """
6622             # Example: see GEOM_TestAll.py
6623             ListObj = self.ShapesOp.ExtractSubShapes(aShape, EnumToLong( aType ), isSorted)
6624             RaiseIfFailed("ExtractSubShapes", self.ShapesOp)
6625             self._autoPublish(ListObj, theName, "subshape")
6626             return ListObj
6627
6628         ## Get a set of sub-shapes defined by their unique IDs inside <VAR>aShape</VAR>
6629         #  @param aShape Main shape.
6630         #  @param anIDs List of unique IDs of sub-shapes inside <VAR>aShape</VAR>.
6631         #  @param theName Object name; when specified, this parameter is used
6632         #         for result publication in the study. Otherwise, if automatic
6633         #         publication is switched on, default value is used for result name.
6634         #  @return List of GEOM.GEOM_Object, corresponding to found sub-shapes.
6635         #
6636         #  @ref swig_all_decompose "Example"
6637         @ManageTransactions("ShapesOp")
6638         def SubShapes(self, aShape, anIDs, theName=None):
6639             """
6640             Get a set of sub-shapes defined by their unique IDs inside theMainShape
6641
6642             Parameters:
6643                 aShape Main shape.
6644                 anIDs List of unique IDs of sub-shapes inside theMainShape.
6645                 theName Object name; when specified, this parameter is used
6646                         for result publication in the study. Otherwise, if automatic
6647                         publication is switched on, default value is used for result name.
6648
6649             Returns:
6650                 List of GEOM.GEOM_Object, corresponding to found sub-shapes.
6651             """
6652             # Example: see GEOM_TestAll.py
6653             ListObj = self.ShapesOp.MakeSubShapes(aShape, anIDs)
6654             RaiseIfFailed("SubShapes", self.ShapesOp)
6655             self._autoPublish(ListObj, theName, "subshape")
6656             return ListObj
6657
6658         ## Explode a shape into edges sorted in a row from a starting point.
6659         #  @param theShape the shape to be exploded on edges.
6660         #  @param theStartPoint the starting point.
6661         #  @param theName Object name; when specified, this parameter is used
6662         #         for result publication in the study. Otherwise, if automatic
6663         #         publication is switched on, default value is used for result name.
6664         #  @return List of GEOM.GEOM_Object that is actually an ordered list
6665         #          of edges sorted in a row from a starting point.
6666         #
6667         #  @ref swig_GetSubShapeEdgeSorted "Example"
6668         @ManageTransactions("ShapesOp")
6669         def GetSubShapeEdgeSorted(self, theShape, theStartPoint, theName=None):
6670             """
6671             Explode a shape into edges sorted in a row from a starting point.
6672
6673             Parameters:
6674                 theShape the shape to be exploded on edges.
6675                 theStartPoint the starting point.
6676                 theName Object name; when specified, this parameter is used
6677                         for result publication in the study. Otherwise, if automatic
6678                         publication is switched on, default value is used for result name.
6679
6680             Returns:
6681                 List of GEOM.GEOM_Object that is actually an ordered list
6682                 of edges sorted in a row from a starting point.
6683             """
6684             # Example: see GEOM_TestAll.py
6685             ListObj = self.ShapesOp.GetSubShapeEdgeSorted(theShape, theStartPoint)
6686             RaiseIfFailed("GetSubShapeEdgeSorted", self.ShapesOp)
6687             self._autoPublish(ListObj, theName, "SortedEdges")
6688             return ListObj
6689
6690         ##
6691         # Return the list of subshapes that satisfies a certain tolerance
6692         # criterion. The user defines the type of shapes to be returned, the
6693         # condition and the tolerance value. The operation is defined for
6694         # faces, edges and vertices only. E.g. for theShapeType FACE,
6695         # theCondition GEOM::CC_GT and theTolerance 1.e-7 this method returns
6696         # all faces of theShape that have tolerances greater then 1.e7.
6697         #
6698         #  @param theShape the shape to be exploded
6699         #  @param theShapeType the type of sub-shapes to be returned (see
6700         #         ShapeType()). Can have the values FACE, EDGE and VERTEX only.
6701         #  @param theCondition the condition type (see GEOM::comparison_condition).
6702         #  @param theTolerance the tolerance filter.
6703         #  @param theName Object name; when specified, this parameter is used
6704         #         for result publication in the study. Otherwise, if automatic
6705         #         publication is switched on, default value is used for result name.
6706         #  @return the list of shapes that satisfy the conditions.
6707         #
6708         #  @ref swig_GetSubShapesWithTolerance "Example"
6709         @ManageTransactions("ShapesOp")
6710         def GetSubShapesWithTolerance(self, theShape, theShapeType,
6711                                       theCondition, theTolerance, theName=None):
6712             """
6713             Return the list of subshapes that satisfies a certain tolerance
6714             criterion. The user defines the type of shapes to be returned, the
6715             condition and the tolerance value. The operation is defined for
6716             faces, edges and vertices only. E.g. for theShapeType FACE,
6717             theCondition GEOM::CC_GT and theTolerance 1.e-7 this method returns
6718             all faces of theShape that have tolerances greater then 1.e7.
6719             
6720             Parameters:
6721                 theShape the shape to be exploded
6722                 theShapeType the type of sub-shapes to be returned (see
6723                              ShapeType()). Can have the values FACE,
6724                              EDGE and VERTEX only.
6725                 theCondition the condition type (see GEOM::comparison_condition).
6726                 theTolerance the tolerance filter.
6727                 theName Object name; when specified, this parameter is used
6728                         for result publication in the study. Otherwise, if automatic
6729                         publication is switched on, default value is used for result name.
6730
6731             Returns:
6732                 The list of shapes that satisfy the conditions.
6733             """
6734             # Example: see GEOM_TestAll.py
6735             ListObj = self.ShapesOp.GetSubShapesWithTolerance(theShape, EnumToLong(theShapeType),
6736                                                               theCondition, theTolerance)
6737             RaiseIfFailed("GetSubShapesWithTolerance", self.ShapesOp)
6738             self._autoPublish(ListObj, theName, "SubShapeWithTolerance")
6739             return ListObj
6740
6741         ## Check if the object is a sub-object of another GEOM object.
6742         #  @param aSubObject Checked sub-object (or its parent object, in case if
6743         #         \a theSubObjectIndex is non-zero).
6744         #  @param anObject An object that is checked for ownership (or its parent object,
6745         #         in case if \a theObjectIndex is non-zero).
6746         #  @param aSubObjectIndex When non-zero, specifies a sub-shape index that
6747         #         identifies a sub-object within its parent specified via \a theSubObject.
6748         #  @param anObjectIndex When non-zero, specifies a sub-shape index that
6749         #         identifies an object within its parent specified via \a theObject.
6750         #  @return TRUE, if the given object contains sub-object.
6751         @ManageTransactions("ShapesOp")
6752         def IsSubShapeBelongsTo(self, aSubObject, anObject, aSubObjectIndex = 0, anObjectIndex = 0):
6753             """
6754             Check if the object is a sub-object of another GEOM object.
6755             
6756             Parameters:
6757                 aSubObject Checked sub-object (or its parent object, in case if
6758                     \a theSubObjectIndex is non-zero).
6759                 anObject An object that is checked for ownership (or its parent object,
6760                     in case if \a theObjectIndex is non-zero).
6761                 aSubObjectIndex When non-zero, specifies a sub-shape index that
6762                     identifies a sub-object within its parent specified via \a theSubObject.
6763                 anObjectIndex When non-zero, specifies a sub-shape index that
6764                     identifies an object within its parent specified via \a theObject.
6765
6766             Returns
6767                 TRUE, if the given object contains sub-object.
6768             """
6769             IsOk = self.ShapesOp.IsSubShapeBelongsTo(aSubObject, aSubObjectIndex, anObject, anObjectIndex)
6770             RaiseIfFailed("IsSubShapeBelongsTo", self.ShapesOp)
6771             return IsOk
6772
6773         ## Perform extraction of sub-shapes from the main shape.
6774         #
6775         #  @param theShape the main shape
6776         #  @param theListOfID the list of sub-shape IDs to be extracted from
6777         #         the main shape.
6778         #  @return New GEOM.GEOM_Object, containing the shape without
6779         #          extracted sub-shapes.
6780         #
6781         #  @ref swig_MakeExtraction "Example"
6782         @ManageTransactions("ShapesOp")
6783         def MakeExtraction(self, theShape, theListOfID, theName=None):
6784             """
6785             Perform extraction of sub-shapes from the main shape.
6786
6787             Parameters:
6788                 theShape the main shape
6789                 theListOfID the list of sub-shape IDs to be extracted from
6790                             the main shape.
6791
6792             Returns
6793                 New GEOM.GEOM_Object, containing the shape without
6794                 extracted sub-shapes.
6795             """
6796             # Example: see GEOM_TestAll.py
6797             (anObj, aStat) = self.ShapesOp.MakeExtraction(theShape, theListOfID)
6798             RaiseIfFailed("MakeExtraction", self.ShapesOp)
6799             self._autoPublish(anObj, theName, "Extraction")
6800             return anObj
6801
6802         # end of l4_decompose
6803         ## @}
6804
6805         ## @addtogroup l4_decompose_d
6806         ## @{
6807
6808         ## Deprecated method
6809         #  It works like SubShapeAllSortedCentres(), but wrongly
6810         #  defines centres of faces, shells and solids.
6811         @ManageTransactions("ShapesOp")
6812         def SubShapeAllSorted(self, aShape, aType, theName=None):
6813             """
6814             Deprecated method
6815             It works like geompy.SubShapeAllSortedCentres, but wrongly
6816             defines centres of faces, shells and solids.
6817             """
6818             ListObj = self.ShapesOp.MakeExplode(aShape, EnumToLong( aType ), True)
6819             RaiseIfFailed("MakeExplode", self.ShapesOp)
6820             self._autoPublish(ListObj, theName, "subshape")
6821             return ListObj
6822
6823         ## Deprecated method
6824         #  It works like SubShapeAllSortedCentresIDs(), but wrongly
6825         #  defines centres of faces, shells and solids.
6826         @ManageTransactions("ShapesOp")
6827         def SubShapeAllSortedIDs(self, aShape, aType):
6828             """
6829             Deprecated method
6830             It works like geompy.SubShapeAllSortedCentresIDs, but wrongly
6831             defines centres of faces, shells and solids.
6832             """
6833             ListIDs = self.ShapesOp.SubShapeAllIDs(aShape, EnumToLong( aType ), True)
6834             RaiseIfFailed("SubShapeAllIDs", self.ShapesOp)
6835             return ListIDs
6836
6837         ## Deprecated method
6838         #  It works like SubShapeSortedCentres(), but has a bug
6839         #  (wrongly defines centres of faces, shells and solids).
6840         def SubShapeSorted(self, aShape, aType, ListOfInd, theName=None):
6841             """
6842             Deprecated method
6843             It works like geompy.SubShapeSortedCentres, but has a bug
6844             (wrongly defines centres of faces, shells and solids).
6845             """
6846             ListOfIDs = []
6847             AllShapeIDsList = self.SubShapeAllSortedIDs(aShape, EnumToLong( aType ))
6848             for ind in ListOfInd:
6849                 ListOfIDs.append(AllShapeIDsList[ind - 1])
6850             # note: auto-publishing is done in self.GetSubShape()
6851             anObj = self.GetSubShape(aShape, ListOfIDs, theName)
6852             return anObj
6853
6854         # end of l4_decompose_d
6855         ## @}
6856
6857         ## @addtogroup l3_healing
6858         ## @{
6859
6860         ## Apply a sequence of Shape Healing operators to the given object.
6861         #  @param theShape Shape to be processed.
6862         #  @param theOperators List of names of operators ("FixShape", "SplitClosedFaces", etc.).
6863         #  @param theParameters List of names of parameters
6864         #                    ("FixShape.Tolerance3d", "SplitClosedFaces.NbSplitPoints", etc.).
6865         #  @param theValues List of values of parameters, in the same order
6866         #                    as parameters are listed in <VAR>theParameters</VAR> list.
6867         #  @param theName Object name; when specified, this parameter is used
6868         #         for result publication in the study. Otherwise, if automatic
6869         #         publication is switched on, default value is used for result name.
6870         #
6871         #  <b> Operators and Parameters: </b> \n
6872         #
6873         #  * \b FixShape - corrects invalid shapes. \n
6874         #  - \b FixShape.Tolerance3d - work tolerance for detection of the problems and correction of them. \n
6875         #  - \b FixShape.MaxTolerance3d - maximal possible tolerance of the shape after correction. \n
6876         #
6877         #  * \b FixFaceSize - removes small faces, such as spots and strips.\n
6878         #  - \b FixFaceSize.Tolerance - defines minimum possible face size. \n
6879         #  - \b DropSmallEdges - removes edges, which merge with neighbouring edges. \n
6880         #  - \b DropSmallEdges.Tolerance3d - defines minimum possible distance between two parallel edges.\n
6881         #  - \b DropSmallSolids - either removes small solids or merges them with neighboring ones. \n
6882         #  - \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
6883         #  - \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
6884         #  - \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
6885         #
6886         #  * \b SplitAngle - splits faces based on conical surfaces, surfaces of revolution and cylindrical
6887         #    surfaces in segments using a certain angle. \n
6888         #  - \b SplitAngle.Angle - the central angle of the resulting segments (i.e. we obtain two segments
6889         #    if Angle=180, four if Angle=90, etc). \n
6890         #  - \b SplitAngle.MaxTolerance - maximum possible tolerance among the resulting segments.\n
6891         #
6892         #  * \b SplitClosedFaces - splits closed faces in segments.
6893         #    The number of segments depends on the number of splitting points.\n
6894         #  - \b SplitClosedFaces.NbSplitPoints - the number of splitting points.\n
6895         #
6896         #  * \b SplitContinuity - splits shapes to reduce continuities of curves and surfaces.\n
6897         #  - \b SplitContinuity.Tolerance3d - 3D tolerance for correction of geometry.\n
6898         #  - \b SplitContinuity.SurfaceContinuity - required continuity for surfaces.\n
6899         #  - \b SplitContinuity.CurveContinuity - required continuity for curves.\n
6900         #   This and the previous parameters can take the following values:\n
6901         #   \b Parametric \b Continuity \n
6902         #   \b C0 (Positional Continuity): curves are joined (the end positions of curves or surfaces
6903         #   are coincidental. The curves or surfaces may still meet at an angle, giving rise to a sharp corner or edge).\n
6904         #   \b C1 (Tangential Continuity): first derivatives are equal (the end vectors of curves or surfaces are parallel,
6905         #    ruling out sharp edges).\n
6906         #   \b C2 (Curvature Continuity): first and second derivatives are equal (the end vectors of curves or surfaces
6907         #       are of the same magnitude).\n
6908         #   \b CN N-th derivatives are equal (both the direction and the magnitude of the Nth derivatives of curves
6909         #    or surfaces (d/du C(u)) are the same at junction. \n
6910         #   \b Geometric \b Continuity \n
6911         #   \b G1: first derivatives are proportional at junction.\n
6912         #   The curve tangents thus have the same direction, but not necessarily the same magnitude.
6913         #      i.e., C1'(1) = (a,b,c) and C2'(0) = (k*a, k*b, k*c).\n
6914         #   \b G2: first and second derivatives are proportional at junction.
6915         #   As the names imply, geometric continuity requires the geometry to be continuous, while parametric
6916         #    continuity requires that the underlying parameterization was continuous as well.
6917         #   Parametric continuity of order n implies geometric continuity of order n, but not vice-versa.\n
6918         #
6919         #  * \b BsplineRestriction - converts curves and surfaces to Bsplines and processes them with the following parameters:\n
6920         #  - \b BSplineRestriction.SurfaceMode - approximation of surfaces if restriction is necessary.\n
6921         #  - \b BSplineRestriction.Curve3dMode - conversion of any 3D curve to BSpline and approximation.\n
6922         #  - \b BSplineRestriction.Curve2dMode - conversion of any 2D curve to BSpline and approximation.\n
6923         #  - \b BSplineRestriction.Tolerance3d - defines the possibility of surfaces and 3D curves approximation
6924         #       with the specified parameters.\n
6925         #  - \b BSplineRestriction.Tolerance2d - defines the possibility of surfaces and 2D curves approximation
6926         #       with the specified parameters.\n
6927         #  - \b BSplineRestriction.RequiredDegree - required degree of the resulting BSplines.\n
6928         #  - \b BSplineRestriction.RequiredNbSegments - required maximum number of segments of resultant BSplines.\n
6929         #  - \b BSplineRestriction.Continuity3d - continuity of the resulting surfaces and 3D curves.\n
6930         #  - \b BSplineRestriction.Continuity2d - continuity of the resulting 2D curves.\n
6931         #
6932         #  * \b ToBezier - converts curves and surfaces of any type to Bezier curves and surfaces.\n
6933         #  - \b ToBezier.SurfaceMode - if checked in, allows conversion of surfaces.\n
6934         #  - \b ToBezier.Curve3dMode - if checked in, allows conversion of 3D curves.\n
6935         #  - \b ToBezier.Curve2dMode - if checked in, allows conversion of 2D curves.\n
6936         #  - \b ToBezier.MaxTolerance - defines tolerance for detection and correction of problems.\n
6937         #
6938         #  * \b SameParameter - fixes edges of 2D and 3D curves not having the same parameter.\n
6939         #  - \b SameParameter.Tolerance3d - defines tolerance for fixing of edges.\n
6940         #
6941         #
6942         #  @return New GEOM.GEOM_Object, containing processed shape.
6943         #
6944         #  \n @ref tui_shape_processing "Example"
6945         @ManageTransactions("HealOp")
6946         def ProcessShape(self, theShape, theOperators, theParameters, theValues, theName=None):
6947             """
6948             Apply a sequence of Shape Healing operators to the given object.
6949
6950             Parameters:
6951                 theShape Shape to be processed.
6952                 theValues List of values of parameters, in the same order
6953                           as parameters are listed in theParameters list.
6954                 theOperators List of names of operators ('FixShape', 'SplitClosedFaces', etc.).
6955                 theParameters List of names of parameters
6956                               ('FixShape.Tolerance3d', 'SplitClosedFaces.NbSplitPoints', etc.).
6957                 theName Object name; when specified, this parameter is used
6958                         for result publication in the study. Otherwise, if automatic
6959                         publication is switched on, default value is used for result name.
6960
6961                 Operators and Parameters:
6962
6963                  * FixShape - corrects invalid shapes.
6964                      * FixShape.Tolerance3d - work tolerance for detection of the problems and correction of them.
6965                      * FixShape.MaxTolerance3d - maximal possible tolerance of the shape after correction.
6966                  * FixFaceSize - removes small faces, such as spots and strips.
6967                      * FixFaceSize.Tolerance - defines minimum possible face size.
6968                  * DropSmallEdges - removes edges, which merge with neighbouring edges.
6969                      * DropSmallEdges.Tolerance3d - defines minimum possible distance between two parallel edges.
6970                  * DropSmallSolids - either removes small solids or merges them with neighboring ones.
6971                      * 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.
6972                      * 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.
6973                      * 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.
6974
6975                  * SplitAngle - splits faces based on conical surfaces, surfaces of revolution and cylindrical surfaces
6976                                 in segments using a certain angle.
6977                      * SplitAngle.Angle - the central angle of the resulting segments (i.e. we obtain two segments
6978                                           if Angle=180, four if Angle=90, etc).
6979                      * SplitAngle.MaxTolerance - maximum possible tolerance among the resulting segments.
6980                  * SplitClosedFaces - splits closed faces in segments. The number of segments depends on the number of
6981                                       splitting points.
6982                      * SplitClosedFaces.NbSplitPoints - the number of splitting points.
6983                  * SplitContinuity - splits shapes to reduce continuities of curves and surfaces.
6984                      * SplitContinuity.Tolerance3d - 3D tolerance for correction of geometry.
6985                      * SplitContinuity.SurfaceContinuity - required continuity for surfaces.
6986                      * SplitContinuity.CurveContinuity - required continuity for curves.
6987                        This and the previous parameters can take the following values:
6988
6989                        Parametric Continuity:
6990                        C0 (Positional Continuity): curves are joined (the end positions of curves or surfaces are
6991                                                    coincidental. The curves or surfaces may still meet at an angle,
6992                                                    giving rise to a sharp corner or edge).
6993                        C1 (Tangential Continuity): first derivatives are equal (the end vectors of curves or surfaces
6994                                                    are parallel, ruling out sharp edges).
6995                        C2 (Curvature Continuity): first and second derivatives are equal (the end vectors of curves
6996                                                   or surfaces are of the same magnitude).
6997                        CN N-th derivatives are equal (both the direction and the magnitude of the Nth derivatives of
6998                           curves or surfaces (d/du C(u)) are the same at junction.
6999
7000                        Geometric Continuity:
7001                        G1: first derivatives are proportional at junction.
7002                            The curve tangents thus have the same direction, but not necessarily the same magnitude.
7003                            i.e., C1'(1) = (a,b,c) and C2'(0) = (k*a, k*b, k*c).
7004                        G2: first and second derivatives are proportional at junction. As the names imply,
7005                            geometric continuity requires the geometry to be continuous, while parametric continuity requires
7006                            that the underlying parameterization was continuous as well. Parametric continuity of order n implies
7007                            geometric continuity of order n, but not vice-versa.
7008                  * BsplineRestriction - converts curves and surfaces to Bsplines and processes them with the following parameters:
7009                      * BSplineRestriction.SurfaceMode - approximation of surfaces if restriction is necessary.
7010                      * BSplineRestriction.Curve3dMode - conversion of any 3D curve to BSpline and approximation.
7011                      * BSplineRestriction.Curve2dMode - conversion of any 2D curve to BSpline and approximation.
7012                      * BSplineRestriction.Tolerance3d - defines the possibility of surfaces and 3D curves approximation with
7013                                                         the specified parameters.
7014                      * BSplineRestriction.Tolerance2d - defines the possibility of surfaces and 2D curves approximation with
7015                                                         the specified parameters.
7016                      * BSplineRestriction.RequiredDegree - required degree of the resulting BSplines.
7017                      * BSplineRestriction.RequiredNbSegments - required maximum number of segments of resultant BSplines.
7018                      * BSplineRestriction.Continuity3d - continuity of the resulting surfaces and 3D curves.
7019                      * BSplineRestriction.Continuity2d - continuity of the resulting 2D curves.
7020                  * ToBezier - converts curves and surfaces of any type to Bezier curves and surfaces.
7021                      * ToBezier.SurfaceMode - if checked in, allows conversion of surfaces.
7022                      * ToBezier.Curve3dMode - if checked in, allows conversion of 3D curves.
7023                      * ToBezier.Curve2dMode - if checked in, allows conversion of 2D curves.
7024                      * ToBezier.MaxTolerance - defines tolerance for detection and correction of problems.
7025                  * SameParameter - fixes edges of 2D and 3D curves not having the same parameter.
7026                      * SameParameter.Tolerance3d - defines tolerance for fixing of edges.
7027
7028             Returns:
7029                 New GEOM.GEOM_Object, containing processed shape.
7030
7031             Note: For more information look through SALOME Geometry User's Guide->
7032                   -> Introduction to Geometry-> Repairing Operations-> Shape Processing
7033             """
7034             # Example: see GEOM_TestHealing.py
7035             theValues,Parameters = ParseList(theValues)
7036             anObj = self.HealOp.ProcessShape(theShape, theOperators, theParameters, theValues)
7037             # To avoid script failure in case of good argument shape
7038             if self.HealOp.GetErrorCode() == "ShHealOper_NotError_msg":
7039                 return theShape
7040             RaiseIfFailed("ProcessShape", self.HealOp)
7041             for string in (theOperators + theParameters):
7042                 Parameters = ":" + Parameters
7043                 pass
7044             anObj.SetParameters(Parameters)
7045             self._autoPublish(anObj, theName, "healed")
7046             return anObj
7047
7048         ## Remove faces from the given object (shape).
7049         #  @param theObject Shape to be processed.
7050         #  @param theFaces Indices of faces to be removed, if EMPTY then the method
7051         #                  removes ALL faces of the given object.
7052         #  @param theName Object name; when specified, this parameter is used
7053         #         for result publication in the study. Otherwise, if automatic
7054         #         publication is switched on, default value is used for result name.
7055         #
7056         #  @return New GEOM.GEOM_Object, containing processed shape.
7057         #
7058         #  @ref tui_suppress_faces "Example"
7059         @ManageTransactions("HealOp")
7060         def SuppressFaces(self, theObject, theFaces, theName=None):
7061             """
7062             Remove faces from the given object (shape).
7063
7064             Parameters:
7065                 theObject Shape to be processed.
7066                 theFaces Indices of faces to be removed, if EMPTY then the method
7067                          removes ALL faces of the given object.
7068                 theName Object name; when specified, this parameter is used
7069                         for result publication in the study. Otherwise, if automatic
7070                         publication is switched on, default value is used for result name.
7071
7072             Returns:
7073                 New GEOM.GEOM_Object, containing processed shape.
7074             """
7075             # Example: see GEOM_TestHealing.py
7076             anObj = self.HealOp.SuppressFaces(theObject, theFaces)
7077             RaiseIfFailed("SuppressFaces", self.HealOp)
7078             self._autoPublish(anObj, theName, "suppressFaces")
7079             return anObj
7080
7081         ## Sewing of faces into a single shell.
7082         #  @param ListShape Shapes to be processed.
7083         #  @param theTolerance Required tolerance value.
7084         #  @param AllowNonManifold Flag that allows non-manifold sewing.
7085         #  @param theName Object name; when specified, this parameter is used
7086         #         for result publication in the study. Otherwise, if automatic
7087         #         publication is switched on, default value is used for result name.
7088         #
7089         #  @return New GEOM.GEOM_Object, containing a result shell.
7090         #
7091         #  @ref tui_sewing "Example"
7092         def MakeSewing(self, ListShape, theTolerance, AllowNonManifold=False, theName=None):
7093             """
7094             Sewing of faces into a single shell.
7095
7096             Parameters:
7097                 ListShape Shapes to be processed.
7098                 theTolerance Required tolerance value.
7099                 AllowNonManifold Flag that allows non-manifold sewing.
7100                 theName Object name; when specified, this parameter is used
7101                         for result publication in the study. Otherwise, if automatic
7102                         publication is switched on, default value is used for result name.
7103
7104             Returns:
7105                 New GEOM.GEOM_Object, containing containing a result shell.
7106             """
7107             # Example: see GEOM_TestHealing.py
7108             # note: auto-publishing is done in self.Sew()
7109             anObj = self.Sew(ListShape, theTolerance, AllowNonManifold, theName)
7110             return anObj
7111
7112         ## Sewing of faces into a single shell.
7113         #  @param ListShape Shapes to be processed.
7114         #  @param theTolerance Required tolerance value.
7115         #  @param AllowNonManifold Flag that allows non-manifold sewing.
7116         #  @param theName Object name; when specified, this parameter is used
7117         #         for result publication in the study. Otherwise, if automatic
7118         #         publication is switched on, default value is used for result name.
7119         #
7120         #  @return New GEOM.GEOM_Object, containing a result shell.
7121         @ManageTransactions("HealOp")
7122         def Sew(self, ListShape, theTolerance, AllowNonManifold=False, theName=None):
7123             """
7124             Sewing of faces into a single shell.
7125
7126             Parameters:
7127                 ListShape Shapes to be processed.
7128                 theTolerance Required tolerance value.
7129                 AllowNonManifold Flag that allows non-manifold sewing.
7130                 theName Object name; when specified, this parameter is used
7131                         for result publication in the study. Otherwise, if automatic
7132                         publication is switched on, default value is used for result name.
7133
7134             Returns:
7135                 New GEOM.GEOM_Object, containing a result shell.
7136             """
7137             # Example: see MakeSewing() above
7138             theTolerance,Parameters = ParseParameters(theTolerance)
7139             if AllowNonManifold:
7140                 anObj = self.HealOp.SewAllowNonManifold( ToList( ListShape ), theTolerance)
7141             else:
7142                 anObj = self.HealOp.Sew( ToList( ListShape ), theTolerance)
7143             # To avoid script failure in case of good argument shape
7144             # (Fix of test cases geom/bugs11/L7,L8)
7145             if self.HealOp.GetErrorCode() == "ShHealOper_NotError_msg":
7146                 return anObj
7147             RaiseIfFailed("Sew", self.HealOp)
7148             anObj.SetParameters(Parameters)
7149             self._autoPublish(anObj, theName, "sewed")
7150             return anObj
7151
7152         ## Rebuild the topology of theSolids by removing
7153         #  the faces that are shared by several solids.
7154         #  @param theSolids A compound or a list of solids to be processed.
7155         #  @param theName Object name; when specified, this parameter is used
7156         #         for result publication in the study. Otherwise, if automatic
7157         #         publication is switched on, default value is used for result name.
7158         #
7159         #  @return New GEOM.GEOM_Object, containing processed shape.
7160         #
7161         #  @ref tui_remove_webs "Example"
7162         @ManageTransactions("HealOp")
7163         def RemoveInternalFaces (self, theSolids, theName=None):
7164             """
7165             Rebuild the topology of theSolids by removing
7166             the faces that are shared by several solids.
7167
7168             Parameters:
7169                 theSolids A compound or a list of solids to be processed.
7170                 theName Object name; when specified, this parameter is used
7171                         for result publication in the study. Otherwise, if automatic
7172                         publication is switched on, default value is used for result name.
7173
7174             Returns:
7175                 New GEOM.GEOM_Object, containing processed shape.
7176             """
7177             # Example: see GEOM_TestHealing.py
7178             anObj = self.HealOp.RemoveInternalFaces(ToList(theSolids))
7179             RaiseIfFailed("RemoveInternalFaces", self.HealOp)
7180             self._autoPublish(anObj, theName, "removeWebs")
7181             return anObj
7182
7183         ## Remove internal wires and edges from the given object (face).
7184         #  @param theObject Shape to be processed.
7185         #  @param theWires Indices of wires to be removed, if EMPTY then the method
7186         #                  removes ALL internal wires of the given object.
7187         #  @param theName Object name; when specified, this parameter is used
7188         #         for result publication in the study. Otherwise, if automatic
7189         #         publication is switched on, default value is used for result name.
7190         #
7191         #  @return New GEOM.GEOM_Object, containing processed shape.
7192         #
7193         #  @ref tui_suppress_internal_wires "Example"
7194         @ManageTransactions("HealOp")
7195         def SuppressInternalWires(self, theObject, theWires, theName=None):
7196             """
7197             Remove internal wires and edges from the given object (face).
7198
7199             Parameters:
7200                 theObject Shape to be processed.
7201                 theWires Indices of wires to be removed, if EMPTY then the method
7202                          removes ALL internal wires of the given object.
7203                 theName Object name; when specified, this parameter is used
7204                         for result publication in the study. Otherwise, if automatic
7205                         publication is switched on, default value is used for result name.
7206
7207             Returns:
7208                 New GEOM.GEOM_Object, containing processed shape.
7209             """
7210             # Example: see GEOM_TestHealing.py
7211             anObj = self.HealOp.RemoveIntWires(theObject, theWires)
7212             RaiseIfFailed("RemoveIntWires", self.HealOp)
7213             self._autoPublish(anObj, theName, "suppressWires")
7214             return anObj
7215
7216         ## Remove internal closed contours (holes) from the given object.
7217         #  @param theObject Shape to be processed.
7218         #  @param theWires Indices of wires to be removed, if EMPTY then the method
7219         #                  removes ALL internal holes of the given object
7220         #  @param theName Object name; when specified, this parameter is used
7221         #         for result publication in the study. Otherwise, if automatic
7222         #         publication is switched on, default value is used for result name.
7223         #
7224         #  @return New GEOM.GEOM_Object, containing processed shape.
7225         #
7226         #  @ref tui_suppress_holes "Example"
7227         @ManageTransactions("HealOp")
7228         def SuppressHoles(self, theObject, theWires, theName=None):
7229             """
7230             Remove internal closed contours (holes) from the given object.
7231
7232             Parameters:
7233                 theObject Shape to be processed.
7234                 theWires Indices of wires to be removed, if EMPTY then the method
7235                          removes ALL internal holes of the given object
7236                 theName Object name; when specified, this parameter is used
7237                         for result publication in the study. Otherwise, if automatic
7238                         publication is switched on, default value is used for result name.
7239
7240             Returns:
7241                 New GEOM.GEOM_Object, containing processed shape.
7242             """
7243             # Example: see GEOM_TestHealing.py
7244             anObj = self.HealOp.FillHoles(theObject, theWires)
7245             RaiseIfFailed("FillHoles", self.HealOp)
7246             self._autoPublish(anObj, theName, "suppressHoles")
7247             return anObj
7248
7249         ## Close an open wire.
7250         #  @param theObject Shape to be processed.
7251         #  @param theWires Indexes of edge(s) and wire(s) to be closed within <VAR>theObject</VAR>'s shape,
7252         #                  if [ ], then <VAR>theObject</VAR> itself is a wire.
7253         #  @param isCommonVertex If True  : closure by creation of a common vertex,
7254         #                        If False : closure by creation of an edge between ends.
7255         #  @param theName Object name; when specified, this parameter is used
7256         #         for result publication in the study. Otherwise, if automatic
7257         #         publication is switched on, default value is used for result name.
7258         #
7259         #  @return New GEOM.GEOM_Object, containing processed shape.
7260         #
7261         #  @ref tui_close_contour "Example"
7262         @ManageTransactions("HealOp")
7263         def CloseContour(self,theObject, theWires, isCommonVertex, theName=None):
7264             """
7265             Close an open wire.
7266
7267             Parameters:
7268                 theObject Shape to be processed.
7269                 theWires Indexes of edge(s) and wire(s) to be closed within theObject's shape,
7270                          if [ ], then theObject itself is a wire.
7271                 isCommonVertex If True  : closure by creation of a common vertex,
7272                                If False : closure by creation of an edge between ends.
7273                 theName Object name; when specified, this parameter is used
7274                         for result publication in the study. Otherwise, if automatic
7275                         publication is switched on, default value is used for result name.
7276
7277             Returns:
7278                 New GEOM.GEOM_Object, containing processed shape.
7279             """
7280             # Example: see GEOM_TestHealing.py
7281             anObj = self.HealOp.CloseContour(theObject, theWires, isCommonVertex)
7282             RaiseIfFailed("CloseContour", self.HealOp)
7283             self._autoPublish(anObj, theName, "closeContour")
7284             return anObj
7285
7286         ## Addition of a point to a given edge object.
7287         #  @param theObject Shape to be processed.
7288         #  @param theEdgeIndex Index of edge to be divided within theObject's shape,
7289         #                      if -1, then theObject itself is the edge.
7290         #  @param theValue Value of parameter on edge or length parameter,
7291         #                  depending on \a isByParameter.
7292         #  @param isByParameter If TRUE : \a theValue is treated as a curve parameter [0..1], \n
7293         #                       if FALSE : \a theValue is treated as a length parameter [0..1]
7294         #  @param theName Object name; when specified, this parameter is used
7295         #         for result publication in the study. Otherwise, if automatic
7296         #         publication is switched on, default value is used for result name.
7297         #
7298         #  @return New GEOM.GEOM_Object, containing processed shape.
7299         #
7300         #  @ref tui_add_point_on_edge "Example"
7301         @ManageTransactions("HealOp")
7302         def DivideEdge(self, theObject, theEdgeIndex, theValue, isByParameter, theName=None):
7303             """
7304             Addition of a point to a given edge object.
7305
7306             Parameters:
7307                 theObject Shape to be processed.
7308                 theEdgeIndex Index of edge to be divided within theObject's shape,
7309                              if -1, then theObject itself is the edge.
7310                 theValue Value of parameter on edge or length parameter,
7311                          depending on isByParameter.
7312                 isByParameter If TRUE :  theValue is treated as a curve parameter [0..1],
7313                               if FALSE : theValue is treated as a length parameter [0..1]
7314                 theName Object name; when specified, this parameter is used
7315                         for result publication in the study. Otherwise, if automatic
7316                         publication is switched on, default value is used for result name.
7317
7318             Returns:
7319                 New GEOM.GEOM_Object, containing processed shape.
7320             """
7321             # Example: see GEOM_TestHealing.py
7322             theEdgeIndex,theValue,isByParameter,Parameters = ParseParameters(theEdgeIndex,theValue,isByParameter)
7323             anObj = self.HealOp.DivideEdge(theObject, theEdgeIndex, theValue, isByParameter)
7324             RaiseIfFailed("DivideEdge", self.HealOp)
7325             anObj.SetParameters(Parameters)
7326             self._autoPublish(anObj, theName, "divideEdge")
7327             return anObj
7328
7329         ## Addition of points to a given edge of \a theObject by projecting
7330         #  other points to the given edge.
7331         #  @param theObject Shape to be processed.
7332         #  @param theEdgeIndex Index of edge to be divided within theObject's shape,
7333         #                      if -1, then theObject itself is the edge.
7334         #  @param thePoints List of points to project to theEdgeIndex-th edge.
7335         #  @param theName Object name; when specified, this parameter is used
7336         #         for result publication in the study. Otherwise, if automatic
7337         #         publication is switched on, default value is used for result name.
7338         #
7339         #  @return New GEOM.GEOM_Object, containing processed shape.
7340         #
7341         #  @ref tui_add_point_on_edge "Example"
7342         @ManageTransactions("HealOp")
7343         def DivideEdgeByPoint(self, theObject, theEdgeIndex, thePoints, theName=None):
7344             """
7345             Addition of points to a given edge of \a theObject by projecting
7346             other points to the given edge.
7347
7348             Parameters:
7349                 theObject Shape to be processed.
7350                 theEdgeIndex The edge or its index to be divided within theObject's shape,
7351                              if -1, then theObject itself is the edge.
7352                 thePoints List of points to project to theEdgeIndex-th edge.
7353                 theName Object name; when specified, this parameter is used
7354                         for result publication in the study. Otherwise, if automatic
7355                         publication is switched on, default value is used for result name.
7356
7357             Returns:
7358                 New GEOM.GEOM_Object, containing processed shape.
7359             """
7360             # Example: see GEOM_TestHealing.py
7361             if isinstance( theEdgeIndex, GEOM._objref_GEOM_Object ):
7362                 theEdgeIndex = self.GetSubShapeID( theObject, theEdgeIndex )
7363             anObj = self.HealOp.DivideEdgeByPoint(theObject, theEdgeIndex, ToList( thePoints ))
7364             RaiseIfFailed("DivideEdgeByPoint", self.HealOp)
7365             self._autoPublish(anObj, theName, "divideEdge")
7366             return anObj
7367
7368         ## Suppress the vertices in the wire in case if adjacent edges are C1 continuous.
7369         #  @param theWire Wire to minimize the number of C1 continuous edges in.
7370         #  @param theVertices A list of vertices to suppress. If the list
7371         #                     is empty, all vertices in a wire will be assumed.
7372         #  @param theName Object name; when specified, this parameter is used
7373         #         for result publication in the study. Otherwise, if automatic
7374         #         publication is switched on, default value is used for result name.
7375         #
7376         #  @return New GEOM.GEOM_Object with modified wire.
7377         #
7378         #  @ref tui_fuse_collinear_edges "Example"
7379         @ManageTransactions("HealOp")
7380         def FuseCollinearEdgesWithinWire(self, theWire, theVertices = [], theName=None):
7381             """
7382             Suppress the vertices in the wire in case if adjacent edges are C1 continuous.
7383
7384             Parameters:
7385                 theWire Wire to minimize the number of C1 continuous edges in.
7386                 theVertices A list of vertices to suppress. If the list
7387                             is empty, all vertices in a wire will be assumed.
7388                 theName Object name; when specified, this parameter is used
7389                         for result publication in the study. Otherwise, if automatic
7390                         publication is switched on, default value is used for result name.
7391
7392             Returns:
7393                 New GEOM.GEOM_Object with modified wire.
7394             """
7395             anObj = self.HealOp.FuseCollinearEdgesWithinWire(theWire, theVertices)
7396             RaiseIfFailed("FuseCollinearEdgesWithinWire", self.HealOp)
7397             self._autoPublish(anObj, theName, "fuseEdges")
7398             return anObj
7399
7400         ## Change orientation of the given object. Updates given shape.
7401         #  @param theObject Shape to be processed.
7402         #  @return Updated <var>theObject</var>
7403         #
7404         #  @ref swig_todo "Example"
7405         @ManageTransactions("HealOp")
7406         def ChangeOrientationShell(self,theObject):
7407             """
7408             Change orientation of the given object. Updates given shape.
7409
7410             Parameters:
7411                 theObject Shape to be processed.
7412
7413             Returns:
7414                 Updated theObject
7415             """
7416             theObject = self.HealOp.ChangeOrientation(theObject)
7417             RaiseIfFailed("ChangeOrientation", self.HealOp)
7418             pass
7419
7420         ## Change orientation of the given object.
7421         #  @param theObject Shape to be processed.
7422         #  @param theName Object name; when specified, this parameter is used
7423         #         for result publication in the study. Otherwise, if automatic
7424         #         publication is switched on, default value is used for result name.
7425         #
7426         #  @return New GEOM.GEOM_Object, containing processed shape.
7427         #
7428         #  @ref swig_todo "Example"
7429         @ManageTransactions("HealOp")
7430         def ChangeOrientationShellCopy(self, theObject, theName=None):
7431             """
7432             Change orientation of the given object.
7433
7434             Parameters:
7435                 theObject Shape to be processed.
7436                 theName Object name; when specified, this parameter is used
7437                         for result publication in the study. Otherwise, if automatic
7438                         publication is switched on, default value is used for result name.
7439
7440             Returns:
7441                 New GEOM.GEOM_Object, containing processed shape.
7442             """
7443             anObj = self.HealOp.ChangeOrientationCopy(theObject)
7444             RaiseIfFailed("ChangeOrientationCopy", self.HealOp)
7445             self._autoPublish(anObj, theName, "reversed")
7446             return anObj
7447
7448         ## Try to limit tolerance of the given object by value \a theTolerance.
7449         #  @param theObject Shape to be processed.
7450         #  @param theTolerance Required tolerance value.
7451         #  @param theName Object name; when specified, this parameter is used
7452         #         for result publication in the study. Otherwise, if automatic
7453         #         publication is switched on, default value is used for result name.
7454         #
7455         #  @return New GEOM.GEOM_Object, containing processed shape.
7456         #
7457         #  @ref tui_limit_tolerance "Example"
7458         @ManageTransactions("HealOp")
7459         def LimitTolerance(self, theObject, theTolerance = 1e-07, theName=None):
7460             """
7461             Try to limit tolerance of the given object by value theTolerance.
7462
7463             Parameters:
7464                 theObject Shape to be processed.
7465                 theTolerance Required tolerance value.
7466                 theName Object name; when specified, this parameter is used
7467                         for result publication in the study. Otherwise, if automatic
7468                         publication is switched on, default value is used for result name.
7469
7470             Returns:
7471                 New GEOM.GEOM_Object, containing processed shape.
7472             """
7473             anObj = self.HealOp.LimitTolerance(theObject, theTolerance)
7474             RaiseIfFailed("LimitTolerance", self.HealOp)
7475             self._autoPublish(anObj, theName, "limitTolerance")
7476             return anObj
7477
7478         ## Get a list of wires (wrapped in GEOM.GEOM_Object-s),
7479         #  that constitute a free boundary of the given shape.
7480         #  @param theObject Shape to get free boundary of.
7481         #  @param theName Object name; when specified, this parameter is used
7482         #         for result publication in the study. Otherwise, if automatic
7483         #         publication is switched on, default value is used for result name.
7484         #
7485         #  @return [\a status, \a theClosedWires, \a theOpenWires]
7486         #  \n \a status: FALSE, if an error(s) occurred during the method execution.
7487         #  \n \a theClosedWires: Closed wires on the free boundary of the given shape.
7488         #  \n \a theOpenWires: Open wires on the free boundary of the given shape.
7489         #
7490         #  @ref tui_free_boundaries_page "Example"
7491         @ManageTransactions("HealOp")
7492         def GetFreeBoundary(self, theObject, theName=None):
7493             """
7494             Get a list of wires (wrapped in GEOM.GEOM_Object-s),
7495             that constitute a free boundary of the given shape.
7496
7497             Parameters:
7498                 theObject Shape to get free boundary of.
7499                 theName Object name; when specified, this parameter is used
7500                         for result publication in the study. Otherwise, if automatic
7501                         publication is switched on, default value is used for result name.
7502
7503             Returns:
7504                 [status, theClosedWires, theOpenWires]
7505                  status: FALSE, if an error(s) occurred during the method execution.
7506                  theClosedWires: Closed wires on the free boundary of the given shape.
7507                  theOpenWires: Open wires on the free boundary of the given shape.
7508             """
7509             # Example: see GEOM_TestHealing.py
7510             anObj = self.HealOp.GetFreeBoundary( ToList( theObject ))
7511             RaiseIfFailed("GetFreeBoundary", self.HealOp)
7512             self._autoPublish(anObj[1], theName, "closedWire")
7513             self._autoPublish(anObj[2], theName, "openWire")
7514             return anObj
7515
7516         ## Replace coincident faces in \a theShapes by one face.
7517         #  @param theShapes Initial shapes, either a list or compound of shapes.
7518         #  @param theTolerance Maximum distance between faces, which can be considered as coincident.
7519         #  @param doKeepNonSolids If FALSE, only solids will present in the result,
7520         #                         otherwise all initial shapes.
7521         #  @param theName Object name; when specified, this parameter is used
7522         #         for result publication in the study. Otherwise, if automatic
7523         #         publication is switched on, default value is used for result name.
7524         #
7525         #  @return New GEOM.GEOM_Object, containing copies of theShapes without coincident faces.
7526         #
7527         #  @ref tui_glue_faces "Example"
7528         @ManageTransactions("ShapesOp")
7529         def MakeGlueFaces(self, theShapes, theTolerance, doKeepNonSolids=True, theName=None):
7530             """
7531             Replace coincident faces in theShapes by one face.
7532
7533             Parameters:
7534                 theShapes Initial shapes, either a list or compound of shapes.
7535                 theTolerance Maximum distance between faces, which can be considered as coincident.
7536                 doKeepNonSolids If FALSE, only solids will present in the result,
7537                                 otherwise all initial shapes.
7538                 theName Object name; when specified, this parameter is used
7539                         for result publication in the study. Otherwise, if automatic
7540                         publication is switched on, default value is used for result name.
7541
7542             Returns:
7543                 New GEOM.GEOM_Object, containing copies of theShapes without coincident faces.
7544             """
7545             # Example: see GEOM_Spanner.py
7546             theTolerance,Parameters = ParseParameters(theTolerance)
7547             anObj = self.ShapesOp.MakeGlueFaces(ToList(theShapes), theTolerance, doKeepNonSolids)
7548             if anObj is None:
7549                 raise RuntimeError("MakeGlueFaces : " + self.ShapesOp.GetErrorCode())
7550             anObj.SetParameters(Parameters)
7551             self._autoPublish(anObj, theName, "glueFaces")
7552             return anObj
7553
7554         ## Find coincident faces in \a theShapes for possible gluing.
7555         #  @param theShapes Initial shapes, either a list or compound of shapes.
7556         #  @param theTolerance Maximum distance between faces,
7557         #                      which can be considered as coincident.
7558         #  @param theName Object name; when specified, this parameter is used
7559         #         for result publication in the study. Otherwise, if automatic
7560         #         publication is switched on, default value is used for result name.
7561         #
7562         #  @return GEOM.ListOfGO
7563         #
7564         #  @ref tui_glue_faces "Example"
7565         @ManageTransactions("ShapesOp")
7566         def GetGlueFaces(self, theShapes, theTolerance, theName=None):
7567             """
7568             Find coincident faces in theShapes for possible gluing.
7569
7570             Parameters:
7571                 theShapes Initial shapes, either a list or compound of shapes.
7572                 theTolerance Maximum distance between faces,
7573                              which can be considered as coincident.
7574                 theName Object name; when specified, this parameter is used
7575                         for result publication in the study. Otherwise, if automatic
7576                         publication is switched on, default value is used for result name.
7577
7578             Returns:
7579                 GEOM.ListOfGO
7580             """
7581             anObj = self.ShapesOp.GetGlueFaces(ToList(theShapes), theTolerance)
7582             RaiseIfFailed("GetGlueFaces", self.ShapesOp)
7583             self._autoPublish(anObj, theName, "facesToGlue")
7584             return anObj
7585
7586         ## Replace coincident faces in \a theShapes by one face
7587         #  in compliance with given list of faces
7588         #  @param theShapes Initial shapes, either a list or compound of shapes.
7589         #  @param theTolerance Maximum distance between faces,
7590         #                      which can be considered as coincident.
7591         #  @param theFaces List of faces for gluing.
7592         #  @param doKeepNonSolids If FALSE, only solids will present in the result,
7593         #                         otherwise all initial shapes.
7594         #  @param doGlueAllEdges If TRUE, all coincident edges of <VAR>theShape</VAR>
7595         #                        will be glued, otherwise only the edges,
7596         #                        belonging to <VAR>theFaces</VAR>.
7597         #  @param theName Object name; when specified, this parameter is used
7598         #         for result publication in the study. Otherwise, if automatic
7599         #         publication is switched on, default value is used for result name.
7600         #
7601         #  @return New GEOM.GEOM_Object, containing copies of theShapes without coincident faces.
7602         #
7603         #  @ref tui_glue_faces "Example"
7604         @ManageTransactions("ShapesOp")
7605         def MakeGlueFacesByList(self, theShapes, theTolerance, theFaces,
7606                                 doKeepNonSolids=True, doGlueAllEdges=True, theName=None):
7607             """
7608             Replace coincident faces in theShapes by one face
7609             in compliance with given list of faces
7610
7611             Parameters:
7612                 theShapes theShapes Initial shapes, either a list or compound of shapes.
7613                 theTolerance Maximum distance between faces,
7614                              which can be considered as coincident.
7615                 theFaces List of faces for gluing.
7616                 doKeepNonSolids If FALSE, only solids will present in the result,
7617                                 otherwise all initial shapes.
7618                 doGlueAllEdges If TRUE, all coincident edges of theShape
7619                                will be glued, otherwise only the edges,
7620                                belonging to theFaces.
7621                 theName Object name; when specified, this parameter is used
7622                         for result publication in the study. Otherwise, if automatic
7623                         publication is switched on, default value is used for result name.
7624
7625             Returns:
7626                 New GEOM.GEOM_Object, containing copies of theShapes without coincident faces.
7627             """
7628             anObj = self.ShapesOp.MakeGlueFacesByList(ToList(theShapes), theTolerance, ToList(theFaces),
7629                                                       doKeepNonSolids, doGlueAllEdges)
7630             if anObj is None:
7631                 raise RuntimeError("MakeGlueFacesByList : " + self.ShapesOp.GetErrorCode())
7632             self._autoPublish(anObj, theName, "glueFaces")
7633             return anObj
7634
7635         ## Replace coincident edges in \a theShapes by one edge.
7636         #  @param theShapes Initial shapes, either a list or compound of shapes.
7637         #  @param theTolerance Maximum distance between edges, which can be considered as coincident.
7638         #  @param theName Object name; when specified, this parameter is used
7639         #         for result publication in the study. Otherwise, if automatic
7640         #         publication is switched on, default value is used for result name.
7641         #
7642         #  @return New GEOM.GEOM_Object, containing copies of theShapes without coincident edges.
7643         #
7644         #  @ref tui_glue_edges "Example"
7645         @ManageTransactions("ShapesOp")
7646         def MakeGlueEdges(self, theShapes, theTolerance, theName=None):
7647             """
7648             Replace coincident edges in theShapes by one edge.
7649
7650             Parameters:
7651                 theShapes Initial shapes, either a list or compound of shapes.
7652                 theTolerance Maximum distance between edges, which can be considered as coincident.
7653                 theName Object name; when specified, this parameter is used
7654                         for result publication in the study. Otherwise, if automatic
7655                         publication is switched on, default value is used for result name.
7656
7657             Returns:
7658                 New GEOM.GEOM_Object, containing copies of theShapes without coincident edges.
7659             """
7660             theTolerance,Parameters = ParseParameters(theTolerance)
7661             anObj = self.ShapesOp.MakeGlueEdges(ToList(theShapes), theTolerance)
7662             if anObj is None:
7663                 raise RuntimeError("MakeGlueEdges : " + self.ShapesOp.GetErrorCode())
7664             anObj.SetParameters(Parameters)
7665             self._autoPublish(anObj, theName, "glueEdges")
7666             return anObj
7667
7668         ## Find coincident edges in \a theShapes for possible gluing.
7669         #  @param theShapes Initial shapes, either a list or compound of shapes.
7670         #  @param theTolerance Maximum distance between edges,
7671         #                      which can be considered as coincident.
7672         #  @param theName Object name; when specified, this parameter is used
7673         #         for result publication in the study. Otherwise, if automatic
7674         #         publication is switched on, default value is used for result name.
7675         #
7676         #  @return GEOM.ListOfGO
7677         #
7678         #  @ref tui_glue_edges "Example"
7679         @ManageTransactions("ShapesOp")
7680         def GetGlueEdges(self, theShapes, theTolerance, theName=None):
7681             """
7682             Find coincident edges in theShapes for possible gluing.
7683
7684             Parameters:
7685                 theShapes Initial shapes, either a list or compound of shapes.
7686                 theTolerance Maximum distance between edges,
7687                              which can be considered as coincident.
7688                 theName Object name; when specified, this parameter is used
7689                         for result publication in the study. Otherwise, if automatic
7690                         publication is switched on, default value is used for result name.
7691
7692             Returns:
7693                 GEOM.ListOfGO
7694             """
7695             anObj = self.ShapesOp.GetGlueEdges(ToList(theShapes), theTolerance)
7696             RaiseIfFailed("GetGlueEdges", self.ShapesOp)
7697             self._autoPublish(anObj, theName, "edgesToGlue")
7698             return anObj
7699
7700         ## Replace coincident edges in theShapes by one edge
7701         #  in compliance with given list of edges.
7702         #  @param theShapes Initial shapes, either a list or compound of shapes.
7703         #  @param theTolerance Maximum distance between edges,
7704         #                      which can be considered as coincident.
7705         #  @param theEdges List of edges for gluing.
7706         #  @param theName Object name; when specified, this parameter is used
7707         #         for result publication in the study. Otherwise, if automatic
7708         #         publication is switched on, default value is used for result name.
7709         #
7710         #  @return New GEOM.GEOM_Object, containing copies of theShapes without coincident edges.
7711         #
7712         #  @ref tui_glue_edges "Example"
7713         @ManageTransactions("ShapesOp")
7714         def MakeGlueEdgesByList(self, theShapes, theTolerance, theEdges, theName=None):
7715             """
7716             Replace coincident edges in theShapes by one edge
7717             in compliance with given list of edges.
7718
7719             Parameters:
7720                 theShapes Initial shapes, either a list or compound of shapes.
7721                 theTolerance Maximum distance between edges,
7722                              which can be considered as coincident.
7723                 theEdges List of edges for gluing.
7724                 theName Object name; when specified, this parameter is used
7725                         for result publication in the study. Otherwise, if automatic
7726                         publication is switched on, default value is used for result name.
7727
7728             Returns:
7729                 New GEOM.GEOM_Object, containing copies of theShapes without coincident edges.
7730             """
7731             anObj = self.ShapesOp.MakeGlueEdgesByList(ToList(theShapes), theTolerance, theEdges)
7732             if anObj is None:
7733                 raise RuntimeError("MakeGlueEdgesByList : " + self.ShapesOp.GetErrorCode())
7734             self._autoPublish(anObj, theName, "glueEdges")
7735             return anObj
7736
7737         # end of l3_healing
7738         ## @}
7739
7740         ## @addtogroup l3_boolean Boolean Operations
7741         ## @{
7742
7743         # -----------------------------------------------------------------------------
7744         # Boolean (Common, Cut, Fuse, Section)
7745         # -----------------------------------------------------------------------------
7746
7747         ## Perform one of boolean operations on two given shapes.
7748         #  @param theShape1 First argument for boolean operation.
7749         #  @param theShape2 Second argument for boolean operation.
7750         #  @param theOperation Indicates the operation to be done:\n
7751         #                      1 - Common, 2 - Cut, 3 - Fuse, 4 - Section.
7752         #  @param checkSelfInte The flag that tells if the arguments should
7753         #         be checked for self-intersection prior to the operation.
7754         #  @param theName Object name; when specified, this parameter is used
7755         #         for result publication in the study. Otherwise, if automatic
7756         #         publication is switched on, default value is used for result name.
7757         #
7758         #  @note This algorithm doesn't find all types of self-intersections.
7759         #        It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7760         #        vertex/face and edge/face intersections. Face/face
7761         #        intersections detection is switched off as it is a
7762         #        time-consuming operation that gives an impact on performance.
7763         #        To find all self-intersections please use
7764         #        CheckSelfIntersections() method.
7765         #
7766         #  @return New GEOM.GEOM_Object, containing the result shape.
7767         #
7768         #  @ref tui_fuse "Example"
7769         @ManageTransactions("BoolOp")
7770         def MakeBoolean(self, theShape1, theShape2, theOperation, checkSelfInte=False, theName=None):
7771             """
7772             Perform one of boolean operations on two given shapes.
7773
7774             Parameters:
7775                 theShape1 First argument for boolean operation.
7776                 theShape2 Second argument for boolean operation.
7777                 theOperation Indicates the operation to be done:
7778                              1 - Common, 2 - Cut, 3 - Fuse, 4 - Section.
7779                 checkSelfInte The flag that tells if the arguments should
7780                               be checked for self-intersection prior to
7781                               the operation.
7782                 theName Object name; when specified, this parameter is used
7783                         for result publication in the study. Otherwise, if automatic
7784                         publication is switched on, default value is used for result name.
7785
7786             Note:
7787                     This algorithm doesn't find all types of self-intersections.
7788                     It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7789                     vertex/face and edge/face intersections. Face/face
7790                     intersections detection is switched off as it is a
7791                     time-consuming operation that gives an impact on performance.
7792                     To find all self-intersections please use
7793                     CheckSelfIntersections() method.
7794
7795             Returns:
7796                 New GEOM.GEOM_Object, containing the result shape.
7797             """
7798             # Example: see GEOM_TestAll.py
7799             anObj = self.BoolOp.MakeBoolean(theShape1, theShape2, theOperation, checkSelfInte)
7800             RaiseIfFailed("MakeBoolean", self.BoolOp)
7801             def_names = { 1: "common", 2: "cut", 3: "fuse", 4: "section" }
7802             self._autoPublish(anObj, theName, def_names[theOperation])
7803             return anObj
7804
7805         ## Perform Common boolean operation on two given shapes.
7806         #  @param theShape1 First argument for boolean operation.
7807         #  @param theShape2 Second argument for boolean operation.
7808         #  @param checkSelfInte The flag that tells if the arguments should
7809         #         be checked for self-intersection prior to the operation.
7810         #  @param theName Object name; when specified, this parameter is used
7811         #         for result publication in the study. Otherwise, if automatic
7812         #         publication is switched on, default value is used for result name.
7813         #
7814         #  @note This algorithm doesn't find all types of self-intersections.
7815         #        It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7816         #        vertex/face and edge/face intersections. Face/face
7817         #        intersections detection is switched off as it is a
7818         #        time-consuming operation that gives an impact on performance.
7819         #        To find all self-intersections please use
7820         #        CheckSelfIntersections() method.
7821         #
7822         #  @return New GEOM.GEOM_Object, containing the result shape.
7823         #
7824         #  @ref tui_common "Example 1"
7825         #  \n @ref swig_MakeCommon "Example 2"
7826         def MakeCommon(self, theShape1, theShape2, checkSelfInte=False, theName=None):
7827             """
7828             Perform Common boolean operation on two given shapes.
7829
7830             Parameters:
7831                 theShape1 First argument for boolean operation.
7832                 theShape2 Second argument for boolean operation.
7833                 checkSelfInte The flag that tells if the arguments should
7834                               be checked for self-intersection prior to
7835                               the operation.
7836                 theName Object name; when specified, this parameter is used
7837                         for result publication in the study. Otherwise, if automatic
7838                         publication is switched on, default value is used for result name.
7839
7840             Note:
7841                     This algorithm doesn't find all types of self-intersections.
7842                     It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7843                     vertex/face and edge/face intersections. Face/face
7844                     intersections detection is switched off as it is a
7845                     time-consuming operation that gives an impact on performance.
7846                     To find all self-intersections please use
7847                     CheckSelfIntersections() method.
7848
7849             Returns:
7850                 New GEOM.GEOM_Object, containing the result shape.
7851             """
7852             # Example: see GEOM_TestOthers.py
7853             # note: auto-publishing is done in self.MakeBoolean()
7854             return self.MakeBoolean(theShape1, theShape2, 1, checkSelfInte, theName)
7855
7856         ## Perform Cut boolean operation on two given shapes.
7857         #  @param theShape1 First argument for boolean operation.
7858         #  @param theShape2 Second argument for boolean operation.
7859         #  @param checkSelfInte The flag that tells if the arguments should
7860         #         be checked for self-intersection prior to the operation.
7861         #  @param theName Object name; when specified, this parameter is used
7862         #         for result publication in the study. Otherwise, if automatic
7863         #         publication is switched on, default value is used for result name.
7864         #
7865         #  @note This algorithm doesn't find all types of self-intersections.
7866         #        It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7867         #        vertex/face and edge/face intersections. Face/face
7868         #        intersections detection is switched off as it is a
7869         #        time-consuming operation that gives an impact on performance.
7870         #        To find all self-intersections please use
7871         #        CheckSelfIntersections() method.
7872         #
7873         #  @return New GEOM.GEOM_Object, containing the result shape.
7874         #
7875         #  @ref tui_cut "Example 1"
7876         #  \n @ref swig_MakeCommon "Example 2"
7877         def MakeCut(self, theShape1, theShape2, checkSelfInte=False, theName=None):
7878             """
7879             Perform Cut boolean operation on two given shapes.
7880
7881             Parameters:
7882                 theShape1 First argument for boolean operation.
7883                 theShape2 Second argument for boolean operation.
7884                 checkSelfInte The flag that tells if the arguments should
7885                               be checked for self-intersection prior to
7886                               the operation.
7887                 theName Object name; when specified, this parameter is used
7888                         for result publication in the study. Otherwise, if automatic
7889                         publication is switched on, default value is used for result name.
7890
7891             Note:
7892                     This algorithm doesn't find all types of self-intersections.
7893                     It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7894                     vertex/face and edge/face intersections. Face/face
7895                     intersections detection is switched off as it is a
7896                     time-consuming operation that gives an impact on performance.
7897                     To find all self-intersections please use
7898                     CheckSelfIntersections() method.
7899
7900             Returns:
7901                 New GEOM.GEOM_Object, containing the result shape.
7902
7903             """
7904             # Example: see GEOM_TestOthers.py
7905             # note: auto-publishing is done in self.MakeBoolean()
7906             return self.MakeBoolean(theShape1, theShape2, 2, checkSelfInte, theName)
7907
7908         ## Perform Fuse boolean operation on two given shapes.
7909         #  @param theShape1 First argument for boolean operation.
7910         #  @param theShape2 Second argument for boolean operation.
7911         #  @param checkSelfInte The flag that tells if the arguments should
7912         #         be checked for self-intersection prior to the operation.
7913         #  @param rmExtraEdges The flag that tells if Remove Extra Edges
7914         #         operation should be performed during the operation.
7915         #  @param theName Object name; when specified, this parameter is used
7916         #         for result publication in the study. Otherwise, if automatic
7917         #         publication is switched on, default value is used for result name.
7918         #
7919         #  @note This algorithm doesn't find all types of self-intersections.
7920         #        It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7921         #        vertex/face and edge/face intersections. Face/face
7922         #        intersections detection is switched off as it is a
7923         #        time-consuming operation that gives an impact on performance.
7924         #        To find all self-intersections please use
7925         #        CheckSelfIntersections() method.
7926         #
7927         #  @return New GEOM.GEOM_Object, containing the result shape.
7928         #
7929         #  @ref tui_fuse "Example 1"
7930         #  \n @ref swig_MakeCommon "Example 2"
7931         @ManageTransactions("BoolOp")
7932         def MakeFuse(self, theShape1, theShape2, checkSelfInte=False,
7933                      rmExtraEdges=False, theName=None):
7934             """
7935             Perform Fuse boolean operation on two given shapes.
7936
7937             Parameters:
7938                 theShape1 First argument for boolean operation.
7939                 theShape2 Second argument for boolean operation.
7940                 checkSelfInte The flag that tells if the arguments should
7941                               be checked for self-intersection prior to
7942                               the operation.
7943                 rmExtraEdges The flag that tells if Remove Extra Edges
7944                              operation should be performed during the operation.
7945                 theName Object name; when specified, this parameter is used
7946                         for result publication in the study. Otherwise, if automatic
7947                         publication is switched on, default value is used for result name.
7948
7949             Note:
7950                     This algorithm doesn't find all types of self-intersections.
7951                     It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7952                     vertex/face and edge/face intersections. Face/face
7953                     intersections detection is switched off as it is a
7954                     time-consuming operation that gives an impact on performance.
7955                     To find all self-intersections please use
7956                     CheckSelfIntersections() method.
7957
7958             Returns:
7959                 New GEOM.GEOM_Object, containing the result shape.
7960
7961             """
7962             # Example: see GEOM_TestOthers.py
7963             anObj = self.BoolOp.MakeFuse(theShape1, theShape2,
7964                                          checkSelfInte, rmExtraEdges)
7965             RaiseIfFailed("MakeFuse", self.BoolOp)
7966             self._autoPublish(anObj, theName, "fuse")
7967             return anObj
7968
7969         ## Perform Section boolean operation on two given shapes.
7970         #  @param theShape1 First argument for boolean operation.
7971         #  @param theShape2 Second argument for boolean operation.
7972         #  @param checkSelfInte The flag that tells if the arguments should
7973         #         be checked for self-intersection prior to the operation.
7974         #         If a self-intersection detected the operation fails.
7975         #  @param theName Object name; when specified, this parameter is used
7976         #         for result publication in the study. Otherwise, if automatic
7977         #         publication is switched on, default value is used for result name.
7978         #  @return New GEOM.GEOM_Object, containing the result shape.
7979         #
7980         #  @ref tui_section "Example 1"
7981         #  \n @ref swig_MakeCommon "Example 2"
7982         def MakeSection(self, theShape1, theShape2, checkSelfInte=False, theName=None):
7983             """
7984             Perform Section boolean operation on two given shapes.
7985
7986             Parameters:
7987                 theShape1 First argument for boolean operation.
7988                 theShape2 Second argument for boolean operation.
7989                 checkSelfInte The flag that tells if the arguments should
7990                               be checked for self-intersection prior to the operation.
7991                               If a self-intersection detected the operation fails.
7992                 theName Object name; when specified, this parameter is used
7993                         for result publication in the study. Otherwise, if automatic
7994                         publication is switched on, default value is used for result name.
7995             Returns:
7996                 New GEOM.GEOM_Object, containing the result shape.
7997
7998             """
7999             # Example: see GEOM_TestOthers.py
8000             # note: auto-publishing is done in self.MakeBoolean()
8001             return self.MakeBoolean(theShape1, theShape2, 4, checkSelfInte, theName)
8002
8003         ## Perform Fuse boolean operation on the list of shapes.
8004         #  @param theShapesList Shapes to be fused.
8005         #  @param checkSelfInte The flag that tells if the arguments should
8006         #         be checked for self-intersection prior to the operation.
8007         #  @param rmExtraEdges The flag that tells if Remove Extra Edges
8008         #         operation should be performed during the operation.
8009         #  @param theName Object name; when specified, this parameter is used
8010         #         for result publication in the study. Otherwise, if automatic
8011         #         publication is switched on, default value is used for result name.
8012         #
8013         #  @note This algorithm doesn't find all types of self-intersections.
8014         #        It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
8015         #        vertex/face and edge/face intersections. Face/face
8016         #        intersections detection is switched off as it is a
8017         #        time-consuming operation that gives an impact on performance.
8018         #        To find all self-intersections please use
8019         #        CheckSelfIntersections() method.
8020         #
8021         #  @return New GEOM.GEOM_Object, containing the result shape.
8022         #
8023         #  @ref tui_fuse "Example 1"
8024         #  \n @ref swig_MakeCommon "Example 2"
8025         @ManageTransactions("BoolOp")
8026         def MakeFuseList(self, theShapesList, checkSelfInte=False,
8027                          rmExtraEdges=False, theName=None):
8028             """
8029             Perform Fuse boolean operation on the list of shapes.
8030
8031             Parameters:
8032                 theShapesList Shapes to be fused.
8033                 checkSelfInte The flag that tells if the arguments should
8034                               be checked for self-intersection prior to
8035                               the operation.
8036                 rmExtraEdges The flag that tells if Remove Extra Edges
8037                              operation should be performed during the operation.
8038                 theName Object name; when specified, this parameter is used
8039                         for result publication in the study. Otherwise, if automatic
8040                         publication is switched on, default value is used for result name.
8041
8042             Note:
8043                     This algorithm doesn't find all types of self-intersections.
8044                     It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
8045                     vertex/face and edge/face intersections. Face/face
8046                     intersections detection is switched off as it is a
8047                     time-consuming operation that gives an impact on performance.
8048                     To find all self-intersections please use
8049                     CheckSelfIntersections() method.
8050
8051             Returns:
8052                 New GEOM.GEOM_Object, containing the result shape.
8053
8054             """
8055             # Example: see GEOM_TestOthers.py
8056             anObj = self.BoolOp.MakeFuseList(theShapesList, checkSelfInte,
8057                                              rmExtraEdges)
8058             RaiseIfFailed("MakeFuseList", self.BoolOp)
8059             self._autoPublish(anObj, theName, "fuse")
8060             return anObj
8061
8062         ## Perform Common boolean operation on the list of shapes.
8063         #  @param theShapesList Shapes for Common operation.
8064         #  @param checkSelfInte The flag that tells if the arguments should
8065         #         be checked for self-intersection prior to the operation.
8066         #  @param theName Object name; when specified, this parameter is used
8067         #         for result publication in the study. Otherwise, if automatic
8068         #         publication is switched on, default value is used for result name.
8069         #
8070         #  @note This algorithm doesn't find all types of self-intersections.
8071         #        It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
8072         #        vertex/face and edge/face intersections. Face/face
8073         #        intersections detection is switched off as it is a
8074         #        time-consuming operation that gives an impact on performance.
8075         #        To find all self-intersections please use
8076         #        CheckSelfIntersections() method.
8077         #
8078         #  @return New GEOM.GEOM_Object, containing the result shape.
8079         #
8080         #  @ref tui_common "Example 1"
8081         #  \n @ref swig_MakeCommon "Example 2"
8082         @ManageTransactions("BoolOp")
8083         def MakeCommonList(self, theShapesList, checkSelfInte=False, theName=None):
8084             """
8085             Perform Common boolean operation on the list of shapes.
8086
8087             Parameters:
8088                 theShapesList Shapes for Common operation.
8089                 checkSelfInte The flag that tells if the arguments should
8090                               be checked for self-intersection prior to
8091                               the operation.
8092                 theName Object name; when specified, this parameter is used
8093                         for result publication in the study. Otherwise, if automatic
8094                         publication is switched on, default value is used for result name.
8095
8096             Note:
8097                     This algorithm doesn't find all types of self-intersections.
8098                     It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
8099                     vertex/face and edge/face intersections. Face/face
8100                     intersections detection is switched off as it is a
8101                     time-consuming operation that gives an impact on performance.
8102                     To find all self-intersections please use
8103                     CheckSelfIntersections() method.
8104
8105             Returns:
8106                 New GEOM.GEOM_Object, containing the result shape.
8107
8108             """
8109             # Example: see GEOM_TestOthers.py
8110             anObj = self.BoolOp.MakeCommonList(theShapesList, checkSelfInte)
8111             RaiseIfFailed("MakeCommonList", self.BoolOp)
8112             self._autoPublish(anObj, theName, "common")
8113             return anObj
8114
8115         ## Perform Cut boolean operation on one object and the list of tools.
8116         #  @param theMainShape The object of the operation.
8117         #  @param theShapesList The list of tools of the operation.
8118         #  @param checkSelfInte The flag that tells if the arguments should
8119         #         be checked for self-intersection prior to the operation.
8120         #  @param theName Object name; when specified, this parameter is used
8121         #         for result publication in the study. Otherwise, if automatic
8122         #         publication is switched on, default value is used for result name.
8123         #
8124         #  @note This algorithm doesn't find all types of self-intersections.
8125         #        It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
8126         #        vertex/face and edge/face intersections. Face/face
8127         #        intersections detection is switched off as it is a
8128         #        time-consuming operation that gives an impact on performance.
8129         #        To find all self-intersections please use
8130         #        CheckSelfIntersections() method.
8131         #
8132         #  @return New GEOM.GEOM_Object, containing the result shape.
8133         #
8134         #  @ref tui_cut "Example 1"
8135         #  \n @ref swig_MakeCommon "Example 2"
8136         @ManageTransactions("BoolOp")
8137         def MakeCutList(self, theMainShape, theShapesList, checkSelfInte=False, theName=None):
8138             """
8139             Perform Cut boolean operation on one object and the list of tools.
8140
8141             Parameters:
8142                 theMainShape The object of the operation.
8143                 theShapesList The list of tools of the operation.
8144                 checkSelfInte The flag that tells if the arguments should
8145                               be checked for self-intersection prior to
8146                               the operation.
8147                 theName Object name; when specified, this parameter is used
8148                         for result publication in the study. Otherwise, if automatic
8149                         publication is switched on, default value is used for result name.
8150
8151             Note:
8152                     This algorithm doesn't find all types of self-intersections.
8153                     It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
8154                     vertex/face and edge/face intersections. Face/face
8155                     intersections detection is switched off as it is a
8156                     time-consuming operation that gives an impact on performance.
8157                     To find all self-intersections please use
8158                     CheckSelfIntersections() method.
8159
8160             Returns:
8161                 New GEOM.GEOM_Object, containing the result shape.
8162
8163             """
8164             # Example: see GEOM_TestOthers.py
8165             anObj = self.BoolOp.MakeCutList(theMainShape, theShapesList, checkSelfInte)
8166             RaiseIfFailed("MakeCutList", self.BoolOp)
8167             self._autoPublish(anObj, theName, "cut")
8168             return anObj
8169
8170         # end of l3_boolean
8171         ## @}
8172
8173         ## @addtogroup l3_basic_op
8174         ## @{
8175
8176         ## Perform partition operation.
8177         #  @param ListShapes Shapes to be intersected.
8178         #  @param ListTools Shapes to intersect theShapes.
8179         #  @param Limit Type of resulting shapes (see ShapeType()).\n
8180         #         If this parameter is set to -1 ("Auto"), most appropriate shape limit
8181         #         type will be detected automatically.
8182         #  @param KeepNonlimitShapes if this parameter == 0, then only shapes of
8183         #                             target type (equal to Limit) are kept in the result,
8184         #                             else standalone shapes of lower dimension
8185         #                             are kept also (if they exist).
8186         #
8187         #  @param theName Object name; when specified, this parameter is used
8188         #         for result publication in the study. Otherwise, if automatic
8189         #         publication is switched on, default value is used for result name.
8190         #
8191         #  @note Each compound from ListShapes and ListTools will be exploded
8192         #        in order to avoid possible intersection between shapes from this compound.
8193         #
8194         #  After implementation new version of PartitionAlgo (October 2006)
8195         #  other parameters are ignored by current functionality. They are kept
8196         #  in this function only for support old versions.
8197         #      @param ListKeepInside Shapes, outside which the results will be deleted.
8198         #         Each shape from theKeepInside must belong to theShapes also.
8199         #      @param ListRemoveInside Shapes, inside which the results will be deleted.
8200         #         Each shape from theRemoveInside must belong to theShapes also.
8201         #      @param RemoveWebs If TRUE, perform Glue 3D algorithm.
8202         #      @param ListMaterials Material indices for each shape. Make sense,
8203         #         only if theRemoveWebs is TRUE.
8204         #
8205         #  @return New GEOM.GEOM_Object, containing the result shapes.
8206         #
8207         #  @ref tui_partition "Example"
8208         @ManageTransactions("BoolOp")
8209         def MakePartition(self, ListShapes, ListTools=[], ListKeepInside=[], ListRemoveInside=[],
8210                           Limit=ShapeType["AUTO"], RemoveWebs=0, ListMaterials=[],
8211                           KeepNonlimitShapes=0, theName=None):
8212             """
8213             Perform partition operation.
8214
8215             Parameters:
8216                 ListShapes Shapes to be intersected.
8217                 ListTools Shapes to intersect theShapes.
8218                 Limit Type of resulting shapes (see geompy.ShapeType)
8219                       If this parameter is set to -1 ("Auto"), most appropriate shape limit
8220                       type will be detected automatically.
8221                 KeepNonlimitShapes if this parameter == 0, then only shapes of
8222                                     target type (equal to Limit) are kept in the result,
8223                                     else standalone shapes of lower dimension
8224                                     are kept also (if they exist).
8225
8226                 theName Object name; when specified, this parameter is used
8227                         for result publication in the study. Otherwise, if automatic
8228                         publication is switched on, default value is used for result name.
8229             Note:
8230                     Each compound from ListShapes and ListTools will be exploded
8231                     in order to avoid possible intersection between shapes from
8232                     this compound.
8233
8234             After implementation new version of PartitionAlgo (October 2006) other
8235             parameters are ignored by current functionality. They are kept in this
8236             function only for support old versions.
8237
8238             Ignored parameters:
8239                 ListKeepInside Shapes, outside which the results will be deleted.
8240                                Each shape from theKeepInside must belong to theShapes also.
8241                 ListRemoveInside Shapes, inside which the results will be deleted.
8242                                  Each shape from theRemoveInside must belong to theShapes also.
8243                 RemoveWebs If TRUE, perform Glue 3D algorithm.
8244                 ListMaterials Material indices for each shape. Make sense, only if theRemoveWebs is TRUE.
8245
8246             Returns:
8247                 New GEOM.GEOM_Object, containing the result shapes.
8248             """
8249             # Example: see GEOM_TestAll.py
8250             if Limit == self.ShapeType["AUTO"]:
8251                 # automatic detection of the most appropriate shape limit type
8252                 lim = GEOM.SHAPE
8253                 for s in ListShapes: lim = min(lim, s.GetMaxShapeType())
8254                 Limit = EnumToLong(lim)
8255                 pass
8256             anObj = self.BoolOp.MakePartition(ListShapes, ListTools,
8257                                               ListKeepInside, ListRemoveInside,
8258                                               Limit, RemoveWebs, ListMaterials,
8259                                               KeepNonlimitShapes);
8260             RaiseIfFailed("MakePartition", self.BoolOp)
8261             self._autoPublish(anObj, theName, "partition")
8262             return anObj
8263
8264         ## Perform partition operation.
8265         #  This method may be useful if it is needed to make a partition for
8266         #  compound contains nonintersected shapes. Performance will be better
8267         #  since intersection between shapes from compound is not performed.
8268         #
8269         #  Description of all parameters as in previous method MakePartition().
8270         #  One additional parameter is provided:
8271         #  @param checkSelfInte The flag that tells if the arguments should
8272         #         be checked for self-intersection prior to the operation.
8273         #
8274         #  @note This algorithm doesn't find all types of self-intersections.
8275         #        It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
8276         #        vertex/face and edge/face intersections. Face/face
8277         #        intersections detection is switched off as it is a
8278         #        time-consuming operation that gives an impact on performance.
8279         #        To find all self-intersections please use
8280         #        CheckSelfIntersections() method.
8281         #
8282         #  @note Passed compounds (via ListShapes or via ListTools)
8283         #           have to consist of nonintersecting shapes.
8284         #
8285         #  @return New GEOM.GEOM_Object, containing the result shapes.
8286         #
8287         #  @ref swig_todo "Example"
8288         @ManageTransactions("BoolOp")
8289         def MakePartitionNonSelfIntersectedShape(self, ListShapes, ListTools=[],
8290                                                  ListKeepInside=[], ListRemoveInside=[],
8291                                                  Limit=ShapeType["AUTO"], RemoveWebs=0,
8292                                                  ListMaterials=[], KeepNonlimitShapes=0,
8293                                                  checkSelfInte=False, theName=None):
8294             """
8295             Perform partition operation.
8296             This method may be useful if it is needed to make a partition for
8297             compound contains nonintersected shapes. Performance will be better
8298             since intersection between shapes from compound is not performed.
8299
8300             Parameters:
8301                 Description of all parameters as in method geompy.MakePartition.
8302                 One additional parameter is provided:
8303                 checkSelfInte The flag that tells if the arguments should
8304                               be checked for self-intersection prior to
8305                               the operation.
8306
8307             Note:
8308                     This algorithm doesn't find all types of self-intersections.
8309                     It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
8310                     vertex/face and edge/face intersections. Face/face
8311                     intersections detection is switched off as it is a
8312                     time-consuming operation that gives an impact on performance.
8313                     To find all self-intersections please use
8314                     CheckSelfIntersections() method.
8315
8316             NOTE:
8317                 Passed compounds (via ListShapes or via ListTools)
8318                 have to consist of nonintersecting shapes.
8319
8320             Returns:
8321                 New GEOM.GEOM_Object, containing the result shapes.
8322             """
8323             if Limit == self.ShapeType["AUTO"]:
8324                 # automatic detection of the most appropriate shape limit type
8325                 lim = GEOM.SHAPE
8326                 for s in ListShapes: lim = min(lim, s.GetMaxShapeType())
8327                 Limit = EnumToLong(lim)
8328                 pass
8329             anObj = self.BoolOp.MakePartitionNonSelfIntersectedShape(ListShapes, ListTools,
8330                                                                      ListKeepInside, ListRemoveInside,
8331                                                                      Limit, RemoveWebs, ListMaterials,
8332                                                                      KeepNonlimitShapes, checkSelfInte);
8333             RaiseIfFailed("MakePartitionNonSelfIntersectedShape", self.BoolOp)
8334             self._autoPublish(anObj, theName, "partition")
8335             return anObj
8336
8337         ## See method MakePartition() for more information.
8338         #
8339         #  @ref tui_partition "Example 1"
8340         #  \n @ref swig_Partition "Example 2"
8341         def Partition(self, ListShapes, ListTools=[], ListKeepInside=[], ListRemoveInside=[],
8342                       Limit=ShapeType["AUTO"], RemoveWebs=0, ListMaterials=[],
8343                       KeepNonlimitShapes=0, theName=None):
8344             """
8345             See method geompy.MakePartition for more information.
8346             """
8347             # Example: see GEOM_TestOthers.py
8348             # note: auto-publishing is done in self.MakePartition()
8349             anObj = self.MakePartition(ListShapes, ListTools,
8350                                        ListKeepInside, ListRemoveInside,
8351                                        Limit, RemoveWebs, ListMaterials,
8352                                        KeepNonlimitShapes, theName);
8353             return anObj
8354
8355         ## Perform partition of the Shape with the Plane
8356         #  @param theShape Shape to be intersected.
8357         #  @param thePlane Tool shape, to intersect theShape.
8358         #  @param theName Object name; when specified, this parameter is used
8359         #         for result publication in the study. Otherwise, if automatic
8360         #         publication is switched on, default value is used for result name.
8361         #
8362         #  @return New GEOM.GEOM_Object, containing the result shape.
8363         #
8364         #  @note This operation is a shortcut to the more general @ref MakePartition
8365         #  operation, where @a theShape specifies single "object" (shape being partitioned)
8366         #  and @a thePlane specifies single "tool" (intersector shape). Other parameters of
8367         #  @ref MakePartition operation have default values:
8368         #  - @a Limit: GEOM::SHAPE (shape limit corresponds to the type of @a theShape)
8369         #  - @a KeepNonlimitShapes: 0
8370         #  - @a KeepInside, @a RemoveInside, @a RemoveWebs,
8371         #    @a Materials (obsolete parameters): empty
8372         #
8373         #  @note I.e. the following two operations are equivalent:
8374         #  @code
8375         #  Result = geompy.MakeHalfPartition(Object, Plane)
8376         #  Result = geompy.MakePartition([Object], [Plane])
8377         #  @endcode
8378         #
8379         #  @sa MakePartition, MakePartitionNonSelfIntersectedShape
8380         #
8381         #  @ref tui_partition "Example"
8382         @ManageTransactions("BoolOp")
8383         def MakeHalfPartition(self, theShape, thePlane, theName=None):
8384             """
8385             Perform partition of the Shape with the Plane
8386
8387             Parameters:
8388                 theShape Shape to be intersected.
8389                 thePlane Tool shape, to intersect theShape.
8390                 theName Object name; when specified, this parameter is used
8391                         for result publication in the study. Otherwise, if automatic
8392                         publication is switched on, default value is used for result name.
8393
8394             Returns:
8395                 New GEOM.GEOM_Object, containing the result shape.
8396          
8397             Note: This operation is a shortcut to the more general MakePartition
8398             operation, where theShape specifies single "object" (shape being partitioned)
8399             and thePlane specifies single "tool" (intersector shape). Other parameters of
8400             MakePartition operation have default values:
8401             - Limit: GEOM::SHAPE (shape limit corresponds to the type of theShape)
8402             - KeepNonlimitShapes: 0
8403             - KeepInside, RemoveInside, RemoveWebs, Materials (obsolete parameters): empty
8404          
8405             I.e. the following two operations are equivalent:
8406               Result = geompy.MakeHalfPartition(Object, Plane)
8407               Result = geompy.MakePartition([Object], [Plane])
8408             """
8409             # Example: see GEOM_TestAll.py
8410             anObj = self.BoolOp.MakeHalfPartition(theShape, thePlane)
8411             RaiseIfFailed("MakeHalfPartition", self.BoolOp)
8412             self._autoPublish(anObj, theName, "partition")
8413             return anObj
8414
8415         # end of l3_basic_op
8416         ## @}
8417
8418         ## @addtogroup l3_transform
8419         ## @{
8420
8421         ## Translate the given object along the vector, specified
8422         #  by its end points.
8423         #  @param theObject The object to be translated.
8424         #  @param thePoint1 Start point of translation vector.
8425         #  @param thePoint2 End point of translation vector.
8426         #  @param theCopy Flag used to translate object itself or create a copy.
8427         #  @return Translated @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
8428         #  new GEOM.GEOM_Object, containing the translated object if @a theCopy flag is @c True.
8429         @ManageTransactions("TrsfOp")
8430         def TranslateTwoPoints(self, theObject, thePoint1, thePoint2, theCopy=False):
8431             """
8432             Translate the given object along the vector, specified by its end points.
8433
8434             Parameters:
8435                 theObject The object to be translated.
8436                 thePoint1 Start point of translation vector.
8437                 thePoint2 End point of translation vector.
8438                 theCopy Flag used to translate object itself or create a copy.
8439
8440             Returns:
8441                 Translated theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
8442                 new GEOM.GEOM_Object, containing the translated object if theCopy flag is True.
8443             """
8444             if theCopy:
8445                 anObj = self.TrsfOp.TranslateTwoPointsCopy(theObject, thePoint1, thePoint2)
8446             else:
8447                 anObj = self.TrsfOp.TranslateTwoPoints(theObject, thePoint1, thePoint2)
8448             RaiseIfFailed("TranslateTwoPoints", self.TrsfOp)
8449             return anObj
8450
8451         ## Translate the given object along the vector, specified
8452         #  by its end points, creating its copy before the translation.
8453         #  @param theObject The object to be translated.
8454         #  @param thePoint1 Start point of translation vector.
8455         #  @param thePoint2 End point of translation vector.
8456         #  @param theName Object name; when specified, this parameter is used
8457         #         for result publication in the study. Otherwise, if automatic
8458         #         publication is switched on, default value is used for result name.
8459         #
8460         #  @return New GEOM.GEOM_Object, containing the translated object.
8461         #
8462         #  @ref tui_translation "Example 1"
8463         #  \n @ref swig_MakeTranslationTwoPoints "Example 2"
8464         @ManageTransactions("TrsfOp")
8465         def MakeTranslationTwoPoints(self, theObject, thePoint1, thePoint2, theName=None):
8466             """
8467             Translate the given object along the vector, specified
8468             by its end points, creating its copy before the translation.
8469
8470             Parameters:
8471                 theObject The object to be translated.
8472                 thePoint1 Start point of translation vector.
8473                 thePoint2 End point of translation vector.
8474                 theName Object name; when specified, this parameter is used
8475                         for result publication in the study. Otherwise, if automatic
8476                         publication is switched on, default value is used for result name.
8477
8478             Returns:
8479                 New GEOM.GEOM_Object, containing the translated object.
8480             """
8481             # Example: see GEOM_TestAll.py
8482             anObj = self.TrsfOp.TranslateTwoPointsCopy(theObject, thePoint1, thePoint2)
8483             RaiseIfFailed("TranslateTwoPointsCopy", self.TrsfOp)
8484             self._autoPublish(anObj, theName, "translated")
8485             return anObj
8486
8487         ## Translate the given object along the vector, specified by its components.
8488         #  @param theObject The object to be translated.
8489         #  @param theDX,theDY,theDZ Components of translation vector.
8490         #  @param theCopy Flag used to translate object itself or create a copy.
8491         #  @return Translated @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
8492         #  new GEOM.GEOM_Object, containing the translated object if @a theCopy flag is @c True.
8493         #
8494         #  @ref tui_translation "Example"
8495         @ManageTransactions("TrsfOp")
8496         def TranslateDXDYDZ(self, theObject, theDX, theDY, theDZ, theCopy=False):
8497             """
8498             Translate the given object along the vector, specified by its components.
8499
8500             Parameters:
8501                 theObject The object to be translated.
8502                 theDX,theDY,theDZ Components of translation vector.
8503                 theCopy Flag used to translate object itself or create a copy.
8504
8505             Returns:
8506                 Translated theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
8507                 new GEOM.GEOM_Object, containing the translated object if theCopy flag is True.
8508             """
8509             # Example: see GEOM_TestAll.py
8510             theDX, theDY, theDZ, Parameters = ParseParameters(theDX, theDY, theDZ)
8511             if theCopy:
8512                 anObj = self.TrsfOp.TranslateDXDYDZCopy(theObject, theDX, theDY, theDZ)
8513             else:
8514                 anObj = self.TrsfOp.TranslateDXDYDZ(theObject, theDX, theDY, theDZ)
8515             anObj.SetParameters(Parameters)
8516             RaiseIfFailed("TranslateDXDYDZ", self.TrsfOp)
8517             return anObj
8518
8519         ## Translate the given object along the vector, specified
8520         #  by its components, creating its copy before the translation.
8521         #  @param theObject The object to be translated.
8522         #  @param theDX,theDY,theDZ Components of translation vector.
8523         #  @param theName Object name; when specified, this parameter is used
8524         #         for result publication in the study. Otherwise, if automatic
8525         #         publication is switched on, default value is used for result name.
8526         #
8527         #  @return New GEOM.GEOM_Object, containing the translated object.
8528         #
8529         #  @ref tui_translation "Example"
8530         @ManageTransactions("TrsfOp")
8531         def MakeTranslation(self,theObject, theDX, theDY, theDZ, theName=None):
8532             """
8533             Translate the given object along the vector, specified
8534             by its components, creating its copy before the translation.
8535
8536             Parameters:
8537                 theObject The object to be translated.
8538                 theDX,theDY,theDZ Components of translation vector.
8539                 theName Object name; when specified, this parameter is used
8540                         for result publication in the study. Otherwise, if automatic
8541                         publication is switched on, default value is used for result name.
8542
8543             Returns:
8544                 New GEOM.GEOM_Object, containing the translated object.
8545             """
8546             # Example: see GEOM_TestAll.py
8547             theDX, theDY, theDZ, Parameters = ParseParameters(theDX, theDY, theDZ)
8548             anObj = self.TrsfOp.TranslateDXDYDZCopy(theObject, theDX, theDY, theDZ)
8549             anObj.SetParameters(Parameters)
8550             RaiseIfFailed("TranslateDXDYDZ", self.TrsfOp)
8551             self._autoPublish(anObj, theName, "translated")
8552             return anObj
8553
8554         ## Translate the given object along the given vector.
8555         #  @param theObject The object to be translated.
8556         #  @param theVector The translation vector.
8557         #  @param theCopy Flag used to translate object itself or create a copy.
8558         #  @return Translated @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
8559         #  new GEOM.GEOM_Object, containing the translated object if @a theCopy flag is @c True.
8560         @ManageTransactions("TrsfOp")
8561         def TranslateVector(self, theObject, theVector, theCopy=False):
8562             """
8563             Translate the given object along the given vector.
8564
8565             Parameters:
8566                 theObject The object to be translated.
8567                 theVector The translation vector.
8568                 theCopy Flag used to translate object itself or create a copy.
8569
8570             Returns:
8571                 Translated theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
8572                 new GEOM.GEOM_Object, containing the translated object if theCopy flag is True.
8573             """
8574             if theCopy:
8575                 anObj = self.TrsfOp.TranslateVectorCopy(theObject, theVector)
8576             else:
8577                 anObj = self.TrsfOp.TranslateVector(theObject, theVector)
8578             RaiseIfFailed("TranslateVector", self.TrsfOp)
8579             return anObj
8580
8581         ## Translate the given object along the given vector,
8582         #  creating its copy before the translation.
8583         #  @param theObject The object to be translated.
8584         #  @param theVector The translation vector.
8585         #  @param theName Object name; when specified, this parameter is used
8586         #         for result publication in the study. Otherwise, if automatic
8587         #         publication is switched on, default value is used for result name.
8588         #
8589         #  @return New GEOM.GEOM_Object, containing the translated object.
8590         #
8591         #  @ref tui_translation "Example"
8592         @ManageTransactions("TrsfOp")
8593         def MakeTranslationVector(self, theObject, theVector, theName=None):
8594             """
8595             Translate the given object along the given vector,
8596             creating its copy before the translation.
8597
8598             Parameters:
8599                 theObject The object to be translated.
8600                 theVector The translation vector.
8601                 theName Object name; when specified, this parameter is used
8602                         for result publication in the study. Otherwise, if automatic
8603                         publication is switched on, default value is used for result name.
8604
8605             Returns:
8606                 New GEOM.GEOM_Object, containing the translated object.
8607             """
8608             # Example: see GEOM_TestAll.py
8609             anObj = self.TrsfOp.TranslateVectorCopy(theObject, theVector)
8610             RaiseIfFailed("TranslateVectorCopy", self.TrsfOp)
8611             self._autoPublish(anObj, theName, "translated")
8612             return anObj
8613
8614         ## Translate the given object along the given vector on given distance.
8615         #  @param theObject The object to be translated.
8616         #  @param theVector The translation vector.
8617         #  @param theDistance The translation distance.
8618         #  @param theCopy Flag used to translate object itself or create a copy.
8619         #  @return Translated @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
8620         #  new GEOM.GEOM_Object, containing the translated object if @a theCopy flag is @c True.
8621         #
8622         #  @ref tui_translation "Example"
8623         @ManageTransactions("TrsfOp")
8624         def TranslateVectorDistance(self, theObject, theVector, theDistance, theCopy=False):
8625             """
8626             Translate the given object along the given vector on given distance.
8627
8628             Parameters:
8629                 theObject The object to be translated.
8630                 theVector The translation vector.
8631                 theDistance The translation distance.
8632                 theCopy Flag used to translate object itself or create a copy.
8633
8634             Returns:
8635                 Translated theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
8636                 new GEOM.GEOM_Object, containing the translated object if theCopy flag is True.
8637             """
8638             # Example: see GEOM_TestAll.py
8639             theDistance,Parameters = ParseParameters(theDistance)
8640             anObj = self.TrsfOp.TranslateVectorDistance(theObject, theVector, theDistance, theCopy)
8641             RaiseIfFailed("TranslateVectorDistance", self.TrsfOp)
8642             anObj.SetParameters(Parameters)
8643             return anObj
8644
8645         ## Translate the given object along the given vector on given distance,
8646         #  creating its copy before the translation.
8647         #  @param theObject The object to be translated.
8648         #  @param theVector The translation vector.
8649         #  @param theDistance The translation distance.
8650         #  @param theName Object name; when specified, this parameter is used
8651         #         for result publication in the study. Otherwise, if automatic
8652         #         publication is switched on, default value is used for result name.
8653         #
8654         #  @return New GEOM.GEOM_Object, containing the translated object.
8655         #
8656         #  @ref tui_translation "Example"
8657         @ManageTransactions("TrsfOp")
8658         def MakeTranslationVectorDistance(self, theObject, theVector, theDistance, theName=None):
8659             """
8660             Translate the given object along the given vector on given distance,
8661             creating its copy before the translation.
8662
8663             Parameters:
8664                 theObject The object to be translated.
8665                 theVector The translation vector.
8666                 theDistance The translation distance.
8667                 theName Object name; when specified, this parameter is used
8668                         for result publication in the study. Otherwise, if automatic
8669                         publication is switched on, default value is used for result name.
8670
8671             Returns:
8672                 New GEOM.GEOM_Object, containing the translated object.
8673             """
8674             # Example: see GEOM_TestAll.py
8675             theDistance,Parameters = ParseParameters(theDistance)
8676             anObj = self.TrsfOp.TranslateVectorDistance(theObject, theVector, theDistance, 1)
8677             RaiseIfFailed("TranslateVectorDistance", self.TrsfOp)
8678             anObj.SetParameters(Parameters)
8679             self._autoPublish(anObj, theName, "translated")
8680             return anObj
8681
8682         ## Rotate the given object around the given axis on the given angle.
8683         #  @param theObject The object to be rotated.
8684         #  @param theAxis Rotation axis.
8685         #  @param theAngle Rotation angle in radians.
8686         #  @param theCopy Flag used to rotate object itself or create a copy.
8687         #
8688         #  @return Rotated @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
8689         #  new GEOM.GEOM_Object, containing the rotated object if @a theCopy flag is @c True.
8690         #
8691         #  @ref tui_rotation "Example"
8692         @ManageTransactions("TrsfOp")
8693         def Rotate(self, theObject, theAxis, theAngle, theCopy=False):
8694             """
8695             Rotate the given object around the given axis on the given angle.
8696
8697             Parameters:
8698                 theObject The object to be rotated.
8699                 theAxis Rotation axis.
8700                 theAngle Rotation angle in radians.
8701                 theCopy Flag used to rotate object itself or create a copy.
8702
8703             Returns:
8704                 Rotated theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
8705                 new GEOM.GEOM_Object, containing the rotated object if theCopy flag is True.
8706             """
8707             # Example: see GEOM_TestAll.py
8708             flag = False
8709             if isinstance(theAngle,str):
8710                 flag = True
8711             theAngle, Parameters = ParseParameters(theAngle)
8712             if flag:
8713                 theAngle = theAngle*math.pi/180.0
8714             if theCopy:
8715                 anObj = self.TrsfOp.RotateCopy(theObject, theAxis, theAngle)
8716             else:
8717                 anObj = self.TrsfOp.Rotate(theObject, theAxis, theAngle)
8718             RaiseIfFailed("Rotate", self.TrsfOp)
8719             anObj.SetParameters(Parameters)
8720             return anObj
8721
8722         ## Rotate the given object around the given axis
8723         #  on the given angle, creating its copy before the rotation.
8724         #  @param theObject The object to be rotated.
8725         #  @param theAxis Rotation axis.
8726         #  @param theAngle Rotation angle in radians.
8727         #  @param theName Object name; when specified, this parameter is used
8728         #         for result publication in the study. Otherwise, if automatic
8729         #         publication is switched on, default value is used for result name.
8730         #
8731         #  @return New GEOM.GEOM_Object, containing the rotated object.
8732         #
8733         #  @ref tui_rotation "Example"
8734         @ManageTransactions("TrsfOp")
8735         def MakeRotation(self, theObject, theAxis, theAngle, theName=None):
8736             """
8737             Rotate the given object around the given axis
8738             on the given angle, creating its copy before the rotatation.
8739
8740             Parameters:
8741                 theObject The object to be rotated.
8742                 theAxis Rotation axis.
8743                 theAngle Rotation angle in radians.
8744                 theName Object name; when specified, this parameter is used
8745                         for result publication in the study. Otherwise, if automatic
8746                         publication is switched on, default value is used for result name.
8747
8748             Returns:
8749                 New GEOM.GEOM_Object, containing the rotated object.
8750             """
8751             # Example: see GEOM_TestAll.py
8752             flag = False
8753             if isinstance(theAngle,str):
8754                 flag = True
8755             theAngle, Parameters = ParseParameters(theAngle)
8756             if flag:
8757                 theAngle = theAngle*math.pi/180.0
8758             anObj = self.TrsfOp.RotateCopy(theObject, theAxis, theAngle)
8759             RaiseIfFailed("RotateCopy", self.TrsfOp)
8760             anObj.SetParameters(Parameters)
8761             self._autoPublish(anObj, theName, "rotated")
8762             return anObj
8763
8764         ## Rotate given object around vector perpendicular to plane
8765         #  containing three points.
8766         #  @param theObject The object to be rotated.
8767         #  @param theCentPoint central point the axis is the vector perpendicular to the plane
8768         #  containing the three points.
8769         #  @param thePoint1,thePoint2 points in a perpendicular plane of the axis.
8770         #  @param theCopy Flag used to rotate object itself or create a copy.
8771         #  @return Rotated @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
8772         #  new GEOM.GEOM_Object, containing the rotated object if @a theCopy flag is @c True.
8773         @ManageTransactions("TrsfOp")
8774         def RotateThreePoints(self, theObject, theCentPoint, thePoint1, thePoint2, theCopy=False):
8775             """
8776             Rotate given object around vector perpendicular to plane
8777             containing three points.
8778
8779             Parameters:
8780                 theObject The object to be rotated.
8781                 theCentPoint central point  the axis is the vector perpendicular to the plane
8782                              containing the three points.
8783                 thePoint1,thePoint2 points in a perpendicular plane of the axis.
8784                 theCopy Flag used to rotate object itself or create a copy.
8785
8786             Returns:
8787                 Rotated theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
8788                 new GEOM.GEOM_Object, containing the rotated object if theCopy flag is True.
8789             """
8790             if theCopy:
8791                 anObj = self.TrsfOp.RotateThreePointsCopy(theObject, theCentPoint, thePoint1, thePoint2)
8792             else:
8793                 anObj = self.TrsfOp.RotateThreePoints(theObject, theCentPoint, thePoint1, thePoint2)
8794             RaiseIfFailed("RotateThreePoints", self.TrsfOp)
8795             return anObj
8796
8797         ## Rotate given object around vector perpendicular to plane
8798         #  containing three points, creating its copy before the rotatation.
8799         #  @param theObject The object to be rotated.
8800         #  @param theCentPoint central point the axis is the vector perpendicular to the plane
8801         #  containing the three points.
8802         #  @param thePoint1,thePoint2 in a perpendicular plane of the axis.
8803         #  @param theName Object name; when specified, this parameter is used
8804         #         for result publication in the study. Otherwise, if automatic
8805         #         publication is switched on, default value is used for result name.
8806         #
8807         #  @return New GEOM.GEOM_Object, containing the rotated object.
8808         #
8809         #  @ref tui_rotation "Example"
8810         @ManageTransactions("TrsfOp")
8811         def MakeRotationThreePoints(self, theObject, theCentPoint, thePoint1, thePoint2, theName=None):
8812             """
8813             Rotate given object around vector perpendicular to plane
8814             containing three points, creating its copy before the rotatation.
8815
8816             Parameters:
8817                 theObject The object to be rotated.
8818                 theCentPoint central point  the axis is the vector perpendicular to the plane
8819                              containing the three points.
8820                 thePoint1,thePoint2  in a perpendicular plane of the axis.
8821                 theName Object name; when specified, this parameter is used
8822                         for result publication in the study. Otherwise, if automatic
8823                         publication is switched on, default value is used for result name.
8824
8825             Returns:
8826                 New GEOM.GEOM_Object, containing the rotated object.
8827             """
8828             # Example: see GEOM_TestAll.py
8829             anObj = self.TrsfOp.RotateThreePointsCopy(theObject, theCentPoint, thePoint1, thePoint2)
8830             RaiseIfFailed("RotateThreePointsCopy", self.TrsfOp)
8831             self._autoPublish(anObj, theName, "rotated")
8832             return anObj
8833
8834         ## Scale the given object by the specified factor.
8835         #  @param theObject The object to be scaled.
8836         #  @param thePoint Center point for scaling.
8837         #                  Passing None for it means scaling relatively the origin of global CS.
8838         #  @param theFactor Scaling factor value.
8839         #  @param theCopy Flag used to scale object itself or create a copy.
8840         #  @return Scaled @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
8841         #  new GEOM.GEOM_Object, containing the scaled object if @a theCopy flag is @c True.
8842         @ManageTransactions("TrsfOp")
8843         def Scale(self, theObject, thePoint, theFactor, theCopy=False):
8844             """
8845             Scale the given object by the specified factor.
8846
8847             Parameters:
8848                 theObject The object to be scaled.
8849                 thePoint Center point for scaling.
8850                          Passing None for it means scaling relatively the origin of global CS.
8851                 theFactor Scaling factor value.
8852                 theCopy Flag used to scale object itself or create a copy.
8853
8854             Returns:
8855                 Scaled theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
8856                 new GEOM.GEOM_Object, containing the scaled object if theCopy flag is True.
8857             """
8858             # Example: see GEOM_TestAll.py
8859             theFactor, Parameters = ParseParameters(theFactor)
8860             if theCopy:
8861                 anObj = self.TrsfOp.ScaleShapeCopy(theObject, thePoint, theFactor)
8862             else:
8863                 anObj = self.TrsfOp.ScaleShape(theObject, thePoint, theFactor)
8864             RaiseIfFailed("Scale", self.TrsfOp)
8865             anObj.SetParameters(Parameters)
8866             return anObj
8867
8868         ## Scale the given object by the factor, creating its copy before the scaling.
8869         #  @param theObject The object to be scaled.
8870         #  @param thePoint Center point for scaling.
8871         #                  Passing None for it means scaling relatively the origin of global CS.
8872         #  @param theFactor Scaling factor value.
8873         #  @param theName Object name; when specified, this parameter is used
8874         #         for result publication in the study. Otherwise, if automatic
8875         #         publication is switched on, default value is used for result name.
8876         #
8877         #  @return New GEOM.GEOM_Object, containing the scaled shape.
8878         #
8879         #  @ref tui_scale "Example"
8880         @ManageTransactions("TrsfOp")
8881         def MakeScaleTransform(self, theObject, thePoint, theFactor, theName=None):
8882             """
8883             Scale the given object by the factor, creating its copy before the scaling.
8884
8885             Parameters:
8886                 theObject The object to be scaled.
8887                 thePoint Center point for scaling.
8888                          Passing None for it means scaling relatively the origin of global CS.
8889                 theFactor Scaling factor value.
8890                 theName Object name; when specified, this parameter is used
8891                         for result publication in the study. Otherwise, if automatic
8892                         publication is switched on, default value is used for result name.
8893
8894             Returns:
8895                 New GEOM.GEOM_Object, containing the scaled shape.
8896             """
8897             # Example: see GEOM_TestAll.py
8898             theFactor, Parameters = ParseParameters(theFactor)
8899             anObj = self.TrsfOp.ScaleShapeCopy(theObject, thePoint, theFactor)
8900             RaiseIfFailed("ScaleShapeCopy", self.TrsfOp)
8901             anObj.SetParameters(Parameters)
8902             self._autoPublish(anObj, theName, "scaled")
8903             return anObj
8904
8905         ## Scale the given object by different factors along coordinate axes.
8906         #  @param theObject The object to be scaled.
8907         #  @param thePoint Center point for scaling.
8908         #                  Passing None for it means scaling relatively the origin of global CS.
8909         #  @param theFactorX,theFactorY,theFactorZ Scaling factors along each axis.
8910         #  @param theCopy Flag used to scale object itself or create a copy.
8911         #  @return Scaled @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
8912         #  new GEOM.GEOM_Object, containing the scaled object if @a theCopy flag is @c True.
8913         @ManageTransactions("TrsfOp")
8914         def ScaleAlongAxes(self, theObject, thePoint, theFactorX, theFactorY, theFactorZ, theCopy=False):
8915             """
8916             Scale the given object by different factors along coordinate axes.
8917
8918             Parameters:
8919                 theObject The object to be scaled.
8920                 thePoint Center point for scaling.
8921                             Passing None for it means scaling relatively the origin of global CS.
8922                 theFactorX,theFactorY,theFactorZ Scaling factors along each axis.
8923                 theCopy Flag used to scale object itself or create a copy.
8924
8925             Returns:
8926                 Scaled theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
8927                 new GEOM.GEOM_Object, containing the scaled object if theCopy flag is True.
8928             """
8929             # Example: see GEOM_TestAll.py
8930             theFactorX, theFactorY, theFactorZ, Parameters = ParseParameters(theFactorX, theFactorY, theFactorZ)
8931             if theCopy:
8932                 anObj = self.TrsfOp.ScaleShapeAlongAxesCopy(theObject, thePoint,
8933                                                             theFactorX, theFactorY, theFactorZ)
8934             else:
8935                 anObj = self.TrsfOp.ScaleShapeAlongAxes(theObject, thePoint,
8936                                                         theFactorX, theFactorY, theFactorZ)
8937             RaiseIfFailed("ScaleAlongAxes", self.TrsfOp)
8938             anObj.SetParameters(Parameters)
8939             return anObj
8940
8941         ## Scale the given object by different factors along coordinate axes,
8942         #  creating its copy before the scaling.
8943         #  @param theObject The object to be scaled.
8944         #  @param thePoint Center point for scaling.
8945         #                  Passing None for it means scaling relatively the origin of global CS.
8946         #  @param theFactorX,theFactorY,theFactorZ Scaling factors along each axis.
8947         #  @param theName Object name; when specified, this parameter is used
8948         #         for result publication in the study. Otherwise, if automatic
8949         #         publication is switched on, default value is used for result name.
8950         #
8951         #  @return New GEOM.GEOM_Object, containing the scaled shape.
8952         #
8953         #  @ref swig_scale "Example"
8954         @ManageTransactions("TrsfOp")
8955         def MakeScaleAlongAxes(self, theObject, thePoint, theFactorX, theFactorY, theFactorZ, theName=None):
8956             """
8957             Scale the given object by different factors along coordinate axes,
8958             creating its copy before the scaling.
8959
8960             Parameters:
8961                 theObject The object to be scaled.
8962                 thePoint Center point for scaling.
8963                             Passing None for it means scaling relatively the origin of global CS.
8964                 theFactorX,theFactorY,theFactorZ Scaling factors along each axis.
8965                 theName Object name; when specified, this parameter is used
8966                         for result publication in the study. Otherwise, if automatic
8967                         publication is switched on, default value is used for result name.
8968
8969             Returns:
8970                 New GEOM.GEOM_Object, containing the scaled shape.
8971             """
8972             # Example: see GEOM_TestAll.py
8973             theFactorX, theFactorY, theFactorZ, Parameters = ParseParameters(theFactorX, theFactorY, theFactorZ)
8974             anObj = self.TrsfOp.ScaleShapeAlongAxesCopy(theObject, thePoint,
8975                                                         theFactorX, theFactorY, theFactorZ)
8976             RaiseIfFailed("MakeScaleAlongAxes", self.TrsfOp)
8977             anObj.SetParameters(Parameters)
8978             self._autoPublish(anObj, theName, "scaled")
8979             return anObj
8980
8981         ## Mirror an object relatively the given plane.
8982         #  @param theObject The object to be mirrored.
8983         #  @param thePlane Plane of symmetry.
8984         #  @param theCopy Flag used to mirror object itself or create a copy.
8985         #  @return Mirrored @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
8986         #  new GEOM.GEOM_Object, containing the mirrored object if @a theCopy flag is @c True.
8987         @ManageTransactions("TrsfOp")
8988         def MirrorByPlane(self, theObject, thePlane, theCopy=False):
8989             """
8990             Mirror an object relatively the given plane.
8991
8992             Parameters:
8993                 theObject The object to be mirrored.
8994                 thePlane Plane of symmetry.
8995                 theCopy Flag used to mirror object itself or create a copy.
8996
8997             Returns:
8998                 Mirrored theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
8999                 new GEOM.GEOM_Object, containing the mirrored object if theCopy flag is True.
9000             """
9001             if theCopy:
9002                 anObj = self.TrsfOp.MirrorPlaneCopy(theObject, thePlane)
9003             else:
9004                 anObj = self.TrsfOp.MirrorPlane(theObject, thePlane)
9005             RaiseIfFailed("MirrorByPlane", self.TrsfOp)
9006             return anObj
9007
9008         ## Create an object, symmetrical
9009         #  to the given one relatively the given plane.
9010         #  @param theObject The object to be mirrored.
9011         #  @param thePlane Plane of symmetry.
9012         #  @param theName Object name; when specified, this parameter is used
9013         #         for result publication in the study. Otherwise, if automatic
9014         #         publication is switched on, default value is used for result name.
9015         #
9016         #  @return New GEOM.GEOM_Object, containing the mirrored shape.
9017         #
9018         #  @ref tui_mirror "Example"
9019         @ManageTransactions("TrsfOp")
9020         def MakeMirrorByPlane(self, theObject, thePlane, theName=None):
9021             """
9022             Create an object, symmetrical to the given one relatively the given plane.
9023
9024             Parameters:
9025                 theObject The object to be mirrored.
9026                 thePlane Plane of symmetry.
9027                 theName Object name; when specified, this parameter is used
9028                         for result publication in the study. Otherwise, if automatic
9029                         publication is switched on, default value is used for result name.
9030
9031             Returns:
9032                 New GEOM.GEOM_Object, containing the mirrored shape.
9033             """
9034             # Example: see GEOM_TestAll.py
9035             anObj = self.TrsfOp.MirrorPlaneCopy(theObject, thePlane)
9036             RaiseIfFailed("MirrorPlaneCopy", self.TrsfOp)
9037             self._autoPublish(anObj, theName, "mirrored")
9038             return anObj
9039
9040         ## Mirror an object relatively the given axis.
9041         #  @param theObject The object to be mirrored.
9042         #  @param theAxis Axis of symmetry.
9043         #  @param theCopy Flag used to mirror object itself or create a copy.
9044         #  @return Mirrored @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
9045         #  new GEOM.GEOM_Object, containing the mirrored object if @a theCopy flag is @c True.
9046         @ManageTransactions("TrsfOp")
9047         def MirrorByAxis(self, theObject, theAxis, theCopy=False):
9048             """
9049             Mirror an object relatively the given axis.
9050
9051             Parameters:
9052                 theObject The object to be mirrored.
9053                 theAxis Axis of symmetry.
9054                 theCopy Flag used to mirror object itself or create a copy.
9055
9056             Returns:
9057                 Mirrored theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
9058                 new GEOM.GEOM_Object, containing the mirrored object if theCopy flag is True.
9059             """
9060             if theCopy:
9061                 anObj = self.TrsfOp.MirrorAxisCopy(theObject, theAxis)
9062             else:
9063                 anObj = self.TrsfOp.MirrorAxis(theObject, theAxis)
9064             RaiseIfFailed("MirrorByAxis", self.TrsfOp)
9065             return anObj
9066
9067         ## Create an object, symmetrical
9068         #  to the given one relatively the given axis.
9069         #  @param theObject The object to be mirrored.
9070         #  @param theAxis Axis of symmetry.
9071         #  @param theName Object name; when specified, this parameter is used
9072         #         for result publication in the study. Otherwise, if automatic
9073         #         publication is switched on, default value is used for result name.
9074         #
9075         #  @return New GEOM.GEOM_Object, containing the mirrored shape.
9076         #
9077         #  @ref tui_mirror "Example"
9078         @ManageTransactions("TrsfOp")
9079         def MakeMirrorByAxis(self, theObject, theAxis, theName=None):
9080             """
9081             Create an object, symmetrical to the given one relatively the given axis.
9082
9083             Parameters:
9084                 theObject The object to be mirrored.
9085                 theAxis Axis of symmetry.
9086                 theName Object name; when specified, this parameter is used
9087                         for result publication in the study. Otherwise, if automatic
9088                         publication is switched on, default value is used for result name.
9089
9090             Returns:
9091                 New GEOM.GEOM_Object, containing the mirrored shape.
9092             """
9093             # Example: see GEOM_TestAll.py
9094             anObj = self.TrsfOp.MirrorAxisCopy(theObject, theAxis)
9095             RaiseIfFailed("MirrorAxisCopy", self.TrsfOp)
9096             self._autoPublish(anObj, theName, "mirrored")
9097             return anObj
9098
9099         ## Mirror an object relatively the given point.
9100         #  @param theObject The object to be mirrored.
9101         #  @param thePoint Point of symmetry.
9102         #  @param theCopy Flag used to mirror object itself or create a copy.
9103         #  @return Mirrored @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
9104         #  new GEOM.GEOM_Object, containing the mirrored object if @a theCopy flag is @c True.
9105         @ManageTransactions("TrsfOp")
9106         def MirrorByPoint(self, theObject, thePoint, theCopy=False):
9107             """
9108             Mirror an object relatively the given point.
9109
9110             Parameters:
9111                 theObject The object to be mirrored.
9112                 thePoint Point of symmetry.
9113                 theCopy Flag used to mirror object itself or create a copy.
9114
9115             Returns:
9116                 Mirrored theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
9117                 new GEOM.GEOM_Object, containing the mirrored object if theCopy flag is True.
9118             """
9119             # Example: see GEOM_TestAll.py
9120             if theCopy:
9121                 anObj = self.TrsfOp.MirrorPointCopy(theObject, thePoint)
9122             else:
9123                 anObj = self.TrsfOp.MirrorPoint(theObject, thePoint)
9124             RaiseIfFailed("MirrorByPoint", self.TrsfOp)
9125             return anObj
9126
9127         ## Create an object, symmetrical
9128         #  to the given one relatively the given point.
9129         #  @param theObject The object to be mirrored.
9130         #  @param thePoint Point of symmetry.
9131         #  @param theName Object name; when specified, this parameter is used
9132         #         for result publication in the study. Otherwise, if automatic
9133         #         publication is switched on, default value is used for result name.
9134         #
9135         #  @return New GEOM.GEOM_Object, containing the mirrored shape.
9136         #
9137         #  @ref tui_mirror "Example"
9138         @ManageTransactions("TrsfOp")
9139         def MakeMirrorByPoint(self, theObject, thePoint, theName=None):
9140             """
9141             Create an object, symmetrical
9142             to the given one relatively the given point.
9143
9144             Parameters:
9145                 theObject The object to be mirrored.
9146                 thePoint Point of symmetry.
9147                 theName Object name; when specified, this parameter is used
9148                         for result publication in the study. Otherwise, if automatic
9149                         publication is switched on, default value is used for result name.
9150
9151             Returns:
9152                 New GEOM.GEOM_Object, containing the mirrored shape.
9153             """
9154             # Example: see GEOM_TestAll.py
9155             anObj = self.TrsfOp.MirrorPointCopy(theObject, thePoint)
9156             RaiseIfFailed("MirrorPointCopy", self.TrsfOp)
9157             self._autoPublish(anObj, theName, "mirrored")
9158             return anObj
9159
9160         ## Modify the location of the given object.
9161         #  @param theObject The object to be displaced.
9162         #  @param theStartLCS Coordinate system to perform displacement from it.\n
9163         #                     If \a theStartLCS is NULL, displacement
9164         #                     will be performed from global CS.\n
9165         #                     If \a theObject itself is used as \a theStartLCS,
9166         #                     its location will be changed to \a theEndLCS.
9167         #  @param theEndLCS Coordinate system to perform displacement to it.
9168         #  @param theCopy Flag used to displace object itself or create a copy.
9169         #  @return Displaced @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
9170         #  new GEOM.GEOM_Object, containing the displaced object if @a theCopy flag is @c True.
9171         @ManageTransactions("TrsfOp")
9172         def Position(self, theObject, theStartLCS, theEndLCS, theCopy=False):
9173             """
9174             Modify the Location of the given object by LCS, creating its copy before the setting.
9175
9176             Parameters:
9177                 theObject The object to be displaced.
9178                 theStartLCS Coordinate system to perform displacement from it.
9179                             If theStartLCS is NULL, displacement
9180                             will be performed from global CS.
9181                             If theObject itself is used as theStartLCS,
9182                             its location will be changed to theEndLCS.
9183                 theEndLCS Coordinate system to perform displacement to it.
9184                 theCopy Flag used to displace object itself or create a copy.
9185
9186             Returns:
9187                 Displaced theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
9188                 new GEOM.GEOM_Object, containing the displaced object if theCopy flag is True.
9189             """
9190             # Example: see GEOM_TestAll.py
9191             if theCopy:
9192                 anObj = self.TrsfOp.PositionShapeCopy(theObject, theStartLCS, theEndLCS)
9193             else:
9194                 anObj = self.TrsfOp.PositionShape(theObject, theStartLCS, theEndLCS)
9195             RaiseIfFailed("Displace", self.TrsfOp)
9196             return anObj
9197
9198         ## Modify the Location of the given object by LCS,
9199         #  creating its copy before the setting.
9200         #  @param theObject The object to be displaced.
9201         #  @param theStartLCS Coordinate system to perform displacement from it.\n
9202         #                     If \a theStartLCS is NULL, displacement
9203         #                     will be performed from global CS.\n
9204         #                     If \a theObject itself is used as \a theStartLCS,
9205         #                     its location will be changed to \a theEndLCS.
9206         #  @param theEndLCS Coordinate system to perform displacement to it.
9207         #  @param theName Object name; when specified, this parameter is used
9208         #         for result publication in the study. Otherwise, if automatic
9209         #         publication is switched on, default value is used for result name.
9210         #
9211         #  @return New GEOM.GEOM_Object, containing the displaced shape.
9212         #
9213         #  @ref tui_modify_location "Example"
9214         @ManageTransactions("TrsfOp")
9215         def MakePosition(self, theObject, theStartLCS, theEndLCS, theName=None):
9216             """
9217             Modify the Location of the given object by LCS, creating its copy before the setting.
9218
9219             Parameters:
9220                 theObject The object to be displaced.
9221                 theStartLCS Coordinate system to perform displacement from it.
9222                             If theStartLCS is NULL, displacement
9223                             will be performed from global CS.
9224                             If theObject itself is used as theStartLCS,
9225                             its location will be changed to theEndLCS.
9226                 theEndLCS Coordinate system to perform displacement to it.
9227                 theName Object name; when specified, this parameter is used
9228                         for result publication in the study. Otherwise, if automatic
9229                         publication is switched on, default value is used for result name.
9230
9231             Returns:
9232                 New GEOM.GEOM_Object, containing the displaced shape.
9233
9234             Example of usage:
9235                 # create local coordinate systems
9236                 cs1 = geompy.MakeMarker( 0, 0, 0, 1,0,0, 0,1,0)
9237                 cs2 = geompy.MakeMarker(30,40,40, 1,0,0, 0,1,0)
9238                 # modify the location of the given object
9239                 position = geompy.MakePosition(cylinder, cs1, cs2)
9240             """
9241             # Example: see GEOM_TestAll.py
9242             anObj = self.TrsfOp.PositionShapeCopy(theObject, theStartLCS, theEndLCS)
9243             RaiseIfFailed("PositionShapeCopy", self.TrsfOp)
9244             self._autoPublish(anObj, theName, "displaced")
9245             return anObj
9246
9247         ## Modify the Location of the given object by Path.
9248         #  @param  theObject The object to be displaced.
9249         #  @param  thePath Wire or Edge along that the object will be translated.
9250         #  @param  theDistance progress of Path (0 = start location, 1 = end of path location).
9251         #  @param  theCopy is to create a copy objects if true.
9252         #  @param  theReverse  0 - for usual direction, 1 - to reverse path direction.
9253         #  @return Displaced @a theObject (GEOM.GEOM_Object) if @a theCopy is @c False or
9254         #          new GEOM.GEOM_Object, containing the displaced shape if @a theCopy is @c True.
9255         #
9256         #  @ref tui_modify_location "Example"
9257         @ManageTransactions("TrsfOp")
9258         def PositionAlongPath(self,theObject, thePath, theDistance, theCopy, theReverse):
9259             """
9260             Modify the Location of the given object by Path.
9261
9262             Parameters:
9263                  theObject The object to be displaced.
9264                  thePath Wire or Edge along that the object will be translated.
9265                  theDistance progress of Path (0 = start location, 1 = end of path location).
9266                  theCopy is to create a copy objects if true.
9267                  theReverse  0 - for usual direction, 1 - to reverse path direction.
9268
9269             Returns:
9270                  Displaced theObject (GEOM.GEOM_Object) if theCopy is False or
9271                  new GEOM.GEOM_Object, containing the displaced shape if theCopy is True.
9272
9273             Example of usage:
9274                 position = geompy.PositionAlongPath(cylinder, circle, 0.75, 1, 1)
9275             """
9276             # Example: see GEOM_TestAll.py
9277             anObj = self.TrsfOp.PositionAlongPath(theObject, thePath, theDistance, theCopy, theReverse)
9278             RaiseIfFailed("PositionAlongPath", self.TrsfOp)
9279             return anObj
9280
9281         ## Modify the Location of the given object by Path, creating its copy before the operation.
9282         #  @param theObject The object to be displaced.
9283         #  @param thePath Wire or Edge along that the object will be translated.
9284         #  @param theDistance progress of Path (0 = start location, 1 = end of path location).
9285         #  @param theReverse  0 - for usual direction, 1 - to reverse path direction.
9286         #  @param theName Object name; when specified, this parameter is used
9287         #         for result publication in the study. Otherwise, if automatic
9288         #         publication is switched on, default value is used for result name.
9289         #
9290         #  @return New GEOM.GEOM_Object, containing the displaced shape.
9291         @ManageTransactions("TrsfOp")
9292         def MakePositionAlongPath(self, theObject, thePath, theDistance, theReverse, theName=None):
9293             """
9294             Modify the Location of the given object by Path, creating its copy before the operation.
9295
9296             Parameters:
9297                  theObject The object to be displaced.
9298                  thePath Wire or Edge along that the object will be translated.
9299                  theDistance progress of Path (0 = start location, 1 = end of path location).
9300                  theReverse  0 - for usual direction, 1 - to reverse path direction.
9301                  theName Object name; when specified, this parameter is used
9302                          for result publication in the study. Otherwise, if automatic
9303                          publication is switched on, default value is used for result name.
9304
9305             Returns:
9306                 New GEOM.GEOM_Object, containing the displaced shape.
9307             """
9308             # Example: see GEOM_TestAll.py
9309             anObj = self.TrsfOp.PositionAlongPath(theObject, thePath, theDistance, 1, theReverse)
9310             RaiseIfFailed("PositionAlongPath", self.TrsfOp)
9311             self._autoPublish(anObj, theName, "displaced")
9312             return anObj
9313
9314         ## Offset given shape.
9315         #  @param theObject The base object for the offset.
9316         #  @param theOffset Offset value.
9317         #  @param theCopy Flag used to offset object itself or create a copy.
9318         #  @return Modified @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
9319         #  new GEOM.GEOM_Object, containing the result of offset operation if @a theCopy flag is @c True.
9320         @ManageTransactions("TrsfOp")
9321         def Offset(self, theObject, theOffset, theCopy=False):
9322             """
9323             Offset given shape.
9324
9325             Parameters:
9326                 theObject The base object for the offset.
9327                 theOffset Offset value.
9328                 theCopy Flag used to offset object itself or create a copy.
9329
9330             Returns:
9331                 Modified theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
9332                 new GEOM.GEOM_Object, containing the result of offset operation if theCopy flag is True.
9333             """
9334             theOffset, Parameters = ParseParameters(theOffset)
9335             if theCopy:
9336                 anObj = self.TrsfOp.OffsetShapeCopy(theObject, theOffset, True)
9337             else:
9338                 anObj = self.TrsfOp.OffsetShape(theObject, theOffset, True)
9339             RaiseIfFailed("Offset", self.TrsfOp)
9340             anObj.SetParameters(Parameters)
9341             return anObj
9342
9343         ## Create new object as offset of the given one. Gap between two adjacent
9344         #  offset surfaces is filled by a pipe.
9345         #  @param theObject The base object for the offset.
9346         #  @param theOffset Offset value.
9347         #  @param theName Object name; when specified, this parameter is used
9348         #         for result publication in the study. Otherwise, if automatic
9349         #         publication is switched on, default value is used for result name.
9350         #
9351         #  @return New GEOM.GEOM_Object, containing the offset object.
9352         #
9353         #  @sa MakeOffsetIntersectionJoin
9354         #  @ref tui_offset "Example"
9355         @ManageTransactions("TrsfOp")
9356         def MakeOffset(self, theObject, theOffset, theName=None):
9357             """
9358             Create new object as offset of the given one. Gap between adjacent
9359             offset surfaces is filled by a pipe.
9360
9361             Parameters:
9362                 theObject The base object for the offset.
9363                 theOffset Offset value.
9364                 theName Object name; when specified, this parameter is used
9365                         for result publication in the study. Otherwise, if automatic
9366                         publication is switched on, default value is used for result name.
9367
9368             Returns:
9369                 New GEOM.GEOM_Object, containing the offset object.
9370
9371             Example of usage:
9372                  box = geompy.MakeBox(20, 20, 20, 200, 200, 200)
9373                  # create a new object as offset of the given object
9374                  offset = geompy.MakeOffset(box, 70.)
9375             """
9376             # Example: see GEOM_TestAll.py
9377             theOffset, Parameters = ParseParameters(theOffset)
9378             anObj = self.TrsfOp.OffsetShapeCopy( theObject, theOffset, True )
9379             RaiseIfFailed("OffsetShapeCopy", self.TrsfOp)
9380             anObj.SetParameters(Parameters)
9381             self._autoPublish(anObj, theName, "offset")
9382             return anObj
9383
9384         ## Create new object as offset of the given one. Gap between adjacent
9385         #  offset surfaces is filled by extending and intersecting them.
9386         #  @param theObject The base object for the offset.
9387         #  @param theOffset Offset value.
9388         #  @param theName Object name; when specified, this parameter is used
9389         #         for result publication in the study. Otherwise, if automatic
9390         #         publication is switched on, default value is used for result name.
9391         #
9392         #  @return New GEOM.GEOM_Object, containing the offset object.
9393         #
9394         #  @sa MakeOffset
9395         #  @ref tui_offset "Example"
9396         @ManageTransactions("TrsfOp")
9397         def MakeOffsetIntersectionJoin(self, theObject, theOffset, theName=None):
9398             """
9399             Create new object as offset of the given one. Gap between adjacent
9400             offset surfaces is filled by extending and intersecting them.
9401
9402             Parameters:
9403                 theObject The base object for the offset.
9404                 theOffset Offset value.
9405                 theName Object name; when specified, this parameter is used
9406                         for result publication in the study. Otherwise, if automatic
9407                         publication is switched on, default value is used for result name.
9408
9409             Returns:
9410                 New GEOM.GEOM_Object, containing the offset object.
9411
9412             Example of usage:
9413                  box = geompy.MakeBox(20, 20, 20, 200, 200, 200)
9414                  # create a new box extended by 70
9415                  offset = geompy.MakeOffsetIntersectionJoin(box, 70.)
9416             """
9417             # Example: see GEOM_TestAll.py
9418             theOffset, Parameters = ParseParameters( theOffset )
9419             anObj = self.TrsfOp.OffsetShapeCopy( theObject, theOffset, False )
9420             RaiseIfFailed("OffsetShapeCopy", self.TrsfOp)
9421             anObj.SetParameters(Parameters)
9422             self._autoPublish(anObj, theName, "offset")
9423             return anObj
9424
9425         ## Create new object as projection of the given one on another.
9426         #  @param theSource The source object for the projection. It can be a point, edge or wire.
9427         #         Edge and wire are acceptable if @a theTarget is a face.
9428         #  @param theTarget The target object. It can be planar or cylindrical face, edge or wire.
9429         #  @param theName Object name; when specified, this parameter is used
9430         #         for result publication in the study. Otherwise, if automatic
9431         #         publication is switched on, default value is used for result name.
9432         #
9433         #  @return New GEOM.GEOM_Object, containing the projection.
9434         #
9435         #  @ref tui_projection "Example"
9436         @ManageTransactions("TrsfOp")
9437         def MakeProjection(self, theSource, theTarget, theName=None):
9438             """
9439             Create new object as projection of the given one on another.
9440
9441             Parameters:
9442                 theSource The source object for the projection. It can be a point, edge or wire.
9443                           Edge and wire are acceptable if theTarget is a face.
9444                 theTarget The target object. It can be planar or cylindrical face, edge or wire.
9445                 theName Object name; when specified, this parameter is used
9446                         for result publication in the study. Otherwise, if automatic
9447                         publication is switched on, default value is used for result name.
9448
9449             Returns:
9450                 New GEOM.GEOM_Object, containing the projection.
9451             """
9452             # Example: see GEOM_TestAll.py
9453             anObj = self.TrsfOp.ProjectShapeCopy(theSource, theTarget)
9454             RaiseIfFailed("ProjectShapeCopy", self.TrsfOp)
9455             self._autoPublish(anObj, theName, "projection")
9456             return anObj
9457
9458         ## Create a projection of the given point on a wire or an edge.
9459         #  If there are no solutions or there are 2 or more solutions It throws an
9460         #  exception.
9461         #  @param thePoint the point to be projected.
9462         #  @param theWire the wire. The edge is accepted as well.
9463         #  @param theName Object name; when specified, this parameter is used
9464         #         for result publication in the study. Otherwise, if automatic
9465         #         publication is switched on, default value is used for result name.
9466         #
9467         #  @return [\a u, \a PointOnEdge, \a EdgeInWireIndex]
9468         #  \n \a u: The parameter of projection point on edge.
9469         #  \n \a PointOnEdge: The projection point.
9470         #  \n \a EdgeInWireIndex: The index of an edge in a wire.
9471         #
9472         #  @ref tui_projection "Example"
9473         @ManageTransactions("TrsfOp")
9474         def MakeProjectionOnWire(self, thePoint, theWire, theName=None):
9475             """
9476             Create a projection of the given point on a wire or an edge.
9477             If there are no solutions or there are 2 or more solutions It throws an
9478             exception.
9479
9480             Parameters:
9481                 thePoint the point to be projected.
9482                 theWire the wire. The edge is accepted as well.
9483                 theName Object name; when specified, this parameter is used
9484                         for result publication in the study. Otherwise, if automatic
9485                         publication is switched on, default value is used for result name.
9486
9487             Returns:
9488                 [u, PointOnEdge, EdgeInWireIndex]
9489                  u: The parameter of projection point on edge.
9490                  PointOnEdge: The projection point.
9491                  EdgeInWireIndex: The index of an edge in a wire.
9492             """
9493             # Example: see GEOM_TestAll.py
9494             anObj = self.TrsfOp.ProjectPointOnWire(thePoint, theWire)
9495             RaiseIfFailed("ProjectPointOnWire", self.TrsfOp)
9496             self._autoPublish(anObj[1], theName, "projection")
9497             return anObj
9498
9499         # -----------------------------------------------------------------------------
9500         # Patterns
9501         # -----------------------------------------------------------------------------
9502
9503         ## Translate the given object along the given vector a given number times
9504         #  @param theObject The object to be translated.
9505         #  @param theVector Direction of the translation. DX if None.
9506         #  @param theStep Distance to translate on.
9507         #  @param theNbTimes Quantity of translations to be done.
9508         #  @param theName Object name; when specified, this parameter is used
9509         #         for result publication in the study. Otherwise, if automatic
9510         #         publication is switched on, default value is used for result name.
9511         #
9512         #  @return New GEOM.GEOM_Object, containing compound of all
9513         #          the shapes, obtained after each translation.
9514         #
9515         #  @ref tui_multi_translation "Example"
9516         @ManageTransactions("TrsfOp")
9517         def MakeMultiTranslation1D(self, theObject, theVector, theStep, theNbTimes, theName=None):
9518             """
9519             Translate the given object along the given vector a given number times
9520
9521             Parameters:
9522                 theObject The object to be translated.
9523                 theVector Direction of the translation. DX if None.
9524                 theStep Distance to translate on.
9525                 theNbTimes Quantity of translations to be done.
9526                 theName Object name; when specified, this parameter is used
9527                         for result publication in the study. Otherwise, if automatic
9528                         publication is switched on, default value is used for result name.
9529
9530             Returns:
9531                 New GEOM.GEOM_Object, containing compound of all
9532                 the shapes, obtained after each translation.
9533
9534             Example of usage:
9535                 r1d = geompy.MakeMultiTranslation1D(prism, vect, 20, 4)
9536             """
9537             # Example: see GEOM_TestAll.py
9538             theStep, theNbTimes, Parameters = ParseParameters(theStep, theNbTimes)
9539             anObj = self.TrsfOp.MultiTranslate1D(theObject, theVector, theStep, theNbTimes)
9540             RaiseIfFailed("MultiTranslate1D", self.TrsfOp)
9541             anObj.SetParameters(Parameters)
9542             self._autoPublish(anObj, theName, "multitranslation")
9543             return anObj
9544
9545         ## Conseqently apply two specified translations to theObject specified number of times.
9546         #  @param theObject The object to be translated.
9547         #  @param theVector1 Direction of the first translation. DX if None.
9548         #  @param theStep1 Step of the first translation.
9549         #  @param theNbTimes1 Quantity of translations to be done along theVector1.
9550         #  @param theVector2 Direction of the second translation. DY if None.
9551         #  @param theStep2 Step of the second translation.
9552         #  @param theNbTimes2 Quantity of translations to be done along theVector2.
9553         #  @param theName Object name; when specified, this parameter is used
9554         #         for result publication in the study. Otherwise, if automatic
9555         #         publication is switched on, default value is used for result name.
9556         #
9557         #  @return New GEOM.GEOM_Object, containing compound of all
9558         #          the shapes, obtained after each translation.
9559         #
9560         #  @ref tui_multi_translation "Example"
9561         @ManageTransactions("TrsfOp")
9562         def MakeMultiTranslation2D(self, theObject, theVector1, theStep1, theNbTimes1,
9563                                    theVector2, theStep2, theNbTimes2, theName=None):
9564             """
9565             Conseqently apply two specified translations to theObject specified number of times.
9566
9567             Parameters:
9568                 theObject The object to be translated.
9569                 theVector1 Direction of the first translation. DX if None.
9570                 theStep1 Step of the first translation.
9571                 theNbTimes1 Quantity of translations to be done along theVector1.
9572                 theVector2 Direction of the second translation. DY if None.
9573                 theStep2 Step of the second translation.
9574                 theNbTimes2 Quantity of translations to be done along theVector2.
9575                 theName Object name; when specified, this parameter is used
9576                         for result publication in the study. Otherwise, if automatic
9577                         publication is switched on, default value is used for result name.
9578
9579             Returns:
9580                 New GEOM.GEOM_Object, containing compound of all
9581                 the shapes, obtained after each translation.
9582
9583             Example of usage:
9584                 tr2d = geompy.MakeMultiTranslation2D(prism, vect1, 20, 4, vect2, 80, 3)
9585             """
9586             # Example: see GEOM_TestAll.py
9587             theStep1,theNbTimes1,theStep2,theNbTimes2, Parameters = ParseParameters(theStep1,theNbTimes1,theStep2,theNbTimes2)
9588             anObj = self.TrsfOp.MultiTranslate2D(theObject, theVector1, theStep1, theNbTimes1,
9589                                                  theVector2, theStep2, theNbTimes2)
9590             RaiseIfFailed("MultiTranslate2D", self.TrsfOp)
9591             anObj.SetParameters(Parameters)
9592             self._autoPublish(anObj, theName, "multitranslation")
9593             return anObj
9594
9595         ## Rotate the given object around the given axis a given number times.
9596         #  Rotation angle will be 2*PI/theNbTimes.
9597         #  @param theObject The object to be rotated.
9598         #  @param theAxis The rotation axis. DZ if None.
9599         #  @param theNbTimes Quantity of rotations to be done.
9600         #  @param theName Object name; when specified, this parameter is used
9601         #         for result publication in the study. Otherwise, if automatic
9602         #         publication is switched on, default value is used for result name.
9603         #
9604         #  @return New GEOM.GEOM_Object, containing compound of all the
9605         #          shapes, obtained after each rotation.
9606         #
9607         #  @ref tui_multi_rotation "Example"
9608         @ManageTransactions("TrsfOp")
9609         def MultiRotate1DNbTimes (self, theObject, theAxis, theNbTimes, theName=None):
9610             """
9611             Rotate the given object around the given axis a given number times.
9612             Rotation angle will be 2*PI/theNbTimes.
9613
9614             Parameters:
9615                 theObject The object to be rotated.
9616                 theAxis The rotation axis. DZ if None.
9617                 theNbTimes Quantity of rotations to be done.
9618                 theName Object name; when specified, this parameter is used
9619                         for result publication in the study. Otherwise, if automatic
9620                         publication is switched on, default value is used for result name.
9621
9622             Returns:
9623                 New GEOM.GEOM_Object, containing compound of all the
9624                 shapes, obtained after each rotation.
9625
9626             Example of usage:
9627                 rot1d = geompy.MultiRotate1DNbTimes(prism, vect, 4)
9628             """
9629             # Example: see GEOM_TestAll.py
9630             theNbTimes, Parameters = ParseParameters(theNbTimes)
9631             anObj = self.TrsfOp.MultiRotate1D(theObject, theAxis, theNbTimes)
9632             RaiseIfFailed("MultiRotate1DNbTimes", self.TrsfOp)
9633             anObj.SetParameters(Parameters)
9634             self._autoPublish(anObj, theName, "multirotation")
9635             return anObj
9636
9637         ## Rotate the given object around the given axis
9638         #  a given number times on the given angle.
9639         #  @param theObject The object to be rotated.
9640         #  @param theAxis The rotation axis. DZ if None.
9641         #  @param theAngleStep Rotation angle in radians.
9642         #  @param theNbTimes Quantity of rotations to be done.
9643         #  @param theName Object name; when specified, this parameter is used
9644         #         for result publication in the study. Otherwise, if automatic
9645         #         publication is switched on, default value is used for result name.
9646         #
9647         #  @return New GEOM.GEOM_Object, containing compound of all the
9648         #          shapes, obtained after each rotation.
9649         #
9650         #  @ref tui_multi_rotation "Example"
9651         @ManageTransactions("TrsfOp")
9652         def MultiRotate1DByStep(self, theObject, theAxis, theAngleStep, theNbTimes, theName=None):
9653             """
9654             Rotate the given object around the given axis
9655             a given number times on the given angle.
9656
9657             Parameters:
9658                 theObject The object to be rotated.
9659                 theAxis The rotation axis. DZ if None.
9660                 theAngleStep Rotation angle in radians.
9661                 theNbTimes Quantity of rotations to be done.
9662                 theName Object name; when specified, this parameter is used
9663                         for result publication in the study. Otherwise, if automatic
9664                         publication is switched on, default value is used for result name.
9665
9666             Returns:
9667                 New GEOM.GEOM_Object, containing compound of all the
9668                 shapes, obtained after each rotation.
9669
9670             Example of usage:
9671                 rot1d = geompy.MultiRotate1DByStep(prism, vect, math.pi/4, 4)
9672             """
9673             # Example: see GEOM_TestAll.py
9674             theAngleStep, theNbTimes, Parameters = ParseParameters(theAngleStep, theNbTimes)
9675             anObj = self.TrsfOp.MultiRotate1DByStep(theObject, theAxis, theAngleStep, theNbTimes)
9676             RaiseIfFailed("MultiRotate1DByStep", self.TrsfOp)
9677             anObj.SetParameters(Parameters)
9678             self._autoPublish(anObj, theName, "multirotation")
9679             return anObj
9680
9681         ## Rotate the given object around the given axis a given
9682         #  number times and multi-translate each rotation result.
9683         #  Rotation angle will be 2*PI/theNbTimes1.
9684         #  Translation direction passes through center of gravity
9685         #  of rotated shape and its projection on the rotation axis.
9686         #  @param theObject The object to be rotated.
9687         #  @param theAxis Rotation axis. DZ if None.
9688         #  @param theNbTimes1 Quantity of rotations to be done.
9689         #  @param theRadialStep Translation distance.
9690         #  @param theNbTimes2 Quantity of translations to be done.
9691         #  @param theName Object name; when specified, this parameter is used
9692         #         for result publication in the study. Otherwise, if automatic
9693         #         publication is switched on, default value is used for result name.
9694         #
9695         #  @return New GEOM.GEOM_Object, containing compound of all the
9696         #          shapes, obtained after each transformation.
9697         #
9698         #  @ref tui_multi_rotation "Example"
9699         @ManageTransactions("TrsfOp")
9700         def MultiRotate2DNbTimes(self, theObject, theAxis, theNbTimes1, theRadialStep, theNbTimes2, theName=None):
9701             """
9702             Rotate the given object around the
9703             given axis on the given angle a given number
9704             times and multi-translate each rotation result.
9705             Translation direction passes through center of gravity
9706             of rotated shape and its projection on the rotation axis.
9707
9708             Parameters:
9709                 theObject The object to be rotated.
9710                 theAxis Rotation axis. DZ if None.
9711                 theNbTimes1 Quantity of rotations to be done.
9712                 theRadialStep Translation distance.
9713                 theNbTimes2 Quantity of translations to be done.
9714                 theName Object name; when specified, this parameter is used
9715                         for result publication in the study. Otherwise, if automatic
9716                         publication is switched on, default value is used for result name.
9717
9718             Returns:
9719                 New GEOM.GEOM_Object, containing compound of all the
9720                 shapes, obtained after each transformation.
9721
9722             Example of usage:
9723                 rot2d = geompy.MultiRotate2D(prism, vect, 60, 4, 50, 5)
9724             """
9725             # Example: see GEOM_TestAll.py
9726             theNbTimes1, theRadialStep, theNbTimes2, Parameters = ParseParameters(theNbTimes1, theRadialStep, theNbTimes2)
9727             anObj = self.TrsfOp.MultiRotate2DNbTimes(theObject, theAxis, theNbTimes1, theRadialStep, theNbTimes2)
9728             RaiseIfFailed("MultiRotate2DNbTimes", self.TrsfOp)
9729             anObj.SetParameters(Parameters)
9730             self._autoPublish(anObj, theName, "multirotation")
9731             return anObj
9732
9733         ## Rotate the given object around the
9734         #  given axis on the given angle a given number
9735         #  times and multi-translate each rotation result.
9736         #  Translation direction passes through center of gravity
9737         #  of rotated shape and its projection on the rotation axis.
9738         #  @param theObject The object to be rotated.
9739         #  @param theAxis Rotation axis. DZ if None.
9740         #  @param theAngleStep Rotation angle in radians.
9741         #  @param theNbTimes1 Quantity of rotations to be done.
9742         #  @param theRadialStep Translation distance.
9743         #  @param theNbTimes2 Quantity of translations to be done.
9744         #  @param theName Object name; when specified, this parameter is used
9745         #         for result publication in the study. Otherwise, if automatic
9746         #         publication is switched on, default value is used for result name.
9747         #
9748         #  @return New GEOM.GEOM_Object, containing compound of all the
9749         #          shapes, obtained after each transformation.
9750         #
9751         #  @ref tui_multi_rotation "Example"
9752         @ManageTransactions("TrsfOp")
9753         def MultiRotate2DByStep (self, theObject, theAxis, theAngleStep, theNbTimes1, theRadialStep, theNbTimes2, theName=None):
9754             """
9755             Rotate the given object around the
9756             given axis on the given angle a given number
9757             times and multi-translate each rotation result.
9758             Translation direction passes through center of gravity
9759             of rotated shape and its projection on the rotation axis.
9760
9761             Parameters:
9762                 theObject The object to be rotated.
9763                 theAxis Rotation axis. DZ if None.
9764                 theAngleStep Rotation angle in radians.
9765                 theNbTimes1 Quantity of rotations to be done.
9766                 theRadialStep Translation distance.
9767                 theNbTimes2 Quantity of translations to be done.
9768                 theName Object name; when specified, this parameter is used
9769                         for result publication in the study. Otherwise, if automatic
9770                         publication is switched on, default value is used for result name.
9771
9772             Returns:
9773                 New GEOM.GEOM_Object, containing compound of all the
9774                 shapes, obtained after each transformation.
9775
9776             Example of usage:
9777                 rot2d = geompy.MultiRotate2D(prism, vect, math.pi/3, 4, 50, 5)
9778             """
9779             # Example: see GEOM_TestAll.py
9780             theAngleStep, theNbTimes1, theRadialStep, theNbTimes2, Parameters = ParseParameters(theAngleStep, theNbTimes1, theRadialStep, theNbTimes2)
9781             anObj = self.TrsfOp.MultiRotate2DByStep(theObject, theAxis, theAngleStep, theNbTimes1, theRadialStep, theNbTimes2)
9782             RaiseIfFailed("MultiRotate2DByStep", self.TrsfOp)
9783             anObj.SetParameters(Parameters)
9784             self._autoPublish(anObj, theName, "multirotation")
9785             return anObj
9786
9787         ## The same, as MultiRotate1DNbTimes(), but axis is given by direction and point
9788         #
9789         #  @ref swig_MakeMultiRotation "Example"
9790         def MakeMultiRotation1DNbTimes(self, aShape, aDir, aPoint, aNbTimes, theName=None):
9791             """
9792             The same, as geompy.MultiRotate1DNbTimes, but axis is given by direction and point
9793
9794             Example of usage:
9795                 pz = geompy.MakeVertex(0, 0, 100)
9796                 vy = geompy.MakeVectorDXDYDZ(0, 100, 0)
9797                 MultiRot1D = geompy.MakeMultiRotation1DNbTimes(prism, vy, pz, 6)
9798             """
9799             # Example: see GEOM_TestOthers.py
9800             aVec = self.MakeLine(aPoint,aDir)
9801             # note: auto-publishing is done in self.MultiRotate1D()
9802             anObj = self.MultiRotate1DNbTimes(aShape, aVec, aNbTimes, theName)
9803             return anObj
9804
9805         ## The same, as MultiRotate1DByStep(), but axis is given by direction and point
9806         #
9807         #  @ref swig_MakeMultiRotation "Example"
9808         def MakeMultiRotation1DByStep(self, aShape, aDir, aPoint, anAngle, aNbTimes, theName=None):
9809             """
9810             The same, as geompy.MultiRotate1D, but axis is given by direction and point
9811
9812             Example of usage:
9813                 pz = geompy.MakeVertex(0, 0, 100)
9814                 vy = geompy.MakeVectorDXDYDZ(0, 100, 0)
9815                 MultiRot1D = geompy.MakeMultiRotation1DByStep(prism, vy, pz, math.pi/3, 6)
9816             """
9817             # Example: see GEOM_TestOthers.py
9818             aVec = self.MakeLine(aPoint,aDir)
9819             # note: auto-publishing is done in self.MultiRotate1D()
9820             anObj = self.MultiRotate1DByStep(aShape, aVec, anAngle, aNbTimes, theName)
9821             return anObj
9822
9823         ## The same, as MultiRotate2DNbTimes(), but axis is given by direction and point
9824         #
9825         #  @ref swig_MakeMultiRotation "Example"
9826         def MakeMultiRotation2DNbTimes(self, aShape, aDir, aPoint, nbtimes1, aStep, nbtimes2, theName=None):
9827             """
9828             The same, as MultiRotate2DNbTimes(), but axis is given by direction and point
9829
9830             Example of usage:
9831                 pz = geompy.MakeVertex(0, 0, 100)
9832                 vy = geompy.MakeVectorDXDYDZ(0, 100, 0)
9833                 MultiRot2D = geompy.MakeMultiRotation2DNbTimes(f12, vy, pz, 6, 30, 3)
9834             """
9835             # Example: see GEOM_TestOthers.py
9836             aVec = self.MakeLine(aPoint,aDir)
9837             # note: auto-publishing is done in self.MultiRotate2DNbTimes()
9838             anObj = self.MultiRotate2DNbTimes(aShape, aVec, nbtimes1, aStep, nbtimes2, theName)
9839             return anObj
9840
9841         ## The same, as MultiRotate2DByStep(), but axis is given by direction and point
9842         #
9843         #  @ref swig_MakeMultiRotation "Example"
9844         def MakeMultiRotation2DByStep(self, aShape, aDir, aPoint, anAngle, nbtimes1, aStep, nbtimes2, theName=None):
9845             """
9846             The same, as MultiRotate2DByStep(), but axis is given by direction and point
9847
9848             Example of usage:
9849                 pz = geompy.MakeVertex(0, 0, 100)
9850                 vy = geompy.MakeVectorDXDYDZ(0, 100, 0)
9851                 MultiRot2D = geompy.MakeMultiRotation2DByStep(f12, vy, pz, math.pi/4, 6, 30, 3)
9852             """
9853             # Example: see GEOM_TestOthers.py
9854             aVec = self.MakeLine(aPoint,aDir)
9855             # note: auto-publishing is done in self.MultiRotate2D()
9856             anObj = self.MultiRotate2DByStep(aShape, aVec, anAngle, nbtimes1, aStep, nbtimes2, theName)
9857             return anObj
9858
9859         ##
9860         #  Compute a wire or a face that represents a projection of the source
9861         #  shape onto cylinder. The cylinder's coordinate system is the same
9862         #  as the global coordinate system.
9863         #
9864         #  @param theObject The object to be projected. It can be either
9865         #         a planar wire or a face.
9866         #  @param theRadius The radius of the cylinder.
9867         #  @param theStartAngle The starting angle in radians from
9868         #         the cylinder's X axis around Z axis. The angle from which
9869         #         the projection is started.
9870         #  @param theAngleLength The projection length angle in radians.
9871         #         The angle in which to project the total length of the wire.
9872         #         If it is negative the projection is not scaled and natural
9873         #         wire length is kept for the projection.
9874         #  @param theAngleRotation The desired angle in radians between
9875         #         the tangent vector to the first curve at the first point of
9876         #         the theObject's projection in 2D space and U-direction of
9877         #         cylinder's 2D space.
9878         #  @param theName Object name; when specified, this parameter is used
9879         #         for result publication in the study. Otherwise, if automatic
9880         #         publication is switched on, default value is used for result name.
9881         #
9882         #  @return New GEOM.GEOM_Object, containing the result shape. The result
9883         #         represents a wire or a face that represents a projection of
9884         #         the source shape onto a cylinder.
9885         #
9886         #  @ref tui_projection "Example"
9887         def MakeProjectionOnCylinder (self, theObject, theRadius,
9888                                       theStartAngle=0.0, theAngleLength=-1.0,
9889                                       theAngleRotation=0.0,
9890                                       theName=None):
9891             """
9892             Compute a wire or a face that represents a projection of the source
9893             shape onto cylinder. The cylinder's coordinate system is the same
9894             as the global coordinate system.
9895
9896             Parameters:
9897                 theObject The object to be projected. It can be either
9898                         a planar wire or a face.
9899                 theRadius The radius of the cylinder.
9900                 theStartAngle The starting angle in radians from the cylinder's X axis
9901                         around Z axis. The angle from which the projection is started.
9902                 theAngleLength The projection length angle in radians. The angle in which
9903                         to project the total length of the wire. If it is negative the
9904                         projection is not scaled and natural wire length is kept for
9905                         the projection.
9906                 theAngleRotation The desired angle in radians between
9907                         the tangent vector to the first curve at the first
9908                         point of the theObject's projection in 2D space and
9909                         U-direction of cylinder's 2D space.
9910                 theName Object name; when specified, this parameter is used
9911                         for result publication in the study. Otherwise, if automatic
9912                         publication is switched on, default value is used for result name.
9913
9914             Returns:
9915                 New GEOM.GEOM_Object, containing the result shape. The result
9916                 represents a wire or a face that represents a projection of
9917                 the source shape onto a cylinder.
9918             """
9919             # Example: see GEOM_TestAll.py
9920             flagStartAngle = False
9921             if isinstance(theStartAngle,str):
9922                 flagStartAngle = True
9923             flagAngleLength = False
9924             if isinstance(theAngleLength,str):
9925                 flagAngleLength = True
9926             flagAngleRotation = False
9927             if isinstance(theAngleRotation,str):
9928                 flagAngleRotation = True
9929             theRadius, theStartAngle, theAngleLength, theAngleRotation, Parameters = ParseParameters(
9930               theRadius, theStartAngle, theAngleLength, theAngleRotation)
9931             if flagStartAngle:
9932                 theStartAngle = theStartAngle*math.pi/180.
9933             if flagAngleLength:
9934                 theAngleLength = theAngleLength*math.pi/180.
9935             if flagAngleRotation:
9936                 theAngleRotation = theAngleRotation*math.pi/180.
9937             anObj = self.TrsfOp.MakeProjectionOnCylinder(theObject, theRadius,
9938                 theStartAngle, theAngleLength, theAngleRotation)
9939             RaiseIfFailed("MakeProjectionOnCylinder", self.TrsfOp)
9940             anObj.SetParameters(Parameters)
9941             self._autoPublish(anObj, theName, "projection")
9942             return anObj
9943
9944         # end of l3_transform
9945         ## @}
9946
9947         ## @addtogroup l3_transform_d
9948         ## @{
9949
9950         ## Deprecated method. Use MultiRotate1DNbTimes instead.
9951         def MultiRotate1D(self, theObject, theAxis, theNbTimes, theName=None):
9952             """
9953             Deprecated method. Use MultiRotate1DNbTimes instead.
9954             """
9955             print("The method MultiRotate1D is DEPRECATED. Use MultiRotate1DNbTimes instead.")
9956             return self.MultiRotate1DNbTimes(theObject, theAxis, theNbTimes, theName)
9957
9958         ## The same, as MultiRotate2DByStep(), but theAngle is in degrees.
9959         #  This method is DEPRECATED. Use MultiRotate2DByStep() instead.
9960         @ManageTransactions("TrsfOp")
9961         def MultiRotate2D(self, theObject, theAxis, theAngle, theNbTimes1, theStep, theNbTimes2, theName=None):
9962             """
9963             The same, as MultiRotate2DByStep(), but theAngle is in degrees.
9964             This method is DEPRECATED. Use MultiRotate2DByStep() instead.
9965
9966             Example of usage:
9967                 rot2d = geompy.MultiRotate2D(prism, vect, 60, 4, 50, 5)
9968             """
9969             print("The method MultiRotate2D is DEPRECATED. Use MultiRotate2DByStep instead.")
9970             theAngle, theNbTimes1, theStep, theNbTimes2, Parameters = ParseParameters(theAngle, theNbTimes1, theStep, theNbTimes2)
9971             anObj = self.TrsfOp.MultiRotate2D(theObject, theAxis, theAngle, theNbTimes1, theStep, theNbTimes2)
9972             RaiseIfFailed("MultiRotate2D", self.TrsfOp)
9973             anObj.SetParameters(Parameters)
9974             self._autoPublish(anObj, theName, "multirotation")
9975             return anObj
9976
9977         ## The same, as MultiRotate1D(), but axis is given by direction and point
9978         #  This method is DEPRECATED. Use MakeMultiRotation1DNbTimes instead.
9979         def MakeMultiRotation1D(self, aShape, aDir, aPoint, aNbTimes, theName=None):
9980             """
9981             The same, as geompy.MultiRotate1D, but axis is given by direction and point.
9982             This method is DEPRECATED. Use MakeMultiRotation1DNbTimes instead.
9983
9984             Example of usage:
9985                 pz = geompy.MakeVertex(0, 0, 100)
9986                 vy = geompy.MakeVectorDXDYDZ(0, 100, 0)
9987                 MultiRot1D = geompy.MakeMultiRotation1D(prism, vy, pz, 6)
9988             """
9989             print("The method MakeMultiRotation1D is DEPRECATED. Use MakeMultiRotation1DNbTimes instead.")
9990             aVec = self.MakeLine(aPoint,aDir)
9991             # note: auto-publishing is done in self.MultiRotate1D()
9992             anObj = self.MultiRotate1D(aShape, aVec, aNbTimes, theName)
9993             return anObj
9994
9995         ## The same, as MultiRotate2D(), but axis is given by direction and point
9996         #  This method is DEPRECATED. Use MakeMultiRotation2DByStep instead.
9997         def MakeMultiRotation2D(self, aShape, aDir, aPoint, anAngle, nbtimes1, aStep, nbtimes2, theName=None):
9998             """
9999             The same, as MultiRotate2D(), but axis is given by direction and point
10000             This method is DEPRECATED. Use MakeMultiRotation2DByStep instead.
10001
10002             Example of usage:
10003                 pz = geompy.MakeVertex(0, 0, 100)
10004                 vy = geompy.MakeVectorDXDYDZ(0, 100, 0)
10005                 MultiRot2D = geompy.MakeMultiRotation2D(f12, vy, pz, 45, 6, 30, 3)
10006             """
10007             print("The method MakeMultiRotation2D is DEPRECATED. Use MakeMultiRotation2DByStep instead.")
10008             aVec = self.MakeLine(aPoint,aDir)
10009             # note: auto-publishing is done in self.MultiRotate2D()
10010             anObj = self.MultiRotate2D(aShape, aVec, anAngle, nbtimes1, aStep, nbtimes2, theName)
10011             return anObj
10012
10013         # end of l3_transform_d
10014         ## @}
10015
10016         ## @addtogroup l3_local
10017         ## @{
10018
10019         ## Perform a fillet on all edges of the given shape.
10020         #  @param theShape Shape, to perform fillet on.
10021         #  @param theR Fillet radius.
10022         #  @param theName Object name; when specified, this parameter is used
10023         #         for result publication in the study. Otherwise, if automatic
10024         #         publication is switched on, default value is used for result name.
10025         #
10026         #  @return New GEOM.GEOM_Object, containing the result shape.
10027         #
10028         #  @ref tui_fillet "Example 1"
10029         #  \n @ref swig_MakeFilletAll "Example 2"
10030         @ManageTransactions("LocalOp")
10031         def MakeFilletAll(self, theShape, theR, theName=None):
10032             """
10033             Perform a fillet on all edges of the given shape.
10034
10035             Parameters:
10036                 theShape Shape, to perform fillet on.
10037                 theR Fillet radius.
10038                 theName Object name; when specified, this parameter is used
10039                         for result publication in the study. Otherwise, if automatic
10040                         publication is switched on, default value is used for result name.
10041
10042             Returns:
10043                 New GEOM.GEOM_Object, containing the result shape.
10044
10045             Example of usage:
10046                filletall = geompy.MakeFilletAll(prism, 10.)
10047             """
10048             # Example: see GEOM_TestOthers.py
10049             theR,Parameters = ParseParameters(theR)
10050             anObj = self.LocalOp.MakeFilletAll(theShape, theR)
10051             RaiseIfFailed("MakeFilletAll", self.LocalOp)
10052             anObj.SetParameters(Parameters)
10053             self._autoPublish(anObj, theName, "fillet")
10054             return anObj
10055
10056         ## Perform a fillet on the specified edges/faces of the given shape
10057         #  @param theShape Shape, to perform fillet on.
10058         #  @param theR Fillet radius.
10059         #  @param theShapeType Type of shapes in <VAR>theListShapes</VAR> (see ShapeType())
10060         #  @param theListShapes Global indices of edges/faces to perform fillet on.
10061         #  @param theName Object name; when specified, this parameter is used
10062         #         for result publication in the study. Otherwise, if automatic
10063         #         publication is switched on, default value is used for result name.
10064         #
10065         #  @note Global index of sub-shape can be obtained, using method GetSubShapeID().
10066         #
10067         #  @return New GEOM.GEOM_Object, containing the result shape.
10068         #
10069         #  @ref tui_fillet "Example"
10070         @ManageTransactions("LocalOp")
10071         def MakeFillet(self, theShape, theR, theShapeType, theListShapes, theName=None):
10072             """
10073             Perform a fillet on the specified edges/faces of the given shape
10074
10075             Parameters:
10076                 theShape Shape, to perform fillet on.
10077                 theR Fillet radius.
10078                 theShapeType Type of shapes in theListShapes (see geompy.ShapeTypes)
10079                 theListShapes Global indices of edges/faces to perform fillet on.
10080                 theName Object name; when specified, this parameter is used
10081                         for result publication in the study. Otherwise, if automatic
10082                         publication is switched on, default value is used for result name.
10083
10084             Note:
10085                 Global index of sub-shape can be obtained, using method geompy.GetSubShapeID
10086
10087             Returns:
10088                 New GEOM.GEOM_Object, containing the result shape.
10089
10090             Example of usage:
10091                 # get the list of IDs (IDList) for the fillet
10092                 prism_edges = geompy.SubShapeAllSortedCentres(prism, geompy.ShapeType["EDGE"])
10093                 IDlist_e = []
10094                 IDlist_e.append(geompy.GetSubShapeID(prism, prism_edges[0]))
10095                 IDlist_e.append(geompy.GetSubShapeID(prism, prism_edges[1]))
10096                 IDlist_e.append(geompy.GetSubShapeID(prism, prism_edges[2]))
10097                 # make a fillet on the specified edges of the given shape
10098                 fillet = geompy.MakeFillet(prism, 10., geompy.ShapeType["EDGE"], IDlist_e)
10099             """
10100             # Example: see GEOM_TestAll.py
10101             theR,Parameters = ParseParameters(theR)
10102             anObj = None
10103             if theShapeType == self.ShapeType["EDGE"]:
10104                 anObj = self.LocalOp.MakeFilletEdges(theShape, theR, theListShapes)
10105                 RaiseIfFailed("MakeFilletEdges", self.LocalOp)
10106             else:
10107                 anObj = self.LocalOp.MakeFilletFaces(theShape, theR, theListShapes)
10108                 RaiseIfFailed("MakeFilletFaces", self.LocalOp)
10109             anObj.SetParameters(Parameters)
10110             self._autoPublish(anObj, theName, "fillet")
10111             return anObj
10112
10113         ## The same that MakeFillet() but with two Fillet Radius R1 and R2
10114         @ManageTransactions("LocalOp")
10115         def MakeFilletR1R2(self, theShape, theR1, theR2, theShapeType, theListShapes, theName=None):
10116             """
10117             The same that geompy.MakeFillet but with two Fillet Radius R1 and R2
10118
10119             Example of usage:
10120                 # get the list of IDs (IDList) for the fillet
10121                 prism_edges = geompy.SubShapeAllSortedCentres(prism, geompy.ShapeType["EDGE"])
10122                 IDlist_e = []
10123                 IDlist_e.append(geompy.GetSubShapeID(prism, prism_edges[0]))
10124                 IDlist_e.append(geompy.GetSubShapeID(prism, prism_edges[1]))
10125                 IDlist_e.append(geompy.GetSubShapeID(prism, prism_edges[2]))
10126                 # make a fillet on the specified edges of the given shape
10127                 fillet = geompy.MakeFillet(prism, 10., 15., geompy.ShapeType["EDGE"], IDlist_e)
10128             """
10129             theR1,theR2,Parameters = ParseParameters(theR1,theR2)
10130             anObj = None
10131             if theShapeType == self.ShapeType["EDGE"]:
10132                 anObj = self.LocalOp.MakeFilletEdgesR1R2(theShape, theR1, theR2, theListShapes)
10133                 RaiseIfFailed("MakeFilletEdgesR1R2", self.LocalOp)
10134             else:
10135                 anObj = self.LocalOp.MakeFilletFacesR1R2(theShape, theR1, theR2, theListShapes)
10136                 RaiseIfFailed("MakeFilletFacesR1R2", self.LocalOp)
10137             anObj.SetParameters(Parameters)
10138             self._autoPublish(anObj, theName, "fillet")
10139             return anObj
10140
10141         ## Perform a fillet on the specified edges of the given shape
10142         #  @param theShape  Wire Shape to perform fillet on.
10143         #  @param theR  Fillet radius.
10144         #  @param theListOfVertexes Global indices of vertexes to perform fillet on.
10145         #    \note Global index of sub-shape can be obtained, using method GetSubShapeID()
10146         #    \note The list of vertices could be empty,
10147         #          in this case fillet will done done at all vertices in wire
10148         #  @param doIgnoreSecantVertices If FALSE, fillet radius is always limited
10149         #         by the length of the edges, nearest to the fillet vertex.
10150         #         But sometimes the next edge is C1 continuous with the one, nearest to
10151         #         the fillet point, and such two (or more) edges can be united to allow
10152         #         bigger radius. Set this flag to TRUE to allow collinear edges union,
10153         #         thus ignoring the secant vertex (vertices).
10154         #  @param theName Object name; when specified, this parameter is used
10155         #         for result publication in the study. Otherwise, if automatic
10156         #         publication is switched on, default value is used for result name.
10157         #
10158         #  @return New GEOM.GEOM_Object, containing the result shape.
10159         #
10160         #  @ref tui_fillet2d "Example"
10161         @ManageTransactions("LocalOp")
10162         def MakeFillet1D(self, theShape, theR, theListOfVertexes, doIgnoreSecantVertices = True, theName=None):
10163             """
10164             Perform a fillet on the specified edges of the given shape
10165
10166             Parameters:
10167                 theShape  Wire Shape to perform fillet on.
10168                 theR  Fillet radius.
10169                 theListOfVertexes Global indices of vertexes to perform fillet on.
10170                 doIgnoreSecantVertices If FALSE, fillet radius is always limited
10171                     by the length of the edges, nearest to the fillet vertex.
10172                     But sometimes the next edge is C1 continuous with the one, nearest to
10173                     the fillet point, and such two (or more) edges can be united to allow
10174                     bigger radius. Set this flag to TRUE to allow collinear edges union,
10175                     thus ignoring the secant vertex (vertices).
10176                 theName Object name; when specified, this parameter is used
10177                         for result publication in the study. Otherwise, if automatic
10178                         publication is switched on, default value is used for result name.
10179             Note:
10180                 Global index of sub-shape can be obtained, using method geompy.GetSubShapeID
10181
10182                 The list of vertices could be empty,in this case fillet will done done at all vertices in wire
10183
10184             Returns:
10185                 New GEOM.GEOM_Object, containing the result shape.
10186
10187             Example of usage:
10188                 # create wire
10189                 Wire_1 = geompy.MakeWire([Edge_12, Edge_7, Edge_11, Edge_6, Edge_1,Edge_4])
10190                 # make fillet at given wire vertices with giver radius
10191                 Fillet_1D_1 = geompy.MakeFillet1D(Wire_1, 55, [3, 4, 6, 8, 10])
10192             """
10193             # Example: see GEOM_TestAll.py
10194             theR,doIgnoreSecantVertices,Parameters = ParseParameters(theR,doIgnoreSecantVertices)
10195             anObj = self.LocalOp.MakeFillet1D(theShape, theR, theListOfVertexes, doIgnoreSecantVertices)
10196             RaiseIfFailed("MakeFillet1D", self.LocalOp)
10197             anObj.SetParameters(Parameters)
10198             self._autoPublish(anObj, theName, "fillet")
10199             return anObj
10200
10201         ## Perform a fillet at the specified vertices of the given face/shell.
10202         #  @param theShape Face or Shell shape to perform fillet on.
10203         #  @param theR Fillet radius.
10204         #  @param theListOfVertexes Global indices of vertexes to perform fillet on.
10205         #  @param theName Object name; when specified, this parameter is used
10206         #         for result publication in the study. Otherwise, if automatic
10207         #         publication is switched on, default value is used for result name.
10208         #
10209         #  @note Global index of sub-shape can be obtained, using method GetSubShapeID().
10210         #
10211         #  @return New GEOM.GEOM_Object, containing the result shape.
10212         #
10213         #  @ref tui_fillet2d "Example"
10214         @ManageTransactions("LocalOp")
10215         def MakeFillet2D(self, theShape, theR, theListOfVertexes, theName=None):
10216             """
10217             Perform a fillet at the specified vertices of the given face/shell.
10218
10219             Parameters:
10220                 theShape  Face or Shell shape to perform fillet on.
10221                 theR  Fillet radius.
10222                 theListOfVertexes Global indices of vertexes to perform fillet on.
10223                 theName Object name; when specified, this parameter is used
10224                         for result publication in the study. Otherwise, if automatic
10225                         publication is switched on, default value is used for result name.
10226             Note:
10227                 Global index of sub-shape can be obtained, using method geompy.GetSubShapeID
10228
10229             Returns:
10230                 New GEOM.GEOM_Object, containing the result shape.
10231
10232             Example of usage:
10233                 face = geompy.MakeFaceHW(100, 100, 1)
10234                 fillet2d = geompy.MakeFillet2D(face, 30, [7, 9])
10235             """
10236             # Example: see GEOM_TestAll.py
10237             theR,Parameters = ParseParameters(theR)
10238             anObj = self.LocalOp.MakeFillet2D(theShape, theR, theListOfVertexes)
10239             RaiseIfFailed("MakeFillet2D", self.LocalOp)
10240             anObj.SetParameters(Parameters)
10241             self._autoPublish(anObj, theName, "fillet")
10242             return anObj
10243
10244         ## Perform a symmetric chamfer on all edges of the given shape.
10245         #  @param theShape Shape, to perform chamfer on.
10246         #  @param theD Chamfer size along each face.
10247         #  @param theName Object name; when specified, this parameter is used
10248         #         for result publication in the study. Otherwise, if automatic
10249         #         publication is switched on, default value is used for result name.
10250         #
10251         #  @return New GEOM.GEOM_Object, containing the result shape.
10252         #
10253         #  @ref tui_chamfer "Example 1"
10254         #  \n @ref swig_MakeChamferAll "Example 2"
10255         @ManageTransactions("LocalOp")
10256         def MakeChamferAll(self, theShape, theD, theName=None):
10257             """
10258             Perform a symmetric chamfer on all edges of the given shape.
10259
10260             Parameters:
10261                 theShape Shape, to perform chamfer on.
10262                 theD Chamfer size along each face.
10263                 theName Object name; when specified, this parameter is used
10264                         for result publication in the study. Otherwise, if automatic
10265                         publication is switched on, default value is used for result name.
10266
10267             Returns:
10268                 New GEOM.GEOM_Object, containing the result shape.
10269
10270             Example of usage:
10271                 chamfer_all = geompy.MakeChamferAll(prism, 10.)
10272             """
10273             # Example: see GEOM_TestOthers.py
10274             theD,Parameters = ParseParameters(theD)
10275             anObj = self.LocalOp.MakeChamferAll(theShape, theD)
10276             RaiseIfFailed("MakeChamferAll", self.LocalOp)
10277             anObj.SetParameters(Parameters)
10278             self._autoPublish(anObj, theName, "chamfer")
10279             return anObj
10280
10281         ## Perform a chamfer on edges, common to the specified faces,
10282         #  with distance D1 on the Face1
10283         #  @param theShape Shape, to perform chamfer on.
10284         #  @param theD1 Chamfer size along \a theFace1.
10285         #  @param theD2 Chamfer size along \a theFace2.
10286         #  @param theFace1,theFace2 Global indices of two faces of \a theShape.
10287         #  @param theName Object name; when specified, this parameter is used
10288         #         for result publication in the study. Otherwise, if automatic
10289         #         publication is switched on, default value is used for result name.
10290         #
10291         #  @note Global index of sub-shape can be obtained, using method GetSubShapeID().
10292         #
10293         #  @return New GEOM.GEOM_Object, containing the result shape.
10294         #
10295         #  @ref tui_chamfer "Example"
10296         @ManageTransactions("LocalOp")
10297         def MakeChamferEdge(self, theShape, theD1, theD2, theFace1, theFace2, theName=None):
10298             """
10299             Perform a chamfer on edges, common to the specified faces,
10300             with distance D1 on the Face1
10301
10302             Parameters:
10303                 theShape Shape, to perform chamfer on.
10304                 theD1 Chamfer size along theFace1.
10305                 theD2 Chamfer size along theFace2.
10306                 theFace1,theFace2 Global indices of two faces of theShape.
10307                 theName Object name; when specified, this parameter is used
10308                         for result publication in the study. Otherwise, if automatic
10309                         publication is switched on, default value is used for result name.
10310
10311             Note:
10312                 Global index of sub-shape can be obtained, using method geompy.GetSubShapeID
10313
10314             Returns:
10315                 New GEOM.GEOM_Object, containing the result shape.
10316
10317             Example of usage:
10318                 prism_faces = geompy.SubShapeAllSortedCentres(prism, geompy.ShapeType["FACE"])
10319                 f_ind_1 = geompy.GetSubShapeID(prism, prism_faces[0])
10320                 f_ind_2 = geompy.GetSubShapeID(prism, prism_faces[1])
10321                 chamfer_e = geompy.MakeChamferEdge(prism, 10., 10., f_ind_1, f_ind_2)
10322             """
10323             # Example: see GEOM_TestAll.py
10324             theD1,theD2,Parameters = ParseParameters(theD1,theD2)
10325             anObj = self.LocalOp.MakeChamferEdge(theShape, theD1, theD2, theFace1, theFace2)
10326             RaiseIfFailed("MakeChamferEdge", self.LocalOp)
10327             anObj.SetParameters(Parameters)
10328             self._autoPublish(anObj, theName, "chamfer")
10329             return anObj
10330
10331         ## Perform a chamfer on edges
10332         #  @param theShape Shape, to perform chamfer on.
10333         #  @param theD Chamfer length
10334         #  @param theAngle Angle of chamfer (angle in radians or a name of variable which defines angle in degrees)
10335         #  @param theFace1,theFace2 Global indices of two faces of \a theShape.
10336         #  @param theName Object name; when specified, this parameter is used
10337         #         for result publication in the study. Otherwise, if automatic
10338         #         publication is switched on, default value is used for result name.
10339         #
10340         #  @note Global index of sub-shape can be obtained, using method GetSubShapeID().
10341         #
10342         #  @return New GEOM.GEOM_Object, containing the result shape.
10343         @ManageTransactions("LocalOp")
10344         def MakeChamferEdgeAD(self, theShape, theD, theAngle, theFace1, theFace2, theName=None):
10345             """
10346             Perform a chamfer on edges
10347
10348             Parameters:
10349                 theShape Shape, to perform chamfer on.
10350                 theD1 Chamfer size along theFace1.
10351                 theAngle Angle of chamfer (angle in radians or a name of variable which defines angle in degrees).
10352                 theFace1,theFace2 Global indices of two faces of theShape.
10353                 theName Object name; when specified, this parameter is used
10354                         for result publication in the study. Otherwise, if automatic
10355                         publication is switched on, default value is used for result name.
10356
10357             Note:
10358                 Global index of sub-shape can be obtained, using method geompy.GetSubShapeID
10359
10360             Returns:
10361                 New GEOM.GEOM_Object, containing the result shape.
10362
10363             Example of usage:
10364                 prism_faces = geompy.SubShapeAllSortedCentres(prism, geompy.ShapeType["FACE"])
10365                 f_ind_1 = geompy.GetSubShapeID(prism, prism_faces[0])
10366                 f_ind_2 = geompy.GetSubShapeID(prism, prism_faces[1])
10367                 ang = 30
10368                 chamfer_e = geompy.MakeChamferEdge(prism, 10., ang, f_ind_1, f_ind_2)
10369             """
10370             flag = False
10371             if isinstance(theAngle,str):
10372                 flag = True
10373             theD,theAngle,Parameters = ParseParameters(theD,theAngle)
10374             if flag:
10375                 theAngle = theAngle*math.pi/180.0
10376             anObj = self.LocalOp.MakeChamferEdgeAD(theShape, theD, theAngle, theFace1, theFace2)
10377             RaiseIfFailed("MakeChamferEdgeAD", self.LocalOp)
10378             anObj.SetParameters(Parameters)
10379             self._autoPublish(anObj, theName, "chamfer")
10380             return anObj
10381
10382         ## Perform a chamfer on all edges of the specified faces,
10383         #  with distance D1 on the first specified face (if several for one edge)
10384         #  @param theShape Shape, to perform chamfer on.
10385         #  @param theD1 Chamfer size along face from \a theFaces. If both faces,
10386         #               connected to the edge, are in \a theFaces, \a theD1
10387         #               will be get along face, which is nearer to \a theFaces beginning.
10388         #  @param theD2 Chamfer size along another of two faces, connected to the edge.
10389         #  @param theFaces Sequence of global indices of faces of \a theShape.
10390         #  @param theName Object name; when specified, this parameter is used
10391         #         for result publication in the study. Otherwise, if automatic
10392         #         publication is switched on, default value is used for result name.
10393         #
10394         #  @note Global index of sub-shape can be obtained, using method GetSubShapeID().
10395         #
10396         #  @return New GEOM.GEOM_Object, containing the result shape.
10397         #
10398         #  @ref tui_chamfer "Example"
10399         @ManageTransactions("LocalOp")
10400         def MakeChamferFaces(self, theShape, theD1, theD2, theFaces, theName=None):
10401             """
10402             Perform a chamfer on all edges of the specified faces,
10403             with distance D1 on the first specified face (if several for one edge)
10404
10405             Parameters:
10406                 theShape Shape, to perform chamfer on.
10407                 theD1 Chamfer size along face from  theFaces. If both faces,
10408                       connected to the edge, are in theFaces, theD1
10409                       will be get along face, which is nearer to theFaces beginning.
10410                 theD2 Chamfer size along another of two faces, connected to the edge.
10411                 theFaces Sequence of global indices of faces of theShape.
10412                 theName Object name; when specified, this parameter is used
10413                         for result publication in the study. Otherwise, if automatic
10414                         publication is switched on, default value is used for result name.
10415
10416             Note: Global index of sub-shape can be obtained, using method geompy.GetSubShapeID().
10417
10418             Returns:
10419                 New GEOM.GEOM_Object, containing the result shape.
10420             """
10421             # Example: see GEOM_TestAll.py
10422             theD1,theD2,Parameters = ParseParameters(theD1,theD2)
10423             anObj = self.LocalOp.MakeChamferFaces(theShape, theD1, theD2, theFaces)
10424             RaiseIfFailed("MakeChamferFaces", self.LocalOp)
10425             anObj.SetParameters(Parameters)
10426             self._autoPublish(anObj, theName, "chamfer")
10427             return anObj
10428
10429         ## The Same that MakeChamferFaces() but with params theD is chamfer length and
10430         #  theAngle is Angle of chamfer (angle in radians or a name of variable which defines angle in degrees)
10431         #
10432         #  @ref swig_FilletChamfer "Example"
10433         @ManageTransactions("LocalOp")
10434         def MakeChamferFacesAD(self, theShape, theD, theAngle, theFaces, theName=None):
10435             """
10436             The Same that geompy.MakeChamferFaces but with params theD is chamfer length and
10437             theAngle is Angle of chamfer (angle in radians or a name of variable which defines angle in degrees)
10438             """
10439             flag = False
10440             if isinstance(theAngle,str):
10441                 flag = True
10442             theD,theAngle,Parameters = ParseParameters(theD,theAngle)
10443             if flag:
10444                 theAngle = theAngle*math.pi/180.0
10445             anObj = self.LocalOp.MakeChamferFacesAD(theShape, theD, theAngle, theFaces)
10446             RaiseIfFailed("MakeChamferFacesAD", self.LocalOp)
10447             anObj.SetParameters(Parameters)
10448             self._autoPublish(anObj, theName, "chamfer")
10449             return anObj
10450
10451         ## Perform a chamfer on edges,
10452         #  with distance D1 on the first specified face (if several for one edge)
10453         #  @param theShape Shape, to perform chamfer on.
10454         #  @param theD1,theD2 Chamfer size
10455         #  @param theEdges Sequence of edges of \a theShape.
10456         #  @param theName Object name; when specified, this parameter is used
10457         #         for result publication in the study. Otherwise, if automatic
10458         #         publication is switched on, default value is used for result name.
10459         #
10460         #  @return New GEOM.GEOM_Object, containing the result shape.
10461         #
10462         #  @ref swig_FilletChamfer "Example"
10463         @ManageTransactions("LocalOp")
10464         def MakeChamferEdges(self, theShape, theD1, theD2, theEdges, theName=None):
10465             """
10466             Perform a chamfer on edges,
10467             with distance D1 on the first specified face (if several for one edge)
10468
10469             Parameters:
10470                 theShape Shape, to perform chamfer on.
10471                 theD1,theD2 Chamfer size
10472                 theEdges Sequence of edges of theShape.
10473                 theName Object name; when specified, this parameter is used
10474                         for result publication in the study. Otherwise, if automatic
10475                         publication is switched on, default value is used for result name.
10476
10477             Returns:
10478                 New GEOM.GEOM_Object, containing the result shape.
10479             """
10480             theD1,theD2,Parameters = ParseParameters(theD1,theD2)
10481             anObj = self.LocalOp.MakeChamferEdges(theShape, theD1, theD2, theEdges)
10482             RaiseIfFailed("MakeChamferEdges", self.LocalOp)
10483             anObj.SetParameters(Parameters)
10484             self._autoPublish(anObj, theName, "chamfer")
10485             return anObj
10486
10487         ## The Same that MakeChamferEdges() but with params theD is chamfer length and
10488         #  theAngle is Angle of chamfer (angle in radians or a name of variable which defines angle in degrees)
10489         @ManageTransactions("LocalOp")
10490         def MakeChamferEdgesAD(self, theShape, theD, theAngle, theEdges, theName=None):
10491             """
10492             The Same that geompy.MakeChamferEdges but with params theD is chamfer length and
10493             theAngle is Angle of chamfer (angle in radians or a name of variable which defines angle in degrees)
10494             """
10495             flag = False
10496             if isinstance(theAngle,str):
10497                 flag = True
10498             theD,theAngle,Parameters = ParseParameters(theD,theAngle)
10499             if flag:
10500                 theAngle = theAngle*math.pi/180.0
10501             anObj = self.LocalOp.MakeChamferEdgesAD(theShape, theD, theAngle, theEdges)
10502             RaiseIfFailed("MakeChamferEdgesAD", self.LocalOp)
10503             anObj.SetParameters(Parameters)
10504             self._autoPublish(anObj, theName, "chamfer")
10505             return anObj
10506
10507         ## @sa MakeChamferEdge(), MakeChamferFaces()
10508         #
10509         #  @ref swig_MakeChamfer "Example"
10510         def MakeChamfer(self, aShape, d1, d2, aShapeType, ListShape, theName=None):
10511             """
10512             See geompy.MakeChamferEdge() and geompy.MakeChamferFaces() functions for more information.
10513             """
10514             # Example: see GEOM_TestOthers.py
10515             anObj = None
10516             # note: auto-publishing is done in self.MakeChamferEdge() or self.MakeChamferFaces()
10517             if aShapeType == self.ShapeType["EDGE"]:
10518                 anObj = self.MakeChamferEdge(aShape,d1,d2,ListShape[0],ListShape[1],theName)
10519             else:
10520                 anObj = self.MakeChamferFaces(aShape,d1,d2,ListShape,theName)
10521             return anObj
10522
10523         ## Remove material from a solid by extrusion of the base shape on the given distance.
10524         #  @param theInit Shape to remove material from. It must be a solid or
10525         #  a compound made of a single solid.
10526         #  @param theBase Closed edge or wire defining the base shape to be extruded.
10527         #  @param theH Prism dimension along the normal to theBase
10528         #  @param theAngle Draft angle in degrees.
10529         #  @param theInvert If true material changes the direction
10530         #  @param theName Object name; when specified, this parameter is used
10531         #         for result publication in the study. Otherwise, if automatic
10532         #         publication is switched on, default value is used for result name.
10533         #
10534         #  @return New GEOM.GEOM_Object, containing the initial shape with removed material
10535         #
10536         #  @ref tui_creation_prism "Example"
10537         @ManageTransactions("PrimOp")
10538         def MakeExtrudedCut(self, theInit, theBase, theH, theAngle, theInvert=False, theName=None):
10539             """
10540             Add material to a solid by extrusion of the base shape on the given distance.
10541
10542             Parameters:
10543                 theInit Shape to remove material from. It must be a solid or a compound made of a single solid.
10544                 theBase Closed edge or wire defining the base shape to be extruded.
10545                 theH Prism dimension along the normal to theBase
10546                 theAngle Draft angle in degrees.
10547                 theInvert If true material changes the direction.
10548                 theName Object name; when specified, this parameter is used
10549                         for result publication in the study. Otherwise, if automatic
10550                         publication is switched on, default value is used for result name.
10551
10552             Returns:
10553                 New GEOM.GEOM_Object,  containing the initial shape with removed material.
10554             """
10555             # Example: see GEOM_TestAll.py
10556             theH,theAngle,Parameters = ParseParameters(theH,theAngle)
10557             anObj = self.PrimOp.MakeDraftPrism(theInit, theBase, theH, theAngle, False, theInvert)
10558             RaiseIfFailed("MakeExtrudedBoss", self.PrimOp)
10559             anObj.SetParameters(Parameters)
10560             self._autoPublish(anObj, theName, "extrudedCut")
10561             return anObj
10562
10563         ## Add material to a solid by extrusion of the base shape on the given distance.
10564         #  @param theInit Shape to add material to. It must be a solid or
10565         #  a compound made of a single solid.
10566         #  @param theBase Closed edge or wire defining the base shape to be extruded.
10567         #  @param theH Prism dimension along the normal to theBase
10568         #  @param theAngle Draft angle in degrees.
10569         #  @param theInvert If true material changes the direction
10570         #  @param theName Object name; when specified, this parameter is used
10571         #         for result publication in the study. Otherwise, if automatic
10572         #         publication is switched on, default value is used for result name.
10573         #
10574         #  @return New GEOM.GEOM_Object, containing the initial shape with added material
10575         #
10576         #  @ref tui_creation_prism "Example"
10577         @ManageTransactions("PrimOp")
10578         def MakeExtrudedBoss(self, theInit, theBase, theH, theAngle, theInvert=False, theName=None):
10579             """
10580             Add material to a solid by extrusion of the base shape on the given distance.
10581
10582             Parameters:
10583                 theInit Shape to add material to. It must be a solid or a compound made of a single solid.
10584                 theBase Closed edge or wire defining the base shape to be extruded.
10585                 theH Prism dimension along the normal to theBase
10586                 theAngle Draft angle in degrees.
10587                 theInvert If true material changes the direction.
10588                 theName Object name; when specified, this parameter is used
10589                         for result publication in the study. Otherwise, if automatic
10590                         publication is switched on, default value is used for result name.
10591
10592             Returns:
10593                 New GEOM.GEOM_Object,  containing the initial shape with added material.
10594             """
10595             # Example: see GEOM_TestAll.py
10596             theH,theAngle,Parameters = ParseParameters(theH,theAngle)
10597             anObj = self.PrimOp.MakeDraftPrism(theInit, theBase, theH, theAngle, True, theInvert)
10598             RaiseIfFailed("MakeExtrudedBoss", self.PrimOp)
10599             anObj.SetParameters(Parameters)
10600             self._autoPublish(anObj, theName, "extrudedBoss")
10601             return anObj
10602
10603         # end of l3_local
10604         ## @}
10605
10606         ## @addtogroup l3_basic_op
10607         ## @{
10608
10609         ## Perform an Archimde operation on the given shape with given parameters.
10610         #  The object presenting the resulting face is returned.
10611         #  @param theShape Shape to be put in water.
10612         #  @param theWeight Weight of the shape.
10613         #  @param theWaterDensity Density of the water.
10614         #  @param theMeshDeflection Deflection of the mesh, using to compute the section.
10615         #  @param theName Object name; when specified, this parameter is used
10616         #         for result publication in the study. Otherwise, if automatic
10617         #         publication is switched on, default value is used for result name.
10618         #
10619         #  @return New GEOM.GEOM_Object, containing a section of \a theShape
10620         #          by a plane, corresponding to water level.
10621         #
10622         #  @ref tui_archimede "Example"
10623         @ManageTransactions("LocalOp")
10624         def Archimede(self, theShape, theWeight, theWaterDensity, theMeshDeflection, theName=None):
10625             """
10626             Perform an Archimde operation on the given shape with given parameters.
10627             The object presenting the resulting face is returned.
10628
10629             Parameters:
10630                 theShape Shape to be put in water.
10631                 theWeight Weight of the shape.
10632                 theWaterDensity Density of the water.
10633                 theMeshDeflection Deflection of the mesh, using to compute the section.
10634                 theName Object name; when specified, this parameter is used
10635                         for result publication in the study. Otherwise, if automatic
10636                         publication is switched on, default value is used for result name.
10637
10638             Returns:
10639                 New GEOM.GEOM_Object, containing a section of theShape
10640                 by a plane, corresponding to water level.
10641             """
10642             # Example: see GEOM_TestAll.py
10643             theWeight,theWaterDensity,theMeshDeflection,Parameters = ParseParameters(
10644               theWeight,theWaterDensity,theMeshDeflection)
10645             anObj = self.LocalOp.MakeArchimede(theShape, theWeight, theWaterDensity, theMeshDeflection)
10646             RaiseIfFailed("MakeArchimede", self.LocalOp)
10647             anObj.SetParameters(Parameters)
10648             self._autoPublish(anObj, theName, "archimede")
10649             return anObj
10650
10651         # end of l3_basic_op
10652         ## @}
10653
10654         ## @addtogroup l2_measure
10655         ## @{
10656
10657         ## Get point coordinates
10658         #  @return [x, y, z]
10659         #
10660         #  @ref tui_point_coordinates_page "Example"
10661         @ManageTransactions("MeasuOp")
10662         def PointCoordinates(self,Point):
10663             """
10664             Get point coordinates
10665
10666             Returns:
10667                 [x, y, z]
10668             """
10669             # Example: see GEOM_TestMeasures.py
10670             aTuple = self.MeasuOp.PointCoordinates(Point)
10671             RaiseIfFailed("PointCoordinates", self.MeasuOp)
10672             return aTuple
10673
10674         ## Get vector coordinates
10675         #  @return [x, y, z]
10676         #
10677         #  @ref tui_measurement_tools_page "Example"
10678         def VectorCoordinates(self,Vector):
10679             """
10680             Get vector coordinates
10681
10682             Returns:
10683                 [x, y, z]
10684             """
10685
10686             p1=self.GetFirstVertex(Vector)
10687             p2=self.GetLastVertex(Vector)
10688
10689             X1=self.PointCoordinates(p1)
10690             X2=self.PointCoordinates(p2)
10691
10692             return (X2[0]-X1[0],X2[1]-X1[1],X2[2]-X1[2])
10693
10694
10695         ## Compute cross product
10696         #  @return vector w=u^v
10697         #
10698         #  @ref tui_measurement_tools_page "Example"
10699         def CrossProduct(self, Vector1, Vector2):
10700             """
10701             Compute cross product
10702
10703             Returns: vector w=u^v
10704             """
10705             u=self.VectorCoordinates(Vector1)
10706             v=self.VectorCoordinates(Vector2)
10707             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])
10708
10709             return w
10710
10711         ## Compute cross product
10712         #  @return dot product  p=u.v
10713         #
10714         #  @ref tui_measurement_tools_page "Example"
10715         def DotProduct(self, Vector1, Vector2):
10716             """
10717             Compute cross product
10718
10719             Returns: dot product  p=u.v
10720             """
10721             u=self.VectorCoordinates(Vector1)
10722             v=self.VectorCoordinates(Vector2)
10723             p=u[0]*v[0]+u[1]*v[1]+u[2]*v[2]
10724
10725             return p
10726
10727
10728         ## Get summarized length of all wires,
10729         #  area of surface and volume of the given shape.
10730         #  @param theShape Shape to define properties of.
10731         #  @param theTolerance maximal relative error of area
10732         #         and volume computation.
10733         #  @return [theLength, theSurfArea, theVolume]\n
10734         #  theLength:   Summarized length of all wires of the given shape.\n
10735         #  theSurfArea: Area of surface of the given shape.\n
10736         #  theVolume:   Volume of the given shape.
10737         #
10738         #  @ref tui_basic_properties_page "Example"
10739         @ManageTransactions("MeasuOp")
10740         def BasicProperties(self,theShape, theTolerance=1.e-6):
10741             """
10742             Get summarized length of all wires,
10743             area of surface and volume of the given shape.
10744
10745             Parameters:
10746                 theShape Shape to define properties of.
10747                 theTolerance maximal relative error of area
10748                              and volume computation.
10749
10750             Returns:
10751                 [theLength, theSurfArea, theVolume]
10752                  theLength:   Summarized length of all wires of the given shape.
10753                  theSurfArea: Area of surface of the given shape.
10754                  theVolume:   Volume of the given shape.
10755             """
10756             # Example: see GEOM_TestMeasures.py
10757             aTuple = self.MeasuOp.GetBasicProperties(theShape, theTolerance)
10758             RaiseIfFailed("GetBasicProperties", self.MeasuOp)
10759             return aTuple
10760
10761         ## Get parameters of bounding box of the given shape
10762         #  @param theShape Shape to obtain bounding box of.
10763         #  @param precise TRUE for precise computation; FALSE for fast one.
10764         #  @return [Xmin,Xmax, Ymin,Ymax, Zmin,Zmax]
10765         #  Xmin,Xmax: Limits of shape along OX axis.
10766         #  Ymin,Ymax: Limits of shape along OY axis.
10767         #  Zmin,Zmax: Limits of shape along OZ axis.
10768         #
10769         #  @ref tui_bounding_box_page "Example"
10770         @ManageTransactions("MeasuOp")
10771         def BoundingBox (self, theShape, precise=False):
10772             """
10773             Get parameters of bounding box of the given shape
10774
10775             Parameters:
10776                 theShape Shape to obtain bounding box of.
10777                 precise TRUE for precise computation; FALSE for fast one.
10778
10779             Returns:
10780                 [Xmin,Xmax, Ymin,Ymax, Zmin,Zmax]
10781                  Xmin,Xmax: Limits of shape along OX axis.
10782                  Ymin,Ymax: Limits of shape along OY axis.
10783                  Zmin,Zmax: Limits of shape along OZ axis.
10784             """
10785             # Example: see GEOM_TestMeasures.py
10786             aTuple = self.MeasuOp.GetBoundingBox(theShape, precise)
10787             RaiseIfFailed("GetBoundingBox", self.MeasuOp)
10788             return aTuple
10789
10790         ## Get bounding box of the given shape
10791         #  @param theShape Shape to obtain bounding box of.
10792         #  @param precise TRUE for precise computation; FALSE for fast one.
10793         #  @param theName Object name; when specified, this parameter is used
10794         #         for result publication in the study. Otherwise, if automatic
10795         #         publication is switched on, default value is used for result name.
10796         #
10797         #  @return New GEOM.GEOM_Object, containing the created box.
10798         #
10799         #  @ref tui_bounding_box_page "Example"
10800         @ManageTransactions("MeasuOp")
10801         def MakeBoundingBox (self, theShape, precise=False, theName=None):
10802             """
10803             Get bounding box of the given shape
10804
10805             Parameters:
10806                 theShape Shape to obtain bounding box of.
10807                 precise TRUE for precise computation; FALSE for fast one.
10808                 theName Object name; when specified, this parameter is used
10809                         for result publication in the study. Otherwise, if automatic
10810                         publication is switched on, default value is used for result name.
10811
10812             Returns:
10813                 New GEOM.GEOM_Object, containing the created box.
10814             """
10815             # Example: see GEOM_TestMeasures.py
10816             anObj = self.MeasuOp.MakeBoundingBox(theShape, precise)
10817             RaiseIfFailed("MakeBoundingBox", self.MeasuOp)
10818             self._autoPublish(anObj, theName, "bndbox")
10819             return anObj
10820
10821         ## Get inertia matrix and moments of inertia of theShape.
10822         #  @param theShape Shape to calculate inertia of.
10823         #  @return [I11,I12,I13, I21,I22,I23, I31,I32,I33, Ix,Iy,Iz]
10824         #  I(1-3)(1-3): Components of the inertia matrix of the given shape.
10825         #  Ix,Iy,Iz:    Moments of inertia of the given shape.
10826         #
10827         #  @ref tui_inertia_page "Example"
10828         @ManageTransactions("MeasuOp")
10829         def Inertia(self,theShape):
10830             """
10831             Get inertia matrix and moments of inertia of theShape.
10832
10833             Parameters:
10834                 theShape Shape to calculate inertia of.
10835
10836             Returns:
10837                 [I11,I12,I13, I21,I22,I23, I31,I32,I33, Ix,Iy,Iz]
10838                  I(1-3)(1-3): Components of the inertia matrix of the given shape.
10839                  Ix,Iy,Iz:    Moments of inertia of the given shape.
10840             """
10841             # Example: see GEOM_TestMeasures.py
10842             aTuple = self.MeasuOp.GetInertia(theShape)
10843             RaiseIfFailed("GetInertia", self.MeasuOp)
10844             return aTuple
10845
10846         ## Get if coords are included in the shape (ST_IN or ST_ON)
10847         #  @param theShape Shape
10848         #  @param coords list of points coordinates [x1, y1, z1, x2, y2, z2, ...]
10849         #  @param tolerance to be used (default is 1.0e-7)
10850         #  @return list_of_boolean = [res1, res2, ...]
10851         @ManageTransactions("MeasuOp")
10852         def AreCoordsInside(self, theShape, coords, tolerance=1.e-7):
10853             """
10854             Get if coords are included in the shape (ST_IN or ST_ON)
10855
10856             Parameters:
10857                 theShape Shape
10858                 coords list of points coordinates [x1, y1, z1, x2, y2, z2, ...]
10859                 tolerance to be used (default is 1.0e-7)
10860
10861             Returns:
10862                 list_of_boolean = [res1, res2, ...]
10863             """
10864             return self.MeasuOp.AreCoordsInside(theShape, coords, tolerance)
10865
10866         ## Get minimal distance between the given shapes.
10867         #  @param theShape1,theShape2 Shapes to find minimal distance between.
10868         #  @return Value of the minimal distance between the given shapes.
10869         #
10870         #  @ref tui_min_distance_page "Example"
10871         @ManageTransactions("MeasuOp")
10872         def MinDistance(self, theShape1, theShape2):
10873             """
10874             Get minimal distance between the given shapes.
10875
10876             Parameters:
10877                 theShape1,theShape2 Shapes to find minimal distance between.
10878
10879             Returns:
10880                 Value of the minimal distance between the given shapes.
10881             """
10882             # Example: see GEOM_TestMeasures.py
10883             aTuple = self.MeasuOp.GetMinDistance(theShape1, theShape2)
10884             RaiseIfFailed("GetMinDistance", self.MeasuOp)
10885             return aTuple[0]
10886
10887         ## Get minimal distance between the given shapes.
10888         #  @param theShape1,theShape2 Shapes to find minimal distance between.
10889         #  @return Value of the minimal distance between the given shapes, in form of list
10890         #          [Distance, DX, DY, DZ].
10891         #
10892         #  @ref tui_min_distance_page "Example"
10893         @ManageTransactions("MeasuOp")
10894         def MinDistanceComponents(self, theShape1, theShape2):
10895             """
10896             Get minimal distance between the given shapes.
10897
10898             Parameters:
10899                 theShape1,theShape2 Shapes to find minimal distance between.
10900
10901             Returns:
10902                 Value of the minimal distance between the given shapes, in form of list
10903                 [Distance, DX, DY, DZ]
10904             """
10905             # Example: see GEOM_TestMeasures.py
10906             aTuple = self.MeasuOp.GetMinDistance(theShape1, theShape2)
10907             RaiseIfFailed("GetMinDistance", self.MeasuOp)
10908             aRes = [aTuple[0], aTuple[4] - aTuple[1], aTuple[5] - aTuple[2], aTuple[6] - aTuple[3]]
10909             return aRes
10910
10911         ## Get closest points of the given shapes.
10912         #  @param theShape1,theShape2 Shapes to find closest points of.
10913         #  @return The number of found solutions (-1 in case of infinite number of
10914         #          solutions) and a list of (X, Y, Z) coordinates for all couples of points.
10915         #
10916         #  @ref tui_min_distance_page "Example"
10917         @ManageTransactions("MeasuOp")
10918         def ClosestPoints (self, theShape1, theShape2):
10919             """
10920             Get closest points of the given shapes.
10921
10922             Parameters:
10923                 theShape1,theShape2 Shapes to find closest points of.
10924
10925             Returns:
10926                 The number of found solutions (-1 in case of infinite number of
10927                 solutions) and a list of (X, Y, Z) coordinates for all couples of points.
10928             """
10929             # Example: see GEOM_TestMeasures.py
10930             aTuple = self.MeasuOp.ClosestPoints(theShape1, theShape2)
10931             RaiseIfFailed("ClosestPoints", self.MeasuOp)
10932             return aTuple
10933
10934         ## Get angle between the given shapes in degrees.
10935         #  @param theShape1,theShape2 Lines or linear edges to find angle between.
10936         #  @note If both arguments are vectors, the angle is computed in accordance
10937         #        with their orientations, otherwise the minimum angle is computed.
10938         #  @return Value of the angle between the given shapes in degrees.
10939         #
10940         #  @ref tui_angle_page "Example"
10941         @ManageTransactions("MeasuOp")
10942         def GetAngle(self, theShape1, theShape2):
10943             """
10944             Get angle between the given shapes in degrees.
10945
10946             Parameters:
10947                 theShape1,theShape2 Lines or linear edges to find angle between.
10948
10949             Note:
10950                 If both arguments are vectors, the angle is computed in accordance
10951                 with their orientations, otherwise the minimum angle is computed.
10952
10953             Returns:
10954                 Value of the angle between the given shapes in degrees.
10955             """
10956             # Example: see GEOM_TestMeasures.py
10957             anAngle = self.MeasuOp.GetAngle(theShape1, theShape2)
10958             RaiseIfFailed("GetAngle", self.MeasuOp)
10959             return anAngle
10960
10961         ## Get angle between the given shapes in radians.
10962         #  @param theShape1,theShape2 Lines or linear edges to find angle between.
10963         #  @note If both arguments are vectors, the angle is computed in accordance
10964         #        with their orientations, otherwise the minimum angle is computed.
10965         #  @return Value of the angle between the given shapes in radians.
10966         #
10967         #  @ref tui_angle_page "Example"
10968         @ManageTransactions("MeasuOp")
10969         def GetAngleRadians(self, theShape1, theShape2):
10970             """
10971             Get angle between the given shapes in radians.
10972
10973             Parameters:
10974                 theShape1,theShape2 Lines or linear edges to find angle between.
10975
10976
10977             Note:
10978                 If both arguments are vectors, the angle is computed in accordance
10979                 with their orientations, otherwise the minimum angle is computed.
10980
10981             Returns:
10982                 Value of the angle between the given shapes in radians.
10983             """
10984             # Example: see GEOM_TestMeasures.py
10985             anAngle = self.MeasuOp.GetAngle(theShape1, theShape2)*math.pi/180.
10986             RaiseIfFailed("GetAngle", self.MeasuOp)
10987             return anAngle
10988
10989         ## Get angle between the given vectors in degrees.
10990         #  @param theShape1,theShape2 Vectors to find angle between.
10991         #  @param theFlag If True, the normal vector is defined by the two vectors cross,
10992         #                 if False, the opposite vector to the normal vector is used.
10993         #  @return Value of the angle between the given vectors in degrees.
10994         #
10995         #  @ref tui_angle_page "Example"
10996         @ManageTransactions("MeasuOp")
10997         def GetAngleVectors(self, theShape1, theShape2, theFlag = True):
10998             """
10999             Get angle between the given vectors in degrees.
11000
11001             Parameters:
11002                 theShape1,theShape2 Vectors to find angle between.
11003                 theFlag If True, the normal vector is defined by the two vectors cross,
11004                         if False, the opposite vector to the normal vector is used.
11005
11006             Returns:
11007                 Value of the angle between the given vectors in degrees.
11008             """
11009             anAngle = self.MeasuOp.GetAngleBtwVectors(theShape1, theShape2)
11010             if not theFlag:
11011                 anAngle = 360. - anAngle
11012             RaiseIfFailed("GetAngleVectors", self.MeasuOp)
11013             return anAngle
11014
11015         ## The same as GetAngleVectors, but the result is in radians.
11016         def GetAngleRadiansVectors(self, theShape1, theShape2, theFlag = True):
11017             """
11018             Get angle between the given vectors in radians.
11019
11020             Parameters:
11021                 theShape1,theShape2 Vectors to find angle between.
11022                 theFlag If True, the normal vector is defined by the two vectors cross,
11023                         if False, the opposite vector to the normal vector is used.
11024
11025             Returns:
11026                 Value of the angle between the given vectors in radians.
11027             """
11028             anAngle = self.GetAngleVectors(theShape1, theShape2, theFlag)*math.pi/180.
11029             return anAngle
11030
11031         ## @name Curve Curvature Measurement
11032         #  Methods for receiving radius of curvature of curves
11033         #  in the given point
11034         ## @{
11035
11036         ## Measure curvature of a curve at a point, set by parameter.
11037         #  @param theCurve a curve.
11038         #  @param theParam parameter.
11039         #  @return radius of curvature of \a theCurve.
11040         #
11041         #  @ref swig_todo "Example"
11042         @ManageTransactions("MeasuOp")
11043         def CurveCurvatureByParam(self, theCurve, theParam):
11044             """
11045             Measure curvature of a curve at a point, set by parameter.
11046
11047             Parameters:
11048                 theCurve a curve.
11049                 theParam parameter.
11050
11051             Returns:
11052                 radius of curvature of theCurve.
11053             """
11054             # Example: see GEOM_TestMeasures.py
11055             aCurv = self.MeasuOp.CurveCurvatureByParam(theCurve,theParam)
11056             RaiseIfFailed("CurveCurvatureByParam", self.MeasuOp)
11057             return aCurv
11058
11059         ## Measure curvature of a curve at a point.
11060         #  @param theCurve a curve.
11061         #  @param thePoint given point.
11062         #  @return radius of curvature of \a theCurve.
11063         #
11064         #  @ref swig_todo "Example"
11065         @ManageTransactions("MeasuOp")
11066         def CurveCurvatureByPoint(self, theCurve, thePoint):
11067             """
11068             Measure curvature of a curve at a point.
11069
11070             Parameters:
11071                 theCurve a curve.
11072                 thePoint given point.
11073
11074             Returns:
11075                 radius of curvature of theCurve.
11076             """
11077             aCurv = self.MeasuOp.CurveCurvatureByPoint(theCurve,thePoint)
11078             RaiseIfFailed("CurveCurvatureByPoint", self.MeasuOp)
11079             return aCurv
11080         ## @}
11081
11082         ## @name Surface Curvature Measurement
11083         #  Methods for receiving max and min radius of curvature of surfaces
11084         #  in the given point
11085         ## @{
11086
11087         ## Measure max radius of curvature of surface.
11088         #  @param theSurf the given surface.
11089         #  @param theUParam Value of U-parameter on the referenced surface.
11090         #  @param theVParam Value of V-parameter on the referenced surface.
11091         #  @return max radius of curvature of theSurf.
11092         #
11093         ## @ref swig_todo "Example"
11094         @ManageTransactions("MeasuOp")
11095         def MaxSurfaceCurvatureByParam(self, theSurf, theUParam, theVParam):
11096             """
11097             Measure max radius of curvature of surface.
11098
11099             Parameters:
11100                 theSurf the given surface.
11101                 theUParam Value of U-parameter on the referenced surface.
11102                 theVParam Value of V-parameter on the referenced surface.
11103
11104             Returns:
11105                 max radius of curvature of theSurf.
11106             """
11107             # Example: see GEOM_TestMeasures.py
11108             aSurf = self.MeasuOp.MaxSurfaceCurvatureByParam(theSurf,theUParam,theVParam)
11109             RaiseIfFailed("MaxSurfaceCurvatureByParam", self.MeasuOp)
11110             return aSurf
11111
11112         ## Measure max radius of curvature of surface in the given point
11113         #  @param theSurf the given surface.
11114         #  @param thePoint given point.
11115         #  @return max radius of curvature of theSurf.
11116         #
11117         ## @ref swig_todo "Example"
11118         @ManageTransactions("MeasuOp")
11119         def MaxSurfaceCurvatureByPoint(self, theSurf, thePoint):
11120             """
11121             Measure max radius of curvature of surface in the given point.
11122
11123             Parameters:
11124                 theSurf the given surface.
11125                 thePoint given point.
11126
11127             Returns:
11128                 max radius of curvature of theSurf.
11129             """
11130             aSurf = self.MeasuOp.MaxSurfaceCurvatureByPoint(theSurf,thePoint)
11131             RaiseIfFailed("MaxSurfaceCurvatureByPoint", self.MeasuOp)
11132             return aSurf
11133
11134         ## Measure min radius of curvature of surface.
11135         #  @param theSurf the given surface.
11136         #  @param theUParam Value of U-parameter on the referenced surface.
11137         #  @param theVParam Value of V-parameter on the referenced surface.
11138         #  @return min radius of curvature of theSurf.
11139         #
11140         ## @ref swig_todo "Example"
11141         @ManageTransactions("MeasuOp")
11142         def MinSurfaceCurvatureByParam(self, theSurf, theUParam, theVParam):
11143             """
11144             Measure min radius of curvature of surface.
11145
11146             Parameters:
11147                 theSurf the given surface.
11148                 theUParam Value of U-parameter on the referenced surface.
11149                 theVParam Value of V-parameter on the referenced surface.
11150
11151             Returns:
11152                 Min radius of curvature of theSurf.
11153             """
11154             aSurf = self.MeasuOp.MinSurfaceCurvatureByParam(theSurf,theUParam,theVParam)
11155             RaiseIfFailed("MinSurfaceCurvatureByParam", self.MeasuOp)
11156             return aSurf
11157
11158         ## Measure min radius of curvature of surface in the given point
11159         #  @param theSurf the given surface.
11160         #  @param thePoint given point.
11161         #  @return min radius of curvature of theSurf.
11162         #
11163         ## @ref swig_todo "Example"
11164         @ManageTransactions("MeasuOp")
11165         def MinSurfaceCurvatureByPoint(self, theSurf, thePoint):
11166             """
11167             Measure min radius of curvature of surface in the given point.
11168
11169             Parameters:
11170                 theSurf the given surface.
11171                 thePoint given point.
11172
11173             Returns:
11174                 Min radius of curvature of theSurf.
11175             """
11176             aSurf = self.MeasuOp.MinSurfaceCurvatureByPoint(theSurf,thePoint)
11177             RaiseIfFailed("MinSurfaceCurvatureByPoint", self.MeasuOp)
11178             return aSurf
11179         ## @}
11180
11181         ## Measure curvature radius of surface in the given point along the given direction.
11182         #  @param theSurf the given face.
11183         #  @param thePoint given point.
11184         #  @param theDirection given direction.
11185         #  @param theName Object name; when specified, this parameter is used
11186         #         for result publication in the study. Otherwise, if automatic
11187         #         publication is switched on, default value is used for result name.
11188         #
11189         #  @return New GEOM.GEOM_Object, containing vector of curvature of theSurf.
11190         #          The returned vector is codirectional with the normal to the face
11191         #          in the given point in case of positive curvature value
11192         #          and opposite to the normal in case of negative curvature.
11193         #          The normal of the returned vector is equal to the
11194         #          absolute value of the curvature radius.
11195         #          Null shape is returned in case of infinite radius
11196         #          (zero curvature), for example, in case of flat face.
11197         #
11198         ## @ref swig_CurvatureOnFace "Example"
11199         @ManageTransactions("MeasuOp")
11200         def CurvatureOnFace(self, theSurf, thePoint, theDirection, theName=None):
11201             """
11202             Measure curvature radius of surface in the given point along the given direction.
11203
11204             Parameters:
11205                 theSurf the given face.
11206                 thePoint given point.
11207                 theDirection given direction.
11208                 theName Object name; when specified, this parameter is used
11209                         for result publication in the study. Otherwise, if automatic
11210                         publication is switched on, default value is used for result name.
11211
11212             Returns:
11213                 New GEOM.GEOM_Object, containing vector of curvature of theSurf.
11214                 The returned vector is codirectional with the normal to the face
11215                 in the given point in case of positive curvature value
11216                 and opposite to the normal in case of negative curvature.
11217                 The normal of the returned vector is equal to the
11218                 absolute value of the curvature radius.
11219                 Null shape is returned in case of infinite radius
11220                 (zero curvature), for example, in case of flat face.
11221
11222             Example of usage:
11223                 curvature_1 = geompy.CurvatureOnFace(Face_1, Vertex_1, OX)
11224             """
11225             aVec = self.MeasuOp.SurfaceCurvatureByPointAndDirection(theSurf,thePoint,theDirection)
11226             if self.MeasuOp.GetErrorCode() != "ZERO_CURVATURE":
11227                 RaiseIfFailed("CurvatureOnFace", self.MeasuOp)
11228                 self._autoPublish(aVec, theName, "curvature")
11229             return aVec
11230
11231         ## Get min and max tolerances of sub-shapes of theShape
11232         #  @param theShape Shape, to get tolerances of.
11233         #  @return [FaceMin,FaceMax, EdgeMin,EdgeMax, VertMin,VertMax]\n
11234         #  FaceMin,FaceMax: Min and max tolerances of the faces.\n
11235         #  EdgeMin,EdgeMax: Min and max tolerances of the edges.\n
11236         #  VertMin,VertMax: Min and max tolerances of the vertices.
11237         #
11238         #  @ref tui_tolerance_page "Example"
11239         @ManageTransactions("MeasuOp")
11240         def Tolerance(self,theShape):
11241             """
11242             Get min and max tolerances of sub-shapes of theShape
11243
11244             Parameters:
11245                 theShape Shape, to get tolerances of.
11246
11247             Returns:
11248                 [FaceMin,FaceMax, EdgeMin,EdgeMax, VertMin,VertMax]
11249                  FaceMin,FaceMax: Min and max tolerances of the faces.
11250                  EdgeMin,EdgeMax: Min and max tolerances of the edges.
11251                  VertMin,VertMax: Min and max tolerances of the vertices.
11252             """
11253             # Example: see GEOM_TestMeasures.py
11254             aTuple = self.MeasuOp.GetTolerance(theShape)
11255             RaiseIfFailed("GetTolerance", self.MeasuOp)
11256             return aTuple
11257
11258         ## Obtain description of the given shape (number of sub-shapes of each type)
11259         #  @param theShape Shape to be described.
11260         #  @return Description of the given shape.
11261         #
11262         #  @ref tui_whatis_page "Example"
11263         @ManageTransactions("MeasuOp")
11264         def WhatIs(self,theShape):
11265             """
11266             Obtain description of the given shape (number of sub-shapes of each type)
11267
11268             Parameters:
11269                 theShape Shape to be described.
11270
11271             Returns:
11272                 Description of the given shape.
11273             """
11274             # Example: see GEOM_TestMeasures.py
11275             aDescr = self.MeasuOp.WhatIs(theShape)
11276             RaiseIfFailed("WhatIs", self.MeasuOp)
11277             return aDescr
11278
11279         ## Obtain quantity of shapes of the given type in \a theShape.
11280         #  If \a theShape is of type \a theType, it is also counted.
11281         #  @param theShape Shape to be described.
11282         #  @param theType the given ShapeType().
11283         #  @return Quantity of shapes of type \a theType in \a theShape.
11284         #
11285         #  @ref tui_measurement_tools_page "Example"
11286         def NbShapes (self, theShape, theType):
11287             """
11288             Obtain quantity of shapes of the given type in theShape.
11289             If theShape is of type theType, it is also counted.
11290
11291             Parameters:
11292                 theShape Shape to be described.
11293                 theType the given geompy.ShapeType
11294
11295             Returns:
11296                 Quantity of shapes of type theType in theShape.
11297             """
11298             # Example: see GEOM_TestMeasures.py
11299             listSh = self.SubShapeAllIDs(theShape, theType)
11300             Nb = len(listSh)
11301             return Nb
11302
11303         ## Obtain quantity of shapes of each type in \a theShape.
11304         #  The \a theShape is also counted.
11305         #  @param theShape Shape to be described.
11306         #  @return Dictionary of ShapeType() with bound quantities of shapes.
11307         #
11308         #  @ref tui_measurement_tools_page "Example"
11309         def ShapeInfo (self, theShape):
11310             """
11311             Obtain quantity of shapes of each type in theShape.
11312             The theShape is also counted.
11313
11314             Parameters:
11315                 theShape Shape to be described.
11316
11317             Returns:
11318                 Dictionary of geompy.ShapeType with bound quantities of shapes.
11319             """
11320             # Example: see GEOM_TestMeasures.py
11321             aDict = {}
11322             for typeSh in self.ShapeType:
11323                 if typeSh in ( "AUTO", "SHAPE" ): continue
11324                 listSh = self.SubShapeAllIDs(theShape, self.ShapeType[typeSh])
11325                 Nb = len(listSh)
11326                 aDict[typeSh] = Nb
11327                 pass
11328             return aDict
11329
11330         def GetCreationInformation(self, theShape):
11331             res = ''
11332             infos = theShape.GetCreationInformation()
11333             for info in infos:
11334                 # operationName
11335                 opName = info.operationName
11336                 if not opName: opName = "no info available"
11337                 if res: res += "\n"
11338                 res += "Operation: " + opName
11339                 # parameters
11340                 for parVal in info.params:
11341                     res += "\n \t%s = %s" % ( parVal.name, parVal.value )
11342             return res
11343
11344         ## Get a point, situated at the centre of mass of theShape.
11345         #  @param theShape Shape to define centre of mass of.
11346         #  @param theName Object name; when specified, this parameter is used
11347         #         for result publication in the study. Otherwise, if automatic
11348         #         publication is switched on, default value is used for result name.
11349         #
11350         #  @return New GEOM.GEOM_Object, containing the created point.
11351         #
11352         #  @ref tui_center_of_mass_page "Example"
11353         @ManageTransactions("MeasuOp")
11354         def MakeCDG(self, theShape, theName=None):
11355             """
11356             Get a point, situated at the centre of mass of theShape.
11357
11358             Parameters:
11359                 theShape Shape to define centre of mass of.
11360                 theName Object name; when specified, this parameter is used
11361                         for result publication in the study. Otherwise, if automatic
11362                         publication is switched on, default value is used for result name.
11363
11364             Returns:
11365                 New GEOM.GEOM_Object, containing the created point.
11366             """
11367             # Example: see GEOM_TestMeasures.py
11368             anObj = self.MeasuOp.GetCentreOfMass(theShape)
11369             RaiseIfFailed("GetCentreOfMass", self.MeasuOp)
11370             self._autoPublish(anObj, theName, "centerOfMass")
11371             return anObj
11372
11373         ## Get a vertex sub-shape by index.
11374         #  @param theShape Shape to find sub-shape.
11375         #  @param theIndex Index to find vertex by this index (starting from zero)
11376         #  @param theUseOri To consider edge/wire orientation or not
11377         #  @param theName Object name; when specified, this parameter is used
11378         #         for result publication in the study. Otherwise, if automatic
11379         #         publication is switched on, default value is used for result name.
11380         #
11381         #  @return New GEOM.GEOM_Object, containing the created vertex.
11382         #
11383         #  @ref tui_measurement_tools_page "Example"
11384         @ManageTransactions("MeasuOp")
11385         def GetVertexByIndex(self, theShape, theIndex, theUseOri=True, theName=None):
11386             """
11387             Get a vertex sub-shape by index.
11388
11389             Parameters:
11390                 theShape Shape to find sub-shape.
11391                 theIndex Index to find vertex by this index (starting from zero)
11392                 theUseOri To consider edge/wire orientation or not
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             if isinstance( theUseOri, str ): # theUseOri was inserted before theName
11402                 theUseOri, theName = True, theUseOri
11403             anObj = self.MeasuOp.GetVertexByIndex(theShape, theIndex, theUseOri)
11404             RaiseIfFailed("GetVertexByIndex", self.MeasuOp)
11405             self._autoPublish(anObj, theName, "vertex")
11406             return anObj
11407
11408         ## Get the first vertex of wire/edge depended orientation.
11409         #  @param theShape Shape to find first vertex.
11410         #  @param theName Object name; when specified, this parameter is used
11411         #         for result publication in the study. Otherwise, if automatic
11412         #         publication is switched on, default value is used for result name.
11413         #
11414         #  @return New GEOM.GEOM_Object, containing the created vertex.
11415         #
11416         #  @ref tui_measurement_tools_page "Example"
11417         def GetFirstVertex(self, theShape, theName=None):
11418             """
11419             Get the first vertex of wire/edge depended orientation.
11420
11421             Parameters:
11422                 theShape Shape to find first vertex.
11423                 theName Object name; when specified, this parameter is used
11424                         for result publication in the study. Otherwise, if automatic
11425                         publication is switched on, default value is used for result name.
11426
11427             Returns:
11428                 New GEOM.GEOM_Object, containing the created vertex.
11429             """
11430             # Example: see GEOM_TestMeasures.py
11431             # note: auto-publishing is done in self.GetVertexByIndex()
11432             return self.GetVertexByIndex(theShape, 0, True, theName)
11433
11434         ## Get the last vertex of wire/edge depended orientation.
11435         #  @param theShape Shape to find last vertex.
11436         #  @param theName Object name; when specified, this parameter is used
11437         #         for result publication in the study. Otherwise, if automatic
11438         #         publication is switched on, default value is used for result name.
11439         #
11440         #  @return New GEOM.GEOM_Object, containing the created vertex.
11441         #
11442         #  @ref tui_measurement_tools_page "Example"
11443         def GetLastVertex(self, theShape, theName=None):
11444             """
11445             Get the last vertex of wire/edge depended orientation.
11446
11447             Parameters:
11448                 theShape Shape to find last vertex.
11449                 theName Object name; when specified, this parameter is used
11450                         for result publication in the study. Otherwise, if automatic
11451                         publication is switched on, default value is used for result name.
11452
11453             Returns:
11454                 New GEOM.GEOM_Object, containing the created vertex.
11455             """
11456             # Example: see GEOM_TestMeasures.py
11457             nb_vert =  self.NumberOfSubShapes(theShape, self.ShapeType["VERTEX"])
11458             # note: auto-publishing is done in self.GetVertexByIndex()
11459             return self.GetVertexByIndex(theShape, (nb_vert-1), True, theName)
11460
11461         ## Get a normale to the given face. If the point is not given,
11462         #  the normale is calculated at the center of mass.
11463         #  @param theFace Face to define normale of.
11464         #  @param theOptionalPoint Point to compute the normale at.
11465         #  @param theName Object name; when specified, this parameter is used
11466         #         for result publication in the study. Otherwise, if automatic
11467         #         publication is switched on, default value is used for result name.
11468         #
11469         #  @return New GEOM.GEOM_Object, containing the created vector.
11470         #
11471         #  @ref swig_todo "Example"
11472         @ManageTransactions("MeasuOp")
11473         def GetNormal(self, theFace, theOptionalPoint = None, theName=None):
11474             """
11475             Get a normale to the given face. If the point is not given,
11476             the normale is calculated at the center of mass.
11477
11478             Parameters:
11479                 theFace Face to define normale of.
11480                 theOptionalPoint Point to compute the normale at.
11481                 theName Object name; when specified, this parameter is used
11482                         for result publication in the study. Otherwise, if automatic
11483                         publication is switched on, default value is used for result name.
11484
11485             Returns:
11486                 New GEOM.GEOM_Object, containing the created vector.
11487             """
11488             # Example: see GEOM_TestMeasures.py
11489             anObj = self.MeasuOp.GetNormal(theFace, theOptionalPoint)
11490             RaiseIfFailed("GetNormal", self.MeasuOp)
11491             self._autoPublish(anObj, theName, "normal")
11492             return anObj
11493
11494         ## Print shape errors obtained from CheckShape.
11495         #  @param theShape Shape that was checked.
11496         #  @param theShapeErrors the shape errors obtained by CheckShape.
11497         #  @param theReturnStatus If 0 the description of problem is printed.
11498         #                         If 1 the description of problem is returned.
11499         #  @return If theReturnStatus is equal to 1 the description is returned.
11500         #          Otherwise doesn't return anything.
11501         #
11502         #  @ref tui_check_shape_page "Example"
11503         @ManageTransactions("MeasuOp")
11504         def PrintShapeErrors(self, theShape, theShapeErrors, theReturnStatus = 0):
11505             """
11506             Print shape errors obtained from CheckShape.
11507
11508             Parameters:
11509                 theShape Shape that was checked.
11510                 theShapeErrors the shape errors obtained by CheckShape.
11511                 theReturnStatus If 0 the description of problem is printed.
11512                                 If 1 the description of problem is returned.
11513
11514             Returns:
11515                 If theReturnStatus is equal to 1 the description is returned.
11516                   Otherwise doesn't return anything.
11517             """
11518             # Example: see GEOM_TestMeasures.py
11519             Descr = self.MeasuOp.PrintShapeErrors(theShape, theShapeErrors)
11520             if theReturnStatus == 1:
11521                 return Descr
11522             print(Descr)
11523             pass
11524
11525         ## Check a topology of the given shape.
11526         #  @param theShape Shape to check validity of.
11527         #  @param theIsCheckGeom If FALSE, only the shape's topology will be checked, \n
11528         #                        if TRUE, the shape's geometry will be checked also.
11529         #  @param theReturnStatus If 0 and if theShape is invalid, a description
11530         #                         of problem is printed.
11531         #                         If 1 isValid flag and the description of
11532         #                         problem is returned.
11533         #                         If 2 isValid flag and the list of error data
11534         #                         is returned.
11535         #  @return TRUE, if the shape "seems to be valid".
11536         #          If theShape is invalid, prints a description of problem.
11537         #          If theReturnStatus is equal to 1 the description is returned
11538         #          along with IsValid flag.
11539         #          If theReturnStatus is equal to 2 the list of error data is
11540         #          returned along with IsValid flag.
11541         #
11542         #  @ref tui_check_shape_page "Example"
11543         @ManageTransactions("MeasuOp")
11544         def CheckShape(self,theShape, theIsCheckGeom = 0, theReturnStatus = 0):
11545             """
11546             Check a topology of the given shape.
11547
11548             Parameters:
11549                 theShape Shape to check validity of.
11550                 theIsCheckGeom If FALSE, only the shape's topology will be checked,
11551                                if TRUE, the shape's geometry will be checked also.
11552                 theReturnStatus If 0 and if theShape is invalid, a description
11553                                 of problem is printed.
11554                                 If 1 IsValid flag and the description of
11555                                 problem is returned.
11556                                 If 2 IsValid flag and the list of error data
11557                                 is returned.
11558
11559             Returns:
11560                 TRUE, if the shape "seems to be valid".
11561                 If theShape is invalid, prints a description of problem.
11562                 If theReturnStatus is equal to 1 the description is returned
11563                 along with IsValid flag.
11564                 If theReturnStatus is equal to 2 the list of error data is
11565                 returned along with IsValid flag.
11566             """
11567             # Example: see GEOM_TestMeasures.py
11568             if theIsCheckGeom:
11569                 (IsValid, ShapeErrors) = self.MeasuOp.CheckShapeWithGeometry(theShape)
11570                 RaiseIfFailed("CheckShapeWithGeometry", self.MeasuOp)
11571             else:
11572                 (IsValid, ShapeErrors) = self.MeasuOp.CheckShape(theShape)
11573                 RaiseIfFailed("CheckShape", self.MeasuOp)
11574             if IsValid == 0:
11575                 if theReturnStatus == 0:
11576                     Descr = self.MeasuOp.PrintShapeErrors(theShape, ShapeErrors)
11577                     print(Descr)
11578             if theReturnStatus == 1:
11579               Descr = self.MeasuOp.PrintShapeErrors(theShape, ShapeErrors)
11580               return (IsValid, Descr)
11581             elif theReturnStatus == 2:
11582               return (IsValid, ShapeErrors)
11583             return IsValid
11584
11585         ## Detect self-intersections in the given shape.
11586         #  @param theShape Shape to check.
11587         #  @param theCheckLevel is the level of self-intersection check.
11588         #         Possible input values are:
11589         #         - GEOM.SI_V_V(0) - only V/V interferences
11590         #         - GEOM.SI_V_E(1) - V/V and V/E interferences
11591         #         - GEOM.SI_E_E(2) - V/V, V/E and E/E interferences
11592         #         - GEOM.SI_V_F(3) - V/V, V/E, E/E and V/F interferences
11593         #         - GEOM.SI_E_F(4) - V/V, V/E, E/E, V/F and E/F interferences
11594         #         - GEOM.SI_ALL(5) - all interferences.
11595         #  @return TRUE, if the shape contains no self-intersections.
11596         #
11597         #  @ref tui_check_self_intersections_page "Example"
11598         @ManageTransactions("MeasuOp")
11599         def CheckSelfIntersections(self, theShape, theCheckLevel = GEOM.SI_ALL):
11600             """
11601             Detect self-intersections in the given shape.
11602
11603             Parameters:
11604                 theShape Shape to check.
11605                 theCheckLevel is the level of self-intersection check.
11606                   Possible input values are:
11607                    - GEOM.SI_V_V(0) - only V/V interferences
11608                    - GEOM.SI_V_E(1) - V/V and V/E interferences
11609                    - GEOM.SI_E_E(2) - V/V, V/E and E/E interferences
11610                    - GEOM.SI_V_F(3) - V/V, V/E, E/E and V/F interferences
11611                    - GEOM.SI_E_F(4) - V/V, V/E, E/E, V/F and E/F interferences
11612                    - GEOM.SI_ALL(5) - all interferences.
11613  
11614             Returns:
11615                 TRUE, if the shape contains no self-intersections.
11616             """
11617             # Example: see GEOM_TestMeasures.py
11618             (IsValid, Pairs) = self.MeasuOp.CheckSelfIntersections(theShape, EnumToLong(theCheckLevel))
11619             RaiseIfFailed("CheckSelfIntersections", self.MeasuOp)
11620             return IsValid
11621
11622         ## Detect self-intersections of the given shape with algorithm based on mesh intersections.
11623         #  @param theShape Shape to check.
11624         #  @param theDeflection Linear deflection coefficient that specifies quality of tessellation:
11625         #         - if \a theDeflection <= 0, default deflection 0.001 is used
11626         #  @param theTolerance Specifies a distance between sub-shapes used for detecting gaps:
11627         #         - if \a theTolerance <= 0, algorithm detects intersections (default behavior)
11628         #         - if \a theTolerance > 0, algorithm detects gaps
11629         #  @return TRUE, if the shape contains no self-intersections.
11630         #
11631         #  @ref tui_check_self_intersections_fast_page "Example"
11632         @ManageTransactions("MeasuOp")
11633         def CheckSelfIntersectionsFast(self, theShape, theDeflection = 0.001, theTolerance = 0.0):
11634             """
11635             Detect self-intersections of the given shape with algorithm based on mesh intersections.
11636
11637             Parameters:
11638                 theShape Shape to check.
11639                 theDeflection Linear deflection coefficient that specifies quality of tessellation:
11640                     - if theDeflection <= 0, default deflection 0.001 is used
11641                 theTolerance Specifies a distance between shapes used for detecting gaps:
11642                     - if theTolerance <= 0, algorithm detects intersections (default behavior)
11643                     - if theTolerance > 0, algorithm detects gaps
11644  
11645             Returns:
11646                 TRUE, if the shape contains no self-intersections.
11647             """
11648             # Example: see GEOM_TestMeasures.py
11649             (IsValid, Pairs) = self.MeasuOp.CheckSelfIntersectionsFast(theShape, theDeflection, theTolerance)
11650             RaiseIfFailed("CheckSelfIntersectionsFast", self.MeasuOp)
11651             return IsValid
11652
11653         ## Check boolean and partition operations arguments.
11654         #  @param theShape the argument of an operation to be checked
11655         #  @return TRUE if the argument is valid for a boolean or partition
11656         #          operation; FALSE otherwise.
11657         @ManageTransactions("MeasuOp")
11658         def CheckBOPArguments(self, theShape):
11659             """
11660             Check boolean and partition operations arguments.
11661
11662             Parameters:
11663                 theShape the argument of an operation to be checked
11664
11665             Returns:
11666                 TRUE if the argument is valid for a boolean or partition
11667                 operation; FALSE otherwise.
11668             """
11669             return self.MeasuOp.CheckBOPArguments(theShape)
11670
11671         ## Detect intersections of the given shapes with algorithm based on mesh intersections.
11672         #  @param theShape1 First source object
11673         #  @param theShape2 Second source object
11674         #  @param theTolerance Specifies a distance between shapes used for detecting gaps:
11675         #         - if \a theTolerance <= 0, algorithm detects intersections (default behavior)
11676         #         - if \a theTolerance > 0, algorithm detects gaps
11677         #  @param theDeflection Linear deflection coefficient that specifies quality of tessellation:
11678         #         - if \a theDeflection <= 0, default deflection 0.001 is used
11679         #  @return TRUE, if there are intersections (gaps) between source shapes
11680         #  @return List of sub-shapes IDs from 1st shape that localize intersection.
11681         #  @return List of sub-shapes IDs from 2nd shape that localize intersection.
11682         #
11683         #  @ref tui_fast_intersection_page "Example"
11684         @ManageTransactions("MeasuOp")
11685         def FastIntersect(self, theShape1, theShape2, theTolerance = 0.0, theDeflection = 0.001):
11686             """
11687             Detect intersections of the given shapes with algorithm based on mesh intersections.
11688
11689             Parameters:
11690                 theShape1 First source object
11691                 theShape2 Second source object
11692                 theTolerance Specifies a distance between shapes used for detecting gaps:
11693                     - if theTolerance <= 0, algorithm detects intersections (default behavior)
11694                     - if theTolerance > 0, algorithm detects gaps
11695                 theDeflection Linear deflection coefficient that specifies quality of tessellation:
11696                     - if theDeflection <= 0, default deflection 0.001 is used
11697  
11698             Returns:
11699                 TRUE, if there are intersections (gaps) between source shapes
11700                 List of sub-shapes IDs from 1st shape that localize intersection.
11701                 List of sub-shapes IDs from 2nd shape that localize intersection.
11702             """
11703             # Example: see GEOM_TestMeasures.py
11704             IsOk, Res1, Res2 = self.MeasuOp.FastIntersect(theShape1, theShape2, theTolerance, theDeflection)
11705             RaiseIfFailed("FastIntersect", self.MeasuOp)
11706             return IsOk, Res1, Res2
11707
11708         ## Get position (LCS) of theShape.
11709         #
11710         #  Origin of the LCS is situated at the shape's center of mass.
11711         #  Axes of the LCS are obtained from shape's location or,
11712         #  if the shape is a planar face, from position of its plane.
11713         #
11714         #  @param theShape Shape to calculate position of.
11715         #  @return [Ox,Oy,Oz, Zx,Zy,Zz, Xx,Xy,Xz].
11716         #          Ox,Oy,Oz: Coordinates of shape's LCS origin.
11717         #          Zx,Zy,Zz: Coordinates of shape's LCS normal(main) direction.
11718         #          Xx,Xy,Xz: Coordinates of shape's LCS X direction.
11719         #
11720         #  @ref swig_todo "Example"
11721         @ManageTransactions("MeasuOp")
11722         def GetPosition(self,theShape):
11723             """
11724             Get position (LCS) of theShape.
11725             Origin of the LCS is situated at the shape's center of mass.
11726             Axes of the LCS are obtained from shape's location or,
11727             if the shape is a planar face, from position of its plane.
11728
11729             Parameters:
11730                 theShape Shape to calculate position of.
11731
11732             Returns:
11733                 [Ox,Oy,Oz, Zx,Zy,Zz, Xx,Xy,Xz].
11734                  Ox,Oy,Oz: Coordinates of shape's LCS origin.
11735                  Zx,Zy,Zz: Coordinates of shape's LCS normal(main) direction.
11736                  Xx,Xy,Xz: Coordinates of shape's LCS X direction.
11737             """
11738             # Example: see GEOM_TestMeasures.py
11739             aTuple = self.MeasuOp.GetPosition(theShape)
11740             RaiseIfFailed("GetPosition", self.MeasuOp)
11741             return aTuple
11742
11743         ## Get kind of theShape.
11744         #
11745         #  @param theShape Shape to get a kind of.
11746         #  @return Returns a kind of shape in terms of <VAR>GEOM.GEOM_IKindOfShape.shape_kind</VAR> enumeration
11747         #          and a list of parameters, describing the shape.
11748         #  @note  Concrete meaning of each value, returned via \a theIntegers
11749         #         or \a theDoubles list depends on the kind() of the shape.
11750         #
11751         #  @ref swig_todo "Example"
11752         @ManageTransactions("MeasuOp")
11753         def KindOfShape(self,theShape):
11754             """
11755             Get kind of theShape.
11756
11757             Parameters:
11758                 theShape Shape to get a kind of.
11759
11760             Returns:
11761                 a kind of shape in terms of GEOM_IKindOfShape.shape_kind enumeration
11762                     and a list of parameters, describing the shape.
11763             Note:
11764                 Concrete meaning of each value, returned via theIntegers
11765                 or theDoubles list depends on the geompy.kind of the shape
11766             """
11767             # Example: see GEOM_TestMeasures.py
11768             aRoughTuple = self.MeasuOp.KindOfShape(theShape)
11769             RaiseIfFailed("KindOfShape", self.MeasuOp)
11770
11771             aKind  = aRoughTuple[0]
11772             anInts = aRoughTuple[1]
11773             aDbls  = aRoughTuple[2]
11774
11775             # Now there is no exception from this rule:
11776             aKindTuple = [aKind] + aDbls + anInts
11777
11778             # If they are we will regroup parameters for such kind of shape.
11779             # For example:
11780             #if aKind == kind.SOME_KIND:
11781             #    #  SOME_KIND     int int double int double double
11782             #    aKindTuple = [aKind, anInts[0], anInts[1], aDbls[0], anInts[2], aDbls[1], aDbls[2]]
11783
11784             return aKindTuple
11785
11786         ## Returns the string that describes if the shell is good for solid.
11787         #  This is a support method for MakeSolid.
11788         #
11789         #  @param theShell the shell to be checked.
11790         #  @return Returns a string that describes the shell validity for
11791         #          solid construction.
11792         @ManageTransactions("MeasuOp")
11793         def _IsGoodForSolid(self, theShell):
11794             """
11795             Returns the string that describes if the shell is good for solid.
11796             This is a support method for MakeSolid.
11797
11798             Parameter:
11799                 theShell the shell to be checked.
11800
11801             Returns:
11802                 Returns a string that describes the shell validity for
11803                 solid construction.
11804             """
11805             aDescr = self.MeasuOp.IsGoodForSolid(theShell)
11806             return aDescr
11807
11808         # end of l2_measure
11809         ## @}
11810
11811         ## @addtogroup l2_import_export
11812         ## @{
11813
11814         ## Import a shape from the BREP, IGES, STEP or other file
11815         #  (depends on given format) with given name.
11816         #
11817         #  Note: this function is deprecated, it is kept for backward compatibility only
11818         #  Use Import<FormatName> instead, where <FormatName> is a name of desirable format to import.
11819         #
11820         #  @param theFileName The file, containing the shape.
11821         #  @param theFormatName Specify format for the file reading.
11822         #         Available formats can be obtained with InsertOp.ImportTranslators() method.
11823         #         If format 'IGES_SCALE' is used instead of 'IGES' or
11824         #            format 'STEP_SCALE' is used instead of 'STEP',
11825         #            length unit will be set to 'meter' and result model will be scaled.
11826         #  @param theName Object name; when specified, this parameter is used
11827         #         for result publication in the study. Otherwise, if automatic
11828         #         publication is switched on, default value is used for result name.
11829         #
11830         #  @return New GEOM.GEOM_Object, containing the imported shape.
11831         #          If material names are imported it returns the list of
11832         #          objects. The first one is the imported object followed by
11833         #          material groups.
11834         #  @note Auto publishing is allowed for the shape itself. Imported
11835         #        material groups are not automatically published.
11836         #
11837         #  @ref swig_Import_Export "Example"
11838         @ManageTransactions("InsertOp")
11839         def ImportFile(self, theFileName, theFormatName, theName=None):
11840             """
11841             Import a shape from the BREP, IGES, STEP or other file
11842             (depends on given format) with given name.
11843
11844             Note: this function is deprecated, it is kept for backward compatibility only
11845             Use Import<FormatName> instead, where <FormatName> is a name of desirable format to import.
11846
11847             Parameters: 
11848                 theFileName The file, containing the shape.
11849                 theFormatName Specify format for the file reading.
11850                     Available formats can be obtained with geompy.InsertOp.ImportTranslators() method.
11851                     If format 'IGES_SCALE' is used instead of 'IGES' or
11852                        format 'STEP_SCALE' is used instead of 'STEP',
11853                        length unit will be set to 'meter' and result model will be scaled.
11854                 theName Object name; when specified, this parameter is used
11855                         for result publication in the study. Otherwise, if automatic
11856                         publication is switched on, default value is used for result name.
11857
11858             Returns:
11859                 New GEOM.GEOM_Object, containing the imported shape.
11860                 If material names are imported it returns the list of
11861                 objects. The first one is the imported object followed by
11862                 material groups.
11863             Note:
11864                 Auto publishing is allowed for the shape itself. Imported
11865                 material groups are not automatically published.
11866             """
11867             # Example: see GEOM_TestOthers.py
11868             print("""
11869             WARNING: Function ImportFile is deprecated, use Import<FormatName> instead,
11870             where <FormatName> is a name of desirable format for importing.
11871             """)
11872             aListObj = self.InsertOp.ImportFile(theFileName, theFormatName)
11873             RaiseIfFailed("ImportFile", self.InsertOp)
11874             aNbObj = len(aListObj)
11875             if aNbObj > 0:
11876                 self._autoPublish(aListObj[0], theName, "imported")
11877             if aNbObj == 1:
11878                 return aListObj[0]
11879             return aListObj
11880
11881         ## Deprecated analog of ImportFile()
11882         def Import(self, theFileName, theFormatName, theName=None):
11883             """
11884             Deprecated analog of geompy.ImportFile, kept for backward compatibility only.
11885             """
11886             # note: auto-publishing is done in self.ImportFile()
11887             return self.ImportFile(theFileName, theFormatName, theName)
11888
11889         ## Read a shape from the binary stream, containing its bounding representation (BRep).
11890         #
11891         #  @note As the byte-stream representing the shape data can be quite large, this method
11892         #  is not automatically dumped to the Python script with the DumpStudy functionality;
11893         #  so please use this method carefully, only for strong reasons.
11894         #  
11895         #  @note GEOM.GEOM_Object.GetShapeStream() method can be used to obtain the shape's
11896         #  data stream.
11897         #
11898         #  @param theStream The BRep binary stream.
11899         #  @param theName Object name; when specified, this parameter is used
11900         #         for result publication in the study. Otherwise, if automatic
11901         #         publication is switched on, default value is used for result name.
11902         #
11903         #  @return New GEOM_Object, containing the shape, read from theStream.
11904         #
11905         #  @ref swig_Import_Export "Example"
11906         @ManageTransactions("InsertOp")
11907         def RestoreShape (self, theStream, theName=None):
11908             """
11909             Read a shape from the binary stream, containing its bounding representation (BRep).
11910
11911             Note:
11912                 shape.GetShapeStream() method can be used to obtain the shape's BRep stream.
11913
11914             Parameters:
11915                 theStream The BRep binary stream.
11916                 theName Object name; when specified, this parameter is used
11917                         for result publication in the study. Otherwise, if automatic
11918                         publication is switched on, default value is used for result name.
11919
11920             Returns:
11921                 New GEOM_Object, containing the shape, read from theStream.
11922             """
11923             # Example: see GEOM_TestOthers.py
11924             if not theStream:
11925                 # this is the workaround to ignore invalid case when data stream is empty
11926                 if int(os.getenv("GEOM_IGNORE_RESTORE_SHAPE", "0")) > 0:
11927                     print("WARNING: Result of RestoreShape is a NULL shape!")
11928                     return None
11929             anObj = self.InsertOp.RestoreShape(theStream)
11930             RaiseIfFailed("RestoreShape", self.InsertOp)
11931             self._autoPublish(anObj, theName, "restored")
11932             return anObj
11933
11934         ## Export the given shape into a file with given name.
11935         #
11936         #  Note: this function is deprecated, it is kept for backward compatibility only
11937         #  Use Export<FormatName> instead, where <FormatName> is a name of desirable format to export.
11938         #
11939         #  @param theObject Shape to be stored in the file.
11940         #  @param theFileName Name of the file to store the given shape in.
11941         #  @param theFormatName Specify format for the shape storage.
11942         #         Available formats can be obtained with
11943         #         geompy.InsertOp.ExportTranslators()[0] method.
11944         #
11945         #  @ref swig_Import_Export "Example"
11946         @ManageTransactions("InsertOp")
11947         def Export(self, theObject, theFileName, theFormatName):
11948             """
11949             Export the given shape into a file with given name.
11950
11951             Note: this function is deprecated, it is kept for backward compatibility only
11952             Use Export<FormatName> instead, where <FormatName> is a name of desirable format to export.
11953             
11954             Parameters: 
11955                 theObject Shape to be stored in the file.
11956                 theFileName Name of the file to store the given shape in.
11957                 theFormatName Specify format for the shape storage.
11958                               Available formats can be obtained with
11959                               geompy.InsertOp.ExportTranslators()[0] method.
11960             """
11961             # Example: see GEOM_TestOthers.py
11962             print("""
11963             WARNING: Function Export is deprecated, use Export<FormatName> instead,
11964             where <FormatName> is a name of desirable format for exporting.
11965             """)
11966             self.InsertOp.Export(theObject, theFileName, theFormatName)
11967             if self.InsertOp.IsDone() == 0:
11968                 raise RuntimeError("Export : " + self.InsertOp.GetErrorCode())
11969                 pass
11970             pass
11971
11972         # end of l2_import_export
11973         ## @}
11974
11975         ## @addtogroup l3_blocks
11976         ## @{
11977
11978         ## Create a quadrangle face from four edges. Order of Edges is not
11979         #  important. It is not necessary that edges share the same vertex.
11980         #  @param E1,E2,E3,E4 Edges for the face bound.
11981         #  @param theName Object name; when specified, this parameter is used
11982         #         for result publication in the study. Otherwise, if automatic
11983         #         publication is switched on, default value is used for result name.
11984         #
11985         #  @return New GEOM.GEOM_Object, containing the created face.
11986         #
11987         #  @ref tui_building_by_blocks_page "Example"
11988         @ManageTransactions("BlocksOp")
11989         def MakeQuad(self, E1, E2, E3, E4, theName=None):
11990             """
11991             Create a quadrangle face from four edges. Order of Edges is not
11992             important. It is not necessary that edges share the same vertex.
11993
11994             Parameters:
11995                 E1,E2,E3,E4 Edges for the face bound.
11996                 theName Object name; when specified, this parameter is used
11997                         for result publication in the study. Otherwise, if automatic
11998                         publication is switched on, default value is used for result name.
11999
12000             Returns:
12001                 New GEOM.GEOM_Object, containing the created face.
12002
12003             Example of usage:
12004                 qface1 = geompy.MakeQuad(edge1, edge2, edge3, edge4)
12005             """
12006             # Example: see GEOM_Spanner.py
12007             anObj = self.BlocksOp.MakeQuad(E1, E2, E3, E4)
12008             RaiseIfFailed("MakeQuad", self.BlocksOp)
12009             self._autoPublish(anObj, theName, "quad")
12010             return anObj
12011
12012         ## Create a quadrangle face on two edges.
12013         #  The missing edges will be built by creating the shortest ones.
12014         #  @param E1,E2 Two opposite edges for the face.
12015         #  @param theName Object name; when specified, this parameter is used
12016         #         for result publication in the study. Otherwise, if automatic
12017         #         publication is switched on, default value is used for result name.
12018         #
12019         #  @return New GEOM.GEOM_Object, containing the created face.
12020         #
12021         #  @ref tui_building_by_blocks_page "Example"
12022         @ManageTransactions("BlocksOp")
12023         def MakeQuad2Edges(self, E1, E2, theName=None):
12024             """
12025             Create a quadrangle face on two edges.
12026             The missing edges will be built by creating the shortest ones.
12027
12028             Parameters:
12029                 E1,E2 Two opposite edges for the face.
12030                 theName Object name; when specified, this parameter is used
12031                         for result publication in the study. Otherwise, if automatic
12032                         publication is switched on, default value is used for result name.
12033
12034             Returns:
12035                 New GEOM.GEOM_Object, containing the created face.
12036
12037             Example of usage:
12038                 # create vertices
12039                 p1 = geompy.MakeVertex(  0.,   0.,   0.)
12040                 p2 = geompy.MakeVertex(150.,  30.,   0.)
12041                 p3 = geompy.MakeVertex(  0., 120.,  50.)
12042                 p4 = geompy.MakeVertex(  0.,  40.,  70.)
12043                 # create edges
12044                 edge1 = geompy.MakeEdge(p1, p2)
12045                 edge2 = geompy.MakeEdge(p3, p4)
12046                 # create a quadrangle face from two edges
12047                 qface2 = geompy.MakeQuad2Edges(edge1, edge2)
12048             """
12049             # Example: see GEOM_Spanner.py
12050             anObj = self.BlocksOp.MakeQuad2Edges(E1, E2)
12051             RaiseIfFailed("MakeQuad2Edges", self.BlocksOp)
12052             self._autoPublish(anObj, theName, "quad")
12053             return anObj
12054
12055         ## Create a quadrangle face with specified corners.
12056         #  The missing edges will be built by creating the shortest ones.
12057         #  @param V1,V2,V3,V4 Corner vertices for the face.
12058         #  @param theName Object name; when specified, this parameter is used
12059         #         for result publication in the study. Otherwise, if automatic
12060         #         publication is switched on, default value is used for result name.
12061         #
12062         #  @return New GEOM.GEOM_Object, containing the created face.
12063         #
12064         #  @ref tui_building_by_blocks_page "Example 1"
12065         #  \n @ref swig_MakeQuad4Vertices "Example 2"
12066         @ManageTransactions("BlocksOp")
12067         def MakeQuad4Vertices(self, V1, V2, V3, V4, theName=None):
12068             """
12069             Create a quadrangle face with specified corners.
12070             The missing edges will be built by creating the shortest ones.
12071
12072             Parameters:
12073                 V1,V2,V3,V4 Corner vertices for the face.
12074                 theName Object name; when specified, this parameter is used
12075                         for result publication in the study. Otherwise, if automatic
12076                         publication is switched on, default value is used for result name.
12077
12078             Returns:
12079                 New GEOM.GEOM_Object, containing the created face.
12080
12081             Example of usage:
12082                 # create vertices
12083                 p1 = geompy.MakeVertex(  0.,   0.,   0.)
12084                 p2 = geompy.MakeVertex(150.,  30.,   0.)
12085                 p3 = geompy.MakeVertex(  0., 120.,  50.)
12086                 p4 = geompy.MakeVertex(  0.,  40.,  70.)
12087                 # create a quadrangle from four points in its corners
12088                 qface3 = geompy.MakeQuad4Vertices(p1, p2, p3, p4)
12089             """
12090             # Example: see GEOM_Spanner.py
12091             anObj = self.BlocksOp.MakeQuad4Vertices(V1, V2, V3, V4)
12092             RaiseIfFailed("MakeQuad4Vertices", self.BlocksOp)
12093             self._autoPublish(anObj, theName, "quad")
12094             return anObj
12095
12096         ## Create a hexahedral solid, bounded by the six given faces. Order of
12097         #  faces is not important. It is not necessary that Faces share the same edge.
12098         #  @param F1,F2,F3,F4,F5,F6 Faces for the hexahedral solid.
12099         #  @param theName Object name; when specified, this parameter is used
12100         #         for result publication in the study. Otherwise, if automatic
12101         #         publication is switched on, default value is used for result name.
12102         #
12103         #  @return New GEOM.GEOM_Object, containing the created solid.
12104         #
12105         #  @ref tui_building_by_blocks_page "Example 1"
12106         #  \n @ref swig_MakeHexa "Example 2"
12107         @ManageTransactions("BlocksOp")
12108         def MakeHexa(self, F1, F2, F3, F4, F5, F6, theName=None):
12109             """
12110             Create a hexahedral solid, bounded by the six given faces. Order of
12111             faces is not important. It is not necessary that Faces share the same edge.
12112
12113             Parameters:
12114                 F1,F2,F3,F4,F5,F6 Faces for the hexahedral solid.
12115                 theName Object name; when specified, this parameter is used
12116                         for result publication in the study. Otherwise, if automatic
12117                         publication is switched on, default value is used for result name.
12118
12119             Returns:
12120                 New GEOM.GEOM_Object, containing the created solid.
12121
12122             Example of usage:
12123                 solid = geompy.MakeHexa(qface1, qface2, qface3, qface4, qface5, qface6)
12124             """
12125             # Example: see GEOM_Spanner.py
12126             anObj = self.BlocksOp.MakeHexa(F1, F2, F3, F4, F5, F6)
12127             RaiseIfFailed("MakeHexa", self.BlocksOp)
12128             self._autoPublish(anObj, theName, "hexa")
12129             return anObj
12130
12131         ## Create a hexahedral solid between two given faces.
12132         #  The missing faces will be built by creating the smallest ones.
12133         #  @param F1,F2 Two opposite faces for the hexahedral solid.
12134         #  @param theName Object name; when specified, this parameter is used
12135         #         for result publication in the study. Otherwise, if automatic
12136         #         publication is switched on, default value is used for result name.
12137         #
12138         #  @return New GEOM.GEOM_Object, containing the created solid.
12139         #
12140         #  @ref tui_building_by_blocks_page "Example 1"
12141         #  \n @ref swig_MakeHexa2Faces "Example 2"
12142         @ManageTransactions("BlocksOp")
12143         def MakeHexa2Faces(self, F1, F2, theName=None):
12144             """
12145             Create a hexahedral solid between two given faces.
12146             The missing faces will be built by creating the smallest ones.
12147
12148             Parameters:
12149                 F1,F2 Two opposite faces for the hexahedral solid.
12150                 theName Object name; when specified, this parameter is used
12151                         for result publication in the study. Otherwise, if automatic
12152                         publication is switched on, default value is used for result name.
12153
12154             Returns:
12155                 New GEOM.GEOM_Object, containing the created solid.
12156
12157             Example of usage:
12158                 solid1 = geompy.MakeHexa2Faces(qface1, qface2)
12159             """
12160             # Example: see GEOM_Spanner.py
12161             anObj = self.BlocksOp.MakeHexa2Faces(F1, F2)
12162             RaiseIfFailed("MakeHexa2Faces", self.BlocksOp)
12163             self._autoPublish(anObj, theName, "hexa")
12164             return anObj
12165
12166         # end of l3_blocks
12167         ## @}
12168
12169         ## @addtogroup l3_blocks_op
12170         ## @{
12171
12172         ## Get a vertex, found in the given shape by its coordinates.
12173         #  @param theShape Block or a compound of blocks.
12174         #  @param theX,theY,theZ Coordinates of the sought vertex.
12175         #  @param theEpsilon Maximum allowed distance between the resulting
12176         #                    vertex and point with the given coordinates.
12177         #  @param theName Object name; when specified, this parameter is used
12178         #         for result publication in the study. Otherwise, if automatic
12179         #         publication is switched on, default value is used for result name.
12180         #
12181         #  @return New GEOM.GEOM_Object, containing the found vertex.
12182         #
12183         #  @ref swig_GetPoint "Example"
12184         @ManageTransactions("BlocksOp")
12185         def GetPoint(self, theShape, theX, theY, theZ, theEpsilon, theName=None):
12186             """
12187             Get a vertex, found in the given shape by its coordinates.
12188
12189             Parameters:
12190                 theShape Block or a compound of blocks.
12191                 theX,theY,theZ Coordinates of the sought vertex.
12192                 theEpsilon Maximum allowed distance between the resulting
12193                            vertex and point with the given coordinates.
12194                 theName Object name; when specified, this parameter is used
12195                         for result publication in the study. Otherwise, if automatic
12196                         publication is switched on, default value is used for result name.
12197
12198             Returns:
12199                 New GEOM.GEOM_Object, containing the found vertex.
12200
12201             Example of usage:
12202                 pnt = geompy.GetPoint(shape, -50,  50,  50, 0.01)
12203             """
12204             # Example: see GEOM_TestOthers.py
12205             anObj = self.BlocksOp.GetPoint(theShape, theX, theY, theZ, theEpsilon)
12206             RaiseIfFailed("GetPoint", self.BlocksOp)
12207             self._autoPublish(anObj, theName, "vertex")
12208             return anObj
12209
12210         ## Find a vertex of the given shape, which has minimal distance to the given point.
12211         #  @param theShape Any shape.
12212         #  @param thePoint Point, close to the desired vertex.
12213         #  @param theName Object name; when specified, this parameter is used
12214         #         for result publication in the study. Otherwise, if automatic
12215         #         publication is switched on, default value is used for result name.
12216         #
12217         #  @return New GEOM.GEOM_Object, containing the found vertex.
12218         #
12219         #  @ref swig_GetVertexNearPoint "Example"
12220         @ManageTransactions("BlocksOp")
12221         def GetVertexNearPoint(self, theShape, thePoint, theName=None):
12222             """
12223             Find a vertex of the given shape, which has minimal distance to the given point.
12224
12225             Parameters:
12226                 theShape Any shape.
12227                 thePoint Point, close to the desired vertex.
12228                 theName Object name; when specified, this parameter is used
12229                         for result publication in the study. Otherwise, if automatic
12230                         publication is switched on, default value is used for result name.
12231
12232             Returns:
12233                 New GEOM.GEOM_Object, containing the found vertex.
12234
12235             Example of usage:
12236                 pmidle = geompy.MakeVertex(50, 0, 50)
12237                 edge1 = geompy.GetEdgeNearPoint(blocksComp, pmidle)
12238             """
12239             # Example: see GEOM_TestOthers.py
12240             anObj = self.BlocksOp.GetVertexNearPoint(theShape, thePoint)
12241             RaiseIfFailed("GetVertexNearPoint", self.BlocksOp)
12242             self._autoPublish(anObj, theName, "vertex")
12243             return anObj
12244
12245         ## Get an edge, found in the given shape by two given vertices.
12246         #  @param theShape Block or a compound of blocks.
12247         #  @param thePoint1,thePoint2 Points, close to the ends of the desired edge.
12248         #  @param theName Object name; when specified, this parameter is used
12249         #         for result publication in the study. Otherwise, if automatic
12250         #         publication is switched on, default value is used for result name.
12251         #
12252         #  @return New GEOM.GEOM_Object, containing the found edge.
12253         #
12254         #  @ref swig_GetEdge "Example"
12255         @ManageTransactions("BlocksOp")
12256         def GetEdge(self, theShape, thePoint1, thePoint2, theName=None):
12257             """
12258             Get an edge, found in the given shape by two given vertices.
12259
12260             Parameters:
12261                 theShape Block or a compound of blocks.
12262                 thePoint1,thePoint2 Points, close to the ends of the desired edge.
12263                 theName Object name; when specified, this parameter is used
12264                         for result publication in the study. Otherwise, if automatic
12265                         publication is switched on, default value is used for result name.
12266
12267             Returns:
12268                 New GEOM.GEOM_Object, containing the found edge.
12269             """
12270             # Example: see GEOM_Spanner.py
12271             anObj = self.BlocksOp.GetEdge(theShape, thePoint1, thePoint2)
12272             RaiseIfFailed("GetEdge", self.BlocksOp)
12273             self._autoPublish(anObj, theName, "edge")
12274             return anObj
12275
12276         ## Find an edge of the given shape, which has minimal distance to the given point.
12277         #  @param theShape Block or a compound of blocks.
12278         #  @param thePoint Point, close to the desired edge.
12279         #  @param theName Object name; when specified, this parameter is used
12280         #         for result publication in the study. Otherwise, if automatic
12281         #         publication is switched on, default value is used for result name.
12282         #
12283         #  @return New GEOM.GEOM_Object, containing the found edge.
12284         #
12285         #  @ref swig_GetEdgeNearPoint "Example"
12286         @ManageTransactions("BlocksOp")
12287         def GetEdgeNearPoint(self, theShape, thePoint, theName=None):
12288             """
12289             Find an edge of the given shape, which has minimal distance to the given point.
12290
12291             Parameters:
12292                 theShape Block or a compound of blocks.
12293                 thePoint Point, close to the desired edge.
12294                 theName Object name; when specified, this parameter is used
12295                         for result publication in the study. Otherwise, if automatic
12296                         publication is switched on, default value is used for result name.
12297
12298             Returns:
12299                 New GEOM.GEOM_Object, containing the found edge.
12300             """
12301             # Example: see GEOM_TestOthers.py
12302             anObj = self.BlocksOp.GetEdgeNearPoint(theShape, thePoint)
12303             RaiseIfFailed("GetEdgeNearPoint", self.BlocksOp)
12304             self._autoPublish(anObj, theName, "edge")
12305             return anObj
12306
12307         ## Returns a face, found in the given shape by four given corner vertices.
12308         #  @param theShape Block or a compound of blocks.
12309         #  @param thePoint1,thePoint2,thePoint3,thePoint4 Points, close to the corners of the desired face.
12310         #  @param theName Object name; when specified, this parameter is used
12311         #         for result publication in the study. Otherwise, if automatic
12312         #         publication is switched on, default value is used for result name.
12313         #
12314         #  @return New GEOM.GEOM_Object, containing the found face.
12315         #
12316         #  @ref swig_todo "Example"
12317         @ManageTransactions("BlocksOp")
12318         def GetFaceByPoints(self, theShape, thePoint1, thePoint2, thePoint3, thePoint4, theName=None):
12319             """
12320             Returns a face, found in the given shape by four given corner vertices.
12321
12322             Parameters:
12323                 theShape Block or a compound of blocks.
12324                 thePoint1,thePoint2,thePoint3,thePoint4 Points, close to the corners of the desired face.
12325                 theName Object name; when specified, this parameter is used
12326                         for result publication in the study. Otherwise, if automatic
12327                         publication is switched on, default value is used for result name.
12328
12329             Returns:
12330                 New GEOM.GEOM_Object, containing the found face.
12331             """
12332             # Example: see GEOM_Spanner.py
12333             anObj = self.BlocksOp.GetFaceByPoints(theShape, thePoint1, thePoint2, thePoint3, thePoint4)
12334             RaiseIfFailed("GetFaceByPoints", self.BlocksOp)
12335             self._autoPublish(anObj, theName, "face")
12336             return anObj
12337
12338         ## Get a face of block, found in the given shape by two given edges.
12339         #  @param theShape Block or a compound of blocks.
12340         #  @param theEdge1,theEdge2 Edges, close to the edges of the desired face.
12341         #  @param theName Object name; when specified, this parameter is used
12342         #         for result publication in the study. Otherwise, if automatic
12343         #         publication is switched on, default value is used for result name.
12344         #
12345         #  @return New GEOM.GEOM_Object, containing the found face.
12346         #
12347         #  @ref swig_todo "Example"
12348         @ManageTransactions("BlocksOp")
12349         def GetFaceByEdges(self, theShape, theEdge1, theEdge2, theName=None):
12350             """
12351             Get a face of block, found in the given shape by two given edges.
12352
12353             Parameters:
12354                 theShape Block or a compound of blocks.
12355                 theEdge1,theEdge2 Edges, close to the edges of the desired face.
12356                 theName Object name; when specified, this parameter is used
12357                         for result publication in the study. Otherwise, if automatic
12358                         publication is switched on, default value is used for result name.
12359
12360             Returns:
12361                 New GEOM.GEOM_Object, containing the found face.
12362             """
12363             # Example: see GEOM_Spanner.py
12364             anObj = self.BlocksOp.GetFaceByEdges(theShape, theEdge1, theEdge2)
12365             RaiseIfFailed("GetFaceByEdges", self.BlocksOp)
12366             self._autoPublish(anObj, theName, "face")
12367             return anObj
12368
12369         ## Find a face, opposite to the given one in the given block.
12370         #  @param theBlock Must be a hexahedral solid.
12371         #  @param theFace Face of \a theBlock, opposite to the desired face.
12372         #  @param theName Object name; when specified, this parameter is used
12373         #         for result publication in the study. Otherwise, if automatic
12374         #         publication is switched on, default value is used for result name.
12375         #
12376         #  @return New GEOM.GEOM_Object, containing the found face.
12377         #
12378         #  @ref swig_GetOppositeFace "Example"
12379         @ManageTransactions("BlocksOp")
12380         def GetOppositeFace(self, theBlock, theFace, theName=None):
12381             """
12382             Find a face, opposite to the given one in the given block.
12383
12384             Parameters:
12385                 theBlock Must be a hexahedral solid.
12386                 theFace Face of theBlock, opposite to the desired face.
12387                 theName Object name; when specified, this parameter is used
12388                         for result publication in the study. Otherwise, if automatic
12389                         publication is switched on, default value is used for result name.
12390
12391             Returns:
12392                 New GEOM.GEOM_Object, containing the found face.
12393             """
12394             # Example: see GEOM_Spanner.py
12395             anObj = self.BlocksOp.GetOppositeFace(theBlock, theFace)
12396             RaiseIfFailed("GetOppositeFace", self.BlocksOp)
12397             self._autoPublish(anObj, theName, "face")
12398             return anObj
12399
12400         ## Find a face of the given shape, which has minimal distance to the given point.
12401         #  @param theShape Block or a compound of blocks.
12402         #  @param thePoint Point, close to the desired face.
12403         #  @param theName Object name; when specified, this parameter is used
12404         #         for result publication in the study. Otherwise, if automatic
12405         #         publication is switched on, default value is used for result name.
12406         #
12407         #  @return New GEOM.GEOM_Object, containing the found face.
12408         #
12409         #  @ref swig_GetFaceNearPoint "Example"
12410         @ManageTransactions("BlocksOp")
12411         def GetFaceNearPoint(self, theShape, thePoint, theName=None):
12412             """
12413             Find a face of the given shape, which has minimal distance to the given point.
12414
12415             Parameters:
12416                 theShape Block or a compound of blocks.
12417                 thePoint Point, close to the desired face.
12418                 theName Object name; when specified, this parameter is used
12419                         for result publication in the study. Otherwise, if automatic
12420                         publication is switched on, default value is used for result name.
12421
12422             Returns:
12423                 New GEOM.GEOM_Object, containing the found face.
12424             """
12425             # Example: see GEOM_Spanner.py
12426             anObj = self.BlocksOp.GetFaceNearPoint(theShape, thePoint)
12427             RaiseIfFailed("GetFaceNearPoint", self.BlocksOp)
12428             self._autoPublish(anObj, theName, "face")
12429             return anObj
12430
12431         ## Find a face of block, whose outside normale has minimal angle with the given vector.
12432         #  @param theBlock Block or a compound of blocks.
12433         #  @param theVector Vector, close to the normale of the desired face.
12434         #  @param 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         #  @return New GEOM.GEOM_Object, containing the found face.
12439         #
12440         #  @ref swig_todo "Example"
12441         @ManageTransactions("BlocksOp")
12442         def GetFaceByNormale(self, theBlock, theVector, theName=None):
12443             """
12444             Find a face of block, whose outside normale has minimal angle with the given vector.
12445
12446             Parameters:
12447                 theBlock Block or a compound of blocks.
12448                 theVector Vector, close to the normale of the desired face.
12449                 theName Object name; when specified, this parameter is used
12450                         for result publication in the study. Otherwise, if automatic
12451                         publication is switched on, default value is used for result name.
12452
12453             Returns:
12454                 New GEOM.GEOM_Object, containing the found face.
12455             """
12456             # Example: see GEOM_Spanner.py
12457             anObj = self.BlocksOp.GetFaceByNormale(theBlock, theVector)
12458             RaiseIfFailed("GetFaceByNormale", self.BlocksOp)
12459             self._autoPublish(anObj, theName, "face")
12460             return anObj
12461
12462         ## Find all sub-shapes of type \a theShapeType of the given shape,
12463         #  which have minimal distance to the given point.
12464         #  @param theShape Any shape.
12465         #  @param thePoint Point, close to the desired shape.
12466         #  @param theShapeType Defines what kind of sub-shapes is searched GEOM::shape_type
12467         #  @param theTolerance The tolerance for distances comparison. All shapes
12468         #                      with distances to the given point in interval
12469         #                      [minimal_distance, minimal_distance + theTolerance] will be gathered.
12470         #  @param theName Object name; when specified, this parameter is used
12471         #         for result publication in the study. Otherwise, if automatic
12472         #         publication is switched on, default value is used for result name.
12473         #
12474         #  @return New GEOM_Object, containing a group of all found shapes.
12475         #
12476         #  @ref swig_GetShapesNearPoint "Example"
12477         @ManageTransactions("BlocksOp")
12478         def GetShapesNearPoint(self, theShape, thePoint, theShapeType, theTolerance = 1e-07, theName=None):
12479             """
12480             Find all sub-shapes of type theShapeType of the given shape,
12481             which have minimal distance to the given point.
12482
12483             Parameters:
12484                 theShape Any shape.
12485                 thePoint Point, close to the desired shape.
12486                 theShapeType Defines what kind of sub-shapes is searched (see GEOM::shape_type)
12487                 theTolerance The tolerance for distances comparison. All shapes
12488                                 with distances to the given point in interval
12489                                 [minimal_distance, minimal_distance + theTolerance] will be gathered.
12490                 theName Object name; when specified, this parameter is used
12491                         for result publication in the study. Otherwise, if automatic
12492                         publication is switched on, default value is used for result name.
12493
12494             Returns:
12495                 New GEOM_Object, containing a group of all found shapes.
12496             """
12497             # Example: see GEOM_TestOthers.py
12498             anObj = self.BlocksOp.GetShapesNearPoint(theShape, thePoint, theShapeType, theTolerance)
12499             RaiseIfFailed("GetShapesNearPoint", self.BlocksOp)
12500             self._autoPublish(anObj, theName, "group")
12501             return anObj
12502
12503         # end of l3_blocks_op
12504         ## @}
12505
12506         ## @addtogroup l4_blocks_measure
12507         ## @{
12508
12509         ## Check, if the compound of blocks is given.
12510         #  To be considered as a compound of blocks, the
12511         #  given shape must satisfy the following conditions:
12512         #  - Each element of the compound should be a Block (6 faces).
12513         #  - Each face should be a quadrangle, i.e. it should have only 1 wire
12514         #       with 4 edges. If <VAR>theIsUseC1</VAR> is set to True and
12515         #       there are more than 4 edges in the only wire of a face,
12516         #       this face is considered to be quadrangle if it has 4 bounds
12517         #       (1 or more edge) of C1 continuity.
12518         #  - A connection between two Blocks should be an entire quadrangle face or an entire edge.
12519         #  - The compound should be connexe.
12520         #  - The glue between two quadrangle faces should be applied.
12521         #  @param theCompound The compound to check.
12522         #  @param theIsUseC1 Flag to check if there are 4 bounds on a face
12523         #         taking into account C1 continuity.
12524         #  @param theAngTolerance the angular tolerance to check if two neighbor
12525         #         edges are codirectional in the common vertex with this
12526         #         tolerance. This parameter is used only if
12527         #         <VAR>theIsUseC1</VAR> is set to True.
12528         #  @return TRUE, if the given shape is a compound of blocks.
12529         #  If theCompound is not valid, prints all discovered errors.
12530         #
12531         #  @ref tui_check_compound_of_blocks_page "Example 1"
12532         #  \n @ref swig_CheckCompoundOfBlocks "Example 2"
12533         @ManageTransactions("BlocksOp")
12534         def CheckCompoundOfBlocks(self,theCompound, theIsUseC1 = False,
12535                                   theAngTolerance = 1.e-12):
12536             """
12537             Check, if the compound of blocks is given.
12538             To be considered as a compound of blocks, the
12539             given shape must satisfy the following conditions:
12540             - Each element of the compound should be a Block (6 faces).
12541             - Each face should be a quadrangle, i.e. it should have only 1 wire
12542                  with 4 edges. If theIsUseC1 is set to True and
12543                  there are more than 4 edges in the only wire of a face,
12544                  this face is considered to be quadrangle if it has 4 bounds
12545                  (1 or more edge) of C1 continuity.
12546             - A connection between two Blocks should be an entire quadrangle face or an entire edge.
12547             - The compound should be connexe.
12548             - The glue between two quadrangle faces should be applied.
12549
12550             Parameters:
12551                 theCompound The compound to check.
12552                 theIsUseC1 Flag to check if there are 4 bounds on a face
12553                            taking into account C1 continuity.
12554                 theAngTolerance the angular tolerance to check if two neighbor
12555                            edges are codirectional in the common vertex with this
12556                            tolerance. This parameter is used only if
12557                            theIsUseC1 is set to True.
12558
12559             Returns:
12560                 TRUE, if the given shape is a compound of blocks.
12561                 If theCompound is not valid, prints all discovered errors.
12562             """
12563             # Example: see GEOM_Spanner.py
12564             aTolerance = -1.0
12565             if theIsUseC1:
12566                 aTolerance = theAngTolerance
12567             (IsValid, BCErrors) = self.BlocksOp.CheckCompoundOfBlocks(theCompound, aTolerance)
12568             RaiseIfFailed("CheckCompoundOfBlocks", self.BlocksOp)
12569             if IsValid == 0:
12570                 Descr = self.BlocksOp.PrintBCErrors(theCompound, BCErrors)
12571                 print(Descr)
12572             return IsValid
12573
12574         ## Retrieve all non blocks solids and faces from \a theShape.
12575         #  @param theShape The shape to explore.
12576         #  @param theIsUseC1 Flag to check if there are 4 bounds on a face
12577         #         taking into account C1 continuity.
12578         #  @param theAngTolerance the angular tolerance to check if two neighbor
12579         #         edges are codirectional in the common vertex with this
12580         #         tolerance. This parameter is used only if
12581         #         <VAR>theIsUseC1</VAR> is set to True.
12582         #  @param theName Object name; when specified, this parameter is used
12583         #         for result publication in the study. Otherwise, if automatic
12584         #         publication is switched on, default value is used for result name.
12585         #
12586         #  @return A tuple of two GEOM_Objects. The first object is a group of all
12587         #          non block solids (= not 6 faces, or with 6 faces, but with the
12588         #          presence of non-quadrangular faces). The second object is a
12589         #          group of all non quadrangular faces (= faces with more then
12590         #          1 wire or, if <VAR>theIsUseC1</VAR> is set to True, faces
12591         #          with 1 wire with not 4 edges that do not form 4 bounds of
12592         #          C1 continuity).
12593         #
12594         #  @ref tui_get_non_blocks_page "Example 1"
12595         #  \n @ref swig_GetNonBlocks "Example 2"
12596         @ManageTransactions("BlocksOp")
12597         def GetNonBlocks (self, theShape, theIsUseC1 = False,
12598                           theAngTolerance = 1.e-12, theName=None):
12599             """
12600             Retrieve all non blocks solids and faces from theShape.
12601
12602             Parameters:
12603                 theShape The shape to explore.
12604                 theIsUseC1 Flag to check if there are 4 bounds on a face
12605                            taking into account C1 continuity.
12606                 theAngTolerance the angular tolerance to check if two neighbor
12607                            edges are codirectional in the common vertex with this
12608                            tolerance. This parameter is used only if
12609                            theIsUseC1 is set to True.
12610                 theName Object name; when specified, this parameter is used
12611                         for result publication in the study. Otherwise, if automatic
12612                         publication is switched on, default value is used for result name.
12613
12614             Returns:
12615                 A tuple of two GEOM_Objects. The first object is a group of all
12616                 non block solids (= not 6 faces, or with 6 faces, but with the
12617                 presence of non-quadrangular faces). The second object is a
12618                 group of all non quadrangular faces (= faces with more then
12619                 1 wire or, if <VAR>theIsUseC1</VAR> is set to True, faces
12620                 with 1 wire with not 4 edges that do not form 4 bounds of
12621                 C1 continuity).
12622
12623             Usage:
12624                 (res_sols, res_faces) = geompy.GetNonBlocks(myShape1)
12625             """
12626             # Example: see GEOM_Spanner.py
12627             aTolerance = -1.0
12628             if theIsUseC1:
12629                 aTolerance = theAngTolerance
12630             aTuple = self.BlocksOp.GetNonBlocks(theShape, aTolerance)
12631             RaiseIfFailed("GetNonBlocks", self.BlocksOp)
12632             self._autoPublish(aTuple, theName, ("groupNonHexas", "groupNonQuads"))
12633             return aTuple
12634
12635         ## Remove all seam and degenerated edges from \a theShape.
12636         #  Unite faces and edges, sharing one surface. It means that
12637         #  this faces must have references to one C++ surface object (handle).
12638         #  @param theShape The compound or single solid to remove irregular edges from.
12639         #  @param doUnionFaces If True, then unite faces. If False (the default value),
12640         #         do not unite faces.
12641         #  @param theName Object name; when specified, this parameter is used
12642         #         for result publication in the study. Otherwise, if automatic
12643         #         publication is switched on, default value is used for result name.
12644         #
12645         #  @return Improved shape.
12646         #
12647         #  @ref swig_RemoveExtraEdges "Example"
12648         @ManageTransactions("BlocksOp")
12649         def RemoveExtraEdges(self, theShape, doUnionFaces=False, theName=None):
12650             """
12651             Remove all seam and degenerated edges from theShape.
12652             Unite faces and edges, sharing one surface. It means that
12653             this faces must have references to one C++ surface object (handle).
12654
12655             Parameters:
12656                 theShape The compound or single solid to remove irregular edges from.
12657                 doUnionFaces If True, then unite faces. If False (the default value),
12658                              do not unite faces.
12659                 theName Object name; when specified, this parameter is used
12660                         for result publication in the study. Otherwise, if automatic
12661                         publication is switched on, default value is used for result name.
12662
12663             Returns:
12664                 Improved shape.
12665             """
12666             # Example: see GEOM_TestOthers.py
12667             nbFacesOptimum = -1 # -1 means do not unite faces
12668             if doUnionFaces is True: nbFacesOptimum = 0 # 0 means unite faces
12669             anObj = self.BlocksOp.RemoveExtraEdges(theShape, nbFacesOptimum)
12670             RaiseIfFailed("RemoveExtraEdges", self.BlocksOp)
12671             self._autoPublish(anObj, theName, "removeExtraEdges")
12672             return anObj
12673
12674         ## Performs union faces of \a theShape
12675         #  Unite faces sharing one surface. It means that
12676         #  these faces must have references to one C++ surface object (handle).
12677         #  @param theShape The compound or single solid that contains faces
12678         #         to perform union.
12679         #  @param theName Object name; when specified, this parameter is used
12680         #         for result publication in the study. Otherwise, if automatic
12681         #         publication is switched on, default value is used for result name.
12682         #
12683         #  @return Improved shape.
12684         #
12685         #  @ref swig_UnionFaces "Example"
12686         @ManageTransactions("BlocksOp")
12687         def UnionFaces(self, theShape, theName=None):
12688             """
12689             Performs union faces of theShape.
12690             Unite faces sharing one surface. It means that
12691             these faces must have references to one C++ surface object (handle).
12692
12693             Parameters:
12694                 theShape The compound or single solid that contains faces
12695                          to perform union.
12696                 theName Object name; when specified, this parameter is used
12697                         for result publication in the study. Otherwise, if automatic
12698                         publication is switched on, default value is used for result name.
12699
12700             Returns:
12701                 Improved shape.
12702             """
12703             # Example: see GEOM_TestOthers.py
12704             anObj = self.BlocksOp.UnionFaces(theShape)
12705             RaiseIfFailed("UnionFaces", self.BlocksOp)
12706             self._autoPublish(anObj, theName, "unionFaces")
12707             return anObj
12708
12709         ## Check, if the given shape is a blocks compound.
12710         #  Fix all detected errors.
12711         #    \note Single block can be also fixed by this method.
12712         #  @param theShape The compound to check and improve.
12713         #  @param theName Object name; when specified, this parameter is used
12714         #         for result publication in the study. Otherwise, if automatic
12715         #         publication is switched on, default value is used for result name.
12716         #
12717         #  @return Improved compound.
12718         #
12719         #  @ref swig_CheckAndImprove "Example"
12720         @ManageTransactions("BlocksOp")
12721         def CheckAndImprove(self, theShape, theName=None):
12722             """
12723             Check, if the given shape is a blocks compound.
12724             Fix all detected errors.
12725
12726             Note:
12727                 Single block can be also fixed by this method.
12728
12729             Parameters:
12730                 theShape The compound to check and improve.
12731                 theName Object name; when specified, this parameter is used
12732                         for result publication in the study. Otherwise, if automatic
12733                         publication is switched on, default value is used for result name.
12734
12735             Returns:
12736                 Improved compound.
12737             """
12738             # Example: see GEOM_TestOthers.py
12739             anObj = self.BlocksOp.CheckAndImprove(theShape)
12740             RaiseIfFailed("CheckAndImprove", self.BlocksOp)
12741             self._autoPublish(anObj, theName, "improved")
12742             return anObj
12743
12744         # end of l4_blocks_measure
12745         ## @}
12746
12747         ## @addtogroup l3_blocks_op
12748         ## @{
12749
12750         ## Get all the blocks, contained in the given compound.
12751         #  @param theCompound The compound to explode.
12752         #  @param theMinNbFaces If solid has lower number of faces, it is not a block.
12753         #  @param theMaxNbFaces If solid has higher number of faces, it is not a block.
12754         #  @param theName Object name; when specified, this parameter is used
12755         #         for result publication in the study. Otherwise, if automatic
12756         #         publication is switched on, default value is used for result name.
12757         #
12758         #  @note If theMaxNbFaces = 0, the maximum number of faces is not restricted.
12759         #
12760         #  @return List of GEOM.GEOM_Object, containing the retrieved blocks.
12761         #
12762         #  @ref tui_explode_on_blocks "Example 1"
12763         #  \n @ref swig_MakeBlockExplode "Example 2"
12764         @ManageTransactions("BlocksOp")
12765         def MakeBlockExplode(self, theCompound, theMinNbFaces, theMaxNbFaces, theName=None):
12766             """
12767             Get all the blocks, contained in the given compound.
12768
12769             Parameters:
12770                 theCompound The compound to explode.
12771                 theMinNbFaces If solid has lower number of faces, it is not a block.
12772                 theMaxNbFaces If solid has higher number of faces, it is not a block.
12773                 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             Note:
12778                 If theMaxNbFaces = 0, the maximum number of faces is not restricted.
12779
12780             Returns:
12781                 List of GEOM.GEOM_Object, containing the retrieved blocks.
12782             """
12783             # Example: see GEOM_TestOthers.py
12784             theMinNbFaces,theMaxNbFaces,Parameters = ParseParameters(theMinNbFaces,theMaxNbFaces)
12785             aList = self.BlocksOp.ExplodeCompoundOfBlocks(theCompound, theMinNbFaces, theMaxNbFaces)
12786             RaiseIfFailed("ExplodeCompoundOfBlocks", self.BlocksOp)
12787             for anObj in aList:
12788                 anObj.SetParameters(Parameters)
12789                 pass
12790             self._autoPublish(aList, theName, "block")
12791             return aList
12792
12793         ## Find block, containing the given point inside its volume or on boundary.
12794         #  @param theCompound Compound, to find block in.
12795         #  @param thePoint Point, close to the desired block. If the point lays on
12796         #         boundary between some blocks, we return block with nearest center.
12797         #  @param theName Object name; when specified, this parameter is used
12798         #         for result publication in the study. Otherwise, if automatic
12799         #         publication is switched on, default value is used for result name.
12800         #
12801         #  @return New GEOM.GEOM_Object, containing the found block.
12802         #
12803         #  @ref swig_todo "Example"
12804         @ManageTransactions("BlocksOp")
12805         def GetBlockNearPoint(self, theCompound, thePoint, theName=None):
12806             """
12807             Find block, containing the given point inside its volume or on boundary.
12808
12809             Parameters:
12810                 theCompound Compound, to find block in.
12811                 thePoint Point, close to the desired block. If the point lays on
12812                          boundary between some blocks, we return block with nearest center.
12813                 theName Object name; when specified, this parameter is used
12814                         for result publication in the study. Otherwise, if automatic
12815                         publication is switched on, default value is used for result name.
12816
12817             Returns:
12818                 New GEOM.GEOM_Object, containing the found block.
12819             """
12820             # Example: see GEOM_Spanner.py
12821             anObj = self.BlocksOp.GetBlockNearPoint(theCompound, thePoint)
12822             RaiseIfFailed("GetBlockNearPoint", self.BlocksOp)
12823             self._autoPublish(anObj, theName, "block")
12824             return anObj
12825
12826         ## Find block, containing all the elements, passed as the parts, or maximum quantity of them.
12827         #  @param theCompound Compound, to find block in.
12828         #  @param theParts List of faces and/or edges and/or vertices to be parts of the found block.
12829         #  @param theName Object name; when specified, this parameter is used
12830         #         for result publication in the study. Otherwise, if automatic
12831         #         publication is switched on, default value is used for result name.
12832         #
12833         #  @return New GEOM.GEOM_Object, containing the found block.
12834         #
12835         #  @ref swig_GetBlockByParts "Example"
12836         @ManageTransactions("BlocksOp")
12837         def GetBlockByParts(self, theCompound, theParts, theName=None):
12838             """
12839              Find block, containing all the elements, passed as the parts, or maximum quantity of them.
12840
12841              Parameters:
12842                 theCompound Compound, to find block in.
12843                 theParts List of faces and/or edges and/or vertices to be parts of the found block.
12844                 theName Object name; when specified, this parameter is used
12845                         for result publication in the study. Otherwise, if automatic
12846                         publication is switched on, default value is used for result name.
12847
12848             Returns:
12849                 New GEOM_Object, containing the found block.
12850             """
12851             # Example: see GEOM_TestOthers.py
12852             anObj = self.BlocksOp.GetBlockByParts(theCompound, theParts)
12853             RaiseIfFailed("GetBlockByParts", self.BlocksOp)
12854             self._autoPublish(anObj, theName, "block")
12855             return anObj
12856
12857         ## Return all blocks, containing all the elements, passed as the parts.
12858         #  @param theCompound Compound, to find blocks in.
12859         #  @param theParts List of faces and/or edges and/or vertices to be parts of the found blocks.
12860         #  @param theName Object name; when specified, this parameter is used
12861         #         for result publication in the study. Otherwise, if automatic
12862         #         publication is switched on, default value is used for result name.
12863         #
12864         #  @return List of GEOM.GEOM_Object, containing the found blocks.
12865         #
12866         #  @ref swig_todo "Example"
12867         @ManageTransactions("BlocksOp")
12868         def GetBlocksByParts(self, theCompound, theParts, theName=None):
12869             """
12870             Return all blocks, containing all the elements, passed as the parts.
12871
12872             Parameters:
12873                 theCompound Compound, to find blocks in.
12874                 theParts List of faces and/or edges and/or vertices to be parts of the found blocks.
12875                 theName Object name; when specified, this parameter is used
12876                         for result publication in the study. Otherwise, if automatic
12877                         publication is switched on, default value is used for result name.
12878
12879             Returns:
12880                 List of GEOM.GEOM_Object, containing the found blocks.
12881             """
12882             # Example: see GEOM_Spanner.py
12883             aList = self.BlocksOp.GetBlocksByParts(theCompound, theParts)
12884             RaiseIfFailed("GetBlocksByParts", self.BlocksOp)
12885             self._autoPublish(aList, theName, "block")
12886             return aList
12887
12888         ## Multi-transformate block and glue the result.
12889         #  Transformation is defined so, as to superpose direction faces.
12890         #  @param Block Hexahedral solid to be multi-transformed.
12891         #  @param DirFace1 ID of First direction face.
12892         #  @param DirFace2 ID of Second direction face.
12893         #  @param NbTimes Quantity of transformations to be done.
12894         #  @param theName Object name; when specified, this parameter is used
12895         #         for result publication in the study. Otherwise, if automatic
12896         #         publication is switched on, default value is used for result name.
12897         #
12898         #  @note Unique ID of sub-shape can be obtained, using method GetSubShapeID().
12899         #
12900         #  @return New GEOM.GEOM_Object, containing the result shape.
12901         #
12902         #  @ref tui_multi_transformation "Example"
12903         @ManageTransactions("BlocksOp")
12904         def MakeMultiTransformation1D(self, Block, DirFace1, DirFace2, NbTimes, theName=None):
12905             """
12906             Multi-transformate block and glue the result.
12907             Transformation is defined so, as to superpose direction faces.
12908
12909             Parameters:
12910                 Block Hexahedral solid to be multi-transformed.
12911                 DirFace1 ID of First direction face.
12912                 DirFace2 ID of Second direction face.
12913                 NbTimes Quantity of transformations to be done.
12914                 theName Object name; when specified, this parameter is used
12915                         for result publication in the study. Otherwise, if automatic
12916                         publication is switched on, default value is used for result name.
12917
12918             Note:
12919                 Unique ID of sub-shape can be obtained, using method GetSubShapeID().
12920
12921             Returns:
12922                 New GEOM.GEOM_Object, containing the result shape.
12923             """
12924             # Example: see GEOM_Spanner.py
12925             DirFace1,DirFace2,NbTimes,Parameters = ParseParameters(DirFace1,DirFace2,NbTimes)
12926             anObj = self.BlocksOp.MakeMultiTransformation1D(Block, DirFace1, DirFace2, NbTimes)
12927             RaiseIfFailed("MakeMultiTransformation1D", self.BlocksOp)
12928             anObj.SetParameters(Parameters)
12929             self._autoPublish(anObj, theName, "transformed")
12930             return anObj
12931
12932         ## Multi-transformate block and glue the result.
12933         #  @param Block Hexahedral solid to be multi-transformed.
12934         #  @param DirFace1U,DirFace2U IDs of Direction faces for the first transformation.
12935         #  @param DirFace1V,DirFace2V IDs of Direction faces for the second transformation.
12936         #  @param NbTimesU,NbTimesV Quantity of transformations to be done.
12937         #  @param theName Object name; when specified, this parameter is used
12938         #         for result publication in the study. Otherwise, if automatic
12939         #         publication is switched on, default value is used for result name.
12940         #
12941         #  @return New GEOM.GEOM_Object, containing the result shape.
12942         #
12943         #  @ref tui_multi_transformation "Example"
12944         @ManageTransactions("BlocksOp")
12945         def MakeMultiTransformation2D(self, Block, DirFace1U, DirFace2U, NbTimesU,
12946                                       DirFace1V, DirFace2V, NbTimesV, theName=None):
12947             """
12948             Multi-transformate block and glue the result.
12949
12950             Parameters:
12951                 Block Hexahedral solid to be multi-transformed.
12952                 DirFace1U,DirFace2U IDs of Direction faces for the first transformation.
12953                 DirFace1V,DirFace2V IDs of Direction faces for the second transformation.
12954                 NbTimesU,NbTimesV Quantity of transformations to be done.
12955                 theName Object name; when specified, this parameter is used
12956                         for result publication in the study. Otherwise, if automatic
12957                         publication is switched on, default value is used for result name.
12958
12959             Returns:
12960                 New GEOM.GEOM_Object, containing the result shape.
12961             """
12962             # Example: see GEOM_Spanner.py
12963             DirFace1U,DirFace2U,NbTimesU,DirFace1V,DirFace2V,NbTimesV,Parameters = ParseParameters(
12964               DirFace1U,DirFace2U,NbTimesU,DirFace1V,DirFace2V,NbTimesV)
12965             anObj = self.BlocksOp.MakeMultiTransformation2D(Block, DirFace1U, DirFace2U, NbTimesU,
12966                                                             DirFace1V, DirFace2V, NbTimesV)
12967             RaiseIfFailed("MakeMultiTransformation2D", self.BlocksOp)
12968             anObj.SetParameters(Parameters)
12969             self._autoPublish(anObj, theName, "transformed")
12970             return anObj
12971
12972         ## Build all possible propagation groups.
12973         #  Propagation group is a set of all edges, opposite to one (main)
12974         #  edge of this group directly or through other opposite edges.
12975         #  Notion of Opposite Edge make sense only on quadrangle face.
12976         #  @param theShape Shape to build propagation groups on.
12977         #  @param 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         #  @return List of GEOM.GEOM_Object, each of them is a propagation group.
12982         #
12983         #  @ref swig_Propagate "Example"
12984         @ManageTransactions("BlocksOp")
12985         def Propagate(self, theShape, theName=None):
12986             """
12987             Build all possible propagation groups.
12988             Propagation group is a set of all edges, opposite to one (main)
12989             edge of this group directly or through other opposite edges.
12990             Notion of Opposite Edge make sense only on quadrangle face.
12991
12992             Parameters:
12993                 theShape Shape to build propagation groups on.
12994                 theName Object name; when specified, this parameter is used
12995                         for result publication in the study. Otherwise, if automatic
12996                         publication is switched on, default value is used for result name.
12997
12998             Returns:
12999                 List of GEOM.GEOM_Object, each of them is a propagation group.
13000             """
13001             # Example: see GEOM_TestOthers.py
13002             listChains = self.BlocksOp.Propagate(theShape)
13003             RaiseIfFailed("Propagate", self.BlocksOp)
13004             self._autoPublish(listChains, theName, "propagate")
13005             return listChains
13006
13007         # end of l3_blocks_op
13008         ## @}
13009
13010         ## @addtogroup l3_groups
13011         ## @{
13012
13013         ## Creates a new group which will store sub-shapes of theMainShape
13014         #  @param theMainShape is a GEOM object on which the group is selected
13015         #  @param theShapeType defines a shape type of the group (see GEOM::shape_type)
13016         #  @param theName Object name; when specified, this parameter is used
13017         #         for result publication in the study. Otherwise, if automatic
13018         #         publication is switched on, default value is used for result name.
13019         #
13020         #  @return a newly created GEOM group (GEOM.GEOM_Object)
13021         #
13022         #  @ref tui_working_with_groups_page "Example 1"
13023         #  \n @ref swig_CreateGroup "Example 2"
13024         @ManageTransactions("GroupOp")
13025         def CreateGroup(self, theMainShape, theShapeType, theName=None):
13026             """
13027             Creates a new group which will store sub-shapes of theMainShape
13028
13029             Parameters:
13030                theMainShape is a GEOM object on which the group is selected
13031                theShapeType defines a shape type of the group:"COMPOUND", "COMPSOLID",
13032                             "SOLID", "SHELL", "FACE", "WIRE", "EDGE", "VERTEX", "SHAPE".
13033                 theName Object name; when specified, this parameter is used
13034                         for result publication in the study. Otherwise, if automatic
13035                         publication is switched on, default value is used for result name.
13036
13037             Returns:
13038                a newly created GEOM group
13039
13040             Example of usage:
13041                 group = geompy.CreateGroup(Box, geompy.ShapeType["FACE"])
13042
13043             """
13044             # Example: see GEOM_TestOthers.py
13045             anObj = self.GroupOp.CreateGroup(theMainShape, theShapeType)
13046             RaiseIfFailed("CreateGroup", self.GroupOp)
13047             self._autoPublish(anObj, theName, "group")
13048             return anObj
13049
13050         ## Adds a sub-object with ID theSubShapeId to the group
13051         #  @param theGroup is a GEOM group to which the new sub-shape is added
13052         #  @param theSubShapeID is a sub-shape ID in the main object.
13053         #  \note Use method GetSubShapeID() to get an unique ID of the sub-shape
13054         #
13055         #  @ref tui_working_with_groups_page "Example"
13056         @ManageTransactions("GroupOp")
13057         def AddObject(self,theGroup, theSubShapeID):
13058             """
13059             Adds a sub-object with ID theSubShapeId to the group
13060
13061             Parameters:
13062                 theGroup       is a GEOM group to which the new sub-shape is added
13063                 theSubShapeID  is a sub-shape ID in the main object.
13064
13065             Note:
13066                 Use method GetSubShapeID() to get an unique ID of the sub-shape
13067             """
13068             # Example: see GEOM_TestOthers.py
13069             self.GroupOp.AddObject(theGroup, theSubShapeID)
13070             if self.GroupOp.GetErrorCode() != "PAL_ELEMENT_ALREADY_PRESENT":
13071                 RaiseIfFailed("AddObject", self.GroupOp)
13072                 pass
13073             pass
13074
13075         ## Removes a sub-object with ID \a theSubShapeId from the group
13076         #  @param theGroup is a GEOM group from which the new sub-shape is removed
13077         #  @param theSubShapeID is a sub-shape ID in the main object.
13078         #  \note Use method GetSubShapeID() to get an unique ID of the sub-shape
13079         #
13080         #  @ref tui_working_with_groups_page "Example"
13081         @ManageTransactions("GroupOp")
13082         def RemoveObject(self,theGroup, theSubShapeID):
13083             """
13084             Removes a sub-object with ID theSubShapeId from the group
13085
13086             Parameters:
13087                 theGroup is a GEOM group from which the new sub-shape is removed
13088                 theSubShapeID is a sub-shape ID in the main object.
13089
13090             Note:
13091                 Use method GetSubShapeID() to get an unique ID of the sub-shape
13092             """
13093             # Example: see GEOM_TestOthers.py
13094             self.GroupOp.RemoveObject(theGroup, theSubShapeID)
13095             RaiseIfFailed("RemoveObject", self.GroupOp)
13096             pass
13097
13098         ## Adds to the group all the given shapes. No errors, if some shapes are already included.
13099         #  @param theGroup is a GEOM group to which the new sub-shapes are added.
13100         #  @param theSubShapes is a list of sub-shapes to be added.
13101         #
13102         #  @ref tui_working_with_groups_page "Example"
13103         @ManageTransactions("GroupOp")
13104         def UnionList (self,theGroup, theSubShapes):
13105             """
13106             Adds to the group all the given shapes. No errors, if some shapes are already included.
13107
13108             Parameters:
13109                 theGroup is a GEOM group to which the new sub-shapes are added.
13110                 theSubShapes is a list of sub-shapes to be added.
13111             """
13112             # Example: see GEOM_TestOthers.py
13113             self.GroupOp.UnionList(theGroup, theSubShapes)
13114             RaiseIfFailed("UnionList", self.GroupOp)
13115             pass
13116
13117         ## Adds to the group all the given shapes. No errors, if some shapes are already included.
13118         #  @param theGroup is a GEOM group to which the new sub-shapes are added.
13119         #  @param theSubShapes is a list of indices of sub-shapes to be added.
13120         #
13121         #  @ref swig_UnionIDs "Example"
13122         @ManageTransactions("GroupOp")
13123         def UnionIDs(self,theGroup, theSubShapes):
13124             """
13125             Adds to the group all the given shapes. No errors, if some shapes are already included.
13126
13127             Parameters:
13128                 theGroup is a GEOM group to which the new sub-shapes are added.
13129                 theSubShapes is a list of indices of sub-shapes to be added.
13130             """
13131             # Example: see GEOM_TestOthers.py
13132             self.GroupOp.UnionIDs(theGroup, theSubShapes)
13133             RaiseIfFailed("UnionIDs", self.GroupOp)
13134             pass
13135
13136         ## Removes from the group all the given shapes. No errors, if some shapes are not included.
13137         #  @param theGroup is a GEOM group from which the sub-shapes are removed.
13138         #  @param theSubShapes is a list of sub-shapes to be removed.
13139         #
13140         #  @ref tui_working_with_groups_page "Example"
13141         @ManageTransactions("GroupOp")
13142         def DifferenceList (self,theGroup, theSubShapes):
13143             """
13144             Removes from the group all the given shapes. No errors, if some shapes are not included.
13145
13146             Parameters:
13147                 theGroup is a GEOM group from which the sub-shapes are removed.
13148                 theSubShapes is a list of sub-shapes to be removed.
13149             """
13150             # Example: see GEOM_TestOthers.py
13151             self.GroupOp.DifferenceList(theGroup, theSubShapes)
13152             RaiseIfFailed("DifferenceList", self.GroupOp)
13153             pass
13154
13155         ## Removes from the group all the given shapes. No errors, if some shapes are not included.
13156         #  @param theGroup is a GEOM group from which the sub-shapes are removed.
13157         #  @param theSubShapes is a list of indices of sub-shapes to be removed.
13158         #
13159         #  @ref swig_DifferenceIDs "Example"
13160         @ManageTransactions("GroupOp")
13161         def DifferenceIDs(self,theGroup, theSubShapes):
13162             """
13163             Removes from the group all the given shapes. No errors, if some shapes are not included.
13164
13165             Parameters:
13166                 theGroup is a GEOM group from which the sub-shapes are removed.
13167                 theSubShapes is a list of indices of sub-shapes to be removed.
13168             """
13169             # Example: see GEOM_TestOthers.py
13170             self.GroupOp.DifferenceIDs(theGroup, theSubShapes)
13171             RaiseIfFailed("DifferenceIDs", self.GroupOp)
13172             pass
13173
13174         ## Union of two groups.
13175         #  New group is created. It will contain all entities
13176         #  which are present in groups theGroup1 and theGroup2.
13177         #  @param theGroup1, theGroup2 are the initial GEOM groups
13178         #                              to create the united group from.
13179         #  @param theName Object name; when specified, this parameter is used
13180         #         for result publication in the study. Otherwise, if automatic
13181         #         publication is switched on, default value is used for result name.
13182         #
13183         #  @return a newly created GEOM group.
13184         #
13185         #  @ref tui_union_groups_anchor "Example"
13186         @ManageTransactions("GroupOp")
13187         def UnionGroups (self, theGroup1, theGroup2, theName=None):
13188             """
13189             Union of two groups.
13190             New group is created. It will contain all entities
13191             which are present in groups theGroup1 and theGroup2.
13192
13193             Parameters:
13194                 theGroup1, theGroup2 are the initial GEOM groups
13195                                      to create the united group from.
13196                 theName Object name; when specified, this parameter is used
13197                         for result publication in the study. Otherwise, if automatic
13198                         publication is switched on, default value is used for result name.
13199
13200             Returns:
13201                 a newly created GEOM group.
13202             """
13203             # Example: see GEOM_TestOthers.py
13204             aGroup = self.GroupOp.UnionGroups(theGroup1, theGroup2)
13205             RaiseIfFailed("UnionGroups", self.GroupOp)
13206             self._autoPublish(aGroup, theName, "group")
13207             return aGroup
13208
13209         ## Intersection of two groups.
13210         #  New group is created. It will contain only those entities
13211         #  which are present in both groups theGroup1 and theGroup2.
13212         #  @param theGroup1, theGroup2 are the initial GEOM groups to get common part of.
13213         #  @param theName Object name; when specified, this parameter is used
13214         #         for result publication in the study. Otherwise, if automatic
13215         #         publication is switched on, default value is used for result name.
13216         #
13217         #  @return a newly created GEOM group.
13218         #
13219         #  @ref tui_intersect_groups_anchor "Example"
13220         @ManageTransactions("GroupOp")
13221         def IntersectGroups (self, theGroup1, theGroup2, theName=None):
13222             """
13223             Intersection of two groups.
13224             New group is created. It will contain only those entities
13225             which are present in both groups theGroup1 and theGroup2.
13226
13227             Parameters:
13228                 theGroup1, theGroup2 are the initial GEOM groups to get common part of.
13229                 theName Object name; when specified, this parameter is used
13230                         for result publication in the study. Otherwise, if automatic
13231                         publication is switched on, default value is used for result name.
13232
13233             Returns:
13234                 a newly created GEOM group.
13235             """
13236             # Example: see GEOM_TestOthers.py
13237             aGroup = self.GroupOp.IntersectGroups(theGroup1, theGroup2)
13238             RaiseIfFailed("IntersectGroups", self.GroupOp)
13239             self._autoPublish(aGroup, theName, "group")
13240             return aGroup
13241
13242         ## Cut of two groups.
13243         #  New group is created. It will contain entities which are
13244         #  present in group theGroup1 but are not present in group theGroup2.
13245         #  @param theGroup1 is a GEOM group to include elements of.
13246         #  @param theGroup2 is a GEOM group to exclude elements of.
13247         #  @param theName Object name; when specified, this parameter is used
13248         #         for result publication in the study. Otherwise, if automatic
13249         #         publication is switched on, default value is used for result name.
13250         #
13251         #  @return a newly created GEOM group.
13252         #
13253         #  @ref tui_cut_groups_anchor "Example"
13254         @ManageTransactions("GroupOp")
13255         def CutGroups (self, theGroup1, theGroup2, theName=None):
13256             """
13257             Cut of two groups.
13258             New group is created. It will contain entities which are
13259             present in group theGroup1 but are not present in group theGroup2.
13260
13261             Parameters:
13262                 theGroup1 is a GEOM group to include elements of.
13263                 theGroup2 is a GEOM group to exclude elements of.
13264                 theName Object name; when specified, this parameter is used
13265                         for result publication in the study. Otherwise, if automatic
13266                         publication is switched on, default value is used for result name.
13267
13268             Returns:
13269                 a newly created GEOM group.
13270             """
13271             # Example: see GEOM_TestOthers.py
13272             aGroup = self.GroupOp.CutGroups(theGroup1, theGroup2)
13273             RaiseIfFailed("CutGroups", self.GroupOp)
13274             self._autoPublish(aGroup, theName, "group")
13275             return aGroup
13276
13277         ## Union of list of groups.
13278         #  New group is created. It will contain all entities that are
13279         #  present in groups listed in theGList.
13280         #  @param theGList is a list of GEOM groups to create the united group from.
13281         #  @param theName Object name; when specified, this parameter is used
13282         #         for result publication in the study. Otherwise, if automatic
13283         #         publication is switched on, default value is used for result name.
13284         #
13285         #  @return a newly created GEOM group.
13286         #
13287         #  @ref tui_union_groups_anchor "Example"
13288         @ManageTransactions("GroupOp")
13289         def UnionListOfGroups (self, theGList, theName=None):
13290             """
13291             Union of list of groups.
13292             New group is created. It will contain all entities that are
13293             present in groups listed in theGList.
13294
13295             Parameters:
13296                 theGList is a list of GEOM groups to create the united group from.
13297                 theName Object name; when specified, this parameter is used
13298                         for result publication in the study. Otherwise, if automatic
13299                         publication is switched on, default value is used for result name.
13300
13301             Returns:
13302                 a newly created GEOM group.
13303             """
13304             # Example: see GEOM_TestOthers.py
13305             aGroup = self.GroupOp.UnionListOfGroups(theGList)
13306             RaiseIfFailed("UnionListOfGroups", self.GroupOp)
13307             self._autoPublish(aGroup, theName, "group")
13308             return aGroup
13309
13310         ## Cut of lists of groups.
13311         #  New group is created. It will contain only entities
13312         #  which are present in groups listed in theGList.
13313         #  @param theGList is a list of GEOM groups to include elements of.
13314         #  @param theName Object name; when specified, this parameter is used
13315         #         for result publication in the study. Otherwise, if automatic
13316         #         publication is switched on, default value is used for result name.
13317         #
13318         #  @return a newly created GEOM group.
13319         #
13320         #  @ref tui_intersect_groups_anchor "Example"
13321         @ManageTransactions("GroupOp")
13322         def IntersectListOfGroups (self, theGList, theName=None):
13323             """
13324             Cut of lists of groups.
13325             New group is created. It will contain only entities
13326             which are present in groups listed in theGList.
13327
13328             Parameters:
13329                 theGList is a list of GEOM groups to include elements of.
13330                 theName Object name; when specified, this parameter is used
13331                         for result publication in the study. Otherwise, if automatic
13332                         publication is switched on, default value is used for result name.
13333
13334             Returns:
13335                 a newly created GEOM group.
13336             """
13337             # Example: see GEOM_TestOthers.py
13338             aGroup = self.GroupOp.IntersectListOfGroups(theGList)
13339             RaiseIfFailed("IntersectListOfGroups", self.GroupOp)
13340             self._autoPublish(aGroup, theName, "group")
13341             return aGroup
13342
13343         ## Cut of lists of groups.
13344         #  New group is created. It will contain only entities
13345         #  which are present in groups listed in theGList1 but
13346         #  are not present in groups from theGList2.
13347         #  @param theGList1 is a list of GEOM groups to include elements of.
13348         #  @param theGList2 is a list of GEOM groups to exclude elements of.
13349         #  @param theName Object name; when specified, this parameter is used
13350         #         for result publication in the study. Otherwise, if automatic
13351         #         publication is switched on, default value is used for result name.
13352         #
13353         #  @return a newly created GEOM group.
13354         #
13355         #  @ref tui_cut_groups_anchor "Example"
13356         @ManageTransactions("GroupOp")
13357         def CutListOfGroups (self, theGList1, theGList2, theName=None):
13358             """
13359             Cut of lists of groups.
13360             New group is created. It will contain only entities
13361             which are present in groups listed in theGList1 but
13362             are not present in groups from theGList2.
13363
13364             Parameters:
13365                 theGList1 is a list of GEOM groups to include elements of.
13366                 theGList2 is a list of GEOM groups to exclude elements of.
13367                 theName Object name; when specified, this parameter is used
13368                         for result publication in the study. Otherwise, if automatic
13369                         publication is switched on, default value is used for result name.
13370
13371             Returns:
13372                 a newly created GEOM group.
13373             """
13374             # Example: see GEOM_TestOthers.py
13375             aGroup = self.GroupOp.CutListOfGroups(theGList1, theGList2)
13376             RaiseIfFailed("CutListOfGroups", self.GroupOp)
13377             self._autoPublish(aGroup, theName, "group")
13378             return aGroup
13379
13380         ## Returns a list of sub-objects ID stored in the group
13381         #  @param theGroup is a GEOM group for which a list of IDs is requested
13382         #
13383         #  @ref swig_GetObjectIDs "Example"
13384         @ManageTransactions("GroupOp")
13385         def GetObjectIDs(self,theGroup):
13386             """
13387             Returns a list of sub-objects ID stored in the group
13388
13389             Parameters:
13390                 theGroup is a GEOM group for which a list of IDs is requested
13391             """
13392             # Example: see GEOM_TestOthers.py
13393             ListIDs = self.GroupOp.GetObjects(theGroup)
13394             RaiseIfFailed("GetObjects", self.GroupOp)
13395             return ListIDs
13396
13397         ## Returns a type of sub-objects stored in the group
13398         #  @param theGroup is a GEOM group which type is returned.
13399         #
13400         #  @ref swig_GetType "Example"
13401         @ManageTransactions("GroupOp")
13402         def GetType(self,theGroup):
13403             """
13404             Returns a type of sub-objects stored in the group
13405
13406             Parameters:
13407                 theGroup is a GEOM group which type is returned.
13408             """
13409             # Example: see GEOM_TestOthers.py
13410             aType = self.GroupOp.GetType(theGroup)
13411             RaiseIfFailed("GetType", self.GroupOp)
13412             return aType
13413
13414         ## Convert a type of geom object from id to string value
13415         #  @param theId is a GEOM object type id.
13416         #  @return type of geom object (POINT, VECTOR, PLANE, LINE, TORUS, ... )
13417         #  @ref swig_GetType "Example"
13418         def ShapeIdToType(self, theId):
13419             """
13420             Convert a type of geom object from id to string value
13421
13422             Parameters:
13423                 theId is a GEOM object type id.
13424
13425             Returns:
13426                 type of geom object (POINT, VECTOR, PLANE, LINE, TORUS, ... )
13427             """
13428             if theId == 0:
13429                 return "COPY"
13430             if theId == 1:
13431                 return "IMPORT"
13432             if theId == 2:
13433                 return "POINT"
13434             if theId == 3:
13435                 return "VECTOR"
13436             if theId == 4:
13437                 return "PLANE"
13438             if theId == 5:
13439                 return "LINE"
13440             if theId == 6:
13441                 return "TORUS"
13442             if theId == 7:
13443                 return "BOX"
13444             if theId == 8:
13445                 return "CYLINDER"
13446             if theId == 9:
13447                 return "CONE"
13448             if theId == 10:
13449                 return "SPHERE"
13450             if theId == 11:
13451                 return "PRISM"
13452             if theId == 12:
13453                 return "REVOLUTION"
13454             if theId == 13:
13455                 return "BOOLEAN"
13456             if theId == 14:
13457                 return "PARTITION"
13458             if theId == 15:
13459                 return "POLYLINE"
13460             if theId == 16:
13461                 return "CIRCLE"
13462             if theId == 17:
13463                 return "SPLINE"
13464             if theId == 18:
13465                 return "ELLIPSE"
13466             if theId == 19:
13467                 return "CIRC_ARC"
13468             if theId == 20:
13469                 return "FILLET"
13470             if theId == 21:
13471                 return "CHAMFER"
13472             if theId == 22:
13473                 return "EDGE"
13474             if theId == 23:
13475                 return "WIRE"
13476             if theId == 24:
13477                 return "FACE"
13478             if theId == 25:
13479                 return "SHELL"
13480             if theId == 26:
13481                 return "SOLID"
13482             if theId == 27:
13483                 return "COMPOUND"
13484             if theId == 28:
13485                 return "SUBSHAPE"
13486             if theId == 29:
13487                 return "PIPE"
13488             if theId == 30:
13489                 return "ARCHIMEDE"
13490             if theId == 31:
13491                 return "FILLING"
13492             if theId == 32:
13493                 return "EXPLODE"
13494             if theId == 33:
13495                 return "GLUED"
13496             if theId == 34:
13497                 return "SKETCHER"
13498             if theId == 35:
13499                 return "CDG"
13500             if theId == 36:
13501                 return "FREE_BOUNDS"
13502             if theId == 37:
13503                 return "GROUP"
13504             if theId == 38:
13505                 return "BLOCK"
13506             if theId == 39:
13507                 return "MARKER"
13508             if theId == 40:
13509                 return "THRUSECTIONS"
13510             if theId == 41:
13511                 return "COMPOUNDFILTER"
13512             if theId == 42:
13513                 return "SHAPES_ON_SHAPE"
13514             if theId == 43:
13515                 return "ELLIPSE_ARC"
13516             if theId == 44:
13517                 return "3DSKETCHER"
13518             if theId == 45:
13519                 return "FILLET_2D"
13520             if theId == 46:
13521                 return "FILLET_1D"
13522             if theId == 201:
13523                 return "PIPETSHAPE"
13524             return "Shape Id not exist."
13525
13526         ## Returns a main shape associated with the group
13527         #  @param theGroup is a GEOM group for which a main shape object is requested
13528         #  @return a GEOM object which is a main shape for theGroup
13529         #
13530         #  @ref swig_GetMainShape "Example"
13531         @ManageTransactions("GroupOp")
13532         def GetMainShape(self,theGroup):
13533             """
13534             Returns a main shape associated with the group
13535
13536             Parameters:
13537                 theGroup is a GEOM group for which a main shape object is requested
13538
13539             Returns:
13540                 a GEOM object which is a main shape for theGroup
13541
13542             Example of usage: BoxCopy = geompy.GetMainShape(CreateGroup)
13543             """
13544             # Example: see GEOM_TestOthers.py
13545             anObj = self.GroupOp.GetMainShape(theGroup)
13546             RaiseIfFailed("GetMainShape", self.GroupOp)
13547             return anObj
13548
13549         ## Create group of edges of theShape, whose length is in range [min_length, max_length].
13550         #  If include_min/max == 0, edges with length == min/max_length will not be included in result.
13551         #  @param theShape given shape (see GEOM.GEOM_Object)
13552         #  @param min_length minimum length of edges of theShape
13553         #  @param max_length maximum length of edges of theShape
13554         #  @param include_max indicating if edges with length == max_length should be included in result, 1-yes, 0-no (default=1)
13555         #  @param include_min indicating if edges with length == min_length should be included in result, 1-yes, 0-no (default=1)
13556         #  @param theName Object name; when specified, this parameter is used
13557         #         for result publication in the study. Otherwise, if automatic
13558         #         publication is switched on, default value is used for result name.
13559         #
13560         #  @return a newly created GEOM group of edges
13561         #
13562         #  @@ref swig_todo "Example"
13563         def GetEdgesByLength (self, theShape, min_length, max_length, include_min = 1, include_max = 1, theName=None):
13564             """
13565             Create group of edges of theShape, whose length is in range [min_length, max_length].
13566             If include_min/max == 0, edges with length == min/max_length will not be included in result.
13567
13568             Parameters:
13569                 theShape given shape
13570                 min_length minimum length of edges of theShape
13571                 max_length maximum length of edges of theShape
13572                 include_max indicating if edges with length == max_length should be included in result, 1-yes, 0-no (default=1)
13573                 include_min indicating if edges with length == min_length should be included in result, 1-yes, 0-no (default=1)
13574                 theName Object name; when specified, this parameter is used
13575                         for result publication in the study. Otherwise, if automatic
13576                         publication is switched on, default value is used for result name.
13577
13578              Returns:
13579                 a newly created GEOM group of edges.
13580             """
13581             edges = self.SubShapeAll(theShape, self.ShapeType["EDGE"])
13582             edges_in_range = []
13583             for edge in edges:
13584                 Props = self.BasicProperties(edge)
13585                 if min_length <= Props[0] and Props[0] <= max_length:
13586                     if (not include_min) and (min_length == Props[0]):
13587                         skip = 1
13588                     else:
13589                         if (not include_max) and (Props[0] == max_length):
13590                             skip = 1
13591                         else:
13592                             edges_in_range.append(edge)
13593
13594             if len(edges_in_range) <= 0:
13595                 print("No edges found by given criteria")
13596                 return None
13597
13598             # note: auto-publishing is done in self.CreateGroup()
13599             group_edges = self.CreateGroup(theShape, self.ShapeType["EDGE"], theName)
13600             self.UnionList(group_edges, edges_in_range)
13601
13602             return group_edges
13603
13604         ## Create group of edges of selected shape, whose length is in range [min_length, max_length].
13605         #  If include_min/max == 0, edges with length == min/max_length will not be included in result.
13606         #  @param min_length minimum length of edges of selected shape
13607         #  @param max_length maximum length of edges of selected shape
13608         #  @param include_max indicating if edges with length == max_length should be included in result, 1-yes, 0-no (default=1)
13609         #  @param include_min indicating if edges with length == min_length should be included in result, 1-yes, 0-no (default=1)
13610         #  @return a newly created GEOM group of edges
13611         #  @ref swig_todo "Example"
13612         def SelectEdges (self, min_length, max_length, include_min = 1, include_max = 1):
13613             """
13614             Create group of edges of selected shape, whose length is in range [min_length, max_length].
13615             If include_min/max == 0, edges with length == min/max_length will not be included in result.
13616
13617             Parameters:
13618                 min_length minimum length of edges of selected shape
13619                 max_length maximum length of edges of selected shape
13620                 include_max indicating if edges with length == max_length should be included in result, 1-yes, 0-no (default=1)
13621                 include_min indicating if edges with length == min_length should be included in result, 1-yes, 0-no (default=1)
13622
13623              Returns:
13624                 a newly created GEOM group of edges.
13625             """
13626             nb_selected = sg.SelectedCount()
13627             if nb_selected < 1:
13628                 print("Select a shape before calling this function, please.")
13629                 return 0
13630             if nb_selected > 1:
13631                 print("Only one shape must be selected")
13632                 return 0
13633
13634             id_shape = sg.getSelected(0)
13635             shape = IDToObject( id_shape )
13636
13637             group_edges = self.GetEdgesByLength(shape, min_length, max_length, include_min, include_max)
13638
13639             left_str  = " < "
13640             right_str = " < "
13641             if include_min: left_str  = " <= "
13642             if include_max: right_str  = " <= "
13643
13644             self.addToStudyInFather(shape, group_edges, "Group of edges with " + repr(min_length)
13645                                     + left_str + "length" + right_str + repr(max_length))
13646
13647             sg.updateObjBrowser()
13648
13649             return group_edges
13650
13651         # end of l3_groups
13652         ## @}
13653
13654         #@@ insert new functions before this line @@ do not remove this line @@#
13655
13656         ## Create a copy of the given object
13657         #
13658         #  @param theOriginal geometry object for copy
13659         #  @param theName Object name; when specified, this parameter is used
13660         #         for result publication in the study. Otherwise, if automatic
13661         #         publication is switched on, default value is used for result name.
13662         #
13663         #  @return New GEOM_Object, containing the copied shape.
13664         #
13665         #  @ingroup l1_geomBuilder_auxiliary
13666         #  @ref swig_MakeCopy "Example"
13667         @ManageTransactions("InsertOp")
13668         def MakeCopy(self, theOriginal, theName=None):
13669             """
13670             Create a copy of the given object
13671
13672             Parameters:
13673                 theOriginal geometry object for copy
13674                 theName Object name; when specified, this parameter is used
13675                         for result publication in the study. Otherwise, if automatic
13676                         publication is switched on, default value is used for result name.
13677
13678             Returns:
13679                 New GEOM_Object, containing the copied shape.
13680
13681             Example of usage: Copy = geompy.MakeCopy(Box)
13682             """
13683             # Example: see GEOM_TestAll.py
13684             anObj = self.InsertOp.MakeCopy(theOriginal)
13685             RaiseIfFailed("MakeCopy", self.InsertOp)
13686             self._autoPublish(anObj, theName, "copy")
13687             return anObj
13688
13689         ## Add Path to load python scripts from
13690         #  @param Path a path to load python scripts from
13691         #  @ingroup l1_geomBuilder_auxiliary
13692         def addPath(self,Path):
13693             """
13694             Add Path to load python scripts from
13695
13696             Parameters:
13697                 Path a path to load python scripts from
13698             """
13699             if (sys.path.count(Path) < 1):
13700                 sys.path.append(Path)
13701                 pass
13702             pass
13703
13704         ## Load marker texture from the file
13705         #  @param Path a path to the texture file
13706         #  @return unique texture identifier
13707         #  @ingroup l1_geomBuilder_auxiliary
13708         @ManageTransactions("InsertOp")
13709         def LoadTexture(self, Path):
13710             """
13711             Load marker texture from the file
13712
13713             Parameters:
13714                 Path a path to the texture file
13715
13716             Returns:
13717                 unique texture identifier
13718             """
13719             # Example: see GEOM_TestAll.py
13720             ID = self.InsertOp.LoadTexture(Path)
13721             RaiseIfFailed("LoadTexture", self.InsertOp)
13722             return ID
13723
13724         ## Get internal name of the object based on its study entry
13725         #  @note This method does not provide an unique identifier of the geometry object.
13726         #  @note This is internal function of GEOM component, though it can be used outside it for
13727         #  appropriate reason (e.g. for identification of geometry object).
13728         #  @param obj geometry object
13729         #  @return unique object identifier
13730         #  @ingroup l1_geomBuilder_auxiliary
13731         def getObjectID(self, obj):
13732             """
13733             Get internal name of the object based on its study entry.
13734             Note: this method does not provide an unique identifier of the geometry object.
13735             It is an internal function of GEOM component, though it can be used outside GEOM for
13736             appropriate reason (e.g. for identification of geometry object).
13737
13738             Parameters:
13739                 obj geometry object
13740
13741             Returns:
13742                 unique object identifier
13743             """
13744             ID = ""
13745             entry = salome.ObjectToID(obj)
13746             if entry is not None:
13747                 lst = entry.split(":")
13748                 if len(lst) > 0:
13749                     ID = lst[-1] # -1 means last item in the list
13750                     return "GEOM_" + ID
13751             return ID
13752
13753
13754
13755         ## Add marker texture. @a Width and @a Height parameters
13756         #  specify width and height of the texture in pixels.
13757         #  If @a RowData is @c True, @a Texture parameter should represent texture data
13758         #  packed into the byte array. If @a RowData is @c False (default), @a Texture
13759         #  parameter should be unpacked string, in which '1' symbols represent opaque
13760         #  pixels and '0' represent transparent pixels of the texture bitmap.
13761         #
13762         #  @param Width texture width in pixels
13763         #  @param Height texture height in pixels
13764         #  @param Texture texture data
13765         #  @param RowData if @c True, @a Texture data are packed in the byte stream
13766         #  @return unique texture identifier
13767         #  @ingroup l1_geomBuilder_auxiliary
13768         @ManageTransactions("InsertOp")
13769         def AddTexture(self, Width, Height, Texture, RowData=False):
13770             """
13771             Add marker texture. Width and Height parameters
13772             specify width and height of the texture in pixels.
13773             If RowData is True, Texture parameter should represent texture data
13774             packed into the byte array. If RowData is False (default), Texture
13775             parameter should be unpacked string, in which '1' symbols represent opaque
13776             pixels and '0' represent transparent pixels of the texture bitmap.
13777
13778             Parameters:
13779                 Width texture width in pixels
13780                 Height texture height in pixels
13781                 Texture texture data
13782                 RowData if True, Texture data are packed in the byte stream
13783
13784             Returns:
13785                 return unique texture identifier
13786             """
13787             if not RowData: Texture = PackData(Texture)
13788             ID = self.InsertOp.AddTexture(Width, Height, Texture)
13789             RaiseIfFailed("AddTexture", self.InsertOp)
13790             return ID
13791
13792         ## Transfer not topological data from one GEOM object to another.
13793         #
13794         #  @param theObjectFrom the source object of non-topological data
13795         #  @param theObjectTo the destination object of non-topological data
13796         #  @param theFindMethod method to search sub-shapes of theObjectFrom
13797         #         in shape theObjectTo. Possible values are: GEOM.FSM_GetInPlace,
13798         #         GEOM.FSM_GetInPlaceByHistory and GEOM.FSM_GetInPlace_Old.
13799         #         Other values of GEOM.find_shape_method are not supported.
13800         #
13801         #  @return True in case of success; False otherwise.
13802         #
13803         #  @ingroup l1_geomBuilder_auxiliary
13804         #
13805         #  @ref swig_TransferData "Example"
13806         @ManageTransactions("InsertOp")
13807         def TransferData(self, theObjectFrom, theObjectTo,
13808                          theFindMethod=GEOM.FSM_GetInPlace):
13809             """
13810             Transfer not topological data from one GEOM object to another.
13811
13812             Parameters:
13813                 theObjectFrom the source object of non-topological data
13814                 theObjectTo the destination object of non-topological data
13815                 theFindMethod method to search sub-shapes of theObjectFrom
13816                               in shape theObjectTo. Possible values are:
13817                               GEOM.FSM_GetInPlace, GEOM.FSM_GetInPlaceByHistory
13818                               and GEOM.FSM_GetInPlace_Old. Other values of
13819                               GEOM.find_shape_method are not supported.
13820
13821             Returns:
13822                 True in case of success; False otherwise.
13823
13824             # Example: see GEOM_TestOthers.py
13825             """
13826             # Example: see GEOM_TestAll.py
13827             isOk = self.InsertOp.TransferData(theObjectFrom,
13828                                                theObjectTo, theFindMethod)
13829             RaiseIfFailed("TransferData", self.InsertOp)
13830             return isOk
13831
13832         ## Creates a new folder object. It is a container for any GEOM objects.
13833         #  @param Name name of the container
13834         #  @param Father parent object. If None,
13835         #         folder under 'Geometry' root object will be created.
13836         #  @return a new created folder
13837         #  @ingroup l1_publish_data
13838         def NewFolder(self, Name, Father=None):
13839             """
13840             Create a new folder object. It is an auxiliary container for any GEOM objects.
13841
13842             Parameters:
13843                 Name name of the container
13844                 Father parent object. If None,
13845                 folder under 'Geometry' root object will be created.
13846
13847             Returns:
13848                 a new created folder
13849             """
13850             return self.CreateFolder(Name, Father)
13851
13852         ## Move object to the specified folder
13853         #  @param Object object to move
13854         #  @param Folder target folder
13855         #  @ingroup l1_publish_data
13856         def PutToFolder(self, Object, Folder):
13857             """
13858             Move object to the specified folder
13859
13860             Parameters:
13861                 Object object to move
13862                 Folder target folder
13863             """
13864             self.MoveToFolder(Object, Folder)
13865             pass
13866
13867         ## Move list of objects to the specified folder
13868         #  @param ListOfSO list of objects to move
13869         #  @param Folder target folder
13870         #  @ingroup l1_publish_data
13871         def PutListToFolder(self, ListOfSO, Folder):
13872             """
13873             Move list of objects to the specified folder
13874
13875             Parameters:
13876                 ListOfSO list of objects to move
13877                 Folder target folder
13878             """
13879             self.MoveListToFolder(ListOfSO, Folder)
13880             pass
13881
13882         ## @addtogroup l2_field
13883         ## @{
13884
13885         ## Creates a field
13886         #  @param shape the shape the field lies on
13887         #  @param name the field name
13888         #  @param type type of field data: 0 - bool, 1 - int, 2 - double, 3 - string
13889         #  @param dimension dimension of the shape the field lies on
13890         #         0 - VERTEX, 1 - EDGE, 2 - FACE, 3 - SOLID, -1 - whole shape
13891         #  @param componentNames names of components
13892         #  @return a created field
13893         @ManageTransactions("FieldOp")
13894         def CreateField(self, shape, name, type, dimension, componentNames):
13895             """
13896             Creates a field
13897
13898             Parameters:
13899                 shape the shape the field lies on
13900                 name  the field name
13901                 type  type of field data
13902                 dimension dimension of the shape the field lies on
13903                           0 - VERTEX, 1 - EDGE, 2 - FACE, 3 - SOLID, -1 - whole shape
13904                 componentNames names of components
13905
13906             Returns:
13907                 a created field
13908             """
13909             if isinstance( type, int ):
13910                 if type < 0 or type > 3:
13911                     raise RuntimeError("CreateField : Error: data type must be within [0-3] range")
13912                 type = [GEOM.FDT_Bool,GEOM.FDT_Int,GEOM.FDT_Double,GEOM.FDT_String][type]
13913
13914             f = self.FieldOp.CreateField( shape, name, type, dimension, componentNames)
13915             RaiseIfFailed("CreateField", self.FieldOp)
13916             global geom
13917             geom._autoPublish( f, "", name)
13918             return f
13919
13920         ## Removes a field from the GEOM component
13921         #  @param field the field to remove
13922         def RemoveField(self, field):
13923             "Removes a field from the GEOM component"
13924             global geom
13925             if isinstance( field, GEOM._objref_GEOM_Field ):
13926                 geom.RemoveObject( field )
13927             elif isinstance( field, geomField ):
13928                 geom.RemoveObject( field.field )
13929             else:
13930                 raise RuntimeError("RemoveField() : the object is not a field")
13931             return
13932
13933         ## Returns number of fields on a shape
13934         @ManageTransactions("FieldOp")
13935         def CountFields(self, shape):
13936             "Returns number of fields on a shape"
13937             nb = self.FieldOp.CountFields( shape )
13938             RaiseIfFailed("CountFields", self.FieldOp)
13939             return nb
13940
13941         ## Returns all fields on a shape
13942         @ManageTransactions("FieldOp")
13943         def GetFields(self, shape):
13944             "Returns all fields on a shape"
13945             ff = self.FieldOp.GetFields( shape )
13946             RaiseIfFailed("GetFields", self.FieldOp)
13947             return ff
13948
13949         ## Returns a field on a shape by its name
13950         @ManageTransactions("FieldOp")
13951         def GetField(self, shape, name):
13952             "Returns a field on a shape by its name"
13953             f = self.FieldOp.GetField( shape, name )
13954             RaiseIfFailed("GetField", self.FieldOp)
13955             return f
13956
13957         # end of l2_field
13958         ## @}
13959
13960         ## @addtogroup l2_testing
13961         ## @{
13962
13963         ## Build a mesh on the given shape.
13964         # @param shape the source shape
13965         # @param linear_deflection linear deflection coefficient
13966         # @param is_relative says if given value of deflection is relative to shape's bounding box
13967         # @param angular_deflection angular deflection for edges in degrees
13968         # @return True in case of success; otherwise False.
13969         @ManageTransactions("TestOp")
13970         def Tesselate(self, shape, linear_deflection=0, is_relative=True, angular_deflection=0):
13971             """Build a mesh on the given shape.
13972
13973             Parameters:
13974                 shape the source shape
13975                 linear_deflection linear deflection coefficient
13976                 is_relative says if given value of deflection is relative to shape's bounding box
13977                 angular_deflection angular deflection for edges in degrees
13978
13979             Returns:
13980                 True in case of success; otherwise False.
13981             """
13982             if angular_deflection > 0:
13983                 angular_deflection = angular_deflection * math.pi / 180.
13984             r = self.TestOp.Tesselate(shape, linear_deflection, is_relative, angular_deflection)
13985             RaiseIfFailed("Tesselate", self.TestOp)
13986             return r
13987
13988         # end of l2_testing
13989         ## @}
13990
13991
13992 # Register the new proxy for GEOM_Gen
13993 omniORB.registerObjref(GEOM._objref_GEOM_Gen._NP_RepositoryId, geomBuilder)
13994
13995
13996 ## Field on Geometry
13997 #  @ingroup l2_field
13998 class geomField( GEOM._objref_GEOM_Field ):
13999
14000     def __init__(self, *args):
14001         GEOM._objref_GEOM_Field.__init__(self, *args)
14002         self.field = GEOM._objref_GEOM_Field
14003         return
14004
14005     ## Returns the shape the field lies on
14006     def getShape(self):
14007         "Returns the shape the field lies on"
14008         return self.field.GetShape(self)
14009
14010     ## Returns the field name
14011     def getName(self):
14012         "Returns the field name"
14013         return self.field.GetName(self)
14014
14015     ## Returns type of field data as integer [0-3]
14016     def getType(self):
14017         "Returns type of field data"
14018         return EnumToLong(self.field.GetDataType(self))
14019
14020     ## Returns type of field data:
14021     #  one of GEOM.FDT_Bool, GEOM.FDT_Int, GEOM.FDT_Double, GEOM.FDT_String
14022     def getTypeEnum(self):
14023         "Returns type of field data"
14024         return self.field.GetDataType(self)
14025
14026     ## Returns dimension of the shape the field lies on:
14027     #  0 - VERTEX, 1 - EDGE, 2 - FACE, 3 - SOLID, -1 - whole shape
14028     def getDimension(self):
14029         """Returns dimension of the shape the field lies on:
14030         0 - VERTEX, 1 - EDGE, 2 - FACE, 3 - SOLID, -1 - whole shape"""
14031         return self.field.GetDimension(self)
14032
14033     ## Returns names of components
14034     def getComponents(self):
14035         "Returns names of components"
14036         return self.field.GetComponents(self)
14037
14038     ## Adds a time step to the field
14039     #  @param step the time step number further used as the step identifier
14040     #  @param stamp the time step time
14041     #  @param values the values of the time step
14042     def addStep(self, step, stamp, values):
14043         "Adds a time step to the field"
14044         stp = self.field.AddStep( self, step, stamp )
14045         if not stp:
14046             raise RuntimeError("Field.addStep() : Error: step %s already exists in this field"%step)
14047         global geom
14048         geom._autoPublish( stp, "", "Step %s, %s"%(step,stamp))
14049         self.setValues( step, values )
14050         return stp
14051
14052     ## Remove a time step from the field
14053     def removeStep(self,step):
14054         "Remove a time step from the field"
14055         stepSO = None
14056         try:
14057             stepObj = self.field.GetStep( self, step )
14058             if stepObj:
14059                 stepSO = geom.myStudy.FindObjectID( stepObj.GetStudyEntry() )
14060         except:
14061             #import traceback
14062             #traceback.print_exc()
14063             pass
14064         self.field.RemoveStep( self, step )
14065         if stepSO:
14066             geom.myBuilder.RemoveObjectWithChildren( stepSO )
14067         return
14068
14069     ## Returns number of time steps in the field
14070     def countSteps(self):
14071         "Returns number of time steps in the field"
14072         return self.field.CountSteps(self)
14073
14074     ## Returns a list of time step IDs in the field
14075     def getSteps(self):
14076         "Returns a list of time step IDs in the field"
14077         return self.field.GetSteps(self)
14078
14079     ## Returns a time step by its ID
14080     def getStep(self,step):
14081         "Returns a time step by its ID"
14082         stp = self.field.GetStep(self, step)
14083         if not stp:
14084             raise RuntimeError("Step %s is missing from this field"%step)
14085         return stp
14086
14087     ## Returns the time of the field step
14088     def getStamp(self,step):
14089         "Returns the time of the field step"
14090         return self.getStep(step).GetStamp()
14091
14092     ## Changes the time of the field step
14093     def setStamp(self, step, stamp):
14094         "Changes the time of the field step"
14095         return self.getStep(step).SetStamp(stamp)
14096
14097     ## Returns values of the field step
14098     def getValues(self, step):
14099         "Returns values of the field step"
14100         return self.getStep(step).GetValues()
14101
14102     ## Changes values of the field step
14103     def setValues(self, step, values):
14104         "Changes values of the field step"
14105         stp = self.getStep(step)
14106         errBeg = "Field.setValues(values) : Error: "
14107         try:
14108             ok = stp.SetValues( values )
14109         except Exception as e:
14110             excStr = str(e)
14111             if excStr.find("WrongPythonType") > 0:
14112                 raise RuntimeError(errBeg +\
14113                       "wrong type of values, %s values are expected"%str(self.getTypeEnum())[4:])
14114             raise RuntimeError(errBeg + str(e))
14115         if not ok:
14116             nbOK = self.field.GetArraySize(self)
14117             nbKO = len(values)
14118             if nbOK != nbKO:
14119                 raise RuntimeError(errBeg + "len(values) must be %s but not %s"%(nbOK,nbKO))
14120             else:
14121                 raise RuntimeError(errBeg + "failed")
14122         return
14123
14124     pass # end of class geomField
14125
14126 # Register the new proxy for GEOM_Field
14127 omniORB.registerObjref(GEOM._objref_GEOM_Field._NP_RepositoryId, geomField)
14128
14129
14130 ## Create a new geomBuilder instance.The geomBuilder class provides the Python
14131 #  interface to GEOM operations.
14132 #
14133 #  Typical use is:
14134 #  \code
14135 #    import salome
14136 #    salome.salome_init()
14137 #    from salome.geom import geomBuilder
14138 #    geompy = geomBuilder.New()
14139 #  \endcode
14140 #  @param  instance  CORBA proxy of GEOM Engine. If None, the default Engine is used.
14141 #  @return geomBuilder instance
14142 def New( instance=None):
14143     """
14144     Create a new geomBuilder instance.The geomBuilder class provides the Python
14145     interface to GEOM operations.
14146
14147     Typical use is:
14148         import salome
14149         salome.salome_init()
14150         from salome.geom import geomBuilder
14151         geompy = geomBuilder.New()
14152
14153     Parameters:
14154         instance  CORBA proxy of GEOM Engine. If None, the default Engine is used.
14155     Returns:
14156         geomBuilder instance
14157     """
14158     #print "New geomBuilder ", study, instance
14159     global engine
14160     global geom
14161     global doLcc
14162     if instance and isinstance( instance, SALOMEDS._objref_Study ):
14163         import sys
14164         sys.stderr.write("Warning: 'study' argument is no more needed in geomBuilder.New(). Consider updating your script!!!\n\n")
14165         instance = None
14166     engine = instance
14167     if engine is None:
14168       doLcc = True
14169     geom = geomBuilder()
14170     assert isinstance(geom,geomBuilder), "Geom engine class is %s but should be geomBuilder.geomBuilder. Import geomBuilder before creating the instance."%geom.__class__
14171     geom.init_geom()
14172     return geom
14173
14174
14175 # Register methods from the plug-ins in the geomBuilder class 
14176 plugins_var = os.environ.get( "GEOM_PluginsList" )
14177
14178 plugins = None
14179 if plugins_var is not None:
14180     plugins = plugins_var.split( ":" )
14181     plugins=[x for x in plugins if len(x)>0]
14182 if plugins is not None:
14183     for pluginName in plugins:
14184         pluginBuilderName = pluginName + "Builder"
14185         try:
14186             exec( "from salome.%s.%s import *" % (pluginName, pluginBuilderName))
14187         except Exception as e:
14188             from salome_utils import verbose
14189             print("Exception while loading %s: %s" % ( pluginBuilderName, e ))
14190             continue
14191         exec( "from salome.%s import %s" % (pluginName, pluginBuilderName))
14192         plugin = eval( pluginBuilderName )
14193         
14194         # add methods from plugin module to the geomBuilder class
14195         for k in dir( plugin ):
14196             if k[0] == '_': continue
14197             method = getattr( plugin, k )
14198             if type( method ).__name__ == 'function':
14199                 if not hasattr( geomBuilder, k ):
14200                     setattr( geomBuilder, k, method )
14201                 pass
14202             pass
14203         del pluginName
14204         pass
14205     pass