]> SALOME platform Git repositories - modules/geom.git/blob - src/GEOM_SWIG/geomBuilder.py
Salome HOME
[GITHUB #1] updated TUI command doc for make sphere from point and radius
[modules/geom.git] / src / GEOM_SWIG / geomBuilder.py
1 #  -*- coding: iso-8859-1 -*-
2 # Copyright (C) 2007-2024  CEA, EDF, 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 from salome.geom.canonicalrecognition import CanonicalRecognition
264 from salome.geom.conformity import CheckConformity
265 from salome.geom.proximity import ShapeProximity
266
267 # In case the omniORBpy EnumItem class does not fully support Python 3
268 # (for instance in version 4.2.1-2), the comparison ordering methods must be
269 # defined
270 #
271 try:
272     GEOM.COMPOUND < GEOM.SOLID
273 except TypeError:
274     def enumitem_eq(self, other):
275         try:
276             if isinstance(other, omniORB.EnumItem):
277                 if other._parent_id == self._parent_id:
278                     return self._v == other._v
279                 else:
280                     return self._parent_id == other._parent_id
281             else:
282                 return id(self) == id(other)
283         except:
284             return id(self) == id(other)
285
286     def enumitem_lt(self, other):
287         try:
288             if isinstance(other, omniORB.EnumItem):
289                 if other._parent_id == self._parent_id:
290                     return self._v < other._v
291                 else:
292                     return self._parent_id < other._parent_id
293             else:
294                 return id(self) < id(other)
295         except:
296             return id(self) < id(other)
297
298     def enumitem_le(self, other):
299         try:
300             if isinstance(other, omniORB.EnumItem):
301                 if other._parent_id == self._parent_id:
302                     return self._v <= other._v
303                 else:
304                     return self._parent_id <= other._parent_id
305             else:
306                 return id(self) <= id(other)
307         except:
308             return id(self) <= id(other)
309
310     def enumitem_gt(self, other):
311         try:
312             if isinstance(other, omniORB.EnumItem):
313                 if other._parent_id == self._parent_id:
314                     return self._v > other._v
315                 else:
316                     return self._parent_id > other._parent_id
317             else:
318                 return id(self) > id(other)
319         except:
320             return id(self) > id(other)
321
322     def enumitem_ge(self, other):
323         try:
324             if isinstance(other, omniORB.EnumItem):
325                 if other._parent_id == self._parent_id:
326                     return self._v >= other._v
327                 else:
328                     return self._parent_id >= other._parent_id
329             else:
330                 return id(self) >= id(other)
331         except:
332             return id(self) >= id(other)
333
334     GEOM.omniORB.EnumItem.__eq__ = enumitem_eq
335     GEOM.omniORB.EnumItem.__lt__ = enumitem_lt
336     GEOM.omniORB.EnumItem.__le__ = enumitem_le
337     GEOM.omniORB.EnumItem.__gt__ = enumitem_gt
338     GEOM.omniORB.EnumItem.__ge__ = enumitem_ge
339     omniORB.EnumItem.__eq__ = enumitem_eq
340     omniORB.EnumItem.__lt__ = enumitem_lt
341     omniORB.EnumItem.__le__ = enumitem_le
342     omniORB.EnumItem.__gt__ = enumitem_gt
343     omniORB.EnumItem.__ge__ = enumitem_ge
344
345 # service function
346 def _toListOfNames(_names, _size=-1):
347     l = []
348     import types
349     if type(_names) in [list, tuple]:
350         for i in _names: l.append(i)
351     elif _names:
352         l.append(_names)
353     if l and len(l) < _size:
354         for i in range(len(l), _size): l.append("%s_%d"%(l[0],i))
355     return l
356
357 # Decorator function to manage transactions for all geometric operations.
358 def ManageTransactions(theOpeName):
359     def MTDecorator(theFunction):
360         # To keep the original function name an documentation.
361         @functools.wraps(theFunction)
362         def OpenCallClose(self, *args, **kwargs):
363             # Open transaction
364             anOperation = getattr(self, theOpeName)
365             anOperation.StartOperation()
366             try:
367                 # Call the function
368                 res = theFunction(self, *args, **kwargs)
369                 # Commit transaction
370                 anOperation.FinishOperation()
371                 return res
372             except:
373                 # Abort transaction
374                 anOperation.AbortOperation()
375                 raise
376         return OpenCallClose
377     return MTDecorator
378
379 ## Raise an Error, containing the Method_name, if Operation is Failed
380 ## @ingroup l1_geomBuilder_auxiliary
381 def RaiseIfFailed (Method_name, Operation):
382     if not Operation.IsDone() and Operation.GetErrorCode() != "NOT_FOUND_ANY":
383         raise RuntimeError(Method_name + " : " + Operation.GetErrorCode())
384
385 def PrintOrRaise(message, raiseException=False):
386     if raiseException:
387         raise RuntimeError(message)
388     else:
389         print(message)
390
391 ## Return list of variables value from salome notebook
392 ## @ingroup l1_geomBuilder_auxiliary
393 def ParseParameters(*parameters):
394     Result = []
395     StringResult = []
396     for parameter in parameters:
397         if isinstance(parameter, list):
398             lResults = ParseParameters(*parameter)
399             if len(lResults) > 0:
400                 Result.append(lResults[:-1])
401                 StringResult += lResults[-1].split(":")
402                 pass
403             pass
404         else:
405             if isinstance(parameter,str):
406                 if notebook.isVariable(parameter):
407                     Result.append(notebook.get(parameter))
408                 else:
409                     raise RuntimeError("Variable with name '" + parameter + "' doesn't exist!!!")
410                 pass
411             else:
412                 Result.append(parameter)
413                 pass
414             StringResult.append(str(parameter))
415             pass
416         pass
417     if Result:
418         Result.append(":".join(StringResult))
419     else:
420         Result = ":".join(StringResult)
421     return Result
422
423 ## Return list of variables value from salome notebook
424 ## @ingroup l1_geomBuilder_auxiliary
425 def ParseList(list):
426     Result = []
427     StringResult = ""
428     for parameter in list:
429         if isinstance(parameter,str) and notebook.isVariable(parameter):
430             Result.append(str(notebook.get(parameter)))
431             pass
432         else:
433             Result.append(str(parameter))
434             pass
435
436         StringResult = StringResult + str(parameter)
437         StringResult = StringResult + ":"
438         pass
439     StringResult = StringResult[:len(StringResult)-1]
440     return Result, StringResult
441
442 ## Return list of variables value from salome notebook
443 ## @ingroup l1_geomBuilder_auxiliary
444 def ParseSketcherCommand(command):
445     Result = ""
446     StringResult = ""
447     sections = command.split(":")
448     for section in sections:
449         parameters = section.split(" ")
450         paramIndex = 1
451         for parameter in parameters:
452             if paramIndex > 1 and parameter.find("'") != -1:
453                 parameter = parameter.replace("'","")
454                 if notebook.isVariable(parameter):
455                     Result = Result + str(notebook.get(parameter)) + " "
456                     pass
457                 else:
458                     raise RuntimeError("Variable with name '" + parameter + "' doesn't exist!!!")
459                     pass
460                 pass
461             else:
462                 Result = Result + str(parameter) + " "
463                 pass
464             if paramIndex > 1:
465                 StringResult = StringResult + parameter
466                 StringResult = StringResult + ":"
467                 pass
468             paramIndex = paramIndex + 1
469             pass
470         Result = Result[:len(Result)-1] + ":"
471         pass
472     Result = Result[:len(Result)-1]
473     return Result, StringResult
474
475 ## Helper function which can be used to pack the passed string to the byte data.
476 ## Only '1' an '0' symbols are valid for the string. The missing bits are replaced by zeroes.
477 ## If the string contains invalid symbol (neither '1' nor '0'), the function raises an exception.
478 ## For example,
479 ## \code
480 ## val = PackData("10001110") # val = 0xAE
481 ## val = PackData("1")        # val = 0x80
482 ## \endcode
483 ## @param data unpacked data - a string containing '1' and '0' symbols
484 ## @return data packed to the byte stream
485 ## @ingroup l1_geomBuilder_auxiliary
486 def PackData(data):
487     """
488     Helper function which can be used to pack the passed string to the byte data.
489     Only '1' an '0' symbols are valid for the string. The missing bits are replaced by zeroes.
490     If the string contains invalid symbol (neither '1' nor '0'), the function raises an exception.
491
492     Parameters:
493         data unpacked data - a string containing '1' and '0' symbols
494
495     Returns:
496         data packed to the byte stream
497
498     Example of usage:
499         val = PackData("10001110") # val = 0xAE
500         val = PackData("1")        # val = 0x80
501     """
502     bytes = len(data)/8
503     if len(data)%8: bytes += 1
504     res = ""
505     for b in range(bytes):
506         d = data[b*8:(b+1)*8]
507         val = 0
508         for i in range(8):
509             val *= 2
510             if i < len(d):
511                 if d[i] == "1": val += 1
512                 elif d[i] != "0":
513                     raise "Invalid symbol %s" % d[i]
514                 pass
515             pass
516         res += chr(val)
517         pass
518     return res
519
520 ## Read bitmap texture from the text file.
521 ## In that file, any non-zero symbol represents '1' opaque pixel of the bitmap.
522 ## A zero symbol ('0') represents transparent pixel of the texture bitmap.
523 ## The function returns width and height of the pixmap in pixels and byte stream representing
524 ## texture bitmap itself.
525 ##
526 ## This function can be used to read the texture to the byte stream in order to pass it to
527 ## the AddTexture() function of geomBuilder class.
528 ## For example,
529 ## \code
530 ## from salome.geom import geomBuilder
531 ## geompy = geomBuilder.New()
532 ## texture = geompy.readtexture('mytexture.dat')
533 ## texture = geompy.AddTexture(*texture)
534 ## obj.SetMarkerTexture(texture)
535 ## \endcode
536 ## @param fname texture file name
537 ## @return sequence of tree values: texture's width, height in pixels and its byte stream
538 ## @ingroup l1_geomBuilder_auxiliary
539 def ReadTexture(fname):
540     """
541     Read bitmap texture from the text file.
542     In that file, any non-zero symbol represents '1' opaque pixel of the bitmap.
543     A zero symbol ('0') represents transparent pixel of the texture bitmap.
544     The function returns width and height of the pixmap in pixels and byte stream representing
545     texture bitmap itself.
546     This function can be used to read the texture to the byte stream in order to pass it to
547     the AddTexture() function of geomBuilder class.
548
549     Parameters:
550         fname texture file name
551
552     Returns:
553         sequence of tree values: texture's width, height in pixels and its byte stream
554
555     Example of usage:
556         from salome.geom import geomBuilder
557         geompy = geomBuilder.New()
558         texture = geompy.readtexture('mytexture.dat')
559         texture = geompy.AddTexture(*texture)
560         obj.SetMarkerTexture(texture)
561     """
562     try:
563         f = open(fname)
564         lines = [ l.strip() for l in f.readlines()]
565         f.close()
566         maxlen = 0
567         if lines: maxlen = max([len(x) for x in lines])
568         lenbytes = maxlen/8
569         if maxlen%8: lenbytes += 1
570         bytedata=""
571         for line in lines:
572             if len(line)%8:
573                 lenline = (len(line)/8+1)*8
574                 pass
575             else:
576                 lenline = (len(line)/8)*8
577                 pass
578             for i in range(lenline/8):
579                 byte=""
580                 for j in range(8):
581                     if i*8+j < len(line) and line[i*8+j] != "0": byte += "1"
582                     else: byte += "0"
583                     pass
584                 bytedata += PackData(byte)
585                 pass
586             for i in range(lenline/8, lenbytes):
587                 bytedata += PackData("0")
588             pass
589         return lenbytes*8, len(lines), bytedata
590     except:
591         pass
592     return 0, 0, ""
593
594 ## Returns a long value from enumeration type
595 #  Can be used for CORBA enumerator types like GEOM.shape_type
596 #  @param theItem enumeration type
597 #  @ingroup l1_geomBuilder_auxiliary
598 def EnumToLong(theItem):
599     """
600     Returns a long value from enumeration type
601     Can be used for CORBA enumerator types like geomBuilder.ShapeType
602
603     Parameters:
604         theItem enumeration type
605     """
606     ret = theItem
607     if hasattr(theItem, "_v"): ret = theItem._v
608     return ret
609
610 ## Pack an argument into a list
611 def ToList( arg ):
612     if isinstance( arg, list ):
613         return arg
614     if hasattr( arg, "__getitem__" ):
615         return list( arg )
616     return [ arg ]
617
618 ## Information about closed/unclosed state of shell or wire
619 #  @ingroup l1_geomBuilder_auxiliary
620 class info:
621     """
622     Information about closed/unclosed state of shell or wire
623     """
624     UNKNOWN  = 0
625     CLOSED   = 1
626     UNCLOSED = 2
627
628 ## Private class used to bind calls of plugin operations to geomBuilder
629 class PluginOperation:
630   def __init__(self, operation, function):
631     self.operation = operation
632     self.function = function
633     pass
634
635   @ManageTransactions("operation")
636   def __call__(self, *args):
637     res = self.function(self.operation, *args)
638     RaiseIfFailed(self.function.__name__, self.operation)
639     return res
640
641 # Warning: geom is a singleton
642 geom = None
643 engine = None
644 doLcc = False
645 created = False
646
647 class geomBuilder(GEOM._objref_GEOM_Gen):
648
649         ## Enumeration ShapeType as a dictionary. \n
650         ## Topological types of shapes (like Open Cascade types). See GEOM::shape_type for details.
651         #  @ingroup l1_geomBuilder_auxiliary
652         ShapeType = {"AUTO":-1, "COMPOUND":0, "COMPSOLID":1, "SOLID":2, "SHELL":3, "FACE":4, "WIRE":5, "EDGE":6, "VERTEX":7, "SHAPE":8, "FLAT":9}
653
654         ## Kinds of shape in terms of <VAR>GEOM.GEOM_IKindOfShape.shape_kind</VAR> enumeration
655         #  and a list of parameters, describing the shape.
656         #  List of parameters, describing the shape:
657         #  - COMPOUND:            [nb_solids  nb_faces  nb_edges  nb_vertices]
658         #  - COMPSOLID:           [nb_solids  nb_faces  nb_edges  nb_vertices]
659         #
660         #  - SHELL:       [info.CLOSED / info.UNCLOSED  nb_faces  nb_edges  nb_vertices]
661         #
662         #  - WIRE:        [info.CLOSED / info.UNCLOSED nb_edges  nb_vertices]
663         #
664         #  - SPHERE:       [xc yc zc            R]
665         #  - CYLINDER:     [xb yb zb  dx dy dz  R         H]
666         #  - BOX:          [xc yc zc                      ax ay az]
667         #  - ROTATED_BOX:  [xc yc zc  zx zy zz  xx xy xz  ax ay az]
668         #  - TORUS:        [xc yc zc  dx dy dz  R_1  R_2]
669         #  - CONE:         [xb yb zb  dx dy dz  R_1  R_2  H]
670         #  - POLYHEDRON:                       [nb_faces  nb_edges  nb_vertices]
671         #  - SOLID:                            [nb_faces  nb_edges  nb_vertices]
672         #
673         #  - SPHERE2D:     [xc yc zc            R]
674         #  - CYLINDER2D:   [xb yb zb  dx dy dz  R         H]
675         #  - TORUS2D:      [xc yc zc  dx dy dz  R_1  R_2]
676         #  - CONE2D:       [xc yc zc  dx dy dz  R_1  R_2  H]
677         #  - DISK_CIRCLE:  [xc yc zc  dx dy dz  R]
678         #  - DISK_ELLIPSE: [xc yc zc  dx dy dz  R_1  R_2]
679         #  - POLYGON:      [xo yo zo  dx dy dz            nb_edges  nb_vertices]
680         #  - PLANE:        [xo yo zo  dx dy dz]
681         #  - PLANAR:       [xo yo zo  dx dy dz            nb_edges  nb_vertices]
682         #  - FACE:                                       [nb_edges  nb_vertices]
683         #
684         #  - CIRCLE:       [xc yc zc  dx dy dz  R]
685         #  - ARC_CIRCLE:   [xc yc zc  dx dy dz  R         x1 y1 z1  x2 y2 z2]
686         #  - ELLIPSE:      [xc yc zc  dx dy dz  R_1  R_2  v1x v1y v1z  v2x v2y v2z]
687         #  - ARC_ELLIPSE:  [xc yc zc  dx dy dz  R_1  R_2  x1 y1 z1  x2 y2 z2  v1x v1y v1z  v2x v2y v2z]
688         #  - LINE:         [xo yo zo  dx dy dz]
689         #  - SEGMENT:      [x1 y1 z1  x2 y2 z2]
690         #  - CRV_BSPLINE:  [periodicity degree nb_poles nb_knots nb_weights nb_multiplicities  xi yi zi  ki  wi  mi]
691         #  - CRV_BEZIER:   [nb_poles nb_weights  xi yi zi  wi]
692         #  - HYPERBOLA:    [xc yc zc  dx dy dz  R_1  R_2  v1x v1y v1z  v2x v2y v2z]
693         #  - PARABOLA:     [xc yc zc  dx dy dz  F  v1x v1y v1z  v2x v2y v2z]
694         #  - EDGE:                                                 [nb_vertices]
695         #
696         #  - VERTEX:       [x  y  z]
697         #
698         #  - LCS:          [x y z  xx xy xz  yx yy yz  zx zy zz]
699         #  @ingroup l1_geomBuilder_auxiliary
700         kind = GEOM.GEOM_IKindOfShape
701
702         def __new__(cls, *args):
703             global engine
704             global geom
705             global doLcc
706             global created
707             #print "==== __new__ ", engine, geom, doLcc, created
708             if geom is None:
709                 # geom engine is either retrieved from engine, or created
710                 geom = engine
711                 # Following test avoids a recursive loop
712                 if doLcc:
713                     if geom is not None:
714                         # geom engine not created: existing engine found
715                         doLcc = False
716                     if doLcc and not created:
717                         doLcc = False
718                         # FindOrLoadComponent called:
719                         # 1. CORBA resolution of server
720                         # 2. the __new__ method is called again
721                         #print "==== FindOrLoadComponent ", engine, geom, doLcc, created
722                         geom = lcc.FindOrLoadComponent( "FactoryServer", "GEOM" )
723                         #print "====1 ",geom
724                 else:
725                     # FindOrLoadComponent not called
726                     if geom is None:
727                         # geomBuilder instance is created from lcc.FindOrLoadComponent
728                         #print "==== super ", engine, geom, doLcc, created
729                         geom = super(geomBuilder,cls).__new__(cls)
730                         #print "====2 ",geom
731                     else:
732                         # geom engine not created: existing engine found
733                         #print "==== existing ", engine, geom, doLcc, created
734                         pass
735                 #print "return geom 1 ", geom
736                 return geom
737
738             #print "return geom 2 ", geom
739             return geom
740
741         def __init__(self, *args):
742             global created
743             #print "-------- geomBuilder __init__ --- ", created, self
744             if not created:
745               created = True
746               GEOM._objref_GEOM_Gen.__init__(self, *args)
747               self.myMaxNbSubShapesAllowed = 0 # auto-publishing is disabled by default
748               self.myBuilder = None
749               self.BasicOp  = None
750               self.CurvesOp = None
751               self.PrimOp   = None
752               self.ShapesOp = None
753               self.HealOp   = None
754               self.InsertOp = None
755               self.BoolOp   = None
756               self.TrsfOp   = None
757               self.LocalOp  = None
758               self.MeasuOp  = None
759               self.BlocksOp = None
760               self.GroupOp  = None
761               self.FieldOp  = None
762               self.TestOp   = None
763             pass
764
765         ## Process object publication in the study, as follows:
766         #  - if @a theName is specified (not None), the object is published in the study
767         #    with this name, not taking into account "auto-publishing" option;
768         #  - if @a theName is NOT specified, the object is published in the study
769         #    (using default name, which can be customized using @a theDefaultName parameter)
770         #    only if auto-publishing is switched on.
771         #
772         #  @param theObj  object, a subject for publishing
773         #  @param theName object name for study
774         #  @param theDefaultName default name for the auto-publishing
775         #
776         #  @sa addToStudyAuto()
777         def _autoPublish(self, theObj, theName, theDefaultName="noname"):
778             # ---
779             def _item_name(_names, _defname, _idx=-1):
780                 if not _names: _names = _defname
781                 if type(_names) in [list, tuple]:
782                     if _idx >= 0:
783                         if _idx >= len(_names) or not _names[_idx]:
784                             if type(_defname) not in [list, tuple]:
785                                 _name = "%s_%d"%(_defname, _idx+1)
786                             elif len(_defname) > 0 and _idx >= 0 and _idx < len(_defname):
787                                 _name = _defname[_idx]
788                             else:
789                                 _name = "%noname_%d"%(dn, _idx+1)
790                             pass
791                         else:
792                             _name = _names[_idx]
793                         pass
794                     else:
795                         # must be wrong  usage
796                         _name = _names[0]
797                     pass
798                 else:
799                     if _idx >= 0:
800                         _name = "%s_%d"%(_names, _idx+1)
801                     else:
802                         _name = _names
803                     pass
804                 return _name
805             # ---
806             def _publish( _name, _obj ):
807                 fatherObj = None
808                 if isinstance( _obj, GEOM._objref_GEOM_Field ):
809                     fatherObj = _obj.GetShape()
810                 elif isinstance( _obj, GEOM._objref_GEOM_FieldStep ):
811                     fatherObj = _obj.GetField()
812                 elif not _obj.IsMainShape():
813                     fatherObj = _obj.GetMainShape()
814                     pass
815                 if fatherObj and fatherObj.GetStudyEntry():
816                     self.addToStudyInFather(fatherObj, _obj, _name)
817                 else:
818                     self.addToStudy(_obj, _name)
819                     pass
820                 return
821             # ---
822             if not theObj:
823                 return # null object
824             if not theName and not self.myMaxNbSubShapesAllowed:
825                 return # nothing to do: auto-publishing is disabled
826             if not theName and not theDefaultName:
827                 return # neither theName nor theDefaultName is given
828             import types
829             if type(theObj) in [list, tuple]:
830                 # list of objects is being published
831                 idx = 0
832                 for obj in theObj:
833                     if not obj: continue # bad object
834                     name = _item_name(theName, theDefaultName, idx)
835                     _publish( name, obj )
836                     idx = idx+1
837                     if not theName and idx == self.myMaxNbSubShapesAllowed: break
838                     pass
839                 pass
840             else:
841                 # single object is published
842                 name = _item_name(theName, theDefaultName)
843                 _publish( name, theObj )
844             pass
845
846         ## @addtogroup l1_geomBuilder_auxiliary
847         ## @{
848         def init_geom(self):
849             self.myStudy = salome.myStudy
850             self.myBuilder = self.myStudy.NewBuilder()
851
852             # load data from the study file, if necessary
853             component = self.myStudy.FindComponent("GEOM")
854             if component:
855                 self.myBuilder.LoadWith(component, self)
856
857             self.BasicOp  = self.GetIBasicOperations    ()
858             self.CurvesOp = self.GetICurvesOperations   ()
859             self.PrimOp   = self.GetI3DPrimOperations   ()
860             self.ShapesOp = self.GetIShapesOperations   ()
861             self.HealOp   = self.GetIHealingOperations  ()
862             self.InsertOp = self.GetIInsertOperations   ()
863             self.BoolOp   = self.GetIBooleanOperations  ()
864             self.TrsfOp   = self.GetITransformOperations()
865             self.LocalOp  = self.GetILocalOperations    ()
866             self.MeasuOp  = self.GetIMeasureOperations  ()
867             self.BlocksOp = self.GetIBlocksOperations   ()
868             self.GroupOp  = self.GetIGroupOperations    ()
869             self.FieldOp  = self.GetIFieldOperations    ()
870             self.TestOp   = self.GetITestOperations     ()
871
872             notebook.myStudy = self.myStudy
873             pass
874
875         def GetPluginOperations(self, libraryName):
876             op = GEOM._objref_GEOM_Gen.GetPluginOperations(self, libraryName)
877             return op
878
879         ## Enable / disable results auto-publishing
880         #
881         #  The automatic publishing is managed in the following way:
882         #  - if @a maxNbSubShapes = 0, automatic publishing is disabled.
883         #  - if @a maxNbSubShapes = -1 (default), automatic publishing is enabled and
884         #  maximum number of sub-shapes allowed for publishing is unlimited; any negative
885         #  value passed as parameter has the same effect.
886         #  - if @a maxNbSubShapes is any positive value, automatic publishing is enabled and
887         #  maximum number of sub-shapes allowed for publishing is set to specified value.
888         #
889         #  @param maxNbSubShapes maximum number of sub-shapes allowed for publishing.
890         #  @ingroup l1_publish_data
891         def addToStudyAuto(self, maxNbSubShapes=-1):
892             """
893             Enable / disable results auto-publishing
894
895             The automatic publishing is managed in the following way:
896             - if @a maxNbSubShapes = 0, automatic publishing is disabled;
897             - if @a maxNbSubShapes = -1 (default), automatic publishing is enabled and
898             maximum number of sub-shapes allowed for publishing is unlimited; any negative
899             value passed as parameter has the same effect.
900             - if @a maxNbSubShapes is any positive value, automatic publishing is enabled and
901             maximum number of sub-shapes allowed for publishing is set to this value.
902
903             Parameters:
904                 maxNbSubShapes maximum number of sub-shapes allowed for publishing.
905
906             Example of usage:
907                 geompy.addToStudyAuto()   # enable auto-publishing
908                 geompy.MakeBoxDXDYDZ(100) # box is created and published with default name
909                 geompy.addToStudyAuto(0)  # disable auto-publishing
910             """
911             self.myMaxNbSubShapesAllowed = max(-1, maxNbSubShapes)
912             pass
913
914         ## Dump component to the Python script
915         #  This method overrides IDL function to allow default values for the parameters.
916         def DumpPython(self, theIsPublished=True, theIsMultiFile=True):
917             """
918             Dump component to the Python script
919             This method overrides IDL function to allow default values for the parameters.
920             """
921             return GEOM._objref_GEOM_Gen.DumpPython(self, theIsPublished, theIsMultiFile)
922
923         ## Get name for sub-shape aSubObj of shape aMainObj
924         #
925         # @ref swig_SubShapeName "Example"
926         @ManageTransactions("ShapesOp")
927         def SubShapeName(self,aSubObj, aMainObj):
928             """
929             Get name for sub-shape aSubObj of shape aMainObj
930             """
931             # Example: see GEOM_TestAll.py
932
933             #aSubId  = orb.object_to_string(aSubObj)
934             #aMainId = orb.object_to_string(aMainObj)
935             #index = gg.getIndexTopology(aSubId, aMainId)
936             #name = gg.getShapeTypeString(aSubId) + "_%d"%(index)
937             index = self.ShapesOp.GetTopologyIndex(aMainObj, aSubObj)
938             name = self.ShapesOp.GetShapeTypeString(aSubObj) + "_%d"%(index)
939             return name
940
941         ## Publish in study aShape with name aName
942         #
943         #  \param aShape the shape to be published
944         #  \param aName  the name for the shape
945         #  \param doRestoreSubShapes if True, finds and publishes also
946         #         sub-shapes of <VAR>aShape</VAR>, corresponding to its arguments
947         #         and published sub-shapes of arguments
948         #  \param theArgs,theFindMethod,theInheritFirstArg see RestoreSubShapes() for
949         #                                                  these arguments description
950         #  \return study entry of the published shape in form of string
951         #
952         #  @ingroup l1_publish_data
953         #  @ref swig_all_addtostudy "Example"
954         def addToStudy(self, aShape, aName, doRestoreSubShapes=False,
955                        theArgs=[], theFindMethod=GEOM.FSM_GetInPlace, theInheritFirstArg=False):
956             """
957             Publish in study aShape with name aName
958
959             Parameters:
960                 aShape the shape to be published
961                 aName  the name for the shape
962                 doRestoreSubShapes if True, finds and publishes also
963                                    sub-shapes of aShape, corresponding to its arguments
964                                    and published sub-shapes of arguments
965                 theArgs,theFindMethod,theInheritFirstArg see geompy.RestoreSubShapes() for
966                                                          these arguments description
967
968             Returns:
969                 study entry of the published shape in form of string
970
971             Example of usage:
972                 id_block1 = geompy.addToStudy(Block1, "Block 1")
973             """
974             # Example: see GEOM_TestAll.py
975             try:
976                 aSObject = self.AddInStudy(aShape, aName, None)
977                 if aSObject and aName: aSObject.SetAttrString("AttributeName", aName)
978                 if doRestoreSubShapes:
979                     self.RestoreSubShapesSO(aSObject, theArgs,
980                                             theFindMethod, theInheritFirstArg, True )
981             except:
982                 print("addToStudy() failed")
983                 return ""
984             return aShape.GetStudyEntry()
985
986         ## Publish in study aShape with name aName as sub-object of previously published aFather
987         #  \param aFather previously published object
988         #  \param aShape the shape to be published as sub-object of <VAR>aFather</VAR>
989         #  \param aName  the name for the shape
990         #
991         #  \return study entry of the published shape in form of string
992         #
993         #  @ingroup l1_publish_data
994         #  @ref swig_all_addtostudyInFather "Example"
995         def addToStudyInFather(self, aFather, aShape, aName):
996             """
997             Publish in study aShape with name aName as sub-object of previously published aFather
998
999             Parameters:
1000                 aFather previously published object
1001                 aShape the shape to be published as sub-object of aFather
1002                 aName  the name for the shape
1003
1004             Returns:
1005                 study entry of the published shape in form of string
1006             """
1007             # Example: see GEOM_TestAll.py
1008             try:
1009                 aSObject = self.AddInStudy(aShape, aName, aFather)
1010                 if aSObject and aName: aSObject.SetAttrString("AttributeName", aName)
1011             except:
1012                 print("addToStudyInFather() failed")
1013                 return ""
1014             return aShape.GetStudyEntry()
1015
1016         ## Unpublish object in study
1017         #
1018         #  \param obj the object to be unpublished
1019         def hideInStudy(self, obj):
1020             """
1021             Unpublish object in study
1022
1023             Parameters:
1024                 obj the object to be unpublished
1025             """
1026             ior = salome.orb.object_to_string(obj)
1027             aSObject = self.myStudy.FindObjectIOR(ior)
1028             if aSObject is not None:
1029                 genericAttribute = self.myBuilder.FindOrCreateAttribute(aSObject, "AttributeDrawable")
1030                 drwAttribute = genericAttribute._narrow(SALOMEDS.AttributeDrawable)
1031                 drwAttribute.SetDrawable(False)
1032                 # hide references if any
1033                 vso = self.myStudy.FindDependances(aSObject);
1034                 for refObj in vso :
1035                     genericAttribute = self.myBuilder.FindOrCreateAttribute(refObj, "AttributeDrawable")
1036                     drwAttribute = genericAttribute._narrow(SALOMEDS.AttributeDrawable)
1037                     drwAttribute.SetDrawable(False)
1038                     pass
1039                 pass
1040
1041         # end of l1_geomBuilder_auxiliary
1042         ## @}
1043
1044         ## @addtogroup l3_restore_ss
1045         ## @{
1046
1047         ## Publish sub-shapes, standing for arguments and sub-shapes of arguments
1048         #  To be used from python scripts out of addToStudy() (non-default usage)
1049         #  \param theObject published GEOM.GEOM_Object, arguments of which will be published
1050         #  \param theArgs   list of GEOM.GEOM_Object, operation arguments to be published.
1051         #                   If this list is empty, all operation arguments will be published
1052         #  \param theFindMethod method to search sub-shapes, corresponding to arguments and
1053         #                       their sub-shapes. Value from enumeration GEOM.find_shape_method.
1054         #  \param theInheritFirstArg set properties of the first argument for <VAR>theObject</VAR>.
1055         #                            Do not publish sub-shapes in place of arguments, but only
1056         #                            in place of sub-shapes of the first argument,
1057         #                            because the whole shape corresponds to the first argument.
1058         #                            Mainly to be used after transformations, but it also can be
1059         #                            useful after partition with one object shape, and some other
1060         #                            operations, where only the first argument has to be considered.
1061         #                            If theObject has only one argument shape, this flag is automatically
1062         #                            considered as True, not regarding really passed value.
1063         #  \param theAddPrefix add prefix "from_" to names of restored sub-shapes,
1064         #                      and prefix "from_subshapes_of_" to names of partially restored sub-shapes.
1065         #  \return list of published sub-shapes
1066         #
1067         #  @ref tui_restore_prs_params "Example"
1068         def RestoreSubShapes (self, theObject, theArgs=[], theFindMethod=GEOM.FSM_GetInPlace,
1069                               theInheritFirstArg=False, theAddPrefix=True):
1070             """
1071             Publish sub-shapes, standing for arguments and sub-shapes of arguments
1072             To be used from python scripts out of geompy.addToStudy (non-default usage)
1073
1074             Parameters:
1075                 theObject published GEOM.GEOM_Object, arguments of which will be published
1076                 theArgs   list of GEOM.GEOM_Object, operation arguments to be published.
1077                           If this list is empty, all operation arguments will be published
1078                 theFindMethod method to search sub-shapes, corresponding to arguments and
1079                               their sub-shapes. Value from enumeration GEOM.find_shape_method.
1080                 theInheritFirstArg set properties of the first argument for theObject.
1081                                    Do not publish sub-shapes in place of arguments, but only
1082                                    in place of sub-shapes of the first argument,
1083                                    because the whole shape corresponds to the first argument.
1084                                    Mainly to be used after transformations, but it also can be
1085                                    useful after partition with one object shape, and some other
1086                                    operations, where only the first argument has to be considered.
1087                                    If theObject has only one argument shape, this flag is automatically
1088                                    considered as True, not regarding really passed value.
1089                 theAddPrefix add prefix "from_" to names of restored sub-shapes,
1090                              and prefix "from_subshapes_of_" to names of partially restored sub-shapes.
1091             Returns:
1092                 list of published sub-shapes
1093             """
1094             # Example: see GEOM_TestAll.py
1095             return self.RestoreSubShapesO(theObject, theArgs,
1096                                           theFindMethod, theInheritFirstArg, theAddPrefix)
1097
1098         ## Publish sub-shapes, standing for arguments and sub-shapes of arguments
1099         #  To be used from python scripts out of addToStudy() (non-default usage)
1100         #  \param theObject published GEOM.GEOM_Object, arguments of which will be published
1101         #  \param theArgs   list of GEOM.GEOM_Object, operation arguments to be published.
1102         #                   If this list is empty, all operation arguments will be published
1103         #  \param theFindMethod method to search sub-shapes, corresponding to arguments and
1104         #                       their sub-shapes. Value from enumeration GEOM::find_shape_method.
1105         #  \param theInheritFirstArg set properties of the first argument for <VAR>theObject</VAR>.
1106         #                            Do not publish sub-shapes in place of arguments, but only
1107         #                            in place of sub-shapes of the first argument,
1108         #                            because the whole shape corresponds to the first argument.
1109         #                            Mainly to be used after transformations, but it also can be
1110         #                            useful after partition with one object shape, and some other
1111         #                            operations, where only the first argument has to be considered.
1112         #                            If theObject has only one argument shape, this flag is automatically
1113         #                            considered as True, not regarding really passed value.
1114         #  \param theAddPrefix add prefix "from_" to names of restored sub-shapes,
1115         #                      and prefix "from_subshapes_of_" to names of partially restored sub-shapes.
1116         #  \return list of published sub-shapes
1117         #
1118         #  @ref tui_restore_prs_params "Example"
1119         def RestoreGivenSubShapes (self, theObject, theArgs=[], theFindMethod=GEOM.FSM_GetInPlace,
1120                                    theInheritFirstArg=False, theAddPrefix=True):
1121             """
1122             Publish sub-shapes, standing for arguments and sub-shapes of arguments
1123             To be used from python scripts out of geompy.addToStudy() (non-default usage)
1124
1125             Parameters:
1126                 theObject published GEOM.GEOM_Object, arguments of which will be published
1127                 theArgs   list of GEOM.GEOM_Object, operation arguments to be published.
1128                           If this list is empty, all operation arguments will be published
1129                 theFindMethod method to search sub-shapes, corresponding to arguments and
1130                               their sub-shapes. Value from enumeration GEOM::find_shape_method.
1131                 theInheritFirstArg set properties of the first argument for theObject.
1132                                    Do not publish sub-shapes in place of arguments, but only
1133                                    in place of sub-shapes of the first argument,
1134                                    because the whole shape corresponds to the first argument.
1135                                    Mainly to be used after transformations, but it also can be
1136                                    useful after partition with one object shape, and some other
1137                                    operations, where only the first argument has to be considered.
1138                                    If theObject has only one argument shape, this flag is automatically
1139                                    considered as True, not regarding really passed value.
1140                 theAddPrefix add prefix "from_" to names of restored sub-shapes,
1141                              and prefix "from_subshapes_of_" to names of partially restored sub-shapes.
1142
1143             Returns:
1144                 list of published sub-shapes
1145             """
1146             # Example: see GEOM_TestAll.py
1147             return self.RestoreGivenSubShapesO(theObject, theArgs,
1148                                                theFindMethod, theInheritFirstArg, theAddPrefix)
1149
1150         # end of l3_restore_ss
1151         ## @}
1152
1153         ## @addtogroup l3_basic_go
1154         ## @{
1155
1156         ## Create point by three coordinates.
1157         #  @param theX The X coordinate of the point.
1158         #  @param theY The Y coordinate of the point.
1159         #  @param theZ The Z coordinate of the point.
1160         #  @param theName Object name; when specified, this parameter is used
1161         #         for result publication in the study. Otherwise, if automatic
1162         #         publication is switched on, default value is used for result name.
1163         #
1164         #  @return New GEOM.GEOM_Object, containing the created point.
1165         #
1166         #  @ref tui_creation_point "Example"
1167         @ManageTransactions("BasicOp")
1168         def MakeVertex(self, theX, theY, theZ, theName=None):
1169             """
1170             Create point by three coordinates.
1171
1172             Parameters:
1173                 theX The X coordinate of the point.
1174                 theY The Y coordinate of the point.
1175                 theZ The Z coordinate of the point.
1176                 theName Object name; when specified, this parameter is used
1177                         for result publication in the study. Otherwise, if automatic
1178                         publication is switched on, default value is used for result name.
1179
1180             Returns:
1181                 New GEOM.GEOM_Object, containing the created point.
1182             """
1183             # Example: see GEOM_TestAll.py
1184             theX,theY,theZ,Parameters = ParseParameters(theX, theY, theZ)
1185             anObj = self.BasicOp.MakePointXYZ(theX, theY, theZ)
1186             RaiseIfFailed("MakePointXYZ", self.BasicOp)
1187             anObj.SetParameters(Parameters)
1188             self._autoPublish(anObj, theName, "vertex")
1189             return anObj
1190
1191         ## Create a point, distant from the referenced point
1192         #  on the given distances along the coordinate axes.
1193         #  @param theReference The referenced point.
1194         #  @param theX Displacement from the referenced point along OX axis.
1195         #  @param theY Displacement from the referenced point along OY axis.
1196         #  @param theZ Displacement from the referenced point along OZ axis.
1197         #  @param theName Object name; when specified, this parameter is used
1198         #         for result publication in the study. Otherwise, if automatic
1199         #         publication is switched on, default value is used for result name.
1200         #
1201         #  @return New GEOM.GEOM_Object, containing the created point.
1202         #
1203         #  @ref tui_creation_point "Example"
1204         @ManageTransactions("BasicOp")
1205         def MakeVertexWithRef(self, theReference, theX, theY, theZ, theName=None):
1206             """
1207             Create a point, distant from the referenced point
1208             on the given distances along the coordinate axes.
1209
1210             Parameters:
1211                 theReference The referenced point.
1212                 theX Displacement from the referenced point along OX axis.
1213                 theY Displacement from the referenced point along OY axis.
1214                 theZ Displacement from the referenced point along OZ axis.
1215                 theName Object name; when specified, this parameter is used
1216                         for result publication in the study. Otherwise, if automatic
1217                         publication is switched on, default value is used for result name.
1218
1219             Returns:
1220                 New GEOM.GEOM_Object, containing the created point.
1221             """
1222             # Example: see GEOM_TestAll.py
1223             theX,theY,theZ,Parameters = ParseParameters(theX, theY, theZ)
1224             anObj = self.BasicOp.MakePointWithReference(theReference, theX, theY, theZ)
1225             RaiseIfFailed("MakePointWithReference", self.BasicOp)
1226             anObj.SetParameters(Parameters)
1227             self._autoPublish(anObj, theName, "vertex")
1228             return anObj
1229
1230         ## Create a point, corresponding to the given parameter on the given curve.
1231         #  @param theRefCurve The referenced curve.
1232         #  @param theParameter Value of parameter on the referenced curve.
1233         #  @param takeOrientationIntoAccount flag that tells if it is necessary
1234         #         to take the curve's orientation into account for the
1235         #         operation. I.e. if this flag is set, the results for the same
1236         #         parameters (except the value 0.5) is different for forward
1237         #         and reversed curves. If it is not set the result is the same.
1238         #  @param theName Object name; when specified, this parameter is used
1239         #         for result publication in the study. Otherwise, if automatic
1240         #         publication is switched on, default value is used for result name.
1241         #
1242         #  @return New GEOM.GEOM_Object, containing the created point.
1243         #
1244         #  @ref tui_creation_point "Example"
1245         @ManageTransactions("BasicOp")
1246         def MakeVertexOnCurve(self, theRefCurve, theParameter,
1247                               takeOrientationIntoAccount=False, theName=None):
1248             """
1249             Create a point, corresponding to the given parameter on the given curve.
1250
1251             Parameters:
1252                 theRefCurve The referenced curve.
1253                 theParameter Value of parameter on the referenced curve.
1254                 takeOrientationIntoAccount flag that tells if it is necessary
1255                         to take the curve's orientation into account for the
1256                         operation. I.e. if this flag is set, the results for
1257                         the same parameters (except the value 0.5) is different
1258                         for forward and reversed curves. If it is not set
1259                         the result is the same.
1260                 theName Object name; when specified, this parameter is used
1261                         for result publication in the study. Otherwise, if automatic
1262                         publication is switched on, default value is used for result name.
1263
1264             Returns:
1265                 New GEOM.GEOM_Object, containing the created point.
1266
1267             Example of usage:
1268                 p_on_arc = geompy.MakeVertexOnCurve(Arc, 0.25)
1269             """
1270             # Example: see GEOM_TestAll.py
1271             theParameter, takeOrientationIntoAccount, Parameters = ParseParameters(
1272                 theParameter, takeOrientationIntoAccount)
1273             anObj = self.BasicOp.MakePointOnCurve(theRefCurve, theParameter,
1274                                                   takeOrientationIntoAccount)
1275             RaiseIfFailed("MakePointOnCurve", self.BasicOp)
1276             anObj.SetParameters(Parameters)
1277             self._autoPublish(anObj, theName, "vertex")
1278             return anObj
1279
1280         ## Create a point by projection give coordinates on the given curve
1281         #  @param theRefCurve The referenced curve.
1282         #  @param theX X-coordinate in 3D space
1283         #  @param theY Y-coordinate in 3D space
1284         #  @param theZ Z-coordinate in 3D space
1285         #  @param theName Object name; when specified, this parameter is used
1286         #         for result publication in the study. Otherwise, if automatic
1287         #         publication is switched on, default value is used for result name.
1288         #
1289         #  @return New GEOM.GEOM_Object, containing the created point.
1290         #
1291         #  @ref tui_creation_point "Example"
1292         @ManageTransactions("BasicOp")
1293         def MakeVertexOnCurveByCoord(self, theRefCurve, theX, theY, theZ, theName=None):
1294             """
1295             Create a point by projection give coordinates on the given curve
1296
1297             Parameters:
1298                 theRefCurve The referenced curve.
1299                 theX X-coordinate in 3D space
1300                 theY Y-coordinate in 3D space
1301                 theZ Z-coordinate in 3D space
1302                 theName Object name; when specified, this parameter is used
1303                         for result publication in the study. Otherwise, if automatic
1304                         publication is switched on, default value is used for result name.
1305
1306             Returns:
1307                 New GEOM.GEOM_Object, containing the created point.
1308
1309             Example of usage:
1310                 p_on_arc3 = geompy.MakeVertexOnCurveByCoord(Arc, 100, -10, 10)
1311             """
1312             # Example: see GEOM_TestAll.py
1313             theX, theY, theZ, Parameters = ParseParameters(theX, theY, theZ)
1314             anObj = self.BasicOp.MakePointOnCurveByCoord(theRefCurve, theX, theY, theZ)
1315             RaiseIfFailed("MakeVertexOnCurveByCoord", self.BasicOp)
1316             anObj.SetParameters(Parameters)
1317             self._autoPublish(anObj, theName, "vertex")
1318             return anObj
1319
1320         ## Create a point, corresponding to the given length on the given curve.
1321         #  @param theRefCurve The referenced curve.
1322         #  @param theLength Length on the referenced curve. It can be negative.
1323         #  @param theStartPoint Point allowing to choose the direction for the calculation
1324         #                       of the length. If None, start from the first point of theRefCurve.
1325         #  @param theName Object name; when specified, this parameter is used
1326         #         for result publication in the study. Otherwise, if automatic
1327         #         publication is switched on, default value is used for result name.
1328         #
1329         #  @return New GEOM.GEOM_Object, containing the created point.
1330         #
1331         #  @ref tui_creation_point "Example"
1332         @ManageTransactions("BasicOp")
1333         def MakeVertexOnCurveByLength(self, theRefCurve, theLength, theStartPoint = None, theName=None):
1334             """
1335             Create a point, corresponding to the given length on the given curve.
1336
1337             Parameters:
1338                 theRefCurve The referenced curve.
1339                 theLength Length on the referenced curve. It can be negative.
1340                 theStartPoint Point allowing to choose the direction for the calculation
1341                               of the length. If None, start from the first point of theRefCurve.
1342                 theName Object name; when specified, this parameter is used
1343                         for result publication in the study. Otherwise, if automatic
1344                         publication is switched on, default value is used for result name.
1345
1346             Returns:
1347                 New GEOM.GEOM_Object, containing the created point.
1348             """
1349             # Example: see GEOM_TestAll.py
1350             theLength, Parameters = ParseParameters(theLength)
1351             anObj = self.BasicOp.MakePointOnCurveByLength(theRefCurve, theLength, theStartPoint)
1352             RaiseIfFailed("MakePointOnCurveByLength", self.BasicOp)
1353             anObj.SetParameters(Parameters)
1354             self._autoPublish(anObj, theName, "vertex")
1355             return anObj
1356
1357         ## Create a point, corresponding to the given parameters on the
1358         #    given surface.
1359         #  @param theRefSurf The referenced surface.
1360         #  @param theUParameter Value of U-parameter on the referenced surface.
1361         #  @param theVParameter Value of V-parameter on the referenced surface.
1362         #  @param theName Object name; when specified, this parameter is used
1363         #         for result publication in the study. Otherwise, if automatic
1364         #         publication is switched on, default value is used for result name.
1365         #
1366         #  @return New GEOM.GEOM_Object, containing the created point.
1367         #
1368         #  @ref swig_MakeVertexOnSurface "Example"
1369         @ManageTransactions("BasicOp")
1370         def MakeVertexOnSurface(self, theRefSurf, theUParameter, theVParameter, theName=None):
1371             """
1372             Create a point, corresponding to the given parameters on the
1373             given surface.
1374
1375             Parameters:
1376                 theRefSurf The referenced surface.
1377                 theUParameter Value of U-parameter on the referenced surface.
1378                 theVParameter Value of V-parameter on the referenced surface.
1379                 theName Object name; when specified, this parameter is used
1380                         for result publication in the study. Otherwise, if automatic
1381                         publication is switched on, default value is used for result name.
1382
1383             Returns:
1384                 New GEOM.GEOM_Object, containing the created point.
1385
1386             Example of usage:
1387                 p_on_face = geompy.MakeVertexOnSurface(Face, 0.1, 0.8)
1388             """
1389             theUParameter, theVParameter, Parameters = ParseParameters(theUParameter, theVParameter)
1390             # Example: see GEOM_TestAll.py
1391             anObj = self.BasicOp.MakePointOnSurface(theRefSurf, theUParameter, theVParameter)
1392             RaiseIfFailed("MakePointOnSurface", self.BasicOp)
1393             anObj.SetParameters(Parameters);
1394             self._autoPublish(anObj, theName, "vertex")
1395             return anObj
1396
1397         ## Create a point by projection give coordinates on the given surface
1398         #  @param theRefSurf The referenced surface.
1399         #  @param theX X-coordinate in 3D space
1400         #  @param theY Y-coordinate in 3D space
1401         #  @param theZ Z-coordinate in 3D space
1402         #  @param theName Object name; when specified, this parameter is used
1403         #         for result publication in the study. Otherwise, if automatic
1404         #         publication is switched on, default value is used for result name.
1405         #
1406         #  @return New GEOM.GEOM_Object, containing the created point.
1407         #
1408         #  @ref swig_MakeVertexOnSurfaceByCoord "Example"
1409         @ManageTransactions("BasicOp")
1410         def MakeVertexOnSurfaceByCoord(self, theRefSurf, theX, theY, theZ, theName=None):
1411             """
1412             Create a point by projection give coordinates on the given surface
1413
1414             Parameters:
1415                 theRefSurf The referenced surface.
1416                 theX X-coordinate in 3D space
1417                 theY Y-coordinate in 3D space
1418                 theZ Z-coordinate in 3D space
1419                 theName Object name; when specified, this parameter is used
1420                         for result publication in the study. Otherwise, if automatic
1421                         publication is switched on, default value is used for result name.
1422
1423             Returns:
1424                 New GEOM.GEOM_Object, containing the created point.
1425
1426             Example of usage:
1427                 p_on_face2 = geompy.MakeVertexOnSurfaceByCoord(Face, 0., 0., 0.)
1428             """
1429             theX, theY, theZ, Parameters = ParseParameters(theX, theY, theZ)
1430             # Example: see GEOM_TestAll.py
1431             anObj = self.BasicOp.MakePointOnSurfaceByCoord(theRefSurf, theX, theY, theZ)
1432             RaiseIfFailed("MakeVertexOnSurfaceByCoord", self.BasicOp)
1433             anObj.SetParameters(Parameters);
1434             self._autoPublish(anObj, theName, "vertex")
1435             return anObj
1436
1437         ## Create a point, which lays on the given face.
1438         #  The point will lay in arbitrary place of the face.
1439         #  The only condition on it is a non-zero distance to the face boundary.
1440         #  Such point can be used to uniquely identify the face inside any
1441         #  shape in case, when the shape does not contain overlapped faces.
1442         #  @param theFace The referenced face.
1443         #  @param theName Object name; when specified, this parameter is used
1444         #         for result publication in the study. Otherwise, if automatic
1445         #         publication is switched on, default value is used for result name.
1446         #
1447         #  @return New GEOM.GEOM_Object, containing the created point.
1448         #
1449         #  @ref swig_MakeVertexInsideFace "Example"
1450         @ManageTransactions("BasicOp")
1451         def MakeVertexInsideFace (self, theFace, theNumberOfPnts=1, theName=None):
1452             """
1453             Create a point, which lays on the given face.
1454             The point will lay in arbitrary place of the face.
1455             The only condition on it is a non-zero distance to the face boundary.
1456             Such point can be used to uniquely identify the face inside any
1457             shape in case, when the shape does not contain overlapped faces.
1458
1459             Parameters:
1460                 theFace The referenced face.
1461                 theNumberOfPnts The number of points we want to get, 1 by default.
1462                 theName Object name; when specified, this parameter is used
1463                         for result publication in the study. Otherwise, if automatic
1464                         publication is switched on, default value is used for result name.
1465
1466             Returns:
1467                 New GEOM.GEOM_Object, containing the created point.
1468
1469             Example of usage:
1470                 p_on_face = geompy.MakeVertexInsideFace(Face)
1471             """
1472             # Example: see GEOM_TestAll.py
1473             anObj = self.BasicOp.MakePointOnFace(theFace, theNumberOfPnts)
1474             RaiseIfFailed("MakeVertexInsideFace", self.BasicOp)
1475             self._autoPublish(anObj, theName, "vertex")
1476             return anObj
1477
1478         ## Create a point on intersection of two lines.
1479         #  @param theRefLine1, theRefLine2 The referenced lines.
1480         #  @param theName Object name; when specified, this parameter is used
1481         #         for result publication in the study. Otherwise, if automatic
1482         #         publication is switched on, default value is used for result name.
1483         #
1484         #  @return New GEOM.GEOM_Object, containing the created point.
1485         #
1486         #  @ref swig_MakeVertexOnLinesIntersection "Example"
1487         @ManageTransactions("BasicOp")
1488         def MakeVertexOnLinesIntersection(self, theRefLine1, theRefLine2, theName=None):
1489             """
1490             Create a point on intersection of two lines.
1491
1492             Parameters:
1493                 theRefLine1, theRefLine2 The referenced lines.
1494                 theName Object name; when specified, this parameter is used
1495                         for result publication in the study. Otherwise, if automatic
1496                         publication is switched on, default value is used for result name.
1497
1498             Returns:
1499                 New GEOM.GEOM_Object, containing the created point.
1500             """
1501             # Example: see GEOM_TestAll.py
1502             anObj = self.BasicOp.MakePointOnLinesIntersection(theRefLine1, theRefLine2)
1503             RaiseIfFailed("MakePointOnLinesIntersection", self.BasicOp)
1504             self._autoPublish(anObj, theName, "vertex")
1505             return anObj
1506
1507         ## Create a tangent, corresponding to the given parameter on the given curve.
1508         #  @param theRefCurve The referenced curve.
1509         #  @param theParameter Value of parameter on the referenced curve.
1510         #  @param theName Object name; when specified, this parameter is used
1511         #         for result publication in the study. Otherwise, if automatic
1512         #         publication is switched on, default value is used for result name.
1513         #
1514         #  @return New GEOM.GEOM_Object, containing the created tangent.
1515         #
1516         #  @ref swig_MakeTangentOnCurve "Example"
1517         @ManageTransactions("BasicOp")
1518         def MakeTangentOnCurve(self, theRefCurve, theParameter, theName=None):
1519             """
1520             Create a tangent, corresponding to the given parameter on the given curve.
1521
1522             Parameters:
1523                 theRefCurve The referenced curve.
1524                 theParameter Value of parameter on the referenced curve.
1525                 theName Object name; when specified, this parameter is used
1526                         for result publication in the study. Otherwise, if automatic
1527                         publication is switched on, default value is used for result name.
1528
1529             Returns:
1530                 New GEOM.GEOM_Object, containing the created tangent.
1531
1532             Example of usage:
1533                 tan_on_arc = geompy.MakeTangentOnCurve(Arc, 0.7)
1534             """
1535             anObj = self.BasicOp.MakeTangentOnCurve(theRefCurve, theParameter)
1536             RaiseIfFailed("MakeTangentOnCurve", self.BasicOp)
1537             self._autoPublish(anObj, theName, "tangent")
1538             return anObj
1539
1540         ## Create a tangent plane, corresponding to the given parameter on the given face.
1541         #  @param theFace The face for which tangent plane should be built.
1542         #  @param theParameterV vertical value of the center point (0.0 - 1.0).
1543         #  @param theParameterU horisontal value of the center point (0.0 - 1.0).
1544         #  @param theTrimSize the size of plane.
1545         #  @param theName Object name; when specified, this parameter is used
1546         #         for result publication in the study. Otherwise, if automatic
1547         #         publication is switched on, default value is used for result name.
1548         #
1549         #  @return New GEOM.GEOM_Object, containing the created tangent.
1550         #
1551         #  @ref swig_MakeTangentPlaneOnFace "Example"
1552         @ManageTransactions("BasicOp")
1553         def MakeTangentPlaneOnFace(self, theFace, theParameterU, theParameterV, theTrimSize, theName=None):
1554             """
1555             Create a tangent plane, corresponding to the given parameter on the given face.
1556
1557             Parameters:
1558                 theFace The face for which tangent plane should be built.
1559                 theParameterV vertical value of the center point (0.0 - 1.0).
1560                 theParameterU horisontal value of the center point (0.0 - 1.0).
1561                 theTrimSize the size of plane.
1562                 theName Object name; when specified, this parameter is used
1563                         for result publication in the study. Otherwise, if automatic
1564                         publication is switched on, default value is used for result name.
1565
1566            Returns:
1567                 New GEOM.GEOM_Object, containing the created tangent.
1568
1569            Example of usage:
1570                 an_on_face = geompy.MakeTangentPlaneOnFace(tan_extrusion, 0.7, 0.5, 150)
1571             """
1572             anObj = self.BasicOp.MakeTangentPlaneOnFace(theFace, theParameterU, theParameterV, theTrimSize)
1573             RaiseIfFailed("MakeTangentPlaneOnFace", self.BasicOp)
1574             self._autoPublish(anObj, theName, "tangent")
1575             return anObj
1576
1577         ## Create a vector with the given components.
1578         #  @param theDX X component of the vector.
1579         #  @param theDY Y component of the vector.
1580         #  @param theDZ Z component of the vector.
1581         #  @param theName Object name; when specified, this parameter is used
1582         #         for result publication in the study. Otherwise, if automatic
1583         #         publication is switched on, default value is used for result name.
1584         #
1585         #  @return New GEOM.GEOM_Object, containing the created vector.
1586         #
1587         #  @ref tui_creation_vector "Example"
1588         @ManageTransactions("BasicOp")
1589         def MakeVectorDXDYDZ(self, theDX, theDY, theDZ, theName=None):
1590             """
1591             Create a vector with the given components.
1592
1593             Parameters:
1594                 theDX X component of the vector.
1595                 theDY Y component of the vector.
1596                 theDZ Z component of the vector.
1597                 theName Object name; when specified, this parameter is used
1598                         for result publication in the study. Otherwise, if automatic
1599                         publication is switched on, default value is used for result name.
1600
1601             Returns:
1602                 New GEOM.GEOM_Object, containing the created vector.
1603             """
1604             # Example: see GEOM_TestAll.py
1605             theDX,theDY,theDZ,Parameters = ParseParameters(theDX, theDY, theDZ)
1606             anObj = self.BasicOp.MakeVectorDXDYDZ(theDX, theDY, theDZ)
1607             RaiseIfFailed("MakeVectorDXDYDZ", self.BasicOp)
1608             anObj.SetParameters(Parameters)
1609             self._autoPublish(anObj, theName, "vector")
1610             return anObj
1611
1612         ## Create a vector between two points.
1613         #  @param thePnt1 Start point for the vector.
1614         #  @param thePnt2 End point for the vector.
1615         #  @param theName Object name; when specified, this parameter is used
1616         #         for result publication in the study. Otherwise, if automatic
1617         #         publication is switched on, default value is used for result name.
1618         #
1619         #  @return New GEOM.GEOM_Object, containing the created vector.
1620         #
1621         #  @ref tui_creation_vector "Example"
1622         @ManageTransactions("BasicOp")
1623         def MakeVector(self, thePnt1, thePnt2, theName=None):
1624             """
1625             Create a vector between two points.
1626
1627             Parameters:
1628                 thePnt1 Start point for the vector.
1629                 thePnt2 End point for the vector.
1630                 theName Object name; when specified, this parameter is used
1631                         for result publication in the study. Otherwise, if automatic
1632                         publication is switched on, default value is used for result name.
1633
1634             Returns:
1635                 New GEOM.GEOM_Object, containing the created vector.
1636             """
1637             # Example: see GEOM_TestAll.py
1638             anObj = self.BasicOp.MakeVectorTwoPnt(thePnt1, thePnt2)
1639             RaiseIfFailed("MakeVectorTwoPnt", self.BasicOp)
1640             self._autoPublish(anObj, theName, "vector")
1641             return anObj
1642
1643         ## Create a line, passing through the given point
1644         #  and parallel to the given direction
1645         #  @param thePnt Point. The resulting line will pass through it.
1646         #  @param theDir Direction. The resulting line will be parallel to it.
1647         #  @param theName Object name; when specified, this parameter is used
1648         #         for result publication in the study. Otherwise, if automatic
1649         #         publication is switched on, default value is used for result name.
1650         #
1651         #  @return New GEOM.GEOM_Object, containing the created line.
1652         #
1653         #  @ref tui_creation_line "Example"
1654         @ManageTransactions("BasicOp")
1655         def MakeLine(self, thePnt, theDir, theName=None):
1656             """
1657             Create a line, passing through the given point
1658             and parallel to the given direction
1659
1660             Parameters:
1661                 thePnt Point. The resulting line will pass through it.
1662                 theDir Direction. The resulting line will be parallel to it.
1663                 theName Object name; when specified, this parameter is used
1664                         for result publication in the study. Otherwise, if automatic
1665                         publication is switched on, default value is used for result name.
1666
1667             Returns:
1668                 New GEOM.GEOM_Object, containing the created line.
1669             """
1670             # Example: see GEOM_TestAll.py
1671             anObj = self.BasicOp.MakeLine(thePnt, theDir)
1672             RaiseIfFailed("MakeLine", self.BasicOp)
1673             self._autoPublish(anObj, theName, "line")
1674             return anObj
1675
1676         ## Create a line, passing through the given points
1677         #  @param thePnt1 First of two points, defining the line.
1678         #  @param thePnt2 Second of two points, defining the line.
1679         #  @param theName Object name; when specified, this parameter is used
1680         #         for result publication in the study. Otherwise, if automatic
1681         #         publication is switched on, default value is used for result name.
1682         #
1683         #  @return New GEOM.GEOM_Object, containing the created line.
1684         #
1685         #  @ref tui_creation_line "Example"
1686         @ManageTransactions("BasicOp")
1687         def MakeLineTwoPnt(self, thePnt1, thePnt2, theName=None):
1688             """
1689             Create a line, passing through the given points
1690
1691             Parameters:
1692                 thePnt1 First of two points, defining the line.
1693                 thePnt2 Second of two points, defining the line.
1694                 theName Object name; when specified, this parameter is used
1695                         for result publication in the study. Otherwise, if automatic
1696                         publication is switched on, default value is used for result name.
1697
1698             Returns:
1699                 New GEOM.GEOM_Object, containing the created line.
1700             """
1701             # Example: see GEOM_TestAll.py
1702             anObj = self.BasicOp.MakeLineTwoPnt(thePnt1, thePnt2)
1703             RaiseIfFailed("MakeLineTwoPnt", self.BasicOp)
1704             self._autoPublish(anObj, theName, "line")
1705             return anObj
1706
1707         ## Create a line on two faces intersection.
1708         #  @param theFace1 First of two faces, defining the line.
1709         #  @param theFace2 Second of two faces, defining the line.
1710         #  @param theName Object name; when specified, this parameter is used
1711         #         for result publication in the study. Otherwise, if automatic
1712         #         publication is switched on, default value is used for result name.
1713         #
1714         #  @return New GEOM.GEOM_Object, containing the created line.
1715         #
1716         #  @ref swig_MakeLineTwoFaces "Example"
1717         @ManageTransactions("BasicOp")
1718         def MakeLineTwoFaces(self, theFace1, theFace2, theName=None):
1719             """
1720             Create a line on two faces intersection.
1721
1722             Parameters:
1723                 theFace1 First of two faces, defining the line.
1724                 theFace2 Second of two faces, defining the line.
1725                 theName Object name; when specified, this parameter is used
1726                         for result publication in the study. Otherwise, if automatic
1727                         publication is switched on, default value is used for result name.
1728
1729             Returns:
1730                 New GEOM.GEOM_Object, containing the created line.
1731             """
1732             # Example: see GEOM_TestAll.py
1733             anObj = self.BasicOp.MakeLineTwoFaces(theFace1, theFace2)
1734             RaiseIfFailed("MakeLineTwoFaces", self.BasicOp)
1735             self._autoPublish(anObj, theName, "line")
1736             return anObj
1737
1738         ## Create a plane, passing through the given point
1739         #  and normal to the given vector.
1740         #  @param thePnt Point, the plane has to pass through.
1741         #  @param theVec Vector, defining the plane normal direction.
1742         #  @param theTrimSize Half size of a side of quadrangle face, representing the plane.
1743         #  @param theName Object name; when specified, this parameter is used
1744         #         for result publication in the study. Otherwise, if automatic
1745         #         publication is switched on, default value is used for result name.
1746         #
1747         #  @return New GEOM.GEOM_Object, containing the created plane.
1748         #
1749         #  @ref tui_creation_plane "Example"
1750         @ManageTransactions("BasicOp")
1751         def MakePlane(self, thePnt, theVec, theTrimSize, theName=None):
1752             """
1753             Create a plane, passing through the given point
1754             and normal to the given vector.
1755
1756             Parameters:
1757                 thePnt Point, the plane has to pass through.
1758                 theVec Vector, defining the plane normal direction.
1759                 theTrimSize Half size of a side of quadrangle face, representing the plane.
1760                 theName Object name; when specified, this parameter is used
1761                         for result publication in the study. Otherwise, if automatic
1762                         publication is switched on, default value is used for result name.
1763
1764             Returns:
1765                 New GEOM.GEOM_Object, containing the created plane.
1766             """
1767             # Example: see GEOM_TestAll.py
1768             theTrimSize, Parameters = ParseParameters(theTrimSize);
1769             anObj = self.BasicOp.MakePlanePntVec(thePnt, theVec, theTrimSize)
1770             RaiseIfFailed("MakePlanePntVec", self.BasicOp)
1771             anObj.SetParameters(Parameters)
1772             self._autoPublish(anObj, theName, "plane")
1773             return anObj
1774
1775         ## Create a plane, passing through the three given points
1776         #  @param thePnt1 First of three points, defining the plane.
1777         #  @param thePnt2 Second of three points, defining the plane.
1778         #  @param thePnt3 Third of three points, defining the plane.
1779         #  @param theTrimSize Half size of a side of quadrangle face, representing the plane.
1780         #  @param theName Object name; when specified, this parameter is used
1781         #         for result publication in the study. Otherwise, if automatic
1782         #         publication is switched on, default value is used for result name.
1783         #
1784         #  @return New GEOM.GEOM_Object, containing the created plane.
1785         #
1786         #  @ref tui_creation_plane "Example"
1787         @ManageTransactions("BasicOp")
1788         def MakePlaneThreePnt(self, thePnt1, thePnt2, thePnt3, theTrimSize, theName=None):
1789             """
1790             Create a plane, passing through the three given points
1791
1792             Parameters:
1793                 thePnt1 First of three points, defining the plane.
1794                 thePnt2 Second of three points, defining the plane.
1795                 thePnt3 Third of three points, defining the plane.
1796                 theTrimSize Half size of a side of quadrangle face, representing the plane.
1797                 theName Object name; when specified, this parameter is used
1798                         for result publication in the study. Otherwise, if automatic
1799                         publication is switched on, default value is used for result name.
1800
1801             Returns:
1802                 New GEOM.GEOM_Object, containing the created plane.
1803             """
1804             # Example: see GEOM_TestAll.py
1805             theTrimSize, Parameters = ParseParameters(theTrimSize);
1806             anObj = self.BasicOp.MakePlaneThreePnt(thePnt1, thePnt2, thePnt3, theTrimSize)
1807             RaiseIfFailed("MakePlaneThreePnt", self.BasicOp)
1808             anObj.SetParameters(Parameters)
1809             self._autoPublish(anObj, theName, "plane")
1810             return anObj
1811
1812         ## Create a plane, similar to the existing one, but with another size of representing face.
1813         #  @param theFace Referenced plane or LCS(Marker).
1814         #  @param theTrimSize New half size of a side of quadrangle face, representing the plane.
1815         #  @param theName Object name; when specified, this parameter is used
1816         #         for result publication in the study. Otherwise, if automatic
1817         #         publication is switched on, default value is used for result name.
1818         #
1819         #  @return New GEOM.GEOM_Object, containing the created plane.
1820         #
1821         #  @ref tui_creation_plane "Example"
1822         @ManageTransactions("BasicOp")
1823         def MakePlaneFace(self, theFace, theTrimSize, theName=None):
1824             """
1825             Create a plane, similar to the existing one, but with another size of representing face.
1826
1827             Parameters:
1828                 theFace Referenced plane or LCS(Marker).
1829                 theTrimSize New half size of a side of quadrangle face, representing the plane.
1830                 theName Object name; when specified, this parameter is used
1831                         for result publication in the study. Otherwise, if automatic
1832                         publication is switched on, default value is used for result name.
1833
1834             Returns:
1835                 New GEOM.GEOM_Object, containing the created plane.
1836             """
1837             # Example: see GEOM_TestAll.py
1838             theTrimSize, Parameters = ParseParameters(theTrimSize);
1839             anObj = self.BasicOp.MakePlaneFace(theFace, theTrimSize)
1840             RaiseIfFailed("MakePlaneFace", self.BasicOp)
1841             anObj.SetParameters(Parameters)
1842             self._autoPublish(anObj, theName, "plane")
1843             return anObj
1844
1845         ## Create a plane, passing through the 2 vectors
1846         #  with center in a start point of the first vector.
1847         #  @param theVec1 Vector, defining center point and plane direction.
1848         #  @param theVec2 Vector, defining the plane normal direction.
1849         #  @param theTrimSize Half size of a side of quadrangle face, representing the plane.
1850         #  @param theName Object name; when specified, this parameter is used
1851         #         for result publication in the study. Otherwise, if automatic
1852         #         publication is switched on, default value is used for result name.
1853         #
1854         #  @return New GEOM.GEOM_Object, containing the created plane.
1855         #
1856         #  @ref tui_creation_plane "Example"
1857         @ManageTransactions("BasicOp")
1858         def MakePlane2Vec(self, theVec1, theVec2, theTrimSize, theName=None):
1859             """
1860             Create a plane, passing through the 2 vectors
1861             with center in a start point of the first vector.
1862
1863             Parameters:
1864                 theVec1 Vector, defining center point and plane direction.
1865                 theVec2 Vector, defining the plane normal direction.
1866                 theTrimSize Half size of a side of quadrangle face, representing the plane.
1867                 theName Object name; when specified, this parameter is used
1868                         for result publication in the study. Otherwise, if automatic
1869                         publication is switched on, default value is used for result name.
1870
1871             Returns:
1872                 New GEOM.GEOM_Object, containing the created plane.
1873             """
1874             # Example: see GEOM_TestAll.py
1875             theTrimSize, Parameters = ParseParameters(theTrimSize);
1876             anObj = self.BasicOp.MakePlane2Vec(theVec1, theVec2, theTrimSize)
1877             RaiseIfFailed("MakePlane2Vec", self.BasicOp)
1878             anObj.SetParameters(Parameters)
1879             self._autoPublish(anObj, theName, "plane")
1880             return anObj
1881
1882         ## Create a plane, based on a Local coordinate system.
1883         #  @param theLCS  coordinate system, defining plane.
1884         #  @param theTrimSize Half size of a side of quadrangle face, representing the plane.
1885         #  @param theOrientation OXY, OYZ or OZX orientation - (1, 2 or 3)
1886         #  @param theName Object name; when specified, this parameter is used
1887         #         for result publication in the study. Otherwise, if automatic
1888         #         publication is switched on, default value is used for result name.
1889         #
1890         #  @return New GEOM.GEOM_Object, containing the created plane.
1891         #
1892         #  @ref tui_creation_plane "Example"
1893         @ManageTransactions("BasicOp")
1894         def MakePlaneLCS(self, theLCS, theTrimSize, theOrientation, theName=None):
1895             """
1896             Create a plane, based on a Local coordinate system.
1897
1898            Parameters:
1899                 theLCS  coordinate system, defining plane.
1900                 theTrimSize Half size of a side of quadrangle face, representing the plane.
1901                 theOrientation OXY, OYZ or OZX orientation - (1, 2 or 3)
1902                 theName Object name; when specified, this parameter is used
1903                         for result publication in the study. Otherwise, if automatic
1904                         publication is switched on, default value is used for result name.
1905
1906             Returns:
1907                 New GEOM.GEOM_Object, containing the created plane.
1908             """
1909             # Example: see GEOM_TestAll.py
1910             theTrimSize, Parameters = ParseParameters(theTrimSize);
1911             anObj = self.BasicOp.MakePlaneLCS(theLCS, theTrimSize, theOrientation)
1912             RaiseIfFailed("MakePlaneLCS", self.BasicOp)
1913             anObj.SetParameters(Parameters)
1914             self._autoPublish(anObj, theName, "plane")
1915             return anObj
1916
1917         ## Create a local coordinate system.
1918         #  @param OX,OY,OZ Three coordinates of coordinate system origin.
1919         #  @param XDX,XDY,XDZ Three components of OX direction
1920         #  @param YDX,YDY,YDZ Three components of OY direction
1921         #  @param theName Object name; when specified, this parameter is used
1922         #         for result publication in the study. Otherwise, if automatic
1923         #         publication is switched on, default value is used for result name.
1924         #
1925         #  @return New GEOM.GEOM_Object, containing the created coordinate system.
1926         #
1927         #  @ref swig_MakeMarker "Example"
1928         @ManageTransactions("BasicOp")
1929         def MakeMarker(self, OX,OY,OZ, XDX,XDY,XDZ, YDX,YDY,YDZ, theName=None):
1930             """
1931             Create a local coordinate system.
1932
1933             Parameters:
1934                 OX,OY,OZ Three coordinates of coordinate system origin.
1935                 XDX,XDY,XDZ Three components of OX direction
1936                 YDX,YDY,YDZ Three components of OY direction
1937                 theName Object name; when specified, this parameter is used
1938                         for result publication in the study. Otherwise, if automatic
1939                         publication is switched on, default value is used for result name.
1940
1941             Returns:
1942                 New GEOM.GEOM_Object, containing the created coordinate system.
1943             """
1944             # Example: see GEOM_TestAll.py
1945             OX,OY,OZ, XDX,XDY,XDZ, YDX,YDY,YDZ, Parameters = ParseParameters(OX,OY,OZ, XDX,XDY,XDZ, YDX,YDY,YDZ);
1946             anObj = self.BasicOp.MakeMarker(OX,OY,OZ, XDX,XDY,XDZ, YDX,YDY,YDZ)
1947             RaiseIfFailed("MakeMarker", self.BasicOp)
1948             anObj.SetParameters(Parameters)
1949             self._autoPublish(anObj, theName, "lcs")
1950             return anObj
1951
1952         ## Create a local coordinate system from shape.
1953         #  @param theShape The initial shape to detect the coordinate system.
1954         #  @param theName Object name; when specified, this parameter is used
1955         #         for result publication in the study. Otherwise, if automatic
1956         #         publication is switched on, default value is used for result name.
1957         #
1958         #  @return New GEOM.GEOM_Object, containing the created coordinate system.
1959         #
1960         #  @ref tui_creation_lcs "Example"
1961         @ManageTransactions("BasicOp")
1962         def MakeMarkerFromShape(self, theShape, theName=None):
1963             """
1964             Create a local coordinate system from shape.
1965
1966             Parameters:
1967                 theShape The initial shape to detect the coordinate system.
1968                 theName Object name; when specified, this parameter is used
1969                         for result publication in the study. Otherwise, if automatic
1970                         publication is switched on, default value is used for result name.
1971
1972             Returns:
1973                 New GEOM.GEOM_Object, containing the created coordinate system.
1974             """
1975             anObj = self.BasicOp.MakeMarkerFromShape(theShape)
1976             RaiseIfFailed("MakeMarkerFromShape", self.BasicOp)
1977             self._autoPublish(anObj, theName, "lcs")
1978             return anObj
1979
1980         ## Create a local coordinate system from point and two vectors.
1981         #  @param theOrigin Point of coordinate system origin.
1982         #  @param theXVec Vector of X direction
1983         #  @param theYVec Vector of Y direction
1984         #  @param theName Object name; when specified, this parameter is used
1985         #         for result publication in the study. Otherwise, if automatic
1986         #         publication is switched on, default value is used for result name.
1987         #
1988         #  @return New GEOM.GEOM_Object, containing the created coordinate system.
1989         #
1990         #  @ref tui_creation_lcs "Example"
1991         @ManageTransactions("BasicOp")
1992         def MakeMarkerPntTwoVec(self, theOrigin, theXVec, theYVec, theName=None):
1993             """
1994             Create a local coordinate system from point and two vectors.
1995
1996             Parameters:
1997                 theOrigin Point of coordinate system origin.
1998                 theXVec Vector of X direction
1999                 theYVec Vector of Y direction
2000                 theName Object name; when specified, this parameter is used
2001                         for result publication in the study. Otherwise, if automatic
2002                         publication is switched on, default value is used for result name.
2003
2004             Returns:
2005                 New GEOM.GEOM_Object, containing the created coordinate system.
2006
2007             """
2008             anObj = self.BasicOp.MakeMarkerPntTwoVec(theOrigin, theXVec, theYVec)
2009             RaiseIfFailed("MakeMarkerPntTwoVec", self.BasicOp)
2010             self._autoPublish(anObj, theName, "lcs")
2011             return anObj
2012
2013         # end of l3_basic_go
2014         ## @}
2015
2016         ## @addtogroup l4_curves
2017         ## @{
2018
2019         ##  Create an arc of circle, passing through three given points.
2020         #  @param thePnt1 Start point of the arc.
2021         #  @param thePnt2 Middle point of the arc.
2022         #  @param thePnt3 End point of the arc.
2023         #  @param theName Object name; when specified, this parameter is used
2024         #         for result publication in the study. Otherwise, if automatic
2025         #         publication is switched on, default value is used for result name.
2026         #
2027         #  @return New GEOM.GEOM_Object, containing the created arc.
2028         #
2029         #  @ref swig_MakeArc "Example"
2030         @ManageTransactions("CurvesOp")
2031         def MakeArc(self, thePnt1, thePnt2, thePnt3, theName=None):
2032             """
2033             Create an arc of circle, passing through three given points.
2034
2035             Parameters:
2036                 thePnt1 Start point of the arc.
2037                 thePnt2 Middle point of the arc.
2038                 thePnt3 End point of the arc.
2039                 theName Object name; when specified, this parameter is used
2040                         for result publication in the study. Otherwise, if automatic
2041                         publication is switched on, default value is used for result name.
2042
2043             Returns:
2044                 New GEOM.GEOM_Object, containing the created arc.
2045             """
2046             # Example: see GEOM_TestAll.py
2047             anObj = self.CurvesOp.MakeArc(thePnt1, thePnt2, thePnt3)
2048             RaiseIfFailed("MakeArc", self.CurvesOp)
2049             self._autoPublish(anObj, theName, "arc")
2050             return anObj
2051
2052         ##  Create an arc of circle from a center and 2 points.
2053         #  @param thePnt1 Center of the arc
2054         #  @param thePnt2 Start point of the arc. (Gives also the radius of the arc)
2055         #  @param thePnt3 End point of the arc (Gives also a direction)
2056         #  @param theSense Orientation of the arc
2057         #  @param theName Object name; when specified, this parameter is used
2058         #         for result publication in the study. Otherwise, if automatic
2059         #         publication is switched on, default value is used for result name.
2060         #
2061         #  @return New GEOM.GEOM_Object, containing the created arc.
2062         #
2063         #  @ref swig_MakeArc "Example"
2064         @ManageTransactions("CurvesOp")
2065         def MakeArcCenter(self, thePnt1, thePnt2, thePnt3, theSense=False, theName=None):
2066             """
2067             Create an arc of circle from a center and 2 points.
2068
2069             Parameters:
2070                 thePnt1 Center of the arc
2071                 thePnt2 Start point of the arc. (Gives also the radius of the arc)
2072                 thePnt3 End point of the arc (Gives also a direction)
2073                 theSense Orientation of the arc
2074                 theName Object name; when specified, this parameter is used
2075                         for result publication in the study. Otherwise, if automatic
2076                         publication is switched on, default value is used for result name.
2077
2078             Returns:
2079                 New GEOM.GEOM_Object, containing the created arc.
2080             """
2081             # Example: see GEOM_TestAll.py
2082             anObj = self.CurvesOp.MakeArcCenter(thePnt1, thePnt2, thePnt3, theSense)
2083             RaiseIfFailed("MakeArcCenter", self.CurvesOp)
2084             self._autoPublish(anObj, theName, "arc")
2085             return anObj
2086
2087         ##  Create an arc of ellipse, of center and two points.
2088         #  @param theCenter Center of the arc.
2089         #  @param thePnt1 defines major radius of the arc by distance from Pnt1 to Pnt2.
2090         #  @param thePnt2 defines plane of ellipse and minor radius as distance from Pnt3 to line from Pnt1 to Pnt2.
2091         #  @param theName Object name; when specified, this parameter is used
2092         #         for result publication in the study. Otherwise, if automatic
2093         #         publication is switched on, default value is used for result name.
2094         #
2095         #  @return New GEOM.GEOM_Object, containing the created arc.
2096         #
2097         #  @ref swig_MakeArc "Example"
2098         @ManageTransactions("CurvesOp")
2099         def MakeArcOfEllipse(self, theCenter, thePnt1, thePnt2, theName=None):
2100             """
2101             Create an arc of ellipse, of center and two points.
2102
2103             Parameters:
2104                 theCenter Center of the arc.
2105                 thePnt1 defines major radius of the arc by distance from Pnt1 to Pnt2.
2106                 thePnt2 defines plane of ellipse and minor radius as distance from Pnt3 to line from Pnt1 to Pnt2.
2107                 theName Object name; when specified, this parameter is used
2108                         for result publication in the study. Otherwise, if automatic
2109                         publication is switched on, default value is used for result name.
2110
2111             Returns:
2112                 New GEOM.GEOM_Object, containing the created arc.
2113             """
2114             # Example: see GEOM_TestAll.py
2115             anObj = self.CurvesOp.MakeArcOfEllipse(theCenter, thePnt1, thePnt2)
2116             RaiseIfFailed("MakeArcOfEllipse", self.CurvesOp)
2117             self._autoPublish(anObj, theName, "arc")
2118             return anObj
2119
2120         ## Create a circle with given center, normal vector and radius.
2121         #  @param thePnt Circle center.
2122         #  @param theVec Vector, normal to the plane of the circle.
2123         #  @param theR Circle radius.
2124         #  @param theName Object name; when specified, this parameter is used
2125         #         for result publication in the study. Otherwise, if automatic
2126         #         publication is switched on, default value is used for result name.
2127         #
2128         #  @return New GEOM.GEOM_Object, containing the created circle.
2129         #
2130         #  @ref tui_creation_circle "Example"
2131         @ManageTransactions("CurvesOp")
2132         def MakeCircle(self, thePnt, theVec, theR, theName=None):
2133             """
2134             Create a circle with given center, normal vector and radius.
2135
2136             Parameters:
2137                 thePnt Circle center.
2138                 theVec Vector, normal to the plane of the circle.
2139                 theR Circle radius.
2140                 theName Object name; when specified, this parameter is used
2141                         for result publication in the study. Otherwise, if automatic
2142                         publication is switched on, default value is used for result name.
2143
2144             Returns:
2145                 New GEOM.GEOM_Object, containing the created circle.
2146             """
2147             # Example: see GEOM_TestAll.py
2148             theR, Parameters = ParseParameters(theR)
2149             anObj = self.CurvesOp.MakeCirclePntVecR(thePnt, theVec, theR)
2150             RaiseIfFailed("MakeCirclePntVecR", self.CurvesOp)
2151             anObj.SetParameters(Parameters)
2152             self._autoPublish(anObj, theName, "circle")
2153             return anObj
2154
2155         ## Create a circle with given radius.
2156         #  Center of the circle will be in the origin of global
2157         #  coordinate system and normal vector will be codirected with Z axis
2158         #  @param theR Circle radius.
2159         #  @param theName Object name; when specified, this parameter is used
2160         #         for result publication in the study. Otherwise, if automatic
2161         #         publication is switched on, default value is used for result name.
2162         #
2163         #  @return New GEOM.GEOM_Object, containing the created circle.
2164         @ManageTransactions("CurvesOp")
2165         def MakeCircleR(self, theR, theName=None):
2166             """
2167             Create a circle with given radius.
2168             Center of the circle will be in the origin of global
2169             coordinate system and normal vector will be codirected with Z axis
2170
2171             Parameters:
2172                 theR Circle radius.
2173                 theName Object name; when specified, this parameter is used
2174                         for result publication in the study. Otherwise, if automatic
2175                         publication is switched on, default value is used for result name.
2176
2177             Returns:
2178                 New GEOM.GEOM_Object, containing the created circle.
2179             """
2180             anObj = self.CurvesOp.MakeCirclePntVecR(None, None, theR)
2181             RaiseIfFailed("MakeCirclePntVecR", self.CurvesOp)
2182             self._autoPublish(anObj, theName, "circle")
2183             return anObj
2184
2185         ## Create a circle, passing through three given points
2186         #  @param thePnt1,thePnt2,thePnt3 Points, defining the circle.
2187         #  @param theName Object name; when specified, this parameter is used
2188         #         for result publication in the study. Otherwise, if automatic
2189         #         publication is switched on, default value is used for result name.
2190         #
2191         #  @return New GEOM.GEOM_Object, containing the created circle.
2192         #
2193         #  @ref tui_creation_circle "Example"
2194         @ManageTransactions("CurvesOp")
2195         def MakeCircleThreePnt(self, thePnt1, thePnt2, thePnt3, theName=None):
2196             """
2197             Create a circle, passing through three given points
2198
2199             Parameters:
2200                 thePnt1,thePnt2,thePnt3 Points, defining the circle.
2201                 theName Object name; when specified, this parameter is used
2202                         for result publication in the study. Otherwise, if automatic
2203                         publication is switched on, default value is used for result name.
2204
2205             Returns:
2206                 New GEOM.GEOM_Object, containing the created circle.
2207             """
2208             # Example: see GEOM_TestAll.py
2209             anObj = self.CurvesOp.MakeCircleThreePnt(thePnt1, thePnt2, thePnt3)
2210             RaiseIfFailed("MakeCircleThreePnt", self.CurvesOp)
2211             self._autoPublish(anObj, theName, "circle")
2212             return anObj
2213
2214         ## Create a circle, with given point1 as center,
2215         #  passing through the point2 as radius and laying in the plane,
2216         #  defined by all three given points.
2217         #  @param thePnt1,thePnt2,thePnt3 Points, defining the circle.
2218         #  @param theName Object name; when specified, this parameter is used
2219         #         for result publication in the study. Otherwise, if automatic
2220         #         publication is switched on, default value is used for result name.
2221         #
2222         #  @return New GEOM.GEOM_Object, containing the created circle.
2223         #
2224         #  @ref swig_MakeCircle "Example"
2225         @ManageTransactions("CurvesOp")
2226         def MakeCircleCenter2Pnt(self, thePnt1, thePnt2, thePnt3, theName=None):
2227             """
2228             Create a circle, with given point1 as center,
2229             passing through the point2 as radius and laying in the plane,
2230             defined by all three given points.
2231
2232             Parameters:
2233                 thePnt1,thePnt2,thePnt3 Points, defining the circle.
2234                 theName Object name; when specified, this parameter is used
2235                         for result publication in the study. Otherwise, if automatic
2236                         publication is switched on, default value is used for result name.
2237
2238             Returns:
2239                 New GEOM.GEOM_Object, containing the created circle.
2240             """
2241             # Example: see GEOM_example6.py
2242             anObj = self.CurvesOp.MakeCircleCenter2Pnt(thePnt1, thePnt2, thePnt3)
2243             RaiseIfFailed("MakeCircleCenter2Pnt", self.CurvesOp)
2244             self._autoPublish(anObj, theName, "circle")
2245             return anObj
2246
2247         ## Create an ellipse with given center, normal vector and radiuses.
2248         #  @param thePnt Ellipse center.
2249         #  @param theVec Vector, normal to the plane of the ellipse.
2250         #  @param theRMajor Major ellipse radius.
2251         #  @param theRMinor Minor ellipse radius.
2252         #  @param theVecMaj Vector, direction of the ellipse's main axis.
2253         #  @param theName Object name; when specified, this parameter is used
2254         #         for result publication in the study. Otherwise, if automatic
2255         #         publication is switched on, default value is used for result name.
2256         #
2257         #  @return New GEOM.GEOM_Object, containing the created ellipse.
2258         #
2259         #  @ref tui_creation_ellipse "Example"
2260         @ManageTransactions("CurvesOp")
2261         def MakeEllipse(self, thePnt, theVec, theRMajor, theRMinor, theVecMaj=None, theName=None):
2262             """
2263             Create an ellipse with given center, normal vector and radiuses.
2264
2265             Parameters:
2266                 thePnt Ellipse center.
2267                 theVec Vector, normal to the plane of the ellipse.
2268                 theRMajor Major ellipse radius.
2269                 theRMinor Minor ellipse radius.
2270                 theVecMaj Vector, direction of the ellipse's main axis.
2271                 theName Object name; when specified, this parameter is used
2272                         for result publication in the study. Otherwise, if automatic
2273                         publication is switched on, default value is used for result name.
2274
2275             Returns:
2276                 New GEOM.GEOM_Object, containing the created ellipse.
2277             """
2278             # Example: see GEOM_TestAll.py
2279             theRMajor, theRMinor, Parameters = ParseParameters(theRMajor, theRMinor)
2280             if theVecMaj is not None:
2281                 anObj = self.CurvesOp.MakeEllipseVec(thePnt, theVec, theRMajor, theRMinor, theVecMaj)
2282             else:
2283                 anObj = self.CurvesOp.MakeEllipse(thePnt, theVec, theRMajor, theRMinor)
2284                 pass
2285             RaiseIfFailed("MakeEllipse", self.CurvesOp)
2286             anObj.SetParameters(Parameters)
2287             self._autoPublish(anObj, theName, "ellipse")
2288             return anObj
2289
2290         ## Create an ellipse with given radiuses.
2291         #  Center of the ellipse will be in the origin of global
2292         #  coordinate system and normal vector will be codirected with Z axis
2293         #  @param theRMajor Major ellipse radius.
2294         #  @param theRMinor Minor ellipse radius.
2295         #  @param theName Object name; when specified, this parameter is used
2296         #         for result publication in the study. Otherwise, if automatic
2297         #         publication is switched on, default value is used for result name.
2298         #
2299         #  @return New GEOM.GEOM_Object, containing the created ellipse.
2300         @ManageTransactions("CurvesOp")
2301         def MakeEllipseRR(self, theRMajor, theRMinor, theName=None):
2302             """
2303             Create an ellipse with given radiuses.
2304             Center of the ellipse will be in the origin of global
2305             coordinate system and normal vector will be codirected with Z axis
2306
2307             Parameters:
2308                 theRMajor Major ellipse radius.
2309                 theRMinor Minor ellipse radius.
2310                 theName Object name; when specified, this parameter is used
2311                         for result publication in the study. Otherwise, if automatic
2312                         publication is switched on, default value is used for result name.
2313
2314             Returns:
2315             New GEOM.GEOM_Object, containing the created ellipse.
2316             """
2317             anObj = self.CurvesOp.MakeEllipse(None, None, theRMajor, theRMinor)
2318             RaiseIfFailed("MakeEllipse", self.CurvesOp)
2319             self._autoPublish(anObj, theName, "ellipse")
2320             return anObj
2321
2322         ## Create a polyline on the set of points.
2323         #  @param thePoints Sequence of points for the polyline.
2324         #  @param theIsClosed If True, build a closed wire.
2325         #  @param theName Object name; when specified, this parameter is used
2326         #         for result publication in the study. Otherwise, if automatic
2327         #         publication is switched on, default value is used for result name.
2328         #
2329         #  @return New GEOM.GEOM_Object, containing the created polyline.
2330         #
2331         #  @ref tui_creation_curve "Example"
2332         @ManageTransactions("CurvesOp")
2333         def MakePolyline(self, thePoints, theIsClosed=False, theName=None):
2334             """
2335             Create a polyline on the set of points.
2336
2337             Parameters:
2338                 thePoints Sequence of points for the polyline.
2339                 theIsClosed If True, build a closed wire.
2340                 theName Object name; when specified, this parameter is used
2341                         for result publication in the study. Otherwise, if automatic
2342                         publication is switched on, default value is used for result name.
2343
2344             Returns:
2345                 New GEOM.GEOM_Object, containing the created polyline.
2346             """
2347             # Example: see GEOM_TestAll.py
2348             anObj = self.CurvesOp.MakePolyline(thePoints, theIsClosed)
2349             RaiseIfFailed("MakePolyline", self.CurvesOp)
2350             self._autoPublish(anObj, theName, "polyline")
2351             return anObj
2352
2353         ## Create bezier curve on the set of points.
2354         #  @param thePoints Sequence of points for the bezier curve.
2355         #  @param theIsClosed If True, build a closed curve.
2356         #  @param theName Object name; when specified, this parameter is used
2357         #         for result publication in the study. Otherwise, if automatic
2358         #         publication is switched on, default value is used for result name.
2359         #
2360         #  @return New GEOM.GEOM_Object, containing the created bezier curve.
2361         #
2362         #  @ref tui_creation_curve "Example"
2363         @ManageTransactions("CurvesOp")
2364         def MakeBezier(self, thePoints, theIsClosed=False, theName=None):
2365             """
2366             Create bezier curve on the set of points.
2367
2368             Parameters:
2369                 thePoints Sequence of points for the bezier curve.
2370                 theIsClosed If True, build a closed curve.
2371                 theName Object name; when specified, this parameter is used
2372                         for result publication in the study. Otherwise, if automatic
2373                         publication is switched on, default value is used for result name.
2374
2375             Returns:
2376                 New GEOM.GEOM_Object, containing the created bezier curve.
2377             """
2378             # Example: see GEOM_TestAll.py
2379             anObj = self.CurvesOp.MakeSplineBezier(thePoints, theIsClosed)
2380             RaiseIfFailed("MakeSplineBezier", self.CurvesOp)
2381             self._autoPublish(anObj, theName, "bezier")
2382             return anObj
2383
2384         ## Create B-Spline curve on the set of points.
2385         #  @param thePoints Sequence of points for the B-Spline curve.
2386         #  @param theIsClosed If True, build a closed curve.
2387         #  @param theDoReordering If TRUE, the algo does not follow the order of
2388         #                         \a thePoints but searches for the closest vertex.
2389         #  @param theName Object name; when specified, this parameter is used
2390         #         for result publication in the study. Otherwise, if automatic
2391         #         publication is switched on, default value is used for result name.
2392         #
2393         #  @return New GEOM.GEOM_Object, containing the created B-Spline curve.
2394         #
2395         #  @ref tui_creation_curve "Example"
2396         @ManageTransactions("CurvesOp")
2397         def MakeInterpol(self, thePoints, theIsClosed=False, theDoReordering=False, theName=None):
2398             """
2399             Create B-Spline curve on the set of points.
2400
2401             Parameters:
2402                 thePoints Sequence of points for the B-Spline curve.
2403                 theIsClosed If True, build a closed curve.
2404                 theDoReordering If True, the algo does not follow the order of
2405                                 thePoints but searches for the closest vertex.
2406                 theName Object name; when specified, this parameter is used
2407                         for result publication in the study. Otherwise, if automatic
2408                         publication is switched on, default value is used for result name.
2409
2410             Returns:
2411                 New GEOM.GEOM_Object, containing the created B-Spline curve.
2412             """
2413             # Example: see GEOM_TestAll.py
2414             anObj = self.CurvesOp.MakeSplineInterpolation(thePoints, theIsClosed, theDoReordering)
2415             RaiseIfFailed("MakeInterpol", self.CurvesOp)
2416             self._autoPublish(anObj, theName, "bspline")
2417             return anObj
2418
2419         ## Create B-Spline curve on the set of points.
2420         #  @param thePoints Sequence of points for the B-Spline curve.
2421         #  @param theFirstVec Vector object, defining the curve direction at its first point.
2422         #  @param theLastVec Vector object, defining the curve direction at its last point.
2423         #  @param theName Object name; when specified, this parameter is used
2424         #         for result publication in the study. Otherwise, if automatic
2425         #         publication is switched on, default value is used for result name.
2426         #
2427         #  @return New GEOM.GEOM_Object, containing the created B-Spline curve.
2428         #
2429         #  @ref tui_creation_curve "Example"
2430         @ManageTransactions("CurvesOp")
2431         def MakeInterpolWithTangents(self, thePoints, theFirstVec, theLastVec, theName=None):
2432             """
2433             Create B-Spline curve on the set of points.
2434
2435             Parameters:
2436                 thePoints Sequence of points for the B-Spline curve.
2437                 theFirstVec Vector object, defining the curve direction at its first point.
2438                 theLastVec Vector object, defining the curve direction at its last point.
2439                 theName Object name; when specified, this parameter is used
2440                         for result publication in the study. Otherwise, if automatic
2441                         publication is switched on, default value is used for result name.
2442
2443             Returns:
2444                 New GEOM.GEOM_Object, containing the created B-Spline curve.
2445             """
2446             # Example: see GEOM_TestAll.py
2447             anObj = self.CurvesOp.MakeSplineInterpolWithTangents(thePoints, theFirstVec, theLastVec)
2448             RaiseIfFailed("MakeInterpolWithTangents", self.CurvesOp)
2449             self._autoPublish(anObj, theName, "bspline")
2450             return anObj
2451
2452         ## Creates a curve using the parametric definition of the basic points.
2453         #  @param thexExpr parametric equation of the coordinates X.
2454         #  @param theyExpr parametric equation of the coordinates Y.
2455         #  @param thezExpr parametric equation of the coordinates Z.
2456         #  @param theParamMin the minimal value of the parameter.
2457         #  @param theParamMax the maximum value of the parameter.
2458         #  @param theParamStep the number of steps if theNewMethod = True, else step value of the parameter.
2459         #  @param theCurveType the type of the curve,
2460         #         one of GEOM.Polyline, GEOM.Bezier, GEOM.Interpolation.
2461         #  @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.
2462         #  @param theName Object name; when specified, this parameter is used
2463         #         for result publication in the study. Otherwise, if automatic
2464         #         publication is switched on, default value is used for result name.
2465         #
2466         #  @return New GEOM.GEOM_Object, containing the created curve.
2467         #
2468         #  @ref tui_creation_curve "Example"
2469         @ManageTransactions("CurvesOp")
2470         def MakeCurveParametric(self, thexExpr, theyExpr, thezExpr,
2471                                 theParamMin, theParamMax, theParamStep, theCurveType, theNewMethod=False, theName=None ):
2472             """
2473             Creates a curve using the parametric definition of the basic points.
2474
2475             Parameters:
2476                 thexExpr parametric equation of the coordinates X.
2477                 theyExpr parametric equation of the coordinates Y.
2478                 thezExpr parametric equation of the coordinates Z.
2479                 theParamMin the minimal value of the parameter.
2480                 theParamMax the maximum value of the parameter.
2481                 theParamStep the number of steps if theNewMethod = True, else step value of the parameter.
2482                 theCurveType the type of the curve,
2483                              one of GEOM.Polyline, GEOM.Bezier, GEOM.Interpolation.
2484                 theNewMethod flag for switching to the new method if the flag is set to false a deprecated
2485                              method is used which can lead to a bug.
2486                 theName Object name; when specified, this parameter is used
2487                         for result publication in the study. Otherwise, if automatic
2488                         publication is switched on, default value is used for result name.
2489
2490             Returns:
2491                 New GEOM.GEOM_Object, containing the created curve.
2492             """
2493             theParamMin,theParamMax,theParamStep,Parameters = ParseParameters(theParamMin,theParamMax,theParamStep)
2494             if theNewMethod:
2495               anObj = self.CurvesOp.MakeCurveParametricNew(thexExpr,theyExpr,thezExpr,theParamMin,theParamMax,theParamStep,theCurveType)
2496             else:
2497               anObj = self.CurvesOp.MakeCurveParametric(thexExpr,theyExpr,thezExpr,theParamMin,theParamMax,theParamStep,theCurveType)
2498             RaiseIfFailed("MakeCurveParametric", self.CurvesOp)
2499             anObj.SetParameters(Parameters)
2500             self._autoPublish(anObj, theName, "curve")
2501             return anObj
2502
2503         ## Create an isoline curve on a face.
2504         #  @param theFace the face for which an isoline is created.
2505         #  @param IsUIsoline True for U-isoline creation; False for V-isoline
2506         #         creation.
2507         #  @param theParameter the U parameter for U-isoline or V parameter
2508         #         for V-isoline.
2509         #  @param theName Object name; when specified, this parameter is used
2510         #         for result publication in the study. Otherwise, if automatic
2511         #         publication is switched on, default value is used for result name.
2512         #
2513         #  @return New GEOM.GEOM_Object, containing the created isoline edge or
2514         #          a compound of edges.
2515         #
2516         #  @ref tui_creation_curve "Example"
2517         @ManageTransactions("CurvesOp")
2518         def MakeIsoline(self, theFace, IsUIsoline, theParameter, theName=None):
2519             """
2520             Create an isoline curve on a face.
2521
2522             Parameters:
2523                 theFace the face for which an isoline is created.
2524                 IsUIsoline True for U-isoline creation; False for V-isoline
2525                            creation.
2526                 theParameter the U parameter for U-isoline or V parameter
2527                              for V-isoline.
2528                 theName Object name; when specified, this parameter is used
2529                         for result publication in the study. Otherwise, if automatic
2530                         publication is switched on, default value is used for result name.
2531
2532             Returns:
2533                 New GEOM.GEOM_Object, containing the created isoline edge or a
2534                 compound of edges.
2535             """
2536             # Example: see GEOM_TestAll.py
2537             anObj = self.CurvesOp.MakeIsoline(theFace, IsUIsoline, theParameter)
2538             RaiseIfFailed("MakeIsoline", self.CurvesOp)
2539             if IsUIsoline:
2540                 self._autoPublish(anObj, theName, "U-Isoline")
2541             else:
2542                 self._autoPublish(anObj, theName, "V-Isoline")
2543             return anObj
2544
2545         # end of l4_curves
2546         ## @}
2547
2548         ## @addtogroup l3_sketcher
2549         ## @{
2550
2551         ## Create a sketcher (wire or face), following the textual description,
2552         #  passed through <VAR>theCommand</VAR> argument. \n
2553         #  Edges of the resulting wire or face will be arcs of circles and/or linear segments. \n
2554         #  Format of the description string have to be the following:
2555         #
2556         #  "Sketcher[:F x1 y1]:CMD[:CMD[:CMD...]]"
2557         #
2558         #  Where:
2559         #  - x1, y1 are coordinates of the first sketcher point (zero by default),
2560         #  - CMD is one of
2561         #     - "R angle" : Set the direction by angle
2562         #     - "D dx dy" : Set the direction by DX & DY
2563         #     .
2564         #       \n
2565         #     - "TT x y" : Create segment by point at X & Y
2566         #     - "T dx dy" : Create segment by point with DX & DY
2567         #     - "L length" : Create segment by direction & Length
2568         #     - "IX x" : Create segment by direction & Intersect. X
2569         #     - "IY y" : Create segment by direction & Intersect. Y
2570         #     .
2571         #       \n
2572         #     - "C radius length" : Create arc by direction, radius and length(in degree)
2573         #     - "AA x y": Create arc by point at X & Y
2574         #     - "A dx dy" : Create arc by point with DX & DY
2575         #     - "UU x y radius flag1": Create arc by point at X & Y with given radiUs
2576         #     - "U dx dy radius flag1" : Create arc by point with DX & DY with given radiUs
2577         #     - "EE x y xc yc flag1 flag2": Create arc by point at X & Y with given cEnter coordinates
2578         #     - "E dx dy dxc dyc radius flag1 flag2" : Create arc by point with DX & DY with given cEnter coordinates
2579         #     .
2580         #       \n
2581         #     - "WW" : Close Wire (to finish)
2582         #     - "WF" : Close Wire and build face (to finish)
2583         #     .
2584         #        \n
2585         #  - Flag1 (= reverse) is 0 or 2 ...
2586         #     - if 0 the drawn arc is the one of lower angle (< Pi)
2587         #     - if 2 the drawn arc ius the one of greater angle (> Pi)
2588         #     .
2589         #        \n
2590         #  - Flag2 (= control tolerance) is 0 or 1 ...
2591         #     - if 0 the specified end point can be at a distance of the arc greater than the tolerance (10^-7)
2592         #     - if 1 the wire is built only if the end point is on the arc
2593         #       with a tolerance of 10^-7 on the distance else the creation fails
2594         #
2595         #  @param theCommand String, defining the sketcher in local
2596         #                    coordinates of the working plane.
2597         #  @param theWorkingPlane Nine double values, defining origin,
2598         #                         OZ and OX directions of the working plane.
2599         #  @param theName Object name; when specified, this parameter is used
2600         #         for result publication in the study. Otherwise, if automatic
2601         #         publication is switched on, default value is used for result name.
2602         #
2603         #  @return New GEOM.GEOM_Object, containing the created wire.
2604         #
2605         #  @ref tui_sketcher_page "Example"
2606         @ManageTransactions("CurvesOp")
2607         def MakeSketcher(self, theCommand, theWorkingPlane = [0,0,0, 0,0,1, 1,0,0], theName=None):
2608             """
2609             Create a sketcher (wire or face), following the textual description, passed
2610             through theCommand argument.
2611             Edges of the resulting wire or face will be arcs of circles and/or linear segments.
2612             Format of the description string have to be the following:
2613                 "Sketcher[:F x1 y1]:CMD[:CMD[:CMD...]]"
2614             Where:
2615             - x1, y1 are coordinates of the first sketcher point (zero by default),
2616             - CMD is one of
2617                - "R angle" : Set the direction by angle
2618                - "D dx dy" : Set the direction by DX & DY
2619
2620                - "TT x y" : Create segment by point at X & Y
2621                - "T dx dy" : Create segment by point with DX & DY
2622                - "L length" : Create segment by direction & Length
2623                - "IX x" : Create segment by direction & Intersect. X
2624                - "IY y" : Create segment by direction & Intersect. Y
2625
2626                - "C radius length" : Create arc by direction, radius and length(in degree)
2627                - "AA x y": Create arc by point at X & Y
2628                - "A dx dy" : Create arc by point with DX & DY
2629                - "UU x y radius flag1": Create arc by point at X & Y with given radiUs
2630                - "U dx dy radius flag1" : Create arc by point with DX & DY with given radiUs
2631                - "EE x y xc yc flag1 flag2": Create arc by point at X & Y with given cEnter coordinates
2632                - "E dx dy dxc dyc radius flag1 flag2" : Create arc by point with DX & DY with given cEnter coordinates
2633
2634                - "WW" : Close Wire (to finish)
2635                - "WF" : Close Wire and build face (to finish)
2636
2637             - Flag1 (= reverse) is 0 or 2 ...
2638                - if 0 the drawn arc is the one of lower angle (< Pi)
2639                - if 2 the drawn arc ius the one of greater angle (> Pi)
2640
2641             - Flag2 (= control tolerance) is 0 or 1 ...
2642                - if 0 the specified end point can be at a distance of the arc greater than the tolerance (10^-7)
2643                - if 1 the wire is built only if the end point is on the arc
2644                  with a tolerance of 10^-7 on the distance else the creation fails
2645
2646             Parameters:
2647                 theCommand String, defining the sketcher in local
2648                            coordinates of the working plane.
2649                 theWorkingPlane Nine double values, defining origin,
2650                                 OZ and OX directions of the working plane.
2651                 theName Object name; when specified, this parameter is used
2652                         for result publication in the study. Otherwise, if automatic
2653                         publication is switched on, default value is used for result name.
2654
2655             Returns:
2656                 New GEOM.GEOM_Object, containing the created wire.
2657             """
2658             # Example: see GEOM_TestAll.py
2659             theCommand,Parameters = ParseSketcherCommand(theCommand)
2660             anObj = self.CurvesOp.MakeSketcher(theCommand, theWorkingPlane)
2661             RaiseIfFailed("MakeSketcher", self.CurvesOp)
2662             anObj.SetParameters(Parameters)
2663             self._autoPublish(anObj, theName, "wire")
2664             return anObj
2665
2666         ## Create a sketcher (wire or face), following the textual description,
2667         #  passed through <VAR>theCommand</VAR> argument. \n
2668         #  For format of the description string see MakeSketcher() method.\n
2669         #  @param theCommand String, defining the sketcher in local
2670         #                    coordinates of the working plane.
2671         #  @param theWorkingPlane Planar Face or LCS(Marker) of the working plane.
2672         #  @param theName Object name; when specified, this parameter is used
2673         #         for result publication in the study. Otherwise, if automatic
2674         #         publication is switched on, default value is used for result name.
2675         #
2676         #  @return New GEOM.GEOM_Object, containing the created wire.
2677         #
2678         #  @ref tui_sketcher_page "Example"
2679         @ManageTransactions("CurvesOp")
2680         def MakeSketcherOnPlane(self, theCommand, theWorkingPlane, theName=None):
2681             """
2682             Create a sketcher (wire or face), following the textual description,
2683             passed through theCommand argument.
2684             For format of the description string see geompy.MakeSketcher() method.
2685
2686             Parameters:
2687                 theCommand String, defining the sketcher in local
2688                            coordinates of the working plane.
2689                 theWorkingPlane Planar Face or LCS(Marker) of the working plane.
2690                 theName Object name; when specified, this parameter is used
2691                         for result publication in the study. Otherwise, if automatic
2692                         publication is switched on, default value is used for result name.
2693
2694             Returns:
2695                 New GEOM.GEOM_Object, containing the created wire.
2696             """
2697             theCommand,Parameters = ParseSketcherCommand(theCommand)
2698             anObj = self.CurvesOp.MakeSketcherOnPlane(theCommand, theWorkingPlane)
2699             RaiseIfFailed("MakeSketcherOnPlane", self.CurvesOp)
2700             anObj.SetParameters(Parameters)
2701             self._autoPublish(anObj, theName, "wire")
2702             return anObj
2703
2704         ## Obtain a 2D sketcher interface
2705         #  @return An instance of @ref gsketcher.Sketcher2D "Sketcher2D" interface
2706         def Sketcher2D (self):
2707             """
2708             Obtain a 2D sketcher interface.
2709
2710             Example of usage:
2711                sk = geompy.Sketcher2D()
2712                sk.addPoint(20, 20)
2713                sk.addSegmentRelative(15, 70)
2714                sk.addSegmentPerpY(50)
2715                sk.addArcRadiusRelative(25, 15, 14.5, 0)
2716                sk.addArcCenterAbsolute(1, 1, 50, 50, 0, 0)
2717                sk.addArcDirectionRadiusLength(20, 20, 101, 162.13)
2718                sk.close()
2719                Sketch_1 = sk.wire(geomObj_1)
2720             """
2721             sk = Sketcher2D (self)
2722             return sk
2723
2724         ## Create a sketcher wire, following the numerical description,
2725         #  passed through <VAR>theCoordinates</VAR> argument. \n
2726         #  @param theCoordinates double values, defining points to create a wire,
2727         #                                                      passing from it.
2728         #  @param theName Object name; when specified, this parameter is used
2729         #         for result publication in the study. Otherwise, if automatic
2730         #         publication is switched on, default value is used for result name.
2731         #
2732         #  @return New GEOM.GEOM_Object, containing the created wire.
2733         #
2734         #  @ref tui_3dsketcher_page "Example"
2735         @ManageTransactions("CurvesOp")
2736         def Make3DSketcher(self, theCoordinates, theName=None):
2737             """
2738             Create a sketcher wire, following the numerical description,
2739             passed through theCoordinates argument.
2740
2741             Parameters:
2742                 theCoordinates double values, defining points to create a wire,
2743                                passing from it.
2744                 theName Object name; when specified, this parameter is used
2745                         for result publication in the study. Otherwise, if automatic
2746                         publication is switched on, default value is used for result name.
2747
2748             Returns:
2749                 New GEOM_Object, containing the created wire.
2750             """
2751             theCoordinates,Parameters = ParseParameters(theCoordinates)
2752             anObj = self.CurvesOp.Make3DSketcher(theCoordinates)
2753             RaiseIfFailed("Make3DSketcher", self.CurvesOp)
2754             anObj.SetParameters(Parameters)
2755             self._autoPublish(anObj, theName, "wire")
2756             return anObj
2757
2758         ## Obtain a 3D sketcher interface
2759         #  @return An instance of @ref gsketcher.Sketcher3D "Sketcher3D" interface
2760         #
2761         #  @ref tui_3dsketcher_page "Example"
2762         def Sketcher3D (self):
2763             """
2764             Obtain a 3D sketcher interface.
2765
2766             Example of usage:
2767                 sk = geompy.Sketcher3D()
2768                 sk.addPointsAbsolute(0,0,0, 70,0,0)
2769                 sk.addPointsRelative(0, 0, 130)
2770                 sk.addPointAnglesLength("OXY", 50, 0, 100)
2771                 sk.addPointAnglesLength("OXZ", 30, 80, 130)
2772                 sk.close()
2773                 a3D_Sketcher_1 = sk.wire()
2774             """
2775             sk = Sketcher3D (self)
2776             return sk
2777
2778         ## Obtain a 2D polyline creation interface
2779         #  @return An instance of @ref gsketcher.Polyline2D "Polyline2D" interface
2780         #
2781         #  @ref tui_3dsketcher_page "Example"
2782         def Polyline2D (self):
2783             """
2784             Obtain a 2D polyline creation interface.
2785
2786             Example of usage:
2787                 pl = geompy.Polyline2D()
2788                 pl.addSection("section 1", GEOM.Polyline, True)
2789                 pl.addPoints(0, 0, 10, 0, 10, 10)
2790                 pl.addSection("section 2", GEOM.Interpolation, False)
2791                 pl.addPoints(20, 0, 30, 0, 30, 10)
2792                 resultObj = pl.result(WorkingPlane)
2793             """
2794             pl = Polyline2D (self)
2795             return pl
2796
2797         # end of l3_sketcher
2798         ## @}
2799
2800         ## @addtogroup l3_3d_primitives
2801         ## @{
2802
2803         ## Create a box by coordinates of two opposite vertices.
2804         #
2805         #  @param x1,y1,z1 double values, defining first point it.
2806         #  @param x2,y2,z2 double values, defining first point it.
2807         #  @param theName Object name; when specified, this parameter is used
2808         #         for result publication in the study. Otherwise, if automatic
2809         #         publication is switched on, default value is used for result name.
2810         #
2811         #  @return New GEOM.GEOM_Object, containing the created box.
2812         #
2813         #  @ref tui_creation_box "Example"
2814         def MakeBox(self, x1, y1, z1, x2, y2, z2, theName=None):
2815             """
2816             Create a box by coordinates of two opposite vertices.
2817
2818             Parameters:
2819                 x1,y1,z1 double values, defining first point.
2820                 x2,y2,z2 double values, defining second point.
2821                 theName Object name; when specified, this parameter is used
2822                         for result publication in the study. Otherwise, if automatic
2823                         publication is switched on, default value is used for result name.
2824
2825             Returns:
2826                 New GEOM.GEOM_Object, containing the created box.
2827             """
2828             # Example: see GEOM_TestAll.py
2829             pnt1 = self.MakeVertex(x1,y1,z1)
2830             pnt2 = self.MakeVertex(x2,y2,z2)
2831             # note: auto-publishing is done in self.MakeBoxTwoPnt()
2832             return self.MakeBoxTwoPnt(pnt1, pnt2, theName)
2833
2834         ## Create a box with specified dimensions along the coordinate axes
2835         #  and with edges, parallel to the coordinate axes.
2836         #  Center of the box will be at point (DX/2, DY/2, DZ/2).
2837         #  @param theDX Length of Box edges, parallel to OX axis.
2838         #  @param theDY Length of Box edges, parallel to OY axis.
2839         #  @param theDZ Length of Box edges, parallel to OZ axis.
2840         #  @param theName Object name; when specified, this parameter is used
2841         #         for result publication in the study. Otherwise, if automatic
2842         #         publication is switched on, default value is used for result name.
2843         #
2844         #  @return New GEOM.GEOM_Object, containing the created box.
2845         #
2846         #  @ref tui_creation_box "Example"
2847         @ManageTransactions("PrimOp")
2848         def MakeBoxDXDYDZ(self, theDX, theDY, theDZ, theName=None):
2849             """
2850             Create a box with specified dimensions along the coordinate axes
2851             and with edges, parallel to the coordinate axes.
2852             Center of the box will be at point (DX/2, DY/2, DZ/2).
2853
2854             Parameters:
2855                 theDX Length of Box edges, parallel to OX axis.
2856                 theDY Length of Box edges, parallel to OY axis.
2857                 theDZ Length of Box edges, parallel to OZ axis.
2858                 theName Object name; when specified, this parameter is used
2859                         for result publication in the study. Otherwise, if automatic
2860                         publication is switched on, default value is used for result name.
2861
2862             Returns:
2863                 New GEOM.GEOM_Object, containing the created box.
2864             """
2865             # Example: see GEOM_TestAll.py
2866             theDX,theDY,theDZ,Parameters = ParseParameters(theDX, theDY, theDZ)
2867             anObj = self.PrimOp.MakeBoxDXDYDZ(theDX, theDY, theDZ)
2868             RaiseIfFailed("MakeBoxDXDYDZ", self.PrimOp)
2869             anObj.SetParameters(Parameters)
2870             self._autoPublish(anObj, theName, "box")
2871             return anObj
2872
2873         ## Create a box with two specified opposite vertices,
2874         #  and with edges, parallel to the coordinate axes
2875         #  @param thePnt1 First of two opposite vertices.
2876         #  @param thePnt2 Second of two opposite vertices.
2877         #  @param theName Object name; when specified, this parameter is used
2878         #         for result publication in the study. Otherwise, if automatic
2879         #         publication is switched on, default value is used for result name.
2880         #
2881         #  @return New GEOM.GEOM_Object, containing the created box.
2882         #
2883         #  @ref tui_creation_box "Example"
2884         @ManageTransactions("PrimOp")
2885         def MakeBoxTwoPnt(self, thePnt1, thePnt2, theName=None):
2886             """
2887             Create a box with two specified opposite vertices,
2888             and with edges, parallel to the coordinate axes
2889
2890             Parameters:
2891                 thePnt1 First of two opposite vertices.
2892                 thePnt2 Second of two opposite vertices.
2893                 theName Object name; when specified, this parameter is used
2894                         for result publication in the study. Otherwise, if automatic
2895                         publication is switched on, default value is used for result name.
2896
2897             Returns:
2898                 New GEOM.GEOM_Object, containing the created box.
2899             """
2900             # Example: see GEOM_TestAll.py
2901             anObj = self.PrimOp.MakeBoxTwoPnt(thePnt1, thePnt2)
2902             RaiseIfFailed("MakeBoxTwoPnt", self.PrimOp)
2903             self._autoPublish(anObj, theName, "box")
2904             return anObj
2905
2906         ## Create a face with specified dimensions with edges parallel to coordinate axes.
2907         #  @param theH height of Face.
2908         #  @param theW width of Face.
2909         #  @param theOrientation face orientation: 1-OXY, 2-OYZ, 3-OZX
2910         #  @param theName Object name; when specified, this parameter is used
2911         #         for result publication in the study. Otherwise, if automatic
2912         #         publication is switched on, default value is used for result name.
2913         #
2914         #  @return New GEOM.GEOM_Object, containing the created face.
2915         #
2916         #  @ref tui_creation_face "Example"
2917         @ManageTransactions("PrimOp")
2918         def MakeFaceHW(self, theH, theW, theOrientation, theName=None):
2919             """
2920             Create a face with specified dimensions with edges parallel to coordinate axes.
2921
2922             Parameters:
2923                 theH height of Face.
2924                 theW width of Face.
2925                 theOrientation face orientation: 1-OXY, 2-OYZ, 3-OZX
2926                 theName Object name; when specified, this parameter is used
2927                         for result publication in the study. Otherwise, if automatic
2928                         publication is switched on, default value is used for result name.
2929
2930             Returns:
2931                 New GEOM.GEOM_Object, containing the created face.
2932             """
2933             # Example: see GEOM_TestAll.py
2934             theH,theW,Parameters = ParseParameters(theH, theW)
2935             anObj = self.PrimOp.MakeFaceHW(theH, theW, theOrientation)
2936             RaiseIfFailed("MakeFaceHW", self.PrimOp)
2937             anObj.SetParameters(Parameters)
2938             self._autoPublish(anObj, theName, "rectangle")
2939             return anObj
2940
2941         ## Create a face from another plane and two sizes,
2942         #  vertical size and horisontal size.
2943         #  @param theObj   Normale vector to the creating face or
2944         #  the face object.
2945         #  @param theH     Height (vertical size).
2946         #  @param theW     Width (horisontal size).
2947         #  @param theName Object name; when specified, this parameter is used
2948         #         for result publication in the study. Otherwise, if automatic
2949         #         publication is switched on, default value is used for result name.
2950         #
2951         #  @return New GEOM.GEOM_Object, containing the created face.
2952         #
2953         #  @ref tui_creation_face "Example"
2954         @ManageTransactions("PrimOp")
2955         def MakeFaceObjHW(self, theObj, theH, theW, theName=None):
2956             """
2957             Create a face from another plane and two sizes,
2958             vertical size and horisontal size.
2959
2960             Parameters:
2961                 theObj   Normale vector to the creating face or
2962                          the face object.
2963                 theH     Height (vertical size).
2964                 theW     Width (horisontal size).
2965                 theName Object name; when specified, this parameter is used
2966                         for result publication in the study. Otherwise, if automatic
2967                         publication is switched on, default value is used for result name.
2968
2969             Returns:
2970                 New GEOM_Object, containing the created face.
2971             """
2972             # Example: see GEOM_TestAll.py
2973             theH,theW,Parameters = ParseParameters(theH, theW)
2974             anObj = self.PrimOp.MakeFaceObjHW(theObj, theH, theW)
2975             RaiseIfFailed("MakeFaceObjHW", self.PrimOp)
2976             anObj.SetParameters(Parameters)
2977             self._autoPublish(anObj, theName, "rectangle")
2978             return anObj
2979
2980         ## Create a disk with given center, normal vector and radius.
2981         #  @param thePnt Disk center.
2982         #  @param theVec Vector, normal to the plane of the disk.
2983         #  @param theR Disk radius.
2984         #  @param theName Object name; when specified, this parameter is used
2985         #         for result publication in the study. Otherwise, if automatic
2986         #         publication is switched on, default value is used for result name.
2987         #
2988         #  @return New GEOM.GEOM_Object, containing the created disk.
2989         #
2990         #  @ref tui_creation_disk "Example"
2991         @ManageTransactions("PrimOp")
2992         def MakeDiskPntVecR(self, thePnt, theVec, theR, theName=None):
2993             """
2994             Create a disk with given center, normal vector and radius.
2995
2996             Parameters:
2997                 thePnt Disk center.
2998                 theVec Vector, normal to the plane of the disk.
2999                 theR Disk radius.
3000                 theName Object name; when specified, this parameter is used
3001                         for result publication in the study. Otherwise, if automatic
3002                         publication is switched on, default value is used for result name.
3003
3004             Returns:
3005                 New GEOM.GEOM_Object, containing the created disk.
3006             """
3007             # Example: see GEOM_TestAll.py
3008             theR,Parameters = ParseParameters(theR)
3009             anObj = self.PrimOp.MakeDiskPntVecR(thePnt, theVec, theR)
3010             RaiseIfFailed("MakeDiskPntVecR", self.PrimOp)
3011             anObj.SetParameters(Parameters)
3012             self._autoPublish(anObj, theName, "disk")
3013             return anObj
3014
3015         ## Create a disk, passing through three given points
3016         #  @param thePnt1,thePnt2,thePnt3 Points, defining the disk.
3017         #  @param theName Object name; when specified, this parameter is used
3018         #         for result publication in the study. Otherwise, if automatic
3019         #         publication is switched on, default value is used for result name.
3020         #
3021         #  @return New GEOM.GEOM_Object, containing the created disk.
3022         #
3023         #  @ref tui_creation_disk "Example"
3024         @ManageTransactions("PrimOp")
3025         def MakeDiskThreePnt(self, thePnt1, thePnt2, thePnt3, theName=None):
3026             """
3027             Create a disk, passing through three given points
3028
3029             Parameters:
3030                 thePnt1,thePnt2,thePnt3 Points, defining the disk.
3031                 theName Object name; when specified, this parameter is used
3032                         for result publication in the study. Otherwise, if automatic
3033                         publication is switched on, default value is used for result name.
3034
3035             Returns:
3036                 New GEOM.GEOM_Object, containing the created disk.
3037             """
3038             # Example: see GEOM_TestAll.py
3039             anObj = self.PrimOp.MakeDiskThreePnt(thePnt1, thePnt2, thePnt3)
3040             RaiseIfFailed("MakeDiskThreePnt", self.PrimOp)
3041             self._autoPublish(anObj, theName, "disk")
3042             return anObj
3043
3044         ## Create a disk with specified dimensions along OX-OY coordinate axes.
3045         #  @param theR Radius of Face.
3046         #  @param theOrientation set the orientation belong axis OXY or OYZ or OZX
3047         #  @param theName Object name; when specified, this parameter is used
3048         #         for result publication in the study. Otherwise, if automatic
3049         #         publication is switched on, default value is used for result name.
3050         #
3051         #  @return New GEOM.GEOM_Object, containing the created disk.
3052         #
3053         #  @ref tui_creation_face "Example"
3054         @ManageTransactions("PrimOp")
3055         def MakeDiskR(self, theR, theOrientation, theName=None):
3056             """
3057             Create a disk with specified dimensions along OX-OY coordinate axes.
3058
3059             Parameters:
3060                 theR Radius of Face.
3061                 theOrientation set the orientation belong axis OXY or OYZ or OZX
3062                 theName Object name; when specified, this parameter is used
3063                         for result publication in the study. Otherwise, if automatic
3064                         publication is switched on, default value is used for result name.
3065
3066             Returns:
3067                 New GEOM.GEOM_Object, containing the created disk.
3068
3069             Example of usage:
3070                 Disk3 = geompy.MakeDiskR(100., 1)
3071             """
3072             # Example: see GEOM_TestAll.py
3073             theR,Parameters = ParseParameters(theR)
3074             anObj = self.PrimOp.MakeDiskR(theR, theOrientation)
3075             RaiseIfFailed("MakeDiskR", self.PrimOp)
3076             anObj.SetParameters(Parameters)
3077             self._autoPublish(anObj, theName, "disk")
3078             return anObj
3079
3080         ## Create a cylinder with given base point, axis, radius and height.
3081         #  @param thePnt Central point of cylinder base.
3082         #  @param theAxis Cylinder axis.
3083         #  @param theR Cylinder radius.
3084         #  @param theH Cylinder height.
3085         #  @param theName Object name; when specified, this parameter is used
3086         #         for result publication in the study. Otherwise, if automatic
3087         #         publication is switched on, default value is used for result name.
3088         #
3089         #  @return New GEOM.GEOM_Object, containing the created cylinder.
3090         #
3091         #  @ref tui_creation_cylinder "Example"
3092         @ManageTransactions("PrimOp")
3093         def MakeCylinder(self, thePnt, theAxis, theR, theH, theName=None):
3094             """
3095             Create a cylinder with given base point, axis, radius and height.
3096
3097             Parameters:
3098                 thePnt Central point of cylinder base.
3099                 theAxis Cylinder axis.
3100                 theR Cylinder radius.
3101                 theH Cylinder height.
3102                 theName Object name; when specified, this parameter is used
3103                         for result publication in the study. Otherwise, if automatic
3104                         publication is switched on, default value is used for result name.
3105
3106             Returns:
3107                 New GEOM.GEOM_Object, containing the created cylinder.
3108             """
3109             # Example: see GEOM_TestAll.py
3110             theR,theH,Parameters = ParseParameters(theR, theH)
3111             anObj = self.PrimOp.MakeCylinderPntVecRH(thePnt, theAxis, theR, theH)
3112             RaiseIfFailed("MakeCylinderPntVecRH", self.PrimOp)
3113             anObj.SetParameters(Parameters)
3114             self._autoPublish(anObj, theName, "cylinder")
3115             return anObj
3116             
3117         ## Create a portion of cylinder with given base point, axis, radius, height and angle.
3118         #  @param thePnt Central point of cylinder base.
3119         #  @param theAxis Cylinder axis.
3120         #  @param theR Cylinder radius.
3121         #  @param theH Cylinder height.
3122         #  @param theA Cylinder angle in radians.
3123         #  @param theName Object name; when specified, this parameter is used
3124         #         for result publication in the study. Otherwise, if automatic
3125         #         publication is switched on, default value is used for result name.
3126         #
3127         #  @return New GEOM.GEOM_Object, containing the created cylinder.
3128         #
3129         #  @ref tui_creation_cylinder "Example"
3130         @ManageTransactions("PrimOp")
3131         def MakeCylinderA(self, thePnt, theAxis, theR, theH, theA, theName=None):
3132             """
3133             Create a portion of cylinder with given base point, axis, radius, height and angle.
3134
3135             Parameters:
3136                 thePnt Central point of cylinder base.
3137                 theAxis Cylinder axis.
3138                 theR Cylinder radius.
3139                 theH Cylinder height.
3140                 theA Cylinder angle in radians.
3141                 theName Object name; when specified, this parameter is used
3142                         for result publication in the study. Otherwise, if automatic
3143                         publication is switched on, default value is used for result name.
3144
3145             Returns:
3146                 New GEOM.GEOM_Object, containing the created cylinder.
3147             """
3148             # Example: see GEOM_TestAll.py
3149             flag = False
3150             if isinstance(theA,str):
3151                 flag = True
3152             theR,theH,theA,Parameters = ParseParameters(theR, theH, theA)
3153             if flag:
3154                 theA = theA*math.pi/180.
3155             if theA<=0. or theA>=2*math.pi:
3156                 raise ValueError("The angle parameter should be strictly between 0 and 2*pi.")
3157             anObj = self.PrimOp.MakeCylinderPntVecRHA(thePnt, theAxis, theR, theH, theA)
3158             RaiseIfFailed("MakeCylinderPntVecRHA", self.PrimOp)
3159             anObj.SetParameters(Parameters)
3160             self._autoPublish(anObj, theName, "cylinder")
3161             return anObj
3162
3163         ## Create a cylinder with given radius and height at
3164         #  the origin of coordinate system. Axis of the cylinder
3165         #  will be collinear to the OZ axis of the coordinate system.
3166         #  @param theR Cylinder radius.
3167         #  @param theH Cylinder height.
3168         #  @param theName Object name; when specified, this parameter is used
3169         #         for result publication in the study. Otherwise, if automatic
3170         #         publication is switched on, default value is used for result name.
3171         #
3172         #  @return New GEOM.GEOM_Object, containing the created cylinder.
3173         #
3174         #  @ref tui_creation_cylinder "Example"
3175         @ManageTransactions("PrimOp")
3176         def MakeCylinderRH(self, theR, theH, theName=None):
3177             """
3178             Create a cylinder with given radius and height at
3179             the origin of coordinate system. Axis of the cylinder
3180             will be collinear to the OZ axis of the coordinate system.
3181
3182             Parameters:
3183                 theR Cylinder radius.
3184                 theH Cylinder height.
3185                 theName Object name; when specified, this parameter is used
3186                         for result publication in the study. Otherwise, if automatic
3187                         publication is switched on, default value is used for result name.
3188
3189             Returns:
3190                 New GEOM.GEOM_Object, containing the created cylinder.
3191             """
3192             # Example: see GEOM_TestAll.py
3193             theR,theH,Parameters = ParseParameters(theR, theH)
3194             anObj = self.PrimOp.MakeCylinderRH(theR, theH)
3195             RaiseIfFailed("MakeCylinderRH", self.PrimOp)
3196             anObj.SetParameters(Parameters)
3197             self._autoPublish(anObj, theName, "cylinder")
3198             return anObj
3199             
3200         ## Create a portion of cylinder with given radius, height and angle at
3201         #  the origin of coordinate system. Axis of the cylinder
3202         #  will be collinear to the OZ axis of the coordinate system.
3203         #  @param theR Cylinder radius.
3204         #  @param theH Cylinder height.
3205         #  @param theA Cylinder angle in radians.
3206         #  @param theName Object name; when specified, this parameter is used
3207         #         for result publication in the study. Otherwise, if automatic
3208         #         publication is switched on, default value is used for result name.
3209         #
3210         #  @return New GEOM.GEOM_Object, containing the created cylinder.
3211         #
3212         #  @ref tui_creation_cylinder "Example"
3213         @ManageTransactions("PrimOp")
3214         def MakeCylinderRHA(self, theR, theH, theA, theName=None):
3215             """
3216             Create a portion of cylinder with given radius, height and angle at
3217             the origin of coordinate system. Axis of the cylinder
3218             will be collinear to the OZ axis of the coordinate system.
3219
3220             Parameters:
3221                 theR Cylinder radius.
3222                 theH Cylinder height.
3223                 theA Cylinder angle in radians.
3224                 theName Object name; when specified, this parameter is used
3225                         for result publication in the study. Otherwise, if automatic
3226                         publication is switched on, default value is used for result name.
3227
3228             Returns:
3229                 New GEOM.GEOM_Object, containing the created cylinder.
3230             """
3231             # Example: see GEOM_TestAll.py
3232             flag = False
3233             if isinstance(theA,str):
3234                 flag = True
3235             theR,theH,theA,Parameters = ParseParameters(theR, theH, theA)
3236             if flag:
3237                 theA = theA*math.pi/180.
3238             if theA<=0. or theA>=2*math.pi:
3239                 raise ValueError("The angle parameter should be strictly between 0 and 2*pi.")
3240             anObj = self.PrimOp.MakeCylinderRHA(theR, theH, theA)
3241             RaiseIfFailed("MakeCylinderRHA", self.PrimOp)
3242             anObj.SetParameters(Parameters)
3243             self._autoPublish(anObj, theName, "cylinder")
3244             return anObj
3245
3246         ## Create a sphere with given center and radius.
3247         #  @param thePnt Sphere center.
3248         #  @param theR Sphere radius.
3249         #  @param theName Object name; when specified, this parameter is used
3250         #         for result publication in the study. Otherwise, if automatic
3251         #         publication is switched on, default value is used for result name.
3252         #
3253         #  @return New GEOM.GEOM_Object, containing the created sphere.
3254         #
3255         #  @ref tui_creation_sphere "Example"
3256         @ManageTransactions("PrimOp")
3257         def MakeSpherePntR(self, thePnt, theR, theName=None):
3258             """
3259             Create a sphere with given center and radius.
3260
3261             Parameters:
3262                 thePnt Sphere center.
3263                 theR Sphere radius.
3264                 theName Object name; when specified, this parameter is used
3265                         for result publication in the study. Otherwise, if automatic
3266                         publication is switched on, default value is used for result name.
3267
3268             Returns:
3269                 New GEOM.GEOM_Object, containing the created sphere.
3270             """
3271             # Example: see GEOM_TestAll.py
3272             theR,Parameters = ParseParameters(theR)
3273             anObj = self.PrimOp.MakeSpherePntR(thePnt, theR)
3274             RaiseIfFailed("MakeSpherePntR", self.PrimOp)
3275             anObj.SetParameters(Parameters)
3276             self._autoPublish(anObj, theName, "sphere")
3277             return anObj
3278
3279         ## Create a sphere with given center and radius.
3280         #  @param x,y,z Coordinates of sphere center.
3281         #  @param theR Sphere radius.
3282         #  @param theName Object name; when specified, this parameter is used
3283         #         for result publication in the study. Otherwise, if automatic
3284         #         publication is switched on, default value is used for result name.
3285         #
3286         #  @return New GEOM.GEOM_Object, containing the created sphere.
3287         #
3288         #  @ref tui_creation_sphere "Example"
3289         def MakeSphere(self, x, y, z, theR, theName=None):
3290             """
3291             Create a sphere with given center and radius.
3292
3293             Parameters:
3294                 x,y,z Coordinates of sphere center.
3295                 theR Sphere radius.
3296                 theName Object name; when specified, this parameter is used
3297                         for result publication in the study. Otherwise, if automatic
3298                         publication is switched on, default value is used for result name.
3299
3300             Returns:
3301                 New GEOM.GEOM_Object, containing the created sphere.
3302             """
3303             # Example: see GEOM_TestAll.py
3304             point = self.MakeVertex(x, y, z)
3305             # note: auto-publishing is done in self.MakeSpherePntR()
3306             anObj = self.MakeSpherePntR(point, theR, theName)
3307             return anObj
3308
3309         ## Create a sphere with given radius at the origin of coordinate system.
3310         #  @param theR Sphere radius.
3311         #  @param theName Object name; when specified, this parameter is used
3312         #         for result publication in the study. Otherwise, if automatic
3313         #         publication is switched on, default value is used for result name.
3314         #
3315         #  @return New GEOM.GEOM_Object, containing the created sphere.
3316         #
3317         #  @ref tui_creation_sphere "Example"
3318         @ManageTransactions("PrimOp")
3319         def MakeSphereR(self, theR, theName=None):
3320             """
3321             Create a sphere with given radius at the origin of coordinate system.
3322
3323             Parameters:
3324                 theR Sphere radius.
3325                 theName Object name; when specified, this parameter is used
3326                         for result publication in the study. Otherwise, if automatic
3327                         publication is switched on, default value is used for result name.
3328
3329             Returns:
3330                 New GEOM.GEOM_Object, containing the created sphere.
3331             """
3332             # Example: see GEOM_TestAll.py
3333             theR,Parameters = ParseParameters(theR)
3334             anObj = self.PrimOp.MakeSphereR(theR)
3335             RaiseIfFailed("MakeSphereR", self.PrimOp)
3336             anObj.SetParameters(Parameters)
3337             self._autoPublish(anObj, theName, "sphere")
3338             return anObj
3339
3340         ## Create a cone with given base point, axis, height and radiuses.
3341         #  @param thePnt Central point of the first cone base.
3342         #  @param theAxis Cone axis.
3343         #  @param theR1 Radius of the first cone base.
3344         #  @param theR2 Radius of the second cone base.
3345         #    \note If both radiuses are non-zero, the cone will be truncated.
3346         #    \note If the radiuses are equal, a cylinder will be created instead.
3347         #  @param theH Cone height.
3348         #  @param theName Object name; when specified, this parameter is used
3349         #         for result publication in the study. Otherwise, if automatic
3350         #         publication is switched on, default value is used for result name.
3351         #
3352         #  @return New GEOM.GEOM_Object, containing the created cone.
3353         #
3354         #  @ref tui_creation_cone "Example"
3355         @ManageTransactions("PrimOp")
3356         def MakeCone(self, thePnt, theAxis, theR1, theR2, theH, theName=None):
3357             """
3358             Create a cone with given base point, axis, height and radiuses.
3359
3360             Parameters:
3361                 thePnt Central point of the first cone base.
3362                 theAxis Cone axis.
3363                 theR1 Radius of the first cone base.
3364                 theR2 Radius of the second cone base.
3365                 theH Cone height.
3366                 theName Object name; when specified, this parameter is used
3367                         for result publication in the study. Otherwise, if automatic
3368                         publication is switched on, default value is used for result name.
3369
3370             Note:
3371                 If both radiuses are non-zero, the cone will be truncated.
3372                 If the radiuses are equal, a cylinder will be created instead.
3373
3374             Returns:
3375                 New GEOM.GEOM_Object, containing the created cone.
3376             """
3377             # Example: see GEOM_TestAll.py
3378             theR1,theR2,theH,Parameters = ParseParameters(theR1,theR2,theH)
3379             anObj = self.PrimOp.MakeConePntVecR1R2H(thePnt, theAxis, theR1, theR2, theH)
3380             RaiseIfFailed("MakeConePntVecR1R2H", self.PrimOp)
3381             anObj.SetParameters(Parameters)
3382             self._autoPublish(anObj, theName, "cone")
3383             return anObj
3384
3385         ## Create a cone with given height and radiuses at
3386         #  the origin of coordinate system. Axis of the cone will
3387         #  be collinear to the OZ axis of the coordinate system.
3388         #  @param theR1 Radius of the first cone base.
3389         #  @param theR2 Radius of the second cone base.
3390         #    \note If both radiuses are non-zero, the cone will be truncated.
3391         #    \note If the radiuses are equal, a cylinder will be created instead.
3392         #  @param theH Cone height.
3393         #  @param theName Object name; when specified, this parameter is used
3394         #         for result publication in the study. Otherwise, if automatic
3395         #         publication is switched on, default value is used for result name.
3396         #
3397         #  @return New GEOM.GEOM_Object, containing the created cone.
3398         #
3399         #  @ref tui_creation_cone "Example"
3400         @ManageTransactions("PrimOp")
3401         def MakeConeR1R2H(self, theR1, theR2, theH, theName=None):
3402             """
3403             Create a cone with given height and radiuses at
3404             the origin of coordinate system. Axis of the cone will
3405             be collinear to the OZ axis of the coordinate system.
3406
3407             Parameters:
3408                 theR1 Radius of the first cone base.
3409                 theR2 Radius of the second cone base.
3410                 theH Cone height.
3411                 theName Object name; when specified, this parameter is used
3412                         for result publication in the study. Otherwise, if automatic
3413                         publication is switched on, default value is used for result name.
3414
3415             Note:
3416                 If both radiuses are non-zero, the cone will be truncated.
3417                 If the radiuses are equal, a cylinder will be created instead.
3418
3419             Returns:
3420                 New GEOM.GEOM_Object, containing the created cone.
3421             """
3422             # Example: see GEOM_TestAll.py
3423             theR1,theR2,theH,Parameters = ParseParameters(theR1,theR2,theH)
3424             anObj = self.PrimOp.MakeConeR1R2H(theR1, theR2, theH)
3425             RaiseIfFailed("MakeConeR1R2H", self.PrimOp)
3426             anObj.SetParameters(Parameters)
3427             self._autoPublish(anObj, theName, "cone")
3428             return anObj
3429
3430         ## Create a torus with given center, normal vector and radiuses.
3431         #  @param thePnt Torus central point.
3432         #  @param theVec Torus axis of symmetry.
3433         #  @param theRMajor Torus major radius.
3434         #  @param theRMinor Torus minor radius.
3435         #  @param theName Object name; when specified, this parameter is used
3436         #         for result publication in the study. Otherwise, if automatic
3437         #         publication is switched on, default value is used for result name.
3438         #
3439         #  @return New GEOM.GEOM_Object, containing the created torus.
3440         #
3441         #  @ref tui_creation_torus "Example"
3442         @ManageTransactions("PrimOp")
3443         def MakeTorus(self, thePnt, theVec, theRMajor, theRMinor, theName=None):
3444             """
3445             Create a torus with given center, normal vector and radiuses.
3446
3447             Parameters:
3448                 thePnt Torus central point.
3449                 theVec Torus axis of symmetry.
3450                 theRMajor Torus major radius.
3451                 theRMinor Torus minor radius.
3452                 theName Object name; when specified, this parameter is used
3453                         for result publication in the study. Otherwise, if automatic
3454                         publication is switched on, default value is used for result name.
3455
3456            Returns:
3457                 New GEOM.GEOM_Object, containing the created torus.
3458             """
3459             # Example: see GEOM_TestAll.py
3460             theRMajor,theRMinor,Parameters = ParseParameters(theRMajor,theRMinor)
3461             anObj = self.PrimOp.MakeTorusPntVecRR(thePnt, theVec, theRMajor, theRMinor)
3462             RaiseIfFailed("MakeTorusPntVecRR", self.PrimOp)
3463             anObj.SetParameters(Parameters)
3464             self._autoPublish(anObj, theName, "torus")
3465             return anObj
3466
3467         ## Create a torus with given radiuses at the origin of coordinate system.
3468         #  @param theRMajor Torus major radius.
3469         #  @param theRMinor Torus minor radius.
3470         #  @param theName Object name; when specified, this parameter is used
3471         #         for result publication in the study. Otherwise, if automatic
3472         #         publication is switched on, default value is used for result name.
3473         #
3474         #  @return New GEOM.GEOM_Object, containing the created torus.
3475         #
3476         #  @ref tui_creation_torus "Example"
3477         @ManageTransactions("PrimOp")
3478         def MakeTorusRR(self, theRMajor, theRMinor, theName=None):
3479             """
3480            Create a torus with given radiuses at the origin of coordinate system.
3481
3482            Parameters:
3483                 theRMajor Torus major radius.
3484                 theRMinor Torus minor radius.
3485                 theName Object name; when specified, this parameter is used
3486                         for result publication in the study. Otherwise, if automatic
3487                         publication is switched on, default value is used for result name.
3488
3489            Returns:
3490                 New GEOM.GEOM_Object, containing the created torus.
3491             """
3492             # Example: see GEOM_TestAll.py
3493             theRMajor,theRMinor,Parameters = ParseParameters(theRMajor,theRMinor)
3494             anObj = self.PrimOp.MakeTorusRR(theRMajor, theRMinor)
3495             RaiseIfFailed("MakeTorusRR", self.PrimOp)
3496             anObj.SetParameters(Parameters)
3497             self._autoPublish(anObj, theName, "torus")
3498             return anObj
3499
3500         # end of l3_3d_primitives
3501         ## @}
3502
3503         ## @addtogroup l3_complex
3504         ## @{
3505
3506         ## Create a shape by extrusion of the base shape along a vector, defined by two points.
3507         #  @param theBase Base shape to be extruded.
3508         #  @param thePoint1 First end of extrusion vector.
3509         #  @param thePoint2 Second end of extrusion vector.
3510         #  @param theScaleFactor Use it to make prism with scaled second base.
3511         #                        Nagative value means not scaled second base.
3512         #  @param theName Object name; when specified, this parameter is used
3513         #         for result publication in the study. Otherwise, if automatic
3514         #         publication is switched on, default value is used for result name.
3515         #
3516         #  @return New GEOM.GEOM_Object, containing the created prism.
3517         #
3518         #  @ref tui_creation_prism "Example"
3519         @ManageTransactions("PrimOp")
3520         def MakePrism(self, theBase, thePoint1, thePoint2, theScaleFactor = -1.0, theName=None):
3521             """
3522             Create a shape by extrusion of the base shape along a vector, defined by two points.
3523
3524             Parameters:
3525                 theBase Base shape to be extruded.
3526                 thePoint1 First end of extrusion vector.
3527                 thePoint2 Second end of extrusion vector.
3528                 theScaleFactor Use it to make prism with scaled second base.
3529                                Nagative value means not scaled second base.
3530                 theName Object name; when specified, this parameter is used
3531                         for result publication in the study. Otherwise, if automatic
3532                         publication is switched on, default value is used for result name.
3533
3534             Returns:
3535                 New GEOM.GEOM_Object, containing the created prism.
3536             """
3537             # Example: see GEOM_TestAll.py
3538             anObj = None
3539             Parameters = ""
3540             if theScaleFactor > 0:
3541                 theScaleFactor,Parameters = ParseParameters(theScaleFactor)
3542                 anObj = self.PrimOp.MakePrismTwoPntWithScaling(theBase, thePoint1, thePoint2, theScaleFactor)
3543             else:
3544                 anObj = self.PrimOp.MakePrismTwoPnt(theBase, thePoint1, thePoint2)
3545             RaiseIfFailed("MakePrismTwoPnt", self.PrimOp)
3546             anObj.SetParameters(Parameters)
3547             self._autoPublish(anObj, theName, "prism")
3548             return anObj
3549
3550         ## Create a shape by extrusion of the base shape along a
3551         #  vector, defined by two points, in 2 Ways (forward/backward).
3552         #  @param theBase Base shape to be extruded.
3553         #  @param thePoint1 First end of extrusion vector.
3554         #  @param thePoint2 Second end of extrusion vector.
3555         #  @param theName Object name; when specified, this parameter is used
3556         #         for result publication in the study. Otherwise, if automatic
3557         #         publication is switched on, default value is used for result name.
3558         #
3559         #  @return New GEOM.GEOM_Object, containing the created prism.
3560         #
3561         #  @ref tui_creation_prism "Example"
3562         @ManageTransactions("PrimOp")
3563         def MakePrism2Ways(self, theBase, thePoint1, thePoint2, theName=None):
3564             """
3565             Create a shape by extrusion of the base shape along a
3566             vector, defined by two points, in 2 Ways (forward/backward).
3567
3568             Parameters:
3569                 theBase Base shape to be extruded.
3570                 thePoint1 First end of extrusion vector.
3571                 thePoint2 Second end of extrusion vector.
3572                 theName Object name; when specified, this parameter is used
3573                         for result publication in the study. Otherwise, if automatic
3574                         publication is switched on, default value is used for result name.
3575
3576             Returns:
3577                 New GEOM.GEOM_Object, containing the created prism.
3578             """
3579             # Example: see GEOM_TestAll.py
3580             anObj = self.PrimOp.MakePrismTwoPnt2Ways(theBase, thePoint1, thePoint2)
3581             RaiseIfFailed("MakePrismTwoPnt", self.PrimOp)
3582             self._autoPublish(anObj, theName, "prism")
3583             return anObj
3584
3585         ## Create a shape by extrusion of the base shape along the vector,
3586         #  i.e. all the space, transfixed by the base shape during its translation
3587         #  along the vector on the given distance.
3588         #  @param theBase Base shape to be extruded.
3589         #  @param theVec Direction of extrusion.
3590         #  @param theH Prism dimension along theVec.
3591         #  @param theScaleFactor Use it to make prism with scaled second base.
3592         #                        Negative value means not scaled second base.
3593         #  @param theName Object name; when specified, this parameter is used
3594         #         for result publication in the study. Otherwise, if automatic
3595         #         publication is switched on, default value is used for result name.
3596         #
3597         #  @return New GEOM.GEOM_Object, containing the created prism.
3598         #
3599         #  @ref tui_creation_prism "Example"
3600         @ManageTransactions("PrimOp")
3601         def MakePrismVecH(self, theBase, theVec, theH, theScaleFactor = -1.0, theName=None):
3602             """
3603             Create a shape by extrusion of the base shape along the vector,
3604             i.e. all the space, transfixed by the base shape during its translation
3605             along the vector on the given distance.
3606
3607             Parameters:
3608                 theBase Base shape to be extruded.
3609                 theVec Direction of extrusion.
3610                 theH Prism dimension along theVec.
3611                 theScaleFactor Use it to make prism with scaled second base.
3612                                Negative value means not scaled second base.
3613                 theName Object name; when specified, this parameter is used
3614                         for result publication in the study. Otherwise, if automatic
3615                         publication is switched on, default value is used for result name.
3616
3617             Returns:
3618                 New GEOM.GEOM_Object, containing the created prism.
3619             """
3620             # Example: see GEOM_TestAll.py
3621             anObj = None
3622             Parameters = ""
3623             if theScaleFactor > 0:
3624                 theH,theScaleFactor,Parameters = ParseParameters(theH,theScaleFactor)
3625                 anObj = self.PrimOp.MakePrismVecHWithScaling(theBase, theVec, theH, theScaleFactor)
3626             else:
3627                 theH,Parameters = ParseParameters(theH)
3628                 anObj = self.PrimOp.MakePrismVecH(theBase, theVec, theH)
3629             RaiseIfFailed("MakePrismVecH", self.PrimOp)
3630             anObj.SetParameters(Parameters)
3631             self._autoPublish(anObj, theName, "prism")
3632             return anObj
3633
3634         ## Create a shape by extrusion of the base shape along the vector,
3635         #  i.e. all the space, transfixed by the base shape during its translation
3636         #  along the vector on the given distance in 2 Ways (forward/backward).
3637         #  @param theBase Base shape to be extruded.
3638         #  @param theVec Direction of extrusion.
3639         #  @param theH Prism dimension along theVec in forward direction.
3640         #  @param theName Object name; when specified, this parameter is used
3641         #         for result publication in the study. Otherwise, if automatic
3642         #         publication is switched on, default value is used for result name.
3643         #
3644         #  @return New GEOM.GEOM_Object, containing the created prism.
3645         #
3646         #  @ref tui_creation_prism "Example"
3647         @ManageTransactions("PrimOp")
3648         def MakePrismVecH2Ways(self, theBase, theVec, theH, theName=None):
3649             """
3650             Create a shape by extrusion of the base shape along the vector,
3651             i.e. all the space, transfixed by the base shape during its translation
3652             along the vector on the given distance in 2 Ways (forward/backward).
3653
3654             Parameters:
3655                 theBase Base shape to be extruded.
3656                 theVec Direction of extrusion.
3657                 theH Prism dimension along theVec in forward direction.
3658                 theName Object name; when specified, this parameter is used
3659                         for result publication in the study. Otherwise, if automatic
3660                         publication is switched on, default value is used for result name.
3661
3662             Returns:
3663                 New GEOM.GEOM_Object, containing the created prism.
3664             """
3665             # Example: see GEOM_TestAll.py
3666             theH,Parameters = ParseParameters(theH)
3667             anObj = self.PrimOp.MakePrismVecH2Ways(theBase, theVec, theH)
3668             RaiseIfFailed("MakePrismVecH2Ways", self.PrimOp)
3669             anObj.SetParameters(Parameters)
3670             self._autoPublish(anObj, theName, "prism")
3671             return anObj
3672
3673         ## Create a shape by extrusion of the base shape along the dx, dy, dz direction
3674         #  @param theBase Base shape to be extruded.
3675         #  @param theDX, theDY, theDZ Directions of extrusion.
3676         #  @param theScaleFactor Use it to make prism with scaled second base.
3677         #                        Nagative value means not scaled second base.
3678         #  @param theName Object name; when specified, this parameter is used
3679         #         for result publication in the study. Otherwise, if automatic
3680         #         publication is switched on, default value is used for result name.
3681         #
3682         #  @return New GEOM.GEOM_Object, containing the created prism.
3683         #
3684         #  @ref tui_creation_prism "Example"
3685         @ManageTransactions("PrimOp")
3686         def MakePrismDXDYDZ(self, theBase, theDX, theDY, theDZ, theScaleFactor = -1.0, theName=None):
3687             """
3688             Create a shape by extrusion of the base shape along the dx, dy, dz direction
3689
3690             Parameters:
3691                 theBase Base shape to be extruded.
3692                 theDX, theDY, theDZ Directions of extrusion.
3693                 theScaleFactor Use it to make prism with scaled second base.
3694                                Nagative value means not scaled second base.
3695                 theName Object name; when specified, this parameter is used
3696                         for result publication in the study. Otherwise, if automatic
3697                         publication is switched on, default value is used for result name.
3698
3699             Returns:
3700                 New GEOM.GEOM_Object, containing the created prism.
3701             """
3702             # Example: see GEOM_TestAll.py
3703             anObj = None
3704             Parameters = ""
3705             if theScaleFactor > 0:
3706                 theDX,theDY,theDZ,theScaleFactor,Parameters = ParseParameters(theDX, theDY, theDZ, theScaleFactor)
3707                 anObj = self.PrimOp.MakePrismDXDYDZWithScaling(theBase, theDX, theDY, theDZ, theScaleFactor)
3708             else:
3709                 theDX,theDY,theDZ,Parameters = ParseParameters(theDX, theDY, theDZ)
3710                 anObj = self.PrimOp.MakePrismDXDYDZ(theBase, theDX, theDY, theDZ)
3711             RaiseIfFailed("MakePrismDXDYDZ", self.PrimOp)
3712             anObj.SetParameters(Parameters)
3713             self._autoPublish(anObj, theName, "prism")
3714             return anObj
3715
3716         ## Create a shape by extrusion of the base shape along the dx, dy, dz direction
3717         #  i.e. all the space, transfixed by the base shape during its translation
3718         #  along the vector on the given distance in 2 Ways (forward/backward).
3719         #  @param theBase Base shape to be extruded.
3720         #  @param theDX, theDY, theDZ Directions of extrusion.
3721         #  @param theName Object name; when specified, this parameter is used
3722         #         for result publication in the study. Otherwise, if automatic
3723         #         publication is switched on, default value is used for result name.
3724         #
3725         #  @return New GEOM.GEOM_Object, containing the created prism.
3726         #
3727         #  @ref tui_creation_prism "Example"
3728         @ManageTransactions("PrimOp")
3729         def MakePrismDXDYDZ2Ways(self, theBase, theDX, theDY, theDZ, theName=None):
3730             """
3731             Create a shape by extrusion of the base shape along the dx, dy, dz direction
3732             i.e. all the space, transfixed by the base shape during its translation
3733             along the vector on the given distance in 2 Ways (forward/backward).
3734
3735             Parameters:
3736                 theBase Base shape to be extruded.
3737                 theDX, theDY, theDZ Directions of extrusion.
3738                 theName Object name; when specified, this parameter is used
3739                         for result publication in the study. Otherwise, if automatic
3740                         publication is switched on, default value is used for result name.
3741
3742             Returns:
3743                 New GEOM.GEOM_Object, containing the created prism.
3744             """
3745             # Example: see GEOM_TestAll.py
3746             theDX,theDY,theDZ,Parameters = ParseParameters(theDX, theDY, theDZ)
3747             anObj = self.PrimOp.MakePrismDXDYDZ2Ways(theBase, theDX, theDY, theDZ)
3748             RaiseIfFailed("MakePrismDXDYDZ2Ways", self.PrimOp)
3749             anObj.SetParameters(Parameters)
3750             self._autoPublish(anObj, theName, "prism")
3751             return anObj
3752
3753         ## Create a shape by revolution of the base shape around the axis
3754         #  on the given angle, i.e. all the space, transfixed by the base
3755         #  shape during its rotation around the axis on the given angle.
3756         #  @param theBase Base shape to be rotated.
3757         #  @param theAxis Rotation axis.
3758         #  @param theAngle Rotation angle in radians.
3759         #  @param theName Object name; when specified, this parameter is used
3760         #         for result publication in the study. Otherwise, if automatic
3761         #         publication is switched on, default value is used for result name.
3762         #
3763         #  @return New GEOM.GEOM_Object, containing the created revolution.
3764         #
3765         #  @ref tui_creation_revolution "Example"
3766         @ManageTransactions("PrimOp")
3767         def MakeRevolution(self, theBase, theAxis, theAngle, theName=None):
3768             """
3769             Create a shape by revolution of the base shape around the axis
3770             on the given angle, i.e. all the space, transfixed by the base
3771             shape during its rotation around the axis on the given angle.
3772
3773             Parameters:
3774                 theBase Base shape to be rotated.
3775                 theAxis Rotation axis.
3776                 theAngle Rotation angle in radians.
3777                 theName Object name; when specified, this parameter is used
3778                         for result publication in the study. Otherwise, if automatic
3779                         publication is switched on, default value is used for result name.
3780
3781             Returns:
3782                 New GEOM.GEOM_Object, containing the created revolution.
3783             """
3784             # Example: see GEOM_TestAll.py
3785             theAngle,Parameters = ParseParameters(theAngle)
3786             anObj = self.PrimOp.MakeRevolutionAxisAngle(theBase, theAxis, theAngle)
3787             RaiseIfFailed("MakeRevolutionAxisAngle", self.PrimOp)
3788             anObj.SetParameters(Parameters)
3789             self._autoPublish(anObj, theName, "revolution")
3790             return anObj
3791
3792         ## Create a shape by revolution of the base shape around the axis
3793         #  on the given angle, i.e. all the space, transfixed by the base
3794         #  shape during its rotation around the axis on the given angle in
3795         #  both directions (forward/backward)
3796         #  @param theBase Base shape to be rotated.
3797         #  @param theAxis Rotation axis.
3798         #  @param theAngle Rotation angle in radians.
3799         #  @param theName Object name; when specified, this parameter is used
3800         #         for result publication in the study. Otherwise, if automatic
3801         #         publication is switched on, default value is used for result name.
3802         #
3803         #  @return New GEOM.GEOM_Object, containing the created revolution.
3804         #
3805         #  @ref tui_creation_revolution "Example"
3806         @ManageTransactions("PrimOp")
3807         def MakeRevolution2Ways(self, theBase, theAxis, theAngle, theName=None):
3808             """
3809             Create a shape by revolution of the base shape around the axis
3810             on the given angle, i.e. all the space, transfixed by the base
3811             shape during its rotation around the axis on the given angle in
3812             both directions (forward/backward).
3813
3814             Parameters:
3815                 theBase Base shape to be rotated.
3816                 theAxis Rotation axis.
3817                 theAngle Rotation angle in radians.
3818                 theName Object name; when specified, this parameter is used
3819                         for result publication in the study. Otherwise, if automatic
3820                         publication is switched on, default value is used for result name.
3821
3822             Returns:
3823                 New GEOM.GEOM_Object, containing the created revolution.
3824             """
3825             theAngle,Parameters = ParseParameters(theAngle)
3826             anObj = self.PrimOp.MakeRevolutionAxisAngle2Ways(theBase, theAxis, theAngle)
3827             RaiseIfFailed("MakeRevolutionAxisAngle2Ways", self.PrimOp)
3828             anObj.SetParameters(Parameters)
3829             self._autoPublish(anObj, theName, "revolution")
3830             return anObj
3831
3832         ## Create a face from a given set of contours.
3833         #  @param theContours either a list or a compound of edges/wires.
3834         #  @param theMinDeg a minimal degree of BSpline surface to create.
3835         #  @param theMaxDeg a maximal degree of BSpline surface to create.
3836         #  @param theTol2D a 2d tolerance to be reached.
3837         #  @param theTol3D a 3d tolerance to be reached.
3838         #  @param theNbIter a number of iteration of approximation algorithm.
3839         #  @param theMethod Kind of method to perform filling operation
3840         #         (see GEOM.filling_oper_method enum).
3841         #  @param isApprox if True, BSpline curves are generated in the process
3842         #                  of surface construction. By default it is False, that means
3843         #                  the surface is created using given curves. The usage of
3844         #                  Approximation makes the algorithm work slower, but allows
3845         #                  building the surface for rather complex cases.
3846         #  @param theName Object name; when specified, this parameter is used
3847         #         for result publication in the study. Otherwise, if automatic
3848         #         publication is switched on, default value is used for result name.
3849         #
3850         #  @return New GEOM.GEOM_Object (face), containing the created filling surface.
3851         #
3852         #  @ref tui_creation_filling "Example"
3853         @ManageTransactions("PrimOp")
3854         def MakeFilling(self, theContours, theMinDeg=2, theMaxDeg=5, theTol2D=0.0001,
3855                         theTol3D=0.0001, theNbIter=0, theMethod=GEOM.FOM_Default, isApprox=0, theName=None):
3856             """
3857             Create a face from a given set of contours.
3858
3859             Parameters:
3860                 theContours either a list or a compound of edges/wires.
3861                 theMinDeg a minimal degree of BSpline surface to create.
3862                 theMaxDeg a maximal degree of BSpline surface to create.
3863                 theTol2D a 2d tolerance to be reached.
3864                 theTol3D a 3d tolerance to be reached.
3865                 theNbIter a number of iteration of approximation algorithm.
3866                 theMethod Kind of method to perform filling operation
3867                           (see GEOM.filling_oper_method enum).
3868                 isApprox if True, BSpline curves are generated in the process
3869                          of surface construction. By default it is False, that means
3870                          the surface is created using given curves. The usage of
3871                          Approximation makes the algorithm work slower, but allows
3872                          building the surface for rather complex cases.
3873                 theName Object name; when specified, this parameter is used
3874                         for result publication in the study. Otherwise, if automatic
3875                         publication is switched on, default value is used for result name.
3876
3877             Returns:
3878                 New GEOM.GEOM_Object (face), containing the created filling surface.
3879
3880             Example of usage:
3881                 filling = geompy.MakeFilling(compound, 2, 5, 0.0001, 0.0001, 5)
3882             """
3883             # Example: see GEOM_TestAll.py
3884             theMinDeg,theMaxDeg,theTol2D,theTol3D,theNbIter,Parameters = ParseParameters(theMinDeg, theMaxDeg, theTol2D, theTol3D, theNbIter)
3885             anObj = self.PrimOp.MakeFilling(ToList(theContours), theMinDeg, theMaxDeg,
3886                                             theTol2D, theTol3D, theNbIter,
3887                                             theMethod, isApprox)
3888             RaiseIfFailed("MakeFilling", self.PrimOp)
3889             anObj.SetParameters(Parameters)
3890             self._autoPublish(anObj, theName, "filling")
3891             return anObj
3892
3893
3894         ## Create a face from a given set of contours.
3895         #  This method corresponds to MakeFilling() with isApprox=True.
3896         #  @param theContours either a list or a compound of edges/wires.
3897         #  @param theMinDeg a minimal degree of BSpline surface to create.
3898         #  @param theMaxDeg a maximal degree of BSpline surface to create.
3899         #  @param theTol3D a 3d tolerance to be reached.
3900         #  @param theName Object name; when specified, this parameter is used
3901         #         for result publication in the study. Otherwise, if automatic
3902         #         publication is switched on, default value is used for result name.
3903         #
3904         #  @return New GEOM.GEOM_Object (face), containing the created filling surface.
3905         #
3906         #  @ref tui_creation_filling "Example"
3907         @ManageTransactions("PrimOp")
3908         def MakeFillingNew(self, theContours, theMinDeg=2, theMaxDeg=5, theTol3D=0.0001, theName=None):
3909             """
3910             Create a filling from the given compound of contours.
3911             This method corresponds to MakeFilling() with isApprox=True.
3912
3913             Parameters:
3914                 theContours either a list or a compound of edges/wires.
3915                 theMinDeg a minimal degree of BSpline surface to create.
3916                 theMaxDeg a maximal degree of BSpline surface to create.
3917                 theTol3D a 3d tolerance to be reached.
3918                 theName Object name; when specified, this parameter is used
3919                         for result publication in the study. Otherwise, if automatic
3920                         publication is switched on, default value is used for result name.
3921
3922             Returns:
3923                 New GEOM.GEOM_Object (face), containing the created filling surface.
3924
3925             Example of usage:
3926                 filling = geompy.MakeFillingNew(compound, 2, 5, 0.0001)
3927             """
3928             # Example: see GEOM_TestAll.py
3929             theMinDeg,theMaxDeg,theTol3D,Parameters = ParseParameters(theMinDeg, theMaxDeg, theTol3D)
3930             anObj = self.PrimOp.MakeFilling(ToList(theContours), theMinDeg, theMaxDeg,
3931                                             0, theTol3D, 0, GEOM.FOM_Default, True)
3932             RaiseIfFailed("MakeFillingNew", self.PrimOp)
3933             anObj.SetParameters(Parameters)
3934             self._autoPublish(anObj, theName, "filling")
3935             return anObj
3936
3937         ## Create a shell or solid passing through set of sections.Sections should be wires,edges or vertices.
3938         #  @param theSeqSections - set of specified sections.
3939         #  @param theModeSolid - mode defining building solid or shell
3940         #  @param thePreci - precision 3D used for smoothing
3941         #  @param theRuled - mode defining type of the result surfaces (ruled or smoothed).
3942         #  @param theName Object name; when specified, this parameter is used
3943         #         for result publication in the study. Otherwise, if automatic
3944         #         publication is switched on, default value is used for result name.
3945         #
3946         #  @return New GEOM.GEOM_Object, containing the created shell or solid.
3947         #
3948         #  @ref swig_todo "Example"
3949         @ManageTransactions("PrimOp")
3950         def MakeThruSections(self, theSeqSections, theModeSolid, thePreci, theRuled, theName=None):
3951             """
3952             Create a shell or solid passing through set of sections.Sections should be wires,edges or vertices.
3953
3954             Parameters:
3955                 theSeqSections - set of specified sections.
3956                 theModeSolid - mode defining building solid or shell
3957                 thePreci - precision 3D used for smoothing
3958                 theRuled - mode defining type of the result surfaces (ruled or smoothed).
3959                 theName Object name; when specified, this parameter is used
3960                         for result publication in the study. Otherwise, if automatic
3961                         publication is switched on, default value is used for result name.
3962
3963             Returns:
3964                 New GEOM.GEOM_Object, containing the created shell or solid.
3965             """
3966             # Example: see GEOM_TestAll.py
3967             anObj = self.PrimOp.MakeThruSections(theSeqSections,theModeSolid,thePreci,theRuled)
3968             RaiseIfFailed("MakeThruSections", self.PrimOp)
3969             self._autoPublish(anObj, theName, "filling")
3970             return anObj
3971
3972         ## Create a shape by extrusion of the base shape along
3973         #  the path shape. The path shape can be a wire or an edge. It is
3974         #  possible to generate groups along with the result by means of
3975         #  setting the flag \a IsGenerateGroups.<BR>
3976         #  If \a thePath is a closed edge or wire and \a IsGenerateGroups is
3977         #  set, an error is occurred. If \a thePath is not closed edge/wire,
3978         #  the following groups are returned:
3979         #  - If \a theBase is unclosed edge or wire: "Down", "Up", "Side1",
3980         #    "Side2";
3981         #  - If \a theBase is closed edge or wire, face or shell: "Down", "Up",
3982         #    "Other".
3983         #  .
3984         #  "Down" and "Up" groups contain:
3985         #  - Edges if \a theBase is edge or wire;
3986         #  - Faces if \a theBase is face or shell.<BR>
3987         #  .
3988         #  "Side1" and "Side2" groups contain edges generated from the first
3989         #  and last vertices of \a theBase. The first and last vertices are
3990         #  determined taking into account edge/wire orientation.<BR>
3991         #  "Other" group represents faces generated from the bounding edges of
3992         #  \a theBase.
3993         #
3994         #  @param theBase Base shape to be extruded.
3995         #  @param thePath Path shape to extrude the base shape along it.
3996         #  @param IsGenerateGroups flag that tells if it is necessary to
3997         #         create groups. It is equal to False by default.
3998         #  @param theName Object name; when specified, this parameter is used
3999         #         for result publication in the study. Otherwise, if automatic
4000         #         publication is switched on, default value is used for result name.
4001         #
4002         #  @return New GEOM.GEOM_Object, containing the created pipe if 
4003         #          \a IsGenerateGroups is not set. Otherwise it returns a
4004         #          list of GEOM.GEOM_Object. Its first element is the created pipe, the
4005         #          remaining ones are created groups.
4006         #
4007         #  @ref tui_creation_pipe "Example"
4008         @ManageTransactions("PrimOp")
4009         def MakePipe(self, theBase, thePath,
4010                      IsGenerateGroups=False, theName=None):
4011             """
4012             Create a shape by extrusion of the base shape along
4013             the path shape. The path shape can be a wire or an edge. It is
4014             possible to generate groups along with the result by means of
4015             setting the flag IsGenerateGroups.
4016             If thePath is a closed edge or wire and IsGenerateGroups is
4017             set, an error is occurred. If thePath is not closed edge/wire,
4018             the following groups are returned:
4019             - If theBase is unclosed edge or wire: "Down", "Up", "Side1",
4020               "Side2";
4021             - If theBase is closed edge or wire, face or shell: "Down", "Up",
4022               "Other".
4023             "Down" and "Up" groups contain:
4024             - Edges if theBase is edge or wire;
4025             - Faces if theBase is face or shell.
4026             "Side1" and "Side2" groups contain edges generated from the first
4027             and last vertices of theBase. The first and last vertices are
4028             determined taking into account edge/wire orientation.
4029             "Other" group represents faces generated from the bounding edges of
4030             theBase.
4031
4032             Parameters:
4033                 theBase Base shape to be extruded.
4034                 thePath Path shape to extrude the base shape along it.
4035                 IsGenerateGroups flag that tells if it is necessary to
4036                         create groups. It is equal to False by default.
4037                 theName Object name; when specified, this parameter is used
4038                         for result publication in the study. Otherwise, if automatic
4039                         publication is switched on, default value is used for result name.
4040
4041             Returns:
4042                 New GEOM.GEOM_Object, containing the created pipe if 
4043                 IsGenerateGroups is not set. Otherwise it returns a
4044                 list of GEOM.GEOM_Object. Its first element is the created pipe, the
4045                 remaining ones are created groups.
4046             """
4047             # Example: see GEOM_TestAll.py
4048             aList = self.PrimOp.MakePipe(theBase, thePath, IsGenerateGroups)
4049             RaiseIfFailed("MakePipe", self.PrimOp)
4050
4051             if IsGenerateGroups:
4052               self._autoPublish(aList, theName, "pipe")
4053               return aList
4054
4055             self._autoPublish(aList[0], theName, "pipe")
4056             return aList[0]
4057
4058         ## Create a shape by extrusion of the profile shape along
4059         #  the path shape. The path shape can be a wire or an edge.
4060         #  the several profiles can be specified in the several locations of path.
4061         #  It is possible to generate groups along with the result by means of
4062         #  setting the flag \a IsGenerateGroups. For detailed information on
4063         #  groups that can be created please see the method MakePipe().
4064         #  @param theSeqBases - list of  Bases shape to be extruded.
4065         #  @param theLocations - list of locations on the path corresponding
4066         #                        specified list of the Bases shapes. Number of locations
4067         #                        should be equal to number of bases or list of locations can be empty.
4068         #  @param thePath - Path shape to extrude the base shape along it.
4069         #  @param theWithContact - the mode defining that the section is translated to be in
4070         #                          contact with the spine.
4071         #  @param theWithCorrection - defining that the section is rotated to be
4072         #                             orthogonal to the spine tangent in the correspondent point
4073         #  @param IsGenerateGroups - flag that tells if it is necessary to
4074         #                          create groups. It is equal to False by default.
4075         #  @param theName Object name; when specified, this parameter is used
4076         #         for result publication in the study. Otherwise, if automatic
4077         #         publication is switched on, default value is used for result name.
4078         #
4079         #  @return New GEOM.GEOM_Object, containing the created pipe if 
4080         #          \a IsGenerateGroups is not set. Otherwise it returns new
4081         #          GEOM.ListOfGO. Its first element is the created pipe, the
4082         #          remaining ones are created groups.
4083         #
4084         #  @ref tui_creation_pipe_with_diff_sec "Example"
4085         @ManageTransactions("PrimOp")
4086         def MakePipeWithDifferentSections(self, theSeqBases,
4087                                           theLocations, thePath,
4088                                           theWithContact, theWithCorrection,
4089                                           IsGenerateGroups=False, theName=None):
4090             """
4091             Create a shape by extrusion of the profile shape along
4092             the path shape. The path shape can be a wire or an edge.
4093             the several profiles can be specified in the several locations of path.
4094             It is possible to generate groups along with the result by means of
4095             setting the flag IsGenerateGroups. For detailed information on
4096             groups that can be created please see the method geompy.MakePipe().
4097
4098             Parameters:
4099                 theSeqBases - list of  Bases shape to be extruded.
4100                 theLocations - list of locations on the path corresponding
4101                                specified list of the Bases shapes. Number of locations
4102                                should be equal to number of bases or list of locations can be empty.
4103                 thePath - Path shape to extrude the base shape along it.
4104                 theWithContact - the mode defining that the section is translated to be in
4105                                  contact with the spine(0/1)
4106                 theWithCorrection - defining that the section is rotated to be
4107                                     orthogonal to the spine tangent in the correspondent point (0/1)
4108                 IsGenerateGroups - flag that tells if it is necessary to
4109                                  create groups. It is equal to False by default.
4110                 theName Object name; when specified, this parameter is used
4111                         for result publication in the study. Otherwise, if automatic
4112                         publication is switched on, default value is used for result name.
4113
4114             Returns:
4115                 New GEOM.GEOM_Object, containing the created pipe if 
4116                 IsGenerateGroups is not set. Otherwise it returns new
4117                 GEOM.ListOfGO. Its first element is the created pipe, the
4118                 remaining ones are created groups.
4119             """
4120             aList = self.PrimOp.MakePipeWithDifferentSections(theSeqBases,
4121                                                               theLocations, thePath,
4122                                                               theWithContact, theWithCorrection,
4123                                                               False, IsGenerateGroups)
4124             RaiseIfFailed("MakePipeWithDifferentSections", self.PrimOp)
4125
4126             if IsGenerateGroups:
4127               self._autoPublish(aList, theName, "pipe")
4128               return aList
4129
4130             self._autoPublish(aList[0], theName, "pipe")
4131             return aList[0]
4132
4133         ## Create a shape by extrusion of the profile shape along
4134         #  the path shape. This function is a version of
4135         #  MakePipeWithDifferentSections() with the same parameters, except
4136         #  eliminated theWithContact and theWithCorrection. So it is
4137         #  possible to find the description of all parameters is in this
4138         #  method. The difference is that this method performs the operation
4139         #  step by step, i.e. it creates pipes between each pair of neighbor
4140         #  sections and fuses them into a single shape.
4141         #
4142         #  @ref tui_creation_pipe_with_diff_sec "Example"
4143         @ManageTransactions("PrimOp")
4144         def MakePipeWithDifferentSectionsBySteps(self, theSeqBases,
4145                                                  theLocations, thePath,
4146                                                  IsGenerateGroups=False, theName=None):
4147             """
4148             Create a shape by extrusion of the profile shape along
4149             the path shape. This function is a version of
4150             MakePipeWithDifferentSections() with the same parameters, except
4151             eliminated theWithContact and theWithCorrection. So it is
4152             possible to find the description of all parameters is in this
4153             method. The difference is that this method performs the operation
4154             step by step, i.e. it creates pipes between each pair of neighbor
4155             sections and fuses them into a single shape.
4156             """
4157             aList = self.PrimOp.MakePipeWithDifferentSections(theSeqBases,
4158                                                               theLocations, thePath,
4159                                                               False, False,
4160                                                               True, IsGenerateGroups)
4161             RaiseIfFailed("MakePipeWithDifferentSectionsBySteps", self.PrimOp)
4162
4163             if IsGenerateGroups:
4164               self._autoPublish(aList, theName, "pipe")
4165               return aList
4166
4167             self._autoPublish(aList[0], theName, "pipe")
4168             return aList[0]
4169
4170         ## Create a shape by extrusion of the profile shape along
4171         #  the path shape. The path shape can be a wire or an edge.
4172         #  the several profiles can be specified in the several locations of path.
4173         #  It is possible to generate groups along with the result by means of
4174         #  setting the flag \a IsGenerateGroups. For detailed information on
4175         #  groups that can be created please see the method MakePipe().
4176         #  @param theSeqBases - list of  Bases shape to be extruded. Base shape must be
4177         #                       shell or face. If number of faces in neighbour sections
4178         #                       aren't coincided result solid between such sections will
4179         #                       be created using external boundaries of this shells.
4180         #  @param theSeqSubBases - list of corresponding sub-shapes of section shapes.
4181         #                          This list is used for searching correspondences between
4182         #                          faces in the sections. Size of this list must be equal
4183         #                          to size of list of base shapes.
4184         #  @param theLocations - list of locations on the path corresponding
4185         #                        specified list of the Bases shapes. Number of locations
4186         #                        should be equal to number of bases. First and last
4187         #                        locations must be coincided with first and last vertexes
4188         #                        of path correspondingly.
4189         #  @param thePath - Path shape to extrude the base shape along it.
4190         #  @param theWithContact - the mode defining that the section is translated to be in
4191         #                          contact with the spine.
4192         #  @param theWithCorrection - defining that the section is rotated to be
4193         #                             orthogonal to the spine tangent in the correspondent point
4194         #  @param IsGenerateGroups - flag that tells if it is necessary to
4195         #                          create groups. It is equal to False by default.
4196         #  @param theName Object name; when specified, this parameter is used
4197         #         for result publication in the study. Otherwise, if automatic
4198         #         publication is switched on, default value is used for result name.
4199         #
4200         #  @return New GEOM.GEOM_Object, containing the created solids if 
4201         #          \a IsGenerateGroups is not set. Otherwise it returns new
4202         #          GEOM.ListOfGO. Its first element is the created solids, the
4203         #          remaining ones are created groups.
4204         #
4205         #  @ref tui_creation_pipe_with_shell_sec "Example"
4206         @ManageTransactions("PrimOp")
4207         def MakePipeWithShellSections(self, theSeqBases, theSeqSubBases,
4208                                       theLocations, thePath,
4209                                       theWithContact, theWithCorrection,
4210                                       IsGenerateGroups=False, theName=None):
4211             """
4212             Create a shape by extrusion of the profile shape along
4213             the path shape. The path shape can be a wire or an edge.
4214             the several profiles can be specified in the several locations of path.
4215             It is possible to generate groups along with the result by means of
4216             setting the flag IsGenerateGroups. For detailed information on
4217             groups that can be created please see the method geompy.MakePipe().
4218
4219             Parameters:
4220                 theSeqBases - list of  Bases shape to be extruded. Base shape must be
4221                               shell or face. If number of faces in neighbour sections
4222                               aren't coincided result solid between such sections will
4223                               be created using external boundaries of this shells.
4224                 theSeqSubBases - list of corresponding sub-shapes of section shapes.
4225                                  This list is used for searching correspondences between
4226                                  faces in the sections. Size of this list must be equal
4227                                  to size of list of base shapes.
4228                 theLocations - list of locations on the path corresponding
4229                                specified list of the Bases shapes. Number of locations
4230                                should be equal to number of bases. First and last
4231                                locations must be coincided with first and last vertexes
4232                                of path correspondingly.
4233                 thePath - Path shape to extrude the base shape along it.
4234                 theWithContact - the mode defining that the section is translated to be in
4235                                  contact with the spine (0/1)
4236                 theWithCorrection - defining that the section is rotated to be
4237                                     orthogonal to the spine tangent in the correspondent point (0/1)
4238                 IsGenerateGroups - flag that tells if it is necessary to
4239                                  create groups. It is equal to False by default.
4240                 theName Object name; when specified, this parameter is used
4241                         for result publication in the study. Otherwise, if automatic
4242                         publication is switched on, default value is used for result name.
4243
4244             Returns:
4245                 New GEOM.GEOM_Object, containing the created solids if 
4246                 IsGenerateGroups is not set. Otherwise it returns new
4247                 GEOM.ListOfGO. Its first element is the created solids, the
4248                 remaining ones are created groups.
4249             """
4250             aList = self.PrimOp.MakePipeWithShellSections(theSeqBases, theSeqSubBases,
4251                                                           theLocations, thePath,
4252                                                           theWithContact, theWithCorrection,
4253                                                           IsGenerateGroups)
4254             RaiseIfFailed("MakePipeWithShellSections", self.PrimOp)
4255
4256             if IsGenerateGroups:
4257               self._autoPublish(aList, theName, "pipe")
4258               return aList
4259
4260             self._autoPublish(aList[0], theName, "pipe")
4261             return aList[0]
4262
4263         ## Create a shape by extrusion of the profile shape along
4264         #  the path shape. This function is used only for debug pipe
4265         #  functionality - it is a version of function MakePipeWithShellSections()
4266         #  which give a possibility to receive information about
4267         #  creating pipe between each pair of sections step by step.
4268         @ManageTransactions("PrimOp")
4269         def MakePipeWithShellSectionsBySteps(self, theSeqBases, theSeqSubBases,
4270                                              theLocations, thePath,
4271                                              theWithContact, theWithCorrection,
4272                                              IsGenerateGroups=False, theName=None):
4273             """
4274             Create a shape by extrusion of the profile shape along
4275             the path shape. This function is used only for debug pipe
4276             functionality - it is a version of previous function
4277             geompy.MakePipeWithShellSections() which give a possibility to
4278             receive information about creating pipe between each pair of
4279             sections step by step.
4280             """
4281             res = []
4282             nbsect = len(theSeqBases)
4283             nbsubsect = len(theSeqSubBases)
4284             #print "nbsect = ",nbsect
4285             for i in range(1,nbsect):
4286                 #print "  i = ",i
4287                 tmpSeqBases = [ theSeqBases[i-1], theSeqBases[i] ]
4288                 tmpLocations = [ theLocations[i-1], theLocations[i] ]
4289                 tmpSeqSubBases = []
4290                 if nbsubsect>0: tmpSeqSubBases = [ theSeqSubBases[i-1], theSeqSubBases[i] ]
4291                 aList = self.PrimOp.MakePipeWithShellSections(tmpSeqBases, tmpSeqSubBases,
4292                                                               tmpLocations, thePath,
4293                                                               theWithContact, theWithCorrection,
4294                                                               IsGenerateGroups)
4295                 if self.PrimOp.IsDone() == 0:
4296                     print("Problems with pipe creation between ",i," and ",i+1," sections")
4297                     RaiseIfFailed("MakePipeWithShellSections", self.PrimOp)
4298                     break
4299                 else:
4300                     print("Pipe between ",i," and ",i+1," sections is OK")
4301                     res.append(aList[0])
4302                     pass
4303                 pass
4304
4305             resc = self.MakeCompound(res)
4306             #resc = self.MakeSewing(res, 0.001)
4307             #print "resc: ",resc
4308             self._autoPublish(resc, theName, "pipe")
4309             return resc
4310
4311         ## Create solids between given sections.
4312         #  It is possible to generate groups along with the result by means of
4313         #  setting the flag \a IsGenerateGroups. For detailed information on
4314         #  groups that can be created please see the method MakePipe().
4315         #  @param theSeqBases - list of sections (shell or face).
4316         #  @param theLocations - list of corresponding vertexes
4317         #  @param IsGenerateGroups - flag that tells if it is necessary to
4318         #         create groups. It is equal to False by default.
4319         #  @param theName Object name; when specified, this parameter is used
4320         #         for result publication in the study. Otherwise, if automatic
4321         #         publication is switched on, default value is used for result name.
4322         #
4323         #  @return New GEOM.GEOM_Object, containing the created solids if 
4324         #          \a IsGenerateGroups is not set. Otherwise it returns new
4325         #          GEOM.ListOfGO. Its first element is the created solids, the
4326         #          remaining ones are created groups.
4327         #
4328         #  @ref tui_creation_pipe_without_path "Example"
4329         @ManageTransactions("PrimOp")
4330         def MakePipeShellsWithoutPath(self, theSeqBases, theLocations,
4331                                       IsGenerateGroups=False, theName=None):
4332             """
4333             Create solids between given sections.
4334             It is possible to generate groups along with the result by means of
4335             setting the flag IsGenerateGroups. For detailed information on
4336             groups that can be created please see the method geompy.MakePipe().
4337
4338             Parameters:
4339                 theSeqBases - list of sections (shell or face).
4340                 theLocations - list of corresponding vertexes
4341                 IsGenerateGroups - flag that tells if it is necessary to
4342                                  create groups. It is equal to False by default.
4343                 theName Object name; when specified, this parameter is used
4344                         for result publication in the study. Otherwise, if automatic
4345                         publication is switched on, default value is used for result name.
4346
4347             Returns:
4348                 New GEOM.GEOM_Object, containing the created solids if 
4349                 IsGenerateGroups is not set. Otherwise it returns new
4350                 GEOM.ListOfGO. Its first element is the created solids, the
4351                 remaining ones are created groups.
4352             """
4353             aList = self.PrimOp.MakePipeShellsWithoutPath(theSeqBases, theLocations,
4354                                                           IsGenerateGroups)
4355             RaiseIfFailed("MakePipeShellsWithoutPath", self.PrimOp)
4356
4357             if IsGenerateGroups:
4358               self._autoPublish(aList, theName, "pipe")
4359               return aList
4360
4361             self._autoPublish(aList[0], theName, "pipe")
4362             return aList[0]
4363
4364         ## Create a shape by extrusion of the base shape along
4365         #  the path shape with constant bi-normal direction along the given vector.
4366         #  The path shape can be a wire or an edge.
4367         #  It is possible to generate groups along with the result by means of
4368         #  setting the flag \a IsGenerateGroups. For detailed information on
4369         #  groups that can be created please see the method MakePipe().
4370         #  @param theBase Base shape to be extruded.
4371         #  @param thePath Path shape to extrude the base shape along it.
4372         #  @param theVec Vector defines a constant binormal direction to keep the
4373         #                same angle between the direction and the sections
4374         #                along the sweep surface.
4375         #  @param IsGenerateGroups flag that tells if it is necessary to
4376         #         create groups. It is equal to False by default.
4377         #  @param theName Object name; when specified, this parameter is used
4378         #         for result publication in the study. Otherwise, if automatic
4379         #         publication is switched on, default value is used for result name.
4380         #
4381         #  @return New GEOM.GEOM_Object, containing the created pipe if 
4382         #          \a IsGenerateGroups is not set. Otherwise it returns new
4383         #          GEOM.ListOfGO. Its first element is the created pipe, the
4384         #          remaining ones are created groups.
4385         #
4386         #  @ref tui_creation_pipe "Example"
4387         @ManageTransactions("PrimOp")
4388         def MakePipeBiNormalAlongVector(self, theBase, thePath, theVec,
4389                                         IsGenerateGroups=False, theName=None):
4390             """
4391             Create a shape by extrusion of the base shape along
4392             the path shape with constant bi-normal direction along the given vector.
4393             The path shape can be a wire or an edge.
4394             It is possible to generate groups along with the result by means of
4395             setting the flag IsGenerateGroups. For detailed information on
4396             groups that can be created please see the method geompy.MakePipe().
4397
4398             Parameters:
4399                 theBase Base shape to be extruded.
4400                 thePath Path shape to extrude the base shape along it.
4401                 theVec Vector defines a constant binormal direction to keep the
4402                        same angle between the direction and the sections
4403                        along the sweep surface.
4404                 IsGenerateGroups flag that tells if it is necessary to
4405                                  create groups. It is equal to False by default.
4406                 theName Object name; when specified, this parameter is used
4407                         for result publication in the study. Otherwise, if automatic
4408                         publication is switched on, default value is used for result name.
4409
4410             Returns:
4411                 New GEOM.GEOM_Object, containing the created pipe if 
4412                 IsGenerateGroups is not set. Otherwise it returns new
4413                 GEOM.ListOfGO. Its first element is the created pipe, the
4414                 remaining ones are created groups.
4415             """
4416             # Example: see GEOM_TestAll.py
4417             aList = self.PrimOp.MakePipeBiNormalAlongVector(theBase, thePath,
4418                           theVec, IsGenerateGroups)
4419             RaiseIfFailed("MakePipeBiNormalAlongVector", self.PrimOp)
4420
4421             if IsGenerateGroups:
4422               self._autoPublish(aList, theName, "pipe")
4423               return aList
4424
4425             self._autoPublish(aList[0], theName, "pipe")
4426             return aList[0]
4427
4428         ## Makes a thick solid from a shape. If the input is a surface shape
4429         #  (face or shell) the result is a thick solid. If an input shape is
4430         #  a solid the result is a hollowed solid with removed faces.
4431         #  @param theShape Face or Shell to get thick solid or solid to get
4432         #         hollowed solid.
4433         #  @param theThickness Thickness of the resulting solid
4434         #  @param theFacesIDs the list of face IDs to be removed from the
4435         #         result. It is ignored if \a theShape is a face or a shell.
4436         #         It is empty by default. 
4437         #  @param theInside If true the thickness is applied towards inside
4438         #  @param theName Object name; when specified, this parameter is used
4439         #         for result publication in the study. Otherwise, if automatic
4440         #         publication is switched on, default value is used for result name.
4441         #
4442         #  @return New GEOM.GEOM_Object, containing the created solid
4443         #
4444         #  @ref tui_creation_thickness "Example"
4445         @ManageTransactions("PrimOp")
4446         def MakeThickSolid(self, theShape, theThickness,
4447                            theFacesIDs=[], theInside=False, theName=None):
4448             """
4449             Make a thick solid from a shape. If the input is a surface shape
4450             (face or shell) the result is a thick solid. If an input shape is
4451             a solid the result is a hollowed solid with removed faces.
4452
4453             Parameters:
4454                  theShape Face or Shell to get thick solid or solid to get
4455                           hollowed solid.
4456                  theThickness Thickness of the resulting solid
4457                  theFacesIDs the list of face IDs to be removed from the
4458                           result. It is ignored if theShape is a face or a
4459                           shell. It is empty by default. 
4460                  theInside If true the thickness is applied towards inside
4461                  theName Object name; when specified, this parameter is used
4462                          for result publication in the study. Otherwise, if automatic
4463                          publication is switched on, default value is used for result name.
4464
4465             Returns:
4466                 New GEOM.GEOM_Object, containing the created solid
4467             """
4468             # Example: see GEOM_TestAll.py
4469             theThickness,Parameters = ParseParameters(theThickness)
4470             anObj = self.PrimOp.MakeThickening(theShape, theFacesIDs,
4471                                                theThickness, True, theInside)
4472             RaiseIfFailed("MakeThickSolid", self.PrimOp)
4473             anObj.SetParameters(Parameters)
4474             self._autoPublish(anObj, theName, "thickSolid")
4475             return anObj
4476
4477
4478         ## Modifies a shape to make it a thick solid. If the input is a surface
4479         #  shape (face or shell) the result is a thick solid. If an input shape
4480         #  is a solid the result is a hollowed solid with removed faces.
4481         #  @param theShape Face or Shell to get thick solid or solid to get
4482         #         hollowed solid.
4483         #  @param theThickness Thickness of the resulting solid
4484         #  @param theFacesIDs the list of face IDs to be removed from the
4485         #         result. It is ignored if \a theShape is a face or a shell.
4486         #         It is empty by default. 
4487         #  @param theInside If true the thickness is applied towards inside
4488         #
4489         #  @return The modified shape
4490         #
4491         #  @ref tui_creation_thickness "Example"
4492         @ManageTransactions("PrimOp")
4493         def Thicken(self, theShape, theThickness, theFacesIDs=[], theInside=False):
4494             """
4495             Modifies a shape to make it a thick solid. If the input is a
4496             surface shape (face or shell) the result is a thick solid. If
4497             an input shape is a solid the result is a hollowed solid with
4498             removed faces.
4499
4500             Parameters:
4501                 theShape Face or Shell to get thick solid or solid to get
4502                          hollowed solid.
4503                 theThickness Thickness of the resulting solid
4504                 theFacesIDs the list of face IDs to be removed from the
4505                          result. It is ignored if \a theShape is a face or
4506                          a shell. It is empty by default. 
4507                 theInside If true the thickness is applied towards inside
4508
4509             Returns:
4510                 The modified shape
4511             """
4512             # Example: see GEOM_TestAll.py
4513             theThickness,Parameters = ParseParameters(theThickness)
4514             anObj = self.PrimOp.MakeThickening(theShape, theFacesIDs,
4515                                                theThickness, False, theInside)
4516             RaiseIfFailed("Thicken", self.PrimOp)
4517             anObj.SetParameters(Parameters)
4518             return anObj
4519
4520         ## Build a middle path of a pipe-like shape.
4521         #  The path shape can be a wire or an edge.
4522         #  @param theShape It can be closed or unclosed pipe-like shell
4523         #                  or a pipe-like solid.
4524         #  @param theBase1, theBase2 Two bases of the supposed pipe. This
4525         #                            should be wires or faces of theShape.
4526         #  @param theName Object name; when specified, this parameter is used
4527         #         for result publication in the study. Otherwise, if automatic
4528         #         publication is switched on, default value is used for result name.
4529         #
4530         #  @note It is not assumed that exact or approximate copy of theShape
4531         #        can be obtained by applying existing Pipe operation on the
4532         #        resulting "Path" wire taking theBase1 as the base - it is not
4533         #        always possible; though in some particular cases it might work
4534         #        it is not guaranteed. Thus, RestorePath function should not be
4535         #        considered as an exact reverse operation of the Pipe.
4536         #
4537         #  @return New GEOM.GEOM_Object, containing an edge or wire that represent
4538         #                                source pipe's "path".
4539         #
4540         #  @ref tui_creation_pipe_path "Example"
4541         @ManageTransactions("PrimOp")
4542         def RestorePath (self, theShape, theBase1, theBase2, theName=None):
4543             """
4544             Build a middle path of a pipe-like shape.
4545             The path shape can be a wire or an edge.
4546
4547             Parameters:
4548                 theShape It can be closed or unclosed pipe-like shell
4549                          or a pipe-like solid.
4550                 theBase1, theBase2 Two bases of the supposed pipe. This
4551                                    should be wires or faces of theShape.
4552                 theName Object name; when specified, this parameter is used
4553                         for result publication in the study. Otherwise, if automatic
4554                         publication is switched on, default value is used for result name.
4555
4556             Returns:
4557                 New GEOM_Object, containing an edge or wire that represent
4558                                  source pipe's path.
4559             """
4560             anObj = self.PrimOp.RestorePath(theShape, theBase1, theBase2)
4561             RaiseIfFailed("RestorePath", self.PrimOp)
4562             self._autoPublish(anObj, theName, "path")
4563             return anObj
4564
4565         ## Build a middle path of a pipe-like shape.
4566         #  The path shape can be a wire or an edge.
4567         #  @param theShape It can be closed or unclosed pipe-like shell
4568         #                  or a pipe-like solid.
4569         #  @param listEdges1, listEdges2 Two bases of the supposed pipe. This
4570         #                                should be lists of edges of theShape.
4571         #  @param theName Object name; when specified, this parameter is used
4572         #         for result publication in the study. Otherwise, if automatic
4573         #         publication is switched on, default value is used for result name.
4574         #
4575         #  @note It is not assumed that exact or approximate copy of theShape
4576         #        can be obtained by applying existing Pipe operation on the
4577         #        resulting "Path" wire taking theBase1 as the base - it is not
4578         #        always possible; though in some particular cases it might work
4579         #        it is not guaranteed. Thus, RestorePath function should not be
4580         #        considered as an exact reverse operation of the Pipe.
4581         #
4582         #  @return New GEOM.GEOM_Object, containing an edge or wire that represent
4583         #                                source pipe's "path".
4584         #
4585         #  @ref tui_creation_pipe_path "Example"
4586         @ManageTransactions("PrimOp")
4587         def RestorePathEdges (self, theShape, listEdges1, listEdges2, theName=None):
4588             """
4589             Build a middle path of a pipe-like shape.
4590             The path shape can be a wire or an edge.
4591
4592             Parameters:
4593                 theShape It can be closed or unclosed pipe-like shell
4594                          or a pipe-like solid.
4595                 listEdges1, listEdges2 Two bases of the supposed pipe. This
4596                                        should be lists of edges of theShape.
4597                 theName Object name; when specified, this parameter is used
4598                         for result publication in the study. Otherwise, if automatic
4599                         publication is switched on, default value is used for result name.
4600
4601             Returns:
4602                 New GEOM_Object, containing an edge or wire that represent
4603                                  source pipe's path.
4604             """
4605             anObj = self.PrimOp.RestorePathEdges(theShape, listEdges1, listEdges2)
4606             RaiseIfFailed("RestorePath", self.PrimOp)
4607             self._autoPublish(anObj, theName, "path")
4608             return anObj
4609
4610         # end of l3_complex
4611         ## @}
4612
4613         ## @addtogroup l3_basic_go
4614         ## @{
4615
4616         ## Create a linear edge with specified ends.
4617         #  @param thePnt1 Point for the first end of edge.
4618         #  @param thePnt2 Point for the second end of edge.
4619         #  @param theName Object name; when specified, this parameter is used
4620         #         for result publication in the study. Otherwise, if automatic
4621         #         publication is switched on, default value is used for result name.
4622         #
4623         #  @return New GEOM.GEOM_Object, containing the created edge.
4624         #
4625         #  @ref tui_creation_edge "Example"
4626         @ManageTransactions("ShapesOp")
4627         def MakeEdge(self, thePnt1, thePnt2, theName=None):
4628             """
4629             Create a linear edge with specified ends.
4630
4631             Parameters:
4632                 thePnt1 Point for the first end of edge.
4633                 thePnt2 Point for the second end of edge.
4634                 theName Object name; when specified, this parameter is used
4635                         for result publication in the study. Otherwise, if automatic
4636                         publication is switched on, default value is used for result name.
4637
4638             Returns:
4639                 New GEOM.GEOM_Object, containing the created edge.
4640             """
4641             # Example: see GEOM_TestAll.py
4642             anObj = self.ShapesOp.MakeEdge(thePnt1, thePnt2)
4643             RaiseIfFailed("MakeEdge", self.ShapesOp)
4644             self._autoPublish(anObj, theName, "edge")
4645             return anObj
4646
4647         ## Create a new edge, corresponding to the given length on the given curve.
4648         #  @param theRefCurve The referenced curve (edge).
4649         #  @param theLength Length on the referenced curve. It can be negative.
4650         #  @param theStartPoint Any point can be selected for it, the new edge will begin
4651         #                       at the end of \a theRefCurve, close to the selected point.
4652         #                       If None, start from the first point of \a theRefCurve.
4653         #  @param theName Object name; when specified, this parameter is used
4654         #         for result publication in the study. Otherwise, if automatic
4655         #         publication is switched on, default value is used for result name.
4656         #
4657         #  @return New GEOM.GEOM_Object, containing the created edge.
4658         #
4659         #  @ref tui_creation_edge "Example"
4660         @ManageTransactions("ShapesOp")
4661         def MakeEdgeOnCurveByLength(self, theRefCurve, theLength, theStartPoint = None, theName=None):
4662             """
4663             Create a new edge, corresponding to the given length on the given curve.
4664
4665             Parameters:
4666                 theRefCurve The referenced curve (edge).
4667                 theLength Length on the referenced curve. It can be negative.
4668                 theStartPoint Any point can be selected for it, the new edge will begin
4669                               at the end of theRefCurve, close to the selected point.
4670                               If None, start from the first point of theRefCurve.
4671                 theName Object name; when specified, this parameter is used
4672                         for result publication in the study. Otherwise, if automatic
4673                         publication is switched on, default value is used for result name.
4674
4675             Returns:
4676                 New GEOM.GEOM_Object, containing the created edge.
4677             """
4678             # Example: see GEOM_TestAll.py
4679             theLength, Parameters = ParseParameters(theLength)
4680             anObj = self.ShapesOp.MakeEdgeOnCurveByLength(theRefCurve, theLength, theStartPoint)
4681             RaiseIfFailed("MakeEdgeOnCurveByLength", self.ShapesOp)
4682             anObj.SetParameters(Parameters)
4683             self._autoPublish(anObj, theName, "edge")
4684             return anObj
4685
4686         ## Create an edge from specified wire.
4687         #  @param theWire source Wire
4688         #  @param theLinearTolerance linear tolerance value (default = 1e-07)
4689         #  @param theAngularTolerance angular tolerance value (default = 1e-12)
4690         #  @param theName Object name; when specified, this parameter is used
4691         #         for result publication in the study. Otherwise, if automatic
4692         #         publication is switched on, default value is used for result name.
4693         #
4694         #  @return New GEOM.GEOM_Object, containing the created edge.
4695         #
4696         #  @ref tui_creation_edge "Example"
4697         @ManageTransactions("ShapesOp")
4698         def MakeEdgeWire(self, theWire, theLinearTolerance = 1e-07, theAngularTolerance = 1e-12, theName=None):
4699             """
4700             Create an edge from specified wire.
4701
4702             Parameters:
4703                 theWire source Wire
4704                 theLinearTolerance linear tolerance value (default = 1e-07)
4705                 theAngularTolerance angular tolerance value (default = 1e-12)
4706                 theName Object name; when specified, this parameter is used
4707                         for result publication in the study. Otherwise, if automatic
4708                         publication is switched on, default value is used for result name.
4709
4710             Returns:
4711                 New GEOM.GEOM_Object, containing the created edge.
4712             """
4713             # Example: see GEOM_TestAll.py
4714             anObj = self.ShapesOp.MakeEdgeWire(theWire, theLinearTolerance, theAngularTolerance)
4715             RaiseIfFailed("MakeEdgeWire", self.ShapesOp)
4716             self._autoPublish(anObj, theName, "edge")
4717             return anObj
4718
4719         ## Create a wire from the set of edges and wires.
4720         #  @param theEdgesAndWires List of edges and/or wires.
4721         #  @param theTolerance Maximum distance between vertices, that will be merged.
4722         #                      Values less than 1e-07 are equivalent to 1e-07 (Precision::Confusion())
4723         #  @param theName Object name; when specified, this parameter is used
4724         #         for result publication in the study. Otherwise, if automatic
4725         #         publication is switched on, default value is used for result name.
4726         #
4727         #  @return New GEOM.GEOM_Object, containing the created wire.
4728         #
4729         #  @ref tui_creation_wire "Example"
4730         @ManageTransactions("ShapesOp")
4731         def MakeWire(self, theEdgesAndWires, theTolerance = 1e-07, theName=None):
4732             """
4733             Create a wire from the set of edges and wires.
4734
4735             Parameters:
4736                 theEdgesAndWires List of edges and/or wires.
4737                 theTolerance Maximum distance between vertices, that will be merged.
4738                              Values less than 1e-07 are equivalent to 1e-07 (Precision::Confusion()).
4739                 theName Object name; when specified, this parameter is used
4740                         for result publication in the study. Otherwise, if automatic
4741                         publication is switched on, default value is used for result name.
4742
4743             Returns:
4744                 New GEOM.GEOM_Object, containing the created wire.
4745             """
4746             # Example: see GEOM_TestAll.py
4747             anObj = self.ShapesOp.MakeWire(theEdgesAndWires, theTolerance)
4748             RaiseIfFailed("MakeWire", self.ShapesOp)
4749             self._autoPublish(anObj, theName, "wire")
4750             return anObj
4751
4752         ## Create a face on the given wire.
4753         #  @param theWire closed Wire or Edge to build the face on.
4754         #  @param isPlanarWanted If TRUE, the algorithm tries to build a planar face.
4755         #                        If the tolerance of the obtained planar face is less
4756         #                        than 1e-06, this face will be returned, otherwise the
4757         #                        algorithm tries to build any suitable face on the given
4758         #                        wire and prints a warning message.
4759         #  @param theName Object name; when specified, this parameter is used
4760         #         for result publication in the study. Otherwise, if automatic
4761         #         publication is switched on, default value is used for result name.
4762         #
4763         #  @return New GEOM.GEOM_Object, containing the created face (compound of faces).
4764         #
4765         #  @ref tui_creation_face "Example"
4766         @ManageTransactions("ShapesOp")
4767         def MakeFace(self, theWire, isPlanarWanted, theName=None, raiseException=False):
4768             """
4769             Create a face on the given wire.
4770
4771             Parameters:
4772                 theWire closed Wire or Edge to build the face on.
4773                 isPlanarWanted If TRUE, the algorithm tries to build a planar face.
4774                                If the tolerance of the obtained planar face is less
4775                                than 1e-06, this face will be returned, otherwise the
4776                                algorithm tries to build any suitable face on the given
4777                                wire and prints a warning message.
4778                 theName Object name; when specified, this parameter is used
4779                         for result publication in the study. Otherwise, if automatic
4780                         publication is switched on, default value is used for result name.
4781
4782             Returns:
4783                 New GEOM.GEOM_Object, containing the created face (compound of faces).
4784             """
4785             # Example: see GEOM_TestAll.py
4786             anObj = self.ShapesOp.MakeFace(theWire, isPlanarWanted)
4787             if isPlanarWanted and anObj is not None and self.ShapesOp.GetErrorCode() == "MAKE_FACE_TOLERANCE_TOO_BIG":
4788                 PrintOrRaise("WARNING: Cannot build a planar face: required tolerance is too big. Non-planar face is built.",raiseException)
4789             else:
4790                 RaiseIfFailed("MakeFace", self.ShapesOp)
4791             self._autoPublish(anObj, theName, "face")
4792             return anObj
4793
4794         ## Create a face on the given wires set.
4795         #  @param theWires List of closed wires or edges to build the face on.
4796         #  @param isPlanarWanted If TRUE, the algorithm tries to build a planar face.
4797         #                        If the tolerance of the obtained planar face is less
4798         #                        than 1e-06, this face will be returned, otherwise the
4799         #                        algorithm tries to build any suitable face on the given
4800         #                        wire and prints a warning message.
4801         #  @param theName Object name; when specified, this parameter is used
4802         #         for result publication in the study. Otherwise, if automatic
4803         #         publication is switched on, default value is used for result name.
4804         #
4805         #  @return New GEOM.GEOM_Object, containing the created face (compound of faces).
4806         #
4807         #  @ref tui_creation_face "Example"
4808         @ManageTransactions("ShapesOp")
4809         def MakeFaceWires(self, theWires, isPlanarWanted, theName=None, raiseException=False):
4810             """
4811             Create a face on the given wires set.
4812
4813             Parameters:
4814                 theWires List of closed wires or edges to build the face on.
4815                 isPlanarWanted If TRUE, the algorithm tries to build a planar face.
4816                                If the tolerance of the obtained planar face is less
4817                                than 1e-06, this face will be returned, otherwise the
4818                                algorithm tries to build any suitable face on the given
4819                                wire and prints a warning message.
4820                 theName Object name; when specified, this parameter is used
4821                         for result publication in the study. Otherwise, if automatic
4822                         publication is switched on, default value is used for result name.
4823
4824             Returns:
4825                 New GEOM.GEOM_Object, containing the created face (compound of faces).
4826             """
4827             # Example: see GEOM_TestAll.py
4828             anObj = self.ShapesOp.MakeFaceWires(ToList(theWires), isPlanarWanted)
4829             if isPlanarWanted and anObj is not None and self.ShapesOp.GetErrorCode() == "MAKE_FACE_TOLERANCE_TOO_BIG":
4830                 PrintOrRaise("WARNING: Cannot build a planar face: required tolerance is too big. Non-planar face is built.",raiseException)
4831             else:
4832                 RaiseIfFailed("MakeFaceWires", self.ShapesOp)
4833             self._autoPublish(anObj, theName, "face")
4834             return anObj
4835
4836         ## See MakeFaceWires() method for details.
4837         #
4838         #  @ref tui_creation_face "Example 1"
4839         #  \n @ref swig_MakeFaces  "Example 2"
4840         def MakeFaces(self, theWires, isPlanarWanted, theName=None):
4841             """
4842             See geompy.MakeFaceWires() method for details.
4843             """
4844             # Example: see GEOM_TestOthers.py
4845             # note: auto-publishing is done in self.MakeFaceWires()
4846             anObj = self.MakeFaceWires(theWires, isPlanarWanted, theName)
4847             return anObj
4848
4849         ## Create a face based on a surface from given face bounded
4850         #  by given wire.
4851         #  @param theFace the face whose surface is used to create a new face.
4852         #  @param theWire the wire that will bound a new face.
4853         #  @param theName Object name; when specified, this parameter is used
4854         #         for result publication in the study. Otherwise, if automatic
4855         #         publication is switched on, default value is used for result name.
4856         #
4857         #  @return New GEOM.GEOM_Object, containing the created face.
4858         #
4859         #  @ref tui_creation_face "Example"
4860         @ManageTransactions("ShapesOp")
4861         def MakeFaceFromSurface(self, theFace, theWire, theName=None):
4862             """
4863             Create a face based on a surface from given face bounded
4864             by given wire.
4865
4866             Parameters:
4867                 theFace the face whose surface is used to create a new face.
4868                 theWire the wire that will bound a new face.
4869                 theName Object name; when specified, this parameter is used
4870                         for result publication in the study. Otherwise, if automatic
4871                         publication is switched on, default value is used for result name.
4872
4873             Returns:
4874                 New GEOM.GEOM_Object, containing the created face.
4875             """
4876             # Example: see GEOM_TestAll.py
4877             anObj = self.ShapesOp.MakeFaceFromSurface(theFace, theWire)
4878             RaiseIfFailed("MakeFaceFromSurface", self.ShapesOp)
4879             self._autoPublish(anObj, theName, "face")
4880             return anObj
4881         
4882         ## Create a non-planar face from a list of closed edges and a list of vertices.
4883         #  @param theEdges list of Edges(must be closed but not nesessarily belong to the same plane).
4884         #  @param theVertices list of vertices through which the result face must pass.
4885         #  @param theTolerance tolerance
4886         #  @param theName Object name; when specified, this parameter is used
4887         #         for result publication in the study. Otherwise, if automatic
4888         #         publication is switched on, default value is used for result name.
4889         #
4890         #  @return New GEOM.GEOM_Object, containing the created face.
4891         #
4892         #  @ref tui_creation_face "Example"
4893         @ManageTransactions("ShapesOp")
4894         def MakeWrappedFace(self, theEdges, theVertices, theTolerance, theName=None):
4895             """
4896             Create a non-planar face from a list of closed edges and a list of vertices.
4897
4898             Parameters:
4899                 theEdges list of Edges(must be closed but not nesessarily belong to the same plane).
4900                 theVertices list of vertices through which the result face must pass.
4901                 theTolerance tolerance
4902                 theName Object name; when specified, this parameter is used
4903                         for result publication in the study. Otherwise, if automatic
4904                         publication is switched on, default value is used for result name.
4905
4906             Returns:
4907                 New GEOM.GEOM_Object, containing the created face.
4908             """
4909             # Example: see GEOM_TestAll.py
4910             anObj = self.ShapesOp.MakeWrappedFace(theEdges, theVertices, theTolerance)
4911             RaiseIfFailed("MakeWrappedFace", self.ShapesOp)
4912             self._autoPublish(anObj, theName, "face")
4913             return anObj
4914           
4915         ## Create a face from a set of edges with the given constraints.
4916         #  @param theConstraints List of edges and constraint faces (as a sequence of a Edge + Face couples):
4917         #         - edges should form a closed wire;
4918         #         - for each edge, constraint face is optional: if a constraint face is missing
4919         #           for some edge, this means that there no constraint associated with this edge.
4920         #  @param theName Object name; when specified, this parameter is used
4921         #         for result publication in the study. Otherwise, if automatic
4922         #         publication is switched on, default value is used for result name.
4923         # 
4924         # @return New GEOM.GEOM_Object, containing the created face.
4925         # 
4926         # @ref tui_creation_face "Example"
4927         @ManageTransactions("ShapesOp")
4928         def MakeFaceWithConstraints(self, theConstraints, theName=None):
4929             """
4930             Create a face from a set of edges with the given constraints.
4931
4932             Parameters:
4933                 theConstraints List of edges and constraint faces (as a sequence of a Edge + Face couples):
4934                         - edges should form a closed wire;
4935                         - for each edge, constraint face is optional: if a constraint face is missing
4936                           for some edge, this means that there no constraint associated with this edge.
4937                 theName Object name; when specified, this parameter is used
4938                         for result publication in the study. Otherwise, if automatic
4939                         publication is switched on, default value is used for result name.
4940
4941             Returns:
4942                 New GEOM.GEOM_Object, containing the created face.
4943             """
4944             # Example: see GEOM_TestAll.py
4945             anObj = self.ShapesOp.MakeFaceWithConstraints(theConstraints)
4946             if anObj is None:
4947                 RaiseIfFailed("MakeFaceWithConstraints", self.ShapesOp)
4948             self._autoPublish(anObj, theName, "face")
4949             return anObj
4950
4951         ## Create a shell from the set of faces, shells and/or compounds of faces.
4952         #  @param theFacesAndShells List of faces, shells and/or compounds of faces.
4953         #  @param theName Object name; when specified, this parameter is used
4954         #         for result publication in the study. Otherwise, if automatic
4955         #         publication is switched on, default value is used for result name.
4956         #
4957         #  @return New GEOM.GEOM_Object, containing the created shell (compound of shells).
4958         #
4959         #  @ref tui_creation_shell "Example"
4960         @ManageTransactions("ShapesOp")
4961         def MakeShell(self, theFacesAndShells, theName=None):
4962             """
4963             Create a shell from the set of faces and shells.
4964
4965             Parameters:
4966                 theFacesAndShells List of faces and/or shells.
4967                 theName Object name; when specified, this parameter is used
4968                         for result publication in the study. Otherwise, if automatic
4969                         publication is switched on, default value is used for result name.
4970
4971             Returns:
4972                 New GEOM.GEOM_Object, containing the created shell (compound of shells).
4973             """
4974             # Example: see GEOM_TestAll.py
4975             anObj = self.ShapesOp.MakeShell( ToList( theFacesAndShells ))
4976             RaiseIfFailed("MakeShell", self.ShapesOp)
4977             self._autoPublish(anObj, theName, "shell")
4978             return anObj
4979
4980         ## Create a solid, bounded by the given shells.
4981         #  @param theShells Sequence of bounding shells.
4982         #  @param theName Object name; when specified, this parameter is used
4983         #         for result publication in the study. Otherwise, if automatic
4984         #         publication is switched on, default value is used for result name.
4985         #
4986         #  @return New GEOM.GEOM_Object, containing the created solid.
4987         #
4988         #  @ref tui_creation_solid "Example"
4989         @ManageTransactions("ShapesOp")
4990         def MakeSolid(self, theShells, theName=None):
4991             """
4992             Create a solid, bounded by the given shells.
4993
4994             Parameters:
4995                 theShells Sequence of bounding shells.
4996                 theName Object name; when specified, this parameter is used
4997                         for result publication in the study. Otherwise, if automatic
4998                         publication is switched on, default value is used for result name.
4999
5000             Returns:
5001                 New GEOM.GEOM_Object, containing the created solid.
5002             """
5003             # Example: see GEOM_TestAll.py
5004             theShells = ToList(theShells)
5005             if len(theShells) == 1:
5006                 descr = self._IsGoodForSolid(theShells[0])
5007                 #if len(descr) > 0:
5008                 #    raise RuntimeError, "MakeSolidShells : " + descr
5009                 if descr == "WRN_SHAPE_UNCLOSED":
5010                     raise RuntimeError("MakeSolidShells : Unable to create solid from unclosed shape")
5011             anObj = self.ShapesOp.MakeSolidShells(theShells)
5012             RaiseIfFailed("MakeSolidShells", self.ShapesOp)
5013             self._autoPublish(anObj, theName, "solid")
5014             return anObj
5015
5016         ## Create a compound of the given shapes.
5017         #  @param theShapes List of shapes to put in compound.
5018         #  @param theName Object name; when specified, this parameter is used
5019         #         for result publication in the study. Otherwise, if automatic
5020         #         publication is switched on, default value is used for result name.
5021         #
5022         #  @return New GEOM.GEOM_Object, containing the created compound.
5023         #
5024         #  @ref tui_creation_compound "Example"
5025         @ManageTransactions("ShapesOp")
5026         def MakeCompound(self, theShapes, theName=None):
5027             """
5028             Create a compound of the given shapes.
5029
5030             Parameters:
5031                 theShapes List of shapes to put in compound.
5032                 theName Object name; when specified, this parameter is used
5033                         for result publication in the study. Otherwise, if automatic
5034                         publication is switched on, default value is used for result name.
5035
5036             Returns:
5037                 New GEOM.GEOM_Object, containing the created compound.
5038             """
5039             # Example: see GEOM_TestAll.py
5040             anObj = self.ShapesOp.MakeCompound(ToList(theShapes))
5041             RaiseIfFailed("MakeCompound", self.ShapesOp)
5042             self._autoPublish(anObj, theName, "compound")
5043             return anObj
5044         
5045         ## Create a solid (or solids) from the set of faces and/or shells.
5046         #  @param theFacesOrShells List of faces and/or shells.
5047         #  @param isIntersect If TRUE, forces performing intersections
5048         #         between arguments; otherwise (default) intersection is not performed.
5049         #  @param theName Object name; when specified, this parameter is used
5050         #         for result publication in the study. Otherwise, if automatic
5051         #         publication is switched on, default value is used for result name.
5052         #
5053         #  @return New GEOM.GEOM_Object, containing the created solid (or compound of solids).
5054         #
5055         #  @ref tui_creation_solid_from_faces "Example"
5056         @ManageTransactions("ShapesOp")
5057         def MakeSolidFromConnectedFaces(self, theFacesOrShells, isIntersect = False, theName=None):
5058             """
5059             Create a solid (or solids) from the set of connected faces and/or shells.
5060
5061             Parameters:
5062                 theFacesOrShells List of faces and/or shells.
5063                 isIntersect If TRUE, forces performing intersections
5064                         between arguments; otherwise (default) intersection is not performed
5065                 theName Object name; when specified, this parameter is used.
5066                         for result publication in the study. Otherwise, if automatic
5067                         publication is switched on, default value is used for result name.
5068
5069             Returns:
5070                 New GEOM.GEOM_Object, containing the created solid (or compound of solids).
5071             """
5072             # Example: see GEOM_TestAll.py
5073             anObj = self.ShapesOp.MakeSolidFromConnectedFaces(theFacesOrShells, isIntersect)
5074             RaiseIfFailed("MakeSolidFromConnectedFaces", self.ShapesOp)
5075             self._autoPublish(anObj, theName, "solid")
5076             return anObj
5077
5078         # end of l3_basic_go
5079         ## @}
5080
5081         ## @addtogroup l2_measure
5082         ## @{
5083
5084         ## Gives quantity of faces in the given shape.
5085         #  @param theShape Shape to count faces of.
5086         #  @return Quantity of faces.
5087         #
5088         #  @ref swig_NumberOf "Example"
5089         @ManageTransactions("ShapesOp")
5090         def NumberOfFaces(self, theShape):
5091             """
5092             Gives quantity of faces in the given shape.
5093
5094             Parameters:
5095                 theShape Shape to count faces of.
5096
5097             Returns:
5098                 Quantity of faces.
5099             """
5100             # Example: see GEOM_TestOthers.py
5101             nb_faces = self.ShapesOp.NumberOfFaces(theShape)
5102             RaiseIfFailed("NumberOfFaces", self.ShapesOp)
5103             return nb_faces
5104
5105         ## Gives quantity of edges in the given shape.
5106         #  @param theShape Shape to count edges of.
5107         #  @return Quantity of edges.
5108         #
5109         #  @ref swig_NumberOf "Example"
5110         @ManageTransactions("ShapesOp")
5111         def NumberOfEdges(self, theShape):
5112             """
5113             Gives quantity of edges in the given shape.
5114
5115             Parameters:
5116                 theShape Shape to count edges of.
5117
5118             Returns:
5119                 Quantity of edges.
5120             """
5121             # Example: see GEOM_TestOthers.py
5122             nb_edges = self.ShapesOp.NumberOfEdges(theShape)
5123             RaiseIfFailed("NumberOfEdges", self.ShapesOp)
5124             return nb_edges
5125
5126         ## Gives quantity of sub-shapes of type theShapeType in the given shape.
5127         #  @param theShape Shape to count sub-shapes of.
5128         #  @param theShapeType Type of sub-shapes to count (see ShapeType())
5129         #  @return Quantity of sub-shapes of given type.
5130         #
5131         #  @ref swig_NumberOf "Example"
5132         @ManageTransactions("ShapesOp")
5133         def NumberOfSubShapes(self, theShape, theShapeType):
5134             """
5135             Gives quantity of sub-shapes of type theShapeType in the given shape.
5136
5137             Parameters:
5138                 theShape Shape to count sub-shapes of.
5139                 theShapeType Type of sub-shapes to count (see geompy.ShapeType)
5140
5141             Returns:
5142                 Quantity of sub-shapes of given type.
5143             """
5144             # Example: see GEOM_TestOthers.py
5145             nb_ss = self.ShapesOp.NumberOfSubShapes(theShape, theShapeType)
5146             RaiseIfFailed("NumberOfSubShapes", self.ShapesOp)
5147             return nb_ss
5148
5149         ## Gives quantity of solids in the given shape.
5150         #  @param theShape Shape to count solids in.
5151         #  @return Quantity of solids.
5152         #
5153         #  @ref swig_NumberOf "Example"
5154         @ManageTransactions("ShapesOp")
5155         def NumberOfSolids(self, theShape):
5156             """
5157             Gives quantity of solids in the given shape.
5158
5159             Parameters:
5160                 theShape Shape to count solids in.
5161
5162             Returns:
5163                 Quantity of solids.
5164             """
5165             # Example: see GEOM_TestOthers.py
5166             nb_solids = self.ShapesOp.NumberOfSubShapes(theShape, self.ShapeType["SOLID"])
5167             RaiseIfFailed("NumberOfSolids", self.ShapesOp)
5168             return nb_solids
5169
5170         # end of l2_measure
5171         ## @}
5172
5173         ## @addtogroup l3_healing
5174         ## @{
5175
5176         ## Reverses an orientation the given shape.
5177         #  @param theShape Shape to be reversed.
5178         #  @param theName Object name; when specified, this parameter is used
5179         #         for result publication in the study. Otherwise, if automatic
5180         #         publication is switched on, default value is used for result name.
5181         #
5182         #  @return The reversed copy of theShape.
5183         #
5184         #  @ref swig_ChangeOrientation "Example"
5185         @ManageTransactions("ShapesOp")
5186         def ChangeOrientation(self, theShape, theName=None):
5187             """
5188             Reverses an orientation the given shape.
5189
5190             Parameters:
5191                 theShape Shape to be reversed.
5192                 theName Object name; when specified, this parameter is used
5193                         for result publication in the study. Otherwise, if automatic
5194                         publication is switched on, default value is used for result name.
5195
5196             Returns:
5197                 The reversed copy of theShape.
5198             """
5199             # Example: see GEOM_TestAll.py
5200             anObj = self.ShapesOp.ChangeOrientation(theShape)
5201             RaiseIfFailed("ChangeOrientation", self.ShapesOp)
5202             self._autoPublish(anObj, theName, "reversed")
5203             return anObj
5204
5205         ## See ChangeOrientation() method for details.
5206         #
5207         #  @ref swig_OrientationChange "Example"
5208         def OrientationChange(self, theShape, theName=None):
5209             """
5210             See geompy.ChangeOrientation method for details.
5211             """
5212             # Example: see GEOM_TestOthers.py
5213             # note: auto-publishing is done in self.ChangeOrientation()
5214             anObj = self.ChangeOrientation(theShape, theName)
5215             return anObj
5216
5217         # end of l3_healing
5218         ## @}
5219
5220         ## @addtogroup l4_obtain
5221         ## @{
5222
5223         ## Retrieve all free faces from the given shape.
5224         #  Free face is a face, which is not shared between two shells of the shape.
5225         #  @param theShape Shape to find free faces in.
5226         #  @return List of IDs of all free faces, contained in theShape.
5227         #
5228         #  @ref tui_free_faces_page "Example"
5229         @ManageTransactions("ShapesOp")
5230         def GetFreeFacesIDs(self,theShape):
5231             """
5232             Retrieve all free faces from the given shape.
5233             Free face is a face, which is not shared between two shells of the shape.
5234
5235             Parameters:
5236                 theShape Shape to find free faces in.
5237
5238             Returns:
5239                 List of IDs of all free faces, contained in theShape.
5240             """
5241             # Example: see GEOM_TestOthers.py
5242             anIDs = self.ShapesOp.GetFreeFacesIDs(theShape)
5243             RaiseIfFailed("GetFreeFacesIDs", self.ShapesOp)
5244             return anIDs
5245
5246         ## Get all sub-shapes of theShape1 of the given type, shared with theShape2.
5247         #  @param theShape1 Shape to find sub-shapes in.
5248         #  @param theShape2 Shape to find shared sub-shapes with.
5249         #  @param theShapeType Type of sub-shapes to be retrieved.
5250         #  @param theName Object name; when specified, this parameter is used
5251         #         for result publication in the study. Otherwise, if automatic
5252         #         publication is switched on, default value is used for result name.
5253         #
5254         #  @return List of sub-shapes of theShape1, shared with theShape2.
5255         #
5256         #  @ref swig_GetSharedShapes "Example"
5257         @ManageTransactions("ShapesOp")
5258         def GetSharedShapes(self, theShape1, theShape2, theShapeType, theName=None):
5259             """
5260             Get all sub-shapes of theShape1 of the given type, shared with theShape2.
5261
5262             Parameters:
5263                 theShape1 Shape to find sub-shapes in.
5264                 theShape2 Shape to find shared sub-shapes with.
5265                 theShapeType Type of sub-shapes to be retrieved.
5266                 theName Object name; when specified, this parameter is used
5267                         for result publication in the study. Otherwise, if automatic
5268                         publication is switched on, default value is used for result name.
5269
5270             Returns:
5271                 List of sub-shapes of theShape1, shared with theShape2.
5272             """
5273             # Example: see GEOM_TestOthers.py
5274             aList = self.ShapesOp.GetSharedShapes(theShape1, theShape2, theShapeType)
5275             RaiseIfFailed("GetSharedShapes", self.ShapesOp)
5276             self._autoPublish(aList, theName, "shared")
5277             return aList
5278
5279         ## Get sub-shapes, shared by input shapes.
5280         #  @param theShapes Either a list or compound of shapes to find common sub-shapes of.
5281         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType()).
5282         #  @param theMultiShare Specifies what type of shares should be checked:
5283         #         - @c True (default): search sub-shapes from 1st input shape shared with all other input shapes;
5284         #         - @c False: causes to search sub-shapes shared between couples of input shapes.
5285         #  @param theName Object name; when specified, this parameter is used
5286         #         for result publication in the study. Otherwise, if automatic
5287         #         publication is switched on, default value is used for result name.
5288         #
5289         #  @note If @a theShapes contains single compound, the shares between all possible couples of 
5290         #        its top-level shapes are returned; otherwise, only shares between 1st input shape
5291         #        and all rest input shapes are returned.
5292         #
5293         #  @return List of all found sub-shapes.
5294         #
5295         #  Examples:
5296         #  - @ref tui_shared_shapes "Example 1"
5297         #  - @ref swig_GetSharedShapes "Example 2"
5298         @ManageTransactions("ShapesOp")
5299         def GetSharedShapesMulti(self, theShapes, theShapeType, theMultiShare=True, theName=None):
5300             """
5301             Get sub-shapes, shared by input shapes.
5302
5303             Parameters:
5304                 theShapes Either a list or compound of shapes to find common sub-shapes of.
5305                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType).
5306                 theMultiShare Specifies what type of shares should be checked:
5307                   - True (default): search sub-shapes from 1st input shape shared with all other input shapes;
5308                   - False: causes to search sub-shapes shared between couples of input shapes.
5309                 theName Object name; when specified, this parameter is used
5310                         for result publication in the study. Otherwise, if automatic
5311                         publication is switched on, default value is used for result name.
5312
5313             Note: if theShapes contains single compound, the shares between all possible couples of 
5314                   its top-level shapes are returned; otherwise, only shares between 1st input shape
5315                   and all rest input shapes are returned.
5316
5317             Returns:
5318                 List of all found sub-shapes.
5319             """
5320             # Example: see GEOM_TestOthers.py
5321             aList = self.ShapesOp.GetSharedShapesMulti(ToList(theShapes), theShapeType, theMultiShare)
5322             RaiseIfFailed("GetSharedShapesMulti", self.ShapesOp)
5323             self._autoPublish(aList, theName, "shared")
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         #  @param theName Object name; when specified, this parameter is used
5335         #         for result publication in the study. Otherwise, if automatic
5336         #         publication is switched on, default value is used for result name.
5337         #
5338         #  @return List of all found sub-shapes.
5339         #
5340         #  @ref swig_GetShapesOnPlane "Example"
5341         @ManageTransactions("ShapesOp")
5342         def GetShapesOnPlane(self, theShape, theShapeType, theAx1, theState, theName=None):
5343             """
5344             Find in theShape all sub-shapes of type theShapeType,
5345             situated relatively the specified plane by the certain way,
5346             defined through theState parameter.
5347
5348             Parameters:
5349                 theShape Shape to find sub-shapes of.
5350                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5351                 theAx1 Vector (or line, or linear edge), specifying normal
5352                        direction and location of the plane to find shapes on.
5353                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5354                 theName Object name; when specified, this parameter is used
5355                         for result publication in the study. Otherwise, if automatic
5356                         publication is switched on, default value is used for result name.
5357
5358             Returns:
5359                 List of all found sub-shapes.
5360             """
5361             # Example: see GEOM_TestOthers.py
5362             aList = self.ShapesOp.GetShapesOnPlane(theShape, theShapeType, theAx1, theState)
5363             RaiseIfFailed("GetShapesOnPlane", self.ShapesOp)
5364             self._autoPublish(aList, theName, "shapeOnPlane")
5365             return aList
5366
5367         ## Find in <VAR>theShape</VAR> all sub-shapes of type <VAR>theShapeType</VAR>,
5368         #  situated relatively the specified plane by the certain way,
5369         #  defined through <VAR>theState</VAR> parameter.
5370         #  @param theShape Shape to find sub-shapes of.
5371         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5372         #  @param theAx1 Vector (or line, or linear edge), specifying normal
5373         #                direction and location of the plane to find shapes on.
5374         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5375         #
5376         #  @return List of all found sub-shapes indices.
5377         #
5378         #  @ref swig_GetShapesOnPlaneIDs "Example"
5379         @ManageTransactions("ShapesOp")
5380         def GetShapesOnPlaneIDs(self, theShape, theShapeType, theAx1, theState):
5381             """
5382             Find in theShape all sub-shapes of type theShapeType,
5383             situated relatively the specified plane by the certain way,
5384             defined through theState parameter.
5385
5386             Parameters:
5387                 theShape Shape to find sub-shapes of.
5388                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5389                 theAx1 Vector (or line, or linear edge), specifying normal
5390                        direction and location of the plane to find shapes on.
5391                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5392
5393             Returns:
5394                 List of all found sub-shapes indices.
5395             """
5396             # Example: see GEOM_TestOthers.py
5397             aList = self.ShapesOp.GetShapesOnPlaneIDs(theShape, theShapeType, theAx1, theState)
5398             RaiseIfFailed("GetShapesOnPlaneIDs", self.ShapesOp)
5399             return aList
5400
5401         ## Find in <VAR>theShape</VAR> all sub-shapes of type <VAR>theShapeType</VAR>,
5402         #  situated relatively the specified plane by the certain way,
5403         #  defined through <VAR>theState</VAR> parameter.
5404         #  @param theShape Shape to find sub-shapes of.
5405         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5406         #  @param theAx1 Vector (or line, or linear edge), specifying normal
5407         #                direction of the plane to find shapes on.
5408         #  @param thePnt Point specifying location of the plane to find shapes on.
5409         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5410         #  @param theName Object name; when specified, this parameter is used
5411         #         for result publication in the study. Otherwise, if automatic
5412         #         publication is switched on, default value is used for result name.
5413         #
5414         #  @return List of all found sub-shapes.
5415         #
5416         #  @ref swig_GetShapesOnPlaneWithLocation "Example"
5417         @ManageTransactions("ShapesOp")
5418         def GetShapesOnPlaneWithLocation(self, theShape, theShapeType, theAx1, thePnt, theState, theName=None):
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                 theName Object name; when specified, this parameter is used
5432                         for result publication in the study. Otherwise, if automatic
5433                         publication is switched on, default value is used for result name.
5434
5435             Returns:
5436                 List of all found sub-shapes.
5437             """
5438             # Example: see GEOM_TestOthers.py
5439             aList = self.ShapesOp.GetShapesOnPlaneWithLocation(theShape, theShapeType,
5440                                                                theAx1, thePnt, theState)
5441             RaiseIfFailed("GetShapesOnPlaneWithLocation", self.ShapesOp)
5442             self._autoPublish(aList, theName, "shapeOnPlane")
5443             return aList
5444
5445         ## Find in <VAR>theShape</VAR> all sub-shapes of type <VAR>theShapeType</VAR>,
5446         #  situated relatively the specified plane by the certain way,
5447         #  defined through <VAR>theState</VAR> parameter.
5448         #  @param theShape Shape to find sub-shapes of.
5449         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5450         #  @param theAx1 Vector (or line, or linear edge), specifying normal
5451         #                direction of the plane to find shapes on.
5452         #  @param thePnt Point specifying location of the plane to find shapes on.
5453         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5454         #
5455         #  @return List of all found sub-shapes indices.
5456         #
5457         #  @ref swig_GetShapesOnPlaneWithLocationIDs "Example"
5458         @ManageTransactions("ShapesOp")
5459         def GetShapesOnPlaneWithLocationIDs(self, theShape, theShapeType, theAx1, thePnt, theState):
5460             """
5461             Find in theShape all sub-shapes of type theShapeType,
5462             situated relatively the specified plane by the certain way,
5463             defined through theState parameter.
5464
5465             Parameters:
5466                 theShape Shape to find sub-shapes of.
5467                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5468                 theAx1 Vector (or line, or linear edge), specifying normal
5469                        direction and location of the plane to find shapes on.
5470                 thePnt Point specifying location of the plane to find shapes on.
5471                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5472
5473             Returns:
5474                 List of all found sub-shapes indices.
5475             """
5476             # Example: see GEOM_TestOthers.py
5477             aList = self.ShapesOp.GetShapesOnPlaneWithLocationIDs(theShape, theShapeType,
5478                                                                   theAx1, thePnt, theState)
5479             RaiseIfFailed("GetShapesOnPlaneWithLocationIDs", self.ShapesOp)
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         #  @param theName Object name; when specified, this parameter is used
5491         #         for result publication in the study. Otherwise, if automatic
5492         #         publication is switched on, default value is used for result name.
5493         #
5494         #  @return List of all found sub-shapes.
5495         #
5496         #  @ref swig_GetShapesOnCylinder "Example"
5497         @ManageTransactions("ShapesOp")
5498         def GetShapesOnCylinder(self, theShape, theShapeType, theAxis, theRadius, theState, theName=None):
5499             """
5500             Find in theShape all sub-shapes of type theShapeType, situated relatively
5501             the specified cylinder by the certain way, defined through theState parameter.
5502
5503             Parameters:
5504                 theShape Shape to find sub-shapes of.
5505                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5506                 theAxis Vector (or line, or linear edge), specifying
5507                         axis of the cylinder to find shapes on.
5508                 theRadius Radius of the cylinder to find shapes on.
5509                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5510                 theName Object name; when specified, this parameter is used
5511                         for result publication in the study. Otherwise, if automatic
5512                         publication is switched on, default value is used for result name.
5513
5514             Returns:
5515                 List of all found sub-shapes.
5516             """
5517             # Example: see GEOM_TestOthers.py
5518             aList = self.ShapesOp.GetShapesOnCylinder(theShape, theShapeType, theAxis, theRadius, theState)
5519             RaiseIfFailed("GetShapesOnCylinder", self.ShapesOp)
5520             self._autoPublish(aList, theName, "shapeOnCylinder")
5521             return aList
5522
5523         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
5524         #  the specified cylinder by the certain way, defined through \a theState parameter.
5525         #  @param theShape Shape to find sub-shapes of.
5526         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5527         #  @param theAxis Vector (or line, or linear edge), specifying
5528         #                 axis of the cylinder to find shapes on.
5529         #  @param theRadius Radius of the cylinder to find shapes on.
5530         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5531         #
5532         #  @return List of all found sub-shapes indices.
5533         #
5534         #  @ref swig_GetShapesOnCylinderIDs "Example"
5535         @ManageTransactions("ShapesOp")
5536         def GetShapesOnCylinderIDs(self, theShape, theShapeType, theAxis, theRadius, theState):
5537             """
5538             Find in theShape all sub-shapes of type theShapeType, situated relatively
5539             the specified cylinder by the certain way, defined through theState parameter.
5540
5541             Parameters:
5542                 theShape Shape to find sub-shapes of.
5543                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5544                 theAxis Vector (or line, or linear edge), specifying
5545                         axis of the cylinder to find shapes on.
5546                 theRadius Radius of the cylinder to find shapes on.
5547                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5548
5549             Returns:
5550                 List of all found sub-shapes indices.
5551             """
5552             # Example: see GEOM_TestOthers.py
5553             aList = self.ShapesOp.GetShapesOnCylinderIDs(theShape, theShapeType, theAxis, theRadius, theState)
5554             RaiseIfFailed("GetShapesOnCylinderIDs", self.ShapesOp)
5555             return aList
5556
5557         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
5558         #  the specified cylinder by the certain way, defined through \a theState parameter.
5559         #  @param theShape Shape to find sub-shapes of.
5560         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5561         #  @param theAxis Vector (or line, or linear edge), specifying
5562         #                 axis of the cylinder to find shapes on.
5563         #  @param thePnt Point specifying location of the bottom of the cylinder.
5564         #  @param theRadius Radius of the cylinder to find shapes on.
5565         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5566         #  @param theName Object name; when specified, this parameter is used
5567         #         for result publication in the study. Otherwise, if automatic
5568         #         publication is switched on, default value is used for result name.
5569         #
5570         #  @return List of all found sub-shapes.
5571         #
5572         #  @ref swig_GetShapesOnCylinderWithLocation "Example"
5573         @ManageTransactions("ShapesOp")
5574         def GetShapesOnCylinderWithLocation(self, theShape, theShapeType, theAxis, thePnt, theRadius, theState, theName=None):
5575             """
5576             Find in theShape all sub-shapes of type theShapeType, situated relatively
5577             the specified cylinder by the certain way, defined through theState parameter.
5578
5579             Parameters:
5580                 theShape Shape to find sub-shapes of.
5581                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5582                 theAxis Vector (or line, or linear edge), specifying
5583                         axis of the cylinder to find shapes on.
5584                 theRadius Radius of the cylinder to find shapes on.
5585                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5586                 theName Object name; when specified, this parameter is used
5587                         for result publication in the study. Otherwise, if automatic
5588                         publication is switched on, default value is used for result name.
5589
5590             Returns:
5591                 List of all found sub-shapes.
5592             """
5593             # Example: see GEOM_TestOthers.py
5594             aList = self.ShapesOp.GetShapesOnCylinderWithLocation(theShape, theShapeType, theAxis, thePnt, theRadius, theState)
5595             RaiseIfFailed("GetShapesOnCylinderWithLocation", self.ShapesOp)
5596             self._autoPublish(aList, theName, "shapeOnCylinder")
5597             return aList
5598
5599         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
5600         #  the specified cylinder by the certain way, defined through \a theState parameter.
5601         #  @param theShape Shape to find sub-shapes of.
5602         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5603         #  @param theAxis Vector (or line, or linear edge), specifying
5604         #                 axis of the cylinder to find shapes on.
5605         #  @param thePnt Point specifying location of the bottom of the cylinder.
5606         #  @param theRadius Radius of the cylinder to find shapes on.
5607         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5608         #
5609         #  @return List of all found sub-shapes indices
5610         #
5611         #  @ref swig_GetShapesOnCylinderWithLocationIDs "Example"
5612         @ManageTransactions("ShapesOp")
5613         def GetShapesOnCylinderWithLocationIDs(self, theShape, theShapeType, theAxis, thePnt, theRadius, theState):
5614             """
5615             Find in theShape all sub-shapes of type theShapeType, situated relatively
5616             the specified cylinder by the certain way, defined through theState parameter.
5617
5618             Parameters:
5619                 theShape Shape to find sub-shapes of.
5620                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5621                 theAxis Vector (or line, or linear edge), specifying
5622                         axis of the cylinder to find shapes on.
5623                 theRadius Radius of the cylinder to find shapes on.
5624                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5625
5626             Returns:
5627                 List of all found sub-shapes indices.
5628             """
5629             # Example: see GEOM_TestOthers.py
5630             aList = self.ShapesOp.GetShapesOnCylinderWithLocationIDs(theShape, theShapeType, theAxis, thePnt, theRadius, theState)
5631             RaiseIfFailed("GetShapesOnCylinderWithLocationIDs", self.ShapesOp)
5632             return aList
5633
5634         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
5635         #  the specified sphere by the certain way, defined through \a theState parameter.
5636         #  @param theShape Shape to find sub-shapes of.
5637         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5638         #  @param theCenter Point, specifying center of the sphere to find shapes on.
5639         #  @param theRadius Radius of the sphere to find shapes on.
5640         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5641         #  @param theName Object name; when specified, this parameter is used
5642         #         for result publication in the study. Otherwise, if automatic
5643         #         publication is switched on, default value is used for result name.
5644         #
5645         #  @return List of all found sub-shapes.
5646         #
5647         #  @ref swig_GetShapesOnSphere "Example"
5648         @ManageTransactions("ShapesOp")
5649         def GetShapesOnSphere(self, theShape, theShapeType, theCenter, theRadius, theState, theName=None):
5650             """
5651             Find in theShape all sub-shapes of type theShapeType, situated relatively
5652             the specified sphere by the certain way, defined through theState parameter.
5653
5654             Parameters:
5655                 theShape Shape to find sub-shapes of.
5656                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5657                 theCenter Point, specifying center of the sphere to find shapes on.
5658                 theRadius Radius of the sphere to find shapes on.
5659                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5660                 theName Object name; when specified, this parameter is used
5661                         for result publication in the study. Otherwise, if automatic
5662                         publication is switched on, default value is used for result name.
5663
5664             Returns:
5665                 List of all found sub-shapes.
5666             """
5667             # Example: see GEOM_TestOthers.py
5668             aList = self.ShapesOp.GetShapesOnSphere(theShape, theShapeType, theCenter, theRadius, theState)
5669             RaiseIfFailed("GetShapesOnSphere", self.ShapesOp)
5670             self._autoPublish(aList, theName, "shapeOnSphere")
5671             return aList
5672
5673         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
5674         #  the specified sphere by the certain way, defined through \a theState parameter.
5675         #  @param theShape Shape to find sub-shapes of.
5676         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5677         #  @param theCenter Point, specifying center of the sphere to find shapes on.
5678         #  @param theRadius Radius of the sphere to find shapes on.
5679         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5680         #
5681         #  @return List of all found sub-shapes indices.
5682         #
5683         #  @ref swig_GetShapesOnSphereIDs "Example"
5684         @ManageTransactions("ShapesOp")
5685         def GetShapesOnSphereIDs(self, theShape, theShapeType, theCenter, theRadius, theState):
5686             """
5687             Find in theShape all sub-shapes of type theShapeType, situated relatively
5688             the specified sphere by the certain way, defined through theState parameter.
5689
5690             Parameters:
5691                 theShape Shape to find sub-shapes of.
5692                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5693                 theCenter Point, specifying center of the sphere to find shapes on.
5694                 theRadius Radius of the sphere to find shapes on.
5695                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5696
5697             Returns:
5698                 List of all found sub-shapes indices.
5699             """
5700             # Example: see GEOM_TestOthers.py
5701             aList = self.ShapesOp.GetShapesOnSphereIDs(theShape, theShapeType, theCenter, theRadius, theState)
5702             RaiseIfFailed("GetShapesOnSphereIDs", self.ShapesOp)
5703             return aList
5704
5705         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
5706         #  the specified quadrangle by the certain way, defined through \a theState parameter.
5707         #  @param theShape Shape to find sub-shapes of.
5708         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5709         #  @param theTopLeftPoint Point, specifying top left corner of a quadrangle
5710         #  @param theTopRightPoint Point, specifying top right corner of a quadrangle
5711         #  @param theBottomLeftPoint Point, specifying bottom left corner of a quadrangle
5712         #  @param theBottomRightPoint Point, specifying bottom right corner of a quadrangle
5713         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5714         #  @param theName Object name; when specified, this parameter is used
5715         #         for result publication in the study. Otherwise, if automatic
5716         #         publication is switched on, default value is used for result name.
5717         #
5718         #  @return List of all found sub-shapes.
5719         #
5720         #  @ref swig_GetShapesOnQuadrangle "Example"
5721         @ManageTransactions("ShapesOp")
5722         def GetShapesOnQuadrangle(self, theShape, theShapeType,
5723                                   theTopLeftPoint, theTopRightPoint,
5724                                   theBottomLeftPoint, theBottomRightPoint, theState, theName=None):
5725             """
5726             Find in theShape all sub-shapes of type theShapeType, situated relatively
5727             the specified quadrangle by the certain way, defined through theState parameter.
5728
5729             Parameters:
5730                 theShape Shape to find sub-shapes of.
5731                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5732                 theTopLeftPoint Point, specifying top left corner of a quadrangle
5733                 theTopRightPoint Point, specifying top right corner of a quadrangle
5734                 theBottomLeftPoint Point, specifying bottom left corner of a quadrangle
5735                 theBottomRightPoint Point, specifying bottom right corner of a quadrangle
5736                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5737                 theName Object name; when specified, this parameter is used
5738                         for result publication in the study. Otherwise, if automatic
5739                         publication is switched on, default value is used for result name.
5740
5741             Returns:
5742                 List of all found sub-shapes.
5743             """
5744             # Example: see GEOM_TestOthers.py
5745             aList = self.ShapesOp.GetShapesOnQuadrangle(theShape, theShapeType,
5746                                                         theTopLeftPoint, theTopRightPoint,
5747                                                         theBottomLeftPoint, theBottomRightPoint, theState)
5748             RaiseIfFailed("GetShapesOnQuadrangle", self.ShapesOp)
5749             self._autoPublish(aList, theName, "shapeOnQuadrangle")
5750             return aList
5751
5752         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
5753         #  the specified quadrangle by the certain way, defined through \a theState parameter.
5754         #  @param theShape Shape to find sub-shapes of.
5755         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5756         #  @param theTopLeftPoint Point, specifying top left corner of a quadrangle
5757         #  @param theTopRightPoint Point, specifying top right corner of a quadrangle
5758         #  @param theBottomLeftPoint Point, specifying bottom left corner of a quadrangle
5759         #  @param theBottomRightPoint Point, specifying bottom right corner of a quadrangle
5760         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5761         #
5762         #  @return List of all found sub-shapes indices.
5763         #
5764         #  @ref swig_GetShapesOnQuadrangleIDs "Example"
5765         @ManageTransactions("ShapesOp")
5766         def GetShapesOnQuadrangleIDs(self, theShape, theShapeType,
5767                                      theTopLeftPoint, theTopRightPoint,
5768                                      theBottomLeftPoint, theBottomRightPoint, theState):
5769             """
5770             Find in theShape all sub-shapes of type theShapeType, situated relatively
5771             the specified quadrangle by the certain way, defined through theState parameter.
5772
5773             Parameters:
5774                 theShape Shape to find sub-shapes of.
5775                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5776                 theTopLeftPoint Point, specifying top left corner of a quadrangle
5777                 theTopRightPoint Point, specifying top right corner of a quadrangle
5778                 theBottomLeftPoint Point, specifying bottom left corner of a quadrangle
5779                 theBottomRightPoint Point, specifying bottom right corner of a quadrangle
5780                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5781
5782             Returns:
5783                 List of all found sub-shapes indices.
5784             """
5785
5786             # Example: see GEOM_TestOthers.py
5787             aList = self.ShapesOp.GetShapesOnQuadrangleIDs(theShape, theShapeType,
5788                                                            theTopLeftPoint, theTopRightPoint,
5789                                                            theBottomLeftPoint, theBottomRightPoint, theState)
5790             RaiseIfFailed("GetShapesOnQuadrangleIDs", self.ShapesOp)
5791             return aList
5792
5793         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
5794         #  the specified \a theBox by the certain way, defined through \a theState parameter.
5795         #  @param theBox Shape for relative comparing.
5796         #  @param theShape Shape to find sub-shapes of.
5797         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5798         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5799         #  @param theName Object name; when specified, this parameter is used
5800         #         for result publication in the study. Otherwise, if automatic
5801         #         publication is switched on, default value is used for result name.
5802         #
5803         #  @return List of all found sub-shapes.
5804         #
5805         #  @ref swig_GetShapesOnBox "Example"
5806         @ManageTransactions("ShapesOp")
5807         def GetShapesOnBox(self, theBox, theShape, theShapeType, theState, theName=None):
5808             """
5809             Find in theShape all sub-shapes of type theShapeType, situated relatively
5810             the specified theBox by the certain way, defined through theState parameter.
5811
5812             Parameters:
5813                 theBox Shape for relative comparing.
5814                 theShape Shape to find sub-shapes of.
5815                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5816                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5817                 theName Object name; when specified, this parameter is used
5818                         for result publication in the study. Otherwise, if automatic
5819                         publication is switched on, default value is used for result name.
5820
5821             Returns:
5822                 List of all found sub-shapes.
5823             """
5824             # Example: see GEOM_TestOthers.py
5825             aList = self.ShapesOp.GetShapesOnBox(theBox, theShape, theShapeType, theState)
5826             RaiseIfFailed("GetShapesOnBox", self.ShapesOp)
5827             self._autoPublish(aList, theName, "shapeOnBox")
5828             return aList
5829
5830         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
5831         #  the specified \a theBox by the certain way, defined through \a theState parameter.
5832         #  @param theBox Shape for relative comparing.
5833         #  @param theShape Shape to find sub-shapes of.
5834         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5835         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5836         #
5837         #  @return List of all found sub-shapes indices.
5838         #
5839         #  @ref swig_GetShapesOnBoxIDs "Example"
5840         @ManageTransactions("ShapesOp")
5841         def GetShapesOnBoxIDs(self, theBox, theShape, theShapeType, theState):
5842             """
5843             Find in theShape all sub-shapes of type theShapeType, situated relatively
5844             the specified theBox by the certain way, defined through theState parameter.
5845
5846             Parameters:
5847                 theBox Shape for relative comparing.
5848                 theShape Shape to find sub-shapes of.
5849                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5850                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5851
5852             Returns:
5853                 List of all found sub-shapes indices.
5854             """
5855             # Example: see GEOM_TestOthers.py
5856             aList = self.ShapesOp.GetShapesOnBoxIDs(theBox, theShape, theShapeType, theState)
5857             RaiseIfFailed("GetShapesOnBoxIDs", self.ShapesOp)
5858             return aList
5859
5860         ## Find in \a theShape all sub-shapes of type \a theShapeType,
5861         #  situated relatively the specified \a theCheckShape by the
5862         #  certain way, defined through \a theState parameter.
5863         #  @param theCheckShape Shape for relative comparing. It must be a solid.
5864         #  @param theShape Shape to find sub-shapes of.
5865         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5866         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5867         #  @param theName Object name; when specified, this parameter is used
5868         #         for result publication in the study. Otherwise, if automatic
5869         #         publication is switched on, default value is used for result name.
5870         #
5871         #  @return List of all found sub-shapes.
5872         #
5873         #  @ref swig_GetShapesOnShape "Example"
5874         @ManageTransactions("ShapesOp")
5875         def GetShapesOnShape(self, theCheckShape, theShape, theShapeType, theState, theName=None):
5876             """
5877             Find in theShape all sub-shapes of type theShapeType,
5878             situated relatively the specified theCheckShape by the
5879             certain way, defined through theState parameter.
5880
5881             Parameters:
5882                 theCheckShape Shape for relative comparing. It must be a solid.
5883                 theShape Shape to find sub-shapes of.
5884                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5885                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5886                 theName Object name; when specified, this parameter is used
5887                         for result publication in the study. Otherwise, if automatic
5888                         publication is switched on, default value is used for result name.
5889
5890             Returns:
5891                 List of all found sub-shapes.
5892             """
5893             # Example: see GEOM_TestOthers.py
5894             aList = self.ShapesOp.GetShapesOnShape(theCheckShape, theShape,
5895                                                    theShapeType, theState)
5896             RaiseIfFailed("GetShapesOnShape", self.ShapesOp)
5897             self._autoPublish(aList, theName, "shapeOnShape")
5898             return aList
5899
5900         ## Find in \a theShape all sub-shapes of type \a theShapeType,
5901         #  situated relatively the specified \a theCheckShape by the
5902         #  certain way, defined through \a theState parameter.
5903         #  @param theCheckShape Shape for relative comparing. It must be a solid.
5904         #  @param theShape Shape to find sub-shapes of.
5905         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5906         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5907         #  @param theName Object name; when specified, this parameter is used
5908         #         for result publication in the study. Otherwise, if automatic
5909         #         publication is switched on, default value is used for result name.
5910         #
5911         #  @return All found sub-shapes as compound.
5912         #
5913         #  @ref swig_GetShapesOnShapeAsCompound "Example"
5914         @ManageTransactions("ShapesOp")
5915         def GetShapesOnShapeAsCompound(self, theCheckShape, theShape, theShapeType, theState, theName=None):
5916             """
5917             Find in theShape all sub-shapes of type theShapeType,
5918             situated relatively the specified theCheckShape by the
5919             certain way, defined through theState parameter.
5920
5921             Parameters:
5922                 theCheckShape Shape for relative comparing. It must be a solid.
5923                 theShape Shape to find sub-shapes of.
5924                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5925                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5926                 theName Object name; when specified, this parameter is used
5927                         for result publication in the study. Otherwise, if automatic
5928                         publication is switched on, default value is used for result name.
5929
5930             Returns:
5931                 All found sub-shapes as compound.
5932             """
5933             # Example: see GEOM_TestOthers.py
5934             anObj = self.ShapesOp.GetShapesOnShapeAsCompound(theCheckShape, theShape,
5935                                                              theShapeType, theState)
5936             RaiseIfFailed("GetShapesOnShapeAsCompound", self.ShapesOp)
5937             self._autoPublish(anObj, theName, "shapeOnShape")
5938             return anObj
5939
5940         ## Find in \a theShape all sub-shapes of type \a theShapeType,
5941         #  situated relatively the specified \a theCheckShape by the
5942         #  certain way, defined through \a theState parameter.
5943         #  @param theCheckShape Shape for relative comparing. It must be a solid.
5944         #  @param theShape Shape to find sub-shapes of.
5945         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5946         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5947         #
5948         #  @return List of all found sub-shapes indices.
5949         #
5950         #  @ref swig_GetShapesOnShapeIDs "Example"
5951         @ManageTransactions("ShapesOp")
5952         def GetShapesOnShapeIDs(self, theCheckShape, theShape, theShapeType, theState):
5953             """
5954             Find in theShape all sub-shapes of type theShapeType,
5955             situated relatively the specified theCheckShape by the
5956             certain way, defined through theState parameter.
5957
5958             Parameters:
5959                 theCheckShape Shape for relative comparing. It must be a solid.
5960                 theShape Shape to find sub-shapes of.
5961                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5962                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5963
5964             Returns:
5965                 List of all found sub-shapes indices.
5966             """
5967             # Example: see GEOM_TestOthers.py
5968             aList = self.ShapesOp.GetShapesOnShapeIDs(theCheckShape, theShape,
5969                                                       theShapeType, theState)
5970             RaiseIfFailed("GetShapesOnShapeIDs", self.ShapesOp)
5971             return aList
5972
5973         ## Get sub-shape(s) of theShapeWhere, which are
5974         #  coincident with \a theShapeWhat or could be a part of it.
5975         #  @param theShapeWhere Shape to find sub-shapes of.
5976         #  @param theShapeWhat Shape, specifying what to find.
5977         #  @param isNewImplementation implementation of GetInPlace functionality
5978         #             (default = False, old alghorithm based on shape properties)
5979         #  @param theName Object name; when specified, this parameter is used
5980         #         for result publication in the study. Otherwise, if automatic
5981         #         publication is switched on, default value is used for result name.
5982         #
5983         #  @return Compound which includes all found sub-shapes if they have different types; 
5984         #          or group of all found shapes of the equal type; or a single found sub-shape.
5985         #
5986         #  @note This function has a restriction on argument shapes.
5987         #        If \a theShapeWhere has curved parts with significantly
5988         #        outstanding centres (i.e. the mass centre of a part is closer to
5989         #        \a theShapeWhat than to the part), such parts will not be found.
5990         #        @image html get_in_place_lost_part.png
5991         #
5992         #  @ref swig_GetInPlace "Example"
5993         @ManageTransactions("ShapesOp")
5994         def GetInPlace(self, theShapeWhere, theShapeWhat, isNewImplementation = False, theName=None):
5995             """
5996             Get sub-shape(s) of theShapeWhere, which are
5997             coincident with  theShapeWhat or could be a part of it.
5998
5999             Parameters:
6000                 theShapeWhere Shape to find sub-shapes of.
6001                 theShapeWhat Shape, specifying what to find.
6002                 isNewImplementation Implementation of GetInPlace functionality
6003                                     (default = False, old alghorithm based on shape properties)
6004                 theName Object name; when specified, this parameter is used
6005                         for result publication in the study. Otherwise, if automatic
6006                         publication is switched on, default value is used for result name.
6007
6008             Returns:
6009                 Compound which includes all found sub-shapes if they have different types; 
6010                 or group of all found shapes of the equal type; or a single found sub-shape.
6011
6012
6013             Note:
6014                 This function has a restriction on argument shapes.
6015                 If theShapeWhere has curved parts with significantly
6016                 outstanding centres (i.e. the mass centre of a part is closer to
6017                 theShapeWhat than to the part), such parts will not be found.
6018             """
6019             # Example: see GEOM_TestOthers.py
6020             anObj = None
6021             if isNewImplementation:
6022                 anObj = self.ShapesOp.GetInPlace(theShapeWhere, theShapeWhat)
6023             else:
6024                 anObj = self.ShapesOp.GetInPlaceOld(theShapeWhere, theShapeWhat)
6025                 pass
6026             RaiseIfFailed("GetInPlace", self.ShapesOp)
6027             self._autoPublish(anObj, theName, "inplace")
6028             return anObj
6029
6030         ## Get sub-shape(s) of \a theShapeWhere, which are
6031         #  coincident with \a theShapeWhat or could be a part of it.
6032         #
6033         #  Implementation of this method is based on a saved history of an operation,
6034         #  produced \a theShapeWhere. The \a theShapeWhat must be among this operation's
6035         #  arguments (an argument shape or a sub-shape of an argument shape).
6036         #  The operation could be the Partition or one of boolean operations,
6037         #  performed on simple shapes (not on compounds).
6038         #
6039         #  @param theShapeWhere Shape to find sub-shapes of.
6040         #  @param theShapeWhat Shape, specifying what to find (must be in the
6041         #                      building history of the ShapeWhere).
6042         #  @param theName Object name; when specified, this parameter is used
6043         #         for result publication in the study. Otherwise, if automatic
6044         #         publication is switched on, default value is used for result name.
6045         #
6046         #  @return Compound which includes all found sub-shapes if they have different types; 
6047         #          or group of all found shapes of the equal type; or a single found sub-shape.
6048         #
6049         #  @ref swig_GetInPlace "Example"
6050         @ManageTransactions("ShapesOp")
6051         def GetInPlaceByHistory(self, theShapeWhere, theShapeWhat, theName=None):
6052             """
6053             Implementation of this method is based on a saved history of an operation,
6054             produced theShapeWhere. The theShapeWhat must be among this operation's
6055             arguments (an argument shape or a sub-shape of an argument shape).
6056             The operation could be the Partition or one of boolean operations,
6057             performed on simple shapes (not on compounds).
6058
6059             Parameters:
6060                 theShapeWhere Shape to find sub-shapes of.
6061                 theShapeWhat Shape, specifying what to find (must be in the
6062                                 building history of the ShapeWhere).
6063                 theName Object name; when specified, this parameter is used
6064                         for result publication in the study. Otherwise, if automatic
6065                         publication is switched on, default value is used for result name.
6066
6067             Returns:
6068                 Compound which includes all found sub-shapes if they have different types; 
6069                 or group of all found shapes of the equal type; or a single found sub-shape.
6070             """
6071             # Example: see GEOM_TestOthers.py
6072             anObj = self.ShapesOp.GetInPlaceByHistory(theShapeWhere, theShapeWhat)
6073             RaiseIfFailed("GetInPlaceByHistory", self.ShapesOp)
6074             self._autoPublish(anObj, theName, "inplace")
6075             return anObj
6076
6077         ## A sort of GetInPlace functionality, returning IDs of sub-shapes.
6078         #  For each sub-shape ID of @a theShapeWhat return a list of corresponding sub-shape
6079         #  IDs of @a theShapeWhere.
6080         #  For example, if theShapeWhat is a box and theShapeWhere is this box cut into 
6081         #  two parts by a plane, then the result can be as this: 
6082         #    len( result_list ) = 35,
6083         #    result_list[ 1 ] = [ 2, 36 ], which means that the box  (ID 1) turned into two
6084         #  solids with IDs 2 and 36 within theShapeWhere
6085         #
6086         #  @param theShapeWhere Shape to find sub-shapes of.
6087         #  @param theShapeWhat Shape, specifying what to find.
6088         #  @return List of lists of sub-shape IDS of theShapeWhere.
6089         def GetInPlaceMap(self, theShapeWhere, theShapeWhat):
6090             """
6091             A sort of GetInPlace functionality, returning IDs of sub-shapes.
6092             For each sub-shape ID of @a theShapeWhat return a list of corresponding sub-shape
6093             IDs of @a theShapeWhere.
6094             For example, if theShapeWhat is a box and theShapeWhere is this box cut into 
6095             two parts by a plane, then the result can be as this: 
6096               len( result_list ) = 35,
6097               result_list[ 1 ] = [ 2, 36 ], which means that the box (ID 1) turned into two
6098             solids with IDs 2 and 36 within theShapeWhere
6099
6100             Parameters:
6101                 theShapeWhere Shape to find sub-shapes of.
6102                 theShapeWhat Shape, specifying what to find.
6103
6104             Returns:
6105                 List of lists of sub-shape IDS of theShapeWhere.
6106             """
6107             return self.ShapesOp.GetInPlaceMap(theShapeWhere, theShapeWhat)
6108
6109         ## Get sub-shape of theShapeWhere, which is
6110         #  equal to \a theShapeWhat.
6111         #  @param theShapeWhere Shape to find sub-shape of.
6112         #  @param theShapeWhat Shape, specifying what to find.
6113         #  @param theName Object name; when specified, this parameter is used
6114         #         for result publication in the study. Otherwise, if automatic
6115         #         publication is switched on, default value is used for result name.
6116         #
6117         #  @return New GEOM.GEOM_Object for found sub-shape.
6118         #
6119         #  @ref swig_GetSame "Example"
6120         @ManageTransactions("ShapesOp")
6121         def GetSame(self, theShapeWhere, theShapeWhat, theName=None):
6122             """
6123             Get sub-shape of theShapeWhere, which is
6124             equal to theShapeWhat.
6125
6126             Parameters:
6127                 theShapeWhere Shape to find sub-shape of.
6128                 theShapeWhat Shape, specifying what to find.
6129                 theName Object name; when specified, this parameter is used
6130                         for result publication in the study. Otherwise, if automatic
6131                         publication is switched on, default value is used for result name.
6132
6133             Returns:
6134                 New GEOM.GEOM_Object for found sub-shape.
6135             """
6136             anObj = self.ShapesOp.GetSame(theShapeWhere, theShapeWhat)
6137             RaiseIfFailed("GetSame", self.ShapesOp)
6138             self._autoPublish(anObj, theName, "sameShape")
6139             return anObj
6140
6141
6142         ## Get sub-shape indices of theShapeWhere, which is
6143         #  equal to \a theShapeWhat.
6144         #  @param theShapeWhere Shape to find sub-shape of.
6145         #  @param theShapeWhat Shape, specifying what to find.
6146         #  @return List of all found sub-shapes indices.
6147         #
6148         #  @ref swig_GetSame "Example"
6149         @ManageTransactions("ShapesOp")
6150         def GetSameIDs(self, theShapeWhere, theShapeWhat):
6151             """
6152             Get sub-shape indices of theShapeWhere, which is
6153             equal to theShapeWhat.
6154
6155             Parameters:
6156                 theShapeWhere Shape to find sub-shape of.
6157                 theShapeWhat Shape, specifying what to find.
6158
6159             Returns:
6160                 List of all found sub-shapes indices.
6161             """
6162             anObj = self.ShapesOp.GetSameIDs(theShapeWhere, theShapeWhat)
6163             RaiseIfFailed("GetSameIDs", self.ShapesOp)
6164             return anObj
6165
6166         ## Resize the input edge with the new Min and Max parameters.
6167         #  The input edge parameters range is [0, 1]. If theMin parameter is
6168         #  negative, the input edge is extended, otherwise it is shrinked by
6169         #  theMin parameter. If theMax is greater than 1, the edge is extended,
6170         #  otherwise it is shrinked by theMax parameter.
6171         #  @param theEdge the input edge to be resized.
6172         #  @param theMin the minimal parameter value.
6173         #  @param theMax the maximal parameter value.
6174         #  @param theName Object name; when specified, this parameter is used
6175         #         for result publication in the study. Otherwise, if automatic
6176         #         publication is switched on, default value is used for result name.
6177         #  @return New GEOM.GEOM_Object, containing the created edge.
6178         #
6179         #  @ref tui_extend "Example"
6180         @ManageTransactions("ShapesOp")
6181         def ExtendEdge(self, theEdge, theMin, theMax, theName=None):
6182             """
6183             Resize the input edge with the new Min and Max parameters.
6184             The input edge parameters range is [0, 1]. If theMin parameter is
6185             negative, the input edge is extended, otherwise it is shrinked by
6186             theMin parameter. If theMax is greater than 1, the edge is extended,
6187             otherwise it is shrinked by theMax parameter.
6188
6189             Parameters:
6190                 theEdge the input edge to be resized.
6191                 theMin the minimal parameter value.
6192                 theMax the maximal parameter value.
6193                 theName Object name; when specified, this parameter is used
6194                         for result publication in the study. Otherwise, if automatic
6195                         publication is switched on, default value is used for result name.
6196
6197             Returns:
6198                 New GEOM.GEOM_Object, containing the created edge.
6199             """
6200             theMin, theMax, Parameters = ParseParameters(theMin, theMax)
6201             anObj = self.ShapesOp.ExtendEdge(theEdge, theMin, theMax)
6202             RaiseIfFailed("ExtendEdge", self.ShapesOp)
6203             anObj.SetParameters(Parameters)
6204             self._autoPublish(anObj, theName, "edge")
6205             return anObj
6206
6207         ## Resize the input face with the new UMin, UMax, VMin and VMax
6208         #  parameters. The input face U and V parameters range is [0, 1]. If
6209         #  theUMin parameter is negative, the input face is extended, otherwise
6210         #  it is shrinked along U direction by theUMin parameter. If theUMax is
6211         #  greater than 1, the face is extended, otherwise it is shrinked along
6212         #  U direction by theUMax parameter. So as for theVMin, theVMax and
6213         #  V direction of the input face.
6214         #  @param theFace the input face to be resized.
6215         #  @param theUMin the minimal U parameter value.
6216         #  @param theUMax the maximal U parameter value.
6217         #  @param theVMin the minimal V parameter value.
6218         #  @param theVMax the maximal V parameter value.
6219         #  @param theName Object name; when specified, this parameter is used
6220         #         for result publication in the study. Otherwise, if automatic
6221         #         publication is switched on, default value is used for result name.
6222         #  @return New GEOM.GEOM_Object, containing the created face.
6223         #
6224         #  @ref tui_extend "Example"
6225         @ManageTransactions("ShapesOp")
6226         def ExtendFace(self, theFace, theUMin, theUMax,
6227                        theVMin, theVMax, theName=None):
6228             """
6229             Resize the input face with the new UMin, UMax, VMin and VMax
6230             parameters. The input face U and V parameters range is [0, 1]. If
6231             theUMin parameter is negative, the input face is extended, otherwise
6232             it is shrinked along U direction by theUMin parameter. If theUMax is
6233             greater than 1, the face is extended, otherwise it is shrinked along
6234             U direction by theUMax parameter. So as for theVMin, theVMax and
6235             V direction of the input face.
6236
6237             Parameters:
6238                 theFace the input face to be resized.
6239                 theUMin the minimal U parameter value.
6240                 theUMax the maximal U parameter value.
6241                 theVMin the minimal V parameter value.
6242                 theVMax the maximal V parameter value.
6243                 theName Object name; when specified, this parameter is used
6244                         for result publication in the study. Otherwise, if automatic
6245                         publication is switched on, default value is used for result name.
6246
6247             Returns:
6248                 New GEOM.GEOM_Object, containing the created face.
6249             """
6250             theUMin, theUMax, theVMin, theVMax, Parameters = ParseParameters(theUMin, theUMax, theVMin, theVMax)
6251             anObj = self.ShapesOp.ExtendFace(theFace, theUMin, theUMax,
6252                                              theVMin, theVMax)
6253             RaiseIfFailed("ExtendFace", self.ShapesOp)
6254             anObj.SetParameters(Parameters)
6255             self._autoPublish(anObj, theName, "face")
6256             return anObj
6257
6258         ## This function takes some face as input parameter and creates new
6259         #  GEOM_Object, i.e. topological shape by extracting underlying surface
6260         #  of the source face and limiting it by the Umin, Umax, Vmin, Vmax
6261         #  parameters of the source face (in the parametrical space).
6262         #  @param theFace the input face.
6263         #  @param theName Object name; when specified, this parameter is used
6264         #         for result publication in the study. Otherwise, if automatic
6265         #         publication is switched on, default value is used for result name.
6266         #  @return New GEOM.GEOM_Object, containing the created face.
6267         #
6268         #  @ref tui_creation_surface "Example"
6269         @ManageTransactions("ShapesOp")
6270         def MakeSurfaceFromFace(self, theFace, theName=None):
6271             """
6272             This function takes some face as input parameter and creates new
6273             GEOM_Object, i.e. topological shape by extracting underlying surface
6274             of the source face and limiting it by the Umin, Umax, Vmin, Vmax
6275             parameters of the source face (in the parametrical space).
6276
6277             Parameters:
6278                 theFace the input face.
6279                 theName Object name; when specified, this parameter is used
6280                         for result publication in the study. Otherwise, if automatic
6281                         publication is switched on, default value is used for result name.
6282
6283             Returns:
6284                 New GEOM.GEOM_Object, containing the created face.
6285             """
6286             anObj = self.ShapesOp.MakeSurfaceFromFace(theFace)
6287             RaiseIfFailed("MakeSurfaceFromFace", self.ShapesOp)
6288             self._autoPublish(anObj, theName, "surface")
6289             return anObj
6290
6291         # end of l4_obtain
6292         ## @}
6293
6294         ## @addtogroup l4_access
6295         ## @{
6296
6297         ## Obtain a composite sub-shape of <VAR>aShape</VAR>, composed from sub-shapes
6298         #  of aShape, selected by their unique IDs inside <VAR>aShape</VAR>
6299         #  @param aShape Shape to get sub-shape of.
6300         #  @param ListOfID List of sub-shapes indices.
6301         #  @param theName Object name; when specified, this parameter is used
6302         #         for result publication in the study. Otherwise, if automatic
6303         #         publication is switched on, default value is used for result name.
6304         #
6305         #  @return Found sub-shape.
6306         #
6307         #  @ref swig_all_decompose "Example"
6308         def GetSubShape(self, aShape, ListOfID, theName=None):
6309             """
6310             Obtain a composite sub-shape of aShape, composed from sub-shapes
6311             of aShape, selected by their unique IDs inside aShape
6312
6313             Parameters:
6314                 aShape Shape to get sub-shape of.
6315                 ListOfID List of sub-shapes indices.
6316                 theName Object name; when specified, this parameter is used
6317                         for result publication in the study. Otherwise, if automatic
6318                         publication is switched on, default value is used for result name.
6319
6320             Returns:
6321                 Found sub-shape.
6322             """
6323             # Example: see GEOM_TestAll.py
6324             anObj = self.AddSubShape(aShape,ListOfID)
6325             self._autoPublish(anObj, theName, "subshape")
6326             return anObj
6327
6328         ## Obtain unique ID of sub-shape <VAR>aSubShape</VAR> inside <VAR>aShape</VAR>
6329         #  of aShape, selected by their unique IDs inside <VAR>aShape</VAR>
6330         #  @param aShape Shape to get sub-shape of.
6331         #  @param aSubShape Sub-shapes of aShape.
6332         #  @return ID of found sub-shape.
6333         #
6334         #  @ref swig_all_decompose "Example"
6335         @ManageTransactions("LocalOp")
6336         def GetSubShapeID(self, aShape, aSubShape):
6337             """
6338             Obtain unique ID of sub-shape aSubShape inside aShape
6339             of aShape, selected by their unique IDs inside aShape
6340
6341             Parameters:
6342                aShape Shape to get sub-shape of.
6343                aSubShape Sub-shapes of aShape.
6344
6345             Returns:
6346                ID of found sub-shape.
6347             """
6348             # Example: see GEOM_TestAll.py
6349             anID = self.LocalOp.GetSubShapeIndex(aShape, aSubShape)
6350             RaiseIfFailed("GetSubShapeIndex", self.LocalOp)
6351             return anID
6352
6353         ## Obtain unique IDs of sub-shapes <VAR>aSubShapes</VAR> inside <VAR>aShape</VAR>
6354         #  This function is provided for performance purpose. The complexity is O(n) with n
6355         #  the number of subobjects of aShape
6356         #  @param aShape Shape to get sub-shape of.
6357         #  @param aSubShapes Sub-shapes of aShape.
6358         #  @return list of IDs of found sub-shapes.
6359         #
6360         #  @ref swig_all_decompose "Example"
6361         @ManageTransactions("ShapesOp")
6362         def GetSubShapesIDs(self, aShape, aSubShapes):
6363             """
6364             Obtain a list of IDs of sub-shapes aSubShapes inside aShape
6365             This function is provided for performance purpose. The complexity is O(n) with n
6366             the number of subobjects of aShape
6367
6368             Parameters:
6369                aShape Shape to get sub-shape of.
6370                aSubShapes Sub-shapes of aShape.
6371
6372             Returns:
6373                List of IDs of found sub-shape.
6374             """
6375             # Example: see GEOM_TestAll.py
6376             anIDs = self.ShapesOp.GetSubShapesIndices(aShape, aSubShapes)
6377             RaiseIfFailed("GetSubShapesIndices", self.ShapesOp)
6378             return anIDs
6379
6380         # end of l4_access
6381         ## @}
6382
6383         ## @addtogroup l4_decompose
6384         ## @{
6385
6386         ## Get all sub-shapes and groups of \a theShape,
6387         #  that were created already by any other methods.
6388         #  @param theShape Any shape.
6389         #  @param theGroupsOnly If this parameter is TRUE, only groups will be
6390         #                       returned, else all found sub-shapes and groups.
6391         #  @return List of existing sub-objects of \a theShape.
6392         #
6393         #  @ref swig_all_decompose "Example"
6394         @ManageTransactions("ShapesOp")
6395         def GetExistingSubObjects(self, theShape, theGroupsOnly = False):
6396             """
6397             Get all sub-shapes and groups of theShape,
6398             that were created already by any other methods.
6399
6400             Parameters:
6401                 theShape Any shape.
6402                 theGroupsOnly If this parameter is TRUE, only groups will be
6403                                  returned, else all found sub-shapes and groups.
6404
6405             Returns:
6406                 List of existing sub-objects of theShape.
6407             """
6408             # Example: see GEOM_TestAll.py
6409             ListObj = self.ShapesOp.GetExistingSubObjects(theShape, theGroupsOnly)
6410             RaiseIfFailed("GetExistingSubObjects", self.ShapesOp)
6411             return ListObj
6412
6413         ## Get all groups of \a theShape,
6414         #  that were created already by any other methods.
6415         #  @param theShape Any shape.
6416         #  @return List of existing groups of \a theShape.
6417         #
6418         #  @ref swig_all_decompose "Example"
6419         @ManageTransactions("ShapesOp")
6420         def GetGroups(self, theShape):
6421             """
6422             Get all groups of theShape,
6423             that were created already by any other methods.
6424
6425             Parameters:
6426                 theShape Any shape.
6427
6428             Returns:
6429                 List of existing groups of theShape.
6430             """
6431             # Example: see GEOM_TestAll.py
6432             ListObj = self.ShapesOp.GetExistingSubObjects(theShape, True)
6433             RaiseIfFailed("GetExistingSubObjects", self.ShapesOp)
6434             return ListObj
6435
6436         ## Explode a shape on sub-shapes of a given type.
6437         #  If the shape itself matches the type, it is also returned.
6438         #  @param aShape Shape to be exploded.
6439         #  @param aType Type of sub-shapes to be retrieved (see ShapeType())
6440         #  @param theName Object name; when specified, this parameter is used
6441         #         for result publication in the study. Otherwise, if automatic
6442         #         publication is switched on, default value is used for result name.
6443         #
6444         #  @return List of sub-shapes of type theShapeType, contained in theShape.
6445         #
6446         #  @ref swig_all_decompose "Example"
6447         @ManageTransactions("ShapesOp")
6448         def SubShapeAll(self, aShape, aType, theName=None):
6449             """
6450             Explode a shape on sub-shapes of a given type.
6451             If the shape itself matches the type, it is also returned.
6452
6453             Parameters:
6454                 aShape Shape to be exploded.
6455                 aType Type of sub-shapes to be retrieved (see geompy.ShapeType)
6456                 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             Returns:
6461                 List of sub-shapes of type theShapeType, contained in theShape.
6462             """
6463             # Example: see GEOM_TestAll.py
6464             ListObj = self.ShapesOp.MakeAllSubShapes(aShape, EnumToLong( aType ), False)
6465             RaiseIfFailed("SubShapeAll", self.ShapesOp)
6466             self._autoPublish(ListObj, theName, "subshape")
6467             return ListObj
6468
6469         ## Explode a shape on sub-shapes of a given type.
6470         #  @param aShape Shape to be exploded.
6471         #  @param aType Type of sub-shapes to be retrieved (see ShapeType())
6472         #  @return List of IDs of sub-shapes.
6473         #
6474         #  @ref swig_all_decompose "Example"
6475         @ManageTransactions("ShapesOp")
6476         def SubShapeAllIDs(self, aShape, aType):
6477             """
6478             Explode a shape on sub-shapes of a given type.
6479
6480             Parameters:
6481                 aShape Shape to be exploded (see geompy.ShapeType)
6482                 aType Type of sub-shapes to be retrieved (see geompy.ShapeType)
6483
6484             Returns:
6485                 List of IDs of sub-shapes.
6486             """
6487             ListObj = self.ShapesOp.GetAllSubShapesIDs(aShape, EnumToLong( aType ), False)
6488             RaiseIfFailed("SubShapeAllIDs", self.ShapesOp)
6489             return ListObj
6490
6491         ## Obtain a compound of sub-shapes of <VAR>aShape</VAR>,
6492         #  selected by their indices in list of all sub-shapes of type <VAR>aType</VAR>.
6493         #  Each index is in range [1, Nb_Sub-Shapes_Of_Given_Type]
6494         #  @param aShape Shape to get sub-shape of.
6495         #  @param ListOfInd List of sub-shapes indices.
6496         #  @param aType Type of sub-shapes to be retrieved (see ShapeType())
6497         #  @param theName Object name; when specified, this parameter is used
6498         #         for result publication in the study. Otherwise, if automatic
6499         #         publication is switched on, default value is used for result name.
6500         #
6501         #  @return A compound of sub-shapes of aShape.
6502         #
6503         #  @ref swig_all_decompose "Example"
6504         def SubShape(self, aShape, aType, ListOfInd, theName=None):
6505             """
6506             Obtain a compound of sub-shapes of aShape,
6507             selected by their indices in list of all sub-shapes of type aType.
6508             Each index is in range [1, Nb_Sub-Shapes_Of_Given_Type]
6509
6510             Parameters:
6511                 aShape Shape to get sub-shape of.
6512                 ListOfID List of sub-shapes indices.
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                 A compound of sub-shapes of aShape.
6520             """
6521             # Example: see GEOM_TestAll.py
6522             ListOfIDs = []
6523             AllShapeIDsList = self.SubShapeAllIDs(aShape, EnumToLong( aType ))
6524             for ind in ListOfInd:
6525                 ListOfIDs.append(AllShapeIDsList[ind - 1])
6526             # note: auto-publishing is done in self.GetSubShape()
6527             anObj = self.GetSubShape(aShape, ListOfIDs, theName)
6528             return anObj
6529
6530         ## Explode a shape on sub-shapes of a given type.
6531         #  Sub-shapes will be sorted taking into account their gravity centers,
6532         #  to provide stable order of sub-shapes. Please see
6533         #  @ref sorting_shapes_page "Description of Sorting Shapes Algorithm".
6534         #  If the shape itself matches the type, it is also returned.
6535         #  @param aShape Shape to be exploded.
6536         #  @param aType Type of sub-shapes to be retrieved (see ShapeType())
6537         #  @param theName Object name; when specified, this parameter is used
6538         #         for result publication in the study. Otherwise, if automatic
6539         #         publication is switched on, default value is used for result name.
6540         #
6541         #  @return List of sub-shapes of type theShapeType, contained in theShape.
6542         #
6543         #  @ref swig_SubShapeAllSorted "Example"
6544         @ManageTransactions("ShapesOp")
6545         def SubShapeAllSortedCentres(self, aShape, aType, theName=None):
6546             """
6547             Explode a shape on sub-shapes of a given type.
6548             Sub-shapes will be sorted taking into account their gravity centers,
6549             to provide stable order of sub-shapes.
6550             If the shape itself matches the type, it is also returned.
6551
6552             Parameters:
6553                 aShape Shape to be exploded.
6554                 aType Type of sub-shapes to be retrieved (see geompy.ShapeType)
6555                 theName Object name; when specified, this parameter is used
6556                         for result publication in the study. Otherwise, if automatic
6557                         publication is switched on, default value is used for result name.
6558
6559             Returns:
6560                 List of sub-shapes of type theShapeType, contained in theShape.
6561             """
6562             # Example: see GEOM_TestAll.py
6563             ListObj = self.ShapesOp.MakeAllSubShapes(aShape, EnumToLong( aType ), True)
6564             RaiseIfFailed("SubShapeAllSortedCentres", self.ShapesOp)
6565             self._autoPublish(ListObj, theName, "subshape")
6566             return ListObj
6567
6568         ## Explode a shape on sub-shapes of a given type.
6569         #  Sub-shapes will be sorted taking into account their gravity centers,
6570         #  to provide stable order of sub-shapes. Please see
6571         #  @ref sorting_shapes_page "Description of Sorting Shapes Algorithm".
6572         #  @param aShape Shape to be exploded.
6573         #  @param aType Type of sub-shapes to be retrieved (see ShapeType())
6574         #  @return List of IDs of sub-shapes.
6575         #
6576         #  @ref swig_all_decompose "Example"
6577         @ManageTransactions("ShapesOp")
6578         def SubShapeAllSortedCentresIDs(self, aShape, aType):
6579             """
6580             Explode a shape on sub-shapes of a given type.
6581             Sub-shapes will be sorted taking into account their gravity centers,
6582             to provide stable order of sub-shapes.
6583
6584             Parameters:
6585                 aShape Shape to be exploded.
6586                 aType Type of sub-shapes to be retrieved (see geompy.ShapeType)
6587
6588             Returns:
6589                 List of IDs of sub-shapes.
6590             """
6591             ListIDs = self.ShapesOp.GetAllSubShapesIDs(aShape, EnumToLong( aType ), True)
6592             RaiseIfFailed("SubShapeAllIDs", self.ShapesOp)
6593             return ListIDs
6594
6595         ## Obtain a compound of sub-shapes of <VAR>aShape</VAR>,
6596         #  selected by they indices in sorted list of all sub-shapes of type <VAR>aType</VAR>.
6597         #  Please see @ref sorting_shapes_page "Description of Sorting Shapes Algorithm".
6598         #  Each index is in range [1, Nb_Sub-Shapes_Of_Given_Type]
6599         #  @param aShape Shape to get sub-shape of.
6600         #  @param ListOfInd List of sub-shapes indices.
6601         #  @param aType Type of sub-shapes to be retrieved (see ShapeType())
6602         #  @param theName Object name; when specified, this parameter is used
6603         #         for result publication in the study. Otherwise, if automatic
6604         #         publication is switched on, default value is used for result name.
6605         #
6606         #  @return A compound of sub-shapes of aShape.
6607         #
6608         #  @ref swig_all_decompose "Example"
6609         def SubShapeSortedCentres(self, aShape, aType, ListOfInd, theName=None):
6610             """
6611             Obtain a compound of sub-shapes of aShape,
6612             selected by they indices in sorted list of all sub-shapes of type aType.
6613             Each index is in range [1, Nb_Sub-Shapes_Of_Given_Type]
6614
6615             Parameters:
6616                 aShape Shape to get sub-shape of.
6617                 ListOfID List of sub-shapes indices.
6618                 aType Type of sub-shapes to be retrieved (see geompy.ShapeType)
6619                 theName Object name; when specified, this parameter is used
6620                         for result publication in the study. Otherwise, if automatic
6621                         publication is switched on, default value is used for result name.
6622
6623             Returns:
6624                 A compound of sub-shapes of aShape.
6625             """
6626             # Example: see GEOM_TestAll.py
6627             ListOfIDs = []
6628             AllShapeIDsList = self.SubShapeAllSortedCentresIDs(aShape, EnumToLong( aType ))
6629             for ind in ListOfInd:
6630                 ListOfIDs.append(AllShapeIDsList[ind - 1])
6631             # note: auto-publishing is done in self.GetSubShape()
6632             anObj = self.GetSubShape(aShape, ListOfIDs, theName)
6633             return anObj
6634
6635         ## Extract shapes (excluding the main shape) of given type.
6636         #  @param aShape The shape.
6637         #  @param aType  The shape type (see ShapeType())
6638         #  @param isSorted Boolean flag to switch sorting on/off. Please see
6639         #         @ref sorting_shapes_page "Description of Sorting Shapes Algorithm".
6640         #  @param theName Object name; when specified, this parameter is used
6641         #         for result publication in the study. Otherwise, if automatic
6642         #         publication is switched on, default value is used for result name.
6643         #
6644         #  @return List of sub-shapes of type aType, contained in aShape.
6645         #
6646         #  @ref swig_FilletChamfer "Example"
6647         @ManageTransactions("ShapesOp")
6648         def ExtractShapes(self, aShape, aType, isSorted = False, theName=None):
6649             """
6650             Extract shapes (excluding the main shape) of given type.
6651
6652             Parameters:
6653                 aShape The shape.
6654                 aType  The shape type (see geompy.ShapeType)
6655                 isSorted Boolean flag to switch sorting on/off.
6656                 theName Object name; when specified, this parameter is used
6657                         for result publication in the study. Otherwise, if automatic
6658                         publication is switched on, default value is used for result name.
6659
6660             Returns:
6661                 List of sub-shapes of type aType, contained in aShape.
6662             """
6663             # Example: see GEOM_TestAll.py
6664             ListObj = self.ShapesOp.ExtractSubShapes(aShape, EnumToLong( aType ), isSorted)
6665             RaiseIfFailed("ExtractSubShapes", self.ShapesOp)
6666             self._autoPublish(ListObj, theName, "subshape")
6667             return ListObj
6668
6669         ## Get a set of sub-shapes defined by their unique IDs inside <VAR>aShape</VAR>
6670         #  @param aShape Main shape.
6671         #  @param anIDs List of unique IDs of sub-shapes inside <VAR>aShape</VAR>.
6672         #  @param theName Object name; when specified, this parameter is used
6673         #         for result publication in the study. Otherwise, if automatic
6674         #         publication is switched on, default value is used for result name.
6675         #  @return List of GEOM.GEOM_Object, corresponding to found sub-shapes.
6676         #
6677         #  @ref swig_all_decompose "Example"
6678         @ManageTransactions("ShapesOp")
6679         def SubShapes(self, aShape, anIDs, theName=None):
6680             """
6681             Get a set of sub-shapes defined by their unique IDs inside theMainShape
6682
6683             Parameters:
6684                 aShape Main shape.
6685                 anIDs List of unique IDs of sub-shapes inside theMainShape.
6686                 theName Object name; when specified, this parameter is used
6687                         for result publication in the study. Otherwise, if automatic
6688                         publication is switched on, default value is used for result name.
6689
6690             Returns:
6691                 List of GEOM.GEOM_Object, corresponding to found sub-shapes.
6692             """
6693             # Example: see GEOM_TestAll.py
6694             ListObj = self.ShapesOp.MakeSubShapes(aShape, anIDs)
6695             RaiseIfFailed("SubShapes", self.ShapesOp)
6696             self._autoPublish(ListObj, theName, "subshape")
6697             return ListObj
6698
6699         ## Explode a shape into edges sorted in a row from a starting point.
6700         #  @param theShape the shape to be exploded on edges.
6701         #  @param theStartPoint the starting point.
6702         #  @param theName Object name; when specified, this parameter is used
6703         #         for result publication in the study. Otherwise, if automatic
6704         #         publication is switched on, default value is used for result name.
6705         #  @return List of GEOM.GEOM_Object that is actually an ordered list
6706         #          of edges sorted in a row from a starting point.
6707         #
6708         #  @ref swig_GetSubShapeEdgeSorted "Example"
6709         @ManageTransactions("ShapesOp")
6710         def GetSubShapeEdgeSorted(self, theShape, theStartPoint, theName=None):
6711             """
6712             Explode a shape into edges sorted in a row from a starting point.
6713
6714             Parameters:
6715                 theShape the shape to be exploded on edges.
6716                 theStartPoint the starting point.
6717                 theName Object name; when specified, this parameter is used
6718                         for result publication in the study. Otherwise, if automatic
6719                         publication is switched on, default value is used for result name.
6720
6721             Returns:
6722                 List of GEOM.GEOM_Object that is actually an ordered list
6723                 of edges sorted in a row from a starting point.
6724             """
6725             # Example: see GEOM_TestAll.py
6726             ListObj = self.ShapesOp.GetSubShapeEdgeSorted(theShape, theStartPoint)
6727             RaiseIfFailed("GetSubShapeEdgeSorted", self.ShapesOp)
6728             self._autoPublish(ListObj, theName, "SortedEdges")
6729             return ListObj
6730
6731         ##
6732         # Return the list of subshapes that satisfies a certain tolerance
6733         # criterion. The user defines the type of shapes to be returned, the
6734         # condition and the tolerance value. The operation is defined for
6735         # faces, edges and vertices only. E.g. for theShapeType FACE,
6736         # theCondition GEOM::CC_GT and theTolerance 1.e-7 this method returns
6737         # all faces of theShape that have tolerances greater then 1.e7.
6738         #
6739         #  @param theShape the shape to be exploded
6740         #  @param theShapeType the type of sub-shapes to be returned (see
6741         #         ShapeType()). Can have the values FACE, EDGE and VERTEX only.
6742         #  @param theCondition the condition type (see GEOM::comparison_condition).
6743         #  @param theTolerance the tolerance filter.
6744         #  @param theName Object name; when specified, this parameter is used
6745         #         for result publication in the study. Otherwise, if automatic
6746         #         publication is switched on, default value is used for result name.
6747         #  @return the list of shapes that satisfy the conditions.
6748         #
6749         #  @ref swig_GetSubShapesWithTolerance "Example"
6750         @ManageTransactions("ShapesOp")
6751         def GetSubShapesWithTolerance(self, theShape, theShapeType,
6752                                       theCondition, theTolerance, theName=None):
6753             """
6754             Return the list of subshapes that satisfies a certain tolerance
6755             criterion. The user defines the type of shapes to be returned, the
6756             condition and the tolerance value. The operation is defined for
6757             faces, edges and vertices only. E.g. for theShapeType FACE,
6758             theCondition GEOM::CC_GT and theTolerance 1.e-7 this method returns
6759             all faces of theShape that have tolerances greater then 1.e7.
6760             
6761             Parameters:
6762                 theShape the shape to be exploded
6763                 theShapeType the type of sub-shapes to be returned (see
6764                              ShapeType()). Can have the values FACE,
6765                              EDGE and VERTEX only.
6766                 theCondition the condition type (see GEOM::comparison_condition).
6767                 theTolerance the tolerance filter.
6768                 theName Object name; when specified, this parameter is used
6769                         for result publication in the study. Otherwise, if automatic
6770                         publication is switched on, default value is used for result name.
6771
6772             Returns:
6773                 The list of shapes that satisfy the conditions.
6774             """
6775             # Example: see GEOM_TestAll.py
6776             ListObj = self.ShapesOp.GetSubShapesWithTolerance(theShape, EnumToLong(theShapeType),
6777                                                               theCondition, theTolerance)
6778             RaiseIfFailed("GetSubShapesWithTolerance", self.ShapesOp)
6779             self._autoPublish(ListObj, theName, "SubShapeWithTolerance")
6780             return ListObj
6781
6782         ## Check if the object is a sub-object of another GEOM object.
6783         #  @param aSubObject Checked sub-object (or its parent object, in case if
6784         #         \a theSubObjectIndex is non-zero).
6785         #  @param anObject An object that is checked for ownership (or its parent object,
6786         #         in case if \a theObjectIndex is non-zero).
6787         #  @param aSubObjectIndex When non-zero, specifies a sub-shape index that
6788         #         identifies a sub-object within its parent specified via \a theSubObject.
6789         #  @param anObjectIndex When non-zero, specifies a sub-shape index that
6790         #         identifies an object within its parent specified via \a theObject.
6791         #  @return TRUE, if the given object contains sub-object.
6792         @ManageTransactions("ShapesOp")
6793         def IsSubShapeBelongsTo(self, aSubObject, anObject, aSubObjectIndex = 0, anObjectIndex = 0):
6794             """
6795             Check if the object is a sub-object of another GEOM object.
6796             
6797             Parameters:
6798                 aSubObject Checked sub-object (or its parent object, in case if
6799                     \a theSubObjectIndex is non-zero).
6800                 anObject An object that is checked for ownership (or its parent object,
6801                     in case if \a theObjectIndex is non-zero).
6802                 aSubObjectIndex When non-zero, specifies a sub-shape index that
6803                     identifies a sub-object within its parent specified via \a theSubObject.
6804                 anObjectIndex When non-zero, specifies a sub-shape index that
6805                     identifies an object within its parent specified via \a theObject.
6806
6807             Returns
6808                 TRUE, if the given object contains sub-object.
6809             """
6810             IsOk = self.ShapesOp.IsSubShapeBelongsTo(aSubObject, aSubObjectIndex, anObject, anObjectIndex)
6811             RaiseIfFailed("IsSubShapeBelongsTo", self.ShapesOp)
6812             return IsOk
6813
6814         ## Perform extraction of sub-shapes from the main shape.
6815         #
6816         #  @param theShape the main shape
6817         #  @param theListOfID the list of sub-shape IDs to be extracted from
6818         #         the main shape.
6819         #  @return New GEOM.GEOM_Object, containing the shape without
6820         #          extracted sub-shapes.
6821         #
6822         #  @ref swig_MakeExtraction "Example"
6823         @ManageTransactions("ShapesOp")
6824         def MakeExtraction(self, theShape, theListOfID, theName=None):
6825             """
6826             Perform extraction of sub-shapes from the main shape.
6827
6828             Parameters:
6829                 theShape the main shape
6830                 theListOfID the list of sub-shape IDs to be extracted from
6831                             the main shape.
6832
6833             Returns
6834                 New GEOM.GEOM_Object, containing the shape without
6835                 extracted sub-shapes.
6836             """
6837             # Example: see GEOM_TestAll.py
6838             (anObj, aStat) = self.ShapesOp.MakeExtraction(theShape, theListOfID)
6839             RaiseIfFailed("MakeExtraction", self.ShapesOp)
6840             self._autoPublish(anObj, theName, "Extraction")
6841             return anObj
6842
6843         # end of l4_decompose
6844         ## @}
6845
6846         ## @addtogroup l4_decompose_d
6847         ## @{
6848
6849         ## Deprecated method
6850         #  It works like SubShapeAllSortedCentres(), but wrongly
6851         #  defines centres of faces, shells and solids.
6852         @ManageTransactions("ShapesOp")
6853         def SubShapeAllSorted(self, aShape, aType, theName=None):
6854             """
6855             Deprecated method
6856             It works like geompy.SubShapeAllSortedCentres, but wrongly
6857             defines centres of faces, shells and solids.
6858             """
6859             ListObj = self.ShapesOp.MakeExplode(aShape, EnumToLong( aType ), True)
6860             RaiseIfFailed("MakeExplode", self.ShapesOp)
6861             self._autoPublish(ListObj, theName, "subshape")
6862             return ListObj
6863
6864         ## Deprecated method
6865         #  It works like SubShapeAllSortedCentresIDs(), but wrongly
6866         #  defines centres of faces, shells and solids.
6867         @ManageTransactions("ShapesOp")
6868         def SubShapeAllSortedIDs(self, aShape, aType):
6869             """
6870             Deprecated method
6871             It works like geompy.SubShapeAllSortedCentresIDs, but wrongly
6872             defines centres of faces, shells and solids.
6873             """
6874             ListIDs = self.ShapesOp.SubShapeAllIDs(aShape, EnumToLong( aType ), True)
6875             RaiseIfFailed("SubShapeAllIDs", self.ShapesOp)
6876             return ListIDs
6877
6878         ## Deprecated method
6879         #  It works like SubShapeSortedCentres(), but has a bug
6880         #  (wrongly defines centres of faces, shells and solids).
6881         def SubShapeSorted(self, aShape, aType, ListOfInd, theName=None):
6882             """
6883             Deprecated method
6884             It works like geompy.SubShapeSortedCentres, but has a bug
6885             (wrongly defines centres of faces, shells and solids).
6886             """
6887             ListOfIDs = []
6888             AllShapeIDsList = self.SubShapeAllSortedIDs(aShape, EnumToLong( aType ))
6889             for ind in ListOfInd:
6890                 ListOfIDs.append(AllShapeIDsList[ind - 1])
6891             # note: auto-publishing is done in self.GetSubShape()
6892             anObj = self.GetSubShape(aShape, ListOfIDs, theName)
6893             return anObj
6894
6895         # end of l4_decompose_d
6896         ## @}
6897
6898         ## @addtogroup l3_healing
6899         ## @{
6900
6901         ## Apply a sequence of Shape Healing operators to the given object.
6902         #  @param theShape Shape to be processed.
6903         #  @param theOperators List of names of operators ("FixShape", "SplitClosedFaces", etc.).
6904         #  @param theParameters List of names of parameters
6905         #                    ("FixShape.Tolerance3d", "SplitClosedFaces.NbSplitPoints", etc.).
6906         #  @param theValues List of values of parameters, in the same order
6907         #                    as parameters are listed in <VAR>theParameters</VAR> list.
6908         #  @param theName Object name; when specified, this parameter is used
6909         #         for result publication in the study. Otherwise, if automatic
6910         #         publication is switched on, default value is used for result name.
6911         #
6912         #  <b> Operators and Parameters: </b> \n
6913         #
6914         #  * \b FixShape - corrects invalid shapes. \n
6915         #  - \b FixShape.Tolerance3d - work tolerance for detection of the problems and correction of them. \n
6916         #  - \b FixShape.MaxTolerance3d - maximal possible tolerance of the shape after correction. \n
6917         #
6918         #  * \b FixFaceSize - removes small faces, such as spots and strips.\n
6919         #  - \b FixFaceSize.Tolerance - defines minimum possible face size. \n
6920         #  - \b DropSmallEdges - removes edges, which merge with neighbouring edges. \n
6921         #  - \b DropSmallEdges.Tolerance3d - defines minimum possible distance between two parallel edges.\n
6922         #  - \b DropSmallSolids - either removes small solids or merges them with neighboring ones. \n
6923         #  - \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
6924         #  - \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
6925         #  - \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
6926         #
6927         #  * \b SplitAngle - splits faces based on conical surfaces, surfaces of revolution and cylindrical
6928         #    surfaces in segments using a certain angle. \n
6929         #  - \b SplitAngle.Angle - the central angle of the resulting segments (i.e. we obtain two segments
6930         #    if Angle=180, four if Angle=90, etc). \n
6931         #  - \b SplitAngle.MaxTolerance - maximum possible tolerance among the resulting segments.\n
6932         #
6933         #  * \b SplitClosedFaces - splits closed faces in segments.
6934         #    The number of segments depends on the number of splitting points.\n
6935         #  - \b SplitClosedFaces.NbSplitPoints - the number of splitting points.\n
6936         #
6937         #  * \b SplitContinuity - splits shapes to reduce continuities of curves and surfaces.\n
6938         #  - \b SplitContinuity.Tolerance3d - 3D tolerance for correction of geometry.\n
6939         #  - \b SplitContinuity.SurfaceContinuity - required continuity for surfaces.\n
6940         #  - \b SplitContinuity.CurveContinuity - required continuity for curves.\n
6941         #   This and the previous parameters can take the following values:\n
6942         #   \b Parametric \b Continuity \n
6943         #   \b C0 (Positional Continuity): curves are joined (the end positions of curves or surfaces
6944         #   are coincidental. The curves or surfaces may still meet at an angle, giving rise to a sharp corner or edge).\n
6945         #   \b C1 (Tangential Continuity): first derivatives are equal (the end vectors of curves or surfaces are parallel,
6946         #    ruling out sharp edges).\n
6947         #   \b C2 (Curvature Continuity): first and second derivatives are equal (the end vectors of curves or surfaces
6948         #       are of the same magnitude).\n
6949         #   \b CN N-th derivatives are equal (both the direction and the magnitude of the Nth derivatives of curves
6950         #    or surfaces (d/du C(u)) are the same at junction. \n
6951         #   \b Geometric \b Continuity \n
6952         #   \b G1: first derivatives are proportional at junction.\n
6953         #   The curve tangents thus have the same direction, but not necessarily the same magnitude.
6954         #      i.e., C1'(1) = (a,b,c) and C2'(0) = (k*a, k*b, k*c).\n
6955         #   \b G2: first and second derivatives are proportional at junction.
6956         #   As the names imply, geometric continuity requires the geometry to be continuous, while parametric
6957         #    continuity requires that the underlying parameterization was continuous as well.
6958         #   Parametric continuity of order n implies geometric continuity of order n, but not vice-versa.\n
6959         #
6960         #  * \b BsplineRestriction - converts curves and surfaces to Bsplines and processes them with the following parameters:\n
6961         #  - \b BSplineRestriction.SurfaceMode - approximation of surfaces if restriction is necessary.\n
6962         #  - \b BSplineRestriction.Curve3dMode - conversion of any 3D curve to BSpline and approximation.\n
6963         #  - \b BSplineRestriction.Curve2dMode - conversion of any 2D curve to BSpline and approximation.\n
6964         #  - \b BSplineRestriction.Tolerance3d - defines the possibility of surfaces and 3D curves approximation
6965         #       with the specified parameters.\n
6966         #  - \b BSplineRestriction.Tolerance2d - defines the possibility of surfaces and 2D curves approximation
6967         #       with the specified parameters.\n
6968         #  - \b BSplineRestriction.RequiredDegree - required degree of the resulting BSplines.\n
6969         #  - \b BSplineRestriction.RequiredNbSegments - required maximum number of segments of resultant BSplines.\n
6970         #  - \b BSplineRestriction.Continuity3d - continuity of the resulting surfaces and 3D curves.\n
6971         #  - \b BSplineRestriction.Continuity2d - continuity of the resulting 2D curves.\n
6972         #
6973         #  * \b ToBezier - converts curves and surfaces of any type to Bezier curves and surfaces.\n
6974         #  - \b ToBezier.SurfaceMode - if checked in, allows conversion of surfaces.\n
6975         #  - \b ToBezier.Curve3dMode - if checked in, allows conversion of 3D curves.\n
6976         #  - \b ToBezier.Curve2dMode - if checked in, allows conversion of 2D curves.\n
6977         #  - \b ToBezier.MaxTolerance - defines tolerance for detection and correction of problems.\n
6978         #
6979         #  * \b SameParameter - fixes edges of 2D and 3D curves not having the same parameter.\n
6980         #  - \b SameParameter.Tolerance3d - defines tolerance for fixing of edges.\n
6981         #
6982         #
6983         #  @return New GEOM.GEOM_Object, containing processed shape.
6984         #
6985         #  \n @ref tui_shape_processing "Example"
6986         @ManageTransactions("HealOp")
6987         def ProcessShape(self, theShape, theOperators, theParameters, theValues, theName=None):
6988             """
6989             Apply a sequence of Shape Healing operators to the given object.
6990
6991             Parameters:
6992                 theShape Shape to be processed.
6993                 theValues List of values of parameters, in the same order
6994                           as parameters are listed in theParameters list.
6995                 theOperators List of names of operators ('FixShape', 'SplitClosedFaces', etc.).
6996                 theParameters List of names of parameters
6997                               ('FixShape.Tolerance3d', 'SplitClosedFaces.NbSplitPoints', etc.).
6998                 theName Object name; when specified, this parameter is used
6999                         for result publication in the study. Otherwise, if automatic
7000                         publication is switched on, default value is used for result name.
7001
7002                 Operators and Parameters:
7003
7004                  * FixShape - corrects invalid shapes.
7005                      * FixShape.Tolerance3d - work tolerance for detection of the problems and correction of them.
7006                      * FixShape.MaxTolerance3d - maximal possible tolerance of the shape after correction.
7007                  * FixFaceSize - removes small faces, such as spots and strips.
7008                      * FixFaceSize.Tolerance - defines minimum possible face size.
7009                  * DropSmallEdges - removes edges, which merge with neighbouring edges.
7010                      * DropSmallEdges.Tolerance3d - defines minimum possible distance between two parallel edges.
7011                  * DropSmallSolids - either removes small solids or merges them with neighboring ones.
7012                      * 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.
7013                      * 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.
7014                      * 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.
7015
7016                  * SplitAngle - splits faces based on conical surfaces, surfaces of revolution and cylindrical surfaces
7017                                 in segments using a certain angle.
7018                      * SplitAngle.Angle - the central angle of the resulting segments (i.e. we obtain two segments
7019                                           if Angle=180, four if Angle=90, etc).
7020                      * SplitAngle.MaxTolerance - maximum possible tolerance among the resulting segments.
7021                  * SplitClosedFaces - splits closed faces in segments. The number of segments depends on the number of
7022                                       splitting points.
7023                      * SplitClosedFaces.NbSplitPoints - the number of splitting points.
7024                  * SplitContinuity - splits shapes to reduce continuities of curves and surfaces.
7025                      * SplitContinuity.Tolerance3d - 3D tolerance for correction of geometry.
7026                      * SplitContinuity.SurfaceContinuity - required continuity for surfaces.
7027                      * SplitContinuity.CurveContinuity - required continuity for curves.
7028                        This and the previous parameters can take the following values:
7029
7030                        Parametric Continuity:
7031                        C0 (Positional Continuity): curves are joined (the end positions of curves or surfaces are
7032                                                    coincidental. The curves or surfaces may still meet at an angle,
7033                                                    giving rise to a sharp corner or edge).
7034                        C1 (Tangential Continuity): first derivatives are equal (the end vectors of curves or surfaces
7035                                                    are parallel, ruling out sharp edges).
7036                        C2 (Curvature Continuity): first and second derivatives are equal (the end vectors of curves
7037                                                   or surfaces are of the same magnitude).
7038                        CN N-th derivatives are equal (both the direction and the magnitude of the Nth derivatives of
7039                           curves or surfaces (d/du C(u)) are the same at junction.
7040
7041                        Geometric Continuity:
7042                        G1: first derivatives are proportional at junction.
7043                            The curve tangents thus have the same direction, but not necessarily the same magnitude.
7044                            i.e., C1'(1) = (a,b,c) and C2'(0) = (k*a, k*b, k*c).
7045                        G2: first and second derivatives are proportional at junction. As the names imply,
7046                            geometric continuity requires the geometry to be continuous, while parametric continuity requires
7047                            that the underlying parameterization was continuous as well. Parametric continuity of order n implies
7048                            geometric continuity of order n, but not vice-versa.
7049                  * BsplineRestriction - converts curves and surfaces to Bsplines and processes them with the following parameters:
7050                      * BSplineRestriction.SurfaceMode - approximation of surfaces if restriction is necessary.
7051                      * BSplineRestriction.Curve3dMode - conversion of any 3D curve to BSpline and approximation.
7052                      * BSplineRestriction.Curve2dMode - conversion of any 2D curve to BSpline and approximation.
7053                      * BSplineRestriction.Tolerance3d - defines the possibility of surfaces and 3D curves approximation with
7054                                                         the specified parameters.
7055                      * BSplineRestriction.Tolerance2d - defines the possibility of surfaces and 2D curves approximation with
7056                                                         the specified parameters.
7057                      * BSplineRestriction.RequiredDegree - required degree of the resulting BSplines.
7058                      * BSplineRestriction.RequiredNbSegments - required maximum number of segments of resultant BSplines.
7059                      * BSplineRestriction.Continuity3d - continuity of the resulting surfaces and 3D curves.
7060                      * BSplineRestriction.Continuity2d - continuity of the resulting 2D curves.
7061                  * ToBezier - converts curves and surfaces of any type to Bezier curves and surfaces.
7062                      * ToBezier.SurfaceMode - if checked in, allows conversion of surfaces.
7063                      * ToBezier.Curve3dMode - if checked in, allows conversion of 3D curves.
7064                      * ToBezier.Curve2dMode - if checked in, allows conversion of 2D curves.
7065                      * ToBezier.MaxTolerance - defines tolerance for detection and correction of problems.
7066                  * SameParameter - fixes edges of 2D and 3D curves not having the same parameter.
7067                      * SameParameter.Tolerance3d - defines tolerance for fixing of edges.
7068
7069             Returns:
7070                 New GEOM.GEOM_Object, containing processed shape.
7071
7072             Note: For more information look through SALOME Geometry User's Guide->
7073                   -> Introduction to Geometry-> Repairing Operations-> Shape Processing
7074             """
7075             # Example: see GEOM_TestHealing.py
7076             theValues,Parameters = ParseList(theValues)
7077             anObj = self.HealOp.ProcessShape(theShape, theOperators, theParameters, theValues)
7078             # To avoid script failure in case of good argument shape
7079             if self.HealOp.GetErrorCode() == "ShHealOper_NotError_msg":
7080                 return theShape
7081             RaiseIfFailed("ProcessShape", self.HealOp)
7082             for string in (theOperators + theParameters):
7083                 Parameters = ":" + Parameters
7084                 pass
7085             anObj.SetParameters(Parameters)
7086             self._autoPublish(anObj, theName, "healed")
7087             return anObj
7088
7089         ## Remove faces from the given object (shape).
7090         #  @param theObject Shape to be processed.
7091         #  @param theFaces Indices of faces to be removed, if EMPTY then the method
7092         #                  removes ALL faces of the given object.
7093         #  @param theName Object name; when specified, this parameter is used
7094         #         for result publication in the study. Otherwise, if automatic
7095         #         publication is switched on, default value is used for result name.
7096         #
7097         #  @return New GEOM.GEOM_Object, containing processed shape.
7098         #
7099         #  @ref tui_suppress_faces "Example"
7100         @ManageTransactions("HealOp")
7101         def SuppressFaces(self, theObject, theFaces, theName=None):
7102             """
7103             Remove faces from the given object (shape).
7104
7105             Parameters:
7106                 theObject Shape to be processed.
7107                 theFaces Indices of faces to be removed, if EMPTY then the method
7108                          removes ALL faces of the given object.
7109                 theName Object name; when specified, this parameter is used
7110                         for result publication in the study. Otherwise, if automatic
7111                         publication is switched on, default value is used for result name.
7112
7113             Returns:
7114                 New GEOM.GEOM_Object, containing processed shape.
7115             """
7116             # Example: see GEOM_TestHealing.py
7117             anObj = self.HealOp.SuppressFaces(theObject, theFaces)
7118             RaiseIfFailed("SuppressFaces", self.HealOp)
7119             self._autoPublish(anObj, theName, "suppressFaces")
7120             return anObj
7121
7122         ## Sewing of faces into a single shell.
7123         #  @param ListShape Shapes to be processed.
7124         #  @param theTolerance Required tolerance value.
7125         #  @param AllowNonManifold Flag that allows non-manifold sewing.
7126         #  @param theName Object name; when specified, this parameter is used
7127         #         for result publication in the study. Otherwise, if automatic
7128         #         publication is switched on, default value is used for result name.
7129         #
7130         #  @return New GEOM.GEOM_Object, containing a result shell.
7131         #
7132         #  @ref tui_sewing "Example"
7133         def MakeSewing(self, ListShape, theTolerance, AllowNonManifold=False, theName=None):
7134             """
7135             Sewing of faces into a single shell.
7136
7137             Parameters:
7138                 ListShape Shapes to be processed.
7139                 theTolerance Required tolerance value.
7140                 AllowNonManifold Flag that allows non-manifold sewing.
7141                 theName Object name; when specified, this parameter is used
7142                         for result publication in the study. Otherwise, if automatic
7143                         publication is switched on, default value is used for result name.
7144
7145             Returns:
7146                 New GEOM.GEOM_Object, containing containing a result shell.
7147             """
7148             # Example: see GEOM_TestHealing.py
7149             # note: auto-publishing is done in self.Sew()
7150             anObj = self.Sew(ListShape, theTolerance, AllowNonManifold, theName)
7151             return anObj
7152
7153         ## Sewing of faces into a single shell.
7154         #  @param ListShape Shapes to be processed.
7155         #  @param theTolerance Required tolerance value.
7156         #  @param AllowNonManifold Flag that allows non-manifold sewing.
7157         #  @param theName Object name; when specified, this parameter is used
7158         #         for result publication in the study. Otherwise, if automatic
7159         #         publication is switched on, default value is used for result name.
7160         #
7161         #  @return New GEOM.GEOM_Object, containing a result shell.
7162         @ManageTransactions("HealOp")
7163         def Sew(self, ListShape, theTolerance, AllowNonManifold=False, theName=None):
7164             """
7165             Sewing of faces into a single shell.
7166
7167             Parameters:
7168                 ListShape Shapes to be processed.
7169                 theTolerance Required tolerance value.
7170                 AllowNonManifold Flag that allows non-manifold sewing.
7171                 theName Object name; when specified, this parameter is used
7172                         for result publication in the study. Otherwise, if automatic
7173                         publication is switched on, default value is used for result name.
7174
7175             Returns:
7176                 New GEOM.GEOM_Object, containing a result shell.
7177             """
7178             # Example: see MakeSewing() above
7179             theTolerance,Parameters = ParseParameters(theTolerance)
7180             if AllowNonManifold:
7181                 anObj = self.HealOp.SewAllowNonManifold( ToList( ListShape ), theTolerance)
7182             else:
7183                 anObj = self.HealOp.Sew( ToList( ListShape ), theTolerance)
7184             # To avoid script failure in case of good argument shape
7185             # (Fix of test cases geom/bugs11/L7,L8)
7186             if self.HealOp.GetErrorCode() == "ShHealOper_NotError_msg":
7187                 return anObj
7188             RaiseIfFailed("Sew", self.HealOp)
7189             anObj.SetParameters(Parameters)
7190             self._autoPublish(anObj, theName, "sewed")
7191             return anObj
7192
7193         ## Rebuild the topology of theSolids by removing
7194         #  the faces that are shared by several solids.
7195         #  @param theSolids A compound or a list of solids to be processed.
7196         #  @param theName Object name; when specified, this parameter is used
7197         #         for result publication in the study. Otherwise, if automatic
7198         #         publication is switched on, default value is used for result name.
7199         #
7200         #  @return New GEOM.GEOM_Object, containing processed shape.
7201         #
7202         #  @ref tui_remove_webs "Example"
7203         @ManageTransactions("HealOp")
7204         def RemoveInternalFaces (self, theSolids, theName=None):
7205             """
7206             Rebuild the topology of theSolids by removing
7207             the faces that are shared by several solids.
7208
7209             Parameters:
7210                 theSolids A compound or a list of solids to be processed.
7211                 theName Object name; when specified, this parameter is used
7212                         for result publication in the study. Otherwise, if automatic
7213                         publication is switched on, default value is used for result name.
7214
7215             Returns:
7216                 New GEOM.GEOM_Object, containing processed shape.
7217             """
7218             # Example: see GEOM_TestHealing.py
7219             anObj = self.HealOp.RemoveInternalFaces(ToList(theSolids))
7220             RaiseIfFailed("RemoveInternalFaces", self.HealOp)
7221             self._autoPublish(anObj, theName, "removeWebs")
7222             return anObj
7223
7224         ## Remove internal wires and edges from the given object (face).
7225         #  @param theObject Shape to be processed.
7226         #  @param theWires Indices of wires to be removed, if EMPTY then the method
7227         #                  removes ALL internal wires of the given object.
7228         #  @param theName Object name; when specified, this parameter is used
7229         #         for result publication in the study. Otherwise, if automatic
7230         #         publication is switched on, default value is used for result name.
7231         #
7232         #  @return New GEOM.GEOM_Object, containing processed shape.
7233         #
7234         #  @ref tui_suppress_internal_wires "Example"
7235         @ManageTransactions("HealOp")
7236         def SuppressInternalWires(self, theObject, theWires, theName=None):
7237             """
7238             Remove internal wires and edges from the given object (face).
7239
7240             Parameters:
7241                 theObject Shape to be processed.
7242                 theWires Indices of wires to be removed, if EMPTY then the method
7243                          removes ALL internal wires of the given object.
7244                 theName Object name; when specified, this parameter is used
7245                         for result publication in the study. Otherwise, if automatic
7246                         publication is switched on, default value is used for result name.
7247
7248             Returns:
7249                 New GEOM.GEOM_Object, containing processed shape.
7250             """
7251             # Example: see GEOM_TestHealing.py
7252             anObj = self.HealOp.RemoveIntWires(theObject, theWires)
7253             RaiseIfFailed("RemoveIntWires", self.HealOp)
7254             self._autoPublish(anObj, theName, "suppressWires")
7255             return anObj
7256
7257         ## Remove internal closed contours (holes) from the given object.
7258         #  @param theObject Shape to be processed.
7259         #  @param theWires Indices of wires to be removed, if EMPTY then the method
7260         #                  removes ALL internal holes of the given object
7261         #  @param theName Object name; when specified, this parameter is used
7262         #         for result publication in the study. Otherwise, if automatic
7263         #         publication is switched on, default value is used for result name.
7264         #
7265         #  @return New GEOM.GEOM_Object, containing processed shape.
7266         #
7267         #  @ref tui_suppress_holes "Example"
7268         @ManageTransactions("HealOp")
7269         def SuppressHoles(self, theObject, theWires, theName=None):
7270             """
7271             Remove internal closed contours (holes) from the given object.
7272
7273             Parameters:
7274                 theObject Shape to be processed.
7275                 theWires Indices of wires to be removed, if EMPTY then the method
7276                          removes ALL internal holes of the given object
7277                 theName Object name; when specified, this parameter is used
7278                         for result publication in the study. Otherwise, if automatic
7279                         publication is switched on, default value is used for result name.
7280
7281             Returns:
7282                 New GEOM.GEOM_Object, containing processed shape.
7283             """
7284             # Example: see GEOM_TestHealing.py
7285             anObj = self.HealOp.FillHoles(theObject, theWires)
7286             RaiseIfFailed("FillHoles", self.HealOp)
7287             self._autoPublish(anObj, theName, "suppressHoles")
7288             return anObj
7289
7290         ## Close an open wire.
7291         #  @param theObject Shape to be processed.
7292         #  @param theWires Indexes of edge(s) and wire(s) to be closed within <VAR>theObject</VAR>'s shape,
7293         #                  if [ ], then <VAR>theObject</VAR> itself is a wire.
7294         #  @param isCommonVertex If True  : closure by creation of a common vertex,
7295         #                        If False : closure by creation of an edge between ends.
7296         #  @param theName Object name; when specified, this parameter is used
7297         #         for result publication in the study. Otherwise, if automatic
7298         #         publication is switched on, default value is used for result name.
7299         #
7300         #  @return New GEOM.GEOM_Object, containing processed shape.
7301         #
7302         #  @ref tui_close_contour "Example"
7303         @ManageTransactions("HealOp")
7304         def CloseContour(self,theObject, theWires, isCommonVertex, theName=None):
7305             """
7306             Close an open wire.
7307
7308             Parameters:
7309                 theObject Shape to be processed.
7310                 theWires Indexes of edge(s) and wire(s) to be closed within theObject's shape,
7311                          if [ ], then theObject itself is a wire.
7312                 isCommonVertex If True  : closure by creation of a common vertex,
7313                                If False : closure by creation of an edge between ends.
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             anObj = self.HealOp.CloseContour(theObject, theWires, isCommonVertex)
7323             RaiseIfFailed("CloseContour", self.HealOp)
7324             self._autoPublish(anObj, theName, "closeContour")
7325             return anObj
7326
7327         ## Addition of a point to a given edge object.
7328         #  @param theObject Shape to be processed.
7329         #  @param theEdgeIndex Index of edge to be divided within theObject's shape,
7330         #                      if -1, then theObject itself is the edge.
7331         #  @param theValue Value of parameter on edge or length parameter,
7332         #                  depending on \a isByParameter.
7333         #  @param isByParameter If TRUE : \a theValue is treated as a curve parameter [0..1], \n
7334         #                       if FALSE : \a theValue is treated as a length parameter [0..1]
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 DivideEdge(self, theObject, theEdgeIndex, theValue, isByParameter, theName=None):
7344             """
7345             Addition of a point to a given edge object.
7346
7347             Parameters:
7348                 theObject Shape to be processed.
7349                 theEdgeIndex Index of edge to be divided within theObject's shape,
7350                              if -1, then theObject itself is the edge.
7351                 theValue Value of parameter on edge or length parameter,
7352                          depending on isByParameter.
7353                 isByParameter If TRUE :  theValue is treated as a curve parameter [0..1],
7354                               if FALSE : theValue is treated as a length parameter [0..1]
7355                 theName Object name; when specified, this parameter is used
7356                         for result publication in the study. Otherwise, if automatic
7357                         publication is switched on, default value is used for result name.
7358
7359             Returns:
7360                 New GEOM.GEOM_Object, containing processed shape.
7361             """
7362             # Example: see GEOM_TestHealing.py
7363             theEdgeIndex,theValue,isByParameter,Parameters = ParseParameters(theEdgeIndex,theValue,isByParameter)
7364             anObj = self.HealOp.DivideEdge(theObject, theEdgeIndex, theValue, isByParameter)
7365             RaiseIfFailed("DivideEdge", self.HealOp)
7366             anObj.SetParameters(Parameters)
7367             self._autoPublish(anObj, theName, "divideEdge")
7368             return anObj
7369
7370         ## Addition of points to a given edge of \a theObject by projecting
7371         #  other points to the given edge.
7372         #  @param theObject Shape to be processed.
7373         #  @param theEdgeIndex Index of edge to be divided within theObject's shape,
7374         #                      if -1, then theObject itself is the edge.
7375         #  @param thePoints List of points to project to theEdgeIndex-th edge.
7376         #  @param theName Object name; when specified, this parameter is used
7377         #         for result publication in the study. Otherwise, if automatic
7378         #         publication is switched on, default value is used for result name.
7379         #
7380         #  @return New GEOM.GEOM_Object, containing processed shape.
7381         #
7382         #  @ref tui_add_point_on_edge "Example"
7383         @ManageTransactions("HealOp")
7384         def DivideEdgeByPoint(self, theObject, theEdgeIndex, thePoints, theName=None):
7385             """
7386             Addition of points to a given edge of \a theObject by projecting
7387             other points to the given edge.
7388
7389             Parameters:
7390                 theObject Shape to be processed.
7391                 theEdgeIndex The edge or its index to be divided within theObject's shape,
7392                              if -1, then theObject itself is the edge.
7393                 thePoints List of points to project to theEdgeIndex-th edge.
7394                 theName Object name; when specified, this parameter is used
7395                         for result publication in the study. Otherwise, if automatic
7396                         publication is switched on, default value is used for result name.
7397
7398             Returns:
7399                 New GEOM.GEOM_Object, containing processed shape.
7400             """
7401             # Example: see GEOM_TestHealing.py
7402             if isinstance( theEdgeIndex, GEOM._objref_GEOM_Object ):
7403                 theEdgeIndex = self.GetSubShapeID( theObject, theEdgeIndex )
7404             anObj = self.HealOp.DivideEdgeByPoint(theObject, theEdgeIndex, ToList( thePoints ))
7405             RaiseIfFailed("DivideEdgeByPoint", self.HealOp)
7406             self._autoPublish(anObj, theName, "divideEdge")
7407             return anObj
7408
7409         ## Suppress the vertices in the wire in case if adjacent edges are C1 continuous.
7410         #  @param theWire Wire to minimize the number of C1 continuous edges in.
7411         #  @param theVertices A list of vertices to suppress. If the list
7412         #                     is empty, all vertices in a wire will be assumed.
7413         #  @param theName Object name; when specified, this parameter is used
7414         #         for result publication in the study. Otherwise, if automatic
7415         #         publication is switched on, default value is used for result name.
7416         #
7417         #  @return New GEOM.GEOM_Object with modified wire.
7418         #
7419         #  @ref tui_fuse_collinear_edges "Example"
7420         @ManageTransactions("HealOp")
7421         def FuseCollinearEdgesWithinWire(self, theWire, theVertices = [], theName=None):
7422             """
7423             Suppress the vertices in the wire in case if adjacent edges are C1 continuous.
7424
7425             Parameters:
7426                 theWire Wire to minimize the number of C1 continuous edges in.
7427                 theVertices A list of vertices to suppress. If the list
7428                             is empty, all vertices in a wire will be assumed.
7429                 theName Object name; when specified, this parameter is used
7430                         for result publication in the study. Otherwise, if automatic
7431                         publication is switched on, default value is used for result name.
7432
7433             Returns:
7434                 New GEOM.GEOM_Object with modified wire.
7435             """
7436             anObj = self.HealOp.FuseCollinearEdgesWithinWire(theWire, theVertices)
7437             RaiseIfFailed("FuseCollinearEdgesWithinWire", self.HealOp)
7438             self._autoPublish(anObj, theName, "fuseEdges")
7439             return anObj
7440
7441         ## Change orientation of the given object. Updates given shape.
7442         #  @param theObject Shape to be processed.
7443         #  @return Updated <var>theObject</var>
7444         #
7445         #  @ref swig_todo "Example"
7446         @ManageTransactions("HealOp")
7447         def ChangeOrientationShell(self,theObject):
7448             """
7449             Change orientation of the given object. Updates given shape.
7450
7451             Parameters:
7452                 theObject Shape to be processed.
7453
7454             Returns:
7455                 Updated theObject
7456             """
7457             theObject = self.HealOp.ChangeOrientation(theObject)
7458             RaiseIfFailed("ChangeOrientation", self.HealOp)
7459             pass
7460
7461         ## Change orientation of the given object.
7462         #  @param theObject Shape to be processed.
7463         #  @param theName Object name; when specified, this parameter is used
7464         #         for result publication in the study. Otherwise, if automatic
7465         #         publication is switched on, default value is used for result name.
7466         #
7467         #  @return New GEOM.GEOM_Object, containing processed shape.
7468         #
7469         #  @ref swig_todo "Example"
7470         @ManageTransactions("HealOp")
7471         def ChangeOrientationShellCopy(self, theObject, theName=None):
7472             """
7473             Change orientation of the given object.
7474
7475             Parameters:
7476                 theObject Shape to be processed.
7477                 theName Object name; when specified, this parameter is used
7478                         for result publication in the study. Otherwise, if automatic
7479                         publication is switched on, default value is used for result name.
7480
7481             Returns:
7482                 New GEOM.GEOM_Object, containing processed shape.
7483             """
7484             anObj = self.HealOp.ChangeOrientationCopy(theObject)
7485             RaiseIfFailed("ChangeOrientationCopy", self.HealOp)
7486             self._autoPublish(anObj, theName, "reversed")
7487             return anObj
7488
7489         ## Try to limit tolerance of the given object by value \a theTolerance.
7490         #  @param theObject Shape to be processed.
7491         #  @param theTolerance Required tolerance value.
7492         #  @param theName Object name; when specified, this parameter is used
7493         #         for result publication in the study. Otherwise, if automatic
7494         #         publication is switched on, default value is used for result name.
7495         #
7496         #  @return New GEOM.GEOM_Object, containing processed shape.
7497         #
7498         #  @ref tui_limit_tolerance "Example"
7499         @ManageTransactions("HealOp")
7500         def LimitTolerance(self, theObject, theTolerance = 1e-07, theName=None):
7501             """
7502             Try to limit tolerance of the given object by value theTolerance.
7503
7504             Parameters:
7505                 theObject Shape to be processed.
7506                 theTolerance Required tolerance value.
7507                 theName Object name; when specified, this parameter is used
7508                         for result publication in the study. Otherwise, if automatic
7509                         publication is switched on, default value is used for result name.
7510
7511             Returns:
7512                 New GEOM.GEOM_Object, containing processed shape.
7513             """
7514             anObj = self.HealOp.LimitTolerance(theObject, theTolerance)
7515             RaiseIfFailed("LimitTolerance", self.HealOp)
7516             self._autoPublish(anObj, theName, "limitTolerance")
7517             return anObj
7518
7519         ## Provides Python dump functionality for algorithms entirely implemented in Python.
7520         #  @param theObject Shape to be processed.
7521         #  @param result Shape of the algorithm execution.
7522         #  @param imports module import for current functon..
7523         #  @param funcName name of a Python function that we need to put into dump.
7524         #  @param args arguments of the Python function.
7525         #
7526         def FuncToPythonDump(self, theObject, result, imports, funcName, args):
7527             """
7528             Provides Python dump functionality for algorithms entirely implemented in Python.
7529
7530             Parameters:
7531                 theObject Shape to be processed.
7532                 result Shape of the algorithm execution.
7533                 imports module import for current functon.
7534                 funcName name of a Python function that we need to put into dump.
7535                 args arguments of the Python function.
7536             """
7537             self.HealOp.FuncToPythonDump(theObject, result, imports, funcName, args)
7538
7539         ## Get a list of wires (wrapped in GEOM.GEOM_Object-s),
7540         #  that constitute a free boundary of the given shape.
7541         #  @param theObject Shape to get free boundary of.
7542         #  @param theName Object name; when specified, this parameter is used
7543         #         for result publication in the study. Otherwise, if automatic
7544         #         publication is switched on, default value is used for result name.
7545         #
7546         #  @return [\a status, \a theClosedWires, \a theOpenWires]
7547         #  \n \a status: FALSE, if an error(s) occurred during the method execution.
7548         #  \n \a theClosedWires: Closed wires on the free boundary of the given shape.
7549         #  \n \a theOpenWires: Open wires on the free boundary of the given shape.
7550         #
7551         #  @ref tui_free_boundaries_page "Example"
7552         @ManageTransactions("HealOp")
7553         def GetFreeBoundary(self, theObject, theName=None):
7554             """
7555             Get a list of wires (wrapped in GEOM.GEOM_Object-s),
7556             that constitute a free boundary of the given shape.
7557
7558             Parameters:
7559                 theObject Shape to get free boundary of.
7560                 theName Object name; when specified, this parameter is used
7561                         for result publication in the study. Otherwise, if automatic
7562                         publication is switched on, default value is used for result name.
7563
7564             Returns:
7565                 [status, theClosedWires, theOpenWires]
7566                  status: FALSE, if an error(s) occurred during the method execution.
7567                  theClosedWires: Closed wires on the free boundary of the given shape.
7568                  theOpenWires: Open wires on the free boundary of the given shape.
7569             """
7570             # Example: see GEOM_TestHealing.py
7571             anObj = self.HealOp.GetFreeBoundary( ToList( theObject ))
7572             RaiseIfFailed("GetFreeBoundary", self.HealOp)
7573             self._autoPublish(anObj[1], theName, "closedWire")
7574             self._autoPublish(anObj[2], theName, "openWire")
7575             return anObj
7576
7577         ## Replace coincident faces in \a theShapes by one face.
7578         #  @param theShapes Initial shapes, either a list or compound of shapes.
7579         #  @param theTolerance Maximum distance between faces, which can be considered as coincident.
7580         #  @param doKeepNonSolids If FALSE, only solids will present in the result,
7581         #                         otherwise all initial shapes.
7582         #  @param theName Object name; when specified, this parameter is used
7583         #         for result publication in the study. Otherwise, if automatic
7584         #         publication is switched on, default value is used for result name.
7585         #
7586         #  @return New GEOM.GEOM_Object, containing copies of theShapes without coincident faces.
7587         #
7588         #  @ref tui_glue_faces "Example"
7589         @ManageTransactions("ShapesOp")
7590         def MakeGlueFaces(self, theShapes, theTolerance, doKeepNonSolids=True, theName=None):
7591             """
7592             Replace coincident faces in theShapes by one face.
7593
7594             Parameters:
7595                 theShapes Initial shapes, either a list or compound of shapes.
7596                 theTolerance Maximum distance between faces, which can be considered as coincident.
7597                 doKeepNonSolids If FALSE, only solids will present in the result,
7598                                 otherwise all initial shapes.
7599                 theName Object name; when specified, this parameter is used
7600                         for result publication in the study. Otherwise, if automatic
7601                         publication is switched on, default value is used for result name.
7602
7603             Returns:
7604                 New GEOM.GEOM_Object, containing copies of theShapes without coincident faces.
7605             """
7606             # Example: see GEOM_Spanner.py
7607             theTolerance,Parameters = ParseParameters(theTolerance)
7608             anObj = self.ShapesOp.MakeGlueFaces(ToList(theShapes), theTolerance, doKeepNonSolids)
7609             if anObj is None:
7610                 raise RuntimeError("MakeGlueFaces : " + self.ShapesOp.GetErrorCode())
7611             anObj.SetParameters(Parameters)
7612             self._autoPublish(anObj, theName, "glueFaces")
7613             return anObj
7614
7615         ## Find coincident faces in \a theShapes for possible gluing.
7616         #  @param theShapes Initial shapes, either a list or compound of shapes.
7617         #  @param theTolerance Maximum distance between faces,
7618         #                      which can be considered as coincident.
7619         #  @param theName Object name; when specified, this parameter is used
7620         #         for result publication in the study. Otherwise, if automatic
7621         #         publication is switched on, default value is used for result name.
7622         #
7623         #  @return GEOM.ListOfGO
7624         #
7625         #  @ref tui_glue_faces "Example"
7626         @ManageTransactions("ShapesOp")
7627         def GetGlueFaces(self, theShapes, theTolerance, theName=None):
7628             """
7629             Find coincident faces in theShapes for possible gluing.
7630
7631             Parameters:
7632                 theShapes Initial shapes, either a list or compound of shapes.
7633                 theTolerance Maximum distance between faces,
7634                              which can be considered as coincident.
7635                 theName Object name; when specified, this parameter is used
7636                         for result publication in the study. Otherwise, if automatic
7637                         publication is switched on, default value is used for result name.
7638
7639             Returns:
7640                 GEOM.ListOfGO
7641             """
7642             anObj = self.ShapesOp.GetGlueFaces(ToList(theShapes), theTolerance)
7643             RaiseIfFailed("GetGlueFaces", self.ShapesOp)
7644             self._autoPublish(anObj, theName, "facesToGlue")
7645             return anObj
7646
7647         ## Replace coincident faces in \a theShapes by one face
7648         #  in compliance with given list of faces
7649         #  @param theShapes Initial shapes, either a list or compound of shapes.
7650         #  @param theTolerance Maximum distance between faces,
7651         #                      which can be considered as coincident.
7652         #  @param theFaces List of faces for gluing.
7653         #  @param doKeepNonSolids If FALSE, only solids will present in the result,
7654         #                         otherwise all initial shapes.
7655         #  @param doGlueAllEdges If TRUE, all coincident edges of <VAR>theShape</VAR>
7656         #                        will be glued, otherwise only the edges,
7657         #                        belonging to <VAR>theFaces</VAR>.
7658         #  @param theName Object name; when specified, this parameter is used
7659         #         for result publication in the study. Otherwise, if automatic
7660         #         publication is switched on, default value is used for result name.
7661         #
7662         #  @return New GEOM.GEOM_Object, containing copies of theShapes without coincident faces.
7663         #
7664         #  @ref tui_glue_faces "Example"
7665         @ManageTransactions("ShapesOp")
7666         def MakeGlueFacesByList(self, theShapes, theTolerance, theFaces,
7667                                 doKeepNonSolids=True, doGlueAllEdges=True, theName=None):
7668             """
7669             Replace coincident faces in theShapes by one face
7670             in compliance with given list of faces
7671
7672             Parameters:
7673                 theShapes theShapes Initial shapes, either a list or compound of shapes.
7674                 theTolerance Maximum distance between faces,
7675                              which can be considered as coincident.
7676                 theFaces List of faces for gluing.
7677                 doKeepNonSolids If FALSE, only solids will present in the result,
7678                                 otherwise all initial shapes.
7679                 doGlueAllEdges If TRUE, all coincident edges of theShape
7680                                will be glued, otherwise only the edges,
7681                                belonging to theFaces.
7682                 theName Object name; when specified, this parameter is used
7683                         for result publication in the study. Otherwise, if automatic
7684                         publication is switched on, default value is used for result name.
7685
7686             Returns:
7687                 New GEOM.GEOM_Object, containing copies of theShapes without coincident faces.
7688             """
7689             anObj = self.ShapesOp.MakeGlueFacesByList(ToList(theShapes), theTolerance, ToList(theFaces),
7690                                                       doKeepNonSolids, doGlueAllEdges)
7691             if anObj is None:
7692                 raise RuntimeError("MakeGlueFacesByList : " + self.ShapesOp.GetErrorCode())
7693             self._autoPublish(anObj, theName, "glueFaces")
7694             return anObj
7695
7696         ## Replace coincident edges in \a theShapes by one edge.
7697         #  @param theShapes Initial shapes, either a list or compound of shapes.
7698         #  @param theTolerance Maximum distance between edges, which can be considered as coincident.
7699         #  @param theName Object name; when specified, this parameter is used
7700         #         for result publication in the study. Otherwise, if automatic
7701         #         publication is switched on, default value is used for result name.
7702         #
7703         #  @return New GEOM.GEOM_Object, containing copies of theShapes without coincident edges.
7704         #
7705         #  @ref tui_glue_edges "Example"
7706         @ManageTransactions("ShapesOp")
7707         def MakeGlueEdges(self, theShapes, theTolerance, theName=None):
7708             """
7709             Replace coincident edges in theShapes by one edge.
7710
7711             Parameters:
7712                 theShapes Initial shapes, either a list or compound of shapes.
7713                 theTolerance Maximum distance between edges, which can be considered as coincident.
7714                 theName Object name; when specified, this parameter is used
7715                         for result publication in the study. Otherwise, if automatic
7716                         publication is switched on, default value is used for result name.
7717
7718             Returns:
7719                 New GEOM.GEOM_Object, containing copies of theShapes without coincident edges.
7720             """
7721             theTolerance,Parameters = ParseParameters(theTolerance)
7722             anObj = self.ShapesOp.MakeGlueEdges(ToList(theShapes), theTolerance)
7723             if anObj is None:
7724                 raise RuntimeError("MakeGlueEdges : " + self.ShapesOp.GetErrorCode())
7725             anObj.SetParameters(Parameters)
7726             self._autoPublish(anObj, theName, "glueEdges")
7727             return anObj
7728
7729         ## Find coincident edges in \a theShapes for possible gluing.
7730         #  @param theShapes Initial shapes, either a list or compound of shapes.
7731         #  @param theTolerance Maximum distance between edges,
7732         #                      which can be considered as coincident.
7733         #  @param theName Object name; when specified, this parameter is used
7734         #         for result publication in the study. Otherwise, if automatic
7735         #         publication is switched on, default value is used for result name.
7736         #
7737         #  @return GEOM.ListOfGO
7738         #
7739         #  @ref tui_glue_edges "Example"
7740         @ManageTransactions("ShapesOp")
7741         def GetGlueEdges(self, theShapes, theTolerance, theName=None):
7742             """
7743             Find coincident edges in theShapes for possible gluing.
7744
7745             Parameters:
7746                 theShapes Initial shapes, either a list or compound of shapes.
7747                 theTolerance Maximum distance between edges,
7748                              which can be considered as coincident.
7749                 theName Object name; when specified, this parameter is used
7750                         for result publication in the study. Otherwise, if automatic
7751                         publication is switched on, default value is used for result name.
7752
7753             Returns:
7754                 GEOM.ListOfGO
7755             """
7756             anObj = self.ShapesOp.GetGlueEdges(ToList(theShapes), theTolerance)
7757             RaiseIfFailed("GetGlueEdges", self.ShapesOp)
7758             self._autoPublish(anObj, theName, "edgesToGlue")
7759             return anObj
7760
7761         ## Replace coincident edges in theShapes by one edge
7762         #  in compliance with given list of edges.
7763         #  @param theShapes Initial shapes, either a list or compound of shapes.
7764         #  @param theTolerance Maximum distance between edges,
7765         #                      which can be considered as coincident.
7766         #  @param theEdges List of edges for gluing.
7767         #  @param theName Object name; when specified, this parameter is used
7768         #         for result publication in the study. Otherwise, if automatic
7769         #         publication is switched on, default value is used for result name.
7770         #
7771         #  @return New GEOM.GEOM_Object, containing copies of theShapes without coincident edges.
7772         #
7773         #  @ref tui_glue_edges "Example"
7774         @ManageTransactions("ShapesOp")
7775         def MakeGlueEdgesByList(self, theShapes, theTolerance, theEdges, theName=None):
7776             """
7777             Replace coincident edges in theShapes by one edge
7778             in compliance with given list of edges.
7779
7780             Parameters:
7781                 theShapes Initial shapes, either a list or compound of shapes.
7782                 theTolerance Maximum distance between edges,
7783                              which can be considered as coincident.
7784                 theEdges List of edges for gluing.
7785                 theName Object name; when specified, this parameter is used
7786                         for result publication in the study. Otherwise, if automatic
7787                         publication is switched on, default value is used for result name.
7788
7789             Returns:
7790                 New GEOM.GEOM_Object, containing copies of theShapes without coincident edges.
7791             """
7792             anObj = self.ShapesOp.MakeGlueEdgesByList(ToList(theShapes), theTolerance, theEdges)
7793             if anObj is None:
7794                 raise RuntimeError("MakeGlueEdgesByList : " + self.ShapesOp.GetErrorCode())
7795             self._autoPublish(anObj, theName, "glueEdges")
7796             return anObj
7797
7798         # end of l3_healing
7799         ## @}
7800
7801         ## @addtogroup l3_boolean Boolean Operations
7802         ## @{
7803
7804         # -----------------------------------------------------------------------------
7805         # Boolean (Common, Cut, Fuse, Section)
7806         # -----------------------------------------------------------------------------
7807
7808         ## Perform one of boolean operations on two given shapes.
7809         #  @param theShape1 First argument for boolean operation.
7810         #  @param theShape2 Second argument for boolean operation.
7811         #  @param theOperation Indicates the operation to be done:\n
7812         #                      1 - Common, 2 - Cut, 3 - Fuse, 4 - Section.
7813         #  @param checkSelfInte The flag that tells if the arguments should
7814         #         be checked for self-intersection prior to the operation.
7815         #  @param theName Object name; when specified, this parameter is used
7816         #         for result publication in the study. Otherwise, if automatic
7817         #         publication is switched on, default value is used for result name.
7818         #  @param theFuzzyParam The fuzzy parameter to be used for the boolean
7819         #         operation. If the value is not positive, no fuzzy tolerance will
7820         #         be considered for the boolean operation.
7821         #
7822         #  @note This algorithm doesn't find all types of self-intersections.
7823         #        It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7824         #        vertex/face and edge/face intersections. Face/face
7825         #        intersections detection is switched off as it is a
7826         #        time-consuming operation that gives an impact on performance.
7827         #        To find all self-intersections please use
7828         #        CheckSelfIntersections() method.
7829         #
7830         #  @return New GEOM.GEOM_Object, containing the result shape.
7831         #
7832         #  @ref tui_fuse "Example"
7833         @ManageTransactions("BoolOp")
7834         def MakeBoolean(self, theShape1, theShape2, theOperation, checkSelfInte=False, theName=None, theFuzzyParam=-1):
7835             """
7836             Perform one of boolean operations on two given shapes.
7837
7838             Parameters:
7839                 theShape1 First argument for boolean operation.
7840                 theShape2 Second argument for boolean operation.
7841                 theOperation Indicates the operation to be done:
7842                              1 - Common, 2 - Cut, 3 - Fuse, 4 - Section.
7843                 checkSelfInte The flag that tells if the arguments should
7844                               be checked for self-intersection prior to
7845                               the operation.
7846                 theName Object name; when specified, this parameter is used
7847                         for result publication in the study. Otherwise, if automatic
7848                         publication is switched on, default value is used for result name.
7849                 theFuzzyParam The fuzzy parameter to be used for the boolean operation.
7850                               If the value is not positive, no fuzzy tolerance will be
7851                               considered for the boolean operation.
7852
7853             Note:
7854                     This algorithm doesn't find all types of self-intersections.
7855                     It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7856                     vertex/face and edge/face intersections. Face/face
7857                     intersections detection is switched off as it is a
7858                     time-consuming operation that gives an impact on performance.
7859                     To find all self-intersections please use
7860                     CheckSelfIntersections() method.
7861
7862             Returns:
7863                 New GEOM.GEOM_Object, containing the result shape.
7864             """
7865             # Example: see GEOM_TestAll.py
7866             anObj = self.BoolOp.MakeBooleanWithFuzzy(theShape1, theShape2, theOperation, checkSelfInte, theFuzzyParam)
7867             RaiseIfFailed("MakeBoolean", self.BoolOp)
7868             def_names = { 1: "common", 2: "cut", 3: "fuse", 4: "section" }
7869             self._autoPublish(anObj, theName, def_names[theOperation])
7870             return anObj
7871
7872         ## Perform Common boolean operation on two given shapes.
7873         #  @param theShape1 First argument for boolean operation.
7874         #  @param theShape2 Second argument for boolean operation.
7875         #  @param checkSelfInte The flag that tells if the arguments should
7876         #         be checked for self-intersection prior to the operation.
7877         #  @param theName Object name; when specified, this parameter is used
7878         #         for result publication in the study. Otherwise, if automatic
7879         #         publication is switched on, default value is used for result name.
7880         #  @param theFuzzyParam The fuzzy parameter to be used for the boolean
7881         #         operation. If the value is not positive, no fuzzy tolerance will
7882         #         be considered for the boolean operation.
7883         #
7884         #  @note This algorithm doesn't find all types of self-intersections.
7885         #        It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7886         #        vertex/face and edge/face intersections. Face/face
7887         #        intersections detection is switched off as it is a
7888         #        time-consuming operation that gives an impact on performance.
7889         #        To find all self-intersections please use
7890         #        CheckSelfIntersections() method.
7891         #
7892         #  @return New GEOM.GEOM_Object, containing the result shape.
7893         #
7894         #  @ref tui_common "Example 1"
7895         #  \n @ref swig_MakeCommon "Example 2"
7896         def MakeCommon(self, theShape1, theShape2, checkSelfInte=False, theName=None, theFuzzyParam=-1):
7897             """
7898             Perform Common boolean operation on two given shapes.
7899
7900             Parameters:
7901                 theShape1 First argument for boolean operation.
7902                 theShape2 Second argument for boolean operation.
7903                 checkSelfInte The flag that tells if the arguments should
7904                               be checked for self-intersection prior to
7905                               the operation.
7906                 theName Object name; when specified, this parameter is used
7907                         for result publication in the study. Otherwise, if automatic
7908                         publication is switched on, default value is used for result name.
7909                 theFuzzyParam The fuzzy parameter to be used for the boolean operation.
7910                               If the value is not positive, no fuzzy tolerance will be
7911                               considered for the boolean operation.
7912
7913             Note:
7914                     This algorithm doesn't find all types of self-intersections.
7915                     It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7916                     vertex/face and edge/face intersections. Face/face
7917                     intersections detection is switched off as it is a
7918                     time-consuming operation that gives an impact on performance.
7919                     To find all self-intersections please use
7920                     CheckSelfIntersections() method.
7921
7922             Returns:
7923                 New GEOM.GEOM_Object, containing the result shape.
7924             """
7925             # Example: see GEOM_TestOthers.py
7926             # note: auto-publishing is done in self.MakeBoolean()
7927             return self.MakeBoolean(theShape1, theShape2, 1, checkSelfInte, theName, theFuzzyParam)
7928
7929         ## Perform Cut boolean operation on two given shapes.
7930         #  @param theShape1 First argument for boolean operation.
7931         #  @param theShape2 Second argument for boolean operation.
7932         #  @param checkSelfInte The flag that tells if the arguments should
7933         #         be checked for self-intersection prior to the operation.
7934         #  @param theName Object name; when specified, this parameter is used
7935         #         for result publication in the study. Otherwise, if automatic
7936         #         publication is switched on, default value is used for result name.
7937         #  @param theFuzzyParam The fuzzy parameter to be used for the boolean
7938         #         operation. If the value is not positive, no fuzzy tolerance will
7939         #         be considered for the boolean operation.
7940         #
7941         #  @note This algorithm doesn't find all types of self-intersections.
7942         #        It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7943         #        vertex/face and edge/face intersections. Face/face
7944         #        intersections detection is switched off as it is a
7945         #        time-consuming operation that gives an impact on performance.
7946         #        To find all self-intersections please use
7947         #        CheckSelfIntersections() method.
7948         #
7949         #  @return New GEOM.GEOM_Object, containing the result shape.
7950         #
7951         #  @ref tui_cut "Example 1"
7952         #  \n @ref swig_MakeCommon "Example 2"
7953         def MakeCut(self, theShape1, theShape2, checkSelfInte=False, theName=None, theFuzzyParam=-1):
7954             """
7955             Perform Cut boolean operation on two given shapes.
7956
7957             Parameters:
7958                 theShape1 First argument for boolean operation.
7959                 theShape2 Second argument for boolean operation.
7960                 checkSelfInte The flag that tells if the arguments should
7961                               be checked for self-intersection prior to
7962                               the operation.
7963                 theName Object name; when specified, this parameter is used
7964                         for result publication in the study. Otherwise, if automatic
7965                         publication is switched on, default value is used for result name.
7966                 theFuzzyParam The fuzzy parameter to be used for the boolean operation.
7967                               If the value is not positive, no fuzzy tolerance will be
7968                               considered for the boolean operation.
7969
7970             Note:
7971                     This algorithm doesn't find all types of self-intersections.
7972                     It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7973                     vertex/face and edge/face intersections. Face/face
7974                     intersections detection is switched off as it is a
7975                     time-consuming operation that gives an impact on performance.
7976                     To find all self-intersections please use
7977                     CheckSelfIntersections() method.
7978
7979             Returns:
7980                 New GEOM.GEOM_Object, containing the result shape.
7981
7982             """
7983             # Example: see GEOM_TestOthers.py
7984             # note: auto-publishing is done in self.MakeBoolean()
7985             return self.MakeBoolean(theShape1, theShape2, 2, checkSelfInte, theName, theFuzzyParam)
7986
7987         ## Perform Fuse boolean operation on two given shapes.
7988         #  @param theShape1 First argument for boolean operation.
7989         #  @param theShape2 Second argument for boolean operation.
7990         #  @param checkSelfInte The flag that tells if the arguments should
7991         #         be checked for self-intersection prior to the operation.
7992         #  @param rmExtraEdges The flag that tells if Remove Extra Edges
7993         #         operation should be performed during the operation.
7994         #  @param theName Object name; when specified, this parameter is used
7995         #         for result publication in the study. Otherwise, if automatic
7996         #         publication is switched on, default value is used for result name.
7997         #  @param theFuzzyParam The fuzzy parameter to be used for the boolean
7998         #         operation. If the value is not positive, no fuzzy tolerance will
7999         #         be considered for the boolean operation.
8000         #
8001         #  @note This algorithm doesn't find all types of self-intersections.
8002         #        It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
8003         #        vertex/face and edge/face intersections. Face/face
8004         #        intersections detection is switched off as it is a
8005         #        time-consuming operation that gives an impact on performance.
8006         #        To find all self-intersections please use
8007         #        CheckSelfIntersections() method.
8008         #
8009         #  @return New GEOM.GEOM_Object, containing the result shape.
8010         #
8011         #  @ref tui_fuse "Example 1"
8012         #  \n @ref swig_MakeCommon "Example 2"
8013         @ManageTransactions("BoolOp")
8014         def MakeFuse(self, theShape1, theShape2, checkSelfInte=False,
8015                      rmExtraEdges=False, theName=None, theFuzzyParam=-1):
8016             """
8017             Perform Fuse boolean operation on two given shapes.
8018
8019             Parameters:
8020                 theShape1 First argument for boolean operation.
8021                 theShape2 Second argument for boolean operation.
8022                 checkSelfInte The flag that tells if the arguments should
8023                               be checked for self-intersection prior to
8024                               the operation.
8025                 rmExtraEdges The flag that tells if Remove Extra Edges
8026                              operation should be performed during the operation.
8027                 theName Object name; when specified, this parameter is used
8028                         for result publication in the study. Otherwise, if automatic
8029                         publication is switched on, default value is used for result name.
8030                 theFuzzyParam The fuzzy parameter to be used for the boolean operation.
8031                               If the value is not positive, no fuzzy tolerance will be
8032                               considered for the boolean operation.
8033
8034             Note:
8035                     This algorithm doesn't find all types of self-intersections.
8036                     It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
8037                     vertex/face and edge/face intersections. Face/face
8038                     intersections detection is switched off as it is a
8039                     time-consuming operation that gives an impact on performance.
8040                     To find all self-intersections please use
8041                     CheckSelfIntersections() method.
8042
8043             Returns:
8044                 New GEOM.GEOM_Object, containing the result shape.
8045
8046             """
8047             # Example: see GEOM_TestOthers.py
8048             anObj = self.BoolOp.MakeFuseWithFuzzy(theShape1, theShape2, checkSelfInte,
8049                                                   rmExtraEdges, theFuzzyParam)
8050             RaiseIfFailed("MakeFuse", self.BoolOp)
8051             self._autoPublish(anObj, theName, "fuse")
8052             return anObj
8053
8054         ## Perform Section boolean operation on two given shapes.
8055         #  @param theShape1 First argument for boolean operation.
8056         #  @param theShape2 Second argument for boolean operation.
8057         #  @param checkSelfInte The flag that tells if the arguments should
8058         #         be checked for self-intersection prior to the operation.
8059         #         If a self-intersection detected the operation fails.
8060         #  @param theName Object name; when specified, this parameter is used
8061         #         for result publication in the study. Otherwise, if automatic
8062         #         publication is switched on, default value is used for result name.
8063         #  @param theFuzzyParam The fuzzy parameter to be used for the boolean
8064         #         operation. If the value is not positive, no fuzzy tolerance will
8065         #         be considered for the boolean operation.
8066         #  @return New GEOM.GEOM_Object, containing the result shape.
8067         #
8068         #  @ref tui_section "Example 1"
8069         #  \n @ref swig_MakeCommon "Example 2"
8070         def MakeSection(self, theShape1, theShape2, checkSelfInte=False, theName=None, theFuzzyParam=-1):
8071             """
8072             Perform Section boolean operation on two given shapes.
8073
8074             Parameters:
8075                 theShape1 First argument for boolean operation.
8076                 theShape2 Second argument for boolean operation.
8077                 checkSelfInte The flag that tells if the arguments should
8078                               be checked for self-intersection prior to the operation.
8079                               If a self-intersection detected the operation fails.
8080                 theName Object name; when specified, this parameter is used
8081                         for result publication in the study. Otherwise, if automatic
8082                         publication is switched on, default value is used for result name.
8083                 theFuzzyParam The fuzzy parameter to be used for the boolean operation.
8084                               If the value is not positive, no fuzzy tolerance will be
8085                               considered for the boolean operation.
8086             Returns:
8087                 New GEOM.GEOM_Object, containing the result shape.
8088
8089             """
8090             # Example: see GEOM_TestOthers.py
8091             # note: auto-publishing is done in self.MakeBoolean()
8092             return self.MakeBoolean(theShape1, theShape2, 4, checkSelfInte, theName, theFuzzyParam)
8093
8094         ## Perform Fuse boolean operation on the list of shapes.
8095         #  @param theShapesList Shapes to be fused.
8096         #  @param checkSelfInte The flag that tells if the arguments should
8097         #         be checked for self-intersection prior to the operation.
8098         #  @param rmExtraEdges The flag that tells if Remove Extra Edges
8099         #         operation should be performed during the operation.
8100         #  @param theName Object name; when specified, this parameter is used
8101         #         for result publication in the study. Otherwise, if automatic
8102         #         publication is switched on, default value is used for result name.
8103         #  @param theFuzzyParam The fuzzy parameter to be used for the boolean
8104         #         operation. If the value is not positive, no fuzzy tolerance will
8105         #         be considered for the boolean operation.
8106         #
8107         #  @note This algorithm doesn't find all types of self-intersections.
8108         #        It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
8109         #        vertex/face and edge/face intersections. Face/face
8110         #        intersections detection is switched off as it is a
8111         #        time-consuming operation that gives an impact on performance.
8112         #        To find all self-intersections please use
8113         #        CheckSelfIntersections() method.
8114         #
8115         #  @return New GEOM.GEOM_Object, containing the result shape.
8116         #
8117         #  @ref tui_fuse "Example 1"
8118         #  \n @ref swig_MakeCommon "Example 2"
8119         @ManageTransactions("BoolOp")
8120         def MakeFuseList(self, theShapesList, checkSelfInte=False,
8121                          rmExtraEdges=False, theName=None, theFuzzyParam=-1):
8122             """
8123             Perform Fuse boolean operation on the list of shapes.
8124
8125             Parameters:
8126                 theShapesList Shapes to be fused.
8127                 checkSelfInte The flag that tells if the arguments should
8128                               be checked for self-intersection prior to
8129                               the operation.
8130                 rmExtraEdges The flag that tells if Remove Extra Edges
8131                              operation should be performed during the operation.
8132                 theName Object name; when specified, this parameter is used
8133                         for result publication in the study. Otherwise, if automatic
8134                         publication is switched on, default value is used for result name.
8135                 theFuzzyParam The fuzzy parameter to be used for the boolean operation.
8136                               If the value is not positive, no fuzzy tolerance will be
8137                               considered for the boolean operation.
8138
8139             Note:
8140                     This algorithm doesn't find all types of self-intersections.
8141                     It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
8142                     vertex/face and edge/face intersections. Face/face
8143                     intersections detection is switched off as it is a
8144                     time-consuming operation that gives an impact on performance.
8145                     To find all self-intersections please use
8146                     CheckSelfIntersections() method.
8147
8148             Returns:
8149                 New GEOM.GEOM_Object, containing the result shape.
8150
8151             """
8152             # Example: see GEOM_TestOthers.py
8153             anObj = self.BoolOp.MakeFuseListWithFuzzy(theShapesList, checkSelfInte,
8154                                                       rmExtraEdges, theFuzzyParam)
8155             RaiseIfFailed("MakeFuseList", self.BoolOp)
8156             self._autoPublish(anObj, theName, "fuse")
8157             return anObj
8158
8159         ## Perform Common boolean operation on the list of shapes.
8160         #  @param theShapesList Shapes for Common operation.
8161         #  @param checkSelfInte The flag that tells if the arguments should
8162         #         be checked for self-intersection prior to the operation.
8163         #  @param theName Object name; when specified, this parameter is used
8164         #         for result publication in the study. Otherwise, if automatic
8165         #         publication is switched on, default value is used for result name.
8166         #  @param theFuzzyParam The fuzzy parameter to be used for the boolean
8167         #         operation. If the value is not positive, no fuzzy tolerance will
8168         #         be considered for the boolean operation.
8169         #
8170         #  @note This algorithm doesn't find all types of self-intersections.
8171         #        It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
8172         #        vertex/face and edge/face intersections. Face/face
8173         #        intersections detection is switched off as it is a
8174         #        time-consuming operation that gives an impact on performance.
8175         #        To find all self-intersections please use
8176         #        CheckSelfIntersections() method.
8177         #
8178         #  @return New GEOM.GEOM_Object, containing the result shape.
8179         #
8180         #  @ref tui_common "Example 1"
8181         #  \n @ref swig_MakeCommon "Example 2"
8182         @ManageTransactions("BoolOp")
8183         def MakeCommonList(self, theShapesList, checkSelfInte=False, theName=None, theFuzzyParam=-1):
8184             """
8185             Perform Common boolean operation on the list of shapes.
8186
8187             Parameters:
8188                 theShapesList Shapes for Common operation.
8189                 checkSelfInte The flag that tells if the arguments should
8190                               be checked for self-intersection prior to
8191                               the operation.
8192                 theName Object name; when specified, this parameter is used
8193                         for result publication in the study. Otherwise, if automatic
8194                         publication is switched on, default value is used for result name.
8195                 theFuzzyParam The fuzzy parameter to be used for the boolean operation.
8196                               If the value is not positive, no fuzzy tolerance will be
8197                               considered for the boolean operation.
8198
8199             Note:
8200                     This algorithm doesn't find all types of self-intersections.
8201                     It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
8202                     vertex/face and edge/face intersections. Face/face
8203                     intersections detection is switched off as it is a
8204                     time-consuming operation that gives an impact on performance.
8205                     To find all self-intersections please use
8206                     CheckSelfIntersections() method.
8207
8208             Returns:
8209                 New GEOM.GEOM_Object, containing the result shape.
8210
8211             """
8212             # Example: see GEOM_TestOthers.py
8213             anObj = self.BoolOp.MakeCommonListWithFuzzy(theShapesList, checkSelfInte, theFuzzyParam)
8214             RaiseIfFailed("MakeCommonList", self.BoolOp)
8215             self._autoPublish(anObj, theName, "common")
8216             return anObj
8217
8218         ## Perform Cut boolean operation on one object and the list of tools.
8219         #  @param theMainShape The object of the operation.
8220         #  @param theShapesList The list of tools of the operation.
8221         #  @param checkSelfInte The flag that tells if the arguments should
8222         #         be checked for self-intersection prior to the operation.
8223         #  @param theName Object name; when specified, this parameter is used
8224         #         for result publication in the study. Otherwise, if automatic
8225         #         publication is switched on, default value is used for result name.
8226         #  @param theFuzzyParam The fuzzy parameter to be used for the boolean
8227         #         operation. If the value is not positive, no fuzzy tolerance will
8228         #         be considered for the boolean operation.
8229         #
8230         #  @note This algorithm doesn't find all types of self-intersections.
8231         #        It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
8232         #        vertex/face and edge/face intersections. Face/face
8233         #        intersections detection is switched off as it is a
8234         #        time-consuming operation that gives an impact on performance.
8235         #        To find all self-intersections please use
8236         #        CheckSelfIntersections() method.
8237         #
8238         #  @return New GEOM.GEOM_Object, containing the result shape.
8239         #
8240         #  @ref tui_cut "Example 1"
8241         #  \n @ref swig_MakeCommon "Example 2"
8242         @ManageTransactions("BoolOp")
8243         def MakeCutList(self, theMainShape, theShapesList, checkSelfInte=False, theName=None, theFuzzyParam=-1):
8244             """
8245             Perform Cut boolean operation on one object and the list of tools.
8246
8247             Parameters:
8248                 theMainShape The object of the operation.
8249                 theShapesList The list of tools of the operation.
8250                 checkSelfInte The flag that tells if the arguments should
8251                               be checked for self-intersection prior to
8252                               the operation.
8253                 theName Object name; when specified, this parameter is used
8254                         for result publication in the study. Otherwise, if automatic
8255                         publication is switched on, default value is used for result name.
8256                 theFuzzyParam The fuzzy parameter to be used for the boolean operation.
8257                               If the value is not positive, no fuzzy tolerance will be
8258                               considered for the boolean operation.
8259
8260             Note:
8261                     This algorithm doesn't find all types of self-intersections.
8262                     It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
8263                     vertex/face and edge/face intersections. Face/face
8264                     intersections detection is switched off as it is a
8265                     time-consuming operation that gives an impact on performance.
8266                     To find all self-intersections please use
8267                     CheckSelfIntersections() method.
8268
8269             Returns:
8270                 New GEOM.GEOM_Object, containing the result shape.
8271
8272             """
8273             # Example: see GEOM_TestOthers.py
8274             anObj = self.BoolOp.MakeCutListWithFuzzy(theMainShape, theShapesList, checkSelfInte, theFuzzyParam)
8275             RaiseIfFailed("MakeCutList", self.BoolOp)
8276             self._autoPublish(anObj, theName, "cut")
8277             return anObj
8278
8279         # end of l3_boolean
8280         ## @}
8281
8282         ## @addtogroup l3_basic_op
8283         ## @{
8284
8285         ## Perform partition operation.
8286         #  @param ListShapes Shapes to be intersected.
8287         #  @param ListTools Shapes to intersect theShapes.
8288         #  @param Limit Type of resulting shapes (see ShapeType()).\n
8289         #         If this parameter is set to -1 ("Auto"), most appropriate shape limit
8290         #         type will be detected automatically.
8291         #  @param KeepNonlimitShapes if this parameter == 0, then only shapes of
8292         #                             target type (equal to Limit) are kept in the result,
8293         #                             else standalone shapes of lower dimension
8294         #                             are kept also (if they exist).
8295         #  @param theName Object name; when specified, this parameter is used
8296         #         for result publication in the study. Otherwise, if automatic
8297         #         publication is switched on, default value is used for result name.
8298         #  @param theFuzzyParam The fuzzy parameter to be used for the partition
8299         #         operation. If the value is not positive, no fuzzy tolerance will
8300         #         be considered for the partition operation.
8301         #
8302         #  @note Each compound from ListShapes and ListTools will be exploded
8303         #        in order to avoid possible intersection between shapes from this compound.
8304         #
8305         #  After implementation new version of PartitionAlgo (October 2006)
8306         #  other parameters are ignored by current functionality. They are kept
8307         #  in this function only for support old versions.
8308         #      @param ListKeepInside Shapes, outside which the results will be deleted.
8309         #         Each shape from theKeepInside must belong to theShapes also.
8310         #      @param ListRemoveInside Shapes, inside which the results will be deleted.
8311         #         Each shape from theRemoveInside must belong to theShapes also.
8312         #      @param RemoveWebs If TRUE, perform Glue 3D algorithm.
8313         #      @param ListMaterials Material indices for each shape. Make sense,
8314         #         only if theRemoveWebs is TRUE.
8315         #
8316         #  @return New GEOM.GEOM_Object, containing the result shapes.
8317         #
8318         #  @ref tui_partition "Example"
8319         @ManageTransactions("BoolOp")
8320         def MakePartition(self, ListShapes, ListTools=[], ListKeepInside=[], ListRemoveInside=[],
8321                           Limit=ShapeType["AUTO"], RemoveWebs=0, ListMaterials=[],
8322                           KeepNonlimitShapes=0, theName=None, theFuzzyParam=-1):
8323             """
8324             Perform partition operation.
8325
8326             Parameters:
8327                 ListShapes Shapes to be intersected.
8328                 ListTools Shapes to intersect theShapes.
8329                 Limit Type of resulting shapes (see geompy.ShapeType)
8330                       If this parameter is set to -1 ("Auto"), most appropriate shape limit
8331                       type will be detected automatically.
8332                 KeepNonlimitShapes if this parameter == 0, then only shapes of
8333                                     target type (equal to Limit) are kept in the result,
8334                                     else standalone shapes of lower dimension
8335                                     are kept also (if they exist).
8336
8337                 theName Object name; when specified, this parameter is used
8338                         for result publication in the study. Otherwise, if automatic
8339                         publication is switched on, default value is used for result name.
8340             Note:
8341                     Each compound from ListShapes and ListTools will be exploded
8342                     in order to avoid possible intersection between shapes from
8343                     this compound.
8344
8345             After implementation new version of PartitionAlgo (October 2006) other
8346             parameters are ignored by current functionality. They are kept in this
8347             function only for support old versions.
8348
8349             Ignored parameters:
8350                 ListKeepInside Shapes, outside which the results will be deleted.
8351                                Each shape from theKeepInside must belong to theShapes also.
8352                 ListRemoveInside Shapes, inside which the results will be deleted.
8353                                  Each shape from theRemoveInside must belong to theShapes also.
8354                 RemoveWebs If TRUE, perform Glue 3D algorithm.
8355                 ListMaterials Material indices for each shape. Make sense, only if theRemoveWebs is TRUE.
8356
8357             Returns:
8358                 New GEOM.GEOM_Object, containing the result shapes.
8359             """
8360             # Example: see GEOM_TestAll.py
8361             if Limit == self.ShapeType["AUTO"]:
8362                 # automatic detection of the most appropriate shape limit type
8363                 lim = GEOM.SHAPE
8364                 for s in ListShapes: lim = min(lim, s.GetMaxShapeType())
8365                 Limit = EnumToLong(lim)
8366                 pass
8367             anObj = self.BoolOp.MakePartitionWithFuzzy(ListShapes, ListTools,
8368                                                        ListKeepInside, ListRemoveInside,
8369                                                        Limit, RemoveWebs, ListMaterials,
8370                                                        KeepNonlimitShapes, theFuzzyParam)
8371             RaiseIfFailed("MakePartition", self.BoolOp)
8372             self._autoPublish(anObj, theName, "partition")
8373             return anObj
8374
8375         ## Perform partition operation.
8376         #  This method may be useful if it is needed to make a partition for
8377         #  compound contains nonintersected shapes. Performance will be better
8378         #  since intersection between shapes from compound is not performed.
8379         #
8380         #  Description of all parameters as in previous method MakePartition().
8381         #  One additional parameter is provided:
8382         #  @param checkSelfInte The flag that tells if the arguments should
8383         #         be checked for self-intersection prior to the operation.
8384         #  @param theFuzzyParam The fuzzy parameter to be used for the partition
8385         #         operation. If the value is not positive, no fuzzy tolerance will
8386         #         be considered for the partition operation.
8387         #
8388         #  @note This algorithm doesn't find all types of self-intersections.
8389         #        It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
8390         #        vertex/face and edge/face intersections. Face/face
8391         #        intersections detection is switched off as it is a
8392         #        time-consuming operation that gives an impact on performance.
8393         #        To find all self-intersections please use
8394         #        CheckSelfIntersections() method.
8395         #
8396         #  @note Passed compounds (via ListShapes or via ListTools)
8397         #           have to consist of nonintersecting shapes.
8398         #
8399         #  @return New GEOM.GEOM_Object, containing the result shapes.
8400         #
8401         #  @ref swig_todo "Example"
8402         @ManageTransactions("BoolOp")
8403         def MakePartitionNonSelfIntersectedShape(self, ListShapes, ListTools=[],
8404                                                  ListKeepInside=[], ListRemoveInside=[],
8405                                                  Limit=ShapeType["AUTO"], RemoveWebs=0,
8406                                                  ListMaterials=[], KeepNonlimitShapes=0,
8407                                                  checkSelfInte=False, theName=None,
8408                                                  theFuzzyParam=-1):
8409             """
8410             Perform partition operation.
8411             This method may be useful if it is needed to make a partition for
8412             compound contains nonintersected shapes. Performance will be better
8413             since intersection between shapes from compound is not performed.
8414
8415             Parameters:
8416                 Description of all parameters as in method geompy.MakePartition.
8417                 One additional parameter is provided:
8418                 checkSelfInte The flag that tells if the arguments should
8419                               be checked for self-intersection prior to
8420                               the operation.
8421
8422             Note:
8423                     This algorithm doesn't find all types of self-intersections.
8424                     It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
8425                     vertex/face and edge/face intersections. Face/face
8426                     intersections detection is switched off as it is a
8427                     time-consuming operation that gives an impact on performance.
8428                     To find all self-intersections please use
8429                     CheckSelfIntersections() method.
8430
8431             NOTE:
8432                 Passed compounds (via ListShapes or via ListTools)
8433                 have to consist of nonintersecting shapes.
8434
8435             Returns:
8436                 New GEOM.GEOM_Object, containing the result shapes.
8437             """
8438             if Limit == self.ShapeType["AUTO"]:
8439                 # automatic detection of the most appropriate shape limit type
8440                 lim = GEOM.SHAPE
8441                 for s in ListShapes: lim = min(lim, s.GetMaxShapeType())
8442                 Limit = EnumToLong(lim)
8443                 pass
8444             anObj = self.BoolOp.MakePartitionNonSelfIntersectedShapeWithFuzzy(ListShapes, ListTools,
8445                                                                               ListKeepInside, ListRemoveInside,
8446                                                                               Limit, RemoveWebs, ListMaterials,
8447                                                                               KeepNonlimitShapes, checkSelfInte,
8448                                                                               theFuzzyParam)
8449             RaiseIfFailed("MakePartitionNonSelfIntersectedShape", self.BoolOp)
8450             self._autoPublish(anObj, theName, "partition")
8451             return anObj
8452
8453         ## See method MakePartition() for more information.
8454         #
8455         #  @ref tui_partition "Example 1"
8456         #  \n @ref swig_Partition "Example 2"
8457         def Partition(self, ListShapes, ListTools=[], ListKeepInside=[], ListRemoveInside=[],
8458                       Limit=ShapeType["AUTO"], RemoveWebs=0, ListMaterials=[],
8459                       KeepNonlimitShapes=0, theName=None, theFuzzyParam=-1):
8460             """
8461             See method geompy.MakePartition for more information.
8462             """
8463             # Example: see GEOM_TestOthers.py
8464             # note: auto-publishing is done in self.MakePartition()
8465             anObj = self.MakePartition(ListShapes, ListTools,
8466                                        ListKeepInside, ListRemoveInside,
8467                                        Limit, RemoveWebs, ListMaterials,
8468                                        KeepNonlimitShapes, theName, theFuzzyParam)
8469             return anObj
8470
8471         ## Perform partition of the Shape with the Plane
8472         #  @param theShape Shape to be intersected.
8473         #  @param thePlane Tool shape, to intersect theShape.
8474         #  @param 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         #  @param theFuzzyParam The fuzzy parameter to be used for the partition
8478         #         operation. If the value is not positive, no fuzzy tolerance will
8479         #         be considered for the partition operation.
8480         #
8481         #  @return New GEOM.GEOM_Object, containing the result shape.
8482         #
8483         #  @note This operation is a shortcut to the more general @ref MakePartition
8484         #  operation, where @a theShape specifies single "object" (shape being partitioned)
8485         #  and @a thePlane specifies single "tool" (intersector shape). Other parameters of
8486         #  @ref MakePartition operation have default values:
8487         #  - @a Limit: GEOM::SHAPE (shape limit corresponds to the type of @a theShape)
8488         #  - @a KeepNonlimitShapes: 0
8489         #  - @a KeepInside, @a RemoveInside, @a RemoveWebs,
8490         #    @a Materials (obsolete parameters): empty
8491         #
8492         #  @note I.e. the following two operations are equivalent:
8493         #  @code
8494         #  Result = geompy.MakeHalfPartition(Object, Plane)
8495         #  Result = geompy.MakePartition([Object], [Plane])
8496         #  @endcode
8497         #
8498         #  @sa MakePartition, MakePartitionNonSelfIntersectedShape
8499         #
8500         #  @ref tui_partition "Example"
8501         @ManageTransactions("BoolOp")
8502         def MakeHalfPartition(self, theShape, thePlane, theName=None, theFuzzyParam=-1):
8503             """
8504             Perform partition of the Shape with the Plane
8505
8506             Parameters:
8507                 theShape Shape to be intersected.
8508                 thePlane Tool shape, to intersect theShape.
8509                 theName Object name; when specified, this parameter is used
8510                         for result publication in the study. Otherwise, if automatic
8511                         publication is switched on, default value is used for result name.
8512
8513             Returns:
8514                 New GEOM.GEOM_Object, containing the result shape.
8515          
8516             Note: This operation is a shortcut to the more general MakePartition
8517             operation, where theShape specifies single "object" (shape being partitioned)
8518             and thePlane specifies single "tool" (intersector shape). Other parameters of
8519             MakePartition operation have default values:
8520             - Limit: GEOM::SHAPE (shape limit corresponds to the type of theShape)
8521             - KeepNonlimitShapes: 0
8522             - KeepInside, RemoveInside, RemoveWebs, Materials (obsolete parameters): empty
8523          
8524             I.e. the following two operations are equivalent:
8525               Result = geompy.MakeHalfPartition(Object, Plane)
8526               Result = geompy.MakePartition([Object], [Plane])
8527             """
8528             # Example: see GEOM_TestAll.py
8529             anObj = self.BoolOp.MakeHalfPartitionWithFuzzy(theShape, thePlane, theFuzzyParam)
8530             RaiseIfFailed("MakeHalfPartition", self.BoolOp)
8531             self._autoPublish(anObj, theName, "partition")
8532             return anObj
8533
8534         # end of l3_basic_op
8535         ## @}
8536
8537         ## @addtogroup l3_transform
8538         ## @{
8539
8540         ## Translate the given object along the vector, specified
8541         #  by its end points.
8542         #  @param theObject The object to be translated.
8543         #  @param thePoint1 Start point of translation vector.
8544         #  @param thePoint2 End point of translation vector.
8545         #  @param theCopy Flag used to translate object itself or create a copy.
8546         #  @return Translated @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
8547         #  new GEOM.GEOM_Object, containing the translated object if @a theCopy flag is @c True.
8548         @ManageTransactions("TrsfOp")
8549         def TranslateTwoPoints(self, theObject, thePoint1, thePoint2, theCopy=False):
8550             """
8551             Translate the given object along the vector, specified by its end points.
8552
8553             Parameters:
8554                 theObject The object to be translated.
8555                 thePoint1 Start point of translation vector.
8556                 thePoint2 End point of translation vector.
8557                 theCopy Flag used to translate object itself or create a copy.
8558
8559             Returns:
8560                 Translated theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
8561                 new GEOM.GEOM_Object, containing the translated object if theCopy flag is True.
8562             """
8563             if theCopy:
8564                 anObj = self.TrsfOp.TranslateTwoPointsCopy(theObject, thePoint1, thePoint2)
8565             else:
8566                 anObj = self.TrsfOp.TranslateTwoPoints(theObject, thePoint1, thePoint2)
8567             RaiseIfFailed("TranslateTwoPoints", self.TrsfOp)
8568             return anObj
8569
8570         ## Translate the given object along the vector, specified
8571         #  by its end points, creating its copy before the translation.
8572         #  @param theObject The object to be translated.
8573         #  @param thePoint1 Start point of translation vector.
8574         #  @param thePoint2 End point of translation vector.
8575         #  @param theName Object name; when specified, this parameter is used
8576         #         for result publication in the study. Otherwise, if automatic
8577         #         publication is switched on, default value is used for result name.
8578         #
8579         #  @return New GEOM.GEOM_Object, containing the translated object.
8580         #
8581         #  @ref tui_translation "Example 1"
8582         #  \n @ref swig_MakeTranslationTwoPoints "Example 2"
8583         @ManageTransactions("TrsfOp")
8584         def MakeTranslationTwoPoints(self, theObject, thePoint1, thePoint2, theName=None):
8585             """
8586             Translate the given object along the vector, specified
8587             by its end points, creating its copy before the translation.
8588
8589             Parameters:
8590                 theObject The object to be translated.
8591                 thePoint1 Start point of translation vector.
8592                 thePoint2 End point of translation vector.
8593                 theName Object name; when specified, this parameter is used
8594                         for result publication in the study. Otherwise, if automatic
8595                         publication is switched on, default value is used for result name.
8596
8597             Returns:
8598                 New GEOM.GEOM_Object, containing the translated object.
8599             """
8600             # Example: see GEOM_TestAll.py
8601             anObj = self.TrsfOp.TranslateTwoPointsCopy(theObject, thePoint1, thePoint2)
8602             RaiseIfFailed("TranslateTwoPointsCopy", self.TrsfOp)
8603             self._autoPublish(anObj, theName, "translated")
8604             return anObj
8605
8606         ## Translate the given object along the vector, specified by its components.
8607         #  @param theObject The object to be translated.
8608         #  @param theDX,theDY,theDZ Components of translation vector.
8609         #  @param theCopy Flag used to translate object itself or create a copy.
8610         #  @return Translated @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
8611         #  new GEOM.GEOM_Object, containing the translated object if @a theCopy flag is @c True.
8612         #
8613         #  @ref tui_translation "Example"
8614         @ManageTransactions("TrsfOp")
8615         def TranslateDXDYDZ(self, theObject, theDX, theDY, theDZ, theCopy=False):
8616             """
8617             Translate the given object along the vector, specified by its components.
8618
8619             Parameters:
8620                 theObject The object to be translated.
8621                 theDX,theDY,theDZ Components of translation vector.
8622                 theCopy Flag used to translate object itself or create a copy.
8623
8624             Returns:
8625                 Translated theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
8626                 new GEOM.GEOM_Object, containing the translated object if theCopy flag is True.
8627             """
8628             # Example: see GEOM_TestAll.py
8629             theDX, theDY, theDZ, Parameters = ParseParameters(theDX, theDY, theDZ)
8630             if theCopy:
8631                 anObj = self.TrsfOp.TranslateDXDYDZCopy(theObject, theDX, theDY, theDZ)
8632             else:
8633                 anObj = self.TrsfOp.TranslateDXDYDZ(theObject, theDX, theDY, theDZ)
8634             anObj.SetParameters(Parameters)
8635             RaiseIfFailed("TranslateDXDYDZ", self.TrsfOp)
8636             return anObj
8637
8638         ## Translate the given object along the vector, specified
8639         #  by its components, creating its copy before the translation.
8640         #  @param theObject The object to be translated.
8641         #  @param theDX,theDY,theDZ Components of translation vector.
8642         #  @param theName Object name; when specified, this parameter is used
8643         #         for result publication in the study. Otherwise, if automatic
8644         #         publication is switched on, default value is used for result name.
8645         #
8646         #  @return New GEOM.GEOM_Object, containing the translated object.
8647         #
8648         #  @ref tui_translation "Example"
8649         @ManageTransactions("TrsfOp")
8650         def MakeTranslation(self,theObject, theDX, theDY, theDZ, theName=None):
8651             """
8652             Translate the given object along the vector, specified
8653             by its components, creating its copy before the translation.
8654
8655             Parameters:
8656                 theObject The object to be translated.
8657                 theDX,theDY,theDZ Components of translation vector.
8658                 theName Object name; when specified, this parameter is used
8659                         for result publication in the study. Otherwise, if automatic
8660                         publication is switched on, default value is used for result name.
8661
8662             Returns:
8663                 New GEOM.GEOM_Object, containing the translated object.
8664             """
8665             # Example: see GEOM_TestAll.py
8666             theDX, theDY, theDZ, Parameters = ParseParameters(theDX, theDY, theDZ)
8667             anObj = self.TrsfOp.TranslateDXDYDZCopy(theObject, theDX, theDY, theDZ)
8668             anObj.SetParameters(Parameters)
8669             RaiseIfFailed("TranslateDXDYDZ", self.TrsfOp)
8670             self._autoPublish(anObj, theName, "translated")
8671             return anObj
8672
8673         ## Translate the given object along the given vector.
8674         #  @param theObject The object to be translated.
8675         #  @param theVector The translation vector.
8676         #  @param theCopy Flag used to translate object itself or create a copy.
8677         #  @return Translated @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
8678         #  new GEOM.GEOM_Object, containing the translated object if @a theCopy flag is @c True.
8679         @ManageTransactions("TrsfOp")
8680         def TranslateVector(self, theObject, theVector, theCopy=False):
8681             """
8682             Translate the given object along the given vector.
8683
8684             Parameters:
8685                 theObject The object to be translated.
8686                 theVector The translation vector.
8687                 theCopy Flag used to translate object itself or create a copy.
8688
8689             Returns:
8690                 Translated theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
8691                 new GEOM.GEOM_Object, containing the translated object if theCopy flag is True.
8692             """
8693             if theCopy:
8694                 anObj = self.TrsfOp.TranslateVectorCopy(theObject, theVector)
8695             else:
8696                 anObj = self.TrsfOp.TranslateVector(theObject, theVector)
8697             RaiseIfFailed("TranslateVector", self.TrsfOp)
8698             return anObj
8699
8700         ## Translate the given object along the given vector,
8701         #  creating its copy before the translation.
8702         #  @param theObject The object to be translated.
8703         #  @param theVector The translation vector.
8704         #  @param theName Object name; when specified, this parameter is used
8705         #         for result publication in the study. Otherwise, if automatic
8706         #         publication is switched on, default value is used for result name.
8707         #
8708         #  @return New GEOM.GEOM_Object, containing the translated object.
8709         #
8710         #  @ref tui_translation "Example"
8711         @ManageTransactions("TrsfOp")
8712         def MakeTranslationVector(self, theObject, theVector, theName=None):
8713             """
8714             Translate the given object along the given vector,
8715             creating its copy before the translation.
8716
8717             Parameters:
8718                 theObject The object to be translated.
8719                 theVector The translation vector.
8720                 theName Object name; when specified, this parameter is used
8721                         for result publication in the study. Otherwise, if automatic
8722                         publication is switched on, default value is used for result name.
8723
8724             Returns:
8725                 New GEOM.GEOM_Object, containing the translated object.
8726             """
8727             # Example: see GEOM_TestAll.py
8728             anObj = self.TrsfOp.TranslateVectorCopy(theObject, theVector)
8729             RaiseIfFailed("TranslateVectorCopy", self.TrsfOp)
8730             self._autoPublish(anObj, theName, "translated")
8731             return anObj
8732
8733         ## Translate the given object along the given vector on given distance.
8734         #  @param theObject The object to be translated.
8735         #  @param theVector The translation vector.
8736         #  @param theDistance The translation distance.
8737         #  @param theCopy Flag used to translate object itself or create a copy.
8738         #  @return Translated @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
8739         #  new GEOM.GEOM_Object, containing the translated object if @a theCopy flag is @c True.
8740         #
8741         #  @ref tui_translation "Example"
8742         @ManageTransactions("TrsfOp")
8743         def TranslateVectorDistance(self, theObject, theVector, theDistance, theCopy=False):
8744             """
8745             Translate the given object along the given vector on given distance.
8746
8747             Parameters:
8748                 theObject The object to be translated.
8749                 theVector The translation vector.
8750                 theDistance The translation distance.
8751                 theCopy Flag used to translate object itself or create a copy.
8752
8753             Returns:
8754                 Translated theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
8755                 new GEOM.GEOM_Object, containing the translated object if theCopy flag is True.
8756             """
8757             # Example: see GEOM_TestAll.py
8758             theDistance,Parameters = ParseParameters(theDistance)
8759             anObj = self.TrsfOp.TranslateVectorDistance(theObject, theVector, theDistance, theCopy)
8760             RaiseIfFailed("TranslateVectorDistance", self.TrsfOp)
8761             anObj.SetParameters(Parameters)
8762             return anObj
8763
8764         ## Translate the given object along the given vector on given distance,
8765         #  creating its copy before the translation.
8766         #  @param theObject The object to be translated.
8767         #  @param theVector The translation vector.
8768         #  @param theDistance The translation distance.
8769         #  @param theName Object name; when specified, this parameter is used
8770         #         for result publication in the study. Otherwise, if automatic
8771         #         publication is switched on, default value is used for result name.
8772         #
8773         #  @return New GEOM.GEOM_Object, containing the translated object.
8774         #
8775         #  @ref tui_translation "Example"
8776         @ManageTransactions("TrsfOp")
8777         def MakeTranslationVectorDistance(self, theObject, theVector, theDistance, theName=None):
8778             """
8779             Translate the given object along the given vector on given distance,
8780             creating its copy before the translation.
8781
8782             Parameters:
8783                 theObject The object to be translated.
8784                 theVector The translation vector.
8785                 theDistance The translation distance.
8786                 theName Object name; when specified, this parameter is used
8787                         for result publication in the study. Otherwise, if automatic
8788                         publication is switched on, default value is used for result name.
8789
8790             Returns:
8791                 New GEOM.GEOM_Object, containing the translated object.
8792             """
8793             # Example: see GEOM_TestAll.py
8794             theDistance,Parameters = ParseParameters(theDistance)
8795             anObj = self.TrsfOp.TranslateVectorDistance(theObject, theVector, theDistance, 1)
8796             RaiseIfFailed("TranslateVectorDistance", self.TrsfOp)
8797             anObj.SetParameters(Parameters)
8798             self._autoPublish(anObj, theName, "translated")
8799             return anObj
8800
8801         ## Rotate the given object around the given axis on the given angle.
8802         #  @param theObject The object to be rotated.
8803         #  @param theAxis Rotation axis.
8804         #  @param theAngle Rotation angle in radians.
8805         #  @param theCopy Flag used to rotate object itself or create a copy.
8806         #
8807         #  @return Rotated @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
8808         #  new GEOM.GEOM_Object, containing the rotated object if @a theCopy flag is @c True.
8809         #
8810         #  @ref tui_rotation "Example"
8811         @ManageTransactions("TrsfOp")
8812         def Rotate(self, theObject, theAxis, theAngle, theCopy=False):
8813             """
8814             Rotate the given object around the given axis on the given angle.
8815
8816             Parameters:
8817                 theObject The object to be rotated.
8818                 theAxis Rotation axis.
8819                 theAngle Rotation angle in radians.
8820                 theCopy Flag used to rotate object itself or create a copy.
8821
8822             Returns:
8823                 Rotated theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
8824                 new GEOM.GEOM_Object, containing the rotated object if theCopy flag is True.
8825             """
8826             # Example: see GEOM_TestAll.py
8827             flag = False
8828             if isinstance(theAngle,str):
8829                 flag = True
8830             theAngle, Parameters = ParseParameters(theAngle)
8831             if flag:
8832                 theAngle = theAngle*math.pi/180.0
8833             if theCopy:
8834                 anObj = self.TrsfOp.RotateCopy(theObject, theAxis, theAngle)
8835             else:
8836                 anObj = self.TrsfOp.Rotate(theObject, theAxis, theAngle)
8837             RaiseIfFailed("Rotate", self.TrsfOp)
8838             anObj.SetParameters(Parameters)
8839             return anObj
8840
8841         ## Rotate the given object around the given axis
8842         #  on the given angle, creating its copy before the rotation.
8843         #  @param theObject The object to be rotated.
8844         #  @param theAxis Rotation axis.
8845         #  @param theAngle Rotation angle in radians.
8846         #  @param theName Object name; when specified, this parameter is used
8847         #         for result publication in the study. Otherwise, if automatic
8848         #         publication is switched on, default value is used for result name.
8849         #
8850         #  @return New GEOM.GEOM_Object, containing the rotated object.
8851         #
8852         #  @ref tui_rotation "Example"
8853         @ManageTransactions("TrsfOp")
8854         def MakeRotation(self, theObject, theAxis, theAngle, theName=None):
8855             """
8856             Rotate the given object around the given axis
8857             on the given angle, creating its copy before the rotatation.
8858
8859             Parameters:
8860                 theObject The object to be rotated.
8861                 theAxis Rotation axis.
8862                 theAngle Rotation angle in radians.
8863                 theName Object name; when specified, this parameter is used
8864                         for result publication in the study. Otherwise, if automatic
8865                         publication is switched on, default value is used for result name.
8866
8867             Returns:
8868                 New GEOM.GEOM_Object, containing the rotated object.
8869             """
8870             # Example: see GEOM_TestAll.py
8871             flag = False
8872             if isinstance(theAngle,str):
8873                 flag = True
8874             theAngle, Parameters = ParseParameters(theAngle)
8875             if flag:
8876                 theAngle = theAngle*math.pi/180.0
8877             anObj = self.TrsfOp.RotateCopy(theObject, theAxis, theAngle)
8878             RaiseIfFailed("RotateCopy", self.TrsfOp)
8879             anObj.SetParameters(Parameters)
8880             self._autoPublish(anObj, theName, "rotated")
8881             return anObj
8882
8883         ## Rotate given object around vector perpendicular to plane
8884         #  containing three points.
8885         #  @param theObject The object to be rotated.
8886         #  @param theCentPoint central point the axis is the vector perpendicular to the plane
8887         #  containing the three points.
8888         #  @param thePoint1,thePoint2 points in a perpendicular plane of the axis.
8889         #  @param theCopy Flag used to rotate object itself or create a copy.
8890         #  @return Rotated @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
8891         #  new GEOM.GEOM_Object, containing the rotated object if @a theCopy flag is @c True.
8892         @ManageTransactions("TrsfOp")
8893         def RotateThreePoints(self, theObject, theCentPoint, thePoint1, thePoint2, theCopy=False):
8894             """
8895             Rotate given object around vector perpendicular to plane
8896             containing three points.
8897
8898             Parameters:
8899                 theObject The object to be rotated.
8900                 theCentPoint central point  the axis is the vector perpendicular to the plane
8901                              containing the three points.
8902                 thePoint1,thePoint2 points in a perpendicular plane of the axis.
8903                 theCopy Flag used to rotate object itself or create a copy.
8904
8905             Returns:
8906                 Rotated theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
8907                 new GEOM.GEOM_Object, containing the rotated object if theCopy flag is True.
8908             """
8909             if theCopy:
8910                 anObj = self.TrsfOp.RotateThreePointsCopy(theObject, theCentPoint, thePoint1, thePoint2)
8911             else:
8912                 anObj = self.TrsfOp.RotateThreePoints(theObject, theCentPoint, thePoint1, thePoint2)
8913             RaiseIfFailed("RotateThreePoints", self.TrsfOp)
8914             return anObj
8915
8916         ## Rotate given object around vector perpendicular to plane
8917         #  containing three points, creating its copy before the rotatation.
8918         #  @param theObject The object to be rotated.
8919         #  @param theCentPoint central point the axis is the vector perpendicular to the plane
8920         #  containing the three points.
8921         #  @param thePoint1,thePoint2 in a perpendicular plane of the axis.
8922         #  @param theName Object name; when specified, this parameter is used
8923         #         for result publication in the study. Otherwise, if automatic
8924         #         publication is switched on, default value is used for result name.
8925         #
8926         #  @return New GEOM.GEOM_Object, containing the rotated object.
8927         #
8928         #  @ref tui_rotation "Example"
8929         @ManageTransactions("TrsfOp")
8930         def MakeRotationThreePoints(self, theObject, theCentPoint, thePoint1, thePoint2, theName=None):
8931             """
8932             Rotate given object around vector perpendicular to plane
8933             containing three points, creating its copy before the rotatation.
8934
8935             Parameters:
8936                 theObject The object to be rotated.
8937                 theCentPoint central point  the axis is the vector perpendicular to the plane
8938                              containing the three points.
8939                 thePoint1,thePoint2  in a perpendicular plane of the axis.
8940                 theName Object name; when specified, this parameter is used
8941                         for result publication in the study. Otherwise, if automatic
8942                         publication is switched on, default value is used for result name.
8943
8944             Returns:
8945                 New GEOM.GEOM_Object, containing the rotated object.
8946             """
8947             # Example: see GEOM_TestAll.py
8948             anObj = self.TrsfOp.RotateThreePointsCopy(theObject, theCentPoint, thePoint1, thePoint2)
8949             RaiseIfFailed("RotateThreePointsCopy", self.TrsfOp)
8950             self._autoPublish(anObj, theName, "rotated")
8951             return anObj
8952
8953         ## Scale the given object by the specified factor.
8954         #  @param theObject The object to be scaled.
8955         #  @param thePoint Center point for scaling.
8956         #                  Passing None for it means scaling relatively the origin of global CS.
8957         #  @param theFactor Scaling factor value.
8958         #  @param theCopy Flag used to scale object itself or create a copy.
8959         #  @return Scaled @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
8960         #  new GEOM.GEOM_Object, containing the scaled object if @a theCopy flag is @c True.
8961         @ManageTransactions("TrsfOp")
8962         def Scale(self, theObject, thePoint, theFactor, theCopy=False):
8963             """
8964             Scale the given object by the specified factor.
8965
8966             Parameters:
8967                 theObject The object to be scaled.
8968                 thePoint Center point for scaling.
8969                          Passing None for it means scaling relatively the origin of global CS.
8970                 theFactor Scaling factor value.
8971                 theCopy Flag used to scale object itself or create a copy.
8972
8973             Returns:
8974                 Scaled theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
8975                 new GEOM.GEOM_Object, containing the scaled object if theCopy flag is True.
8976             """
8977             # Example: see GEOM_TestAll.py
8978             theFactor, Parameters = ParseParameters(theFactor)
8979             if theCopy:
8980                 anObj = self.TrsfOp.ScaleShapeCopy(theObject, thePoint, theFactor)
8981             else:
8982                 anObj = self.TrsfOp.ScaleShape(theObject, thePoint, theFactor)
8983             RaiseIfFailed("Scale", self.TrsfOp)
8984             anObj.SetParameters(Parameters)
8985             return anObj
8986
8987         ## Scale the given object by the factor, creating its copy before the scaling.
8988         #  @param theObject The object to be scaled.
8989         #  @param thePoint Center point for scaling.
8990         #                  Passing None for it means scaling relatively the origin of global CS.
8991         #  @param theFactor Scaling factor value.
8992         #  @param theName Object name; when specified, this parameter is used
8993         #         for result publication in the study. Otherwise, if automatic
8994         #         publication is switched on, default value is used for result name.
8995         #
8996         #  @return New GEOM.GEOM_Object, containing the scaled shape.
8997         #
8998         #  @ref tui_scale "Example"
8999         @ManageTransactions("TrsfOp")
9000         def MakeScaleTransform(self, theObject, thePoint, theFactor, theName=None):
9001             """
9002             Scale the given object by the factor, creating its copy before the scaling.
9003
9004             Parameters:
9005                 theObject The object to be scaled.
9006                 thePoint Center point for scaling.
9007                          Passing None for it means scaling relatively the origin of global CS.
9008                 theFactor Scaling factor value.
9009                 theName Object name; when specified, this parameter is used
9010                         for result publication in the study. Otherwise, if automatic
9011                         publication is switched on, default value is used for result name.
9012
9013             Returns:
9014                 New GEOM.GEOM_Object, containing the scaled shape.
9015             """
9016             # Example: see GEOM_TestAll.py
9017             theFactor, Parameters = ParseParameters(theFactor)
9018             anObj = self.TrsfOp.ScaleShapeCopy(theObject, thePoint, theFactor)
9019             RaiseIfFailed("ScaleShapeCopy", self.TrsfOp)
9020             anObj.SetParameters(Parameters)
9021             self._autoPublish(anObj, theName, "scaled")
9022             return anObj
9023
9024         ## Scale the given object by different factors along coordinate axes.
9025         #  @param theObject The object to be scaled.
9026         #  @param thePoint Center point for scaling.
9027         #                  Passing None for it means scaling relatively the origin of global CS.
9028         #  @param theFactorX,theFactorY,theFactorZ Scaling factors along each axis.
9029         #  @param theCopy Flag used to scale object itself or create a copy.
9030         #  @return Scaled @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
9031         #  new GEOM.GEOM_Object, containing the scaled object if @a theCopy flag is @c True.
9032         @ManageTransactions("TrsfOp")
9033         def ScaleAlongAxes(self, theObject, thePoint, theFactorX, theFactorY, theFactorZ, theCopy=False):
9034             """
9035             Scale the given object by different factors along coordinate axes.
9036
9037             Parameters:
9038                 theObject The object to be scaled.
9039                 thePoint Center point for scaling.
9040                             Passing None for it means scaling relatively the origin of global CS.
9041                 theFactorX,theFactorY,theFactorZ Scaling factors along each axis.
9042                 theCopy Flag used to scale object itself or create a copy.
9043
9044             Returns:
9045                 Scaled theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
9046                 new GEOM.GEOM_Object, containing the scaled object if theCopy flag is True.
9047             """
9048             # Example: see GEOM_TestAll.py
9049             theFactorX, theFactorY, theFactorZ, Parameters = ParseParameters(theFactorX, theFactorY, theFactorZ)
9050             if theCopy:
9051                 anObj = self.TrsfOp.ScaleShapeAlongAxesCopy(theObject, thePoint,
9052                                                             theFactorX, theFactorY, theFactorZ)
9053             else:
9054                 anObj = self.TrsfOp.ScaleShapeAlongAxes(theObject, thePoint,
9055                                                         theFactorX, theFactorY, theFactorZ)
9056             RaiseIfFailed("ScaleAlongAxes", self.TrsfOp)
9057             anObj.SetParameters(Parameters)
9058             return anObj
9059
9060         ## Scale the given object by different factors along coordinate axes,
9061         #  creating its copy before the scaling.
9062         #  @param theObject The object to be scaled.
9063         #  @param thePoint Center point for scaling.
9064         #                  Passing None for it means scaling relatively the origin of global CS.
9065         #  @param theFactorX,theFactorY,theFactorZ Scaling factors along each axis.
9066         #  @param theName Object name; when specified, this parameter is used
9067         #         for result publication in the study. Otherwise, if automatic
9068         #         publication is switched on, default value is used for result name.
9069         #
9070         #  @return New GEOM.GEOM_Object, containing the scaled shape.
9071         #
9072         #  @ref swig_scale "Example"
9073         @ManageTransactions("TrsfOp")
9074         def MakeScaleAlongAxes(self, theObject, thePoint, theFactorX, theFactorY, theFactorZ, theName=None):
9075             """
9076             Scale the given object by different factors along coordinate axes,
9077             creating its copy before the scaling.
9078
9079             Parameters:
9080                 theObject The object to be scaled.
9081                 thePoint Center point for scaling.
9082                             Passing None for it means scaling relatively the origin of global CS.
9083                 theFactorX,theFactorY,theFactorZ Scaling factors along each axis.
9084                 theName Object name; when specified, this parameter is used
9085                         for result publication in the study. Otherwise, if automatic
9086                         publication is switched on, default value is used for result name.
9087
9088             Returns:
9089                 New GEOM.GEOM_Object, containing the scaled shape.
9090             """
9091             # Example: see GEOM_TestAll.py
9092             theFactorX, theFactorY, theFactorZ, Parameters = ParseParameters(theFactorX, theFactorY, theFactorZ)
9093             anObj = self.TrsfOp.ScaleShapeAlongAxesCopy(theObject, thePoint,
9094                                                         theFactorX, theFactorY, theFactorZ)
9095             RaiseIfFailed("MakeScaleAlongAxes", self.TrsfOp)
9096             anObj.SetParameters(Parameters)
9097             self._autoPublish(anObj, theName, "scaled")
9098             return anObj
9099
9100         ## Mirror an object relatively the given plane.
9101         #  @param theObject The object to be mirrored.
9102         #  @param thePlane Plane of symmetry.
9103         #  @param theCopy Flag used to mirror object itself or create a copy.
9104         #  @return Mirrored @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
9105         #  new GEOM.GEOM_Object, containing the mirrored object if @a theCopy flag is @c True.
9106         @ManageTransactions("TrsfOp")
9107         def MirrorByPlane(self, theObject, thePlane, theCopy=False):
9108             """
9109             Mirror an object relatively the given plane.
9110
9111             Parameters:
9112                 theObject The object to be mirrored.
9113                 thePlane Plane of symmetry.
9114                 theCopy Flag used to mirror object itself or create a copy.
9115
9116             Returns:
9117                 Mirrored theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
9118                 new GEOM.GEOM_Object, containing the mirrored object if theCopy flag is True.
9119             """
9120             if theCopy:
9121                 anObj = self.TrsfOp.MirrorPlaneCopy(theObject, thePlane)
9122             else:
9123                 anObj = self.TrsfOp.MirrorPlane(theObject, thePlane)
9124             RaiseIfFailed("MirrorByPlane", self.TrsfOp)
9125             return anObj
9126
9127         ## Create an object, symmetrical
9128         #  to the given one relatively the given plane.
9129         #  @param theObject The object to be mirrored.
9130         #  @param thePlane Plane 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 MakeMirrorByPlane(self, theObject, thePlane, theName=None):
9140             """
9141             Create an object, symmetrical to the given one relatively the given plane.
9142
9143             Parameters:
9144                 theObject The object to be mirrored.
9145                 thePlane Plane of symmetry.
9146                 theName Object name; when specified, this parameter is used
9147                         for result publication in the study. Otherwise, if automatic
9148                         publication is switched on, default value is used for result name.
9149
9150             Returns:
9151                 New GEOM.GEOM_Object, containing the mirrored shape.
9152             """
9153             # Example: see GEOM_TestAll.py
9154             anObj = self.TrsfOp.MirrorPlaneCopy(theObject, thePlane)
9155             RaiseIfFailed("MirrorPlaneCopy", self.TrsfOp)
9156             self._autoPublish(anObj, theName, "mirrored")
9157             return anObj
9158
9159         ## Mirror an object relatively the given axis.
9160         #  @param theObject The object to be mirrored.
9161         #  @param theAxis Axis of symmetry.
9162         #  @param theCopy Flag used to mirror object itself or create a copy.
9163         #  @return Mirrored @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
9164         #  new GEOM.GEOM_Object, containing the mirrored object if @a theCopy flag is @c True.
9165         @ManageTransactions("TrsfOp")
9166         def MirrorByAxis(self, theObject, theAxis, theCopy=False):
9167             """
9168             Mirror an object relatively the given axis.
9169
9170             Parameters:
9171                 theObject The object to be mirrored.
9172                 theAxis Axis of symmetry.
9173                 theCopy Flag used to mirror object itself or create a copy.
9174
9175             Returns:
9176                 Mirrored theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
9177                 new GEOM.GEOM_Object, containing the mirrored object if theCopy flag is True.
9178             """
9179             if theCopy:
9180                 anObj = self.TrsfOp.MirrorAxisCopy(theObject, theAxis)
9181             else:
9182                 anObj = self.TrsfOp.MirrorAxis(theObject, theAxis)
9183             RaiseIfFailed("MirrorByAxis", self.TrsfOp)
9184             return anObj
9185
9186         ## Create an object, symmetrical
9187         #  to the given one relatively the given axis.
9188         #  @param theObject The object to be mirrored.
9189         #  @param theAxis Axis of symmetry.
9190         #  @param theName Object name; when specified, this parameter is used
9191         #         for result publication in the study. Otherwise, if automatic
9192         #         publication is switched on, default value is used for result name.
9193         #
9194         #  @return New GEOM.GEOM_Object, containing the mirrored shape.
9195         #
9196         #  @ref tui_mirror "Example"
9197         @ManageTransactions("TrsfOp")
9198         def MakeMirrorByAxis(self, theObject, theAxis, theName=None):
9199             """
9200             Create an object, symmetrical to the given one relatively the given axis.
9201
9202             Parameters:
9203                 theObject The object to be mirrored.
9204                 theAxis Axis of symmetry.
9205                 theName Object name; when specified, this parameter is used
9206                         for result publication in the study. Otherwise, if automatic
9207                         publication is switched on, default value is used for result name.
9208
9209             Returns:
9210                 New GEOM.GEOM_Object, containing the mirrored shape.
9211             """
9212             # Example: see GEOM_TestAll.py
9213             anObj = self.TrsfOp.MirrorAxisCopy(theObject, theAxis)
9214             RaiseIfFailed("MirrorAxisCopy", self.TrsfOp)
9215             self._autoPublish(anObj, theName, "mirrored")
9216             return anObj
9217
9218         ## Mirror an object relatively the given point.
9219         #  @param theObject The object to be mirrored.
9220         #  @param thePoint Point of symmetry.
9221         #  @param theCopy Flag used to mirror object itself or create a copy.
9222         #  @return Mirrored @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
9223         #  new GEOM.GEOM_Object, containing the mirrored object if @a theCopy flag is @c True.
9224         @ManageTransactions("TrsfOp")
9225         def MirrorByPoint(self, theObject, thePoint, theCopy=False):
9226             """
9227             Mirror an object relatively the given point.
9228
9229             Parameters:
9230                 theObject The object to be mirrored.
9231                 thePoint Point of symmetry.
9232                 theCopy Flag used to mirror object itself or create a copy.
9233
9234             Returns:
9235                 Mirrored theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
9236                 new GEOM.GEOM_Object, containing the mirrored object if theCopy flag is True.
9237             """
9238             # Example: see GEOM_TestAll.py
9239             if theCopy:
9240                 anObj = self.TrsfOp.MirrorPointCopy(theObject, thePoint)
9241             else:
9242                 anObj = self.TrsfOp.MirrorPoint(theObject, thePoint)
9243             RaiseIfFailed("MirrorByPoint", self.TrsfOp)
9244             return anObj
9245
9246         ## Create an object, symmetrical
9247         #  to the given one relatively the given point.
9248         #  @param theObject The object to be mirrored.
9249         #  @param thePoint Point of symmetry.
9250         #  @param theName Object name; when specified, this parameter is used
9251         #         for result publication in the study. Otherwise, if automatic
9252         #         publication is switched on, default value is used for result name.
9253         #
9254         #  @return New GEOM.GEOM_Object, containing the mirrored shape.
9255         #
9256         #  @ref tui_mirror "Example"
9257         @ManageTransactions("TrsfOp")
9258         def MakeMirrorByPoint(self, theObject, thePoint, theName=None):
9259             """
9260             Create an object, symmetrical
9261             to the given one relatively the given point.
9262
9263             Parameters:
9264                 theObject The object to be mirrored.
9265                 thePoint Point of symmetry.
9266                 theName Object name; when specified, this parameter is used
9267                         for result publication in the study. Otherwise, if automatic
9268                         publication is switched on, default value is used for result name.
9269
9270             Returns:
9271                 New GEOM.GEOM_Object, containing the mirrored shape.
9272             """
9273             # Example: see GEOM_TestAll.py
9274             anObj = self.TrsfOp.MirrorPointCopy(theObject, thePoint)
9275             RaiseIfFailed("MirrorPointCopy", self.TrsfOp)
9276             self._autoPublish(anObj, theName, "mirrored")
9277             return anObj
9278
9279         ## Modify the location of the given object.
9280         #  @param theObject The object to be displaced.
9281         #  @param theStartLCS Coordinate system to perform displacement from it.\n
9282         #                     If \a theStartLCS is NULL, displacement
9283         #                     will be performed from global CS.\n
9284         #                     If \a theObject itself is used as \a theStartLCS,
9285         #                     its location will be changed to \a theEndLCS.
9286         #  @param theEndLCS Coordinate system to perform displacement to it.
9287         #  @param theCopy Flag used to displace object itself or create a copy.
9288         #  @return Displaced @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
9289         #  new GEOM.GEOM_Object, containing the displaced object if @a theCopy flag is @c True.
9290         @ManageTransactions("TrsfOp")
9291         def Position(self, theObject, theStartLCS, theEndLCS, theCopy=False):
9292             """
9293             Modify the Location of the given object by LCS, creating its copy before the setting.
9294
9295             Parameters:
9296                 theObject The object to be displaced.
9297                 theStartLCS Coordinate system to perform displacement from it.
9298                             If theStartLCS is NULL, displacement
9299                             will be performed from global CS.
9300                             If theObject itself is used as theStartLCS,
9301                             its location will be changed to theEndLCS.
9302                 theEndLCS Coordinate system to perform displacement to it.
9303                 theCopy Flag used to displace object itself or create a copy.
9304
9305             Returns:
9306                 Displaced theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
9307                 new GEOM.GEOM_Object, containing the displaced object if theCopy flag is True.
9308             """
9309             # Example: see GEOM_TestAll.py
9310             if theCopy:
9311                 anObj = self.TrsfOp.PositionShapeCopy(theObject, theStartLCS, theEndLCS)
9312             else:
9313                 anObj = self.TrsfOp.PositionShape(theObject, theStartLCS, theEndLCS)
9314             RaiseIfFailed("Displace", self.TrsfOp)
9315             return anObj
9316
9317         ## Modify the Location of the given object by LCS,
9318         #  creating its copy before the setting.
9319         #  @param theObject The object to be displaced.
9320         #  @param theStartLCS Coordinate system to perform displacement from it.\n
9321         #                     If \a theStartLCS is NULL, displacement
9322         #                     will be performed from global CS.\n
9323         #                     If \a theObject itself is used as \a theStartLCS,
9324         #                     its location will be changed to \a theEndLCS.
9325         #  @param theEndLCS Coordinate system to perform displacement to it.
9326         #  @param theName Object name; when specified, this parameter is used
9327         #         for result publication in the study. Otherwise, if automatic
9328         #         publication is switched on, default value is used for result name.
9329         #
9330         #  @return New GEOM.GEOM_Object, containing the displaced shape.
9331         #
9332         #  @ref tui_modify_location "Example"
9333         @ManageTransactions("TrsfOp")
9334         def MakePosition(self, theObject, theStartLCS, theEndLCS, theName=None):
9335             """
9336             Modify the Location of the given object by LCS, creating its copy before the setting.
9337
9338             Parameters:
9339                 theObject The object to be displaced.
9340                 theStartLCS Coordinate system to perform displacement from it.
9341                             If theStartLCS is NULL, displacement
9342                             will be performed from global CS.
9343                             If theObject itself is used as theStartLCS,
9344                             its location will be changed to theEndLCS.
9345                 theEndLCS Coordinate system to perform displacement to it.
9346                 theName Object name; when specified, this parameter is used
9347                         for result publication in the study. Otherwise, if automatic
9348                         publication is switched on, default value is used for result name.
9349
9350             Returns:
9351                 New GEOM.GEOM_Object, containing the displaced shape.
9352
9353             Example of usage:
9354                 # create local coordinate systems
9355                 cs1 = geompy.MakeMarker( 0, 0, 0, 1,0,0, 0,1,0)
9356                 cs2 = geompy.MakeMarker(30,40,40, 1,0,0, 0,1,0)
9357                 # modify the location of the given object
9358                 position = geompy.MakePosition(cylinder, cs1, cs2)
9359             """
9360             # Example: see GEOM_TestAll.py
9361             anObj = self.TrsfOp.PositionShapeCopy(theObject, theStartLCS, theEndLCS)
9362             RaiseIfFailed("PositionShapeCopy", self.TrsfOp)
9363             self._autoPublish(anObj, theName, "displaced")
9364             return anObj
9365
9366         ## Modify the Location of the given object by Path.
9367         #  @param  theObject The object to be displaced.
9368         #  @param  thePath Wire or Edge along that the object will be translated.
9369         #  @param  theDistance progress of Path (0 = start location, 1 = end of path location).
9370         #  @param  theCopy is to create a copy objects if true.
9371         #  @param  theReverse  0 - for usual direction, 1 - to reverse path direction.
9372         #  @return Displaced @a theObject (GEOM.GEOM_Object) if @a theCopy is @c False or
9373         #          new GEOM.GEOM_Object, containing the displaced shape if @a theCopy is @c True.
9374         #
9375         #  @ref tui_modify_location "Example"
9376         @ManageTransactions("TrsfOp")
9377         def PositionAlongPath(self,theObject, thePath, theDistance, theCopy, theReverse):
9378             """
9379             Modify the Location of the given object by Path.
9380
9381             Parameters:
9382                  theObject The object to be displaced.
9383                  thePath Wire or Edge along that the object will be translated.
9384                  theDistance progress of Path (0 = start location, 1 = end of path location).
9385                  theCopy is to create a copy objects if true.
9386                  theReverse  0 - for usual direction, 1 - to reverse path direction.
9387
9388             Returns:
9389                  Displaced theObject (GEOM.GEOM_Object) if theCopy is False or
9390                  new GEOM.GEOM_Object, containing the displaced shape if theCopy is True.
9391
9392             Example of usage:
9393                 position = geompy.PositionAlongPath(cylinder, circle, 0.75, 1, 1)
9394             """
9395             # Example: see GEOM_TestAll.py
9396             anObj = self.TrsfOp.PositionAlongPath(theObject, thePath, theDistance, theCopy, theReverse)
9397             RaiseIfFailed("PositionAlongPath", self.TrsfOp)
9398             return anObj
9399
9400         ## Modify the Location of the given object by Path, creating its copy before the operation.
9401         #  @param theObject The object to be displaced.
9402         #  @param thePath Wire or Edge along that the object will be translated.
9403         #  @param theDistance progress of Path (0 = start location, 1 = end of path location).
9404         #  @param theReverse  0 - for usual direction, 1 - to reverse path direction.
9405         #  @param 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         #  @return New GEOM.GEOM_Object, containing the displaced shape.
9410         @ManageTransactions("TrsfOp")
9411         def MakePositionAlongPath(self, theObject, thePath, theDistance, theReverse, theName=None):
9412             """
9413             Modify the Location of the given object by Path, creating its copy before the operation.
9414
9415             Parameters:
9416                  theObject The object to be displaced.
9417                  thePath Wire or Edge along that the object will be translated.
9418                  theDistance progress of Path (0 = start location, 1 = end of path location).
9419                  theReverse  0 - for usual direction, 1 - to reverse path direction.
9420                  theName Object name; when specified, this parameter is used
9421                          for result publication in the study. Otherwise, if automatic
9422                          publication is switched on, default value is used for result name.
9423
9424             Returns:
9425                 New GEOM.GEOM_Object, containing the displaced shape.
9426             """
9427             # Example: see GEOM_TestAll.py
9428             anObj = self.TrsfOp.PositionAlongPath(theObject, thePath, theDistance, 1, theReverse)
9429             RaiseIfFailed("PositionAlongPath", self.TrsfOp)
9430             self._autoPublish(anObj, theName, "displaced")
9431             return anObj
9432
9433         ## Offset given shape.
9434         #  @param theObject The base object for the offset.
9435         #  @param theOffset Offset value.
9436         #  @param theCopy Flag used to offset object itself or create a copy.
9437         #  @return Modified @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
9438         #  new GEOM.GEOM_Object, containing the result of offset operation if @a theCopy flag is @c True.
9439         @ManageTransactions("TrsfOp")
9440         def Offset(self, theObject, theOffset, theCopy=False):
9441             """
9442             Offset given shape.
9443
9444             Parameters:
9445                 theObject The base object for the offset.
9446                 theOffset Offset value.
9447                 theCopy Flag used to offset object itself or create a copy.
9448
9449             Returns:
9450                 Modified theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
9451                 new GEOM.GEOM_Object, containing the result of offset operation if theCopy flag is True.
9452             """
9453             theOffset, Parameters = ParseParameters(theOffset)
9454             if theCopy:
9455                 anObj = self.TrsfOp.OffsetShapeCopy(theObject, theOffset, True)
9456             else:
9457                 anObj = self.TrsfOp.OffsetShape(theObject, theOffset, True)
9458             RaiseIfFailed("Offset", self.TrsfOp)
9459             anObj.SetParameters(Parameters)
9460             return anObj
9461
9462         ## Create new object as offset of the given one. Gap between two adjacent
9463         #  offset surfaces is filled by a pipe.
9464         #  @param theObject The base object for the offset.
9465         #  @param theOffset Offset value.
9466         #  @param theName Object name; when specified, this parameter is used
9467         #         for result publication in the study. Otherwise, if automatic
9468         #         publication is switched on, default value is used for result name.
9469         #
9470         #  @return New GEOM.GEOM_Object, containing the offset object.
9471         #
9472         #  @sa MakeOffsetIntersectionJoin
9473         #  @ref tui_offset "Example"
9474         @ManageTransactions("TrsfOp")
9475         def MakeOffset(self, theObject, theOffset, theName=None):
9476             """
9477             Create new object as offset of the given one. Gap between adjacent
9478             offset surfaces is filled by a pipe.
9479
9480             Parameters:
9481                 theObject The base object for the offset.
9482                 theOffset Offset value.
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                 New GEOM.GEOM_Object, containing the offset object.
9489
9490             Example of usage:
9491                  box = geompy.MakeBox(20, 20, 20, 200, 200, 200)
9492                  # create a new object as offset of the given object
9493                  offset = geompy.MakeOffset(box, 70.)
9494             """
9495             # Example: see GEOM_TestAll.py
9496             theOffset, Parameters = ParseParameters(theOffset)
9497             anObj = self.TrsfOp.OffsetShapeCopy( theObject, theOffset, True )
9498             RaiseIfFailed("OffsetShapeCopy", self.TrsfOp)
9499             anObj.SetParameters(Parameters)
9500             self._autoPublish(anObj, theName, "offset")
9501             return anObj
9502
9503         ## Create new object as offset of the given one. Gap between adjacent
9504         #  offset surfaces is filled by extending and intersecting them.
9505         #  @param theObject The base object for the offset.
9506         #  @param theOffset Offset value.
9507         #  @param theName Object name; when specified, this parameter is used
9508         #         for result publication in the study. Otherwise, if automatic
9509         #         publication is switched on, default value is used for result name.
9510         #
9511         #  @return New GEOM.GEOM_Object, containing the offset object.
9512         #
9513         #  @sa MakeOffset
9514         #  @ref tui_offset "Example"
9515         @ManageTransactions("TrsfOp")
9516         def MakeOffsetIntersectionJoin(self, theObject, theOffset, theName=None):
9517             """
9518             Create new object as offset of the given one. Gap between adjacent
9519             offset surfaces is filled by extending and intersecting them.
9520
9521             Parameters:
9522                 theObject The base object for the offset.
9523                 theOffset Offset value.
9524                 theName Object name; when specified, this parameter is used
9525                         for result publication in the study. Otherwise, if automatic
9526                         publication is switched on, default value is used for result name.
9527
9528             Returns:
9529                 New GEOM.GEOM_Object, containing the offset object.
9530
9531             Example of usage:
9532                  box = geompy.MakeBox(20, 20, 20, 200, 200, 200)
9533                  # create a new box extended by 70
9534                  offset = geompy.MakeOffsetIntersectionJoin(box, 70.)
9535             """
9536             # Example: see GEOM_TestAll.py
9537             theOffset, Parameters = ParseParameters( theOffset )
9538             anObj = self.TrsfOp.OffsetShapeCopy( theObject, theOffset, False )
9539             RaiseIfFailed("OffsetShapeCopy", self.TrsfOp)
9540             anObj.SetParameters(Parameters)
9541             self._autoPublish(anObj, theName, "offset")
9542             return anObj
9543
9544         ## Create new object as projection of the given one on another.
9545         #  @param theSource The source object for the projection. It can be a point, edge or wire.
9546         #         Edge and wire are acceptable if @a theTarget is a face.
9547         #  @param theTarget The target object. It can be planar or cylindrical face, edge or wire.
9548         #  @param theName Object name; when specified, this parameter is used
9549         #         for result publication in the study. Otherwise, if automatic
9550         #         publication is switched on, default value is used for result name.
9551         #
9552         #  @return New GEOM.GEOM_Object, containing the projection.
9553         #
9554         #  @ref tui_projection "Example"
9555         @ManageTransactions("TrsfOp")
9556         def MakeProjection(self, theSource, theTarget, theName=None):
9557             """
9558             Create new object as projection of the given one on another.
9559
9560             Parameters:
9561                 theSource The source object for the projection. It can be a point, edge or wire.
9562                           Edge and wire are acceptable if theTarget is a face.
9563                 theTarget The target object. It can be planar or cylindrical face, edge or wire.
9564                 theName Object name; when specified, this parameter is used
9565                         for result publication in the study. Otherwise, if automatic
9566                         publication is switched on, default value is used for result name.
9567
9568             Returns:
9569                 New GEOM.GEOM_Object, containing the projection.
9570             """
9571             # Example: see GEOM_TestAll.py
9572             anObj = self.TrsfOp.ProjectShapeCopy(theSource, theTarget)
9573             RaiseIfFailed("ProjectShapeCopy", self.TrsfOp)
9574             self._autoPublish(anObj, theName, "projection")
9575             return anObj
9576
9577         ## Create a projection of the given point on a wire or an edge.
9578         #  If there are no solutions or there are 2 or more solutions It throws an
9579         #  exception.
9580         #  @param thePoint the point to be projected.
9581         #  @param theWire the wire. The edge is accepted as well.
9582         #  @param theName Object name; when specified, this parameter is used
9583         #         for result publication in the study. Otherwise, if automatic
9584         #         publication is switched on, default value is used for result name.
9585         #
9586         #  @return [\a u, \a PointOnEdge, \a EdgeInWireIndex]
9587         #  \n \a u: The parameter of projection point on edge.
9588         #  \n \a PointOnEdge: The projection point.
9589         #  \n \a EdgeInWireIndex: The index of an edge in a wire.
9590         #
9591         #  @ref tui_projection "Example"
9592         @ManageTransactions("TrsfOp")
9593         def MakeProjectionOnWire(self, thePoint, theWire, theName=None):
9594             """
9595             Create a projection of the given point on a wire or an edge.
9596             If there are no solutions or there are 2 or more solutions It throws an
9597             exception.
9598
9599             Parameters:
9600                 thePoint the point to be projected.
9601                 theWire the wire. The edge is accepted as well.
9602                 theName Object name; when specified, this parameter is used
9603                         for result publication in the study. Otherwise, if automatic
9604                         publication is switched on, default value is used for result name.
9605
9606             Returns:
9607                 [u, PointOnEdge, EdgeInWireIndex]
9608                  u: The parameter of projection point on edge.
9609                  PointOnEdge: The projection point.
9610                  EdgeInWireIndex: The index of an edge in a wire.
9611             """
9612             # Example: see GEOM_TestAll.py
9613             anObj = self.TrsfOp.ProjectPointOnWire(thePoint, theWire)
9614             RaiseIfFailed("ProjectPointOnWire", self.TrsfOp)
9615             self._autoPublish(anObj[1], theName, "projection")
9616             return anObj
9617
9618         # -----------------------------------------------------------------------------
9619         # Patterns
9620         # -----------------------------------------------------------------------------
9621
9622         ## Translate the given object along the given vector a given number times
9623         #  @param theObject The object to be translated.
9624         #  @param theVector Direction of the translation. DX if None.
9625         #  @param theStep Distance to translate on.
9626         #  @param theNbTimes Quantity of translations to be done.
9627         #  @param theName Object name; when specified, this parameter is used
9628         #         for result publication in the study. Otherwise, if automatic
9629         #         publication is switched on, default value is used for result name.
9630         #
9631         #  @return New GEOM.GEOM_Object, containing compound of all
9632         #          the shapes, obtained after each translation.
9633         #
9634         #  @ref tui_multi_translation "Example"
9635         @ManageTransactions("TrsfOp")
9636         def MakeMultiTranslation1D(self, theObject, theVector, theStep, theNbTimes, theName=None):
9637             """
9638             Translate the given object along the given vector a given number times
9639
9640             Parameters:
9641                 theObject The object to be translated.
9642                 theVector Direction of the translation. DX if None.
9643                 theStep Distance to translate on.
9644                 theNbTimes Quantity of translations to be done.
9645                 theName Object name; when specified, this parameter is used
9646                         for result publication in the study. Otherwise, if automatic
9647                         publication is switched on, default value is used for result name.
9648
9649             Returns:
9650                 New GEOM.GEOM_Object, containing compound of all
9651                 the shapes, obtained after each translation.
9652
9653             Example of usage:
9654                 r1d = geompy.MakeMultiTranslation1D(prism, vect, 20, 4)
9655             """
9656             # Example: see GEOM_TestAll.py
9657             theStep, theNbTimes, Parameters = ParseParameters(theStep, theNbTimes)
9658             anObj = self.TrsfOp.MultiTranslate1D(theObject, theVector, theStep, theNbTimes)
9659             RaiseIfFailed("MultiTranslate1D", self.TrsfOp)
9660             anObj.SetParameters(Parameters)
9661             self._autoPublish(anObj, theName, "multitranslation")
9662             return anObj
9663
9664         ## Conseqently apply two specified translations to theObject specified number of times.
9665         #  @param theObject The object to be translated.
9666         #  @param theVector1 Direction of the first translation. DX if None.
9667         #  @param theStep1 Step of the first translation.
9668         #  @param theNbTimes1 Quantity of translations to be done along theVector1.
9669         #  @param theVector2 Direction of the second translation. DY if None.
9670         #  @param theStep2 Step of the second translation.
9671         #  @param theNbTimes2 Quantity of translations to be done along theVector2.
9672         #  @param theName Object name; when specified, this parameter is used
9673         #         for result publication in the study. Otherwise, if automatic
9674         #         publication is switched on, default value is used for result name.
9675         #
9676         #  @return New GEOM.GEOM_Object, containing compound of all
9677         #          the shapes, obtained after each translation.
9678         #
9679         #  @ref tui_multi_translation "Example"
9680         @ManageTransactions("TrsfOp")
9681         def MakeMultiTranslation2D(self, theObject, theVector1, theStep1, theNbTimes1,
9682                                    theVector2, theStep2, theNbTimes2, theName=None):
9683             """
9684             Conseqently apply two specified translations to theObject specified number of times.
9685
9686             Parameters:
9687                 theObject The object to be translated.
9688                 theVector1 Direction of the first translation. DX if None.
9689                 theStep1 Step of the first translation.
9690                 theNbTimes1 Quantity of translations to be done along theVector1.
9691                 theVector2 Direction of the second translation. DY if None.
9692                 theStep2 Step of the second translation.
9693                 theNbTimes2 Quantity of translations to be done along theVector2.
9694                 theName Object name; when specified, this parameter is used
9695                         for result publication in the study. Otherwise, if automatic
9696                         publication is switched on, default value is used for result name.
9697
9698             Returns:
9699                 New GEOM.GEOM_Object, containing compound of all
9700                 the shapes, obtained after each translation.
9701
9702             Example of usage:
9703                 tr2d = geompy.MakeMultiTranslation2D(prism, vect1, 20, 4, vect2, 80, 3)
9704             """
9705             # Example: see GEOM_TestAll.py
9706             theStep1,theNbTimes1,theStep2,theNbTimes2, Parameters = ParseParameters(theStep1,theNbTimes1,theStep2,theNbTimes2)
9707             anObj = self.TrsfOp.MultiTranslate2D(theObject, theVector1, theStep1, theNbTimes1,
9708                                                  theVector2, theStep2, theNbTimes2)
9709             RaiseIfFailed("MultiTranslate2D", self.TrsfOp)
9710             anObj.SetParameters(Parameters)
9711             self._autoPublish(anObj, theName, "multitranslation")
9712             return anObj
9713
9714         ## Rotate the given object around the given axis a given number times.
9715         #  Rotation angle will be 2*PI/theNbTimes.
9716         #  @param theObject The object to be rotated.
9717         #  @param theAxis The rotation axis. DZ if None.
9718         #  @param theNbTimes Quantity of rotations to be done.
9719         #  @param theName Object name; when specified, this parameter is used
9720         #         for result publication in the study. Otherwise, if automatic
9721         #         publication is switched on, default value is used for result name.
9722         #
9723         #  @return New GEOM.GEOM_Object, containing compound of all the
9724         #          shapes, obtained after each rotation.
9725         #
9726         #  @ref tui_multi_rotation "Example"
9727         @ManageTransactions("TrsfOp")
9728         def MultiRotate1DNbTimes (self, theObject, theAxis, theNbTimes, theName=None):
9729             """
9730             Rotate the given object around the given axis a given number times.
9731             Rotation angle will be 2*PI/theNbTimes.
9732
9733             Parameters:
9734                 theObject The object to be rotated.
9735                 theAxis The rotation axis. DZ if None.
9736                 theNbTimes Quantity of rotations to be done.
9737                 theName Object name; when specified, this parameter is used
9738                         for result publication in the study. Otherwise, if automatic
9739                         publication is switched on, default value is used for result name.
9740
9741             Returns:
9742                 New GEOM.GEOM_Object, containing compound of all the
9743                 shapes, obtained after each rotation.
9744
9745             Example of usage:
9746                 rot1d = geompy.MultiRotate1DNbTimes(prism, vect, 4)
9747             """
9748             # Example: see GEOM_TestAll.py
9749             theNbTimes, Parameters = ParseParameters(theNbTimes)
9750             anObj = self.TrsfOp.MultiRotate1D(theObject, theAxis, theNbTimes)
9751             RaiseIfFailed("MultiRotate1DNbTimes", self.TrsfOp)
9752             anObj.SetParameters(Parameters)
9753             self._autoPublish(anObj, theName, "multirotation")
9754             return anObj
9755
9756         ## Rotate the given object around the given axis
9757         #  a given number times on the given angle.
9758         #  @param theObject The object to be rotated.
9759         #  @param theAxis The rotation axis. DZ if None.
9760         #  @param theAngleStep Rotation angle in radians.
9761         #  @param theNbTimes Quantity of rotations to be done.
9762         #  @param theName Object name; when specified, this parameter is used
9763         #         for result publication in the study. Otherwise, if automatic
9764         #         publication is switched on, default value is used for result name.
9765         #
9766         #  @return New GEOM.GEOM_Object, containing compound of all the
9767         #          shapes, obtained after each rotation.
9768         #
9769         #  @ref tui_multi_rotation "Example"
9770         @ManageTransactions("TrsfOp")
9771         def MultiRotate1DByStep(self, theObject, theAxis, theAngleStep, theNbTimes, theName=None):
9772             """
9773             Rotate the given object around the given axis
9774             a given number times on the given angle.
9775
9776             Parameters:
9777                 theObject The object to be rotated.
9778                 theAxis The rotation axis. DZ if None.
9779                 theAngleStep Rotation angle in radians.
9780                 theNbTimes Quantity of rotations to be done.
9781                 theName Object name; when specified, this parameter is used
9782                         for result publication in the study. Otherwise, if automatic
9783                         publication is switched on, default value is used for result name.
9784
9785             Returns:
9786                 New GEOM.GEOM_Object, containing compound of all the
9787                 shapes, obtained after each rotation.
9788
9789             Example of usage:
9790                 rot1d = geompy.MultiRotate1DByStep(prism, vect, math.pi/4, 4)
9791             """
9792             # Example: see GEOM_TestAll.py
9793             theAngleStep, theNbTimes, Parameters = ParseParameters(theAngleStep, theNbTimes)
9794             anObj = self.TrsfOp.MultiRotate1DByStep(theObject, theAxis, theAngleStep, theNbTimes)
9795             RaiseIfFailed("MultiRotate1DByStep", self.TrsfOp)
9796             anObj.SetParameters(Parameters)
9797             self._autoPublish(anObj, theName, "multirotation")
9798             return anObj
9799
9800         ## Rotate the given object around the given axis a given
9801         #  number times and multi-translate each rotation result.
9802         #  Rotation angle will be 2*PI/theNbTimes1.
9803         #  Translation direction passes through center of gravity
9804         #  of rotated shape and its projection on the rotation axis.
9805         #  @param theObject The object to be rotated.
9806         #  @param theAxis Rotation axis. DZ if None.
9807         #  @param theNbTimes1 Quantity of rotations to be done.
9808         #  @param theRadialStep Translation distance.
9809         #  @param theNbTimes2 Quantity of translations to be done.
9810         #  @param theName Object name; when specified, this parameter is used
9811         #         for result publication in the study. Otherwise, if automatic
9812         #         publication is switched on, default value is used for result name.
9813         #
9814         #  @return New GEOM.GEOM_Object, containing compound of all the
9815         #          shapes, obtained after each transformation.
9816         #
9817         #  @ref tui_multi_rotation "Example"
9818         @ManageTransactions("TrsfOp")
9819         def MultiRotate2DNbTimes(self, theObject, theAxis, theNbTimes1, theRadialStep, theNbTimes2, theName=None):
9820             """
9821             Rotate the given object around the
9822             given axis on the given angle a given number
9823             times and multi-translate each rotation result.
9824             Translation direction passes through center of gravity
9825             of rotated shape and its projection on the rotation axis.
9826
9827             Parameters:
9828                 theObject The object to be rotated.
9829                 theAxis Rotation axis. DZ if None.
9830                 theNbTimes1 Quantity of rotations to be done.
9831                 theRadialStep Translation distance.
9832                 theNbTimes2 Quantity of translations to be done.
9833                 theName Object name; when specified, this parameter is used
9834                         for result publication in the study. Otherwise, if automatic
9835                         publication is switched on, default value is used for result name.
9836
9837             Returns:
9838                 New GEOM.GEOM_Object, containing compound of all the
9839                 shapes, obtained after each transformation.
9840
9841             Example of usage:
9842                 rot2d = geompy.MultiRotate2D(prism, vect, 60, 4, 50, 5)
9843             """
9844             # Example: see GEOM_TestAll.py
9845             theNbTimes1, theRadialStep, theNbTimes2, Parameters = ParseParameters(theNbTimes1, theRadialStep, theNbTimes2)
9846             anObj = self.TrsfOp.MultiRotate2DNbTimes(theObject, theAxis, theNbTimes1, theRadialStep, theNbTimes2)
9847             RaiseIfFailed("MultiRotate2DNbTimes", self.TrsfOp)
9848             anObj.SetParameters(Parameters)
9849             self._autoPublish(anObj, theName, "multirotation")
9850             return anObj
9851
9852         ## Rotate the given object around the
9853         #  given axis on the given angle a given number
9854         #  times and multi-translate each rotation result.
9855         #  Translation direction passes through center of gravity
9856         #  of rotated shape and its projection on the rotation axis.
9857         #  @param theObject The object to be rotated.
9858         #  @param theAxis Rotation axis. DZ if None.
9859         #  @param theAngleStep Rotation angle in radians.
9860         #  @param theNbTimes1 Quantity of rotations to be done.
9861         #  @param theRadialStep Translation distance.
9862         #  @param theNbTimes2 Quantity of translations to be done.
9863         #  @param theName Object name; when specified, this parameter is used
9864         #         for result publication in the study. Otherwise, if automatic
9865         #         publication is switched on, default value is used for result name.
9866         #
9867         #  @return New GEOM.GEOM_Object, containing compound of all the
9868         #          shapes, obtained after each transformation.
9869         #
9870         #  @ref tui_multi_rotation "Example"
9871         @ManageTransactions("TrsfOp")
9872         def MultiRotate2DByStep (self, theObject, theAxis, theAngleStep, theNbTimes1, theRadialStep, theNbTimes2, theName=None):
9873             """
9874             Rotate the given object around the
9875             given axis on the given angle a given number
9876             times and multi-translate each rotation result.
9877             Translation direction passes through center of gravity
9878             of rotated shape and its projection on the rotation axis.
9879
9880             Parameters:
9881                 theObject The object to be rotated.
9882                 theAxis Rotation axis. DZ if None.
9883                 theAngleStep Rotation angle in radians.
9884                 theNbTimes1 Quantity of rotations to be done.
9885                 theRadialStep Translation distance.
9886                 theNbTimes2 Quantity of translations to be done.
9887                 theName Object name; when specified, this parameter is used
9888                         for result publication in the study. Otherwise, if automatic
9889                         publication is switched on, default value is used for result name.
9890
9891             Returns:
9892                 New GEOM.GEOM_Object, containing compound of all the
9893                 shapes, obtained after each transformation.
9894
9895             Example of usage:
9896                 rot2d = geompy.MultiRotate2D(prism, vect, math.pi/3, 4, 50, 5)
9897             """
9898             # Example: see GEOM_TestAll.py
9899             theAngleStep, theNbTimes1, theRadialStep, theNbTimes2, Parameters = ParseParameters(theAngleStep, theNbTimes1, theRadialStep, theNbTimes2)
9900             anObj = self.TrsfOp.MultiRotate2DByStep(theObject, theAxis, theAngleStep, theNbTimes1, theRadialStep, theNbTimes2)
9901             RaiseIfFailed("MultiRotate2DByStep", self.TrsfOp)
9902             anObj.SetParameters(Parameters)
9903             self._autoPublish(anObj, theName, "multirotation")
9904             return anObj
9905
9906         ## The same, as MultiRotate1DNbTimes(), but axis is given by direction and point
9907         #
9908         #  @ref swig_MakeMultiRotation "Example"
9909         def MakeMultiRotation1DNbTimes(self, aShape, aDir, aPoint, aNbTimes, theName=None):
9910             """
9911             The same, as geompy.MultiRotate1DNbTimes, but axis is given by direction and point
9912
9913             Example of usage:
9914                 pz = geompy.MakeVertex(0, 0, 100)
9915                 vy = geompy.MakeVectorDXDYDZ(0, 100, 0)
9916                 MultiRot1D = geompy.MakeMultiRotation1DNbTimes(prism, vy, pz, 6)
9917             """
9918             # Example: see GEOM_TestOthers.py
9919             aVec = self.MakeLine(aPoint,aDir)
9920             # note: auto-publishing is done in self.MultiRotate1D()
9921             anObj = self.MultiRotate1DNbTimes(aShape, aVec, aNbTimes, theName)
9922             return anObj
9923
9924         ## The same, as MultiRotate1DByStep(), but axis is given by direction and point
9925         #
9926         #  @ref swig_MakeMultiRotation "Example"
9927         def MakeMultiRotation1DByStep(self, aShape, aDir, aPoint, anAngle, aNbTimes, theName=None):
9928             """
9929             The same, as geompy.MultiRotate1D, but axis is given by direction and point
9930
9931             Example of usage:
9932                 pz = geompy.MakeVertex(0, 0, 100)
9933                 vy = geompy.MakeVectorDXDYDZ(0, 100, 0)
9934                 MultiRot1D = geompy.MakeMultiRotation1DByStep(prism, vy, pz, math.pi/3, 6)
9935             """
9936             # Example: see GEOM_TestOthers.py
9937             aVec = self.MakeLine(aPoint,aDir)
9938             # note: auto-publishing is done in self.MultiRotate1D()
9939             anObj = self.MultiRotate1DByStep(aShape, aVec, anAngle, aNbTimes, theName)
9940             return anObj
9941
9942         ## The same, as MultiRotate2DNbTimes(), but axis is given by direction and point
9943         #
9944         #  @ref swig_MakeMultiRotation "Example"
9945         def MakeMultiRotation2DNbTimes(self, aShape, aDir, aPoint, nbtimes1, aStep, nbtimes2, theName=None):
9946             """
9947             The same, as MultiRotate2DNbTimes(), but axis is given by direction and point
9948
9949             Example of usage:
9950                 pz = geompy.MakeVertex(0, 0, 100)
9951                 vy = geompy.MakeVectorDXDYDZ(0, 100, 0)
9952                 MultiRot2D = geompy.MakeMultiRotation2DNbTimes(f12, vy, pz, 6, 30, 3)
9953             """
9954             # Example: see GEOM_TestOthers.py
9955             aVec = self.MakeLine(aPoint,aDir)
9956             # note: auto-publishing is done in self.MultiRotate2DNbTimes()
9957             anObj = self.MultiRotate2DNbTimes(aShape, aVec, nbtimes1, aStep, nbtimes2, theName)
9958             return anObj
9959
9960         ## The same, as MultiRotate2DByStep(), but axis is given by direction and point
9961         #
9962         #  @ref swig_MakeMultiRotation "Example"
9963         def MakeMultiRotation2DByStep(self, aShape, aDir, aPoint, anAngle, nbtimes1, aStep, nbtimes2, theName=None):
9964             """
9965             The same, as MultiRotate2DByStep(), but axis is given by direction and point
9966
9967             Example of usage:
9968                 pz = geompy.MakeVertex(0, 0, 100)
9969                 vy = geompy.MakeVectorDXDYDZ(0, 100, 0)
9970                 MultiRot2D = geompy.MakeMultiRotation2DByStep(f12, vy, pz, math.pi/4, 6, 30, 3)
9971             """
9972             # Example: see GEOM_TestOthers.py
9973             aVec = self.MakeLine(aPoint,aDir)
9974             # note: auto-publishing is done in self.MultiRotate2D()
9975             anObj = self.MultiRotate2DByStep(aShape, aVec, anAngle, nbtimes1, aStep, nbtimes2, theName)
9976             return anObj
9977
9978         ##
9979         #  Compute a wire or a face that represents a projection of the source
9980         #  shape onto cylinder. The cylinder's coordinate system is the same
9981         #  as the global coordinate system.
9982         #
9983         #  @param theObject The object to be projected. It can be either
9984         #         a planar wire or a face.
9985         #  @param theRadius The radius of the cylinder.
9986         #  @param theStartAngle The starting angle in radians from
9987         #         the cylinder's X axis around Z axis. The angle from which
9988         #         the projection is started.
9989         #  @param theAngleLength The projection length angle in radians.
9990         #         The angle in which to project the total length of the wire.
9991         #         If it is negative the projection is not scaled and natural
9992         #         wire length is kept for the projection.
9993         #  @param theAngleRotation The desired angle in radians between
9994         #         the tangent vector to the first curve at the first point of
9995         #         the theObject's projection in 2D space and U-direction of
9996         #         cylinder's 2D space.
9997         #  @param theName Object name; when specified, this parameter is used
9998         #         for result publication in the study. Otherwise, if automatic
9999         #         publication is switched on, default value is used for result name.
10000         #
10001         #  @return New GEOM.GEOM_Object, containing the result shape. The result
10002         #         represents a wire or a face that represents a projection of
10003         #         the source shape onto a cylinder.
10004         #
10005         #  @ref tui_projection "Example"
10006         def MakeProjectionOnCylinder (self, theObject, theRadius,
10007                                       theStartAngle=0.0, theAngleLength=-1.0,
10008                                       theAngleRotation=0.0,
10009                                       theName=None):
10010             """
10011             Compute a wire or a face that represents a projection of the source
10012             shape onto cylinder. The cylinder's coordinate system is the same
10013             as the global coordinate system.
10014
10015             Parameters:
10016                 theObject The object to be projected. It can be either
10017                         a planar wire or a face.
10018                 theRadius The radius of the cylinder.
10019                 theStartAngle The starting angle in radians from the cylinder's X axis
10020                         around Z axis. The angle from which the projection is started.
10021                 theAngleLength The projection length angle in radians. The angle in which
10022                         to project the total length of the wire. If it is negative the
10023                         projection is not scaled and natural wire length is kept for
10024                         the projection.
10025                 theAngleRotation The desired angle in radians between
10026                         the tangent vector to the first curve at the first
10027                         point of the theObject's projection in 2D space and
10028                         U-direction of cylinder's 2D space.
10029                 theName Object name; when specified, this parameter is used
10030                         for result publication in the study. Otherwise, if automatic
10031                         publication is switched on, default value is used for result name.
10032
10033             Returns:
10034                 New GEOM.GEOM_Object, containing the result shape. The result
10035                 represents a wire or a face that represents a projection of
10036                 the source shape onto a cylinder.
10037             """
10038             # Example: see GEOM_TestAll.py
10039             flagStartAngle = False
10040             if isinstance(theStartAngle,str):
10041                 flagStartAngle = True
10042             flagAngleLength = False
10043             if isinstance(theAngleLength,str):
10044                 flagAngleLength = True
10045             flagAngleRotation = False
10046             if isinstance(theAngleRotation,str):
10047                 flagAngleRotation = True
10048             theRadius, theStartAngle, theAngleLength, theAngleRotation, Parameters = ParseParameters(
10049               theRadius, theStartAngle, theAngleLength, theAngleRotation)
10050             if flagStartAngle:
10051                 theStartAngle = theStartAngle*math.pi/180.
10052             if flagAngleLength:
10053                 theAngleLength = theAngleLength*math.pi/180.
10054             if flagAngleRotation:
10055                 theAngleRotation = theAngleRotation*math.pi/180.
10056             anObj = self.TrsfOp.MakeProjectionOnCylinder(theObject, theRadius,
10057                 theStartAngle, theAngleLength, theAngleRotation)
10058             RaiseIfFailed("MakeProjectionOnCylinder", self.TrsfOp)
10059             anObj.SetParameters(Parameters)
10060             self._autoPublish(anObj, theName, "projection")
10061             return anObj
10062
10063         # end of l3_transform
10064         ## @}
10065
10066         ## @addtogroup l3_transform_d
10067         ## @{
10068
10069         ## Deprecated method. Use MultiRotate1DNbTimes instead.
10070         def MultiRotate1D(self, theObject, theAxis, theNbTimes, theName=None):
10071             """
10072             Deprecated method. Use MultiRotate1DNbTimes instead.
10073             """
10074             print("The method MultiRotate1D is DEPRECATED. Use MultiRotate1DNbTimes instead.")
10075             return self.MultiRotate1DNbTimes(theObject, theAxis, theNbTimes, theName)
10076
10077         ## The same, as MultiRotate2DByStep(), but theAngle is in degrees.
10078         #  This method is DEPRECATED. Use MultiRotate2DByStep() instead.
10079         @ManageTransactions("TrsfOp")
10080         def MultiRotate2D(self, theObject, theAxis, theAngle, theNbTimes1, theStep, theNbTimes2, theName=None):
10081             """
10082             The same, as MultiRotate2DByStep(), but theAngle is in degrees.
10083             This method is DEPRECATED. Use MultiRotate2DByStep() instead.
10084
10085             Example of usage:
10086                 rot2d = geompy.MultiRotate2D(prism, vect, 60, 4, 50, 5)
10087             """
10088             print("The method MultiRotate2D is DEPRECATED. Use MultiRotate2DByStep instead.")
10089             theAngle, theNbTimes1, theStep, theNbTimes2, Parameters = ParseParameters(theAngle, theNbTimes1, theStep, theNbTimes2)
10090             anObj = self.TrsfOp.MultiRotate2D(theObject, theAxis, theAngle, theNbTimes1, theStep, theNbTimes2)
10091             RaiseIfFailed("MultiRotate2D", self.TrsfOp)
10092             anObj.SetParameters(Parameters)
10093             self._autoPublish(anObj, theName, "multirotation")
10094             return anObj
10095
10096         ## The same, as MultiRotate1D(), but axis is given by direction and point
10097         #  This method is DEPRECATED. Use MakeMultiRotation1DNbTimes instead.
10098         def MakeMultiRotation1D(self, aShape, aDir, aPoint, aNbTimes, theName=None):
10099             """
10100             The same, as geompy.MultiRotate1D, but axis is given by direction and point.
10101             This method is DEPRECATED. Use MakeMultiRotation1DNbTimes instead.
10102
10103             Example of usage:
10104                 pz = geompy.MakeVertex(0, 0, 100)
10105                 vy = geompy.MakeVectorDXDYDZ(0, 100, 0)
10106                 MultiRot1D = geompy.MakeMultiRotation1D(prism, vy, pz, 6)
10107             """
10108             print("The method MakeMultiRotation1D is DEPRECATED. Use MakeMultiRotation1DNbTimes instead.")
10109             aVec = self.MakeLine(aPoint,aDir)
10110             # note: auto-publishing is done in self.MultiRotate1D()
10111             anObj = self.MultiRotate1D(aShape, aVec, aNbTimes, theName)
10112             return anObj
10113
10114         ## The same, as MultiRotate2D(), but axis is given by direction and point
10115         #  This method is DEPRECATED. Use MakeMultiRotation2DByStep instead.
10116         def MakeMultiRotation2D(self, aShape, aDir, aPoint, anAngle, nbtimes1, aStep, nbtimes2, theName=None):
10117             """
10118             The same, as MultiRotate2D(), but axis is given by direction and point
10119             This method is DEPRECATED. Use MakeMultiRotation2DByStep instead.
10120
10121             Example of usage:
10122                 pz = geompy.MakeVertex(0, 0, 100)
10123                 vy = geompy.MakeVectorDXDYDZ(0, 100, 0)
10124                 MultiRot2D = geompy.MakeMultiRotation2D(f12, vy, pz, 45, 6, 30, 3)
10125             """
10126             print("The method MakeMultiRotation2D is DEPRECATED. Use MakeMultiRotation2DByStep instead.")
10127             aVec = self.MakeLine(aPoint,aDir)
10128             # note: auto-publishing is done in self.MultiRotate2D()
10129             anObj = self.MultiRotate2D(aShape, aVec, anAngle, nbtimes1, aStep, nbtimes2, theName)
10130             return anObj
10131
10132         # end of l3_transform_d
10133         ## @}
10134
10135         ## @addtogroup l3_local
10136         ## @{
10137
10138         ## Perform a fillet on all edges of the given shape.
10139         #  @param theShape Shape, to perform fillet on.
10140         #  @param theR Fillet radius.
10141         #  @param theName Object name; when specified, this parameter is used
10142         #         for result publication in the study. Otherwise, if automatic
10143         #         publication is switched on, default value is used for result name.
10144         #
10145         #  @return New GEOM.GEOM_Object, containing the result shape.
10146         #
10147         #  @ref tui_fillet "Example 1"
10148         #  \n @ref swig_MakeFilletAll "Example 2"
10149         @ManageTransactions("LocalOp")
10150         def MakeFilletAll(self, theShape, theR, theName=None):
10151             """
10152             Perform a fillet on all edges of the given shape.
10153
10154             Parameters:
10155                 theShape Shape, to perform fillet on.
10156                 theR Fillet radius.
10157                 theName Object name; when specified, this parameter is used
10158                         for result publication in the study. Otherwise, if automatic
10159                         publication is switched on, default value is used for result name.
10160
10161             Returns:
10162                 New GEOM.GEOM_Object, containing the result shape.
10163
10164             Example of usage:
10165                filletall = geompy.MakeFilletAll(prism, 10.)
10166             """
10167             # Example: see GEOM_TestOthers.py
10168             theR,Parameters = ParseParameters(theR)
10169             anObj = self.LocalOp.MakeFilletAll(theShape, theR)
10170             RaiseIfFailed("MakeFilletAll", self.LocalOp)
10171             anObj.SetParameters(Parameters)
10172             self._autoPublish(anObj, theName, "fillet")
10173             return anObj
10174
10175         ## Perform a fillet on the specified edges/faces of the given shape
10176         #  @param theShape Shape, to perform fillet on.
10177         #  @param theR Fillet radius.
10178         #  @param theShapeType Type of shapes in <VAR>theListShapes</VAR> (see ShapeType())
10179         #  @param theListShapes Global indices of edges/faces to perform fillet on.
10180         #  @param theName Object name; when specified, this parameter is used
10181         #         for result publication in the study. Otherwise, if automatic
10182         #         publication is switched on, default value is used for result name.
10183         #
10184         #  @note Global index of sub-shape can be obtained, using method GetSubShapeID().
10185         #
10186         #  @return New GEOM.GEOM_Object, containing the result shape.
10187         #
10188         #  @ref tui_fillet "Example"
10189         @ManageTransactions("LocalOp")
10190         def MakeFillet(self, theShape, theR, theShapeType, theListShapes, theName=None):
10191             """
10192             Perform a fillet on the specified edges/faces of the given shape
10193
10194             Parameters:
10195                 theShape Shape, to perform fillet on.
10196                 theR Fillet radius.
10197                 theShapeType Type of shapes in theListShapes (see geompy.ShapeTypes)
10198                 theListShapes Global indices of edges/faces to perform fillet on.
10199                 theName Object name; when specified, this parameter is used
10200                         for result publication in the study. Otherwise, if automatic
10201                         publication is switched on, default value is used for result name.
10202
10203             Note:
10204                 Global index of sub-shape can be obtained, using method geompy.GetSubShapeID
10205
10206             Returns:
10207                 New GEOM.GEOM_Object, containing the result shape.
10208
10209             Example of usage:
10210                 # get the list of IDs (IDList) for the fillet
10211                 prism_edges = geompy.SubShapeAllSortedCentres(prism, geompy.ShapeType["EDGE"])
10212                 IDlist_e = []
10213                 IDlist_e.append(geompy.GetSubShapeID(prism, prism_edges[0]))
10214                 IDlist_e.append(geompy.GetSubShapeID(prism, prism_edges[1]))
10215                 IDlist_e.append(geompy.GetSubShapeID(prism, prism_edges[2]))
10216                 # make a fillet on the specified edges of the given shape
10217                 fillet = geompy.MakeFillet(prism, 10., geompy.ShapeType["EDGE"], IDlist_e)
10218             """
10219             # Example: see GEOM_TestAll.py
10220             theR,Parameters = ParseParameters(theR)
10221             anObj = None
10222             if theShapeType == self.ShapeType["EDGE"]:
10223                 anObj = self.LocalOp.MakeFilletEdges(theShape, theR, theListShapes)
10224                 RaiseIfFailed("MakeFilletEdges", self.LocalOp)
10225             else:
10226                 anObj = self.LocalOp.MakeFilletFaces(theShape, theR, theListShapes)
10227                 RaiseIfFailed("MakeFilletFaces", self.LocalOp)
10228             anObj.SetParameters(Parameters)
10229             self._autoPublish(anObj, theName, "fillet")
10230             return anObj
10231
10232         ## The same that MakeFillet() but with two Fillet Radius R1 and R2
10233         @ManageTransactions("LocalOp")
10234         def MakeFilletR1R2(self, theShape, theR1, theR2, theShapeType, theListShapes, theName=None):
10235             """
10236             The same that geompy.MakeFillet but with two Fillet Radius R1 and R2
10237
10238             Example of usage:
10239                 # get the list of IDs (IDList) for the fillet
10240                 prism_edges = geompy.SubShapeAllSortedCentres(prism, geompy.ShapeType["EDGE"])
10241                 IDlist_e = []
10242                 IDlist_e.append(geompy.GetSubShapeID(prism, prism_edges[0]))
10243                 IDlist_e.append(geompy.GetSubShapeID(prism, prism_edges[1]))
10244                 IDlist_e.append(geompy.GetSubShapeID(prism, prism_edges[2]))
10245                 # make a fillet on the specified edges of the given shape
10246                 fillet = geompy.MakeFillet(prism, 10., 15., geompy.ShapeType["EDGE"], IDlist_e)
10247             """
10248             theR1,theR2,Parameters = ParseParameters(theR1,theR2)
10249             anObj = None
10250             if theShapeType == self.ShapeType["EDGE"]:
10251                 anObj = self.LocalOp.MakeFilletEdgesR1R2(theShape, theR1, theR2, theListShapes)
10252                 RaiseIfFailed("MakeFilletEdgesR1R2", self.LocalOp)
10253             else:
10254                 anObj = self.LocalOp.MakeFilletFacesR1R2(theShape, theR1, theR2, theListShapes)
10255                 RaiseIfFailed("MakeFilletFacesR1R2", self.LocalOp)
10256             anObj.SetParameters(Parameters)
10257             self._autoPublish(anObj, theName, "fillet")
10258             return anObj
10259
10260         ## Perform a fillet on the specified edges of the given shape
10261         #  @param theShape  Wire Shape to perform fillet on.
10262         #  @param theR  Fillet radius.
10263         #  @param theListOfVertexes Global indices of vertexes to perform fillet on.
10264         #    \note Global index of sub-shape can be obtained, using method GetSubShapeID()
10265         #    \note The list of vertices could be empty,
10266         #          in this case fillet will done done at all vertices in wire
10267         #  @param doIgnoreSecantVertices If FALSE, fillet radius is always limited
10268         #         by the length of the edges, nearest to the fillet vertex.
10269         #         But sometimes the next edge is C1 continuous with the one, nearest to
10270         #         the fillet point, and such two (or more) edges can be united to allow
10271         #         bigger radius. Set this flag to TRUE to allow collinear edges union,
10272         #         thus ignoring the secant vertex (vertices).
10273         #  @param theName Object name; when specified, this parameter is used
10274         #         for result publication in the study. Otherwise, if automatic
10275         #         publication is switched on, default value is used for result name.
10276         #
10277         #  @return New GEOM.GEOM_Object, containing the result shape.
10278         #
10279         #  @ref tui_fillet2d "Example"
10280         @ManageTransactions("LocalOp")
10281         def MakeFillet1D(self, theShape, theR, theListOfVertexes, doIgnoreSecantVertices = True, theName=None):
10282             """
10283             Perform a fillet on the specified edges of the given shape
10284
10285             Parameters:
10286                 theShape  Wire Shape to perform fillet on.
10287                 theR  Fillet radius.
10288                 theListOfVertexes Global indices of vertexes to perform fillet on.
10289                 doIgnoreSecantVertices If FALSE, fillet radius is always limited
10290                     by the length of the edges, nearest to the fillet vertex.
10291                     But sometimes the next edge is C1 continuous with the one, nearest to
10292                     the fillet point, and such two (or more) edges can be united to allow
10293                     bigger radius. Set this flag to TRUE to allow collinear edges union,
10294                     thus ignoring the secant vertex (vertices).
10295                 theName Object name; when specified, this parameter is used
10296                         for result publication in the study. Otherwise, if automatic
10297                         publication is switched on, default value is used for result name.
10298             Note:
10299                 Global index of sub-shape can be obtained, using method geompy.GetSubShapeID
10300
10301                 The list of vertices could be empty,in this case fillet will done done at all vertices in wire
10302
10303             Returns:
10304                 New GEOM.GEOM_Object, containing the result shape.
10305
10306             Example of usage:
10307                 # create wire
10308                 Wire_1 = geompy.MakeWire([Edge_12, Edge_7, Edge_11, Edge_6, Edge_1,Edge_4])
10309                 # make fillet at given wire vertices with giver radius
10310                 Fillet_1D_1 = geompy.MakeFillet1D(Wire_1, 55, [3, 4, 6, 8, 10])
10311             """
10312             # Example: see GEOM_TestAll.py
10313             theR,doIgnoreSecantVertices,Parameters = ParseParameters(theR,doIgnoreSecantVertices)
10314             anObj = self.LocalOp.MakeFillet1D(theShape, theR, theListOfVertexes, doIgnoreSecantVertices)
10315             RaiseIfFailed("MakeFillet1D", self.LocalOp)
10316             anObj.SetParameters(Parameters)
10317             self._autoPublish(anObj, theName, "fillet")
10318             return anObj
10319
10320         ## Perform a fillet at the specified vertices of the given face/shell.
10321         #  @param theShape Face or Shell shape to perform fillet on.
10322         #  @param theR Fillet radius.
10323         #  @param theListOfVertexes Global indices of vertexes to perform fillet on.
10324         #  @param theName Object name; when specified, this parameter is used
10325         #         for result publication in the study. Otherwise, if automatic
10326         #         publication is switched on, default value is used for result name.
10327         #
10328         #  @note Global index of sub-shape can be obtained, using method GetSubShapeID().
10329         #
10330         #  @return New GEOM.GEOM_Object, containing the result shape.
10331         #
10332         #  @ref tui_fillet2d "Example"
10333         @ManageTransactions("LocalOp")
10334         def MakeFillet2D(self, theShape, theR, theListOfVertexes, theName=None):
10335             """
10336             Perform a fillet at the specified vertices of the given face/shell.
10337
10338             Parameters:
10339                 theShape  Face or Shell shape to perform fillet on.
10340                 theR  Fillet radius.
10341                 theListOfVertexes Global indices of vertexes to perform fillet on.
10342                 theName Object name; when specified, this parameter is used
10343                         for result publication in the study. Otherwise, if automatic
10344                         publication is switched on, default value is used for result name.
10345             Note:
10346                 Global index of sub-shape can be obtained, using method geompy.GetSubShapeID
10347
10348             Returns:
10349                 New GEOM.GEOM_Object, containing the result shape.
10350
10351             Example of usage:
10352                 face = geompy.MakeFaceHW(100, 100, 1)
10353                 fillet2d = geompy.MakeFillet2D(face, 30, [7, 9])
10354             """
10355             # Example: see GEOM_TestAll.py
10356             theR,Parameters = ParseParameters(theR)
10357             anObj = self.LocalOp.MakeFillet2D(theShape, theR, theListOfVertexes)
10358             RaiseIfFailed("MakeFillet2D", self.LocalOp)
10359             anObj.SetParameters(Parameters)
10360             self._autoPublish(anObj, theName, "fillet")
10361             return anObj
10362
10363         ## Perform a symmetric chamfer on all edges of the given shape.
10364         #  @param theShape Shape, to perform chamfer on.
10365         #  @param theD Chamfer size along each face.
10366         #  @param theName Object name; when specified, this parameter is used
10367         #         for result publication in the study. Otherwise, if automatic
10368         #         publication is switched on, default value is used for result name.
10369         #
10370         #  @return New GEOM.GEOM_Object, containing the result shape.
10371         #
10372         #  @ref tui_chamfer "Example 1"
10373         #  \n @ref swig_MakeChamferAll "Example 2"
10374         @ManageTransactions("LocalOp")
10375         def MakeChamferAll(self, theShape, theD, theName=None):
10376             """
10377             Perform a symmetric chamfer on all edges of the given shape.
10378
10379             Parameters:
10380                 theShape Shape, to perform chamfer on.
10381                 theD Chamfer size along each face.
10382                 theName Object name; when specified, this parameter is used
10383                         for result publication in the study. Otherwise, if automatic
10384                         publication is switched on, default value is used for result name.
10385
10386             Returns:
10387                 New GEOM.GEOM_Object, containing the result shape.
10388
10389             Example of usage:
10390                 chamfer_all = geompy.MakeChamferAll(prism, 10.)
10391             """
10392             # Example: see GEOM_TestOthers.py
10393             theD,Parameters = ParseParameters(theD)
10394             anObj = self.LocalOp.MakeChamferAll(theShape, theD)
10395             RaiseIfFailed("MakeChamferAll", self.LocalOp)
10396             anObj.SetParameters(Parameters)
10397             self._autoPublish(anObj, theName, "chamfer")
10398             return anObj
10399
10400         ## Perform a chamfer on edges, common to the specified faces,
10401         #  with distance D1 on the Face1
10402         #  @param theShape Shape, to perform chamfer on.
10403         #  @param theD1 Chamfer size along \a theFace1.
10404         #  @param theD2 Chamfer size along \a theFace2.
10405         #  @param theFace1,theFace2 Global indices of two faces of \a theShape.
10406         #  @param theName Object name; when specified, this parameter is used
10407         #         for result publication in the study. Otherwise, if automatic
10408         #         publication is switched on, default value is used for result name.
10409         #
10410         #  @note Global index of sub-shape can be obtained, using method GetSubShapeID().
10411         #
10412         #  @return New GEOM.GEOM_Object, containing the result shape.
10413         #
10414         #  @ref tui_chamfer "Example"
10415         @ManageTransactions("LocalOp")
10416         def MakeChamferEdge(self, theShape, theD1, theD2, theFace1, theFace2, theName=None):
10417             """
10418             Perform a chamfer on edges, common to the specified faces,
10419             with distance D1 on the Face1
10420
10421             Parameters:
10422                 theShape Shape, to perform chamfer on.
10423                 theD1 Chamfer size along theFace1.
10424                 theD2 Chamfer size along theFace2.
10425                 theFace1,theFace2 Global indices of two faces of theShape.
10426                 theName Object name; when specified, this parameter is used
10427                         for result publication in the study. Otherwise, if automatic
10428                         publication is switched on, default value is used for result name.
10429
10430             Note:
10431                 Global index of sub-shape can be obtained, using method geompy.GetSubShapeID
10432
10433             Returns:
10434                 New GEOM.GEOM_Object, containing the result shape.
10435
10436             Example of usage:
10437                 prism_faces = geompy.SubShapeAllSortedCentres(prism, geompy.ShapeType["FACE"])
10438                 f_ind_1 = geompy.GetSubShapeID(prism, prism_faces[0])
10439                 f_ind_2 = geompy.GetSubShapeID(prism, prism_faces[1])
10440                 chamfer_e = geompy.MakeChamferEdge(prism, 10., 10., f_ind_1, f_ind_2)
10441             """
10442             # Example: see GEOM_TestAll.py
10443             theD1,theD2,Parameters = ParseParameters(theD1,theD2)
10444             anObj = self.LocalOp.MakeChamferEdge(theShape, theD1, theD2, theFace1, theFace2)
10445             RaiseIfFailed("MakeChamferEdge", self.LocalOp)
10446             anObj.SetParameters(Parameters)
10447             self._autoPublish(anObj, theName, "chamfer")
10448             return anObj
10449
10450         ## Perform a chamfer on edges
10451         #  @param theShape Shape, to perform chamfer on.
10452         #  @param theD Chamfer length
10453         #  @param theAngle Angle of chamfer (angle in radians or a name of variable which defines angle in degrees)
10454         #  @param theFace1,theFace2 Global indices of two faces of \a theShape.
10455         #  @param theName Object name; when specified, this parameter is used
10456         #         for result publication in the study. Otherwise, if automatic
10457         #         publication is switched on, default value is used for result name.
10458         #
10459         #  @note Global index of sub-shape can be obtained, using method GetSubShapeID().
10460         #
10461         #  @return New GEOM.GEOM_Object, containing the result shape.
10462         @ManageTransactions("LocalOp")
10463         def MakeChamferEdgeAD(self, theShape, theD, theAngle, theFace1, theFace2, theName=None):
10464             """
10465             Perform a chamfer on edges
10466
10467             Parameters:
10468                 theShape Shape, to perform chamfer on.
10469                 theD1 Chamfer size along theFace1.
10470                 theAngle Angle of chamfer (angle in radians or a name of variable which defines angle in degrees).
10471                 theFace1,theFace2 Global indices of two faces of theShape.
10472                 theName Object name; when specified, this parameter is used
10473                         for result publication in the study. Otherwise, if automatic
10474                         publication is switched on, default value is used for result name.
10475
10476             Note:
10477                 Global index of sub-shape can be obtained, using method geompy.GetSubShapeID
10478
10479             Returns:
10480                 New GEOM.GEOM_Object, containing the result shape.
10481
10482             Example of usage:
10483                 prism_faces = geompy.SubShapeAllSortedCentres(prism, geompy.ShapeType["FACE"])
10484                 f_ind_1 = geompy.GetSubShapeID(prism, prism_faces[0])
10485                 f_ind_2 = geompy.GetSubShapeID(prism, prism_faces[1])
10486                 ang = 30
10487                 chamfer_e = geompy.MakeChamferEdge(prism, 10., ang, f_ind_1, f_ind_2)
10488             """
10489             flag = False
10490             if isinstance(theAngle,str):
10491                 flag = True
10492             theD,theAngle,Parameters = ParseParameters(theD,theAngle)
10493             if flag:
10494                 theAngle = theAngle*math.pi/180.0
10495             anObj = self.LocalOp.MakeChamferEdgeAD(theShape, theD, theAngle, theFace1, theFace2)
10496             RaiseIfFailed("MakeChamferEdgeAD", self.LocalOp)
10497             anObj.SetParameters(Parameters)
10498             self._autoPublish(anObj, theName, "chamfer")
10499             return anObj
10500
10501         ## Perform a chamfer on all edges of the specified faces,
10502         #  with distance D1 on the first specified face (if several for one edge)
10503         #  @param theShape Shape, to perform chamfer on.
10504         #  @param theD1 Chamfer size along face from \a theFaces. If both faces,
10505         #               connected to the edge, are in \a theFaces, \a theD1
10506         #               will be get along face, which is nearer to \a theFaces beginning.
10507         #  @param theD2 Chamfer size along another of two faces, connected to the edge.
10508         #  @param theFaces Sequence of global indices of faces of \a theShape.
10509         #  @param theName Object name; when specified, this parameter is used
10510         #         for result publication in the study. Otherwise, if automatic
10511         #         publication is switched on, default value is used for result name.
10512         #
10513         #  @note Global index of sub-shape can be obtained, using method GetSubShapeID().
10514         #
10515         #  @return New GEOM.GEOM_Object, containing the result shape.
10516         #
10517         #  @ref tui_chamfer "Example"
10518         @ManageTransactions("LocalOp")
10519         def MakeChamferFaces(self, theShape, theD1, theD2, theFaces, theName=None):
10520             """
10521             Perform a chamfer on all edges of the specified faces,
10522             with distance D1 on the first specified face (if several for one edge)
10523
10524             Parameters:
10525                 theShape Shape, to perform chamfer on.
10526                 theD1 Chamfer size along face from  theFaces. If both faces,
10527                       connected to the edge, are in theFaces, theD1
10528                       will be get along face, which is nearer to theFaces beginning.
10529                 theD2 Chamfer size along another of two faces, connected to the edge.
10530                 theFaces Sequence of global indices of faces of theShape.
10531                 theName Object name; when specified, this parameter is used
10532                         for result publication in the study. Otherwise, if automatic
10533                         publication is switched on, default value is used for result name.
10534
10535             Note: Global index of sub-shape can be obtained, using method geompy.GetSubShapeID().
10536
10537             Returns:
10538                 New GEOM.GEOM_Object, containing the result shape.
10539             """
10540             # Example: see GEOM_TestAll.py
10541             theD1,theD2,Parameters = ParseParameters(theD1,theD2)
10542             anObj = self.LocalOp.MakeChamferFaces(theShape, theD1, theD2, theFaces)
10543             RaiseIfFailed("MakeChamferFaces", self.LocalOp)
10544             anObj.SetParameters(Parameters)
10545             self._autoPublish(anObj, theName, "chamfer")
10546             return anObj
10547
10548         ## The Same that MakeChamferFaces() but with params theD is chamfer length and
10549         #  theAngle is Angle of chamfer (angle in radians or a name of variable which defines angle in degrees)
10550         #
10551         #  @ref swig_FilletChamfer "Example"
10552         @ManageTransactions("LocalOp")
10553         def MakeChamferFacesAD(self, theShape, theD, theAngle, theFaces, theName=None):
10554             """
10555             The Same that geompy.MakeChamferFaces but with params theD is chamfer length and
10556             theAngle is Angle of chamfer (angle in radians or a name of variable which defines angle in degrees)
10557             """
10558             flag = False
10559             if isinstance(theAngle,str):
10560                 flag = True
10561             theD,theAngle,Parameters = ParseParameters(theD,theAngle)
10562             if flag:
10563                 theAngle = theAngle*math.pi/180.0
10564             anObj = self.LocalOp.MakeChamferFacesAD(theShape, theD, theAngle, theFaces)
10565             RaiseIfFailed("MakeChamferFacesAD", self.LocalOp)
10566             anObj.SetParameters(Parameters)
10567             self._autoPublish(anObj, theName, "chamfer")
10568             return anObj
10569
10570         ## Perform a chamfer on edges,
10571         #  with distance D1 on the first specified face (if several for one edge)
10572         #  @param theShape Shape, to perform chamfer on.
10573         #  @param theD1,theD2 Chamfer size
10574         #  @param theEdges Sequence of edges of \a theShape.
10575         #  @param theName Object name; when specified, this parameter is used
10576         #         for result publication in the study. Otherwise, if automatic
10577         #         publication is switched on, default value is used for result name.
10578         #
10579         #  @return New GEOM.GEOM_Object, containing the result shape.
10580         #
10581         #  @ref swig_FilletChamfer "Example"
10582         @ManageTransactions("LocalOp")
10583         def MakeChamferEdges(self, theShape, theD1, theD2, theEdges, theName=None):
10584             """
10585             Perform a chamfer on edges,
10586             with distance D1 on the first specified face (if several for one edge)
10587
10588             Parameters:
10589                 theShape Shape, to perform chamfer on.
10590                 theD1,theD2 Chamfer size
10591                 theEdges Sequence of edges of theShape.
10592                 theName Object name; when specified, this parameter is used
10593                         for result publication in the study. Otherwise, if automatic
10594                         publication is switched on, default value is used for result name.
10595
10596             Returns:
10597                 New GEOM.GEOM_Object, containing the result shape.
10598             """
10599             theD1,theD2,Parameters = ParseParameters(theD1,theD2)
10600             anObj = self.LocalOp.MakeChamferEdges(theShape, theD1, theD2, theEdges)
10601             RaiseIfFailed("MakeChamferEdges", self.LocalOp)
10602             anObj.SetParameters(Parameters)
10603             self._autoPublish(anObj, theName, "chamfer")
10604             return anObj
10605
10606         ## The Same that MakeChamferEdges() but with params theD is chamfer length and
10607         #  theAngle is Angle of chamfer (angle in radians or a name of variable which defines angle in degrees)
10608         @ManageTransactions("LocalOp")
10609         def MakeChamferEdgesAD(self, theShape, theD, theAngle, theEdges, theName=None):
10610             """
10611             The Same that geompy.MakeChamferEdges but with params theD is chamfer length and
10612             theAngle is Angle of chamfer (angle in radians or a name of variable which defines angle in degrees)
10613             """
10614             flag = False
10615             if isinstance(theAngle,str):
10616                 flag = True
10617             theD,theAngle,Parameters = ParseParameters(theD,theAngle)
10618             if flag:
10619                 theAngle = theAngle*math.pi/180.0
10620             anObj = self.LocalOp.MakeChamferEdgesAD(theShape, theD, theAngle, theEdges)
10621             RaiseIfFailed("MakeChamferEdgesAD", self.LocalOp)
10622             anObj.SetParameters(Parameters)
10623             self._autoPublish(anObj, theName, "chamfer")
10624             return anObj
10625
10626         ## @sa MakeChamferEdge(), MakeChamferFaces()
10627         #
10628         #  @ref swig_MakeChamfer "Example"
10629         def MakeChamfer(self, aShape, d1, d2, aShapeType, ListShape, theName=None):
10630             """
10631             See geompy.MakeChamferEdge() and geompy.MakeChamferFaces() functions for more information.
10632             """
10633             # Example: see GEOM_TestOthers.py
10634             anObj = None
10635             # note: auto-publishing is done in self.MakeChamferEdge() or self.MakeChamferFaces()
10636             if aShapeType == self.ShapeType["EDGE"]:
10637                 anObj = self.MakeChamferEdge(aShape,d1,d2,ListShape[0],ListShape[1],theName)
10638             else:
10639                 anObj = self.MakeChamferFaces(aShape,d1,d2,ListShape,theName)
10640             return anObj
10641
10642         ## Remove material from a solid by extrusion of the base shape on the given distance.
10643         #  @param theInit Shape to remove material from. It must be a solid or
10644         #  a compound made of a single solid.
10645         #  @param theBase Closed edge or wire defining the base shape to be extruded.
10646         #  @param theH Prism dimension along the normal to theBase
10647         #  @param theAngle Draft angle in degrees.
10648         #  @param theInvert If true material changes the direction
10649         #  @param theName Object name; when specified, this parameter is used
10650         #         for result publication in the study. Otherwise, if automatic
10651         #         publication is switched on, default value is used for result name.
10652         #
10653         #  @return New GEOM.GEOM_Object, containing the initial shape with removed material
10654         #
10655         #  @ref tui_creation_prism "Example"
10656         @ManageTransactions("PrimOp")
10657         def MakeExtrudedCut(self, theInit, theBase, theH, theAngle, theInvert=False, theName=None):
10658             """
10659             Add material to a solid by extrusion of the base shape on the given distance.
10660
10661             Parameters:
10662                 theInit Shape to remove material from. It must be a solid or a compound made of a single solid.
10663                 theBase Closed edge or wire defining the base shape to be extruded.
10664                 theH Prism dimension along the normal to theBase
10665                 theAngle Draft angle in degrees.
10666                 theInvert If true material changes the direction.
10667                 theName Object name; when specified, this parameter is used
10668                         for result publication in the study. Otherwise, if automatic
10669                         publication is switched on, default value is used for result name.
10670
10671             Returns:
10672                 New GEOM.GEOM_Object,  containing the initial shape with removed material.
10673             """
10674             # Example: see GEOM_TestAll.py
10675             theH,theAngle,Parameters = ParseParameters(theH,theAngle)
10676             anObj = self.PrimOp.MakeDraftPrism(theInit, theBase, theH, theAngle, False, theInvert)
10677             RaiseIfFailed("MakeExtrudedBoss", self.PrimOp)
10678             anObj.SetParameters(Parameters)
10679             self._autoPublish(anObj, theName, "extrudedCut")
10680             return anObj
10681
10682         ## Add material to a solid by extrusion of the base shape on the given distance.
10683         #  @param theInit Shape to add material to. It must be a solid or
10684         #  a compound made of a single solid.
10685         #  @param theBase Closed edge or wire defining the base shape to be extruded.
10686         #  @param theH Prism dimension along the normal to theBase
10687         #  @param theAngle Draft angle in degrees.
10688         #  @param theInvert If true material changes the direction
10689         #  @param theName Object name; when specified, this parameter is used
10690         #         for result publication in the study. Otherwise, if automatic
10691         #         publication is switched on, default value is used for result name.
10692         #
10693         #  @return New GEOM.GEOM_Object, containing the initial shape with added material
10694         #
10695         #  @ref tui_creation_prism "Example"
10696         @ManageTransactions("PrimOp")
10697         def MakeExtrudedBoss(self, theInit, theBase, theH, theAngle, theInvert=False, theName=None):
10698             """
10699             Add material to a solid by extrusion of the base shape on the given distance.
10700
10701             Parameters:
10702                 theInit Shape to add material to. It must be a solid or a compound made of a single solid.
10703                 theBase Closed edge or wire defining the base shape to be extruded.
10704                 theH Prism dimension along the normal to theBase
10705                 theAngle Draft angle in degrees.
10706                 theInvert If true material changes the direction.
10707                 theName Object name; when specified, this parameter is used
10708                         for result publication in the study. Otherwise, if automatic
10709                         publication is switched on, default value is used for result name.
10710
10711             Returns:
10712                 New GEOM.GEOM_Object,  containing the initial shape with added material.
10713             """
10714             # Example: see GEOM_TestAll.py
10715             theH,theAngle,Parameters = ParseParameters(theH,theAngle)
10716             anObj = self.PrimOp.MakeDraftPrism(theInit, theBase, theH, theAngle, True, theInvert)
10717             RaiseIfFailed("MakeExtrudedBoss", self.PrimOp)
10718             anObj.SetParameters(Parameters)
10719             self._autoPublish(anObj, theName, "extrudedBoss")
10720             return anObj
10721
10722         # end of l3_local
10723         ## @}
10724
10725         ## @addtogroup l3_basic_op
10726         ## @{
10727
10728         ## Perform an Archimde operation on the given shape with given parameters.
10729         #  The object presenting the resulting face is returned.
10730         #  @param theShape Shape to be put in water.
10731         #  @param theWeight Weight of the shape.
10732         #  @param theWaterDensity Density of the water.
10733         #  @param theMeshDeflection Deflection of the mesh, using to compute the section.
10734         #  @param theName Object name; when specified, this parameter is used
10735         #         for result publication in the study. Otherwise, if automatic
10736         #         publication is switched on, default value is used for result name.
10737         #
10738         #  @return New GEOM.GEOM_Object, containing a section of \a theShape
10739         #          by a plane, corresponding to water level.
10740         #
10741         #  @ref tui_archimede "Example"
10742         @ManageTransactions("LocalOp")
10743         def Archimede(self, theShape, theWeight, theWaterDensity, theMeshDeflection, theName=None):
10744             """
10745             Perform an Archimde operation on the given shape with given parameters.
10746             The object presenting the resulting face is returned.
10747
10748             Parameters:
10749                 theShape Shape to be put in water.
10750                 theWeight Weight of the shape.
10751                 theWaterDensity Density of the water.
10752                 theMeshDeflection Deflection of the mesh, using to compute the section.
10753                 theName Object name; when specified, this parameter is used
10754                         for result publication in the study. Otherwise, if automatic
10755                         publication is switched on, default value is used for result name.
10756
10757             Returns:
10758                 New GEOM.GEOM_Object, containing a section of theShape
10759                 by a plane, corresponding to water level.
10760             """
10761             # Example: see GEOM_TestAll.py
10762             theWeight,theWaterDensity,theMeshDeflection,Parameters = ParseParameters(
10763               theWeight,theWaterDensity,theMeshDeflection)
10764             anObj = self.LocalOp.MakeArchimede(theShape, theWeight, theWaterDensity, theMeshDeflection)
10765             RaiseIfFailed("MakeArchimede", self.LocalOp)
10766             anObj.SetParameters(Parameters)
10767             self._autoPublish(anObj, theName, "archimede")
10768             return anObj
10769
10770         # end of l3_basic_op
10771         ## @}
10772
10773         ## @addtogroup l2_measure
10774         ## @{
10775
10776         ## Get point coordinates
10777         #  @return [x, y, z]
10778         #
10779         #  @ref tui_point_coordinates_page "Example"
10780         @ManageTransactions("MeasuOp")
10781         def PointCoordinates(self,Point):
10782             """
10783             Get point coordinates
10784
10785             Returns:
10786                 [x, y, z]
10787             """
10788             # Example: see GEOM_TestMeasures.py
10789             aTuple = self.MeasuOp.PointCoordinates(Point)
10790             RaiseIfFailed("PointCoordinates", self.MeasuOp)
10791             return aTuple
10792
10793         ## Get vector coordinates
10794         #  @return [x, y, z]
10795         #
10796         #  @ref tui_measurement_tools_page "Example"
10797         def VectorCoordinates(self,Vector):
10798             """
10799             Get vector coordinates
10800
10801             Returns:
10802                 [x, y, z]
10803             """
10804
10805             p1=self.GetFirstVertex(Vector)
10806             p2=self.GetLastVertex(Vector)
10807
10808             X1=self.PointCoordinates(p1)
10809             X2=self.PointCoordinates(p2)
10810
10811             return (X2[0]-X1[0],X2[1]-X1[1],X2[2]-X1[2])
10812
10813
10814         ## Compute cross product
10815         #  @return vector w=u^v
10816         #
10817         #  @ref tui_measurement_tools_page "Example"
10818         def CrossProduct(self, Vector1, Vector2):
10819             """
10820             Compute cross product
10821
10822             Returns: vector w=u^v
10823             """
10824             u=self.VectorCoordinates(Vector1)
10825             v=self.VectorCoordinates(Vector2)
10826             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])
10827
10828             return w
10829
10830         ## Compute cross product
10831         #  @return dot product  p=u.v
10832         #
10833         #  @ref tui_measurement_tools_page "Example"
10834         def DotProduct(self, Vector1, Vector2):
10835             """
10836             Compute cross product
10837
10838             Returns: dot product  p=u.v
10839             """
10840             u=self.VectorCoordinates(Vector1)
10841             v=self.VectorCoordinates(Vector2)
10842             p=u[0]*v[0]+u[1]*v[1]+u[2]*v[2]
10843
10844             return p
10845
10846
10847         ## Get summarized length of all wires,
10848         #  area of surface and volume of the given shape.
10849         #  @param theShape Shape to define properties of.
10850         #  @param theTolerance maximal relative error of area
10851         #         and volume computation.
10852         #  @return [theLength, theSurfArea, theVolume]\n
10853         #  theLength:   Summarized length of all wires of the given shape.\n
10854         #  theSurfArea: Area of surface of the given shape.\n
10855         #  theVolume:   Volume of the given shape.
10856         #
10857         #  @ref tui_basic_properties_page "Example"
10858         @ManageTransactions("MeasuOp")
10859         def BasicProperties(self,theShape, theTolerance=1.e-6):
10860             """
10861             Get summarized length of all wires,
10862             area of surface and volume of the given shape.
10863
10864             Parameters:
10865                 theShape Shape to define properties of.
10866                 theTolerance maximal relative error of area
10867                              and volume computation.
10868
10869             Returns:
10870                 [theLength, theSurfArea, theVolume]
10871                  theLength:   Summarized length of all wires of the given shape.
10872                  theSurfArea: Area of surface of the given shape.
10873                  theVolume:   Volume of the given shape.
10874             """
10875             # Example: see GEOM_TestMeasures.py
10876             aTuple = self.MeasuOp.GetBasicProperties(theShape, theTolerance)
10877             RaiseIfFailed("GetBasicProperties", self.MeasuOp)
10878             return aTuple
10879
10880         ## Get parameters of bounding box of the given shape
10881         #  @param theShape Shape to obtain bounding box of.
10882         #  @param precise TRUE for precise computation; FALSE for fast one.
10883         #  @return [Xmin,Xmax, Ymin,Ymax, Zmin,Zmax]
10884         #  Xmin,Xmax: Limits of shape along OX axis.
10885         #  Ymin,Ymax: Limits of shape along OY axis.
10886         #  Zmin,Zmax: Limits of shape along OZ axis.
10887         #
10888         #  @ref tui_bounding_box_page "Example"
10889         @ManageTransactions("MeasuOp")
10890         def BoundingBox (self, theShape, precise=False):
10891             """
10892             Get parameters of bounding box of the given shape
10893
10894             Parameters:
10895                 theShape Shape to obtain bounding box of.
10896                 precise TRUE for precise computation; FALSE for fast one.
10897
10898             Returns:
10899                 [Xmin,Xmax, Ymin,Ymax, Zmin,Zmax]
10900                  Xmin,Xmax: Limits of shape along OX axis.
10901                  Ymin,Ymax: Limits of shape along OY axis.
10902                  Zmin,Zmax: Limits of shape along OZ axis.
10903             """
10904             # Example: see GEOM_TestMeasures.py
10905             aTuple = self.MeasuOp.GetBoundingBox(theShape, precise)
10906             RaiseIfFailed("GetBoundingBox", self.MeasuOp)
10907             return aTuple
10908
10909         ## Get bounding box of the given shape
10910         #  @param theShape Shape to obtain bounding box of.
10911         #  @param precise TRUE for precise computation; FALSE for fast one.
10912         #  @param theName Object name; when specified, this parameter is used
10913         #         for result publication in the study. Otherwise, if automatic
10914         #         publication is switched on, default value is used for result name.
10915         #
10916         #  @return New GEOM.GEOM_Object, containing the created box.
10917         #
10918         #  @ref tui_bounding_box_page "Example"
10919         @ManageTransactions("MeasuOp")
10920         def MakeBoundingBox (self, theShape, precise=False, theName=None):
10921             """
10922             Get bounding box of the given shape
10923
10924             Parameters:
10925                 theShape Shape to obtain bounding box of.
10926                 precise TRUE for precise computation; FALSE for fast one.
10927                 theName Object name; when specified, this parameter is used
10928                         for result publication in the study. Otherwise, if automatic
10929                         publication is switched on, default value is used for result name.
10930
10931             Returns:
10932                 New GEOM.GEOM_Object, containing the created box.
10933             """
10934             # Example: see GEOM_TestMeasures.py
10935             anObj = self.MeasuOp.MakeBoundingBox(theShape, precise)
10936             RaiseIfFailed("MakeBoundingBox", self.MeasuOp)
10937             self._autoPublish(anObj, theName, "bndbox")
10938             return anObj
10939
10940         ## Get inertia matrix and moments of inertia of theShape.
10941         #  @param theShape Shape to calculate inertia of.
10942         #  @return [I11,I12,I13, I21,I22,I23, I31,I32,I33, Ix,Iy,Iz]
10943         #  I(1-3)(1-3): Components of the inertia matrix of the given shape.
10944         #  Ix,Iy,Iz:    Moments of inertia of the given shape.
10945         #
10946         #  @ref tui_inertia_page "Example"
10947         @ManageTransactions("MeasuOp")
10948         def Inertia(self,theShape):
10949             """
10950             Get inertia matrix and moments of inertia of theShape.
10951
10952             Parameters:
10953                 theShape Shape to calculate inertia of.
10954
10955             Returns:
10956                 [I11,I12,I13, I21,I22,I23, I31,I32,I33, Ix,Iy,Iz]
10957                  I(1-3)(1-3): Components of the inertia matrix of the given shape.
10958                  Ix,Iy,Iz:    Moments of inertia of the given shape.
10959             """
10960             # Example: see GEOM_TestMeasures.py
10961             aTuple = self.MeasuOp.GetInertia(theShape)
10962             RaiseIfFailed("GetInertia", self.MeasuOp)
10963             return aTuple
10964
10965         ## Get if coords are included in the shape (ST_IN or ST_ON)
10966         #  @param theShape Shape
10967         #  @param coords list of points coordinates [x1, y1, z1, x2, y2, z2, ...]
10968         #  @param tolerance to be used (default is 1.0e-7)
10969         #  @return list_of_boolean = [res1, res2, ...]
10970         @ManageTransactions("MeasuOp")
10971         def AreCoordsInside(self, theShape, coords, tolerance=1.e-7):
10972             """
10973             Get if coords are included in the shape (ST_IN or ST_ON)
10974
10975             Parameters:
10976                 theShape Shape
10977                 coords list of points coordinates [x1, y1, z1, x2, y2, z2, ...]
10978                 tolerance to be used (default is 1.0e-7)
10979
10980             Returns:
10981                 list_of_boolean = [res1, res2, ...]
10982             """
10983             return self.MeasuOp.AreCoordsInside(theShape, coords, tolerance)
10984
10985         ## Get minimal distance between the given shapes.
10986         #  @param theShape1,theShape2 Shapes to find minimal distance between.
10987         #  @return Value of the minimal distance between the given shapes.
10988         #
10989         #  @ref tui_min_distance_page "Example"
10990         @ManageTransactions("MeasuOp")
10991         def MinDistance(self, theShape1, theShape2):
10992             """
10993             Get minimal distance between the given shapes.
10994
10995             Parameters:
10996                 theShape1,theShape2 Shapes to find minimal distance between.
10997
10998             Returns:
10999                 Value of the minimal distance between the given shapes.
11000             """
11001             # Example: see GEOM_TestMeasures.py
11002             aTuple = self.MeasuOp.GetMinDistance(theShape1, theShape2)
11003             RaiseIfFailed("GetMinDistance", self.MeasuOp)
11004             return aTuple[0]
11005
11006         ## Get minimal distance between the given shapes.
11007         #  @param theShape1,theShape2 Shapes to find minimal distance between.
11008         #  @return Value of the minimal distance between the given shapes, in form of list
11009         #          [Distance, DX, DY, DZ].
11010         #
11011         #  @ref tui_min_distance_page "Example"
11012         @ManageTransactions("MeasuOp")
11013         def MinDistanceComponents(self, theShape1, theShape2):
11014             """
11015             Get minimal distance between the given shapes.
11016
11017             Parameters:
11018                 theShape1,theShape2 Shapes to find minimal distance between.
11019
11020             Returns:
11021                 Value of the minimal distance between the given shapes, in form of list
11022                 [Distance, DX, DY, DZ]
11023             """
11024             # Example: see GEOM_TestMeasures.py
11025             aTuple = self.MeasuOp.GetMinDistance(theShape1, theShape2)
11026             RaiseIfFailed("GetMinDistance", self.MeasuOp)
11027             aRes = [aTuple[0], aTuple[4] - aTuple[1], aTuple[5] - aTuple[2], aTuple[6] - aTuple[3]]
11028             return aRes
11029
11030         ## Get closest points of the given shapes.
11031         #  @param theShape1,theShape2 Shapes to find closest points of.
11032         #  @return The number of found solutions (-1 in case of infinite number of
11033         #          solutions) and a list of (X, Y, Z) coordinates for all couples of points.
11034         #
11035         #  @ref tui_min_distance_page "Example"
11036         @ManageTransactions("MeasuOp")
11037         def ClosestPoints (self, theShape1, theShape2):
11038             """
11039             Get closest points of the given shapes.
11040
11041             Parameters:
11042                 theShape1,theShape2 Shapes to find closest points of.
11043
11044             Returns:
11045                 The number of found solutions (-1 in case of infinite number of
11046                 solutions) and a list of (X, Y, Z) coordinates for all couples of points.
11047             """
11048             # Example: see GEOM_TestMeasures.py
11049             aTuple = self.MeasuOp.ClosestPoints(theShape1, theShape2)
11050             RaiseIfFailed("ClosestPoints", self.MeasuOp)
11051             return aTuple
11052
11053         ## Get angle between the given shapes in degrees.
11054         #  @param theShape1,theShape2 Lines or linear edges to find angle between.
11055         #  @note If both arguments are vectors, the angle is computed in accordance
11056         #        with their orientations, otherwise the minimum angle is computed.
11057         #  @return Value of the angle between the given shapes in degrees.
11058         #
11059         #  @ref tui_angle_page "Example"
11060         @ManageTransactions("MeasuOp")
11061         def GetAngle(self, theShape1, theShape2):
11062             """
11063             Get angle between the given shapes in degrees.
11064
11065             Parameters:
11066                 theShape1,theShape2 Lines or linear edges to find angle between.
11067
11068             Note:
11069                 If both arguments are vectors, the angle is computed in accordance
11070                 with their orientations, otherwise the minimum angle is computed.
11071
11072             Returns:
11073                 Value of the angle between the given shapes in degrees.
11074             """
11075             # Example: see GEOM_TestMeasures.py
11076             anAngle = self.MeasuOp.GetAngle(theShape1, theShape2)
11077             RaiseIfFailed("GetAngle", self.MeasuOp)
11078             return anAngle
11079
11080         ## Get angle between the given shapes in radians.
11081         #  @param theShape1,theShape2 Lines or linear edges to find angle between.
11082         #  @note If both arguments are vectors, the angle is computed in accordance
11083         #        with their orientations, otherwise the minimum angle is computed.
11084         #  @return Value of the angle between the given shapes in radians.
11085         #
11086         #  @ref tui_angle_page "Example"
11087         @ManageTransactions("MeasuOp")
11088         def GetAngleRadians(self, theShape1, theShape2):
11089             """
11090             Get angle between the given shapes in radians.
11091
11092             Parameters:
11093                 theShape1,theShape2 Lines or linear edges to find angle between.
11094
11095
11096             Note:
11097                 If both arguments are vectors, the angle is computed in accordance
11098                 with their orientations, otherwise the minimum angle is computed.
11099
11100             Returns:
11101                 Value of the angle between the given shapes in radians.
11102             """
11103             # Example: see GEOM_TestMeasures.py
11104             anAngle = self.MeasuOp.GetAngle(theShape1, theShape2)*math.pi/180.
11105             RaiseIfFailed("GetAngle", self.MeasuOp)
11106             return anAngle
11107
11108         ## Get angle between the given vectors in degrees.
11109         #  @param theShape1,theShape2 Vectors to find angle between.
11110         #  @param theFlag If True, the normal vector is defined by the two vectors cross,
11111         #                 if False, the opposite vector to the normal vector is used.
11112         #  @return Value of the angle between the given vectors in degrees.
11113         #
11114         #  @ref tui_angle_page "Example"
11115         @ManageTransactions("MeasuOp")
11116         def GetAngleVectors(self, theShape1, theShape2, theFlag = True):
11117             """
11118             Get angle between the given vectors in degrees.
11119
11120             Parameters:
11121                 theShape1,theShape2 Vectors to find angle between.
11122                 theFlag If True, the normal vector is defined by the two vectors cross,
11123                         if False, the opposite vector to the normal vector is used.
11124
11125             Returns:
11126                 Value of the angle between the given vectors in degrees.
11127             """
11128             anAngle = self.MeasuOp.GetAngleBtwVectors(theShape1, theShape2)
11129             if not theFlag:
11130                 anAngle = 360. - anAngle
11131             RaiseIfFailed("GetAngleVectors", self.MeasuOp)
11132             return anAngle
11133
11134         ## The same as GetAngleVectors, but the result is in radians.
11135         def GetAngleRadiansVectors(self, theShape1, theShape2, theFlag = True):
11136             """
11137             Get angle between the given vectors in radians.
11138
11139             Parameters:
11140                 theShape1,theShape2 Vectors to find angle between.
11141                 theFlag If True, the normal vector is defined by the two vectors cross,
11142                         if False, the opposite vector to the normal vector is used.
11143
11144             Returns:
11145                 Value of the angle between the given vectors in radians.
11146             """
11147             anAngle = self.GetAngleVectors(theShape1, theShape2, theFlag)*math.pi/180.
11148             return anAngle
11149
11150         ## @name Curve Curvature Measurement
11151         #  Methods for receiving radius of curvature of curves
11152         #  in the given point
11153         ## @{
11154
11155         ## Measure curvature of a curve at a point, set by parameter.
11156         #  @param theCurve a curve.
11157         #  @param theParam parameter.
11158         #  @return radius of curvature of \a theCurve.
11159         #
11160         #  @ref swig_todo "Example"
11161         @ManageTransactions("MeasuOp")
11162         def CurveCurvatureByParam(self, theCurve, theParam):
11163             """
11164             Measure curvature of a curve at a point, set by parameter.
11165
11166             Parameters:
11167                 theCurve a curve.
11168                 theParam parameter.
11169
11170             Returns:
11171                 radius of curvature of theCurve.
11172             """
11173             # Example: see GEOM_TestMeasures.py
11174             aCurv = self.MeasuOp.CurveCurvatureByParam(theCurve,theParam)
11175             RaiseIfFailed("CurveCurvatureByParam", self.MeasuOp)
11176             return aCurv
11177
11178         ## Measure curvature of a curve at a point.
11179         #  @param theCurve a curve.
11180         #  @param thePoint given point.
11181         #  @return radius of curvature of \a theCurve.
11182         #
11183         #  @ref swig_todo "Example"
11184         @ManageTransactions("MeasuOp")
11185         def CurveCurvatureByPoint(self, theCurve, thePoint):
11186             """
11187             Measure curvature of a curve at a point.
11188
11189             Parameters:
11190                 theCurve a curve.
11191                 thePoint given point.
11192
11193             Returns:
11194                 radius of curvature of theCurve.
11195             """
11196             aCurv = self.MeasuOp.CurveCurvatureByPoint(theCurve,thePoint)
11197             RaiseIfFailed("CurveCurvatureByPoint", self.MeasuOp)
11198             return aCurv
11199         ## @}
11200
11201         ## @name Surface Curvature Measurement
11202         #  Methods for receiving max and min radius of curvature of surfaces
11203         #  in the given point
11204         ## @{
11205
11206         ## Measure max radius of curvature of surface.
11207         #  @param theSurf the given surface.
11208         #  @param theUParam Value of U-parameter on the referenced surface.
11209         #  @param theVParam Value of V-parameter on the referenced surface.
11210         #  @return max radius of curvature of theSurf.
11211         #
11212         ## @ref swig_todo "Example"
11213         @ManageTransactions("MeasuOp")
11214         def MaxSurfaceCurvatureByParam(self, theSurf, theUParam, theVParam):
11215             """
11216             Measure max radius of curvature of surface.
11217
11218             Parameters:
11219                 theSurf the given surface.
11220                 theUParam Value of U-parameter on the referenced surface.
11221                 theVParam Value of V-parameter on the referenced surface.
11222
11223             Returns:
11224                 max radius of curvature of theSurf.
11225             """
11226             # Example: see GEOM_TestMeasures.py
11227             aSurf = self.MeasuOp.MaxSurfaceCurvatureByParam(theSurf,theUParam,theVParam)
11228             RaiseIfFailed("MaxSurfaceCurvatureByParam", self.MeasuOp)
11229             return aSurf
11230
11231         ## Measure max radius of curvature of surface in the given point
11232         #  @param theSurf the given surface.
11233         #  @param thePoint given point.
11234         #  @return max radius of curvature of theSurf.
11235         #
11236         ## @ref swig_todo "Example"
11237         @ManageTransactions("MeasuOp")
11238         def MaxSurfaceCurvatureByPoint(self, theSurf, thePoint):
11239             """
11240             Measure max radius of curvature of surface in the given point.
11241
11242             Parameters:
11243                 theSurf the given surface.
11244                 thePoint given point.
11245
11246             Returns:
11247                 max radius of curvature of theSurf.
11248             """
11249             aSurf = self.MeasuOp.MaxSurfaceCurvatureByPoint(theSurf,thePoint)
11250             RaiseIfFailed("MaxSurfaceCurvatureByPoint", self.MeasuOp)
11251             return aSurf
11252
11253         ## Measure min radius of curvature of surface.
11254         #  @param theSurf the given surface.
11255         #  @param theUParam Value of U-parameter on the referenced surface.
11256         #  @param theVParam Value of V-parameter on the referenced surface.
11257         #  @return min radius of curvature of theSurf.
11258         #
11259         ## @ref swig_todo "Example"
11260         @ManageTransactions("MeasuOp")
11261         def MinSurfaceCurvatureByParam(self, theSurf, theUParam, theVParam):
11262             """
11263             Measure min radius of curvature of surface.
11264
11265             Parameters:
11266                 theSurf the given surface.
11267                 theUParam Value of U-parameter on the referenced surface.
11268                 theVParam Value of V-parameter on the referenced surface.
11269
11270             Returns:
11271                 Min radius of curvature of theSurf.
11272             """
11273             aSurf = self.MeasuOp.MinSurfaceCurvatureByParam(theSurf,theUParam,theVParam)
11274             RaiseIfFailed("MinSurfaceCurvatureByParam", self.MeasuOp)
11275             return aSurf
11276
11277         ## Measure min radius of curvature of surface in the given point
11278         #  @param theSurf the given surface.
11279         #  @param thePoint given point.
11280         #  @return min radius of curvature of theSurf.
11281         #
11282         ## @ref swig_todo "Example"
11283         @ManageTransactions("MeasuOp")
11284         def MinSurfaceCurvatureByPoint(self, theSurf, thePoint):
11285             """
11286             Measure min radius of curvature of surface in the given point.
11287
11288             Parameters:
11289                 theSurf the given surface.
11290                 thePoint given point.
11291
11292             Returns:
11293                 Min radius of curvature of theSurf.
11294             """
11295             aSurf = self.MeasuOp.MinSurfaceCurvatureByPoint(theSurf,thePoint)
11296             RaiseIfFailed("MinSurfaceCurvatureByPoint", self.MeasuOp)
11297             return aSurf
11298         ## @}
11299
11300         ## Measure curvature radius of surface in the given point along the given direction.
11301         #  @param theSurf the given face.
11302         #  @param thePoint given point.
11303         #  @param theDirection given direction.
11304         #  @param theName Object name; when specified, this parameter is used
11305         #         for result publication in the study. Otherwise, if automatic
11306         #         publication is switched on, default value is used for result name.
11307         #
11308         #  @return New GEOM.GEOM_Object, containing vector of curvature of theSurf.
11309         #          The returned vector is codirectional with the normal to the face
11310         #          in the given point in case of positive curvature value
11311         #          and opposite to the normal in case of negative curvature.
11312         #          The normal of the returned vector is equal to the
11313         #          absolute value of the curvature radius.
11314         #          Null shape is returned in case of infinite radius
11315         #          (zero curvature), for example, in case of flat face.
11316         #
11317         ## @ref swig_CurvatureOnFace "Example"
11318         @ManageTransactions("MeasuOp")
11319         def CurvatureOnFace(self, theSurf, thePoint, theDirection, theName=None):
11320             """
11321             Measure curvature radius of surface in the given point along the given direction.
11322
11323             Parameters:
11324                 theSurf the given face.
11325                 thePoint given point.
11326                 theDirection given direction.
11327                 theName Object name; when specified, this parameter is used
11328                         for result publication in the study. Otherwise, if automatic
11329                         publication is switched on, default value is used for result name.
11330
11331             Returns:
11332                 New GEOM.GEOM_Object, containing vector of curvature of theSurf.
11333                 The returned vector is codirectional with the normal to the face
11334                 in the given point in case of positive curvature value
11335                 and opposite to the normal in case of negative curvature.
11336                 The normal of the returned vector is equal to the
11337                 absolute value of the curvature radius.
11338                 Null shape is returned in case of infinite radius
11339                 (zero curvature), for example, in case of flat face.
11340
11341             Example of usage:
11342                 curvature_1 = geompy.CurvatureOnFace(Face_1, Vertex_1, OX)
11343             """
11344             aVec = self.MeasuOp.SurfaceCurvatureByPointAndDirection(theSurf,thePoint,theDirection)
11345             if self.MeasuOp.GetErrorCode() != "ZERO_CURVATURE":
11346                 RaiseIfFailed("CurvatureOnFace", self.MeasuOp)
11347                 self._autoPublish(aVec, theName, "curvature")
11348             return aVec
11349
11350         ## Convert X,Y,Z points coordinates to UV parameters on the given surface.
11351         #  @param theSurf the given face. It can be also a shell or a compound with one face.
11352         #  @param theXYZlist float list of size 3*N where N is the number of points
11353         #                    for which we want their U,V coordinates.
11354         #                    If the user enters a list of size not divisible by 3
11355         #                    an exception will be thrown.
11356         #  @param theIsNormalized if True, the returned parameters will be in range [0, 1].
11357         #
11358         #  @return list of float of size 2*N.
11359         #
11360         #  @ref tui_xyz_to_uv_page "Example"
11361         @ManageTransactions("MeasuOp")
11362         def XYZtoUV(self, theSurf, theXYZlist, theIsNormalized = True):
11363             """
11364             Convert X,Y,Z points coordinates to UV parameters on the given surface.
11365
11366             Parameters:
11367                 theSurf the given face. It can be also a shell or a compound with one face.
11368                 theXYZlist float list of size 3*N where N is the number of points
11369                            for which we want their U,V coordinates.
11370                            If the user enters a list of size not divisible by 3
11371                            an exception will be thrown.
11372                 theIsNormalized if True, the returned parameters will be in range [0, 1].
11373
11374             Returns:
11375                 list of float of size 2*N.
11376
11377             Example of usage:
11378                 [u1,v1, u2,v2] = geompy.XYZtoUV(Face_1, [0,0,0, 0,10,10])
11379             """
11380             aUVlist = self.MeasuOp.XYZtoUV(theSurf, theXYZlist, theIsNormalized)
11381             RaiseIfFailed("XYZtoUV", self.MeasuOp)
11382             return aUVlist
11383
11384         ## Convert UV parameters on the given surface to 3D points coordinates.
11385         #  @param theSurf the given face. It can be also a shell or a compound with one face.
11386         #  @param theUVlist float list of size 2*N where N is the number of points
11387         #                   for which we want their X,Y,Z coordinates.
11388         #                   If the user enters a list of non-even size
11389         #                   an exception will be thrown.
11390         #  @param theIsNormalized if True, the input parameters are expected to be in range [0, 1].
11391         #
11392         #  @return list of float of size 3*N.
11393         #
11394         #  @ref tui_xyz_to_uv_page "Example"
11395         @ManageTransactions("MeasuOp")
11396         def UVtoXYZ(self, theSurf, theUVlist, theIsNormalized = True):
11397             """
11398             Convert UV parameters on the given surface to 3D points coordinates.
11399
11400             Parameters:
11401                 theSurf the given face. It can be also a shell or a compound with one face.
11402                 theUVlist float list of size 2*N where N is the number of points
11403                           for which we want their X,Y,Z coordinates.
11404                           If the user enters a list of non-even size
11405                           an exception will be thrown.
11406                 theIsNormalized if True, the input parameters are expected to be in range [0, 1].
11407
11408             Returns:
11409                 list of float of size 3*N.
11410
11411             Example of usage:
11412                 [x1,y1,z1, x2,y2,z2] = geompy.UVtoXYZ(Face_1, [0,0, 10,10])
11413             """
11414             aXYZlist = self.MeasuOp.UVtoXYZ(theSurf, theUVlist, theIsNormalized)
11415             RaiseIfFailed("UVtoXYZ", self.MeasuOp)
11416             return aXYZlist
11417
11418         ## Get min and max tolerances of sub-shapes of theShape
11419         #  @param theShape Shape, to get tolerances of.
11420         #  @return [FaceMin,FaceMax, EdgeMin,EdgeMax, VertMin,VertMax]\n
11421         #  FaceMin,FaceMax: Min and max tolerances of the faces.\n
11422         #  EdgeMin,EdgeMax: Min and max tolerances of the edges.\n
11423         #  VertMin,VertMax: Min and max tolerances of the vertices.
11424         #
11425         #  @ref tui_tolerance_page "Example"
11426         @ManageTransactions("MeasuOp")
11427         def Tolerance(self,theShape):
11428             """
11429             Get min and max tolerances of sub-shapes of theShape
11430
11431             Parameters:
11432                 theShape Shape, to get tolerances of.
11433
11434             Returns:
11435                 [FaceMin,FaceMax, EdgeMin,EdgeMax, VertMin,VertMax]
11436                  FaceMin,FaceMax: Min and max tolerances of the faces.
11437                  EdgeMin,EdgeMax: Min and max tolerances of the edges.
11438                  VertMin,VertMax: Min and max tolerances of the vertices.
11439             """
11440             # Example: see GEOM_TestMeasures.py
11441             aTuple = self.MeasuOp.GetTolerance(theShape)
11442             RaiseIfFailed("GetTolerance", self.MeasuOp)
11443             return aTuple
11444
11445         ## Obtain description of the given shape (number of sub-shapes of each type)
11446         #  @param theShape Shape to be described.
11447         #  @return Description of the given shape.
11448         #
11449         #  @ref tui_whatis_page "Example"
11450         @ManageTransactions("MeasuOp")
11451         def WhatIs(self,theShape):
11452             """
11453             Obtain description of the given shape (number of sub-shapes of each type)
11454
11455             Parameters:
11456                 theShape Shape to be described.
11457
11458             Returns:
11459                 Description of the given shape.
11460             """
11461             # Example: see GEOM_TestMeasures.py
11462             aDescr = self.MeasuOp.WhatIs(theShape)
11463             RaiseIfFailed("WhatIs", self.MeasuOp)
11464             return aDescr
11465
11466         ## Obtain quantity of shapes of the given type in \a theShape.
11467         #  If \a theShape is of type \a theType, it is also counted.
11468         #  @param theShape Shape to be described.
11469         #  @param theType the given ShapeType().
11470         #  @return Quantity of shapes of type \a theType in \a theShape.
11471         #
11472         #  @ref tui_measurement_tools_page "Example"
11473         def NbShapes (self, theShape, theType):
11474             """
11475             Obtain quantity of shapes of the given type in theShape.
11476             If theShape is of type theType, it is also counted.
11477
11478             Parameters:
11479                 theShape Shape to be described.
11480                 theType the given geompy.ShapeType
11481
11482             Returns:
11483                 Quantity of shapes of type theType in theShape.
11484             """
11485             # Example: see GEOM_TestMeasures.py
11486             listSh = self.SubShapeAllIDs(theShape, theType)
11487             Nb = len(listSh)
11488             return Nb
11489
11490         ## Obtain quantity of shapes of each type in \a theShape.
11491         #  The \a theShape is also counted.
11492         #  @param theShape Shape to be described.
11493         #  @return Dictionary of ShapeType() with bound quantities of shapes.
11494         #
11495         #  @ref tui_measurement_tools_page "Example"
11496         def ShapeInfo (self, theShape):
11497             """
11498             Obtain quantity of shapes of each type in theShape.
11499             The theShape is also counted.
11500
11501             Parameters:
11502                 theShape Shape to be described.
11503
11504             Returns:
11505                 Dictionary of geompy.ShapeType with bound quantities of shapes.
11506             """
11507             # Example: see GEOM_TestMeasures.py
11508             aDict = {}
11509             for typeSh in self.ShapeType:
11510                 if typeSh in ( "AUTO", "SHAPE" ): continue
11511                 listSh = self.SubShapeAllIDs(theShape, self.ShapeType[typeSh])
11512                 Nb = len(listSh)
11513                 aDict[typeSh] = Nb
11514                 pass
11515             return aDict
11516
11517         def GetCreationInformation(self, theShape):
11518             res = ''
11519             infos = theShape.GetCreationInformation()
11520             for info in infos:
11521                 # operationName
11522                 opName = info.operationName
11523                 if not opName: opName = "no info available"
11524                 if res: res += "\n"
11525                 res += "Operation: " + opName
11526                 # parameters
11527                 for parVal in info.params:
11528                     res += "\n \t%s = %s" % ( parVal.name, parVal.value )
11529             return res
11530
11531         ## Get a point, situated at the centre of mass of theShape.
11532         #  @param theShape Shape to define centre of mass of.
11533         #  @param theName Object name; when specified, this parameter is used
11534         #         for result publication in the study. Otherwise, if automatic
11535         #         publication is switched on, default value is used for result name.
11536         #
11537         #  @return New GEOM.GEOM_Object, containing the created point.
11538         #
11539         #  @ref tui_center_of_mass_page "Example"
11540         @ManageTransactions("MeasuOp")
11541         def MakeCDG(self, theShape, theName=None):
11542             """
11543             Get a point, situated at the centre of mass of theShape.
11544
11545             Parameters:
11546                 theShape Shape to define centre of mass of.
11547                 theName Object name; when specified, this parameter is used
11548                         for result publication in the study. Otherwise, if automatic
11549                         publication is switched on, default value is used for result name.
11550
11551             Returns:
11552                 New GEOM.GEOM_Object, containing the created point.
11553             """
11554             # Example: see GEOM_TestMeasures.py
11555             anObj = self.MeasuOp.GetCentreOfMass(theShape)
11556             RaiseIfFailed("GetCentreOfMass", self.MeasuOp)
11557             self._autoPublish(anObj, theName, "centerOfMass")
11558             return anObj
11559
11560         ## Get a vertex sub-shape by index.
11561         #  @param theShape Shape to find sub-shape.
11562         #  @param theIndex Index to find vertex by this index (starting from zero)
11563         #  @param theUseOri To consider edge/wire orientation or not
11564         #  @param theName Object name; when specified, this parameter is used
11565         #         for result publication in the study. Otherwise, if automatic
11566         #         publication is switched on, default value is used for result name.
11567         #
11568         #  @return New GEOM.GEOM_Object, containing the created vertex.
11569         #
11570         #  @ref tui_measurement_tools_page "Example"
11571         @ManageTransactions("MeasuOp")
11572         def GetVertexByIndex(self, theShape, theIndex, theUseOri=True, theName=None):
11573             """
11574             Get a vertex sub-shape by index.
11575
11576             Parameters:
11577                 theShape Shape to find sub-shape.
11578                 theIndex Index to find vertex by this index (starting from zero)
11579                 theUseOri To consider edge/wire orientation or not
11580                 theName Object name; when specified, this parameter is used
11581                         for result publication in the study. Otherwise, if automatic
11582                         publication is switched on, default value is used for result name.
11583
11584             Returns:
11585                 New GEOM.GEOM_Object, containing the created vertex.
11586             """
11587             # Example: see GEOM_TestMeasures.py
11588             if isinstance( theUseOri, str ): # theUseOri was inserted before theName
11589                 theUseOri, theName = True, theUseOri
11590             anObj = self.MeasuOp.GetVertexByIndex(theShape, theIndex, theUseOri)
11591             RaiseIfFailed("GetVertexByIndex", self.MeasuOp)
11592             self._autoPublish(anObj, theName, "vertex")
11593             return anObj
11594
11595         ## Get the first vertex of wire/edge depended orientation.
11596         #  @param theShape Shape to find first vertex.
11597         #  @param theName Object name; when specified, this parameter is used
11598         #         for result publication in the study. Otherwise, if automatic
11599         #         publication is switched on, default value is used for result name.
11600         #
11601         #  @return New GEOM.GEOM_Object, containing the created vertex.
11602         #
11603         #  @ref tui_measurement_tools_page "Example"
11604         def GetFirstVertex(self, theShape, theName=None):
11605             """
11606             Get the first vertex of wire/edge depended orientation.
11607
11608             Parameters:
11609                 theShape Shape to find first vertex.
11610                 theName Object name; when specified, this parameter is used
11611                         for result publication in the study. Otherwise, if automatic
11612                         publication is switched on, default value is used for result name.
11613
11614             Returns:
11615                 New GEOM.GEOM_Object, containing the created vertex.
11616             """
11617             # Example: see GEOM_TestMeasures.py
11618             # note: auto-publishing is done in self.GetVertexByIndex()
11619             return self.GetVertexByIndex(theShape, 0, True, theName)
11620
11621         ## Get the last vertex of wire/edge depended orientation.
11622         #  @param theShape Shape to find last vertex.
11623         #  @param theName Object name; when specified, this parameter is used
11624         #         for result publication in the study. Otherwise, if automatic
11625         #         publication is switched on, default value is used for result name.
11626         #
11627         #  @return New GEOM.GEOM_Object, containing the created vertex.
11628         #
11629         #  @ref tui_measurement_tools_page "Example"
11630         def GetLastVertex(self, theShape, theName=None):
11631             """
11632             Get the last vertex of wire/edge depended orientation.
11633
11634             Parameters:
11635                 theShape Shape to find last vertex.
11636                 theName Object name; when specified, this parameter is used
11637                         for result publication in the study. Otherwise, if automatic
11638                         publication is switched on, default value is used for result name.
11639
11640             Returns:
11641                 New GEOM.GEOM_Object, containing the created vertex.
11642             """
11643             # Example: see GEOM_TestMeasures.py
11644             nb_vert =  self.NumberOfSubShapes(theShape, self.ShapeType["VERTEX"])
11645             # note: auto-publishing is done in self.GetVertexByIndex()
11646             return self.GetVertexByIndex(theShape, (nb_vert-1), True, theName)
11647
11648         ## Get a normale to the given face. If the point is not given,
11649         #  the normale is calculated at the center of mass.
11650         #  @param theFace Face to define normale of.
11651         #  @param theOptionalPoint Point to compute the normale at.
11652         #  @param theName Object name; when specified, this parameter is used
11653         #         for result publication in the study. Otherwise, if automatic
11654         #         publication is switched on, default value is used for result name.
11655         #
11656         #  @return New GEOM.GEOM_Object, containing the created vector.
11657         #
11658         #  @ref swig_todo "Example"
11659         @ManageTransactions("MeasuOp")
11660         def GetNormal(self, theFace, theOptionalPoint = None, theName=None):
11661             """
11662             Get a normale to the given face. If the point is not given,
11663             the normale is calculated at the center of mass.
11664
11665             Parameters:
11666                 theFace Face to define normale of.
11667                 theOptionalPoint Point to compute the normale at.
11668                 theName Object name; when specified, this parameter is used
11669                         for result publication in the study. Otherwise, if automatic
11670                         publication is switched on, default value is used for result name.
11671
11672             Returns:
11673                 New GEOM.GEOM_Object, containing the created vector.
11674             """
11675             # Example: see GEOM_TestMeasures.py
11676             anObj = self.MeasuOp.GetNormal(theFace, theOptionalPoint)
11677             RaiseIfFailed("GetNormal", self.MeasuOp)
11678             self._autoPublish(anObj, theName, "normal")
11679             return anObj
11680
11681         ## Print shape errors obtained from CheckShape.
11682         #  @param theShape Shape that was checked.
11683         #  @param theShapeErrors the shape errors obtained by CheckShape.
11684         #  @param theReturnStatus If 0 the description of problem is printed.
11685         #                         If 1 the description of problem is returned.
11686         #  @return If theReturnStatus is equal to 1 the description is returned.
11687         #          Otherwise doesn't return anything.
11688         #
11689         #  @ref tui_check_shape_page "Example"
11690         @ManageTransactions("MeasuOp")
11691         def PrintShapeErrors(self, theShape, theShapeErrors, theReturnStatus = 0):
11692             """
11693             Print shape errors obtained from CheckShape.
11694
11695             Parameters:
11696                 theShape Shape that was checked.
11697                 theShapeErrors the shape errors obtained by CheckShape.
11698                 theReturnStatus If 0 the description of problem is printed.
11699                                 If 1 the description of problem is returned.
11700
11701             Returns:
11702                 If theReturnStatus is equal to 1 the description is returned.
11703                   Otherwise doesn't return anything.
11704             """
11705             # Example: see GEOM_TestMeasures.py
11706             Descr = self.MeasuOp.PrintShapeErrors(theShape, theShapeErrors)
11707             if theReturnStatus == 1:
11708                 return Descr
11709             print(Descr)
11710             pass
11711
11712         ## Check a topology of the given shape.
11713         #  @param theShape Shape to check validity of.
11714         #  @param theIsCheckGeom If FALSE, only the shape's topology will be checked, \n
11715         #                        if TRUE, the shape's geometry will be checked also.
11716         #  @param theReturnStatus If 0 and if theShape is invalid, a description
11717         #                         of problem is printed.
11718         #                         If 1 isValid flag and the description of
11719         #                         problem is returned.
11720         #                         If 2 isValid flag and the list of error data
11721         #                         is returned.
11722         #  @return TRUE, if the shape "seems to be valid".
11723         #          If theShape is invalid, prints a description of problem.
11724         #          If theReturnStatus is equal to 1 the description is returned
11725         #          along with IsValid flag.
11726         #          If theReturnStatus is equal to 2 the list of error data is
11727         #          returned along with IsValid flag.
11728         #
11729         #  @ref tui_check_shape_page "Example"
11730         @ManageTransactions("MeasuOp")
11731         def CheckShape(self,theShape, theIsCheckGeom = 0, theReturnStatus = 0):
11732             """
11733             Check a topology of the given shape.
11734
11735             Parameters:
11736                 theShape Shape to check validity of.
11737                 theIsCheckGeom If FALSE, only the shape's topology will be checked,
11738                                if TRUE, the shape's geometry will be checked also.
11739                 theReturnStatus If 0 and if theShape is invalid, a description
11740                                 of problem is printed.
11741                                 If 1 IsValid flag and the description of
11742                                 problem is returned.
11743                                 If 2 IsValid flag and the list of error data
11744                                 is returned.
11745
11746             Returns:
11747                 TRUE, if the shape "seems to be valid".
11748                 If theShape is invalid, prints a description of problem.
11749                 If theReturnStatus is equal to 1 the description is returned
11750                 along with IsValid flag.
11751                 If theReturnStatus is equal to 2 the list of error data is
11752                 returned along with IsValid flag.
11753             """
11754             # Example: see GEOM_TestMeasures.py
11755             if theIsCheckGeom:
11756                 (IsValid, ShapeErrors) = self.MeasuOp.CheckShapeWithGeometry(theShape)
11757                 RaiseIfFailed("CheckShapeWithGeometry", self.MeasuOp)
11758             else:
11759                 (IsValid, ShapeErrors) = self.MeasuOp.CheckShape(theShape)
11760                 RaiseIfFailed("CheckShape", self.MeasuOp)
11761             if IsValid == 0:
11762                 if theReturnStatus == 0:
11763                     Descr = self.MeasuOp.PrintShapeErrors(theShape, ShapeErrors)
11764                     print(Descr)
11765             if theReturnStatus == 1:
11766               Descr = self.MeasuOp.PrintShapeErrors(theShape, ShapeErrors)
11767               return (IsValid, Descr)
11768             elif theReturnStatus == 2:
11769               return (IsValid, ShapeErrors)
11770             return IsValid
11771
11772         ## Detect self-intersections in the given shape.
11773         #  @param theShape Shape to check.
11774         #  @param theCheckLevel is the level of self-intersection check.
11775         #         Possible input values are:
11776         #         - GEOM.SI_V_V(0) - only V/V interferences
11777         #         - GEOM.SI_V_E(1) - V/V and V/E interferences
11778         #         - GEOM.SI_E_E(2) - V/V, V/E and E/E interferences
11779         #         - GEOM.SI_V_F(3) - V/V, V/E, E/E and V/F interferences
11780         #         - GEOM.SI_E_F(4) - V/V, V/E, E/E, V/F and E/F interferences
11781         #         - GEOM.SI_ALL(5) - all interferences.
11782         #  @return TRUE, if the shape contains no self-intersections.
11783         #
11784         #  @ref tui_check_self_intersections_page "Example"
11785         @ManageTransactions("MeasuOp")
11786         def CheckSelfIntersections(self, theShape, theCheckLevel = GEOM.SI_ALL):
11787             """
11788             Detect self-intersections in the given shape.
11789
11790             Parameters:
11791                 theShape Shape to check.
11792                 theCheckLevel is the level of self-intersection check.
11793                   Possible input values are:
11794                    - GEOM.SI_V_V(0) - only V/V interferences
11795                    - GEOM.SI_V_E(1) - V/V and V/E interferences
11796                    - GEOM.SI_E_E(2) - V/V, V/E and E/E interferences
11797                    - GEOM.SI_V_F(3) - V/V, V/E, E/E and V/F interferences
11798                    - GEOM.SI_E_F(4) - V/V, V/E, E/E, V/F and E/F interferences
11799                    - GEOM.SI_ALL(5) - all interferences.
11800  
11801             Returns:
11802                 TRUE, if the shape contains no self-intersections.
11803             """
11804             # Example: see GEOM_TestMeasures.py
11805             (IsValid, Pairs) = self.MeasuOp.CheckSelfIntersections(theShape, EnumToLong(theCheckLevel))
11806             RaiseIfFailed("CheckSelfIntersections", self.MeasuOp)
11807             return IsValid
11808
11809         ## Detect self-intersections of the given shape with algorithm based on mesh intersections.
11810         #  @param theShape Shape to check.
11811         #  @param theDeflection Linear deflection coefficient that specifies quality of tessellation:
11812         #         - if \a theDeflection <= 0, default deflection 0.001 is used
11813         #  @param theTolerance Specifies a distance between sub-shapes used for detecting gaps:
11814         #         - if \a theTolerance <= 0, algorithm detects intersections (default behavior)
11815         #         - if \a theTolerance > 0, algorithm detects gaps
11816         #  @return TRUE, if the shape contains no self-intersections.
11817         #
11818         #  @ref tui_check_self_intersections_fast_page "Example"
11819         @ManageTransactions("MeasuOp")
11820         def CheckSelfIntersectionsFast(self, theShape, theDeflection = 0.001, theTolerance = 0.0):
11821             """
11822             Detect self-intersections of the given shape with algorithm based on mesh intersections.
11823
11824             Parameters:
11825                 theShape Shape to check.
11826                 theDeflection Linear deflection coefficient that specifies quality of tessellation:
11827                     - if theDeflection <= 0, default deflection 0.001 is used
11828                 theTolerance Specifies a distance between shapes used for detecting gaps:
11829                     - if theTolerance <= 0, algorithm detects intersections (default behavior)
11830                     - if theTolerance > 0, algorithm detects gaps
11831  
11832             Returns:
11833                 TRUE, if the shape contains no self-intersections.
11834             """
11835             # Example: see GEOM_TestMeasures.py
11836             (IsValid, Pairs) = self.MeasuOp.CheckSelfIntersectionsFast(theShape, theDeflection, theTolerance)
11837             RaiseIfFailed("CheckSelfIntersectionsFast", self.MeasuOp)
11838             return IsValid
11839
11840         ## Check boolean and partition operations arguments.
11841         #  @param theShape the argument of an operation to be checked
11842         #  @return TRUE if the argument is valid for a boolean or partition
11843         #          operation; FALSE otherwise.
11844         @ManageTransactions("MeasuOp")
11845         def CheckBOPArguments(self, theShape):
11846             """
11847             Check boolean and partition operations arguments.
11848
11849             Parameters:
11850                 theShape the argument of an operation to be checked
11851
11852             Returns:
11853                 TRUE if the argument is valid for a boolean or partition
11854                 operation; FALSE otherwise.
11855             """
11856             return self.MeasuOp.CheckBOPArguments(theShape)
11857
11858         ## Detect intersections of the given shapes with algorithm based on mesh intersections.
11859         #  @param theShape1 First source object
11860         #  @param theShape2 Second source object
11861         #  @param theTolerance Specifies a distance between shapes used for detecting gaps:
11862         #         - if \a theTolerance <= 0, algorithm detects intersections (default behavior)
11863         #         - if \a theTolerance > 0, algorithm detects gaps
11864         #  @param theDeflection Linear deflection coefficient that specifies quality of tessellation:
11865         #         - if \a theDeflection <= 0, default deflection 0.001 is used
11866         #  @return TRUE, if there are intersections (gaps) between source shapes
11867         #  @return List of sub-shapes IDs from 1st shape that localize intersection.
11868         #  @return List of sub-shapes IDs from 2nd shape that localize intersection.
11869         #
11870         #  @ref tui_fast_intersection_page "Example"
11871         @ManageTransactions("MeasuOp")
11872         def FastIntersect(self, theShape1, theShape2, theTolerance = 0.0, theDeflection = 0.001):
11873             """
11874             Detect intersections of the given shapes with algorithm based on mesh intersections.
11875
11876             Parameters:
11877                 theShape1 First source object
11878                 theShape2 Second source object
11879                 theTolerance Specifies a distance between shapes used for detecting gaps:
11880                     - if theTolerance <= 0, algorithm detects intersections (default behavior)
11881                     - if theTolerance > 0, algorithm detects gaps
11882                 theDeflection Linear deflection coefficient that specifies quality of tessellation:
11883                     - if theDeflection <= 0, default deflection 0.001 is used
11884  
11885             Returns:
11886                 TRUE, if there are intersections (gaps) between source shapes
11887                 List of sub-shapes IDs from 1st shape that localize intersection.
11888                 List of sub-shapes IDs from 2nd shape that localize intersection.
11889             """
11890             # Example: see GEOM_TestMeasures.py
11891             IsOk, Res1, Res2 = self.MeasuOp.FastIntersect(theShape1, theShape2, theTolerance, theDeflection)
11892             RaiseIfFailed("FastIntersect", self.MeasuOp)
11893             return IsOk, Res1, Res2
11894
11895         ## Get position (LCS) of theShape.
11896         #
11897         #  Origin of the LCS is situated at the shape's center of mass.
11898         #  Axes of the LCS are obtained from shape's location or,
11899         #  if the shape is a planar face, from position of its plane.
11900         #
11901         #  @param theShape Shape to calculate position of.
11902         #  @return [Ox,Oy,Oz, Zx,Zy,Zz, Xx,Xy,Xz].
11903         #          Ox,Oy,Oz: Coordinates of shape's LCS origin.
11904         #          Zx,Zy,Zz: Coordinates of shape's LCS normal(main) direction.
11905         #          Xx,Xy,Xz: Coordinates of shape's LCS X direction.
11906         #
11907         #  @ref swig_todo "Example"
11908         @ManageTransactions("MeasuOp")
11909         def GetPosition(self,theShape):
11910             """
11911             Get position (LCS) of theShape.
11912             Origin of the LCS is situated at the shape's center of mass.
11913             Axes of the LCS are obtained from shape's location or,
11914             if the shape is a planar face, from position of its plane.
11915
11916             Parameters:
11917                 theShape Shape to calculate position of.
11918
11919             Returns:
11920                 [Ox,Oy,Oz, Zx,Zy,Zz, Xx,Xy,Xz].
11921                  Ox,Oy,Oz: Coordinates of shape's LCS origin.
11922                  Zx,Zy,Zz: Coordinates of shape's LCS normal(main) direction.
11923                  Xx,Xy,Xz: Coordinates of shape's LCS X direction.
11924             """
11925             # Example: see GEOM_TestMeasures.py
11926             aTuple = self.MeasuOp.GetPosition(theShape)
11927             RaiseIfFailed("GetPosition", self.MeasuOp)
11928             return aTuple
11929
11930         ## Get kind of theShape.
11931         #
11932         #  @param theShape Shape to get a kind of.
11933         #  @return Returns a kind of shape in terms of <VAR>GEOM.GEOM_IKindOfShape.shape_kind</VAR> enumeration
11934         #          and a list of parameters, describing the shape.
11935         #  @note  Concrete meaning of each value, returned via \a theIntegers
11936         #         or \a theDoubles list depends on the kind() of the shape.
11937         #
11938         #  @ref swig_todo "Example"
11939         @ManageTransactions("MeasuOp")
11940         def KindOfShape(self,theShape):
11941             """
11942             Get kind of theShape.
11943
11944             Parameters:
11945                 theShape Shape to get a kind of.
11946
11947             Returns:
11948                 a kind of shape in terms of GEOM_IKindOfShape.shape_kind enumeration
11949                     and a list of parameters, describing the shape.
11950             Note:
11951                 Concrete meaning of each value, returned via theIntegers
11952                 or theDoubles list depends on the geompy.kind of the shape
11953             """
11954             # Example: see GEOM_TestMeasures.py
11955             aRoughTuple = self.MeasuOp.KindOfShape(theShape)
11956             RaiseIfFailed("KindOfShape", self.MeasuOp)
11957
11958             aKind  = aRoughTuple[0]
11959             anInts = aRoughTuple[1]
11960             aDbls  = aRoughTuple[2]
11961
11962             # Now there is no exception from this rule:
11963             aKindTuple = [aKind] + aDbls + anInts
11964
11965             # If they are we will regroup parameters for such kind of shape.
11966             # For example:
11967             #if aKind == kind.SOME_KIND:
11968             #    #  SOME_KIND     int int double int double double
11969             #    aKindTuple = [aKind, anInts[0], anInts[1], aDbls[0], anInts[2], aDbls[1], aDbls[2]]
11970             if aKind == self.kind.CRV_BSPLINE:
11971                aKindTuple = [aKind] + anInts[:6] + aDbls + anInts[6:]
11972             elif aKind == self.kind.CRV_BEZIER:
11973                aKindTuple = [aKind] + anInts[:2] + aDbls + anInts[2:]
11974
11975             return aKindTuple
11976
11977         ## The function takes a single face with holes and returns a list of faces,
11978         #  first of them is the original face without holes, and the other faces are placed
11979         #  on the same surface as the original face but bounded by each hole wire.
11980         #  If the original face has no holes, it will be returned as an output
11981         #  @param theShape Face to perform operation on.
11982         #
11983         #  @return GEOM.ListOfGO, list created faces, where first of them is the original face without holes
11984         @ManageTransactions("MeasuOp")
11985         def PatchFace(self, theShape):
11986             """
11987             The function takes a single face with holes and returns a list of faces,
11988             first of them is the original face without holes, and the other faces are placed
11989             on the same surface as the original face but bounded by each hole wire.
11990             If the original face has no holes, it will be returned as an output
11991
11992             Parameters:
11993                 theShape  Face to perform operation on.
11994
11995             Returns:
11996                 GEOM.ListOfGO, list created faces, where first of them is the original face without holes
11997
11998             Example of usage:
11999                 Circle_1 = geompy.MakeCircle(None, None, 190)
12000                 Circle_2 = geompy.MakeCircle(None, None, 100)
12001                 Face_1 = geompy.MakeFaceWires([Circle_1], 1)
12002                 Face_2 = geompy.MakeFaceWires([Circle_2], 1)
12003                 Cut_1 = geompy.MakeCutList(Face_1, [Face_2], True)
12004                 faces = geompy.PatchFace(Cut_1)
12005             """
12006             aList = self.MeasuOp.PatchFace(theShape)
12007             RaiseIfFailed("PatchFace", self.MeasuOp)
12008             return aList
12009
12010         ## Returns the string that describes if the shell is good for solid.
12011         #  This is a support method for MakeSolid.
12012         #
12013         #  @param theShell the shell to be checked.
12014         #  @return Returns a string that describes the shell validity for
12015         #          solid construction.
12016         @ManageTransactions("MeasuOp")
12017         def _IsGoodForSolid(self, theShell):
12018             """
12019             Returns the string that describes if the shell is good for solid.
12020             This is a support method for MakeSolid.
12021
12022             Parameter:
12023                 theShell the shell to be checked.
12024
12025             Returns:
12026                 Returns a string that describes the shell validity for
12027                 solid construction.
12028             """
12029             aDescr = self.MeasuOp.IsGoodForSolid(theShell)
12030             return aDescr
12031
12032         ## Obtain a canonical recognition interface.
12033         #  @return An instance of
12034         #          @ref canonicalrecognition.CanonicalRecognition "CanonicalRecognition" interface
12035         #
12036         #  @ref tui_3dsketcher_page "Example"
12037         def CanonicalRecognition (self):
12038             """
12039             Obtain a canonical recognition interface.
12040
12041             Example of usage:
12042                 cr = geompy.CanonicalRecognition()
12043                 cr.isLine(aLine, tolerance)
12044             """
12045             cr = CanonicalRecognition (self)
12046             return cr
12047
12048         # end of l2_measure
12049         ## @}
12050
12051         ## @addtogroup l2_import_export
12052         ## @{
12053
12054         ## Import a shape from the BREP, IGES, STEP or other file
12055         #  (depends on given format) with given name.
12056         #
12057         #  Note: this function is deprecated, it is kept for backward compatibility only
12058         #  Use Import<FormatName> instead, where <FormatName> is a name of desirable format to import.
12059         #
12060         #  @param theFileName The file, containing the shape.
12061         #  @param theFormatName Specify format for the file reading.
12062         #         Available formats can be obtained with InsertOp.ImportTranslators() method.
12063         #         If format 'IGES_SCALE' is used instead of 'IGES' or
12064         #            format 'STEP_SCALE' is used instead of 'STEP',
12065         #            length unit will be set to 'meter' and result model will be scaled.
12066         #  @param theName Object name; when specified, this parameter is used
12067         #         for result publication in the study. Otherwise, if automatic
12068         #         publication is switched on, default value is used for result name.
12069         #
12070         #  @return New GEOM.GEOM_Object, containing the imported shape.
12071         #          If material names are imported it returns the list of
12072         #          objects. The first one is the imported object followed by
12073         #          material groups.
12074         #  @note Auto publishing is allowed for the shape itself. Imported
12075         #        material groups are not automatically published.
12076         #
12077         #  @ref swig_Import_Export "Example"
12078         @ManageTransactions("InsertOp")
12079         def ImportFile(self, theFileName, theFormatName, theName=None):
12080             """
12081             Import a shape from the BREP, IGES, STEP or other file
12082             (depends on given format) with given name.
12083
12084             Note: this function is deprecated, it is kept for backward compatibility only
12085             Use Import<FormatName> instead, where <FormatName> is a name of desirable format to import.
12086
12087             Parameters: 
12088                 theFileName The file, containing the shape.
12089                 theFormatName Specify format for the file reading.
12090                     Available formats can be obtained with geompy.InsertOp.ImportTranslators() method.
12091                     If format 'IGES_SCALE' is used instead of 'IGES' or
12092                        format 'STEP_SCALE' is used instead of 'STEP',
12093                        length unit will be set to 'meter' and result model will be scaled.
12094                 theName Object name; when specified, this parameter is used
12095                         for result publication in the study. Otherwise, if automatic
12096                         publication is switched on, default value is used for result name.
12097
12098             Returns:
12099                 New GEOM.GEOM_Object, containing the imported shape.
12100                 If material names are imported it returns the list of
12101                 objects. The first one is the imported object followed by
12102                 material groups.
12103             Note:
12104                 Auto publishing is allowed for the shape itself. Imported
12105                 material groups are not automatically published.
12106             """
12107             # Example: see GEOM_TestOthers.py
12108             print("""
12109             WARNING: Function ImportFile is deprecated, use Import<FormatName> instead,
12110             where <FormatName> is a name of desirable format for importing.
12111             """)
12112             aListObj = self.InsertOp.ImportFile(theFileName, theFormatName)
12113             RaiseIfFailed("ImportFile", self.InsertOp)
12114             aNbObj = len(aListObj)
12115             if aNbObj > 0:
12116                 self._autoPublish(aListObj[0], theName, "imported")
12117             if aNbObj == 1:
12118                 return aListObj[0]
12119             return aListObj
12120
12121         ## Deprecated analog of ImportFile()
12122         def Import(self, theFileName, theFormatName, theName=None):
12123             """
12124             Deprecated analog of geompy.ImportFile, kept for backward compatibility only.
12125             """
12126             # note: auto-publishing is done in self.ImportFile()
12127             return self.ImportFile(theFileName, theFormatName, theName)
12128
12129         ## Read a shape from the binary stream, containing its bounding representation (BRep).
12130         #
12131         #  @note As the byte-stream representing the shape data can be quite large, this method
12132         #  is not automatically dumped to the Python script with the DumpStudy functionality;
12133         #  so please use this method carefully, only for strong reasons.
12134         #  
12135         #  @note GEOM.GEOM_Object.GetShapeStream() method can be used to obtain the shape's
12136         #  data stream.
12137         #
12138         #  @param theStream The BRep binary stream.
12139         #  @param theName Object name; when specified, this parameter is used
12140         #         for result publication in the study. Otherwise, if automatic
12141         #         publication is switched on, default value is used for result name.
12142         #
12143         #  @return New GEOM_Object, containing the shape, read from theStream.
12144         #
12145         #  @ref swig_Import_Export "Example"
12146         @ManageTransactions("InsertOp")
12147         def RestoreShape (self, theStream, theName=None):
12148             """
12149             Read a shape from the binary stream, containing its bounding representation (BRep).
12150
12151             Note:
12152                 shape.GetShapeStream() method can be used to obtain the shape's BRep stream.
12153
12154             Parameters:
12155                 theStream The BRep binary stream.
12156                 theName Object name; when specified, this parameter is used
12157                         for result publication in the study. Otherwise, if automatic
12158                         publication is switched on, default value is used for result name.
12159
12160             Returns:
12161                 New GEOM_Object, containing the shape, read from theStream.
12162             """
12163             # Example: see GEOM_TestOthers.py
12164             if not theStream:
12165                 # this is the workaround to ignore invalid case when data stream is empty
12166                 if int(os.getenv("GEOM_IGNORE_RESTORE_SHAPE", "0")) > 0:
12167                     print("WARNING: Result of RestoreShape is a NULL shape!")
12168                     return None
12169             anObj = self.InsertOp.RestoreShape(theStream)
12170             RaiseIfFailed("RestoreShape", self.InsertOp)
12171             self._autoPublish(anObj, theName, "restored")
12172             return anObj
12173
12174         ## Export the given shape into a file with given name.
12175         #
12176         #  Note: this function is deprecated, it is kept for backward compatibility only
12177         #  Use Export<FormatName> instead, where <FormatName> is a name of desirable format to export.
12178         #
12179         #  @param theObject Shape to be stored in the file.
12180         #  @param theFileName Name of the file to store the given shape in.
12181         #  @param theFormatName Specify format for the shape storage.
12182         #         Available formats can be obtained with
12183         #         geompy.InsertOp.ExportTranslators()[0] method.
12184         #
12185         #  @ref swig_Import_Export "Example"
12186         @ManageTransactions("InsertOp")
12187         def Export(self, theObject, theFileName, theFormatName):
12188             """
12189             Export the given shape into a file with given name.
12190
12191             Note: this function is deprecated, it is kept for backward compatibility only
12192             Use Export<FormatName> instead, where <FormatName> is a name of desirable format to export.
12193             
12194             Parameters: 
12195                 theObject Shape to be stored in the file.
12196                 theFileName Name of the file to store the given shape in.
12197                 theFormatName Specify format for the shape storage.
12198                               Available formats can be obtained with
12199                               geompy.InsertOp.ExportTranslators()[0] method.
12200             """
12201             # Example: see GEOM_TestOthers.py
12202             print("""
12203             WARNING: Function Export is deprecated, use Export<FormatName> instead,
12204             where <FormatName> is a name of desirable format for exporting.
12205             """)
12206             self.InsertOp.Export(theObject, theFileName, theFormatName)
12207             if self.InsertOp.IsDone() == 0:
12208                 raise RuntimeError("Export : " + self.InsertOp.GetErrorCode())
12209                 pass
12210             pass
12211
12212         # end of l2_import_export
12213         ## @}
12214
12215         ## @addtogroup l3_blocks
12216         ## @{
12217
12218         ## Create a quadrangle face from four edges. Order of Edges is not
12219         #  important. It is not necessary that edges share the same vertex.
12220         #  @param E1,E2,E3,E4 Edges for the face bound.
12221         #  @param theName Object name; when specified, this parameter is used
12222         #         for result publication in the study. Otherwise, if automatic
12223         #         publication is switched on, default value is used for result name.
12224         #
12225         #  @return New GEOM.GEOM_Object, containing the created face.
12226         #
12227         #  @ref tui_building_by_blocks_page "Example"
12228         @ManageTransactions("BlocksOp")
12229         def MakeQuad(self, E1, E2, E3, E4, theName=None):
12230             """
12231             Create a quadrangle face from four edges. Order of Edges is not
12232             important. It is not necessary that edges share the same vertex.
12233
12234             Parameters:
12235                 E1,E2,E3,E4 Edges for the face bound.
12236                 theName Object name; when specified, this parameter is used
12237                         for result publication in the study. Otherwise, if automatic
12238                         publication is switched on, default value is used for result name.
12239
12240             Returns:
12241                 New GEOM.GEOM_Object, containing the created face.
12242
12243             Example of usage:
12244                 qface1 = geompy.MakeQuad(edge1, edge2, edge3, edge4)
12245             """
12246             # Example: see GEOM_Spanner.py
12247             anObj = self.BlocksOp.MakeQuad(E1, E2, E3, E4)
12248             RaiseIfFailed("MakeQuad", self.BlocksOp)
12249             self._autoPublish(anObj, theName, "quad")
12250             return anObj
12251
12252         ## Create a quadrangle face on two edges.
12253         #  The missing edges will be built by creating the shortest ones.
12254         #  @param E1,E2 Two opposite edges for the face.
12255         #  @param theName Object name; when specified, this parameter is used
12256         #         for result publication in the study. Otherwise, if automatic
12257         #         publication is switched on, default value is used for result name.
12258         #
12259         #  @return New GEOM.GEOM_Object, containing the created face.
12260         #
12261         #  @ref tui_building_by_blocks_page "Example"
12262         @ManageTransactions("BlocksOp")
12263         def MakeQuad2Edges(self, E1, E2, theName=None):
12264             """
12265             Create a quadrangle face on two edges.
12266             The missing edges will be built by creating the shortest ones.
12267
12268             Parameters:
12269                 E1,E2 Two opposite edges for the face.
12270                 theName Object name; when specified, this parameter is used
12271                         for result publication in the study. Otherwise, if automatic
12272                         publication is switched on, default value is used for result name.
12273
12274             Returns:
12275                 New GEOM.GEOM_Object, containing the created face.
12276
12277             Example of usage:
12278                 # create vertices
12279                 p1 = geompy.MakeVertex(  0.,   0.,   0.)
12280                 p2 = geompy.MakeVertex(150.,  30.,   0.)
12281                 p3 = geompy.MakeVertex(  0., 120.,  50.)
12282                 p4 = geompy.MakeVertex(  0.,  40.,  70.)
12283                 # create edges
12284                 edge1 = geompy.MakeEdge(p1, p2)
12285                 edge2 = geompy.MakeEdge(p3, p4)
12286                 # create a quadrangle face from two edges
12287                 qface2 = geompy.MakeQuad2Edges(edge1, edge2)
12288             """
12289             # Example: see GEOM_Spanner.py
12290             anObj = self.BlocksOp.MakeQuad2Edges(E1, E2)
12291             RaiseIfFailed("MakeQuad2Edges", self.BlocksOp)
12292             self._autoPublish(anObj, theName, "quad")
12293             return anObj
12294
12295         ## Create a quadrangle face with specified corners.
12296         #  The missing edges will be built by creating the shortest ones.
12297         #  @param V1,V2,V3,V4 Corner vertices for the face.
12298         #  @param theName Object name; when specified, this parameter is used
12299         #         for result publication in the study. Otherwise, if automatic
12300         #         publication is switched on, default value is used for result name.
12301         #
12302         #  @return New GEOM.GEOM_Object, containing the created face.
12303         #
12304         #  @ref tui_building_by_blocks_page "Example 1"
12305         #  \n @ref swig_MakeQuad4Vertices "Example 2"
12306         @ManageTransactions("BlocksOp")
12307         def MakeQuad4Vertices(self, V1, V2, V3, V4, theName=None):
12308             """
12309             Create a quadrangle face with specified corners.
12310             The missing edges will be built by creating the shortest ones.
12311
12312             Parameters:
12313                 V1,V2,V3,V4 Corner vertices for the face.
12314                 theName Object name; when specified, this parameter is used
12315                         for result publication in the study. Otherwise, if automatic
12316                         publication is switched on, default value is used for result name.
12317
12318             Returns:
12319                 New GEOM.GEOM_Object, containing the created face.
12320
12321             Example of usage:
12322                 # create vertices
12323                 p1 = geompy.MakeVertex(  0.,   0.,   0.)
12324                 p2 = geompy.MakeVertex(150.,  30.,   0.)
12325                 p3 = geompy.MakeVertex(  0., 120.,  50.)
12326                 p4 = geompy.MakeVertex(  0.,  40.,  70.)
12327                 # create a quadrangle from four points in its corners
12328                 qface3 = geompy.MakeQuad4Vertices(p1, p2, p3, p4)
12329             """
12330             # Example: see GEOM_Spanner.py
12331             anObj = self.BlocksOp.MakeQuad4Vertices(V1, V2, V3, V4)
12332             RaiseIfFailed("MakeQuad4Vertices", self.BlocksOp)
12333             self._autoPublish(anObj, theName, "quad")
12334             return anObj
12335
12336         ## Create a hexahedral solid, bounded by the six given faces. Order of
12337         #  faces is not important. It is not necessary that Faces share the same edge.
12338         #  @param F1,F2,F3,F4,F5,F6 Faces for the hexahedral solid.
12339         #  @param theName Object name; when specified, this parameter is used
12340         #         for result publication in the study. Otherwise, if automatic
12341         #         publication is switched on, default value is used for result name.
12342         #
12343         #  @return New GEOM.GEOM_Object, containing the created solid.
12344         #
12345         #  @ref tui_building_by_blocks_page "Example 1"
12346         #  \n @ref swig_MakeHexa "Example 2"
12347         @ManageTransactions("BlocksOp")
12348         def MakeHexa(self, F1, F2, F3, F4, F5, F6, theName=None):
12349             """
12350             Create a hexahedral solid, bounded by the six given faces. Order of
12351             faces is not important. It is not necessary that Faces share the same edge.
12352
12353             Parameters:
12354                 F1,F2,F3,F4,F5,F6 Faces for the hexahedral solid.
12355                 theName Object name; when specified, this parameter is used
12356                         for result publication in the study. Otherwise, if automatic
12357                         publication is switched on, default value is used for result name.
12358
12359             Returns:
12360                 New GEOM.GEOM_Object, containing the created solid.
12361
12362             Example of usage:
12363                 solid = geompy.MakeHexa(qface1, qface2, qface3, qface4, qface5, qface6)
12364             """
12365             # Example: see GEOM_Spanner.py
12366             anObj = self.BlocksOp.MakeHexa(F1, F2, F3, F4, F5, F6)
12367             RaiseIfFailed("MakeHexa", self.BlocksOp)
12368             self._autoPublish(anObj, theName, "hexa")
12369             return anObj
12370
12371         ## Create a hexahedral solid between two given faces.
12372         #  The missing faces will be built by creating the smallest ones.
12373         #  @param F1,F2 Two opposite faces for the hexahedral solid.
12374         #  @param theName Object name; when specified, this parameter is used
12375         #         for result publication in the study. Otherwise, if automatic
12376         #         publication is switched on, default value is used for result name.
12377         #
12378         #  @return New GEOM.GEOM_Object, containing the created solid.
12379         #
12380         #  @ref tui_building_by_blocks_page "Example 1"
12381         #  \n @ref swig_MakeHexa2Faces "Example 2"
12382         @ManageTransactions("BlocksOp")
12383         def MakeHexa2Faces(self, F1, F2, theName=None):
12384             """
12385             Create a hexahedral solid between two given faces.
12386             The missing faces will be built by creating the smallest ones.
12387
12388             Parameters:
12389                 F1,F2 Two opposite faces for the hexahedral solid.
12390                 theName Object name; when specified, this parameter is used
12391                         for result publication in the study. Otherwise, if automatic
12392                         publication is switched on, default value is used for result name.
12393
12394             Returns:
12395                 New GEOM.GEOM_Object, containing the created solid.
12396
12397             Example of usage:
12398                 solid1 = geompy.MakeHexa2Faces(qface1, qface2)
12399             """
12400             # Example: see GEOM_Spanner.py
12401             anObj = self.BlocksOp.MakeHexa2Faces(F1, F2)
12402             RaiseIfFailed("MakeHexa2Faces", self.BlocksOp)
12403             self._autoPublish(anObj, theName, "hexa")
12404             return anObj
12405
12406         # end of l3_blocks
12407         ## @}
12408
12409         ## @addtogroup l3_blocks_op
12410         ## @{
12411
12412         ## Get a vertex, found in the given shape by its coordinates.
12413         #  @param theShape Block or a compound of blocks.
12414         #  @param theX,theY,theZ Coordinates of the sought vertex.
12415         #  @param theEpsilon Maximum allowed distance between the resulting
12416         #                    vertex and point with the given coordinates.
12417         #  @param theName Object name; when specified, this parameter is used
12418         #         for result publication in the study. Otherwise, if automatic
12419         #         publication is switched on, default value is used for result name.
12420         #
12421         #  @return New GEOM.GEOM_Object, containing the found vertex.
12422         #
12423         #  @ref swig_GetPoint "Example"
12424         @ManageTransactions("BlocksOp")
12425         def GetPoint(self, theShape, theX, theY, theZ, theEpsilon, theName=None):
12426             """
12427             Get a vertex, found in the given shape by its coordinates.
12428
12429             Parameters:
12430                 theShape Block or a compound of blocks.
12431                 theX,theY,theZ Coordinates of the sought vertex.
12432                 theEpsilon Maximum allowed distance between the resulting
12433                            vertex and point with the given coordinates.
12434                 theName Object name; when specified, this parameter is used
12435                         for result publication in the study. Otherwise, if automatic
12436                         publication is switched on, default value is used for result name.
12437
12438             Returns:
12439                 New GEOM.GEOM_Object, containing the found vertex.
12440
12441             Example of usage:
12442                 pnt = geompy.GetPoint(shape, -50,  50,  50, 0.01)
12443             """
12444             # Example: see GEOM_TestOthers.py
12445             anObj = self.BlocksOp.GetPoint(theShape, theX, theY, theZ, theEpsilon)
12446             RaiseIfFailed("GetPoint", self.BlocksOp)
12447             self._autoPublish(anObj, theName, "vertex")
12448             return anObj
12449
12450         ## Find a vertex of the given shape, which has minimal distance to the given point.
12451         #  @param theShape Any shape.
12452         #  @param thePoint Point, close to the desired vertex.
12453         #  @param theName Object name; when specified, this parameter is used
12454         #         for result publication in the study. Otherwise, if automatic
12455         #         publication is switched on, default value is used for result name.
12456         #
12457         #  @return New GEOM.GEOM_Object, containing the found vertex.
12458         #
12459         #  @ref swig_GetVertexNearPoint "Example"
12460         @ManageTransactions("BlocksOp")
12461         def GetVertexNearPoint(self, theShape, thePoint, theName=None):
12462             """
12463             Find a vertex of the given shape, which has minimal distance to the given point.
12464
12465             Parameters:
12466                 theShape Any shape.
12467                 thePoint Point, close to the desired vertex.
12468                 theName Object name; when specified, this parameter is used
12469                         for result publication in the study. Otherwise, if automatic
12470                         publication is switched on, default value is used for result name.
12471
12472             Returns:
12473                 New GEOM.GEOM_Object, containing the found vertex.
12474
12475             Example of usage:
12476                 pmidle = geompy.MakeVertex(50, 0, 50)
12477                 edge1 = geompy.GetEdgeNearPoint(blocksComp, pmidle)
12478             """
12479             # Example: see GEOM_TestOthers.py
12480             anObj = self.BlocksOp.GetVertexNearPoint(theShape, thePoint)
12481             RaiseIfFailed("GetVertexNearPoint", self.BlocksOp)
12482             self._autoPublish(anObj, theName, "vertex")
12483             return anObj
12484
12485         ## Get an edge, found in the given shape by two given vertices.
12486         #  @param theShape Block or a compound of blocks.
12487         #  @param thePoint1,thePoint2 Points, close to the ends of the desired edge.
12488         #  @param theName Object name; when specified, this parameter is used
12489         #         for result publication in the study. Otherwise, if automatic
12490         #         publication is switched on, default value is used for result name.
12491         #
12492         #  @return New GEOM.GEOM_Object, containing the found edge.
12493         #
12494         #  @ref swig_GetEdge "Example"
12495         @ManageTransactions("BlocksOp")
12496         def GetEdge(self, theShape, thePoint1, thePoint2, theName=None):
12497             """
12498             Get an edge, found in the given shape by two given vertices.
12499
12500             Parameters:
12501                 theShape Block or a compound of blocks.
12502                 thePoint1,thePoint2 Points, close to the ends of the desired edge.
12503                 theName Object name; when specified, this parameter is used
12504                         for result publication in the study. Otherwise, if automatic
12505                         publication is switched on, default value is used for result name.
12506
12507             Returns:
12508                 New GEOM.GEOM_Object, containing the found edge.
12509             """
12510             # Example: see GEOM_Spanner.py
12511             anObj = self.BlocksOp.GetEdge(theShape, thePoint1, thePoint2)
12512             RaiseIfFailed("GetEdge", self.BlocksOp)
12513             self._autoPublish(anObj, theName, "edge")
12514             return anObj
12515
12516         ## Find an edge of the given shape, which has minimal distance to the given point.
12517         #  @param theShape Block or a compound of blocks.
12518         #  @param thePoint Point, close to the desired edge.
12519         #  @param theName Object name; when specified, this parameter is used
12520         #         for result publication in the study. Otherwise, if automatic
12521         #         publication is switched on, default value is used for result name.
12522         #
12523         #  @return New GEOM.GEOM_Object, containing the found edge.
12524         #
12525         #  @ref swig_GetEdgeNearPoint "Example"
12526         @ManageTransactions("BlocksOp")
12527         def GetEdgeNearPoint(self, theShape, thePoint, theName=None):
12528             """
12529             Find an edge of the given shape, which has minimal distance to the given point.
12530
12531             Parameters:
12532                 theShape Block or a compound of blocks.
12533                 thePoint Point, close to the desired edge.
12534                 theName Object name; when specified, this parameter is used
12535                         for result publication in the study. Otherwise, if automatic
12536                         publication is switched on, default value is used for result name.
12537
12538             Returns:
12539                 New GEOM.GEOM_Object, containing the found edge.
12540             """
12541             # Example: see GEOM_TestOthers.py
12542             anObj = self.BlocksOp.GetEdgeNearPoint(theShape, thePoint)
12543             RaiseIfFailed("GetEdgeNearPoint", self.BlocksOp)
12544             self._autoPublish(anObj, theName, "edge")
12545             return anObj
12546
12547         ## Returns a face, found in the given shape by four given corner vertices.
12548         #  @param theShape Block or a compound of blocks.
12549         #  @param thePoint1,thePoint2,thePoint3,thePoint4 Points, close to the corners of the desired face.
12550         #  @param theName Object name; when specified, this parameter is used
12551         #         for result publication in the study. Otherwise, if automatic
12552         #         publication is switched on, default value is used for result name.
12553         #
12554         #  @return New GEOM.GEOM_Object, containing the found face.
12555         #
12556         #  @ref swig_todo "Example"
12557         @ManageTransactions("BlocksOp")
12558         def GetFaceByPoints(self, theShape, thePoint1, thePoint2, thePoint3, thePoint4, theName=None):
12559             """
12560             Returns a face, found in the given shape by four given corner vertices.
12561
12562             Parameters:
12563                 theShape Block or a compound of blocks.
12564                 thePoint1,thePoint2,thePoint3,thePoint4 Points, close to the corners of the desired face.
12565                 theName Object name; when specified, this parameter is used
12566                         for result publication in the study. Otherwise, if automatic
12567                         publication is switched on, default value is used for result name.
12568
12569             Returns:
12570                 New GEOM.GEOM_Object, containing the found face.
12571             """
12572             # Example: see GEOM_Spanner.py
12573             anObj = self.BlocksOp.GetFaceByPoints(theShape, thePoint1, thePoint2, thePoint3, thePoint4)
12574             RaiseIfFailed("GetFaceByPoints", self.BlocksOp)
12575             self._autoPublish(anObj, theName, "face")
12576             return anObj
12577
12578         ## Get a face of block, found in the given shape by two given edges.
12579         #  @param theShape Block or a compound of blocks.
12580         #  @param theEdge1,theEdge2 Edges, close to the edges of the desired face.
12581         #  @param theName Object name; when specified, this parameter is used
12582         #         for result publication in the study. Otherwise, if automatic
12583         #         publication is switched on, default value is used for result name.
12584         #
12585         #  @return New GEOM.GEOM_Object, containing the found face.
12586         #
12587         #  @ref swig_todo "Example"
12588         @ManageTransactions("BlocksOp")
12589         def GetFaceByEdges(self, theShape, theEdge1, theEdge2, theName=None):
12590             """
12591             Get a face of block, found in the given shape by two given edges.
12592
12593             Parameters:
12594                 theShape Block or a compound of blocks.
12595                 theEdge1,theEdge2 Edges, close to the edges of the desired face.
12596                 theName Object name; when specified, this parameter is used
12597                         for result publication in the study. Otherwise, if automatic
12598                         publication is switched on, default value is used for result name.
12599
12600             Returns:
12601                 New GEOM.GEOM_Object, containing the found face.
12602             """
12603             # Example: see GEOM_Spanner.py
12604             anObj = self.BlocksOp.GetFaceByEdges(theShape, theEdge1, theEdge2)
12605             RaiseIfFailed("GetFaceByEdges", self.BlocksOp)
12606             self._autoPublish(anObj, theName, "face")
12607             return anObj
12608
12609         ## Find a face, opposite to the given one in the given block.
12610         #  @param theBlock Must be a hexahedral solid.
12611         #  @param theFace Face of \a theBlock, opposite to the desired face.
12612         #  @param theName Object name; when specified, this parameter is used
12613         #         for result publication in the study. Otherwise, if automatic
12614         #         publication is switched on, default value is used for result name.
12615         #
12616         #  @return New GEOM.GEOM_Object, containing the found face.
12617         #
12618         #  @ref swig_GetOppositeFace "Example"
12619         @ManageTransactions("BlocksOp")
12620         def GetOppositeFace(self, theBlock, theFace, theName=None):
12621             """
12622             Find a face, opposite to the given one in the given block.
12623
12624             Parameters:
12625                 theBlock Must be a hexahedral solid.
12626                 theFace Face of theBlock, opposite to the desired face.
12627                 theName Object name; when specified, this parameter is used
12628                         for result publication in the study. Otherwise, if automatic
12629                         publication is switched on, default value is used for result name.
12630
12631             Returns:
12632                 New GEOM.GEOM_Object, containing the found face.
12633             """
12634             # Example: see GEOM_Spanner.py
12635             anObj = self.BlocksOp.GetOppositeFace(theBlock, theFace)
12636             RaiseIfFailed("GetOppositeFace", self.BlocksOp)
12637             self._autoPublish(anObj, theName, "face")
12638             return anObj
12639
12640         ## Find a face of the given shape, which has minimal distance to the given point.
12641         #  @param theShape Block or a compound of blocks.
12642         #  @param thePoint Point, close to the desired face.
12643         #  @param theName Object name; when specified, this parameter is used
12644         #         for result publication in the study. Otherwise, if automatic
12645         #         publication is switched on, default value is used for result name.
12646         #
12647         #  @return New GEOM.GEOM_Object, containing the found face.
12648         #
12649         #  @ref swig_GetFaceNearPoint "Example"
12650         @ManageTransactions("BlocksOp")
12651         def GetFaceNearPoint(self, theShape, thePoint, theName=None):
12652             """
12653             Find a face of the given shape, which has minimal distance to the given point.
12654
12655             Parameters:
12656                 theShape Block or a compound of blocks.
12657                 thePoint Point, close to the desired face.
12658                 theName Object name; when specified, this parameter is used
12659                         for result publication in the study. Otherwise, if automatic
12660                         publication is switched on, default value is used for result name.
12661
12662             Returns:
12663                 New GEOM.GEOM_Object, containing the found face.
12664             """
12665             # Example: see GEOM_Spanner.py
12666             anObj = self.BlocksOp.GetFaceNearPoint(theShape, thePoint)
12667             RaiseIfFailed("GetFaceNearPoint", self.BlocksOp)
12668             self._autoPublish(anObj, theName, "face")
12669             return anObj
12670
12671         ## Find a face of block, whose outside normale has minimal angle with the given vector.
12672         #  @param theBlock Block or a compound of blocks.
12673         #  @param theVector Vector, close to the normale of the desired face.
12674         #  @param theName Object name; when specified, this parameter is used
12675         #         for result publication in the study. Otherwise, if automatic
12676         #         publication is switched on, default value is used for result name.
12677         #
12678         #  @return New GEOM.GEOM_Object, containing the found face.
12679         #
12680         #  @ref swig_todo "Example"
12681         @ManageTransactions("BlocksOp")
12682         def GetFaceByNormale(self, theBlock, theVector, theName=None):
12683             """
12684             Find a face of block, whose outside normale has minimal angle with the given vector.
12685
12686             Parameters:
12687                 theBlock Block or a compound of blocks.
12688                 theVector Vector, close to the normale of the desired face.
12689                 theName Object name; when specified, this parameter is used
12690                         for result publication in the study. Otherwise, if automatic
12691                         publication is switched on, default value is used for result name.
12692
12693             Returns:
12694                 New GEOM.GEOM_Object, containing the found face.
12695             """
12696             # Example: see GEOM_Spanner.py
12697             anObj = self.BlocksOp.GetFaceByNormale(theBlock, theVector)
12698             RaiseIfFailed("GetFaceByNormale", self.BlocksOp)
12699             self._autoPublish(anObj, theName, "face")
12700             return anObj
12701
12702         ## Find all sub-shapes of type \a theShapeType of the given shape,
12703         #  which have minimal distance to the given point.
12704         #  @param theShape Any shape.
12705         #  @param thePoint Point, close to the desired shape.
12706         #  @param theShapeType Defines what kind of sub-shapes is searched GEOM::shape_type
12707         #  @param theTolerance The tolerance for distances comparison. All shapes
12708         #                      with distances to the given point in interval
12709         #                      [minimal_distance, minimal_distance + theTolerance] will be gathered.
12710         #  @param theName Object name; when specified, this parameter is used
12711         #         for result publication in the study. Otherwise, if automatic
12712         #         publication is switched on, default value is used for result name.
12713         #
12714         #  @return New GEOM_Object, containing a group of all found shapes.
12715         #
12716         #  @ref swig_GetShapesNearPoint "Example"
12717         @ManageTransactions("BlocksOp")
12718         def GetShapesNearPoint(self, theShape, thePoint, theShapeType, theTolerance = 1e-07, theName=None):
12719             """
12720             Find all sub-shapes of type theShapeType of the given shape,
12721             which have minimal distance to the given point.
12722
12723             Parameters:
12724                 theShape Any shape.
12725                 thePoint Point, close to the desired shape.
12726                 theShapeType Defines what kind of sub-shapes is searched (see GEOM::shape_type)
12727                 theTolerance The tolerance for distances comparison. All shapes
12728                                 with distances to the given point in interval
12729                                 [minimal_distance, minimal_distance + theTolerance] will be gathered.
12730                 theName Object name; when specified, this parameter is used
12731                         for result publication in the study. Otherwise, if automatic
12732                         publication is switched on, default value is used for result name.
12733
12734             Returns:
12735                 New GEOM_Object, containing a group of all found shapes.
12736             """
12737             # Example: see GEOM_TestOthers.py
12738             anObj = self.BlocksOp.GetShapesNearPoint(theShape, thePoint, theShapeType, theTolerance)
12739             RaiseIfFailed("GetShapesNearPoint", self.BlocksOp)
12740             self._autoPublish(anObj, theName, "group")
12741             return anObj
12742
12743         # end of l3_blocks_op
12744         ## @}
12745
12746         ## @addtogroup l4_blocks_measure
12747         ## @{
12748
12749         ## Check, if the compound of blocks is given.
12750         #  To be considered as a compound of blocks, the
12751         #  given shape must satisfy the following conditions:
12752         #  - Each element of the compound should be a Block (6 faces).
12753         #  - Each face should be a quadrangle, i.e. it should have only 1 wire
12754         #       with 4 edges. If <VAR>theIsUseC1</VAR> is set to True and
12755         #       there are more than 4 edges in the only wire of a face,
12756         #       this face is considered to be quadrangle if it has 4 bounds
12757         #       (1 or more edge) of C1 continuity.
12758         #  - A connection between two Blocks should be an entire quadrangle face or an entire edge.
12759         #  - The compound should be connexe.
12760         #  - The glue between two quadrangle faces should be applied.
12761         #  @param theCompound The compound to check.
12762         #  @param theIsUseC1 Flag to check if there are 4 bounds on a face
12763         #         taking into account C1 continuity.
12764         #  @param theAngTolerance the angular tolerance to check if two neighbor
12765         #         edges are codirectional in the common vertex with this
12766         #         tolerance. This parameter is used only if
12767         #         <VAR>theIsUseC1</VAR> is set to True.
12768         #  @return TRUE, if the given shape is a compound of blocks.
12769         #  If theCompound is not valid, prints all discovered errors.
12770         #
12771         #  @ref tui_check_compound_of_blocks_page "Example 1"
12772         #  \n @ref swig_CheckCompoundOfBlocks "Example 2"
12773         @ManageTransactions("BlocksOp")
12774         def CheckCompoundOfBlocks(self,theCompound, theIsUseC1 = False,
12775                                   theAngTolerance = 1.e-12):
12776             """
12777             Check, if the compound of blocks is given.
12778             To be considered as a compound of blocks, the
12779             given shape must satisfy the following conditions:
12780             - Each element of the compound should be a Block (6 faces).
12781             - Each face should be a quadrangle, i.e. it should have only 1 wire
12782                  with 4 edges. If theIsUseC1 is set to True and
12783                  there are more than 4 edges in the only wire of a face,
12784                  this face is considered to be quadrangle if it has 4 bounds
12785                  (1 or more edge) of C1 continuity.
12786             - A connection between two Blocks should be an entire quadrangle face or an entire edge.
12787             - The compound should be connexe.
12788             - The glue between two quadrangle faces should be applied.
12789
12790             Parameters:
12791                 theCompound The compound to check.
12792                 theIsUseC1 Flag to check if there are 4 bounds on a face
12793                            taking into account C1 continuity.
12794                 theAngTolerance the angular tolerance to check if two neighbor
12795                            edges are codirectional in the common vertex with this
12796                            tolerance. This parameter is used only if
12797                            theIsUseC1 is set to True.
12798
12799             Returns:
12800                 TRUE, if the given shape is a compound of blocks.
12801                 If theCompound is not valid, prints all discovered errors.
12802             """
12803             # Example: see GEOM_Spanner.py
12804             aTolerance = -1.0
12805             if theIsUseC1:
12806                 aTolerance = theAngTolerance
12807             (IsValid, BCErrors) = self.BlocksOp.CheckCompoundOfBlocks(theCompound, aTolerance)
12808             RaiseIfFailed("CheckCompoundOfBlocks", self.BlocksOp)
12809             if IsValid == 0:
12810                 Descr = self.BlocksOp.PrintBCErrors(theCompound, BCErrors)
12811                 print(Descr)
12812             return IsValid
12813
12814         ## Retrieve all non blocks solids and faces from \a theShape.
12815         #  @param theShape The shape to explore.
12816         #  @param theIsUseC1 Flag to check if there are 4 bounds on a face
12817         #         taking into account C1 continuity.
12818         #  @param theAngTolerance the angular tolerance to check if two neighbor
12819         #         edges are codirectional in the common vertex with this
12820         #         tolerance. This parameter is used only if
12821         #         <VAR>theIsUseC1</VAR> is set to True.
12822         #  @param theName Object name; when specified, this parameter is used
12823         #         for result publication in the study. Otherwise, if automatic
12824         #         publication is switched on, default value is used for result name.
12825         #
12826         #  @return A tuple of two GEOM_Objects. The first object is a group of all
12827         #          non block solids (= not 6 faces, or with 6 faces, but with the
12828         #          presence of non-quadrangular faces). The second object is a
12829         #          group of all non quadrangular faces (= faces with more then
12830         #          1 wire or, if <VAR>theIsUseC1</VAR> is set to True, faces
12831         #          with 1 wire with not 4 edges that do not form 4 bounds of
12832         #          C1 continuity).
12833         #
12834         #  @ref tui_get_non_blocks_page "Example 1"
12835         #  \n @ref swig_GetNonBlocks "Example 2"
12836         @ManageTransactions("BlocksOp")
12837         def GetNonBlocks (self, theShape, theIsUseC1 = False,
12838                           theAngTolerance = 1.e-12, theName=None):
12839             """
12840             Retrieve all non blocks solids and faces from theShape.
12841
12842             Parameters:
12843                 theShape The shape to explore.
12844                 theIsUseC1 Flag to check if there are 4 bounds on a face
12845                            taking into account C1 continuity.
12846                 theAngTolerance the angular tolerance to check if two neighbor
12847                            edges are codirectional in the common vertex with this
12848                            tolerance. This parameter is used only if
12849                            theIsUseC1 is set to True.
12850                 theName Object name; when specified, this parameter is used
12851                         for result publication in the study. Otherwise, if automatic
12852                         publication is switched on, default value is used for result name.
12853
12854             Returns:
12855                 A tuple of two GEOM_Objects. The first object is a group of all
12856                 non block solids (= not 6 faces, or with 6 faces, but with the
12857                 presence of non-quadrangular faces). The second object is a
12858                 group of all non quadrangular faces (= faces with more then
12859                 1 wire or, if <VAR>theIsUseC1</VAR> is set to True, faces
12860                 with 1 wire with not 4 edges that do not form 4 bounds of
12861                 C1 continuity).
12862
12863             Usage:
12864                 (res_sols, res_faces) = geompy.GetNonBlocks(myShape1)
12865             """
12866             # Example: see GEOM_Spanner.py
12867             aTolerance = -1.0
12868             if theIsUseC1:
12869                 aTolerance = theAngTolerance
12870             aTuple = self.BlocksOp.GetNonBlocks(theShape, aTolerance)
12871             RaiseIfFailed("GetNonBlocks", self.BlocksOp)
12872             self._autoPublish(aTuple, theName, ("groupNonHexas", "groupNonQuads"))
12873             return aTuple
12874
12875         ## Remove all seam and degenerated edges from \a theShape.
12876         #  Unite faces and edges, sharing one surface. It means that
12877         #  this faces must have references to one C++ surface object (handle).
12878         #  @param theShape The compound or single solid to remove irregular edges from.
12879         #  @param doUnionFaces If True, then unite faces. If False (the default value),
12880         #         do not unite faces.
12881         #  @param theName Object name; when specified, this parameter is used
12882         #         for result publication in the study. Otherwise, if automatic
12883         #         publication is switched on, default value is used for result name.
12884         #
12885         #  @return Improved shape.
12886         #
12887         #  @ref swig_RemoveExtraEdges "Example"
12888         @ManageTransactions("BlocksOp")
12889         def RemoveExtraEdges(self, theShape, doUnionFaces=False, theName=None):
12890             """
12891             Remove all seam and degenerated edges from theShape.
12892             Unite faces and edges, sharing one surface. It means that
12893             this faces must have references to one C++ surface object (handle).
12894
12895             Parameters:
12896                 theShape The compound or single solid to remove irregular edges from.
12897                 doUnionFaces If True, then unite faces. If False (the default value),
12898                              do not unite faces.
12899                 theName Object name; when specified, this parameter is used
12900                         for result publication in the study. Otherwise, if automatic
12901                         publication is switched on, default value is used for result name.
12902
12903             Returns:
12904                 Improved shape.
12905             """
12906             # Example: see GEOM_TestOthers.py
12907             nbFacesOptimum = -1 # -1 means do not unite faces
12908             if doUnionFaces is True: nbFacesOptimum = 0 # 0 means unite faces
12909             anObj = self.BlocksOp.RemoveExtraEdges(theShape, nbFacesOptimum)
12910             RaiseIfFailed("RemoveExtraEdges", self.BlocksOp)
12911             self._autoPublish(anObj, theName, "removeExtraEdges")
12912             return anObj
12913
12914         ## Performs union faces of \a theShape
12915         #  Unite faces sharing one surface. It means that
12916         #  these faces must have references to one C++ surface object (handle).
12917         #  @param theShape The compound or single solid that contains faces
12918         #         to perform union.
12919         #  @param theName Object name; when specified, this parameter is used
12920         #         for result publication in the study. Otherwise, if automatic
12921         #         publication is switched on, default value is used for result name.
12922         #
12923         #  @return Improved shape.
12924         #
12925         #  @ref swig_UnionFaces "Example"
12926         @ManageTransactions("BlocksOp")
12927         def UnionFaces(self, theShape, theName=None):
12928             """
12929             Performs union faces of theShape.
12930             Unite faces sharing one surface. It means that
12931             these faces must have references to one C++ surface object (handle).
12932
12933             Parameters:
12934                 theShape The compound or single solid that contains faces
12935                          to perform union.
12936                 theName Object name; when specified, this parameter is used
12937                         for result publication in the study. Otherwise, if automatic
12938                         publication is switched on, default value is used for result name.
12939
12940             Returns:
12941                 Improved shape.
12942             """
12943             # Example: see GEOM_TestOthers.py
12944             anObj = self.BlocksOp.UnionFaces(theShape)
12945             RaiseIfFailed("UnionFaces", self.BlocksOp)
12946             self._autoPublish(anObj, theName, "unionFaces")
12947             return anObj
12948
12949         ## Check, if the given shape is a blocks compound.
12950         #  Fix all detected errors.
12951         #    \note Single block can be also fixed by this method.
12952         #  @param theShape The compound to check and improve.
12953         #  @param theName Object name; when specified, this parameter is used
12954         #         for result publication in the study. Otherwise, if automatic
12955         #         publication is switched on, default value is used for result name.
12956         #
12957         #  @return Improved compound.
12958         #
12959         #  @ref swig_CheckAndImprove "Example"
12960         @ManageTransactions("BlocksOp")
12961         def CheckAndImprove(self, theShape, theName=None):
12962             """
12963             Check, if the given shape is a blocks compound.
12964             Fix all detected errors.
12965
12966             Note:
12967                 Single block can be also fixed by this method.
12968
12969             Parameters:
12970                 theShape The compound to check and improve.
12971                 theName Object name; when specified, this parameter is used
12972                         for result publication in the study. Otherwise, if automatic
12973                         publication is switched on, default value is used for result name.
12974
12975             Returns:
12976                 Improved compound.
12977             """
12978             # Example: see GEOM_TestOthers.py
12979             anObj = self.BlocksOp.CheckAndImprove(theShape)
12980             RaiseIfFailed("CheckAndImprove", self.BlocksOp)
12981             self._autoPublish(anObj, theName, "improved")
12982             return anObj
12983
12984         # end of l4_blocks_measure
12985         ## @}
12986
12987         ## @addtogroup l3_blocks_op
12988         ## @{
12989
12990         ## Get all the blocks, contained in the given compound.
12991         #  @param theCompound The compound to explode.
12992         #  @param theMinNbFaces If solid has lower number of faces, it is not a block.
12993         #  @param theMaxNbFaces If solid has higher number of faces, it is not a block.
12994         #  @param 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         #  @note If theMaxNbFaces = 0, the maximum number of faces is not restricted.
12999         #
13000         #  @return List of GEOM.GEOM_Object, containing the retrieved blocks.
13001         #
13002         #  @ref tui_explode_on_blocks "Example 1"
13003         #  \n @ref swig_MakeBlockExplode "Example 2"
13004         @ManageTransactions("BlocksOp")
13005         def MakeBlockExplode(self, theCompound, theMinNbFaces, theMaxNbFaces, theName=None):
13006             """
13007             Get all the blocks, contained in the given compound.
13008
13009             Parameters:
13010                 theCompound The compound to explode.
13011                 theMinNbFaces If solid has lower number of faces, it is not a block.
13012                 theMaxNbFaces If solid has higher number of faces, it is not a block.
13013                 theName Object name; when specified, this parameter is used
13014                         for result publication in the study. Otherwise, if automatic
13015                         publication is switched on, default value is used for result name.
13016
13017             Note:
13018                 If theMaxNbFaces = 0, the maximum number of faces is not restricted.
13019
13020             Returns:
13021                 List of GEOM.GEOM_Object, containing the retrieved blocks.
13022             """
13023             # Example: see GEOM_TestOthers.py
13024             theMinNbFaces,theMaxNbFaces,Parameters = ParseParameters(theMinNbFaces,theMaxNbFaces)
13025             aList = self.BlocksOp.ExplodeCompoundOfBlocks(theCompound, theMinNbFaces, theMaxNbFaces)
13026             RaiseIfFailed("ExplodeCompoundOfBlocks", self.BlocksOp)
13027             for anObj in aList:
13028                 anObj.SetParameters(Parameters)
13029                 pass
13030             self._autoPublish(aList, theName, "block")
13031             return aList
13032
13033         ## Find block, containing the given point inside its volume or on boundary.
13034         #  @param theCompound Compound, to find block in.
13035         #  @param thePoint Point, close to the desired block. If the point lays on
13036         #         boundary between some blocks, we return block with nearest center.
13037         #  @param theName Object name; when specified, this parameter is used
13038         #         for result publication in the study. Otherwise, if automatic
13039         #         publication is switched on, default value is used for result name.
13040         #
13041         #  @return New GEOM.GEOM_Object, containing the found block.
13042         #
13043         #  @ref swig_todo "Example"
13044         @ManageTransactions("BlocksOp")
13045         def GetBlockNearPoint(self, theCompound, thePoint, theName=None):
13046             """
13047             Find block, containing the given point inside its volume or on boundary.
13048
13049             Parameters:
13050                 theCompound Compound, to find block in.
13051                 thePoint Point, close to the desired block. If the point lays on
13052                          boundary between some blocks, we return block with nearest center.
13053                 theName Object name; when specified, this parameter is used
13054                         for result publication in the study. Otherwise, if automatic
13055                         publication is switched on, default value is used for result name.
13056
13057             Returns:
13058                 New GEOM.GEOM_Object, containing the found block.
13059             """
13060             # Example: see GEOM_Spanner.py
13061             anObj = self.BlocksOp.GetBlockNearPoint(theCompound, thePoint)
13062             RaiseIfFailed("GetBlockNearPoint", self.BlocksOp)
13063             self._autoPublish(anObj, theName, "block")
13064             return anObj
13065
13066         ## Find block, containing all the elements, passed as the parts, or maximum quantity of them.
13067         #  @param theCompound Compound, to find block in.
13068         #  @param theParts List of faces and/or edges and/or vertices to be parts of the found block.
13069         #  @param theName Object name; when specified, this parameter is used
13070         #         for result publication in the study. Otherwise, if automatic
13071         #         publication is switched on, default value is used for result name.
13072         #
13073         #  @return New GEOM.GEOM_Object, containing the found block.
13074         #
13075         #  @ref swig_GetBlockByParts "Example"
13076         @ManageTransactions("BlocksOp")
13077         def GetBlockByParts(self, theCompound, theParts, theName=None):
13078             """
13079              Find block, containing all the elements, passed as the parts, or maximum quantity of them.
13080
13081              Parameters:
13082                 theCompound Compound, to find block in.
13083                 theParts List of faces and/or edges and/or vertices to be parts of the found block.
13084                 theName Object name; when specified, this parameter is used
13085                         for result publication in the study. Otherwise, if automatic
13086                         publication is switched on, default value is used for result name.
13087
13088             Returns:
13089                 New GEOM_Object, containing the found block.
13090             """
13091             # Example: see GEOM_TestOthers.py
13092             anObj = self.BlocksOp.GetBlockByParts(theCompound, theParts)
13093             RaiseIfFailed("GetBlockByParts", self.BlocksOp)
13094             self._autoPublish(anObj, theName, "block")
13095             return anObj
13096
13097         ## Return all blocks, containing all the elements, passed as the parts.
13098         #  @param theCompound Compound, to find blocks in.
13099         #  @param theParts List of faces and/or edges and/or vertices to be parts of the found blocks.
13100         #  @param theName Object name; when specified, this parameter is used
13101         #         for result publication in the study. Otherwise, if automatic
13102         #         publication is switched on, default value is used for result name.
13103         #
13104         #  @return List of GEOM.GEOM_Object, containing the found blocks.
13105         #
13106         #  @ref swig_todo "Example"
13107         @ManageTransactions("BlocksOp")
13108         def GetBlocksByParts(self, theCompound, theParts, theName=None):
13109             """
13110             Return all blocks, containing all the elements, passed as the parts.
13111
13112             Parameters:
13113                 theCompound Compound, to find blocks in.
13114                 theParts List of faces and/or edges and/or vertices to be parts of the found blocks.
13115                 theName Object name; when specified, this parameter is used
13116                         for result publication in the study. Otherwise, if automatic
13117                         publication is switched on, default value is used for result name.
13118
13119             Returns:
13120                 List of GEOM.GEOM_Object, containing the found blocks.
13121             """
13122             # Example: see GEOM_Spanner.py
13123             aList = self.BlocksOp.GetBlocksByParts(theCompound, theParts)
13124             RaiseIfFailed("GetBlocksByParts", self.BlocksOp)
13125             self._autoPublish(aList, theName, "block")
13126             return aList
13127
13128         ## Multi-transformate block and glue the result.
13129         #  Transformation is defined so, as to superpose direction faces.
13130         #  @param Block Hexahedral solid to be multi-transformed.
13131         #  @param DirFace1 ID of First direction face.
13132         #  @param DirFace2 ID of Second direction face.
13133         #  @param NbTimes Quantity of transformations to be done.
13134         #  @param theName Object name; when specified, this parameter is used
13135         #         for result publication in the study. Otherwise, if automatic
13136         #         publication is switched on, default value is used for result name.
13137         #
13138         #  @note Unique ID of sub-shape can be obtained, using method GetSubShapeID().
13139         #
13140         #  @return New GEOM.GEOM_Object, containing the result shape.
13141         #
13142         #  @ref tui_multi_transformation "Example"
13143         @ManageTransactions("BlocksOp")
13144         def MakeMultiTransformation1D(self, Block, DirFace1, DirFace2, NbTimes, theName=None):
13145             """
13146             Multi-transformate block and glue the result.
13147             Transformation is defined so, as to superpose direction faces.
13148
13149             Parameters:
13150                 Block Hexahedral solid to be multi-transformed.
13151                 DirFace1 ID of First direction face.
13152                 DirFace2 ID of Second direction face.
13153                 NbTimes Quantity of transformations to be done.
13154                 theName Object name; when specified, this parameter is used
13155                         for result publication in the study. Otherwise, if automatic
13156                         publication is switched on, default value is used for result name.
13157
13158             Note:
13159                 Unique ID of sub-shape can be obtained, using method GetSubShapeID().
13160
13161             Returns:
13162                 New GEOM.GEOM_Object, containing the result shape.
13163             """
13164             # Example: see GEOM_Spanner.py
13165             DirFace1,DirFace2,NbTimes,Parameters = ParseParameters(DirFace1,DirFace2,NbTimes)
13166             anObj = self.BlocksOp.MakeMultiTransformation1D(Block, DirFace1, DirFace2, NbTimes)
13167             RaiseIfFailed("MakeMultiTransformation1D", self.BlocksOp)
13168             anObj.SetParameters(Parameters)
13169             self._autoPublish(anObj, theName, "transformed")
13170             return anObj
13171
13172         ## Multi-transformate block and glue the result.
13173         #  @param Block Hexahedral solid to be multi-transformed.
13174         #  @param DirFace1U,DirFace2U IDs of Direction faces for the first transformation.
13175         #  @param DirFace1V,DirFace2V IDs of Direction faces for the second transformation.
13176         #  @param NbTimesU,NbTimesV Quantity of transformations to be done.
13177         #  @param theName Object name; when specified, this parameter is used
13178         #         for result publication in the study. Otherwise, if automatic
13179         #         publication is switched on, default value is used for result name.
13180         #
13181         #  @return New GEOM.GEOM_Object, containing the result shape.
13182         #
13183         #  @ref tui_multi_transformation "Example"
13184         @ManageTransactions("BlocksOp")
13185         def MakeMultiTransformation2D(self, Block, DirFace1U, DirFace2U, NbTimesU,
13186                                       DirFace1V, DirFace2V, NbTimesV, theName=None):
13187             """
13188             Multi-transformate block and glue the result.
13189
13190             Parameters:
13191                 Block Hexahedral solid to be multi-transformed.
13192                 DirFace1U,DirFace2U IDs of Direction faces for the first transformation.
13193                 DirFace1V,DirFace2V IDs of Direction faces for the second transformation.
13194                 NbTimesU,NbTimesV Quantity of transformations to be done.
13195                 theName Object name; when specified, this parameter is used
13196                         for result publication in the study. Otherwise, if automatic
13197                         publication is switched on, default value is used for result name.
13198
13199             Returns:
13200                 New GEOM.GEOM_Object, containing the result shape.
13201             """
13202             # Example: see GEOM_Spanner.py
13203             DirFace1U,DirFace2U,NbTimesU,DirFace1V,DirFace2V,NbTimesV,Parameters = ParseParameters(
13204               DirFace1U,DirFace2U,NbTimesU,DirFace1V,DirFace2V,NbTimesV)
13205             anObj = self.BlocksOp.MakeMultiTransformation2D(Block, DirFace1U, DirFace2U, NbTimesU,
13206                                                             DirFace1V, DirFace2V, NbTimesV)
13207             RaiseIfFailed("MakeMultiTransformation2D", self.BlocksOp)
13208             anObj.SetParameters(Parameters)
13209             self._autoPublish(anObj, theName, "transformed")
13210             return anObj
13211
13212         ## Build all possible propagation groups.
13213         #  Propagation group is a set of all edges, opposite to one (main)
13214         #  edge of this group directly or through other opposite edges.
13215         #  Notion of Opposite Edge make sense only on quadrangle face.
13216         #  @param theShape Shape to build propagation groups on.
13217         #  @param theName Object name; when specified, this parameter is used
13218         #         for result publication in the study. Otherwise, if automatic
13219         #         publication is switched on, default value is used for result name.
13220         #
13221         #  @return List of GEOM.GEOM_Object, each of them is a propagation group.
13222         #
13223         #  @ref swig_Propagate "Example"
13224         @ManageTransactions("BlocksOp")
13225         def Propagate(self, theShape, theName=None):
13226             """
13227             Build all possible propagation groups.
13228             Propagation group is a set of all edges, opposite to one (main)
13229             edge of this group directly or through other opposite edges.
13230             Notion of Opposite Edge make sense only on quadrangle face.
13231
13232             Parameters:
13233                 theShape Shape to build propagation groups on.
13234                 theName Object name; when specified, this parameter is used
13235                         for result publication in the study. Otherwise, if automatic
13236                         publication is switched on, default value is used for result name.
13237
13238             Returns:
13239                 List of GEOM.GEOM_Object, each of them is a propagation group.
13240             """
13241             # Example: see GEOM_TestOthers.py
13242             listChains = self.BlocksOp.Propagate(theShape)
13243             RaiseIfFailed("Propagate", self.BlocksOp)
13244             self._autoPublish(listChains, theName, "propagate")
13245             return listChains
13246
13247         # end of l3_blocks_op
13248         ## @}
13249
13250         ## @addtogroup l3_groups
13251         ## @{
13252
13253         ## Creates a new group which will store sub-shapes of theMainShape
13254         #  @param theMainShape is a GEOM object on which the group is selected
13255         #  @param theShapeType defines a shape type of the group (see GEOM::shape_type)
13256         #  @param theName Object name; when specified, this parameter is used
13257         #         for result publication in the study. Otherwise, if automatic
13258         #         publication is switched on, default value is used for result name.
13259         #
13260         #  @return a newly created GEOM group (GEOM.GEOM_Object)
13261         #
13262         #  @ref tui_working_with_groups_page "Example 1"
13263         #  \n @ref swig_CreateGroup "Example 2"
13264         @ManageTransactions("GroupOp")
13265         def CreateGroup(self, theMainShape, theShapeType, theName=None):
13266             """
13267             Creates a new group which will store sub-shapes of theMainShape
13268
13269             Parameters:
13270                theMainShape is a GEOM object on which the group is selected
13271                theShapeType defines a shape type of the group:"COMPOUND", "COMPSOLID",
13272                             "SOLID", "SHELL", "FACE", "WIRE", "EDGE", "VERTEX", "SHAPE".
13273                 theName Object name; when specified, this parameter is used
13274                         for result publication in the study. Otherwise, if automatic
13275                         publication is switched on, default value is used for result name.
13276
13277             Returns:
13278                a newly created GEOM group
13279
13280             Example of usage:
13281                 group = geompy.CreateGroup(Box, geompy.ShapeType["FACE"])
13282
13283             """
13284             # Example: see GEOM_TestOthers.py
13285             anObj = self.GroupOp.CreateGroup(theMainShape, theShapeType)
13286             RaiseIfFailed("CreateGroup", self.GroupOp)
13287             self._autoPublish(anObj, theName, "group")
13288             return anObj
13289
13290         ## Adds a sub-object with ID theSubShapeId to the group
13291         #  @param theGroup is a GEOM group to which the new sub-shape is added
13292         #  @param theSubShapeID is a sub-shape ID in the main object.
13293         #  \note Use method GetSubShapeID() to get an unique ID of the sub-shape
13294         #
13295         #  @ref tui_working_with_groups_page "Example"
13296         @ManageTransactions("GroupOp")
13297         def AddObject(self,theGroup, theSubShapeID):
13298             """
13299             Adds a sub-object with ID theSubShapeId to the group
13300
13301             Parameters:
13302                 theGroup       is a GEOM group to which the new sub-shape is added
13303                 theSubShapeID  is a sub-shape ID in the main object.
13304
13305             Note:
13306                 Use method GetSubShapeID() to get an unique ID of the sub-shape
13307             """
13308             # Example: see GEOM_TestOthers.py
13309             self.GroupOp.AddObject(theGroup, theSubShapeID)
13310             if self.GroupOp.GetErrorCode() != "PAL_ELEMENT_ALREADY_PRESENT":
13311                 RaiseIfFailed("AddObject", self.GroupOp)
13312                 pass
13313             pass
13314
13315         ## Removes a sub-object with ID \a theSubShapeId from the group
13316         #  @param theGroup is a GEOM group from which the new sub-shape is removed
13317         #  @param theSubShapeID is a sub-shape ID in the main object.
13318         #  \note Use method GetSubShapeID() to get an unique ID of the sub-shape
13319         #
13320         #  @ref tui_working_with_groups_page "Example"
13321         @ManageTransactions("GroupOp")
13322         def RemoveObject(self,theGroup, theSubShapeID):
13323             """
13324             Removes a sub-object with ID theSubShapeId from the group
13325
13326             Parameters:
13327                 theGroup is a GEOM group from which the new sub-shape is removed
13328                 theSubShapeID is a sub-shape ID in the main object.
13329
13330             Note:
13331                 Use method GetSubShapeID() to get an unique ID of the sub-shape
13332             """
13333             # Example: see GEOM_TestOthers.py
13334             self.GroupOp.RemoveObject(theGroup, theSubShapeID)
13335             RaiseIfFailed("RemoveObject", self.GroupOp)
13336             pass
13337
13338         ## Adds to the group all the given shapes. No errors, if some shapes are already included.
13339         #  @param theGroup is a GEOM group to which the new sub-shapes are added.
13340         #  @param theSubShapes is a list of sub-shapes to be added.
13341         #
13342         #  @ref tui_working_with_groups_page "Example"
13343         @ManageTransactions("GroupOp")
13344         def UnionList (self,theGroup, theSubShapes):
13345             """
13346             Adds to the group all the given shapes. No errors, if some shapes are already included.
13347
13348             Parameters:
13349                 theGroup is a GEOM group to which the new sub-shapes are added.
13350                 theSubShapes is a list of sub-shapes to be added.
13351             """
13352             # Example: see GEOM_TestOthers.py
13353             self.GroupOp.UnionList(theGroup, theSubShapes)
13354             RaiseIfFailed("UnionList", self.GroupOp)
13355             pass
13356
13357         ## Adds to the group all the given shapes. No errors, if some shapes are already included.
13358         #  @param theGroup is a GEOM group to which the new sub-shapes are added.
13359         #  @param theSubShapes is a list of indices of sub-shapes to be added.
13360         #
13361         #  @ref swig_UnionIDs "Example"
13362         @ManageTransactions("GroupOp")
13363         def UnionIDs(self,theGroup, theSubShapes):
13364             """
13365             Adds to the group all the given shapes. No errors, if some shapes are already included.
13366
13367             Parameters:
13368                 theGroup is a GEOM group to which the new sub-shapes are added.
13369                 theSubShapes is a list of indices of sub-shapes to be added.
13370             """
13371             # Example: see GEOM_TestOthers.py
13372             self.GroupOp.UnionIDs(theGroup, theSubShapes)
13373             RaiseIfFailed("UnionIDs", self.GroupOp)
13374             pass
13375
13376         ## Removes from the group all the given shapes. No errors, if some shapes are not included.
13377         #  @param theGroup is a GEOM group from which the sub-shapes are removed.
13378         #  @param theSubShapes is a list of sub-shapes to be removed.
13379         #
13380         #  @ref tui_working_with_groups_page "Example"
13381         @ManageTransactions("GroupOp")
13382         def DifferenceList (self,theGroup, theSubShapes):
13383             """
13384             Removes from the group all the given shapes. No errors, if some shapes are not included.
13385
13386             Parameters:
13387                 theGroup is a GEOM group from which the sub-shapes are removed.
13388                 theSubShapes is a list of sub-shapes to be removed.
13389             """
13390             # Example: see GEOM_TestOthers.py
13391             self.GroupOp.DifferenceList(theGroup, theSubShapes)
13392             RaiseIfFailed("DifferenceList", self.GroupOp)
13393             pass
13394
13395         ## Removes from the group all the given shapes. No errors, if some shapes are not included.
13396         #  @param theGroup is a GEOM group from which the sub-shapes are removed.
13397         #  @param theSubShapes is a list of indices of sub-shapes to be removed.
13398         #
13399         #  @ref swig_DifferenceIDs "Example"
13400         @ManageTransactions("GroupOp")
13401         def DifferenceIDs(self,theGroup, theSubShapes):
13402             """
13403             Removes from the group all the given shapes. No errors, if some shapes are not included.
13404
13405             Parameters:
13406                 theGroup is a GEOM group from which the sub-shapes are removed.
13407                 theSubShapes is a list of indices of sub-shapes to be removed.
13408             """
13409             # Example: see GEOM_TestOthers.py
13410             self.GroupOp.DifferenceIDs(theGroup, theSubShapes)
13411             RaiseIfFailed("DifferenceIDs", self.GroupOp)
13412             pass
13413
13414         ## Union of two groups.
13415         #  New group is created. It will contain all entities
13416         #  which are present in groups theGroup1 and theGroup2.
13417         #  @param theGroup1, theGroup2 are the initial GEOM groups
13418         #                              to create the united group from.
13419         #  @param theName Object name; when specified, this parameter is used
13420         #         for result publication in the study. Otherwise, if automatic
13421         #         publication is switched on, default value is used for result name.
13422         #
13423         #  @return a newly created GEOM group.
13424         #
13425         #  @ref tui_union_groups_anchor "Example"
13426         @ManageTransactions("GroupOp")
13427         def UnionGroups (self, theGroup1, theGroup2, theName=None):
13428             """
13429             Union of two groups.
13430             New group is created. It will contain all entities
13431             which are present in groups theGroup1 and theGroup2.
13432
13433             Parameters:
13434                 theGroup1, theGroup2 are the initial GEOM groups
13435                                      to create the united group from.
13436                 theName Object name; when specified, this parameter is used
13437                         for result publication in the study. Otherwise, if automatic
13438                         publication is switched on, default value is used for result name.
13439
13440             Returns:
13441                 a newly created GEOM group.
13442             """
13443             # Example: see GEOM_TestOthers.py
13444             aGroup = self.GroupOp.UnionGroups(theGroup1, theGroup2)
13445             RaiseIfFailed("UnionGroups", self.GroupOp)
13446             self._autoPublish(aGroup, theName, "group")
13447             return aGroup
13448
13449         ## Intersection of two groups.
13450         #  New group is created. It will contain only those entities
13451         #  which are present in both groups theGroup1 and theGroup2.
13452         #  @param theGroup1, theGroup2 are the initial GEOM groups to get common part of.
13453         #  @param theName Object name; when specified, this parameter is used
13454         #         for result publication in the study. Otherwise, if automatic
13455         #         publication is switched on, default value is used for result name.
13456         #
13457         #  @return a newly created GEOM group.
13458         #
13459         #  @ref tui_intersect_groups_anchor "Example"
13460         @ManageTransactions("GroupOp")
13461         def IntersectGroups (self, theGroup1, theGroup2, theName=None):
13462             """
13463             Intersection of two groups.
13464             New group is created. It will contain only those entities
13465             which are present in both groups theGroup1 and theGroup2.
13466
13467             Parameters:
13468                 theGroup1, theGroup2 are the initial GEOM groups to get common part of.
13469                 theName Object name; when specified, this parameter is used
13470                         for result publication in the study. Otherwise, if automatic
13471                         publication is switched on, default value is used for result name.
13472
13473             Returns:
13474                 a newly created GEOM group.
13475             """
13476             # Example: see GEOM_TestOthers.py
13477             aGroup = self.GroupOp.IntersectGroups(theGroup1, theGroup2)
13478             RaiseIfFailed("IntersectGroups", self.GroupOp)
13479             self._autoPublish(aGroup, theName, "group")
13480             return aGroup
13481
13482         ## Cut of two groups.
13483         #  New group is created. It will contain entities which are
13484         #  present in group theGroup1 but are not present in group theGroup2.
13485         #  @param theGroup1 is a GEOM group to include elements of.
13486         #  @param theGroup2 is a GEOM group to exclude elements of.
13487         #  @param theName Object name; when specified, this parameter is used
13488         #         for result publication in the study. Otherwise, if automatic
13489         #         publication is switched on, default value is used for result name.
13490         #
13491         #  @return a newly created GEOM group.
13492         #
13493         #  @ref tui_cut_groups_anchor "Example"
13494         @ManageTransactions("GroupOp")
13495         def CutGroups (self, theGroup1, theGroup2, theName=None):
13496             """
13497             Cut of two groups.
13498             New group is created. It will contain entities which are
13499             present in group theGroup1 but are not present in group theGroup2.
13500
13501             Parameters:
13502                 theGroup1 is a GEOM group to include elements of.
13503                 theGroup2 is a GEOM group to exclude elements of.
13504                 theName Object name; when specified, this parameter is used
13505                         for result publication in the study. Otherwise, if automatic
13506                         publication is switched on, default value is used for result name.
13507
13508             Returns:
13509                 a newly created GEOM group.
13510             """
13511             # Example: see GEOM_TestOthers.py
13512             aGroup = self.GroupOp.CutGroups(theGroup1, theGroup2)
13513             RaiseIfFailed("CutGroups", self.GroupOp)
13514             self._autoPublish(aGroup, theName, "group")
13515             return aGroup
13516
13517         ## Union of list of groups.
13518         #  New group is created. It will contain all entities that are
13519         #  present in groups listed in theGList.
13520         #  @param theGList is a list of GEOM groups to create the united group from.
13521         #  @param theName Object name; when specified, this parameter is used
13522         #         for result publication in the study. Otherwise, if automatic
13523         #         publication is switched on, default value is used for result name.
13524         #
13525         #  @return a newly created GEOM group.
13526         #
13527         #  @ref tui_union_groups_anchor "Example"
13528         @ManageTransactions("GroupOp")
13529         def UnionListOfGroups (self, theGList, theName=None):
13530             """
13531             Union of list of groups.
13532             New group is created. It will contain all entities that are
13533             present in groups listed in theGList.
13534
13535             Parameters:
13536                 theGList is a list of GEOM groups to create the united group from.
13537                 theName Object name; when specified, this parameter is used
13538                         for result publication in the study. Otherwise, if automatic
13539                         publication is switched on, default value is used for result name.
13540
13541             Returns:
13542                 a newly created GEOM group.
13543             """
13544             # Example: see GEOM_TestOthers.py
13545             aGroup = self.GroupOp.UnionListOfGroups(theGList)
13546             RaiseIfFailed("UnionListOfGroups", self.GroupOp)
13547             self._autoPublish(aGroup, theName, "group")
13548             return aGroup
13549
13550         ## Cut of lists of groups.
13551         #  New group is created. It will contain only entities
13552         #  which are present in groups listed in theGList.
13553         #  @param theGList is a list of GEOM groups to include elements of.
13554         #  @param theName Object name; when specified, this parameter is used
13555         #         for result publication in the study. Otherwise, if automatic
13556         #         publication is switched on, default value is used for result name.
13557         #
13558         #  @return a newly created GEOM group.
13559         #
13560         #  @ref tui_intersect_groups_anchor "Example"
13561         @ManageTransactions("GroupOp")
13562         def IntersectListOfGroups (self, theGList, theName=None):
13563             """
13564             Cut of lists of groups.
13565             New group is created. It will contain only entities
13566             which are present in groups listed in theGList.
13567
13568             Parameters:
13569                 theGList is a list of GEOM groups to include elements of.
13570                 theName Object name; when specified, this parameter is used
13571                         for result publication in the study. Otherwise, if automatic
13572                         publication is switched on, default value is used for result name.
13573
13574             Returns:
13575                 a newly created GEOM group.
13576             """
13577             # Example: see GEOM_TestOthers.py
13578             aGroup = self.GroupOp.IntersectListOfGroups(theGList)
13579             RaiseIfFailed("IntersectListOfGroups", self.GroupOp)
13580             self._autoPublish(aGroup, theName, "group")
13581             return aGroup
13582
13583         ## Cut of lists of groups.
13584         #  New group is created. It will contain only entities
13585         #  which are present in groups listed in theGList1 but
13586         #  are not present in groups from theGList2.
13587         #  @param theGList1 is a list of GEOM groups to include elements of.
13588         #  @param theGList2 is a list of GEOM groups to exclude elements of.
13589         #  @param theName Object name; when specified, this parameter is used
13590         #         for result publication in the study. Otherwise, if automatic
13591         #         publication is switched on, default value is used for result name.
13592         #
13593         #  @return a newly created GEOM group.
13594         #
13595         #  @ref tui_cut_groups_anchor "Example"
13596         @ManageTransactions("GroupOp")
13597         def CutListOfGroups (self, theGList1, theGList2, theName=None):
13598             """
13599             Cut of lists of groups.
13600             New group is created. It will contain only entities
13601             which are present in groups listed in theGList1 but
13602             are not present in groups from theGList2.
13603
13604             Parameters:
13605                 theGList1 is a list of GEOM groups to include elements of.
13606                 theGList2 is a list of GEOM groups to exclude elements of.
13607                 theName Object name; when specified, this parameter is used
13608                         for result publication in the study. Otherwise, if automatic
13609                         publication is switched on, default value is used for result name.
13610
13611             Returns:
13612                 a newly created GEOM group.
13613             """
13614             # Example: see GEOM_TestOthers.py
13615             aGroup = self.GroupOp.CutListOfGroups(theGList1, theGList2)
13616             RaiseIfFailed("CutListOfGroups", self.GroupOp)
13617             self._autoPublish(aGroup, theName, "group")
13618             return aGroup
13619
13620         ## Returns a list of sub-objects ID stored in the group
13621         #  @param theGroup is a GEOM group for which a list of IDs is requested
13622         #
13623         #  @ref swig_GetObjectIDs "Example"
13624         @ManageTransactions("GroupOp")
13625         def GetObjectIDs(self,theGroup):
13626             """
13627             Returns a list of sub-objects ID stored in the group
13628
13629             Parameters:
13630                 theGroup is a GEOM group for which a list of IDs is requested
13631             """
13632             # Example: see GEOM_TestOthers.py
13633             ListIDs = self.GroupOp.GetObjects(theGroup)
13634             RaiseIfFailed("GetObjects", self.GroupOp)
13635             return ListIDs
13636
13637         ## Returns a type of sub-objects stored in the group
13638         #  @param theGroup is a GEOM group which type is returned.
13639         #
13640         #  @ref swig_GetType "Example"
13641         @ManageTransactions("GroupOp")
13642         def GetType(self,theGroup):
13643             """
13644             Returns a type of sub-objects stored in the group
13645
13646             Parameters:
13647                 theGroup is a GEOM group which type is returned.
13648             """
13649             # Example: see GEOM_TestOthers.py
13650             aType = self.GroupOp.GetType(theGroup)
13651             RaiseIfFailed("GetType", self.GroupOp)
13652             return aType
13653
13654         ## Convert a type of geom object from id to string value
13655         #  @param theId is a GEOM object type id.
13656         #  @return type of geom object (POINT, VECTOR, PLANE, LINE, TORUS, ... )
13657         #  @ref swig_GetType "Example"
13658         def ShapeIdToType(self, theId):
13659             """
13660             Convert a type of geom object from id to string value
13661
13662             Parameters:
13663                 theId is a GEOM object type id.
13664
13665             Returns:
13666                 type of geom object (POINT, VECTOR, PLANE, LINE, TORUS, ... )
13667             """
13668             if theId == 0:
13669                 return "COPY"
13670             if theId == 1:
13671                 return "IMPORT"
13672             if theId == 2:
13673                 return "POINT"
13674             if theId == 3:
13675                 return "VECTOR"
13676             if theId == 4:
13677                 return "PLANE"
13678             if theId == 5:
13679                 return "LINE"
13680             if theId == 6:
13681                 return "TORUS"
13682             if theId == 7:
13683                 return "BOX"
13684             if theId == 8:
13685                 return "CYLINDER"
13686             if theId == 9:
13687                 return "CONE"
13688             if theId == 10:
13689                 return "SPHERE"
13690             if theId == 11:
13691                 return "PRISM"
13692             if theId == 12:
13693                 return "REVOLUTION"
13694             if theId == 13:
13695                 return "BOOLEAN"
13696             if theId == 14:
13697                 return "PARTITION"
13698             if theId == 15:
13699                 return "POLYLINE"
13700             if theId == 16:
13701                 return "CIRCLE"
13702             if theId == 17:
13703                 return "SPLINE"
13704             if theId == 18:
13705                 return "ELLIPSE"
13706             if theId == 19:
13707                 return "CIRC_ARC"
13708             if theId == 20:
13709                 return "FILLET"
13710             if theId == 21:
13711                 return "CHAMFER"
13712             if theId == 22:
13713                 return "EDGE"
13714             if theId == 23:
13715                 return "WIRE"
13716             if theId == 24:
13717                 return "FACE"
13718             if theId == 25:
13719                 return "SHELL"
13720             if theId == 26:
13721                 return "SOLID"
13722             if theId == 27:
13723                 return "COMPOUND"
13724             if theId == 28:
13725                 return "SUBSHAPE"
13726             if theId == 29:
13727                 return "PIPE"
13728             if theId == 30:
13729                 return "ARCHIMEDE"
13730             if theId == 31:
13731                 return "FILLING"
13732             if theId == 32:
13733                 return "EXPLODE"
13734             if theId == 33:
13735                 return "GLUED"
13736             if theId == 34:
13737                 return "SKETCHER"
13738             if theId == 35:
13739                 return "CDG"
13740             if theId == 36:
13741                 return "FREE_BOUNDS"
13742             if theId == 37:
13743                 return "GROUP"
13744             if theId == 38:
13745                 return "BLOCK"
13746             if theId == 39:
13747                 return "MARKER"
13748             if theId == 40:
13749                 return "THRUSECTIONS"
13750             if theId == 41:
13751                 return "COMPOUNDFILTER"
13752             if theId == 42:
13753                 return "SHAPES_ON_SHAPE"
13754             if theId == 43:
13755                 return "ELLIPSE_ARC"
13756             if theId == 44:
13757                 return "3DSKETCHER"
13758             if theId == 45:
13759                 return "FILLET_2D"
13760             if theId == 46:
13761                 return "FILLET_1D"
13762             if theId == 201:
13763                 return "PIPETSHAPE"
13764             return "Shape Id not exist."
13765
13766         ## Returns a main shape associated with the group
13767         #  @param theGroup is a GEOM group for which a main shape object is requested
13768         #  @return a GEOM object which is a main shape for theGroup
13769         #
13770         #  @ref swig_GetMainShape "Example"
13771         @ManageTransactions("GroupOp")
13772         def GetMainShape(self,theGroup):
13773             """
13774             Returns a main shape associated with the group
13775
13776             Parameters:
13777                 theGroup is a GEOM group for which a main shape object is requested
13778
13779             Returns:
13780                 a GEOM object which is a main shape for theGroup
13781
13782             Example of usage: BoxCopy = geompy.GetMainShape(CreateGroup)
13783             """
13784             # Example: see GEOM_TestOthers.py
13785             anObj = self.GroupOp.GetMainShape(theGroup)
13786             RaiseIfFailed("GetMainShape", self.GroupOp)
13787             return anObj
13788
13789         ## Create group of edges of theShape, whose length is in range [min_length, max_length].
13790         #  If include_min/max == 0, edges with length == min/max_length will not be included in result.
13791         #  @param theShape given shape (see GEOM.GEOM_Object)
13792         #  @param min_length minimum length of edges of theShape
13793         #  @param max_length maximum length of edges of theShape
13794         #  @param include_max indicating if edges with length == max_length should be included in result, 1-yes, 0-no (default=1)
13795         #  @param include_min indicating if edges with length == min_length should be included in result, 1-yes, 0-no (default=1)
13796         #  @param theName Object name; when specified, this parameter is used
13797         #         for result publication in the study. Otherwise, if automatic
13798         #         publication is switched on, default value is used for result name.
13799         #
13800         #  @return a newly created GEOM group of edges
13801         #
13802         #  @@ref swig_todo "Example"
13803         def GetEdgesByLength (self, theShape, min_length, max_length, include_min = 1, include_max = 1, theName=None):
13804             """
13805             Create group of edges of theShape, whose length is in range [min_length, max_length].
13806             If include_min/max == 0, edges with length == min/max_length will not be included in result.
13807
13808             Parameters:
13809                 theShape given shape
13810                 min_length minimum length of edges of theShape
13811                 max_length maximum length of edges of theShape
13812                 include_max indicating if edges with length == max_length should be included in result, 1-yes, 0-no (default=1)
13813                 include_min indicating if edges with length == min_length should be included in result, 1-yes, 0-no (default=1)
13814                 theName Object name; when specified, this parameter is used
13815                         for result publication in the study. Otherwise, if automatic
13816                         publication is switched on, default value is used for result name.
13817
13818              Returns:
13819                 a newly created GEOM group of edges.
13820             """
13821             edges = self.SubShapeAll(theShape, self.ShapeType["EDGE"])
13822             edges_in_range = []
13823             for edge in edges:
13824                 Props = self.BasicProperties(edge)
13825                 if min_length <= Props[0] and Props[0] <= max_length:
13826                     if (not include_min) and (min_length == Props[0]):
13827                         skip = 1
13828                     else:
13829                         if (not include_max) and (Props[0] == max_length):
13830                             skip = 1
13831                         else:
13832                             edges_in_range.append(edge)
13833
13834             if len(edges_in_range) <= 0:
13835                 print("No edges found by given criteria")
13836                 return None
13837
13838             # note: auto-publishing is done in self.CreateGroup()
13839             group_edges = self.CreateGroup(theShape, self.ShapeType["EDGE"], theName)
13840             self.UnionList(group_edges, edges_in_range)
13841
13842             return group_edges
13843
13844         ## Create group of edges of selected shape, whose length is in range [min_length, max_length].
13845         #  If include_min/max == 0, edges with length == min/max_length will not be included in result.
13846         #  @param min_length minimum length of edges of selected shape
13847         #  @param max_length maximum length of edges of selected shape
13848         #  @param include_max indicating if edges with length == max_length should be included in result, 1-yes, 0-no (default=1)
13849         #  @param include_min indicating if edges with length == min_length should be included in result, 1-yes, 0-no (default=1)
13850         #  @return a newly created GEOM group of edges
13851         #  @ref swig_todo "Example"
13852         def SelectEdges (self, min_length, max_length, include_min = 1, include_max = 1):
13853             """
13854             Create group of edges of selected shape, whose length is in range [min_length, max_length].
13855             If include_min/max == 0, edges with length == min/max_length will not be included in result.
13856
13857             Parameters:
13858                 min_length minimum length of edges of selected shape
13859                 max_length maximum length of edges of selected shape
13860                 include_max indicating if edges with length == max_length should be included in result, 1-yes, 0-no (default=1)
13861                 include_min indicating if edges with length == min_length should be included in result, 1-yes, 0-no (default=1)
13862
13863              Returns:
13864                 a newly created GEOM group of edges.
13865             """
13866             nb_selected = sg.SelectedCount()
13867             if nb_selected < 1:
13868                 print("Select a shape before calling this function, please.")
13869                 return 0
13870             if nb_selected > 1:
13871                 print("Only one shape must be selected")
13872                 return 0
13873
13874             id_shape = sg.getSelected(0)
13875             shape = IDToObject( id_shape )
13876
13877             group_edges = self.GetEdgesByLength(shape, min_length, max_length, include_min, include_max)
13878
13879             left_str  = " < "
13880             right_str = " < "
13881             if include_min: left_str  = " <= "
13882             if include_max: right_str  = " <= "
13883
13884             self.addToStudyInFather(shape, group_edges, "Group of edges with " + repr(min_length)
13885                                     + left_str + "length" + right_str + repr(max_length))
13886
13887             sg.updateObjBrowser()
13888
13889             return group_edges
13890
13891         # end of l3_groups
13892         ## @}
13893
13894         #@@ insert new functions before this line @@ do not remove this line @@#
13895
13896         ## Create a copy of the given object
13897         #
13898         #  @param theOriginal geometry object for copy
13899         #  @param theName Object name; when specified, this parameter is used
13900         #         for result publication in the study. Otherwise, if automatic
13901         #         publication is switched on, default value is used for result name.
13902         #
13903         #  @return New GEOM_Object, containing the copied shape.
13904         #
13905         #  @ingroup l1_geomBuilder_auxiliary
13906         #  @ref swig_MakeCopy "Example"
13907         @ManageTransactions("InsertOp")
13908         def MakeCopy(self, theOriginal, theName=None):
13909             """
13910             Create a copy of the given object
13911
13912             Parameters:
13913                 theOriginal geometry object for copy
13914                 theName Object name; when specified, this parameter is used
13915                         for result publication in the study. Otherwise, if automatic
13916                         publication is switched on, default value is used for result name.
13917
13918             Returns:
13919                 New GEOM_Object, containing the copied shape.
13920
13921             Example of usage: Copy = geompy.MakeCopy(Box)
13922             """
13923             # Example: see GEOM_TestAll.py
13924             anObj = self.InsertOp.MakeCopy(theOriginal)
13925             RaiseIfFailed("MakeCopy", self.InsertOp)
13926             self._autoPublish(anObj, theName, "copy")
13927             return anObj
13928
13929         ## Add Path to load python scripts from
13930         #  @param Path a path to load python scripts from
13931         #  @ingroup l1_geomBuilder_auxiliary
13932         def addPath(self,Path):
13933             """
13934             Add Path to load python scripts from
13935
13936             Parameters:
13937                 Path a path to load python scripts from
13938             """
13939             if (sys.path.count(Path) < 1):
13940                 sys.path.append(Path)
13941                 pass
13942             pass
13943
13944         ## Load marker texture from the file
13945         #  @param Path a path to the texture file
13946         #  @return unique texture identifier
13947         #  @ingroup l1_geomBuilder_auxiliary
13948         @ManageTransactions("InsertOp")
13949         def LoadTexture(self, Path):
13950             """
13951             Load marker texture from the file
13952
13953             Parameters:
13954                 Path a path to the texture file
13955
13956             Returns:
13957                 unique texture identifier
13958             """
13959             # Example: see GEOM_TestAll.py
13960             ID = self.InsertOp.LoadTexture(Path)
13961             RaiseIfFailed("LoadTexture", self.InsertOp)
13962             return ID
13963
13964         ## Get internal name of the object based on its study entry
13965         #  @note This method does not provide an unique identifier of the geometry object.
13966         #  @note This is internal function of GEOM component, though it can be used outside it for
13967         #  appropriate reason (e.g. for identification of geometry object).
13968         #  @param obj geometry object
13969         #  @return unique object identifier
13970         #  @ingroup l1_geomBuilder_auxiliary
13971         def getObjectID(self, obj):
13972             """
13973             Get internal name of the object based on its study entry.
13974             Note: this method does not provide an unique identifier of the geometry object.
13975             It is an internal function of GEOM component, though it can be used outside GEOM for
13976             appropriate reason (e.g. for identification of geometry object).
13977
13978             Parameters:
13979                 obj geometry object
13980
13981             Returns:
13982                 unique object identifier
13983             """
13984             ID = ""
13985             entry = salome.ObjectToID(obj)
13986             if entry is not None:
13987                 lst = entry.split(":")
13988                 if len(lst) > 0:
13989                     ID = lst[-1] # -1 means last item in the list
13990                     return "GEOM_" + ID
13991             return ID
13992
13993
13994
13995         ## Add marker texture. @a Width and @a Height parameters
13996         #  specify width and height of the texture in pixels.
13997         #  If @a RowData is @c True, @a Texture parameter should represent texture data
13998         #  packed into the byte array. If @a RowData is @c False (default), @a Texture
13999         #  parameter should be unpacked string, in which '1' symbols represent opaque
14000         #  pixels and '0' represent transparent pixels of the texture bitmap.
14001         #
14002         #  @param Width texture width in pixels
14003         #  @param Height texture height in pixels
14004         #  @param Texture texture data
14005         #  @param RowData if @c True, @a Texture data are packed in the byte stream
14006         #  @return unique texture identifier
14007         #  @ingroup l1_geomBuilder_auxiliary
14008         @ManageTransactions("InsertOp")
14009         def AddTexture(self, Width, Height, Texture, RowData=False):
14010             """
14011             Add marker texture. Width and Height parameters
14012             specify width and height of the texture in pixels.
14013             If RowData is True, Texture parameter should represent texture data
14014             packed into the byte array. If RowData is False (default), Texture
14015             parameter should be unpacked string, in which '1' symbols represent opaque
14016             pixels and '0' represent transparent pixels of the texture bitmap.
14017
14018             Parameters:
14019                 Width texture width in pixels
14020                 Height texture height in pixels
14021                 Texture texture data
14022                 RowData if True, Texture data are packed in the byte stream
14023
14024             Returns:
14025                 return unique texture identifier
14026             """
14027             if not RowData: Texture = PackData(Texture)
14028             ID = self.InsertOp.AddTexture(Width, Height, Texture)
14029             RaiseIfFailed("AddTexture", self.InsertOp)
14030             return ID
14031
14032         ## Transfer not topological data from one GEOM object to another.
14033         #
14034         #  @param theObjectFrom the source object of non-topological data
14035         #  @param theObjectTo the destination object of non-topological data
14036         #  @param theFindMethod method to search sub-shapes of theObjectFrom
14037         #         in shape theObjectTo. Possible values are: GEOM.FSM_GetInPlace,
14038         #         GEOM.FSM_GetInPlaceByHistory and GEOM.FSM_GetInPlace_Old.
14039         #         Other values of GEOM.find_shape_method are not supported.
14040         #
14041         #  @return True in case of success; False otherwise.
14042         #
14043         #  @ingroup l1_geomBuilder_auxiliary
14044         #
14045         #  @ref swig_TransferData "Example"
14046         @ManageTransactions("InsertOp")
14047         def TransferData(self, theObjectFrom, theObjectTo,
14048                          theFindMethod=GEOM.FSM_GetInPlace):
14049             """
14050             Transfer not topological data from one GEOM object to another.
14051
14052             Parameters:
14053                 theObjectFrom the source object of non-topological data
14054                 theObjectTo the destination object of non-topological data
14055                 theFindMethod method to search sub-shapes of theObjectFrom
14056                               in shape theObjectTo. Possible values are:
14057                               GEOM.FSM_GetInPlace, GEOM.FSM_GetInPlaceByHistory
14058                               and GEOM.FSM_GetInPlace_Old. Other values of
14059                               GEOM.find_shape_method are not supported.
14060
14061             Returns:
14062                 True in case of success; False otherwise.
14063
14064             # Example: see GEOM_TestOthers.py
14065             """
14066             # Example: see GEOM_TestAll.py
14067             isOk = self.InsertOp.TransferData(theObjectFrom,
14068                                                theObjectTo, theFindMethod)
14069             RaiseIfFailed("TransferData", self.InsertOp)
14070             return isOk
14071
14072         ## Creates a new folder object. It is a container for any GEOM objects.
14073         #  @param Name name of the container
14074         #  @param Father parent object. If None,
14075         #         folder under 'Geometry' root object will be created.
14076         #  @return a new created folder
14077         #  @ingroup l1_publish_data
14078         def NewFolder(self, Name, Father=None):
14079             """
14080             Create a new folder object. It is an auxiliary container for any GEOM objects.
14081
14082             Parameters:
14083                 Name name of the container
14084                 Father parent object. If None,
14085                 folder under 'Geometry' root object will be created.
14086
14087             Returns:
14088                 a new created folder
14089             """
14090             return self.CreateFolder(Name, Father)
14091
14092         ## Move object to the specified folder
14093         #  @param Object object to move
14094         #  @param Folder target folder
14095         #  @ingroup l1_publish_data
14096         def PutToFolder(self, Object, Folder):
14097             """
14098             Move object to the specified folder
14099
14100             Parameters:
14101                 Object object to move
14102                 Folder target folder
14103             """
14104             self.MoveToFolder(Object, Folder)
14105             pass
14106
14107         ## Move list of objects to the specified folder
14108         #  @param ListOfSO list of objects to move
14109         #  @param Folder target folder
14110         #  @ingroup l1_publish_data
14111         def PutListToFolder(self, ListOfSO, Folder):
14112             """
14113             Move list of objects to the specified folder
14114
14115             Parameters:
14116                 ListOfSO list of objects to move
14117                 Folder target folder
14118             """
14119             self.MoveListToFolder(ListOfSO, Folder)
14120             pass
14121
14122         ## @addtogroup l2_field
14123         ## @{
14124
14125         ## Creates a field
14126         #  @param shape the shape the field lies on
14127         #  @param name the field name
14128         #  @param type type of field data: 0 - bool, 1 - int, 2 - double, 3 - string
14129         #  @param dimension dimension of the shape the field lies on
14130         #         0 - VERTEX, 1 - EDGE, 2 - FACE, 3 - SOLID, -1 - whole shape
14131         #  @param componentNames names of components
14132         #  @return a created field
14133         @ManageTransactions("FieldOp")
14134         def CreateField(self, shape, name, type, dimension, componentNames):
14135             """
14136             Creates a field
14137
14138             Parameters:
14139                 shape the shape the field lies on
14140                 name  the field name
14141                 type  type of field data
14142                 dimension dimension of the shape the field lies on
14143                           0 - VERTEX, 1 - EDGE, 2 - FACE, 3 - SOLID, -1 - whole shape
14144                 componentNames names of components
14145
14146             Returns:
14147                 a created field
14148             """
14149             if isinstance( type, int ):
14150                 if type < 0 or type > 3:
14151                     raise RuntimeError("CreateField : Error: data type must be within [0-3] range")
14152                 type = [GEOM.FDT_Bool,GEOM.FDT_Int,GEOM.FDT_Double,GEOM.FDT_String][type]
14153
14154             f = self.FieldOp.CreateField( shape, name, type, dimension, componentNames)
14155             RaiseIfFailed("CreateField", self.FieldOp)
14156             global geom
14157             geom._autoPublish( f, "", name)
14158             return f
14159
14160         ## Removes a field from the GEOM component
14161         #  @param field the field to remove
14162         def RemoveField(self, field):
14163             "Removes a field from the GEOM component"
14164             global geom
14165             if isinstance( field, GEOM._objref_GEOM_Field ):
14166                 geom.RemoveObject( field )
14167             elif isinstance( field, geomField ):
14168                 geom.RemoveObject( field.field )
14169             else:
14170                 raise RuntimeError("RemoveField() : the object is not a field")
14171             return
14172
14173         ## Returns number of fields on a shape
14174         @ManageTransactions("FieldOp")
14175         def CountFields(self, shape):
14176             "Returns number of fields on a shape"
14177             nb = self.FieldOp.CountFields( shape )
14178             RaiseIfFailed("CountFields", self.FieldOp)
14179             return nb
14180
14181         ## Returns all fields on a shape
14182         @ManageTransactions("FieldOp")
14183         def GetFields(self, shape):
14184             "Returns all fields on a shape"
14185             ff = self.FieldOp.GetFields( shape )
14186             RaiseIfFailed("GetFields", self.FieldOp)
14187             return ff
14188
14189         ## Returns a field on a shape by its name
14190         @ManageTransactions("FieldOp")
14191         def GetField(self, shape, name):
14192             "Returns a field on a shape by its name"
14193             f = self.FieldOp.GetField( shape, name )
14194             RaiseIfFailed("GetField", self.FieldOp)
14195             return f
14196
14197         # end of l2_field
14198         ## @}
14199
14200         ## @addtogroup l2_testing
14201         ## @{
14202
14203         ## Build a mesh on the given shape.
14204         # @param shape the source shape
14205         # @param linear_deflection linear deflection coefficient
14206         # @param is_relative says if given value of deflection is relative to shape's bounding box
14207         # @param angular_deflection angular deflection for edges in degrees
14208         # @return True in case of success; otherwise False.
14209         @ManageTransactions("TestOp")
14210         def Tesselate(self, shape, linear_deflection=0, is_relative=True, angular_deflection=0):
14211             """Build a mesh on the given shape.
14212
14213             Parameters:
14214                 shape the source shape
14215                 linear_deflection linear deflection coefficient
14216                 is_relative says if given value of deflection is relative to shape's bounding box
14217                 angular_deflection angular deflection for edges in degrees
14218
14219             Returns:
14220                 True in case of success; otherwise False.
14221             """
14222             if angular_deflection > 0:
14223                 angular_deflection = angular_deflection * math.pi / 180.
14224             r = self.TestOp.Tesselate(shape, linear_deflection, is_relative, angular_deflection)
14225             RaiseIfFailed("Tesselate", self.TestOp)
14226             return r
14227
14228         ## Obtain a shape checker
14229         #  @return An instance of @ref conformity.CheckConformity "CheckConformity" interface
14230         #
14231         #  @ref tui_conformity_page "Example"
14232         def CheckConformity (self, shape):
14233             """
14234             Obtain a shape checker.
14235
14236             Example of usage:
14237                 conf = geompy.CheckConformity(shape)
14238                 valid = conf.isValid()
14239                 si2d = conf.selfIntersected2D()
14240                 dist = conf.distantShapes()
14241                 small = conf.smallEdges()
14242                 interfer = cc.interferingSubshapes()
14243             """
14244             conf = CheckConformity (shape, self)
14245             return conf
14246
14247         ## Obtain a shape proximity calculator
14248         #  @return An instance of @ref proximity.ShapeProximity "ShapeProximity" interface
14249         #
14250         #  @ref tui_proximity_page "Example"
14251         def ShapeProximity (self):
14252             """
14253             Obtain a shape proximity calculator.
14254
14255             Example of usage:
14256                 prox = geompy.ShapeProximity()
14257                 value = prox.proximity(shape1, shape2)
14258             """
14259             prox = ShapeProximity (self)
14260             return prox
14261
14262         # end of l2_testing
14263         ## @}
14264
14265
14266 # Register the new proxy for GEOM_Gen
14267 omniORB.registerObjref(GEOM._objref_GEOM_Gen._NP_RepositoryId, geomBuilder)
14268
14269
14270 ## Field on Geometry
14271 #  @ingroup l2_field
14272 class geomField( GEOM._objref_GEOM_Field ):
14273
14274     def __init__(self, *args):
14275         GEOM._objref_GEOM_Field.__init__(self, *args)
14276         self.field = GEOM._objref_GEOM_Field
14277         return
14278
14279     ## Returns the shape the field lies on
14280     def getShape(self):
14281         "Returns the shape the field lies on"
14282         return self.field.GetShape(self)
14283
14284     ## Returns the field name
14285     def getName(self):
14286         "Returns the field name"
14287         return self.field.GetName(self)
14288
14289     ## Returns type of field data as integer [0-3]
14290     def getType(self):
14291         "Returns type of field data"
14292         return EnumToLong(self.field.GetDataType(self))
14293
14294     ## Returns type of field data:
14295     #  one of GEOM.FDT_Bool, GEOM.FDT_Int, GEOM.FDT_Double, GEOM.FDT_String
14296     def getTypeEnum(self):
14297         "Returns type of field data"
14298         return self.field.GetDataType(self)
14299
14300     ## Returns dimension of the shape the field lies on:
14301     #  0 - VERTEX, 1 - EDGE, 2 - FACE, 3 - SOLID, -1 - whole shape
14302     def getDimension(self):
14303         """Returns dimension of the shape the field lies on:
14304         0 - VERTEX, 1 - EDGE, 2 - FACE, 3 - SOLID, -1 - whole shape"""
14305         return self.field.GetDimension(self)
14306
14307     ## Returns names of components
14308     def getComponents(self):
14309         "Returns names of components"
14310         return self.field.GetComponents(self)
14311
14312     ## Adds a time step to the field
14313     #  @param step the time step number further used as the step identifier
14314     #  @param stamp the time step time
14315     #  @param values the values of the time step
14316     def addStep(self, step, stamp, values):
14317         "Adds a time step to the field"
14318         stp = self.field.AddStep( self, step, stamp )
14319         if not stp:
14320             raise RuntimeError("Field.addStep() : Error: step %s already exists in this field"%step)
14321         global geom
14322         geom._autoPublish( stp, "", "Step %s, %s"%(step,stamp))
14323         self.setValues( step, values )
14324         return stp
14325
14326     ## Remove a time step from the field
14327     def removeStep(self,step):
14328         "Remove a time step from the field"
14329         stepSO = None
14330         try:
14331             stepObj = self.field.GetStep( self, step )
14332             if stepObj:
14333                 stepSO = geom.myStudy.FindObjectID( stepObj.GetStudyEntry() )
14334         except:
14335             #import traceback
14336             #traceback.print_exc()
14337             pass
14338         self.field.RemoveStep( self, step )
14339         if stepSO:
14340             geom.myBuilder.RemoveObjectWithChildren( stepSO )
14341         return
14342
14343     ## Returns number of time steps in the field
14344     def countSteps(self):
14345         "Returns number of time steps in the field"
14346         return self.field.CountSteps(self)
14347
14348     ## Returns a list of time step IDs in the field
14349     def getSteps(self):
14350         "Returns a list of time step IDs in the field"
14351         return self.field.GetSteps(self)
14352
14353     ## Returns a time step by its ID
14354     def getStep(self,step):
14355         "Returns a time step by its ID"
14356         stp = self.field.GetStep(self, step)
14357         if not stp:
14358             raise RuntimeError("Step %s is missing from this field"%step)
14359         return stp
14360
14361     ## Returns the time of the field step
14362     def getStamp(self,step):
14363         "Returns the time of the field step"
14364         return self.getStep(step).GetStamp()
14365
14366     ## Changes the time of the field step
14367     def setStamp(self, step, stamp):
14368         "Changes the time of the field step"
14369         return self.getStep(step).SetStamp(stamp)
14370
14371     ## Returns values of the field step
14372     def getValues(self, step):
14373         "Returns values of the field step"
14374         return self.getStep(step).GetValues()
14375
14376     ## Changes values of the field step
14377     def setValues(self, step, values):
14378         "Changes values of the field step"
14379         stp = self.getStep(step)
14380         errBeg = "Field.setValues(values) : Error: "
14381         try:
14382             ok = stp.SetValues( values )
14383         except Exception as e:
14384             excStr = str(e)
14385             if excStr.find("WrongPythonType") > 0:
14386                 raise RuntimeError(errBeg +\
14387                       "wrong type of values, %s values are expected"%str(self.getTypeEnum())[4:])
14388             raise RuntimeError(errBeg + str(e))
14389         if not ok:
14390             nbOK = self.field.GetArraySize(self)
14391             nbKO = len(values)
14392             if nbOK != nbKO:
14393                 raise RuntimeError(errBeg + "len(values) must be %s but not %s"%(nbOK,nbKO))
14394             else:
14395                 raise RuntimeError(errBeg + "failed")
14396         return
14397
14398     pass # end of class geomField
14399
14400 # Register the new proxy for GEOM_Field
14401 omniORB.registerObjref(GEOM._objref_GEOM_Field._NP_RepositoryId, geomField)
14402
14403
14404 ## Create a new geomBuilder instance.The geomBuilder class provides the Python
14405 #  interface to GEOM operations.
14406 #
14407 #  Typical use is:
14408 #  \code
14409 #    import salome
14410 #    salome.salome_init()
14411 #    from salome.geom import geomBuilder
14412 #    geompy = geomBuilder.New()
14413 #  \endcode
14414 #  @param  instance  CORBA proxy of GEOM Engine. If None, the default Engine is used.
14415 #  @return geomBuilder instance
14416 def New( instance=None):
14417     """
14418     Create a new geomBuilder instance.The geomBuilder class provides the Python
14419     interface to GEOM operations.
14420
14421     Typical use is:
14422         import salome
14423         salome.salome_init()
14424         from salome.geom import geomBuilder
14425         geompy = geomBuilder.New()
14426
14427     Parameters:
14428         instance  CORBA proxy of GEOM Engine. If None, the default Engine is used.
14429     Returns:
14430         geomBuilder instance
14431     """
14432     #print "New geomBuilder ", study, instance
14433     global engine
14434     global geom
14435     global doLcc
14436     if instance and isinstance( instance, SALOMEDS._objref_Study ):
14437         import sys
14438         sys.stderr.write("Warning: 'study' argument is no more needed in geomBuilder.New(). Consider updating your script!!!\n\n")
14439         instance = None
14440     engine = instance
14441     if engine is None:
14442       doLcc = True
14443     geom = geomBuilder()
14444     assert isinstance(geom,geomBuilder), "Geom engine class is %s but should be geomBuilder.geomBuilder. Import geomBuilder before creating the instance."%geom.__class__
14445     geom.init_geom()
14446     return geom
14447
14448
14449 # Register methods from the plug-ins in the geomBuilder class 
14450 plugins_var = os.environ.get( "GEOM_PluginsList" )
14451
14452 plugins = None
14453 if plugins_var is not None:
14454     plugins = plugins_var.split( ":" )
14455     plugins=[x for x in plugins if len(x)>0]
14456 if plugins is not None:
14457     for pluginName in plugins:
14458         pluginBuilderName = pluginName + "Builder"
14459         try:
14460             exec( "from salome.%s.%s import *" % (pluginName, pluginBuilderName))
14461         except Exception as e:
14462             from salome_utils import verbose
14463             print("Exception while loading %s: %s" % ( pluginBuilderName, e ))
14464             continue
14465         exec( "from salome.%s import %s" % (pluginName, pluginBuilderName))
14466         plugin = eval( pluginBuilderName )
14467         
14468         # add methods from plugin module to the geomBuilder class
14469         for k in dir( plugin ):
14470             if k[0] == '_': continue
14471             method = getattr( plugin, k )
14472             if type( method ).__name__ == 'function':
14473                 if not hasattr( geomBuilder, k ):
14474                     setattr( geomBuilder, k, method )
14475                 pass
14476             pass
14477         del pluginName
14478         pass
14479     pass