Salome HOME
Merge 'master' branch into 'V9_dev' branch.
[modules/geom.git] / src / GEOM_SWIG / geomBuilder.py
1 #  -*- coding: iso-8859-1 -*-
2 # Copyright (C) 2007-2016  CEA/DEN, EDF R&D, OPEN CASCADE
3 #
4 # This library is free software; you can redistribute it and/or
5 # modify it under the terms of the GNU Lesser General Public
6 # License as published by the Free Software Foundation; either
7 # version 2.1 of the License, or (at your option) any later version.
8 #
9 # This library is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12 # Lesser General Public License for more details.
13 #
14 # You should have received a copy of the GNU Lesser General Public
15 # License along with this library; if not, write to the Free Software
16 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
17 #
18 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
19 #
20
21 #  GEOM GEOM_SWIG : binding of C++ implementation with Python
22 #  File   : geomBuilder.py
23 #  Author : Paul RASCLE, EDF
24 #  Module : GEOM
25
26 """
27     \namespace geomBuilder
28     \brief Module geomBuilder
29 """
30
31 ##
32 ## @defgroup geomBuilder geomBuilder Python module
33 ## @{
34 ##
35 ## @details
36 ##
37 ## By default, all functions of geomBuilder Python module do not publish
38 ## resulting geometrical objects. This can be done in the Python script
39 ## by means of \ref geomBuilder.geomBuilder.addToStudy() "addToStudy()"
40 ## or \ref geomBuilder.geomBuilder.addToStudyInFather() "addToStudyInFather()"
41 ## functions.
42 ##
43 ## However, it is possible to publish result data in the study
44 ## automatically. For this, almost each function of
45 ## \ref geomBuilder.geomBuilder "geomBuilder" class has
46 ## an additional @a theName parameter (@c None by default).
47 ## As soon as non-empty string value is passed to this parameter,
48 ## the result object is published in the study automatically.
49 ##
50 ## For example, consider the following Python script:
51 ##
52 ## @code
53 ## import salome
54 ## from salome.geom import geomBuilder
55 ## geompy = geomBuilder.New()
56 ## box = geompy.MakeBoxDXDYDZ(100, 100, 100) # box is not published in the study yet
57 ## geompy.addToStudy(box, "box")             # explicit publishing
58 ## @endcode
59 ##
60 ## Last two lines can be replaced by one-line instruction:
61 ##
62 ## @code
63 ## box = geompy.MakeBoxDXDYDZ(100, 100, 100, theName="box") # box is published in the study with "box" name
64 ## @endcode
65 ##
66 ## ... or simply
67 ##
68 ## @code
69 ## box = geompy.MakeBoxDXDYDZ(100, 100, 100, "box") # box is published in the study with "box" name
70 ## @endcode
71 ##
72 ## Note, that some functions produce more than one geometrical objects. For example,
73 ## \ref geomBuilder.geomBuilder.GetNonBlocks() "GetNonBlocks()" function returns two objects:
74 ## group of all non-hexa solids and group of all non-quad faces.
75 ## For such functions it is possible to specify separate names for results.
76 ##
77 ## For example
78 ##
79 ## @code
80 ## # create and publish cylinder
81 ## cyl = geompy.MakeCylinderRH(100, 100, "cylinder")
82 ## # get non blocks from cylinder
83 ## g1, g2 = geompy.GetNonBlocks(cyl, theName="nonblock")
84 ## @endcode
85 ##
86 ## Above example will publish both result compounds (first with non-hexa solids and
87 ## second with non-quad faces) as two items, both named "nonblock".
88 ## However, if second command is invoked as
89 ##
90 ## @code
91 ## g1, g2 = geompy.GetNonBlocks(cyl, theName=("nonhexa", "nonquad"))
92 ## @endcode
93 ##
94 ## ... the first compound will be published with "nonhexa" name, and second will be named "nonquad".
95 ##
96 ## Automatic publication of all results can be also enabled/disabled by means of the function
97 ## \ref geomBuilder.geomBuilder.addToStudyAuto() "addToStudyAuto()". The automatic publishing
98 ## is managed by the numeric parameter passed to this function:
99 ## - if @a maxNbSubShapes = 0, automatic publishing is disabled.
100 ## - if @a maxNbSubShapes = -1 (default), automatic publishing is enabled and
101 ##   maximum number of sub-shapes allowed for publishing is unlimited; any negative
102 ##   value passed as parameter has the same effect.
103 ## - if @a maxNbSubShapes is any positive value, automatic publishing is enabled and
104 ##   maximum number of sub-shapes allowed for publishing is set to specified value.
105 ##
106 ## When automatic publishing is enabled, you even do not need to pass @a theName parameter
107 ## to the functions creating objects, instead default names will be used. However, you
108 ## can always change the behavior, by passing explicit name to the @a theName parameter
109 ## and it will be used instead default one.
110 ## The publishing of the collections of objects will be done according to the above
111 ## mentioned rules (maximum allowed number of sub-shapes).
112 ##
113 ## For example:
114 ##
115 ## @code
116 ## import salome
117 ## from salome.geom import geomBuilder
118 ## geompy = geomBuilder.New()
119 ## geompy.addToStudyAuto() # enable automatic publication
120 ## box = geompy.MakeBoxDXDYDZ(100, 100, 100)
121 ## # the box is created and published in the study with default name
122 ## geompy.addToStudyAuto(5) # set max allowed number of sub-shapes to 5
123 ## vertices = geompy.SubShapeAll(box, geomBuilder.ShapeType['VERTEX'])
124 ## # only 5 first vertices will be published, with default names
125 ## print len(vertices)
126 ## # note, that result value still contains all 8 vertices
127 ## geompy.addToStudyAuto(-1) # disable automatic publication
128 ## @endcode
129 ##
130 ## This feature can be used, for example, for debugging purposes.
131 ##
132 ## @note
133 ## - Use automatic publication feature with caution. When it is enabled, any function of
134 ##   \ref geomBuilder.geomBuilder "geomBuilder" class publishes the results in the study,
135 ##   that can lead to the huge size of the study data tree.
136 ##   For example, repeating call of \ref geomBuilder.geomBuilder.SubShapeAll() "SubShapeAll()"
137 ##   command on the same main shape each time will publish all child objects, that will lead
138 ##   to a lot of duplicated items in the study.
139 ## - Sub-shapes are automatically published as child items of the parent main shape in the study if main
140 ##   shape was also published before. Otherwise, sub-shapes are published as top-level objects.
141 ## - Some functions of \ref geomBuilder.geomBuilder "geomBuilder" class do not have
142 ##   \a theName parameter (and, thus, do not support automatic publication).
143 ##   For example, some transformation operations like
144 ##   \ref geomBuilder.geomBuilder.TranslateDXDYDZ() "TranslateDXDYDZ()".
145 ##   Refer to the documentation to check if some function has such possibility.
146 ##
147 ## It is possible to customize the representation of the geometrical
148 ## data in the data tree; this can be done by using folders. A folder can
149 ## be created in the study tree using function
150 ## \ref geomBuilder.geomBuilder.NewFolder() "NewFolder()"
151 ## (by default it is created under the "Geometry" root object).
152 ## As soon as folder is created, any published geometry object
153 ## can be moved into it.
154 ##
155 ## For example:
156 ##
157 ## @code
158 ## import salome
159 ## from salome.geom import geomBuilder
160 ## geompy = geomBuilder.New()
161 ## box = geompy.MakeBoxDXDYDZ(100, 100, 100, "Box")
162 ## # the box was created and published in the study
163 ## folder = geompy.NewFolder("Primitives")
164 ## # an empty "Primitives" folder was created under default "Geometry" root object
165 ## geompy.PutToFolder(box, folder)
166 ## # the box was moved into "Primitives" folder
167 ## @endcode
168 ##
169 ## Subfolders are also can be created by specifying another folder as a parent:
170 ##
171 ## @code
172 ## subfolder = geompy.NewFolder("3D", folder)
173 ## # "3D" folder was created under "Primitives" folder
174 ## @endcode
175 ##
176 ## @note
177 ## - Folder container is just a representation layer object that
178 ## deals with already published objects only. So, any geometry object
179 ## should be published in the study (for example, with
180 ## \ref geomBuilder.geomBuilder.PutToFolder() "addToStudy()" function)
181 ## BEFORE moving it into any existing folder.
182 ## - \ref geomBuilder.geomBuilder.PutToFolder() "PutToFolder()" function
183 ## does not change physical position of geometry object in the study tree,
184 ## it only affects on the representation of the data tree.
185 ## - It is impossible to publish geometry object using any folder as father.
186 ##
187 ##  \defgroup l1_publish_data
188 ##  \defgroup l1_geomBuilder_auxiliary
189 ##  \defgroup l1_geomBuilder_purpose
190 ## @}
191
192 ## @defgroup l1_publish_data Publishing results in SALOME study
193
194 ## @defgroup l1_geomBuilder_auxiliary Auxiliary data structures and methods
195
196 ## @defgroup l1_geomBuilder_purpose   All package methods, grouped by their purpose
197 ## @{
198 ##   @defgroup l2_import_export Importing/exporting geometrical objects
199 ##   @defgroup l2_creating      Creating geometrical objects
200 ##   @{
201 ##     @defgroup l3_basic_go      Creating Basic Geometric Objects
202 ##     @{
203 ##       @defgroup l4_curves        Creating Curves
204
205 ##     @}
206 ##     @defgroup l3_3d_primitives Creating 3D Primitives
207 ##     @defgroup l3_complex       Creating Complex Objects
208 ##     @defgroup l3_groups        Working with groups
209 ##     @defgroup l3_blocks        Building by blocks
210 ##     @{
211 ##       @defgroup l4_blocks_measure Check and Improve
212
213 ##     @}
214 ##     @defgroup l3_sketcher      Sketcher
215 ##     @defgroup l3_advanced      Creating Advanced Geometrical Objects
216 ##     @{
217 ##       @defgroup l4_decompose     Decompose objects
218 ##       @defgroup l4_decompose_d   Decompose objects deprecated methods
219 ##       @defgroup l4_access        Access to sub-shapes by their unique IDs inside the main shape
220 ##       @defgroup l4_obtain        Access to sub-shapes by a criteria
221 ##       @defgroup l4_advanced      Advanced objects creation functions
222
223 ##     @}
224
225 ##   @}
226 ##   @defgroup l2_transforming  Transforming geometrical objects
227 ##   @{
228 ##     @defgroup l3_basic_op      Basic Operations
229 ##     @defgroup l3_boolean       Boolean Operations
230 ##     @defgroup l3_transform     Transformation Operations
231 ##     @defgroup l3_transform_d   Transformation Operations deprecated methods
232 ##     @defgroup l3_local         Local Operations (Fillet, Chamfer and other Features)
233 ##     @defgroup l3_blocks_op     Blocks Operations
234 ##     @defgroup l3_healing       Repairing Operations
235 ##     @defgroup l3_restore_ss    Restore presentation parameters and a tree of sub-shapes
236
237 ##   @}
238 ##   @defgroup l2_measure       Using measurement tools
239 ##   @defgroup l2_field         Field on Geometry
240
241 ## @}
242
243 import omniORB
244
245 # initialize SALOME session in try/except block
246 # to avoid problems in some cases, e.g. when generating documentation
247 try:
248     import salome
249     salome.salome_init()
250     from salome import *
251 except:
252     pass
253
254 from salome_notebook import *
255
256 import GEOM
257 import math
258 import os
259 import functools
260
261 from salome.geom.gsketcher import Sketcher3D, Sketcher2D, Polyline2D
262
263 # In case the omniORBpy EnumItem class does not fully support Python 3
264 # (for instance in version 4.2.1-2), the comparison ordering methods must be
265 # defined
266 #
267 try:
268     GEOM.COMPOUND < GEOM.SOLID
269 except TypeError:
270     def enumitem_eq(self, other):
271         try:
272             if isinstance(other, omniORB.EnumItem):
273                 if other._parent_id == self._parent_id:
274                     return self._v == other._v
275                 else:
276                     return self._parent_id == other._parent_id
277             else:
278                 return id(self) == id(other)
279         except:
280             return id(self) == id(other)
281
282     def enumitem_lt(self, other):
283         try:
284             if isinstance(other, omniORB.EnumItem):
285                 if other._parent_id == self._parent_id:
286                     return self._v < other._v
287                 else:
288                     return self._parent_id < other._parent_id
289             else:
290                 return id(self) < id(other)
291         except:
292             return id(self) < id(other)
293
294     def enumitem_le(self, other):
295         try:
296             if isinstance(other, omniORB.EnumItem):
297                 if other._parent_id == self._parent_id:
298                     return self._v <= other._v
299                 else:
300                     return self._parent_id <= other._parent_id
301             else:
302                 return id(self) <= id(other)
303         except:
304             return id(self) <= id(other)
305
306     def enumitem_gt(self, other):
307         try:
308             if isinstance(other, omniORB.EnumItem):
309                 if other._parent_id == self._parent_id:
310                     return self._v > other._v
311                 else:
312                     return self._parent_id > other._parent_id
313             else:
314                 return id(self) > id(other)
315         except:
316             return id(self) > id(other)
317
318     def enumitem_ge(self, other):
319         try:
320             if isinstance(other, omniORB.EnumItem):
321                 if other._parent_id == self._parent_id:
322                     return self._v >= other._v
323                 else:
324                     return self._parent_id >= other._parent_id
325             else:
326                 return id(self) >= id(other)
327         except:
328             return id(self) >= id(other)
329
330     GEOM.omniORB.EnumItem.__eq__ = enumitem_eq
331     GEOM.omniORB.EnumItem.__lt__ = enumitem_lt
332     GEOM.omniORB.EnumItem.__le__ = enumitem_le
333     GEOM.omniORB.EnumItem.__gt__ = enumitem_gt
334     GEOM.omniORB.EnumItem.__ge__ = enumitem_ge
335     omniORB.EnumItem.__eq__ = enumitem_eq
336     omniORB.EnumItem.__lt__ = enumitem_lt
337     omniORB.EnumItem.__le__ = enumitem_le
338     omniORB.EnumItem.__gt__ = enumitem_gt
339     omniORB.EnumItem.__ge__ = enumitem_ge
340
341 # service function
342 def _toListOfNames(_names, _size=-1):
343     l = []
344     import types
345     if type(_names) in [list, tuple]:
346         for i in _names: l.append(i)
347     elif _names:
348         l.append(_names)
349     if l and len(l) < _size:
350         for i in range(len(l), _size): l.append("%s_%d"%(l[0],i))
351     return l
352
353 # Decorator function to manage transactions for all geometric operations.
354 def ManageTransactions(theOpeName):
355     def MTDecorator(theFunction):
356         # To keep the original function name an documentation.
357         @functools.wraps(theFunction)
358         def OpenCallClose(self, *args, **kwargs):
359             # Open transaction
360             anOperation = getattr(self, theOpeName)
361             anOperation.StartOperation()
362             try:
363                 # Call the function
364                 res = theFunction(self, *args, **kwargs)
365                 # Commit transaction
366                 anOperation.FinishOperation()
367                 return res
368             except:
369                 # Abort transaction
370                 anOperation.AbortOperation()
371                 raise
372         return OpenCallClose
373     return MTDecorator
374
375 ## Raise an Error, containing the Method_name, if Operation is Failed
376 ## @ingroup l1_geomBuilder_auxiliary
377 def RaiseIfFailed (Method_name, Operation):
378     if not Operation.IsDone() and Operation.GetErrorCode() != "NOT_FOUND_ANY":
379         raise RuntimeError(Method_name + " : " + Operation.GetErrorCode())
380
381 ## Return list of variables value from salome notebook
382 ## @ingroup l1_geomBuilder_auxiliary
383 def ParseParameters(*parameters):
384     Result = []
385     StringResult = []
386     for parameter in parameters:
387         if isinstance(parameter, list):
388             lResults = ParseParameters(*parameter)
389             if len(lResults) > 0:
390                 Result.append(lResults[:-1])
391                 StringResult += lResults[-1].split(":")
392                 pass
393             pass
394         else:
395             if isinstance(parameter,str):
396                 if notebook.isVariable(parameter):
397                     Result.append(notebook.get(parameter))
398                 else:
399                     raise RuntimeError("Variable with name '" + parameter + "' doesn't exist!!!")
400                 pass
401             else:
402                 Result.append(parameter)
403                 pass
404             StringResult.append(str(parameter))
405             pass
406         pass
407     if Result:
408         Result.append(":".join(StringResult))
409     else:
410         Result = ":".join(StringResult)
411     return Result
412
413 ## Return list of variables value from salome notebook
414 ## @ingroup l1_geomBuilder_auxiliary
415 def ParseList(list):
416     Result = []
417     StringResult = ""
418     for parameter in list:
419         if isinstance(parameter,str) and notebook.isVariable(parameter):
420             Result.append(str(notebook.get(parameter)))
421             pass
422         else:
423             Result.append(str(parameter))
424             pass
425
426         StringResult = StringResult + str(parameter)
427         StringResult = StringResult + ":"
428         pass
429     StringResult = StringResult[:len(StringResult)-1]
430     return Result, StringResult
431
432 ## Return list of variables value from salome notebook
433 ## @ingroup l1_geomBuilder_auxiliary
434 def ParseSketcherCommand(command):
435     Result = ""
436     StringResult = ""
437     sections = command.split(":")
438     for section in sections:
439         parameters = section.split(" ")
440         paramIndex = 1
441         for parameter in parameters:
442             if paramIndex > 1 and parameter.find("'") != -1:
443                 parameter = parameter.replace("'","")
444                 if notebook.isVariable(parameter):
445                     Result = Result + str(notebook.get(parameter)) + " "
446                     pass
447                 else:
448                     raise RuntimeError("Variable with name '" + parameter + "' doesn't exist!!!")
449                     pass
450                 pass
451             else:
452                 Result = Result + str(parameter) + " "
453                 pass
454             if paramIndex > 1:
455                 StringResult = StringResult + parameter
456                 StringResult = StringResult + ":"
457                 pass
458             paramIndex = paramIndex + 1
459             pass
460         Result = Result[:len(Result)-1] + ":"
461         pass
462     Result = Result[:len(Result)-1]
463     return Result, StringResult
464
465 ## Helper function which can be used to pack the passed string to the byte data.
466 ## Only '1' an '0' symbols are valid for the string. The missing bits are replaced by zeroes.
467 ## If the string contains invalid symbol (neither '1' nor '0'), the function raises an exception.
468 ## For example,
469 ## \code
470 ## val = PackData("10001110") # val = 0xAE
471 ## val = PackData("1")        # val = 0x80
472 ## \endcode
473 ## @param data unpacked data - a string containing '1' and '0' symbols
474 ## @return data packed to the byte stream
475 ## @ingroup l1_geomBuilder_auxiliary
476 def PackData(data):
477     """
478     Helper function which can be used to pack the passed string to the byte data.
479     Only '1' an '0' symbols are valid for the string. The missing bits are replaced by zeroes.
480     If the string contains invalid symbol (neither '1' nor '0'), the function raises an exception.
481
482     Parameters:
483         data unpacked data - a string containing '1' and '0' symbols
484
485     Returns:
486         data packed to the byte stream
487
488     Example of usage:
489         val = PackData("10001110") # val = 0xAE
490         val = PackData("1")        # val = 0x80
491     """
492     bytes = len(data)/8
493     if len(data)%8: bytes += 1
494     res = ""
495     for b in range(bytes):
496         d = data[b*8:(b+1)*8]
497         val = 0
498         for i in range(8):
499             val *= 2
500             if i < len(d):
501                 if d[i] == "1": val += 1
502                 elif d[i] != "0":
503                     raise "Invalid symbol %s" % d[i]
504                 pass
505             pass
506         res += chr(val)
507         pass
508     return res
509
510 ## Read bitmap texture from the text file.
511 ## In that file, any non-zero symbol represents '1' opaque pixel of the bitmap.
512 ## A zero symbol ('0') represents transparent pixel of the texture bitmap.
513 ## The function returns width and height of the pixmap in pixels and byte stream representing
514 ## texture bitmap itself.
515 ##
516 ## This function can be used to read the texture to the byte stream in order to pass it to
517 ## the AddTexture() function of geomBuilder class.
518 ## For example,
519 ## \code
520 ## from salome.geom import geomBuilder
521 ## geompy = geomBuilder.New()
522 ## texture = geompy.readtexture('mytexture.dat')
523 ## texture = geompy.AddTexture(*texture)
524 ## obj.SetMarkerTexture(texture)
525 ## \endcode
526 ## @param fname texture file name
527 ## @return sequence of tree values: texture's width, height in pixels and its byte stream
528 ## @ingroup l1_geomBuilder_auxiliary
529 def ReadTexture(fname):
530     """
531     Read bitmap texture from the text file.
532     In that file, any non-zero symbol represents '1' opaque pixel of the bitmap.
533     A zero symbol ('0') represents transparent pixel of the texture bitmap.
534     The function returns width and height of the pixmap in pixels and byte stream representing
535     texture bitmap itself.
536     This function can be used to read the texture to the byte stream in order to pass it to
537     the AddTexture() function of geomBuilder class.
538
539     Parameters:
540         fname texture file name
541
542     Returns:
543         sequence of tree values: texture's width, height in pixels and its byte stream
544
545     Example of usage:
546         from salome.geom import geomBuilder
547         geompy = geomBuilder.New()
548         texture = geompy.readtexture('mytexture.dat')
549         texture = geompy.AddTexture(*texture)
550         obj.SetMarkerTexture(texture)
551     """
552     try:
553         f = open(fname)
554         lines = [ l.strip() for l in f.readlines()]
555         f.close()
556         maxlen = 0
557         if lines: maxlen = max([len(x) for x in lines])
558         lenbytes = maxlen/8
559         if maxlen%8: lenbytes += 1
560         bytedata=""
561         for line in lines:
562             if len(line)%8:
563                 lenline = (len(line)/8+1)*8
564                 pass
565             else:
566                 lenline = (len(line)/8)*8
567                 pass
568             for i in range(lenline/8):
569                 byte=""
570                 for j in range(8):
571                     if i*8+j < len(line) and line[i*8+j] != "0": byte += "1"
572                     else: byte += "0"
573                     pass
574                 bytedata += PackData(byte)
575                 pass
576             for i in range(lenline/8, lenbytes):
577                 bytedata += PackData("0")
578             pass
579         return lenbytes*8, len(lines), bytedata
580     except:
581         pass
582     return 0, 0, ""
583
584 ## Returns a long value from enumeration type
585 #  Can be used for CORBA enumerator types like GEOM.shape_type
586 #  @param theItem enumeration type
587 #  @ingroup l1_geomBuilder_auxiliary
588 def EnumToLong(theItem):
589     """
590     Returns a long value from enumeration type
591     Can be used for CORBA enumerator types like geomBuilder.ShapeType
592
593     Parameters:
594         theItem enumeration type
595     """
596     ret = theItem
597     if hasattr(theItem, "_v"): ret = theItem._v
598     return ret
599
600 ## Pack an argument into a list
601 def ToList( arg ):
602     if isinstance( arg, list ):
603         return arg
604     if hasattr( arg, "__getitem__" ):
605         return list( arg )
606     return [ arg ]
607
608 ## Information about closed/unclosed state of shell or wire
609 #  @ingroup l1_geomBuilder_auxiliary
610 class info:
611     """
612     Information about closed/unclosed state of shell or wire
613     """
614     UNKNOWN  = 0
615     CLOSED   = 1
616     UNCLOSED = 2
617
618 ## Private class used to bind calls of plugin operations to geomBuilder
619 class PluginOperation:
620   def __init__(self, operation, function):
621     self.operation = operation
622     self.function = function
623     pass
624
625   @ManageTransactions("operation")
626   def __call__(self, *args):
627     res = self.function(self.operation, *args)
628     RaiseIfFailed(self.function.__name__, self.operation)
629     return res
630
631 # Warning: geom is a singleton
632 geom = None
633 engine = None
634 doLcc = False
635 created = False
636
637 class geomBuilder(GEOM._objref_GEOM_Gen):
638
639         ## Enumeration ShapeType as a dictionary. \n
640         ## Topological types of shapes (like Open Cascade types). See GEOM::shape_type for details.
641         #  @ingroup l1_geomBuilder_auxiliary
642         ShapeType = {"AUTO":-1, "COMPOUND":0, "COMPSOLID":1, "SOLID":2, "SHELL":3, "FACE":4, "WIRE":5, "EDGE":6, "VERTEX":7, "SHAPE":8, "FLAT":9}
643
644         ## Kinds of shape in terms of <VAR>GEOM.GEOM_IKindOfShape.shape_kind</VAR> enumeration
645         #  and a list of parameters, describing the shape.
646         #  List of parameters, describing the shape:
647         #  - COMPOUND:            [nb_solids  nb_faces  nb_edges  nb_vertices]
648         #  - COMPSOLID:           [nb_solids  nb_faces  nb_edges  nb_vertices]
649         #
650         #  - SHELL:       [info.CLOSED / info.UNCLOSED  nb_faces  nb_edges  nb_vertices]
651         #
652         #  - WIRE:        [info.CLOSED / info.UNCLOSED nb_edges  nb_vertices]
653         #
654         #  - SPHERE:       [xc yc zc            R]
655         #  - CYLINDER:     [xb yb zb  dx dy dz  R         H]
656         #  - BOX:          [xc yc zc                      ax ay az]
657         #  - ROTATED_BOX:  [xc yc zc  zx zy zz  xx xy xz  ax ay az]
658         #  - TORUS:        [xc yc zc  dx dy dz  R_1  R_2]
659         #  - CONE:         [xb yb zb  dx dy dz  R_1  R_2  H]
660         #  - POLYHEDRON:                       [nb_faces  nb_edges  nb_vertices]
661         #  - SOLID:                            [nb_faces  nb_edges  nb_vertices]
662         #
663         #  - SPHERE2D:     [xc yc zc            R]
664         #  - CYLINDER2D:   [xb yb zb  dx dy dz  R         H]
665         #  - TORUS2D:      [xc yc zc  dx dy dz  R_1  R_2]
666         #  - CONE2D:       [xc yc zc  dx dy dz  R_1  R_2  H]
667         #  - DISK_CIRCLE:  [xc yc zc  dx dy dz  R]
668         #  - DISK_ELLIPSE: [xc yc zc  dx dy dz  R_1  R_2]
669         #  - POLYGON:      [xo yo zo  dx dy dz            nb_edges  nb_vertices]
670         #  - PLANE:        [xo yo zo  dx dy dz]
671         #  - PLANAR:       [xo yo zo  dx dy dz            nb_edges  nb_vertices]
672         #  - FACE:                                       [nb_edges  nb_vertices]
673         #
674         #  - CIRCLE:       [xc yc zc  dx dy dz  R]
675         #  - ARC_CIRCLE:   [xc yc zc  dx dy dz  R         x1 y1 z1  x2 y2 z2]
676         #  - ELLIPSE:      [xc yc zc  dx dy dz  R_1  R_2]
677         #  - ARC_ELLIPSE:  [xc yc zc  dx dy dz  R_1  R_2  x1 y1 z1  x2 y2 z2]
678         #  - LINE:         [xo yo zo  dx dy dz]
679         #  - SEGMENT:      [x1 y1 z1  x2 y2 z2]
680         #  - EDGE:                                                 [nb_vertices]
681         #
682         #  - VERTEX:       [x  y  z]
683         #
684         #  - LCS:          [x y z  xx xy xz  yx yy yz  zx zy zz]
685         #  @ingroup l1_geomBuilder_auxiliary
686         kind = GEOM.GEOM_IKindOfShape
687
688         def __new__(cls, *args):
689             global engine
690             global geom
691             global doLcc
692             global created
693             #print "==== __new__ ", engine, geom, doLcc, created
694             if geom is None:
695                 # geom engine is either retrieved from engine, or created
696                 geom = engine
697                 # Following test avoids a recursive loop
698                 if doLcc:
699                     if geom is not None:
700                         # geom engine not created: existing engine found
701                         doLcc = False
702                     if doLcc and not created:
703                         doLcc = False
704                         # FindOrLoadComponent called:
705                         # 1. CORBA resolution of server
706                         # 2. the __new__ method is called again
707                         #print "==== FindOrLoadComponent ", engine, geom, doLcc, created
708                         geom = lcc.FindOrLoadComponent( "FactoryServer", "GEOM" )
709                         #print "====1 ",geom
710                 else:
711                     # FindOrLoadComponent not called
712                     if geom is None:
713                         # geomBuilder instance is created from lcc.FindOrLoadComponent
714                         #print "==== super ", engine, geom, doLcc, created
715                         geom = super(geomBuilder,cls).__new__(cls)
716                         #print "====2 ",geom
717                     else:
718                         # geom engine not created: existing engine found
719                         #print "==== existing ", engine, geom, doLcc, created
720                         pass
721                 #print "return geom 1 ", geom
722                 return geom
723
724             #print "return geom 2 ", geom
725             return geom
726
727         def __init__(self, *args):
728             global created
729             #print "-------- geomBuilder __init__ --- ", created, self
730             if not created:
731               created = True
732               GEOM._objref_GEOM_Gen.__init__(self, *args)
733               self.myMaxNbSubShapesAllowed = 0 # auto-publishing is disabled by default
734               self.myBuilder = None
735               self.father    = None
736
737               self.BasicOp  = None
738               self.CurvesOp = None
739               self.PrimOp   = None
740               self.ShapesOp = None
741               self.HealOp   = None
742               self.InsertOp = None
743               self.BoolOp   = None
744               self.TrsfOp   = None
745               self.LocalOp  = None
746               self.MeasuOp  = None
747               self.BlocksOp = None
748               self.GroupOp  = None
749               self.FieldOp  = None
750             pass
751
752         ## Process object publication in the study, as follows:
753         #  - if @a theName is specified (not None), the object is published in the study
754         #    with this name, not taking into account "auto-publishing" option;
755         #  - if @a theName is NOT specified, the object is published in the study
756         #    (using default name, which can be customized using @a theDefaultName parameter)
757         #    only if auto-publishing is switched on.
758         #
759         #  @param theObj  object, a subject for publishing
760         #  @param theName object name for study
761         #  @param theDefaultName default name for the auto-publishing
762         #
763         #  @sa addToStudyAuto()
764         def _autoPublish(self, theObj, theName, theDefaultName="noname"):
765             # ---
766             def _item_name(_names, _defname, _idx=-1):
767                 if not _names: _names = _defname
768                 if type(_names) in [list, tuple]:
769                     if _idx >= 0:
770                         if _idx >= len(_names) or not _names[_idx]:
771                             if type(_defname) not in [list, tuple]:
772                                 _name = "%s_%d"%(_defname, _idx+1)
773                             elif len(_defname) > 0 and _idx >= 0 and _idx < len(_defname):
774                                 _name = _defname[_idx]
775                             else:
776                                 _name = "%noname_%d"%(dn, _idx+1)
777                             pass
778                         else:
779                             _name = _names[_idx]
780                         pass
781                     else:
782                         # must be wrong  usage
783                         _name = _names[0]
784                     pass
785                 else:
786                     if _idx >= 0:
787                         _name = "%s_%d"%(_names, _idx+1)
788                     else:
789                         _name = _names
790                     pass
791                 return _name
792             # ---
793             def _publish( _name, _obj ):
794                 fatherObj = None
795                 if isinstance( _obj, GEOM._objref_GEOM_Field ):
796                     fatherObj = _obj.GetShape()
797                 elif isinstance( _obj, GEOM._objref_GEOM_FieldStep ):
798                     fatherObj = _obj.GetField()
799                 elif not _obj.IsMainShape():
800                     fatherObj = _obj.GetMainShape()
801                     pass
802                 if fatherObj and fatherObj.GetStudyEntry():
803                     self.addToStudyInFather(fatherObj, _obj, _name)
804                 else:
805                     self.addToStudy(_obj, _name)
806                     pass
807                 return
808             # ---
809             if not theObj:
810                 return # null object
811             if not theName and not self.myMaxNbSubShapesAllowed:
812                 return # nothing to do: auto-publishing is disabled
813             if not theName and not theDefaultName:
814                 return # neither theName nor theDefaultName is given
815             import types
816             if type(theObj) in [list, tuple]:
817                 # list of objects is being published
818                 idx = 0
819                 for obj in theObj:
820                     if not obj: continue # bad object
821                     name = _item_name(theName, theDefaultName, idx)
822                     _publish( name, obj )
823                     idx = idx+1
824                     if not theName and idx == self.myMaxNbSubShapesAllowed: break
825                     pass
826                 pass
827             else:
828                 # single object is published
829                 name = _item_name(theName, theDefaultName)
830                 _publish( name, theObj )
831             pass
832
833         ## @addtogroup l1_geomBuilder_auxiliary
834         ## @{
835         def init_geom(self):
836             self.myStudy = salome.myStudy
837             self.myBuilder = self.myStudy.NewBuilder()
838             self.father = self.myStudy.FindComponent("GEOM")
839             notebook.myStudy = salome.myStudy
840             if self.father is None:
841                 self.father = self.myBuilder.NewComponent("GEOM")
842                 A1 = self.myBuilder.FindOrCreateAttribute(self.father, "AttributeName")
843                 FName = A1._narrow(SALOMEDS.AttributeName)
844                 FName.SetValue("Geometry")
845                 A2 = self.myBuilder.FindOrCreateAttribute(self.father, "AttributePixMap")
846                 aPixmap = A2._narrow(SALOMEDS.AttributePixMap)
847                 aPixmap.SetPixMap("ICON_OBJBROWSER_Geometry")
848                 self.myBuilder.DefineComponentInstance(self.father,self)
849                 pass
850             self.BasicOp  = self.GetIBasicOperations    ()
851             self.CurvesOp = self.GetICurvesOperations   ()
852             self.PrimOp   = self.GetI3DPrimOperations   ()
853             self.ShapesOp = self.GetIShapesOperations   ()
854             self.HealOp   = self.GetIHealingOperations  ()
855             self.InsertOp = self.GetIInsertOperations   ()
856             self.BoolOp   = self.GetIBooleanOperations  ()
857             self.TrsfOp   = self.GetITransformOperations()
858             self.LocalOp  = self.GetILocalOperations    ()
859             self.MeasuOp  = self.GetIMeasureOperations  ()
860             self.BlocksOp = self.GetIBlocksOperations   ()
861             self.GroupOp  = self.GetIGroupOperations    ()
862             self.FieldOp  = self.GetIFieldOperations    ()
863
864             # set GEOM as root in the use case tree
865             self.myUseCaseBuilder = self.myStudy.GetUseCaseBuilder()
866             self.myUseCaseBuilder.SetRootCurrent()
867             self.myUseCaseBuilder.Append(self.father)
868
869             # load data from the study file, if necessary
870             self.myBuilder.LoadWith(self.father, self)
871             pass
872
873         def GetPluginOperations(self, libraryName):
874             op = GEOM._objref_GEOM_Gen.GetPluginOperations(self, libraryName)
875             return op
876
877         ## Enable / disable results auto-publishing
878         #
879         #  The automatic publishing is managed in the following way:
880         #  - if @a maxNbSubShapes = 0, automatic publishing is disabled.
881         #  - if @a maxNbSubShapes = -1 (default), automatic publishing is enabled and
882         #  maximum number of sub-shapes allowed for publishing is unlimited; any negative
883         #  value passed as parameter has the same effect.
884         #  - if @a maxNbSubShapes is any positive value, automatic publishing is enabled and
885         #  maximum number of sub-shapes allowed for publishing is set to specified value.
886         #
887         #  @param maxNbSubShapes maximum number of sub-shapes allowed for publishing.
888         #  @ingroup l1_publish_data
889         def addToStudyAuto(self, maxNbSubShapes=-1):
890             """
891             Enable / disable results auto-publishing
892
893             The automatic publishing is managed in the following way:
894             - if @a maxNbSubShapes = 0, automatic publishing is disabled;
895             - if @a maxNbSubShapes = -1 (default), automatic publishing is enabled and
896             maximum number of sub-shapes allowed for publishing is unlimited; any negative
897             value passed as parameter has the same effect.
898             - if @a maxNbSubShapes is any positive value, automatic publishing is enabled and
899             maximum number of sub-shapes allowed for publishing is set to this value.
900
901             Parameters:
902                 maxNbSubShapes maximum number of sub-shapes allowed for publishing.
903
904             Example of usage:
905                 geompy.addToStudyAuto()   # enable auto-publishing
906                 geompy.MakeBoxDXDYDZ(100) # box is created and published with default name
907                 geompy.addToStudyAuto(0)  # disable auto-publishing
908             """
909             self.myMaxNbSubShapesAllowed = max(-1, maxNbSubShapes)
910             pass
911
912         ## Dump component to the Python script
913         #  This method overrides IDL function to allow default values for the parameters.
914         def DumpPython(self, theIsPublished=True, theIsMultiFile=True):
915             """
916             Dump component to the Python script
917             This method overrides IDL function to allow default values for the parameters.
918             """
919             return GEOM._objref_GEOM_Gen.DumpPython(self, theIsPublished, theIsMultiFile)
920
921         ## Get name for sub-shape aSubObj of shape aMainObj
922         #
923         # @ref swig_SubShapeName "Example"
924         @ManageTransactions("ShapesOp")
925         def SubShapeName(self,aSubObj, aMainObj):
926             """
927             Get name for sub-shape aSubObj of shape aMainObj
928             """
929             # Example: see GEOM_TestAll.py
930
931             #aSubId  = orb.object_to_string(aSubObj)
932             #aMainId = orb.object_to_string(aMainObj)
933             #index = gg.getIndexTopology(aSubId, aMainId)
934             #name = gg.getShapeTypeString(aSubId) + "_%d"%(index)
935             index = self.ShapesOp.GetTopologyIndex(aMainObj, aSubObj)
936             name = self.ShapesOp.GetShapeTypeString(aSubObj) + "_%d"%(index)
937             return name
938
939         ## Publish in study aShape with name aName
940         #
941         #  \param aShape the shape to be published
942         #  \param aName  the name for the shape
943         #  \param doRestoreSubShapes if True, finds and publishes also
944         #         sub-shapes of <VAR>aShape</VAR>, corresponding to its arguments
945         #         and published sub-shapes of arguments
946         #  \param theArgs,theFindMethod,theInheritFirstArg see RestoreSubShapes() for
947         #                                                  these arguments description
948         #  \return study entry of the published shape in form of string
949         #
950         #  @ingroup l1_publish_data
951         #  @ref swig_all_addtostudy "Example"
952         def addToStudy(self, aShape, aName, doRestoreSubShapes=False,
953                        theArgs=[], theFindMethod=GEOM.FSM_GetInPlace, theInheritFirstArg=False):
954             """
955             Publish in study aShape with name aName
956
957             Parameters:
958                 aShape the shape to be published
959                 aName  the name for the shape
960                 doRestoreSubShapes if True, finds and publishes also
961                                    sub-shapes of aShape, corresponding to its arguments
962                                    and published sub-shapes of arguments
963                 theArgs,theFindMethod,theInheritFirstArg see geompy.RestoreSubShapes() for
964                                                          these arguments description
965
966             Returns:
967                 study entry of the published shape in form of string
968
969             Example of usage:
970                 id_block1 = geompy.addToStudy(Block1, "Block 1")
971             """
972             # Example: see GEOM_TestAll.py
973             try:
974                 aSObject = self.AddInStudy(aShape, aName, None)
975                 if aSObject and aName: aSObject.SetAttrString("AttributeName", aName)
976                 if doRestoreSubShapes:
977                     self.RestoreSubShapesSO(aSObject, theArgs,
978                                             theFindMethod, theInheritFirstArg, True )
979             except:
980                 print("addToStudy() failed")
981                 return ""
982             return aShape.GetStudyEntry()
983
984         ## Publish in study aShape with name aName as sub-object of previously published aFather
985         #  \param aFather previously published object
986         #  \param aShape the shape to be published as sub-object of <VAR>aFather</VAR>
987         #  \param aName  the name for the shape
988         #
989         #  \return study entry of the published shape in form of string
990         #
991         #  @ingroup l1_publish_data
992         #  @ref swig_all_addtostudyInFather "Example"
993         def addToStudyInFather(self, aFather, aShape, aName):
994             """
995             Publish in study aShape with name aName as sub-object of previously published aFather
996
997             Parameters:
998                 aFather previously published object
999                 aShape the shape to be published as sub-object of aFather
1000                 aName  the name for the shape
1001
1002             Returns:
1003                 study entry of the published shape in form of string
1004             """
1005             # Example: see GEOM_TestAll.py
1006             try:
1007                 aSObject = self.AddInStudy(aShape, aName, aFather)
1008                 if aSObject and aName: aSObject.SetAttrString("AttributeName", aName)
1009             except:
1010                 print("addToStudyInFather() failed")
1011                 return ""
1012             return aShape.GetStudyEntry()
1013
1014         ## Unpublish object in study
1015         #
1016         #  \param obj the object to be unpublished
1017         def hideInStudy(self, obj):
1018             """
1019             Unpublish object in study
1020
1021             Parameters:
1022                 obj the object to be unpublished
1023             """
1024             ior = salome.orb.object_to_string(obj)
1025             aSObject = self.myStudy.FindObjectIOR(ior)
1026             if aSObject is not None:
1027                 genericAttribute = self.myBuilder.FindOrCreateAttribute(aSObject, "AttributeDrawable")
1028                 drwAttribute = genericAttribute._narrow(SALOMEDS.AttributeDrawable)
1029                 drwAttribute.SetDrawable(False)
1030                 # hide references if any
1031                 vso = self.myStudy.FindDependances(aSObject);
1032                 for refObj in vso :
1033                     genericAttribute = self.myBuilder.FindOrCreateAttribute(refObj, "AttributeDrawable")
1034                     drwAttribute = genericAttribute._narrow(SALOMEDS.AttributeDrawable)
1035                     drwAttribute.SetDrawable(False)
1036                     pass
1037                 pass
1038
1039         # end of l1_geomBuilder_auxiliary
1040         ## @}
1041
1042         ## @addtogroup l3_restore_ss
1043         ## @{
1044
1045         ## Publish sub-shapes, standing for arguments and sub-shapes of arguments
1046         #  To be used from python scripts out of addToStudy() (non-default usage)
1047         #  \param theObject published GEOM.GEOM_Object, arguments of which will be published
1048         #  \param theArgs   list of GEOM.GEOM_Object, operation arguments to be published.
1049         #                   If this list is empty, all operation arguments will be published
1050         #  \param theFindMethod method to search sub-shapes, corresponding to arguments and
1051         #                       their sub-shapes. Value from enumeration GEOM.find_shape_method.
1052         #  \param theInheritFirstArg set properties of the first argument for <VAR>theObject</VAR>.
1053         #                            Do not publish sub-shapes in place of arguments, but only
1054         #                            in place of sub-shapes of the first argument,
1055         #                            because the whole shape corresponds to the first argument.
1056         #                            Mainly to be used after transformations, but it also can be
1057         #                            useful after partition with one object shape, and some other
1058         #                            operations, where only the first argument has to be considered.
1059         #                            If theObject has only one argument shape, this flag is automatically
1060         #                            considered as True, not regarding really passed value.
1061         #  \param theAddPrefix add prefix "from_" to names of restored sub-shapes,
1062         #                      and prefix "from_subshapes_of_" to names of partially restored sub-shapes.
1063         #  \return list of published sub-shapes
1064         #
1065         #  @ref tui_restore_prs_params "Example"
1066         def RestoreSubShapes (self, theObject, theArgs=[], theFindMethod=GEOM.FSM_GetInPlace,
1067                               theInheritFirstArg=False, theAddPrefix=True):
1068             """
1069             Publish sub-shapes, standing for arguments and sub-shapes of arguments
1070             To be used from python scripts out of geompy.addToStudy (non-default usage)
1071
1072             Parameters:
1073                 theObject published GEOM.GEOM_Object, arguments of which will be published
1074                 theArgs   list of GEOM.GEOM_Object, operation arguments to be published.
1075                           If this list is empty, all operation arguments will be published
1076                 theFindMethod method to search sub-shapes, corresponding to arguments and
1077                               their sub-shapes. Value from enumeration GEOM.find_shape_method.
1078                 theInheritFirstArg set properties of the first argument for theObject.
1079                                    Do not publish sub-shapes in place of arguments, but only
1080                                    in place of sub-shapes of the first argument,
1081                                    because the whole shape corresponds to the first argument.
1082                                    Mainly to be used after transformations, but it also can be
1083                                    useful after partition with one object shape, and some other
1084                                    operations, where only the first argument has to be considered.
1085                                    If theObject has only one argument shape, this flag is automatically
1086                                    considered as True, not regarding really passed value.
1087                 theAddPrefix add prefix "from_" to names of restored sub-shapes,
1088                              and prefix "from_subshapes_of_" to names of partially restored sub-shapes.
1089             Returns:
1090                 list of published sub-shapes
1091             """
1092             # Example: see GEOM_TestAll.py
1093             return self.RestoreSubShapesO(theObject, theArgs,
1094                                           theFindMethod, theInheritFirstArg, theAddPrefix)
1095
1096         ## Publish sub-shapes, standing for arguments and sub-shapes of arguments
1097         #  To be used from python scripts out of addToStudy() (non-default usage)
1098         #  \param theObject published GEOM.GEOM_Object, arguments of which will be published
1099         #  \param theArgs   list of GEOM.GEOM_Object, operation arguments to be published.
1100         #                   If this list is empty, all operation arguments will be published
1101         #  \param theFindMethod method to search sub-shapes, corresponding to arguments and
1102         #                       their sub-shapes. Value from enumeration GEOM::find_shape_method.
1103         #  \param theInheritFirstArg set properties of the first argument for <VAR>theObject</VAR>.
1104         #                            Do not publish sub-shapes in place of arguments, but only
1105         #                            in place of sub-shapes of the first argument,
1106         #                            because the whole shape corresponds to the first argument.
1107         #                            Mainly to be used after transformations, but it also can be
1108         #                            useful after partition with one object shape, and some other
1109         #                            operations, where only the first argument has to be considered.
1110         #                            If theObject has only one argument shape, this flag is automatically
1111         #                            considered as True, not regarding really passed value.
1112         #  \param theAddPrefix add prefix "from_" to names of restored sub-shapes,
1113         #                      and prefix "from_subshapes_of_" to names of partially restored sub-shapes.
1114         #  \return list of published sub-shapes
1115         #
1116         #  @ref tui_restore_prs_params "Example"
1117         def RestoreGivenSubShapes (self, theObject, theArgs=[], theFindMethod=GEOM.FSM_GetInPlace,
1118                                    theInheritFirstArg=False, theAddPrefix=True):
1119             """
1120             Publish sub-shapes, standing for arguments and sub-shapes of arguments
1121             To be used from python scripts out of geompy.addToStudy() (non-default usage)
1122
1123             Parameters:
1124                 theObject published GEOM.GEOM_Object, arguments of which will be published
1125                 theArgs   list of GEOM.GEOM_Object, operation arguments to be published.
1126                           If this list is empty, all operation arguments will be published
1127                 theFindMethod method to search sub-shapes, corresponding to arguments and
1128                               their sub-shapes. Value from enumeration GEOM::find_shape_method.
1129                 theInheritFirstArg set properties of the first argument for theObject.
1130                                    Do not publish sub-shapes in place of arguments, but only
1131                                    in place of sub-shapes of the first argument,
1132                                    because the whole shape corresponds to the first argument.
1133                                    Mainly to be used after transformations, but it also can be
1134                                    useful after partition with one object shape, and some other
1135                                    operations, where only the first argument has to be considered.
1136                                    If theObject has only one argument shape, this flag is automatically
1137                                    considered as True, not regarding really passed value.
1138                 theAddPrefix add prefix "from_" to names of restored sub-shapes,
1139                              and prefix "from_subshapes_of_" to names of partially restored sub-shapes.
1140
1141             Returns:
1142                 list of published sub-shapes
1143             """
1144             # Example: see GEOM_TestAll.py
1145             return self.RestoreGivenSubShapesO(theObject, theArgs,
1146                                                theFindMethod, theInheritFirstArg, theAddPrefix)
1147
1148         # end of l3_restore_ss
1149         ## @}
1150
1151         ## @addtogroup l3_basic_go
1152         ## @{
1153
1154         ## Create point by three coordinates.
1155         #  @param theX The X coordinate of the point.
1156         #  @param theY The Y coordinate of the point.
1157         #  @param theZ The Z coordinate of the point.
1158         #  @param theName Object name; when specified, this parameter is used
1159         #         for result publication in the study. Otherwise, if automatic
1160         #         publication is switched on, default value is used for result name.
1161         #
1162         #  @return New GEOM.GEOM_Object, containing the created point.
1163         #
1164         #  @ref tui_creation_point "Example"
1165         @ManageTransactions("BasicOp")
1166         def MakeVertex(self, theX, theY, theZ, theName=None):
1167             """
1168             Create point by three coordinates.
1169
1170             Parameters:
1171                 theX The X coordinate of the point.
1172                 theY The Y coordinate of the point.
1173                 theZ The Z coordinate of the point.
1174                 theName Object name; when specified, this parameter is used
1175                         for result publication in the study. Otherwise, if automatic
1176                         publication is switched on, default value is used for result name.
1177
1178             Returns:
1179                 New GEOM.GEOM_Object, containing the created point.
1180             """
1181             # Example: see GEOM_TestAll.py
1182             theX,theY,theZ,Parameters = ParseParameters(theX, theY, theZ)
1183             anObj = self.BasicOp.MakePointXYZ(theX, theY, theZ)
1184             RaiseIfFailed("MakePointXYZ", self.BasicOp)
1185             anObj.SetParameters(Parameters)
1186             self._autoPublish(anObj, theName, "vertex")
1187             return anObj
1188
1189         ## Create a point, distant from the referenced point
1190         #  on the given distances along the coordinate axes.
1191         #  @param theReference The referenced point.
1192         #  @param theX Displacement from the referenced point along OX axis.
1193         #  @param theY Displacement from the referenced point along OY axis.
1194         #  @param theZ Displacement from the referenced point along OZ axis.
1195         #  @param theName Object name; when specified, this parameter is used
1196         #         for result publication in the study. Otherwise, if automatic
1197         #         publication is switched on, default value is used for result name.
1198         #
1199         #  @return New GEOM.GEOM_Object, containing the created point.
1200         #
1201         #  @ref tui_creation_point "Example"
1202         @ManageTransactions("BasicOp")
1203         def MakeVertexWithRef(self, theReference, theX, theY, theZ, theName=None):
1204             """
1205             Create a point, distant from the referenced point
1206             on the given distances along the coordinate axes.
1207
1208             Parameters:
1209                 theReference The referenced point.
1210                 theX Displacement from the referenced point along OX axis.
1211                 theY Displacement from the referenced point along OY axis.
1212                 theZ Displacement from the referenced point along OZ axis.
1213                 theName Object name; when specified, this parameter is used
1214                         for result publication in the study. Otherwise, if automatic
1215                         publication is switched on, default value is used for result name.
1216
1217             Returns:
1218                 New GEOM.GEOM_Object, containing the created point.
1219             """
1220             # Example: see GEOM_TestAll.py
1221             theX,theY,theZ,Parameters = ParseParameters(theX, theY, theZ)
1222             anObj = self.BasicOp.MakePointWithReference(theReference, theX, theY, theZ)
1223             RaiseIfFailed("MakePointWithReference", self.BasicOp)
1224             anObj.SetParameters(Parameters)
1225             self._autoPublish(anObj, theName, "vertex")
1226             return anObj
1227
1228         ## Create a point, corresponding to the given parameter on the given curve.
1229         #  @param theRefCurve The referenced curve.
1230         #  @param theParameter Value of parameter on the referenced curve.
1231         #  @param takeOrientationIntoAccount flag that tells if it is necessary
1232         #         to take the curve's orientation into account for the
1233         #         operation. I.e. if this flag is set, the results for the same
1234         #         parameters (except the value 0.5) is different for forward
1235         #         and reversed curves. If it is not set the result is the same.
1236         #  @param theName Object name; when specified, this parameter is used
1237         #         for result publication in the study. Otherwise, if automatic
1238         #         publication is switched on, default value is used for result name.
1239         #
1240         #  @return New GEOM.GEOM_Object, containing the created point.
1241         #
1242         #  @ref tui_creation_point "Example"
1243         @ManageTransactions("BasicOp")
1244         def MakeVertexOnCurve(self, theRefCurve, theParameter,
1245                               takeOrientationIntoAccount=False, theName=None):
1246             """
1247             Create a point, corresponding to the given parameter on the given curve.
1248
1249             Parameters:
1250                 theRefCurve The referenced curve.
1251                 theParameter Value of parameter on the referenced curve.
1252                 takeOrientationIntoAccount flag that tells if it is necessary
1253                         to take the curve's orientation into account for the
1254                         operation. I.e. if this flag is set, the results for
1255                         the same parameters (except the value 0.5) is different
1256                         for forward and reversed curves. If it is not set
1257                         the result is the same.
1258                 theName Object name; when specified, this parameter is used
1259                         for result publication in the study. Otherwise, if automatic
1260                         publication is switched on, default value is used for result name.
1261
1262             Returns:
1263                 New GEOM.GEOM_Object, containing the created point.
1264
1265             Example of usage:
1266                 p_on_arc = geompy.MakeVertexOnCurve(Arc, 0.25)
1267             """
1268             # Example: see GEOM_TestAll.py
1269             theParameter, takeOrientationIntoAccount, Parameters = ParseParameters(
1270                 theParameter, takeOrientationIntoAccount)
1271             anObj = self.BasicOp.MakePointOnCurve(theRefCurve, theParameter,
1272                                                   takeOrientationIntoAccount)
1273             RaiseIfFailed("MakePointOnCurve", self.BasicOp)
1274             anObj.SetParameters(Parameters)
1275             self._autoPublish(anObj, theName, "vertex")
1276             return anObj
1277
1278         ## Create a point by projection give coordinates on the given curve
1279         #  @param theRefCurve The referenced curve.
1280         #  @param theX X-coordinate in 3D space
1281         #  @param theY Y-coordinate in 3D space
1282         #  @param theZ Z-coordinate in 3D space
1283         #  @param theName Object name; when specified, this parameter is used
1284         #         for result publication in the study. Otherwise, if automatic
1285         #         publication is switched on, default value is used for result name.
1286         #
1287         #  @return New GEOM.GEOM_Object, containing the created point.
1288         #
1289         #  @ref tui_creation_point "Example"
1290         @ManageTransactions("BasicOp")
1291         def MakeVertexOnCurveByCoord(self, theRefCurve, theX, theY, theZ, theName=None):
1292             """
1293             Create a point by projection give coordinates on the given curve
1294
1295             Parameters:
1296                 theRefCurve The referenced curve.
1297                 theX X-coordinate in 3D space
1298                 theY Y-coordinate in 3D space
1299                 theZ Z-coordinate in 3D space
1300                 theName Object name; when specified, this parameter is used
1301                         for result publication in the study. Otherwise, if automatic
1302                         publication is switched on, default value is used for result name.
1303
1304             Returns:
1305                 New GEOM.GEOM_Object, containing the created point.
1306
1307             Example of usage:
1308                 p_on_arc3 = geompy.MakeVertexOnCurveByCoord(Arc, 100, -10, 10)
1309             """
1310             # Example: see GEOM_TestAll.py
1311             theX, theY, theZ, Parameters = ParseParameters(theX, theY, theZ)
1312             anObj = self.BasicOp.MakePointOnCurveByCoord(theRefCurve, theX, theY, theZ)
1313             RaiseIfFailed("MakeVertexOnCurveByCoord", self.BasicOp)
1314             anObj.SetParameters(Parameters)
1315             self._autoPublish(anObj, theName, "vertex")
1316             return anObj
1317
1318         ## Create a point, corresponding to the given length on the given curve.
1319         #  @param theRefCurve The referenced curve.
1320         #  @param theLength Length on the referenced curve. It can be negative.
1321         #  @param theStartPoint Point allowing to choose the direction for the calculation
1322         #                       of the length. If None, start from the first point of theRefCurve.
1323         #  @param theName Object name; when specified, this parameter is used
1324         #         for result publication in the study. Otherwise, if automatic
1325         #         publication is switched on, default value is used for result name.
1326         #
1327         #  @return New GEOM.GEOM_Object, containing the created point.
1328         #
1329         #  @ref tui_creation_point "Example"
1330         @ManageTransactions("BasicOp")
1331         def MakeVertexOnCurveByLength(self, theRefCurve, theLength, theStartPoint = None, theName=None):
1332             """
1333             Create a point, corresponding to the given length on the given curve.
1334
1335             Parameters:
1336                 theRefCurve The referenced curve.
1337                 theLength Length on the referenced curve. It can be negative.
1338                 theStartPoint Point allowing to choose the direction for the calculation
1339                               of the length. If None, start from the first point of theRefCurve.
1340                 theName Object name; when specified, this parameter is used
1341                         for result publication in the study. Otherwise, if automatic
1342                         publication is switched on, default value is used for result name.
1343
1344             Returns:
1345                 New GEOM.GEOM_Object, containing the created point.
1346             """
1347             # Example: see GEOM_TestAll.py
1348             theLength, Parameters = ParseParameters(theLength)
1349             anObj = self.BasicOp.MakePointOnCurveByLength(theRefCurve, theLength, theStartPoint)
1350             RaiseIfFailed("MakePointOnCurveByLength", self.BasicOp)
1351             anObj.SetParameters(Parameters)
1352             self._autoPublish(anObj, theName, "vertex")
1353             return anObj
1354
1355         ## Create a point, corresponding to the given parameters on the
1356         #    given surface.
1357         #  @param theRefSurf The referenced surface.
1358         #  @param theUParameter Value of U-parameter on the referenced surface.
1359         #  @param theVParameter Value of V-parameter on the referenced surface.
1360         #  @param theName Object name; when specified, this parameter is used
1361         #         for result publication in the study. Otherwise, if automatic
1362         #         publication is switched on, default value is used for result name.
1363         #
1364         #  @return New GEOM.GEOM_Object, containing the created point.
1365         #
1366         #  @ref swig_MakeVertexOnSurface "Example"
1367         @ManageTransactions("BasicOp")
1368         def MakeVertexOnSurface(self, theRefSurf, theUParameter, theVParameter, theName=None):
1369             """
1370             Create a point, corresponding to the given parameters on the
1371             given surface.
1372
1373             Parameters:
1374                 theRefSurf The referenced surface.
1375                 theUParameter Value of U-parameter on the referenced surface.
1376                 theVParameter Value of V-parameter on the referenced surface.
1377                 theName Object name; when specified, this parameter is used
1378                         for result publication in the study. Otherwise, if automatic
1379                         publication is switched on, default value is used for result name.
1380
1381             Returns:
1382                 New GEOM.GEOM_Object, containing the created point.
1383
1384             Example of usage:
1385                 p_on_face = geompy.MakeVertexOnSurface(Face, 0.1, 0.8)
1386             """
1387             theUParameter, theVParameter, Parameters = ParseParameters(theUParameter, theVParameter)
1388             # Example: see GEOM_TestAll.py
1389             anObj = self.BasicOp.MakePointOnSurface(theRefSurf, theUParameter, theVParameter)
1390             RaiseIfFailed("MakePointOnSurface", self.BasicOp)
1391             anObj.SetParameters(Parameters);
1392             self._autoPublish(anObj, theName, "vertex")
1393             return anObj
1394
1395         ## Create a point by projection give coordinates on the given surface
1396         #  @param theRefSurf The referenced surface.
1397         #  @param theX X-coordinate in 3D space
1398         #  @param theY Y-coordinate in 3D space
1399         #  @param theZ Z-coordinate in 3D space
1400         #  @param theName Object name; when specified, this parameter is used
1401         #         for result publication in the study. Otherwise, if automatic
1402         #         publication is switched on, default value is used for result name.
1403         #
1404         #  @return New GEOM.GEOM_Object, containing the created point.
1405         #
1406         #  @ref swig_MakeVertexOnSurfaceByCoord "Example"
1407         @ManageTransactions("BasicOp")
1408         def MakeVertexOnSurfaceByCoord(self, theRefSurf, theX, theY, theZ, theName=None):
1409             """
1410             Create a point by projection give coordinates on the given surface
1411
1412             Parameters:
1413                 theRefSurf The referenced surface.
1414                 theX X-coordinate in 3D space
1415                 theY Y-coordinate in 3D space
1416                 theZ Z-coordinate in 3D space
1417                 theName Object name; when specified, this parameter is used
1418                         for result publication in the study. Otherwise, if automatic
1419                         publication is switched on, default value is used for result name.
1420
1421             Returns:
1422                 New GEOM.GEOM_Object, containing the created point.
1423
1424             Example of usage:
1425                 p_on_face2 = geompy.MakeVertexOnSurfaceByCoord(Face, 0., 0., 0.)
1426             """
1427             theX, theY, theZ, Parameters = ParseParameters(theX, theY, theZ)
1428             # Example: see GEOM_TestAll.py
1429             anObj = self.BasicOp.MakePointOnSurfaceByCoord(theRefSurf, theX, theY, theZ)
1430             RaiseIfFailed("MakeVertexOnSurfaceByCoord", self.BasicOp)
1431             anObj.SetParameters(Parameters);
1432             self._autoPublish(anObj, theName, "vertex")
1433             return anObj
1434
1435         ## Create a point, which lays on the given face.
1436         #  The point will lay in arbitrary place of the face.
1437         #  The only condition on it is a non-zero distance to the face boundary.
1438         #  Such point can be used to uniquely identify the face inside any
1439         #  shape in case, when the shape does not contain overlapped faces.
1440         #  @param theFace The referenced face.
1441         #  @param theName Object name; when specified, this parameter is used
1442         #         for result publication in the study. Otherwise, if automatic
1443         #         publication is switched on, default value is used for result name.
1444         #
1445         #  @return New GEOM.GEOM_Object, containing the created point.
1446         #
1447         #  @ref swig_MakeVertexInsideFace "Example"
1448         @ManageTransactions("BasicOp")
1449         def MakeVertexInsideFace (self, theFace, theName=None):
1450             """
1451             Create a point, which lays on the given face.
1452             The point will lay in arbitrary place of the face.
1453             The only condition on it is a non-zero distance to the face boundary.
1454             Such point can be used to uniquely identify the face inside any
1455             shape in case, when the shape does not contain overlapped faces.
1456
1457             Parameters:
1458                 theFace The referenced face.
1459                 theName Object name; when specified, this parameter is used
1460                         for result publication in the study. Otherwise, if automatic
1461                         publication is switched on, default value is used for result name.
1462
1463             Returns:
1464                 New GEOM.GEOM_Object, containing the created point.
1465
1466             Example of usage:
1467                 p_on_face = geompy.MakeVertexInsideFace(Face)
1468             """
1469             # Example: see GEOM_TestAll.py
1470             anObj = self.BasicOp.MakePointOnFace(theFace)
1471             RaiseIfFailed("MakeVertexInsideFace", self.BasicOp)
1472             self._autoPublish(anObj, theName, "vertex")
1473             return anObj
1474
1475         ## Create a point on intersection of two lines.
1476         #  @param theRefLine1, theRefLine2 The referenced lines.
1477         #  @param theName Object name; when specified, this parameter is used
1478         #         for result publication in the study. Otherwise, if automatic
1479         #         publication is switched on, default value is used for result name.
1480         #
1481         #  @return New GEOM.GEOM_Object, containing the created point.
1482         #
1483         #  @ref swig_MakeVertexOnLinesIntersection "Example"
1484         @ManageTransactions("BasicOp")
1485         def MakeVertexOnLinesIntersection(self, theRefLine1, theRefLine2, theName=None):
1486             """
1487             Create a point on intersection of two lines.
1488
1489             Parameters:
1490                 theRefLine1, theRefLine2 The referenced lines.
1491                 theName Object name; when specified, this parameter is used
1492                         for result publication in the study. Otherwise, if automatic
1493                         publication is switched on, default value is used for result name.
1494
1495             Returns:
1496                 New GEOM.GEOM_Object, containing the created point.
1497             """
1498             # Example: see GEOM_TestAll.py
1499             anObj = self.BasicOp.MakePointOnLinesIntersection(theRefLine1, theRefLine2)
1500             RaiseIfFailed("MakePointOnLinesIntersection", self.BasicOp)
1501             self._autoPublish(anObj, theName, "vertex")
1502             return anObj
1503
1504         ## Create a tangent, corresponding to the given parameter on the given curve.
1505         #  @param theRefCurve The referenced curve.
1506         #  @param theParameter Value of parameter on the referenced curve.
1507         #  @param theName Object name; when specified, this parameter is used
1508         #         for result publication in the study. Otherwise, if automatic
1509         #         publication is switched on, default value is used for result name.
1510         #
1511         #  @return New GEOM.GEOM_Object, containing the created tangent.
1512         #
1513         #  @ref swig_MakeTangentOnCurve "Example"
1514         @ManageTransactions("BasicOp")
1515         def MakeTangentOnCurve(self, theRefCurve, theParameter, theName=None):
1516             """
1517             Create a tangent, corresponding to the given parameter on the given curve.
1518
1519             Parameters:
1520                 theRefCurve The referenced curve.
1521                 theParameter Value of parameter on the referenced curve.
1522                 theName Object name; when specified, this parameter is used
1523                         for result publication in the study. Otherwise, if automatic
1524                         publication is switched on, default value is used for result name.
1525
1526             Returns:
1527                 New GEOM.GEOM_Object, containing the created tangent.
1528
1529             Example of usage:
1530                 tan_on_arc = geompy.MakeTangentOnCurve(Arc, 0.7)
1531             """
1532             anObj = self.BasicOp.MakeTangentOnCurve(theRefCurve, theParameter)
1533             RaiseIfFailed("MakeTangentOnCurve", self.BasicOp)
1534             self._autoPublish(anObj, theName, "tangent")
1535             return anObj
1536
1537         ## Create a tangent plane, corresponding to the given parameter on the given face.
1538         #  @param theFace The face for which tangent plane should be built.
1539         #  @param theParameterV vertical value of the center point (0.0 - 1.0).
1540         #  @param theParameterU horisontal value of the center point (0.0 - 1.0).
1541         #  @param theTrimSize the size of plane.
1542         #  @param theName Object name; when specified, this parameter is used
1543         #         for result publication in the study. Otherwise, if automatic
1544         #         publication is switched on, default value is used for result name.
1545         #
1546         #  @return New GEOM.GEOM_Object, containing the created tangent.
1547         #
1548         #  @ref swig_MakeTangentPlaneOnFace "Example"
1549         @ManageTransactions("BasicOp")
1550         def MakeTangentPlaneOnFace(self, theFace, theParameterU, theParameterV, theTrimSize, theName=None):
1551             """
1552             Create a tangent plane, corresponding to the given parameter on the given face.
1553
1554             Parameters:
1555                 theFace The face for which tangent plane should be built.
1556                 theParameterV vertical value of the center point (0.0 - 1.0).
1557                 theParameterU horisontal value of the center point (0.0 - 1.0).
1558                 theTrimSize the size of plane.
1559                 theName Object name; when specified, this parameter is used
1560                         for result publication in the study. Otherwise, if automatic
1561                         publication is switched on, default value is used for result name.
1562
1563            Returns:
1564                 New GEOM.GEOM_Object, containing the created tangent.
1565
1566            Example of usage:
1567                 an_on_face = geompy.MakeTangentPlaneOnFace(tan_extrusion, 0.7, 0.5, 150)
1568             """
1569             anObj = self.BasicOp.MakeTangentPlaneOnFace(theFace, theParameterU, theParameterV, theTrimSize)
1570             RaiseIfFailed("MakeTangentPlaneOnFace", self.BasicOp)
1571             self._autoPublish(anObj, theName, "tangent")
1572             return anObj
1573
1574         ## Create a vector with the given components.
1575         #  @param theDX X component of the vector.
1576         #  @param theDY Y component of the vector.
1577         #  @param theDZ Z component of the vector.
1578         #  @param theName Object name; when specified, this parameter is used
1579         #         for result publication in the study. Otherwise, if automatic
1580         #         publication is switched on, default value is used for result name.
1581         #
1582         #  @return New GEOM.GEOM_Object, containing the created vector.
1583         #
1584         #  @ref tui_creation_vector "Example"
1585         @ManageTransactions("BasicOp")
1586         def MakeVectorDXDYDZ(self, theDX, theDY, theDZ, theName=None):
1587             """
1588             Create a vector with the given components.
1589
1590             Parameters:
1591                 theDX X component of the vector.
1592                 theDY Y component of the vector.
1593                 theDZ Z component of the vector.
1594                 theName Object name; when specified, this parameter is used
1595                         for result publication in the study. Otherwise, if automatic
1596                         publication is switched on, default value is used for result name.
1597
1598             Returns:
1599                 New GEOM.GEOM_Object, containing the created vector.
1600             """
1601             # Example: see GEOM_TestAll.py
1602             theDX,theDY,theDZ,Parameters = ParseParameters(theDX, theDY, theDZ)
1603             anObj = self.BasicOp.MakeVectorDXDYDZ(theDX, theDY, theDZ)
1604             RaiseIfFailed("MakeVectorDXDYDZ", self.BasicOp)
1605             anObj.SetParameters(Parameters)
1606             self._autoPublish(anObj, theName, "vector")
1607             return anObj
1608
1609         ## Create a vector between two points.
1610         #  @param thePnt1 Start point for the vector.
1611         #  @param thePnt2 End point for the vector.
1612         #  @param theName Object name; when specified, this parameter is used
1613         #         for result publication in the study. Otherwise, if automatic
1614         #         publication is switched on, default value is used for result name.
1615         #
1616         #  @return New GEOM.GEOM_Object, containing the created vector.
1617         #
1618         #  @ref tui_creation_vector "Example"
1619         @ManageTransactions("BasicOp")
1620         def MakeVector(self, thePnt1, thePnt2, theName=None):
1621             """
1622             Create a vector between two points.
1623
1624             Parameters:
1625                 thePnt1 Start point for the vector.
1626                 thePnt2 End point for the vector.
1627                 theName Object name; when specified, this parameter is used
1628                         for result publication in the study. Otherwise, if automatic
1629                         publication is switched on, default value is used for result name.
1630
1631             Returns:
1632                 New GEOM.GEOM_Object, containing the created vector.
1633             """
1634             # Example: see GEOM_TestAll.py
1635             anObj = self.BasicOp.MakeVectorTwoPnt(thePnt1, thePnt2)
1636             RaiseIfFailed("MakeVectorTwoPnt", self.BasicOp)
1637             self._autoPublish(anObj, theName, "vector")
1638             return anObj
1639
1640         ## Create a line, passing through the given point
1641         #  and parallel to the given direction
1642         #  @param thePnt Point. The resulting line will pass through it.
1643         #  @param theDir Direction. The resulting line will be parallel to it.
1644         #  @param theName Object name; when specified, this parameter is used
1645         #         for result publication in the study. Otherwise, if automatic
1646         #         publication is switched on, default value is used for result name.
1647         #
1648         #  @return New GEOM.GEOM_Object, containing the created line.
1649         #
1650         #  @ref tui_creation_line "Example"
1651         @ManageTransactions("BasicOp")
1652         def MakeLine(self, thePnt, theDir, theName=None):
1653             """
1654             Create a line, passing through the given point
1655             and parallel to the given direction
1656
1657             Parameters:
1658                 thePnt Point. The resulting line will pass through it.
1659                 theDir Direction. The resulting line will be parallel to it.
1660                 theName Object name; when specified, this parameter is used
1661                         for result publication in the study. Otherwise, if automatic
1662                         publication is switched on, default value is used for result name.
1663
1664             Returns:
1665                 New GEOM.GEOM_Object, containing the created line.
1666             """
1667             # Example: see GEOM_TestAll.py
1668             anObj = self.BasicOp.MakeLine(thePnt, theDir)
1669             RaiseIfFailed("MakeLine", self.BasicOp)
1670             self._autoPublish(anObj, theName, "line")
1671             return anObj
1672
1673         ## Create a line, passing through the given points
1674         #  @param thePnt1 First of two points, defining the line.
1675         #  @param thePnt2 Second of two points, defining the line.
1676         #  @param theName Object name; when specified, this parameter is used
1677         #         for result publication in the study. Otherwise, if automatic
1678         #         publication is switched on, default value is used for result name.
1679         #
1680         #  @return New GEOM.GEOM_Object, containing the created line.
1681         #
1682         #  @ref tui_creation_line "Example"
1683         @ManageTransactions("BasicOp")
1684         def MakeLineTwoPnt(self, thePnt1, thePnt2, theName=None):
1685             """
1686             Create a line, passing through the given points
1687
1688             Parameters:
1689                 thePnt1 First of two points, defining the line.
1690                 thePnt2 Second of two points, defining the line.
1691                 theName Object name; when specified, this parameter is used
1692                         for result publication in the study. Otherwise, if automatic
1693                         publication is switched on, default value is used for result name.
1694
1695             Returns:
1696                 New GEOM.GEOM_Object, containing the created line.
1697             """
1698             # Example: see GEOM_TestAll.py
1699             anObj = self.BasicOp.MakeLineTwoPnt(thePnt1, thePnt2)
1700             RaiseIfFailed("MakeLineTwoPnt", self.BasicOp)
1701             self._autoPublish(anObj, theName, "line")
1702             return anObj
1703
1704         ## Create a line on two faces intersection.
1705         #  @param theFace1 First of two faces, defining the line.
1706         #  @param theFace2 Second of two faces, defining the line.
1707         #  @param theName Object name; when specified, this parameter is used
1708         #         for result publication in the study. Otherwise, if automatic
1709         #         publication is switched on, default value is used for result name.
1710         #
1711         #  @return New GEOM.GEOM_Object, containing the created line.
1712         #
1713         #  @ref swig_MakeLineTwoFaces "Example"
1714         @ManageTransactions("BasicOp")
1715         def MakeLineTwoFaces(self, theFace1, theFace2, theName=None):
1716             """
1717             Create a line on two faces intersection.
1718
1719             Parameters:
1720                 theFace1 First of two faces, defining the line.
1721                 theFace2 Second of two faces, defining the line.
1722                 theName Object name; when specified, this parameter is used
1723                         for result publication in the study. Otherwise, if automatic
1724                         publication is switched on, default value is used for result name.
1725
1726             Returns:
1727                 New GEOM.GEOM_Object, containing the created line.
1728             """
1729             # Example: see GEOM_TestAll.py
1730             anObj = self.BasicOp.MakeLineTwoFaces(theFace1, theFace2)
1731             RaiseIfFailed("MakeLineTwoFaces", self.BasicOp)
1732             self._autoPublish(anObj, theName, "line")
1733             return anObj
1734
1735         ## Create a plane, passing through the given point
1736         #  and normal to the given vector.
1737         #  @param thePnt Point, the plane has to pass through.
1738         #  @param theVec Vector, defining the plane normal direction.
1739         #  @param theTrimSize Half size of a side of quadrangle face, representing the plane.
1740         #  @param theName Object name; when specified, this parameter is used
1741         #         for result publication in the study. Otherwise, if automatic
1742         #         publication is switched on, default value is used for result name.
1743         #
1744         #  @return New GEOM.GEOM_Object, containing the created plane.
1745         #
1746         #  @ref tui_creation_plane "Example"
1747         @ManageTransactions("BasicOp")
1748         def MakePlane(self, thePnt, theVec, theTrimSize, theName=None):
1749             """
1750             Create a plane, passing through the given point
1751             and normal to the given vector.
1752
1753             Parameters:
1754                 thePnt Point, the plane has to pass through.
1755                 theVec Vector, defining the plane normal direction.
1756                 theTrimSize Half size of a side of quadrangle face, representing the plane.
1757                 theName Object name; when specified, this parameter is used
1758                         for result publication in the study. Otherwise, if automatic
1759                         publication is switched on, default value is used for result name.
1760
1761             Returns:
1762                 New GEOM.GEOM_Object, containing the created plane.
1763             """
1764             # Example: see GEOM_TestAll.py
1765             theTrimSize, Parameters = ParseParameters(theTrimSize);
1766             anObj = self.BasicOp.MakePlanePntVec(thePnt, theVec, theTrimSize)
1767             RaiseIfFailed("MakePlanePntVec", self.BasicOp)
1768             anObj.SetParameters(Parameters)
1769             self._autoPublish(anObj, theName, "plane")
1770             return anObj
1771
1772         ## Create a plane, passing through the three given points
1773         #  @param thePnt1 First of three points, defining the plane.
1774         #  @param thePnt2 Second of three points, defining the plane.
1775         #  @param thePnt3 Fird of three points, defining the plane.
1776         #  @param theTrimSize Half size of a side of quadrangle face, representing the plane.
1777         #  @param theName Object name; when specified, this parameter is used
1778         #         for result publication in the study. Otherwise, if automatic
1779         #         publication is switched on, default value is used for result name.
1780         #
1781         #  @return New GEOM.GEOM_Object, containing the created plane.
1782         #
1783         #  @ref tui_creation_plane "Example"
1784         @ManageTransactions("BasicOp")
1785         def MakePlaneThreePnt(self, thePnt1, thePnt2, thePnt3, theTrimSize, theName=None):
1786             """
1787             Create a plane, passing through the three given points
1788
1789             Parameters:
1790                 thePnt1 First of three points, defining the plane.
1791                 thePnt2 Second of three points, defining the plane.
1792                 thePnt3 Fird of three points, defining the plane.
1793                 theTrimSize Half size of a side of quadrangle face, representing the plane.
1794                 theName Object name; when specified, this parameter is used
1795                         for result publication in the study. Otherwise, if automatic
1796                         publication is switched on, default value is used for result name.
1797
1798             Returns:
1799                 New GEOM.GEOM_Object, containing the created plane.
1800             """
1801             # Example: see GEOM_TestAll.py
1802             theTrimSize, Parameters = ParseParameters(theTrimSize);
1803             anObj = self.BasicOp.MakePlaneThreePnt(thePnt1, thePnt2, thePnt3, theTrimSize)
1804             RaiseIfFailed("MakePlaneThreePnt", self.BasicOp)
1805             anObj.SetParameters(Parameters)
1806             self._autoPublish(anObj, theName, "plane")
1807             return anObj
1808
1809         ## Create a plane, similar to the existing one, but with another size of representing face.
1810         #  @param theFace Referenced plane or LCS(Marker).
1811         #  @param theTrimSize New half size of a side of quadrangle face, representing the plane.
1812         #  @param theName Object name; when specified, this parameter is used
1813         #         for result publication in the study. Otherwise, if automatic
1814         #         publication is switched on, default value is used for result name.
1815         #
1816         #  @return New GEOM.GEOM_Object, containing the created plane.
1817         #
1818         #  @ref tui_creation_plane "Example"
1819         @ManageTransactions("BasicOp")
1820         def MakePlaneFace(self, theFace, theTrimSize, theName=None):
1821             """
1822             Create a plane, similar to the existing one, but with another size of representing face.
1823
1824             Parameters:
1825                 theFace Referenced plane or LCS(Marker).
1826                 theTrimSize New half size of a side of quadrangle face, representing the plane.
1827                 theName Object name; when specified, this parameter is used
1828                         for result publication in the study. Otherwise, if automatic
1829                         publication is switched on, default value is used for result name.
1830
1831             Returns:
1832                 New GEOM.GEOM_Object, containing the created plane.
1833             """
1834             # Example: see GEOM_TestAll.py
1835             theTrimSize, Parameters = ParseParameters(theTrimSize);
1836             anObj = self.BasicOp.MakePlaneFace(theFace, theTrimSize)
1837             RaiseIfFailed("MakePlaneFace", self.BasicOp)
1838             anObj.SetParameters(Parameters)
1839             self._autoPublish(anObj, theName, "plane")
1840             return anObj
1841
1842         ## Create a plane, passing through the 2 vectors
1843         #  with center in a start point of the first vector.
1844         #  @param theVec1 Vector, defining center point and plane direction.
1845         #  @param theVec2 Vector, defining the plane normal direction.
1846         #  @param theTrimSize Half size of a side of quadrangle face, representing the plane.
1847         #  @param theName Object name; when specified, this parameter is used
1848         #         for result publication in the study. Otherwise, if automatic
1849         #         publication is switched on, default value is used for result name.
1850         #
1851         #  @return New GEOM.GEOM_Object, containing the created plane.
1852         #
1853         #  @ref tui_creation_plane "Example"
1854         @ManageTransactions("BasicOp")
1855         def MakePlane2Vec(self, theVec1, theVec2, theTrimSize, theName=None):
1856             """
1857             Create a plane, passing through the 2 vectors
1858             with center in a start point of the first vector.
1859
1860             Parameters:
1861                 theVec1 Vector, defining center point and plane direction.
1862                 theVec2 Vector, defining the plane normal direction.
1863                 theTrimSize Half size of a side of quadrangle face, representing the plane.
1864                 theName Object name; when specified, this parameter is used
1865                         for result publication in the study. Otherwise, if automatic
1866                         publication is switched on, default value is used for result name.
1867
1868             Returns:
1869                 New GEOM.GEOM_Object, containing the created plane.
1870             """
1871             # Example: see GEOM_TestAll.py
1872             theTrimSize, Parameters = ParseParameters(theTrimSize);
1873             anObj = self.BasicOp.MakePlane2Vec(theVec1, theVec2, theTrimSize)
1874             RaiseIfFailed("MakePlane2Vec", self.BasicOp)
1875             anObj.SetParameters(Parameters)
1876             self._autoPublish(anObj, theName, "plane")
1877             return anObj
1878
1879         ## Create a plane, based on a Local coordinate system.
1880         #  @param theLCS  coordinate system, defining plane.
1881         #  @param theTrimSize Half size of a side of quadrangle face, representing the plane.
1882         #  @param theOrientation OXY, OYZ or OZX orientation - (1, 2 or 3)
1883         #  @param theName Object name; when specified, this parameter is used
1884         #         for result publication in the study. Otherwise, if automatic
1885         #         publication is switched on, default value is used for result name.
1886         #
1887         #  @return New GEOM.GEOM_Object, containing the created plane.
1888         #
1889         #  @ref tui_creation_plane "Example"
1890         @ManageTransactions("BasicOp")
1891         def MakePlaneLCS(self, theLCS, theTrimSize, theOrientation, theName=None):
1892             """
1893             Create a plane, based on a Local coordinate system.
1894
1895            Parameters:
1896                 theLCS  coordinate system, defining plane.
1897                 theTrimSize Half size of a side of quadrangle face, representing the plane.
1898                 theOrientation OXY, OYZ or OZX orientation - (1, 2 or 3)
1899                 theName Object name; when specified, this parameter is used
1900                         for result publication in the study. Otherwise, if automatic
1901                         publication is switched on, default value is used for result name.
1902
1903             Returns:
1904                 New GEOM.GEOM_Object, containing the created plane.
1905             """
1906             # Example: see GEOM_TestAll.py
1907             theTrimSize, Parameters = ParseParameters(theTrimSize);
1908             anObj = self.BasicOp.MakePlaneLCS(theLCS, theTrimSize, theOrientation)
1909             RaiseIfFailed("MakePlaneLCS", self.BasicOp)
1910             anObj.SetParameters(Parameters)
1911             self._autoPublish(anObj, theName, "plane")
1912             return anObj
1913
1914         ## Create a local coordinate system.
1915         #  @param OX,OY,OZ Three coordinates of coordinate system origin.
1916         #  @param XDX,XDY,XDZ Three components of OX direction
1917         #  @param YDX,YDY,YDZ Three components of OY direction
1918         #  @param theName Object name; when specified, this parameter is used
1919         #         for result publication in the study. Otherwise, if automatic
1920         #         publication is switched on, default value is used for result name.
1921         #
1922         #  @return New GEOM.GEOM_Object, containing the created coordinate system.
1923         #
1924         #  @ref swig_MakeMarker "Example"
1925         @ManageTransactions("BasicOp")
1926         def MakeMarker(self, OX,OY,OZ, XDX,XDY,XDZ, YDX,YDY,YDZ, theName=None):
1927             """
1928             Create a local coordinate system.
1929
1930             Parameters:
1931                 OX,OY,OZ Three coordinates of coordinate system origin.
1932                 XDX,XDY,XDZ Three components of OX direction
1933                 YDX,YDY,YDZ Three components of OY direction
1934                 theName Object name; when specified, this parameter is used
1935                         for result publication in the study. Otherwise, if automatic
1936                         publication is switched on, default value is used for result name.
1937
1938             Returns:
1939                 New GEOM.GEOM_Object, containing the created coordinate system.
1940             """
1941             # Example: see GEOM_TestAll.py
1942             OX,OY,OZ, XDX,XDY,XDZ, YDX,YDY,YDZ, Parameters = ParseParameters(OX,OY,OZ, XDX,XDY,XDZ, YDX,YDY,YDZ);
1943             anObj = self.BasicOp.MakeMarker(OX,OY,OZ, XDX,XDY,XDZ, YDX,YDY,YDZ)
1944             RaiseIfFailed("MakeMarker", self.BasicOp)
1945             anObj.SetParameters(Parameters)
1946             self._autoPublish(anObj, theName, "lcs")
1947             return anObj
1948
1949         ## Create a local coordinate system from shape.
1950         #  @param theShape The initial shape to detect the coordinate system.
1951         #  @param theName Object name; when specified, this parameter is used
1952         #         for result publication in the study. Otherwise, if automatic
1953         #         publication is switched on, default value is used for result name.
1954         #
1955         #  @return New GEOM.GEOM_Object, containing the created coordinate system.
1956         #
1957         #  @ref tui_creation_lcs "Example"
1958         @ManageTransactions("BasicOp")
1959         def MakeMarkerFromShape(self, theShape, theName=None):
1960             """
1961             Create a local coordinate system from shape.
1962
1963             Parameters:
1964                 theShape The initial shape to detect the coordinate system.
1965                 theName Object name; when specified, this parameter is used
1966                         for result publication in the study. Otherwise, if automatic
1967                         publication is switched on, default value is used for result name.
1968
1969             Returns:
1970                 New GEOM.GEOM_Object, containing the created coordinate system.
1971             """
1972             anObj = self.BasicOp.MakeMarkerFromShape(theShape)
1973             RaiseIfFailed("MakeMarkerFromShape", self.BasicOp)
1974             self._autoPublish(anObj, theName, "lcs")
1975             return anObj
1976
1977         ## Create a local coordinate system from point and two vectors.
1978         #  @param theOrigin Point of coordinate system origin.
1979         #  @param theXVec Vector of X direction
1980         #  @param theYVec Vector of Y direction
1981         #  @param theName Object name; when specified, this parameter is used
1982         #         for result publication in the study. Otherwise, if automatic
1983         #         publication is switched on, default value is used for result name.
1984         #
1985         #  @return New GEOM.GEOM_Object, containing the created coordinate system.
1986         #
1987         #  @ref tui_creation_lcs "Example"
1988         @ManageTransactions("BasicOp")
1989         def MakeMarkerPntTwoVec(self, theOrigin, theXVec, theYVec, theName=None):
1990             """
1991             Create a local coordinate system from point and two vectors.
1992
1993             Parameters:
1994                 theOrigin Point of coordinate system origin.
1995                 theXVec Vector of X direction
1996                 theYVec Vector of Y direction
1997                 theName Object name; when specified, this parameter is used
1998                         for result publication in the study. Otherwise, if automatic
1999                         publication is switched on, default value is used for result name.
2000
2001             Returns:
2002                 New GEOM.GEOM_Object, containing the created coordinate system.
2003
2004             """
2005             anObj = self.BasicOp.MakeMarkerPntTwoVec(theOrigin, theXVec, theYVec)
2006             RaiseIfFailed("MakeMarkerPntTwoVec", self.BasicOp)
2007             self._autoPublish(anObj, theName, "lcs")
2008             return anObj
2009
2010         # end of l3_basic_go
2011         ## @}
2012
2013         ## @addtogroup l4_curves
2014         ## @{
2015
2016         ##  Create an arc of circle, passing through three given points.
2017         #  @param thePnt1 Start point of the arc.
2018         #  @param thePnt2 Middle point of the arc.
2019         #  @param thePnt3 End point of the arc.
2020         #  @param theName Object name; when specified, this parameter is used
2021         #         for result publication in the study. Otherwise, if automatic
2022         #         publication is switched on, default value is used for result name.
2023         #
2024         #  @return New GEOM.GEOM_Object, containing the created arc.
2025         #
2026         #  @ref swig_MakeArc "Example"
2027         @ManageTransactions("CurvesOp")
2028         def MakeArc(self, thePnt1, thePnt2, thePnt3, theName=None):
2029             """
2030             Create an arc of circle, passing through three given points.
2031
2032             Parameters:
2033                 thePnt1 Start point of the arc.
2034                 thePnt2 Middle point of the arc.
2035                 thePnt3 End point of the arc.
2036                 theName Object name; when specified, this parameter is used
2037                         for result publication in the study. Otherwise, if automatic
2038                         publication is switched on, default value is used for result name.
2039
2040             Returns:
2041                 New GEOM.GEOM_Object, containing the created arc.
2042             """
2043             # Example: see GEOM_TestAll.py
2044             anObj = self.CurvesOp.MakeArc(thePnt1, thePnt2, thePnt3)
2045             RaiseIfFailed("MakeArc", self.CurvesOp)
2046             self._autoPublish(anObj, theName, "arc")
2047             return anObj
2048
2049         ##  Create an arc of circle from a center and 2 points.
2050         #  @param thePnt1 Center of the arc
2051         #  @param thePnt2 Start point of the arc. (Gives also the radius of the arc)
2052         #  @param thePnt3 End point of the arc (Gives also a direction)
2053         #  @param theSense Orientation of the arc
2054         #  @param theName Object name; when specified, this parameter is used
2055         #         for result publication in the study. Otherwise, if automatic
2056         #         publication is switched on, default value is used for result name.
2057         #
2058         #  @return New GEOM.GEOM_Object, containing the created arc.
2059         #
2060         #  @ref swig_MakeArc "Example"
2061         @ManageTransactions("CurvesOp")
2062         def MakeArcCenter(self, thePnt1, thePnt2, thePnt3, theSense=False, theName=None):
2063             """
2064             Create an arc of circle from a center and 2 points.
2065
2066             Parameters:
2067                 thePnt1 Center of the arc
2068                 thePnt2 Start point of the arc. (Gives also the radius of the arc)
2069                 thePnt3 End point of the arc (Gives also a direction)
2070                 theSense Orientation of the arc
2071                 theName Object name; when specified, this parameter is used
2072                         for result publication in the study. Otherwise, if automatic
2073                         publication is switched on, default value is used for result name.
2074
2075             Returns:
2076                 New GEOM.GEOM_Object, containing the created arc.
2077             """
2078             # Example: see GEOM_TestAll.py
2079             anObj = self.CurvesOp.MakeArcCenter(thePnt1, thePnt2, thePnt3, theSense)
2080             RaiseIfFailed("MakeArcCenter", self.CurvesOp)
2081             self._autoPublish(anObj, theName, "arc")
2082             return anObj
2083
2084         ##  Create an arc of ellipse, of center and two points.
2085         #  @param theCenter Center of the arc.
2086         #  @param thePnt1 defines major radius of the arc by distance from Pnt1 to Pnt2.
2087         #  @param thePnt2 defines plane of ellipse and minor radius as distance from Pnt3 to line from Pnt1 to Pnt2.
2088         #  @param theName Object name; when specified, this parameter is used
2089         #         for result publication in the study. Otherwise, if automatic
2090         #         publication is switched on, default value is used for result name.
2091         #
2092         #  @return New GEOM.GEOM_Object, containing the created arc.
2093         #
2094         #  @ref swig_MakeArc "Example"
2095         @ManageTransactions("CurvesOp")
2096         def MakeArcOfEllipse(self, theCenter, thePnt1, thePnt2, theName=None):
2097             """
2098             Create an arc of ellipse, of center and two points.
2099
2100             Parameters:
2101                 theCenter Center of the arc.
2102                 thePnt1 defines major radius of the arc by distance from Pnt1 to Pnt2.
2103                 thePnt2 defines plane of ellipse and minor radius as distance from Pnt3 to line from Pnt1 to Pnt2.
2104                 theName Object name; when specified, this parameter is used
2105                         for result publication in the study. Otherwise, if automatic
2106                         publication is switched on, default value is used for result name.
2107
2108             Returns:
2109                 New GEOM.GEOM_Object, containing the created arc.
2110             """
2111             # Example: see GEOM_TestAll.py
2112             anObj = self.CurvesOp.MakeArcOfEllipse(theCenter, thePnt1, thePnt2)
2113             RaiseIfFailed("MakeArcOfEllipse", self.CurvesOp)
2114             self._autoPublish(anObj, theName, "arc")
2115             return anObj
2116
2117         ## Create a circle with given center, normal vector and radius.
2118         #  @param thePnt Circle center.
2119         #  @param theVec Vector, normal to the plane of the circle.
2120         #  @param theR Circle radius.
2121         #  @param theName Object name; when specified, this parameter is used
2122         #         for result publication in the study. Otherwise, if automatic
2123         #         publication is switched on, default value is used for result name.
2124         #
2125         #  @return New GEOM.GEOM_Object, containing the created circle.
2126         #
2127         #  @ref tui_creation_circle "Example"
2128         @ManageTransactions("CurvesOp")
2129         def MakeCircle(self, thePnt, theVec, theR, theName=None):
2130             """
2131             Create a circle with given center, normal vector and radius.
2132
2133             Parameters:
2134                 thePnt Circle center.
2135                 theVec Vector, normal to the plane of the circle.
2136                 theR Circle radius.
2137                 theName Object name; when specified, this parameter is used
2138                         for result publication in the study. Otherwise, if automatic
2139                         publication is switched on, default value is used for result name.
2140
2141             Returns:
2142                 New GEOM.GEOM_Object, containing the created circle.
2143             """
2144             # Example: see GEOM_TestAll.py
2145             theR, Parameters = ParseParameters(theR)
2146             anObj = self.CurvesOp.MakeCirclePntVecR(thePnt, theVec, theR)
2147             RaiseIfFailed("MakeCirclePntVecR", self.CurvesOp)
2148             anObj.SetParameters(Parameters)
2149             self._autoPublish(anObj, theName, "circle")
2150             return anObj
2151
2152         ## Create a circle with given radius.
2153         #  Center of the circle will be in the origin of global
2154         #  coordinate system and normal vector will be codirected with Z axis
2155         #  @param theR Circle radius.
2156         #  @param theName Object name; when specified, this parameter is used
2157         #         for result publication in the study. Otherwise, if automatic
2158         #         publication is switched on, default value is used for result name.
2159         #
2160         #  @return New GEOM.GEOM_Object, containing the created circle.
2161         @ManageTransactions("CurvesOp")
2162         def MakeCircleR(self, theR, theName=None):
2163             """
2164             Create a circle with given radius.
2165             Center of the circle will be in the origin of global
2166             coordinate system and normal vector will be codirected with Z axis
2167
2168             Parameters:
2169                 theR Circle radius.
2170                 theName Object name; when specified, this parameter is used
2171                         for result publication in the study. Otherwise, if automatic
2172                         publication is switched on, default value is used for result name.
2173
2174             Returns:
2175                 New GEOM.GEOM_Object, containing the created circle.
2176             """
2177             anObj = self.CurvesOp.MakeCirclePntVecR(None, None, theR)
2178             RaiseIfFailed("MakeCirclePntVecR", self.CurvesOp)
2179             self._autoPublish(anObj, theName, "circle")
2180             return anObj
2181
2182         ## Create a circle, passing through three given points
2183         #  @param thePnt1,thePnt2,thePnt3 Points, defining the circle.
2184         #  @param theName Object name; when specified, this parameter is used
2185         #         for result publication in the study. Otherwise, if automatic
2186         #         publication is switched on, default value is used for result name.
2187         #
2188         #  @return New GEOM.GEOM_Object, containing the created circle.
2189         #
2190         #  @ref tui_creation_circle "Example"
2191         @ManageTransactions("CurvesOp")
2192         def MakeCircleThreePnt(self, thePnt1, thePnt2, thePnt3, theName=None):
2193             """
2194             Create a circle, passing through three given points
2195
2196             Parameters:
2197                 thePnt1,thePnt2,thePnt3 Points, defining the circle.
2198                 theName Object name; when specified, this parameter is used
2199                         for result publication in the study. Otherwise, if automatic
2200                         publication is switched on, default value is used for result name.
2201
2202             Returns:
2203                 New GEOM.GEOM_Object, containing the created circle.
2204             """
2205             # Example: see GEOM_TestAll.py
2206             anObj = self.CurvesOp.MakeCircleThreePnt(thePnt1, thePnt2, thePnt3)
2207             RaiseIfFailed("MakeCircleThreePnt", self.CurvesOp)
2208             self._autoPublish(anObj, theName, "circle")
2209             return anObj
2210
2211         ## Create a circle, with given point1 as center,
2212         #  passing through the point2 as radius and laying in the plane,
2213         #  defined by all three given points.
2214         #  @param thePnt1,thePnt2,thePnt3 Points, defining the circle.
2215         #  @param theName Object name; when specified, this parameter is used
2216         #         for result publication in the study. Otherwise, if automatic
2217         #         publication is switched on, default value is used for result name.
2218         #
2219         #  @return New GEOM.GEOM_Object, containing the created circle.
2220         #
2221         #  @ref swig_MakeCircle "Example"
2222         @ManageTransactions("CurvesOp")
2223         def MakeCircleCenter2Pnt(self, thePnt1, thePnt2, thePnt3, theName=None):
2224             """
2225             Create a circle, with given point1 as center,
2226             passing through the point2 as radius and laying in the plane,
2227             defined by all three given points.
2228
2229             Parameters:
2230                 thePnt1,thePnt2,thePnt3 Points, defining the circle.
2231                 theName Object name; when specified, this parameter is used
2232                         for result publication in the study. Otherwise, if automatic
2233                         publication is switched on, default value is used for result name.
2234
2235             Returns:
2236                 New GEOM.GEOM_Object, containing the created circle.
2237             """
2238             # Example: see GEOM_example6.py
2239             anObj = self.CurvesOp.MakeCircleCenter2Pnt(thePnt1, thePnt2, thePnt3)
2240             RaiseIfFailed("MakeCircleCenter2Pnt", self.CurvesOp)
2241             self._autoPublish(anObj, theName, "circle")
2242             return anObj
2243
2244         ## Create an ellipse with given center, normal vector and radiuses.
2245         #  @param thePnt Ellipse center.
2246         #  @param theVec Vector, normal to the plane of the ellipse.
2247         #  @param theRMajor Major ellipse radius.
2248         #  @param theRMinor Minor ellipse radius.
2249         #  @param theVecMaj Vector, direction of the ellipse's main axis.
2250         #  @param theName Object name; when specified, this parameter is used
2251         #         for result publication in the study. Otherwise, if automatic
2252         #         publication is switched on, default value is used for result name.
2253         #
2254         #  @return New GEOM.GEOM_Object, containing the created ellipse.
2255         #
2256         #  @ref tui_creation_ellipse "Example"
2257         @ManageTransactions("CurvesOp")
2258         def MakeEllipse(self, thePnt, theVec, theRMajor, theRMinor, theVecMaj=None, theName=None):
2259             """
2260             Create an ellipse with given center, normal vector and radiuses.
2261
2262             Parameters:
2263                 thePnt Ellipse center.
2264                 theVec Vector, normal to the plane of the ellipse.
2265                 theRMajor Major ellipse radius.
2266                 theRMinor Minor ellipse radius.
2267                 theVecMaj Vector, direction of the ellipse's main axis.
2268                 theName Object name; when specified, this parameter is used
2269                         for result publication in the study. Otherwise, if automatic
2270                         publication is switched on, default value is used for result name.
2271
2272             Returns:
2273                 New GEOM.GEOM_Object, containing the created ellipse.
2274             """
2275             # Example: see GEOM_TestAll.py
2276             theRMajor, theRMinor, Parameters = ParseParameters(theRMajor, theRMinor)
2277             if theVecMaj is not None:
2278                 anObj = self.CurvesOp.MakeEllipseVec(thePnt, theVec, theRMajor, theRMinor, theVecMaj)
2279             else:
2280                 anObj = self.CurvesOp.MakeEllipse(thePnt, theVec, theRMajor, theRMinor)
2281                 pass
2282             RaiseIfFailed("MakeEllipse", self.CurvesOp)
2283             anObj.SetParameters(Parameters)
2284             self._autoPublish(anObj, theName, "ellipse")
2285             return anObj
2286
2287         ## Create an ellipse with given radiuses.
2288         #  Center of the ellipse will be in the origin of global
2289         #  coordinate system and normal vector will be codirected with Z axis
2290         #  @param theRMajor Major ellipse radius.
2291         #  @param theRMinor Minor ellipse radius.
2292         #  @param theName Object name; when specified, this parameter is used
2293         #         for result publication in the study. Otherwise, if automatic
2294         #         publication is switched on, default value is used for result name.
2295         #
2296         #  @return New GEOM.GEOM_Object, containing the created ellipse.
2297         @ManageTransactions("CurvesOp")
2298         def MakeEllipseRR(self, theRMajor, theRMinor, theName=None):
2299             """
2300             Create an ellipse with given radiuses.
2301             Center of the ellipse will be in the origin of global
2302             coordinate system and normal vector will be codirected with Z axis
2303
2304             Parameters:
2305                 theRMajor Major ellipse radius.
2306                 theRMinor Minor ellipse radius.
2307                 theName Object name; when specified, this parameter is used
2308                         for result publication in the study. Otherwise, if automatic
2309                         publication is switched on, default value is used for result name.
2310
2311             Returns:
2312             New GEOM.GEOM_Object, containing the created ellipse.
2313             """
2314             anObj = self.CurvesOp.MakeEllipse(None, None, theRMajor, theRMinor)
2315             RaiseIfFailed("MakeEllipse", self.CurvesOp)
2316             self._autoPublish(anObj, theName, "ellipse")
2317             return anObj
2318
2319         ## Create a polyline on the set of points.
2320         #  @param thePoints Sequence of points for the polyline.
2321         #  @param theIsClosed If True, build a closed wire.
2322         #  @param theName Object name; when specified, this parameter is used
2323         #         for result publication in the study. Otherwise, if automatic
2324         #         publication is switched on, default value is used for result name.
2325         #
2326         #  @return New GEOM.GEOM_Object, containing the created polyline.
2327         #
2328         #  @ref tui_creation_curve "Example"
2329         @ManageTransactions("CurvesOp")
2330         def MakePolyline(self, thePoints, theIsClosed=False, theName=None):
2331             """
2332             Create a polyline on the set of points.
2333
2334             Parameters:
2335                 thePoints Sequence of points for the polyline.
2336                 theIsClosed If True, build a closed wire.
2337                 theName Object name; when specified, this parameter is used
2338                         for result publication in the study. Otherwise, if automatic
2339                         publication is switched on, default value is used for result name.
2340
2341             Returns:
2342                 New GEOM.GEOM_Object, containing the created polyline.
2343             """
2344             # Example: see GEOM_TestAll.py
2345             anObj = self.CurvesOp.MakePolyline(thePoints, theIsClosed)
2346             RaiseIfFailed("MakePolyline", self.CurvesOp)
2347             self._autoPublish(anObj, theName, "polyline")
2348             return anObj
2349
2350         ## Create bezier curve on the set of points.
2351         #  @param thePoints Sequence of points for the bezier curve.
2352         #  @param theIsClosed If True, build a closed curve.
2353         #  @param theName Object name; when specified, this parameter is used
2354         #         for result publication in the study. Otherwise, if automatic
2355         #         publication is switched on, default value is used for result name.
2356         #
2357         #  @return New GEOM.GEOM_Object, containing the created bezier curve.
2358         #
2359         #  @ref tui_creation_curve "Example"
2360         @ManageTransactions("CurvesOp")
2361         def MakeBezier(self, thePoints, theIsClosed=False, theName=None):
2362             """
2363             Create bezier curve on the set of points.
2364
2365             Parameters:
2366                 thePoints Sequence of points for the bezier curve.
2367                 theIsClosed If True, build a closed curve.
2368                 theName Object name; when specified, this parameter is used
2369                         for result publication in the study. Otherwise, if automatic
2370                         publication is switched on, default value is used for result name.
2371
2372             Returns:
2373                 New GEOM.GEOM_Object, containing the created bezier curve.
2374             """
2375             # Example: see GEOM_TestAll.py
2376             anObj = self.CurvesOp.MakeSplineBezier(thePoints, theIsClosed)
2377             RaiseIfFailed("MakeSplineBezier", self.CurvesOp)
2378             self._autoPublish(anObj, theName, "bezier")
2379             return anObj
2380
2381         ## Create B-Spline curve on the set of points.
2382         #  @param thePoints Sequence of points for the B-Spline curve.
2383         #  @param theIsClosed If True, build a closed curve.
2384         #  @param theDoReordering If TRUE, the algo does not follow the order of
2385         #                         \a thePoints but searches for the closest vertex.
2386         #  @param theName Object name; when specified, this parameter is used
2387         #         for result publication in the study. Otherwise, if automatic
2388         #         publication is switched on, default value is used for result name.
2389         #
2390         #  @return New GEOM.GEOM_Object, containing the created B-Spline curve.
2391         #
2392         #  @ref tui_creation_curve "Example"
2393         @ManageTransactions("CurvesOp")
2394         def MakeInterpol(self, thePoints, theIsClosed=False, theDoReordering=False, theName=None):
2395             """
2396             Create B-Spline curve on the set of points.
2397
2398             Parameters:
2399                 thePoints Sequence of points for the B-Spline curve.
2400                 theIsClosed If True, build a closed curve.
2401                 theDoReordering If True, the algo does not follow the order of
2402                                 thePoints but searches for the closest vertex.
2403                 theName Object name; when specified, this parameter is used
2404                         for result publication in the study. Otherwise, if automatic
2405                         publication is switched on, default value is used for result name.
2406
2407             Returns:
2408                 New GEOM.GEOM_Object, containing the created B-Spline curve.
2409             """
2410             # Example: see GEOM_TestAll.py
2411             anObj = self.CurvesOp.MakeSplineInterpolation(thePoints, theIsClosed, theDoReordering)
2412             RaiseIfFailed("MakeInterpol", self.CurvesOp)
2413             self._autoPublish(anObj, theName, "bspline")
2414             return anObj
2415
2416         ## Create B-Spline curve on the set of points.
2417         #  @param thePoints Sequence of points for the B-Spline curve.
2418         #  @param theFirstVec Vector object, defining the curve direction at its first point.
2419         #  @param theLastVec Vector object, defining the curve direction at its last point.
2420         #  @param theName Object name; when specified, this parameter is used
2421         #         for result publication in the study. Otherwise, if automatic
2422         #         publication is switched on, default value is used for result name.
2423         #
2424         #  @return New GEOM.GEOM_Object, containing the created B-Spline curve.
2425         #
2426         #  @ref tui_creation_curve "Example"
2427         @ManageTransactions("CurvesOp")
2428         def MakeInterpolWithTangents(self, thePoints, theFirstVec, theLastVec, theName=None):
2429             """
2430             Create B-Spline curve on the set of points.
2431
2432             Parameters:
2433                 thePoints Sequence of points for the B-Spline curve.
2434                 theFirstVec Vector object, defining the curve direction at its first point.
2435                 theLastVec Vector object, defining the curve direction at its last point.
2436                 theName Object name; when specified, this parameter is used
2437                         for result publication in the study. Otherwise, if automatic
2438                         publication is switched on, default value is used for result name.
2439
2440             Returns:
2441                 New GEOM.GEOM_Object, containing the created B-Spline curve.
2442             """
2443             # Example: see GEOM_TestAll.py
2444             anObj = self.CurvesOp.MakeSplineInterpolWithTangents(thePoints, theFirstVec, theLastVec)
2445             RaiseIfFailed("MakeInterpolWithTangents", self.CurvesOp)
2446             self._autoPublish(anObj, theName, "bspline")
2447             return anObj
2448
2449         ## Creates a curve using the parametric definition of the basic points.
2450         #  @param thexExpr parametric equation of the coordinates X.
2451         #  @param theyExpr parametric equation of the coordinates Y.
2452         #  @param thezExpr parametric equation of the coordinates Z.
2453         #  @param theParamMin the minimal value of the parameter.
2454         #  @param theParamMax the maximum value of the parameter.
2455         #  @param theParamStep the number of steps if theNewMethod = True, else step value of the parameter.
2456         #  @param theCurveType the type of the curve,
2457         #         one of GEOM.Polyline, GEOM.Bezier, GEOM.Interpolation.
2458         #  @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.
2459         #  @param theName Object name; when specified, this parameter is used
2460         #         for result publication in the study. Otherwise, if automatic
2461         #         publication is switched on, default value is used for result name.
2462         #
2463         #  @return New GEOM.GEOM_Object, containing the created curve.
2464         #
2465         #  @ref tui_creation_curve "Example"
2466         @ManageTransactions("CurvesOp")
2467         def MakeCurveParametric(self, thexExpr, theyExpr, thezExpr,
2468                                 theParamMin, theParamMax, theParamStep, theCurveType, theNewMethod=False, theName=None ):
2469             """
2470             Creates a curve using the parametric definition of the basic points.
2471
2472             Parameters:
2473                 thexExpr parametric equation of the coordinates X.
2474                 theyExpr parametric equation of the coordinates Y.
2475                 thezExpr parametric equation of the coordinates Z.
2476                 theParamMin the minimal value of the parameter.
2477                 theParamMax the maximum value of the parameter.
2478                 theParamStep the number of steps if theNewMethod = True, else step value of the parameter.
2479                 theCurveType the type of the curve,
2480                              one of GEOM.Polyline, GEOM.Bezier, GEOM.Interpolation.
2481                 theNewMethod flag for switching to the new method if the flag is set to false a deprecated
2482                              method is used which can lead to a bug.
2483                 theName Object name; when specified, this parameter is used
2484                         for result publication in the study. Otherwise, if automatic
2485                         publication is switched on, default value is used for result name.
2486
2487             Returns:
2488                 New GEOM.GEOM_Object, containing the created curve.
2489             """
2490             theParamMin,theParamMax,theParamStep,Parameters = ParseParameters(theParamMin,theParamMax,theParamStep)
2491             if theNewMethod:
2492               anObj = self.CurvesOp.MakeCurveParametricNew(thexExpr,theyExpr,thezExpr,theParamMin,theParamMax,theParamStep,theCurveType)
2493             else:
2494               anObj = self.CurvesOp.MakeCurveParametric(thexExpr,theyExpr,thezExpr,theParamMin,theParamMax,theParamStep,theCurveType)
2495             RaiseIfFailed("MakeCurveParametric", self.CurvesOp)
2496             anObj.SetParameters(Parameters)
2497             self._autoPublish(anObj, theName, "curve")
2498             return anObj
2499
2500         ## Create an isoline curve on a face.
2501         #  @param theFace the face for which an isoline is created.
2502         #  @param IsUIsoline True for U-isoline creation; False for V-isoline
2503         #         creation.
2504         #  @param theParameter the U parameter for U-isoline or V parameter
2505         #         for V-isoline.
2506         #  @param theName Object name; when specified, this parameter is used
2507         #         for result publication in the study. Otherwise, if automatic
2508         #         publication is switched on, default value is used for result name.
2509         #
2510         #  @return New GEOM.GEOM_Object, containing the created isoline edge or
2511         #          a compound of edges.
2512         #
2513         #  @ref tui_creation_curve "Example"
2514         @ManageTransactions("CurvesOp")
2515         def MakeIsoline(self, theFace, IsUIsoline, theParameter, theName=None):
2516             """
2517             Create an isoline curve on a face.
2518
2519             Parameters:
2520                 theFace the face for which an isoline is created.
2521                 IsUIsoline True for U-isoline creation; False for V-isoline
2522                            creation.
2523                 theParameter the U parameter for U-isoline or V parameter
2524                              for V-isoline.
2525                 theName Object name; when specified, this parameter is used
2526                         for result publication in the study. Otherwise, if automatic
2527                         publication is switched on, default value is used for result name.
2528
2529             Returns:
2530                 New GEOM.GEOM_Object, containing the created isoline edge or a
2531                 compound of edges.
2532             """
2533             # Example: see GEOM_TestAll.py
2534             anObj = self.CurvesOp.MakeIsoline(theFace, IsUIsoline, theParameter)
2535             RaiseIfFailed("MakeIsoline", self.CurvesOp)
2536             if IsUIsoline:
2537                 self._autoPublish(anObj, theName, "U-Isoline")
2538             else:
2539                 self._autoPublish(anObj, theName, "V-Isoline")
2540             return anObj
2541
2542         # end of l4_curves
2543         ## @}
2544
2545         ## @addtogroup l3_sketcher
2546         ## @{
2547
2548         ## Create a sketcher (wire or face), following the textual description,
2549         #  passed through <VAR>theCommand</VAR> argument. \n
2550         #  Edges of the resulting wire or face will be arcs of circles and/or linear segments. \n
2551         #  Format of the description string have to be the following:
2552         #
2553         #  "Sketcher[:F x1 y1]:CMD[:CMD[:CMD...]]"
2554         #
2555         #  Where:
2556         #  - x1, y1 are coordinates of the first sketcher point (zero by default),
2557         #  - CMD is one of
2558         #     - "R angle" : Set the direction by angle
2559         #     - "D dx dy" : Set the direction by DX & DY
2560         #     .
2561         #       \n
2562         #     - "TT x y" : Create segment by point at X & Y
2563         #     - "T dx dy" : Create segment by point with DX & DY
2564         #     - "L length" : Create segment by direction & Length
2565         #     - "IX x" : Create segment by direction & Intersect. X
2566         #     - "IY y" : Create segment by direction & Intersect. Y
2567         #     .
2568         #       \n
2569         #     - "C radius length" : Create arc by direction, radius and length(in degree)
2570         #     - "AA x y": Create arc by point at X & Y
2571         #     - "A dx dy" : Create arc by point with DX & DY
2572         #     - "UU x y radius flag1": Create arc by point at X & Y with given radiUs
2573         #     - "U dx dy radius flag1" : Create arc by point with DX & DY with given radiUs
2574         #     - "EE x y xc yc flag1 flag2": Create arc by point at X & Y with given cEnter coordinates
2575         #     - "E dx dy dxc dyc radius flag1 flag2" : Create arc by point with DX & DY with given cEnter coordinates
2576         #     .
2577         #       \n
2578         #     - "WW" : Close Wire (to finish)
2579         #     - "WF" : Close Wire and build face (to finish)
2580         #     .
2581         #        \n
2582         #  - Flag1 (= reverse) is 0 or 2 ...
2583         #     - if 0 the drawn arc is the one of lower angle (< Pi)
2584         #     - if 2 the drawn arc ius the one of greater angle (> Pi)
2585         #     .
2586         #        \n
2587         #  - Flag2 (= control tolerance) is 0 or 1 ...
2588         #     - if 0 the specified end point can be at a distance of the arc greater than the tolerance (10^-7)
2589         #     - if 1 the wire is built only if the end point is on the arc
2590         #       with a tolerance of 10^-7 on the distance else the creation fails
2591         #
2592         #  @param theCommand String, defining the sketcher in local
2593         #                    coordinates of the working plane.
2594         #  @param theWorkingPlane Nine double values, defining origin,
2595         #                         OZ and OX directions of the working plane.
2596         #  @param theName Object name; when specified, this parameter is used
2597         #         for result publication in the study. Otherwise, if automatic
2598         #         publication is switched on, default value is used for result name.
2599         #
2600         #  @return New GEOM.GEOM_Object, containing the created wire.
2601         #
2602         #  @ref tui_sketcher_page "Example"
2603         @ManageTransactions("CurvesOp")
2604         def MakeSketcher(self, theCommand, theWorkingPlane = [0,0,0, 0,0,1, 1,0,0], theName=None):
2605             """
2606             Create a sketcher (wire or face), following the textual description, passed
2607             through theCommand argument.
2608             Edges of the resulting wire or face will be arcs of circles and/or linear segments.
2609             Format of the description string have to be the following:
2610                 "Sketcher[:F x1 y1]:CMD[:CMD[:CMD...]]"
2611             Where:
2612             - x1, y1 are coordinates of the first sketcher point (zero by default),
2613             - CMD is one of
2614                - "R angle" : Set the direction by angle
2615                - "D dx dy" : Set the direction by DX & DY
2616
2617                - "TT x y" : Create segment by point at X & Y
2618                - "T dx dy" : Create segment by point with DX & DY
2619                - "L length" : Create segment by direction & Length
2620                - "IX x" : Create segment by direction & Intersect. X
2621                - "IY y" : Create segment by direction & Intersect. Y
2622
2623                - "C radius length" : Create arc by direction, radius and length(in degree)
2624                - "AA x y": Create arc by point at X & Y
2625                - "A dx dy" : Create arc by point with DX & DY
2626                - "UU x y radius flag1": Create arc by point at X & Y with given radiUs
2627                - "U dx dy radius flag1" : Create arc by point with DX & DY with given radiUs
2628                - "EE x y xc yc flag1 flag2": Create arc by point at X & Y with given cEnter coordinates
2629                - "E dx dy dxc dyc radius flag1 flag2" : Create arc by point with DX & DY with given cEnter coordinates
2630
2631                - "WW" : Close Wire (to finish)
2632                - "WF" : Close Wire and build face (to finish)
2633
2634             - Flag1 (= reverse) is 0 or 2 ...
2635                - if 0 the drawn arc is the one of lower angle (< Pi)
2636                - if 2 the drawn arc ius the one of greater angle (> Pi)
2637
2638             - Flag2 (= control tolerance) is 0 or 1 ...
2639                - if 0 the specified end point can be at a distance of the arc greater than the tolerance (10^-7)
2640                - if 1 the wire is built only if the end point is on the arc
2641                  with a tolerance of 10^-7 on the distance else the creation fails
2642
2643             Parameters:
2644                 theCommand String, defining the sketcher in local
2645                            coordinates of the working plane.
2646                 theWorkingPlane Nine double values, defining origin,
2647                                 OZ and OX directions of the working plane.
2648                 theName Object name; when specified, this parameter is used
2649                         for result publication in the study. Otherwise, if automatic
2650                         publication is switched on, default value is used for result name.
2651
2652             Returns:
2653                 New GEOM.GEOM_Object, containing the created wire.
2654             """
2655             # Example: see GEOM_TestAll.py
2656             theCommand,Parameters = ParseSketcherCommand(theCommand)
2657             anObj = self.CurvesOp.MakeSketcher(theCommand, theWorkingPlane)
2658             RaiseIfFailed("MakeSketcher", self.CurvesOp)
2659             anObj.SetParameters(Parameters)
2660             self._autoPublish(anObj, theName, "wire")
2661             return anObj
2662
2663         ## Create a sketcher (wire or face), following the textual description,
2664         #  passed through <VAR>theCommand</VAR> argument. \n
2665         #  For format of the description string see MakeSketcher() method.\n
2666         #  @param theCommand String, defining the sketcher in local
2667         #                    coordinates of the working plane.
2668         #  @param theWorkingPlane Planar Face or LCS(Marker) of the working plane.
2669         #  @param theName Object name; when specified, this parameter is used
2670         #         for result publication in the study. Otherwise, if automatic
2671         #         publication is switched on, default value is used for result name.
2672         #
2673         #  @return New GEOM.GEOM_Object, containing the created wire.
2674         #
2675         #  @ref tui_sketcher_page "Example"
2676         @ManageTransactions("CurvesOp")
2677         def MakeSketcherOnPlane(self, theCommand, theWorkingPlane, theName=None):
2678             """
2679             Create a sketcher (wire or face), following the textual description,
2680             passed through theCommand argument.
2681             For format of the description string see geompy.MakeSketcher() method.
2682
2683             Parameters:
2684                 theCommand String, defining the sketcher in local
2685                            coordinates of the working plane.
2686                 theWorkingPlane Planar Face or LCS(Marker) of the working plane.
2687                 theName Object name; when specified, this parameter is used
2688                         for result publication in the study. Otherwise, if automatic
2689                         publication is switched on, default value is used for result name.
2690
2691             Returns:
2692                 New GEOM.GEOM_Object, containing the created wire.
2693             """
2694             theCommand,Parameters = ParseSketcherCommand(theCommand)
2695             anObj = self.CurvesOp.MakeSketcherOnPlane(theCommand, theWorkingPlane)
2696             RaiseIfFailed("MakeSketcherOnPlane", self.CurvesOp)
2697             anObj.SetParameters(Parameters)
2698             self._autoPublish(anObj, theName, "wire")
2699             return anObj
2700
2701         ## Obtain a 2D sketcher interface
2702         #  @return An instance of @ref gsketcher.Sketcher2D "Sketcher2D" interface
2703         def Sketcher2D (self):
2704             """
2705             Obtain a 2D sketcher interface.
2706
2707             Example of usage:
2708                sk = geompy.Sketcher2D()
2709                sk.addPoint(20, 20)
2710                sk.addSegmentRelative(15, 70)
2711                sk.addSegmentPerpY(50)
2712                sk.addArcRadiusRelative(25, 15, 14.5, 0)
2713                sk.addArcCenterAbsolute(1, 1, 50, 50, 0, 0)
2714                sk.addArcDirectionRadiusLength(20, 20, 101, 162.13)
2715                sk.close()
2716                Sketch_1 = sk.wire(geomObj_1)
2717             """
2718             sk = Sketcher2D (self)
2719             return sk
2720
2721         ## Create a sketcher wire, following the numerical description,
2722         #  passed through <VAR>theCoordinates</VAR> argument. \n
2723         #  @param theCoordinates double values, defining points to create a wire,
2724         #                                                      passing from it.
2725         #  @param theName Object name; when specified, this parameter is used
2726         #         for result publication in the study. Otherwise, if automatic
2727         #         publication is switched on, default value is used for result name.
2728         #
2729         #  @return New GEOM.GEOM_Object, containing the created wire.
2730         #
2731         #  @ref tui_3dsketcher_page "Example"
2732         @ManageTransactions("CurvesOp")
2733         def Make3DSketcher(self, theCoordinates, theName=None):
2734             """
2735             Create a sketcher wire, following the numerical description,
2736             passed through theCoordinates argument.
2737
2738             Parameters:
2739                 theCoordinates double values, defining points to create a wire,
2740                                passing from it.
2741                 theName Object name; when specified, this parameter is used
2742                         for result publication in the study. Otherwise, if automatic
2743                         publication is switched on, default value is used for result name.
2744
2745             Returns:
2746                 New GEOM_Object, containing the created wire.
2747             """
2748             theCoordinates,Parameters = ParseParameters(theCoordinates)
2749             anObj = self.CurvesOp.Make3DSketcher(theCoordinates)
2750             RaiseIfFailed("Make3DSketcher", self.CurvesOp)
2751             anObj.SetParameters(Parameters)
2752             self._autoPublish(anObj, theName, "wire")
2753             return anObj
2754
2755         ## Obtain a 3D sketcher interface
2756         #  @return An instance of @ref gsketcher.Sketcher3D "Sketcher3D" interface
2757         #
2758         #  @ref tui_3dsketcher_page "Example"
2759         def Sketcher3D (self):
2760             """
2761             Obtain a 3D sketcher interface.
2762
2763             Example of usage:
2764                 sk = geompy.Sketcher3D()
2765                 sk.addPointsAbsolute(0,0,0, 70,0,0)
2766                 sk.addPointsRelative(0, 0, 130)
2767                 sk.addPointAnglesLength("OXY", 50, 0, 100)
2768                 sk.addPointAnglesLength("OXZ", 30, 80, 130)
2769                 sk.close()
2770                 a3D_Sketcher_1 = sk.wire()
2771             """
2772             sk = Sketcher3D (self)
2773             return sk
2774
2775         ## Obtain a 2D polyline creation interface
2776         #  @return An instance of @ref gsketcher.Polyline2D "Polyline2D" interface
2777         #
2778         #  @ref tui_3dsketcher_page "Example"
2779         def Polyline2D (self):
2780             """
2781             Obtain a 2D polyline creation interface.
2782
2783             Example of usage:
2784                 pl = geompy.Polyline2D()
2785                 pl.addSection("section 1", GEOM.Polyline, True)
2786                 pl.addPoints(0, 0, 10, 0, 10, 10)
2787                 pl.addSection("section 2", GEOM.Interpolation, False)
2788                 pl.addPoints(20, 0, 30, 0, 30, 10)
2789                 resultObj = pl.result(WorkingPlane)
2790             """
2791             pl = Polyline2D (self)
2792             return pl
2793
2794         # end of l3_sketcher
2795         ## @}
2796
2797         ## @addtogroup l3_3d_primitives
2798         ## @{
2799
2800         ## Create a box by coordinates of two opposite vertices.
2801         #
2802         #  @param x1,y1,z1 double values, defining first point it.
2803         #  @param x2,y2,z2 double values, defining first point it.
2804         #  @param theName Object name; when specified, this parameter is used
2805         #         for result publication in the study. Otherwise, if automatic
2806         #         publication is switched on, default value is used for result name.
2807         #
2808         #  @return New GEOM.GEOM_Object, containing the created box.
2809         #
2810         #  @ref tui_creation_box "Example"
2811         def MakeBox(self, x1, y1, z1, x2, y2, z2, theName=None):
2812             """
2813             Create a box by coordinates of two opposite vertices.
2814
2815             Parameters:
2816                 x1,y1,z1 double values, defining first point.
2817                 x2,y2,z2 double values, defining second point.
2818                 theName Object name; when specified, this parameter is used
2819                         for result publication in the study. Otherwise, if automatic
2820                         publication is switched on, default value is used for result name.
2821
2822             Returns:
2823                 New GEOM.GEOM_Object, containing the created box.
2824             """
2825             # Example: see GEOM_TestAll.py
2826             pnt1 = self.MakeVertex(x1,y1,z1)
2827             pnt2 = self.MakeVertex(x2,y2,z2)
2828             # note: auto-publishing is done in self.MakeBoxTwoPnt()
2829             return self.MakeBoxTwoPnt(pnt1, pnt2, theName)
2830
2831         ## Create a box with specified dimensions along the coordinate axes
2832         #  and with edges, parallel to the coordinate axes.
2833         #  Center of the box will be at point (DX/2, DY/2, DZ/2).
2834         #  @param theDX Length of Box edges, parallel to OX axis.
2835         #  @param theDY Length of Box edges, parallel to OY axis.
2836         #  @param theDZ Length of Box edges, parallel to OZ axis.
2837         #  @param theName Object name; when specified, this parameter is used
2838         #         for result publication in the study. Otherwise, if automatic
2839         #         publication is switched on, default value is used for result name.
2840         #
2841         #  @return New GEOM.GEOM_Object, containing the created box.
2842         #
2843         #  @ref tui_creation_box "Example"
2844         @ManageTransactions("PrimOp")
2845         def MakeBoxDXDYDZ(self, theDX, theDY, theDZ, theName=None):
2846             """
2847             Create a box with specified dimensions along the coordinate axes
2848             and with edges, parallel to the coordinate axes.
2849             Center of the box will be at point (DX/2, DY/2, DZ/2).
2850
2851             Parameters:
2852                 theDX Length of Box edges, parallel to OX axis.
2853                 theDY Length of Box edges, parallel to OY axis.
2854                 theDZ Length of Box edges, parallel to OZ axis.
2855                 theName Object name; when specified, this parameter is used
2856                         for result publication in the study. Otherwise, if automatic
2857                         publication is switched on, default value is used for result name.
2858
2859             Returns:
2860                 New GEOM.GEOM_Object, containing the created box.
2861             """
2862             # Example: see GEOM_TestAll.py
2863             theDX,theDY,theDZ,Parameters = ParseParameters(theDX, theDY, theDZ)
2864             anObj = self.PrimOp.MakeBoxDXDYDZ(theDX, theDY, theDZ)
2865             RaiseIfFailed("MakeBoxDXDYDZ", self.PrimOp)
2866             anObj.SetParameters(Parameters)
2867             self._autoPublish(anObj, theName, "box")
2868             return anObj
2869
2870         ## Create a box with two specified opposite vertices,
2871         #  and with edges, parallel to the coordinate axes
2872         #  @param thePnt1 First of two opposite vertices.
2873         #  @param thePnt2 Second of two opposite vertices.
2874         #  @param theName Object name; when specified, this parameter is used
2875         #         for result publication in the study. Otherwise, if automatic
2876         #         publication is switched on, default value is used for result name.
2877         #
2878         #  @return New GEOM.GEOM_Object, containing the created box.
2879         #
2880         #  @ref tui_creation_box "Example"
2881         @ManageTransactions("PrimOp")
2882         def MakeBoxTwoPnt(self, thePnt1, thePnt2, theName=None):
2883             """
2884             Create a box with two specified opposite vertices,
2885             and with edges, parallel to the coordinate axes
2886
2887             Parameters:
2888                 thePnt1 First of two opposite vertices.
2889                 thePnt2 Second of two opposite vertices.
2890                 theName Object name; when specified, this parameter is used
2891                         for result publication in the study. Otherwise, if automatic
2892                         publication is switched on, default value is used for result name.
2893
2894             Returns:
2895                 New GEOM.GEOM_Object, containing the created box.
2896             """
2897             # Example: see GEOM_TestAll.py
2898             anObj = self.PrimOp.MakeBoxTwoPnt(thePnt1, thePnt2)
2899             RaiseIfFailed("MakeBoxTwoPnt", self.PrimOp)
2900             self._autoPublish(anObj, theName, "box")
2901             return anObj
2902
2903         ## Create a face with specified dimensions with edges parallel to coordinate axes.
2904         #  @param theH height of Face.
2905         #  @param theW width of Face.
2906         #  @param theOrientation face orientation: 1-OXY, 2-OYZ, 3-OZX
2907         #  @param theName Object name; when specified, this parameter is used
2908         #         for result publication in the study. Otherwise, if automatic
2909         #         publication is switched on, default value is used for result name.
2910         #
2911         #  @return New GEOM.GEOM_Object, containing the created face.
2912         #
2913         #  @ref tui_creation_face "Example"
2914         @ManageTransactions("PrimOp")
2915         def MakeFaceHW(self, theH, theW, theOrientation, theName=None):
2916             """
2917             Create a face with specified dimensions with edges parallel to coordinate axes.
2918
2919             Parameters:
2920                 theH height of Face.
2921                 theW width of Face.
2922                 theOrientation face orientation: 1-OXY, 2-OYZ, 3-OZX
2923                 theName Object name; when specified, this parameter is used
2924                         for result publication in the study. Otherwise, if automatic
2925                         publication is switched on, default value is used for result name.
2926
2927             Returns:
2928                 New GEOM.GEOM_Object, containing the created face.
2929             """
2930             # Example: see GEOM_TestAll.py
2931             theH,theW,Parameters = ParseParameters(theH, theW)
2932             anObj = self.PrimOp.MakeFaceHW(theH, theW, theOrientation)
2933             RaiseIfFailed("MakeFaceHW", self.PrimOp)
2934             anObj.SetParameters(Parameters)
2935             self._autoPublish(anObj, theName, "rectangle")
2936             return anObj
2937
2938         ## Create a face from another plane and two sizes,
2939         #  vertical size and horisontal size.
2940         #  @param theObj   Normale vector to the creating face or
2941         #  the face object.
2942         #  @param theH     Height (vertical size).
2943         #  @param theW     Width (horisontal size).
2944         #  @param theName Object name; when specified, this parameter is used
2945         #         for result publication in the study. Otherwise, if automatic
2946         #         publication is switched on, default value is used for result name.
2947         #
2948         #  @return New GEOM.GEOM_Object, containing the created face.
2949         #
2950         #  @ref tui_creation_face "Example"
2951         @ManageTransactions("PrimOp")
2952         def MakeFaceObjHW(self, theObj, theH, theW, theName=None):
2953             """
2954             Create a face from another plane and two sizes,
2955             vertical size and horisontal size.
2956
2957             Parameters:
2958                 theObj   Normale vector to the creating face or
2959                          the face object.
2960                 theH     Height (vertical size).
2961                 theW     Width (horisontal size).
2962                 theName Object name; when specified, this parameter is used
2963                         for result publication in the study. Otherwise, if automatic
2964                         publication is switched on, default value is used for result name.
2965
2966             Returns:
2967                 New GEOM_Object, containing the created face.
2968             """
2969             # Example: see GEOM_TestAll.py
2970             theH,theW,Parameters = ParseParameters(theH, theW)
2971             anObj = self.PrimOp.MakeFaceObjHW(theObj, theH, theW)
2972             RaiseIfFailed("MakeFaceObjHW", self.PrimOp)
2973             anObj.SetParameters(Parameters)
2974             self._autoPublish(anObj, theName, "rectangle")
2975             return anObj
2976
2977         ## Create a disk with given center, normal vector and radius.
2978         #  @param thePnt Disk center.
2979         #  @param theVec Vector, normal to the plane of the disk.
2980         #  @param theR Disk radius.
2981         #  @param theName Object name; when specified, this parameter is used
2982         #         for result publication in the study. Otherwise, if automatic
2983         #         publication is switched on, default value is used for result name.
2984         #
2985         #  @return New GEOM.GEOM_Object, containing the created disk.
2986         #
2987         #  @ref tui_creation_disk "Example"
2988         @ManageTransactions("PrimOp")
2989         def MakeDiskPntVecR(self, thePnt, theVec, theR, theName=None):
2990             """
2991             Create a disk with given center, normal vector and radius.
2992
2993             Parameters:
2994                 thePnt Disk center.
2995                 theVec Vector, normal to the plane of the disk.
2996                 theR Disk radius.
2997                 theName Object name; when specified, this parameter is used
2998                         for result publication in the study. Otherwise, if automatic
2999                         publication is switched on, default value is used for result name.
3000
3001             Returns:
3002                 New GEOM.GEOM_Object, containing the created disk.
3003             """
3004             # Example: see GEOM_TestAll.py
3005             theR,Parameters = ParseParameters(theR)
3006             anObj = self.PrimOp.MakeDiskPntVecR(thePnt, theVec, theR)
3007             RaiseIfFailed("MakeDiskPntVecR", self.PrimOp)
3008             anObj.SetParameters(Parameters)
3009             self._autoPublish(anObj, theName, "disk")
3010             return anObj
3011
3012         ## Create a disk, passing through three given points
3013         #  @param thePnt1,thePnt2,thePnt3 Points, defining the disk.
3014         #  @param theName Object name; when specified, this parameter is used
3015         #         for result publication in the study. Otherwise, if automatic
3016         #         publication is switched on, default value is used for result name.
3017         #
3018         #  @return New GEOM.GEOM_Object, containing the created disk.
3019         #
3020         #  @ref tui_creation_disk "Example"
3021         @ManageTransactions("PrimOp")
3022         def MakeDiskThreePnt(self, thePnt1, thePnt2, thePnt3, theName=None):
3023             """
3024             Create a disk, passing through three given points
3025
3026             Parameters:
3027                 thePnt1,thePnt2,thePnt3 Points, defining the disk.
3028                 theName Object name; when specified, this parameter is used
3029                         for result publication in the study. Otherwise, if automatic
3030                         publication is switched on, default value is used for result name.
3031
3032             Returns:
3033                 New GEOM.GEOM_Object, containing the created disk.
3034             """
3035             # Example: see GEOM_TestAll.py
3036             anObj = self.PrimOp.MakeDiskThreePnt(thePnt1, thePnt2, thePnt3)
3037             RaiseIfFailed("MakeDiskThreePnt", self.PrimOp)
3038             self._autoPublish(anObj, theName, "disk")
3039             return anObj
3040
3041         ## Create a disk with specified dimensions along OX-OY coordinate axes.
3042         #  @param theR Radius of Face.
3043         #  @param theOrientation set the orientation belong axis OXY or OYZ or OZX
3044         #  @param theName Object name; when specified, this parameter is used
3045         #         for result publication in the study. Otherwise, if automatic
3046         #         publication is switched on, default value is used for result name.
3047         #
3048         #  @return New GEOM.GEOM_Object, containing the created disk.
3049         #
3050         #  @ref tui_creation_face "Example"
3051         @ManageTransactions("PrimOp")
3052         def MakeDiskR(self, theR, theOrientation, theName=None):
3053             """
3054             Create a disk with specified dimensions along OX-OY coordinate axes.
3055
3056             Parameters:
3057                 theR Radius of Face.
3058                 theOrientation set the orientation belong axis OXY or OYZ or OZX
3059                 theName Object name; when specified, this parameter is used
3060                         for result publication in the study. Otherwise, if automatic
3061                         publication is switched on, default value is used for result name.
3062
3063             Returns:
3064                 New GEOM.GEOM_Object, containing the created disk.
3065
3066             Example of usage:
3067                 Disk3 = geompy.MakeDiskR(100., 1)
3068             """
3069             # Example: see GEOM_TestAll.py
3070             theR,Parameters = ParseParameters(theR)
3071             anObj = self.PrimOp.MakeDiskR(theR, theOrientation)
3072             RaiseIfFailed("MakeDiskR", self.PrimOp)
3073             anObj.SetParameters(Parameters)
3074             self._autoPublish(anObj, theName, "disk")
3075             return anObj
3076
3077         ## Create a cylinder with given base point, axis, radius and height.
3078         #  @param thePnt Central point of cylinder base.
3079         #  @param theAxis Cylinder axis.
3080         #  @param theR Cylinder radius.
3081         #  @param theH Cylinder height.
3082         #  @param theName Object name; when specified, this parameter is used
3083         #         for result publication in the study. Otherwise, if automatic
3084         #         publication is switched on, default value is used for result name.
3085         #
3086         #  @return New GEOM.GEOM_Object, containing the created cylinder.
3087         #
3088         #  @ref tui_creation_cylinder "Example"
3089         @ManageTransactions("PrimOp")
3090         def MakeCylinder(self, thePnt, theAxis, theR, theH, theName=None):
3091             """
3092             Create a cylinder with given base point, axis, radius and height.
3093
3094             Parameters:
3095                 thePnt Central point of cylinder base.
3096                 theAxis Cylinder axis.
3097                 theR Cylinder radius.
3098                 theH Cylinder height.
3099                 theName Object name; when specified, this parameter is used
3100                         for result publication in the study. Otherwise, if automatic
3101                         publication is switched on, default value is used for result name.
3102
3103             Returns:
3104                 New GEOM.GEOM_Object, containing the created cylinder.
3105             """
3106             # Example: see GEOM_TestAll.py
3107             theR,theH,Parameters = ParseParameters(theR, theH)
3108             anObj = self.PrimOp.MakeCylinderPntVecRH(thePnt, theAxis, theR, theH)
3109             RaiseIfFailed("MakeCylinderPntVecRH", self.PrimOp)
3110             anObj.SetParameters(Parameters)
3111             self._autoPublish(anObj, theName, "cylinder")
3112             return anObj
3113             
3114         ## Create a portion of cylinder with given base point, axis, radius, height and angle.
3115         #  @param thePnt Central point of cylinder base.
3116         #  @param theAxis Cylinder axis.
3117         #  @param theR Cylinder radius.
3118         #  @param theH Cylinder height.
3119         #  @param theA Cylinder angle in radians.
3120         #  @param theName Object name; when specified, this parameter is used
3121         #         for result publication in the study. Otherwise, if automatic
3122         #         publication is switched on, default value is used for result name.
3123         #
3124         #  @return New GEOM.GEOM_Object, containing the created cylinder.
3125         #
3126         #  @ref tui_creation_cylinder "Example"
3127         @ManageTransactions("PrimOp")
3128         def MakeCylinderA(self, thePnt, theAxis, theR, theH, theA, theName=None):
3129             """
3130             Create a portion of cylinder with given base point, axis, radius, height and angle.
3131
3132             Parameters:
3133                 thePnt Central point of cylinder base.
3134                 theAxis Cylinder axis.
3135                 theR Cylinder radius.
3136                 theH Cylinder height.
3137                 theA Cylinder angle in radians.
3138                 theName Object name; when specified, this parameter is used
3139                         for result publication in the study. Otherwise, if automatic
3140                         publication is switched on, default value is used for result name.
3141
3142             Returns:
3143                 New GEOM.GEOM_Object, containing the created cylinder.
3144             """
3145             # Example: see GEOM_TestAll.py
3146             flag = False
3147             if isinstance(theA,str):
3148                 flag = True
3149             theR,theH,theA,Parameters = ParseParameters(theR, theH, theA)
3150             if flag:
3151                 theA = theA*math.pi/180.
3152             if theA<=0. or theA>=2*math.pi:
3153                 raise ValueError("The angle parameter should be strictly between 0 and 2*pi.")
3154             anObj = self.PrimOp.MakeCylinderPntVecRHA(thePnt, theAxis, theR, theH, theA)
3155             RaiseIfFailed("MakeCylinderPntVecRHA", self.PrimOp)
3156             anObj.SetParameters(Parameters)
3157             self._autoPublish(anObj, theName, "cylinder")
3158             return anObj
3159
3160         ## Create a cylinder with given radius and height at
3161         #  the origin of coordinate system. Axis of the cylinder
3162         #  will be collinear to the OZ axis of the coordinate system.
3163         #  @param theR Cylinder radius.
3164         #  @param theH Cylinder height.
3165         #  @param theName Object name; when specified, this parameter is used
3166         #         for result publication in the study. Otherwise, if automatic
3167         #         publication is switched on, default value is used for result name.
3168         #
3169         #  @return New GEOM.GEOM_Object, containing the created cylinder.
3170         #
3171         #  @ref tui_creation_cylinder "Example"
3172         @ManageTransactions("PrimOp")
3173         def MakeCylinderRH(self, theR, theH, theName=None):
3174             """
3175             Create a cylinder with given radius and height at
3176             the origin of coordinate system. Axis of the cylinder
3177             will be collinear to the OZ axis of the coordinate system.
3178
3179             Parameters:
3180                 theR Cylinder radius.
3181                 theH Cylinder height.
3182                 theName Object name; when specified, this parameter is used
3183                         for result publication in the study. Otherwise, if automatic
3184                         publication is switched on, default value is used for result name.
3185
3186             Returns:
3187                 New GEOM.GEOM_Object, containing the created cylinder.
3188             """
3189             # Example: see GEOM_TestAll.py
3190             theR,theH,Parameters = ParseParameters(theR, theH)
3191             anObj = self.PrimOp.MakeCylinderRH(theR, theH)
3192             RaiseIfFailed("MakeCylinderRH", self.PrimOp)
3193             anObj.SetParameters(Parameters)
3194             self._autoPublish(anObj, theName, "cylinder")
3195             return anObj
3196             
3197         ## Create a portion of cylinder with given radius, height and angle at
3198         #  the origin of coordinate system. Axis of the cylinder
3199         #  will be collinear to the OZ axis of the coordinate system.
3200         #  @param theR Cylinder radius.
3201         #  @param theH Cylinder height.
3202         #  @param theA Cylinder angle in radians.
3203         #  @param theName Object name; when specified, this parameter is used
3204         #         for result publication in the study. Otherwise, if automatic
3205         #         publication is switched on, default value is used for result name.
3206         #
3207         #  @return New GEOM.GEOM_Object, containing the created cylinder.
3208         #
3209         #  @ref tui_creation_cylinder "Example"
3210         @ManageTransactions("PrimOp")
3211         def MakeCylinderRHA(self, theR, theH, theA, theName=None):
3212             """
3213             Create a portion of cylinder with given radius, height and angle at
3214             the origin of coordinate system. Axis of the cylinder
3215             will be collinear to the OZ axis of the coordinate system.
3216
3217             Parameters:
3218                 theR Cylinder radius.
3219                 theH Cylinder height.
3220                 theA Cylinder angle in radians.
3221                 theName Object name; when specified, this parameter is used
3222                         for result publication in the study. Otherwise, if automatic
3223                         publication is switched on, default value is used for result name.
3224
3225             Returns:
3226                 New GEOM.GEOM_Object, containing the created cylinder.
3227             """
3228             # Example: see GEOM_TestAll.py
3229             flag = False
3230             if isinstance(theA,str):
3231                 flag = True
3232             theR,theH,theA,Parameters = ParseParameters(theR, theH, theA)
3233             if flag:
3234                 theA = theA*math.pi/180.
3235             if theA<=0. or theA>=2*math.pi:
3236                 raise ValueError("The angle parameter should be strictly between 0 and 2*pi.")
3237             anObj = self.PrimOp.MakeCylinderRHA(theR, theH, theA)
3238             RaiseIfFailed("MakeCylinderRHA", self.PrimOp)
3239             anObj.SetParameters(Parameters)
3240             self._autoPublish(anObj, theName, "cylinder")
3241             return anObj
3242
3243         ## Create a sphere with given center and radius.
3244         #  @param thePnt Sphere center.
3245         #  @param theR Sphere radius.
3246         #  @param theName Object name; when specified, this parameter is used
3247         #         for result publication in the study. Otherwise, if automatic
3248         #         publication is switched on, default value is used for result name.
3249         #
3250         #  @return New GEOM.GEOM_Object, containing the created sphere.
3251         #
3252         #  @ref tui_creation_sphere "Example"
3253         @ManageTransactions("PrimOp")
3254         def MakeSpherePntR(self, thePnt, theR, theName=None):
3255             """
3256             Create a sphere with given center and radius.
3257
3258             Parameters:
3259                 thePnt Sphere center.
3260                 theR Sphere radius.
3261                 theName Object name; when specified, this parameter is used
3262                         for result publication in the study. Otherwise, if automatic
3263                         publication is switched on, default value is used for result name.
3264
3265             Returns:
3266                 New GEOM.GEOM_Object, containing the created sphere.
3267             """
3268             # Example: see GEOM_TestAll.py
3269             theR,Parameters = ParseParameters(theR)
3270             anObj = self.PrimOp.MakeSpherePntR(thePnt, theR)
3271             RaiseIfFailed("MakeSpherePntR", self.PrimOp)
3272             anObj.SetParameters(Parameters)
3273             self._autoPublish(anObj, theName, "sphere")
3274             return anObj
3275
3276         ## Create a sphere with given center and radius.
3277         #  @param x,y,z Coordinates of sphere center.
3278         #  @param theR Sphere radius.
3279         #  @param theName Object name; when specified, this parameter is used
3280         #         for result publication in the study. Otherwise, if automatic
3281         #         publication is switched on, default value is used for result name.
3282         #
3283         #  @return New GEOM.GEOM_Object, containing the created sphere.
3284         #
3285         #  @ref tui_creation_sphere "Example"
3286         def MakeSphere(self, x, y, z, theR, theName=None):
3287             """
3288             Create a sphere with given center and radius.
3289
3290             Parameters:
3291                 x,y,z Coordinates of sphere center.
3292                 theR Sphere radius.
3293                 theName Object name; when specified, this parameter is used
3294                         for result publication in the study. Otherwise, if automatic
3295                         publication is switched on, default value is used for result name.
3296
3297             Returns:
3298                 New GEOM.GEOM_Object, containing the created sphere.
3299             """
3300             # Example: see GEOM_TestAll.py
3301             point = self.MakeVertex(x, y, z)
3302             # note: auto-publishing is done in self.MakeSpherePntR()
3303             anObj = self.MakeSpherePntR(point, theR, theName)
3304             return anObj
3305
3306         ## Create a sphere with given radius at the origin of coordinate system.
3307         #  @param theR Sphere radius.
3308         #  @param theName Object name; when specified, this parameter is used
3309         #         for result publication in the study. Otherwise, if automatic
3310         #         publication is switched on, default value is used for result name.
3311         #
3312         #  @return New GEOM.GEOM_Object, containing the created sphere.
3313         #
3314         #  @ref tui_creation_sphere "Example"
3315         @ManageTransactions("PrimOp")
3316         def MakeSphereR(self, theR, theName=None):
3317             """
3318             Create a sphere with given radius at the origin of coordinate system.
3319
3320             Parameters:
3321                 theR Sphere radius.
3322                 theName Object name; when specified, this parameter is used
3323                         for result publication in the study. Otherwise, if automatic
3324                         publication is switched on, default value is used for result name.
3325
3326             Returns:
3327                 New GEOM.GEOM_Object, containing the created sphere.
3328             """
3329             # Example: see GEOM_TestAll.py
3330             theR,Parameters = ParseParameters(theR)
3331             anObj = self.PrimOp.MakeSphereR(theR)
3332             RaiseIfFailed("MakeSphereR", self.PrimOp)
3333             anObj.SetParameters(Parameters)
3334             self._autoPublish(anObj, theName, "sphere")
3335             return anObj
3336
3337         ## Create a cone with given base point, axis, height and radiuses.
3338         #  @param thePnt Central point of the first cone base.
3339         #  @param theAxis Cone axis.
3340         #  @param theR1 Radius of the first cone base.
3341         #  @param theR2 Radius of the second cone base.
3342         #    \note If both radiuses are non-zero, the cone will be truncated.
3343         #    \note If the radiuses are equal, a cylinder will be created instead.
3344         #  @param theH Cone height.
3345         #  @param theName Object name; when specified, this parameter is used
3346         #         for result publication in the study. Otherwise, if automatic
3347         #         publication is switched on, default value is used for result name.
3348         #
3349         #  @return New GEOM.GEOM_Object, containing the created cone.
3350         #
3351         #  @ref tui_creation_cone "Example"
3352         @ManageTransactions("PrimOp")
3353         def MakeCone(self, thePnt, theAxis, theR1, theR2, theH, theName=None):
3354             """
3355             Create a cone with given base point, axis, height and radiuses.
3356
3357             Parameters:
3358                 thePnt Central point of the first cone base.
3359                 theAxis Cone axis.
3360                 theR1 Radius of the first cone base.
3361                 theR2 Radius of the second cone base.
3362                 theH Cone height.
3363                 theName Object name; when specified, this parameter is used
3364                         for result publication in the study. Otherwise, if automatic
3365                         publication is switched on, default value is used for result name.
3366
3367             Note:
3368                 If both radiuses are non-zero, the cone will be truncated.
3369                 If the radiuses are equal, a cylinder will be created instead.
3370
3371             Returns:
3372                 New GEOM.GEOM_Object, containing the created cone.
3373             """
3374             # Example: see GEOM_TestAll.py
3375             theR1,theR2,theH,Parameters = ParseParameters(theR1,theR2,theH)
3376             anObj = self.PrimOp.MakeConePntVecR1R2H(thePnt, theAxis, theR1, theR2, theH)
3377             RaiseIfFailed("MakeConePntVecR1R2H", self.PrimOp)
3378             anObj.SetParameters(Parameters)
3379             self._autoPublish(anObj, theName, "cone")
3380             return anObj
3381
3382         ## Create a cone with given height and radiuses at
3383         #  the origin of coordinate system. Axis of the cone will
3384         #  be collinear to the OZ axis of the coordinate system.
3385         #  @param theR1 Radius of the first cone base.
3386         #  @param theR2 Radius of the second cone base.
3387         #    \note If both radiuses are non-zero, the cone will be truncated.
3388         #    \note If the radiuses are equal, a cylinder will be created instead.
3389         #  @param theH Cone height.
3390         #  @param theName Object name; when specified, this parameter is used
3391         #         for result publication in the study. Otherwise, if automatic
3392         #         publication is switched on, default value is used for result name.
3393         #
3394         #  @return New GEOM.GEOM_Object, containing the created cone.
3395         #
3396         #  @ref tui_creation_cone "Example"
3397         @ManageTransactions("PrimOp")
3398         def MakeConeR1R2H(self, theR1, theR2, theH, theName=None):
3399             """
3400             Create a cone with given height and radiuses at
3401             the origin of coordinate system. Axis of the cone will
3402             be collinear to the OZ axis of the coordinate system.
3403
3404             Parameters:
3405                 theR1 Radius of the first cone base.
3406                 theR2 Radius of the second cone base.
3407                 theH Cone height.
3408                 theName Object name; when specified, this parameter is used
3409                         for result publication in the study. Otherwise, if automatic
3410                         publication is switched on, default value is used for result name.
3411
3412             Note:
3413                 If both radiuses are non-zero, the cone will be truncated.
3414                 If the radiuses are equal, a cylinder will be created instead.
3415
3416             Returns:
3417                 New GEOM.GEOM_Object, containing the created cone.
3418             """
3419             # Example: see GEOM_TestAll.py
3420             theR1,theR2,theH,Parameters = ParseParameters(theR1,theR2,theH)
3421             anObj = self.PrimOp.MakeConeR1R2H(theR1, theR2, theH)
3422             RaiseIfFailed("MakeConeR1R2H", self.PrimOp)
3423             anObj.SetParameters(Parameters)
3424             self._autoPublish(anObj, theName, "cone")
3425             return anObj
3426
3427         ## Create a torus with given center, normal vector and radiuses.
3428         #  @param thePnt Torus central point.
3429         #  @param theVec Torus axis of symmetry.
3430         #  @param theRMajor Torus major radius.
3431         #  @param theRMinor Torus minor radius.
3432         #  @param theName Object name; when specified, this parameter is used
3433         #         for result publication in the study. Otherwise, if automatic
3434         #         publication is switched on, default value is used for result name.
3435         #
3436         #  @return New GEOM.GEOM_Object, containing the created torus.
3437         #
3438         #  @ref tui_creation_torus "Example"
3439         @ManageTransactions("PrimOp")
3440         def MakeTorus(self, thePnt, theVec, theRMajor, theRMinor, theName=None):
3441             """
3442             Create a torus with given center, normal vector and radiuses.
3443
3444             Parameters:
3445                 thePnt Torus central point.
3446                 theVec Torus axis of symmetry.
3447                 theRMajor Torus major radius.
3448                 theRMinor Torus minor radius.
3449                 theName Object name; when specified, this parameter is used
3450                         for result publication in the study. Otherwise, if automatic
3451                         publication is switched on, default value is used for result name.
3452
3453            Returns:
3454                 New GEOM.GEOM_Object, containing the created torus.
3455             """
3456             # Example: see GEOM_TestAll.py
3457             theRMajor,theRMinor,Parameters = ParseParameters(theRMajor,theRMinor)
3458             anObj = self.PrimOp.MakeTorusPntVecRR(thePnt, theVec, theRMajor, theRMinor)
3459             RaiseIfFailed("MakeTorusPntVecRR", self.PrimOp)
3460             anObj.SetParameters(Parameters)
3461             self._autoPublish(anObj, theName, "torus")
3462             return anObj
3463
3464         ## Create a torus with given radiuses at the origin of coordinate system.
3465         #  @param theRMajor Torus major radius.
3466         #  @param theRMinor Torus minor radius.
3467         #  @param theName Object name; when specified, this parameter is used
3468         #         for result publication in the study. Otherwise, if automatic
3469         #         publication is switched on, default value is used for result name.
3470         #
3471         #  @return New GEOM.GEOM_Object, containing the created torus.
3472         #
3473         #  @ref tui_creation_torus "Example"
3474         @ManageTransactions("PrimOp")
3475         def MakeTorusRR(self, theRMajor, theRMinor, theName=None):
3476             """
3477            Create a torus with given radiuses at the origin of coordinate system.
3478
3479            Parameters:
3480                 theRMajor Torus major radius.
3481                 theRMinor Torus minor radius.
3482                 theName Object name; when specified, this parameter is used
3483                         for result publication in the study. Otherwise, if automatic
3484                         publication is switched on, default value is used for result name.
3485
3486            Returns:
3487                 New GEOM.GEOM_Object, containing the created torus.
3488             """
3489             # Example: see GEOM_TestAll.py
3490             theRMajor,theRMinor,Parameters = ParseParameters(theRMajor,theRMinor)
3491             anObj = self.PrimOp.MakeTorusRR(theRMajor, theRMinor)
3492             RaiseIfFailed("MakeTorusRR", self.PrimOp)
3493             anObj.SetParameters(Parameters)
3494             self._autoPublish(anObj, theName, "torus")
3495             return anObj
3496
3497         # end of l3_3d_primitives
3498         ## @}
3499
3500         ## @addtogroup l3_complex
3501         ## @{
3502
3503         ## Create a shape by extrusion of the base shape along a vector, defined by two points.
3504         #  @param theBase Base shape to be extruded.
3505         #  @param thePoint1 First end of extrusion vector.
3506         #  @param thePoint2 Second end of extrusion vector.
3507         #  @param theScaleFactor Use it to make prism with scaled second base.
3508         #                        Nagative value means not scaled second base.
3509         #  @param theName Object name; when specified, this parameter is used
3510         #         for result publication in the study. Otherwise, if automatic
3511         #         publication is switched on, default value is used for result name.
3512         #
3513         #  @return New GEOM.GEOM_Object, containing the created prism.
3514         #
3515         #  @ref tui_creation_prism "Example"
3516         @ManageTransactions("PrimOp")
3517         def MakePrism(self, theBase, thePoint1, thePoint2, theScaleFactor = -1.0, theName=None):
3518             """
3519             Create a shape by extrusion of the base shape along a vector, defined by two points.
3520
3521             Parameters:
3522                 theBase Base shape to be extruded.
3523                 thePoint1 First end of extrusion vector.
3524                 thePoint2 Second end of extrusion vector.
3525                 theScaleFactor Use it to make prism with scaled second base.
3526                                Nagative value means not scaled second base.
3527                 theName Object name; when specified, this parameter is used
3528                         for result publication in the study. Otherwise, if automatic
3529                         publication is switched on, default value is used for result name.
3530
3531             Returns:
3532                 New GEOM.GEOM_Object, containing the created prism.
3533             """
3534             # Example: see GEOM_TestAll.py
3535             anObj = None
3536             Parameters = ""
3537             if theScaleFactor > 0:
3538                 theScaleFactor,Parameters = ParseParameters(theScaleFactor)
3539                 anObj = self.PrimOp.MakePrismTwoPntWithScaling(theBase, thePoint1, thePoint2, theScaleFactor)
3540             else:
3541                 anObj = self.PrimOp.MakePrismTwoPnt(theBase, thePoint1, thePoint2)
3542             RaiseIfFailed("MakePrismTwoPnt", self.PrimOp)
3543             anObj.SetParameters(Parameters)
3544             self._autoPublish(anObj, theName, "prism")
3545             return anObj
3546
3547         ## Create a shape by extrusion of the base shape along a
3548         #  vector, defined by two points, in 2 Ways (forward/backward).
3549         #  @param theBase Base shape to be extruded.
3550         #  @param thePoint1 First end of extrusion vector.
3551         #  @param thePoint2 Second end of extrusion vector.
3552         #  @param theName Object name; when specified, this parameter is used
3553         #         for result publication in the study. Otherwise, if automatic
3554         #         publication is switched on, default value is used for result name.
3555         #
3556         #  @return New GEOM.GEOM_Object, containing the created prism.
3557         #
3558         #  @ref tui_creation_prism "Example"
3559         @ManageTransactions("PrimOp")
3560         def MakePrism2Ways(self, theBase, thePoint1, thePoint2, theName=None):
3561             """
3562             Create a shape by extrusion of the base shape along a
3563             vector, defined by two points, in 2 Ways (forward/backward).
3564
3565             Parameters:
3566                 theBase Base shape to be extruded.
3567                 thePoint1 First end of extrusion vector.
3568                 thePoint2 Second end of extrusion vector.
3569                 theName Object name; when specified, this parameter is used
3570                         for result publication in the study. Otherwise, if automatic
3571                         publication is switched on, default value is used for result name.
3572
3573             Returns:
3574                 New GEOM.GEOM_Object, containing the created prism.
3575             """
3576             # Example: see GEOM_TestAll.py
3577             anObj = self.PrimOp.MakePrismTwoPnt2Ways(theBase, thePoint1, thePoint2)
3578             RaiseIfFailed("MakePrismTwoPnt", self.PrimOp)
3579             self._autoPublish(anObj, theName, "prism")
3580             return anObj
3581
3582         ## Create a shape by extrusion of the base shape along the vector,
3583         #  i.e. all the space, transfixed by the base shape during its translation
3584         #  along the vector on the given distance.
3585         #  @param theBase Base shape to be extruded.
3586         #  @param theVec Direction of extrusion.
3587         #  @param theH Prism dimension along theVec.
3588         #  @param theScaleFactor Use it to make prism with scaled second base.
3589         #                        Negative value means not scaled second base.
3590         #  @param theName Object name; when specified, this parameter is used
3591         #         for result publication in the study. Otherwise, if automatic
3592         #         publication is switched on, default value is used for result name.
3593         #
3594         #  @return New GEOM.GEOM_Object, containing the created prism.
3595         #
3596         #  @ref tui_creation_prism "Example"
3597         @ManageTransactions("PrimOp")
3598         def MakePrismVecH(self, theBase, theVec, theH, theScaleFactor = -1.0, theName=None):
3599             """
3600             Create a shape by extrusion of the base shape along the vector,
3601             i.e. all the space, transfixed by the base shape during its translation
3602             along the vector on the given distance.
3603
3604             Parameters:
3605                 theBase Base shape to be extruded.
3606                 theVec Direction of extrusion.
3607                 theH Prism dimension along theVec.
3608                 theScaleFactor Use it to make prism with scaled second base.
3609                                Negative value means not scaled second base.
3610                 theName Object name; when specified, this parameter is used
3611                         for result publication in the study. Otherwise, if automatic
3612                         publication is switched on, default value is used for result name.
3613
3614             Returns:
3615                 New GEOM.GEOM_Object, containing the created prism.
3616             """
3617             # Example: see GEOM_TestAll.py
3618             anObj = None
3619             Parameters = ""
3620             if theScaleFactor > 0:
3621                 theH,theScaleFactor,Parameters = ParseParameters(theH,theScaleFactor)
3622                 anObj = self.PrimOp.MakePrismVecHWithScaling(theBase, theVec, theH, theScaleFactor)
3623             else:
3624                 theH,Parameters = ParseParameters(theH)
3625                 anObj = self.PrimOp.MakePrismVecH(theBase, theVec, theH)
3626             RaiseIfFailed("MakePrismVecH", self.PrimOp)
3627             anObj.SetParameters(Parameters)
3628             self._autoPublish(anObj, theName, "prism")
3629             return anObj
3630
3631         ## Create a shape by extrusion of the base shape along the vector,
3632         #  i.e. all the space, transfixed by the base shape during its translation
3633         #  along the vector on the given distance in 2 Ways (forward/backward).
3634         #  @param theBase Base shape to be extruded.
3635         #  @param theVec Direction of extrusion.
3636         #  @param theH Prism dimension along theVec in forward direction.
3637         #  @param theName Object name; when specified, this parameter is used
3638         #         for result publication in the study. Otherwise, if automatic
3639         #         publication is switched on, default value is used for result name.
3640         #
3641         #  @return New GEOM.GEOM_Object, containing the created prism.
3642         #
3643         #  @ref tui_creation_prism "Example"
3644         @ManageTransactions("PrimOp")
3645         def MakePrismVecH2Ways(self, theBase, theVec, theH, theName=None):
3646             """
3647             Create a shape by extrusion of the base shape along the vector,
3648             i.e. all the space, transfixed by the base shape during its translation
3649             along the vector on the given distance in 2 Ways (forward/backward).
3650
3651             Parameters:
3652                 theBase Base shape to be extruded.
3653                 theVec Direction of extrusion.
3654                 theH Prism dimension along theVec in forward direction.
3655                 theName Object name; when specified, this parameter is used
3656                         for result publication in the study. Otherwise, if automatic
3657                         publication is switched on, default value is used for result name.
3658
3659             Returns:
3660                 New GEOM.GEOM_Object, containing the created prism.
3661             """
3662             # Example: see GEOM_TestAll.py
3663             theH,Parameters = ParseParameters(theH)
3664             anObj = self.PrimOp.MakePrismVecH2Ways(theBase, theVec, theH)
3665             RaiseIfFailed("MakePrismVecH2Ways", self.PrimOp)
3666             anObj.SetParameters(Parameters)
3667             self._autoPublish(anObj, theName, "prism")
3668             return anObj
3669
3670         ## Create a shape by extrusion of the base shape along the dx, dy, dz direction
3671         #  @param theBase Base shape to be extruded.
3672         #  @param theDX, theDY, theDZ Directions of extrusion.
3673         #  @param theScaleFactor Use it to make prism with scaled second base.
3674         #                        Nagative value means not scaled second base.
3675         #  @param theName Object name; when specified, this parameter is used
3676         #         for result publication in the study. Otherwise, if automatic
3677         #         publication is switched on, default value is used for result name.
3678         #
3679         #  @return New GEOM.GEOM_Object, containing the created prism.
3680         #
3681         #  @ref tui_creation_prism "Example"
3682         @ManageTransactions("PrimOp")
3683         def MakePrismDXDYDZ(self, theBase, theDX, theDY, theDZ, theScaleFactor = -1.0, theName=None):
3684             """
3685             Create a shape by extrusion of the base shape along the dx, dy, dz direction
3686
3687             Parameters:
3688                 theBase Base shape to be extruded.
3689                 theDX, theDY, theDZ Directions of extrusion.
3690                 theScaleFactor Use it to make prism with scaled second base.
3691                                Nagative value means not scaled second base.
3692                 theName Object name; when specified, this parameter is used
3693                         for result publication in the study. Otherwise, if automatic
3694                         publication is switched on, default value is used for result name.
3695
3696             Returns:
3697                 New GEOM.GEOM_Object, containing the created prism.
3698             """
3699             # Example: see GEOM_TestAll.py
3700             anObj = None
3701             Parameters = ""
3702             if theScaleFactor > 0:
3703                 theDX,theDY,theDZ,theScaleFactor,Parameters = ParseParameters(theDX, theDY, theDZ, theScaleFactor)
3704                 anObj = self.PrimOp.MakePrismDXDYDZWithScaling(theBase, theDX, theDY, theDZ, theScaleFactor)
3705             else:
3706                 theDX,theDY,theDZ,Parameters = ParseParameters(theDX, theDY, theDZ)
3707                 anObj = self.PrimOp.MakePrismDXDYDZ(theBase, theDX, theDY, theDZ)
3708             RaiseIfFailed("MakePrismDXDYDZ", self.PrimOp)
3709             anObj.SetParameters(Parameters)
3710             self._autoPublish(anObj, theName, "prism")
3711             return anObj
3712
3713         ## Create a shape by extrusion of the base shape along the dx, dy, dz direction
3714         #  i.e. all the space, transfixed by the base shape during its translation
3715         #  along the vector on the given distance in 2 Ways (forward/backward).
3716         #  @param theBase Base shape to be extruded.
3717         #  @param theDX, theDY, theDZ Directions of extrusion.
3718         #  @param theName Object name; when specified, this parameter is used
3719         #         for result publication in the study. Otherwise, if automatic
3720         #         publication is switched on, default value is used for result name.
3721         #
3722         #  @return New GEOM.GEOM_Object, containing the created prism.
3723         #
3724         #  @ref tui_creation_prism "Example"
3725         @ManageTransactions("PrimOp")
3726         def MakePrismDXDYDZ2Ways(self, theBase, theDX, theDY, theDZ, theName=None):
3727             """
3728             Create a shape by extrusion of the base shape along the dx, dy, dz direction
3729             i.e. all the space, transfixed by the base shape during its translation
3730             along the vector on the given distance in 2 Ways (forward/backward).
3731
3732             Parameters:
3733                 theBase Base shape to be extruded.
3734                 theDX, theDY, theDZ Directions of extrusion.
3735                 theName Object name; when specified, this parameter is used
3736                         for result publication in the study. Otherwise, if automatic
3737                         publication is switched on, default value is used for result name.
3738
3739             Returns:
3740                 New GEOM.GEOM_Object, containing the created prism.
3741             """
3742             # Example: see GEOM_TestAll.py
3743             theDX,theDY,theDZ,Parameters = ParseParameters(theDX, theDY, theDZ)
3744             anObj = self.PrimOp.MakePrismDXDYDZ2Ways(theBase, theDX, theDY, theDZ)
3745             RaiseIfFailed("MakePrismDXDYDZ2Ways", self.PrimOp)
3746             anObj.SetParameters(Parameters)
3747             self._autoPublish(anObj, theName, "prism")
3748             return anObj
3749
3750         ## Create a shape by revolution of the base shape around the axis
3751         #  on the given angle, i.e. all the space, transfixed by the base
3752         #  shape during its rotation around the axis on the given angle.
3753         #  @param theBase Base shape to be rotated.
3754         #  @param theAxis Rotation axis.
3755         #  @param theAngle Rotation angle in radians.
3756         #  @param theName Object name; when specified, this parameter is used
3757         #         for result publication in the study. Otherwise, if automatic
3758         #         publication is switched on, default value is used for result name.
3759         #
3760         #  @return New GEOM.GEOM_Object, containing the created revolution.
3761         #
3762         #  @ref tui_creation_revolution "Example"
3763         @ManageTransactions("PrimOp")
3764         def MakeRevolution(self, theBase, theAxis, theAngle, theName=None):
3765             """
3766             Create a shape by revolution of the base shape around the axis
3767             on the given angle, i.e. all the space, transfixed by the base
3768             shape during its rotation around the axis on the given angle.
3769
3770             Parameters:
3771                 theBase Base shape to be rotated.
3772                 theAxis Rotation axis.
3773                 theAngle Rotation angle in radians.
3774                 theName Object name; when specified, this parameter is used
3775                         for result publication in the study. Otherwise, if automatic
3776                         publication is switched on, default value is used for result name.
3777
3778             Returns:
3779                 New GEOM.GEOM_Object, containing the created revolution.
3780             """
3781             # Example: see GEOM_TestAll.py
3782             theAngle,Parameters = ParseParameters(theAngle)
3783             anObj = self.PrimOp.MakeRevolutionAxisAngle(theBase, theAxis, theAngle)
3784             RaiseIfFailed("MakeRevolutionAxisAngle", self.PrimOp)
3785             anObj.SetParameters(Parameters)
3786             self._autoPublish(anObj, theName, "revolution")
3787             return anObj
3788
3789         ## Create a shape by revolution of the base shape around the axis
3790         #  on the given angle, i.e. all the space, transfixed by the base
3791         #  shape during its rotation around the axis on the given angle in
3792         #  both directions (forward/backward)
3793         #  @param theBase Base shape to be rotated.
3794         #  @param theAxis Rotation axis.
3795         #  @param theAngle Rotation angle in radians.
3796         #  @param theName Object name; when specified, this parameter is used
3797         #         for result publication in the study. Otherwise, if automatic
3798         #         publication is switched on, default value is used for result name.
3799         #
3800         #  @return New GEOM.GEOM_Object, containing the created revolution.
3801         #
3802         #  @ref tui_creation_revolution "Example"
3803         @ManageTransactions("PrimOp")
3804         def MakeRevolution2Ways(self, theBase, theAxis, theAngle, theName=None):
3805             """
3806             Create a shape by revolution of the base shape around the axis
3807             on the given angle, i.e. all the space, transfixed by the base
3808             shape during its rotation around the axis on the given angle in
3809             both directions (forward/backward).
3810
3811             Parameters:
3812                 theBase Base shape to be rotated.
3813                 theAxis Rotation axis.
3814                 theAngle Rotation angle in radians.
3815                 theName Object name; when specified, this parameter is used
3816                         for result publication in the study. Otherwise, if automatic
3817                         publication is switched on, default value is used for result name.
3818
3819             Returns:
3820                 New GEOM.GEOM_Object, containing the created revolution.
3821             """
3822             theAngle,Parameters = ParseParameters(theAngle)
3823             anObj = self.PrimOp.MakeRevolutionAxisAngle2Ways(theBase, theAxis, theAngle)
3824             RaiseIfFailed("MakeRevolutionAxisAngle2Ways", self.PrimOp)
3825             anObj.SetParameters(Parameters)
3826             self._autoPublish(anObj, theName, "revolution")
3827             return anObj
3828
3829         ## Create a face from a given set of contours.
3830         #  @param theContours either a list or a compound of edges/wires.
3831         #  @param theMinDeg a minimal degree of BSpline surface to create.
3832         #  @param theMaxDeg a maximal degree of BSpline surface to create.
3833         #  @param theTol2D a 2d tolerance to be reached.
3834         #  @param theTol3D a 3d tolerance to be reached.
3835         #  @param theNbIter a number of iteration of approximation algorithm.
3836         #  @param theMethod Kind of method to perform filling operation
3837         #         (see GEOM.filling_oper_method enum).
3838         #  @param isApprox if True, BSpline curves are generated in the process
3839         #                  of surface construction. By default it is False, that means
3840         #                  the surface is created using given curves. The usage of
3841         #                  Approximation makes the algorithm work slower, but allows
3842         #                  building the surface for rather complex cases.
3843         #  @param theName Object name; when specified, this parameter is used
3844         #         for result publication in the study. Otherwise, if automatic
3845         #         publication is switched on, default value is used for result name.
3846         #
3847         #  @return New GEOM.GEOM_Object (face), containing the created filling surface.
3848         #
3849         #  @ref tui_creation_filling "Example"
3850         @ManageTransactions("PrimOp")
3851         def MakeFilling(self, theContours, theMinDeg=2, theMaxDeg=5, theTol2D=0.0001,
3852                         theTol3D=0.0001, theNbIter=0, theMethod=GEOM.FOM_Default, isApprox=0, theName=None):
3853             """
3854             Create a face from a given set of contours.
3855
3856             Parameters:
3857                 theContours either a list or a compound of edges/wires.
3858                 theMinDeg a minimal degree of BSpline surface to create.
3859                 theMaxDeg a maximal degree of BSpline surface to create.
3860                 theTol2D a 2d tolerance to be reached.
3861                 theTol3D a 3d tolerance to be reached.
3862                 theNbIter a number of iteration of approximation algorithm.
3863                 theMethod Kind of method to perform filling operation
3864                           (see GEOM.filling_oper_method enum).
3865                 isApprox if True, BSpline curves are generated in the process
3866                          of surface construction. By default it is False, that means
3867                          the surface is created using given curves. The usage of
3868                          Approximation makes the algorithm work slower, but allows
3869                          building the surface for rather complex cases.
3870                 theName Object name; when specified, this parameter is used
3871                         for result publication in the study. Otherwise, if automatic
3872                         publication is switched on, default value is used for result name.
3873
3874             Returns:
3875                 New GEOM.GEOM_Object (face), containing the created filling surface.
3876
3877             Example of usage:
3878                 filling = geompy.MakeFilling(compound, 2, 5, 0.0001, 0.0001, 5)
3879             """
3880             # Example: see GEOM_TestAll.py
3881             theMinDeg,theMaxDeg,theTol2D,theTol3D,theNbIter,Parameters = ParseParameters(theMinDeg, theMaxDeg, theTol2D, theTol3D, theNbIter)
3882             anObj = self.PrimOp.MakeFilling(ToList(theContours), theMinDeg, theMaxDeg,
3883                                             theTol2D, theTol3D, theNbIter,
3884                                             theMethod, isApprox)
3885             RaiseIfFailed("MakeFilling", self.PrimOp)
3886             anObj.SetParameters(Parameters)
3887             self._autoPublish(anObj, theName, "filling")
3888             return anObj
3889
3890
3891         ## Create a face from a given set of contours.
3892         #  This method corresponds to MakeFilling() with isApprox=True.
3893         #  @param theContours either a list or a compound of edges/wires.
3894         #  @param theMinDeg a minimal degree of BSpline surface to create.
3895         #  @param theMaxDeg a maximal degree of BSpline surface to create.
3896         #  @param theTol3D a 3d tolerance to be reached.
3897         #  @param theName Object name; when specified, this parameter is used
3898         #         for result publication in the study. Otherwise, if automatic
3899         #         publication is switched on, default value is used for result name.
3900         #
3901         #  @return New GEOM.GEOM_Object (face), containing the created filling surface.
3902         #
3903         #  @ref tui_creation_filling "Example"
3904         @ManageTransactions("PrimOp")
3905         def MakeFillingNew(self, theContours, theMinDeg=2, theMaxDeg=5, theTol3D=0.0001, theName=None):
3906             """
3907             Create a filling from the given compound of contours.
3908             This method corresponds to MakeFilling() with isApprox=True.
3909
3910             Parameters:
3911                 theContours either a list or a compound of edges/wires.
3912                 theMinDeg a minimal degree of BSpline surface to create.
3913                 theMaxDeg a maximal degree of BSpline surface to create.
3914                 theTol3D a 3d tolerance to be reached.
3915                 theName Object name; when specified, this parameter is used
3916                         for result publication in the study. Otherwise, if automatic
3917                         publication is switched on, default value is used for result name.
3918
3919             Returns:
3920                 New GEOM.GEOM_Object (face), containing the created filling surface.
3921
3922             Example of usage:
3923                 filling = geompy.MakeFillingNew(compound, 2, 5, 0.0001)
3924             """
3925             # Example: see GEOM_TestAll.py
3926             theMinDeg,theMaxDeg,theTol3D,Parameters = ParseParameters(theMinDeg, theMaxDeg, theTol3D)
3927             anObj = self.PrimOp.MakeFilling(ToList(theContours), theMinDeg, theMaxDeg,
3928                                             0, theTol3D, 0, GEOM.FOM_Default, True)
3929             RaiseIfFailed("MakeFillingNew", self.PrimOp)
3930             anObj.SetParameters(Parameters)
3931             self._autoPublish(anObj, theName, "filling")
3932             return anObj
3933
3934         ## Create a shell or solid passing through set of sections.Sections should be wires,edges or vertices.
3935         #  @param theSeqSections - set of specified sections.
3936         #  @param theModeSolid - mode defining building solid or shell
3937         #  @param thePreci - precision 3D used for smoothing
3938         #  @param theRuled - mode defining type of the result surfaces (ruled or smoothed).
3939         #  @param theName Object name; when specified, this parameter is used
3940         #         for result publication in the study. Otherwise, if automatic
3941         #         publication is switched on, default value is used for result name.
3942         #
3943         #  @return New GEOM.GEOM_Object, containing the created shell or solid.
3944         #
3945         #  @ref swig_todo "Example"
3946         @ManageTransactions("PrimOp")
3947         def MakeThruSections(self, theSeqSections, theModeSolid, thePreci, theRuled, theName=None):
3948             """
3949             Create a shell or solid passing through set of sections.Sections should be wires,edges or vertices.
3950
3951             Parameters:
3952                 theSeqSections - set of specified sections.
3953                 theModeSolid - mode defining building solid or shell
3954                 thePreci - precision 3D used for smoothing
3955                 theRuled - mode defining type of the result surfaces (ruled or smoothed).
3956                 theName Object name; when specified, this parameter is used
3957                         for result publication in the study. Otherwise, if automatic
3958                         publication is switched on, default value is used for result name.
3959
3960             Returns:
3961                 New GEOM.GEOM_Object, containing the created shell or solid.
3962             """
3963             # Example: see GEOM_TestAll.py
3964             anObj = self.PrimOp.MakeThruSections(theSeqSections,theModeSolid,thePreci,theRuled)
3965             RaiseIfFailed("MakeThruSections", self.PrimOp)
3966             self._autoPublish(anObj, theName, "filling")
3967             return anObj
3968
3969         ## Create a shape by extrusion of the base shape along
3970         #  the path shape. The path shape can be a wire or an edge. It is
3971         #  possible to generate groups along with the result by means of
3972         #  setting the flag \a IsGenerateGroups.<BR>
3973         #  If \a thePath is a closed edge or wire and \a IsGenerateGroups is
3974         #  set, an error is occurred. If \a thePath is not closed edge/wire,
3975         #  the following groups are returned:
3976         #  - If \a theBase is unclosed edge or wire: "Down", "Up", "Side1",
3977         #    "Side2";
3978         #  - If \a theBase is closed edge or wire, face or shell: "Down", "Up",
3979         #    "Other".
3980         #  .
3981         #  "Down" and "Up" groups contain:
3982         #  - Edges if \a theBase is edge or wire;
3983         #  - Faces if \a theBase is face or shell.<BR>
3984         #  .
3985         #  "Side1" and "Side2" groups contain edges generated from the first
3986         #  and last vertices of \a theBase. The first and last vertices are
3987         #  determined taking into account edge/wire orientation.<BR>
3988         #  "Other" group represents faces generated from the bounding edges of
3989         #  \a theBase.
3990         #
3991         #  @param theBase Base shape to be extruded.
3992         #  @param thePath Path shape to extrude the base shape along it.
3993         #  @param IsGenerateGroups flag that tells if it is necessary to
3994         #         create groups. It is equal to False by default.
3995         #  @param theName Object name; when specified, this parameter is used
3996         #         for result publication in the study. Otherwise, if automatic
3997         #         publication is switched on, default value is used for result name.
3998         #
3999         #  @return New GEOM.GEOM_Object, containing the created pipe if 
4000         #          \a IsGenerateGroups is not set. Otherwise it returns a
4001         #          list of GEOM.GEOM_Object. Its first element is the created pipe, the
4002         #          remaining ones are created groups.
4003         #
4004         #  @ref tui_creation_pipe "Example"
4005         @ManageTransactions("PrimOp")
4006         def MakePipe(self, theBase, thePath,
4007                      IsGenerateGroups=False, theName=None):
4008             """
4009             Create a shape by extrusion of the base shape along
4010             the path shape. The path shape can be a wire or an edge. It is
4011             possible to generate groups along with the result by means of
4012             setting the flag IsGenerateGroups.
4013             If thePath is a closed edge or wire and IsGenerateGroups is
4014             set, an error is occurred. If thePath is not closed edge/wire,
4015             the following groups are returned:
4016             - If theBase is unclosed edge or wire: "Down", "Up", "Side1",
4017               "Side2";
4018             - If theBase is closed edge or wire, face or shell: "Down", "Up",
4019               "Other".
4020             "Down" and "Up" groups contain:
4021             - Edges if theBase is edge or wire;
4022             - Faces if theBase is face or shell.
4023             "Side1" and "Side2" groups contain edges generated from the first
4024             and last vertices of theBase. The first and last vertices are
4025             determined taking into account edge/wire orientation.
4026             "Other" group represents faces generated from the bounding edges of
4027             theBase.
4028
4029             Parameters:
4030                 theBase Base shape to be extruded.
4031                 thePath Path shape to extrude the base shape along it.
4032                 IsGenerateGroups flag that tells if it is necessary to
4033                         create groups. It is equal to False by default.
4034                 theName Object name; when specified, this parameter is used
4035                         for result publication in the study. Otherwise, if automatic
4036                         publication is switched on, default value is used for result name.
4037
4038             Returns:
4039                 New GEOM.GEOM_Object, containing the created pipe if 
4040                 IsGenerateGroups is not set. Otherwise it returns a
4041                 list of GEOM.GEOM_Object. Its first element is the created pipe, the
4042                 remaining ones are created groups.
4043             """
4044             # Example: see GEOM_TestAll.py
4045             aList = self.PrimOp.MakePipe(theBase, thePath, IsGenerateGroups)
4046             RaiseIfFailed("MakePipe", self.PrimOp)
4047
4048             if IsGenerateGroups:
4049               self._autoPublish(aList, theName, "pipe")
4050               return aList
4051
4052             self._autoPublish(aList[0], theName, "pipe")
4053             return aList[0]
4054
4055         ## Create a shape by extrusion of the profile shape along
4056         #  the path shape. The path shape can be a wire or an edge.
4057         #  the several profiles can be specified in the several locations of path.
4058         #  It is possible to generate groups along with the result by means of
4059         #  setting the flag \a IsGenerateGroups. For detailed information on
4060         #  groups that can be created please see the method MakePipe().
4061         #  @param theSeqBases - list of  Bases shape to be extruded.
4062         #  @param theLocations - list of locations on the path corresponding
4063         #                        specified list of the Bases shapes. Number of locations
4064         #                        should be equal to number of bases or list of locations can be empty.
4065         #  @param thePath - Path shape to extrude the base shape along it.
4066         #  @param theWithContact - the mode defining that the section is translated to be in
4067         #                          contact with the spine.
4068         #  @param theWithCorrection - defining that the section is rotated to be
4069         #                             orthogonal to the spine tangent in the correspondent point
4070         #  @param IsGenerateGroups - flag that tells if it is necessary to
4071         #                          create groups. It is equal to False by default.
4072         #  @param theName Object name; when specified, this parameter is used
4073         #         for result publication in the study. Otherwise, if automatic
4074         #         publication is switched on, default value is used for result name.
4075         #
4076         #  @return New GEOM.GEOM_Object, containing the created pipe if 
4077         #          \a IsGenerateGroups is not set. Otherwise it returns new
4078         #          GEOM.ListOfGO. Its first element is the created pipe, the
4079         #          remaining ones are created groups.
4080         #
4081         #  @ref tui_creation_pipe_with_diff_sec "Example"
4082         @ManageTransactions("PrimOp")
4083         def MakePipeWithDifferentSections(self, theSeqBases,
4084                                           theLocations, thePath,
4085                                           theWithContact, theWithCorrection,
4086                                           IsGenerateGroups=False, theName=None):
4087             """
4088             Create a shape by extrusion of the profile shape along
4089             the path shape. The path shape can be a wire or an edge.
4090             the several profiles can be specified in the several locations of path.
4091             It is possible to generate groups along with the result by means of
4092             setting the flag IsGenerateGroups. For detailed information on
4093             groups that can be created please see the method geompy.MakePipe().
4094
4095             Parameters:
4096                 theSeqBases - list of  Bases shape to be extruded.
4097                 theLocations - list of locations on the path corresponding
4098                                specified list of the Bases shapes. Number of locations
4099                                should be equal to number of bases or list of locations can be empty.
4100                 thePath - Path shape to extrude the base shape along it.
4101                 theWithContact - the mode defining that the section is translated to be in
4102                                  contact with the spine(0/1)
4103                 theWithCorrection - defining that the section is rotated to be
4104                                     orthogonal to the spine tangent in the correspondent point (0/1)
4105                 IsGenerateGroups - flag that tells if it is necessary to
4106                                  create groups. It is equal to False by default.
4107                 theName Object name; when specified, this parameter is used
4108                         for result publication in the study. Otherwise, if automatic
4109                         publication is switched on, default value is used for result name.
4110
4111             Returns:
4112                 New GEOM.GEOM_Object, containing the created pipe if 
4113                 IsGenerateGroups is not set. Otherwise it returns new
4114                 GEOM.ListOfGO. Its first element is the created pipe, the
4115                 remaining ones are created groups.
4116             """
4117             aList = self.PrimOp.MakePipeWithDifferentSections(theSeqBases,
4118                                                               theLocations, thePath,
4119                                                               theWithContact, theWithCorrection,
4120                                                               False, IsGenerateGroups)
4121             RaiseIfFailed("MakePipeWithDifferentSections", self.PrimOp)
4122
4123             if IsGenerateGroups:
4124               self._autoPublish(aList, theName, "pipe")
4125               return aList
4126
4127             self._autoPublish(aList[0], theName, "pipe")
4128             return aList[0]
4129
4130         ## Create a shape by extrusion of the profile shape along
4131         #  the path shape. This function is a version of
4132         #  MakePipeWithDifferentSections() with the same parameters, except
4133         #  eliminated theWithContact and theWithCorrection. So it is
4134         #  possible to find the description of all parameters is in this
4135         #  method. The difference is that this method performs the operation
4136         #  step by step, i.e. it creates pipes between each pair of neighbor
4137         #  sections and fuses them into a single shape.
4138         #
4139         #  @ref tui_creation_pipe_with_diff_sec "Example"
4140         @ManageTransactions("PrimOp")
4141         def MakePipeWithDifferentSectionsBySteps(self, theSeqBases,
4142                                                  theLocations, thePath,
4143                                                  IsGenerateGroups=False, theName=None):
4144             """
4145             Create a shape by extrusion of the profile shape along
4146             the path shape. This function is a version of
4147             MakePipeWithDifferentSections() with the same parameters, except
4148             eliminated theWithContact and theWithCorrection. So it is
4149             possible to find the description of all parameters is in this
4150             method. The difference is that this method performs the operation
4151             step by step, i.e. it creates pipes between each pair of neighbor
4152             sections and fuses them into a single shape.
4153             """
4154             aList = self.PrimOp.MakePipeWithDifferentSections(theSeqBases,
4155                                                               theLocations, thePath,
4156                                                               False, False,
4157                                                               True, IsGenerateGroups)
4158             RaiseIfFailed("MakePipeWithDifferentSectionsBySteps", self.PrimOp)
4159
4160             if IsGenerateGroups:
4161               self._autoPublish(aList, theName, "pipe")
4162               return aList
4163
4164             self._autoPublish(aList[0], theName, "pipe")
4165             return aList[0]
4166
4167         ## Create a shape by extrusion of the profile shape along
4168         #  the path shape. The path shape can be a wire or an edge.
4169         #  the several profiles can be specified in the several locations of path.
4170         #  It is possible to generate groups along with the result by means of
4171         #  setting the flag \a IsGenerateGroups. For detailed information on
4172         #  groups that can be created please see the method MakePipe().
4173         #  @param theSeqBases - list of  Bases shape to be extruded. Base shape must be
4174         #                       shell or face. If number of faces in neighbour sections
4175         #                       aren't coincided result solid between such sections will
4176         #                       be created using external boundaries of this shells.
4177         #  @param theSeqSubBases - list of corresponding sub-shapes of section shapes.
4178         #                          This list is used for searching correspondences between
4179         #                          faces in the sections. Size of this list must be equal
4180         #                          to size of list of base shapes.
4181         #  @param theLocations - list of locations on the path corresponding
4182         #                        specified list of the Bases shapes. Number of locations
4183         #                        should be equal to number of bases. First and last
4184         #                        locations must be coincided with first and last vertexes
4185         #                        of path correspondingly.
4186         #  @param thePath - Path shape to extrude the base shape along it.
4187         #  @param theWithContact - the mode defining that the section is translated to be in
4188         #                          contact with the spine.
4189         #  @param theWithCorrection - defining that the section is rotated to be
4190         #                             orthogonal to the spine tangent in the correspondent point
4191         #  @param IsGenerateGroups - flag that tells if it is necessary to
4192         #                          create groups. It is equal to False by default.
4193         #  @param theName Object name; when specified, this parameter is used
4194         #         for result publication in the study. Otherwise, if automatic
4195         #         publication is switched on, default value is used for result name.
4196         #
4197         #  @return New GEOM.GEOM_Object, containing the created solids if 
4198         #          \a IsGenerateGroups is not set. Otherwise it returns new
4199         #          GEOM.ListOfGO. Its first element is the created solids, the
4200         #          remaining ones are created groups.
4201         #
4202         #  @ref tui_creation_pipe_with_shell_sec "Example"
4203         @ManageTransactions("PrimOp")
4204         def MakePipeWithShellSections(self, theSeqBases, theSeqSubBases,
4205                                       theLocations, thePath,
4206                                       theWithContact, theWithCorrection,
4207                                       IsGenerateGroups=False, theName=None):
4208             """
4209             Create a shape by extrusion of the profile shape along
4210             the path shape. The path shape can be a wire or an edge.
4211             the several profiles can be specified in the several locations of path.
4212             It is possible to generate groups along with the result by means of
4213             setting the flag IsGenerateGroups. For detailed information on
4214             groups that can be created please see the method geompy.MakePipe().
4215
4216             Parameters:
4217                 theSeqBases - list of  Bases shape to be extruded. Base shape must be
4218                               shell or face. If number of faces in neighbour sections
4219                               aren't coincided result solid between such sections will
4220                               be created using external boundaries of this shells.
4221                 theSeqSubBases - list of corresponding sub-shapes of section shapes.
4222                                  This list is used for searching correspondences between
4223                                  faces in the sections. Size of this list must be equal
4224                                  to size of list of base shapes.
4225                 theLocations - list of locations on the path corresponding
4226                                specified list of the Bases shapes. Number of locations
4227                                should be equal to number of bases. First and last
4228                                locations must be coincided with first and last vertexes
4229                                of path correspondingly.
4230                 thePath - Path shape to extrude the base shape along it.
4231                 theWithContact - the mode defining that the section is translated to be in
4232                                  contact with the spine (0/1)
4233                 theWithCorrection - defining that the section is rotated to be
4234                                     orthogonal to the spine tangent in the correspondent point (0/1)
4235                 IsGenerateGroups - flag that tells if it is necessary to
4236                                  create groups. It is equal to False by default.
4237                 theName Object name; when specified, this parameter is used
4238                         for result publication in the study. Otherwise, if automatic
4239                         publication is switched on, default value is used for result name.
4240
4241             Returns:
4242                 New GEOM.GEOM_Object, containing the created solids if 
4243                 IsGenerateGroups is not set. Otherwise it returns new
4244                 GEOM.ListOfGO. Its first element is the created solids, the
4245                 remaining ones are created groups.
4246             """
4247             aList = self.PrimOp.MakePipeWithShellSections(theSeqBases, theSeqSubBases,
4248                                                           theLocations, thePath,
4249                                                           theWithContact, theWithCorrection,
4250                                                           IsGenerateGroups)
4251             RaiseIfFailed("MakePipeWithShellSections", self.PrimOp)
4252
4253             if IsGenerateGroups:
4254               self._autoPublish(aList, theName, "pipe")
4255               return aList
4256
4257             self._autoPublish(aList[0], theName, "pipe")
4258             return aList[0]
4259
4260         ## Create a shape by extrusion of the profile shape along
4261         #  the path shape. This function is used only for debug pipe
4262         #  functionality - it is a version of function MakePipeWithShellSections()
4263         #  which give a possibility to receive information about
4264         #  creating pipe between each pair of sections step by step.
4265         @ManageTransactions("PrimOp")
4266         def MakePipeWithShellSectionsBySteps(self, theSeqBases, theSeqSubBases,
4267                                              theLocations, thePath,
4268                                              theWithContact, theWithCorrection,
4269                                              IsGenerateGroups=False, theName=None):
4270             """
4271             Create a shape by extrusion of the profile shape along
4272             the path shape. This function is used only for debug pipe
4273             functionality - it is a version of previous function
4274             geompy.MakePipeWithShellSections() which give a possibility to
4275             receive information about creating pipe between each pair of
4276             sections step by step.
4277             """
4278             res = []
4279             nbsect = len(theSeqBases)
4280             nbsubsect = len(theSeqSubBases)
4281             #print "nbsect = ",nbsect
4282             for i in range(1,nbsect):
4283                 #print "  i = ",i
4284                 tmpSeqBases = [ theSeqBases[i-1], theSeqBases[i] ]
4285                 tmpLocations = [ theLocations[i-1], theLocations[i] ]
4286                 tmpSeqSubBases = []
4287                 if nbsubsect>0: tmpSeqSubBases = [ theSeqSubBases[i-1], theSeqSubBases[i] ]
4288                 aList = self.PrimOp.MakePipeWithShellSections(tmpSeqBases, tmpSeqSubBases,
4289                                                               tmpLocations, thePath,
4290                                                               theWithContact, theWithCorrection,
4291                                                               IsGenerateGroups)
4292                 if self.PrimOp.IsDone() == 0:
4293                     print("Problems with pipe creation between ",i," and ",i+1," sections")
4294                     RaiseIfFailed("MakePipeWithShellSections", self.PrimOp)
4295                     break
4296                 else:
4297                     print("Pipe between ",i," and ",i+1," sections is OK")
4298                     res.append(aList[0])
4299                     pass
4300                 pass
4301
4302             resc = self.MakeCompound(res)
4303             #resc = self.MakeSewing(res, 0.001)
4304             #print "resc: ",resc
4305             self._autoPublish(resc, theName, "pipe")
4306             return resc
4307
4308         ## Create solids between given sections.
4309         #  It is possible to generate groups along with the result by means of
4310         #  setting the flag \a IsGenerateGroups. For detailed information on
4311         #  groups that can be created please see the method MakePipe().
4312         #  @param theSeqBases - list of sections (shell or face).
4313         #  @param theLocations - list of corresponding vertexes
4314         #  @param IsGenerateGroups - flag that tells if it is necessary to
4315         #         create groups. It is equal to False by default.
4316         #  @param theName Object name; when specified, this parameter is used
4317         #         for result publication in the study. Otherwise, if automatic
4318         #         publication is switched on, default value is used for result name.
4319         #
4320         #  @return New GEOM.GEOM_Object, containing the created solids if 
4321         #          \a IsGenerateGroups is not set. Otherwise it returns new
4322         #          GEOM.ListOfGO. Its first element is the created solids, the
4323         #          remaining ones are created groups.
4324         #
4325         #  @ref tui_creation_pipe_without_path "Example"
4326         @ManageTransactions("PrimOp")
4327         def MakePipeShellsWithoutPath(self, theSeqBases, theLocations,
4328                                       IsGenerateGroups=False, theName=None):
4329             """
4330             Create solids between given sections.
4331             It is possible to generate groups along with the result by means of
4332             setting the flag IsGenerateGroups. For detailed information on
4333             groups that can be created please see the method geompy.MakePipe().
4334
4335             Parameters:
4336                 theSeqBases - list of sections (shell or face).
4337                 theLocations - list of corresponding vertexes
4338                 IsGenerateGroups - flag that tells if it is necessary to
4339                                  create groups. It is equal to False by default.
4340                 theName Object name; when specified, this parameter is used
4341                         for result publication in the study. Otherwise, if automatic
4342                         publication is switched on, default value is used for result name.
4343
4344             Returns:
4345                 New GEOM.GEOM_Object, containing the created solids if 
4346                 IsGenerateGroups is not set. Otherwise it returns new
4347                 GEOM.ListOfGO. Its first element is the created solids, the
4348                 remaining ones are created groups.
4349             """
4350             aList = self.PrimOp.MakePipeShellsWithoutPath(theSeqBases, theLocations,
4351                                                           IsGenerateGroups)
4352             RaiseIfFailed("MakePipeShellsWithoutPath", self.PrimOp)
4353
4354             if IsGenerateGroups:
4355               self._autoPublish(aList, theName, "pipe")
4356               return aList
4357
4358             self._autoPublish(aList[0], theName, "pipe")
4359             return aList[0]
4360
4361         ## Create a shape by extrusion of the base shape along
4362         #  the path shape with constant bi-normal direction along the given vector.
4363         #  The path shape can be a wire or an edge.
4364         #  It is possible to generate groups along with the result by means of
4365         #  setting the flag \a IsGenerateGroups. For detailed information on
4366         #  groups that can be created please see the method MakePipe().
4367         #  @param theBase Base shape to be extruded.
4368         #  @param thePath Path shape to extrude the base shape along it.
4369         #  @param theVec Vector defines a constant binormal direction to keep the
4370         #                same angle between the direction and the sections
4371         #                along the sweep surface.
4372         #  @param IsGenerateGroups flag that tells if it is necessary to
4373         #         create groups. It is equal to False by default.
4374         #  @param theName Object name; when specified, this parameter is used
4375         #         for result publication in the study. Otherwise, if automatic
4376         #         publication is switched on, default value is used for result name.
4377         #
4378         #  @return New GEOM.GEOM_Object, containing the created pipe if 
4379         #          \a IsGenerateGroups is not set. Otherwise it returns new
4380         #          GEOM.ListOfGO. Its first element is the created pipe, the
4381         #          remaining ones are created groups.
4382         #
4383         #  @ref tui_creation_pipe "Example"
4384         @ManageTransactions("PrimOp")
4385         def MakePipeBiNormalAlongVector(self, theBase, thePath, theVec,
4386                                         IsGenerateGroups=False, theName=None):
4387             """
4388             Create a shape by extrusion of the base shape along
4389             the path shape with constant bi-normal direction along the given vector.
4390             The path shape can be a wire or an edge.
4391             It is possible to generate groups along with the result by means of
4392             setting the flag IsGenerateGroups. For detailed information on
4393             groups that can be created please see the method geompy.MakePipe().
4394
4395             Parameters:
4396                 theBase Base shape to be extruded.
4397                 thePath Path shape to extrude the base shape along it.
4398                 theVec Vector defines a constant binormal direction to keep the
4399                        same angle between the direction and the sections
4400                        along the sweep surface.
4401                 IsGenerateGroups flag that tells if it is necessary to
4402                                  create groups. It is equal to False by default.
4403                 theName Object name; when specified, this parameter is used
4404                         for result publication in the study. Otherwise, if automatic
4405                         publication is switched on, default value is used for result name.
4406
4407             Returns:
4408                 New GEOM.GEOM_Object, containing the created pipe if 
4409                 IsGenerateGroups is not set. Otherwise it returns new
4410                 GEOM.ListOfGO. Its first element is the created pipe, the
4411                 remaining ones are created groups.
4412             """
4413             # Example: see GEOM_TestAll.py
4414             aList = self.PrimOp.MakePipeBiNormalAlongVector(theBase, thePath,
4415                           theVec, IsGenerateGroups)
4416             RaiseIfFailed("MakePipeBiNormalAlongVector", self.PrimOp)
4417
4418             if IsGenerateGroups:
4419               self._autoPublish(aList, theName, "pipe")
4420               return aList
4421
4422             self._autoPublish(aList[0], theName, "pipe")
4423             return aList[0]
4424
4425         ## Makes a thick solid from a shape. If the input is a surface shape
4426         #  (face or shell) the result is a thick solid. If an input shape is
4427         #  a solid the result is a hollowed solid with removed faces.
4428         #  @param theShape Face or Shell to get thick solid or solid to get
4429         #         hollowed solid.
4430         #  @param theThickness Thickness of the resulting solid
4431         #  @param theFacesIDs the list of face IDs to be removed from the
4432         #         result. It is ignored if \a theShape is a face or a shell.
4433         #         It is empty by default. 
4434         #  @param theInside If true the thickness is applied towards inside
4435         #  @param theName Object name; when specified, this parameter is used
4436         #         for result publication in the study. Otherwise, if automatic
4437         #         publication is switched on, default value is used for result name.
4438         #
4439         #  @return New GEOM.GEOM_Object, containing the created solid
4440         #
4441         #  @ref tui_creation_thickness "Example"
4442         @ManageTransactions("PrimOp")
4443         def MakeThickSolid(self, theShape, theThickness,
4444                            theFacesIDs=[], theInside=False, theName=None):
4445             """
4446             Make a thick solid from a shape. If the input is a surface shape
4447             (face or shell) the result is a thick solid. If an input shape is
4448             a solid the result is a hollowed solid with removed faces.
4449
4450             Parameters:
4451                  theShape Face or Shell to get thick solid or solid to get
4452                           hollowed solid.
4453                  theThickness Thickness of the resulting solid
4454                  theFacesIDs the list of face IDs to be removed from the
4455                           result. It is ignored if theShape is a face or a
4456                           shell. It is empty by default. 
4457                  theInside If true the thickness is applied towards inside
4458                  theName Object name; when specified, this parameter is used
4459                          for result publication in the study. Otherwise, if automatic
4460                          publication is switched on, default value is used for result name.
4461
4462             Returns:
4463                 New GEOM.GEOM_Object, containing the created solid
4464             """
4465             # Example: see GEOM_TestAll.py
4466             theThickness,Parameters = ParseParameters(theThickness)
4467             anObj = self.PrimOp.MakeThickening(theShape, theFacesIDs,
4468                                                theThickness, True, theInside)
4469             RaiseIfFailed("MakeThickSolid", self.PrimOp)
4470             anObj.SetParameters(Parameters)
4471             self._autoPublish(anObj, theName, "thickSolid")
4472             return anObj
4473
4474
4475         ## Modifies a shape to make it a thick solid. If the input is a surface
4476         #  shape (face or shell) the result is a thick solid. If an input shape
4477         #  is a solid the result is a hollowed solid with removed faces.
4478         #  @param theShape Face or Shell to get thick solid or solid to get
4479         #         hollowed solid.
4480         #  @param theThickness Thickness of the resulting solid
4481         #  @param theFacesIDs the list of face IDs to be removed from the
4482         #         result. It is ignored if \a theShape is a face or a shell.
4483         #         It is empty by default. 
4484         #  @param theInside If true the thickness is applied towards inside
4485         #
4486         #  @return The modified shape
4487         #
4488         #  @ref tui_creation_thickness "Example"
4489         @ManageTransactions("PrimOp")
4490         def Thicken(self, theShape, theThickness, theFacesIDs=[], theInside=False):
4491             """
4492             Modifies a shape to make it a thick solid. If the input is a
4493             surface shape (face or shell) the result is a thick solid. If
4494             an input shape is a solid the result is a hollowed solid with
4495             removed faces.
4496
4497             Parameters:
4498                 theShape Face or Shell to get thick solid or solid to get
4499                          hollowed solid.
4500                 theThickness Thickness of the resulting solid
4501                 theFacesIDs the list of face IDs to be removed from the
4502                          result. It is ignored if \a theShape is a face or
4503                          a shell. It is empty by default. 
4504                 theInside If true the thickness is applied towards inside
4505
4506             Returns:
4507                 The modified shape
4508             """
4509             # Example: see GEOM_TestAll.py
4510             theThickness,Parameters = ParseParameters(theThickness)
4511             anObj = self.PrimOp.MakeThickening(theShape, theFacesIDs,
4512                                                theThickness, False, theInside)
4513             RaiseIfFailed("Thicken", self.PrimOp)
4514             anObj.SetParameters(Parameters)
4515             return anObj
4516
4517         ## Build a middle path of a pipe-like shape.
4518         #  The path shape can be a wire or an edge.
4519         #  @param theShape It can be closed or unclosed pipe-like shell
4520         #                  or a pipe-like solid.
4521         #  @param theBase1, theBase2 Two bases of the supposed pipe. This
4522         #                            should be wires or faces of theShape.
4523         #  @param theName Object name; when specified, this parameter is used
4524         #         for result publication in the study. Otherwise, if automatic
4525         #         publication is switched on, default value is used for result name.
4526         #
4527         #  @note It is not assumed that exact or approximate copy of theShape
4528         #        can be obtained by applying existing Pipe operation on the
4529         #        resulting "Path" wire taking theBase1 as the base - it is not
4530         #        always possible; though in some particular cases it might work
4531         #        it is not guaranteed. Thus, RestorePath function should not be
4532         #        considered as an exact reverse operation of the Pipe.
4533         #
4534         #  @return New GEOM.GEOM_Object, containing an edge or wire that represent
4535         #                                source pipe's "path".
4536         #
4537         #  @ref tui_creation_pipe_path "Example"
4538         @ManageTransactions("PrimOp")
4539         def RestorePath (self, theShape, theBase1, theBase2, theName=None):
4540             """
4541             Build a middle path of a pipe-like shape.
4542             The path shape can be a wire or an edge.
4543
4544             Parameters:
4545                 theShape It can be closed or unclosed pipe-like shell
4546                          or a pipe-like solid.
4547                 theBase1, theBase2 Two bases of the supposed pipe. This
4548                                    should be wires or faces of theShape.
4549                 theName Object name; when specified, this parameter is used
4550                         for result publication in the study. Otherwise, if automatic
4551                         publication is switched on, default value is used for result name.
4552
4553             Returns:
4554                 New GEOM_Object, containing an edge or wire that represent
4555                                  source pipe's path.
4556             """
4557             anObj = self.PrimOp.RestorePath(theShape, theBase1, theBase2)
4558             RaiseIfFailed("RestorePath", self.PrimOp)
4559             self._autoPublish(anObj, theName, "path")
4560             return anObj
4561
4562         ## Build a middle path of a pipe-like shape.
4563         #  The path shape can be a wire or an edge.
4564         #  @param theShape It can be closed or unclosed pipe-like shell
4565         #                  or a pipe-like solid.
4566         #  @param listEdges1, listEdges2 Two bases of the supposed pipe. This
4567         #                                should be lists of edges of theShape.
4568         #  @param theName Object name; when specified, this parameter is used
4569         #         for result publication in the study. Otherwise, if automatic
4570         #         publication is switched on, default value is used for result name.
4571         #
4572         #  @note It is not assumed that exact or approximate copy of theShape
4573         #        can be obtained by applying existing Pipe operation on the
4574         #        resulting "Path" wire taking theBase1 as the base - it is not
4575         #        always possible; though in some particular cases it might work
4576         #        it is not guaranteed. Thus, RestorePath function should not be
4577         #        considered as an exact reverse operation of the Pipe.
4578         #
4579         #  @return New GEOM.GEOM_Object, containing an edge or wire that represent
4580         #                                source pipe's "path".
4581         #
4582         #  @ref tui_creation_pipe_path "Example"
4583         @ManageTransactions("PrimOp")
4584         def RestorePathEdges (self, theShape, listEdges1, listEdges2, theName=None):
4585             """
4586             Build a middle path of a pipe-like shape.
4587             The path shape can be a wire or an edge.
4588
4589             Parameters:
4590                 theShape It can be closed or unclosed pipe-like shell
4591                          or a pipe-like solid.
4592                 listEdges1, listEdges2 Two bases of the supposed pipe. This
4593                                        should be lists of edges of theShape.
4594                 theName Object name; when specified, this parameter is used
4595                         for result publication in the study. Otherwise, if automatic
4596                         publication is switched on, default value is used for result name.
4597
4598             Returns:
4599                 New GEOM_Object, containing an edge or wire that represent
4600                                  source pipe's path.
4601             """
4602             anObj = self.PrimOp.RestorePathEdges(theShape, listEdges1, listEdges2)
4603             RaiseIfFailed("RestorePath", self.PrimOp)
4604             self._autoPublish(anObj, theName, "path")
4605             return anObj
4606
4607         # end of l3_complex
4608         ## @}
4609
4610         ## @addtogroup l3_basic_go
4611         ## @{
4612
4613         ## Create a linear edge with specified ends.
4614         #  @param thePnt1 Point for the first end of edge.
4615         #  @param thePnt2 Point for the second end of edge.
4616         #  @param theName Object name; when specified, this parameter is used
4617         #         for result publication in the study. Otherwise, if automatic
4618         #         publication is switched on, default value is used for result name.
4619         #
4620         #  @return New GEOM.GEOM_Object, containing the created edge.
4621         #
4622         #  @ref tui_creation_edge "Example"
4623         @ManageTransactions("ShapesOp")
4624         def MakeEdge(self, thePnt1, thePnt2, theName=None):
4625             """
4626             Create a linear edge with specified ends.
4627
4628             Parameters:
4629                 thePnt1 Point for the first end of edge.
4630                 thePnt2 Point for the second end of edge.
4631                 theName Object name; when specified, this parameter is used
4632                         for result publication in the study. Otherwise, if automatic
4633                         publication is switched on, default value is used for result name.
4634
4635             Returns:
4636                 New GEOM.GEOM_Object, containing the created edge.
4637             """
4638             # Example: see GEOM_TestAll.py
4639             anObj = self.ShapesOp.MakeEdge(thePnt1, thePnt2)
4640             RaiseIfFailed("MakeEdge", self.ShapesOp)
4641             self._autoPublish(anObj, theName, "edge")
4642             return anObj
4643
4644         ## Create a new edge, corresponding to the given length on the given curve.
4645         #  @param theRefCurve The referenced curve (edge).
4646         #  @param theLength Length on the referenced curve. It can be negative.
4647         #  @param theStartPoint Any point can be selected for it, the new edge will begin
4648         #                       at the end of \a theRefCurve, close to the selected point.
4649         #                       If None, start from the first point of \a theRefCurve.
4650         #  @param theName Object name; when specified, this parameter is used
4651         #         for result publication in the study. Otherwise, if automatic
4652         #         publication is switched on, default value is used for result name.
4653         #
4654         #  @return New GEOM.GEOM_Object, containing the created edge.
4655         #
4656         #  @ref tui_creation_edge "Example"
4657         @ManageTransactions("ShapesOp")
4658         def MakeEdgeOnCurveByLength(self, theRefCurve, theLength, theStartPoint = None, theName=None):
4659             """
4660             Create a new edge, corresponding to the given length on the given curve.
4661
4662             Parameters:
4663                 theRefCurve The referenced curve (edge).
4664                 theLength Length on the referenced curve. It can be negative.
4665                 theStartPoint Any point can be selected for it, the new edge will begin
4666                               at the end of theRefCurve, close to the selected point.
4667                               If None, start from the first point of theRefCurve.
4668                 theName Object name; when specified, this parameter is used
4669                         for result publication in the study. Otherwise, if automatic
4670                         publication is switched on, default value is used for result name.
4671
4672             Returns:
4673                 New GEOM.GEOM_Object, containing the created edge.
4674             """
4675             # Example: see GEOM_TestAll.py
4676             theLength, Parameters = ParseParameters(theLength)
4677             anObj = self.ShapesOp.MakeEdgeOnCurveByLength(theRefCurve, theLength, theStartPoint)
4678             RaiseIfFailed("MakeEdgeOnCurveByLength", self.ShapesOp)
4679             anObj.SetParameters(Parameters)
4680             self._autoPublish(anObj, theName, "edge")
4681             return anObj
4682
4683         ## Create an edge from specified wire.
4684         #  @param theWire source Wire
4685         #  @param theLinearTolerance linear tolerance value (default = 1e-07)
4686         #  @param theAngularTolerance angular tolerance value (default = 1e-12)
4687         #  @param theName Object name; when specified, this parameter is used
4688         #         for result publication in the study. Otherwise, if automatic
4689         #         publication is switched on, default value is used for result name.
4690         #
4691         #  @return New GEOM.GEOM_Object, containing the created edge.
4692         #
4693         #  @ref tui_creation_edge "Example"
4694         @ManageTransactions("ShapesOp")
4695         def MakeEdgeWire(self, theWire, theLinearTolerance = 1e-07, theAngularTolerance = 1e-12, theName=None):
4696             """
4697             Create an edge from specified wire.
4698
4699             Parameters:
4700                 theWire source Wire
4701                 theLinearTolerance linear tolerance value (default = 1e-07)
4702                 theAngularTolerance angular tolerance value (default = 1e-12)
4703                 theName Object name; when specified, this parameter is used
4704                         for result publication in the study. Otherwise, if automatic
4705                         publication is switched on, default value is used for result name.
4706
4707             Returns:
4708                 New GEOM.GEOM_Object, containing the created edge.
4709             """
4710             # Example: see GEOM_TestAll.py
4711             anObj = self.ShapesOp.MakeEdgeWire(theWire, theLinearTolerance, theAngularTolerance)
4712             RaiseIfFailed("MakeEdgeWire", self.ShapesOp)
4713             self._autoPublish(anObj, theName, "edge")
4714             return anObj
4715
4716         ## Create a wire from the set of edges and wires.
4717         #  @param theEdgesAndWires List of edges and/or wires.
4718         #  @param theTolerance Maximum distance between vertices, that will be merged.
4719         #                      Values less than 1e-07 are equivalent to 1e-07 (Precision::Confusion())
4720         #  @param theName Object name; when specified, this parameter is used
4721         #         for result publication in the study. Otherwise, if automatic
4722         #         publication is switched on, default value is used for result name.
4723         #
4724         #  @return New GEOM.GEOM_Object, containing the created wire.
4725         #
4726         #  @ref tui_creation_wire "Example"
4727         @ManageTransactions("ShapesOp")
4728         def MakeWire(self, theEdgesAndWires, theTolerance = 1e-07, theName=None):
4729             """
4730             Create a wire from the set of edges and wires.
4731
4732             Parameters:
4733                 theEdgesAndWires List of edges and/or wires.
4734                 theTolerance Maximum distance between vertices, that will be merged.
4735                              Values less than 1e-07 are equivalent to 1e-07 (Precision::Confusion()).
4736                 theName Object name; when specified, this parameter is used
4737                         for result publication in the study. Otherwise, if automatic
4738                         publication is switched on, default value is used for result name.
4739
4740             Returns:
4741                 New GEOM.GEOM_Object, containing the created wire.
4742             """
4743             # Example: see GEOM_TestAll.py
4744             anObj = self.ShapesOp.MakeWire(theEdgesAndWires, theTolerance)
4745             RaiseIfFailed("MakeWire", self.ShapesOp)
4746             self._autoPublish(anObj, theName, "wire")
4747             return anObj
4748
4749         ## Create a face on the given wire.
4750         #  @param theWire closed Wire or Edge to build the face on.
4751         #  @param isPlanarWanted If TRUE, the algorithm tries to build a planar face.
4752         #                        If the tolerance of the obtained planar face is less
4753         #                        than 1e-06, this face will be returned, otherwise the
4754         #                        algorithm tries to build any suitable face on the given
4755         #                        wire and prints a warning message.
4756         #  @param theName Object name; when specified, this parameter is used
4757         #         for result publication in the study. Otherwise, if automatic
4758         #         publication is switched on, default value is used for result name.
4759         #
4760         #  @return New GEOM.GEOM_Object, containing the created face (compound of faces).
4761         #
4762         #  @ref tui_creation_face "Example"
4763         @ManageTransactions("ShapesOp")
4764         def MakeFace(self, theWire, isPlanarWanted, theName=None):
4765             """
4766             Create a face on the given wire.
4767
4768             Parameters:
4769                 theWire closed Wire or Edge to build the face on.
4770                 isPlanarWanted If TRUE, the algorithm tries to build a planar face.
4771                                If the tolerance of the obtained planar face is less
4772                                than 1e-06, this face will be returned, otherwise the
4773                                algorithm tries to build any suitable face on the given
4774                                wire and prints a warning message.
4775                 theName Object name; when specified, this parameter is used
4776                         for result publication in the study. Otherwise, if automatic
4777                         publication is switched on, default value is used for result name.
4778
4779             Returns:
4780                 New GEOM.GEOM_Object, containing the created face (compound of faces).
4781             """
4782             # Example: see GEOM_TestAll.py
4783             anObj = self.ShapesOp.MakeFace(theWire, isPlanarWanted)
4784             if isPlanarWanted and anObj is not None and self.ShapesOp.GetErrorCode() == "MAKE_FACE_TOLERANCE_TOO_BIG":
4785                 print("WARNING: Cannot build a planar face: required tolerance is too big. Non-planar face is built.")
4786             else:
4787                 RaiseIfFailed("MakeFace", self.ShapesOp)
4788             self._autoPublish(anObj, theName, "face")
4789             return anObj
4790
4791         ## Create a face on the given wires set.
4792         #  @param theWires List of closed wires or edges to build the face on.
4793         #  @param isPlanarWanted If TRUE, the algorithm tries to build a planar face.
4794         #                        If the tolerance of the obtained planar face is less
4795         #                        than 1e-06, this face will be returned, otherwise the
4796         #                        algorithm tries to build any suitable face on the given
4797         #                        wire and prints a warning message.
4798         #  @param theName Object name; when specified, this parameter is used
4799         #         for result publication in the study. Otherwise, if automatic
4800         #         publication is switched on, default value is used for result name.
4801         #
4802         #  @return New GEOM.GEOM_Object, containing the created face (compound of faces).
4803         #
4804         #  @ref tui_creation_face "Example"
4805         @ManageTransactions("ShapesOp")
4806         def MakeFaceWires(self, theWires, isPlanarWanted, theName=None):
4807             """
4808             Create a face on the given wires set.
4809
4810             Parameters:
4811                 theWires List of closed wires or edges to build the face on.
4812                 isPlanarWanted If TRUE, the algorithm tries to build a planar face.
4813                                If the tolerance of the obtained planar face is less
4814                                than 1e-06, this face will be returned, otherwise the
4815                                algorithm tries to build any suitable face on the given
4816                                wire and prints a warning message.
4817                 theName Object name; when specified, this parameter is used
4818                         for result publication in the study. Otherwise, if automatic
4819                         publication is switched on, default value is used for result name.
4820
4821             Returns:
4822                 New GEOM.GEOM_Object, containing the created face (compound of faces).
4823             """
4824             # Example: see GEOM_TestAll.py
4825             anObj = self.ShapesOp.MakeFaceWires(ToList(theWires), isPlanarWanted)
4826             if isPlanarWanted and anObj is not None and self.ShapesOp.GetErrorCode() == "MAKE_FACE_TOLERANCE_TOO_BIG":
4827                 print("WARNING: Cannot build a planar face: required tolerance is too big. Non-planar face is built.")
4828             else:
4829                 RaiseIfFailed("MakeFaceWires", self.ShapesOp)
4830             self._autoPublish(anObj, theName, "face")
4831             return anObj
4832
4833         ## See MakeFaceWires() method for details.
4834         #
4835         #  @ref tui_creation_face "Example 1"
4836         #  \n @ref swig_MakeFaces  "Example 2"
4837         def MakeFaces(self, theWires, isPlanarWanted, theName=None):
4838             """
4839             See geompy.MakeFaceWires() method for details.
4840             """
4841             # Example: see GEOM_TestOthers.py
4842             # note: auto-publishing is done in self.MakeFaceWires()
4843             anObj = self.MakeFaceWires(theWires, isPlanarWanted, theName)
4844             return anObj
4845
4846         ## Create a face based on a surface from given face bounded
4847         #  by given wire.
4848         #  @param theFace the face whose surface is used to create a new face.
4849         #  @param theWire the wire that will bound a new face.
4850         #  @param theName Object name; when specified, this parameter is used
4851         #         for result publication in the study. Otherwise, if automatic
4852         #         publication is switched on, default value is used for result name.
4853         #
4854         #  @return New GEOM.GEOM_Object, containing the created face.
4855         #
4856         #  @ref tui_creation_face "Example"
4857         @ManageTransactions("ShapesOp")
4858         def MakeFaceFromSurface(self, theFace, theWire, theName=None):
4859             """
4860             Create a face based on a surface from given face bounded
4861             by given wire.
4862
4863             Parameters:
4864                 theFace the face whose surface is used to create a new face.
4865                 theWire the wire that will bound a new face.
4866                 theName Object name; when specified, this parameter is used
4867                         for result publication in the study. Otherwise, if automatic
4868                         publication is switched on, default value is used for result name.
4869
4870             Returns:
4871                 New GEOM.GEOM_Object, containing the created face.
4872             """
4873             # Example: see GEOM_TestAll.py
4874             anObj = self.ShapesOp.MakeFaceFromSurface(theFace, theWire)
4875             RaiseIfFailed("MakeFaceFromSurface", self.ShapesOp)
4876             self._autoPublish(anObj, theName, "face")
4877             return anObj
4878           
4879         ## Create a face from a set of edges with the given constraints.
4880         #  @param theConstraints List of edges and constraint faces (as a sequence of a Edge + Face couples):
4881         #         - edges should form a closed wire;
4882         #         - for each edge, constraint face is optional: if a constraint face is missing
4883         #           for some edge, this means that there no constraint associated with this edge.
4884         #  @param theName Object name; when specified, this parameter is used
4885         #         for result publication in the study. Otherwise, if automatic
4886         #         publication is switched on, default value is used for result name.
4887         # 
4888         # @return New GEOM.GEOM_Object, containing the created face.
4889         # 
4890         # @ref tui_creation_face "Example"
4891         @ManageTransactions("ShapesOp")
4892         def MakeFaceWithConstraints(self, theConstraints, theName=None):
4893             """
4894             Create a face from a set of edges with the given constraints.
4895
4896             Parameters:
4897                 theConstraints List of edges and constraint faces (as a sequence of a Edge + Face couples):
4898                         - edges should form a closed wire;
4899                         - for each edge, constraint face is optional: if a constraint face is missing
4900                           for some edge, this means that there no constraint associated with this edge.
4901                 theName Object name; when specified, this parameter is used
4902                         for result publication in the study. Otherwise, if automatic
4903                         publication is switched on, default value is used for result name.
4904
4905             Returns:
4906                 New GEOM.GEOM_Object, containing the created face.
4907             """
4908             # Example: see GEOM_TestAll.py
4909             anObj = self.ShapesOp.MakeFaceWithConstraints(theConstraints)
4910             if anObj is None:
4911                 RaiseIfFailed("MakeFaceWithConstraints", self.ShapesOp)
4912             self._autoPublish(anObj, theName, "face")
4913             return anObj
4914
4915         ## Create a shell from the set of faces, shells and/or compounds of faces.
4916         #  @param theFacesAndShells List of faces, shells and/or compounds of faces.
4917         #  @param theName Object name; when specified, this parameter is used
4918         #         for result publication in the study. Otherwise, if automatic
4919         #         publication is switched on, default value is used for result name.
4920         #
4921         #  @return New GEOM.GEOM_Object, containing the created shell (compound of shells).
4922         #
4923         #  @ref tui_creation_shell "Example"
4924         @ManageTransactions("ShapesOp")
4925         def MakeShell(self, theFacesAndShells, theName=None):
4926             """
4927             Create a shell from the set of faces and shells.
4928
4929             Parameters:
4930                 theFacesAndShells List of faces and/or shells.
4931                 theName Object name; when specified, this parameter is used
4932                         for result publication in the study. Otherwise, if automatic
4933                         publication is switched on, default value is used for result name.
4934
4935             Returns:
4936                 New GEOM.GEOM_Object, containing the created shell (compound of shells).
4937             """
4938             # Example: see GEOM_TestAll.py
4939             anObj = self.ShapesOp.MakeShell( ToList( theFacesAndShells ))
4940             RaiseIfFailed("MakeShell", self.ShapesOp)
4941             self._autoPublish(anObj, theName, "shell")
4942             return anObj
4943
4944         ## Create a solid, bounded by the given shells.
4945         #  @param theShells Sequence of bounding shells.
4946         #  @param theName Object name; when specified, this parameter is used
4947         #         for result publication in the study. Otherwise, if automatic
4948         #         publication is switched on, default value is used for result name.
4949         #
4950         #  @return New GEOM.GEOM_Object, containing the created solid.
4951         #
4952         #  @ref tui_creation_solid "Example"
4953         @ManageTransactions("ShapesOp")
4954         def MakeSolid(self, theShells, theName=None):
4955             """
4956             Create a solid, bounded by the given shells.
4957
4958             Parameters:
4959                 theShells Sequence of bounding shells.
4960                 theName Object name; when specified, this parameter is used
4961                         for result publication in the study. Otherwise, if automatic
4962                         publication is switched on, default value is used for result name.
4963
4964             Returns:
4965                 New GEOM.GEOM_Object, containing the created solid.
4966             """
4967             # Example: see GEOM_TestAll.py
4968             theShells = ToList(theShells)
4969             if len(theShells) == 1:
4970                 descr = self._IsGoodForSolid(theShells[0])
4971                 #if len(descr) > 0:
4972                 #    raise RuntimeError, "MakeSolidShells : " + descr
4973                 if descr == "WRN_SHAPE_UNCLOSED":
4974                     raise RuntimeError("MakeSolidShells : Unable to create solid from unclosed shape")
4975             anObj = self.ShapesOp.MakeSolidShells(theShells)
4976             RaiseIfFailed("MakeSolidShells", self.ShapesOp)
4977             self._autoPublish(anObj, theName, "solid")
4978             return anObj
4979
4980         ## Create a compound of the given shapes.
4981         #  @param theShapes List of shapes to put in compound.
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 compound.
4987         #
4988         #  @ref tui_creation_compound "Example"
4989         @ManageTransactions("ShapesOp")
4990         def MakeCompound(self, theShapes, theName=None):
4991             """
4992             Create a compound of the given shapes.
4993
4994             Parameters:
4995                 theShapes List of shapes to put in compound.
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 compound.
5002             """
5003             # Example: see GEOM_TestAll.py
5004             anObj = self.ShapesOp.MakeCompound(ToList(theShapes))
5005             RaiseIfFailed("MakeCompound", self.ShapesOp)
5006             self._autoPublish(anObj, theName, "compound")
5007             return anObj
5008         
5009         ## Create a solid (or solids) from the set of faces and/or shells.
5010         #  @param theFacesOrShells List of faces and/or shells.
5011         #  @param isIntersect If TRUE, forces performing intersections
5012         #         between arguments; otherwise (default) intersection is not performed.
5013         #  @param theName Object name; when specified, this parameter is used
5014         #         for result publication in the study. Otherwise, if automatic
5015         #         publication is switched on, default value is used for result name.
5016         #
5017         #  @return New GEOM.GEOM_Object, containing the created solid (or compound of solids).
5018         #
5019         #  @ref tui_creation_solid_from_faces "Example"
5020         @ManageTransactions("ShapesOp")
5021         def MakeSolidFromConnectedFaces(self, theFacesOrShells, isIntersect = False, theName=None):
5022             """
5023             Create a solid (or solids) from the set of connected faces and/or shells.
5024
5025             Parameters:
5026                 theFacesOrShells List of faces and/or shells.
5027                 isIntersect If TRUE, forces performing intersections
5028                         between arguments; otherwise (default) intersection is not performed
5029                 theName Object name; when specified, this parameter is used.
5030                         for result publication in the study. Otherwise, if automatic
5031                         publication is switched on, default value is used for result name.
5032
5033             Returns:
5034                 New GEOM.GEOM_Object, containing the created solid (or compound of solids).
5035             """
5036             # Example: see GEOM_TestAll.py
5037             anObj = self.ShapesOp.MakeSolidFromConnectedFaces(theFacesOrShells, isIntersect)
5038             RaiseIfFailed("MakeSolidFromConnectedFaces", self.ShapesOp)
5039             self._autoPublish(anObj, theName, "solid")
5040             return anObj
5041
5042         # end of l3_basic_go
5043         ## @}
5044
5045         ## @addtogroup l2_measure
5046         ## @{
5047
5048         ## Gives quantity of faces in the given shape.
5049         #  @param theShape Shape to count faces of.
5050         #  @return Quantity of faces.
5051         #
5052         #  @ref swig_NumberOf "Example"
5053         @ManageTransactions("ShapesOp")
5054         def NumberOfFaces(self, theShape):
5055             """
5056             Gives quantity of faces in the given shape.
5057
5058             Parameters:
5059                 theShape Shape to count faces of.
5060
5061             Returns:
5062                 Quantity of faces.
5063             """
5064             # Example: see GEOM_TestOthers.py
5065             nb_faces = self.ShapesOp.NumberOfFaces(theShape)
5066             RaiseIfFailed("NumberOfFaces", self.ShapesOp)
5067             return nb_faces
5068
5069         ## Gives quantity of edges in the given shape.
5070         #  @param theShape Shape to count edges of.
5071         #  @return Quantity of edges.
5072         #
5073         #  @ref swig_NumberOf "Example"
5074         @ManageTransactions("ShapesOp")
5075         def NumberOfEdges(self, theShape):
5076             """
5077             Gives quantity of edges in the given shape.
5078
5079             Parameters:
5080                 theShape Shape to count edges of.
5081
5082             Returns:
5083                 Quantity of edges.
5084             """
5085             # Example: see GEOM_TestOthers.py
5086             nb_edges = self.ShapesOp.NumberOfEdges(theShape)
5087             RaiseIfFailed("NumberOfEdges", self.ShapesOp)
5088             return nb_edges
5089
5090         ## Gives quantity of sub-shapes of type theShapeType in the given shape.
5091         #  @param theShape Shape to count sub-shapes of.
5092         #  @param theShapeType Type of sub-shapes to count (see ShapeType())
5093         #  @return Quantity of sub-shapes of given type.
5094         #
5095         #  @ref swig_NumberOf "Example"
5096         @ManageTransactions("ShapesOp")
5097         def NumberOfSubShapes(self, theShape, theShapeType):
5098             """
5099             Gives quantity of sub-shapes of type theShapeType in the given shape.
5100
5101             Parameters:
5102                 theShape Shape to count sub-shapes of.
5103                 theShapeType Type of sub-shapes to count (see geompy.ShapeType)
5104
5105             Returns:
5106                 Quantity of sub-shapes of given type.
5107             """
5108             # Example: see GEOM_TestOthers.py
5109             nb_ss = self.ShapesOp.NumberOfSubShapes(theShape, theShapeType)
5110             RaiseIfFailed("NumberOfSubShapes", self.ShapesOp)
5111             return nb_ss
5112
5113         ## Gives quantity of solids in the given shape.
5114         #  @param theShape Shape to count solids in.
5115         #  @return Quantity of solids.
5116         #
5117         #  @ref swig_NumberOf "Example"
5118         @ManageTransactions("ShapesOp")
5119         def NumberOfSolids(self, theShape):
5120             """
5121             Gives quantity of solids in the given shape.
5122
5123             Parameters:
5124                 theShape Shape to count solids in.
5125
5126             Returns:
5127                 Quantity of solids.
5128             """
5129             # Example: see GEOM_TestOthers.py
5130             nb_solids = self.ShapesOp.NumberOfSubShapes(theShape, self.ShapeType["SOLID"])
5131             RaiseIfFailed("NumberOfSolids", self.ShapesOp)
5132             return nb_solids
5133
5134         # end of l2_measure
5135         ## @}
5136
5137         ## @addtogroup l3_healing
5138         ## @{
5139
5140         ## Reverses an orientation the given shape.
5141         #  @param theShape Shape to be reversed.
5142         #  @param theName Object name; when specified, this parameter is used
5143         #         for result publication in the study. Otherwise, if automatic
5144         #         publication is switched on, default value is used for result name.
5145         #
5146         #  @return The reversed copy of theShape.
5147         #
5148         #  @ref swig_ChangeOrientation "Example"
5149         @ManageTransactions("ShapesOp")
5150         def ChangeOrientation(self, theShape, theName=None):
5151             """
5152             Reverses an orientation the given shape.
5153
5154             Parameters:
5155                 theShape Shape to be reversed.
5156                 theName Object name; when specified, this parameter is used
5157                         for result publication in the study. Otherwise, if automatic
5158                         publication is switched on, default value is used for result name.
5159
5160             Returns:
5161                 The reversed copy of theShape.
5162             """
5163             # Example: see GEOM_TestAll.py
5164             anObj = self.ShapesOp.ChangeOrientation(theShape)
5165             RaiseIfFailed("ChangeOrientation", self.ShapesOp)
5166             self._autoPublish(anObj, theName, "reversed")
5167             return anObj
5168
5169         ## See ChangeOrientation() method for details.
5170         #
5171         #  @ref swig_OrientationChange "Example"
5172         def OrientationChange(self, theShape, theName=None):
5173             """
5174             See geompy.ChangeOrientation method for details.
5175             """
5176             # Example: see GEOM_TestOthers.py
5177             # note: auto-publishing is done in self.ChangeOrientation()
5178             anObj = self.ChangeOrientation(theShape, theName)
5179             return anObj
5180
5181         # end of l3_healing
5182         ## @}
5183
5184         ## @addtogroup l4_obtain
5185         ## @{
5186
5187         ## Retrieve all free faces from the given shape.
5188         #  Free face is a face, which is not shared between two shells of the shape.
5189         #  @param theShape Shape to find free faces in.
5190         #  @return List of IDs of all free faces, contained in theShape.
5191         #
5192         #  @ref tui_free_faces_page "Example"
5193         @ManageTransactions("ShapesOp")
5194         def GetFreeFacesIDs(self,theShape):
5195             """
5196             Retrieve all free faces from the given shape.
5197             Free face is a face, which is not shared between two shells of the shape.
5198
5199             Parameters:
5200                 theShape Shape to find free faces in.
5201
5202             Returns:
5203                 List of IDs of all free faces, contained in theShape.
5204             """
5205             # Example: see GEOM_TestOthers.py
5206             anIDs = self.ShapesOp.GetFreeFacesIDs(theShape)
5207             RaiseIfFailed("GetFreeFacesIDs", self.ShapesOp)
5208             return anIDs
5209
5210         ## Get all sub-shapes of theShape1 of the given type, shared with theShape2.
5211         #  @param theShape1 Shape to find sub-shapes in.
5212         #  @param theShape2 Shape to find shared sub-shapes with.
5213         #  @param theShapeType Type of sub-shapes to be retrieved.
5214         #  @param theName Object name; when specified, this parameter is used
5215         #         for result publication in the study. Otherwise, if automatic
5216         #         publication is switched on, default value is used for result name.
5217         #
5218         #  @return List of sub-shapes of theShape1, shared with theShape2.
5219         #
5220         #  @ref swig_GetSharedShapes "Example"
5221         @ManageTransactions("ShapesOp")
5222         def GetSharedShapes(self, theShape1, theShape2, theShapeType, theName=None):
5223             """
5224             Get all sub-shapes of theShape1 of the given type, shared with theShape2.
5225
5226             Parameters:
5227                 theShape1 Shape to find sub-shapes in.
5228                 theShape2 Shape to find shared sub-shapes with.
5229                 theShapeType Type of sub-shapes to be retrieved.
5230                 theName Object name; when specified, this parameter is used
5231                         for result publication in the study. Otherwise, if automatic
5232                         publication is switched on, default value is used for result name.
5233
5234             Returns:
5235                 List of sub-shapes of theShape1, shared with theShape2.
5236             """
5237             # Example: see GEOM_TestOthers.py
5238             aList = self.ShapesOp.GetSharedShapes(theShape1, theShape2, theShapeType)
5239             RaiseIfFailed("GetSharedShapes", self.ShapesOp)
5240             self._autoPublish(aList, theName, "shared")
5241             return aList
5242
5243         ## Get sub-shapes, shared by input shapes.
5244         #  @param theShapes Either a list or compound of shapes to find common sub-shapes of.
5245         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType()).
5246         #  @param theMultiShare Specifies what type of shares should be checked:
5247         #         - @c True (default): search sub-shapes from 1st input shape shared with all other input shapes;
5248         #         - @c False: causes to search sub-shapes shared between couples of input shapes.
5249         #  @param theName Object name; when specified, this parameter is used
5250         #         for result publication in the study. Otherwise, if automatic
5251         #         publication is switched on, default value is used for result name.
5252         #
5253         #  @note If @a theShapes contains single compound, the shares between all possible couples of 
5254         #        its top-level shapes are returned; otherwise, only shares between 1st input shape
5255         #        and all rest input shapes are returned.
5256         #
5257         #  @return List of all found sub-shapes.
5258         #
5259         #  Examples:
5260         #  - @ref tui_shared_shapes "Example 1"
5261         #  - @ref swig_GetSharedShapes "Example 2"
5262         @ManageTransactions("ShapesOp")
5263         def GetSharedShapesMulti(self, theShapes, theShapeType, theMultiShare=True, theName=None):
5264             """
5265             Get sub-shapes, shared by input shapes.
5266
5267             Parameters:
5268                 theShapes Either a list or compound of shapes to find common sub-shapes of.
5269                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType).
5270                 theMultiShare Specifies what type of shares should be checked:
5271                   - True (default): search sub-shapes from 1st input shape shared with all other input shapes;
5272                   - False: causes to search sub-shapes shared between couples of input shapes.
5273                 theName Object name; when specified, this parameter is used
5274                         for result publication in the study. Otherwise, if automatic
5275                         publication is switched on, default value is used for result name.
5276
5277             Note: if theShapes contains single compound, the shares between all possible couples of 
5278                   its top-level shapes are returned; otherwise, only shares between 1st input shape
5279                   and all rest input shapes are returned.
5280
5281             Returns:
5282                 List of all found sub-shapes.
5283             """
5284             # Example: see GEOM_TestOthers.py
5285             aList = self.ShapesOp.GetSharedShapesMulti(ToList(theShapes), theShapeType, theMultiShare)
5286             RaiseIfFailed("GetSharedShapesMulti", self.ShapesOp)
5287             self._autoPublish(aList, theName, "shared")
5288             return aList
5289
5290         ## Find in <VAR>theShape</VAR> all sub-shapes of type <VAR>theShapeType</VAR>,
5291         #  situated relatively the specified plane by the certain way,
5292         #  defined through <VAR>theState</VAR> parameter.
5293         #  @param theShape Shape to find sub-shapes of.
5294         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5295         #  @param theAx1 Vector (or line, or linear edge), specifying normal
5296         #                direction and location of the plane to find shapes on.
5297         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5298         #  @param theName Object name; when specified, this parameter is used
5299         #         for result publication in the study. Otherwise, if automatic
5300         #         publication is switched on, default value is used for result name.
5301         #
5302         #  @return List of all found sub-shapes.
5303         #
5304         #  @ref swig_GetShapesOnPlane "Example"
5305         @ManageTransactions("ShapesOp")
5306         def GetShapesOnPlane(self, theShape, theShapeType, theAx1, theState, theName=None):
5307             """
5308             Find in theShape all sub-shapes of type theShapeType,
5309             situated relatively the specified plane by the certain way,
5310             defined through theState parameter.
5311
5312             Parameters:
5313                 theShape Shape to find sub-shapes of.
5314                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5315                 theAx1 Vector (or line, or linear edge), specifying normal
5316                        direction and location of the plane to find shapes on.
5317                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5318                 theName Object name; when specified, this parameter is used
5319                         for result publication in the study. Otherwise, if automatic
5320                         publication is switched on, default value is used for result name.
5321
5322             Returns:
5323                 List of all found sub-shapes.
5324             """
5325             # Example: see GEOM_TestOthers.py
5326             aList = self.ShapesOp.GetShapesOnPlane(theShape, theShapeType, theAx1, theState)
5327             RaiseIfFailed("GetShapesOnPlane", self.ShapesOp)
5328             self._autoPublish(aList, theName, "shapeOnPlane")
5329             return aList
5330
5331         ## Find in <VAR>theShape</VAR> all sub-shapes of type <VAR>theShapeType</VAR>,
5332         #  situated relatively the specified plane by the certain way,
5333         #  defined through <VAR>theState</VAR> parameter.
5334         #  @param theShape Shape to find sub-shapes of.
5335         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5336         #  @param theAx1 Vector (or line, or linear edge), specifying normal
5337         #                direction and location of the plane to find shapes on.
5338         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5339         #
5340         #  @return List of all found sub-shapes indices.
5341         #
5342         #  @ref swig_GetShapesOnPlaneIDs "Example"
5343         @ManageTransactions("ShapesOp")
5344         def GetShapesOnPlaneIDs(self, theShape, theShapeType, theAx1, theState):
5345             """
5346             Find in theShape all sub-shapes of type theShapeType,
5347             situated relatively the specified plane by the certain way,
5348             defined through theState parameter.
5349
5350             Parameters:
5351                 theShape Shape to find sub-shapes of.
5352                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5353                 theAx1 Vector (or line, or linear edge), specifying normal
5354                        direction and location of the plane to find shapes on.
5355                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5356
5357             Returns:
5358                 List of all found sub-shapes indices.
5359             """
5360             # Example: see GEOM_TestOthers.py
5361             aList = self.ShapesOp.GetShapesOnPlaneIDs(theShape, theShapeType, theAx1, theState)
5362             RaiseIfFailed("GetShapesOnPlaneIDs", self.ShapesOp)
5363             return aList
5364
5365         ## Find in <VAR>theShape</VAR> all sub-shapes of type <VAR>theShapeType</VAR>,
5366         #  situated relatively the specified plane by the certain way,
5367         #  defined through <VAR>theState</VAR> parameter.
5368         #  @param theShape Shape to find sub-shapes of.
5369         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5370         #  @param theAx1 Vector (or line, or linear edge), specifying normal
5371         #                direction of the plane to find shapes on.
5372         #  @param thePnt Point specifying location of the plane to find shapes on.
5373         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5374         #  @param theName Object name; when specified, this parameter is used
5375         #         for result publication in the study. Otherwise, if automatic
5376         #         publication is switched on, default value is used for result name.
5377         #
5378         #  @return List of all found sub-shapes.
5379         #
5380         #  @ref swig_GetShapesOnPlaneWithLocation "Example"
5381         @ManageTransactions("ShapesOp")
5382         def GetShapesOnPlaneWithLocation(self, theShape, theShapeType, theAx1, thePnt, theState, theName=None):
5383             """
5384             Find in theShape all sub-shapes of type theShapeType,
5385             situated relatively the specified plane by the certain way,
5386             defined through theState parameter.
5387
5388             Parameters:
5389                 theShape Shape to find sub-shapes of.
5390                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5391                 theAx1 Vector (or line, or linear edge), specifying normal
5392                        direction and location of the plane to find shapes on.
5393                 thePnt Point specifying location of the plane to find shapes on.
5394                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5395                 theName Object name; when specified, this parameter is used
5396                         for result publication in the study. Otherwise, if automatic
5397                         publication is switched on, default value is used for result name.
5398
5399             Returns:
5400                 List of all found sub-shapes.
5401             """
5402             # Example: see GEOM_TestOthers.py
5403             aList = self.ShapesOp.GetShapesOnPlaneWithLocation(theShape, theShapeType,
5404                                                                theAx1, thePnt, theState)
5405             RaiseIfFailed("GetShapesOnPlaneWithLocation", self.ShapesOp)
5406             self._autoPublish(aList, theName, "shapeOnPlane")
5407             return aList
5408
5409         ## Find in <VAR>theShape</VAR> all sub-shapes of type <VAR>theShapeType</VAR>,
5410         #  situated relatively the specified plane by the certain way,
5411         #  defined through <VAR>theState</VAR> parameter.
5412         #  @param theShape Shape to find sub-shapes of.
5413         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5414         #  @param theAx1 Vector (or line, or linear edge), specifying normal
5415         #                direction of the plane to find shapes on.
5416         #  @param thePnt Point specifying location of the plane to find shapes on.
5417         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5418         #
5419         #  @return List of all found sub-shapes indices.
5420         #
5421         #  @ref swig_GetShapesOnPlaneWithLocationIDs "Example"
5422         @ManageTransactions("ShapesOp")
5423         def GetShapesOnPlaneWithLocationIDs(self, theShape, theShapeType, theAx1, thePnt, theState):
5424             """
5425             Find in theShape all sub-shapes of type theShapeType,
5426             situated relatively the specified plane by the certain way,
5427             defined through theState parameter.
5428
5429             Parameters:
5430                 theShape Shape to find sub-shapes of.
5431                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5432                 theAx1 Vector (or line, or linear edge), specifying normal
5433                        direction and location of the plane to find shapes on.
5434                 thePnt Point specifying location of the plane to find shapes on.
5435                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5436
5437             Returns:
5438                 List of all found sub-shapes indices.
5439             """
5440             # Example: see GEOM_TestOthers.py
5441             aList = self.ShapesOp.GetShapesOnPlaneWithLocationIDs(theShape, theShapeType,
5442                                                                   theAx1, thePnt, theState)
5443             RaiseIfFailed("GetShapesOnPlaneWithLocationIDs", self.ShapesOp)
5444             return aList
5445
5446         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
5447         #  the specified cylinder by the certain way, defined through \a theState parameter.
5448         #  @param theShape Shape to find sub-shapes of.
5449         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5450         #  @param theAxis Vector (or line, or linear edge), specifying
5451         #                 axis of the cylinder to find shapes on.
5452         #  @param theRadius Radius of the cylinder to find shapes on.
5453         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5454         #  @param theName Object name; when specified, this parameter is used
5455         #         for result publication in the study. Otherwise, if automatic
5456         #         publication is switched on, default value is used for result name.
5457         #
5458         #  @return List of all found sub-shapes.
5459         #
5460         #  @ref swig_GetShapesOnCylinder "Example"
5461         @ManageTransactions("ShapesOp")
5462         def GetShapesOnCylinder(self, theShape, theShapeType, theAxis, theRadius, theState, theName=None):
5463             """
5464             Find in theShape all sub-shapes of type theShapeType, situated relatively
5465             the specified cylinder by the certain way, defined through theState parameter.
5466
5467             Parameters:
5468                 theShape Shape to find sub-shapes of.
5469                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5470                 theAxis Vector (or line, or linear edge), specifying
5471                         axis of the cylinder to find shapes on.
5472                 theRadius Radius of the cylinder to find shapes on.
5473                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5474                 theName Object name; when specified, this parameter is used
5475                         for result publication in the study. Otherwise, if automatic
5476                         publication is switched on, default value is used for result name.
5477
5478             Returns:
5479                 List of all found sub-shapes.
5480             """
5481             # Example: see GEOM_TestOthers.py
5482             aList = self.ShapesOp.GetShapesOnCylinder(theShape, theShapeType, theAxis, theRadius, theState)
5483             RaiseIfFailed("GetShapesOnCylinder", self.ShapesOp)
5484             self._autoPublish(aList, theName, "shapeOnCylinder")
5485             return aList
5486
5487         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
5488         #  the specified cylinder by the certain way, defined through \a theState parameter.
5489         #  @param theShape Shape to find sub-shapes of.
5490         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5491         #  @param theAxis Vector (or line, or linear edge), specifying
5492         #                 axis of the cylinder to find shapes on.
5493         #  @param theRadius Radius of the cylinder to find shapes on.
5494         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5495         #
5496         #  @return List of all found sub-shapes indices.
5497         #
5498         #  @ref swig_GetShapesOnCylinderIDs "Example"
5499         @ManageTransactions("ShapesOp")
5500         def GetShapesOnCylinderIDs(self, theShape, theShapeType, theAxis, theRadius, theState):
5501             """
5502             Find in theShape all sub-shapes of type theShapeType, situated relatively
5503             the specified cylinder by the certain way, defined through theState parameter.
5504
5505             Parameters:
5506                 theShape Shape to find sub-shapes of.
5507                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5508                 theAxis Vector (or line, or linear edge), specifying
5509                         axis of the cylinder to find shapes on.
5510                 theRadius Radius of the cylinder to find shapes on.
5511                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5512
5513             Returns:
5514                 List of all found sub-shapes indices.
5515             """
5516             # Example: see GEOM_TestOthers.py
5517             aList = self.ShapesOp.GetShapesOnCylinderIDs(theShape, theShapeType, theAxis, theRadius, theState)
5518             RaiseIfFailed("GetShapesOnCylinderIDs", self.ShapesOp)
5519             return aList
5520
5521         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
5522         #  the specified cylinder by the certain way, defined through \a theState parameter.
5523         #  @param theShape Shape to find sub-shapes of.
5524         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5525         #  @param theAxis Vector (or line, or linear edge), specifying
5526         #                 axis of the cylinder to find shapes on.
5527         #  @param thePnt Point specifying location of the bottom of the cylinder.
5528         #  @param theRadius Radius of the cylinder to find shapes on.
5529         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5530         #  @param theName Object name; when specified, this parameter is used
5531         #         for result publication in the study. Otherwise, if automatic
5532         #         publication is switched on, default value is used for result name.
5533         #
5534         #  @return List of all found sub-shapes.
5535         #
5536         #  @ref swig_GetShapesOnCylinderWithLocation "Example"
5537         @ManageTransactions("ShapesOp")
5538         def GetShapesOnCylinderWithLocation(self, theShape, theShapeType, theAxis, thePnt, theRadius, theState, theName=None):
5539             """
5540             Find in theShape all sub-shapes of type theShapeType, situated relatively
5541             the specified cylinder by the certain way, defined through theState parameter.
5542
5543             Parameters:
5544                 theShape Shape to find sub-shapes of.
5545                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5546                 theAxis Vector (or line, or linear edge), specifying
5547                         axis of the cylinder to find shapes on.
5548                 theRadius Radius of the cylinder to find shapes on.
5549                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5550                 theName Object name; when specified, this parameter is used
5551                         for result publication in the study. Otherwise, if automatic
5552                         publication is switched on, default value is used for result name.
5553
5554             Returns:
5555                 List of all found sub-shapes.
5556             """
5557             # Example: see GEOM_TestOthers.py
5558             aList = self.ShapesOp.GetShapesOnCylinderWithLocation(theShape, theShapeType, theAxis, thePnt, theRadius, theState)
5559             RaiseIfFailed("GetShapesOnCylinderWithLocation", self.ShapesOp)
5560             self._autoPublish(aList, theName, "shapeOnCylinder")
5561             return aList
5562
5563         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
5564         #  the specified cylinder by the certain way, defined through \a theState parameter.
5565         #  @param theShape Shape to find sub-shapes of.
5566         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5567         #  @param theAxis Vector (or line, or linear edge), specifying
5568         #                 axis of the cylinder to find shapes on.
5569         #  @param thePnt Point specifying location of the bottom of the cylinder.
5570         #  @param theRadius Radius of the cylinder to find shapes on.
5571         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5572         #
5573         #  @return List of all found sub-shapes indices
5574         #
5575         #  @ref swig_GetShapesOnCylinderWithLocationIDs "Example"
5576         @ManageTransactions("ShapesOp")
5577         def GetShapesOnCylinderWithLocationIDs(self, theShape, theShapeType, theAxis, thePnt, theRadius, theState):
5578             """
5579             Find in theShape all sub-shapes of type theShapeType, situated relatively
5580             the specified cylinder by the certain way, defined through theState parameter.
5581
5582             Parameters:
5583                 theShape Shape to find sub-shapes of.
5584                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5585                 theAxis Vector (or line, or linear edge), specifying
5586                         axis of the cylinder to find shapes on.
5587                 theRadius Radius of the cylinder to find shapes on.
5588                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5589
5590             Returns:
5591                 List of all found sub-shapes indices.
5592             """
5593             # Example: see GEOM_TestOthers.py
5594             aList = self.ShapesOp.GetShapesOnCylinderWithLocationIDs(theShape, theShapeType, theAxis, thePnt, theRadius, theState)
5595             RaiseIfFailed("GetShapesOnCylinderWithLocationIDs", self.ShapesOp)
5596             return aList
5597
5598         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
5599         #  the specified sphere by the certain way, defined through \a theState parameter.
5600         #  @param theShape Shape to find sub-shapes of.
5601         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5602         #  @param theCenter Point, specifying center of the sphere to find shapes on.
5603         #  @param theRadius Radius of the sphere to find shapes on.
5604         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5605         #  @param theName Object name; when specified, this parameter is used
5606         #         for result publication in the study. Otherwise, if automatic
5607         #         publication is switched on, default value is used for result name.
5608         #
5609         #  @return List of all found sub-shapes.
5610         #
5611         #  @ref swig_GetShapesOnSphere "Example"
5612         @ManageTransactions("ShapesOp")
5613         def GetShapesOnSphere(self, theShape, theShapeType, theCenter, theRadius, theState, theName=None):
5614             """
5615             Find in theShape all sub-shapes of type theShapeType, situated relatively
5616             the specified sphere 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                 theCenter Point, specifying center of the sphere to find shapes on.
5622                 theRadius Radius of the sphere to find shapes on.
5623                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5624                 theName Object name; when specified, this parameter is used
5625                         for result publication in the study. Otherwise, if automatic
5626                         publication is switched on, default value is used for result name.
5627
5628             Returns:
5629                 List of all found sub-shapes.
5630             """
5631             # Example: see GEOM_TestOthers.py
5632             aList = self.ShapesOp.GetShapesOnSphere(theShape, theShapeType, theCenter, theRadius, theState)
5633             RaiseIfFailed("GetShapesOnSphere", self.ShapesOp)
5634             self._autoPublish(aList, theName, "shapeOnSphere")
5635             return aList
5636
5637         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
5638         #  the specified sphere by the certain way, defined through \a theState parameter.
5639         #  @param theShape Shape to find sub-shapes of.
5640         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5641         #  @param theCenter Point, specifying center of the sphere to find shapes on.
5642         #  @param theRadius Radius of the sphere to find shapes on.
5643         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5644         #
5645         #  @return List of all found sub-shapes indices.
5646         #
5647         #  @ref swig_GetShapesOnSphereIDs "Example"
5648         @ManageTransactions("ShapesOp")
5649         def GetShapesOnSphereIDs(self, theShape, theShapeType, theCenter, theRadius, theState):
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
5661             Returns:
5662                 List of all found sub-shapes indices.
5663             """
5664             # Example: see GEOM_TestOthers.py
5665             aList = self.ShapesOp.GetShapesOnSphereIDs(theShape, theShapeType, theCenter, theRadius, theState)
5666             RaiseIfFailed("GetShapesOnSphereIDs", self.ShapesOp)
5667             return aList
5668
5669         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
5670         #  the specified quadrangle by the certain way, defined through \a theState parameter.
5671         #  @param theShape Shape to find sub-shapes of.
5672         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5673         #  @param theTopLeftPoint Point, specifying top left corner of a quadrangle
5674         #  @param theTopRigthPoint Point, specifying top right corner of a quadrangle
5675         #  @param theBottomLeftPoint Point, specifying bottom left corner of a quadrangle
5676         #  @param theBottomRigthPoint Point, specifying bottom right corner of a quadrangle
5677         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5678         #  @param theName Object name; when specified, this parameter is used
5679         #         for result publication in the study. Otherwise, if automatic
5680         #         publication is switched on, default value is used for result name.
5681         #
5682         #  @return List of all found sub-shapes.
5683         #
5684         #  @ref swig_GetShapesOnQuadrangle "Example"
5685         @ManageTransactions("ShapesOp")
5686         def GetShapesOnQuadrangle(self, theShape, theShapeType,
5687                                   theTopLeftPoint, theTopRigthPoint,
5688                                   theBottomLeftPoint, theBottomRigthPoint, theState, theName=None):
5689             """
5690             Find in theShape all sub-shapes of type theShapeType, situated relatively
5691             the specified quadrangle by the certain way, defined through theState parameter.
5692
5693             Parameters:
5694                 theShape Shape to find sub-shapes of.
5695                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5696                 theTopLeftPoint Point, specifying top left corner of a quadrangle
5697                 theTopRigthPoint Point, specifying top right corner of a quadrangle
5698                 theBottomLeftPoint Point, specifying bottom left corner of a quadrangle
5699                 theBottomRigthPoint Point, specifying bottom right corner of a quadrangle
5700                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5701                 theName Object name; when specified, this parameter is used
5702                         for result publication in the study. Otherwise, if automatic
5703                         publication is switched on, default value is used for result name.
5704
5705             Returns:
5706                 List of all found sub-shapes.
5707             """
5708             # Example: see GEOM_TestOthers.py
5709             aList = self.ShapesOp.GetShapesOnQuadrangle(theShape, theShapeType,
5710                                                         theTopLeftPoint, theTopRigthPoint,
5711                                                         theBottomLeftPoint, theBottomRigthPoint, theState)
5712             RaiseIfFailed("GetShapesOnQuadrangle", self.ShapesOp)
5713             self._autoPublish(aList, theName, "shapeOnQuadrangle")
5714             return aList
5715
5716         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
5717         #  the specified quadrangle by the certain way, defined through \a theState parameter.
5718         #  @param theShape Shape to find sub-shapes of.
5719         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5720         #  @param theTopLeftPoint Point, specifying top left corner of a quadrangle
5721         #  @param theTopRigthPoint Point, specifying top right corner of a quadrangle
5722         #  @param theBottomLeftPoint Point, specifying bottom left corner of a quadrangle
5723         #  @param theBottomRigthPoint Point, specifying bottom right corner of a quadrangle
5724         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5725         #
5726         #  @return List of all found sub-shapes indices.
5727         #
5728         #  @ref swig_GetShapesOnQuadrangleIDs "Example"
5729         @ManageTransactions("ShapesOp")
5730         def GetShapesOnQuadrangleIDs(self, theShape, theShapeType,
5731                                      theTopLeftPoint, theTopRigthPoint,
5732                                      theBottomLeftPoint, theBottomRigthPoint, theState):
5733             """
5734             Find in theShape all sub-shapes of type theShapeType, situated relatively
5735             the specified quadrangle by the certain way, defined through theState parameter.
5736
5737             Parameters:
5738                 theShape Shape to find sub-shapes of.
5739                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5740                 theTopLeftPoint Point, specifying top left corner of a quadrangle
5741                 theTopRigthPoint Point, specifying top right corner of a quadrangle
5742                 theBottomLeftPoint Point, specifying bottom left corner of a quadrangle
5743                 theBottomRigthPoint Point, specifying bottom right corner of a quadrangle
5744                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5745
5746             Returns:
5747                 List of all found sub-shapes indices.
5748             """
5749
5750             # Example: see GEOM_TestOthers.py
5751             aList = self.ShapesOp.GetShapesOnQuadrangleIDs(theShape, theShapeType,
5752                                                            theTopLeftPoint, theTopRigthPoint,
5753                                                            theBottomLeftPoint, theBottomRigthPoint, theState)
5754             RaiseIfFailed("GetShapesOnQuadrangleIDs", self.ShapesOp)
5755             return aList
5756
5757         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
5758         #  the specified \a theBox by the certain way, defined through \a theState parameter.
5759         #  @param theBox Shape for relative comparing.
5760         #  @param theShape Shape to find sub-shapes of.
5761         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5762         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5763         #  @param theName Object name; when specified, this parameter is used
5764         #         for result publication in the study. Otherwise, if automatic
5765         #         publication is switched on, default value is used for result name.
5766         #
5767         #  @return List of all found sub-shapes.
5768         #
5769         #  @ref swig_GetShapesOnBox "Example"
5770         @ManageTransactions("ShapesOp")
5771         def GetShapesOnBox(self, theBox, theShape, theShapeType, theState, theName=None):
5772             """
5773             Find in theShape all sub-shapes of type theShapeType, situated relatively
5774             the specified theBox by the certain way, defined through theState parameter.
5775
5776             Parameters:
5777                 theBox Shape for relative comparing.
5778                 theShape Shape to find sub-shapes of.
5779                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5780                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5781                 theName Object name; when specified, this parameter is used
5782                         for result publication in the study. Otherwise, if automatic
5783                         publication is switched on, default value is used for result name.
5784
5785             Returns:
5786                 List of all found sub-shapes.
5787             """
5788             # Example: see GEOM_TestOthers.py
5789             aList = self.ShapesOp.GetShapesOnBox(theBox, theShape, theShapeType, theState)
5790             RaiseIfFailed("GetShapesOnBox", self.ShapesOp)
5791             self._autoPublish(aList, theName, "shapeOnBox")
5792             return aList
5793
5794         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
5795         #  the specified \a theBox by the certain way, defined through \a theState parameter.
5796         #  @param theBox Shape for relative comparing.
5797         #  @param theShape Shape to find sub-shapes of.
5798         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5799         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5800         #
5801         #  @return List of all found sub-shapes indices.
5802         #
5803         #  @ref swig_GetShapesOnBoxIDs "Example"
5804         @ManageTransactions("ShapesOp")
5805         def GetShapesOnBoxIDs(self, theBox, theShape, theShapeType, theState):
5806             """
5807             Find in theShape all sub-shapes of type theShapeType, situated relatively
5808             the specified theBox by the certain way, defined through theState parameter.
5809
5810             Parameters:
5811                 theBox Shape for relative comparing.
5812                 theShape Shape to find sub-shapes of.
5813                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5814                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5815
5816             Returns:
5817                 List of all found sub-shapes indices.
5818             """
5819             # Example: see GEOM_TestOthers.py
5820             aList = self.ShapesOp.GetShapesOnBoxIDs(theBox, theShape, theShapeType, theState)
5821             RaiseIfFailed("GetShapesOnBoxIDs", self.ShapesOp)
5822             return aList
5823
5824         ## Find in \a theShape all sub-shapes of type \a theShapeType,
5825         #  situated relatively the specified \a theCheckShape by the
5826         #  certain way, defined through \a theState parameter.
5827         #  @param theCheckShape Shape for relative comparing. It must be a solid.
5828         #  @param theShape Shape to find sub-shapes of.
5829         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5830         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5831         #  @param theName Object name; when specified, this parameter is used
5832         #         for result publication in the study. Otherwise, if automatic
5833         #         publication is switched on, default value is used for result name.
5834         #
5835         #  @return List of all found sub-shapes.
5836         #
5837         #  @ref swig_GetShapesOnShape "Example"
5838         @ManageTransactions("ShapesOp")
5839         def GetShapesOnShape(self, theCheckShape, theShape, theShapeType, theState, theName=None):
5840             """
5841             Find in theShape all sub-shapes of type theShapeType,
5842             situated relatively the specified theCheckShape by the
5843             certain way, defined through theState parameter.
5844
5845             Parameters:
5846                 theCheckShape Shape for relative comparing. It must be a solid.
5847                 theShape Shape to find sub-shapes of.
5848                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5849                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5850                 theName Object name; when specified, this parameter is used
5851                         for result publication in the study. Otherwise, if automatic
5852                         publication is switched on, default value is used for result name.
5853
5854             Returns:
5855                 List of all found sub-shapes.
5856             """
5857             # Example: see GEOM_TestOthers.py
5858             aList = self.ShapesOp.GetShapesOnShape(theCheckShape, theShape,
5859                                                    theShapeType, theState)
5860             RaiseIfFailed("GetShapesOnShape", self.ShapesOp)
5861             self._autoPublish(aList, theName, "shapeOnShape")
5862             return aList
5863
5864         ## Find in \a theShape all sub-shapes of type \a theShapeType,
5865         #  situated relatively the specified \a theCheckShape by the
5866         #  certain way, defined through \a theState parameter.
5867         #  @param theCheckShape Shape for relative comparing. It must be a solid.
5868         #  @param theShape Shape to find sub-shapes of.
5869         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5870         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5871         #  @param theName Object name; when specified, this parameter is used
5872         #         for result publication in the study. Otherwise, if automatic
5873         #         publication is switched on, default value is used for result name.
5874         #
5875         #  @return All found sub-shapes as compound.
5876         #
5877         #  @ref swig_GetShapesOnShapeAsCompound "Example"
5878         @ManageTransactions("ShapesOp")
5879         def GetShapesOnShapeAsCompound(self, theCheckShape, theShape, theShapeType, theState, theName=None):
5880             """
5881             Find in theShape all sub-shapes of type theShapeType,
5882             situated relatively the specified theCheckShape by the
5883             certain way, defined through theState parameter.
5884
5885             Parameters:
5886                 theCheckShape Shape for relative comparing. It must be a solid.
5887                 theShape Shape to find sub-shapes of.
5888                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5889                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5890                 theName Object name; when specified, this parameter is used
5891                         for result publication in the study. Otherwise, if automatic
5892                         publication is switched on, default value is used for result name.
5893
5894             Returns:
5895                 All found sub-shapes as compound.
5896             """
5897             # Example: see GEOM_TestOthers.py
5898             anObj = self.ShapesOp.GetShapesOnShapeAsCompound(theCheckShape, theShape,
5899                                                              theShapeType, theState)
5900             RaiseIfFailed("GetShapesOnShapeAsCompound", self.ShapesOp)
5901             self._autoPublish(anObj, theName, "shapeOnShape")
5902             return anObj
5903
5904         ## Find in \a theShape all sub-shapes of type \a theShapeType,
5905         #  situated relatively the specified \a theCheckShape by the
5906         #  certain way, defined through \a theState parameter.
5907         #  @param theCheckShape Shape for relative comparing. It must be a solid.
5908         #  @param theShape Shape to find sub-shapes of.
5909         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5910         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5911         #
5912         #  @return List of all found sub-shapes indices.
5913         #
5914         #  @ref swig_GetShapesOnShapeIDs "Example"
5915         @ManageTransactions("ShapesOp")
5916         def GetShapesOnShapeIDs(self, theCheckShape, theShape, theShapeType, theState):
5917             """
5918             Find in theShape all sub-shapes of type theShapeType,
5919             situated relatively the specified theCheckShape by the
5920             certain way, defined through theState parameter.
5921
5922             Parameters:
5923                 theCheckShape Shape for relative comparing. It must be a solid.
5924                 theShape Shape to find sub-shapes of.
5925                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5926                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5927
5928             Returns:
5929                 List of all found sub-shapes indices.
5930             """
5931             # Example: see GEOM_TestOthers.py
5932             aList = self.ShapesOp.GetShapesOnShapeIDs(theCheckShape, theShape,
5933                                                       theShapeType, theState)
5934             RaiseIfFailed("GetShapesOnShapeIDs", self.ShapesOp)
5935             return aList
5936
5937         ## Get sub-shape(s) of theShapeWhere, which are
5938         #  coincident with \a theShapeWhat or could be a part of it.
5939         #  @param theShapeWhere Shape to find sub-shapes of.
5940         #  @param theShapeWhat Shape, specifying what to find.
5941         #  @param isNewImplementation implementation of GetInPlace functionality
5942         #             (default = False, old alghorithm based on shape properties)
5943         #  @param theName Object name; when specified, this parameter is used
5944         #         for result publication in the study. Otherwise, if automatic
5945         #         publication is switched on, default value is used for result name.
5946         #
5947         #  @return Compound which includes all found sub-shapes if they have different types; 
5948         #          or group of all found shapes of the equal type; or a single found sub-shape.
5949         #
5950         #  @note This function has a restriction on argument shapes.
5951         #        If \a theShapeWhere has curved parts with significantly
5952         #        outstanding centres (i.e. the mass centre of a part is closer to
5953         #        \a theShapeWhat than to the part), such parts will not be found.
5954         #        @image html get_in_place_lost_part.png
5955         #
5956         #  @ref swig_GetInPlace "Example"
5957         @ManageTransactions("ShapesOp")
5958         def GetInPlace(self, theShapeWhere, theShapeWhat, isNewImplementation = False, theName=None):
5959             """
5960             Get sub-shape(s) of theShapeWhere, which are
5961             coincident with  theShapeWhat or could be a part of it.
5962
5963             Parameters:
5964                 theShapeWhere Shape to find sub-shapes of.
5965                 theShapeWhat Shape, specifying what to find.
5966                 isNewImplementation Implementation of GetInPlace functionality
5967                                     (default = False, old alghorithm based on shape properties)
5968                 theName Object name; when specified, this parameter is used
5969                         for result publication in the study. Otherwise, if automatic
5970                         publication is switched on, default value is used for result name.
5971
5972             Returns:
5973                 Compound which includes all found sub-shapes if they have different types; 
5974                 or group of all found shapes of the equal type; or a single found sub-shape.
5975
5976
5977             Note:
5978                 This function has a restriction on argument shapes.
5979                 If theShapeWhere has curved parts with significantly
5980                 outstanding centres (i.e. the mass centre of a part is closer to
5981                 theShapeWhat than to the part), such parts will not be found.
5982             """
5983             # Example: see GEOM_TestOthers.py
5984             anObj = None
5985             if isNewImplementation:
5986                 anObj = self.ShapesOp.GetInPlace(theShapeWhere, theShapeWhat)
5987             else:
5988                 anObj = self.ShapesOp.GetInPlaceOld(theShapeWhere, theShapeWhat)
5989                 pass
5990             RaiseIfFailed("GetInPlace", self.ShapesOp)
5991             self._autoPublish(anObj, theName, "inplace")
5992             return anObj
5993
5994         ## Get sub-shape(s) of \a theShapeWhere, which are
5995         #  coincident with \a theShapeWhat or could be a part of it.
5996         #
5997         #  Implementation of this method is based on a saved history of an operation,
5998         #  produced \a theShapeWhere. The \a theShapeWhat must be among this operation's
5999         #  arguments (an argument shape or a sub-shape of an argument shape).
6000         #  The operation could be the Partition or one of boolean operations,
6001         #  performed on simple shapes (not on compounds).
6002         #
6003         #  @param theShapeWhere Shape to find sub-shapes of.
6004         #  @param theShapeWhat Shape, specifying what to find (must be in the
6005         #                      building history of the ShapeWhere).
6006         #  @param theName Object name; when specified, this parameter is used
6007         #         for result publication in the study. Otherwise, if automatic
6008         #         publication is switched on, default value is used for result name.
6009         #
6010         #  @return Compound which includes all found sub-shapes if they have different types; 
6011         #          or group of all found shapes of the equal type; or a single found sub-shape.
6012         #
6013         #  @ref swig_GetInPlace "Example"
6014         @ManageTransactions("ShapesOp")
6015         def GetInPlaceByHistory(self, theShapeWhere, theShapeWhat, theName=None):
6016             """
6017             Implementation of this method is based on a saved history of an operation,
6018             produced theShapeWhere. The theShapeWhat must be among this operation's
6019             arguments (an argument shape or a sub-shape of an argument shape).
6020             The operation could be the Partition or one of boolean operations,
6021             performed on simple shapes (not on compounds).
6022
6023             Parameters:
6024                 theShapeWhere Shape to find sub-shapes of.
6025                 theShapeWhat Shape, specifying what to find (must be in the
6026                                 building history of the ShapeWhere).
6027                 theName Object name; when specified, this parameter is used
6028                         for result publication in the study. Otherwise, if automatic
6029                         publication is switched on, default value is used for result name.
6030
6031             Returns:
6032                 Compound which includes all found sub-shapes if they have different types; 
6033                 or group of all found shapes of the equal type; or a single found sub-shape.
6034             """
6035             # Example: see GEOM_TestOthers.py
6036             anObj = self.ShapesOp.GetInPlaceByHistory(theShapeWhere, theShapeWhat)
6037             RaiseIfFailed("GetInPlaceByHistory", self.ShapesOp)
6038             self._autoPublish(anObj, theName, "inplace")
6039             return anObj
6040
6041         ## Get sub-shape of theShapeWhere, which is
6042         #  equal to \a theShapeWhat.
6043         #  @param theShapeWhere Shape to find sub-shape of.
6044         #  @param theShapeWhat Shape, specifying what to find.
6045         #  @param theName Object name; when specified, this parameter is used
6046         #         for result publication in the study. Otherwise, if automatic
6047         #         publication is switched on, default value is used for result name.
6048         #
6049         #  @return New GEOM.GEOM_Object for found sub-shape.
6050         #
6051         #  @ref swig_GetSame "Example"
6052         @ManageTransactions("ShapesOp")
6053         def GetSame(self, theShapeWhere, theShapeWhat, theName=None):
6054             """
6055             Get sub-shape of theShapeWhere, which is
6056             equal to theShapeWhat.
6057
6058             Parameters:
6059                 theShapeWhere Shape to find sub-shape of.
6060                 theShapeWhat Shape, specifying what to find.
6061                 theName Object name; when specified, this parameter is used
6062                         for result publication in the study. Otherwise, if automatic
6063                         publication is switched on, default value is used for result name.
6064
6065             Returns:
6066                 New GEOM.GEOM_Object for found sub-shape.
6067             """
6068             anObj = self.ShapesOp.GetSame(theShapeWhere, theShapeWhat)
6069             RaiseIfFailed("GetSame", self.ShapesOp)
6070             self._autoPublish(anObj, theName, "sameShape")
6071             return anObj
6072
6073
6074         ## Get sub-shape indices of theShapeWhere, which is
6075         #  equal to \a theShapeWhat.
6076         #  @param theShapeWhere Shape to find sub-shape of.
6077         #  @param theShapeWhat Shape, specifying what to find.
6078         #  @return List of all found sub-shapes indices.
6079         #
6080         #  @ref swig_GetSame "Example"
6081         @ManageTransactions("ShapesOp")
6082         def GetSameIDs(self, theShapeWhere, theShapeWhat):
6083             """
6084             Get sub-shape indices of theShapeWhere, which is
6085             equal to theShapeWhat.
6086
6087             Parameters:
6088                 theShapeWhere Shape to find sub-shape of.
6089                 theShapeWhat Shape, specifying what to find.
6090
6091             Returns:
6092                 List of all found sub-shapes indices.
6093             """
6094             anObj = self.ShapesOp.GetSameIDs(theShapeWhere, theShapeWhat)
6095             RaiseIfFailed("GetSameIDs", self.ShapesOp)
6096             return anObj
6097
6098         ## Resize the input edge with the new Min and Max parameters.
6099         #  The input edge parameters range is [0, 1]. If theMin parameter is
6100         #  negative, the input edge is extended, otherwise it is shrinked by
6101         #  theMin parameter. If theMax is greater than 1, the edge is extended,
6102         #  otherwise it is shrinked by theMax parameter.
6103         #  @param theEdge the input edge to be resized.
6104         #  @param theMin the minimal parameter value.
6105         #  @param theMax the maximal parameter value.
6106         #  @param theName Object name; when specified, this parameter is used
6107         #         for result publication in the study. Otherwise, if automatic
6108         #         publication is switched on, default value is used for result name.
6109         #  @return New GEOM.GEOM_Object, containing the created edge.
6110         #
6111         #  @ref tui_extend "Example"
6112         @ManageTransactions("ShapesOp")
6113         def ExtendEdge(self, theEdge, theMin, theMax, theName=None):
6114             """
6115             Resize the input edge with the new Min and Max parameters.
6116             The input edge parameters range is [0, 1]. If theMin parameter is
6117             negative, the input edge is extended, otherwise it is shrinked by
6118             theMin parameter. If theMax is greater than 1, the edge is extended,
6119             otherwise it is shrinked by theMax parameter.
6120
6121             Parameters:
6122                 theEdge the input edge to be resized.
6123                 theMin the minimal parameter value.
6124                 theMax the maximal parameter value.
6125                 theName Object name; when specified, this parameter is used
6126                         for result publication in the study. Otherwise, if automatic
6127                         publication is switched on, default value is used for result name.
6128
6129             Returns:
6130                 New GEOM.GEOM_Object, containing the created edge.
6131             """
6132             theMin, theMax, Parameters = ParseParameters(theMin, theMax)
6133             anObj = self.ShapesOp.ExtendEdge(theEdge, theMin, theMax)
6134             RaiseIfFailed("ExtendEdge", self.ShapesOp)
6135             anObj.SetParameters(Parameters)
6136             self._autoPublish(anObj, theName, "edge")
6137             return anObj
6138
6139         ## Resize the input face with the new UMin, UMax, VMin and VMax
6140         #  parameters. The input face U and V parameters range is [0, 1]. If
6141         #  theUMin parameter is negative, the input face is extended, otherwise
6142         #  it is shrinked along U direction by theUMin parameter. If theUMax is
6143         #  greater than 1, the face is extended, otherwise it is shrinked along
6144         #  U direction by theUMax parameter. So as for theVMin, theVMax and
6145         #  V direction of the input face.
6146         #  @param theFace the input face to be resized.
6147         #  @param theUMin the minimal U parameter value.
6148         #  @param theUMax the maximal U parameter value.
6149         #  @param theVMin the minimal V parameter value.
6150         #  @param theVMax the maximal V parameter value.
6151         #  @param theName Object name; when specified, this parameter is used
6152         #         for result publication in the study. Otherwise, if automatic
6153         #         publication is switched on, default value is used for result name.
6154         #  @return New GEOM.GEOM_Object, containing the created face.
6155         #
6156         #  @ref tui_extend "Example"
6157         @ManageTransactions("ShapesOp")
6158         def ExtendFace(self, theFace, theUMin, theUMax,
6159                        theVMin, theVMax, theName=None):
6160             """
6161             Resize the input face with the new UMin, UMax, VMin and VMax
6162             parameters. The input face U and V parameters range is [0, 1]. If
6163             theUMin parameter is negative, the input face is extended, otherwise
6164             it is shrinked along U direction by theUMin parameter. If theUMax is
6165             greater than 1, the face is extended, otherwise it is shrinked along
6166             U direction by theUMax parameter. So as for theVMin, theVMax and
6167             V direction of the input face.
6168
6169             Parameters:
6170                 theFace the input face to be resized.
6171                 theUMin the minimal U parameter value.
6172                 theUMax the maximal U parameter value.
6173                 theVMin the minimal V parameter value.
6174                 theVMax the maximal V parameter value.
6175                 theName Object name; when specified, this parameter is used
6176                         for result publication in the study. Otherwise, if automatic
6177                         publication is switched on, default value is used for result name.
6178
6179             Returns:
6180                 New GEOM.GEOM_Object, containing the created face.
6181             """
6182             theUMin, theUMax, theVMin, theVMax, Parameters = ParseParameters(theUMin, theUMax, theVMin, theVMax)
6183             anObj = self.ShapesOp.ExtendFace(theFace, theUMin, theUMax,
6184                                              theVMin, theVMax)
6185             RaiseIfFailed("ExtendFace", self.ShapesOp)
6186             anObj.SetParameters(Parameters)
6187             self._autoPublish(anObj, theName, "face")
6188             return anObj
6189
6190         ## This function takes some face as input parameter and creates new
6191         #  GEOM_Object, i.e. topological shape by extracting underlying surface
6192         #  of the source face and limiting it by the Umin, Umax, Vmin, Vmax
6193         #  parameters of the source face (in the parametrical space).
6194         #  @param theFace the input face.
6195         #  @param theName Object name; when specified, this parameter is used
6196         #         for result publication in the study. Otherwise, if automatic
6197         #         publication is switched on, default value is used for result name.
6198         #  @return New GEOM.GEOM_Object, containing the created face.
6199         #
6200         #  @ref tui_creation_surface "Example"
6201         @ManageTransactions("ShapesOp")
6202         def MakeSurfaceFromFace(self, theFace, theName=None):
6203             """
6204             This function takes some face as input parameter and creates new
6205             GEOM_Object, i.e. topological shape by extracting underlying surface
6206             of the source face and limiting it by the Umin, Umax, Vmin, Vmax
6207             parameters of the source face (in the parametrical space).
6208
6209             Parameters:
6210                 theFace the input face.
6211                 theName Object name; when specified, this parameter is used
6212                         for result publication in the study. Otherwise, if automatic
6213                         publication is switched on, default value is used for result name.
6214
6215             Returns:
6216                 New GEOM.GEOM_Object, containing the created face.
6217             """
6218             anObj = self.ShapesOp.MakeSurfaceFromFace(theFace)
6219             RaiseIfFailed("MakeSurfaceFromFace", self.ShapesOp)
6220             self._autoPublish(anObj, theName, "surface")
6221             return anObj
6222
6223         # end of l4_obtain
6224         ## @}
6225
6226         ## @addtogroup l4_access
6227         ## @{
6228
6229         ## Obtain a composite sub-shape of <VAR>aShape</VAR>, composed from sub-shapes
6230         #  of aShape, selected by their unique IDs inside <VAR>aShape</VAR>
6231         #  @param aShape Shape to get sub-shape of.
6232         #  @param ListOfID List of sub-shapes indices.
6233         #  @param theName Object name; when specified, this parameter is used
6234         #         for result publication in the study. Otherwise, if automatic
6235         #         publication is switched on, default value is used for result name.
6236         #
6237         #  @return Found sub-shape.
6238         #
6239         #  @ref swig_all_decompose "Example"
6240         def GetSubShape(self, aShape, ListOfID, theName=None):
6241             """
6242             Obtain a composite sub-shape of aShape, composed from sub-shapes
6243             of aShape, selected by their unique IDs inside aShape
6244
6245             Parameters:
6246                 aShape Shape to get sub-shape of.
6247                 ListOfID List of sub-shapes indices.
6248                 theName Object name; when specified, this parameter is used
6249                         for result publication in the study. Otherwise, if automatic
6250                         publication is switched on, default value is used for result name.
6251
6252             Returns:
6253                 Found sub-shape.
6254             """
6255             # Example: see GEOM_TestAll.py
6256             anObj = self.AddSubShape(aShape,ListOfID)
6257             self._autoPublish(anObj, theName, "subshape")
6258             return anObj
6259
6260         ## Obtain unique ID of sub-shape <VAR>aSubShape</VAR> inside <VAR>aShape</VAR>
6261         #  of aShape, selected by their unique IDs inside <VAR>aShape</VAR>
6262         #  @param aShape Shape to get sub-shape of.
6263         #  @param aSubShape Sub-shapes of aShape.
6264         #  @return ID of found sub-shape.
6265         #
6266         #  @ref swig_all_decompose "Example"
6267         @ManageTransactions("LocalOp")
6268         def GetSubShapeID(self, aShape, aSubShape):
6269             """
6270             Obtain unique ID of sub-shape aSubShape inside aShape
6271             of aShape, selected by their unique IDs inside aShape
6272
6273             Parameters:
6274                aShape Shape to get sub-shape of.
6275                aSubShape Sub-shapes of aShape.
6276
6277             Returns:
6278                ID of found sub-shape.
6279             """
6280             # Example: see GEOM_TestAll.py
6281             anID = self.LocalOp.GetSubShapeIndex(aShape, aSubShape)
6282             RaiseIfFailed("GetSubShapeIndex", self.LocalOp)
6283             return anID
6284
6285         ## Obtain unique IDs of sub-shapes <VAR>aSubShapes</VAR> inside <VAR>aShape</VAR>
6286         #  This function is provided for performance purpose. The complexity is O(n) with n
6287         #  the number of subobjects of aShape
6288         #  @param aShape Shape to get sub-shape of.
6289         #  @param aSubShapes Sub-shapes of aShape.
6290         #  @return list of IDs of found sub-shapes.
6291         #
6292         #  @ref swig_all_decompose "Example"
6293         @ManageTransactions("ShapesOp")
6294         def GetSubShapesIDs(self, aShape, aSubShapes):
6295             """
6296             Obtain a list of IDs of sub-shapes aSubShapes inside aShape
6297             This function is provided for performance purpose. The complexity is O(n) with n
6298             the number of subobjects of aShape
6299
6300             Parameters:
6301                aShape Shape to get sub-shape of.
6302                aSubShapes Sub-shapes of aShape.
6303
6304             Returns:
6305                List of IDs of found sub-shape.
6306             """
6307             # Example: see GEOM_TestAll.py
6308             anIDs = self.ShapesOp.GetSubShapesIndices(aShape, aSubShapes)
6309             RaiseIfFailed("GetSubShapesIndices", self.ShapesOp)
6310             return anIDs
6311
6312         # end of l4_access
6313         ## @}
6314
6315         ## @addtogroup l4_decompose
6316         ## @{
6317
6318         ## Get all sub-shapes and groups of \a theShape,
6319         #  that were created already by any other methods.
6320         #  @param theShape Any shape.
6321         #  @param theGroupsOnly If this parameter is TRUE, only groups will be
6322         #                       returned, else all found sub-shapes and groups.
6323         #  @return List of existing sub-objects of \a theShape.
6324         #
6325         #  @ref swig_all_decompose "Example"
6326         @ManageTransactions("ShapesOp")
6327         def GetExistingSubObjects(self, theShape, theGroupsOnly = False):
6328             """
6329             Get all sub-shapes and groups of theShape,
6330             that were created already by any other methods.
6331
6332             Parameters:
6333                 theShape Any shape.
6334                 theGroupsOnly If this parameter is TRUE, only groups will be
6335                                  returned, else all found sub-shapes and groups.
6336
6337             Returns:
6338                 List of existing sub-objects of theShape.
6339             """
6340             # Example: see GEOM_TestAll.py
6341             ListObj = self.ShapesOp.GetExistingSubObjects(theShape, theGroupsOnly)
6342             RaiseIfFailed("GetExistingSubObjects", self.ShapesOp)
6343             return ListObj
6344
6345         ## Get all groups of \a theShape,
6346         #  that were created already by any other methods.
6347         #  @param theShape Any shape.
6348         #  @return List of existing groups of \a theShape.
6349         #
6350         #  @ref swig_all_decompose "Example"
6351         @ManageTransactions("ShapesOp")
6352         def GetGroups(self, theShape):
6353             """
6354             Get all groups of theShape,
6355             that were created already by any other methods.
6356
6357             Parameters:
6358                 theShape Any shape.
6359
6360             Returns:
6361                 List of existing groups of theShape.
6362             """
6363             # Example: see GEOM_TestAll.py
6364             ListObj = self.ShapesOp.GetExistingSubObjects(theShape, True)
6365             RaiseIfFailed("GetExistingSubObjects", self.ShapesOp)
6366             return ListObj
6367
6368         ## Explode a shape on sub-shapes of a given type.
6369         #  If the shape itself matches the type, it is also returned.
6370         #  @param aShape Shape to be exploded.
6371         #  @param aType Type of sub-shapes to be retrieved (see ShapeType())
6372         #  @param theName Object name; when specified, this parameter is used
6373         #         for result publication in the study. Otherwise, if automatic
6374         #         publication is switched on, default value is used for result name.
6375         #
6376         #  @return List of sub-shapes of type theShapeType, contained in theShape.
6377         #
6378         #  @ref swig_all_decompose "Example"
6379         @ManageTransactions("ShapesOp")
6380         def SubShapeAll(self, aShape, aType, theName=None):
6381             """
6382             Explode a shape on sub-shapes of a given type.
6383             If the shape itself matches the type, it is also returned.
6384
6385             Parameters:
6386                 aShape Shape to be exploded.
6387                 aType Type of sub-shapes to be retrieved (see geompy.ShapeType)
6388                 theName Object name; when specified, this parameter is used
6389                         for result publication in the study. Otherwise, if automatic
6390                         publication is switched on, default value is used for result name.
6391
6392             Returns:
6393                 List of sub-shapes of type theShapeType, contained in theShape.
6394             """
6395             # Example: see GEOM_TestAll.py
6396             ListObj = self.ShapesOp.MakeAllSubShapes(aShape, EnumToLong( aType ), False)
6397             RaiseIfFailed("SubShapeAll", self.ShapesOp)
6398             self._autoPublish(ListObj, theName, "subshape")
6399             return ListObj
6400
6401         ## Explode a shape on sub-shapes of a given type.
6402         #  @param aShape Shape to be exploded.
6403         #  @param aType Type of sub-shapes to be retrieved (see ShapeType())
6404         #  @return List of IDs of sub-shapes.
6405         #
6406         #  @ref swig_all_decompose "Example"
6407         @ManageTransactions("ShapesOp")
6408         def SubShapeAllIDs(self, aShape, aType):
6409             """
6410             Explode a shape on sub-shapes of a given type.
6411
6412             Parameters:
6413                 aShape Shape to be exploded (see geompy.ShapeType)
6414                 aType Type of sub-shapes to be retrieved (see geompy.ShapeType)
6415
6416             Returns:
6417                 List of IDs of sub-shapes.
6418             """
6419             ListObj = self.ShapesOp.GetAllSubShapesIDs(aShape, EnumToLong( aType ), False)
6420             RaiseIfFailed("SubShapeAllIDs", self.ShapesOp)
6421             return ListObj
6422
6423         ## Obtain a compound of sub-shapes of <VAR>aShape</VAR>,
6424         #  selected by their indices in list of all sub-shapes of type <VAR>aType</VAR>.
6425         #  Each index is in range [1, Nb_Sub-Shapes_Of_Given_Type]
6426         #  @param aShape Shape to get sub-shape of.
6427         #  @param ListOfInd List of sub-shapes indices.
6428         #  @param aType Type of sub-shapes to be retrieved (see ShapeType())
6429         #  @param theName Object name; when specified, this parameter is used
6430         #         for result publication in the study. Otherwise, if automatic
6431         #         publication is switched on, default value is used for result name.
6432         #
6433         #  @return A compound of sub-shapes of aShape.
6434         #
6435         #  @ref swig_all_decompose "Example"
6436         def SubShape(self, aShape, aType, ListOfInd, theName=None):
6437             """
6438             Obtain a compound of sub-shapes of aShape,
6439             selected by their indices in list of all sub-shapes of type aType.
6440             Each index is in range [1, Nb_Sub-Shapes_Of_Given_Type]
6441
6442             Parameters:
6443                 aShape Shape to get sub-shape of.
6444                 ListOfID List of sub-shapes indices.
6445                 aType Type of sub-shapes to be retrieved (see geompy.ShapeType)
6446                 theName Object name; when specified, this parameter is used
6447                         for result publication in the study. Otherwise, if automatic
6448                         publication is switched on, default value is used for result name.
6449
6450             Returns:
6451                 A compound of sub-shapes of aShape.
6452             """
6453             # Example: see GEOM_TestAll.py
6454             ListOfIDs = []
6455             AllShapeIDsList = self.SubShapeAllIDs(aShape, EnumToLong( aType ))
6456             for ind in ListOfInd:
6457                 ListOfIDs.append(AllShapeIDsList[ind - 1])
6458             # note: auto-publishing is done in self.GetSubShape()
6459             anObj = self.GetSubShape(aShape, ListOfIDs, theName)
6460             return anObj
6461
6462         ## Explode a shape on sub-shapes of a given type.
6463         #  Sub-shapes will be sorted taking into account their gravity centers,
6464         #  to provide stable order of sub-shapes. Please see
6465         #  @ref sorting_shapes_page "Description of Sorting Shapes Algorithm".
6466         #  If the shape itself matches the type, it is also returned.
6467         #  @param aShape Shape to be exploded.
6468         #  @param aType Type of sub-shapes to be retrieved (see ShapeType())
6469         #  @param theName Object name; when specified, this parameter is used
6470         #         for result publication in the study. Otherwise, if automatic
6471         #         publication is switched on, default value is used for result name.
6472         #
6473         #  @return List of sub-shapes of type theShapeType, contained in theShape.
6474         #
6475         #  @ref swig_SubShapeAllSorted "Example"
6476         @ManageTransactions("ShapesOp")
6477         def SubShapeAllSortedCentres(self, aShape, aType, theName=None):
6478             """
6479             Explode a shape on sub-shapes of a given type.
6480             Sub-shapes will be sorted taking into account their gravity centers,
6481             to provide stable order of sub-shapes.
6482             If the shape itself matches the type, it is also returned.
6483
6484             Parameters:
6485                 aShape Shape to be exploded.
6486                 aType Type of sub-shapes to be retrieved (see geompy.ShapeType)
6487                 theName Object name; when specified, this parameter is used
6488                         for result publication in the study. Otherwise, if automatic
6489                         publication is switched on, default value is used for result name.
6490
6491             Returns:
6492                 List of sub-shapes of type theShapeType, contained in theShape.
6493             """
6494             # Example: see GEOM_TestAll.py
6495             ListObj = self.ShapesOp.MakeAllSubShapes(aShape, EnumToLong( aType ), True)
6496             RaiseIfFailed("SubShapeAllSortedCentres", self.ShapesOp)
6497             self._autoPublish(ListObj, theName, "subshape")
6498             return ListObj
6499
6500         ## Explode a shape on sub-shapes of a given type.
6501         #  Sub-shapes will be sorted taking into account their gravity centers,
6502         #  to provide stable order of sub-shapes. Please see
6503         #  @ref sorting_shapes_page "Description of Sorting Shapes Algorithm".
6504         #  @param aShape Shape to be exploded.
6505         #  @param aType Type of sub-shapes to be retrieved (see ShapeType())
6506         #  @return List of IDs of sub-shapes.
6507         #
6508         #  @ref swig_all_decompose "Example"
6509         @ManageTransactions("ShapesOp")
6510         def SubShapeAllSortedCentresIDs(self, aShape, aType):
6511             """
6512             Explode a shape on sub-shapes of a given type.
6513             Sub-shapes will be sorted taking into account their gravity centers,
6514             to provide stable order of sub-shapes.
6515
6516             Parameters:
6517                 aShape Shape to be exploded.
6518                 aType Type of sub-shapes to be retrieved (see geompy.ShapeType)
6519
6520             Returns:
6521                 List of IDs of sub-shapes.
6522             """
6523             ListIDs = self.ShapesOp.GetAllSubShapesIDs(aShape, EnumToLong( aType ), True)
6524             RaiseIfFailed("SubShapeAllIDs", self.ShapesOp)
6525             return ListIDs
6526
6527         ## Obtain a compound of sub-shapes of <VAR>aShape</VAR>,
6528         #  selected by they indices in sorted list of all sub-shapes of type <VAR>aType</VAR>.
6529         #  Please see @ref sorting_shapes_page "Description of Sorting Shapes Algorithm".
6530         #  Each index is in range [1, Nb_Sub-Shapes_Of_Given_Type]
6531         #  @param aShape Shape to get sub-shape of.
6532         #  @param ListOfInd List of sub-shapes indices.
6533         #  @param aType Type of sub-shapes to be retrieved (see ShapeType())
6534         #  @param theName Object name; when specified, this parameter is used
6535         #         for result publication in the study. Otherwise, if automatic
6536         #         publication is switched on, default value is used for result name.
6537         #
6538         #  @return A compound of sub-shapes of aShape.
6539         #
6540         #  @ref swig_all_decompose "Example"
6541         def SubShapeSortedCentres(self, aShape, aType, ListOfInd, theName=None):
6542             """
6543             Obtain a compound of sub-shapes of aShape,
6544             selected by they indices in sorted list of all sub-shapes of type aType.
6545             Each index is in range [1, Nb_Sub-Shapes_Of_Given_Type]
6546
6547             Parameters:
6548                 aShape Shape to get sub-shape of.
6549                 ListOfID List of sub-shapes indices.
6550                 aType Type of sub-shapes to be retrieved (see geompy.ShapeType)
6551                 theName Object name; when specified, this parameter is used
6552                         for result publication in the study. Otherwise, if automatic
6553                         publication is switched on, default value is used for result name.
6554
6555             Returns:
6556                 A compound of sub-shapes of aShape.
6557             """
6558             # Example: see GEOM_TestAll.py
6559             ListOfIDs = []
6560             AllShapeIDsList = self.SubShapeAllSortedCentresIDs(aShape, EnumToLong( aType ))
6561             for ind in ListOfInd:
6562                 ListOfIDs.append(AllShapeIDsList[ind - 1])
6563             # note: auto-publishing is done in self.GetSubShape()
6564             anObj = self.GetSubShape(aShape, ListOfIDs, theName)
6565             return anObj
6566
6567         ## Extract shapes (excluding the main shape) of given type.
6568         #  @param aShape The shape.
6569         #  @param aType  The shape type (see ShapeType())
6570         #  @param isSorted Boolean flag to switch sorting on/off. Please see
6571         #         @ref sorting_shapes_page "Description of Sorting Shapes Algorithm".
6572         #  @param theName Object name; when specified, this parameter is used
6573         #         for result publication in the study. Otherwise, if automatic
6574         #         publication is switched on, default value is used for result name.
6575         #
6576         #  @return List of sub-shapes of type aType, contained in aShape.
6577         #
6578         #  @ref swig_FilletChamfer "Example"
6579         @ManageTransactions("ShapesOp")
6580         def ExtractShapes(self, aShape, aType, isSorted = False, theName=None):
6581             """
6582             Extract shapes (excluding the main shape) of given type.
6583
6584             Parameters:
6585                 aShape The shape.
6586                 aType  The shape type (see geompy.ShapeType)
6587                 isSorted Boolean flag to switch sorting on/off.
6588                 theName Object name; when specified, this parameter is used
6589                         for result publication in the study. Otherwise, if automatic
6590                         publication is switched on, default value is used for result name.
6591
6592             Returns:
6593                 List of sub-shapes of type aType, contained in aShape.
6594             """
6595             # Example: see GEOM_TestAll.py
6596             ListObj = self.ShapesOp.ExtractSubShapes(aShape, EnumToLong( aType ), isSorted)
6597             RaiseIfFailed("ExtractSubShapes", self.ShapesOp)
6598             self._autoPublish(ListObj, theName, "subshape")
6599             return ListObj
6600
6601         ## Get a set of sub-shapes defined by their unique IDs inside <VAR>aShape</VAR>
6602         #  @param aShape Main shape.
6603         #  @param anIDs List of unique IDs of sub-shapes inside <VAR>aShape</VAR>.
6604         #  @param theName Object name; when specified, this parameter is used
6605         #         for result publication in the study. Otherwise, if automatic
6606         #         publication is switched on, default value is used for result name.
6607         #  @return List of GEOM.GEOM_Object, corresponding to found sub-shapes.
6608         #
6609         #  @ref swig_all_decompose "Example"
6610         @ManageTransactions("ShapesOp")
6611         def SubShapes(self, aShape, anIDs, theName=None):
6612             """
6613             Get a set of sub-shapes defined by their unique IDs inside theMainShape
6614
6615             Parameters:
6616                 aShape Main shape.
6617                 anIDs List of unique IDs of sub-shapes inside theMainShape.
6618                 theName Object name; when specified, this parameter is used
6619                         for result publication in the study. Otherwise, if automatic
6620                         publication is switched on, default value is used for result name.
6621
6622             Returns:
6623                 List of GEOM.GEOM_Object, corresponding to found sub-shapes.
6624             """
6625             # Example: see GEOM_TestAll.py
6626             ListObj = self.ShapesOp.MakeSubShapes(aShape, anIDs)
6627             RaiseIfFailed("SubShapes", self.ShapesOp)
6628             self._autoPublish(ListObj, theName, "subshape")
6629             return ListObj
6630
6631         ## Explode a shape into edges sorted in a row from a starting point.
6632         #  @param theShape the shape to be exploded on edges.
6633         #  @param theStartPoint the starting point.
6634         #  @param theName Object name; when specified, this parameter is used
6635         #         for result publication in the study. Otherwise, if automatic
6636         #         publication is switched on, default value is used for result name.
6637         #  @return List of GEOM.GEOM_Object that is actually an ordered list
6638         #          of edges sorted in a row from a starting point.
6639         #
6640         #  @ref swig_GetSubShapeEdgeSorted "Example"
6641         @ManageTransactions("ShapesOp")
6642         def GetSubShapeEdgeSorted(self, theShape, theStartPoint, theName=None):
6643             """
6644             Explode a shape into edges sorted in a row from a starting point.
6645
6646             Parameters:
6647                 theShape the shape to be exploded on edges.
6648                 theStartPoint the starting point.
6649                 theName Object name; when specified, this parameter is used
6650                         for result publication in the study. Otherwise, if automatic
6651                         publication is switched on, default value is used for result name.
6652
6653             Returns:
6654                 List of GEOM.GEOM_Object that is actually an ordered list
6655                 of edges sorted in a row from a starting point.
6656             """
6657             # Example: see GEOM_TestAll.py
6658             ListObj = self.ShapesOp.GetSubShapeEdgeSorted(theShape, theStartPoint)
6659             RaiseIfFailed("GetSubShapeEdgeSorted", self.ShapesOp)
6660             self._autoPublish(ListObj, theName, "SortedEdges")
6661             return ListObj
6662
6663         ##
6664         # Return the list of subshapes that satisfies a certain tolerance
6665         # criterion. The user defines the type of shapes to be returned, the
6666         # condition and the tolerance value. The operation is defined for
6667         # faces, edges and vertices only. E.g. for theShapeType FACE,
6668         # theCondition GEOM::CC_GT and theTolerance 1.e-7 this method returns
6669         # all faces of theShape that have tolerances greater then 1.e7.
6670         #
6671         #  @param theShape the shape to be exploded
6672         #  @param theShapeType the type of sub-shapes to be returned (see
6673         #         ShapeType()). Can have the values FACE, EDGE and VERTEX only.
6674         #  @param theCondition the condition type (see GEOM::comparison_condition).
6675         #  @param theTolerance the tolerance filter.
6676         #  @param theName Object name; when specified, this parameter is used
6677         #         for result publication in the study. Otherwise, if automatic
6678         #         publication is switched on, default value is used for result name.
6679         #  @return the list of shapes that satisfy the conditions.
6680         #
6681         #  @ref swig_GetSubShapesWithTolerance "Example"
6682         @ManageTransactions("ShapesOp")
6683         def GetSubShapesWithTolerance(self, theShape, theShapeType,
6684                                       theCondition, theTolerance, theName=None):
6685             """
6686             Return the list of subshapes that satisfies a certain tolerance
6687             criterion. The user defines the type of shapes to be returned, the
6688             condition and the tolerance value. The operation is defined for
6689             faces, edges and vertices only. E.g. for theShapeType FACE,
6690             theCondition GEOM::CC_GT and theTolerance 1.e-7 this method returns
6691             all faces of theShape that have tolerances greater then 1.e7.
6692             
6693             Parameters:
6694                 theShape the shape to be exploded
6695                 theShapeType the type of sub-shapes to be returned (see
6696                              ShapeType()). Can have the values FACE,
6697                              EDGE and VERTEX only.
6698                 theCondition the condition type (see GEOM::comparison_condition).
6699                 theTolerance the tolerance filter.
6700                 theName Object name; when specified, this parameter is used
6701                         for result publication in the study. Otherwise, if automatic
6702                         publication is switched on, default value is used for result name.
6703
6704             Returns:
6705                 The list of shapes that satisfy the conditions.
6706             """
6707             # Example: see GEOM_TestAll.py
6708             ListObj = self.ShapesOp.GetSubShapesWithTolerance(theShape, EnumToLong(theShapeType),
6709                                                               theCondition, theTolerance)
6710             RaiseIfFailed("GetSubShapesWithTolerance", self.ShapesOp)
6711             self._autoPublish(ListObj, theName, "SubShapeWithTolerance")
6712             return ListObj
6713
6714         ## Check if the object is a sub-object of another GEOM object.
6715         #  @param aSubObject Checked sub-object (or its parent object, in case if
6716         #         \a theSubObjectIndex is non-zero).
6717         #  @param anObject An object that is checked for ownership (or its parent object,
6718         #         in case if \a theObjectIndex is non-zero).
6719         #  @param aSubObjectIndex When non-zero, specifies a sub-shape index that
6720         #         identifies a sub-object within its parent specified via \a theSubObject.
6721         #  @param anObjectIndex When non-zero, specifies a sub-shape index that
6722         #         identifies an object within its parent specified via \a theObject.
6723         #  @return TRUE, if the given object contains sub-object.
6724         @ManageTransactions("ShapesOp")
6725         def IsSubShapeBelongsTo(self, aSubObject, anObject, aSubObjectIndex = 0, anObjectIndex = 0):
6726             """
6727             Check if the object is a sub-object of another GEOM object.
6728             
6729             Parameters:
6730                 aSubObject Checked sub-object (or its parent object, in case if
6731                     \a theSubObjectIndex is non-zero).
6732                 anObject An object that is checked for ownership (or its parent object,
6733                     in case if \a theObjectIndex is non-zero).
6734                 aSubObjectIndex When non-zero, specifies a sub-shape index that
6735                     identifies a sub-object within its parent specified via \a theSubObject.
6736                 anObjectIndex When non-zero, specifies a sub-shape index that
6737                     identifies an object within its parent specified via \a theObject.
6738
6739             Returns
6740                 TRUE, if the given object contains sub-object.
6741             """
6742             IsOk = self.ShapesOp.IsSubShapeBelongsTo(aSubObject, aSubObjectIndex, anObject, anObjectIndex)
6743             RaiseIfFailed("IsSubShapeBelongsTo", self.ShapesOp)
6744             return IsOk
6745
6746         ## Perform extraction of sub-shapes from the main shape.
6747         #
6748         #  @param theShape the main shape
6749         #  @param theListOfID the list of sub-shape IDs to be extracted from
6750         #         the main shape.
6751         #  @return New GEOM.GEOM_Object, containing the shape without
6752         #          extracted sub-shapes.
6753         #
6754         #  @ref swig_MakeExtraction "Example"
6755         @ManageTransactions("ShapesOp")
6756         def MakeExtraction(self, theShape, theListOfID, theName=None):
6757             """
6758             Perform extraction of sub-shapes from the main shape.
6759
6760             Parameters:
6761                 theShape the main shape
6762                 theListOfID the list of sub-shape IDs to be extracted from
6763                             the main shape.
6764
6765             Returns
6766                 New GEOM.GEOM_Object, containing the shape without
6767                 extracted sub-shapes.
6768             """
6769             # Example: see GEOM_TestAll.py
6770             (anObj, aStat) = self.ShapesOp.MakeExtraction(theShape, theListOfID)
6771             RaiseIfFailed("MakeExtraction", self.ShapesOp)
6772             self._autoPublish(anObj, theName, "Extraction")
6773             return anObj
6774
6775         # end of l4_decompose
6776         ## @}
6777
6778         ## @addtogroup l4_decompose_d
6779         ## @{
6780
6781         ## Deprecated method
6782         #  It works like SubShapeAllSortedCentres(), but wrongly
6783         #  defines centres of faces, shells and solids.
6784         @ManageTransactions("ShapesOp")
6785         def SubShapeAllSorted(self, aShape, aType, theName=None):
6786             """
6787             Deprecated method
6788             It works like geompy.SubShapeAllSortedCentres, but wrongly
6789             defines centres of faces, shells and solids.
6790             """
6791             ListObj = self.ShapesOp.MakeExplode(aShape, EnumToLong( aType ), True)
6792             RaiseIfFailed("MakeExplode", self.ShapesOp)
6793             self._autoPublish(ListObj, theName, "subshape")
6794             return ListObj
6795
6796         ## Deprecated method
6797         #  It works like SubShapeAllSortedCentresIDs(), but wrongly
6798         #  defines centres of faces, shells and solids.
6799         @ManageTransactions("ShapesOp")
6800         def SubShapeAllSortedIDs(self, aShape, aType):
6801             """
6802             Deprecated method
6803             It works like geompy.SubShapeAllSortedCentresIDs, but wrongly
6804             defines centres of faces, shells and solids.
6805             """
6806             ListIDs = self.ShapesOp.SubShapeAllIDs(aShape, EnumToLong( aType ), True)
6807             RaiseIfFailed("SubShapeAllIDs", self.ShapesOp)
6808             return ListIDs
6809
6810         ## Deprecated method
6811         #  It works like SubShapeSortedCentres(), but has a bug
6812         #  (wrongly defines centres of faces, shells and solids).
6813         def SubShapeSorted(self, aShape, aType, ListOfInd, theName=None):
6814             """
6815             Deprecated method
6816             It works like geompy.SubShapeSortedCentres, but has a bug
6817             (wrongly defines centres of faces, shells and solids).
6818             """
6819             ListOfIDs = []
6820             AllShapeIDsList = self.SubShapeAllSortedIDs(aShape, EnumToLong( aType ))
6821             for ind in ListOfInd:
6822                 ListOfIDs.append(AllShapeIDsList[ind - 1])
6823             # note: auto-publishing is done in self.GetSubShape()
6824             anObj = self.GetSubShape(aShape, ListOfIDs, theName)
6825             return anObj
6826
6827         # end of l4_decompose_d
6828         ## @}
6829
6830         ## @addtogroup l3_healing
6831         ## @{
6832
6833         ## Apply a sequence of Shape Healing operators to the given object.
6834         #  @param theShape Shape to be processed.
6835         #  @param theOperators List of names of operators ("FixShape", "SplitClosedFaces", etc.).
6836         #  @param theParameters List of names of parameters
6837         #                    ("FixShape.Tolerance3d", "SplitClosedFaces.NbSplitPoints", etc.).
6838         #  @param theValues List of values of parameters, in the same order
6839         #                    as parameters are listed in <VAR>theParameters</VAR> list.
6840         #  @param theName Object name; when specified, this parameter is used
6841         #         for result publication in the study. Otherwise, if automatic
6842         #         publication is switched on, default value is used for result name.
6843         #
6844         #  <b> Operators and Parameters: </b> \n
6845         #
6846         #  * \b FixShape - corrects invalid shapes. \n
6847         #  - \b FixShape.Tolerance3d - work tolerance for detection of the problems and correction of them. \n
6848         #  - \b FixShape.MaxTolerance3d - maximal possible tolerance of the shape after correction. \n
6849         #
6850         #  * \b FixFaceSize - removes small faces, such as spots and strips.\n
6851         #  - \b FixFaceSize.Tolerance - defines minimum possible face size. \n
6852         #  - \b DropSmallEdges - removes edges, which merge with neighbouring edges. \n
6853         #  - \b DropSmallEdges.Tolerance3d - defines minimum possible distance between two parallel edges.\n
6854         #  - \b DropSmallSolids - either removes small solids or merges them with neighboring ones. \n
6855         #  - \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
6856         #  - \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
6857         #  - \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
6858         #
6859         #  * \b SplitAngle - splits faces based on conical surfaces, surfaces of revolution and cylindrical
6860         #    surfaces in segments using a certain angle. \n
6861         #  - \b SplitAngle.Angle - the central angle of the resulting segments (i.e. we obtain two segments
6862         #    if Angle=180, four if Angle=90, etc). \n
6863         #  - \b SplitAngle.MaxTolerance - maximum possible tolerance among the resulting segments.\n
6864         #
6865         #  * \b SplitClosedFaces - splits closed faces in segments.
6866         #    The number of segments depends on the number of splitting points.\n
6867         #  - \b SplitClosedFaces.NbSplitPoints - the number of splitting points.\n
6868         #
6869         #  * \b SplitContinuity - splits shapes to reduce continuities of curves and surfaces.\n
6870         #  - \b SplitContinuity.Tolerance3d - 3D tolerance for correction of geometry.\n
6871         #  - \b SplitContinuity.SurfaceContinuity - required continuity for surfaces.\n
6872         #  - \b SplitContinuity.CurveContinuity - required continuity for curves.\n
6873         #   This and the previous parameters can take the following values:\n
6874         #   \b Parametric \b Continuity \n
6875         #   \b C0 (Positional Continuity): curves are joined (the end positions of curves or surfaces
6876         #   are coincidental. The curves or surfaces may still meet at an angle, giving rise to a sharp corner or edge).\n
6877         #   \b C1 (Tangential Continuity): first derivatives are equal (the end vectors of curves or surfaces are parallel,
6878         #    ruling out sharp edges).\n
6879         #   \b C2 (Curvature Continuity): first and second derivatives are equal (the end vectors of curves or surfaces
6880         #       are of the same magnitude).\n
6881         #   \b CN N-th derivatives are equal (both the direction and the magnitude of the Nth derivatives of curves
6882         #    or surfaces (d/du C(u)) are the same at junction. \n
6883         #   \b Geometric \b Continuity \n
6884         #   \b G1: first derivatives are proportional at junction.\n
6885         #   The curve tangents thus have the same direction, but not necessarily the same magnitude.
6886         #      i.e., C1'(1) = (a,b,c) and C2'(0) = (k*a, k*b, k*c).\n
6887         #   \b G2: first and second derivatives are proportional at junction.
6888         #   As the names imply, geometric continuity requires the geometry to be continuous, while parametric
6889         #    continuity requires that the underlying parameterization was continuous as well.
6890         #   Parametric continuity of order n implies geometric continuity of order n, but not vice-versa.\n
6891         #
6892         #  * \b BsplineRestriction - converts curves and surfaces to Bsplines and processes them with the following parameters:\n
6893         #  - \b BSplineRestriction.SurfaceMode - approximation of surfaces if restriction is necessary.\n
6894         #  - \b BSplineRestriction.Curve3dMode - conversion of any 3D curve to BSpline and approximation.\n
6895         #  - \b BSplineRestriction.Curve2dMode - conversion of any 2D curve to BSpline and approximation.\n
6896         #  - \b BSplineRestriction.Tolerance3d - defines the possibility of surfaces and 3D curves approximation
6897         #       with the specified parameters.\n
6898         #  - \b BSplineRestriction.Tolerance2d - defines the possibility of surfaces and 2D curves approximation
6899         #       with the specified parameters.\n
6900         #  - \b BSplineRestriction.RequiredDegree - required degree of the resulting BSplines.\n
6901         #  - \b BSplineRestriction.RequiredNbSegments - required maximum number of segments of resultant BSplines.\n
6902         #  - \b BSplineRestriction.Continuity3d - continuity of the resulting surfaces and 3D curves.\n
6903         #  - \b BSplineRestriction.Continuity2d - continuity of the resulting 2D curves.\n
6904         #
6905         #  * \b ToBezier - converts curves and surfaces of any type to Bezier curves and surfaces.\n
6906         #  - \b ToBezier.SurfaceMode - if checked in, allows conversion of surfaces.\n
6907         #  - \b ToBezier.Curve3dMode - if checked in, allows conversion of 3D curves.\n
6908         #  - \b ToBezier.Curve2dMode - if checked in, allows conversion of 2D curves.\n
6909         #  - \b ToBezier.MaxTolerance - defines tolerance for detection and correction of problems.\n
6910         #
6911         #  * \b SameParameter - fixes edges of 2D and 3D curves not having the same parameter.\n
6912         #  - \b SameParameter.Tolerance3d - defines tolerance for fixing of edges.\n
6913         #
6914         #
6915         #  @return New GEOM.GEOM_Object, containing processed shape.
6916         #
6917         #  \n @ref tui_shape_processing "Example"
6918         @ManageTransactions("HealOp")
6919         def ProcessShape(self, theShape, theOperators, theParameters, theValues, theName=None):
6920             """
6921             Apply a sequence of Shape Healing operators to the given object.
6922
6923             Parameters:
6924                 theShape Shape to be processed.
6925                 theValues List of values of parameters, in the same order
6926                           as parameters are listed in theParameters list.
6927                 theOperators List of names of operators ('FixShape', 'SplitClosedFaces', etc.).
6928                 theParameters List of names of parameters
6929                               ('FixShape.Tolerance3d', 'SplitClosedFaces.NbSplitPoints', etc.).
6930                 theName Object name; when specified, this parameter is used
6931                         for result publication in the study. Otherwise, if automatic
6932                         publication is switched on, default value is used for result name.
6933
6934                 Operators and Parameters:
6935
6936                  * FixShape - corrects invalid shapes.
6937                      * FixShape.Tolerance3d - work tolerance for detection of the problems and correction of them.
6938                      * FixShape.MaxTolerance3d - maximal possible tolerance of the shape after correction.
6939                  * FixFaceSize - removes small faces, such as spots and strips.
6940                      * FixFaceSize.Tolerance - defines minimum possible face size.
6941                  * DropSmallEdges - removes edges, which merge with neighbouring edges.
6942                      * DropSmallEdges.Tolerance3d - defines minimum possible distance between two parallel edges.
6943                  * DropSmallSolids - either removes small solids or merges them with neighboring ones.
6944                      * 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.
6945                      * 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.
6946                      * 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.
6947
6948                  * SplitAngle - splits faces based on conical surfaces, surfaces of revolution and cylindrical surfaces
6949                                 in segments using a certain angle.
6950                      * SplitAngle.Angle - the central angle of the resulting segments (i.e. we obtain two segments
6951                                           if Angle=180, four if Angle=90, etc).
6952                      * SplitAngle.MaxTolerance - maximum possible tolerance among the resulting segments.
6953                  * SplitClosedFaces - splits closed faces in segments. The number of segments depends on the number of
6954                                       splitting points.
6955                      * SplitClosedFaces.NbSplitPoints - the number of splitting points.
6956                  * SplitContinuity - splits shapes to reduce continuities of curves and surfaces.
6957                      * SplitContinuity.Tolerance3d - 3D tolerance for correction of geometry.
6958                      * SplitContinuity.SurfaceContinuity - required continuity for surfaces.
6959                      * SplitContinuity.CurveContinuity - required continuity for curves.
6960                        This and the previous parameters can take the following values:
6961
6962                        Parametric Continuity:
6963                        C0 (Positional Continuity): curves are joined (the end positions of curves or surfaces are
6964                                                    coincidental. The curves or surfaces may still meet at an angle,
6965                                                    giving rise to a sharp corner or edge).
6966                        C1 (Tangential Continuity): first derivatives are equal (the end vectors of curves or surfaces
6967                                                    are parallel, ruling out sharp edges).
6968                        C2 (Curvature Continuity): first and second derivatives are equal (the end vectors of curves
6969                                                   or surfaces are of the same magnitude).
6970                        CN N-th derivatives are equal (both the direction and the magnitude of the Nth derivatives of
6971                           curves or surfaces (d/du C(u)) are the same at junction.
6972
6973                        Geometric Continuity:
6974                        G1: first derivatives are proportional at junction.
6975                            The curve tangents thus have the same direction, but not necessarily the same magnitude.
6976                            i.e., C1'(1) = (a,b,c) and C2'(0) = (k*a, k*b, k*c).
6977                        G2: first and second derivatives are proportional at junction. As the names imply,
6978                            geometric continuity requires the geometry to be continuous, while parametric continuity requires
6979                            that the underlying parameterization was continuous as well. Parametric continuity of order n implies
6980                            geometric continuity of order n, but not vice-versa.
6981                  * BsplineRestriction - converts curves and surfaces to Bsplines and processes them with the following parameters:
6982                      * BSplineRestriction.SurfaceMode - approximation of surfaces if restriction is necessary.
6983                      * BSplineRestriction.Curve3dMode - conversion of any 3D curve to BSpline and approximation.
6984                      * BSplineRestriction.Curve2dMode - conversion of any 2D curve to BSpline and approximation.
6985                      * BSplineRestriction.Tolerance3d - defines the possibility of surfaces and 3D curves approximation with
6986                                                         the specified parameters.
6987                      * BSplineRestriction.Tolerance2d - defines the possibility of surfaces and 2D curves approximation with
6988                                                         the specified parameters.
6989                      * BSplineRestriction.RequiredDegree - required degree of the resulting BSplines.
6990                      * BSplineRestriction.RequiredNbSegments - required maximum number of segments of resultant BSplines.
6991                      * BSplineRestriction.Continuity3d - continuity of the resulting surfaces and 3D curves.
6992                      * BSplineRestriction.Continuity2d - continuity of the resulting 2D curves.
6993                  * ToBezier - converts curves and surfaces of any type to Bezier curves and surfaces.
6994                      * ToBezier.SurfaceMode - if checked in, allows conversion of surfaces.
6995                      * ToBezier.Curve3dMode - if checked in, allows conversion of 3D curves.
6996                      * ToBezier.Curve2dMode - if checked in, allows conversion of 2D curves.
6997                      * ToBezier.MaxTolerance - defines tolerance for detection and correction of problems.
6998                  * SameParameter - fixes edges of 2D and 3D curves not having the same parameter.
6999                      * SameParameter.Tolerance3d - defines tolerance for fixing of edges.
7000
7001             Returns:
7002                 New GEOM.GEOM_Object, containing processed shape.
7003
7004             Note: For more information look through SALOME Geometry User's Guide->
7005                   -> Introduction to Geometry-> Repairing Operations-> Shape Processing
7006             """
7007             # Example: see GEOM_TestHealing.py
7008             theValues,Parameters = ParseList(theValues)
7009             anObj = self.HealOp.ProcessShape(theShape, theOperators, theParameters, theValues)
7010             # To avoid script failure in case of good argument shape
7011             if self.HealOp.GetErrorCode() == "ShHealOper_NotError_msg":
7012                 return theShape
7013             RaiseIfFailed("ProcessShape", self.HealOp)
7014             for string in (theOperators + theParameters):
7015                 Parameters = ":" + Parameters
7016                 pass
7017             anObj.SetParameters(Parameters)
7018             self._autoPublish(anObj, theName, "healed")
7019             return anObj
7020
7021         ## Remove faces from the given object (shape).
7022         #  @param theObject Shape to be processed.
7023         #  @param theFaces Indices of faces to be removed, if EMPTY then the method
7024         #                  removes ALL faces of the given object.
7025         #  @param theName Object name; when specified, this parameter is used
7026         #         for result publication in the study. Otherwise, if automatic
7027         #         publication is switched on, default value is used for result name.
7028         #
7029         #  @return New GEOM.GEOM_Object, containing processed shape.
7030         #
7031         #  @ref tui_suppress_faces "Example"
7032         @ManageTransactions("HealOp")
7033         def SuppressFaces(self, theObject, theFaces, theName=None):
7034             """
7035             Remove faces from the given object (shape).
7036
7037             Parameters:
7038                 theObject Shape to be processed.
7039                 theFaces Indices of faces to be removed, if EMPTY then the method
7040                          removes ALL faces of the given object.
7041                 theName Object name; when specified, this parameter is used
7042                         for result publication in the study. Otherwise, if automatic
7043                         publication is switched on, default value is used for result name.
7044
7045             Returns:
7046                 New GEOM.GEOM_Object, containing processed shape.
7047             """
7048             # Example: see GEOM_TestHealing.py
7049             anObj = self.HealOp.SuppressFaces(theObject, theFaces)
7050             RaiseIfFailed("SuppressFaces", self.HealOp)
7051             self._autoPublish(anObj, theName, "suppressFaces")
7052             return anObj
7053
7054         ## Sewing of faces into a single shell.
7055         #  @param ListShape Shapes to be processed.
7056         #  @param theTolerance Required tolerance value.
7057         #  @param AllowNonManifold Flag that allows non-manifold sewing.
7058         #  @param theName Object name; when specified, this parameter is used
7059         #         for result publication in the study. Otherwise, if automatic
7060         #         publication is switched on, default value is used for result name.
7061         #
7062         #  @return New GEOM.GEOM_Object, containing a result shell.
7063         #
7064         #  @ref tui_sewing "Example"
7065         def MakeSewing(self, ListShape, theTolerance, AllowNonManifold=False, theName=None):
7066             """
7067             Sewing of faces into a single shell.
7068
7069             Parameters:
7070                 ListShape Shapes to be processed.
7071                 theTolerance Required tolerance value.
7072                 AllowNonManifold Flag that allows non-manifold sewing.
7073                 theName Object name; when specified, this parameter is used
7074                         for result publication in the study. Otherwise, if automatic
7075                         publication is switched on, default value is used for result name.
7076
7077             Returns:
7078                 New GEOM.GEOM_Object, containing containing a result shell.
7079             """
7080             # Example: see GEOM_TestHealing.py
7081             # note: auto-publishing is done in self.Sew()
7082             anObj = self.Sew(ListShape, theTolerance, AllowNonManifold, theName)
7083             return anObj
7084
7085         ## Sewing of faces into a single shell.
7086         #  @param ListShape Shapes to be processed.
7087         #  @param theTolerance Required tolerance value.
7088         #  @param AllowNonManifold Flag that allows non-manifold sewing.
7089         #  @param theName Object name; when specified, this parameter is used
7090         #         for result publication in the study. Otherwise, if automatic
7091         #         publication is switched on, default value is used for result name.
7092         #
7093         #  @return New GEOM.GEOM_Object, containing a result shell.
7094         @ManageTransactions("HealOp")
7095         def Sew(self, ListShape, theTolerance, AllowNonManifold=False, theName=None):
7096             """
7097             Sewing of faces into a single shell.
7098
7099             Parameters:
7100                 ListShape Shapes to be processed.
7101                 theTolerance Required tolerance value.
7102                 AllowNonManifold Flag that allows non-manifold sewing.
7103                 theName Object name; when specified, this parameter is used
7104                         for result publication in the study. Otherwise, if automatic
7105                         publication is switched on, default value is used for result name.
7106
7107             Returns:
7108                 New GEOM.GEOM_Object, containing a result shell.
7109             """
7110             # Example: see MakeSewing() above
7111             theTolerance,Parameters = ParseParameters(theTolerance)
7112             if AllowNonManifold:
7113                 anObj = self.HealOp.SewAllowNonManifold( ToList( ListShape ), theTolerance)
7114             else:
7115                 anObj = self.HealOp.Sew( ToList( ListShape ), theTolerance)
7116             # To avoid script failure in case of good argument shape
7117             # (Fix of test cases geom/bugs11/L7,L8)
7118             if self.HealOp.GetErrorCode() == "ShHealOper_NotError_msg":
7119                 return anObj
7120             RaiseIfFailed("Sew", self.HealOp)
7121             anObj.SetParameters(Parameters)
7122             self._autoPublish(anObj, theName, "sewed")
7123             return anObj
7124
7125         ## Rebuild the topology of theSolids by removing
7126         #  the faces that are shared by several solids.
7127         #  @param theSolids A compound or a list of solids to be processed.
7128         #  @param theName Object name; when specified, this parameter is used
7129         #         for result publication in the study. Otherwise, if automatic
7130         #         publication is switched on, default value is used for result name.
7131         #
7132         #  @return New GEOM.GEOM_Object, containing processed shape.
7133         #
7134         #  @ref tui_remove_webs "Example"
7135         @ManageTransactions("HealOp")
7136         def RemoveInternalFaces (self, theSolids, theName=None):
7137             """
7138             Rebuild the topology of theSolids by removing
7139             the faces that are shared by several solids.
7140
7141             Parameters:
7142                 theSolids A compound or a list of solids to be processed.
7143                 theName Object name; when specified, this parameter is used
7144                         for result publication in the study. Otherwise, if automatic
7145                         publication is switched on, default value is used for result name.
7146
7147             Returns:
7148                 New GEOM.GEOM_Object, containing processed shape.
7149             """
7150             # Example: see GEOM_TestHealing.py
7151             anObj = self.HealOp.RemoveInternalFaces(ToList(theSolids))
7152             RaiseIfFailed("RemoveInternalFaces", self.HealOp)
7153             self._autoPublish(anObj, theName, "removeWebs")
7154             return anObj
7155
7156         ## Remove internal wires and edges from the given object (face).
7157         #  @param theObject Shape to be processed.
7158         #  @param theWires Indices of wires to be removed, if EMPTY then the method
7159         #                  removes ALL internal wires of the given object.
7160         #  @param theName Object name; when specified, this parameter is used
7161         #         for result publication in the study. Otherwise, if automatic
7162         #         publication is switched on, default value is used for result name.
7163         #
7164         #  @return New GEOM.GEOM_Object, containing processed shape.
7165         #
7166         #  @ref tui_suppress_internal_wires "Example"
7167         @ManageTransactions("HealOp")
7168         def SuppressInternalWires(self, theObject, theWires, theName=None):
7169             """
7170             Remove internal wires and edges from the given object (face).
7171
7172             Parameters:
7173                 theObject Shape to be processed.
7174                 theWires Indices of wires to be removed, if EMPTY then the method
7175                          removes ALL internal wires of the given object.
7176                 theName Object name; when specified, this parameter is used
7177                         for result publication in the study. Otherwise, if automatic
7178                         publication is switched on, default value is used for result name.
7179
7180             Returns:
7181                 New GEOM.GEOM_Object, containing processed shape.
7182             """
7183             # Example: see GEOM_TestHealing.py
7184             anObj = self.HealOp.RemoveIntWires(theObject, theWires)
7185             RaiseIfFailed("RemoveIntWires", self.HealOp)
7186             self._autoPublish(anObj, theName, "suppressWires")
7187             return anObj
7188
7189         ## Remove internal closed contours (holes) from the given object.
7190         #  @param theObject Shape to be processed.
7191         #  @param theWires Indices of wires to be removed, if EMPTY then the method
7192         #                  removes ALL internal holes of the given object
7193         #  @param theName Object name; when specified, this parameter is used
7194         #         for result publication in the study. Otherwise, if automatic
7195         #         publication is switched on, default value is used for result name.
7196         #
7197         #  @return New GEOM.GEOM_Object, containing processed shape.
7198         #
7199         #  @ref tui_suppress_holes "Example"
7200         @ManageTransactions("HealOp")
7201         def SuppressHoles(self, theObject, theWires, theName=None):
7202             """
7203             Remove internal closed contours (holes) from the given object.
7204
7205             Parameters:
7206                 theObject Shape to be processed.
7207                 theWires Indices of wires to be removed, if EMPTY then the method
7208                          removes ALL internal holes of the given object
7209                 theName Object name; when specified, this parameter is used
7210                         for result publication in the study. Otherwise, if automatic
7211                         publication is switched on, default value is used for result name.
7212
7213             Returns:
7214                 New GEOM.GEOM_Object, containing processed shape.
7215             """
7216             # Example: see GEOM_TestHealing.py
7217             anObj = self.HealOp.FillHoles(theObject, theWires)
7218             RaiseIfFailed("FillHoles", self.HealOp)
7219             self._autoPublish(anObj, theName, "suppressHoles")
7220             return anObj
7221
7222         ## Close an open wire.
7223         #  @param theObject Shape to be processed.
7224         #  @param theWires Indexes of edge(s) and wire(s) to be closed within <VAR>theObject</VAR>'s shape,
7225         #                  if [ ], then <VAR>theObject</VAR> itself is a wire.
7226         #  @param isCommonVertex If True  : closure by creation of a common vertex,
7227         #                        If False : closure by creation of an edge between ends.
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_close_contour "Example"
7235         @ManageTransactions("HealOp")
7236         def CloseContour(self,theObject, theWires, isCommonVertex, theName=None):
7237             """
7238             Close an open wire.
7239
7240             Parameters:
7241                 theObject Shape to be processed.
7242                 theWires Indexes of edge(s) and wire(s) to be closed within theObject's shape,
7243                          if [ ], then theObject itself is a wire.
7244                 isCommonVertex If True  : closure by creation of a common vertex,
7245                                If False : closure by creation of an edge between ends.
7246                 theName Object name; when specified, this parameter is used
7247                         for result publication in the study. Otherwise, if automatic
7248                         publication is switched on, default value is used for result name.
7249
7250             Returns:
7251                 New GEOM.GEOM_Object, containing processed shape.
7252             """
7253             # Example: see GEOM_TestHealing.py
7254             anObj = self.HealOp.CloseContour(theObject, theWires, isCommonVertex)
7255             RaiseIfFailed("CloseContour", self.HealOp)
7256             self._autoPublish(anObj, theName, "closeContour")
7257             return anObj
7258
7259         ## Addition of a point to a given edge object.
7260         #  @param theObject Shape to be processed.
7261         #  @param theEdgeIndex Index of edge to be divided within theObject's shape,
7262         #                      if -1, then theObject itself is the edge.
7263         #  @param theValue Value of parameter on edge or length parameter,
7264         #                  depending on \a isByParameter.
7265         #  @param isByParameter If TRUE : \a theValue is treated as a curve parameter [0..1], \n
7266         #                       if FALSE : \a theValue is treated as a length parameter [0..1]
7267         #  @param theName Object name; when specified, this parameter is used
7268         #         for result publication in the study. Otherwise, if automatic
7269         #         publication is switched on, default value is used for result name.
7270         #
7271         #  @return New GEOM.GEOM_Object, containing processed shape.
7272         #
7273         #  @ref tui_add_point_on_edge "Example"
7274         @ManageTransactions("HealOp")
7275         def DivideEdge(self, theObject, theEdgeIndex, theValue, isByParameter, theName=None):
7276             """
7277             Addition of a point to a given edge object.
7278
7279             Parameters:
7280                 theObject Shape to be processed.
7281                 theEdgeIndex Index of edge to be divided within theObject's shape,
7282                              if -1, then theObject itself is the edge.
7283                 theValue Value of parameter on edge or length parameter,
7284                          depending on isByParameter.
7285                 isByParameter If TRUE :  theValue is treated as a curve parameter [0..1],
7286                               if FALSE : theValue is treated as a length parameter [0..1]
7287                 theName Object name; when specified, this parameter is used
7288                         for result publication in the study. Otherwise, if automatic
7289                         publication is switched on, default value is used for result name.
7290
7291             Returns:
7292                 New GEOM.GEOM_Object, containing processed shape.
7293             """
7294             # Example: see GEOM_TestHealing.py
7295             theEdgeIndex,theValue,isByParameter,Parameters = ParseParameters(theEdgeIndex,theValue,isByParameter)
7296             anObj = self.HealOp.DivideEdge(theObject, theEdgeIndex, theValue, isByParameter)
7297             RaiseIfFailed("DivideEdge", self.HealOp)
7298             anObj.SetParameters(Parameters)
7299             self._autoPublish(anObj, theName, "divideEdge")
7300             return anObj
7301
7302         ## Addition of points to a given edge of \a theObject by projecting
7303         #  other points to the given edge.
7304         #  @param theObject Shape to be processed.
7305         #  @param theEdgeIndex Index of edge to be divided within theObject's shape,
7306         #                      if -1, then theObject itself is the edge.
7307         #  @param thePoints List of points to project to theEdgeIndex-th edge.
7308         #  @param theName Object name; when specified, this parameter is used
7309         #         for result publication in the study. Otherwise, if automatic
7310         #         publication is switched on, default value is used for result name.
7311         #
7312         #  @return New GEOM.GEOM_Object, containing processed shape.
7313         #
7314         #  @ref tui_add_point_on_edge "Example"
7315         @ManageTransactions("HealOp")
7316         def DivideEdgeByPoint(self, theObject, theEdgeIndex, thePoints, theName=None):
7317             """
7318             Addition of points to a given edge of \a theObject by projecting
7319             other points to the given edge.
7320
7321             Parameters:
7322                 theObject Shape to be processed.
7323                 theEdgeIndex The edge or its index to be divided within theObject's shape,
7324                              if -1, then theObject itself is the edge.
7325                 thePoints List of points to project to theEdgeIndex-th edge.
7326                 theName Object name; when specified, this parameter is used
7327                         for result publication in the study. Otherwise, if automatic
7328                         publication is switched on, default value is used for result name.
7329
7330             Returns:
7331                 New GEOM.GEOM_Object, containing processed shape.
7332             """
7333             # Example: see GEOM_TestHealing.py
7334             if isinstance( theEdgeIndex, GEOM._objref_GEOM_Object ):
7335                 theEdgeIndex = self.GetSubShapeID( theObject, theEdgeIndex )
7336             anObj = self.HealOp.DivideEdgeByPoint(theObject, theEdgeIndex, ToList( thePoints ))
7337             RaiseIfFailed("DivideEdgeByPoint", self.HealOp)
7338             self._autoPublish(anObj, theName, "divideEdge")
7339             return anObj
7340
7341         ## Suppress the vertices in the wire in case if adjacent edges are C1 continuous.
7342         #  @param theWire Wire to minimize the number of C1 continuous edges in.
7343         #  @param theVertices A list of vertices to suppress. If the list
7344         #                     is empty, all vertices in a wire will be assumed.
7345         #  @param theName Object name; when specified, this parameter is used
7346         #         for result publication in the study. Otherwise, if automatic
7347         #         publication is switched on, default value is used for result name.
7348         #
7349         #  @return New GEOM.GEOM_Object with modified wire.
7350         #
7351         #  @ref tui_fuse_collinear_edges "Example"
7352         @ManageTransactions("HealOp")
7353         def FuseCollinearEdgesWithinWire(self, theWire, theVertices = [], theName=None):
7354             """
7355             Suppress the vertices in the wire in case if adjacent edges are C1 continuous.
7356
7357             Parameters:
7358                 theWire Wire to minimize the number of C1 continuous edges in.
7359                 theVertices A list of vertices to suppress. If the list
7360                             is empty, all vertices in a wire will be assumed.
7361                 theName Object name; when specified, this parameter is used
7362                         for result publication in the study. Otherwise, if automatic
7363                         publication is switched on, default value is used for result name.
7364
7365             Returns:
7366                 New GEOM.GEOM_Object with modified wire.
7367             """
7368             anObj = self.HealOp.FuseCollinearEdgesWithinWire(theWire, theVertices)
7369             RaiseIfFailed("FuseCollinearEdgesWithinWire", self.HealOp)
7370             self._autoPublish(anObj, theName, "fuseEdges")
7371             return anObj
7372
7373         ## Change orientation of the given object. Updates given shape.
7374         #  @param theObject Shape to be processed.
7375         #  @return Updated <var>theObject</var>
7376         #
7377         #  @ref swig_todo "Example"
7378         @ManageTransactions("HealOp")
7379         def ChangeOrientationShell(self,theObject):
7380             """
7381             Change orientation of the given object. Updates given shape.
7382
7383             Parameters:
7384                 theObject Shape to be processed.
7385
7386             Returns:
7387                 Updated theObject
7388             """
7389             theObject = self.HealOp.ChangeOrientation(theObject)
7390             RaiseIfFailed("ChangeOrientation", self.HealOp)
7391             pass
7392
7393         ## Change orientation of the given object.
7394         #  @param theObject Shape to be processed.
7395         #  @param theName Object name; when specified, this parameter is used
7396         #         for result publication in the study. Otherwise, if automatic
7397         #         publication is switched on, default value is used for result name.
7398         #
7399         #  @return New GEOM.GEOM_Object, containing processed shape.
7400         #
7401         #  @ref swig_todo "Example"
7402         @ManageTransactions("HealOp")
7403         def ChangeOrientationShellCopy(self, theObject, theName=None):
7404             """
7405             Change orientation of the given object.
7406
7407             Parameters:
7408                 theObject Shape to be processed.
7409                 theName Object name; when specified, this parameter is used
7410                         for result publication in the study. Otherwise, if automatic
7411                         publication is switched on, default value is used for result name.
7412
7413             Returns:
7414                 New GEOM.GEOM_Object, containing processed shape.
7415             """
7416             anObj = self.HealOp.ChangeOrientationCopy(theObject)
7417             RaiseIfFailed("ChangeOrientationCopy", self.HealOp)
7418             self._autoPublish(anObj, theName, "reversed")
7419             return anObj
7420
7421         ## Try to limit tolerance of the given object by value \a theTolerance.
7422         #  @param theObject Shape to be processed.
7423         #  @param theTolerance Required tolerance value.
7424         #  @param theName Object name; when specified, this parameter is used
7425         #         for result publication in the study. Otherwise, if automatic
7426         #         publication is switched on, default value is used for result name.
7427         #
7428         #  @return New GEOM.GEOM_Object, containing processed shape.
7429         #
7430         #  @ref tui_limit_tolerance "Example"
7431         @ManageTransactions("HealOp")
7432         def LimitTolerance(self, theObject, theTolerance = 1e-07, theName=None):
7433             """
7434             Try to limit tolerance of the given object by value theTolerance.
7435
7436             Parameters:
7437                 theObject Shape to be processed.
7438                 theTolerance Required tolerance value.
7439                 theName Object name; when specified, this parameter is used
7440                         for result publication in the study. Otherwise, if automatic
7441                         publication is switched on, default value is used for result name.
7442
7443             Returns:
7444                 New GEOM.GEOM_Object, containing processed shape.
7445             """
7446             anObj = self.HealOp.LimitTolerance(theObject, theTolerance)
7447             RaiseIfFailed("LimitTolerance", self.HealOp)
7448             self._autoPublish(anObj, theName, "limitTolerance")
7449             return anObj
7450
7451         ## Get a list of wires (wrapped in GEOM.GEOM_Object-s),
7452         #  that constitute a free boundary of the given shape.
7453         #  @param theObject Shape to get free boundary of.
7454         #  @param theName Object name; when specified, this parameter is used
7455         #         for result publication in the study. Otherwise, if automatic
7456         #         publication is switched on, default value is used for result name.
7457         #
7458         #  @return [\a status, \a theClosedWires, \a theOpenWires]
7459         #  \n \a status: FALSE, if an error(s) occurred during the method execution.
7460         #  \n \a theClosedWires: Closed wires on the free boundary of the given shape.
7461         #  \n \a theOpenWires: Open wires on the free boundary of the given shape.
7462         #
7463         #  @ref tui_free_boundaries_page "Example"
7464         @ManageTransactions("HealOp")
7465         def GetFreeBoundary(self, theObject, theName=None):
7466             """
7467             Get a list of wires (wrapped in GEOM.GEOM_Object-s),
7468             that constitute a free boundary of the given shape.
7469
7470             Parameters:
7471                 theObject Shape to get free boundary of.
7472                 theName Object name; when specified, this parameter is used
7473                         for result publication in the study. Otherwise, if automatic
7474                         publication is switched on, default value is used for result name.
7475
7476             Returns:
7477                 [status, theClosedWires, theOpenWires]
7478                  status: FALSE, if an error(s) occurred during the method execution.
7479                  theClosedWires: Closed wires on the free boundary of the given shape.
7480                  theOpenWires: Open wires on the free boundary of the given shape.
7481             """
7482             # Example: see GEOM_TestHealing.py
7483             anObj = self.HealOp.GetFreeBoundary( ToList( theObject ))
7484             RaiseIfFailed("GetFreeBoundary", self.HealOp)
7485             self._autoPublish(anObj[1], theName, "closedWire")
7486             self._autoPublish(anObj[2], theName, "openWire")
7487             return anObj
7488
7489         ## Replace coincident faces in \a theShapes by one face.
7490         #  @param theShapes Initial shapes, either a list or compound of shapes.
7491         #  @param theTolerance Maximum distance between faces, which can be considered as coincident.
7492         #  @param doKeepNonSolids If FALSE, only solids will present in the result,
7493         #                         otherwise all initial shapes.
7494         #  @param theName Object name; when specified, this parameter is used
7495         #         for result publication in the study. Otherwise, if automatic
7496         #         publication is switched on, default value is used for result name.
7497         #
7498         #  @return New GEOM.GEOM_Object, containing copies of theShapes without coincident faces.
7499         #
7500         #  @ref tui_glue_faces "Example"
7501         @ManageTransactions("ShapesOp")
7502         def MakeGlueFaces(self, theShapes, theTolerance, doKeepNonSolids=True, theName=None):
7503             """
7504             Replace coincident faces in theShapes by one face.
7505
7506             Parameters:
7507                 theShapes Initial shapes, either a list or compound of shapes.
7508                 theTolerance Maximum distance between faces, which can be considered as coincident.
7509                 doKeepNonSolids If FALSE, only solids will present in the result,
7510                                 otherwise all initial shapes.
7511                 theName Object name; when specified, this parameter is used
7512                         for result publication in the study. Otherwise, if automatic
7513                         publication is switched on, default value is used for result name.
7514
7515             Returns:
7516                 New GEOM.GEOM_Object, containing copies of theShapes without coincident faces.
7517             """
7518             # Example: see GEOM_Spanner.py
7519             theTolerance,Parameters = ParseParameters(theTolerance)
7520             anObj = self.ShapesOp.MakeGlueFaces(ToList(theShapes), theTolerance, doKeepNonSolids)
7521             if anObj is None:
7522                 raise RuntimeError("MakeGlueFaces : " + self.ShapesOp.GetErrorCode())
7523             anObj.SetParameters(Parameters)
7524             self._autoPublish(anObj, theName, "glueFaces")
7525             return anObj
7526
7527         ## Find coincident faces in \a theShapes for possible gluing.
7528         #  @param theShapes Initial shapes, either a list or compound of shapes.
7529         #  @param theTolerance Maximum distance between faces,
7530         #                      which can be considered as coincident.
7531         #  @param theName Object name; when specified, this parameter is used
7532         #         for result publication in the study. Otherwise, if automatic
7533         #         publication is switched on, default value is used for result name.
7534         #
7535         #  @return GEOM.ListOfGO
7536         #
7537         #  @ref tui_glue_faces "Example"
7538         @ManageTransactions("ShapesOp")
7539         def GetGlueFaces(self, theShapes, theTolerance, theName=None):
7540             """
7541             Find coincident faces in theShapes for possible gluing.
7542
7543             Parameters:
7544                 theShapes Initial shapes, either a list or compound of shapes.
7545                 theTolerance Maximum distance between faces,
7546                              which can be considered as coincident.
7547                 theName Object name; when specified, this parameter is used
7548                         for result publication in the study. Otherwise, if automatic
7549                         publication is switched on, default value is used for result name.
7550
7551             Returns:
7552                 GEOM.ListOfGO
7553             """
7554             anObj = self.ShapesOp.GetGlueFaces(ToList(theShapes), theTolerance)
7555             RaiseIfFailed("GetGlueFaces", self.ShapesOp)
7556             self._autoPublish(anObj, theName, "facesToGlue")
7557             return anObj
7558
7559         ## Replace coincident faces in \a theShapes by one face
7560         #  in compliance with given list of faces
7561         #  @param theShapes Initial shapes, either a list or compound of shapes.
7562         #  @param theTolerance Maximum distance between faces,
7563         #                      which can be considered as coincident.
7564         #  @param theFaces List of faces for gluing.
7565         #  @param doKeepNonSolids If FALSE, only solids will present in the result,
7566         #                         otherwise all initial shapes.
7567         #  @param doGlueAllEdges If TRUE, all coincident edges of <VAR>theShape</VAR>
7568         #                        will be glued, otherwise only the edges,
7569         #                        belonging to <VAR>theFaces</VAR>.
7570         #  @param theName Object name; when specified, this parameter is used
7571         #         for result publication in the study. Otherwise, if automatic
7572         #         publication is switched on, default value is used for result name.
7573         #
7574         #  @return New GEOM.GEOM_Object, containing copies of theShapes without coincident faces.
7575         #
7576         #  @ref tui_glue_faces "Example"
7577         @ManageTransactions("ShapesOp")
7578         def MakeGlueFacesByList(self, theShapes, theTolerance, theFaces,
7579                                 doKeepNonSolids=True, doGlueAllEdges=True, theName=None):
7580             """
7581             Replace coincident faces in theShapes by one face
7582             in compliance with given list of faces
7583
7584             Parameters:
7585                 theShapes theShapes Initial shapes, either a list or compound of shapes.
7586                 theTolerance Maximum distance between faces,
7587                              which can be considered as coincident.
7588                 theFaces List of faces for gluing.
7589                 doKeepNonSolids If FALSE, only solids will present in the result,
7590                                 otherwise all initial shapes.
7591                 doGlueAllEdges If TRUE, all coincident edges of theShape
7592                                will be glued, otherwise only the edges,
7593                                belonging to theFaces.
7594                 theName Object name; when specified, this parameter is used
7595                         for result publication in the study. Otherwise, if automatic
7596                         publication is switched on, default value is used for result name.
7597
7598             Returns:
7599                 New GEOM.GEOM_Object, containing copies of theShapes without coincident faces.
7600             """
7601             anObj = self.ShapesOp.MakeGlueFacesByList(ToList(theShapes), theTolerance, ToList(theFaces),
7602                                                       doKeepNonSolids, doGlueAllEdges)
7603             if anObj is None:
7604                 raise RuntimeError("MakeGlueFacesByList : " + self.ShapesOp.GetErrorCode())
7605             self._autoPublish(anObj, theName, "glueFaces")
7606             return anObj
7607
7608         ## Replace coincident edges in \a theShapes by one edge.
7609         #  @param theShapes Initial shapes, either a list or compound of shapes.
7610         #  @param theTolerance Maximum distance between edges, which can be considered as coincident.
7611         #  @param theName Object name; when specified, this parameter is used
7612         #         for result publication in the study. Otherwise, if automatic
7613         #         publication is switched on, default value is used for result name.
7614         #
7615         #  @return New GEOM.GEOM_Object, containing copies of theShapes without coincident edges.
7616         #
7617         #  @ref tui_glue_edges "Example"
7618         @ManageTransactions("ShapesOp")
7619         def MakeGlueEdges(self, theShapes, theTolerance, theName=None):
7620             """
7621             Replace coincident edges in theShapes by one edge.
7622
7623             Parameters:
7624                 theShapes Initial shapes, either a list or compound of shapes.
7625                 theTolerance Maximum distance between edges, which can be considered as coincident.
7626                 theName Object name; when specified, this parameter is used
7627                         for result publication in the study. Otherwise, if automatic
7628                         publication is switched on, default value is used for result name.
7629
7630             Returns:
7631                 New GEOM.GEOM_Object, containing copies of theShapes without coincident edges.
7632             """
7633             theTolerance,Parameters = ParseParameters(theTolerance)
7634             anObj = self.ShapesOp.MakeGlueEdges(ToList(theShapes), theTolerance)
7635             if anObj is None:
7636                 raise RuntimeError("MakeGlueEdges : " + self.ShapesOp.GetErrorCode())
7637             anObj.SetParameters(Parameters)
7638             self._autoPublish(anObj, theName, "glueEdges")
7639             return anObj
7640
7641         ## Find coincident edges in \a theShapes for possible gluing.
7642         #  @param theShapes Initial shapes, either a list or compound of shapes.
7643         #  @param theTolerance Maximum distance between edges,
7644         #                      which can be considered as coincident.
7645         #  @param theName Object name; when specified, this parameter is used
7646         #         for result publication in the study. Otherwise, if automatic
7647         #         publication is switched on, default value is used for result name.
7648         #
7649         #  @return GEOM.ListOfGO
7650         #
7651         #  @ref tui_glue_edges "Example"
7652         @ManageTransactions("ShapesOp")
7653         def GetGlueEdges(self, theShapes, theTolerance, theName=None):
7654             """
7655             Find coincident edges in theShapes for possible gluing.
7656
7657             Parameters:
7658                 theShapes Initial shapes, either a list or compound of shapes.
7659                 theTolerance Maximum distance between edges,
7660                              which can be considered as coincident.
7661                 theName Object name; when specified, this parameter is used
7662                         for result publication in the study. Otherwise, if automatic
7663                         publication is switched on, default value is used for result name.
7664
7665             Returns:
7666                 GEOM.ListOfGO
7667             """
7668             anObj = self.ShapesOp.GetGlueEdges(ToList(theShapes), theTolerance)
7669             RaiseIfFailed("GetGlueEdges", self.ShapesOp)
7670             self._autoPublish(anObj, theName, "edgesToGlue")
7671             return anObj
7672
7673         ## Replace coincident edges in theShapes by one edge
7674         #  in compliance with given list of edges.
7675         #  @param theShapes Initial shapes, either a list or compound of shapes.
7676         #  @param theTolerance Maximum distance between edges,
7677         #                      which can be considered as coincident.
7678         #  @param theEdges List of edges for gluing.
7679         #  @param theName Object name; when specified, this parameter is used
7680         #         for result publication in the study. Otherwise, if automatic
7681         #         publication is switched on, default value is used for result name.
7682         #
7683         #  @return New GEOM.GEOM_Object, containing copies of theShapes without coincident edges.
7684         #
7685         #  @ref tui_glue_edges "Example"
7686         @ManageTransactions("ShapesOp")
7687         def MakeGlueEdgesByList(self, theShapes, theTolerance, theEdges, theName=None):
7688             """
7689             Replace coincident edges in theShapes by one edge
7690             in compliance with given list of edges.
7691
7692             Parameters:
7693                 theShapes Initial shapes, either a list or compound of shapes.
7694                 theTolerance Maximum distance between edges,
7695                              which can be considered as coincident.
7696                 theEdges List of edges for gluing.
7697                 theName Object name; when specified, this parameter is used
7698                         for result publication in the study. Otherwise, if automatic
7699                         publication is switched on, default value is used for result name.
7700
7701             Returns:
7702                 New GEOM.GEOM_Object, containing copies of theShapes without coincident edges.
7703             """
7704             anObj = self.ShapesOp.MakeGlueEdgesByList(ToList(theShapes), theTolerance, theEdges)
7705             if anObj is None:
7706                 raise RuntimeError("MakeGlueEdgesByList : " + self.ShapesOp.GetErrorCode())
7707             self._autoPublish(anObj, theName, "glueEdges")
7708             return anObj
7709
7710         # end of l3_healing
7711         ## @}
7712
7713         ## @addtogroup l3_boolean Boolean Operations
7714         ## @{
7715
7716         # -----------------------------------------------------------------------------
7717         # Boolean (Common, Cut, Fuse, Section)
7718         # -----------------------------------------------------------------------------
7719
7720         ## Perform one of boolean operations on two given shapes.
7721         #  @param theShape1 First argument for boolean operation.
7722         #  @param theShape2 Second argument for boolean operation.
7723         #  @param theOperation Indicates the operation to be done:\n
7724         #                      1 - Common, 2 - Cut, 3 - Fuse, 4 - Section.
7725         #  @param checkSelfInte The flag that tells if the arguments should
7726         #         be checked for self-intersection prior to the operation.
7727         #  @param theName Object name; when specified, this parameter is used
7728         #         for result publication in the study. Otherwise, if automatic
7729         #         publication is switched on, default value is used for result name.
7730         #
7731         #  @note This algorithm doesn't find all types of self-intersections.
7732         #        It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7733         #        vertex/face and edge/face intersections. Face/face
7734         #        intersections detection is switched off as it is a
7735         #        time-consuming operation that gives an impact on performance.
7736         #        To find all self-intersections please use
7737         #        CheckSelfIntersections() method.
7738         #
7739         #  @return New GEOM.GEOM_Object, containing the result shape.
7740         #
7741         #  @ref tui_fuse "Example"
7742         @ManageTransactions("BoolOp")
7743         def MakeBoolean(self, theShape1, theShape2, theOperation, checkSelfInte=False, theName=None):
7744             """
7745             Perform one of boolean operations on two given shapes.
7746
7747             Parameters:
7748                 theShape1 First argument for boolean operation.
7749                 theShape2 Second argument for boolean operation.
7750                 theOperation Indicates the operation to be done:
7751                              1 - Common, 2 - Cut, 3 - Fuse, 4 - Section.
7752                 checkSelfInte The flag that tells if the arguments should
7753                               be checked for self-intersection prior to
7754                               the operation.
7755                 theName Object name; when specified, this parameter is used
7756                         for result publication in the study. Otherwise, if automatic
7757                         publication is switched on, default value is used for result name.
7758
7759             Note:
7760                     This algorithm doesn't find all types of self-intersections.
7761                     It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7762                     vertex/face and edge/face intersections. Face/face
7763                     intersections detection is switched off as it is a
7764                     time-consuming operation that gives an impact on performance.
7765                     To find all self-intersections please use
7766                     CheckSelfIntersections() method.
7767
7768             Returns:
7769                 New GEOM.GEOM_Object, containing the result shape.
7770             """
7771             # Example: see GEOM_TestAll.py
7772             anObj = self.BoolOp.MakeBoolean(theShape1, theShape2, theOperation, checkSelfInte)
7773             RaiseIfFailed("MakeBoolean", self.BoolOp)
7774             def_names = { 1: "common", 2: "cut", 3: "fuse", 4: "section" }
7775             self._autoPublish(anObj, theName, def_names[theOperation])
7776             return anObj
7777
7778         ## Perform Common boolean operation on two given shapes.
7779         #  @param theShape1 First argument for boolean operation.
7780         #  @param theShape2 Second argument for boolean operation.
7781         #  @param checkSelfInte The flag that tells if the arguments should
7782         #         be checked for self-intersection prior to the operation.
7783         #  @param theName Object name; when specified, this parameter is used
7784         #         for result publication in the study. Otherwise, if automatic
7785         #         publication is switched on, default value is used for result name.
7786         #
7787         #  @note This algorithm doesn't find all types of self-intersections.
7788         #        It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7789         #        vertex/face and edge/face intersections. Face/face
7790         #        intersections detection is switched off as it is a
7791         #        time-consuming operation that gives an impact on performance.
7792         #        To find all self-intersections please use
7793         #        CheckSelfIntersections() method.
7794         #
7795         #  @return New GEOM.GEOM_Object, containing the result shape.
7796         #
7797         #  @ref tui_common "Example 1"
7798         #  \n @ref swig_MakeCommon "Example 2"
7799         def MakeCommon(self, theShape1, theShape2, checkSelfInte=False, theName=None):
7800             """
7801             Perform Common boolean operation on two given shapes.
7802
7803             Parameters:
7804                 theShape1 First argument for boolean operation.
7805                 theShape2 Second argument for boolean operation.
7806                 checkSelfInte The flag that tells if the arguments should
7807                               be checked for self-intersection prior to
7808                               the operation.
7809                 theName Object name; when specified, this parameter is used
7810                         for result publication in the study. Otherwise, if automatic
7811                         publication is switched on, default value is used for result name.
7812
7813             Note:
7814                     This algorithm doesn't find all types of self-intersections.
7815                     It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7816                     vertex/face and edge/face intersections. Face/face
7817                     intersections detection is switched off as it is a
7818                     time-consuming operation that gives an impact on performance.
7819                     To find all self-intersections please use
7820                     CheckSelfIntersections() method.
7821
7822             Returns:
7823                 New GEOM.GEOM_Object, containing the result shape.
7824             """
7825             # Example: see GEOM_TestOthers.py
7826             # note: auto-publishing is done in self.MakeBoolean()
7827             return self.MakeBoolean(theShape1, theShape2, 1, checkSelfInte, theName)
7828
7829         ## Perform Cut boolean operation on two given shapes.
7830         #  @param theShape1 First argument for boolean operation.
7831         #  @param theShape2 Second argument for boolean operation.
7832         #  @param checkSelfInte The flag that tells if the arguments should
7833         #         be checked for self-intersection prior to the operation.
7834         #  @param theName Object name; when specified, this parameter is used
7835         #         for result publication in the study. Otherwise, if automatic
7836         #         publication is switched on, default value is used for result name.
7837         #
7838         #  @note This algorithm doesn't find all types of self-intersections.
7839         #        It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7840         #        vertex/face and edge/face intersections. Face/face
7841         #        intersections detection is switched off as it is a
7842         #        time-consuming operation that gives an impact on performance.
7843         #        To find all self-intersections please use
7844         #        CheckSelfIntersections() method.
7845         #
7846         #  @return New GEOM.GEOM_Object, containing the result shape.
7847         #
7848         #  @ref tui_cut "Example 1"
7849         #  \n @ref swig_MakeCommon "Example 2"
7850         def MakeCut(self, theShape1, theShape2, checkSelfInte=False, theName=None):
7851             """
7852             Perform Cut boolean operation on two given shapes.
7853
7854             Parameters:
7855                 theShape1 First argument for boolean operation.
7856                 theShape2 Second argument for boolean operation.
7857                 checkSelfInte The flag that tells if the arguments should
7858                               be checked for self-intersection prior to
7859                               the operation.
7860                 theName Object name; when specified, this parameter is used
7861                         for result publication in the study. Otherwise, if automatic
7862                         publication is switched on, default value is used for result name.
7863
7864             Note:
7865                     This algorithm doesn't find all types of self-intersections.
7866                     It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7867                     vertex/face and edge/face intersections. Face/face
7868                     intersections detection is switched off as it is a
7869                     time-consuming operation that gives an impact on performance.
7870                     To find all self-intersections please use
7871                     CheckSelfIntersections() method.
7872
7873             Returns:
7874                 New GEOM.GEOM_Object, containing the result shape.
7875
7876             """
7877             # Example: see GEOM_TestOthers.py
7878             # note: auto-publishing is done in self.MakeBoolean()
7879             return self.MakeBoolean(theShape1, theShape2, 2, checkSelfInte, theName)
7880
7881         ## Perform Fuse boolean operation on two given shapes.
7882         #  @param theShape1 First argument for boolean operation.
7883         #  @param theShape2 Second argument for boolean operation.
7884         #  @param checkSelfInte The flag that tells if the arguments should
7885         #         be checked for self-intersection prior to the operation.
7886         #  @param rmExtraEdges The flag that tells if Remove Extra Edges
7887         #         operation should be performed during the operation.
7888         #  @param theName Object name; when specified, this parameter is used
7889         #         for result publication in the study. Otherwise, if automatic
7890         #         publication is switched on, default value is used for result name.
7891         #
7892         #  @note This algorithm doesn't find all types of self-intersections.
7893         #        It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7894         #        vertex/face and edge/face intersections. Face/face
7895         #        intersections detection is switched off as it is a
7896         #        time-consuming operation that gives an impact on performance.
7897         #        To find all self-intersections please use
7898         #        CheckSelfIntersections() method.
7899         #
7900         #  @return New GEOM.GEOM_Object, containing the result shape.
7901         #
7902         #  @ref tui_fuse "Example 1"
7903         #  \n @ref swig_MakeCommon "Example 2"
7904         @ManageTransactions("BoolOp")
7905         def MakeFuse(self, theShape1, theShape2, checkSelfInte=False,
7906                      rmExtraEdges=False, theName=None):
7907             """
7908             Perform Fuse boolean operation on two given shapes.
7909
7910             Parameters:
7911                 theShape1 First argument for boolean operation.
7912                 theShape2 Second argument for boolean operation.
7913                 checkSelfInte The flag that tells if the arguments should
7914                               be checked for self-intersection prior to
7915                               the operation.
7916                 rmExtraEdges The flag that tells if Remove Extra Edges
7917                              operation should be performed during the operation.
7918                 theName Object name; when specified, this parameter is used
7919                         for result publication in the study. Otherwise, if automatic
7920                         publication is switched on, default value is used for result name.
7921
7922             Note:
7923                     This algorithm doesn't find all types of self-intersections.
7924                     It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7925                     vertex/face and edge/face intersections. Face/face
7926                     intersections detection is switched off as it is a
7927                     time-consuming operation that gives an impact on performance.
7928                     To find all self-intersections please use
7929                     CheckSelfIntersections() method.
7930
7931             Returns:
7932                 New GEOM.GEOM_Object, containing the result shape.
7933
7934             """
7935             # Example: see GEOM_TestOthers.py
7936             anObj = self.BoolOp.MakeFuse(theShape1, theShape2,
7937                                          checkSelfInte, rmExtraEdges)
7938             RaiseIfFailed("MakeFuse", self.BoolOp)
7939             self._autoPublish(anObj, theName, "fuse")
7940             return anObj
7941
7942         ## Perform Section boolean operation on two given shapes.
7943         #  @param theShape1 First argument for boolean operation.
7944         #  @param theShape2 Second argument for boolean operation.
7945         #  @param checkSelfInte The flag that tells if the arguments should
7946         #         be checked for self-intersection prior to the operation.
7947         #         If a self-intersection detected the operation fails.
7948         #  @param theName Object name; when specified, this parameter is used
7949         #         for result publication in the study. Otherwise, if automatic
7950         #         publication is switched on, default value is used for result name.
7951         #  @return New GEOM.GEOM_Object, containing the result shape.
7952         #
7953         #  @ref tui_section "Example 1"
7954         #  \n @ref swig_MakeCommon "Example 2"
7955         def MakeSection(self, theShape1, theShape2, checkSelfInte=False, theName=None):
7956             """
7957             Perform Section boolean operation on two given shapes.
7958
7959             Parameters:
7960                 theShape1 First argument for boolean operation.
7961                 theShape2 Second argument for boolean operation.
7962                 checkSelfInte The flag that tells if the arguments should
7963                               be checked for self-intersection prior to the operation.
7964                               If a self-intersection detected the operation fails.
7965                 theName Object name; when specified, this parameter is used
7966                         for result publication in the study. Otherwise, if automatic
7967                         publication is switched on, default value is used for result name.
7968             Returns:
7969                 New GEOM.GEOM_Object, containing the result shape.
7970
7971             """
7972             # Example: see GEOM_TestOthers.py
7973             # note: auto-publishing is done in self.MakeBoolean()
7974             return self.MakeBoolean(theShape1, theShape2, 4, checkSelfInte, theName)
7975
7976         ## Perform Fuse boolean operation on the list of shapes.
7977         #  @param theShapesList Shapes to be fused.
7978         #  @param checkSelfInte The flag that tells if the arguments should
7979         #         be checked for self-intersection prior to the operation.
7980         #  @param rmExtraEdges The flag that tells if Remove Extra Edges
7981         #         operation should be performed during the operation.
7982         #  @param theName Object name; when specified, this parameter is used
7983         #         for result publication in the study. Otherwise, if automatic
7984         #         publication is switched on, default value is used for result name.
7985         #
7986         #  @note This algorithm doesn't find all types of self-intersections.
7987         #        It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7988         #        vertex/face and edge/face intersections. Face/face
7989         #        intersections detection is switched off as it is a
7990         #        time-consuming operation that gives an impact on performance.
7991         #        To find all self-intersections please use
7992         #        CheckSelfIntersections() method.
7993         #
7994         #  @return New GEOM.GEOM_Object, containing the result shape.
7995         #
7996         #  @ref tui_fuse "Example 1"
7997         #  \n @ref swig_MakeCommon "Example 2"
7998         @ManageTransactions("BoolOp")
7999         def MakeFuseList(self, theShapesList, checkSelfInte=False,
8000                          rmExtraEdges=False, theName=None):
8001             """
8002             Perform Fuse boolean operation on the list of shapes.
8003
8004             Parameters:
8005                 theShapesList Shapes to be fused.
8006                 checkSelfInte The flag that tells if the arguments should
8007                               be checked for self-intersection prior to
8008                               the operation.
8009                 rmExtraEdges The flag that tells if Remove Extra Edges
8010                              operation should be performed during the operation.
8011                 theName Object name; when specified, this parameter is used
8012                         for result publication in the study. Otherwise, if automatic
8013                         publication is switched on, default value is used for result name.
8014
8015             Note:
8016                     This algorithm doesn't find all types of self-intersections.
8017                     It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
8018                     vertex/face and edge/face intersections. Face/face
8019                     intersections detection is switched off as it is a
8020                     time-consuming operation that gives an impact on performance.
8021                     To find all self-intersections please use
8022                     CheckSelfIntersections() method.
8023
8024             Returns:
8025                 New GEOM.GEOM_Object, containing the result shape.
8026
8027             """
8028             # Example: see GEOM_TestOthers.py
8029             anObj = self.BoolOp.MakeFuseList(theShapesList, checkSelfInte,
8030                                              rmExtraEdges)
8031             RaiseIfFailed("MakeFuseList", self.BoolOp)
8032             self._autoPublish(anObj, theName, "fuse")
8033             return anObj
8034
8035         ## Perform Common boolean operation on the list of shapes.
8036         #  @param theShapesList Shapes for Common operation.
8037         #  @param checkSelfInte The flag that tells if the arguments should
8038         #         be checked for self-intersection prior to the operation.
8039         #  @param theName Object name; when specified, this parameter is used
8040         #         for result publication in the study. Otherwise, if automatic
8041         #         publication is switched on, default value is used for result name.
8042         #
8043         #  @note This algorithm doesn't find all types of self-intersections.
8044         #        It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
8045         #        vertex/face and edge/face intersections. Face/face
8046         #        intersections detection is switched off as it is a
8047         #        time-consuming operation that gives an impact on performance.
8048         #        To find all self-intersections please use
8049         #        CheckSelfIntersections() method.
8050         #
8051         #  @return New GEOM.GEOM_Object, containing the result shape.
8052         #
8053         #  @ref tui_common "Example 1"
8054         #  \n @ref swig_MakeCommon "Example 2"
8055         @ManageTransactions("BoolOp")
8056         def MakeCommonList(self, theShapesList, checkSelfInte=False, theName=None):
8057             """
8058             Perform Common boolean operation on the list of shapes.
8059
8060             Parameters:
8061                 theShapesList Shapes for Common operation.
8062                 checkSelfInte The flag that tells if the arguments should
8063                               be checked for self-intersection prior to
8064                               the operation.
8065                 theName Object name; when specified, this parameter is used
8066                         for result publication in the study. Otherwise, if automatic
8067                         publication is switched on, default value is used for result name.
8068
8069             Note:
8070                     This algorithm doesn't find all types of self-intersections.
8071                     It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
8072                     vertex/face and edge/face intersections. Face/face
8073                     intersections detection is switched off as it is a
8074                     time-consuming operation that gives an impact on performance.
8075                     To find all self-intersections please use
8076                     CheckSelfIntersections() method.
8077
8078             Returns:
8079                 New GEOM.GEOM_Object, containing the result shape.
8080
8081             """
8082             # Example: see GEOM_TestOthers.py
8083             anObj = self.BoolOp.MakeCommonList(theShapesList, checkSelfInte)
8084             RaiseIfFailed("MakeCommonList", self.BoolOp)
8085             self._autoPublish(anObj, theName, "common")
8086             return anObj
8087
8088         ## Perform Cut boolean operation on one object and the list of tools.
8089         #  @param theMainShape The object of the operation.
8090         #  @param theShapesList The list of tools of the operation.
8091         #  @param checkSelfInte The flag that tells if the arguments should
8092         #         be checked for self-intersection prior to the operation.
8093         #  @param theName Object name; when specified, this parameter is used
8094         #         for result publication in the study. Otherwise, if automatic
8095         #         publication is switched on, default value is used for result name.
8096         #
8097         #  @note This algorithm doesn't find all types of self-intersections.
8098         #        It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
8099         #        vertex/face and edge/face intersections. Face/face
8100         #        intersections detection is switched off as it is a
8101         #        time-consuming operation that gives an impact on performance.
8102         #        To find all self-intersections please use
8103         #        CheckSelfIntersections() method.
8104         #
8105         #  @return New GEOM.GEOM_Object, containing the result shape.
8106         #
8107         #  @ref tui_cut "Example 1"
8108         #  \n @ref swig_MakeCommon "Example 2"
8109         @ManageTransactions("BoolOp")
8110         def MakeCutList(self, theMainShape, theShapesList, checkSelfInte=False, theName=None):
8111             """
8112             Perform Cut boolean operation on one object and the list of tools.
8113
8114             Parameters:
8115                 theMainShape The object of the operation.
8116                 theShapesList The list of tools of the operation.
8117                 checkSelfInte The flag that tells if the arguments should
8118                               be checked for self-intersection prior to
8119                               the operation.
8120                 theName Object name; when specified, this parameter is used
8121                         for result publication in the study. Otherwise, if automatic
8122                         publication is switched on, default value is used for result name.
8123
8124             Note:
8125                     This algorithm doesn't find all types of self-intersections.
8126                     It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
8127                     vertex/face and edge/face intersections. Face/face
8128                     intersections detection is switched off as it is a
8129                     time-consuming operation that gives an impact on performance.
8130                     To find all self-intersections please use
8131                     CheckSelfIntersections() method.
8132
8133             Returns:
8134                 New GEOM.GEOM_Object, containing the result shape.
8135
8136             """
8137             # Example: see GEOM_TestOthers.py
8138             anObj = self.BoolOp.MakeCutList(theMainShape, theShapesList, checkSelfInte)
8139             RaiseIfFailed("MakeCutList", self.BoolOp)
8140             self._autoPublish(anObj, theName, "cut")
8141             return anObj
8142
8143         # end of l3_boolean
8144         ## @}
8145
8146         ## @addtogroup l3_basic_op
8147         ## @{
8148
8149         ## Perform partition operation.
8150         #  @param ListShapes Shapes to be intersected.
8151         #  @param ListTools Shapes to intersect theShapes.
8152         #  @param Limit Type of resulting shapes (see ShapeType()).\n
8153         #         If this parameter is set to -1 ("Auto"), most appropriate shape limit
8154         #         type will be detected automatically.
8155         #  @param KeepNonlimitShapes if this parameter == 0, then only shapes of
8156         #                             target type (equal to Limit) are kept in the result,
8157         #                             else standalone shapes of lower dimension
8158         #                             are kept also (if they exist).
8159         #
8160         #  @param theName Object name; when specified, this parameter is used
8161         #         for result publication in the study. Otherwise, if automatic
8162         #         publication is switched on, default value is used for result name.
8163         #
8164         #  @note Each compound from ListShapes and ListTools will be exploded
8165         #        in order to avoid possible intersection between shapes from this compound.
8166         #
8167         #  After implementation new version of PartitionAlgo (October 2006)
8168         #  other parameters are ignored by current functionality. They are kept
8169         #  in this function only for support old versions.
8170         #      @param ListKeepInside Shapes, outside which the results will be deleted.
8171         #         Each shape from theKeepInside must belong to theShapes also.
8172         #      @param ListRemoveInside Shapes, inside which the results will be deleted.
8173         #         Each shape from theRemoveInside must belong to theShapes also.
8174         #      @param RemoveWebs If TRUE, perform Glue 3D algorithm.
8175         #      @param ListMaterials Material indices for each shape. Make sense,
8176         #         only if theRemoveWebs is TRUE.
8177         #
8178         #  @return New GEOM.GEOM_Object, containing the result shapes.
8179         #
8180         #  @ref tui_partition "Example"
8181         @ManageTransactions("BoolOp")
8182         def MakePartition(self, ListShapes, ListTools=[], ListKeepInside=[], ListRemoveInside=[],
8183                           Limit=ShapeType["AUTO"], RemoveWebs=0, ListMaterials=[],
8184                           KeepNonlimitShapes=0, theName=None):
8185             """
8186             Perform partition operation.
8187
8188             Parameters:
8189                 ListShapes Shapes to be intersected.
8190                 ListTools Shapes to intersect theShapes.
8191                 Limit Type of resulting shapes (see geompy.ShapeType)
8192                       If this parameter is set to -1 ("Auto"), most appropriate shape limit
8193                       type will be detected automatically.
8194                 KeepNonlimitShapes if this parameter == 0, then only shapes of
8195                                     target type (equal to Limit) are kept in the result,
8196                                     else standalone shapes of lower dimension
8197                                     are kept also (if they exist).
8198
8199                 theName Object name; when specified, this parameter is used
8200                         for result publication in the study. Otherwise, if automatic
8201                         publication is switched on, default value is used for result name.
8202             Note:
8203                     Each compound from ListShapes and ListTools will be exploded
8204                     in order to avoid possible intersection between shapes from
8205                     this compound.
8206
8207             After implementation new version of PartitionAlgo (October 2006) other
8208             parameters are ignored by current functionality. They are kept in this
8209             function only for support old versions.
8210
8211             Ignored parameters:
8212                 ListKeepInside Shapes, outside which the results will be deleted.
8213                                Each shape from theKeepInside must belong to theShapes also.
8214                 ListRemoveInside Shapes, inside which the results will be deleted.
8215                                  Each shape from theRemoveInside must belong to theShapes also.
8216                 RemoveWebs If TRUE, perform Glue 3D algorithm.
8217                 ListMaterials Material indices for each shape. Make sense, only if theRemoveWebs is TRUE.
8218
8219             Returns:
8220                 New GEOM.GEOM_Object, containing the result shapes.
8221             """
8222             # Example: see GEOM_TestAll.py
8223             if Limit == self.ShapeType["AUTO"]:
8224                 # automatic detection of the most appropriate shape limit type
8225                 lim = GEOM.SHAPE
8226                 for s in ListShapes: lim = min(lim, s.GetMaxShapeType())
8227                 Limit = EnumToLong(lim)
8228                 pass
8229             anObj = self.BoolOp.MakePartition(ListShapes, ListTools,
8230                                               ListKeepInside, ListRemoveInside,
8231                                               Limit, RemoveWebs, ListMaterials,
8232                                               KeepNonlimitShapes);
8233             RaiseIfFailed("MakePartition", self.BoolOp)
8234             self._autoPublish(anObj, theName, "partition")
8235             return anObj
8236
8237         ## Perform partition operation.
8238         #  This method may be useful if it is needed to make a partition for
8239         #  compound contains nonintersected shapes. Performance will be better
8240         #  since intersection between shapes from compound is not performed.
8241         #
8242         #  Description of all parameters as in previous method MakePartition().
8243         #  One additional parameter is provided:
8244         #  @param checkSelfInte The flag that tells if the arguments should
8245         #         be checked for self-intersection prior to the operation.
8246         #
8247         #  @note This algorithm doesn't find all types of self-intersections.
8248         #        It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
8249         #        vertex/face and edge/face intersections. Face/face
8250         #        intersections detection is switched off as it is a
8251         #        time-consuming operation that gives an impact on performance.
8252         #        To find all self-intersections please use
8253         #        CheckSelfIntersections() method.
8254         #
8255         #  @note Passed compounds (via ListShapes or via ListTools)
8256         #           have to consist of nonintersecting shapes.
8257         #
8258         #  @return New GEOM.GEOM_Object, containing the result shapes.
8259         #
8260         #  @ref swig_todo "Example"
8261         @ManageTransactions("BoolOp")
8262         def MakePartitionNonSelfIntersectedShape(self, ListShapes, ListTools=[],
8263                                                  ListKeepInside=[], ListRemoveInside=[],
8264                                                  Limit=ShapeType["AUTO"], RemoveWebs=0,
8265                                                  ListMaterials=[], KeepNonlimitShapes=0,
8266                                                  checkSelfInte=False, theName=None):
8267             """
8268             Perform partition operation.
8269             This method may be useful if it is needed to make a partition for
8270             compound contains nonintersected shapes. Performance will be better
8271             since intersection between shapes from compound is not performed.
8272
8273             Parameters:
8274                 Description of all parameters as in method geompy.MakePartition.
8275                 One additional parameter is provided:
8276                 checkSelfInte The flag that tells if the arguments should
8277                               be checked for self-intersection prior to
8278                               the operation.
8279
8280             Note:
8281                     This algorithm doesn't find all types of self-intersections.
8282                     It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
8283                     vertex/face and edge/face intersections. Face/face
8284                     intersections detection is switched off as it is a
8285                     time-consuming operation that gives an impact on performance.
8286                     To find all self-intersections please use
8287                     CheckSelfIntersections() method.
8288
8289             NOTE:
8290                 Passed compounds (via ListShapes or via ListTools)
8291                 have to consist of nonintersecting shapes.
8292
8293             Returns:
8294                 New GEOM.GEOM_Object, containing the result shapes.
8295             """
8296             if Limit == self.ShapeType["AUTO"]:
8297                 # automatic detection of the most appropriate shape limit type
8298                 lim = GEOM.SHAPE
8299                 for s in ListShapes: lim = min(lim, s.GetMaxShapeType())
8300                 Limit = EnumToLong(lim)
8301                 pass
8302             anObj = self.BoolOp.MakePartitionNonSelfIntersectedShape(ListShapes, ListTools,
8303                                                                      ListKeepInside, ListRemoveInside,
8304                                                                      Limit, RemoveWebs, ListMaterials,
8305                                                                      KeepNonlimitShapes, checkSelfInte);
8306             RaiseIfFailed("MakePartitionNonSelfIntersectedShape", self.BoolOp)
8307             self._autoPublish(anObj, theName, "partition")
8308             return anObj
8309
8310         ## See method MakePartition() for more information.
8311         #
8312         #  @ref tui_partition "Example 1"
8313         #  \n @ref swig_Partition "Example 2"
8314         def Partition(self, ListShapes, ListTools=[], ListKeepInside=[], ListRemoveInside=[],
8315                       Limit=ShapeType["AUTO"], RemoveWebs=0, ListMaterials=[],
8316                       KeepNonlimitShapes=0, theName=None):
8317             """
8318             See method geompy.MakePartition for more information.
8319             """
8320             # Example: see GEOM_TestOthers.py
8321             # note: auto-publishing is done in self.MakePartition()
8322             anObj = self.MakePartition(ListShapes, ListTools,
8323                                        ListKeepInside, ListRemoveInside,
8324                                        Limit, RemoveWebs, ListMaterials,
8325                                        KeepNonlimitShapes, theName);
8326             return anObj
8327
8328         ## Perform partition of the Shape with the Plane
8329         #  @param theShape Shape to be intersected.
8330         #  @param thePlane Tool shape, to intersect theShape.
8331         #  @param theName Object name; when specified, this parameter is used
8332         #         for result publication in the study. Otherwise, if automatic
8333         #         publication is switched on, default value is used for result name.
8334         #
8335         #  @return New GEOM.GEOM_Object, containing the result shape.
8336         #
8337         #  @note This operation is a shortcut to the more general @ref MakePartition
8338         #  operation, where @a theShape specifies single "object" (shape being partitioned)
8339         #  and @a thePlane specifies single "tool" (intersector shape). Other parameters of
8340         #  @ref MakePartition operation have default values:
8341         #  - @a Limit: GEOM::SHAPE (shape limit corresponds to the type of @a theShape)
8342         #  - @a KeepNonlimitShapes: 0
8343         #  - @a KeepInside, @a RemoveInside, @a RemoveWebs,
8344         #    @a Materials (obsolete parameters): empty
8345         #
8346         #  @note I.e. the following two operations are equivalent:
8347         #  @code
8348         #  Result = geompy.MakeHalfPartition(Object, Plane)
8349         #  Result = geompy.MakePartition([Object], [Plane])
8350         #  @endcode
8351         #
8352         #  @sa MakePartition, MakePartitionNonSelfIntersectedShape
8353         #
8354         #  @ref tui_partition "Example"
8355         @ManageTransactions("BoolOp")
8356         def MakeHalfPartition(self, theShape, thePlane, theName=None):
8357             """
8358             Perform partition of the Shape with the Plane
8359
8360             Parameters:
8361                 theShape Shape to be intersected.
8362                 thePlane Tool shape, to intersect theShape.
8363                 theName Object name; when specified, this parameter is used
8364                         for result publication in the study. Otherwise, if automatic
8365                         publication is switched on, default value is used for result name.
8366
8367             Returns:
8368                 New GEOM.GEOM_Object, containing the result shape.
8369          
8370             Note: This operation is a shortcut to the more general MakePartition
8371             operation, where theShape specifies single "object" (shape being partitioned)
8372             and thePlane specifies single "tool" (intersector shape). Other parameters of
8373             MakePartition operation have default values:
8374             - Limit: GEOM::SHAPE (shape limit corresponds to the type of theShape)
8375             - KeepNonlimitShapes: 0
8376             - KeepInside, RemoveInside, RemoveWebs, Materials (obsolete parameters): empty
8377          
8378             I.e. the following two operations are equivalent:
8379               Result = geompy.MakeHalfPartition(Object, Plane)
8380               Result = geompy.MakePartition([Object], [Plane])
8381             """
8382             # Example: see GEOM_TestAll.py
8383             anObj = self.BoolOp.MakeHalfPartition(theShape, thePlane)
8384             RaiseIfFailed("MakeHalfPartition", self.BoolOp)
8385             self._autoPublish(anObj, theName, "partition")
8386             return anObj
8387
8388         # end of l3_basic_op
8389         ## @}
8390
8391         ## @addtogroup l3_transform
8392         ## @{
8393
8394         ## Translate the given object along the vector, specified
8395         #  by its end points.
8396         #  @param theObject The object to be translated.
8397         #  @param thePoint1 Start point of translation vector.
8398         #  @param thePoint2 End point of translation vector.
8399         #  @param theCopy Flag used to translate object itself or create a copy.
8400         #  @return Translated @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
8401         #  new GEOM.GEOM_Object, containing the translated object if @a theCopy flag is @c True.
8402         @ManageTransactions("TrsfOp")
8403         def TranslateTwoPoints(self, theObject, thePoint1, thePoint2, theCopy=False):
8404             """
8405             Translate the given object along the vector, specified by its end points.
8406
8407             Parameters:
8408                 theObject The object to be translated.
8409                 thePoint1 Start point of translation vector.
8410                 thePoint2 End point of translation vector.
8411                 theCopy Flag used to translate object itself or create a copy.
8412
8413             Returns:
8414                 Translated theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
8415                 new GEOM.GEOM_Object, containing the translated object if theCopy flag is True.
8416             """
8417             if theCopy:
8418                 anObj = self.TrsfOp.TranslateTwoPointsCopy(theObject, thePoint1, thePoint2)
8419             else:
8420                 anObj = self.TrsfOp.TranslateTwoPoints(theObject, thePoint1, thePoint2)
8421             RaiseIfFailed("TranslateTwoPoints", self.TrsfOp)
8422             return anObj
8423
8424         ## Translate the given object along the vector, specified
8425         #  by its end points, creating its copy before the translation.
8426         #  @param theObject The object to be translated.
8427         #  @param thePoint1 Start point of translation vector.
8428         #  @param thePoint2 End point of translation vector.
8429         #  @param theName Object name; when specified, this parameter is used
8430         #         for result publication in the study. Otherwise, if automatic
8431         #         publication is switched on, default value is used for result name.
8432         #
8433         #  @return New GEOM.GEOM_Object, containing the translated object.
8434         #
8435         #  @ref tui_translation "Example 1"
8436         #  \n @ref swig_MakeTranslationTwoPoints "Example 2"
8437         @ManageTransactions("TrsfOp")
8438         def MakeTranslationTwoPoints(self, theObject, thePoint1, thePoint2, theName=None):
8439             """
8440             Translate the given object along the vector, specified
8441             by its end points, creating its copy before the translation.
8442
8443             Parameters:
8444                 theObject The object to be translated.
8445                 thePoint1 Start point of translation vector.
8446                 thePoint2 End point of translation vector.
8447                 theName Object name; when specified, this parameter is used
8448                         for result publication in the study. Otherwise, if automatic
8449                         publication is switched on, default value is used for result name.
8450
8451             Returns:
8452                 New GEOM.GEOM_Object, containing the translated object.
8453             """
8454             # Example: see GEOM_TestAll.py
8455             anObj = self.TrsfOp.TranslateTwoPointsCopy(theObject, thePoint1, thePoint2)
8456             RaiseIfFailed("TranslateTwoPointsCopy", self.TrsfOp)
8457             self._autoPublish(anObj, theName, "translated")
8458             return anObj
8459
8460         ## Translate the given object along the vector, specified by its components.
8461         #  @param theObject The object to be translated.
8462         #  @param theDX,theDY,theDZ Components of translation vector.
8463         #  @param theCopy Flag used to translate object itself or create a copy.
8464         #  @return Translated @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
8465         #  new GEOM.GEOM_Object, containing the translated object if @a theCopy flag is @c True.
8466         #
8467         #  @ref tui_translation "Example"
8468         @ManageTransactions("TrsfOp")
8469         def TranslateDXDYDZ(self, theObject, theDX, theDY, theDZ, theCopy=False):
8470             """
8471             Translate the given object along the vector, specified by its components.
8472
8473             Parameters:
8474                 theObject The object to be translated.
8475                 theDX,theDY,theDZ Components of translation vector.
8476                 theCopy Flag used to translate object itself or create a copy.
8477
8478             Returns:
8479                 Translated theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
8480                 new GEOM.GEOM_Object, containing the translated object if theCopy flag is True.
8481             """
8482             # Example: see GEOM_TestAll.py
8483             theDX, theDY, theDZ, Parameters = ParseParameters(theDX, theDY, theDZ)
8484             if theCopy:
8485                 anObj = self.TrsfOp.TranslateDXDYDZCopy(theObject, theDX, theDY, theDZ)
8486             else:
8487                 anObj = self.TrsfOp.TranslateDXDYDZ(theObject, theDX, theDY, theDZ)
8488             anObj.SetParameters(Parameters)
8489             RaiseIfFailed("TranslateDXDYDZ", self.TrsfOp)
8490             return anObj
8491
8492         ## Translate the given object along the vector, specified
8493         #  by its components, creating its copy before the translation.
8494         #  @param theObject The object to be translated.
8495         #  @param theDX,theDY,theDZ Components of translation vector.
8496         #  @param theName Object name; when specified, this parameter is used
8497         #         for result publication in the study. Otherwise, if automatic
8498         #         publication is switched on, default value is used for result name.
8499         #
8500         #  @return New GEOM.GEOM_Object, containing the translated object.
8501         #
8502         #  @ref tui_translation "Example"
8503         @ManageTransactions("TrsfOp")
8504         def MakeTranslation(self,theObject, theDX, theDY, theDZ, theName=None):
8505             """
8506             Translate the given object along the vector, specified
8507             by its components, creating its copy before the translation.
8508
8509             Parameters:
8510                 theObject The object to be translated.
8511                 theDX,theDY,theDZ Components of translation vector.
8512                 theName Object name; when specified, this parameter is used
8513                         for result publication in the study. Otherwise, if automatic
8514                         publication is switched on, default value is used for result name.
8515
8516             Returns:
8517                 New GEOM.GEOM_Object, containing the translated object.
8518             """
8519             # Example: see GEOM_TestAll.py
8520             theDX, theDY, theDZ, Parameters = ParseParameters(theDX, theDY, theDZ)
8521             anObj = self.TrsfOp.TranslateDXDYDZCopy(theObject, theDX, theDY, theDZ)
8522             anObj.SetParameters(Parameters)
8523             RaiseIfFailed("TranslateDXDYDZ", self.TrsfOp)
8524             self._autoPublish(anObj, theName, "translated")
8525             return anObj
8526
8527         ## Translate the given object along the given vector.
8528         #  @param theObject The object to be translated.
8529         #  @param theVector The translation vector.
8530         #  @param theCopy Flag used to translate object itself or create a copy.
8531         #  @return Translated @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
8532         #  new GEOM.GEOM_Object, containing the translated object if @a theCopy flag is @c True.
8533         @ManageTransactions("TrsfOp")
8534         def TranslateVector(self, theObject, theVector, theCopy=False):
8535             """
8536             Translate the given object along the given vector.
8537
8538             Parameters:
8539                 theObject The object to be translated.
8540                 theVector The translation vector.
8541                 theCopy Flag used to translate object itself or create a copy.
8542
8543             Returns:
8544                 Translated theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
8545                 new GEOM.GEOM_Object, containing the translated object if theCopy flag is True.
8546             """
8547             if theCopy:
8548                 anObj = self.TrsfOp.TranslateVectorCopy(theObject, theVector)
8549             else:
8550                 anObj = self.TrsfOp.TranslateVector(theObject, theVector)
8551             RaiseIfFailed("TranslateVector", self.TrsfOp)
8552             return anObj
8553
8554         ## Translate the given object along the given vector,
8555         #  creating its copy before the translation.
8556         #  @param theObject The object to be translated.
8557         #  @param theVector The translation vector.
8558         #  @param theName Object name; when specified, this parameter is used
8559         #         for result publication in the study. Otherwise, if automatic
8560         #         publication is switched on, default value is used for result name.
8561         #
8562         #  @return New GEOM.GEOM_Object, containing the translated object.
8563         #
8564         #  @ref tui_translation "Example"
8565         @ManageTransactions("TrsfOp")
8566         def MakeTranslationVector(self, theObject, theVector, theName=None):
8567             """
8568             Translate the given object along the given vector,
8569             creating its copy before the translation.
8570
8571             Parameters:
8572                 theObject The object to be translated.
8573                 theVector The translation vector.
8574                 theName Object name; when specified, this parameter is used
8575                         for result publication in the study. Otherwise, if automatic
8576                         publication is switched on, default value is used for result name.
8577
8578             Returns:
8579                 New GEOM.GEOM_Object, containing the translated object.
8580             """
8581             # Example: see GEOM_TestAll.py
8582             anObj = self.TrsfOp.TranslateVectorCopy(theObject, theVector)
8583             RaiseIfFailed("TranslateVectorCopy", self.TrsfOp)
8584             self._autoPublish(anObj, theName, "translated")
8585             return anObj
8586
8587         ## Translate the given object along the given vector on given distance.
8588         #  @param theObject The object to be translated.
8589         #  @param theVector The translation vector.
8590         #  @param theDistance The translation distance.
8591         #  @param theCopy Flag used to translate object itself or create a copy.
8592         #  @return Translated @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
8593         #  new GEOM.GEOM_Object, containing the translated object if @a theCopy flag is @c True.
8594         #
8595         #  @ref tui_translation "Example"
8596         @ManageTransactions("TrsfOp")
8597         def TranslateVectorDistance(self, theObject, theVector, theDistance, theCopy=False):
8598             """
8599             Translate the given object along the given vector on given distance.
8600
8601             Parameters:
8602                 theObject The object to be translated.
8603                 theVector The translation vector.
8604                 theDistance The translation distance.
8605                 theCopy Flag used to translate object itself or create a copy.
8606
8607             Returns:
8608                 Translated theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
8609                 new GEOM.GEOM_Object, containing the translated object if theCopy flag is True.
8610             """
8611             # Example: see GEOM_TestAll.py
8612             theDistance,Parameters = ParseParameters(theDistance)
8613             anObj = self.TrsfOp.TranslateVectorDistance(theObject, theVector, theDistance, theCopy)
8614             RaiseIfFailed("TranslateVectorDistance", self.TrsfOp)
8615             anObj.SetParameters(Parameters)
8616             return anObj
8617
8618         ## Translate the given object along the given vector on given distance,
8619         #  creating its copy before the translation.
8620         #  @param theObject The object to be translated.
8621         #  @param theVector The translation vector.
8622         #  @param theDistance The translation distance.
8623         #  @param theName Object name; when specified, this parameter is used
8624         #         for result publication in the study. Otherwise, if automatic
8625         #         publication is switched on, default value is used for result name.
8626         #
8627         #  @return New GEOM.GEOM_Object, containing the translated object.
8628         #
8629         #  @ref tui_translation "Example"
8630         @ManageTransactions("TrsfOp")
8631         def MakeTranslationVectorDistance(self, theObject, theVector, theDistance, theName=None):
8632             """
8633             Translate the given object along the given vector on given distance,
8634             creating its copy before the translation.
8635
8636             Parameters:
8637                 theObject The object to be translated.
8638                 theVector The translation vector.
8639                 theDistance The translation distance.
8640                 theName Object name; when specified, this parameter is used
8641                         for result publication in the study. Otherwise, if automatic
8642                         publication is switched on, default value is used for result name.
8643
8644             Returns:
8645                 New GEOM.GEOM_Object, containing the translated object.
8646             """
8647             # Example: see GEOM_TestAll.py
8648             theDistance,Parameters = ParseParameters(theDistance)
8649             anObj = self.TrsfOp.TranslateVectorDistance(theObject, theVector, theDistance, 1)
8650             RaiseIfFailed("TranslateVectorDistance", self.TrsfOp)
8651             anObj.SetParameters(Parameters)
8652             self._autoPublish(anObj, theName, "translated")
8653             return anObj
8654
8655         ## Rotate the given object around the given axis on the given angle.
8656         #  @param theObject The object to be rotated.
8657         #  @param theAxis Rotation axis.
8658         #  @param theAngle Rotation angle in radians.
8659         #  @param theCopy Flag used to rotate object itself or create a copy.
8660         #
8661         #  @return Rotated @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
8662         #  new GEOM.GEOM_Object, containing the rotated object if @a theCopy flag is @c True.
8663         #
8664         #  @ref tui_rotation "Example"
8665         @ManageTransactions("TrsfOp")
8666         def Rotate(self, theObject, theAxis, theAngle, theCopy=False):
8667             """
8668             Rotate the given object around the given axis on the given angle.
8669
8670             Parameters:
8671                 theObject The object to be rotated.
8672                 theAxis Rotation axis.
8673                 theAngle Rotation angle in radians.
8674                 theCopy Flag used to rotate object itself or create a copy.
8675
8676             Returns:
8677                 Rotated theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
8678                 new GEOM.GEOM_Object, containing the rotated object if theCopy flag is True.
8679             """
8680             # Example: see GEOM_TestAll.py
8681             flag = False
8682             if isinstance(theAngle,str):
8683                 flag = True
8684             theAngle, Parameters = ParseParameters(theAngle)
8685             if flag:
8686                 theAngle = theAngle*math.pi/180.0
8687             if theCopy:
8688                 anObj = self.TrsfOp.RotateCopy(theObject, theAxis, theAngle)
8689             else:
8690                 anObj = self.TrsfOp.Rotate(theObject, theAxis, theAngle)
8691             RaiseIfFailed("Rotate", self.TrsfOp)
8692             anObj.SetParameters(Parameters)
8693             return anObj
8694
8695         ## Rotate the given object around the given axis
8696         #  on the given angle, creating its copy before the rotation.
8697         #  @param theObject The object to be rotated.
8698         #  @param theAxis Rotation axis.
8699         #  @param theAngle Rotation angle in radians.
8700         #  @param theName Object name; when specified, this parameter is used
8701         #         for result publication in the study. Otherwise, if automatic
8702         #         publication is switched on, default value is used for result name.
8703         #
8704         #  @return New GEOM.GEOM_Object, containing the rotated object.
8705         #
8706         #  @ref tui_rotation "Example"
8707         @ManageTransactions("TrsfOp")
8708         def MakeRotation(self, theObject, theAxis, theAngle, theName=None):
8709             """
8710             Rotate the given object around the given axis
8711             on the given angle, creating its copy before the rotatation.
8712
8713             Parameters:
8714                 theObject The object to be rotated.
8715                 theAxis Rotation axis.
8716                 theAngle Rotation angle in radians.
8717                 theName Object name; when specified, this parameter is used
8718                         for result publication in the study. Otherwise, if automatic
8719                         publication is switched on, default value is used for result name.
8720
8721             Returns:
8722                 New GEOM.GEOM_Object, containing the rotated object.
8723             """
8724             # Example: see GEOM_TestAll.py
8725             flag = False
8726             if isinstance(theAngle,str):
8727                 flag = True
8728             theAngle, Parameters = ParseParameters(theAngle)
8729             if flag:
8730                 theAngle = theAngle*math.pi/180.0
8731             anObj = self.TrsfOp.RotateCopy(theObject, theAxis, theAngle)
8732             RaiseIfFailed("RotateCopy", self.TrsfOp)
8733             anObj.SetParameters(Parameters)
8734             self._autoPublish(anObj, theName, "rotated")
8735             return anObj
8736
8737         ## Rotate given object around vector perpendicular to plane
8738         #  containing three points.
8739         #  @param theObject The object to be rotated.
8740         #  @param theCentPoint central point the axis is the vector perpendicular to the plane
8741         #  containing the three points.
8742         #  @param thePoint1,thePoint2 points in a perpendicular plane of the axis.
8743         #  @param theCopy Flag used to rotate object itself or create a copy.
8744         #  @return Rotated @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
8745         #  new GEOM.GEOM_Object, containing the rotated object if @a theCopy flag is @c True.
8746         @ManageTransactions("TrsfOp")
8747         def RotateThreePoints(self, theObject, theCentPoint, thePoint1, thePoint2, theCopy=False):
8748             """
8749             Rotate given object around vector perpendicular to plane
8750             containing three points.
8751
8752             Parameters:
8753                 theObject The object to be rotated.
8754                 theCentPoint central point  the axis is the vector perpendicular to the plane
8755                              containing the three points.
8756                 thePoint1,thePoint2 points in a perpendicular plane of the axis.
8757                 theCopy Flag used to rotate object itself or create a copy.
8758
8759             Returns:
8760                 Rotated theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
8761                 new GEOM.GEOM_Object, containing the rotated object if theCopy flag is True.
8762             """
8763             if theCopy:
8764                 anObj = self.TrsfOp.RotateThreePointsCopy(theObject, theCentPoint, thePoint1, thePoint2)
8765             else:
8766                 anObj = self.TrsfOp.RotateThreePoints(theObject, theCentPoint, thePoint1, thePoint2)
8767             RaiseIfFailed("RotateThreePoints", self.TrsfOp)
8768             return anObj
8769
8770         ## Rotate given object around vector perpendicular to plane
8771         #  containing three points, creating its copy before the rotatation.
8772         #  @param theObject The object to be rotated.
8773         #  @param theCentPoint central point the axis is the vector perpendicular to the plane
8774         #  containing the three points.
8775         #  @param thePoint1,thePoint2 in a perpendicular plane of the axis.
8776         #  @param theName Object name; when specified, this parameter is used
8777         #         for result publication in the study. Otherwise, if automatic
8778         #         publication is switched on, default value is used for result name.
8779         #
8780         #  @return New GEOM.GEOM_Object, containing the rotated object.
8781         #
8782         #  @ref tui_rotation "Example"
8783         @ManageTransactions("TrsfOp")
8784         def MakeRotationThreePoints(self, theObject, theCentPoint, thePoint1, thePoint2, theName=None):
8785             """
8786             Rotate given object around vector perpendicular to plane
8787             containing three points, creating its copy before the rotatation.
8788
8789             Parameters:
8790                 theObject The object to be rotated.
8791                 theCentPoint central point  the axis is the vector perpendicular to the plane
8792                              containing the three points.
8793                 thePoint1,thePoint2  in a perpendicular plane of the axis.
8794                 theName Object name; when specified, this parameter is used
8795                         for result publication in the study. Otherwise, if automatic
8796                         publication is switched on, default value is used for result name.
8797
8798             Returns:
8799                 New GEOM.GEOM_Object, containing the rotated object.
8800             """
8801             # Example: see GEOM_TestAll.py
8802             anObj = self.TrsfOp.RotateThreePointsCopy(theObject, theCentPoint, thePoint1, thePoint2)
8803             RaiseIfFailed("RotateThreePointsCopy", self.TrsfOp)
8804             self._autoPublish(anObj, theName, "rotated")
8805             return anObj
8806
8807         ## Scale the given object by the specified factor.
8808         #  @param theObject The object to be scaled.
8809         #  @param thePoint Center point for scaling.
8810         #                  Passing None for it means scaling relatively the origin of global CS.
8811         #  @param theFactor Scaling factor value.
8812         #  @param theCopy Flag used to scale object itself or create a copy.
8813         #  @return Scaled @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
8814         #  new GEOM.GEOM_Object, containing the scaled object if @a theCopy flag is @c True.
8815         @ManageTransactions("TrsfOp")
8816         def Scale(self, theObject, thePoint, theFactor, theCopy=False):
8817             """
8818             Scale the given object by the specified factor.
8819
8820             Parameters:
8821                 theObject The object to be scaled.
8822                 thePoint Center point for scaling.
8823                          Passing None for it means scaling relatively the origin of global CS.
8824                 theFactor Scaling factor value.
8825                 theCopy Flag used to scale object itself or create a copy.
8826
8827             Returns:
8828                 Scaled theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
8829                 new GEOM.GEOM_Object, containing the scaled object if theCopy flag is True.
8830             """
8831             # Example: see GEOM_TestAll.py
8832             theFactor, Parameters = ParseParameters(theFactor)
8833             if theCopy:
8834                 anObj = self.TrsfOp.ScaleShapeCopy(theObject, thePoint, theFactor)
8835             else:
8836                 anObj = self.TrsfOp.ScaleShape(theObject, thePoint, theFactor)
8837             RaiseIfFailed("Scale", self.TrsfOp)
8838             anObj.SetParameters(Parameters)
8839             return anObj
8840
8841         ## Scale the given object by the factor, creating its copy before the scaling.
8842         #  @param theObject The object to be scaled.
8843         #  @param thePoint Center point for scaling.
8844         #                  Passing None for it means scaling relatively the origin of global CS.
8845         #  @param theFactor Scaling factor value.
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 scaled shape.
8851         #
8852         #  @ref tui_scale "Example"
8853         @ManageTransactions("TrsfOp")
8854         def MakeScaleTransform(self, theObject, thePoint, theFactor, theName=None):
8855             """
8856             Scale the given object by the factor, creating its copy before the scaling.
8857
8858             Parameters:
8859                 theObject The object to be scaled.
8860                 thePoint Center point for scaling.
8861                          Passing None for it means scaling relatively the origin of global CS.
8862                 theFactor Scaling factor value.
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 scaled shape.
8869             """
8870             # Example: see GEOM_TestAll.py
8871             theFactor, Parameters = ParseParameters(theFactor)
8872             anObj = self.TrsfOp.ScaleShapeCopy(theObject, thePoint, theFactor)
8873             RaiseIfFailed("ScaleShapeCopy", self.TrsfOp)
8874             anObj.SetParameters(Parameters)
8875             self._autoPublish(anObj, theName, "scaled")
8876             return anObj
8877
8878         ## Scale the given object by different factors along coordinate axes.
8879         #  @param theObject The object to be scaled.
8880         #  @param thePoint Center point for scaling.
8881         #                  Passing None for it means scaling relatively the origin of global CS.
8882         #  @param theFactorX,theFactorY,theFactorZ Scaling factors along each axis.
8883         #  @param theCopy Flag used to scale object itself or create a copy.
8884         #  @return Scaled @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
8885         #  new GEOM.GEOM_Object, containing the scaled object if @a theCopy flag is @c True.
8886         @ManageTransactions("TrsfOp")
8887         def ScaleAlongAxes(self, theObject, thePoint, theFactorX, theFactorY, theFactorZ, theCopy=False):
8888             """
8889             Scale the given object by different factors along coordinate axes.
8890
8891             Parameters:
8892                 theObject The object to be scaled.
8893                 thePoint Center point for scaling.
8894                             Passing None for it means scaling relatively the origin of global CS.
8895                 theFactorX,theFactorY,theFactorZ Scaling factors along each axis.
8896                 theCopy Flag used to scale object itself or create a copy.
8897
8898             Returns:
8899                 Scaled theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
8900                 new GEOM.GEOM_Object, containing the scaled object if theCopy flag is True.
8901             """
8902             # Example: see GEOM_TestAll.py
8903             theFactorX, theFactorY, theFactorZ, Parameters = ParseParameters(theFactorX, theFactorY, theFactorZ)
8904             if theCopy:
8905                 anObj = self.TrsfOp.ScaleShapeAlongAxesCopy(theObject, thePoint,
8906                                                             theFactorX, theFactorY, theFactorZ)
8907             else:
8908                 anObj = self.TrsfOp.ScaleShapeAlongAxes(theObject, thePoint,
8909                                                         theFactorX, theFactorY, theFactorZ)
8910             RaiseIfFailed("ScaleAlongAxes", self.TrsfOp)
8911             anObj.SetParameters(Parameters)
8912             return anObj
8913
8914         ## Scale the given object by different factors along coordinate axes,
8915         #  creating its copy before the scaling.
8916         #  @param theObject The object to be scaled.
8917         #  @param thePoint Center point for scaling.
8918         #                  Passing None for it means scaling relatively the origin of global CS.
8919         #  @param theFactorX,theFactorY,theFactorZ Scaling factors along each axis.
8920         #  @param theName Object name; when specified, this parameter is used
8921         #         for result publication in the study. Otherwise, if automatic
8922         #         publication is switched on, default value is used for result name.
8923         #
8924         #  @return New GEOM.GEOM_Object, containing the scaled shape.
8925         #
8926         #  @ref swig_scale "Example"
8927         @ManageTransactions("TrsfOp")
8928         def MakeScaleAlongAxes(self, theObject, thePoint, theFactorX, theFactorY, theFactorZ, theName=None):
8929             """
8930             Scale the given object by different factors along coordinate axes,
8931             creating its copy before the scaling.
8932
8933             Parameters:
8934                 theObject The object to be scaled.
8935                 thePoint Center point for scaling.
8936                             Passing None for it means scaling relatively the origin of global CS.
8937                 theFactorX,theFactorY,theFactorZ Scaling factors along each axis.
8938                 theName Object name; when specified, this parameter is used
8939                         for result publication in the study. Otherwise, if automatic
8940                         publication is switched on, default value is used for result name.
8941
8942             Returns:
8943                 New GEOM.GEOM_Object, containing the scaled shape.
8944             """
8945             # Example: see GEOM_TestAll.py
8946             theFactorX, theFactorY, theFactorZ, Parameters = ParseParameters(theFactorX, theFactorY, theFactorZ)
8947             anObj = self.TrsfOp.ScaleShapeAlongAxesCopy(theObject, thePoint,
8948                                                         theFactorX, theFactorY, theFactorZ)
8949             RaiseIfFailed("MakeScaleAlongAxes", self.TrsfOp)
8950             anObj.SetParameters(Parameters)
8951             self._autoPublish(anObj, theName, "scaled")
8952             return anObj
8953
8954         ## Mirror an object relatively the given plane.
8955         #  @param theObject The object to be mirrored.
8956         #  @param thePlane Plane of symmetry.
8957         #  @param theCopy Flag used to mirror object itself or create a copy.
8958         #  @return Mirrored @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
8959         #  new GEOM.GEOM_Object, containing the mirrored object if @a theCopy flag is @c True.
8960         @ManageTransactions("TrsfOp")
8961         def MirrorByPlane(self, theObject, thePlane, theCopy=False):
8962             """
8963             Mirror an object relatively the given plane.
8964
8965             Parameters:
8966                 theObject The object to be mirrored.
8967                 thePlane Plane of symmetry.
8968                 theCopy Flag used to mirror object itself or create a copy.
8969
8970             Returns:
8971                 Mirrored theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
8972                 new GEOM.GEOM_Object, containing the mirrored object if theCopy flag is True.
8973             """
8974             if theCopy:
8975                 anObj = self.TrsfOp.MirrorPlaneCopy(theObject, thePlane)
8976             else:
8977                 anObj = self.TrsfOp.MirrorPlane(theObject, thePlane)
8978             RaiseIfFailed("MirrorByPlane", self.TrsfOp)
8979             return anObj
8980
8981         ## Create an object, symmetrical
8982         #  to the given one relatively the given plane.
8983         #  @param theObject The object to be mirrored.
8984         #  @param thePlane Plane of symmetry.
8985         #  @param theName Object name; when specified, this parameter is used
8986         #         for result publication in the study. Otherwise, if automatic
8987         #         publication is switched on, default value is used for result name.
8988         #
8989         #  @return New GEOM.GEOM_Object, containing the mirrored shape.
8990         #
8991         #  @ref tui_mirror "Example"
8992         @ManageTransactions("TrsfOp")
8993         def MakeMirrorByPlane(self, theObject, thePlane, theName=None):
8994             """
8995             Create an object, symmetrical to the given one relatively the given plane.
8996
8997             Parameters:
8998                 theObject The object to be mirrored.
8999                 thePlane Plane of symmetry.
9000                 theName Object name; when specified, this parameter is used
9001                         for result publication in the study. Otherwise, if automatic
9002                         publication is switched on, default value is used for result name.
9003
9004             Returns:
9005                 New GEOM.GEOM_Object, containing the mirrored shape.
9006             """
9007             # Example: see GEOM_TestAll.py
9008             anObj = self.TrsfOp.MirrorPlaneCopy(theObject, thePlane)
9009             RaiseIfFailed("MirrorPlaneCopy", self.TrsfOp)
9010             self._autoPublish(anObj, theName, "mirrored")
9011             return anObj
9012
9013         ## Mirror an object relatively the given axis.
9014         #  @param theObject The object to be mirrored.
9015         #  @param theAxis Axis of symmetry.
9016         #  @param theCopy Flag used to mirror object itself or create a copy.
9017         #  @return Mirrored @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
9018         #  new GEOM.GEOM_Object, containing the mirrored object if @a theCopy flag is @c True.
9019         @ManageTransactions("TrsfOp")
9020         def MirrorByAxis(self, theObject, theAxis, theCopy=False):
9021             """
9022             Mirror an object relatively the given axis.
9023
9024             Parameters:
9025                 theObject The object to be mirrored.
9026                 theAxis Axis of symmetry.
9027                 theCopy Flag used to mirror object itself or create a copy.
9028
9029             Returns:
9030                 Mirrored theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
9031                 new GEOM.GEOM_Object, containing the mirrored object if theCopy flag is True.
9032             """
9033             if theCopy:
9034                 anObj = self.TrsfOp.MirrorAxisCopy(theObject, theAxis)
9035             else:
9036                 anObj = self.TrsfOp.MirrorAxis(theObject, theAxis)
9037             RaiseIfFailed("MirrorByAxis", self.TrsfOp)
9038             return anObj
9039
9040         ## Create an object, symmetrical
9041         #  to the given one relatively the given axis.
9042         #  @param theObject The object to be mirrored.
9043         #  @param theAxis Axis of symmetry.
9044         #  @param theName Object name; when specified, this parameter is used
9045         #         for result publication in the study. Otherwise, if automatic
9046         #         publication is switched on, default value is used for result name.
9047         #
9048         #  @return New GEOM.GEOM_Object, containing the mirrored shape.
9049         #
9050         #  @ref tui_mirror "Example"
9051         @ManageTransactions("TrsfOp")
9052         def MakeMirrorByAxis(self, theObject, theAxis, theName=None):
9053             """
9054             Create an object, symmetrical to the given one relatively the given axis.
9055
9056             Parameters:
9057                 theObject The object to be mirrored.
9058                 theAxis Axis of symmetry.
9059                 theName Object name; when specified, this parameter is used
9060                         for result publication in the study. Otherwise, if automatic
9061                         publication is switched on, default value is used for result name.
9062
9063             Returns:
9064                 New GEOM.GEOM_Object, containing the mirrored shape.
9065             """
9066             # Example: see GEOM_TestAll.py
9067             anObj = self.TrsfOp.MirrorAxisCopy(theObject, theAxis)
9068             RaiseIfFailed("MirrorAxisCopy", self.TrsfOp)
9069             self._autoPublish(anObj, theName, "mirrored")
9070             return anObj
9071
9072         ## Mirror an object relatively the given point.
9073         #  @param theObject The object to be mirrored.
9074         #  @param thePoint Point of symmetry.
9075         #  @param theCopy Flag used to mirror object itself or create a copy.
9076         #  @return Mirrored @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
9077         #  new GEOM.GEOM_Object, containing the mirrored object if @a theCopy flag is @c True.
9078         @ManageTransactions("TrsfOp")
9079         def MirrorByPoint(self, theObject, thePoint, theCopy=False):
9080             """
9081             Mirror an object relatively the given point.
9082
9083             Parameters:
9084                 theObject The object to be mirrored.
9085                 thePoint Point of symmetry.
9086                 theCopy Flag used to mirror object itself or create a copy.
9087
9088             Returns:
9089                 Mirrored theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
9090                 new GEOM.GEOM_Object, containing the mirrored object if theCopy flag is True.
9091             """
9092             # Example: see GEOM_TestAll.py
9093             if theCopy:
9094                 anObj = self.TrsfOp.MirrorPointCopy(theObject, thePoint)
9095             else:
9096                 anObj = self.TrsfOp.MirrorPoint(theObject, thePoint)
9097             RaiseIfFailed("MirrorByPoint", self.TrsfOp)
9098             return anObj
9099
9100         ## Create an object, symmetrical
9101         #  to the given one relatively the given point.
9102         #  @param theObject The object to be mirrored.
9103         #  @param thePoint Point of symmetry.
9104         #  @param theName Object name; when specified, this parameter is used
9105         #         for result publication in the study. Otherwise, if automatic
9106         #         publication is switched on, default value is used for result name.
9107         #
9108         #  @return New GEOM.GEOM_Object, containing the mirrored shape.
9109         #
9110         #  @ref tui_mirror "Example"
9111         @ManageTransactions("TrsfOp")
9112         def MakeMirrorByPoint(self, theObject, thePoint, theName=None):
9113             """
9114             Create an object, symmetrical
9115             to the given one relatively the given point.
9116
9117             Parameters:
9118                 theObject The object to be mirrored.
9119                 thePoint Point of symmetry.
9120                 theName Object name; when specified, this parameter is used
9121                         for result publication in the study. Otherwise, if automatic
9122                         publication is switched on, default value is used for result name.
9123
9124             Returns:
9125                 New GEOM.GEOM_Object, containing the mirrored shape.
9126             """
9127             # Example: see GEOM_TestAll.py
9128             anObj = self.TrsfOp.MirrorPointCopy(theObject, thePoint)
9129             RaiseIfFailed("MirrorPointCopy", self.TrsfOp)
9130             self._autoPublish(anObj, theName, "mirrored")
9131             return anObj
9132
9133         ## Modify the location of the given object.
9134         #  @param theObject The object to be displaced.
9135         #  @param theStartLCS Coordinate system to perform displacement from it.\n
9136         #                     If \a theStartLCS is NULL, displacement
9137         #                     will be performed from global CS.\n
9138         #                     If \a theObject itself is used as \a theStartLCS,
9139         #                     its location will be changed to \a theEndLCS.
9140         #  @param theEndLCS Coordinate system to perform displacement to it.
9141         #  @param theCopy Flag used to displace object itself or create a copy.
9142         #  @return Displaced @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
9143         #  new GEOM.GEOM_Object, containing the displaced object if @a theCopy flag is @c True.
9144         @ManageTransactions("TrsfOp")
9145         def Position(self, theObject, theStartLCS, theEndLCS, theCopy=False):
9146             """
9147             Modify the Location of the given object by LCS, creating its copy before the setting.
9148
9149             Parameters:
9150                 theObject The object to be displaced.
9151                 theStartLCS Coordinate system to perform displacement from it.
9152                             If theStartLCS is NULL, displacement
9153                             will be performed from global CS.
9154                             If theObject itself is used as theStartLCS,
9155                             its location will be changed to theEndLCS.
9156                 theEndLCS Coordinate system to perform displacement to it.
9157                 theCopy Flag used to displace object itself or create a copy.
9158
9159             Returns:
9160                 Displaced theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
9161                 new GEOM.GEOM_Object, containing the displaced object if theCopy flag is True.
9162             """
9163             # Example: see GEOM_TestAll.py
9164             if theCopy:
9165                 anObj = self.TrsfOp.PositionShapeCopy(theObject, theStartLCS, theEndLCS)
9166             else:
9167                 anObj = self.TrsfOp.PositionShape(theObject, theStartLCS, theEndLCS)
9168             RaiseIfFailed("Displace", self.TrsfOp)
9169             return anObj
9170
9171         ## Modify the Location of the given object by LCS,
9172         #  creating its copy before the setting.
9173         #  @param theObject The object to be displaced.
9174         #  @param theStartLCS Coordinate system to perform displacement from it.\n
9175         #                     If \a theStartLCS is NULL, displacement
9176         #                     will be performed from global CS.\n
9177         #                     If \a theObject itself is used as \a theStartLCS,
9178         #                     its location will be changed to \a theEndLCS.
9179         #  @param theEndLCS Coordinate system to perform displacement to it.
9180         #  @param theName Object name; when specified, this parameter is used
9181         #         for result publication in the study. Otherwise, if automatic
9182         #         publication is switched on, default value is used for result name.
9183         #
9184         #  @return New GEOM.GEOM_Object, containing the displaced shape.
9185         #
9186         #  @ref tui_modify_location "Example"
9187         @ManageTransactions("TrsfOp")
9188         def MakePosition(self, theObject, theStartLCS, theEndLCS, theName=None):
9189             """
9190             Modify the Location of the given object by LCS, creating its copy before the setting.
9191
9192             Parameters:
9193                 theObject The object to be displaced.
9194                 theStartLCS Coordinate system to perform displacement from it.
9195                             If theStartLCS is NULL, displacement
9196                             will be performed from global CS.
9197                             If theObject itself is used as theStartLCS,
9198                             its location will be changed to theEndLCS.
9199                 theEndLCS Coordinate system to perform displacement to it.
9200                 theName Object name; when specified, this parameter is used
9201                         for result publication in the study. Otherwise, if automatic
9202                         publication is switched on, default value is used for result name.
9203
9204             Returns:
9205                 New GEOM.GEOM_Object, containing the displaced shape.
9206
9207             Example of usage:
9208                 # create local coordinate systems
9209                 cs1 = geompy.MakeMarker( 0, 0, 0, 1,0,0, 0,1,0)
9210                 cs2 = geompy.MakeMarker(30,40,40, 1,0,0, 0,1,0)
9211                 # modify the location of the given object
9212                 position = geompy.MakePosition(cylinder, cs1, cs2)
9213             """
9214             # Example: see GEOM_TestAll.py
9215             anObj = self.TrsfOp.PositionShapeCopy(theObject, theStartLCS, theEndLCS)
9216             RaiseIfFailed("PositionShapeCopy", self.TrsfOp)
9217             self._autoPublish(anObj, theName, "displaced")
9218             return anObj
9219
9220         ## Modify the Location of the given object by Path.
9221         #  @param  theObject The object to be displaced.
9222         #  @param  thePath Wire or Edge along that the object will be translated.
9223         #  @param  theDistance progress of Path (0 = start location, 1 = end of path location).
9224         #  @param  theCopy is to create a copy objects if true.
9225         #  @param  theReverse  0 - for usual direction, 1 - to reverse path direction.
9226         #  @return Displaced @a theObject (GEOM.GEOM_Object) if @a theCopy is @c False or
9227         #          new GEOM.GEOM_Object, containing the displaced shape if @a theCopy is @c True.
9228         #
9229         #  @ref tui_modify_location "Example"
9230         @ManageTransactions("TrsfOp")
9231         def PositionAlongPath(self,theObject, thePath, theDistance, theCopy, theReverse):
9232             """
9233             Modify the Location of the given object by Path.
9234
9235             Parameters:
9236                  theObject The object to be displaced.
9237                  thePath Wire or Edge along that the object will be translated.
9238                  theDistance progress of Path (0 = start location, 1 = end of path location).
9239                  theCopy is to create a copy objects if true.
9240                  theReverse  0 - for usual direction, 1 - to reverse path direction.
9241
9242             Returns:
9243                  Displaced theObject (GEOM.GEOM_Object) if theCopy is False or
9244                  new GEOM.GEOM_Object, containing the displaced shape if theCopy is True.
9245
9246             Example of usage:
9247                 position = geompy.PositionAlongPath(cylinder, circle, 0.75, 1, 1)
9248             """
9249             # Example: see GEOM_TestAll.py
9250             anObj = self.TrsfOp.PositionAlongPath(theObject, thePath, theDistance, theCopy, theReverse)
9251             RaiseIfFailed("PositionAlongPath", self.TrsfOp)
9252             return anObj
9253
9254         ## Modify the Location of the given object by Path, creating its copy before the operation.
9255         #  @param theObject The object to be displaced.
9256         #  @param thePath Wire or Edge along that the object will be translated.
9257         #  @param theDistance progress of Path (0 = start location, 1 = end of path location).
9258         #  @param theReverse  0 - for usual direction, 1 - to reverse path direction.
9259         #  @param theName Object name; when specified, this parameter is used
9260         #         for result publication in the study. Otherwise, if automatic
9261         #         publication is switched on, default value is used for result name.
9262         #
9263         #  @return New GEOM.GEOM_Object, containing the displaced shape.
9264         @ManageTransactions("TrsfOp")
9265         def MakePositionAlongPath(self, theObject, thePath, theDistance, theReverse, theName=None):
9266             """
9267             Modify the Location of the given object by Path, creating its copy before the operation.
9268
9269             Parameters:
9270                  theObject The object to be displaced.
9271                  thePath Wire or Edge along that the object will be translated.
9272                  theDistance progress of Path (0 = start location, 1 = end of path location).
9273                  theReverse  0 - for usual direction, 1 - to reverse path direction.
9274                  theName Object name; when specified, this parameter is used
9275                          for result publication in the study. Otherwise, if automatic
9276                          publication is switched on, default value is used for result name.
9277
9278             Returns:
9279                 New GEOM.GEOM_Object, containing the displaced shape.
9280             """
9281             # Example: see GEOM_TestAll.py
9282             anObj = self.TrsfOp.PositionAlongPath(theObject, thePath, theDistance, 1, theReverse)
9283             RaiseIfFailed("PositionAlongPath", self.TrsfOp)
9284             self._autoPublish(anObj, theName, "displaced")
9285             return anObj
9286
9287         ## Offset given shape.
9288         #  @param theObject The base object for the offset.
9289         #  @param theOffset Offset value.
9290         #  @param theCopy Flag used to offset object itself or create a copy.
9291         #  @return Modified @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
9292         #  new GEOM.GEOM_Object, containing the result of offset operation if @a theCopy flag is @c True.
9293         @ManageTransactions("TrsfOp")
9294         def Offset(self, theObject, theOffset, theCopy=False):
9295             """
9296             Offset given shape.
9297
9298             Parameters:
9299                 theObject The base object for the offset.
9300                 theOffset Offset value.
9301                 theCopy Flag used to offset object itself or create a copy.
9302
9303             Returns:
9304                 Modified theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
9305                 new GEOM.GEOM_Object, containing the result of offset operation if theCopy flag is True.
9306             """
9307             theOffset, Parameters = ParseParameters(theOffset)
9308             if theCopy:
9309                 anObj = self.TrsfOp.OffsetShapeCopy(theObject, theOffset, True)
9310             else:
9311                 anObj = self.TrsfOp.OffsetShape(theObject, theOffset, True)
9312             RaiseIfFailed("Offset", self.TrsfOp)
9313             anObj.SetParameters(Parameters)
9314             return anObj
9315
9316         ## Create new object as offset of the given one. Gap between two adjacent
9317         #  offset surfaces is filled by a pipe.
9318         #  @param theObject The base object for the offset.
9319         #  @param theOffset Offset value.
9320         #  @param theName Object name; when specified, this parameter is used
9321         #         for result publication in the study. Otherwise, if automatic
9322         #         publication is switched on, default value is used for result name.
9323         #
9324         #  @return New GEOM.GEOM_Object, containing the offset object.
9325         #
9326         #  @sa MakeOffsetIntersectionJoin
9327         #  @ref tui_offset "Example"
9328         @ManageTransactions("TrsfOp")
9329         def MakeOffset(self, theObject, theOffset, theName=None):
9330             """
9331             Create new object as offset of the given one. Gap between adjacent
9332             offset surfaces is filled by a pipe.
9333
9334             Parameters:
9335                 theObject The base object for the offset.
9336                 theOffset Offset value.
9337                 theName Object name; when specified, this parameter is used
9338                         for result publication in the study. Otherwise, if automatic
9339                         publication is switched on, default value is used for result name.
9340
9341             Returns:
9342                 New GEOM.GEOM_Object, containing the offset object.
9343
9344             Example of usage:
9345                  box = geompy.MakeBox(20, 20, 20, 200, 200, 200)
9346                  # create a new object as offset of the given object
9347                  offset = geompy.MakeOffset(box, 70.)
9348             """
9349             # Example: see GEOM_TestAll.py
9350             theOffset, Parameters = ParseParameters(theOffset)
9351             anObj = self.TrsfOp.OffsetShapeCopy( theObject, theOffset, True )
9352             RaiseIfFailed("OffsetShapeCopy", self.TrsfOp)
9353             anObj.SetParameters(Parameters)
9354             self._autoPublish(anObj, theName, "offset")
9355             return anObj
9356
9357         ## Create new object as offset of the given one. Gap between adjacent
9358         #  offset surfaces is filled by extending and intersecting them.
9359         #  @param theObject The base object for the offset.
9360         #  @param theOffset Offset value.
9361         #  @param theName Object name; when specified, this parameter is used
9362         #         for result publication in the study. Otherwise, if automatic
9363         #         publication is switched on, default value is used for result name.
9364         #
9365         #  @return New GEOM.GEOM_Object, containing the offset object.
9366         #
9367         #  @sa MakeOffset
9368         #  @ref tui_offset "Example"
9369         @ManageTransactions("TrsfOp")
9370         def MakeOffsetIntersectionJoin(self, theObject, theOffset, theName=None):
9371             """
9372             Create new object as offset of the given one. Gap between adjacent
9373             offset surfaces is filled by extending and intersecting them.
9374
9375             Parameters:
9376                 theObject The base object for the offset.
9377                 theOffset Offset value.
9378                 theName Object name; when specified, this parameter is used
9379                         for result publication in the study. Otherwise, if automatic
9380                         publication is switched on, default value is used for result name.
9381
9382             Returns:
9383                 New GEOM.GEOM_Object, containing the offset object.
9384
9385             Example of usage:
9386                  box = geompy.MakeBox(20, 20, 20, 200, 200, 200)
9387                  # create a new box extended by 70
9388                  offset = geompy.MakeOffsetIntersectionJoin(box, 70.)
9389             """
9390             # Example: see GEOM_TestAll.py
9391             theOffset, Parameters = ParseParameters( theOffset )
9392             anObj = self.TrsfOp.OffsetShapeCopy( theObject, theOffset, False )
9393             RaiseIfFailed("OffsetShapeCopy", self.TrsfOp)
9394             anObj.SetParameters(Parameters)
9395             self._autoPublish(anObj, theName, "offset")
9396             return anObj
9397
9398         ## Create new object as projection of the given one on another.
9399         #  @param theSource The source object for the projection. It can be a point, edge or wire.
9400         #         Edge and wire are acceptable if @a theTarget is a face.
9401         #  @param theTarget The target object. It can be planar or cylindrical face, edge or wire.
9402         #  @param theName Object name; when specified, this parameter is used
9403         #         for result publication in the study. Otherwise, if automatic
9404         #         publication is switched on, default value is used for result name.
9405         #
9406         #  @return New GEOM.GEOM_Object, containing the projection.
9407         #
9408         #  @ref tui_projection "Example"
9409         @ManageTransactions("TrsfOp")
9410         def MakeProjection(self, theSource, theTarget, theName=None):
9411             """
9412             Create new object as projection of the given one on another.
9413
9414             Parameters:
9415                 theSource The source object for the projection. It can be a point, edge or wire.
9416                           Edge and wire are acceptable if theTarget is a face.
9417                 theTarget The target object. It can be planar or cylindrical face, edge or wire.
9418                 theName Object name; when specified, this parameter is used
9419                         for result publication in the study. Otherwise, if automatic
9420                         publication is switched on, default value is used for result name.
9421
9422             Returns:
9423                 New GEOM.GEOM_Object, containing the projection.
9424             """
9425             # Example: see GEOM_TestAll.py
9426             anObj = self.TrsfOp.ProjectShapeCopy(theSource, theTarget)
9427             RaiseIfFailed("ProjectShapeCopy", self.TrsfOp)
9428             self._autoPublish(anObj, theName, "projection")
9429             return anObj
9430
9431         ## Create a projection of the given point on a wire or an edge.
9432         #  If there are no solutions or there are 2 or more solutions It throws an
9433         #  exception.
9434         #  @param thePoint the point to be projected.
9435         #  @param theWire the wire. The edge is accepted as well.
9436         #  @param theName Object name; when specified, this parameter is used
9437         #         for result publication in the study. Otherwise, if automatic
9438         #         publication is switched on, default value is used for result name.
9439         #
9440         #  @return [\a u, \a PointOnEdge, \a EdgeInWireIndex]
9441         #  \n \a u: The parameter of projection point on edge.
9442         #  \n \a PointOnEdge: The projection point.
9443         #  \n \a EdgeInWireIndex: The index of an edge in a wire.
9444         #
9445         #  @ref tui_projection "Example"
9446         @ManageTransactions("TrsfOp")
9447         def MakeProjectionOnWire(self, thePoint, theWire, theName=None):
9448             """
9449             Create a projection of the given point on a wire or an edge.
9450             If there are no solutions or there are 2 or more solutions It throws an
9451             exception.
9452
9453             Parameters:
9454                 thePoint the point to be projected.
9455                 theWire the wire. The edge is accepted as well.
9456                 theName Object name; when specified, this parameter is used
9457                         for result publication in the study. Otherwise, if automatic
9458                         publication is switched on, default value is used for result name.
9459
9460             Returns:
9461                 [u, PointOnEdge, EdgeInWireIndex]
9462                  u: The parameter of projection point on edge.
9463                  PointOnEdge: The projection point.
9464                  EdgeInWireIndex: The index of an edge in a wire.
9465             """
9466             # Example: see GEOM_TestAll.py
9467             anObj = self.TrsfOp.ProjectPointOnWire(thePoint, theWire)
9468             RaiseIfFailed("ProjectPointOnWire", self.TrsfOp)
9469             self._autoPublish(anObj[1], theName, "projection")
9470             return anObj
9471
9472         # -----------------------------------------------------------------------------
9473         # Patterns
9474         # -----------------------------------------------------------------------------
9475
9476         ## Translate the given object along the given vector a given number times
9477         #  @param theObject The object to be translated.
9478         #  @param theVector Direction of the translation. DX if None.
9479         #  @param theStep Distance to translate on.
9480         #  @param theNbTimes Quantity of translations to be done.
9481         #  @param theName Object name; when specified, this parameter is used
9482         #         for result publication in the study. Otherwise, if automatic
9483         #         publication is switched on, default value is used for result name.
9484         #
9485         #  @return New GEOM.GEOM_Object, containing compound of all
9486         #          the shapes, obtained after each translation.
9487         #
9488         #  @ref tui_multi_translation "Example"
9489         @ManageTransactions("TrsfOp")
9490         def MakeMultiTranslation1D(self, theObject, theVector, theStep, theNbTimes, theName=None):
9491             """
9492             Translate the given object along the given vector a given number times
9493
9494             Parameters:
9495                 theObject The object to be translated.
9496                 theVector Direction of the translation. DX if None.
9497                 theStep Distance to translate on.
9498                 theNbTimes Quantity of translations to be done.
9499                 theName Object name; when specified, this parameter is used
9500                         for result publication in the study. Otherwise, if automatic
9501                         publication is switched on, default value is used for result name.
9502
9503             Returns:
9504                 New GEOM.GEOM_Object, containing compound of all
9505                 the shapes, obtained after each translation.
9506
9507             Example of usage:
9508                 r1d = geompy.MakeMultiTranslation1D(prism, vect, 20, 4)
9509             """
9510             # Example: see GEOM_TestAll.py
9511             theStep, theNbTimes, Parameters = ParseParameters(theStep, theNbTimes)
9512             anObj = self.TrsfOp.MultiTranslate1D(theObject, theVector, theStep, theNbTimes)
9513             RaiseIfFailed("MultiTranslate1D", self.TrsfOp)
9514             anObj.SetParameters(Parameters)
9515             self._autoPublish(anObj, theName, "multitranslation")
9516             return anObj
9517
9518         ## Conseqently apply two specified translations to theObject specified number of times.
9519         #  @param theObject The object to be translated.
9520         #  @param theVector1 Direction of the first translation. DX if None.
9521         #  @param theStep1 Step of the first translation.
9522         #  @param theNbTimes1 Quantity of translations to be done along theVector1.
9523         #  @param theVector2 Direction of the second translation. DY if None.
9524         #  @param theStep2 Step of the second translation.
9525         #  @param theNbTimes2 Quantity of translations to be done along theVector2.
9526         #  @param theName Object name; when specified, this parameter is used
9527         #         for result publication in the study. Otherwise, if automatic
9528         #         publication is switched on, default value is used for result name.
9529         #
9530         #  @return New GEOM.GEOM_Object, containing compound of all
9531         #          the shapes, obtained after each translation.
9532         #
9533         #  @ref tui_multi_translation "Example"
9534         @ManageTransactions("TrsfOp")
9535         def MakeMultiTranslation2D(self, theObject, theVector1, theStep1, theNbTimes1,
9536                                    theVector2, theStep2, theNbTimes2, theName=None):
9537             """
9538             Conseqently apply two specified translations to theObject specified number of times.
9539
9540             Parameters:
9541                 theObject The object to be translated.
9542                 theVector1 Direction of the first translation. DX if None.
9543                 theStep1 Step of the first translation.
9544                 theNbTimes1 Quantity of translations to be done along theVector1.
9545                 theVector2 Direction of the second translation. DY if None.
9546                 theStep2 Step of the second translation.
9547                 theNbTimes2 Quantity of translations to be done along theVector2.
9548                 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             Returns:
9553                 New GEOM.GEOM_Object, containing compound of all
9554                 the shapes, obtained after each translation.
9555
9556             Example of usage:
9557                 tr2d = geompy.MakeMultiTranslation2D(prism, vect1, 20, 4, vect2, 80, 3)
9558             """
9559             # Example: see GEOM_TestAll.py
9560             theStep1,theNbTimes1,theStep2,theNbTimes2, Parameters = ParseParameters(theStep1,theNbTimes1,theStep2,theNbTimes2)
9561             anObj = self.TrsfOp.MultiTranslate2D(theObject, theVector1, theStep1, theNbTimes1,
9562                                                  theVector2, theStep2, theNbTimes2)
9563             RaiseIfFailed("MultiTranslate2D", self.TrsfOp)
9564             anObj.SetParameters(Parameters)
9565             self._autoPublish(anObj, theName, "multitranslation")
9566             return anObj
9567
9568         ## Rotate the given object around the given axis a given number times.
9569         #  Rotation angle will be 2*PI/theNbTimes.
9570         #  @param theObject The object to be rotated.
9571         #  @param theAxis The rotation axis. DZ if None.
9572         #  @param theNbTimes Quantity of rotations to be done.
9573         #  @param theName Object name; when specified, this parameter is used
9574         #         for result publication in the study. Otherwise, if automatic
9575         #         publication is switched on, default value is used for result name.
9576         #
9577         #  @return New GEOM.GEOM_Object, containing compound of all the
9578         #          shapes, obtained after each rotation.
9579         #
9580         #  @ref tui_multi_rotation "Example"
9581         @ManageTransactions("TrsfOp")
9582         def MultiRotate1DNbTimes (self, theObject, theAxis, theNbTimes, theName=None):
9583             """
9584             Rotate the given object around the given axis a given number times.
9585             Rotation angle will be 2*PI/theNbTimes.
9586
9587             Parameters:
9588                 theObject The object to be rotated.
9589                 theAxis The rotation axis. DZ if None.
9590                 theNbTimes Quantity of rotations to be done.
9591                 theName Object name; when specified, this parameter is used
9592                         for result publication in the study. Otherwise, if automatic
9593                         publication is switched on, default value is used for result name.
9594
9595             Returns:
9596                 New GEOM.GEOM_Object, containing compound of all the
9597                 shapes, obtained after each rotation.
9598
9599             Example of usage:
9600                 rot1d = geompy.MultiRotate1DNbTimes(prism, vect, 4)
9601             """
9602             # Example: see GEOM_TestAll.py
9603             theNbTimes, Parameters = ParseParameters(theNbTimes)
9604             anObj = self.TrsfOp.MultiRotate1D(theObject, theAxis, theNbTimes)
9605             RaiseIfFailed("MultiRotate1DNbTimes", self.TrsfOp)
9606             anObj.SetParameters(Parameters)
9607             self._autoPublish(anObj, theName, "multirotation")
9608             return anObj
9609
9610         ## Rotate the given object around the given axis
9611         #  a given number times on the given angle.
9612         #  @param theObject The object to be rotated.
9613         #  @param theAxis The rotation axis. DZ if None.
9614         #  @param theAngleStep Rotation angle in radians.
9615         #  @param theNbTimes Quantity of rotations to be done.
9616         #  @param theName Object name; when specified, this parameter is used
9617         #         for result publication in the study. Otherwise, if automatic
9618         #         publication is switched on, default value is used for result name.
9619         #
9620         #  @return New GEOM.GEOM_Object, containing compound of all the
9621         #          shapes, obtained after each rotation.
9622         #
9623         #  @ref tui_multi_rotation "Example"
9624         @ManageTransactions("TrsfOp")
9625         def MultiRotate1DByStep(self, theObject, theAxis, theAngleStep, theNbTimes, theName=None):
9626             """
9627             Rotate the given object around the given axis
9628             a given number times on the given angle.
9629
9630             Parameters:
9631                 theObject The object to be rotated.
9632                 theAxis The rotation axis. DZ if None.
9633                 theAngleStep Rotation angle in radians.
9634                 theNbTimes Quantity of rotations to be done.
9635                 theName Object name; when specified, this parameter is used
9636                         for result publication in the study. Otherwise, if automatic
9637                         publication is switched on, default value is used for result name.
9638
9639             Returns:
9640                 New GEOM.GEOM_Object, containing compound of all the
9641                 shapes, obtained after each rotation.
9642
9643             Example of usage:
9644                 rot1d = geompy.MultiRotate1DByStep(prism, vect, math.pi/4, 4)
9645             """
9646             # Example: see GEOM_TestAll.py
9647             theAngleStep, theNbTimes, Parameters = ParseParameters(theAngleStep, theNbTimes)
9648             anObj = self.TrsfOp.MultiRotate1DByStep(theObject, theAxis, theAngleStep, theNbTimes)
9649             RaiseIfFailed("MultiRotate1DByStep", self.TrsfOp)
9650             anObj.SetParameters(Parameters)
9651             self._autoPublish(anObj, theName, "multirotation")
9652             return anObj
9653
9654         ## Rotate the given object around the given axis a given
9655         #  number times and multi-translate each rotation result.
9656         #  Rotation angle will be 2*PI/theNbTimes1.
9657         #  Translation direction passes through center of gravity
9658         #  of rotated shape and its projection on the rotation axis.
9659         #  @param theObject The object to be rotated.
9660         #  @param theAxis Rotation axis. DZ if None.
9661         #  @param theNbTimes1 Quantity of rotations to be done.
9662         #  @param theRadialStep Translation distance.
9663         #  @param theNbTimes2 Quantity of translations to be done.
9664         #  @param theName Object name; when specified, this parameter is used
9665         #         for result publication in the study. Otherwise, if automatic
9666         #         publication is switched on, default value is used for result name.
9667         #
9668         #  @return New GEOM.GEOM_Object, containing compound of all the
9669         #          shapes, obtained after each transformation.
9670         #
9671         #  @ref tui_multi_rotation "Example"
9672         @ManageTransactions("TrsfOp")
9673         def MultiRotate2DNbTimes(self, theObject, theAxis, theNbTimes1, theRadialStep, theNbTimes2, theName=None):
9674             """
9675             Rotate the given object around the
9676             given axis on the given angle a given number
9677             times and multi-translate each rotation result.
9678             Translation direction passes through center of gravity
9679             of rotated shape and its projection on the rotation axis.
9680
9681             Parameters:
9682                 theObject The object to be rotated.
9683                 theAxis Rotation axis. DZ if None.
9684                 theNbTimes1 Quantity of rotations to be done.
9685                 theRadialStep Translation distance.
9686                 theNbTimes2 Quantity of translations to be done.
9687                 theName Object name; when specified, this parameter is used
9688                         for result publication in the study. Otherwise, if automatic
9689                         publication is switched on, default value is used for result name.
9690
9691             Returns:
9692                 New GEOM.GEOM_Object, containing compound of all the
9693                 shapes, obtained after each transformation.
9694
9695             Example of usage:
9696                 rot2d = geompy.MultiRotate2D(prism, vect, 60, 4, 50, 5)
9697             """
9698             # Example: see GEOM_TestAll.py
9699             theNbTimes1, theRadialStep, theNbTimes2, Parameters = ParseParameters(theNbTimes1, theRadialStep, theNbTimes2)
9700             anObj = self.TrsfOp.MultiRotate2DNbTimes(theObject, theAxis, theNbTimes1, theRadialStep, theNbTimes2)
9701             RaiseIfFailed("MultiRotate2DNbTimes", self.TrsfOp)
9702             anObj.SetParameters(Parameters)
9703             self._autoPublish(anObj, theName, "multirotation")
9704             return anObj
9705
9706         ## Rotate the given object around the
9707         #  given axis on the given angle a given number
9708         #  times and multi-translate each rotation result.
9709         #  Translation direction passes through center of gravity
9710         #  of rotated shape and its projection on the rotation axis.
9711         #  @param theObject The object to be rotated.
9712         #  @param theAxis Rotation axis. DZ if None.
9713         #  @param theAngleStep Rotation angle in radians.
9714         #  @param theNbTimes1 Quantity of rotations to be done.
9715         #  @param theRadialStep Translation distance.
9716         #  @param theNbTimes2 Quantity of translations to be done.
9717         #  @param theName Object name; when specified, this parameter is used
9718         #         for result publication in the study. Otherwise, if automatic
9719         #         publication is switched on, default value is used for result name.
9720         #
9721         #  @return New GEOM.GEOM_Object, containing compound of all the
9722         #          shapes, obtained after each transformation.
9723         #
9724         #  @ref tui_multi_rotation "Example"
9725         @ManageTransactions("TrsfOp")
9726         def MultiRotate2DByStep (self, theObject, theAxis, theAngleStep, theNbTimes1, theRadialStep, theNbTimes2, theName=None):
9727             """
9728             Rotate the given object around the
9729             given axis on the given angle a given number
9730             times and multi-translate each rotation result.
9731             Translation direction passes through center of gravity
9732             of rotated shape and its projection on the rotation axis.
9733
9734             Parameters:
9735                 theObject The object to be rotated.
9736                 theAxis Rotation axis. DZ if None.
9737                 theAngleStep Rotation angle in radians.
9738                 theNbTimes1 Quantity of rotations to be done.
9739                 theRadialStep Translation distance.
9740                 theNbTimes2 Quantity of translations to be done.
9741                 theName Object name; when specified, this parameter is used
9742                         for result publication in the study. Otherwise, if automatic
9743                         publication is switched on, default value is used for result name.
9744
9745             Returns:
9746                 New GEOM.GEOM_Object, containing compound of all the
9747                 shapes, obtained after each transformation.
9748
9749             Example of usage:
9750                 rot2d = geompy.MultiRotate2D(prism, vect, math.pi/3, 4, 50, 5)
9751             """
9752             # Example: see GEOM_TestAll.py
9753             theAngleStep, theNbTimes1, theRadialStep, theNbTimes2, Parameters = ParseParameters(theAngleStep, theNbTimes1, theRadialStep, theNbTimes2)
9754             anObj = self.TrsfOp.MultiRotate2DByStep(theObject, theAxis, theAngleStep, theNbTimes1, theRadialStep, theNbTimes2)
9755             RaiseIfFailed("MultiRotate2DByStep", self.TrsfOp)
9756             anObj.SetParameters(Parameters)
9757             self._autoPublish(anObj, theName, "multirotation")
9758             return anObj
9759
9760         ## The same, as MultiRotate1DNbTimes(), but axis is given by direction and point
9761         #
9762         #  @ref swig_MakeMultiRotation "Example"
9763         def MakeMultiRotation1DNbTimes(self, aShape, aDir, aPoint, aNbTimes, theName=None):
9764             """
9765             The same, as geompy.MultiRotate1DNbTimes, but axis is given by direction and point
9766
9767             Example of usage:
9768                 pz = geompy.MakeVertex(0, 0, 100)
9769                 vy = geompy.MakeVectorDXDYDZ(0, 100, 0)
9770                 MultiRot1D = geompy.MakeMultiRotation1DNbTimes(prism, vy, pz, 6)
9771             """
9772             # Example: see GEOM_TestOthers.py
9773             aVec = self.MakeLine(aPoint,aDir)
9774             # note: auto-publishing is done in self.MultiRotate1D()
9775             anObj = self.MultiRotate1DNbTimes(aShape, aVec, aNbTimes, theName)
9776             return anObj
9777
9778         ## The same, as MultiRotate1DByStep(), but axis is given by direction and point
9779         #
9780         #  @ref swig_MakeMultiRotation "Example"
9781         def MakeMultiRotation1DByStep(self, aShape, aDir, aPoint, anAngle, aNbTimes, theName=None):
9782             """
9783             The same, as geompy.MultiRotate1D, but axis is given by direction and point
9784
9785             Example of usage:
9786                 pz = geompy.MakeVertex(0, 0, 100)
9787                 vy = geompy.MakeVectorDXDYDZ(0, 100, 0)
9788                 MultiRot1D = geompy.MakeMultiRotation1DByStep(prism, vy, pz, math.pi/3, 6)
9789             """
9790             # Example: see GEOM_TestOthers.py
9791             aVec = self.MakeLine(aPoint,aDir)
9792             # note: auto-publishing is done in self.MultiRotate1D()
9793             anObj = self.MultiRotate1DByStep(aShape, aVec, anAngle, aNbTimes, theName)
9794             return anObj
9795
9796         ## The same, as MultiRotate2DNbTimes(), but axis is given by direction and point
9797         #
9798         #  @ref swig_MakeMultiRotation "Example"
9799         def MakeMultiRotation2DNbTimes(self, aShape, aDir, aPoint, nbtimes1, aStep, nbtimes2, theName=None):
9800             """
9801             The same, as MultiRotate2DNbTimes(), but axis is given by direction and point
9802
9803             Example of usage:
9804                 pz = geompy.MakeVertex(0, 0, 100)
9805                 vy = geompy.MakeVectorDXDYDZ(0, 100, 0)
9806                 MultiRot2D = geompy.MakeMultiRotation2DNbTimes(f12, vy, pz, 6, 30, 3)
9807             """
9808             # Example: see GEOM_TestOthers.py
9809             aVec = self.MakeLine(aPoint,aDir)
9810             # note: auto-publishing is done in self.MultiRotate2DNbTimes()
9811             anObj = self.MultiRotate2DNbTimes(aShape, aVec, nbtimes1, aStep, nbtimes2, theName)
9812             return anObj
9813
9814         ## The same, as MultiRotate2DByStep(), but axis is given by direction and point
9815         #
9816         #  @ref swig_MakeMultiRotation "Example"
9817         def MakeMultiRotation2DByStep(self, aShape, aDir, aPoint, anAngle, nbtimes1, aStep, nbtimes2, theName=None):
9818             """
9819             The same, as MultiRotate2DByStep(), but axis is given by direction and point
9820
9821             Example of usage:
9822                 pz = geompy.MakeVertex(0, 0, 100)
9823                 vy = geompy.MakeVectorDXDYDZ(0, 100, 0)
9824                 MultiRot2D = geompy.MakeMultiRotation2DByStep(f12, vy, pz, math.pi/4, 6, 30, 3)
9825             """
9826             # Example: see GEOM_TestOthers.py
9827             aVec = self.MakeLine(aPoint,aDir)
9828             # note: auto-publishing is done in self.MultiRotate2D()
9829             anObj = self.MultiRotate2DByStep(aShape, aVec, anAngle, nbtimes1, aStep, nbtimes2, theName)
9830             return anObj
9831
9832         ##
9833         #  Compute a wire or a face that represents a projection of the source
9834         #  shape onto cylinder. The cylinder's coordinate system is the same
9835         #  as the global coordinate system.
9836         #
9837         #  @param theObject The object to be projected. It can be either
9838         #         a planar wire or a face.
9839         #  @param theRadius The radius of the cylinder.
9840         #  @param theStartAngle The starting angle in radians from
9841         #         the cylinder's X axis around Z axis. The angle from which
9842         #         the projection is started.
9843         #  @param theAngleLength The projection length angle in radians.
9844         #         The angle in which to project the total length of the wire.
9845         #         If it is negative the projection is not scaled and natural
9846         #         wire length is kept for the projection.
9847         #  @param theAngleRotation The desired angle in radians between
9848         #         the tangent vector to the first curve at the first point of
9849         #         the theObject's projection in 2D space and U-direction of
9850         #         cylinder's 2D space.
9851         #  @param theName Object name; when specified, this parameter is used
9852         #         for result publication in the study. Otherwise, if automatic
9853         #         publication is switched on, default value is used for result name.
9854         #
9855         #  @return New GEOM.GEOM_Object, containing the result shape. The result
9856         #         represents a wire or a face that represents a projection of
9857         #         the source shape onto a cylinder.
9858         #
9859         #  @ref tui_projection "Example"
9860         def MakeProjectionOnCylinder (self, theObject, theRadius,
9861                                       theStartAngle=0.0, theAngleLength=-1.0,
9862                                       theAngleRotation=0.0,
9863                                       theName=None):
9864             """
9865             Compute a wire or a face that represents a projection of the source
9866             shape onto cylinder. The cylinder's coordinate system is the same
9867             as the global coordinate system.
9868
9869             Parameters:
9870                 theObject The object to be projected. It can be either
9871                         a planar wire or a face.
9872                 theRadius The radius of the cylinder.
9873                 theStartAngle The starting angle in radians from the cylinder's X axis
9874                         around Z axis. The angle from which the projection is started.
9875                 theAngleLength The projection length angle in radians. The angle in which
9876                         to project the total length of the wire. If it is negative the
9877                         projection is not scaled and natural wire length is kept for
9878                         the projection.
9879                 theAngleRotation The desired angle in radians between
9880                         the tangent vector to the first curve at the first
9881                         point of the theObject's projection in 2D space and
9882                         U-direction of cylinder's 2D space.
9883                 theName Object name; when specified, this parameter is used
9884                         for result publication in the study. Otherwise, if automatic
9885                         publication is switched on, default value is used for result name.
9886
9887             Returns:
9888                 New GEOM.GEOM_Object, containing the result shape. The result
9889                 represents a wire or a face that represents a projection of
9890                 the source shape onto a cylinder.
9891             """
9892             # Example: see GEOM_TestAll.py
9893             flagStartAngle = False
9894             if isinstance(theStartAngle,str):
9895                 flagStartAngle = True
9896             flagAngleLength = False
9897             if isinstance(theAngleLength,str):
9898                 flagAngleLength = True
9899             flagAngleRotation = False
9900             if isinstance(theAngleRotation,str):
9901                 flagAngleRotation = True
9902             theRadius, theStartAngle, theAngleLength, theAngleRotation, Parameters = ParseParameters(
9903               theRadius, theStartAngle, theAngleLength, theAngleRotation)
9904             if flagStartAngle:
9905                 theStartAngle = theStartAngle*math.pi/180.
9906             if flagAngleLength:
9907                 theAngleLength = theAngleLength*math.pi/180.
9908             if flagAngleRotation:
9909                 theAngleRotation = theAngleRotation*math.pi/180.
9910             anObj = self.TrsfOp.MakeProjectionOnCylinder(theObject, theRadius,
9911                 theStartAngle, theAngleLength, theAngleRotation)
9912             RaiseIfFailed("MakeProjectionOnCylinder", self.TrsfOp)
9913             anObj.SetParameters(Parameters)
9914             self._autoPublish(anObj, theName, "projection")
9915             return anObj
9916
9917         # end of l3_transform
9918         ## @}
9919
9920         ## @addtogroup l3_transform_d
9921         ## @{
9922
9923         ## Deprecated method. Use MultiRotate1DNbTimes instead.
9924         def MultiRotate1D(self, theObject, theAxis, theNbTimes, theName=None):
9925             """
9926             Deprecated method. Use MultiRotate1DNbTimes instead.
9927             """
9928             print("The method MultiRotate1D is DEPRECATED. Use MultiRotate1DNbTimes instead.")
9929             return self.MultiRotate1DNbTimes(theObject, theAxis, theNbTimes, theName)
9930
9931         ## The same, as MultiRotate2DByStep(), but theAngle is in degrees.
9932         #  This method is DEPRECATED. Use MultiRotate2DByStep() instead.
9933         @ManageTransactions("TrsfOp")
9934         def MultiRotate2D(self, theObject, theAxis, theAngle, theNbTimes1, theStep, theNbTimes2, theName=None):
9935             """
9936             The same, as MultiRotate2DByStep(), but theAngle is in degrees.
9937             This method is DEPRECATED. Use MultiRotate2DByStep() instead.
9938
9939             Example of usage:
9940                 rot2d = geompy.MultiRotate2D(prism, vect, 60, 4, 50, 5)
9941             """
9942             print("The method MultiRotate2D is DEPRECATED. Use MultiRotate2DByStep instead.")
9943             theAngle, theNbTimes1, theStep, theNbTimes2, Parameters = ParseParameters(theAngle, theNbTimes1, theStep, theNbTimes2)
9944             anObj = self.TrsfOp.MultiRotate2D(theObject, theAxis, theAngle, theNbTimes1, theStep, theNbTimes2)
9945             RaiseIfFailed("MultiRotate2D", self.TrsfOp)
9946             anObj.SetParameters(Parameters)
9947             self._autoPublish(anObj, theName, "multirotation")
9948             return anObj
9949
9950         ## The same, as MultiRotate1D(), but axis is given by direction and point
9951         #  This method is DEPRECATED. Use MakeMultiRotation1DNbTimes instead.
9952         def MakeMultiRotation1D(self, aShape, aDir, aPoint, aNbTimes, theName=None):
9953             """
9954             The same, as geompy.MultiRotate1D, but axis is given by direction and point.
9955             This method is DEPRECATED. Use MakeMultiRotation1DNbTimes instead.
9956
9957             Example of usage:
9958                 pz = geompy.MakeVertex(0, 0, 100)
9959                 vy = geompy.MakeVectorDXDYDZ(0, 100, 0)
9960                 MultiRot1D = geompy.MakeMultiRotation1D(prism, vy, pz, 6)
9961             """
9962             print("The method MakeMultiRotation1D is DEPRECATED. Use MakeMultiRotation1DNbTimes instead.")
9963             aVec = self.MakeLine(aPoint,aDir)
9964             # note: auto-publishing is done in self.MultiRotate1D()
9965             anObj = self.MultiRotate1D(aShape, aVec, aNbTimes, theName)
9966             return anObj
9967
9968         ## The same, as MultiRotate2D(), but axis is given by direction and point
9969         #  This method is DEPRECATED. Use MakeMultiRotation2DByStep instead.
9970         def MakeMultiRotation2D(self, aShape, aDir, aPoint, anAngle, nbtimes1, aStep, nbtimes2, theName=None):
9971             """
9972             The same, as MultiRotate2D(), but axis is given by direction and point
9973             This method is DEPRECATED. Use MakeMultiRotation2DByStep instead.
9974
9975             Example of usage:
9976                 pz = geompy.MakeVertex(0, 0, 100)
9977                 vy = geompy.MakeVectorDXDYDZ(0, 100, 0)
9978                 MultiRot2D = geompy.MakeMultiRotation2D(f12, vy, pz, 45, 6, 30, 3)
9979             """
9980             print("The method MakeMultiRotation2D is DEPRECATED. Use MakeMultiRotation2DByStep instead.")
9981             aVec = self.MakeLine(aPoint,aDir)
9982             # note: auto-publishing is done in self.MultiRotate2D()
9983             anObj = self.MultiRotate2D(aShape, aVec, anAngle, nbtimes1, aStep, nbtimes2, theName)
9984             return anObj
9985
9986         # end of l3_transform_d
9987         ## @}
9988
9989         ## @addtogroup l3_local
9990         ## @{
9991
9992         ## Perform a fillet on all edges of the given shape.
9993         #  @param theShape Shape, to perform fillet on.
9994         #  @param theR Fillet radius.
9995         #  @param theName Object name; when specified, this parameter is used
9996         #         for result publication in the study. Otherwise, if automatic
9997         #         publication is switched on, default value is used for result name.
9998         #
9999         #  @return New GEOM.GEOM_Object, containing the result shape.
10000         #
10001         #  @ref tui_fillet "Example 1"
10002         #  \n @ref swig_MakeFilletAll "Example 2"
10003         @ManageTransactions("LocalOp")
10004         def MakeFilletAll(self, theShape, theR, theName=None):
10005             """
10006             Perform a fillet on all edges of the given shape.
10007
10008             Parameters:
10009                 theShape Shape, to perform fillet on.
10010                 theR Fillet radius.
10011                 theName Object name; when specified, this parameter is used
10012                         for result publication in the study. Otherwise, if automatic
10013                         publication is switched on, default value is used for result name.
10014
10015             Returns:
10016                 New GEOM.GEOM_Object, containing the result shape.
10017
10018             Example of usage:
10019                filletall = geompy.MakeFilletAll(prism, 10.)
10020             """
10021             # Example: see GEOM_TestOthers.py
10022             theR,Parameters = ParseParameters(theR)
10023             anObj = self.LocalOp.MakeFilletAll(theShape, theR)
10024             RaiseIfFailed("MakeFilletAll", self.LocalOp)
10025             anObj.SetParameters(Parameters)
10026             self._autoPublish(anObj, theName, "fillet")
10027             return anObj
10028
10029         ## Perform a fillet on the specified edges/faces of the given shape
10030         #  @param theShape Shape, to perform fillet on.
10031         #  @param theR Fillet radius.
10032         #  @param theShapeType Type of shapes in <VAR>theListShapes</VAR> (see ShapeType())
10033         #  @param theListShapes Global indices of edges/faces to perform fillet on.
10034         #  @param theName Object name; when specified, this parameter is used
10035         #         for result publication in the study. Otherwise, if automatic
10036         #         publication is switched on, default value is used for result name.
10037         #
10038         #  @note Global index of sub-shape can be obtained, using method GetSubShapeID().
10039         #
10040         #  @return New GEOM.GEOM_Object, containing the result shape.
10041         #
10042         #  @ref tui_fillet "Example"
10043         @ManageTransactions("LocalOp")
10044         def MakeFillet(self, theShape, theR, theShapeType, theListShapes, theName=None):
10045             """
10046             Perform a fillet on the specified edges/faces of the given shape
10047
10048             Parameters:
10049                 theShape Shape, to perform fillet on.
10050                 theR Fillet radius.
10051                 theShapeType Type of shapes in theListShapes (see geompy.ShapeTypes)
10052                 theListShapes Global indices of edges/faces to perform fillet on.
10053                 theName Object name; when specified, this parameter is used
10054                         for result publication in the study. Otherwise, if automatic
10055                         publication is switched on, default value is used for result name.
10056
10057             Note:
10058                 Global index of sub-shape can be obtained, using method geompy.GetSubShapeID
10059
10060             Returns:
10061                 New GEOM.GEOM_Object, containing the result shape.
10062
10063             Example of usage:
10064                 # get the list of IDs (IDList) for the fillet
10065                 prism_edges = geompy.SubShapeAllSortedCentres(prism, geompy.ShapeType["EDGE"])
10066                 IDlist_e = []
10067                 IDlist_e.append(geompy.GetSubShapeID(prism, prism_edges[0]))
10068                 IDlist_e.append(geompy.GetSubShapeID(prism, prism_edges[1]))
10069                 IDlist_e.append(geompy.GetSubShapeID(prism, prism_edges[2]))
10070                 # make a fillet on the specified edges of the given shape
10071                 fillet = geompy.MakeFillet(prism, 10., geompy.ShapeType["EDGE"], IDlist_e)
10072             """
10073             # Example: see GEOM_TestAll.py
10074             theR,Parameters = ParseParameters(theR)
10075             anObj = None
10076             if theShapeType == self.ShapeType["EDGE"]:
10077                 anObj = self.LocalOp.MakeFilletEdges(theShape, theR, theListShapes)
10078                 RaiseIfFailed("MakeFilletEdges", self.LocalOp)
10079             else:
10080                 anObj = self.LocalOp.MakeFilletFaces(theShape, theR, theListShapes)
10081                 RaiseIfFailed("MakeFilletFaces", self.LocalOp)
10082             anObj.SetParameters(Parameters)
10083             self._autoPublish(anObj, theName, "fillet")
10084             return anObj
10085
10086         ## The same that MakeFillet() but with two Fillet Radius R1 and R2
10087         @ManageTransactions("LocalOp")
10088         def MakeFilletR1R2(self, theShape, theR1, theR2, theShapeType, theListShapes, theName=None):
10089             """
10090             The same that geompy.MakeFillet but with two Fillet Radius R1 and R2
10091
10092             Example of usage:
10093                 # get the list of IDs (IDList) for the fillet
10094                 prism_edges = geompy.SubShapeAllSortedCentres(prism, geompy.ShapeType["EDGE"])
10095                 IDlist_e = []
10096                 IDlist_e.append(geompy.GetSubShapeID(prism, prism_edges[0]))
10097                 IDlist_e.append(geompy.GetSubShapeID(prism, prism_edges[1]))
10098                 IDlist_e.append(geompy.GetSubShapeID(prism, prism_edges[2]))
10099                 # make a fillet on the specified edges of the given shape
10100                 fillet = geompy.MakeFillet(prism, 10., 15., geompy.ShapeType["EDGE"], IDlist_e)
10101             """
10102             theR1,theR2,Parameters = ParseParameters(theR1,theR2)
10103             anObj = None
10104             if theShapeType == self.ShapeType["EDGE"]:
10105                 anObj = self.LocalOp.MakeFilletEdgesR1R2(theShape, theR1, theR2, theListShapes)
10106                 RaiseIfFailed("MakeFilletEdgesR1R2", self.LocalOp)
10107             else:
10108                 anObj = self.LocalOp.MakeFilletFacesR1R2(theShape, theR1, theR2, theListShapes)
10109                 RaiseIfFailed("MakeFilletFacesR1R2", self.LocalOp)
10110             anObj.SetParameters(Parameters)
10111             self._autoPublish(anObj, theName, "fillet")
10112             return anObj
10113
10114         ## Perform a fillet on the specified edges of the given shape
10115         #  @param theShape  Wire Shape to perform fillet on.
10116         #  @param theR  Fillet radius.
10117         #  @param theListOfVertexes Global indices of vertexes to perform fillet on.
10118         #    \note Global index of sub-shape can be obtained, using method GetSubShapeID()
10119         #    \note The list of vertices could be empty,
10120         #          in this case fillet will done done at all vertices in wire
10121         #  @param doIgnoreSecantVertices If FALSE, fillet radius is always limited
10122         #         by the length of the edges, nearest to the fillet vertex.
10123         #         But sometimes the next edge is C1 continuous with the one, nearest to
10124         #         the fillet point, and such two (or more) edges can be united to allow
10125         #         bigger radius. Set this flag to TRUE to allow collinear edges union,
10126         #         thus ignoring the secant vertex (vertices).
10127         #  @param theName Object name; when specified, this parameter is used
10128         #         for result publication in the study. Otherwise, if automatic
10129         #         publication is switched on, default value is used for result name.
10130         #
10131         #  @return New GEOM.GEOM_Object, containing the result shape.
10132         #
10133         #  @ref tui_fillet2d "Example"
10134         @ManageTransactions("LocalOp")
10135         def MakeFillet1D(self, theShape, theR, theListOfVertexes, doIgnoreSecantVertices = True, theName=None):
10136             """
10137             Perform a fillet on the specified edges of the given shape
10138
10139             Parameters:
10140                 theShape  Wire Shape to perform fillet on.
10141                 theR  Fillet radius.
10142                 theListOfVertexes Global indices of vertexes to perform fillet on.
10143                 doIgnoreSecantVertices If FALSE, fillet radius is always limited
10144                     by the length of the edges, nearest to the fillet vertex.
10145                     But sometimes the next edge is C1 continuous with the one, nearest to
10146                     the fillet point, and such two (or more) edges can be united to allow
10147                     bigger radius. Set this flag to TRUE to allow collinear edges union,
10148                     thus ignoring the secant vertex (vertices).
10149                 theName Object name; when specified, this parameter is used
10150                         for result publication in the study. Otherwise, if automatic
10151                         publication is switched on, default value is used for result name.
10152             Note:
10153                 Global index of sub-shape can be obtained, using method geompy.GetSubShapeID
10154
10155                 The list of vertices could be empty,in this case fillet will done done at all vertices in wire
10156
10157             Returns:
10158                 New GEOM.GEOM_Object, containing the result shape.
10159
10160             Example of usage:
10161                 # create wire
10162                 Wire_1 = geompy.MakeWire([Edge_12, Edge_7, Edge_11, Edge_6, Edge_1,Edge_4])
10163                 # make fillet at given wire vertices with giver radius
10164                 Fillet_1D_1 = geompy.MakeFillet1D(Wire_1, 55, [3, 4, 6, 8, 10])
10165             """
10166             # Example: see GEOM_TestAll.py
10167             theR,doIgnoreSecantVertices,Parameters = ParseParameters(theR,doIgnoreSecantVertices)
10168             anObj = self.LocalOp.MakeFillet1D(theShape, theR, theListOfVertexes, doIgnoreSecantVertices)
10169             RaiseIfFailed("MakeFillet1D", self.LocalOp)
10170             anObj.SetParameters(Parameters)
10171             self._autoPublish(anObj, theName, "fillet")
10172             return anObj
10173
10174         ## Perform a fillet at the specified vertices of the given face/shell.
10175         #  @param theShape Face or Shell shape to perform fillet on.
10176         #  @param theR Fillet radius.
10177         #  @param theListOfVertexes Global indices of vertexes to perform fillet on.
10178         #  @param theName Object name; when specified, this parameter is used
10179         #         for result publication in the study. Otherwise, if automatic
10180         #         publication is switched on, default value is used for result name.
10181         #
10182         #  @note Global index of sub-shape can be obtained, using method GetSubShapeID().
10183         #
10184         #  @return New GEOM.GEOM_Object, containing the result shape.
10185         #
10186         #  @ref tui_fillet2d "Example"
10187         @ManageTransactions("LocalOp")
10188         def MakeFillet2D(self, theShape, theR, theListOfVertexes, theName=None):
10189             """
10190             Perform a fillet at the specified vertices of the given face/shell.
10191
10192             Parameters:
10193                 theShape  Face or Shell shape to perform fillet on.
10194                 theR  Fillet radius.
10195                 theListOfVertexes Global indices of vertexes to perform fillet on.
10196                 theName Object name; when specified, this parameter is used
10197                         for result publication in the study. Otherwise, if automatic
10198                         publication is switched on, default value is used for result name.
10199             Note:
10200                 Global index of sub-shape can be obtained, using method geompy.GetSubShapeID
10201
10202             Returns:
10203                 New GEOM.GEOM_Object, containing the result shape.
10204
10205             Example of usage:
10206                 face = geompy.MakeFaceHW(100, 100, 1)
10207                 fillet2d = geompy.MakeFillet2D(face, 30, [7, 9])
10208             """
10209             # Example: see GEOM_TestAll.py
10210             theR,Parameters = ParseParameters(theR)
10211             anObj = self.LocalOp.MakeFillet2D(theShape, theR, theListOfVertexes)
10212             RaiseIfFailed("MakeFillet2D", self.LocalOp)
10213             anObj.SetParameters(Parameters)
10214             self._autoPublish(anObj, theName, "fillet")
10215             return anObj
10216
10217         ## Perform a symmetric chamfer on all edges of the given shape.
10218         #  @param theShape Shape, to perform chamfer on.
10219         #  @param theD Chamfer size along each face.
10220         #  @param theName Object name; when specified, this parameter is used
10221         #         for result publication in the study. Otherwise, if automatic
10222         #         publication is switched on, default value is used for result name.
10223         #
10224         #  @return New GEOM.GEOM_Object, containing the result shape.
10225         #
10226         #  @ref tui_chamfer "Example 1"
10227         #  \n @ref swig_MakeChamferAll "Example 2"
10228         @ManageTransactions("LocalOp")
10229         def MakeChamferAll(self, theShape, theD, theName=None):
10230             """
10231             Perform a symmetric chamfer on all edges of the given shape.
10232
10233             Parameters:
10234                 theShape Shape, to perform chamfer on.
10235                 theD Chamfer size along each face.
10236                 theName Object name; when specified, this parameter is used
10237                         for result publication in the study. Otherwise, if automatic
10238                         publication is switched on, default value is used for result name.
10239
10240             Returns:
10241                 New GEOM.GEOM_Object, containing the result shape.
10242
10243             Example of usage:
10244                 chamfer_all = geompy.MakeChamferAll(prism, 10.)
10245             """
10246             # Example: see GEOM_TestOthers.py
10247             theD,Parameters = ParseParameters(theD)
10248             anObj = self.LocalOp.MakeChamferAll(theShape, theD)
10249             RaiseIfFailed("MakeChamferAll", self.LocalOp)
10250             anObj.SetParameters(Parameters)
10251             self._autoPublish(anObj, theName, "chamfer")
10252             return anObj
10253
10254         ## Perform a chamfer on edges, common to the specified faces,
10255         #  with distance D1 on the Face1
10256         #  @param theShape Shape, to perform chamfer on.
10257         #  @param theD1 Chamfer size along \a theFace1.
10258         #  @param theD2 Chamfer size along \a theFace2.
10259         #  @param theFace1,theFace2 Global indices of two faces of \a theShape.
10260         #  @param theName Object name; when specified, this parameter is used
10261         #         for result publication in the study. Otherwise, if automatic
10262         #         publication is switched on, default value is used for result name.
10263         #
10264         #  @note Global index of sub-shape can be obtained, using method GetSubShapeID().
10265         #
10266         #  @return New GEOM.GEOM_Object, containing the result shape.
10267         #
10268         #  @ref tui_chamfer "Example"
10269         @ManageTransactions("LocalOp")
10270         def MakeChamferEdge(self, theShape, theD1, theD2, theFace1, theFace2, theName=None):
10271             """
10272             Perform a chamfer on edges, common to the specified faces,
10273             with distance D1 on the Face1
10274
10275             Parameters:
10276                 theShape Shape, to perform chamfer on.
10277                 theD1 Chamfer size along theFace1.
10278                 theD2 Chamfer size along theFace2.
10279                 theFace1,theFace2 Global indices of two faces of theShape.
10280                 theName Object name; when specified, this parameter is used
10281                         for result publication in the study. Otherwise, if automatic
10282                         publication is switched on, default value is used for result name.
10283
10284             Note:
10285                 Global index of sub-shape can be obtained, using method geompy.GetSubShapeID
10286
10287             Returns:
10288                 New GEOM.GEOM_Object, containing the result shape.
10289
10290             Example of usage:
10291                 prism_faces = geompy.SubShapeAllSortedCentres(prism, geompy.ShapeType["FACE"])
10292                 f_ind_1 = geompy.GetSubShapeID(prism, prism_faces[0])
10293                 f_ind_2 = geompy.GetSubShapeID(prism, prism_faces[1])
10294                 chamfer_e = geompy.MakeChamferEdge(prism, 10., 10., f_ind_1, f_ind_2)
10295             """
10296             # Example: see GEOM_TestAll.py
10297             theD1,theD2,Parameters = ParseParameters(theD1,theD2)
10298             anObj = self.LocalOp.MakeChamferEdge(theShape, theD1, theD2, theFace1, theFace2)
10299             RaiseIfFailed("MakeChamferEdge", self.LocalOp)
10300             anObj.SetParameters(Parameters)
10301             self._autoPublish(anObj, theName, "chamfer")
10302             return anObj
10303
10304         ## Perform a chamfer on edges
10305         #  @param theShape Shape, to perform chamfer on.
10306         #  @param theD Chamfer length
10307         #  @param theAngle Angle of chamfer (angle in radians or a name of variable which defines angle in degrees)
10308         #  @param theFace1,theFace2 Global indices of two faces of \a theShape.
10309         #  @param theName Object name; when specified, this parameter is used
10310         #         for result publication in the study. Otherwise, if automatic
10311         #         publication is switched on, default value is used for result name.
10312         #
10313         #  @note Global index of sub-shape can be obtained, using method GetSubShapeID().
10314         #
10315         #  @return New GEOM.GEOM_Object, containing the result shape.
10316         @ManageTransactions("LocalOp")
10317         def MakeChamferEdgeAD(self, theShape, theD, theAngle, theFace1, theFace2, theName=None):
10318             """
10319             Perform a chamfer on edges
10320
10321             Parameters:
10322                 theShape Shape, to perform chamfer on.
10323                 theD1 Chamfer size along theFace1.
10324                 theAngle Angle of chamfer (angle in radians or a name of variable which defines angle in degrees).
10325                 theFace1,theFace2 Global indices of two faces of theShape.
10326                 theName Object name; when specified, this parameter is used
10327                         for result publication in the study. Otherwise, if automatic
10328                         publication is switched on, default value is used for result name.
10329
10330             Note:
10331                 Global index of sub-shape can be obtained, using method geompy.GetSubShapeID
10332
10333             Returns:
10334                 New GEOM.GEOM_Object, containing the result shape.
10335
10336             Example of usage:
10337                 prism_faces = geompy.SubShapeAllSortedCentres(prism, geompy.ShapeType["FACE"])
10338                 f_ind_1 = geompy.GetSubShapeID(prism, prism_faces[0])
10339                 f_ind_2 = geompy.GetSubShapeID(prism, prism_faces[1])
10340                 ang = 30
10341                 chamfer_e = geompy.MakeChamferEdge(prism, 10., ang, f_ind_1, f_ind_2)
10342             """
10343             flag = False
10344             if isinstance(theAngle,str):
10345                 flag = True
10346             theD,theAngle,Parameters = ParseParameters(theD,theAngle)
10347             if flag:
10348                 theAngle = theAngle*math.pi/180.0
10349             anObj = self.LocalOp.MakeChamferEdgeAD(theShape, theD, theAngle, theFace1, theFace2)
10350             RaiseIfFailed("MakeChamferEdgeAD", self.LocalOp)
10351             anObj.SetParameters(Parameters)
10352             self._autoPublish(anObj, theName, "chamfer")
10353             return anObj
10354
10355         ## Perform a chamfer on all edges of the specified faces,
10356         #  with distance D1 on the first specified face (if several for one edge)
10357         #  @param theShape Shape, to perform chamfer on.
10358         #  @param theD1 Chamfer size along face from \a theFaces. If both faces,
10359         #               connected to the edge, are in \a theFaces, \a theD1
10360         #               will be get along face, which is nearer to \a theFaces beginning.
10361         #  @param theD2 Chamfer size along another of two faces, connected to the edge.
10362         #  @param theFaces Sequence of global indices of faces of \a theShape.
10363         #  @param theName Object name; when specified, this parameter is used
10364         #         for result publication in the study. Otherwise, if automatic
10365         #         publication is switched on, default value is used for result name.
10366         #
10367         #  @note Global index of sub-shape can be obtained, using method GetSubShapeID().
10368         #
10369         #  @return New GEOM.GEOM_Object, containing the result shape.
10370         #
10371         #  @ref tui_chamfer "Example"
10372         @ManageTransactions("LocalOp")
10373         def MakeChamferFaces(self, theShape, theD1, theD2, theFaces, theName=None):
10374             """
10375             Perform a chamfer on all edges of the specified faces,
10376             with distance D1 on the first specified face (if several for one edge)
10377
10378             Parameters:
10379                 theShape Shape, to perform chamfer on.
10380                 theD1 Chamfer size along face from  theFaces. If both faces,
10381                       connected to the edge, are in theFaces, theD1
10382                       will be get along face, which is nearer to theFaces beginning.
10383                 theD2 Chamfer size along another of two faces, connected to the edge.
10384                 theFaces Sequence of global indices of faces of theShape.
10385                 theName Object name; when specified, this parameter is used
10386                         for result publication in the study. Otherwise, if automatic
10387                         publication is switched on, default value is used for result name.
10388
10389             Note: Global index of sub-shape can be obtained, using method geompy.GetSubShapeID().
10390
10391             Returns:
10392                 New GEOM.GEOM_Object, containing the result shape.
10393             """
10394             # Example: see GEOM_TestAll.py
10395             theD1,theD2,Parameters = ParseParameters(theD1,theD2)
10396             anObj = self.LocalOp.MakeChamferFaces(theShape, theD1, theD2, theFaces)
10397             RaiseIfFailed("MakeChamferFaces", self.LocalOp)
10398             anObj.SetParameters(Parameters)
10399             self._autoPublish(anObj, theName, "chamfer")
10400             return anObj
10401
10402         ## The Same that MakeChamferFaces() but with params theD is chamfer length and
10403         #  theAngle is Angle of chamfer (angle in radians or a name of variable which defines angle in degrees)
10404         #
10405         #  @ref swig_FilletChamfer "Example"
10406         @ManageTransactions("LocalOp")
10407         def MakeChamferFacesAD(self, theShape, theD, theAngle, theFaces, theName=None):
10408             """
10409             The Same that geompy.MakeChamferFaces but with params theD is chamfer length and
10410             theAngle is Angle of chamfer (angle in radians or a name of variable which defines angle in degrees)
10411             """
10412             flag = False
10413             if isinstance(theAngle,str):
10414                 flag = True
10415             theD,theAngle,Parameters = ParseParameters(theD,theAngle)
10416             if flag:
10417                 theAngle = theAngle*math.pi/180.0
10418             anObj = self.LocalOp.MakeChamferFacesAD(theShape, theD, theAngle, theFaces)
10419             RaiseIfFailed("MakeChamferFacesAD", self.LocalOp)
10420             anObj.SetParameters(Parameters)
10421             self._autoPublish(anObj, theName, "chamfer")
10422             return anObj
10423
10424         ## Perform a chamfer on edges,
10425         #  with distance D1 on the first specified face (if several for one edge)
10426         #  @param theShape Shape, to perform chamfer on.
10427         #  @param theD1,theD2 Chamfer size
10428         #  @param theEdges Sequence of edges of \a theShape.
10429         #  @param theName Object name; when specified, this parameter is used
10430         #         for result publication in the study. Otherwise, if automatic
10431         #         publication is switched on, default value is used for result name.
10432         #
10433         #  @return New GEOM.GEOM_Object, containing the result shape.
10434         #
10435         #  @ref swig_FilletChamfer "Example"
10436         @ManageTransactions("LocalOp")
10437         def MakeChamferEdges(self, theShape, theD1, theD2, theEdges, theName=None):
10438             """
10439             Perform a chamfer on edges,
10440             with distance D1 on the first specified face (if several for one edge)
10441
10442             Parameters:
10443                 theShape Shape, to perform chamfer on.
10444                 theD1,theD2 Chamfer size
10445                 theEdges Sequence of edges of theShape.
10446                 theName Object name; when specified, this parameter is used
10447                         for result publication in the study. Otherwise, if automatic
10448                         publication is switched on, default value is used for result name.
10449
10450             Returns:
10451                 New GEOM.GEOM_Object, containing the result shape.
10452             """
10453             theD1,theD2,Parameters = ParseParameters(theD1,theD2)
10454             anObj = self.LocalOp.MakeChamferEdges(theShape, theD1, theD2, theEdges)
10455             RaiseIfFailed("MakeChamferEdges", self.LocalOp)
10456             anObj.SetParameters(Parameters)
10457             self._autoPublish(anObj, theName, "chamfer")
10458             return anObj
10459
10460         ## The Same that MakeChamferEdges() but with params theD is chamfer length and
10461         #  theAngle is Angle of chamfer (angle in radians or a name of variable which defines angle in degrees)
10462         @ManageTransactions("LocalOp")
10463         def MakeChamferEdgesAD(self, theShape, theD, theAngle, theEdges, theName=None):
10464             """
10465             The Same that geompy.MakeChamferEdges but with params theD is chamfer length and
10466             theAngle is Angle of chamfer (angle in radians or a name of variable which defines angle in degrees)
10467             """
10468             flag = False
10469             if isinstance(theAngle,str):
10470                 flag = True
10471             theD,theAngle,Parameters = ParseParameters(theD,theAngle)
10472             if flag:
10473                 theAngle = theAngle*math.pi/180.0
10474             anObj = self.LocalOp.MakeChamferEdgesAD(theShape, theD, theAngle, theEdges)
10475             RaiseIfFailed("MakeChamferEdgesAD", self.LocalOp)
10476             anObj.SetParameters(Parameters)
10477             self._autoPublish(anObj, theName, "chamfer")
10478             return anObj
10479
10480         ## @sa MakeChamferEdge(), MakeChamferFaces()
10481         #
10482         #  @ref swig_MakeChamfer "Example"
10483         def MakeChamfer(self, aShape, d1, d2, aShapeType, ListShape, theName=None):
10484             """
10485             See geompy.MakeChamferEdge() and geompy.MakeChamferFaces() functions for more information.
10486             """
10487             # Example: see GEOM_TestOthers.py
10488             anObj = None
10489             # note: auto-publishing is done in self.MakeChamferEdge() or self.MakeChamferFaces()
10490             if aShapeType == self.ShapeType["EDGE"]:
10491                 anObj = self.MakeChamferEdge(aShape,d1,d2,ListShape[0],ListShape[1],theName)
10492             else:
10493                 anObj = self.MakeChamferFaces(aShape,d1,d2,ListShape,theName)
10494             return anObj
10495
10496         ## Remove material from a solid by extrusion of the base shape on the given distance.
10497         #  @param theInit Shape to remove material from. It must be a solid or
10498         #  a compound made of a single solid.
10499         #  @param theBase Closed edge or wire defining the base shape to be extruded.
10500         #  @param theH Prism dimension along the normal to theBase
10501         #  @param theAngle Draft angle in degrees.
10502         #  @param theInvert If true material changes the direction
10503         #  @param theName Object name; when specified, this parameter is used
10504         #         for result publication in the study. Otherwise, if automatic
10505         #         publication is switched on, default value is used for result name.
10506         #
10507         #  @return New GEOM.GEOM_Object, containing the initial shape with removed material
10508         #
10509         #  @ref tui_creation_prism "Example"
10510         @ManageTransactions("PrimOp")
10511         def MakeExtrudedCut(self, theInit, theBase, theH, theAngle, theInvert=False, theName=None):
10512             """
10513             Add material to a solid by extrusion of the base shape on the given distance.
10514
10515             Parameters:
10516                 theInit Shape to remove material from. It must be a solid or a compound made of a single solid.
10517                 theBase Closed edge or wire defining the base shape to be extruded.
10518                 theH Prism dimension along the normal to theBase
10519                 theAngle Draft angle in degrees.
10520                 theInvert If true material changes the direction.
10521                 theName Object name; when specified, this parameter is used
10522                         for result publication in the study. Otherwise, if automatic
10523                         publication is switched on, default value is used for result name.
10524
10525             Returns:
10526                 New GEOM.GEOM_Object,  containing the initial shape with removed material.
10527             """
10528             # Example: see GEOM_TestAll.py
10529             theH,theAngle,Parameters = ParseParameters(theH,theAngle)
10530             anObj = self.PrimOp.MakeDraftPrism(theInit, theBase, theH, theAngle, False, theInvert)
10531             RaiseIfFailed("MakeExtrudedBoss", self.PrimOp)
10532             anObj.SetParameters(Parameters)
10533             self._autoPublish(anObj, theName, "extrudedCut")
10534             return anObj
10535
10536         ## Add material to a solid by extrusion of the base shape on the given distance.
10537         #  @param theInit Shape to add material to. It must be a solid or
10538         #  a compound made of a single solid.
10539         #  @param theBase Closed edge or wire defining the base shape to be extruded.
10540         #  @param theH Prism dimension along the normal to theBase
10541         #  @param theAngle Draft angle in degrees.
10542         #  @param theInvert If true material changes the direction
10543         #  @param theName Object name; when specified, this parameter is used
10544         #         for result publication in the study. Otherwise, if automatic
10545         #         publication is switched on, default value is used for result name.
10546         #
10547         #  @return New GEOM.GEOM_Object, containing the initial shape with added material
10548         #
10549         #  @ref tui_creation_prism "Example"
10550         @ManageTransactions("PrimOp")
10551         def MakeExtrudedBoss(self, theInit, theBase, theH, theAngle, theInvert=False, theName=None):
10552             """
10553             Add material to a solid by extrusion of the base shape on the given distance.
10554
10555             Parameters:
10556                 theInit Shape to add material to. It must be a solid or a compound made of a single solid.
10557                 theBase Closed edge or wire defining the base shape to be extruded.
10558                 theH Prism dimension along the normal to theBase
10559                 theAngle Draft angle in degrees.
10560                 theInvert If true material changes the direction.
10561                 theName Object name; when specified, this parameter is used
10562                         for result publication in the study. Otherwise, if automatic
10563                         publication is switched on, default value is used for result name.
10564
10565             Returns:
10566                 New GEOM.GEOM_Object,  containing the initial shape with added material.
10567             """
10568             # Example: see GEOM_TestAll.py
10569             theH,theAngle,Parameters = ParseParameters(theH,theAngle)
10570             anObj = self.PrimOp.MakeDraftPrism(theInit, theBase, theH, theAngle, True, theInvert)
10571             RaiseIfFailed("MakeExtrudedBoss", self.PrimOp)
10572             anObj.SetParameters(Parameters)
10573             self._autoPublish(anObj, theName, "extrudedBoss")
10574             return anObj
10575
10576         # end of l3_local
10577         ## @}
10578
10579         ## @addtogroup l3_basic_op
10580         ## @{
10581
10582         ## Perform an Archimde operation on the given shape with given parameters.
10583         #  The object presenting the resulting face is returned.
10584         #  @param theShape Shape to be put in water.
10585         #  @param theWeight Weight of the shape.
10586         #  @param theWaterDensity Density of the water.
10587         #  @param theMeshDeflection Deflection of the mesh, using to compute the section.
10588         #  @param theName Object name; when specified, this parameter is used
10589         #         for result publication in the study. Otherwise, if automatic
10590         #         publication is switched on, default value is used for result name.
10591         #
10592         #  @return New GEOM.GEOM_Object, containing a section of \a theShape
10593         #          by a plane, corresponding to water level.
10594         #
10595         #  @ref tui_archimede "Example"
10596         @ManageTransactions("LocalOp")
10597         def Archimede(self, theShape, theWeight, theWaterDensity, theMeshDeflection, theName=None):
10598             """
10599             Perform an Archimde operation on the given shape with given parameters.
10600             The object presenting the resulting face is returned.
10601
10602             Parameters:
10603                 theShape Shape to be put in water.
10604                 theWeight Weight of the shape.
10605                 theWaterDensity Density of the water.
10606                 theMeshDeflection Deflection of the mesh, using to compute the section.
10607                 theName Object name; when specified, this parameter is used
10608                         for result publication in the study. Otherwise, if automatic
10609                         publication is switched on, default value is used for result name.
10610
10611             Returns:
10612                 New GEOM.GEOM_Object, containing a section of theShape
10613                 by a plane, corresponding to water level.
10614             """
10615             # Example: see GEOM_TestAll.py
10616             theWeight,theWaterDensity,theMeshDeflection,Parameters = ParseParameters(
10617               theWeight,theWaterDensity,theMeshDeflection)
10618             anObj = self.LocalOp.MakeArchimede(theShape, theWeight, theWaterDensity, theMeshDeflection)
10619             RaiseIfFailed("MakeArchimede", self.LocalOp)
10620             anObj.SetParameters(Parameters)
10621             self._autoPublish(anObj, theName, "archimede")
10622             return anObj
10623
10624         # end of l3_basic_op
10625         ## @}
10626
10627         ## @addtogroup l2_measure
10628         ## @{
10629
10630         ## Get point coordinates
10631         #  @return [x, y, z]
10632         #
10633         #  @ref tui_point_coordinates_page "Example"
10634         @ManageTransactions("MeasuOp")
10635         def PointCoordinates(self,Point):
10636             """
10637             Get point coordinates
10638
10639             Returns:
10640                 [x, y, z]
10641             """
10642             # Example: see GEOM_TestMeasures.py
10643             aTuple = self.MeasuOp.PointCoordinates(Point)
10644             RaiseIfFailed("PointCoordinates", self.MeasuOp)
10645             return aTuple
10646
10647         ## Get vector coordinates
10648         #  @return [x, y, z]
10649         #
10650         #  @ref tui_measurement_tools_page "Example"
10651         def VectorCoordinates(self,Vector):
10652             """
10653             Get vector coordinates
10654
10655             Returns:
10656                 [x, y, z]
10657             """
10658
10659             p1=self.GetFirstVertex(Vector)
10660             p2=self.GetLastVertex(Vector)
10661
10662             X1=self.PointCoordinates(p1)
10663             X2=self.PointCoordinates(p2)
10664
10665             return (X2[0]-X1[0],X2[1]-X1[1],X2[2]-X1[2])
10666
10667
10668         ## Compute cross product
10669         #  @return vector w=u^v
10670         #
10671         #  @ref tui_measurement_tools_page "Example"
10672         def CrossProduct(self, Vector1, Vector2):
10673             """
10674             Compute cross product
10675
10676             Returns: vector w=u^v
10677             """
10678             u=self.VectorCoordinates(Vector1)
10679             v=self.VectorCoordinates(Vector2)
10680             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])
10681
10682             return w
10683
10684         ## Compute cross product
10685         #  @return dot product  p=u.v
10686         #
10687         #  @ref tui_measurement_tools_page "Example"
10688         def DotProduct(self, Vector1, Vector2):
10689             """
10690             Compute cross product
10691
10692             Returns: dot product  p=u.v
10693             """
10694             u=self.VectorCoordinates(Vector1)
10695             v=self.VectorCoordinates(Vector2)
10696             p=u[0]*v[0]+u[1]*v[1]+u[2]*v[2]
10697
10698             return p
10699
10700
10701         ## Get summarized length of all wires,
10702         #  area of surface and volume of the given shape.
10703         #  @param theShape Shape to define properties of.
10704         #  @param theTolerance maximal relative error of area
10705         #         and volume computation.
10706         #  @return [theLength, theSurfArea, theVolume]\n
10707         #  theLength:   Summarized length of all wires of the given shape.\n
10708         #  theSurfArea: Area of surface of the given shape.\n
10709         #  theVolume:   Volume of the given shape.
10710         #
10711         #  @ref tui_basic_properties_page "Example"
10712         @ManageTransactions("MeasuOp")
10713         def BasicProperties(self,theShape, theTolerance=1.e-6):
10714             """
10715             Get summarized length of all wires,
10716             area of surface and volume of the given shape.
10717
10718             Parameters:
10719                 theShape Shape to define properties of.
10720                 theTolerance maximal relative error of area
10721                              and volume computation.
10722
10723             Returns:
10724                 [theLength, theSurfArea, theVolume]
10725                  theLength:   Summarized length of all wires of the given shape.
10726                  theSurfArea: Area of surface of the given shape.
10727                  theVolume:   Volume of the given shape.
10728             """
10729             # Example: see GEOM_TestMeasures.py
10730             aTuple = self.MeasuOp.GetBasicProperties(theShape, theTolerance)
10731             RaiseIfFailed("GetBasicProperties", self.MeasuOp)
10732             return aTuple
10733
10734         ## Get parameters of bounding box of the given shape
10735         #  @param theShape Shape to obtain bounding box of.
10736         #  @param precise TRUE for precise computation; FALSE for fast one.
10737         #  @return [Xmin,Xmax, Ymin,Ymax, Zmin,Zmax]
10738         #  Xmin,Xmax: Limits of shape along OX axis.
10739         #  Ymin,Ymax: Limits of shape along OY axis.
10740         #  Zmin,Zmax: Limits of shape along OZ axis.
10741         #
10742         #  @ref tui_bounding_box_page "Example"
10743         @ManageTransactions("MeasuOp")
10744         def BoundingBox (self, theShape, precise=False):
10745             """
10746             Get parameters of bounding box of the given shape
10747
10748             Parameters:
10749                 theShape Shape to obtain bounding box of.
10750                 precise TRUE for precise computation; FALSE for fast one.
10751
10752             Returns:
10753                 [Xmin,Xmax, Ymin,Ymax, Zmin,Zmax]
10754                  Xmin,Xmax: Limits of shape along OX axis.
10755                  Ymin,Ymax: Limits of shape along OY axis.
10756                  Zmin,Zmax: Limits of shape along OZ axis.
10757             """
10758             # Example: see GEOM_TestMeasures.py
10759             aTuple = self.MeasuOp.GetBoundingBox(theShape, precise)
10760             RaiseIfFailed("GetBoundingBox", self.MeasuOp)
10761             return aTuple
10762
10763         ## Get bounding box of the given shape
10764         #  @param theShape Shape to obtain bounding box of.
10765         #  @param precise TRUE for precise computation; FALSE for fast one.
10766         #  @param theName Object name; when specified, this parameter is used
10767         #         for result publication in the study. Otherwise, if automatic
10768         #         publication is switched on, default value is used for result name.
10769         #
10770         #  @return New GEOM.GEOM_Object, containing the created box.
10771         #
10772         #  @ref tui_bounding_box_page "Example"
10773         @ManageTransactions("MeasuOp")
10774         def MakeBoundingBox (self, theShape, precise=False, theName=None):
10775             """
10776             Get bounding box of the given shape
10777
10778             Parameters:
10779                 theShape Shape to obtain bounding box of.
10780                 precise TRUE for precise computation; FALSE for fast one.
10781                 theName Object name; when specified, this parameter is used
10782                         for result publication in the study. Otherwise, if automatic
10783                         publication is switched on, default value is used for result name.
10784
10785             Returns:
10786                 New GEOM.GEOM_Object, containing the created box.
10787             """
10788             # Example: see GEOM_TestMeasures.py
10789             anObj = self.MeasuOp.MakeBoundingBox(theShape, precise)
10790             RaiseIfFailed("MakeBoundingBox", self.MeasuOp)
10791             self._autoPublish(anObj, theName, "bndbox")
10792             return anObj
10793
10794         ## Get inertia matrix and moments of inertia of theShape.
10795         #  @param theShape Shape to calculate inertia of.
10796         #  @return [I11,I12,I13, I21,I22,I23, I31,I32,I33, Ix,Iy,Iz]
10797         #  I(1-3)(1-3): Components of the inertia matrix of the given shape.
10798         #  Ix,Iy,Iz:    Moments of inertia of the given shape.
10799         #
10800         #  @ref tui_inertia_page "Example"
10801         @ManageTransactions("MeasuOp")
10802         def Inertia(self,theShape):
10803             """
10804             Get inertia matrix and moments of inertia of theShape.
10805
10806             Parameters:
10807                 theShape Shape to calculate inertia of.
10808
10809             Returns:
10810                 [I11,I12,I13, I21,I22,I23, I31,I32,I33, Ix,Iy,Iz]
10811                  I(1-3)(1-3): Components of the inertia matrix of the given shape.
10812                  Ix,Iy,Iz:    Moments of inertia of the given shape.
10813             """
10814             # Example: see GEOM_TestMeasures.py
10815             aTuple = self.MeasuOp.GetInertia(theShape)
10816             RaiseIfFailed("GetInertia", self.MeasuOp)
10817             return aTuple
10818
10819         ## Get if coords are included in the shape (ST_IN or ST_ON)
10820         #  @param theShape Shape
10821         #  @param coords list of points coordinates [x1, y1, z1, x2, y2, z2, ...]
10822         #  @param tolerance to be used (default is 1.0e-7)
10823         #  @return list_of_boolean = [res1, res2, ...]
10824         @ManageTransactions("MeasuOp")
10825         def AreCoordsInside(self, theShape, coords, tolerance=1.e-7):
10826             """
10827             Get if coords are included in the shape (ST_IN or ST_ON)
10828
10829             Parameters:
10830                 theShape Shape
10831                 coords list of points coordinates [x1, y1, z1, x2, y2, z2, ...]
10832                 tolerance to be used (default is 1.0e-7)
10833
10834             Returns:
10835                 list_of_boolean = [res1, res2, ...]
10836             """
10837             return self.MeasuOp.AreCoordsInside(theShape, coords, tolerance)
10838
10839         ## Get minimal distance between the given shapes.
10840         #  @param theShape1,theShape2 Shapes to find minimal distance between.
10841         #  @return Value of the minimal distance between the given shapes.
10842         #
10843         #  @ref tui_min_distance_page "Example"
10844         @ManageTransactions("MeasuOp")
10845         def MinDistance(self, theShape1, theShape2):
10846             """
10847             Get minimal distance between the given shapes.
10848
10849             Parameters:
10850                 theShape1,theShape2 Shapes to find minimal distance between.
10851
10852             Returns:
10853                 Value of the minimal distance between the given shapes.
10854             """
10855             # Example: see GEOM_TestMeasures.py
10856             aTuple = self.MeasuOp.GetMinDistance(theShape1, theShape2)
10857             RaiseIfFailed("GetMinDistance", self.MeasuOp)
10858             return aTuple[0]
10859
10860         ## Get minimal distance between the given shapes.
10861         #  @param theShape1,theShape2 Shapes to find minimal distance between.
10862         #  @return Value of the minimal distance between the given shapes, in form of list
10863         #          [Distance, DX, DY, DZ].
10864         #
10865         #  @ref tui_min_distance_page "Example"
10866         @ManageTransactions("MeasuOp")
10867         def MinDistanceComponents(self, theShape1, theShape2):
10868             """
10869             Get minimal distance between the given shapes.
10870
10871             Parameters:
10872                 theShape1,theShape2 Shapes to find minimal distance between.
10873
10874             Returns:
10875                 Value of the minimal distance between the given shapes, in form of list
10876                 [Distance, DX, DY, DZ]
10877             """
10878             # Example: see GEOM_TestMeasures.py
10879             aTuple = self.MeasuOp.GetMinDistance(theShape1, theShape2)
10880             RaiseIfFailed("GetMinDistance", self.MeasuOp)
10881             aRes = [aTuple[0], aTuple[4] - aTuple[1], aTuple[5] - aTuple[2], aTuple[6] - aTuple[3]]
10882             return aRes
10883
10884         ## Get closest points of the given shapes.
10885         #  @param theShape1,theShape2 Shapes to find closest points of.
10886         #  @return The number of found solutions (-1 in case of infinite number of
10887         #          solutions) and a list of (X, Y, Z) coordinates for all couples of points.
10888         #
10889         #  @ref tui_min_distance_page "Example"
10890         @ManageTransactions("MeasuOp")
10891         def ClosestPoints (self, theShape1, theShape2):
10892             """
10893             Get closest points of the given shapes.
10894
10895             Parameters:
10896                 theShape1,theShape2 Shapes to find closest points of.
10897
10898             Returns:
10899                 The number of found solutions (-1 in case of infinite number of
10900                 solutions) and a list of (X, Y, Z) coordinates for all couples of points.
10901             """
10902             # Example: see GEOM_TestMeasures.py
10903             aTuple = self.MeasuOp.ClosestPoints(theShape1, theShape2)
10904             RaiseIfFailed("ClosestPoints", self.MeasuOp)
10905             return aTuple
10906
10907         ## Get angle between the given shapes in degrees.
10908         #  @param theShape1,theShape2 Lines or linear edges to find angle between.
10909         #  @note If both arguments are vectors, the angle is computed in accordance
10910         #        with their orientations, otherwise the minimum angle is computed.
10911         #  @return Value of the angle between the given shapes in degrees.
10912         #
10913         #  @ref tui_angle_page "Example"
10914         @ManageTransactions("MeasuOp")
10915         def GetAngle(self, theShape1, theShape2):
10916             """
10917             Get angle between the given shapes in degrees.
10918
10919             Parameters:
10920                 theShape1,theShape2 Lines or linear edges to find angle between.
10921
10922             Note:
10923                 If both arguments are vectors, the angle is computed in accordance
10924                 with their orientations, otherwise the minimum angle is computed.
10925
10926             Returns:
10927                 Value of the angle between the given shapes in degrees.
10928             """
10929             # Example: see GEOM_TestMeasures.py
10930             anAngle = self.MeasuOp.GetAngle(theShape1, theShape2)
10931             RaiseIfFailed("GetAngle", self.MeasuOp)
10932             return anAngle
10933
10934         ## Get angle between the given shapes in radians.
10935         #  @param theShape1,theShape2 Lines or linear edges to find angle between.
10936         #  @note If both arguments are vectors, the angle is computed in accordance
10937         #        with their orientations, otherwise the minimum angle is computed.
10938         #  @return Value of the angle between the given shapes in radians.
10939         #
10940         #  @ref tui_angle_page "Example"
10941         @ManageTransactions("MeasuOp")
10942         def GetAngleRadians(self, theShape1, theShape2):
10943             """
10944             Get angle between the given shapes in radians.
10945
10946             Parameters:
10947                 theShape1,theShape2 Lines or linear edges to find angle between.
10948
10949
10950             Note:
10951                 If both arguments are vectors, the angle is computed in accordance
10952                 with their orientations, otherwise the minimum angle is computed.
10953
10954             Returns:
10955                 Value of the angle between the given shapes in radians.
10956             """
10957             # Example: see GEOM_TestMeasures.py
10958             anAngle = self.MeasuOp.GetAngle(theShape1, theShape2)*math.pi/180.
10959             RaiseIfFailed("GetAngle", self.MeasuOp)
10960             return anAngle
10961
10962         ## Get angle between the given vectors in degrees.
10963         #  @param theShape1,theShape2 Vectors to find angle between.
10964         #  @param theFlag If True, the normal vector is defined by the two vectors cross,
10965         #                 if False, the opposite vector to the normal vector is used.
10966         #  @return Value of the angle between the given vectors in degrees.
10967         #
10968         #  @ref tui_angle_page "Example"
10969         @ManageTransactions("MeasuOp")
10970         def GetAngleVectors(self, theShape1, theShape2, theFlag = True):
10971             """
10972             Get angle between the given vectors in degrees.
10973
10974             Parameters:
10975                 theShape1,theShape2 Vectors to find angle between.
10976                 theFlag If True, the normal vector is defined by the two vectors cross,
10977                         if False, the opposite vector to the normal vector is used.
10978
10979             Returns:
10980                 Value of the angle between the given vectors in degrees.
10981             """
10982             anAngle = self.MeasuOp.GetAngleBtwVectors(theShape1, theShape2)
10983             if not theFlag:
10984                 anAngle = 360. - anAngle
10985             RaiseIfFailed("GetAngleVectors", self.MeasuOp)
10986             return anAngle
10987
10988         ## The same as GetAngleVectors, but the result is in radians.
10989         def GetAngleRadiansVectors(self, theShape1, theShape2, theFlag = True):
10990             """
10991             Get angle between the given vectors in radians.
10992
10993             Parameters:
10994                 theShape1,theShape2 Vectors to find angle between.
10995                 theFlag If True, the normal vector is defined by the two vectors cross,
10996                         if False, the opposite vector to the normal vector is used.
10997
10998             Returns:
10999                 Value of the angle between the given vectors in radians.
11000             """
11001             anAngle = self.GetAngleVectors(theShape1, theShape2, theFlag)*math.pi/180.
11002             return anAngle
11003
11004         ## @name Curve Curvature Measurement
11005         #  Methods for receiving radius of curvature of curves
11006         #  in the given point
11007         ## @{
11008
11009         ## Measure curvature of a curve at a point, set by parameter.
11010         #  @param theCurve a curve.
11011         #  @param theParam parameter.
11012         #  @return radius of curvature of \a theCurve.
11013         #
11014         #  @ref swig_todo "Example"
11015         @ManageTransactions("MeasuOp")
11016         def CurveCurvatureByParam(self, theCurve, theParam):
11017             """
11018             Measure curvature of a curve at a point, set by parameter.
11019
11020             Parameters:
11021                 theCurve a curve.
11022                 theParam parameter.
11023
11024             Returns:
11025                 radius of curvature of theCurve.
11026             """
11027             # Example: see GEOM_TestMeasures.py
11028             aCurv = self.MeasuOp.CurveCurvatureByParam(theCurve,theParam)
11029             RaiseIfFailed("CurveCurvatureByParam", self.MeasuOp)
11030             return aCurv
11031
11032         ## Measure curvature of a curve at a point.
11033         #  @param theCurve a curve.
11034         #  @param thePoint given point.
11035         #  @return radius of curvature of \a theCurve.
11036         #
11037         #  @ref swig_todo "Example"
11038         @ManageTransactions("MeasuOp")
11039         def CurveCurvatureByPoint(self, theCurve, thePoint):
11040             """
11041             Measure curvature of a curve at a point.
11042
11043             Parameters:
11044                 theCurve a curve.
11045                 thePoint given point.
11046
11047             Returns:
11048                 radius of curvature of theCurve.
11049             """
11050             aCurv = self.MeasuOp.CurveCurvatureByPoint(theCurve,thePoint)
11051             RaiseIfFailed("CurveCurvatureByPoint", self.MeasuOp)
11052             return aCurv
11053         ## @}
11054
11055         ## @name Surface Curvature Measurement
11056         #  Methods for receiving max and min radius of curvature of surfaces
11057         #  in the given point
11058         ## @{
11059
11060         ## Measure max radius of curvature of surface.
11061         #  @param theSurf the given surface.
11062         #  @param theUParam Value of U-parameter on the referenced surface.
11063         #  @param theVParam Value of V-parameter on the referenced surface.
11064         #  @return max radius of curvature of theSurf.
11065         #
11066         ## @ref swig_todo "Example"
11067         @ManageTransactions("MeasuOp")
11068         def MaxSurfaceCurvatureByParam(self, theSurf, theUParam, theVParam):
11069             """
11070             Measure max radius of curvature of surface.
11071
11072             Parameters:
11073                 theSurf the given surface.
11074                 theUParam Value of U-parameter on the referenced surface.
11075                 theVParam Value of V-parameter on the referenced surface.
11076
11077             Returns:
11078                 max radius of curvature of theSurf.
11079             """
11080             # Example: see GEOM_TestMeasures.py
11081             aSurf = self.MeasuOp.MaxSurfaceCurvatureByParam(theSurf,theUParam,theVParam)
11082             RaiseIfFailed("MaxSurfaceCurvatureByParam", self.MeasuOp)
11083             return aSurf
11084
11085         ## Measure max radius of curvature of surface in the given point
11086         #  @param theSurf the given surface.
11087         #  @param thePoint given point.
11088         #  @return max radius of curvature of theSurf.
11089         #
11090         ## @ref swig_todo "Example"
11091         @ManageTransactions("MeasuOp")
11092         def MaxSurfaceCurvatureByPoint(self, theSurf, thePoint):
11093             """
11094             Measure max radius of curvature of surface in the given point.
11095
11096             Parameters:
11097                 theSurf the given surface.
11098                 thePoint given point.
11099
11100             Returns:
11101                 max radius of curvature of theSurf.
11102             """
11103             aSurf = self.MeasuOp.MaxSurfaceCurvatureByPoint(theSurf,thePoint)
11104             RaiseIfFailed("MaxSurfaceCurvatureByPoint", self.MeasuOp)
11105             return aSurf
11106
11107         ## Measure min radius of curvature of surface.
11108         #  @param theSurf the given surface.
11109         #  @param theUParam Value of U-parameter on the referenced surface.
11110         #  @param theVParam Value of V-parameter on the referenced surface.
11111         #  @return min radius of curvature of theSurf.
11112         #
11113         ## @ref swig_todo "Example"
11114         @ManageTransactions("MeasuOp")
11115         def MinSurfaceCurvatureByParam(self, theSurf, theUParam, theVParam):
11116             """
11117             Measure min radius of curvature of surface.
11118
11119             Parameters:
11120                 theSurf the given surface.
11121                 theUParam Value of U-parameter on the referenced surface.
11122                 theVParam Value of V-parameter on the referenced surface.
11123
11124             Returns:
11125                 Min radius of curvature of theSurf.
11126             """
11127             aSurf = self.MeasuOp.MinSurfaceCurvatureByParam(theSurf,theUParam,theVParam)
11128             RaiseIfFailed("MinSurfaceCurvatureByParam", self.MeasuOp)
11129             return aSurf
11130
11131         ## Measure min radius of curvature of surface in the given point
11132         #  @param theSurf the given surface.
11133         #  @param thePoint given point.
11134         #  @return min radius of curvature of theSurf.
11135         #
11136         ## @ref swig_todo "Example"
11137         @ManageTransactions("MeasuOp")
11138         def MinSurfaceCurvatureByPoint(self, theSurf, thePoint):
11139             """
11140             Measure min radius of curvature of surface in the given point.
11141
11142             Parameters:
11143                 theSurf the given surface.
11144                 thePoint given point.
11145
11146             Returns:
11147                 Min radius of curvature of theSurf.
11148             """
11149             aSurf = self.MeasuOp.MinSurfaceCurvatureByPoint(theSurf,thePoint)
11150             RaiseIfFailed("MinSurfaceCurvatureByPoint", self.MeasuOp)
11151             return aSurf
11152         ## @}
11153
11154         ## Get min and max tolerances of sub-shapes of theShape
11155         #  @param theShape Shape, to get tolerances of.
11156         #  @return [FaceMin,FaceMax, EdgeMin,EdgeMax, VertMin,VertMax]\n
11157         #  FaceMin,FaceMax: Min and max tolerances of the faces.\n
11158         #  EdgeMin,EdgeMax: Min and max tolerances of the edges.\n
11159         #  VertMin,VertMax: Min and max tolerances of the vertices.
11160         #
11161         #  @ref tui_tolerance_page "Example"
11162         @ManageTransactions("MeasuOp")
11163         def Tolerance(self,theShape):
11164             """
11165             Get min and max tolerances of sub-shapes of theShape
11166
11167             Parameters:
11168                 theShape Shape, to get tolerances of.
11169
11170             Returns:
11171                 [FaceMin,FaceMax, EdgeMin,EdgeMax, VertMin,VertMax]
11172                  FaceMin,FaceMax: Min and max tolerances of the faces.
11173                  EdgeMin,EdgeMax: Min and max tolerances of the edges.
11174                  VertMin,VertMax: Min and max tolerances of the vertices.
11175             """
11176             # Example: see GEOM_TestMeasures.py
11177             aTuple = self.MeasuOp.GetTolerance(theShape)
11178             RaiseIfFailed("GetTolerance", self.MeasuOp)
11179             return aTuple
11180
11181         ## Obtain description of the given shape (number of sub-shapes of each type)
11182         #  @param theShape Shape to be described.
11183         #  @return Description of the given shape.
11184         #
11185         #  @ref tui_whatis_page "Example"
11186         @ManageTransactions("MeasuOp")
11187         def WhatIs(self,theShape):
11188             """
11189             Obtain description of the given shape (number of sub-shapes of each type)
11190
11191             Parameters:
11192                 theShape Shape to be described.
11193
11194             Returns:
11195                 Description of the given shape.
11196             """
11197             # Example: see GEOM_TestMeasures.py
11198             aDescr = self.MeasuOp.WhatIs(theShape)
11199             RaiseIfFailed("WhatIs", self.MeasuOp)
11200             return aDescr
11201
11202         ## Obtain quantity of shapes of the given type in \a theShape.
11203         #  If \a theShape is of type \a theType, it is also counted.
11204         #  @param theShape Shape to be described.
11205         #  @param theType the given ShapeType().
11206         #  @return Quantity of shapes of type \a theType in \a theShape.
11207         #
11208         #  @ref tui_measurement_tools_page "Example"
11209         def NbShapes (self, theShape, theType):
11210             """
11211             Obtain quantity of shapes of the given type in theShape.
11212             If theShape is of type theType, it is also counted.
11213
11214             Parameters:
11215                 theShape Shape to be described.
11216                 theType the given geompy.ShapeType
11217
11218             Returns:
11219                 Quantity of shapes of type theType in theShape.
11220             """
11221             # Example: see GEOM_TestMeasures.py
11222             listSh = self.SubShapeAllIDs(theShape, theType)
11223             Nb = len(listSh)
11224             return Nb
11225
11226         ## Obtain quantity of shapes of each type in \a theShape.
11227         #  The \a theShape is also counted.
11228         #  @param theShape Shape to be described.
11229         #  @return Dictionary of ShapeType() with bound quantities of shapes.
11230         #
11231         #  @ref tui_measurement_tools_page "Example"
11232         def ShapeInfo (self, theShape):
11233             """
11234             Obtain quantity of shapes of each type in theShape.
11235             The theShape is also counted.
11236
11237             Parameters:
11238                 theShape Shape to be described.
11239
11240             Returns:
11241                 Dictionary of geompy.ShapeType with bound quantities of shapes.
11242             """
11243             # Example: see GEOM_TestMeasures.py
11244             aDict = {}
11245             for typeSh in self.ShapeType:
11246                 if typeSh in ( "AUTO", "SHAPE" ): continue
11247                 listSh = self.SubShapeAllIDs(theShape, self.ShapeType[typeSh])
11248                 Nb = len(listSh)
11249                 aDict[typeSh] = Nb
11250                 pass
11251             return aDict
11252
11253         def GetCreationInformation(self, theShape):
11254             res = ''
11255             infos = theShape.GetCreationInformation()
11256             for info in infos:
11257                 # operationName
11258                 opName = info.operationName
11259                 if not opName: opName = "no info available"
11260                 if res: res += "\n"
11261                 res += "Operation: " + opName
11262                 # parameters
11263                 for parVal in info.params:
11264                     res += "\n \t%s = %s" % ( parVal.name, parVal.value )
11265             return res
11266
11267         ## Get a point, situated at the centre of mass of theShape.
11268         #  @param theShape Shape to define centre of mass of.
11269         #  @param theName Object name; when specified, this parameter is used
11270         #         for result publication in the study. Otherwise, if automatic
11271         #         publication is switched on, default value is used for result name.
11272         #
11273         #  @return New GEOM.GEOM_Object, containing the created point.
11274         #
11275         #  @ref tui_center_of_mass_page "Example"
11276         @ManageTransactions("MeasuOp")
11277         def MakeCDG(self, theShape, theName=None):
11278             """
11279             Get a point, situated at the centre of mass of theShape.
11280
11281             Parameters:
11282                 theShape Shape to define centre of mass of.
11283                 theName Object name; when specified, this parameter is used
11284                         for result publication in the study. Otherwise, if automatic
11285                         publication is switched on, default value is used for result name.
11286
11287             Returns:
11288                 New GEOM.GEOM_Object, containing the created point.
11289             """
11290             # Example: see GEOM_TestMeasures.py
11291             anObj = self.MeasuOp.GetCentreOfMass(theShape)
11292             RaiseIfFailed("GetCentreOfMass", self.MeasuOp)
11293             self._autoPublish(anObj, theName, "centerOfMass")
11294             return anObj
11295
11296         ## Get a vertex sub-shape by index depended with orientation.
11297         #  @param theShape Shape to find sub-shape.
11298         #  @param theIndex Index to find vertex by this index (starting from zero)
11299         #  @param theName Object name; when specified, this parameter is used
11300         #         for result publication in the study. Otherwise, if automatic
11301         #         publication is switched on, default value is used for result name.
11302         #
11303         #  @return New GEOM.GEOM_Object, containing the created vertex.
11304         #
11305         #  @ref tui_measurement_tools_page "Example"
11306         @ManageTransactions("MeasuOp")
11307         def GetVertexByIndex(self, theShape, theIndex, theName=None):
11308             """
11309             Get a vertex sub-shape by index depended with orientation.
11310
11311             Parameters:
11312                 theShape Shape to find sub-shape.
11313                 theIndex Index to find vertex by this index (starting from zero)
11314                 theName Object name; when specified, this parameter is used
11315                         for result publication in the study. Otherwise, if automatic
11316                         publication is switched on, default value is used for result name.
11317
11318             Returns:
11319                 New GEOM.GEOM_Object, containing the created vertex.
11320             """
11321             # Example: see GEOM_TestMeasures.py
11322             anObj = self.MeasuOp.GetVertexByIndex(theShape, theIndex)
11323             RaiseIfFailed("GetVertexByIndex", self.MeasuOp)
11324             self._autoPublish(anObj, theName, "vertex")
11325             return anObj
11326
11327         ## Get the first vertex of wire/edge depended orientation.
11328         #  @param theShape Shape to find first vertex.
11329         #  @param theName Object name; when specified, this parameter is used
11330         #         for result publication in the study. Otherwise, if automatic
11331         #         publication is switched on, default value is used for result name.
11332         #
11333         #  @return New GEOM.GEOM_Object, containing the created vertex.
11334         #
11335         #  @ref tui_measurement_tools_page "Example"
11336         def GetFirstVertex(self, theShape, theName=None):
11337             """
11338             Get the first vertex of wire/edge depended orientation.
11339
11340             Parameters:
11341                 theShape Shape to find first vertex.
11342                 theName Object name; when specified, this parameter is used
11343                         for result publication in the study. Otherwise, if automatic
11344                         publication is switched on, default value is used for result name.
11345
11346             Returns:
11347                 New GEOM.GEOM_Object, containing the created vertex.
11348             """
11349             # Example: see GEOM_TestMeasures.py
11350             # note: auto-publishing is done in self.GetVertexByIndex()
11351             return self.GetVertexByIndex(theShape, 0, theName)
11352
11353         ## Get the last vertex of wire/edge depended orientation.
11354         #  @param theShape Shape to find last vertex.
11355         #  @param theName Object name; when specified, this parameter is used
11356         #         for result publication in the study. Otherwise, if automatic
11357         #         publication is switched on, default value is used for result name.
11358         #
11359         #  @return New GEOM.GEOM_Object, containing the created vertex.
11360         #
11361         #  @ref tui_measurement_tools_page "Example"
11362         def GetLastVertex(self, theShape, theName=None):
11363             """
11364             Get the last vertex of wire/edge depended orientation.
11365
11366             Parameters:
11367                 theShape Shape to find last vertex.
11368                 theName Object name; when specified, this parameter is used
11369                         for result publication in the study. Otherwise, if automatic
11370                         publication is switched on, default value is used for result name.
11371
11372             Returns:
11373                 New GEOM.GEOM_Object, containing the created vertex.
11374             """
11375             # Example: see GEOM_TestMeasures.py
11376             nb_vert =  self.NumberOfSubShapes(theShape, self.ShapeType["VERTEX"])
11377             # note: auto-publishing is done in self.GetVertexByIndex()
11378             return self.GetVertexByIndex(theShape, (nb_vert-1), theName)
11379
11380         ## Get a normale to the given face. If the point is not given,
11381         #  the normale is calculated at the center of mass.
11382         #  @param theFace Face to define normale of.
11383         #  @param theOptionalPoint Point to compute the normale at.
11384         #  @param theName Object name; when specified, this parameter is used
11385         #         for result publication in the study. Otherwise, if automatic
11386         #         publication is switched on, default value is used for result name.
11387         #
11388         #  @return New GEOM.GEOM_Object, containing the created vector.
11389         #
11390         #  @ref swig_todo "Example"
11391         @ManageTransactions("MeasuOp")
11392         def GetNormal(self, theFace, theOptionalPoint = None, theName=None):
11393             """
11394             Get a normale to the given face. If the point is not given,
11395             the normale is calculated at the center of mass.
11396
11397             Parameters:
11398                 theFace Face to define normale of.
11399                 theOptionalPoint Point to compute the normale at.
11400                 theName Object name; when specified, this parameter is used
11401                         for result publication in the study. Otherwise, if automatic
11402                         publication is switched on, default value is used for result name.
11403
11404             Returns:
11405                 New GEOM.GEOM_Object, containing the created vector.
11406             """
11407             # Example: see GEOM_TestMeasures.py
11408             anObj = self.MeasuOp.GetNormal(theFace, theOptionalPoint)
11409             RaiseIfFailed("GetNormal", self.MeasuOp)
11410             self._autoPublish(anObj, theName, "normal")
11411             return anObj
11412
11413         ## Print shape errors obtained from CheckShape.
11414         #  @param theShape Shape that was checked.
11415         #  @param theShapeErrors the shape errors obtained by CheckShape.
11416         #  @param theReturnStatus If 0 the description of problem is printed.
11417         #                         If 1 the description of problem is returned.
11418         #  @return If theReturnStatus is equal to 1 the description is returned.
11419         #          Otherwise doesn't return anything.
11420         #
11421         #  @ref tui_check_shape_page "Example"
11422         @ManageTransactions("MeasuOp")
11423         def PrintShapeErrors(self, theShape, theShapeErrors, theReturnStatus = 0):
11424             """
11425             Print shape errors obtained from CheckShape.
11426
11427             Parameters:
11428                 theShape Shape that was checked.
11429                 theShapeErrors the shape errors obtained by CheckShape.
11430                 theReturnStatus If 0 the description of problem is printed.
11431                                 If 1 the description of problem is returned.
11432
11433             Returns:
11434                 If theReturnStatus is equal to 1 the description is returned.
11435                   Otherwise doesn't return anything.
11436             """
11437             # Example: see GEOM_TestMeasures.py
11438             Descr = self.MeasuOp.PrintShapeErrors(theShape, theShapeErrors)
11439             if theReturnStatus == 1:
11440                 return Descr
11441             print(Descr)
11442             pass
11443
11444         ## Check a topology of the given shape.
11445         #  @param theShape Shape to check validity of.
11446         #  @param theIsCheckGeom If FALSE, only the shape's topology will be checked, \n
11447         #                        if TRUE, the shape's geometry will be checked also.
11448         #  @param theReturnStatus If 0 and if theShape is invalid, a description
11449         #                         of problem is printed.
11450         #                         If 1 isValid flag and the description of
11451         #                         problem is returned.
11452         #                         If 2 isValid flag and the list of error data
11453         #                         is returned.
11454         #  @return TRUE, if the shape "seems to be valid".
11455         #          If theShape is invalid, prints a description of problem.
11456         #          If theReturnStatus is equal to 1 the description is returned
11457         #          along with IsValid flag.
11458         #          If theReturnStatus is equal to 2 the list of error data is
11459         #          returned along with IsValid flag.
11460         #
11461         #  @ref tui_check_shape_page "Example"
11462         @ManageTransactions("MeasuOp")
11463         def CheckShape(self,theShape, theIsCheckGeom = 0, theReturnStatus = 0):
11464             """
11465             Check a topology of the given shape.
11466
11467             Parameters:
11468                 theShape Shape to check validity of.
11469                 theIsCheckGeom If FALSE, only the shape's topology will be checked,
11470                                if TRUE, the shape's geometry will be checked also.
11471                 theReturnStatus If 0 and if theShape is invalid, a description
11472                                 of problem is printed.
11473                                 If 1 IsValid flag and the description of
11474                                 problem is returned.
11475                                 If 2 IsValid flag and the list of error data
11476                                 is returned.
11477
11478             Returns:
11479                 TRUE, if the shape "seems to be valid".
11480                 If theShape is invalid, prints a description of problem.
11481                 If theReturnStatus is equal to 1 the description is returned
11482                 along with IsValid flag.
11483                 If theReturnStatus is equal to 2 the list of error data is
11484                 returned along with IsValid flag.
11485             """
11486             # Example: see GEOM_TestMeasures.py
11487             if theIsCheckGeom:
11488                 (IsValid, ShapeErrors) = self.MeasuOp.CheckShapeWithGeometry(theShape)
11489                 RaiseIfFailed("CheckShapeWithGeometry", self.MeasuOp)
11490             else:
11491                 (IsValid, ShapeErrors) = self.MeasuOp.CheckShape(theShape)
11492                 RaiseIfFailed("CheckShape", self.MeasuOp)
11493             if IsValid == 0:
11494                 if theReturnStatus == 0:
11495                     Descr = self.MeasuOp.PrintShapeErrors(theShape, ShapeErrors)
11496                     print(Descr)
11497             if theReturnStatus == 1:
11498               Descr = self.MeasuOp.PrintShapeErrors(theShape, ShapeErrors)
11499               return (IsValid, Descr)
11500             elif theReturnStatus == 2:
11501               return (IsValid, ShapeErrors)
11502             return IsValid
11503
11504         ## Detect self-intersections in the given shape.
11505         #  @param theShape Shape to check.
11506         #  @param theCheckLevel is the level of self-intersection check.
11507         #         Possible input values are:
11508         #         - GEOM.SI_V_V(0) - only V/V interferences
11509         #         - GEOM.SI_V_E(1) - V/V and V/E interferences
11510         #         - GEOM.SI_E_E(2) - V/V, V/E and E/E interferences
11511         #         - GEOM.SI_V_F(3) - V/V, V/E, E/E and V/F interferences
11512         #         - GEOM.SI_E_F(4) - V/V, V/E, E/E, V/F and E/F interferences
11513         #         - GEOM.SI_ALL(5) - all interferences.
11514         #  @return TRUE, if the shape contains no self-intersections.
11515         #
11516         #  @ref tui_check_self_intersections_page "Example"
11517         @ManageTransactions("MeasuOp")
11518         def CheckSelfIntersections(self, theShape, theCheckLevel = GEOM.SI_ALL):
11519             """
11520             Detect self-intersections in the given shape.
11521
11522             Parameters:
11523                 theShape Shape to check.
11524                 theCheckLevel is the level of self-intersection check.
11525                   Possible input values are:
11526                    - GEOM.SI_V_V(0) - only V/V interferences
11527                    - GEOM.SI_V_E(1) - V/V and V/E interferences
11528                    - GEOM.SI_E_E(2) - V/V, V/E and E/E interferences
11529                    - GEOM.SI_V_F(3) - V/V, V/E, E/E and V/F interferences
11530                    - GEOM.SI_E_F(4) - V/V, V/E, E/E, V/F and E/F interferences
11531                    - GEOM.SI_ALL(5) - all interferences.
11532  
11533             Returns:
11534                 TRUE, if the shape contains no self-intersections.
11535             """
11536             # Example: see GEOM_TestMeasures.py
11537             (IsValid, Pairs) = self.MeasuOp.CheckSelfIntersections(theShape, EnumToLong(theCheckLevel))
11538             RaiseIfFailed("CheckSelfIntersections", self.MeasuOp)
11539             return IsValid
11540
11541         ## Detect self-intersections of the given shape with algorithm based on mesh intersections.
11542         #  @param theShape Shape to check.
11543         #  @param theDeflection Linear deflection coefficient that specifies quality of tessellation:
11544         #         - if \a theDeflection <= 0, default deflection 0.001 is used
11545         #  @param theTolerance Specifies a distance between sub-shapes used for detecting gaps:
11546         #         - if \a theTolerance <= 0, algorithm detects intersections (default behavior)
11547         #         - if \a theTolerance > 0, algorithm detects gaps
11548         #  @return TRUE, if the shape contains no self-intersections.
11549         #
11550         #  @ref tui_check_self_intersections_fast_page "Example"
11551         @ManageTransactions("MeasuOp")
11552         def CheckSelfIntersectionsFast(self, theShape, theDeflection = 0.001, theTolerance = 0.0):
11553             """
11554             Detect self-intersections of the given shape with algorithm based on mesh intersections.
11555
11556             Parameters:
11557                 theShape Shape to check.
11558                 theDeflection Linear deflection coefficient that specifies quality of tessellation:
11559                     - if theDeflection <= 0, default deflection 0.001 is used
11560                 theTolerance Specifies a distance between shapes used for detecting gaps:
11561                     - if theTolerance <= 0, algorithm detects intersections (default behavior)
11562                     - if theTolerance > 0, algorithm detects gaps
11563  
11564             Returns:
11565                 TRUE, if the shape contains no self-intersections.
11566             """
11567             # Example: see GEOM_TestMeasures.py
11568             (IsValid, Pairs) = self.MeasuOp.CheckSelfIntersectionsFast(theShape, theDeflection, theTolerance)
11569             RaiseIfFailed("CheckSelfIntersectionsFast", self.MeasuOp)
11570             return IsValid
11571
11572         ## Check boolean and partition operations arguments.
11573         #  @param theShape the argument of an operation to be checked
11574         #  @return TRUE if the argument is valid for a boolean or partition
11575         #          operation; FALSE otherwise.
11576         @ManageTransactions("MeasuOp")
11577         def CheckBOPArguments(self, theShape):
11578             """
11579             Check boolean and partition operations arguments.
11580
11581             Parameters:
11582                 theShape the argument of an operation to be checked
11583
11584             Returns:
11585                 TRUE if the argument is valid for a boolean or partition
11586                 operation; FALSE otherwise.
11587             """
11588             return self.MeasuOp.CheckBOPArguments(theShape)
11589
11590         ## Detect intersections of the given shapes with algorithm based on mesh intersections.
11591         #  @param theShape1 First source object
11592         #  @param theShape2 Second source object
11593         #  @param theTolerance Specifies a distance between shapes used for detecting gaps:
11594         #         - if \a theTolerance <= 0, algorithm detects intersections (default behavior)
11595         #         - if \a theTolerance > 0, algorithm detects gaps
11596         #  @param theDeflection Linear deflection coefficient that specifies quality of tessellation:
11597         #         - if \a theDeflection <= 0, default deflection 0.001 is used
11598         #  @return TRUE, if there are intersections (gaps) between source shapes
11599         #  @return List of sub-shapes IDs from 1st shape that localize intersection.
11600         #  @return List of sub-shapes IDs from 2nd shape that localize intersection.
11601         #
11602         #  @ref tui_fast_intersection_page "Example"
11603         @ManageTransactions("MeasuOp")
11604         def FastIntersect(self, theShape1, theShape2, theTolerance = 0.0, theDeflection = 0.001):
11605             """
11606             Detect intersections of the given shapes with algorithm based on mesh intersections.
11607
11608             Parameters:
11609                 theShape1 First source object
11610                 theShape2 Second source object
11611                 theTolerance Specifies a distance between shapes used for detecting gaps:
11612                     - if theTolerance <= 0, algorithm detects intersections (default behavior)
11613                     - if theTolerance > 0, algorithm detects gaps
11614                 theDeflection Linear deflection coefficient that specifies quality of tessellation:
11615                     - if theDeflection <= 0, default deflection 0.001 is used
11616  
11617             Returns:
11618                 TRUE, if there are intersections (gaps) between source shapes
11619                 List of sub-shapes IDs from 1st shape that localize intersection.
11620                 List of sub-shapes IDs from 2nd shape that localize intersection.
11621             """
11622             # Example: see GEOM_TestMeasures.py
11623             IsOk, Res1, Res2 = self.MeasuOp.FastIntersect(theShape1, theShape2, theTolerance, theDeflection)
11624             RaiseIfFailed("FastIntersect", self.MeasuOp)
11625             return IsOk, Res1, Res2
11626
11627         ## Get position (LCS) of theShape.
11628         #
11629         #  Origin of the LCS is situated at the shape's center of mass.
11630         #  Axes of the LCS are obtained from shape's location or,
11631         #  if the shape is a planar face, from position of its plane.
11632         #
11633         #  @param theShape Shape to calculate position of.
11634         #  @return [Ox,Oy,Oz, Zx,Zy,Zz, Xx,Xy,Xz].
11635         #          Ox,Oy,Oz: Coordinates of shape's LCS origin.
11636         #          Zx,Zy,Zz: Coordinates of shape's LCS normal(main) direction.
11637         #          Xx,Xy,Xz: Coordinates of shape's LCS X direction.
11638         #
11639         #  @ref swig_todo "Example"
11640         @ManageTransactions("MeasuOp")
11641         def GetPosition(self,theShape):
11642             """
11643             Get position (LCS) of theShape.
11644             Origin of the LCS is situated at the shape's center of mass.
11645             Axes of the LCS are obtained from shape's location or,
11646             if the shape is a planar face, from position of its plane.
11647
11648             Parameters:
11649                 theShape Shape to calculate position of.
11650
11651             Returns:
11652                 [Ox,Oy,Oz, Zx,Zy,Zz, Xx,Xy,Xz].
11653                  Ox,Oy,Oz: Coordinates of shape's LCS origin.
11654                  Zx,Zy,Zz: Coordinates of shape's LCS normal(main) direction.
11655                  Xx,Xy,Xz: Coordinates of shape's LCS X direction.
11656             """
11657             # Example: see GEOM_TestMeasures.py
11658             aTuple = self.MeasuOp.GetPosition(theShape)
11659             RaiseIfFailed("GetPosition", self.MeasuOp)
11660             return aTuple
11661
11662         ## Get kind of theShape.
11663         #
11664         #  @param theShape Shape to get a kind of.
11665         #  @return Returns a kind of shape in terms of <VAR>GEOM.GEOM_IKindOfShape.shape_kind</VAR> enumeration
11666         #          and a list of parameters, describing the shape.
11667         #  @note  Concrete meaning of each value, returned via \a theIntegers
11668         #         or \a theDoubles list depends on the kind() of the shape.
11669         #
11670         #  @ref swig_todo "Example"
11671         @ManageTransactions("MeasuOp")
11672         def KindOfShape(self,theShape):
11673             """
11674             Get kind of theShape.
11675
11676             Parameters:
11677                 theShape Shape to get a kind of.
11678
11679             Returns:
11680                 a kind of shape in terms of GEOM_IKindOfShape.shape_kind enumeration
11681                     and a list of parameters, describing the shape.
11682             Note:
11683                 Concrete meaning of each value, returned via theIntegers
11684                 or theDoubles list depends on the geompy.kind of the shape
11685             """
11686             # Example: see GEOM_TestMeasures.py
11687             aRoughTuple = self.MeasuOp.KindOfShape(theShape)
11688             RaiseIfFailed("KindOfShape", self.MeasuOp)
11689
11690             aKind  = aRoughTuple[0]
11691             anInts = aRoughTuple[1]
11692             aDbls  = aRoughTuple[2]
11693
11694             # Now there is no exception from this rule:
11695             aKindTuple = [aKind] + aDbls + anInts
11696
11697             # If they are we will regroup parameters for such kind of shape.
11698             # For example:
11699             #if aKind == kind.SOME_KIND:
11700             #    #  SOME_KIND     int int double int double double
11701             #    aKindTuple = [aKind, anInts[0], anInts[1], aDbls[0], anInts[2], aDbls[1], aDbls[2]]
11702
11703             return aKindTuple
11704
11705         ## Returns the string that describes if the shell is good for solid.
11706         #  This is a support method for MakeSolid.
11707         #
11708         #  @param theShell the shell to be checked.
11709         #  @return Returns a string that describes the shell validity for
11710         #          solid construction.
11711         @ManageTransactions("MeasuOp")
11712         def _IsGoodForSolid(self, theShell):
11713             """
11714             Returns the string that describes if the shell is good for solid.
11715             This is a support method for MakeSolid.
11716
11717             Parameter:
11718                 theShell the shell to be checked.
11719
11720             Returns:
11721                 Returns a string that describes the shell validity for
11722                 solid construction.
11723             """
11724             aDescr = self.MeasuOp.IsGoodForSolid(theShell)
11725             return aDescr
11726
11727         # end of l2_measure
11728         ## @}
11729
11730         ## @addtogroup l2_import_export
11731         ## @{
11732
11733         ## Import a shape from the BREP, IGES, STEP or other file
11734         #  (depends on given format) with given name.
11735         #
11736         #  Note: this function is deprecated, it is kept for backward compatibility only
11737         #  Use Import<FormatName> instead, where <FormatName> is a name of desirable format to import.
11738         #
11739         #  @param theFileName The file, containing the shape.
11740         #  @param theFormatName Specify format for the file reading.
11741         #         Available formats can be obtained with InsertOp.ImportTranslators() method.
11742         #         If format 'IGES_SCALE' is used instead of 'IGES' or
11743         #            format 'STEP_SCALE' is used instead of 'STEP',
11744         #            length unit will be set to 'meter' and result model will be scaled.
11745         #  @param theName Object name; when specified, this parameter is used
11746         #         for result publication in the study. Otherwise, if automatic
11747         #         publication is switched on, default value is used for result name.
11748         #
11749         #  @return New GEOM.GEOM_Object, containing the imported shape.
11750         #          If material names are imported it returns the list of
11751         #          objects. The first one is the imported object followed by
11752         #          material groups.
11753         #  @note Auto publishing is allowed for the shape itself. Imported
11754         #        material groups are not automatically published.
11755         #
11756         #  @ref swig_Import_Export "Example"
11757         @ManageTransactions("InsertOp")
11758         def ImportFile(self, theFileName, theFormatName, theName=None):
11759             """
11760             Import a shape from the BREP, IGES, STEP or other file
11761             (depends on given format) with given name.
11762
11763             Note: this function is deprecated, it is kept for backward compatibility only
11764             Use Import<FormatName> instead, where <FormatName> is a name of desirable format to import.
11765
11766             Parameters: 
11767                 theFileName The file, containing the shape.
11768                 theFormatName Specify format for the file reading.
11769                     Available formats can be obtained with geompy.InsertOp.ImportTranslators() method.
11770                     If format 'IGES_SCALE' is used instead of 'IGES' or
11771                        format 'STEP_SCALE' is used instead of 'STEP',
11772                        length unit will be set to 'meter' and result model will be scaled.
11773                 theName Object name; when specified, this parameter is used
11774                         for result publication in the study. Otherwise, if automatic
11775                         publication is switched on, default value is used for result name.
11776
11777             Returns:
11778                 New GEOM.GEOM_Object, containing the imported shape.
11779                 If material names are imported it returns the list of
11780                 objects. The first one is the imported object followed by
11781                 material groups.
11782             Note:
11783                 Auto publishing is allowed for the shape itself. Imported
11784                 material groups are not automatically published.
11785             """
11786             # Example: see GEOM_TestOthers.py
11787             print("""
11788             WARNING: Function ImportFile is deprecated, use Import<FormatName> instead,
11789             where <FormatName> is a name of desirable format for importing.
11790             """)
11791             aListObj = self.InsertOp.ImportFile(theFileName, theFormatName)
11792             RaiseIfFailed("ImportFile", self.InsertOp)
11793             aNbObj = len(aListObj)
11794             if aNbObj > 0:
11795                 self._autoPublish(aListObj[0], theName, "imported")
11796             if aNbObj == 1:
11797                 return aListObj[0]
11798             return aListObj
11799
11800         ## Deprecated analog of ImportFile()
11801         def Import(self, theFileName, theFormatName, theName=None):
11802             """
11803             Deprecated analog of geompy.ImportFile, kept for backward compatibility only.
11804             """
11805             # note: auto-publishing is done in self.ImportFile()
11806             return self.ImportFile(theFileName, theFormatName, theName)
11807
11808         ## Read a shape from the binary stream, containing its bounding representation (BRep).
11809         #
11810         #  @note As the byte-stream representing the shape data can be quite large, this method
11811         #  is not automatically dumped to the Python script with the DumpStudy functionality;
11812         #  so please use this method carefully, only for strong reasons.
11813         #  
11814         #  @note GEOM.GEOM_Object.GetShapeStream() method can be used to obtain the shape's
11815         #  data stream.
11816         #
11817         #  @param theStream The BRep binary stream.
11818         #  @param theName Object name; when specified, this parameter is used
11819         #         for result publication in the study. Otherwise, if automatic
11820         #         publication is switched on, default value is used for result name.
11821         #
11822         #  @return New GEOM_Object, containing the shape, read from theStream.
11823         #
11824         #  @ref swig_Import_Export "Example"
11825         @ManageTransactions("InsertOp")
11826         def RestoreShape (self, theStream, theName=None):
11827             """
11828             Read a shape from the binary stream, containing its bounding representation (BRep).
11829
11830             Note:
11831                 shape.GetShapeStream() method can be used to obtain the shape's BRep stream.
11832
11833             Parameters:
11834                 theStream The BRep binary stream.
11835                 theName Object name; when specified, this parameter is used
11836                         for result publication in the study. Otherwise, if automatic
11837                         publication is switched on, default value is used for result name.
11838
11839             Returns:
11840                 New GEOM_Object, containing the shape, read from theStream.
11841             """
11842             # Example: see GEOM_TestOthers.py
11843             if not theStream:
11844                 # this is the workaround to ignore invalid case when data stream is empty
11845                 if int(os.getenv("GEOM_IGNORE_RESTORE_SHAPE", "0")) > 0:
11846                     print("WARNING: Result of RestoreShape is a NULL shape!")
11847                     return None
11848             anObj = self.InsertOp.RestoreShape(theStream)
11849             RaiseIfFailed("RestoreShape", self.InsertOp)
11850             self._autoPublish(anObj, theName, "restored")
11851             return anObj
11852
11853         ## Export the given shape into a file with given name.
11854         #
11855         #  Note: this function is deprecated, it is kept for backward compatibility only
11856         #  Use Export<FormatName> instead, where <FormatName> is a name of desirable format to export.
11857         #
11858         #  @param theObject Shape to be stored in the file.
11859         #  @param theFileName Name of the file to store the given shape in.
11860         #  @param theFormatName Specify format for the shape storage.
11861         #         Available formats can be obtained with
11862         #         geompy.InsertOp.ExportTranslators()[0] method.
11863         #
11864         #  @ref swig_Import_Export "Example"
11865         @ManageTransactions("InsertOp")
11866         def Export(self, theObject, theFileName, theFormatName):
11867             """
11868             Export the given shape into a file with given name.
11869
11870             Note: this function is deprecated, it is kept for backward compatibility only
11871             Use Export<FormatName> instead, where <FormatName> is a name of desirable format to export.
11872             
11873             Parameters: 
11874                 theObject Shape to be stored in the file.
11875                 theFileName Name of the file to store the given shape in.
11876                 theFormatName Specify format for the shape storage.
11877                               Available formats can be obtained with
11878                               geompy.InsertOp.ExportTranslators()[0] method.
11879             """
11880             # Example: see GEOM_TestOthers.py
11881             print("""
11882             WARNING: Function Export is deprecated, use Export<FormatName> instead,
11883             where <FormatName> is a name of desirable format for exporting.
11884             """)
11885             self.InsertOp.Export(theObject, theFileName, theFormatName)
11886             if self.InsertOp.IsDone() == 0:
11887                 raise RuntimeError("Export : " + self.InsertOp.GetErrorCode())
11888                 pass
11889             pass
11890
11891         # end of l2_import_export
11892         ## @}
11893
11894         ## @addtogroup l3_blocks
11895         ## @{
11896
11897         ## Create a quadrangle face from four edges. Order of Edges is not
11898         #  important. It is not necessary that edges share the same vertex.
11899         #  @param E1,E2,E3,E4 Edges for the face bound.
11900         #  @param theName Object name; when specified, this parameter is used
11901         #         for result publication in the study. Otherwise, if automatic
11902         #         publication is switched on, default value is used for result name.
11903         #
11904         #  @return New GEOM.GEOM_Object, containing the created face.
11905         #
11906         #  @ref tui_building_by_blocks_page "Example"
11907         @ManageTransactions("BlocksOp")
11908         def MakeQuad(self, E1, E2, E3, E4, theName=None):
11909             """
11910             Create a quadrangle face from four edges. Order of Edges is not
11911             important. It is not necessary that edges share the same vertex.
11912
11913             Parameters:
11914                 E1,E2,E3,E4 Edges for the face bound.
11915                 theName Object name; when specified, this parameter is used
11916                         for result publication in the study. Otherwise, if automatic
11917                         publication is switched on, default value is used for result name.
11918
11919             Returns:
11920                 New GEOM.GEOM_Object, containing the created face.
11921
11922             Example of usage:
11923                 qface1 = geompy.MakeQuad(edge1, edge2, edge3, edge4)
11924             """
11925             # Example: see GEOM_Spanner.py
11926             anObj = self.BlocksOp.MakeQuad(E1, E2, E3, E4)
11927             RaiseIfFailed("MakeQuad", self.BlocksOp)
11928             self._autoPublish(anObj, theName, "quad")
11929             return anObj
11930
11931         ## Create a quadrangle face on two edges.
11932         #  The missing edges will be built by creating the shortest ones.
11933         #  @param E1,E2 Two opposite edges for the face.
11934         #  @param theName Object name; when specified, this parameter is used
11935         #         for result publication in the study. Otherwise, if automatic
11936         #         publication is switched on, default value is used for result name.
11937         #
11938         #  @return New GEOM.GEOM_Object, containing the created face.
11939         #
11940         #  @ref tui_building_by_blocks_page "Example"
11941         @ManageTransactions("BlocksOp")
11942         def MakeQuad2Edges(self, E1, E2, theName=None):
11943             """
11944             Create a quadrangle face on two edges.
11945             The missing edges will be built by creating the shortest ones.
11946
11947             Parameters:
11948                 E1,E2 Two opposite edges for the face.
11949                 theName Object name; when specified, this parameter is used
11950                         for result publication in the study. Otherwise, if automatic
11951                         publication is switched on, default value is used for result name.
11952
11953             Returns:
11954                 New GEOM.GEOM_Object, containing the created face.
11955
11956             Example of usage:
11957                 # create vertices
11958                 p1 = geompy.MakeVertex(  0.,   0.,   0.)
11959                 p2 = geompy.MakeVertex(150.,  30.,   0.)
11960                 p3 = geompy.MakeVertex(  0., 120.,  50.)
11961                 p4 = geompy.MakeVertex(  0.,  40.,  70.)
11962                 # create edges
11963                 edge1 = geompy.MakeEdge(p1, p2)
11964                 edge2 = geompy.MakeEdge(p3, p4)
11965                 # create a quadrangle face from two edges
11966                 qface2 = geompy.MakeQuad2Edges(edge1, edge2)
11967             """
11968             # Example: see GEOM_Spanner.py
11969             anObj = self.BlocksOp.MakeQuad2Edges(E1, E2)
11970             RaiseIfFailed("MakeQuad2Edges", self.BlocksOp)
11971             self._autoPublish(anObj, theName, "quad")
11972             return anObj
11973
11974         ## Create a quadrangle face with specified corners.
11975         #  The missing edges will be built by creating the shortest ones.
11976         #  @param V1,V2,V3,V4 Corner vertices for the face.
11977         #  @param theName Object name; when specified, this parameter is used
11978         #         for result publication in the study. Otherwise, if automatic
11979         #         publication is switched on, default value is used for result name.
11980         #
11981         #  @return New GEOM.GEOM_Object, containing the created face.
11982         #
11983         #  @ref tui_building_by_blocks_page "Example 1"
11984         #  \n @ref swig_MakeQuad4Vertices "Example 2"
11985         @ManageTransactions("BlocksOp")
11986         def MakeQuad4Vertices(self, V1, V2, V3, V4, theName=None):
11987             """
11988             Create a quadrangle face with specified corners.
11989             The missing edges will be built by creating the shortest ones.
11990
11991             Parameters:
11992                 V1,V2,V3,V4 Corner vertices for the face.
11993                 theName Object name; when specified, this parameter is used
11994                         for result publication in the study. Otherwise, if automatic
11995                         publication is switched on, default value is used for result name.
11996
11997             Returns:
11998                 New GEOM.GEOM_Object, containing the created face.
11999
12000             Example of usage:
12001                 # create vertices
12002                 p1 = geompy.MakeVertex(  0.,   0.,   0.)
12003                 p2 = geompy.MakeVertex(150.,  30.,   0.)
12004                 p3 = geompy.MakeVertex(  0., 120.,  50.)
12005                 p4 = geompy.MakeVertex(  0.,  40.,  70.)
12006                 # create a quadrangle from four points in its corners
12007                 qface3 = geompy.MakeQuad4Vertices(p1, p2, p3, p4)
12008             """
12009             # Example: see GEOM_Spanner.py
12010             anObj = self.BlocksOp.MakeQuad4Vertices(V1, V2, V3, V4)
12011             RaiseIfFailed("MakeQuad4Vertices", self.BlocksOp)
12012             self._autoPublish(anObj, theName, "quad")
12013             return anObj
12014
12015         ## Create a hexahedral solid, bounded by the six given faces. Order of
12016         #  faces is not important. It is not necessary that Faces share the same edge.
12017         #  @param F1,F2,F3,F4,F5,F6 Faces for the hexahedral solid.
12018         #  @param theName Object name; when specified, this parameter is used
12019         #         for result publication in the study. Otherwise, if automatic
12020         #         publication is switched on, default value is used for result name.
12021         #
12022         #  @return New GEOM.GEOM_Object, containing the created solid.
12023         #
12024         #  @ref tui_building_by_blocks_page "Example 1"
12025         #  \n @ref swig_MakeHexa "Example 2"
12026         @ManageTransactions("BlocksOp")
12027         def MakeHexa(self, F1, F2, F3, F4, F5, F6, theName=None):
12028             """
12029             Create a hexahedral solid, bounded by the six given faces. Order of
12030             faces is not important. It is not necessary that Faces share the same edge.
12031
12032             Parameters:
12033                 F1,F2,F3,F4,F5,F6 Faces for the hexahedral solid.
12034                 theName Object name; when specified, this parameter is used
12035                         for result publication in the study. Otherwise, if automatic
12036                         publication is switched on, default value is used for result name.
12037
12038             Returns:
12039                 New GEOM.GEOM_Object, containing the created solid.
12040
12041             Example of usage:
12042                 solid = geompy.MakeHexa(qface1, qface2, qface3, qface4, qface5, qface6)
12043             """
12044             # Example: see GEOM_Spanner.py
12045             anObj = self.BlocksOp.MakeHexa(F1, F2, F3, F4, F5, F6)
12046             RaiseIfFailed("MakeHexa", self.BlocksOp)
12047             self._autoPublish(anObj, theName, "hexa")
12048             return anObj
12049
12050         ## Create a hexahedral solid between two given faces.
12051         #  The missing faces will be built by creating the smallest ones.
12052         #  @param F1,F2 Two opposite faces for the hexahedral solid.
12053         #  @param theName Object name; when specified, this parameter is used
12054         #         for result publication in the study. Otherwise, if automatic
12055         #         publication is switched on, default value is used for result name.
12056         #
12057         #  @return New GEOM.GEOM_Object, containing the created solid.
12058         #
12059         #  @ref tui_building_by_blocks_page "Example 1"
12060         #  \n @ref swig_MakeHexa2Faces "Example 2"
12061         @ManageTransactions("BlocksOp")
12062         def MakeHexa2Faces(self, F1, F2, theName=None):
12063             """
12064             Create a hexahedral solid between two given faces.
12065             The missing faces will be built by creating the smallest ones.
12066
12067             Parameters:
12068                 F1,F2 Two opposite faces for the hexahedral solid.
12069                 theName Object name; when specified, this parameter is used
12070                         for result publication in the study. Otherwise, if automatic
12071                         publication is switched on, default value is used for result name.
12072
12073             Returns:
12074                 New GEOM.GEOM_Object, containing the created solid.
12075
12076             Example of usage:
12077                 solid1 = geompy.MakeHexa2Faces(qface1, qface2)
12078             """
12079             # Example: see GEOM_Spanner.py
12080             anObj = self.BlocksOp.MakeHexa2Faces(F1, F2)
12081             RaiseIfFailed("MakeHexa2Faces", self.BlocksOp)
12082             self._autoPublish(anObj, theName, "hexa")
12083             return anObj
12084
12085         # end of l3_blocks
12086         ## @}
12087
12088         ## @addtogroup l3_blocks_op
12089         ## @{
12090
12091         ## Get a vertex, found in the given shape by its coordinates.
12092         #  @param theShape Block or a compound of blocks.
12093         #  @param theX,theY,theZ Coordinates of the sought vertex.
12094         #  @param theEpsilon Maximum allowed distance between the resulting
12095         #                    vertex and point with the given coordinates.
12096         #  @param theName Object name; when specified, this parameter is used
12097         #         for result publication in the study. Otherwise, if automatic
12098         #         publication is switched on, default value is used for result name.
12099         #
12100         #  @return New GEOM.GEOM_Object, containing the found vertex.
12101         #
12102         #  @ref swig_GetPoint "Example"
12103         @ManageTransactions("BlocksOp")
12104         def GetPoint(self, theShape, theX, theY, theZ, theEpsilon, theName=None):
12105             """
12106             Get a vertex, found in the given shape by its coordinates.
12107
12108             Parameters:
12109                 theShape Block or a compound of blocks.
12110                 theX,theY,theZ Coordinates of the sought vertex.
12111                 theEpsilon Maximum allowed distance between the resulting
12112                            vertex and point with the given coordinates.
12113                 theName Object name; when specified, this parameter is used
12114                         for result publication in the study. Otherwise, if automatic
12115                         publication is switched on, default value is used for result name.
12116
12117             Returns:
12118                 New GEOM.GEOM_Object, containing the found vertex.
12119
12120             Example of usage:
12121                 pnt = geompy.GetPoint(shape, -50,  50,  50, 0.01)
12122             """
12123             # Example: see GEOM_TestOthers.py
12124             anObj = self.BlocksOp.GetPoint(theShape, theX, theY, theZ, theEpsilon)
12125             RaiseIfFailed("GetPoint", self.BlocksOp)
12126             self._autoPublish(anObj, theName, "vertex")
12127             return anObj
12128
12129         ## Find a vertex of the given shape, which has minimal distance to the given point.
12130         #  @param theShape Any shape.
12131         #  @param thePoint Point, close to the desired vertex.
12132         #  @param theName Object name; when specified, this parameter is used
12133         #         for result publication in the study. Otherwise, if automatic
12134         #         publication is switched on, default value is used for result name.
12135         #
12136         #  @return New GEOM.GEOM_Object, containing the found vertex.
12137         #
12138         #  @ref swig_GetVertexNearPoint "Example"
12139         @ManageTransactions("BlocksOp")
12140         def GetVertexNearPoint(self, theShape, thePoint, theName=None):
12141             """
12142             Find a vertex of the given shape, which has minimal distance to the given point.
12143
12144             Parameters:
12145                 theShape Any shape.
12146                 thePoint Point, close to the desired vertex.
12147                 theName Object name; when specified, this parameter is used
12148                         for result publication in the study. Otherwise, if automatic
12149                         publication is switched on, default value is used for result name.
12150
12151             Returns:
12152                 New GEOM.GEOM_Object, containing the found vertex.
12153
12154             Example of usage:
12155                 pmidle = geompy.MakeVertex(50, 0, 50)
12156                 edge1 = geompy.GetEdgeNearPoint(blocksComp, pmidle)
12157             """
12158             # Example: see GEOM_TestOthers.py
12159             anObj = self.BlocksOp.GetVertexNearPoint(theShape, thePoint)
12160             RaiseIfFailed("GetVertexNearPoint", self.BlocksOp)
12161             self._autoPublish(anObj, theName, "vertex")
12162             return anObj
12163
12164         ## Get an edge, found in the given shape by two given vertices.
12165         #  @param theShape Block or a compound of blocks.
12166         #  @param thePoint1,thePoint2 Points, close to the ends of the desired edge.
12167         #  @param theName Object name; when specified, this parameter is used
12168         #         for result publication in the study. Otherwise, if automatic
12169         #         publication is switched on, default value is used for result name.
12170         #
12171         #  @return New GEOM.GEOM_Object, containing the found edge.
12172         #
12173         #  @ref swig_GetEdge "Example"
12174         @ManageTransactions("BlocksOp")
12175         def GetEdge(self, theShape, thePoint1, thePoint2, theName=None):
12176             """
12177             Get an edge, found in the given shape by two given vertices.
12178
12179             Parameters:
12180                 theShape Block or a compound of blocks.
12181                 thePoint1,thePoint2 Points, close to the ends of the desired edge.
12182                 theName Object name; when specified, this parameter is used
12183                         for result publication in the study. Otherwise, if automatic
12184                         publication is switched on, default value is used for result name.
12185
12186             Returns:
12187                 New GEOM.GEOM_Object, containing the found edge.
12188             """
12189             # Example: see GEOM_Spanner.py
12190             anObj = self.BlocksOp.GetEdge(theShape, thePoint1, thePoint2)
12191             RaiseIfFailed("GetEdge", self.BlocksOp)
12192             self._autoPublish(anObj, theName, "edge")
12193             return anObj
12194
12195         ## Find an edge of the given shape, which has minimal distance to the given point.
12196         #  @param theShape Block or a compound of blocks.
12197         #  @param thePoint Point, close to the desired edge.
12198         #  @param theName Object name; when specified, this parameter is used
12199         #         for result publication in the study. Otherwise, if automatic
12200         #         publication is switched on, default value is used for result name.
12201         #
12202         #  @return New GEOM.GEOM_Object, containing the found edge.
12203         #
12204         #  @ref swig_GetEdgeNearPoint "Example"
12205         @ManageTransactions("BlocksOp")
12206         def GetEdgeNearPoint(self, theShape, thePoint, theName=None):
12207             """
12208             Find an edge of the given shape, which has minimal distance to the given point.
12209
12210             Parameters:
12211                 theShape Block or a compound of blocks.
12212                 thePoint Point, close to the desired edge.
12213                 theName Object name; when specified, this parameter is used
12214                         for result publication in the study. Otherwise, if automatic
12215                         publication is switched on, default value is used for result name.
12216
12217             Returns:
12218                 New GEOM.GEOM_Object, containing the found edge.
12219             """
12220             # Example: see GEOM_TestOthers.py
12221             anObj = self.BlocksOp.GetEdgeNearPoint(theShape, thePoint)
12222             RaiseIfFailed("GetEdgeNearPoint", self.BlocksOp)
12223             self._autoPublish(anObj, theName, "edge")
12224             return anObj
12225
12226         ## Returns a face, found in the given shape by four given corner vertices.
12227         #  @param theShape Block or a compound of blocks.
12228         #  @param thePoint1,thePoint2,thePoint3,thePoint4 Points, close to the corners of the desired face.
12229         #  @param theName Object name; when specified, this parameter is used
12230         #         for result publication in the study. Otherwise, if automatic
12231         #         publication is switched on, default value is used for result name.
12232         #
12233         #  @return New GEOM.GEOM_Object, containing the found face.
12234         #
12235         #  @ref swig_todo "Example"
12236         @ManageTransactions("BlocksOp")
12237         def GetFaceByPoints(self, theShape, thePoint1, thePoint2, thePoint3, thePoint4, theName=None):
12238             """
12239             Returns a face, found in the given shape by four given corner vertices.
12240
12241             Parameters:
12242                 theShape Block or a compound of blocks.
12243                 thePoint1,thePoint2,thePoint3,thePoint4 Points, close to the corners of the desired face.
12244                 theName Object name; when specified, this parameter is used
12245                         for result publication in the study. Otherwise, if automatic
12246                         publication is switched on, default value is used for result name.
12247
12248             Returns:
12249                 New GEOM.GEOM_Object, containing the found face.
12250             """
12251             # Example: see GEOM_Spanner.py
12252             anObj = self.BlocksOp.GetFaceByPoints(theShape, thePoint1, thePoint2, thePoint3, thePoint4)
12253             RaiseIfFailed("GetFaceByPoints", self.BlocksOp)
12254             self._autoPublish(anObj, theName, "face")
12255             return anObj
12256
12257         ## Get a face of block, found in the given shape by two given edges.
12258         #  @param theShape Block or a compound of blocks.
12259         #  @param theEdge1,theEdge2 Edges, close to the edges of the desired face.
12260         #  @param theName Object name; when specified, this parameter is used
12261         #         for result publication in the study. Otherwise, if automatic
12262         #         publication is switched on, default value is used for result name.
12263         #
12264         #  @return New GEOM.GEOM_Object, containing the found face.
12265         #
12266         #  @ref swig_todo "Example"
12267         @ManageTransactions("BlocksOp")
12268         def GetFaceByEdges(self, theShape, theEdge1, theEdge2, theName=None):
12269             """
12270             Get a face of block, found in the given shape by two given edges.
12271
12272             Parameters:
12273                 theShape Block or a compound of blocks.
12274                 theEdge1,theEdge2 Edges, close to the edges of the desired face.
12275                 theName Object name; when specified, this parameter is used
12276                         for result publication in the study. Otherwise, if automatic
12277                         publication is switched on, default value is used for result name.
12278
12279             Returns:
12280                 New GEOM.GEOM_Object, containing the found face.
12281             """
12282             # Example: see GEOM_Spanner.py
12283             anObj = self.BlocksOp.GetFaceByEdges(theShape, theEdge1, theEdge2)
12284             RaiseIfFailed("GetFaceByEdges", self.BlocksOp)
12285             self._autoPublish(anObj, theName, "face")
12286             return anObj
12287
12288         ## Find a face, opposite to the given one in the given block.
12289         #  @param theBlock Must be a hexahedral solid.
12290         #  @param theFace Face of \a theBlock, opposite to the desired face.
12291         #  @param theName Object name; when specified, this parameter is used
12292         #         for result publication in the study. Otherwise, if automatic
12293         #         publication is switched on, default value is used for result name.
12294         #
12295         #  @return New GEOM.GEOM_Object, containing the found face.
12296         #
12297         #  @ref swig_GetOppositeFace "Example"
12298         @ManageTransactions("BlocksOp")
12299         def GetOppositeFace(self, theBlock, theFace, theName=None):
12300             """
12301             Find a face, opposite to the given one in the given block.
12302
12303             Parameters:
12304                 theBlock Must be a hexahedral solid.
12305                 theFace Face of theBlock, opposite to the desired face.
12306                 theName Object name; when specified, this parameter is used
12307                         for result publication in the study. Otherwise, if automatic
12308                         publication is switched on, default value is used for result name.
12309
12310             Returns:
12311                 New GEOM.GEOM_Object, containing the found face.
12312             """
12313             # Example: see GEOM_Spanner.py
12314             anObj = self.BlocksOp.GetOppositeFace(theBlock, theFace)
12315             RaiseIfFailed("GetOppositeFace", self.BlocksOp)
12316             self._autoPublish(anObj, theName, "face")
12317             return anObj
12318
12319         ## Find a face of the given shape, which has minimal distance to the given point.
12320         #  @param theShape Block or a compound of blocks.
12321         #  @param thePoint Point, close to the desired face.
12322         #  @param theName Object name; when specified, this parameter is used
12323         #         for result publication in the study. Otherwise, if automatic
12324         #         publication is switched on, default value is used for result name.
12325         #
12326         #  @return New GEOM.GEOM_Object, containing the found face.
12327         #
12328         #  @ref swig_GetFaceNearPoint "Example"
12329         @ManageTransactions("BlocksOp")
12330         def GetFaceNearPoint(self, theShape, thePoint, theName=None):
12331             """
12332             Find a face of the given shape, which has minimal distance to the given point.
12333
12334             Parameters:
12335                 theShape Block or a compound of blocks.
12336                 thePoint Point, close to the desired face.
12337                 theName Object name; when specified, this parameter is used
12338                         for result publication in the study. Otherwise, if automatic
12339                         publication is switched on, default value is used for result name.
12340
12341             Returns:
12342                 New GEOM.GEOM_Object, containing the found face.
12343             """
12344             # Example: see GEOM_Spanner.py
12345             anObj = self.BlocksOp.GetFaceNearPoint(theShape, thePoint)
12346             RaiseIfFailed("GetFaceNearPoint", self.BlocksOp)
12347             self._autoPublish(anObj, theName, "face")
12348             return anObj
12349
12350         ## Find a face of block, whose outside normale has minimal angle with the given vector.
12351         #  @param theBlock Block or a compound of blocks.
12352         #  @param theVector Vector, close to the normale of the desired face.
12353         #  @param theName Object name; when specified, this parameter is used
12354         #         for result publication in the study. Otherwise, if automatic
12355         #         publication is switched on, default value is used for result name.
12356         #
12357         #  @return New GEOM.GEOM_Object, containing the found face.
12358         #
12359         #  @ref swig_todo "Example"
12360         @ManageTransactions("BlocksOp")
12361         def GetFaceByNormale(self, theBlock, theVector, theName=None):
12362             """
12363             Find a face of block, whose outside normale has minimal angle with the given vector.
12364
12365             Parameters:
12366                 theBlock Block or a compound of blocks.
12367                 theVector Vector, close to the normale of the desired face.
12368                 theName Object name; when specified, this parameter is used
12369                         for result publication in the study. Otherwise, if automatic
12370                         publication is switched on, default value is used for result name.
12371
12372             Returns:
12373                 New GEOM.GEOM_Object, containing the found face.
12374             """
12375             # Example: see GEOM_Spanner.py
12376             anObj = self.BlocksOp.GetFaceByNormale(theBlock, theVector)
12377             RaiseIfFailed("GetFaceByNormale", self.BlocksOp)
12378             self._autoPublish(anObj, theName, "face")
12379             return anObj
12380
12381         ## Find all sub-shapes of type \a theShapeType of the given shape,
12382         #  which have minimal distance to the given point.
12383         #  @param theShape Any shape.
12384         #  @param thePoint Point, close to the desired shape.
12385         #  @param theShapeType Defines what kind of sub-shapes is searched GEOM::shape_type
12386         #  @param theTolerance The tolerance for distances comparison. All shapes
12387         #                      with distances to the given point in interval
12388         #                      [minimal_distance, minimal_distance + theTolerance] will be gathered.
12389         #  @param theName Object name; when specified, this parameter is used
12390         #         for result publication in the study. Otherwise, if automatic
12391         #         publication is switched on, default value is used for result name.
12392         #
12393         #  @return New GEOM_Object, containing a group of all found shapes.
12394         #
12395         #  @ref swig_GetShapesNearPoint "Example"
12396         @ManageTransactions("BlocksOp")
12397         def GetShapesNearPoint(self, theShape, thePoint, theShapeType, theTolerance = 1e-07, theName=None):
12398             """
12399             Find all sub-shapes of type theShapeType of the given shape,
12400             which have minimal distance to the given point.
12401
12402             Parameters:
12403                 theShape Any shape.
12404                 thePoint Point, close to the desired shape.
12405                 theShapeType Defines what kind of sub-shapes is searched (see GEOM::shape_type)
12406                 theTolerance The tolerance for distances comparison. All shapes
12407                                 with distances to the given point in interval
12408                                 [minimal_distance, minimal_distance + theTolerance] will be gathered.
12409                 theName Object name; when specified, this parameter is used
12410                         for result publication in the study. Otherwise, if automatic
12411                         publication is switched on, default value is used for result name.
12412
12413             Returns:
12414                 New GEOM_Object, containing a group of all found shapes.
12415             """
12416             # Example: see GEOM_TestOthers.py
12417             anObj = self.BlocksOp.GetShapesNearPoint(theShape, thePoint, theShapeType, theTolerance)
12418             RaiseIfFailed("GetShapesNearPoint", self.BlocksOp)
12419             self._autoPublish(anObj, theName, "group")
12420             return anObj
12421
12422         # end of l3_blocks_op
12423         ## @}
12424
12425         ## @addtogroup l4_blocks_measure
12426         ## @{
12427
12428         ## Check, if the compound of blocks is given.
12429         #  To be considered as a compound of blocks, the
12430         #  given shape must satisfy the following conditions:
12431         #  - Each element of the compound should be a Block (6 faces).
12432         #  - Each face should be a quadrangle, i.e. it should have only 1 wire
12433         #       with 4 edges. If <VAR>theIsUseC1</VAR> is set to True and
12434         #       there are more than 4 edges in the only wire of a face,
12435         #       this face is considered to be quadrangle if it has 4 bounds
12436         #       (1 or more edge) of C1 continuity.
12437         #  - A connection between two Blocks should be an entire quadrangle face or an entire edge.
12438         #  - The compound should be connexe.
12439         #  - The glue between two quadrangle faces should be applied.
12440         #  @param theCompound The compound to check.
12441         #  @param theIsUseC1 Flag to check if there are 4 bounds on a face
12442         #         taking into account C1 continuity.
12443         #  @param theAngTolerance the angular tolerance to check if two neighbor
12444         #         edges are codirectional in the common vertex with this
12445         #         tolerance. This parameter is used only if
12446         #         <VAR>theIsUseC1</VAR> is set to True.
12447         #  @return TRUE, if the given shape is a compound of blocks.
12448         #  If theCompound is not valid, prints all discovered errors.
12449         #
12450         #  @ref tui_check_compound_of_blocks_page "Example 1"
12451         #  \n @ref swig_CheckCompoundOfBlocks "Example 2"
12452         @ManageTransactions("BlocksOp")
12453         def CheckCompoundOfBlocks(self,theCompound, theIsUseC1 = False,
12454                                   theAngTolerance = 1.e-12):
12455             """
12456             Check, if the compound of blocks is given.
12457             To be considered as a compound of blocks, the
12458             given shape must satisfy the following conditions:
12459             - Each element of the compound should be a Block (6 faces).
12460             - Each face should be a quadrangle, i.e. it should have only 1 wire
12461                  with 4 edges. If theIsUseC1 is set to True and
12462                  there are more than 4 edges in the only wire of a face,
12463                  this face is considered to be quadrangle if it has 4 bounds
12464                  (1 or more edge) of C1 continuity.
12465             - A connection between two Blocks should be an entire quadrangle face or an entire edge.
12466             - The compound should be connexe.
12467             - The glue between two quadrangle faces should be applied.
12468
12469             Parameters:
12470                 theCompound The compound to check.
12471                 theIsUseC1 Flag to check if there are 4 bounds on a face
12472                            taking into account C1 continuity.
12473                 theAngTolerance the angular tolerance to check if two neighbor
12474                            edges are codirectional in the common vertex with this
12475                            tolerance. This parameter is used only if
12476                            theIsUseC1 is set to True.
12477
12478             Returns:
12479                 TRUE, if the given shape is a compound of blocks.
12480                 If theCompound is not valid, prints all discovered errors.
12481             """
12482             # Example: see GEOM_Spanner.py
12483             aTolerance = -1.0
12484             if theIsUseC1:
12485                 aTolerance = theAngTolerance
12486             (IsValid, BCErrors) = self.BlocksOp.CheckCompoundOfBlocks(theCompound, aTolerance)
12487             RaiseIfFailed("CheckCompoundOfBlocks", self.BlocksOp)
12488             if IsValid == 0:
12489                 Descr = self.BlocksOp.PrintBCErrors(theCompound, BCErrors)
12490                 print(Descr)
12491             return IsValid
12492
12493         ## Retrieve all non blocks solids and faces from \a theShape.
12494         #  @param theShape The shape to explore.
12495         #  @param theIsUseC1 Flag to check if there are 4 bounds on a face
12496         #         taking into account C1 continuity.
12497         #  @param theAngTolerance the angular tolerance to check if two neighbor
12498         #         edges are codirectional in the common vertex with this
12499         #         tolerance. This parameter is used only if
12500         #         <VAR>theIsUseC1</VAR> is set to True.
12501         #  @param theName Object name; when specified, this parameter is used
12502         #         for result publication in the study. Otherwise, if automatic
12503         #         publication is switched on, default value is used for result name.
12504         #
12505         #  @return A tuple of two GEOM_Objects. The first object is a group of all
12506         #          non block solids (= not 6 faces, or with 6 faces, but with the
12507         #          presence of non-quadrangular faces). The second object is a
12508         #          group of all non quadrangular faces (= faces with more then
12509         #          1 wire or, if <VAR>theIsUseC1</VAR> is set to True, faces
12510         #          with 1 wire with not 4 edges that do not form 4 bounds of
12511         #          C1 continuity).
12512         #
12513         #  @ref tui_get_non_blocks_page "Example 1"
12514         #  \n @ref swig_GetNonBlocks "Example 2"
12515         @ManageTransactions("BlocksOp")
12516         def GetNonBlocks (self, theShape, theIsUseC1 = False,
12517                           theAngTolerance = 1.e-12, theName=None):
12518             """
12519             Retrieve all non blocks solids and faces from theShape.
12520
12521             Parameters:
12522                 theShape The shape to explore.
12523                 theIsUseC1 Flag to check if there are 4 bounds on a face
12524                            taking into account C1 continuity.
12525                 theAngTolerance the angular tolerance to check if two neighbor
12526                            edges are codirectional in the common vertex with this
12527                            tolerance. This parameter is used only if
12528                            theIsUseC1 is set to True.
12529                 theName Object name; when specified, this parameter is used
12530                         for result publication in the study. Otherwise, if automatic
12531                         publication is switched on, default value is used for result name.
12532
12533             Returns:
12534                 A tuple of two GEOM_Objects. The first object is a group of all
12535                 non block solids (= not 6 faces, or with 6 faces, but with the
12536                 presence of non-quadrangular faces). The second object is a
12537                 group of all non quadrangular faces (= faces with more then
12538                 1 wire or, if <VAR>theIsUseC1</VAR> is set to True, faces
12539                 with 1 wire with not 4 edges that do not form 4 bounds of
12540                 C1 continuity).
12541
12542             Usage:
12543                 (res_sols, res_faces) = geompy.GetNonBlocks(myShape1)
12544             """
12545             # Example: see GEOM_Spanner.py
12546             aTolerance = -1.0
12547             if theIsUseC1:
12548                 aTolerance = theAngTolerance
12549             aTuple = self.BlocksOp.GetNonBlocks(theShape, aTolerance)
12550             RaiseIfFailed("GetNonBlocks", self.BlocksOp)
12551             self._autoPublish(aTuple, theName, ("groupNonHexas", "groupNonQuads"))
12552             return aTuple
12553
12554         ## Remove all seam and degenerated edges from \a theShape.
12555         #  Unite faces and edges, sharing one surface. It means that
12556         #  this faces must have references to one C++ surface object (handle).
12557         #  @param theShape The compound or single solid to remove irregular edges from.
12558         #  @param doUnionFaces If True, then unite faces. If False (the default value),
12559         #         do not unite faces.
12560         #  @param theName Object name; when specified, this parameter is used
12561         #         for result publication in the study. Otherwise, if automatic
12562         #         publication is switched on, default value is used for result name.
12563         #
12564         #  @return Improved shape.
12565         #
12566         #  @ref swig_RemoveExtraEdges "Example"
12567         @ManageTransactions("BlocksOp")
12568         def RemoveExtraEdges(self, theShape, doUnionFaces=False, theName=None):
12569             """
12570             Remove all seam and degenerated edges from theShape.
12571             Unite faces and edges, sharing one surface. It means that
12572             this faces must have references to one C++ surface object (handle).
12573
12574             Parameters:
12575                 theShape The compound or single solid to remove irregular edges from.
12576                 doUnionFaces If True, then unite faces. If False (the default value),
12577                              do not unite faces.
12578                 theName Object name; when specified, this parameter is used
12579                         for result publication in the study. Otherwise, if automatic
12580                         publication is switched on, default value is used for result name.
12581
12582             Returns:
12583                 Improved shape.
12584             """
12585             # Example: see GEOM_TestOthers.py
12586             nbFacesOptimum = -1 # -1 means do not unite faces
12587             if doUnionFaces is True: nbFacesOptimum = 0 # 0 means unite faces
12588             anObj = self.BlocksOp.RemoveExtraEdges(theShape, nbFacesOptimum)
12589             RaiseIfFailed("RemoveExtraEdges", self.BlocksOp)
12590             self._autoPublish(anObj, theName, "removeExtraEdges")
12591             return anObj
12592
12593         ## Performs union faces of \a theShape
12594         #  Unite faces sharing one surface. It means that
12595         #  these faces must have references to one C++ surface object (handle).
12596         #  @param theShape The compound or single solid that contains faces
12597         #         to perform union.
12598         #  @param theName Object name; when specified, this parameter is used
12599         #         for result publication in the study. Otherwise, if automatic
12600         #         publication is switched on, default value is used for result name.
12601         #
12602         #  @return Improved shape.
12603         #
12604         #  @ref swig_UnionFaces "Example"
12605         @ManageTransactions("BlocksOp")
12606         def UnionFaces(self, theShape, theName=None):
12607             """
12608             Performs union faces of theShape.
12609             Unite faces sharing one surface. It means that
12610             these faces must have references to one C++ surface object (handle).
12611
12612             Parameters:
12613                 theShape The compound or single solid that contains faces
12614                          to perform union.
12615                 theName Object name; when specified, this parameter is used
12616                         for result publication in the study. Otherwise, if automatic
12617                         publication is switched on, default value is used for result name.
12618
12619             Returns:
12620                 Improved shape.
12621             """
12622             # Example: see GEOM_TestOthers.py
12623             anObj = self.BlocksOp.UnionFaces(theShape)
12624             RaiseIfFailed("UnionFaces", self.BlocksOp)
12625             self._autoPublish(anObj, theName, "unionFaces")
12626             return anObj
12627
12628         ## Check, if the given shape is a blocks compound.
12629         #  Fix all detected errors.
12630         #    \note Single block can be also fixed by this method.
12631         #  @param theShape The compound to check and improve.
12632         #  @param theName Object name; when specified, this parameter is used
12633         #         for result publication in the study. Otherwise, if automatic
12634         #         publication is switched on, default value is used for result name.
12635         #
12636         #  @return Improved compound.
12637         #
12638         #  @ref swig_CheckAndImprove "Example"
12639         @ManageTransactions("BlocksOp")
12640         def CheckAndImprove(self, theShape, theName=None):
12641             """
12642             Check, if the given shape is a blocks compound.
12643             Fix all detected errors.
12644
12645             Note:
12646                 Single block can be also fixed by this method.
12647
12648             Parameters:
12649                 theShape The compound to check and improve.
12650                 theName Object name; when specified, this parameter is used
12651                         for result publication in the study. Otherwise, if automatic
12652                         publication is switched on, default value is used for result name.
12653
12654             Returns:
12655                 Improved compound.
12656             """
12657             # Example: see GEOM_TestOthers.py
12658             anObj = self.BlocksOp.CheckAndImprove(theShape)
12659             RaiseIfFailed("CheckAndImprove", self.BlocksOp)
12660             self._autoPublish(anObj, theName, "improved")
12661             return anObj
12662
12663         # end of l4_blocks_measure
12664         ## @}
12665
12666         ## @addtogroup l3_blocks_op
12667         ## @{
12668
12669         ## Get all the blocks, contained in the given compound.
12670         #  @param theCompound The compound to explode.
12671         #  @param theMinNbFaces If solid has lower number of faces, it is not a block.
12672         #  @param theMaxNbFaces If solid has higher number of faces, it is not a block.
12673         #  @param theName Object name; when specified, this parameter is used
12674         #         for result publication in the study. Otherwise, if automatic
12675         #         publication is switched on, default value is used for result name.
12676         #
12677         #  @note If theMaxNbFaces = 0, the maximum number of faces is not restricted.
12678         #
12679         #  @return List of GEOM.GEOM_Object, containing the retrieved blocks.
12680         #
12681         #  @ref tui_explode_on_blocks "Example 1"
12682         #  \n @ref swig_MakeBlockExplode "Example 2"
12683         @ManageTransactions("BlocksOp")
12684         def MakeBlockExplode(self, theCompound, theMinNbFaces, theMaxNbFaces, theName=None):
12685             """
12686             Get all the blocks, contained in the given compound.
12687
12688             Parameters:
12689                 theCompound The compound to explode.
12690                 theMinNbFaces If solid has lower number of faces, it is not a block.
12691                 theMaxNbFaces If solid has higher number of faces, it is not a block.
12692                 theName Object name; when specified, this parameter is used
12693                         for result publication in the study. Otherwise, if automatic
12694                         publication is switched on, default value is used for result name.
12695
12696             Note:
12697                 If theMaxNbFaces = 0, the maximum number of faces is not restricted.
12698
12699             Returns:
12700                 List of GEOM.GEOM_Object, containing the retrieved blocks.
12701             """
12702             # Example: see GEOM_TestOthers.py
12703             theMinNbFaces,theMaxNbFaces,Parameters = ParseParameters(theMinNbFaces,theMaxNbFaces)
12704             aList = self.BlocksOp.ExplodeCompoundOfBlocks(theCompound, theMinNbFaces, theMaxNbFaces)
12705             RaiseIfFailed("ExplodeCompoundOfBlocks", self.BlocksOp)
12706             for anObj in aList:
12707                 anObj.SetParameters(Parameters)
12708                 pass
12709             self._autoPublish(aList, theName, "block")
12710             return aList
12711
12712         ## Find block, containing the given point inside its volume or on boundary.
12713         #  @param theCompound Compound, to find block in.
12714         #  @param thePoint Point, close to the desired block. If the point lays on
12715         #         boundary between some blocks, we return block with nearest center.
12716         #  @param theName Object name; when specified, this parameter is used
12717         #         for result publication in the study. Otherwise, if automatic
12718         #         publication is switched on, default value is used for result name.
12719         #
12720         #  @return New GEOM.GEOM_Object, containing the found block.
12721         #
12722         #  @ref swig_todo "Example"
12723         @ManageTransactions("BlocksOp")
12724         def GetBlockNearPoint(self, theCompound, thePoint, theName=None):
12725             """
12726             Find block, containing the given point inside its volume or on boundary.
12727
12728             Parameters:
12729                 theCompound Compound, to find block in.
12730                 thePoint Point, close to the desired block. If the point lays on
12731                          boundary between some blocks, we return block with nearest center.
12732                 theName Object name; when specified, this parameter is used
12733                         for result publication in the study. Otherwise, if automatic
12734                         publication is switched on, default value is used for result name.
12735
12736             Returns:
12737                 New GEOM.GEOM_Object, containing the found block.
12738             """
12739             # Example: see GEOM_Spanner.py
12740             anObj = self.BlocksOp.GetBlockNearPoint(theCompound, thePoint)
12741             RaiseIfFailed("GetBlockNearPoint", self.BlocksOp)
12742             self._autoPublish(anObj, theName, "block")
12743             return anObj
12744
12745         ## Find block, containing all the elements, passed as the parts, or maximum quantity of them.
12746         #  @param theCompound Compound, to find block in.
12747         #  @param theParts List of faces and/or edges and/or vertices to be parts of the found block.
12748         #  @param theName Object name; when specified, this parameter is used
12749         #         for result publication in the study. Otherwise, if automatic
12750         #         publication is switched on, default value is used for result name.
12751         #
12752         #  @return New GEOM.GEOM_Object, containing the found block.
12753         #
12754         #  @ref swig_GetBlockByParts "Example"
12755         @ManageTransactions("BlocksOp")
12756         def GetBlockByParts(self, theCompound, theParts, theName=None):
12757             """
12758              Find block, containing all the elements, passed as the parts, or maximum quantity of them.
12759
12760              Parameters:
12761                 theCompound Compound, to find block in.
12762                 theParts List of faces and/or edges and/or vertices to be parts of the found block.
12763                 theName Object name; when specified, this parameter is used
12764                         for result publication in the study. Otherwise, if automatic
12765                         publication is switched on, default value is used for result name.
12766
12767             Returns:
12768                 New GEOM_Object, containing the found block.
12769             """
12770             # Example: see GEOM_TestOthers.py
12771             anObj = self.BlocksOp.GetBlockByParts(theCompound, theParts)
12772             RaiseIfFailed("GetBlockByParts", self.BlocksOp)
12773             self._autoPublish(anObj, theName, "block")
12774             return anObj
12775
12776         ## Return all blocks, containing all the elements, passed as the parts.
12777         #  @param theCompound Compound, to find blocks in.
12778         #  @param theParts List of faces and/or edges and/or vertices to be parts of the found blocks.
12779         #  @param theName Object name; when specified, this parameter is used
12780         #         for result publication in the study. Otherwise, if automatic
12781         #         publication is switched on, default value is used for result name.
12782         #
12783         #  @return List of GEOM.GEOM_Object, containing the found blocks.
12784         #
12785         #  @ref swig_todo "Example"
12786         @ManageTransactions("BlocksOp")
12787         def GetBlocksByParts(self, theCompound, theParts, theName=None):
12788             """
12789             Return all blocks, containing all the elements, passed as the parts.
12790
12791             Parameters:
12792                 theCompound Compound, to find blocks in.
12793                 theParts List of faces and/or edges and/or vertices to be parts of the found blocks.
12794                 theName Object name; when specified, this parameter is used
12795                         for result publication in the study. Otherwise, if automatic
12796                         publication is switched on, default value is used for result name.
12797
12798             Returns:
12799                 List of GEOM.GEOM_Object, containing the found blocks.
12800             """
12801             # Example: see GEOM_Spanner.py
12802             aList = self.BlocksOp.GetBlocksByParts(theCompound, theParts)
12803             RaiseIfFailed("GetBlocksByParts", self.BlocksOp)
12804             self._autoPublish(aList, theName, "block")
12805             return aList
12806
12807         ## Multi-transformate block and glue the result.
12808         #  Transformation is defined so, as to superpose direction faces.
12809         #  @param Block Hexahedral solid to be multi-transformed.
12810         #  @param DirFace1 ID of First direction face.
12811         #  @param DirFace2 ID of Second direction face.
12812         #  @param NbTimes Quantity of transformations to be done.
12813         #  @param theName Object name; when specified, this parameter is used
12814         #         for result publication in the study. Otherwise, if automatic
12815         #         publication is switched on, default value is used for result name.
12816         #
12817         #  @note Unique ID of sub-shape can be obtained, using method GetSubShapeID().
12818         #
12819         #  @return New GEOM.GEOM_Object, containing the result shape.
12820         #
12821         #  @ref tui_multi_transformation "Example"
12822         @ManageTransactions("BlocksOp")
12823         def MakeMultiTransformation1D(self, Block, DirFace1, DirFace2, NbTimes, theName=None):
12824             """
12825             Multi-transformate block and glue the result.
12826             Transformation is defined so, as to superpose direction faces.
12827
12828             Parameters:
12829                 Block Hexahedral solid to be multi-transformed.
12830                 DirFace1 ID of First direction face.
12831                 DirFace2 ID of Second direction face.
12832                 NbTimes Quantity of transformations to be done.
12833                 theName Object name; when specified, this parameter is used
12834                         for result publication in the study. Otherwise, if automatic
12835                         publication is switched on, default value is used for result name.
12836
12837             Note:
12838                 Unique ID of sub-shape can be obtained, using method GetSubShapeID().
12839
12840             Returns:
12841                 New GEOM.GEOM_Object, containing the result shape.
12842             """
12843             # Example: see GEOM_Spanner.py
12844             DirFace1,DirFace2,NbTimes,Parameters = ParseParameters(DirFace1,DirFace2,NbTimes)
12845             anObj = self.BlocksOp.MakeMultiTransformation1D(Block, DirFace1, DirFace2, NbTimes)
12846             RaiseIfFailed("MakeMultiTransformation1D", self.BlocksOp)
12847             anObj.SetParameters(Parameters)
12848             self._autoPublish(anObj, theName, "transformed")
12849             return anObj
12850
12851         ## Multi-transformate block and glue the result.
12852         #  @param Block Hexahedral solid to be multi-transformed.
12853         #  @param DirFace1U,DirFace2U IDs of Direction faces for the first transformation.
12854         #  @param DirFace1V,DirFace2V IDs of Direction faces for the second transformation.
12855         #  @param NbTimesU,NbTimesV Quantity of transformations to be done.
12856         #  @param theName Object name; when specified, this parameter is used
12857         #         for result publication in the study. Otherwise, if automatic
12858         #         publication is switched on, default value is used for result name.
12859         #
12860         #  @return New GEOM.GEOM_Object, containing the result shape.
12861         #
12862         #  @ref tui_multi_transformation "Example"
12863         @ManageTransactions("BlocksOp")
12864         def MakeMultiTransformation2D(self, Block, DirFace1U, DirFace2U, NbTimesU,
12865                                       DirFace1V, DirFace2V, NbTimesV, theName=None):
12866             """
12867             Multi-transformate block and glue the result.
12868
12869             Parameters:
12870                 Block Hexahedral solid to be multi-transformed.
12871                 DirFace1U,DirFace2U IDs of Direction faces for the first transformation.
12872                 DirFace1V,DirFace2V IDs of Direction faces for the second transformation.
12873                 NbTimesU,NbTimesV Quantity of transformations to be done.
12874                 theName Object name; when specified, this parameter is used
12875                         for result publication in the study. Otherwise, if automatic
12876                         publication is switched on, default value is used for result name.
12877
12878             Returns:
12879                 New GEOM.GEOM_Object, containing the result shape.
12880             """
12881             # Example: see GEOM_Spanner.py
12882             DirFace1U,DirFace2U,NbTimesU,DirFace1V,DirFace2V,NbTimesV,Parameters = ParseParameters(
12883               DirFace1U,DirFace2U,NbTimesU,DirFace1V,DirFace2V,NbTimesV)
12884             anObj = self.BlocksOp.MakeMultiTransformation2D(Block, DirFace1U, DirFace2U, NbTimesU,
12885                                                             DirFace1V, DirFace2V, NbTimesV)
12886             RaiseIfFailed("MakeMultiTransformation2D", self.BlocksOp)
12887             anObj.SetParameters(Parameters)
12888             self._autoPublish(anObj, theName, "transformed")
12889             return anObj
12890
12891         ## Build all possible propagation groups.
12892         #  Propagation group is a set of all edges, opposite to one (main)
12893         #  edge of this group directly or through other opposite edges.
12894         #  Notion of Opposite Edge make sense only on quadrangle face.
12895         #  @param theShape Shape to build propagation groups on.
12896         #  @param theName Object name; when specified, this parameter is used
12897         #         for result publication in the study. Otherwise, if automatic
12898         #         publication is switched on, default value is used for result name.
12899         #
12900         #  @return List of GEOM.GEOM_Object, each of them is a propagation group.
12901         #
12902         #  @ref swig_Propagate "Example"
12903         @ManageTransactions("BlocksOp")
12904         def Propagate(self, theShape, theName=None):
12905             """
12906             Build all possible propagation groups.
12907             Propagation group is a set of all edges, opposite to one (main)
12908             edge of this group directly or through other opposite edges.
12909             Notion of Opposite Edge make sense only on quadrangle face.
12910
12911             Parameters:
12912                 theShape Shape to build propagation groups on.
12913                 theName Object name; when specified, this parameter is used
12914                         for result publication in the study. Otherwise, if automatic
12915                         publication is switched on, default value is used for result name.
12916
12917             Returns:
12918                 List of GEOM.GEOM_Object, each of them is a propagation group.
12919             """
12920             # Example: see GEOM_TestOthers.py
12921             listChains = self.BlocksOp.Propagate(theShape)
12922             RaiseIfFailed("Propagate", self.BlocksOp)
12923             self._autoPublish(listChains, theName, "propagate")
12924             return listChains
12925
12926         # end of l3_blocks_op
12927         ## @}
12928
12929         ## @addtogroup l3_groups
12930         ## @{
12931
12932         ## Creates a new group which will store sub-shapes of theMainShape
12933         #  @param theMainShape is a GEOM object on which the group is selected
12934         #  @param theShapeType defines a shape type of the group (see GEOM::shape_type)
12935         #  @param theName Object name; when specified, this parameter is used
12936         #         for result publication in the study. Otherwise, if automatic
12937         #         publication is switched on, default value is used for result name.
12938         #
12939         #  @return a newly created GEOM group (GEOM.GEOM_Object)
12940         #
12941         #  @ref tui_working_with_groups_page "Example 1"
12942         #  \n @ref swig_CreateGroup "Example 2"
12943         @ManageTransactions("GroupOp")
12944         def CreateGroup(self, theMainShape, theShapeType, theName=None):
12945             """
12946             Creates a new group which will store sub-shapes of theMainShape
12947
12948             Parameters:
12949                theMainShape is a GEOM object on which the group is selected
12950                theShapeType defines a shape type of the group:"COMPOUND", "COMPSOLID",
12951                             "SOLID", "SHELL", "FACE", "WIRE", "EDGE", "VERTEX", "SHAPE".
12952                 theName Object name; when specified, this parameter is used
12953                         for result publication in the study. Otherwise, if automatic
12954                         publication is switched on, default value is used for result name.
12955
12956             Returns:
12957                a newly created GEOM group
12958
12959             Example of usage:
12960                 group = geompy.CreateGroup(Box, geompy.ShapeType["FACE"])
12961
12962             """
12963             # Example: see GEOM_TestOthers.py
12964             anObj = self.GroupOp.CreateGroup(theMainShape, theShapeType)
12965             RaiseIfFailed("CreateGroup", self.GroupOp)
12966             self._autoPublish(anObj, theName, "group")
12967             return anObj
12968
12969         ## Adds a sub-object with ID theSubShapeId to the group
12970         #  @param theGroup is a GEOM group to which the new sub-shape is added
12971         #  @param theSubShapeID is a sub-shape ID in the main object.
12972         #  \note Use method GetSubShapeID() to get an unique ID of the sub-shape
12973         #
12974         #  @ref tui_working_with_groups_page "Example"
12975         @ManageTransactions("GroupOp")
12976         def AddObject(self,theGroup, theSubShapeID):
12977             """
12978             Adds a sub-object with ID theSubShapeId to the group
12979
12980             Parameters:
12981                 theGroup       is a GEOM group to which the new sub-shape is added
12982                 theSubShapeID  is a sub-shape ID in the main object.
12983
12984             Note:
12985                 Use method GetSubShapeID() to get an unique ID of the sub-shape
12986             """
12987             # Example: see GEOM_TestOthers.py
12988             self.GroupOp.AddObject(theGroup, theSubShapeID)
12989             if self.GroupOp.GetErrorCode() != "PAL_ELEMENT_ALREADY_PRESENT":
12990                 RaiseIfFailed("AddObject", self.GroupOp)
12991                 pass
12992             pass
12993
12994         ## Removes a sub-object with ID \a theSubShapeId from the group
12995         #  @param theGroup is a GEOM group from which the new sub-shape is removed
12996         #  @param theSubShapeID is a sub-shape ID in the main object.
12997         #  \note Use method GetSubShapeID() to get an unique ID of the sub-shape
12998         #
12999         #  @ref tui_working_with_groups_page "Example"
13000         @ManageTransactions("GroupOp")
13001         def RemoveObject(self,theGroup, theSubShapeID):
13002             """
13003             Removes a sub-object with ID theSubShapeId from the group
13004
13005             Parameters:
13006                 theGroup is a GEOM group from which the new sub-shape is removed
13007                 theSubShapeID is a sub-shape ID in the main object.
13008
13009             Note:
13010                 Use method GetSubShapeID() to get an unique ID of the sub-shape
13011             """
13012             # Example: see GEOM_TestOthers.py
13013             self.GroupOp.RemoveObject(theGroup, theSubShapeID)
13014             RaiseIfFailed("RemoveObject", self.GroupOp)
13015             pass
13016
13017         ## Adds to the group all the given shapes. No errors, if some shapes are alredy included.
13018         #  @param theGroup is a GEOM group to which the new sub-shapes are added.
13019         #  @param theSubShapes is a list of sub-shapes to be added.
13020         #
13021         #  @ref tui_working_with_groups_page "Example"
13022         @ManageTransactions("GroupOp")
13023         def UnionList (self,theGroup, theSubShapes):
13024             """
13025             Adds to the group all the given shapes. No errors, if some shapes are alredy included.
13026
13027             Parameters:
13028                 theGroup is a GEOM group to which the new sub-shapes are added.
13029                 theSubShapes is a list of sub-shapes to be added.
13030             """
13031             # Example: see GEOM_TestOthers.py
13032             self.GroupOp.UnionList(theGroup, theSubShapes)
13033             RaiseIfFailed("UnionList", self.GroupOp)
13034             pass
13035
13036         ## Adds to the group all the given shapes. No errors, if some shapes are alredy included.
13037         #  @param theGroup is a GEOM group to which the new sub-shapes are added.
13038         #  @param theSubShapes is a list of indices of sub-shapes to be added.
13039         #
13040         #  @ref swig_UnionIDs "Example"
13041         @ManageTransactions("GroupOp")
13042         def UnionIDs(self,theGroup, theSubShapes):
13043             """
13044             Adds to the group all the given shapes. No errors, if some shapes are alredy included.
13045
13046             Parameters:
13047                 theGroup is a GEOM group to which the new sub-shapes are added.
13048                 theSubShapes is a list of indices of sub-shapes to be added.
13049             """
13050             # Example: see GEOM_TestOthers.py
13051             self.GroupOp.UnionIDs(theGroup, theSubShapes)
13052             RaiseIfFailed("UnionIDs", self.GroupOp)
13053             pass
13054
13055         ## Removes from the group all the given shapes. No errors, if some shapes are not included.
13056         #  @param theGroup is a GEOM group from which the sub-shapes are removed.
13057         #  @param theSubShapes is a list of sub-shapes to be removed.
13058         #
13059         #  @ref tui_working_with_groups_page "Example"
13060         @ManageTransactions("GroupOp")
13061         def DifferenceList (self,theGroup, theSubShapes):
13062             """
13063             Removes from the group all the given shapes. No errors, if some shapes are not included.
13064
13065             Parameters:
13066                 theGroup is a GEOM group from which the sub-shapes are removed.
13067                 theSubShapes is a list of sub-shapes to be removed.
13068             """
13069             # Example: see GEOM_TestOthers.py
13070             self.GroupOp.DifferenceList(theGroup, theSubShapes)
13071             RaiseIfFailed("DifferenceList", self.GroupOp)
13072             pass
13073
13074         ## Removes from the group all the given shapes. No errors, if some shapes are not included.
13075         #  @param theGroup is a GEOM group from which the sub-shapes are removed.
13076         #  @param theSubShapes is a list of indices of sub-shapes to be removed.
13077         #
13078         #  @ref swig_DifferenceIDs "Example"
13079         @ManageTransactions("GroupOp")
13080         def DifferenceIDs(self,theGroup, theSubShapes):
13081             """
13082             Removes from the group all the given shapes. No errors, if some shapes are not included.
13083
13084             Parameters:
13085                 theGroup is a GEOM group from which the sub-shapes are removed.
13086                 theSubShapes is a list of indices of sub-shapes to be removed.
13087             """
13088             # Example: see GEOM_TestOthers.py
13089             self.GroupOp.DifferenceIDs(theGroup, theSubShapes)
13090             RaiseIfFailed("DifferenceIDs", self.GroupOp)
13091             pass
13092
13093         ## Union of two groups.
13094         #  New group is created. It will contain all entities
13095         #  which are present in groups theGroup1 and theGroup2.
13096         #  @param theGroup1, theGroup2 are the initial GEOM groups
13097         #                              to create the united group from.
13098         #  @param theName Object name; when specified, this parameter is used
13099         #         for result publication in the study. Otherwise, if automatic
13100         #         publication is switched on, default value is used for result name.
13101         #
13102         #  @return a newly created GEOM group.
13103         #
13104         #  @ref tui_union_groups_anchor "Example"
13105         @ManageTransactions("GroupOp")
13106         def UnionGroups (self, theGroup1, theGroup2, theName=None):
13107             """
13108             Union of two groups.
13109             New group is created. It will contain all entities
13110             which are present in groups theGroup1 and theGroup2.
13111
13112             Parameters:
13113                 theGroup1, theGroup2 are the initial GEOM groups
13114                                      to create the united group from.
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                 a newly created GEOM group.
13121             """
13122             # Example: see GEOM_TestOthers.py
13123             aGroup = self.GroupOp.UnionGroups(theGroup1, theGroup2)
13124             RaiseIfFailed("UnionGroups", self.GroupOp)
13125             self._autoPublish(aGroup, theName, "group")
13126             return aGroup
13127
13128         ## Intersection of two groups.
13129         #  New group is created. It will contain only those entities
13130         #  which are present in both groups theGroup1 and theGroup2.
13131         #  @param theGroup1, theGroup2 are the initial GEOM groups to get common part of.
13132         #  @param theName Object name; when specified, this parameter is used
13133         #         for result publication in the study. Otherwise, if automatic
13134         #         publication is switched on, default value is used for result name.
13135         #
13136         #  @return a newly created GEOM group.
13137         #
13138         #  @ref tui_intersect_groups_anchor "Example"
13139         @ManageTransactions("GroupOp")
13140         def IntersectGroups (self, theGroup1, theGroup2, theName=None):
13141             """
13142             Intersection of two groups.
13143             New group is created. It will contain only those entities
13144             which are present in both groups theGroup1 and theGroup2.
13145
13146             Parameters:
13147                 theGroup1, theGroup2 are the initial GEOM groups to get common part of.
13148                 theName Object name; when specified, this parameter is used
13149                         for result publication in the study. Otherwise, if automatic
13150                         publication is switched on, default value is used for result name.
13151
13152             Returns:
13153                 a newly created GEOM group.
13154             """
13155             # Example: see GEOM_TestOthers.py
13156             aGroup = self.GroupOp.IntersectGroups(theGroup1, theGroup2)
13157             RaiseIfFailed("IntersectGroups", self.GroupOp)
13158             self._autoPublish(aGroup, theName, "group")
13159             return aGroup
13160
13161         ## Cut of two groups.
13162         #  New group is created. It will contain entities which are
13163         #  present in group theGroup1 but are not present in group theGroup2.
13164         #  @param theGroup1 is a GEOM group to include elements of.
13165         #  @param theGroup2 is a GEOM group to exclude elements of.
13166         #  @param theName Object name; when specified, this parameter is used
13167         #         for result publication in the study. Otherwise, if automatic
13168         #         publication is switched on, default value is used for result name.
13169         #
13170         #  @return a newly created GEOM group.
13171         #
13172         #  @ref tui_cut_groups_anchor "Example"
13173         @ManageTransactions("GroupOp")
13174         def CutGroups (self, theGroup1, theGroup2, theName=None):
13175             """
13176             Cut of two groups.
13177             New group is created. It will contain entities which are
13178             present in group theGroup1 but are not present in group theGroup2.
13179
13180             Parameters:
13181                 theGroup1 is a GEOM group to include elements of.
13182                 theGroup2 is a GEOM group to exclude elements of.
13183                 theName Object name; when specified, this parameter is used
13184                         for result publication in the study. Otherwise, if automatic
13185                         publication is switched on, default value is used for result name.
13186
13187             Returns:
13188                 a newly created GEOM group.
13189             """
13190             # Example: see GEOM_TestOthers.py
13191             aGroup = self.GroupOp.CutGroups(theGroup1, theGroup2)
13192             RaiseIfFailed("CutGroups", self.GroupOp)
13193             self._autoPublish(aGroup, theName, "group")
13194             return aGroup
13195
13196         ## Union of list of groups.
13197         #  New group is created. It will contain all entities that are
13198         #  present in groups listed in theGList.
13199         #  @param theGList is a list of GEOM groups to create the united group from.
13200         #  @param theName Object name; when specified, this parameter is used
13201         #         for result publication in the study. Otherwise, if automatic
13202         #         publication is switched on, default value is used for result name.
13203         #
13204         #  @return a newly created GEOM group.
13205         #
13206         #  @ref tui_union_groups_anchor "Example"
13207         @ManageTransactions("GroupOp")
13208         def UnionListOfGroups (self, theGList, theName=None):
13209             """
13210             Union of list of groups.
13211             New group is created. It will contain all entities that are
13212             present in groups listed in theGList.
13213
13214             Parameters:
13215                 theGList is a list of GEOM groups to create the united group from.
13216                 theName Object name; when specified, this parameter is used
13217                         for result publication in the study. Otherwise, if automatic
13218                         publication is switched on, default value is used for result name.
13219
13220             Returns:
13221                 a newly created GEOM group.
13222             """
13223             # Example: see GEOM_TestOthers.py
13224             aGroup = self.GroupOp.UnionListOfGroups(theGList)
13225             RaiseIfFailed("UnionListOfGroups", self.GroupOp)
13226             self._autoPublish(aGroup, theName, "group")
13227             return aGroup
13228
13229         ## Cut of lists of groups.
13230         #  New group is created. It will contain only entities
13231         #  which are present in groups listed in theGList.
13232         #  @param theGList is a list of GEOM groups to include elements of.
13233         #  @param theName Object name; when specified, this parameter is used
13234         #         for result publication in the study. Otherwise, if automatic
13235         #         publication is switched on, default value is used for result name.
13236         #
13237         #  @return a newly created GEOM group.
13238         #
13239         #  @ref tui_intersect_groups_anchor "Example"
13240         @ManageTransactions("GroupOp")
13241         def IntersectListOfGroups (self, theGList, theName=None):
13242             """
13243             Cut of lists of groups.
13244             New group is created. It will contain only entities
13245             which are present in groups listed in theGList.
13246
13247             Parameters:
13248                 theGList is a list of GEOM groups to include elements of.
13249                 theName Object name; when specified, this parameter is used
13250                         for result publication in the study. Otherwise, if automatic
13251                         publication is switched on, default value is used for result name.
13252
13253             Returns:
13254                 a newly created GEOM group.
13255             """
13256             # Example: see GEOM_TestOthers.py
13257             aGroup = self.GroupOp.IntersectListOfGroups(theGList)
13258             RaiseIfFailed("IntersectListOfGroups", self.GroupOp)
13259             self._autoPublish(aGroup, theName, "group")
13260             return aGroup
13261
13262         ## Cut of lists of groups.
13263         #  New group is created. It will contain only entities
13264         #  which are present in groups listed in theGList1 but
13265         #  are not present in groups from theGList2.
13266         #  @param theGList1 is a list of GEOM groups to include elements of.
13267         #  @param theGList2 is a list of GEOM groups to exclude elements of.
13268         #  @param theName Object name; when specified, this parameter is used
13269         #         for result publication in the study. Otherwise, if automatic
13270         #         publication is switched on, default value is used for result name.
13271         #
13272         #  @return a newly created GEOM group.
13273         #
13274         #  @ref tui_cut_groups_anchor "Example"
13275         @ManageTransactions("GroupOp")
13276         def CutListOfGroups (self, theGList1, theGList2, theName=None):
13277             """
13278             Cut of lists of groups.
13279             New group is created. It will contain only entities
13280             which are present in groups listed in theGList1 but
13281             are not present in groups from theGList2.
13282
13283             Parameters:
13284                 theGList1 is a list of GEOM groups to include elements of.
13285                 theGList2 is a list of GEOM groups to exclude elements of.
13286                 theName Object name; when specified, this parameter is used
13287                         for result publication in the study. Otherwise, if automatic
13288                         publication is switched on, default value is used for result name.
13289
13290             Returns:
13291                 a newly created GEOM group.
13292             """
13293             # Example: see GEOM_TestOthers.py
13294             aGroup = self.GroupOp.CutListOfGroups(theGList1, theGList2)
13295             RaiseIfFailed("CutListOfGroups", self.GroupOp)
13296             self._autoPublish(aGroup, theName, "group")
13297             return aGroup
13298
13299         ## Returns a list of sub-objects ID stored in the group
13300         #  @param theGroup is a GEOM group for which a list of IDs is requested
13301         #
13302         #  @ref swig_GetObjectIDs "Example"
13303         @ManageTransactions("GroupOp")
13304         def GetObjectIDs(self,theGroup):
13305             """
13306             Returns a list of sub-objects ID stored in the group
13307
13308             Parameters:
13309                 theGroup is a GEOM group for which a list of IDs is requested
13310             """
13311             # Example: see GEOM_TestOthers.py
13312             ListIDs = self.GroupOp.GetObjects(theGroup)
13313             RaiseIfFailed("GetObjects", self.GroupOp)
13314             return ListIDs
13315
13316         ## Returns a type of sub-objects stored in the group
13317         #  @param theGroup is a GEOM group which type is returned.
13318         #
13319         #  @ref swig_GetType "Example"
13320         @ManageTransactions("GroupOp")
13321         def GetType(self,theGroup):
13322             """
13323             Returns a type of sub-objects stored in the group
13324
13325             Parameters:
13326                 theGroup is a GEOM group which type is returned.
13327             """
13328             # Example: see GEOM_TestOthers.py
13329             aType = self.GroupOp.GetType(theGroup)
13330             RaiseIfFailed("GetType", self.GroupOp)
13331             return aType
13332
13333         ## Convert a type of geom object from id to string value
13334         #  @param theId is a GEOM object type id.
13335         #  @return type of geom object (POINT, VECTOR, PLANE, LINE, TORUS, ... )
13336         #  @ref swig_GetType "Example"
13337         def ShapeIdToType(self, theId):
13338             """
13339             Convert a type of geom object from id to string value
13340
13341             Parameters:
13342                 theId is a GEOM object type id.
13343
13344             Returns:
13345                 type of geom object (POINT, VECTOR, PLANE, LINE, TORUS, ... )
13346             """
13347             if theId == 0:
13348                 return "COPY"
13349             if theId == 1:
13350                 return "IMPORT"
13351             if theId == 2:
13352                 return "POINT"
13353             if theId == 3:
13354                 return "VECTOR"
13355             if theId == 4:
13356                 return "PLANE"
13357             if theId == 5:
13358                 return "LINE"
13359             if theId == 6:
13360                 return "TORUS"
13361             if theId == 7:
13362                 return "BOX"
13363             if theId == 8:
13364                 return "CYLINDER"
13365             if theId == 9:
13366                 return "CONE"
13367             if theId == 10:
13368                 return "SPHERE"
13369             if theId == 11:
13370                 return "PRISM"
13371             if theId == 12:
13372                 return "REVOLUTION"
13373             if theId == 13:
13374                 return "BOOLEAN"
13375             if theId == 14:
13376                 return "PARTITION"
13377             if theId == 15:
13378                 return "POLYLINE"
13379             if theId == 16:
13380                 return "CIRCLE"
13381             if theId == 17:
13382                 return "SPLINE"
13383             if theId == 18:
13384                 return "ELLIPSE"
13385             if theId == 19:
13386                 return "CIRC_ARC"
13387             if theId == 20:
13388                 return "FILLET"
13389             if theId == 21:
13390                 return "CHAMFER"
13391             if theId == 22:
13392                 return "EDGE"
13393             if theId == 23:
13394                 return "WIRE"
13395             if theId == 24:
13396                 return "FACE"
13397             if theId == 25:
13398                 return "SHELL"
13399             if theId == 26:
13400                 return "SOLID"
13401             if theId == 27:
13402                 return "COMPOUND"
13403             if theId == 28:
13404                 return "SUBSHAPE"
13405             if theId == 29:
13406                 return "PIPE"
13407             if theId == 30:
13408                 return "ARCHIMEDE"
13409             if theId == 31:
13410                 return "FILLING"
13411             if theId == 32:
13412                 return "EXPLODE"
13413             if theId == 33:
13414                 return "GLUED"
13415             if theId == 34:
13416                 return "SKETCHER"
13417             if theId == 35:
13418                 return "CDG"
13419             if theId == 36:
13420                 return "FREE_BOUNDS"
13421             if theId == 37:
13422                 return "GROUP"
13423             if theId == 38:
13424                 return "BLOCK"
13425             if theId == 39:
13426                 return "MARKER"
13427             if theId == 40:
13428                 return "THRUSECTIONS"
13429             if theId == 41:
13430                 return "COMPOUNDFILTER"
13431             if theId == 42:
13432                 return "SHAPES_ON_SHAPE"
13433             if theId == 43:
13434                 return "ELLIPSE_ARC"
13435             if theId == 44:
13436                 return "3DSKETCHER"
13437             if theId == 45:
13438                 return "FILLET_2D"
13439             if theId == 46:
13440                 return "FILLET_1D"
13441             if theId == 201:
13442                 return "PIPETSHAPE"
13443             return "Shape Id not exist."
13444
13445         ## Returns a main shape associated with the group
13446         #  @param theGroup is a GEOM group for which a main shape object is requested
13447         #  @return a GEOM object which is a main shape for theGroup
13448         #
13449         #  @ref swig_GetMainShape "Example"
13450         @ManageTransactions("GroupOp")
13451         def GetMainShape(self,theGroup):
13452             """
13453             Returns a main shape associated with the group
13454
13455             Parameters:
13456                 theGroup is a GEOM group for which a main shape object is requested
13457
13458             Returns:
13459                 a GEOM object which is a main shape for theGroup
13460
13461             Example of usage: BoxCopy = geompy.GetMainShape(CreateGroup)
13462             """
13463             # Example: see GEOM_TestOthers.py
13464             anObj = self.GroupOp.GetMainShape(theGroup)
13465             RaiseIfFailed("GetMainShape", self.GroupOp)
13466             return anObj
13467
13468         ## Create group of edges of theShape, whose length is in range [min_length, max_length].
13469         #  If include_min/max == 0, edges with length == min/max_length will not be included in result.
13470         #  @param theShape given shape (see GEOM.GEOM_Object)
13471         #  @param min_length minimum length of edges of theShape
13472         #  @param max_length maximum length of edges of theShape
13473         #  @param include_max indicating if edges with length == max_length should be included in result, 1-yes, 0-no (default=1)
13474         #  @param include_min indicating if edges with length == min_length should be included in result, 1-yes, 0-no (default=1)
13475         #  @param theName Object name; when specified, this parameter is used
13476         #         for result publication in the study. Otherwise, if automatic
13477         #         publication is switched on, default value is used for result name.
13478         #
13479         #  @return a newly created GEOM group of edges
13480         #
13481         #  @@ref swig_todo "Example"
13482         def GetEdgesByLength (self, theShape, min_length, max_length, include_min = 1, include_max = 1, theName=None):
13483             """
13484             Create group of edges of theShape, whose length is in range [min_length, max_length].
13485             If include_min/max == 0, edges with length == min/max_length will not be included in result.
13486
13487             Parameters:
13488                 theShape given shape
13489                 min_length minimum length of edges of theShape
13490                 max_length maximum length of edges of theShape
13491                 include_max indicating if edges with length == max_length should be included in result, 1-yes, 0-no (default=1)
13492                 include_min indicating if edges with length == min_length should be included in result, 1-yes, 0-no (default=1)
13493                 theName Object name; when specified, this parameter is used
13494                         for result publication in the study. Otherwise, if automatic
13495                         publication is switched on, default value is used for result name.
13496
13497              Returns:
13498                 a newly created GEOM group of edges.
13499             """
13500             edges = self.SubShapeAll(theShape, self.ShapeType["EDGE"])
13501             edges_in_range = []
13502             for edge in edges:
13503                 Props = self.BasicProperties(edge)
13504                 if min_length <= Props[0] and Props[0] <= max_length:
13505                     if (not include_min) and (min_length == Props[0]):
13506                         skip = 1
13507                     else:
13508                         if (not include_max) and (Props[0] == max_length):
13509                             skip = 1
13510                         else:
13511                             edges_in_range.append(edge)
13512
13513             if len(edges_in_range) <= 0:
13514                 print("No edges found by given criteria")
13515                 return None
13516
13517             # note: auto-publishing is done in self.CreateGroup()
13518             group_edges = self.CreateGroup(theShape, self.ShapeType["EDGE"], theName)
13519             self.UnionList(group_edges, edges_in_range)
13520
13521             return group_edges
13522
13523         ## Create group of edges of selected shape, whose length is in range [min_length, max_length].
13524         #  If include_min/max == 0, edges with length == min/max_length will not be included in result.
13525         #  @param min_length minimum length of edges of selected shape
13526         #  @param max_length maximum length of edges of selected shape
13527         #  @param include_max indicating if edges with length == max_length should be included in result, 1-yes, 0-no (default=1)
13528         #  @param include_min indicating if edges with length == min_length should be included in result, 1-yes, 0-no (default=1)
13529         #  @return a newly created GEOM group of edges
13530         #  @ref swig_todo "Example"
13531         def SelectEdges (self, min_length, max_length, include_min = 1, include_max = 1):
13532             """
13533             Create group of edges of selected shape, whose length is in range [min_length, max_length].
13534             If include_min/max == 0, edges with length == min/max_length will not be included in result.
13535
13536             Parameters:
13537                 min_length minimum length of edges of selected shape
13538                 max_length maximum length of edges of selected shape
13539                 include_max indicating if edges with length == max_length should be included in result, 1-yes, 0-no (default=1)
13540                 include_min indicating if edges with length == min_length should be included in result, 1-yes, 0-no (default=1)
13541
13542              Returns:
13543                 a newly created GEOM group of edges.
13544             """
13545             nb_selected = sg.SelectedCount()
13546             if nb_selected < 1:
13547                 print("Select a shape before calling this function, please.")
13548                 return 0
13549             if nb_selected > 1:
13550                 print("Only one shape must be selected")
13551                 return 0
13552
13553             id_shape = sg.getSelected(0)
13554             shape = IDToObject( id_shape )
13555
13556             group_edges = self.GetEdgesByLength(shape, min_length, max_length, include_min, include_max)
13557
13558             left_str  = " < "
13559             right_str = " < "
13560             if include_min: left_str  = " <= "
13561             if include_max: right_str  = " <= "
13562
13563             self.addToStudyInFather(shape, group_edges, "Group of edges with " + repr(min_length)
13564                                     + left_str + "length" + right_str + repr(max_length))
13565
13566             sg.updateObjBrowser()
13567
13568             return group_edges
13569
13570         # end of l3_groups
13571         ## @}
13572
13573         #@@ insert new functions before this line @@ do not remove this line @@#
13574
13575         ## Create a copy of the given object
13576         #
13577         #  @param theOriginal geometry object for copy
13578         #  @param theName Object name; when specified, this parameter is used
13579         #         for result publication in the study. Otherwise, if automatic
13580         #         publication is switched on, default value is used for result name.
13581         #
13582         #  @return New GEOM_Object, containing the copied shape.
13583         #
13584         #  @ingroup l1_geomBuilder_auxiliary
13585         #  @ref swig_MakeCopy "Example"
13586         @ManageTransactions("InsertOp")
13587         def MakeCopy(self, theOriginal, theName=None):
13588             """
13589             Create a copy of the given object
13590
13591             Parameters:
13592                 theOriginal geometry object for copy
13593                 theName Object name; when specified, this parameter is used
13594                         for result publication in the study. Otherwise, if automatic
13595                         publication is switched on, default value is used for result name.
13596
13597             Returns:
13598                 New GEOM_Object, containing the copied shape.
13599
13600             Example of usage: Copy = geompy.MakeCopy(Box)
13601             """
13602             # Example: see GEOM_TestAll.py
13603             anObj = self.InsertOp.MakeCopy(theOriginal)
13604             RaiseIfFailed("MakeCopy", self.InsertOp)
13605             self._autoPublish(anObj, theName, "copy")
13606             return anObj
13607
13608         ## Add Path to load python scripts from
13609         #  @param Path a path to load python scripts from
13610         #  @ingroup l1_geomBuilder_auxiliary
13611         def addPath(self,Path):
13612             """
13613             Add Path to load python scripts from
13614
13615             Parameters:
13616                 Path a path to load python scripts from
13617             """
13618             if (sys.path.count(Path) < 1):
13619                 sys.path.append(Path)
13620                 pass
13621             pass
13622
13623         ## Load marker texture from the file
13624         #  @param Path a path to the texture file
13625         #  @return unique texture identifier
13626         #  @ingroup l1_geomBuilder_auxiliary
13627         @ManageTransactions("InsertOp")
13628         def LoadTexture(self, Path):
13629             """
13630             Load marker texture from the file
13631
13632             Parameters:
13633                 Path a path to the texture file
13634
13635             Returns:
13636                 unique texture identifier
13637             """
13638             # Example: see GEOM_TestAll.py
13639             ID = self.InsertOp.LoadTexture(Path)
13640             RaiseIfFailed("LoadTexture", self.InsertOp)
13641             return ID
13642
13643         ## Get internal name of the object based on its study entry
13644         #  @note This method does not provide an unique identifier of the geometry object.
13645         #  @note This is internal function of GEOM component, though it can be used outside it for
13646         #  appropriate reason (e.g. for identification of geometry object).
13647         #  @param obj geometry object
13648         #  @return unique object identifier
13649         #  @ingroup l1_geomBuilder_auxiliary
13650         def getObjectID(self, obj):
13651             """
13652             Get internal name of the object based on its study entry.
13653             Note: this method does not provide an unique identifier of the geometry object.
13654             It is an internal function of GEOM component, though it can be used outside GEOM for
13655             appropriate reason (e.g. for identification of geometry object).
13656
13657             Parameters:
13658                 obj geometry object
13659
13660             Returns:
13661                 unique object identifier
13662             """
13663             ID = ""
13664             entry = salome.ObjectToID(obj)
13665             if entry is not None:
13666                 lst = entry.split(":")
13667                 if len(lst) > 0:
13668                     ID = lst[-1] # -1 means last item in the list
13669                     return "GEOM_" + ID
13670             return ID
13671
13672
13673
13674         ## Add marker texture. @a Width and @a Height parameters
13675         #  specify width and height of the texture in pixels.
13676         #  If @a RowData is @c True, @a Texture parameter should represent texture data
13677         #  packed into the byte array. If @a RowData is @c False (default), @a Texture
13678         #  parameter should be unpacked string, in which '1' symbols represent opaque
13679         #  pixels and '0' represent transparent pixels of the texture bitmap.
13680         #
13681         #  @param Width texture width in pixels
13682         #  @param Height texture height in pixels
13683         #  @param Texture texture data
13684         #  @param RowData if @c True, @a Texture data are packed in the byte stream
13685         #  @return unique texture identifier
13686         #  @ingroup l1_geomBuilder_auxiliary
13687         @ManageTransactions("InsertOp")
13688         def AddTexture(self, Width, Height, Texture, RowData=False):
13689             """
13690             Add marker texture. Width and Height parameters
13691             specify width and height of the texture in pixels.
13692             If RowData is True, Texture parameter should represent texture data
13693             packed into the byte array. If RowData is False (default), Texture
13694             parameter should be unpacked string, in which '1' symbols represent opaque
13695             pixels and '0' represent transparent pixels of the texture bitmap.
13696
13697             Parameters:
13698                 Width texture width in pixels
13699                 Height texture height in pixels
13700                 Texture texture data
13701                 RowData if True, Texture data are packed in the byte stream
13702
13703             Returns:
13704                 return unique texture identifier
13705             """
13706             if not RowData: Texture = PackData(Texture)
13707             ID = self.InsertOp.AddTexture(Width, Height, Texture)
13708             RaiseIfFailed("AddTexture", self.InsertOp)
13709             return ID
13710
13711         ## Transfer not topological data from one GEOM object to another.
13712         #
13713         #  @param theObjectFrom the source object of non-topological data
13714         #  @param theObjectTo the destination object of non-topological data
13715         #  @param theFindMethod method to search sub-shapes of theObjectFrom
13716         #         in shape theObjectTo. Possible values are: GEOM.FSM_GetInPlace,
13717         #         GEOM.FSM_GetInPlaceByHistory and GEOM.FSM_GetInPlace_Old.
13718         #         Other values of GEOM.find_shape_method are not supported.
13719         #
13720         #  @return True in case of success; False otherwise.
13721         #
13722         #  @ingroup l1_geomBuilder_auxiliary
13723         #
13724         #  @ref swig_TransferData "Example"
13725         @ManageTransactions("InsertOp")
13726         def TransferData(self, theObjectFrom, theObjectTo,
13727                          theFindMethod=GEOM.FSM_GetInPlace):
13728             """
13729             Transfer not topological data from one GEOM object to another.
13730
13731             Parameters:
13732                 theObjectFrom the source object of non-topological data
13733                 theObjectTo the destination object of non-topological data
13734                 theFindMethod method to search sub-shapes of theObjectFrom
13735                               in shape theObjectTo. Possible values are:
13736                               GEOM.FSM_GetInPlace, GEOM.FSM_GetInPlaceByHistory
13737                               and GEOM.FSM_GetInPlace_Old. Other values of
13738                               GEOM.find_shape_method are not supported.
13739
13740             Returns:
13741                 True in case of success; False otherwise.
13742
13743             # Example: see GEOM_TestOthers.py
13744             """
13745             # Example: see GEOM_TestAll.py
13746             isOk = self.InsertOp.TransferData(theObjectFrom,
13747                                                theObjectTo, theFindMethod)
13748             RaiseIfFailed("TransferData", self.InsertOp)
13749             return isOk
13750
13751         ## Creates a new folder object. It is a container for any GEOM objects.
13752         #  @param Name name of the container
13753         #  @param Father parent object. If None,
13754         #         folder under 'Geometry' root object will be created.
13755         #  @return a new created folder
13756         #  @ingroup l1_publish_data
13757         def NewFolder(self, Name, Father=None):
13758             """
13759             Create a new folder object. It is an auxiliary container for any GEOM objects.
13760
13761             Parameters:
13762                 Name name of the container
13763                 Father parent object. If None,
13764                 folder under 'Geometry' root object will be created.
13765
13766             Returns:
13767                 a new created folder
13768             """
13769             if not Father: Father = self.father
13770             return self.CreateFolder(Name, Father)
13771
13772         ## Move object to the specified folder
13773         #  @param Object object to move
13774         #  @param Folder target folder
13775         #  @ingroup l1_publish_data
13776         def PutToFolder(self, Object, Folder):
13777             """
13778             Move object to the specified folder
13779
13780             Parameters:
13781                 Object object to move
13782                 Folder target folder
13783             """
13784             self.MoveToFolder(Object, Folder)
13785             pass
13786
13787         ## Move list of objects to the specified folder
13788         #  @param ListOfSO list of objects to move
13789         #  @param Folder target folder
13790         #  @ingroup l1_publish_data
13791         def PutListToFolder(self, ListOfSO, Folder):
13792             """
13793             Move list of objects to the specified folder
13794
13795             Parameters:
13796                 ListOfSO list of objects to move
13797                 Folder target folder
13798             """
13799             self.MoveListToFolder(ListOfSO, Folder)
13800             pass
13801
13802         ## @addtogroup l2_field
13803         ## @{
13804
13805         ## Creates a field
13806         #  @param shape the shape the field lies on
13807         #  @param name the field name
13808         #  @param type type of field data: 0 - bool, 1 - int, 2 - double, 3 - string
13809         #  @param dimension dimension of the shape the field lies on
13810         #         0 - VERTEX, 1 - EDGE, 2 - FACE, 3 - SOLID, -1 - whole shape
13811         #  @param componentNames names of components
13812         #  @return a created field
13813         @ManageTransactions("FieldOp")
13814         def CreateField(self, shape, name, type, dimension, componentNames):
13815             """
13816             Creates a field
13817
13818             Parameters:
13819                 shape the shape the field lies on
13820                 name  the field name
13821                 type  type of field data
13822                 dimension dimension of the shape the field lies on
13823                           0 - VERTEX, 1 - EDGE, 2 - FACE, 3 - SOLID, -1 - whole shape
13824                 componentNames names of components
13825
13826             Returns:
13827                 a created field
13828             """
13829             if isinstance( type, int ):
13830                 if type < 0 or type > 3:
13831                     raise RuntimeError("CreateField : Error: data type must be within [0-3] range")
13832                 type = [GEOM.FDT_Bool,GEOM.FDT_Int,GEOM.FDT_Double,GEOM.FDT_String][type]
13833
13834             f = self.FieldOp.CreateField( shape, name, type, dimension, componentNames)
13835             RaiseIfFailed("CreateField", self.FieldOp)
13836             global geom
13837             geom._autoPublish( f, "", name)
13838             return f
13839
13840         ## Removes a field from the GEOM component
13841         #  @param field the field to remove
13842         def RemoveField(self, field):
13843             "Removes a field from the GEOM component"
13844             global geom
13845             if isinstance( field, GEOM._objref_GEOM_Field ):
13846                 geom.RemoveObject( field )
13847             elif isinstance( field, geomField ):
13848                 geom.RemoveObject( field.field )
13849             else:
13850                 raise RuntimeError("RemoveField() : the object is not a field")
13851             return
13852
13853         ## Returns number of fields on a shape
13854         @ManageTransactions("FieldOp")
13855         def CountFields(self, shape):
13856             "Returns number of fields on a shape"
13857             nb = self.FieldOp.CountFields( shape )
13858             RaiseIfFailed("CountFields", self.FieldOp)
13859             return nb
13860
13861         ## Returns all fields on a shape
13862         @ManageTransactions("FieldOp")
13863         def GetFields(self, shape):
13864             "Returns all fields on a shape"
13865             ff = self.FieldOp.GetFields( shape )
13866             RaiseIfFailed("GetFields", self.FieldOp)
13867             return ff
13868
13869         ## Returns a field on a shape by its name
13870         @ManageTransactions("FieldOp")
13871         def GetField(self, shape, name):
13872             "Returns a field on a shape by its name"
13873             f = self.FieldOp.GetField( shape, name )
13874             RaiseIfFailed("GetField", self.FieldOp)
13875             return f
13876
13877         # end of l2_field
13878         ## @}
13879
13880
13881 # Register the new proxy for GEOM_Gen
13882 omniORB.registerObjref(GEOM._objref_GEOM_Gen._NP_RepositoryId, geomBuilder)
13883
13884
13885 ## Field on Geometry
13886 #  @ingroup l2_field
13887 class geomField( GEOM._objref_GEOM_Field ):
13888
13889     def __init__(self, *args):
13890         GEOM._objref_GEOM_Field.__init__(self, *args)
13891         self.field = GEOM._objref_GEOM_Field
13892         return
13893
13894     ## Returns the shape the field lies on
13895     def getShape(self):
13896         "Returns the shape the field lies on"
13897         return self.field.GetShape(self)
13898
13899     ## Returns the field name
13900     def getName(self):
13901         "Returns the field name"
13902         return self.field.GetName(self)
13903
13904     ## Returns type of field data as integer [0-3]
13905     def getType(self):
13906         "Returns type of field data"
13907         return EnumToLong(self.field.GetDataType(self))
13908
13909     ## Returns type of field data:
13910     #  one of GEOM.FDT_Bool, GEOM.FDT_Int, GEOM.FDT_Double, GEOM.FDT_String
13911     def getTypeEnum(self):
13912         "Returns type of field data"
13913         return self.field.GetDataType(self)
13914
13915     ## Returns dimension of the shape the field lies on:
13916     #  0 - VERTEX, 1 - EDGE, 2 - FACE, 3 - SOLID, -1 - whole shape
13917     def getDimension(self):
13918         """Returns dimension of the shape the field lies on:
13919         0 - VERTEX, 1 - EDGE, 2 - FACE, 3 - SOLID, -1 - whole shape"""
13920         return self.field.GetDimension(self)
13921
13922     ## Returns names of components
13923     def getComponents(self):
13924         "Returns names of components"
13925         return self.field.GetComponents(self)
13926
13927     ## Adds a time step to the field
13928     #  @param step the time step number further used as the step identifier
13929     #  @param stamp the time step time
13930     #  @param values the values of the time step
13931     def addStep(self, step, stamp, values):
13932         "Adds a time step to the field"
13933         stp = self.field.AddStep( self, step, stamp )
13934         if not stp:
13935             raise RuntimeError("Field.addStep() : Error: step %s already exists in this field"%step)
13936         global geom
13937         geom._autoPublish( stp, "", "Step %s, %s"%(step,stamp))
13938         self.setValues( step, values )
13939         return stp
13940
13941     ## Remove a time step from the field
13942     def removeStep(self,step):
13943         "Remove a time step from the field"
13944         stepSO = None
13945         try:
13946             stepObj = self.field.GetStep( self, step )
13947             if stepObj:
13948                 stepSO = geom.myStudy.FindObjectID( stepObj.GetStudyEntry() )
13949         except:
13950             #import traceback
13951             #traceback.print_exc()
13952             pass
13953         self.field.RemoveStep( self, step )
13954         if stepSO:
13955             geom.myBuilder.RemoveObjectWithChildren( stepSO )
13956         return
13957
13958     ## Returns number of time steps in the field
13959     def countSteps(self):
13960         "Returns number of time steps in the field"
13961         return self.field.CountSteps(self)
13962
13963     ## Returns a list of time step IDs in the field
13964     def getSteps(self):
13965         "Returns a list of time step IDs in the field"
13966         return self.field.GetSteps(self)
13967
13968     ## Returns a time step by its ID
13969     def getStep(self,step):
13970         "Returns a time step by its ID"
13971         stp = self.field.GetStep(self, step)
13972         if not stp:
13973             raise RuntimeError("Step %s is missing from this field"%step)
13974         return stp
13975
13976     ## Returns the time of the field step
13977     def getStamp(self,step):
13978         "Returns the time of the field step"
13979         return self.getStep(step).GetStamp()
13980
13981     ## Changes the time of the field step
13982     def setStamp(self, step, stamp):
13983         "Changes the time of the field step"
13984         return self.getStep(step).SetStamp(stamp)
13985
13986     ## Returns values of the field step
13987     def getValues(self, step):
13988         "Returns values of the field step"
13989         return self.getStep(step).GetValues()
13990
13991     ## Changes values of the field step
13992     def setValues(self, step, values):
13993         "Changes values of the field step"
13994         stp = self.getStep(step)
13995         errBeg = "Field.setValues(values) : Error: "
13996         try:
13997             ok = stp.SetValues( values )
13998         except Exception as e:
13999             excStr = str(e)
14000             if excStr.find("WrongPythonType") > 0:
14001                 raise RuntimeError(errBeg +\
14002                       "wrong type of values, %s values are expected"%str(self.getTypeEnum())[4:])
14003             raise RuntimeError(errBeg + str(e))
14004         if not ok:
14005             nbOK = self.field.GetArraySize(self)
14006             nbKO = len(values)
14007             if nbOK != nbKO:
14008                 raise RuntimeError(errBeg + "len(values) must be %s but not %s"%(nbOK,nbKO))
14009             else:
14010                 raise RuntimeError(errBeg + "failed")
14011         return
14012
14013     pass # end of class geomField
14014
14015 # Register the new proxy for GEOM_Field
14016 omniORB.registerObjref(GEOM._objref_GEOM_Field._NP_RepositoryId, geomField)
14017
14018
14019 ## Create a new geomBuilder instance.The geomBuilder class provides the Python
14020 #  interface to GEOM operations.
14021 #
14022 #  Typical use is:
14023 #  \code
14024 #    import salome
14025 #    salome.salome_init()
14026 #    from salome.geom import geomBuilder
14027 #    geompy = geomBuilder.New()
14028 #  \endcode
14029 #  @param  instance  CORBA proxy of GEOM Engine. If None, the default Engine is used.
14030 #  @return geomBuilder instance
14031 def New( instance=None):
14032     """
14033     Create a new geomBuilder instance.The geomBuilder class provides the Python
14034     interface to GEOM operations.
14035
14036     Typical use is:
14037         import salome
14038         salome.salome_init()
14039         from salome.geom import geomBuilder
14040         geompy = geomBuilder.New()
14041
14042     Parameters:
14043         instance  CORBA proxy of GEOM Engine. If None, the default Engine is used.
14044     Returns:
14045         geomBuilder instance
14046     """
14047     #print "New geomBuilder ", study, instance
14048     global engine
14049     global geom
14050     global doLcc
14051     engine = instance
14052     if engine is None:
14053       doLcc = True
14054     geom = geomBuilder()
14055     assert isinstance(geom,geomBuilder), "Geom engine class is %s but should be geomBuilder.geomBuilder. Import geomBuilder before creating the instance."%geom.__class__
14056     geom.init_geom()
14057     return geom
14058
14059
14060 # Register methods from the plug-ins in the geomBuilder class 
14061 plugins_var = os.environ.get( "GEOM_PluginsList" )
14062
14063 plugins = None
14064 if plugins_var is not None:
14065     plugins = plugins_var.split( ":" )
14066     plugins=[x for x in plugins if len(x)>0]
14067 if plugins is not None:
14068     for pluginName in plugins:
14069         pluginBuilderName = pluginName + "Builder"
14070         try:
14071             exec( "from salome.%s.%s import *" % (pluginName, pluginBuilderName))
14072         except Exception as e:
14073             from salome_utils import verbose
14074             print("Exception while loading %s: %s" % ( pluginBuilderName, e ))
14075             continue
14076         exec( "from salome.%s import %s" % (pluginName, pluginBuilderName))
14077         plugin = eval( pluginBuilderName )
14078         
14079         # add methods from plugin module to the geomBuilder class
14080         for k in dir( plugin ):
14081             if k[0] == '_': continue
14082             method = getattr( plugin, k )
14083             if type( method ).__name__ == 'function':
14084                 if not hasattr( geomBuilder, k ):
14085                     setattr( geomBuilder, k, method )
14086                 pass
14087             pass
14088         del pluginName
14089         pass
14090     pass