Salome HOME
Modification of GEOM interface
[modules/geom.git] / src / GEOM_SWIG / geomBuilder.py
1 #  -*- coding: iso-8859-1 -*-
2 # Copyright (C) 2007-2019  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 Third 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 Third 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 theTopRightPoint Point, specifying top right corner of a quadrangle
5675         #  @param theBottomLeftPoint Point, specifying bottom left corner of a quadrangle
5676         #  @param theBottomRightPoint 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, theTopRightPoint,
5688                                   theBottomLeftPoint, theBottomRightPoint, 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                 theTopRightPoint Point, specifying top right corner of a quadrangle
5698                 theBottomLeftPoint Point, specifying bottom left corner of a quadrangle
5699                 theBottomRightPoint 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, theTopRightPoint,
5711                                                         theBottomLeftPoint, theBottomRightPoint, 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 theTopRightPoint Point, specifying top right corner of a quadrangle
5722         #  @param theBottomLeftPoint Point, specifying bottom left corner of a quadrangle
5723         #  @param theBottomRightPoint 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, theTopRightPoint,
5732                                      theBottomLeftPoint, theBottomRightPoint, 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                 theTopRightPoint Point, specifying top right corner of a quadrangle
5742                 theBottomLeftPoint Point, specifying bottom left corner of a quadrangle
5743                 theBottomRightPoint 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, theTopRightPoint,
5753                                                            theBottomLeftPoint, theBottomRightPoint, 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         ## A sort of GetInPlace functionality, returning IDs of sub-shapes.
6042         #  For each sub-shape ID of @a theShapeWhat return a list of corresponding sub-shape
6043         #  IDs of @a theShapeWhere.
6044         #  For example, if theShapeWhat is a box and theShapeWhere is this box cut into 
6045         #  two parts by a plane, then the result can be as this: 
6046         #    len( result_list ) = 35,
6047         #    result_list[ 1 ] = [ 2, 36 ], which means that the box  (ID 1) turned into two
6048         #  solids with IDs 2 and 36 within theShapeWhere
6049         #
6050         #  @param theShapeWhere Shape to find sub-shapes of.
6051         #  @param theShapeWhat Shape, specifying what to find.
6052         #  @return List of lists of sub-shape IDS of theShapeWhere.
6053         def GetInPlaceMap(self, theShapeWhere, theShapeWhat):
6054             """
6055             A sort of GetInPlace functionality, returning IDs of sub-shapes.
6056             For each sub-shape ID of @a theShapeWhat return a list of corresponding sub-shape
6057             IDs of @a theShapeWhere.
6058             For example, if theShapeWhat is a box and theShapeWhere is this box cut into 
6059             two parts by a plane, then the result can be as this: 
6060               len( result_list ) = 35,
6061               result_list[ 1 ] = [ 2, 36 ], which means that the box (ID 1) turned into two
6062             solids with IDs 2 and 36 within theShapeWhere
6063
6064             Parameters:
6065                 theShapeWhere Shape to find sub-shapes of.
6066                 theShapeWhat Shape, specifying what to find.
6067
6068             Returns:
6069                 List of lists of sub-shape IDS of theShapeWhere.
6070             """
6071             return self.ShapesOp.GetInPlaceMap(theShapeWhere, theShapeWhat)
6072
6073         ## Get sub-shape of theShapeWhere, which is
6074         #  equal to \a theShapeWhat.
6075         #  @param theShapeWhere Shape to find sub-shape of.
6076         #  @param theShapeWhat Shape, specifying what to find.
6077         #  @param theName Object name; when specified, this parameter is used
6078         #         for result publication in the study. Otherwise, if automatic
6079         #         publication is switched on, default value is used for result name.
6080         #
6081         #  @return New GEOM.GEOM_Object for found sub-shape.
6082         #
6083         #  @ref swig_GetSame "Example"
6084         @ManageTransactions("ShapesOp")
6085         def GetSame(self, theShapeWhere, theShapeWhat, theName=None):
6086             """
6087             Get sub-shape of theShapeWhere, which is
6088             equal to theShapeWhat.
6089
6090             Parameters:
6091                 theShapeWhere Shape to find sub-shape of.
6092                 theShapeWhat Shape, specifying what to find.
6093                 theName Object name; when specified, this parameter is used
6094                         for result publication in the study. Otherwise, if automatic
6095                         publication is switched on, default value is used for result name.
6096
6097             Returns:
6098                 New GEOM.GEOM_Object for found sub-shape.
6099             """
6100             anObj = self.ShapesOp.GetSame(theShapeWhere, theShapeWhat)
6101             RaiseIfFailed("GetSame", self.ShapesOp)
6102             self._autoPublish(anObj, theName, "sameShape")
6103             return anObj
6104
6105
6106         ## Get sub-shape indices of theShapeWhere, which is
6107         #  equal to \a theShapeWhat.
6108         #  @param theShapeWhere Shape to find sub-shape of.
6109         #  @param theShapeWhat Shape, specifying what to find.
6110         #  @return List of all found sub-shapes indices.
6111         #
6112         #  @ref swig_GetSame "Example"
6113         @ManageTransactions("ShapesOp")
6114         def GetSameIDs(self, theShapeWhere, theShapeWhat):
6115             """
6116             Get sub-shape indices of theShapeWhere, which is
6117             equal to theShapeWhat.
6118
6119             Parameters:
6120                 theShapeWhere Shape to find sub-shape of.
6121                 theShapeWhat Shape, specifying what to find.
6122
6123             Returns:
6124                 List of all found sub-shapes indices.
6125             """
6126             anObj = self.ShapesOp.GetSameIDs(theShapeWhere, theShapeWhat)
6127             RaiseIfFailed("GetSameIDs", self.ShapesOp)
6128             return anObj
6129
6130         ## Resize the input edge with the new Min and Max parameters.
6131         #  The input edge parameters range is [0, 1]. If theMin parameter is
6132         #  negative, the input edge is extended, otherwise it is shrinked by
6133         #  theMin parameter. If theMax is greater than 1, the edge is extended,
6134         #  otherwise it is shrinked by theMax parameter.
6135         #  @param theEdge the input edge to be resized.
6136         #  @param theMin the minimal parameter value.
6137         #  @param theMax the maximal parameter value.
6138         #  @param theName Object name; when specified, this parameter is used
6139         #         for result publication in the study. Otherwise, if automatic
6140         #         publication is switched on, default value is used for result name.
6141         #  @return New GEOM.GEOM_Object, containing the created edge.
6142         #
6143         #  @ref tui_extend "Example"
6144         @ManageTransactions("ShapesOp")
6145         def ExtendEdge(self, theEdge, theMin, theMax, theName=None):
6146             """
6147             Resize the input edge with the new Min and Max parameters.
6148             The input edge parameters range is [0, 1]. If theMin parameter is
6149             negative, the input edge is extended, otherwise it is shrinked by
6150             theMin parameter. If theMax is greater than 1, the edge is extended,
6151             otherwise it is shrinked by theMax parameter.
6152
6153             Parameters:
6154                 theEdge the input edge to be resized.
6155                 theMin the minimal parameter value.
6156                 theMax the maximal parameter value.
6157                 theName Object name; when specified, this parameter is used
6158                         for result publication in the study. Otherwise, if automatic
6159                         publication is switched on, default value is used for result name.
6160
6161             Returns:
6162                 New GEOM.GEOM_Object, containing the created edge.
6163             """
6164             theMin, theMax, Parameters = ParseParameters(theMin, theMax)
6165             anObj = self.ShapesOp.ExtendEdge(theEdge, theMin, theMax)
6166             RaiseIfFailed("ExtendEdge", self.ShapesOp)
6167             anObj.SetParameters(Parameters)
6168             self._autoPublish(anObj, theName, "edge")
6169             return anObj
6170
6171         ## Resize the input face with the new UMin, UMax, VMin and VMax
6172         #  parameters. The input face U and V parameters range is [0, 1]. If
6173         #  theUMin parameter is negative, the input face is extended, otherwise
6174         #  it is shrinked along U direction by theUMin parameter. If theUMax is
6175         #  greater than 1, the face is extended, otherwise it is shrinked along
6176         #  U direction by theUMax parameter. So as for theVMin, theVMax and
6177         #  V direction of the input face.
6178         #  @param theFace the input face to be resized.
6179         #  @param theUMin the minimal U parameter value.
6180         #  @param theUMax the maximal U parameter value.
6181         #  @param theVMin the minimal V parameter value.
6182         #  @param theVMax the maximal V parameter value.
6183         #  @param theName Object name; when specified, this parameter is used
6184         #         for result publication in the study. Otherwise, if automatic
6185         #         publication is switched on, default value is used for result name.
6186         #  @return New GEOM.GEOM_Object, containing the created face.
6187         #
6188         #  @ref tui_extend "Example"
6189         @ManageTransactions("ShapesOp")
6190         def ExtendFace(self, theFace, theUMin, theUMax,
6191                        theVMin, theVMax, theName=None):
6192             """
6193             Resize the input face with the new UMin, UMax, VMin and VMax
6194             parameters. The input face U and V parameters range is [0, 1]. If
6195             theUMin parameter is negative, the input face is extended, otherwise
6196             it is shrinked along U direction by theUMin parameter. If theUMax is
6197             greater than 1, the face is extended, otherwise it is shrinked along
6198             U direction by theUMax parameter. So as for theVMin, theVMax and
6199             V direction of the input face.
6200
6201             Parameters:
6202                 theFace the input face to be resized.
6203                 theUMin the minimal U parameter value.
6204                 theUMax the maximal U parameter value.
6205                 theVMin the minimal V parameter value.
6206                 theVMax the maximal V parameter value.
6207                 theName Object name; when specified, this parameter is used
6208                         for result publication in the study. Otherwise, if automatic
6209                         publication is switched on, default value is used for result name.
6210
6211             Returns:
6212                 New GEOM.GEOM_Object, containing the created face.
6213             """
6214             theUMin, theUMax, theVMin, theVMax, Parameters = ParseParameters(theUMin, theUMax, theVMin, theVMax)
6215             anObj = self.ShapesOp.ExtendFace(theFace, theUMin, theUMax,
6216                                              theVMin, theVMax)
6217             RaiseIfFailed("ExtendFace", self.ShapesOp)
6218             anObj.SetParameters(Parameters)
6219             self._autoPublish(anObj, theName, "face")
6220             return anObj
6221
6222         ## This function takes some face as input parameter and creates new
6223         #  GEOM_Object, i.e. topological shape by extracting underlying surface
6224         #  of the source face and limiting it by the Umin, Umax, Vmin, Vmax
6225         #  parameters of the source face (in the parametrical space).
6226         #  @param theFace the input face.
6227         #  @param theName Object name; when specified, this parameter is used
6228         #         for result publication in the study. Otherwise, if automatic
6229         #         publication is switched on, default value is used for result name.
6230         #  @return New GEOM.GEOM_Object, containing the created face.
6231         #
6232         #  @ref tui_creation_surface "Example"
6233         @ManageTransactions("ShapesOp")
6234         def MakeSurfaceFromFace(self, theFace, theName=None):
6235             """
6236             This function takes some face as input parameter and creates new
6237             GEOM_Object, i.e. topological shape by extracting underlying surface
6238             of the source face and limiting it by the Umin, Umax, Vmin, Vmax
6239             parameters of the source face (in the parametrical space).
6240
6241             Parameters:
6242                 theFace the input face.
6243                 theName Object name; when specified, this parameter is used
6244                         for result publication in the study. Otherwise, if automatic
6245                         publication is switched on, default value is used for result name.
6246
6247             Returns:
6248                 New GEOM.GEOM_Object, containing the created face.
6249             """
6250             anObj = self.ShapesOp.MakeSurfaceFromFace(theFace)
6251             RaiseIfFailed("MakeSurfaceFromFace", self.ShapesOp)
6252             self._autoPublish(anObj, theName, "surface")
6253             return anObj
6254
6255         # end of l4_obtain
6256         ## @}
6257
6258         ## @addtogroup l4_access
6259         ## @{
6260
6261         ## Obtain a composite sub-shape of <VAR>aShape</VAR>, composed from sub-shapes
6262         #  of aShape, selected by their unique IDs inside <VAR>aShape</VAR>
6263         #  @param aShape Shape to get sub-shape of.
6264         #  @param ListOfID List of sub-shapes indices.
6265         #  @param theName Object name; when specified, this parameter is used
6266         #         for result publication in the study. Otherwise, if automatic
6267         #         publication is switched on, default value is used for result name.
6268         #
6269         #  @return Found sub-shape.
6270         #
6271         #  @ref swig_all_decompose "Example"
6272         def GetSubShape(self, aShape, ListOfID, theName=None):
6273             """
6274             Obtain a composite sub-shape of aShape, composed from sub-shapes
6275             of aShape, selected by their unique IDs inside aShape
6276
6277             Parameters:
6278                 aShape Shape to get sub-shape of.
6279                 ListOfID List of sub-shapes indices.
6280                 theName Object name; when specified, this parameter is used
6281                         for result publication in the study. Otherwise, if automatic
6282                         publication is switched on, default value is used for result name.
6283
6284             Returns:
6285                 Found sub-shape.
6286             """
6287             # Example: see GEOM_TestAll.py
6288             anObj = self.AddSubShape(aShape,ListOfID)
6289             self._autoPublish(anObj, theName, "subshape")
6290             return anObj
6291
6292         ## Obtain unique ID of sub-shape <VAR>aSubShape</VAR> inside <VAR>aShape</VAR>
6293         #  of aShape, selected by their unique IDs inside <VAR>aShape</VAR>
6294         #  @param aShape Shape to get sub-shape of.
6295         #  @param aSubShape Sub-shapes of aShape.
6296         #  @return ID of found sub-shape.
6297         #
6298         #  @ref swig_all_decompose "Example"
6299         @ManageTransactions("LocalOp")
6300         def GetSubShapeID(self, aShape, aSubShape):
6301             """
6302             Obtain unique ID of sub-shape aSubShape inside aShape
6303             of aShape, selected by their unique IDs inside aShape
6304
6305             Parameters:
6306                aShape Shape to get sub-shape of.
6307                aSubShape Sub-shapes of aShape.
6308
6309             Returns:
6310                ID of found sub-shape.
6311             """
6312             # Example: see GEOM_TestAll.py
6313             anID = self.LocalOp.GetSubShapeIndex(aShape, aSubShape)
6314             RaiseIfFailed("GetSubShapeIndex", self.LocalOp)
6315             return anID
6316
6317         ## Obtain unique IDs of sub-shapes <VAR>aSubShapes</VAR> inside <VAR>aShape</VAR>
6318         #  This function is provided for performance purpose. The complexity is O(n) with n
6319         #  the number of subobjects of aShape
6320         #  @param aShape Shape to get sub-shape of.
6321         #  @param aSubShapes Sub-shapes of aShape.
6322         #  @return list of IDs of found sub-shapes.
6323         #
6324         #  @ref swig_all_decompose "Example"
6325         @ManageTransactions("ShapesOp")
6326         def GetSubShapesIDs(self, aShape, aSubShapes):
6327             """
6328             Obtain a list of IDs of sub-shapes aSubShapes inside aShape
6329             This function is provided for performance purpose. The complexity is O(n) with n
6330             the number of subobjects of aShape
6331
6332             Parameters:
6333                aShape Shape to get sub-shape of.
6334                aSubShapes Sub-shapes of aShape.
6335
6336             Returns:
6337                List of IDs of found sub-shape.
6338             """
6339             # Example: see GEOM_TestAll.py
6340             anIDs = self.ShapesOp.GetSubShapesIndices(aShape, aSubShapes)
6341             RaiseIfFailed("GetSubShapesIndices", self.ShapesOp)
6342             return anIDs
6343
6344         # end of l4_access
6345         ## @}
6346
6347         ## @addtogroup l4_decompose
6348         ## @{
6349
6350         ## Get all sub-shapes and groups of \a theShape,
6351         #  that were created already by any other methods.
6352         #  @param theShape Any shape.
6353         #  @param theGroupsOnly If this parameter is TRUE, only groups will be
6354         #                       returned, else all found sub-shapes and groups.
6355         #  @return List of existing sub-objects of \a theShape.
6356         #
6357         #  @ref swig_all_decompose "Example"
6358         @ManageTransactions("ShapesOp")
6359         def GetExistingSubObjects(self, theShape, theGroupsOnly = False):
6360             """
6361             Get all sub-shapes and groups of theShape,
6362             that were created already by any other methods.
6363
6364             Parameters:
6365                 theShape Any shape.
6366                 theGroupsOnly If this parameter is TRUE, only groups will be
6367                                  returned, else all found sub-shapes and groups.
6368
6369             Returns:
6370                 List of existing sub-objects of theShape.
6371             """
6372             # Example: see GEOM_TestAll.py
6373             ListObj = self.ShapesOp.GetExistingSubObjects(theShape, theGroupsOnly)
6374             RaiseIfFailed("GetExistingSubObjects", self.ShapesOp)
6375             return ListObj
6376
6377         ## Get all groups of \a theShape,
6378         #  that were created already by any other methods.
6379         #  @param theShape Any shape.
6380         #  @return List of existing groups of \a theShape.
6381         #
6382         #  @ref swig_all_decompose "Example"
6383         @ManageTransactions("ShapesOp")
6384         def GetGroups(self, theShape):
6385             """
6386             Get all groups of theShape,
6387             that were created already by any other methods.
6388
6389             Parameters:
6390                 theShape Any shape.
6391
6392             Returns:
6393                 List of existing groups of theShape.
6394             """
6395             # Example: see GEOM_TestAll.py
6396             ListObj = self.ShapesOp.GetExistingSubObjects(theShape, True)
6397             RaiseIfFailed("GetExistingSubObjects", self.ShapesOp)
6398             return ListObj
6399
6400         ## Explode a shape on sub-shapes of a given type.
6401         #  If the shape itself matches the type, it is also returned.
6402         #  @param aShape Shape to be exploded.
6403         #  @param aType Type of sub-shapes to be retrieved (see ShapeType())
6404         #  @param theName Object name; when specified, this parameter is used
6405         #         for result publication in the study. Otherwise, if automatic
6406         #         publication is switched on, default value is used for result name.
6407         #
6408         #  @return List of sub-shapes of type theShapeType, contained in theShape.
6409         #
6410         #  @ref swig_all_decompose "Example"
6411         @ManageTransactions("ShapesOp")
6412         def SubShapeAll(self, aShape, aType, theName=None):
6413             """
6414             Explode a shape on sub-shapes of a given type.
6415             If the shape itself matches the type, it is also returned.
6416
6417             Parameters:
6418                 aShape Shape to be exploded.
6419                 aType Type of sub-shapes to be retrieved (see geompy.ShapeType)
6420                 theName Object name; when specified, this parameter is used
6421                         for result publication in the study. Otherwise, if automatic
6422                         publication is switched on, default value is used for result name.
6423
6424             Returns:
6425                 List of sub-shapes of type theShapeType, contained in theShape.
6426             """
6427             # Example: see GEOM_TestAll.py
6428             ListObj = self.ShapesOp.MakeAllSubShapes(aShape, EnumToLong( aType ), False)
6429             RaiseIfFailed("SubShapeAll", self.ShapesOp)
6430             self._autoPublish(ListObj, theName, "subshape")
6431             return ListObj
6432
6433         ## Explode a shape on sub-shapes of a given type.
6434         #  @param aShape Shape to be exploded.
6435         #  @param aType Type of sub-shapes to be retrieved (see ShapeType())
6436         #  @return List of IDs of sub-shapes.
6437         #
6438         #  @ref swig_all_decompose "Example"
6439         @ManageTransactions("ShapesOp")
6440         def SubShapeAllIDs(self, aShape, aType):
6441             """
6442             Explode a shape on sub-shapes of a given type.
6443
6444             Parameters:
6445                 aShape Shape to be exploded (see geompy.ShapeType)
6446                 aType Type of sub-shapes to be retrieved (see geompy.ShapeType)
6447
6448             Returns:
6449                 List of IDs of sub-shapes.
6450             """
6451             ListObj = self.ShapesOp.GetAllSubShapesIDs(aShape, EnumToLong( aType ), False)
6452             RaiseIfFailed("SubShapeAllIDs", self.ShapesOp)
6453             return ListObj
6454
6455         ## Obtain a compound of sub-shapes of <VAR>aShape</VAR>,
6456         #  selected by their indices in list of all sub-shapes of type <VAR>aType</VAR>.
6457         #  Each index is in range [1, Nb_Sub-Shapes_Of_Given_Type]
6458         #  @param aShape Shape to get sub-shape of.
6459         #  @param ListOfInd List of sub-shapes indices.
6460         #  @param aType Type of sub-shapes to be retrieved (see ShapeType())
6461         #  @param theName Object name; when specified, this parameter is used
6462         #         for result publication in the study. Otherwise, if automatic
6463         #         publication is switched on, default value is used for result name.
6464         #
6465         #  @return A compound of sub-shapes of aShape.
6466         #
6467         #  @ref swig_all_decompose "Example"
6468         def SubShape(self, aShape, aType, ListOfInd, theName=None):
6469             """
6470             Obtain a compound of sub-shapes of aShape,
6471             selected by their indices in list of all sub-shapes of type aType.
6472             Each index is in range [1, Nb_Sub-Shapes_Of_Given_Type]
6473
6474             Parameters:
6475                 aShape Shape to get sub-shape of.
6476                 ListOfID List of sub-shapes indices.
6477                 aType Type of sub-shapes to be retrieved (see geompy.ShapeType)
6478                 theName Object name; when specified, this parameter is used
6479                         for result publication in the study. Otherwise, if automatic
6480                         publication is switched on, default value is used for result name.
6481
6482             Returns:
6483                 A compound of sub-shapes of aShape.
6484             """
6485             # Example: see GEOM_TestAll.py
6486             ListOfIDs = []
6487             AllShapeIDsList = self.SubShapeAllIDs(aShape, EnumToLong( aType ))
6488             for ind in ListOfInd:
6489                 ListOfIDs.append(AllShapeIDsList[ind - 1])
6490             # note: auto-publishing is done in self.GetSubShape()
6491             anObj = self.GetSubShape(aShape, ListOfIDs, theName)
6492             return anObj
6493
6494         ## Explode a shape on sub-shapes of a given type.
6495         #  Sub-shapes will be sorted taking into account their gravity centers,
6496         #  to provide stable order of sub-shapes. Please see
6497         #  @ref sorting_shapes_page "Description of Sorting Shapes Algorithm".
6498         #  If the shape itself matches the type, it is also returned.
6499         #  @param aShape Shape to be exploded.
6500         #  @param aType Type of sub-shapes to be retrieved (see ShapeType())
6501         #  @param theName Object name; when specified, this parameter is used
6502         #         for result publication in the study. Otherwise, if automatic
6503         #         publication is switched on, default value is used for result name.
6504         #
6505         #  @return List of sub-shapes of type theShapeType, contained in theShape.
6506         #
6507         #  @ref swig_SubShapeAllSorted "Example"
6508         @ManageTransactions("ShapesOp")
6509         def SubShapeAllSortedCentres(self, aShape, aType, theName=None):
6510             """
6511             Explode a shape on sub-shapes of a given type.
6512             Sub-shapes will be sorted taking into account their gravity centers,
6513             to provide stable order of sub-shapes.
6514             If the shape itself matches the type, it is also returned.
6515
6516             Parameters:
6517                 aShape Shape to be exploded.
6518                 aType Type of sub-shapes to be retrieved (see geompy.ShapeType)
6519                 theName Object name; when specified, this parameter is used
6520                         for result publication in the study. Otherwise, if automatic
6521                         publication is switched on, default value is used for result name.
6522
6523             Returns:
6524                 List of sub-shapes of type theShapeType, contained in theShape.
6525             """
6526             # Example: see GEOM_TestAll.py
6527             ListObj = self.ShapesOp.MakeAllSubShapes(aShape, EnumToLong( aType ), True)
6528             RaiseIfFailed("SubShapeAllSortedCentres", self.ShapesOp)
6529             self._autoPublish(ListObj, theName, "subshape")
6530             return ListObj
6531
6532         ## Explode a shape on sub-shapes of a given type.
6533         #  Sub-shapes will be sorted taking into account their gravity centers,
6534         #  to provide stable order of sub-shapes. Please see
6535         #  @ref sorting_shapes_page "Description of Sorting Shapes Algorithm".
6536         #  @param aShape Shape to be exploded.
6537         #  @param aType Type of sub-shapes to be retrieved (see ShapeType())
6538         #  @return List of IDs of sub-shapes.
6539         #
6540         #  @ref swig_all_decompose "Example"
6541         @ManageTransactions("ShapesOp")
6542         def SubShapeAllSortedCentresIDs(self, aShape, aType):
6543             """
6544             Explode a shape on sub-shapes of a given type.
6545             Sub-shapes will be sorted taking into account their gravity centers,
6546             to provide stable order of sub-shapes.
6547
6548             Parameters:
6549                 aShape Shape to be exploded.
6550                 aType Type of sub-shapes to be retrieved (see geompy.ShapeType)
6551
6552             Returns:
6553                 List of IDs of sub-shapes.
6554             """
6555             ListIDs = self.ShapesOp.GetAllSubShapesIDs(aShape, EnumToLong( aType ), True)
6556             RaiseIfFailed("SubShapeAllIDs", self.ShapesOp)
6557             return ListIDs
6558
6559         ## Obtain a compound of sub-shapes of <VAR>aShape</VAR>,
6560         #  selected by they indices in sorted list of all sub-shapes of type <VAR>aType</VAR>.
6561         #  Please see @ref sorting_shapes_page "Description of Sorting Shapes Algorithm".
6562         #  Each index is in range [1, Nb_Sub-Shapes_Of_Given_Type]
6563         #  @param aShape Shape to get sub-shape of.
6564         #  @param ListOfInd List of sub-shapes indices.
6565         #  @param aType Type of sub-shapes to be retrieved (see ShapeType())
6566         #  @param theName Object name; when specified, this parameter is used
6567         #         for result publication in the study. Otherwise, if automatic
6568         #         publication is switched on, default value is used for result name.
6569         #
6570         #  @return A compound of sub-shapes of aShape.
6571         #
6572         #  @ref swig_all_decompose "Example"
6573         def SubShapeSortedCentres(self, aShape, aType, ListOfInd, theName=None):
6574             """
6575             Obtain a compound of sub-shapes of aShape,
6576             selected by they indices in sorted list of all sub-shapes of type aType.
6577             Each index is in range [1, Nb_Sub-Shapes_Of_Given_Type]
6578
6579             Parameters:
6580                 aShape Shape to get sub-shape of.
6581                 ListOfID List of sub-shapes indices.
6582                 aType Type of sub-shapes to be retrieved (see geompy.ShapeType)
6583                 theName Object name; when specified, this parameter is used
6584                         for result publication in the study. Otherwise, if automatic
6585                         publication is switched on, default value is used for result name.
6586
6587             Returns:
6588                 A compound of sub-shapes of aShape.
6589             """
6590             # Example: see GEOM_TestAll.py
6591             ListOfIDs = []
6592             AllShapeIDsList = self.SubShapeAllSortedCentresIDs(aShape, EnumToLong( aType ))
6593             for ind in ListOfInd:
6594                 ListOfIDs.append(AllShapeIDsList[ind - 1])
6595             # note: auto-publishing is done in self.GetSubShape()
6596             anObj = self.GetSubShape(aShape, ListOfIDs, theName)
6597             return anObj
6598
6599         ## Extract shapes (excluding the main shape) of given type.
6600         #  @param aShape The shape.
6601         #  @param aType  The shape type (see ShapeType())
6602         #  @param isSorted Boolean flag to switch sorting on/off. Please see
6603         #         @ref sorting_shapes_page "Description of Sorting Shapes Algorithm".
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         #
6608         #  @return List of sub-shapes of type aType, contained in aShape.
6609         #
6610         #  @ref swig_FilletChamfer "Example"
6611         @ManageTransactions("ShapesOp")
6612         def ExtractShapes(self, aShape, aType, isSorted = False, theName=None):
6613             """
6614             Extract shapes (excluding the main shape) of given type.
6615
6616             Parameters:
6617                 aShape The shape.
6618                 aType  The shape type (see geompy.ShapeType)
6619                 isSorted Boolean flag to switch sorting on/off.
6620                 theName Object name; when specified, this parameter is used
6621                         for result publication in the study. Otherwise, if automatic
6622                         publication is switched on, default value is used for result name.
6623
6624             Returns:
6625                 List of sub-shapes of type aType, contained in aShape.
6626             """
6627             # Example: see GEOM_TestAll.py
6628             ListObj = self.ShapesOp.ExtractSubShapes(aShape, EnumToLong( aType ), isSorted)
6629             RaiseIfFailed("ExtractSubShapes", self.ShapesOp)
6630             self._autoPublish(ListObj, theName, "subshape")
6631             return ListObj
6632
6633         ## Get a set of sub-shapes defined by their unique IDs inside <VAR>aShape</VAR>
6634         #  @param aShape Main shape.
6635         #  @param anIDs List of unique IDs of sub-shapes inside <VAR>aShape</VAR>.
6636         #  @param theName Object name; when specified, this parameter is used
6637         #         for result publication in the study. Otherwise, if automatic
6638         #         publication is switched on, default value is used for result name.
6639         #  @return List of GEOM.GEOM_Object, corresponding to found sub-shapes.
6640         #
6641         #  @ref swig_all_decompose "Example"
6642         @ManageTransactions("ShapesOp")
6643         def SubShapes(self, aShape, anIDs, theName=None):
6644             """
6645             Get a set of sub-shapes defined by their unique IDs inside theMainShape
6646
6647             Parameters:
6648                 aShape Main shape.
6649                 anIDs List of unique IDs of sub-shapes inside theMainShape.
6650                 theName Object name; when specified, this parameter is used
6651                         for result publication in the study. Otherwise, if automatic
6652                         publication is switched on, default value is used for result name.
6653
6654             Returns:
6655                 List of GEOM.GEOM_Object, corresponding to found sub-shapes.
6656             """
6657             # Example: see GEOM_TestAll.py
6658             ListObj = self.ShapesOp.MakeSubShapes(aShape, anIDs)
6659             RaiseIfFailed("SubShapes", self.ShapesOp)
6660             self._autoPublish(ListObj, theName, "subshape")
6661             return ListObj
6662
6663         ## Explode a shape into edges sorted in a row from a starting point.
6664         #  @param theShape the shape to be exploded on edges.
6665         #  @param theStartPoint the starting point.
6666         #  @param theName Object name; when specified, this parameter is used
6667         #         for result publication in the study. Otherwise, if automatic
6668         #         publication is switched on, default value is used for result name.
6669         #  @return List of GEOM.GEOM_Object that is actually an ordered list
6670         #          of edges sorted in a row from a starting point.
6671         #
6672         #  @ref swig_GetSubShapeEdgeSorted "Example"
6673         @ManageTransactions("ShapesOp")
6674         def GetSubShapeEdgeSorted(self, theShape, theStartPoint, theName=None):
6675             """
6676             Explode a shape into edges sorted in a row from a starting point.
6677
6678             Parameters:
6679                 theShape the shape to be exploded on edges.
6680                 theStartPoint the starting point.
6681                 theName Object name; when specified, this parameter is used
6682                         for result publication in the study. Otherwise, if automatic
6683                         publication is switched on, default value is used for result name.
6684
6685             Returns:
6686                 List of GEOM.GEOM_Object that is actually an ordered list
6687                 of edges sorted in a row from a starting point.
6688             """
6689             # Example: see GEOM_TestAll.py
6690             ListObj = self.ShapesOp.GetSubShapeEdgeSorted(theShape, theStartPoint)
6691             RaiseIfFailed("GetSubShapeEdgeSorted", self.ShapesOp)
6692             self._autoPublish(ListObj, theName, "SortedEdges")
6693             return ListObj
6694
6695         ##
6696         # Return the list of subshapes that satisfies a certain tolerance
6697         # criterion. The user defines the type of shapes to be returned, the
6698         # condition and the tolerance value. The operation is defined for
6699         # faces, edges and vertices only. E.g. for theShapeType FACE,
6700         # theCondition GEOM::CC_GT and theTolerance 1.e-7 this method returns
6701         # all faces of theShape that have tolerances greater then 1.e7.
6702         #
6703         #  @param theShape the shape to be exploded
6704         #  @param theShapeType the type of sub-shapes to be returned (see
6705         #         ShapeType()). Can have the values FACE, EDGE and VERTEX only.
6706         #  @param theCondition the condition type (see GEOM::comparison_condition).
6707         #  @param theTolerance the tolerance filter.
6708         #  @param theName Object name; when specified, this parameter is used
6709         #         for result publication in the study. Otherwise, if automatic
6710         #         publication is switched on, default value is used for result name.
6711         #  @return the list of shapes that satisfy the conditions.
6712         #
6713         #  @ref swig_GetSubShapesWithTolerance "Example"
6714         @ManageTransactions("ShapesOp")
6715         def GetSubShapesWithTolerance(self, theShape, theShapeType,
6716                                       theCondition, theTolerance, theName=None):
6717             """
6718             Return the list of subshapes that satisfies a certain tolerance
6719             criterion. The user defines the type of shapes to be returned, the
6720             condition and the tolerance value. The operation is defined for
6721             faces, edges and vertices only. E.g. for theShapeType FACE,
6722             theCondition GEOM::CC_GT and theTolerance 1.e-7 this method returns
6723             all faces of theShape that have tolerances greater then 1.e7.
6724             
6725             Parameters:
6726                 theShape the shape to be exploded
6727                 theShapeType the type of sub-shapes to be returned (see
6728                              ShapeType()). Can have the values FACE,
6729                              EDGE and VERTEX only.
6730                 theCondition the condition type (see GEOM::comparison_condition).
6731                 theTolerance the tolerance filter.
6732                 theName Object name; when specified, this parameter is used
6733                         for result publication in the study. Otherwise, if automatic
6734                         publication is switched on, default value is used for result name.
6735
6736             Returns:
6737                 The list of shapes that satisfy the conditions.
6738             """
6739             # Example: see GEOM_TestAll.py
6740             ListObj = self.ShapesOp.GetSubShapesWithTolerance(theShape, EnumToLong(theShapeType),
6741                                                               theCondition, theTolerance)
6742             RaiseIfFailed("GetSubShapesWithTolerance", self.ShapesOp)
6743             self._autoPublish(ListObj, theName, "SubShapeWithTolerance")
6744             return ListObj
6745
6746         ## Check if the object is a sub-object of another GEOM object.
6747         #  @param aSubObject Checked sub-object (or its parent object, in case if
6748         #         \a theSubObjectIndex is non-zero).
6749         #  @param anObject An object that is checked for ownership (or its parent object,
6750         #         in case if \a theObjectIndex is non-zero).
6751         #  @param aSubObjectIndex When non-zero, specifies a sub-shape index that
6752         #         identifies a sub-object within its parent specified via \a theSubObject.
6753         #  @param anObjectIndex When non-zero, specifies a sub-shape index that
6754         #         identifies an object within its parent specified via \a theObject.
6755         #  @return TRUE, if the given object contains sub-object.
6756         @ManageTransactions("ShapesOp")
6757         def IsSubShapeBelongsTo(self, aSubObject, anObject, aSubObjectIndex = 0, anObjectIndex = 0):
6758             """
6759             Check if the object is a sub-object of another GEOM object.
6760             
6761             Parameters:
6762                 aSubObject Checked sub-object (or its parent object, in case if
6763                     \a theSubObjectIndex is non-zero).
6764                 anObject An object that is checked for ownership (or its parent object,
6765                     in case if \a theObjectIndex is non-zero).
6766                 aSubObjectIndex When non-zero, specifies a sub-shape index that
6767                     identifies a sub-object within its parent specified via \a theSubObject.
6768                 anObjectIndex When non-zero, specifies a sub-shape index that
6769                     identifies an object within its parent specified via \a theObject.
6770
6771             Returns
6772                 TRUE, if the given object contains sub-object.
6773             """
6774             IsOk = self.ShapesOp.IsSubShapeBelongsTo(aSubObject, aSubObjectIndex, anObject, anObjectIndex)
6775             RaiseIfFailed("IsSubShapeBelongsTo", self.ShapesOp)
6776             return IsOk
6777
6778         ## Perform extraction of sub-shapes from the main shape.
6779         #
6780         #  @param theShape the main shape
6781         #  @param theListOfID the list of sub-shape IDs to be extracted from
6782         #         the main shape.
6783         #  @return New GEOM.GEOM_Object, containing the shape without
6784         #          extracted sub-shapes.
6785         #
6786         #  @ref swig_MakeExtraction "Example"
6787         @ManageTransactions("ShapesOp")
6788         def MakeExtraction(self, theShape, theListOfID, theName=None):
6789             """
6790             Perform extraction of sub-shapes from the main shape.
6791
6792             Parameters:
6793                 theShape the main shape
6794                 theListOfID the list of sub-shape IDs to be extracted from
6795                             the main shape.
6796
6797             Returns
6798                 New GEOM.GEOM_Object, containing the shape without
6799                 extracted sub-shapes.
6800             """
6801             # Example: see GEOM_TestAll.py
6802             (anObj, aStat) = self.ShapesOp.MakeExtraction(theShape, theListOfID)
6803             RaiseIfFailed("MakeExtraction", self.ShapesOp)
6804             self._autoPublish(anObj, theName, "Extraction")
6805             return anObj
6806
6807         # end of l4_decompose
6808         ## @}
6809
6810         ## @addtogroup l4_decompose_d
6811         ## @{
6812
6813         ## Deprecated method
6814         #  It works like SubShapeAllSortedCentres(), but wrongly
6815         #  defines centres of faces, shells and solids.
6816         @ManageTransactions("ShapesOp")
6817         def SubShapeAllSorted(self, aShape, aType, theName=None):
6818             """
6819             Deprecated method
6820             It works like geompy.SubShapeAllSortedCentres, but wrongly
6821             defines centres of faces, shells and solids.
6822             """
6823             ListObj = self.ShapesOp.MakeExplode(aShape, EnumToLong( aType ), True)
6824             RaiseIfFailed("MakeExplode", self.ShapesOp)
6825             self._autoPublish(ListObj, theName, "subshape")
6826             return ListObj
6827
6828         ## Deprecated method
6829         #  It works like SubShapeAllSortedCentresIDs(), but wrongly
6830         #  defines centres of faces, shells and solids.
6831         @ManageTransactions("ShapesOp")
6832         def SubShapeAllSortedIDs(self, aShape, aType):
6833             """
6834             Deprecated method
6835             It works like geompy.SubShapeAllSortedCentresIDs, but wrongly
6836             defines centres of faces, shells and solids.
6837             """
6838             ListIDs = self.ShapesOp.SubShapeAllIDs(aShape, EnumToLong( aType ), True)
6839             RaiseIfFailed("SubShapeAllIDs", self.ShapesOp)
6840             return ListIDs
6841
6842         ## Deprecated method
6843         #  It works like SubShapeSortedCentres(), but has a bug
6844         #  (wrongly defines centres of faces, shells and solids).
6845         def SubShapeSorted(self, aShape, aType, ListOfInd, theName=None):
6846             """
6847             Deprecated method
6848             It works like geompy.SubShapeSortedCentres, but has a bug
6849             (wrongly defines centres of faces, shells and solids).
6850             """
6851             ListOfIDs = []
6852             AllShapeIDsList = self.SubShapeAllSortedIDs(aShape, EnumToLong( aType ))
6853             for ind in ListOfInd:
6854                 ListOfIDs.append(AllShapeIDsList[ind - 1])
6855             # note: auto-publishing is done in self.GetSubShape()
6856             anObj = self.GetSubShape(aShape, ListOfIDs, theName)
6857             return anObj
6858
6859         # end of l4_decompose_d
6860         ## @}
6861
6862         ## @addtogroup l3_healing
6863         ## @{
6864
6865         ## Apply a sequence of Shape Healing operators to the given object.
6866         #  @param theShape Shape to be processed.
6867         #  @param theOperators List of names of operators ("FixShape", "SplitClosedFaces", etc.).
6868         #  @param theParameters List of names of parameters
6869         #                    ("FixShape.Tolerance3d", "SplitClosedFaces.NbSplitPoints", etc.).
6870         #  @param theValues List of values of parameters, in the same order
6871         #                    as parameters are listed in <VAR>theParameters</VAR> list.
6872         #  @param theName Object name; when specified, this parameter is used
6873         #         for result publication in the study. Otherwise, if automatic
6874         #         publication is switched on, default value is used for result name.
6875         #
6876         #  <b> Operators and Parameters: </b> \n
6877         #
6878         #  * \b FixShape - corrects invalid shapes. \n
6879         #  - \b FixShape.Tolerance3d - work tolerance for detection of the problems and correction of them. \n
6880         #  - \b FixShape.MaxTolerance3d - maximal possible tolerance of the shape after correction. \n
6881         #
6882         #  * \b FixFaceSize - removes small faces, such as spots and strips.\n
6883         #  - \b FixFaceSize.Tolerance - defines minimum possible face size. \n
6884         #  - \b DropSmallEdges - removes edges, which merge with neighbouring edges. \n
6885         #  - \b DropSmallEdges.Tolerance3d - defines minimum possible distance between two parallel edges.\n
6886         #  - \b DropSmallSolids - either removes small solids or merges them with neighboring ones. \n
6887         #  - \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
6888         #  - \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
6889         #  - \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
6890         #
6891         #  * \b SplitAngle - splits faces based on conical surfaces, surfaces of revolution and cylindrical
6892         #    surfaces in segments using a certain angle. \n
6893         #  - \b SplitAngle.Angle - the central angle of the resulting segments (i.e. we obtain two segments
6894         #    if Angle=180, four if Angle=90, etc). \n
6895         #  - \b SplitAngle.MaxTolerance - maximum possible tolerance among the resulting segments.\n
6896         #
6897         #  * \b SplitClosedFaces - splits closed faces in segments.
6898         #    The number of segments depends on the number of splitting points.\n
6899         #  - \b SplitClosedFaces.NbSplitPoints - the number of splitting points.\n
6900         #
6901         #  * \b SplitContinuity - splits shapes to reduce continuities of curves and surfaces.\n
6902         #  - \b SplitContinuity.Tolerance3d - 3D tolerance for correction of geometry.\n
6903         #  - \b SplitContinuity.SurfaceContinuity - required continuity for surfaces.\n
6904         #  - \b SplitContinuity.CurveContinuity - required continuity for curves.\n
6905         #   This and the previous parameters can take the following values:\n
6906         #   \b Parametric \b Continuity \n
6907         #   \b C0 (Positional Continuity): curves are joined (the end positions of curves or surfaces
6908         #   are coincidental. The curves or surfaces may still meet at an angle, giving rise to a sharp corner or edge).\n
6909         #   \b C1 (Tangential Continuity): first derivatives are equal (the end vectors of curves or surfaces are parallel,
6910         #    ruling out sharp edges).\n
6911         #   \b C2 (Curvature Continuity): first and second derivatives are equal (the end vectors of curves or surfaces
6912         #       are of the same magnitude).\n
6913         #   \b CN N-th derivatives are equal (both the direction and the magnitude of the Nth derivatives of curves
6914         #    or surfaces (d/du C(u)) are the same at junction. \n
6915         #   \b Geometric \b Continuity \n
6916         #   \b G1: first derivatives are proportional at junction.\n
6917         #   The curve tangents thus have the same direction, but not necessarily the same magnitude.
6918         #      i.e., C1'(1) = (a,b,c) and C2'(0) = (k*a, k*b, k*c).\n
6919         #   \b G2: first and second derivatives are proportional at junction.
6920         #   As the names imply, geometric continuity requires the geometry to be continuous, while parametric
6921         #    continuity requires that the underlying parameterization was continuous as well.
6922         #   Parametric continuity of order n implies geometric continuity of order n, but not vice-versa.\n
6923         #
6924         #  * \b BsplineRestriction - converts curves and surfaces to Bsplines and processes them with the following parameters:\n
6925         #  - \b BSplineRestriction.SurfaceMode - approximation of surfaces if restriction is necessary.\n
6926         #  - \b BSplineRestriction.Curve3dMode - conversion of any 3D curve to BSpline and approximation.\n
6927         #  - \b BSplineRestriction.Curve2dMode - conversion of any 2D curve to BSpline and approximation.\n
6928         #  - \b BSplineRestriction.Tolerance3d - defines the possibility of surfaces and 3D curves approximation
6929         #       with the specified parameters.\n
6930         #  - \b BSplineRestriction.Tolerance2d - defines the possibility of surfaces and 2D curves approximation
6931         #       with the specified parameters.\n
6932         #  - \b BSplineRestriction.RequiredDegree - required degree of the resulting BSplines.\n
6933         #  - \b BSplineRestriction.RequiredNbSegments - required maximum number of segments of resultant BSplines.\n
6934         #  - \b BSplineRestriction.Continuity3d - continuity of the resulting surfaces and 3D curves.\n
6935         #  - \b BSplineRestriction.Continuity2d - continuity of the resulting 2D curves.\n
6936         #
6937         #  * \b ToBezier - converts curves and surfaces of any type to Bezier curves and surfaces.\n
6938         #  - \b ToBezier.SurfaceMode - if checked in, allows conversion of surfaces.\n
6939         #  - \b ToBezier.Curve3dMode - if checked in, allows conversion of 3D curves.\n
6940         #  - \b ToBezier.Curve2dMode - if checked in, allows conversion of 2D curves.\n
6941         #  - \b ToBezier.MaxTolerance - defines tolerance for detection and correction of problems.\n
6942         #
6943         #  * \b SameParameter - fixes edges of 2D and 3D curves not having the same parameter.\n
6944         #  - \b SameParameter.Tolerance3d - defines tolerance for fixing of edges.\n
6945         #
6946         #
6947         #  @return New GEOM.GEOM_Object, containing processed shape.
6948         #
6949         #  \n @ref tui_shape_processing "Example"
6950         @ManageTransactions("HealOp")
6951         def ProcessShape(self, theShape, theOperators, theParameters, theValues, theName=None):
6952             """
6953             Apply a sequence of Shape Healing operators to the given object.
6954
6955             Parameters:
6956                 theShape Shape to be processed.
6957                 theValues List of values of parameters, in the same order
6958                           as parameters are listed in theParameters list.
6959                 theOperators List of names of operators ('FixShape', 'SplitClosedFaces', etc.).
6960                 theParameters List of names of parameters
6961                               ('FixShape.Tolerance3d', 'SplitClosedFaces.NbSplitPoints', etc.).
6962                 theName Object name; when specified, this parameter is used
6963                         for result publication in the study. Otherwise, if automatic
6964                         publication is switched on, default value is used for result name.
6965
6966                 Operators and Parameters:
6967
6968                  * FixShape - corrects invalid shapes.
6969                      * FixShape.Tolerance3d - work tolerance for detection of the problems and correction of them.
6970                      * FixShape.MaxTolerance3d - maximal possible tolerance of the shape after correction.
6971                  * FixFaceSize - removes small faces, such as spots and strips.
6972                      * FixFaceSize.Tolerance - defines minimum possible face size.
6973                  * DropSmallEdges - removes edges, which merge with neighbouring edges.
6974                      * DropSmallEdges.Tolerance3d - defines minimum possible distance between two parallel edges.
6975                  * DropSmallSolids - either removes small solids or merges them with neighboring ones.
6976                      * 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.
6977                      * 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.
6978                      * 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.
6979
6980                  * SplitAngle - splits faces based on conical surfaces, surfaces of revolution and cylindrical surfaces
6981                                 in segments using a certain angle.
6982                      * SplitAngle.Angle - the central angle of the resulting segments (i.e. we obtain two segments
6983                                           if Angle=180, four if Angle=90, etc).
6984                      * SplitAngle.MaxTolerance - maximum possible tolerance among the resulting segments.
6985                  * SplitClosedFaces - splits closed faces in segments. The number of segments depends on the number of
6986                                       splitting points.
6987                      * SplitClosedFaces.NbSplitPoints - the number of splitting points.
6988                  * SplitContinuity - splits shapes to reduce continuities of curves and surfaces.
6989                      * SplitContinuity.Tolerance3d - 3D tolerance for correction of geometry.
6990                      * SplitContinuity.SurfaceContinuity - required continuity for surfaces.
6991                      * SplitContinuity.CurveContinuity - required continuity for curves.
6992                        This and the previous parameters can take the following values:
6993
6994                        Parametric Continuity:
6995                        C0 (Positional Continuity): curves are joined (the end positions of curves or surfaces are
6996                                                    coincidental. The curves or surfaces may still meet at an angle,
6997                                                    giving rise to a sharp corner or edge).
6998                        C1 (Tangential Continuity): first derivatives are equal (the end vectors of curves or surfaces
6999                                                    are parallel, ruling out sharp edges).
7000                        C2 (Curvature Continuity): first and second derivatives are equal (the end vectors of curves
7001                                                   or surfaces are of the same magnitude).
7002                        CN N-th derivatives are equal (both the direction and the magnitude of the Nth derivatives of
7003                           curves or surfaces (d/du C(u)) are the same at junction.
7004
7005                        Geometric Continuity:
7006                        G1: first derivatives are proportional at junction.
7007                            The curve tangents thus have the same direction, but not necessarily the same magnitude.
7008                            i.e., C1'(1) = (a,b,c) and C2'(0) = (k*a, k*b, k*c).
7009                        G2: first and second derivatives are proportional at junction. As the names imply,
7010                            geometric continuity requires the geometry to be continuous, while parametric continuity requires
7011                            that the underlying parameterization was continuous as well. Parametric continuity of order n implies
7012                            geometric continuity of order n, but not vice-versa.
7013                  * BsplineRestriction - converts curves and surfaces to Bsplines and processes them with the following parameters:
7014                      * BSplineRestriction.SurfaceMode - approximation of surfaces if restriction is necessary.
7015                      * BSplineRestriction.Curve3dMode - conversion of any 3D curve to BSpline and approximation.
7016                      * BSplineRestriction.Curve2dMode - conversion of any 2D curve to BSpline and approximation.
7017                      * BSplineRestriction.Tolerance3d - defines the possibility of surfaces and 3D curves approximation with
7018                                                         the specified parameters.
7019                      * BSplineRestriction.Tolerance2d - defines the possibility of surfaces and 2D curves approximation with
7020                                                         the specified parameters.
7021                      * BSplineRestriction.RequiredDegree - required degree of the resulting BSplines.
7022                      * BSplineRestriction.RequiredNbSegments - required maximum number of segments of resultant BSplines.
7023                      * BSplineRestriction.Continuity3d - continuity of the resulting surfaces and 3D curves.
7024                      * BSplineRestriction.Continuity2d - continuity of the resulting 2D curves.
7025                  * ToBezier - converts curves and surfaces of any type to Bezier curves and surfaces.
7026                      * ToBezier.SurfaceMode - if checked in, allows conversion of surfaces.
7027                      * ToBezier.Curve3dMode - if checked in, allows conversion of 3D curves.
7028                      * ToBezier.Curve2dMode - if checked in, allows conversion of 2D curves.
7029                      * ToBezier.MaxTolerance - defines tolerance for detection and correction of problems.
7030                  * SameParameter - fixes edges of 2D and 3D curves not having the same parameter.
7031                      * SameParameter.Tolerance3d - defines tolerance for fixing of edges.
7032
7033             Returns:
7034                 New GEOM.GEOM_Object, containing processed shape.
7035
7036             Note: For more information look through SALOME Geometry User's Guide->
7037                   -> Introduction to Geometry-> Repairing Operations-> Shape Processing
7038             """
7039             # Example: see GEOM_TestHealing.py
7040             theValues,Parameters = ParseList(theValues)
7041             anObj = self.HealOp.ProcessShape(theShape, theOperators, theParameters, theValues)
7042             # To avoid script failure in case of good argument shape
7043             if self.HealOp.GetErrorCode() == "ShHealOper_NotError_msg":
7044                 return theShape
7045             RaiseIfFailed("ProcessShape", self.HealOp)
7046             for string in (theOperators + theParameters):
7047                 Parameters = ":" + Parameters
7048                 pass
7049             anObj.SetParameters(Parameters)
7050             self._autoPublish(anObj, theName, "healed")
7051             return anObj
7052
7053         ## Remove faces from the given object (shape).
7054         #  @param theObject Shape to be processed.
7055         #  @param theFaces Indices of faces to be removed, if EMPTY then the method
7056         #                  removes ALL faces of the given object.
7057         #  @param theName Object name; when specified, this parameter is used
7058         #         for result publication in the study. Otherwise, if automatic
7059         #         publication is switched on, default value is used for result name.
7060         #
7061         #  @return New GEOM.GEOM_Object, containing processed shape.
7062         #
7063         #  @ref tui_suppress_faces "Example"
7064         @ManageTransactions("HealOp")
7065         def SuppressFaces(self, theObject, theFaces, theName=None):
7066             """
7067             Remove faces from the given object (shape).
7068
7069             Parameters:
7070                 theObject Shape to be processed.
7071                 theFaces Indices of faces to be removed, if EMPTY then the method
7072                          removes ALL faces of the given object.
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 processed shape.
7079             """
7080             # Example: see GEOM_TestHealing.py
7081             anObj = self.HealOp.SuppressFaces(theObject, theFaces)
7082             RaiseIfFailed("SuppressFaces", self.HealOp)
7083             self._autoPublish(anObj, theName, "suppressFaces")
7084             return anObj
7085
7086         ## Sewing of faces into a single shell.
7087         #  @param ListShape Shapes to be processed.
7088         #  @param theTolerance Required tolerance value.
7089         #  @param AllowNonManifold Flag that allows non-manifold sewing.
7090         #  @param theName Object name; when specified, this parameter is used
7091         #         for result publication in the study. Otherwise, if automatic
7092         #         publication is switched on, default value is used for result name.
7093         #
7094         #  @return New GEOM.GEOM_Object, containing a result shell.
7095         #
7096         #  @ref tui_sewing "Example"
7097         def MakeSewing(self, ListShape, theTolerance, AllowNonManifold=False, theName=None):
7098             """
7099             Sewing of faces into a single shell.
7100
7101             Parameters:
7102                 ListShape Shapes to be processed.
7103                 theTolerance Required tolerance value.
7104                 AllowNonManifold Flag that allows non-manifold sewing.
7105                 theName Object name; when specified, this parameter is used
7106                         for result publication in the study. Otherwise, if automatic
7107                         publication is switched on, default value is used for result name.
7108
7109             Returns:
7110                 New GEOM.GEOM_Object, containing containing a result shell.
7111             """
7112             # Example: see GEOM_TestHealing.py
7113             # note: auto-publishing is done in self.Sew()
7114             anObj = self.Sew(ListShape, theTolerance, AllowNonManifold, theName)
7115             return anObj
7116
7117         ## Sewing of faces into a single shell.
7118         #  @param ListShape Shapes to be processed.
7119         #  @param theTolerance Required tolerance value.
7120         #  @param AllowNonManifold Flag that allows non-manifold sewing.
7121         #  @param theName Object name; when specified, this parameter is used
7122         #         for result publication in the study. Otherwise, if automatic
7123         #         publication is switched on, default value is used for result name.
7124         #
7125         #  @return New GEOM.GEOM_Object, containing a result shell.
7126         @ManageTransactions("HealOp")
7127         def Sew(self, ListShape, theTolerance, AllowNonManifold=False, theName=None):
7128             """
7129             Sewing of faces into a single shell.
7130
7131             Parameters:
7132                 ListShape Shapes to be processed.
7133                 theTolerance Required tolerance value.
7134                 AllowNonManifold Flag that allows non-manifold sewing.
7135                 theName Object name; when specified, this parameter is used
7136                         for result publication in the study. Otherwise, if automatic
7137                         publication is switched on, default value is used for result name.
7138
7139             Returns:
7140                 New GEOM.GEOM_Object, containing a result shell.
7141             """
7142             # Example: see MakeSewing() above
7143             theTolerance,Parameters = ParseParameters(theTolerance)
7144             if AllowNonManifold:
7145                 anObj = self.HealOp.SewAllowNonManifold( ToList( ListShape ), theTolerance)
7146             else:
7147                 anObj = self.HealOp.Sew( ToList( ListShape ), theTolerance)
7148             # To avoid script failure in case of good argument shape
7149             # (Fix of test cases geom/bugs11/L7,L8)
7150             if self.HealOp.GetErrorCode() == "ShHealOper_NotError_msg":
7151                 return anObj
7152             RaiseIfFailed("Sew", self.HealOp)
7153             anObj.SetParameters(Parameters)
7154             self._autoPublish(anObj, theName, "sewed")
7155             return anObj
7156
7157         ## Rebuild the topology of theSolids by removing
7158         #  the faces that are shared by several solids.
7159         #  @param theSolids A compound or a list of solids to be processed.
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_remove_webs "Example"
7167         @ManageTransactions("HealOp")
7168         def RemoveInternalFaces (self, theSolids, theName=None):
7169             """
7170             Rebuild the topology of theSolids by removing
7171             the faces that are shared by several solids.
7172
7173             Parameters:
7174                 theSolids A compound or a list of solids to be processed.
7175                 theName Object name; when specified, this parameter is used
7176                         for result publication in the study. Otherwise, if automatic
7177                         publication is switched on, default value is used for result name.
7178
7179             Returns:
7180                 New GEOM.GEOM_Object, containing processed shape.
7181             """
7182             # Example: see GEOM_TestHealing.py
7183             anObj = self.HealOp.RemoveInternalFaces(ToList(theSolids))
7184             RaiseIfFailed("RemoveInternalFaces", self.HealOp)
7185             self._autoPublish(anObj, theName, "removeWebs")
7186             return anObj
7187
7188         ## Remove internal wires and edges from the given object (face).
7189         #  @param theObject Shape to be processed.
7190         #  @param theWires Indices of wires to be removed, if EMPTY then the method
7191         #                  removes ALL internal wires of the given object.
7192         #  @param theName Object name; when specified, this parameter is used
7193         #         for result publication in the study. Otherwise, if automatic
7194         #         publication is switched on, default value is used for result name.
7195         #
7196         #  @return New GEOM.GEOM_Object, containing processed shape.
7197         #
7198         #  @ref tui_suppress_internal_wires "Example"
7199         @ManageTransactions("HealOp")
7200         def SuppressInternalWires(self, theObject, theWires, theName=None):
7201             """
7202             Remove internal wires and edges from the given object (face).
7203
7204             Parameters:
7205                 theObject Shape to be processed.
7206                 theWires Indices of wires to be removed, if EMPTY then the method
7207                          removes ALL internal wires of the given object.
7208                 theName Object name; when specified, this parameter is used
7209                         for result publication in the study. Otherwise, if automatic
7210                         publication is switched on, default value is used for result name.
7211
7212             Returns:
7213                 New GEOM.GEOM_Object, containing processed shape.
7214             """
7215             # Example: see GEOM_TestHealing.py
7216             anObj = self.HealOp.RemoveIntWires(theObject, theWires)
7217             RaiseIfFailed("RemoveIntWires", self.HealOp)
7218             self._autoPublish(anObj, theName, "suppressWires")
7219             return anObj
7220
7221         ## Remove internal closed contours (holes) from the given object.
7222         #  @param theObject Shape to be processed.
7223         #  @param theWires Indices of wires to be removed, if EMPTY then the method
7224         #                  removes ALL internal holes of the given object
7225         #  @param theName Object name; when specified, this parameter is used
7226         #         for result publication in the study. Otherwise, if automatic
7227         #         publication is switched on, default value is used for result name.
7228         #
7229         #  @return New GEOM.GEOM_Object, containing processed shape.
7230         #
7231         #  @ref tui_suppress_holes "Example"
7232         @ManageTransactions("HealOp")
7233         def SuppressHoles(self, theObject, theWires, theName=None):
7234             """
7235             Remove internal closed contours (holes) from the given object.
7236
7237             Parameters:
7238                 theObject Shape to be processed.
7239                 theWires Indices of wires to be removed, if EMPTY then the method
7240                          removes ALL internal holes of the given object
7241                 theName Object name; when specified, this parameter is used
7242                         for result publication in the study. Otherwise, if automatic
7243                         publication is switched on, default value is used for result name.
7244
7245             Returns:
7246                 New GEOM.GEOM_Object, containing processed shape.
7247             """
7248             # Example: see GEOM_TestHealing.py
7249             anObj = self.HealOp.FillHoles(theObject, theWires)
7250             RaiseIfFailed("FillHoles", self.HealOp)
7251             self._autoPublish(anObj, theName, "suppressHoles")
7252             return anObj
7253
7254         ## Close an open wire.
7255         #  @param theObject Shape to be processed.
7256         #  @param theWires Indexes of edge(s) and wire(s) to be closed within <VAR>theObject</VAR>'s shape,
7257         #                  if [ ], then <VAR>theObject</VAR> itself is a wire.
7258         #  @param isCommonVertex If True  : closure by creation of a common vertex,
7259         #                        If False : closure by creation of an edge between ends.
7260         #  @param theName Object name; when specified, this parameter is used
7261         #         for result publication in the study. Otherwise, if automatic
7262         #         publication is switched on, default value is used for result name.
7263         #
7264         #  @return New GEOM.GEOM_Object, containing processed shape.
7265         #
7266         #  @ref tui_close_contour "Example"
7267         @ManageTransactions("HealOp")
7268         def CloseContour(self,theObject, theWires, isCommonVertex, theName=None):
7269             """
7270             Close an open wire.
7271
7272             Parameters:
7273                 theObject Shape to be processed.
7274                 theWires Indexes of edge(s) and wire(s) to be closed within theObject's shape,
7275                          if [ ], then theObject itself is a wire.
7276                 isCommonVertex If True  : closure by creation of a common vertex,
7277                                If False : closure by creation of an edge between ends.
7278                 theName Object name; when specified, this parameter is used
7279                         for result publication in the study. Otherwise, if automatic
7280                         publication is switched on, default value is used for result name.
7281
7282             Returns:
7283                 New GEOM.GEOM_Object, containing processed shape.
7284             """
7285             # Example: see GEOM_TestHealing.py
7286             anObj = self.HealOp.CloseContour(theObject, theWires, isCommonVertex)
7287             RaiseIfFailed("CloseContour", self.HealOp)
7288             self._autoPublish(anObj, theName, "closeContour")
7289             return anObj
7290
7291         ## Addition of a point to a given edge object.
7292         #  @param theObject Shape to be processed.
7293         #  @param theEdgeIndex Index of edge to be divided within theObject's shape,
7294         #                      if -1, then theObject itself is the edge.
7295         #  @param theValue Value of parameter on edge or length parameter,
7296         #                  depending on \a isByParameter.
7297         #  @param isByParameter If TRUE : \a theValue is treated as a curve parameter [0..1], \n
7298         #                       if FALSE : \a theValue is treated as a length parameter [0..1]
7299         #  @param theName Object name; when specified, this parameter is used
7300         #         for result publication in the study. Otherwise, if automatic
7301         #         publication is switched on, default value is used for result name.
7302         #
7303         #  @return New GEOM.GEOM_Object, containing processed shape.
7304         #
7305         #  @ref tui_add_point_on_edge "Example"
7306         @ManageTransactions("HealOp")
7307         def DivideEdge(self, theObject, theEdgeIndex, theValue, isByParameter, theName=None):
7308             """
7309             Addition of a point to a given edge object.
7310
7311             Parameters:
7312                 theObject Shape to be processed.
7313                 theEdgeIndex Index of edge to be divided within theObject's shape,
7314                              if -1, then theObject itself is the edge.
7315                 theValue Value of parameter on edge or length parameter,
7316                          depending on isByParameter.
7317                 isByParameter If TRUE :  theValue is treated as a curve parameter [0..1],
7318                               if FALSE : theValue is treated as a length parameter [0..1]
7319                 theName Object name; when specified, this parameter is used
7320                         for result publication in the study. Otherwise, if automatic
7321                         publication is switched on, default value is used for result name.
7322
7323             Returns:
7324                 New GEOM.GEOM_Object, containing processed shape.
7325             """
7326             # Example: see GEOM_TestHealing.py
7327             theEdgeIndex,theValue,isByParameter,Parameters = ParseParameters(theEdgeIndex,theValue,isByParameter)
7328             anObj = self.HealOp.DivideEdge(theObject, theEdgeIndex, theValue, isByParameter)
7329             RaiseIfFailed("DivideEdge", self.HealOp)
7330             anObj.SetParameters(Parameters)
7331             self._autoPublish(anObj, theName, "divideEdge")
7332             return anObj
7333
7334         ## Addition of points to a given edge of \a theObject by projecting
7335         #  other points to the given edge.
7336         #  @param theObject Shape to be processed.
7337         #  @param theEdgeIndex Index of edge to be divided within theObject's shape,
7338         #                      if -1, then theObject itself is the edge.
7339         #  @param thePoints List of points to project to theEdgeIndex-th edge.
7340         #  @param theName Object name; when specified, this parameter is used
7341         #         for result publication in the study. Otherwise, if automatic
7342         #         publication is switched on, default value is used for result name.
7343         #
7344         #  @return New GEOM.GEOM_Object, containing processed shape.
7345         #
7346         #  @ref tui_add_point_on_edge "Example"
7347         @ManageTransactions("HealOp")
7348         def DivideEdgeByPoint(self, theObject, theEdgeIndex, thePoints, theName=None):
7349             """
7350             Addition of points to a given edge of \a theObject by projecting
7351             other points to the given edge.
7352
7353             Parameters:
7354                 theObject Shape to be processed.
7355                 theEdgeIndex The edge or its index to be divided within theObject's shape,
7356                              if -1, then theObject itself is the edge.
7357                 thePoints List of points to project to theEdgeIndex-th edge.
7358                 theName Object name; when specified, this parameter is used
7359                         for result publication in the study. Otherwise, if automatic
7360                         publication is switched on, default value is used for result name.
7361
7362             Returns:
7363                 New GEOM.GEOM_Object, containing processed shape.
7364             """
7365             # Example: see GEOM_TestHealing.py
7366             if isinstance( theEdgeIndex, GEOM._objref_GEOM_Object ):
7367                 theEdgeIndex = self.GetSubShapeID( theObject, theEdgeIndex )
7368             anObj = self.HealOp.DivideEdgeByPoint(theObject, theEdgeIndex, ToList( thePoints ))
7369             RaiseIfFailed("DivideEdgeByPoint", self.HealOp)
7370             self._autoPublish(anObj, theName, "divideEdge")
7371             return anObj
7372
7373         ## Suppress the vertices in the wire in case if adjacent edges are C1 continuous.
7374         #  @param theWire Wire to minimize the number of C1 continuous edges in.
7375         #  @param theVertices A list of vertices to suppress. If the list
7376         #                     is empty, all vertices in a wire will be assumed.
7377         #  @param theName Object name; when specified, this parameter is used
7378         #         for result publication in the study. Otherwise, if automatic
7379         #         publication is switched on, default value is used for result name.
7380         #
7381         #  @return New GEOM.GEOM_Object with modified wire.
7382         #
7383         #  @ref tui_fuse_collinear_edges "Example"
7384         @ManageTransactions("HealOp")
7385         def FuseCollinearEdgesWithinWire(self, theWire, theVertices = [], theName=None):
7386             """
7387             Suppress the vertices in the wire in case if adjacent edges are C1 continuous.
7388
7389             Parameters:
7390                 theWire Wire to minimize the number of C1 continuous edges in.
7391                 theVertices A list of vertices to suppress. If the list
7392                             is empty, all vertices in a wire will be assumed.
7393                 theName Object name; when specified, this parameter is used
7394                         for result publication in the study. Otherwise, if automatic
7395                         publication is switched on, default value is used for result name.
7396
7397             Returns:
7398                 New GEOM.GEOM_Object with modified wire.
7399             """
7400             anObj = self.HealOp.FuseCollinearEdgesWithinWire(theWire, theVertices)
7401             RaiseIfFailed("FuseCollinearEdgesWithinWire", self.HealOp)
7402             self._autoPublish(anObj, theName, "fuseEdges")
7403             return anObj
7404
7405         ## Change orientation of the given object. Updates given shape.
7406         #  @param theObject Shape to be processed.
7407         #  @return Updated <var>theObject</var>
7408         #
7409         #  @ref swig_todo "Example"
7410         @ManageTransactions("HealOp")
7411         def ChangeOrientationShell(self,theObject):
7412             """
7413             Change orientation of the given object. Updates given shape.
7414
7415             Parameters:
7416                 theObject Shape to be processed.
7417
7418             Returns:
7419                 Updated theObject
7420             """
7421             theObject = self.HealOp.ChangeOrientation(theObject)
7422             RaiseIfFailed("ChangeOrientation", self.HealOp)
7423             pass
7424
7425         ## Change orientation of the given object.
7426         #  @param theObject Shape to be processed.
7427         #  @param theName Object name; when specified, this parameter is used
7428         #         for result publication in the study. Otherwise, if automatic
7429         #         publication is switched on, default value is used for result name.
7430         #
7431         #  @return New GEOM.GEOM_Object, containing processed shape.
7432         #
7433         #  @ref swig_todo "Example"
7434         @ManageTransactions("HealOp")
7435         def ChangeOrientationShellCopy(self, theObject, theName=None):
7436             """
7437             Change orientation of the given object.
7438
7439             Parameters:
7440                 theObject Shape to be processed.
7441                 theName Object name; when specified, this parameter is used
7442                         for result publication in the study. Otherwise, if automatic
7443                         publication is switched on, default value is used for result name.
7444
7445             Returns:
7446                 New GEOM.GEOM_Object, containing processed shape.
7447             """
7448             anObj = self.HealOp.ChangeOrientationCopy(theObject)
7449             RaiseIfFailed("ChangeOrientationCopy", self.HealOp)
7450             self._autoPublish(anObj, theName, "reversed")
7451             return anObj
7452
7453         ## Try to limit tolerance of the given object by value \a theTolerance.
7454         #  @param theObject Shape to be processed.
7455         #  @param theTolerance Required tolerance value.
7456         #  @param theName Object name; when specified, this parameter is used
7457         #         for result publication in the study. Otherwise, if automatic
7458         #         publication is switched on, default value is used for result name.
7459         #
7460         #  @return New GEOM.GEOM_Object, containing processed shape.
7461         #
7462         #  @ref tui_limit_tolerance "Example"
7463         @ManageTransactions("HealOp")
7464         def LimitTolerance(self, theObject, theTolerance = 1e-07, theName=None):
7465             """
7466             Try to limit tolerance of the given object by value theTolerance.
7467
7468             Parameters:
7469                 theObject Shape to be processed.
7470                 theTolerance Required tolerance value.
7471                 theName Object name; when specified, this parameter is used
7472                         for result publication in the study. Otherwise, if automatic
7473                         publication is switched on, default value is used for result name.
7474
7475             Returns:
7476                 New GEOM.GEOM_Object, containing processed shape.
7477             """
7478             anObj = self.HealOp.LimitTolerance(theObject, theTolerance)
7479             RaiseIfFailed("LimitTolerance", self.HealOp)
7480             self._autoPublish(anObj, theName, "limitTolerance")
7481             return anObj
7482
7483         ## Get a list of wires (wrapped in GEOM.GEOM_Object-s),
7484         #  that constitute a free boundary of the given shape.
7485         #  @param theObject Shape to get free boundary of.
7486         #  @param theName Object name; when specified, this parameter is used
7487         #         for result publication in the study. Otherwise, if automatic
7488         #         publication is switched on, default value is used for result name.
7489         #
7490         #  @return [\a status, \a theClosedWires, \a theOpenWires]
7491         #  \n \a status: FALSE, if an error(s) occurred during the method execution.
7492         #  \n \a theClosedWires: Closed wires on the free boundary of the given shape.
7493         #  \n \a theOpenWires: Open wires on the free boundary of the given shape.
7494         #
7495         #  @ref tui_free_boundaries_page "Example"
7496         @ManageTransactions("HealOp")
7497         def GetFreeBoundary(self, theObject, theName=None):
7498             """
7499             Get a list of wires (wrapped in GEOM.GEOM_Object-s),
7500             that constitute a free boundary of the given shape.
7501
7502             Parameters:
7503                 theObject Shape to get free boundary of.
7504                 theName Object name; when specified, this parameter is used
7505                         for result publication in the study. Otherwise, if automatic
7506                         publication is switched on, default value is used for result name.
7507
7508             Returns:
7509                 [status, theClosedWires, theOpenWires]
7510                  status: FALSE, if an error(s) occurred during the method execution.
7511                  theClosedWires: Closed wires on the free boundary of the given shape.
7512                  theOpenWires: Open wires on the free boundary of the given shape.
7513             """
7514             # Example: see GEOM_TestHealing.py
7515             anObj = self.HealOp.GetFreeBoundary( ToList( theObject ))
7516             RaiseIfFailed("GetFreeBoundary", self.HealOp)
7517             self._autoPublish(anObj[1], theName, "closedWire")
7518             self._autoPublish(anObj[2], theName, "openWire")
7519             return anObj
7520
7521         ## Replace coincident faces in \a theShapes by one face.
7522         #  @param theShapes Initial shapes, either a list or compound of shapes.
7523         #  @param theTolerance Maximum distance between faces, which can be considered as coincident.
7524         #  @param doKeepNonSolids If FALSE, only solids will present in the result,
7525         #                         otherwise all initial shapes.
7526         #  @param theName Object name; when specified, this parameter is used
7527         #         for result publication in the study. Otherwise, if automatic
7528         #         publication is switched on, default value is used for result name.
7529         #
7530         #  @return New GEOM.GEOM_Object, containing copies of theShapes without coincident faces.
7531         #
7532         #  @ref tui_glue_faces "Example"
7533         @ManageTransactions("ShapesOp")
7534         def MakeGlueFaces(self, theShapes, theTolerance, doKeepNonSolids=True, theName=None):
7535             """
7536             Replace coincident faces in theShapes by one face.
7537
7538             Parameters:
7539                 theShapes Initial shapes, either a list or compound of shapes.
7540                 theTolerance Maximum distance between faces, which can be considered as coincident.
7541                 doKeepNonSolids If FALSE, only solids will present in the result,
7542                                 otherwise all initial shapes.
7543                 theName Object name; when specified, this parameter is used
7544                         for result publication in the study. Otherwise, if automatic
7545                         publication is switched on, default value is used for result name.
7546
7547             Returns:
7548                 New GEOM.GEOM_Object, containing copies of theShapes without coincident faces.
7549             """
7550             # Example: see GEOM_Spanner.py
7551             theTolerance,Parameters = ParseParameters(theTolerance)
7552             anObj = self.ShapesOp.MakeGlueFaces(ToList(theShapes), theTolerance, doKeepNonSolids)
7553             if anObj is None:
7554                 raise RuntimeError("MakeGlueFaces : " + self.ShapesOp.GetErrorCode())
7555             anObj.SetParameters(Parameters)
7556             self._autoPublish(anObj, theName, "glueFaces")
7557             return anObj
7558
7559         ## Find coincident faces in \a theShapes for possible gluing.
7560         #  @param theShapes Initial shapes, either a list or compound of shapes.
7561         #  @param theTolerance Maximum distance between faces,
7562         #                      which can be considered as coincident.
7563         #  @param theName Object name; when specified, this parameter is used
7564         #         for result publication in the study. Otherwise, if automatic
7565         #         publication is switched on, default value is used for result name.
7566         #
7567         #  @return GEOM.ListOfGO
7568         #
7569         #  @ref tui_glue_faces "Example"
7570         @ManageTransactions("ShapesOp")
7571         def GetGlueFaces(self, theShapes, theTolerance, theName=None):
7572             """
7573             Find coincident faces in theShapes for possible gluing.
7574
7575             Parameters:
7576                 theShapes Initial shapes, either a list or compound of shapes.
7577                 theTolerance Maximum distance between faces,
7578                              which can be considered as coincident.
7579                 theName Object name; when specified, this parameter is used
7580                         for result publication in the study. Otherwise, if automatic
7581                         publication is switched on, default value is used for result name.
7582
7583             Returns:
7584                 GEOM.ListOfGO
7585             """
7586             anObj = self.ShapesOp.GetGlueFaces(ToList(theShapes), theTolerance)
7587             RaiseIfFailed("GetGlueFaces", self.ShapesOp)
7588             self._autoPublish(anObj, theName, "facesToGlue")
7589             return anObj
7590
7591         ## Replace coincident faces in \a theShapes by one face
7592         #  in compliance with given list of faces
7593         #  @param theShapes Initial shapes, either a list or compound of shapes.
7594         #  @param theTolerance Maximum distance between faces,
7595         #                      which can be considered as coincident.
7596         #  @param theFaces List of faces for gluing.
7597         #  @param doKeepNonSolids If FALSE, only solids will present in the result,
7598         #                         otherwise all initial shapes.
7599         #  @param doGlueAllEdges If TRUE, all coincident edges of <VAR>theShape</VAR>
7600         #                        will be glued, otherwise only the edges,
7601         #                        belonging to <VAR>theFaces</VAR>.
7602         #  @param theName Object name; when specified, this parameter is used
7603         #         for result publication in the study. Otherwise, if automatic
7604         #         publication is switched on, default value is used for result name.
7605         #
7606         #  @return New GEOM.GEOM_Object, containing copies of theShapes without coincident faces.
7607         #
7608         #  @ref tui_glue_faces "Example"
7609         @ManageTransactions("ShapesOp")
7610         def MakeGlueFacesByList(self, theShapes, theTolerance, theFaces,
7611                                 doKeepNonSolids=True, doGlueAllEdges=True, theName=None):
7612             """
7613             Replace coincident faces in theShapes by one face
7614             in compliance with given list of faces
7615
7616             Parameters:
7617                 theShapes theShapes Initial shapes, either a list or compound of shapes.
7618                 theTolerance Maximum distance between faces,
7619                              which can be considered as coincident.
7620                 theFaces List of faces for gluing.
7621                 doKeepNonSolids If FALSE, only solids will present in the result,
7622                                 otherwise all initial shapes.
7623                 doGlueAllEdges If TRUE, all coincident edges of theShape
7624                                will be glued, otherwise only the edges,
7625                                belonging to theFaces.
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 faces.
7632             """
7633             anObj = self.ShapesOp.MakeGlueFacesByList(ToList(theShapes), theTolerance, ToList(theFaces),
7634                                                       doKeepNonSolids, doGlueAllEdges)
7635             if anObj is None:
7636                 raise RuntimeError("MakeGlueFacesByList : " + self.ShapesOp.GetErrorCode())
7637             self._autoPublish(anObj, theName, "glueFaces")
7638             return anObj
7639
7640         ## Replace coincident edges in \a theShapes by one edge.
7641         #  @param theShapes Initial shapes, either a list or compound of shapes.
7642         #  @param theTolerance Maximum distance between edges, which can be considered as coincident.
7643         #  @param theName Object name; when specified, this parameter is used
7644         #         for result publication in the study. Otherwise, if automatic
7645         #         publication is switched on, default value is used for result name.
7646         #
7647         #  @return New GEOM.GEOM_Object, containing copies of theShapes without coincident edges.
7648         #
7649         #  @ref tui_glue_edges "Example"
7650         @ManageTransactions("ShapesOp")
7651         def MakeGlueEdges(self, theShapes, theTolerance, theName=None):
7652             """
7653             Replace coincident edges in theShapes by one edge.
7654
7655             Parameters:
7656                 theShapes Initial shapes, either a list or compound of shapes.
7657                 theTolerance Maximum distance between edges, which can be considered as coincident.
7658                 theName Object name; when specified, this parameter is used
7659                         for result publication in the study. Otherwise, if automatic
7660                         publication is switched on, default value is used for result name.
7661
7662             Returns:
7663                 New GEOM.GEOM_Object, containing copies of theShapes without coincident edges.
7664             """
7665             theTolerance,Parameters = ParseParameters(theTolerance)
7666             anObj = self.ShapesOp.MakeGlueEdges(ToList(theShapes), theTolerance)
7667             if anObj is None:
7668                 raise RuntimeError("MakeGlueEdges : " + self.ShapesOp.GetErrorCode())
7669             anObj.SetParameters(Parameters)
7670             self._autoPublish(anObj, theName, "glueEdges")
7671             return anObj
7672
7673         ## Find coincident edges in \a theShapes for possible gluing.
7674         #  @param theShapes Initial shapes, either a list or compound of shapes.
7675         #  @param theTolerance Maximum distance between edges,
7676         #                      which can be considered as coincident.
7677         #  @param theName Object name; when specified, this parameter is used
7678         #         for result publication in the study. Otherwise, if automatic
7679         #         publication is switched on, default value is used for result name.
7680         #
7681         #  @return GEOM.ListOfGO
7682         #
7683         #  @ref tui_glue_edges "Example"
7684         @ManageTransactions("ShapesOp")
7685         def GetGlueEdges(self, theShapes, theTolerance, theName=None):
7686             """
7687             Find coincident edges in theShapes for possible gluing.
7688
7689             Parameters:
7690                 theShapes Initial shapes, either a list or compound of shapes.
7691                 theTolerance Maximum distance between edges,
7692                              which can be considered as coincident.
7693                 theName Object name; when specified, this parameter is used
7694                         for result publication in the study. Otherwise, if automatic
7695                         publication is switched on, default value is used for result name.
7696
7697             Returns:
7698                 GEOM.ListOfGO
7699             """
7700             anObj = self.ShapesOp.GetGlueEdges(ToList(theShapes), theTolerance)
7701             RaiseIfFailed("GetGlueEdges", self.ShapesOp)
7702             self._autoPublish(anObj, theName, "edgesToGlue")
7703             return anObj
7704
7705         ## Replace coincident edges in theShapes by one edge
7706         #  in compliance with given list of edges.
7707         #  @param theShapes Initial shapes, either a list or compound of shapes.
7708         #  @param theTolerance Maximum distance between edges,
7709         #                      which can be considered as coincident.
7710         #  @param theEdges List of edges for gluing.
7711         #  @param theName Object name; when specified, this parameter is used
7712         #         for result publication in the study. Otherwise, if automatic
7713         #         publication is switched on, default value is used for result name.
7714         #
7715         #  @return New GEOM.GEOM_Object, containing copies of theShapes without coincident edges.
7716         #
7717         #  @ref tui_glue_edges "Example"
7718         @ManageTransactions("ShapesOp")
7719         def MakeGlueEdgesByList(self, theShapes, theTolerance, theEdges, theName=None):
7720             """
7721             Replace coincident edges in theShapes by one edge
7722             in compliance with given list of edges.
7723
7724             Parameters:
7725                 theShapes Initial shapes, either a list or compound of shapes.
7726                 theTolerance Maximum distance between edges,
7727                              which can be considered as coincident.
7728                 theEdges List of edges for gluing.
7729                 theName Object name; when specified, this parameter is used
7730                         for result publication in the study. Otherwise, if automatic
7731                         publication is switched on, default value is used for result name.
7732
7733             Returns:
7734                 New GEOM.GEOM_Object, containing copies of theShapes without coincident edges.
7735             """
7736             anObj = self.ShapesOp.MakeGlueEdgesByList(ToList(theShapes), theTolerance, theEdges)
7737             if anObj is None:
7738                 raise RuntimeError("MakeGlueEdgesByList : " + self.ShapesOp.GetErrorCode())
7739             self._autoPublish(anObj, theName, "glueEdges")
7740             return anObj
7741
7742         # end of l3_healing
7743         ## @}
7744
7745         ## @addtogroup l3_boolean Boolean Operations
7746         ## @{
7747
7748         # -----------------------------------------------------------------------------
7749         # Boolean (Common, Cut, Fuse, Section)
7750         # -----------------------------------------------------------------------------
7751
7752         ## Perform one of boolean operations on two given shapes.
7753         #  @param theShape1 First argument for boolean operation.
7754         #  @param theShape2 Second argument for boolean operation.
7755         #  @param theOperation Indicates the operation to be done:\n
7756         #                      1 - Common, 2 - Cut, 3 - Fuse, 4 - Section.
7757         #  @param checkSelfInte The flag that tells if the arguments should
7758         #         be checked for self-intersection prior to the operation.
7759         #  @param theName Object name; when specified, this parameter is used
7760         #         for result publication in the study. Otherwise, if automatic
7761         #         publication is switched on, default value is used for result name.
7762         #
7763         #  @note This algorithm doesn't find all types of self-intersections.
7764         #        It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7765         #        vertex/face and edge/face intersections. Face/face
7766         #        intersections detection is switched off as it is a
7767         #        time-consuming operation that gives an impact on performance.
7768         #        To find all self-intersections please use
7769         #        CheckSelfIntersections() method.
7770         #
7771         #  @return New GEOM.GEOM_Object, containing the result shape.
7772         #
7773         #  @ref tui_fuse "Example"
7774         @ManageTransactions("BoolOp")
7775         def MakeBoolean(self, theShape1, theShape2, theOperation, checkSelfInte=False, theName=None):
7776             """
7777             Perform one of boolean operations on two given shapes.
7778
7779             Parameters:
7780                 theShape1 First argument for boolean operation.
7781                 theShape2 Second argument for boolean operation.
7782                 theOperation Indicates the operation to be done:
7783                              1 - Common, 2 - Cut, 3 - Fuse, 4 - Section.
7784                 checkSelfInte The flag that tells if the arguments should
7785                               be checked for self-intersection prior to
7786                               the operation.
7787                 theName Object name; when specified, this parameter is used
7788                         for result publication in the study. Otherwise, if automatic
7789                         publication is switched on, default value is used for result name.
7790
7791             Note:
7792                     This algorithm doesn't find all types of self-intersections.
7793                     It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7794                     vertex/face and edge/face intersections. Face/face
7795                     intersections detection is switched off as it is a
7796                     time-consuming operation that gives an impact on performance.
7797                     To find all self-intersections please use
7798                     CheckSelfIntersections() method.
7799
7800             Returns:
7801                 New GEOM.GEOM_Object, containing the result shape.
7802             """
7803             # Example: see GEOM_TestAll.py
7804             anObj = self.BoolOp.MakeBoolean(theShape1, theShape2, theOperation, checkSelfInte)
7805             RaiseIfFailed("MakeBoolean", self.BoolOp)
7806             def_names = { 1: "common", 2: "cut", 3: "fuse", 4: "section" }
7807             self._autoPublish(anObj, theName, def_names[theOperation])
7808             return anObj
7809
7810         ## Perform Common boolean operation on two given shapes.
7811         #  @param theShape1 First argument for boolean operation.
7812         #  @param theShape2 Second argument for boolean operation.
7813         #  @param checkSelfInte The flag that tells if the arguments should
7814         #         be checked for self-intersection prior to the operation.
7815         #  @param theName Object name; when specified, this parameter is used
7816         #         for result publication in the study. Otherwise, if automatic
7817         #         publication is switched on, default value is used for result name.
7818         #
7819         #  @note This algorithm doesn't find all types of self-intersections.
7820         #        It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7821         #        vertex/face and edge/face intersections. Face/face
7822         #        intersections detection is switched off as it is a
7823         #        time-consuming operation that gives an impact on performance.
7824         #        To find all self-intersections please use
7825         #        CheckSelfIntersections() method.
7826         #
7827         #  @return New GEOM.GEOM_Object, containing the result shape.
7828         #
7829         #  @ref tui_common "Example 1"
7830         #  \n @ref swig_MakeCommon "Example 2"
7831         def MakeCommon(self, theShape1, theShape2, checkSelfInte=False, theName=None):
7832             """
7833             Perform Common boolean operation on two given shapes.
7834
7835             Parameters:
7836                 theShape1 First argument for boolean operation.
7837                 theShape2 Second argument for boolean operation.
7838                 checkSelfInte The flag that tells if the arguments should
7839                               be checked for self-intersection prior to
7840                               the operation.
7841                 theName Object name; when specified, this parameter is used
7842                         for result publication in the study. Otherwise, if automatic
7843                         publication is switched on, default value is used for result name.
7844
7845             Note:
7846                     This algorithm doesn't find all types of self-intersections.
7847                     It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7848                     vertex/face and edge/face intersections. Face/face
7849                     intersections detection is switched off as it is a
7850                     time-consuming operation that gives an impact on performance.
7851                     To find all self-intersections please use
7852                     CheckSelfIntersections() method.
7853
7854             Returns:
7855                 New GEOM.GEOM_Object, containing the result shape.
7856             """
7857             # Example: see GEOM_TestOthers.py
7858             # note: auto-publishing is done in self.MakeBoolean()
7859             return self.MakeBoolean(theShape1, theShape2, 1, checkSelfInte, theName)
7860
7861         ## Perform Cut boolean operation on two given shapes.
7862         #  @param theShape1 First argument for boolean operation.
7863         #  @param theShape2 Second argument for boolean operation.
7864         #  @param checkSelfInte The flag that tells if the arguments should
7865         #         be checked for self-intersection prior to the operation.
7866         #  @param theName Object name; when specified, this parameter is used
7867         #         for result publication in the study. Otherwise, if automatic
7868         #         publication is switched on, default value is used for result name.
7869         #
7870         #  @note This algorithm doesn't find all types of self-intersections.
7871         #        It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7872         #        vertex/face and edge/face intersections. Face/face
7873         #        intersections detection is switched off as it is a
7874         #        time-consuming operation that gives an impact on performance.
7875         #        To find all self-intersections please use
7876         #        CheckSelfIntersections() method.
7877         #
7878         #  @return New GEOM.GEOM_Object, containing the result shape.
7879         #
7880         #  @ref tui_cut "Example 1"
7881         #  \n @ref swig_MakeCommon "Example 2"
7882         def MakeCut(self, theShape1, theShape2, checkSelfInte=False, theName=None):
7883             """
7884             Perform Cut boolean operation on two given shapes.
7885
7886             Parameters:
7887                 theShape1 First argument for boolean operation.
7888                 theShape2 Second argument for boolean operation.
7889                 checkSelfInte The flag that tells if the arguments should
7890                               be checked for self-intersection prior to
7891                               the operation.
7892                 theName Object name; when specified, this parameter is used
7893                         for result publication in the study. Otherwise, if automatic
7894                         publication is switched on, default value is used for result name.
7895
7896             Note:
7897                     This algorithm doesn't find all types of self-intersections.
7898                     It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7899                     vertex/face and edge/face intersections. Face/face
7900                     intersections detection is switched off as it is a
7901                     time-consuming operation that gives an impact on performance.
7902                     To find all self-intersections please use
7903                     CheckSelfIntersections() method.
7904
7905             Returns:
7906                 New GEOM.GEOM_Object, containing the result shape.
7907
7908             """
7909             # Example: see GEOM_TestOthers.py
7910             # note: auto-publishing is done in self.MakeBoolean()
7911             return self.MakeBoolean(theShape1, theShape2, 2, checkSelfInte, theName)
7912
7913         ## Perform Fuse boolean operation on two given shapes.
7914         #  @param theShape1 First argument for boolean operation.
7915         #  @param theShape2 Second argument for boolean operation.
7916         #  @param checkSelfInte The flag that tells if the arguments should
7917         #         be checked for self-intersection prior to the operation.
7918         #  @param rmExtraEdges The flag that tells if Remove Extra Edges
7919         #         operation should be performed during the operation.
7920         #  @param theName Object name; when specified, this parameter is used
7921         #         for result publication in the study. Otherwise, if automatic
7922         #         publication is switched on, default value is used for result name.
7923         #
7924         #  @note This algorithm doesn't find all types of self-intersections.
7925         #        It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7926         #        vertex/face and edge/face intersections. Face/face
7927         #        intersections detection is switched off as it is a
7928         #        time-consuming operation that gives an impact on performance.
7929         #        To find all self-intersections please use
7930         #        CheckSelfIntersections() method.
7931         #
7932         #  @return New GEOM.GEOM_Object, containing the result shape.
7933         #
7934         #  @ref tui_fuse "Example 1"
7935         #  \n @ref swig_MakeCommon "Example 2"
7936         @ManageTransactions("BoolOp")
7937         def MakeFuse(self, theShape1, theShape2, checkSelfInte=False,
7938                      rmExtraEdges=False, theName=None):
7939             """
7940             Perform Fuse boolean operation on two given shapes.
7941
7942             Parameters:
7943                 theShape1 First argument for boolean operation.
7944                 theShape2 Second argument for boolean operation.
7945                 checkSelfInte The flag that tells if the arguments should
7946                               be checked for self-intersection prior to
7947                               the operation.
7948                 rmExtraEdges The flag that tells if Remove Extra Edges
7949                              operation should be performed during the operation.
7950                 theName Object name; when specified, this parameter is used
7951                         for result publication in the study. Otherwise, if automatic
7952                         publication is switched on, default value is used for result name.
7953
7954             Note:
7955                     This algorithm doesn't find all types of self-intersections.
7956                     It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7957                     vertex/face and edge/face intersections. Face/face
7958                     intersections detection is switched off as it is a
7959                     time-consuming operation that gives an impact on performance.
7960                     To find all self-intersections please use
7961                     CheckSelfIntersections() method.
7962
7963             Returns:
7964                 New GEOM.GEOM_Object, containing the result shape.
7965
7966             """
7967             # Example: see GEOM_TestOthers.py
7968             anObj = self.BoolOp.MakeFuse(theShape1, theShape2,
7969                                          checkSelfInte, rmExtraEdges)
7970             RaiseIfFailed("MakeFuse", self.BoolOp)
7971             self._autoPublish(anObj, theName, "fuse")
7972             return anObj
7973
7974         ## Perform Section boolean operation on two given shapes.
7975         #  @param theShape1 First argument for boolean operation.
7976         #  @param theShape2 Second argument for boolean operation.
7977         #  @param checkSelfInte The flag that tells if the arguments should
7978         #         be checked for self-intersection prior to the operation.
7979         #         If a self-intersection detected the operation fails.
7980         #  @param theName Object name; when specified, this parameter is used
7981         #         for result publication in the study. Otherwise, if automatic
7982         #         publication is switched on, default value is used for result name.
7983         #  @return New GEOM.GEOM_Object, containing the result shape.
7984         #
7985         #  @ref tui_section "Example 1"
7986         #  \n @ref swig_MakeCommon "Example 2"
7987         def MakeSection(self, theShape1, theShape2, checkSelfInte=False, theName=None):
7988             """
7989             Perform Section boolean operation on two given shapes.
7990
7991             Parameters:
7992                 theShape1 First argument for boolean operation.
7993                 theShape2 Second argument for boolean operation.
7994                 checkSelfInte The flag that tells if the arguments should
7995                               be checked for self-intersection prior to the operation.
7996                               If a self-intersection detected the operation fails.
7997                 theName Object name; when specified, this parameter is used
7998                         for result publication in the study. Otherwise, if automatic
7999                         publication is switched on, default value is used for result name.
8000             Returns:
8001                 New GEOM.GEOM_Object, containing the result shape.
8002
8003             """
8004             # Example: see GEOM_TestOthers.py
8005             # note: auto-publishing is done in self.MakeBoolean()
8006             return self.MakeBoolean(theShape1, theShape2, 4, checkSelfInte, theName)
8007
8008         ## Perform Fuse boolean operation on the list of shapes.
8009         #  @param theShapesList Shapes to be fused.
8010         #  @param checkSelfInte The flag that tells if the arguments should
8011         #         be checked for self-intersection prior to the operation.
8012         #  @param rmExtraEdges The flag that tells if Remove Extra Edges
8013         #         operation should be performed during the operation.
8014         #  @param theName Object name; when specified, this parameter is used
8015         #         for result publication in the study. Otherwise, if automatic
8016         #         publication is switched on, default value is used for result name.
8017         #
8018         #  @note This algorithm doesn't find all types of self-intersections.
8019         #        It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
8020         #        vertex/face and edge/face intersections. Face/face
8021         #        intersections detection is switched off as it is a
8022         #        time-consuming operation that gives an impact on performance.
8023         #        To find all self-intersections please use
8024         #        CheckSelfIntersections() method.
8025         #
8026         #  @return New GEOM.GEOM_Object, containing the result shape.
8027         #
8028         #  @ref tui_fuse "Example 1"
8029         #  \n @ref swig_MakeCommon "Example 2"
8030         @ManageTransactions("BoolOp")
8031         def MakeFuseList(self, theShapesList, checkSelfInte=False,
8032                          rmExtraEdges=False, theName=None):
8033             """
8034             Perform Fuse boolean operation on the list of shapes.
8035
8036             Parameters:
8037                 theShapesList Shapes to be fused.
8038                 checkSelfInte The flag that tells if the arguments should
8039                               be checked for self-intersection prior to
8040                               the operation.
8041                 rmExtraEdges The flag that tells if Remove Extra Edges
8042                              operation should be performed during the operation.
8043                 theName Object name; when specified, this parameter is used
8044                         for result publication in the study. Otherwise, if automatic
8045                         publication is switched on, default value is used for result name.
8046
8047             Note:
8048                     This algorithm doesn't find all types of self-intersections.
8049                     It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
8050                     vertex/face and edge/face intersections. Face/face
8051                     intersections detection is switched off as it is a
8052                     time-consuming operation that gives an impact on performance.
8053                     To find all self-intersections please use
8054                     CheckSelfIntersections() method.
8055
8056             Returns:
8057                 New GEOM.GEOM_Object, containing the result shape.
8058
8059             """
8060             # Example: see GEOM_TestOthers.py
8061             anObj = self.BoolOp.MakeFuseList(theShapesList, checkSelfInte,
8062                                              rmExtraEdges)
8063             RaiseIfFailed("MakeFuseList", self.BoolOp)
8064             self._autoPublish(anObj, theName, "fuse")
8065             return anObj
8066
8067         ## Perform Common boolean operation on the list of shapes.
8068         #  @param theShapesList Shapes for Common operation.
8069         #  @param checkSelfInte The flag that tells if the arguments should
8070         #         be checked for self-intersection prior to the operation.
8071         #  @param theName Object name; when specified, this parameter is used
8072         #         for result publication in the study. Otherwise, if automatic
8073         #         publication is switched on, default value is used for result name.
8074         #
8075         #  @note This algorithm doesn't find all types of self-intersections.
8076         #        It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
8077         #        vertex/face and edge/face intersections. Face/face
8078         #        intersections detection is switched off as it is a
8079         #        time-consuming operation that gives an impact on performance.
8080         #        To find all self-intersections please use
8081         #        CheckSelfIntersections() method.
8082         #
8083         #  @return New GEOM.GEOM_Object, containing the result shape.
8084         #
8085         #  @ref tui_common "Example 1"
8086         #  \n @ref swig_MakeCommon "Example 2"
8087         @ManageTransactions("BoolOp")
8088         def MakeCommonList(self, theShapesList, checkSelfInte=False, theName=None):
8089             """
8090             Perform Common boolean operation on the list of shapes.
8091
8092             Parameters:
8093                 theShapesList Shapes for Common operation.
8094                 checkSelfInte The flag that tells if the arguments should
8095                               be checked for self-intersection prior to
8096                               the operation.
8097                 theName Object name; when specified, this parameter is used
8098                         for result publication in the study. Otherwise, if automatic
8099                         publication is switched on, default value is used for result name.
8100
8101             Note:
8102                     This algorithm doesn't find all types of self-intersections.
8103                     It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
8104                     vertex/face and edge/face intersections. Face/face
8105                     intersections detection is switched off as it is a
8106                     time-consuming operation that gives an impact on performance.
8107                     To find all self-intersections please use
8108                     CheckSelfIntersections() method.
8109
8110             Returns:
8111                 New GEOM.GEOM_Object, containing the result shape.
8112
8113             """
8114             # Example: see GEOM_TestOthers.py
8115             anObj = self.BoolOp.MakeCommonList(theShapesList, checkSelfInte)
8116             RaiseIfFailed("MakeCommonList", self.BoolOp)
8117             self._autoPublish(anObj, theName, "common")
8118             return anObj
8119
8120         ## Perform Cut boolean operation on one object and the list of tools.
8121         #  @param theMainShape The object of the operation.
8122         #  @param theShapesList The list of tools of the operation.
8123         #  @param checkSelfInte The flag that tells if the arguments should
8124         #         be checked for self-intersection prior to the operation.
8125         #  @param theName Object name; when specified, this parameter is used
8126         #         for result publication in the study. Otherwise, if automatic
8127         #         publication is switched on, default value is used for result name.
8128         #
8129         #  @note This algorithm doesn't find all types of self-intersections.
8130         #        It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
8131         #        vertex/face and edge/face intersections. Face/face
8132         #        intersections detection is switched off as it is a
8133         #        time-consuming operation that gives an impact on performance.
8134         #        To find all self-intersections please use
8135         #        CheckSelfIntersections() method.
8136         #
8137         #  @return New GEOM.GEOM_Object, containing the result shape.
8138         #
8139         #  @ref tui_cut "Example 1"
8140         #  \n @ref swig_MakeCommon "Example 2"
8141         @ManageTransactions("BoolOp")
8142         def MakeCutList(self, theMainShape, theShapesList, checkSelfInte=False, theName=None):
8143             """
8144             Perform Cut boolean operation on one object and the list of tools.
8145
8146             Parameters:
8147                 theMainShape The object of the operation.
8148                 theShapesList The list of tools of the operation.
8149                 checkSelfInte The flag that tells if the arguments should
8150                               be checked for self-intersection prior to
8151                               the operation.
8152                 theName Object name; when specified, this parameter is used
8153                         for result publication in the study. Otherwise, if automatic
8154                         publication is switched on, default value is used for result name.
8155
8156             Note:
8157                     This algorithm doesn't find all types of self-intersections.
8158                     It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
8159                     vertex/face and edge/face intersections. Face/face
8160                     intersections detection is switched off as it is a
8161                     time-consuming operation that gives an impact on performance.
8162                     To find all self-intersections please use
8163                     CheckSelfIntersections() method.
8164
8165             Returns:
8166                 New GEOM.GEOM_Object, containing the result shape.
8167
8168             """
8169             # Example: see GEOM_TestOthers.py
8170             anObj = self.BoolOp.MakeCutList(theMainShape, theShapesList, checkSelfInte)
8171             RaiseIfFailed("MakeCutList", self.BoolOp)
8172             self._autoPublish(anObj, theName, "cut")
8173             return anObj
8174
8175         # end of l3_boolean
8176         ## @}
8177
8178         ## @addtogroup l3_basic_op
8179         ## @{
8180
8181         ## Perform partition operation.
8182         #  @param ListShapes Shapes to be intersected.
8183         #  @param ListTools Shapes to intersect theShapes.
8184         #  @param Limit Type of resulting shapes (see ShapeType()).\n
8185         #         If this parameter is set to -1 ("Auto"), most appropriate shape limit
8186         #         type will be detected automatically.
8187         #  @param KeepNonlimitShapes if this parameter == 0, then only shapes of
8188         #                             target type (equal to Limit) are kept in the result,
8189         #                             else standalone shapes of lower dimension
8190         #                             are kept also (if they exist).
8191         #
8192         #  @param theName Object name; when specified, this parameter is used
8193         #         for result publication in the study. Otherwise, if automatic
8194         #         publication is switched on, default value is used for result name.
8195         #
8196         #  @note Each compound from ListShapes and ListTools will be exploded
8197         #        in order to avoid possible intersection between shapes from this compound.
8198         #
8199         #  After implementation new version of PartitionAlgo (October 2006)
8200         #  other parameters are ignored by current functionality. They are kept
8201         #  in this function only for support old versions.
8202         #      @param ListKeepInside Shapes, outside which the results will be deleted.
8203         #         Each shape from theKeepInside must belong to theShapes also.
8204         #      @param ListRemoveInside Shapes, inside which the results will be deleted.
8205         #         Each shape from theRemoveInside must belong to theShapes also.
8206         #      @param RemoveWebs If TRUE, perform Glue 3D algorithm.
8207         #      @param ListMaterials Material indices for each shape. Make sense,
8208         #         only if theRemoveWebs is TRUE.
8209         #
8210         #  @return New GEOM.GEOM_Object, containing the result shapes.
8211         #
8212         #  @ref tui_partition "Example"
8213         @ManageTransactions("BoolOp")
8214         def MakePartition(self, ListShapes, ListTools=[], ListKeepInside=[], ListRemoveInside=[],
8215                           Limit=ShapeType["AUTO"], RemoveWebs=0, ListMaterials=[],
8216                           KeepNonlimitShapes=0, theName=None):
8217             """
8218             Perform partition operation.
8219
8220             Parameters:
8221                 ListShapes Shapes to be intersected.
8222                 ListTools Shapes to intersect theShapes.
8223                 Limit Type of resulting shapes (see geompy.ShapeType)
8224                       If this parameter is set to -1 ("Auto"), most appropriate shape limit
8225                       type will be detected automatically.
8226                 KeepNonlimitShapes if this parameter == 0, then only shapes of
8227                                     target type (equal to Limit) are kept in the result,
8228                                     else standalone shapes of lower dimension
8229                                     are kept also (if they exist).
8230
8231                 theName Object name; when specified, this parameter is used
8232                         for result publication in the study. Otherwise, if automatic
8233                         publication is switched on, default value is used for result name.
8234             Note:
8235                     Each compound from ListShapes and ListTools will be exploded
8236                     in order to avoid possible intersection between shapes from
8237                     this compound.
8238
8239             After implementation new version of PartitionAlgo (October 2006) other
8240             parameters are ignored by current functionality. They are kept in this
8241             function only for support old versions.
8242
8243             Ignored parameters:
8244                 ListKeepInside Shapes, outside which the results will be deleted.
8245                                Each shape from theKeepInside must belong to theShapes also.
8246                 ListRemoveInside Shapes, inside which the results will be deleted.
8247                                  Each shape from theRemoveInside must belong to theShapes also.
8248                 RemoveWebs If TRUE, perform Glue 3D algorithm.
8249                 ListMaterials Material indices for each shape. Make sense, only if theRemoveWebs is TRUE.
8250
8251             Returns:
8252                 New GEOM.GEOM_Object, containing the result shapes.
8253             """
8254             # Example: see GEOM_TestAll.py
8255             if Limit == self.ShapeType["AUTO"]:
8256                 # automatic detection of the most appropriate shape limit type
8257                 lim = GEOM.SHAPE
8258                 for s in ListShapes: lim = min(lim, s.GetMaxShapeType())
8259                 Limit = EnumToLong(lim)
8260                 pass
8261             anObj = self.BoolOp.MakePartition(ListShapes, ListTools,
8262                                               ListKeepInside, ListRemoveInside,
8263                                               Limit, RemoveWebs, ListMaterials,
8264                                               KeepNonlimitShapes);
8265             RaiseIfFailed("MakePartition", self.BoolOp)
8266             self._autoPublish(anObj, theName, "partition")
8267             return anObj
8268
8269         ## Perform partition operation.
8270         #  This method may be useful if it is needed to make a partition for
8271         #  compound contains nonintersected shapes. Performance will be better
8272         #  since intersection between shapes from compound is not performed.
8273         #
8274         #  Description of all parameters as in previous method MakePartition().
8275         #  One additional parameter is provided:
8276         #  @param checkSelfInte The flag that tells if the arguments should
8277         #         be checked for self-intersection prior to the operation.
8278         #
8279         #  @note This algorithm doesn't find all types of self-intersections.
8280         #        It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
8281         #        vertex/face and edge/face intersections. Face/face
8282         #        intersections detection is switched off as it is a
8283         #        time-consuming operation that gives an impact on performance.
8284         #        To find all self-intersections please use
8285         #        CheckSelfIntersections() method.
8286         #
8287         #  @note Passed compounds (via ListShapes or via ListTools)
8288         #           have to consist of nonintersecting shapes.
8289         #
8290         #  @return New GEOM.GEOM_Object, containing the result shapes.
8291         #
8292         #  @ref swig_todo "Example"
8293         @ManageTransactions("BoolOp")
8294         def MakePartitionNonSelfIntersectedShape(self, ListShapes, ListTools=[],
8295                                                  ListKeepInside=[], ListRemoveInside=[],
8296                                                  Limit=ShapeType["AUTO"], RemoveWebs=0,
8297                                                  ListMaterials=[], KeepNonlimitShapes=0,
8298                                                  checkSelfInte=False, theName=None):
8299             """
8300             Perform partition operation.
8301             This method may be useful if it is needed to make a partition for
8302             compound contains nonintersected shapes. Performance will be better
8303             since intersection between shapes from compound is not performed.
8304
8305             Parameters:
8306                 Description of all parameters as in method geompy.MakePartition.
8307                 One additional parameter is provided:
8308                 checkSelfInte The flag that tells if the arguments should
8309                               be checked for self-intersection prior to
8310                               the operation.
8311
8312             Note:
8313                     This algorithm doesn't find all types of self-intersections.
8314                     It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
8315                     vertex/face and edge/face intersections. Face/face
8316                     intersections detection is switched off as it is a
8317                     time-consuming operation that gives an impact on performance.
8318                     To find all self-intersections please use
8319                     CheckSelfIntersections() method.
8320
8321             NOTE:
8322                 Passed compounds (via ListShapes or via ListTools)
8323                 have to consist of nonintersecting shapes.
8324
8325             Returns:
8326                 New GEOM.GEOM_Object, containing the result shapes.
8327             """
8328             if Limit == self.ShapeType["AUTO"]:
8329                 # automatic detection of the most appropriate shape limit type
8330                 lim = GEOM.SHAPE
8331                 for s in ListShapes: lim = min(lim, s.GetMaxShapeType())
8332                 Limit = EnumToLong(lim)
8333                 pass
8334             anObj = self.BoolOp.MakePartitionNonSelfIntersectedShape(ListShapes, ListTools,
8335                                                                      ListKeepInside, ListRemoveInside,
8336                                                                      Limit, RemoveWebs, ListMaterials,
8337                                                                      KeepNonlimitShapes, checkSelfInte);
8338             RaiseIfFailed("MakePartitionNonSelfIntersectedShape", self.BoolOp)
8339             self._autoPublish(anObj, theName, "partition")
8340             return anObj
8341
8342         ## See method MakePartition() for more information.
8343         #
8344         #  @ref tui_partition "Example 1"
8345         #  \n @ref swig_Partition "Example 2"
8346         def Partition(self, ListShapes, ListTools=[], ListKeepInside=[], ListRemoveInside=[],
8347                       Limit=ShapeType["AUTO"], RemoveWebs=0, ListMaterials=[],
8348                       KeepNonlimitShapes=0, theName=None):
8349             """
8350             See method geompy.MakePartition for more information.
8351             """
8352             # Example: see GEOM_TestOthers.py
8353             # note: auto-publishing is done in self.MakePartition()
8354             anObj = self.MakePartition(ListShapes, ListTools,
8355                                        ListKeepInside, ListRemoveInside,
8356                                        Limit, RemoveWebs, ListMaterials,
8357                                        KeepNonlimitShapes, theName);
8358             return anObj
8359
8360         ## Perform partition of the Shape with the Plane
8361         #  @param theShape Shape to be intersected.
8362         #  @param thePlane Tool shape, to intersect theShape.
8363         #  @param 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         #  @return New GEOM.GEOM_Object, containing the result shape.
8368         #
8369         #  @note This operation is a shortcut to the more general @ref MakePartition
8370         #  operation, where @a theShape specifies single "object" (shape being partitioned)
8371         #  and @a thePlane specifies single "tool" (intersector shape). Other parameters of
8372         #  @ref MakePartition operation have default values:
8373         #  - @a Limit: GEOM::SHAPE (shape limit corresponds to the type of @a theShape)
8374         #  - @a KeepNonlimitShapes: 0
8375         #  - @a KeepInside, @a RemoveInside, @a RemoveWebs,
8376         #    @a Materials (obsolete parameters): empty
8377         #
8378         #  @note I.e. the following two operations are equivalent:
8379         #  @code
8380         #  Result = geompy.MakeHalfPartition(Object, Plane)
8381         #  Result = geompy.MakePartition([Object], [Plane])
8382         #  @endcode
8383         #
8384         #  @sa MakePartition, MakePartitionNonSelfIntersectedShape
8385         #
8386         #  @ref tui_partition "Example"
8387         @ManageTransactions("BoolOp")
8388         def MakeHalfPartition(self, theShape, thePlane, theName=None):
8389             """
8390             Perform partition of the Shape with the Plane
8391
8392             Parameters:
8393                 theShape Shape to be intersected.
8394                 thePlane Tool shape, to intersect theShape.
8395                 theName Object name; when specified, this parameter is used
8396                         for result publication in the study. Otherwise, if automatic
8397                         publication is switched on, default value is used for result name.
8398
8399             Returns:
8400                 New GEOM.GEOM_Object, containing the result shape.
8401          
8402             Note: This operation is a shortcut to the more general MakePartition
8403             operation, where theShape specifies single "object" (shape being partitioned)
8404             and thePlane specifies single "tool" (intersector shape). Other parameters of
8405             MakePartition operation have default values:
8406             - Limit: GEOM::SHAPE (shape limit corresponds to the type of theShape)
8407             - KeepNonlimitShapes: 0
8408             - KeepInside, RemoveInside, RemoveWebs, Materials (obsolete parameters): empty
8409          
8410             I.e. the following two operations are equivalent:
8411               Result = geompy.MakeHalfPartition(Object, Plane)
8412               Result = geompy.MakePartition([Object], [Plane])
8413             """
8414             # Example: see GEOM_TestAll.py
8415             anObj = self.BoolOp.MakeHalfPartition(theShape, thePlane)
8416             RaiseIfFailed("MakeHalfPartition", self.BoolOp)
8417             self._autoPublish(anObj, theName, "partition")
8418             return anObj
8419
8420         # end of l3_basic_op
8421         ## @}
8422
8423         ## @addtogroup l3_transform
8424         ## @{
8425
8426         ## Translate the given object along the vector, specified
8427         #  by its end points.
8428         #  @param theObject The object to be translated.
8429         #  @param thePoint1 Start point of translation vector.
8430         #  @param thePoint2 End point of translation vector.
8431         #  @param theCopy Flag used to translate object itself or create a copy.
8432         #  @return Translated @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
8433         #  new GEOM.GEOM_Object, containing the translated object if @a theCopy flag is @c True.
8434         @ManageTransactions("TrsfOp")
8435         def TranslateTwoPoints(self, theObject, thePoint1, thePoint2, theCopy=False):
8436             """
8437             Translate the given object along the vector, specified by its end points.
8438
8439             Parameters:
8440                 theObject The object to be translated.
8441                 thePoint1 Start point of translation vector.
8442                 thePoint2 End point of translation vector.
8443                 theCopy Flag used to translate object itself or create a copy.
8444
8445             Returns:
8446                 Translated theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
8447                 new GEOM.GEOM_Object, containing the translated object if theCopy flag is True.
8448             """
8449             if theCopy:
8450                 anObj = self.TrsfOp.TranslateTwoPointsCopy(theObject, thePoint1, thePoint2)
8451             else:
8452                 anObj = self.TrsfOp.TranslateTwoPoints(theObject, thePoint1, thePoint2)
8453             RaiseIfFailed("TranslateTwoPoints", self.TrsfOp)
8454             return anObj
8455
8456         ## Translate the given object along the vector, specified
8457         #  by its end points, creating its copy before the translation.
8458         #  @param theObject The object to be translated.
8459         #  @param thePoint1 Start point of translation vector.
8460         #  @param thePoint2 End point of translation vector.
8461         #  @param theName Object name; when specified, this parameter is used
8462         #         for result publication in the study. Otherwise, if automatic
8463         #         publication is switched on, default value is used for result name.
8464         #
8465         #  @return New GEOM.GEOM_Object, containing the translated object.
8466         #
8467         #  @ref tui_translation "Example 1"
8468         #  \n @ref swig_MakeTranslationTwoPoints "Example 2"
8469         @ManageTransactions("TrsfOp")
8470         def MakeTranslationTwoPoints(self, theObject, thePoint1, thePoint2, theName=None):
8471             """
8472             Translate the given object along the vector, specified
8473             by its end points, creating its copy before the translation.
8474
8475             Parameters:
8476                 theObject The object to be translated.
8477                 thePoint1 Start point of translation vector.
8478                 thePoint2 End point of translation vector.
8479                 theName Object name; when specified, this parameter is used
8480                         for result publication in the study. Otherwise, if automatic
8481                         publication is switched on, default value is used for result name.
8482
8483             Returns:
8484                 New GEOM.GEOM_Object, containing the translated object.
8485             """
8486             # Example: see GEOM_TestAll.py
8487             anObj = self.TrsfOp.TranslateTwoPointsCopy(theObject, thePoint1, thePoint2)
8488             RaiseIfFailed("TranslateTwoPointsCopy", self.TrsfOp)
8489             self._autoPublish(anObj, theName, "translated")
8490             return anObj
8491
8492         ## Translate the given object along the vector, specified by its components.
8493         #  @param theObject The object to be translated.
8494         #  @param theDX,theDY,theDZ Components of translation vector.
8495         #  @param theCopy Flag used to translate object itself or create a copy.
8496         #  @return Translated @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
8497         #  new GEOM.GEOM_Object, containing the translated object if @a theCopy flag is @c True.
8498         #
8499         #  @ref tui_translation "Example"
8500         @ManageTransactions("TrsfOp")
8501         def TranslateDXDYDZ(self, theObject, theDX, theDY, theDZ, theCopy=False):
8502             """
8503             Translate the given object along the vector, specified by its components.
8504
8505             Parameters:
8506                 theObject The object to be translated.
8507                 theDX,theDY,theDZ Components of translation vector.
8508                 theCopy Flag used to translate object itself or create a copy.
8509
8510             Returns:
8511                 Translated theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
8512                 new GEOM.GEOM_Object, containing the translated object if theCopy flag is True.
8513             """
8514             # Example: see GEOM_TestAll.py
8515             theDX, theDY, theDZ, Parameters = ParseParameters(theDX, theDY, theDZ)
8516             if theCopy:
8517                 anObj = self.TrsfOp.TranslateDXDYDZCopy(theObject, theDX, theDY, theDZ)
8518             else:
8519                 anObj = self.TrsfOp.TranslateDXDYDZ(theObject, theDX, theDY, theDZ)
8520             anObj.SetParameters(Parameters)
8521             RaiseIfFailed("TranslateDXDYDZ", self.TrsfOp)
8522             return anObj
8523
8524         ## Translate the given object along the vector, specified
8525         #  by its components, creating its copy before the translation.
8526         #  @param theObject The object to be translated.
8527         #  @param theDX,theDY,theDZ Components of translation vector.
8528         #  @param theName Object name; when specified, this parameter is used
8529         #         for result publication in the study. Otherwise, if automatic
8530         #         publication is switched on, default value is used for result name.
8531         #
8532         #  @return New GEOM.GEOM_Object, containing the translated object.
8533         #
8534         #  @ref tui_translation "Example"
8535         @ManageTransactions("TrsfOp")
8536         def MakeTranslation(self,theObject, theDX, theDY, theDZ, theName=None):
8537             """
8538             Translate the given object along the vector, specified
8539             by its components, creating its copy before the translation.
8540
8541             Parameters:
8542                 theObject The object to be translated.
8543                 theDX,theDY,theDZ Components of translation vector.
8544                 theName Object name; when specified, this parameter is used
8545                         for result publication in the study. Otherwise, if automatic
8546                         publication is switched on, default value is used for result name.
8547
8548             Returns:
8549                 New GEOM.GEOM_Object, containing the translated object.
8550             """
8551             # Example: see GEOM_TestAll.py
8552             theDX, theDY, theDZ, Parameters = ParseParameters(theDX, theDY, theDZ)
8553             anObj = self.TrsfOp.TranslateDXDYDZCopy(theObject, theDX, theDY, theDZ)
8554             anObj.SetParameters(Parameters)
8555             RaiseIfFailed("TranslateDXDYDZ", self.TrsfOp)
8556             self._autoPublish(anObj, theName, "translated")
8557             return anObj
8558
8559         ## Translate the given object along the given vector.
8560         #  @param theObject The object to be translated.
8561         #  @param theVector The translation vector.
8562         #  @param theCopy Flag used to translate object itself or create a copy.
8563         #  @return Translated @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
8564         #  new GEOM.GEOM_Object, containing the translated object if @a theCopy flag is @c True.
8565         @ManageTransactions("TrsfOp")
8566         def TranslateVector(self, theObject, theVector, theCopy=False):
8567             """
8568             Translate the given object along the given vector.
8569
8570             Parameters:
8571                 theObject The object to be translated.
8572                 theVector The translation vector.
8573                 theCopy Flag used to translate object itself or create a copy.
8574
8575             Returns:
8576                 Translated theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
8577                 new GEOM.GEOM_Object, containing the translated object if theCopy flag is True.
8578             """
8579             if theCopy:
8580                 anObj = self.TrsfOp.TranslateVectorCopy(theObject, theVector)
8581             else:
8582                 anObj = self.TrsfOp.TranslateVector(theObject, theVector)
8583             RaiseIfFailed("TranslateVector", self.TrsfOp)
8584             return anObj
8585
8586         ## Translate the given object along the given vector,
8587         #  creating its copy before the translation.
8588         #  @param theObject The object to be translated.
8589         #  @param theVector The translation vector.
8590         #  @param theName Object name; when specified, this parameter is used
8591         #         for result publication in the study. Otherwise, if automatic
8592         #         publication is switched on, default value is used for result name.
8593         #
8594         #  @return New GEOM.GEOM_Object, containing the translated object.
8595         #
8596         #  @ref tui_translation "Example"
8597         @ManageTransactions("TrsfOp")
8598         def MakeTranslationVector(self, theObject, theVector, theName=None):
8599             """
8600             Translate the given object along the given vector,
8601             creating its copy before the translation.
8602
8603             Parameters:
8604                 theObject The object to be translated.
8605                 theVector The translation vector.
8606                 theName Object name; when specified, this parameter is used
8607                         for result publication in the study. Otherwise, if automatic
8608                         publication is switched on, default value is used for result name.
8609
8610             Returns:
8611                 New GEOM.GEOM_Object, containing the translated object.
8612             """
8613             # Example: see GEOM_TestAll.py
8614             anObj = self.TrsfOp.TranslateVectorCopy(theObject, theVector)
8615             RaiseIfFailed("TranslateVectorCopy", self.TrsfOp)
8616             self._autoPublish(anObj, theName, "translated")
8617             return anObj
8618
8619         ## Translate the given object along the given vector on given distance.
8620         #  @param theObject The object to be translated.
8621         #  @param theVector The translation vector.
8622         #  @param theDistance The translation distance.
8623         #  @param theCopy Flag used to translate object itself or create a copy.
8624         #  @return Translated @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
8625         #  new GEOM.GEOM_Object, containing the translated object if @a theCopy flag is @c True.
8626         #
8627         #  @ref tui_translation "Example"
8628         @ManageTransactions("TrsfOp")
8629         def TranslateVectorDistance(self, theObject, theVector, theDistance, theCopy=False):
8630             """
8631             Translate the given object along the given vector on given distance.
8632
8633             Parameters:
8634                 theObject The object to be translated.
8635                 theVector The translation vector.
8636                 theDistance The translation distance.
8637                 theCopy Flag used to translate object itself or create a copy.
8638
8639             Returns:
8640                 Translated theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
8641                 new GEOM.GEOM_Object, containing the translated object if theCopy flag is True.
8642             """
8643             # Example: see GEOM_TestAll.py
8644             theDistance,Parameters = ParseParameters(theDistance)
8645             anObj = self.TrsfOp.TranslateVectorDistance(theObject, theVector, theDistance, theCopy)
8646             RaiseIfFailed("TranslateVectorDistance", self.TrsfOp)
8647             anObj.SetParameters(Parameters)
8648             return anObj
8649
8650         ## Translate the given object along the given vector on given distance,
8651         #  creating its copy before the translation.
8652         #  @param theObject The object to be translated.
8653         #  @param theVector The translation vector.
8654         #  @param theDistance The translation distance.
8655         #  @param theName Object name; when specified, this parameter is used
8656         #         for result publication in the study. Otherwise, if automatic
8657         #         publication is switched on, default value is used for result name.
8658         #
8659         #  @return New GEOM.GEOM_Object, containing the translated object.
8660         #
8661         #  @ref tui_translation "Example"
8662         @ManageTransactions("TrsfOp")
8663         def MakeTranslationVectorDistance(self, theObject, theVector, theDistance, theName=None):
8664             """
8665             Translate the given object along the given vector on given distance,
8666             creating its copy before the translation.
8667
8668             Parameters:
8669                 theObject The object to be translated.
8670                 theVector The translation vector.
8671                 theDistance The translation distance.
8672                 theName Object name; when specified, this parameter is used
8673                         for result publication in the study. Otherwise, if automatic
8674                         publication is switched on, default value is used for result name.
8675
8676             Returns:
8677                 New GEOM.GEOM_Object, containing the translated object.
8678             """
8679             # Example: see GEOM_TestAll.py
8680             theDistance,Parameters = ParseParameters(theDistance)
8681             anObj = self.TrsfOp.TranslateVectorDistance(theObject, theVector, theDistance, 1)
8682             RaiseIfFailed("TranslateVectorDistance", self.TrsfOp)
8683             anObj.SetParameters(Parameters)
8684             self._autoPublish(anObj, theName, "translated")
8685             return anObj
8686
8687         ## Rotate the given object around the given axis on the given angle.
8688         #  @param theObject The object to be rotated.
8689         #  @param theAxis Rotation axis.
8690         #  @param theAngle Rotation angle in radians.
8691         #  @param theCopy Flag used to rotate object itself or create a copy.
8692         #
8693         #  @return Rotated @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
8694         #  new GEOM.GEOM_Object, containing the rotated object if @a theCopy flag is @c True.
8695         #
8696         #  @ref tui_rotation "Example"
8697         @ManageTransactions("TrsfOp")
8698         def Rotate(self, theObject, theAxis, theAngle, theCopy=False):
8699             """
8700             Rotate the given object around the given axis on the given angle.
8701
8702             Parameters:
8703                 theObject The object to be rotated.
8704                 theAxis Rotation axis.
8705                 theAngle Rotation angle in radians.
8706                 theCopy Flag used to rotate object itself or create a copy.
8707
8708             Returns:
8709                 Rotated theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
8710                 new GEOM.GEOM_Object, containing the rotated object if theCopy flag is True.
8711             """
8712             # Example: see GEOM_TestAll.py
8713             flag = False
8714             if isinstance(theAngle,str):
8715                 flag = True
8716             theAngle, Parameters = ParseParameters(theAngle)
8717             if flag:
8718                 theAngle = theAngle*math.pi/180.0
8719             if theCopy:
8720                 anObj = self.TrsfOp.RotateCopy(theObject, theAxis, theAngle)
8721             else:
8722                 anObj = self.TrsfOp.Rotate(theObject, theAxis, theAngle)
8723             RaiseIfFailed("Rotate", self.TrsfOp)
8724             anObj.SetParameters(Parameters)
8725             return anObj
8726
8727         ## Rotate the given object around the given axis
8728         #  on the given angle, creating its copy before the rotation.
8729         #  @param theObject The object to be rotated.
8730         #  @param theAxis Rotation axis.
8731         #  @param theAngle Rotation angle in radians.
8732         #  @param theName Object name; when specified, this parameter is used
8733         #         for result publication in the study. Otherwise, if automatic
8734         #         publication is switched on, default value is used for result name.
8735         #
8736         #  @return New GEOM.GEOM_Object, containing the rotated object.
8737         #
8738         #  @ref tui_rotation "Example"
8739         @ManageTransactions("TrsfOp")
8740         def MakeRotation(self, theObject, theAxis, theAngle, theName=None):
8741             """
8742             Rotate the given object around the given axis
8743             on the given angle, creating its copy before the rotatation.
8744
8745             Parameters:
8746                 theObject The object to be rotated.
8747                 theAxis Rotation axis.
8748                 theAngle Rotation angle in radians.
8749                 theName Object name; when specified, this parameter is used
8750                         for result publication in the study. Otherwise, if automatic
8751                         publication is switched on, default value is used for result name.
8752
8753             Returns:
8754                 New GEOM.GEOM_Object, containing the rotated object.
8755             """
8756             # Example: see GEOM_TestAll.py
8757             flag = False
8758             if isinstance(theAngle,str):
8759                 flag = True
8760             theAngle, Parameters = ParseParameters(theAngle)
8761             if flag:
8762                 theAngle = theAngle*math.pi/180.0
8763             anObj = self.TrsfOp.RotateCopy(theObject, theAxis, theAngle)
8764             RaiseIfFailed("RotateCopy", self.TrsfOp)
8765             anObj.SetParameters(Parameters)
8766             self._autoPublish(anObj, theName, "rotated")
8767             return anObj
8768
8769         ## Rotate given object around vector perpendicular to plane
8770         #  containing three points.
8771         #  @param theObject The object to be rotated.
8772         #  @param theCentPoint central point the axis is the vector perpendicular to the plane
8773         #  containing the three points.
8774         #  @param thePoint1,thePoint2 points in a perpendicular plane of the axis.
8775         #  @param theCopy Flag used to rotate object itself or create a copy.
8776         #  @return Rotated @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
8777         #  new GEOM.GEOM_Object, containing the rotated object if @a theCopy flag is @c True.
8778         @ManageTransactions("TrsfOp")
8779         def RotateThreePoints(self, theObject, theCentPoint, thePoint1, thePoint2, theCopy=False):
8780             """
8781             Rotate given object around vector perpendicular to plane
8782             containing three points.
8783
8784             Parameters:
8785                 theObject The object to be rotated.
8786                 theCentPoint central point  the axis is the vector perpendicular to the plane
8787                              containing the three points.
8788                 thePoint1,thePoint2 points in a perpendicular plane of the axis.
8789                 theCopy Flag used to rotate object itself or create a copy.
8790
8791             Returns:
8792                 Rotated theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
8793                 new GEOM.GEOM_Object, containing the rotated object if theCopy flag is True.
8794             """
8795             if theCopy:
8796                 anObj = self.TrsfOp.RotateThreePointsCopy(theObject, theCentPoint, thePoint1, thePoint2)
8797             else:
8798                 anObj = self.TrsfOp.RotateThreePoints(theObject, theCentPoint, thePoint1, thePoint2)
8799             RaiseIfFailed("RotateThreePoints", self.TrsfOp)
8800             return anObj
8801
8802         ## Rotate given object around vector perpendicular to plane
8803         #  containing three points, creating its copy before the rotatation.
8804         #  @param theObject The object to be rotated.
8805         #  @param theCentPoint central point the axis is the vector perpendicular to the plane
8806         #  containing the three points.
8807         #  @param thePoint1,thePoint2 in a perpendicular plane of the axis.
8808         #  @param theName Object name; when specified, this parameter is used
8809         #         for result publication in the study. Otherwise, if automatic
8810         #         publication is switched on, default value is used for result name.
8811         #
8812         #  @return New GEOM.GEOM_Object, containing the rotated object.
8813         #
8814         #  @ref tui_rotation "Example"
8815         @ManageTransactions("TrsfOp")
8816         def MakeRotationThreePoints(self, theObject, theCentPoint, thePoint1, thePoint2, theName=None):
8817             """
8818             Rotate given object around vector perpendicular to plane
8819             containing three points, creating its copy before the rotatation.
8820
8821             Parameters:
8822                 theObject The object to be rotated.
8823                 theCentPoint central point  the axis is the vector perpendicular to the plane
8824                              containing the three points.
8825                 thePoint1,thePoint2  in a perpendicular plane of the axis.
8826                 theName Object name; when specified, this parameter is used
8827                         for result publication in the study. Otherwise, if automatic
8828                         publication is switched on, default value is used for result name.
8829
8830             Returns:
8831                 New GEOM.GEOM_Object, containing the rotated object.
8832             """
8833             # Example: see GEOM_TestAll.py
8834             anObj = self.TrsfOp.RotateThreePointsCopy(theObject, theCentPoint, thePoint1, thePoint2)
8835             RaiseIfFailed("RotateThreePointsCopy", self.TrsfOp)
8836             self._autoPublish(anObj, theName, "rotated")
8837             return anObj
8838
8839         ## Scale the given object by the specified factor.
8840         #  @param theObject The object to be scaled.
8841         #  @param thePoint Center point for scaling.
8842         #                  Passing None for it means scaling relatively the origin of global CS.
8843         #  @param theFactor Scaling factor value.
8844         #  @param theCopy Flag used to scale object itself or create a copy.
8845         #  @return Scaled @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
8846         #  new GEOM.GEOM_Object, containing the scaled object if @a theCopy flag is @c True.
8847         @ManageTransactions("TrsfOp")
8848         def Scale(self, theObject, thePoint, theFactor, theCopy=False):
8849             """
8850             Scale the given object by the specified factor.
8851
8852             Parameters:
8853                 theObject The object to be scaled.
8854                 thePoint Center point for scaling.
8855                          Passing None for it means scaling relatively the origin of global CS.
8856                 theFactor Scaling factor value.
8857                 theCopy Flag used to scale object itself or create a copy.
8858
8859             Returns:
8860                 Scaled theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
8861                 new GEOM.GEOM_Object, containing the scaled object if theCopy flag is True.
8862             """
8863             # Example: see GEOM_TestAll.py
8864             theFactor, Parameters = ParseParameters(theFactor)
8865             if theCopy:
8866                 anObj = self.TrsfOp.ScaleShapeCopy(theObject, thePoint, theFactor)
8867             else:
8868                 anObj = self.TrsfOp.ScaleShape(theObject, thePoint, theFactor)
8869             RaiseIfFailed("Scale", self.TrsfOp)
8870             anObj.SetParameters(Parameters)
8871             return anObj
8872
8873         ## Scale the given object by the factor, creating its copy before the scaling.
8874         #  @param theObject The object to be scaled.
8875         #  @param thePoint Center point for scaling.
8876         #                  Passing None for it means scaling relatively the origin of global CS.
8877         #  @param theFactor Scaling factor value.
8878         #  @param theName Object name; when specified, this parameter is used
8879         #         for result publication in the study. Otherwise, if automatic
8880         #         publication is switched on, default value is used for result name.
8881         #
8882         #  @return New GEOM.GEOM_Object, containing the scaled shape.
8883         #
8884         #  @ref tui_scale "Example"
8885         @ManageTransactions("TrsfOp")
8886         def MakeScaleTransform(self, theObject, thePoint, theFactor, theName=None):
8887             """
8888             Scale the given object by the factor, creating its copy before the scaling.
8889
8890             Parameters:
8891                 theObject The object to be scaled.
8892                 thePoint Center point for scaling.
8893                          Passing None for it means scaling relatively the origin of global CS.
8894                 theFactor Scaling factor value.
8895                 theName Object name; when specified, this parameter is used
8896                         for result publication in the study. Otherwise, if automatic
8897                         publication is switched on, default value is used for result name.
8898
8899             Returns:
8900                 New GEOM.GEOM_Object, containing the scaled shape.
8901             """
8902             # Example: see GEOM_TestAll.py
8903             theFactor, Parameters = ParseParameters(theFactor)
8904             anObj = self.TrsfOp.ScaleShapeCopy(theObject, thePoint, theFactor)
8905             RaiseIfFailed("ScaleShapeCopy", self.TrsfOp)
8906             anObj.SetParameters(Parameters)
8907             self._autoPublish(anObj, theName, "scaled")
8908             return anObj
8909
8910         ## Scale the given object by different factors along coordinate axes.
8911         #  @param theObject The object to be scaled.
8912         #  @param thePoint Center point for scaling.
8913         #                  Passing None for it means scaling relatively the origin of global CS.
8914         #  @param theFactorX,theFactorY,theFactorZ Scaling factors along each axis.
8915         #  @param theCopy Flag used to scale object itself or create a copy.
8916         #  @return Scaled @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
8917         #  new GEOM.GEOM_Object, containing the scaled object if @a theCopy flag is @c True.
8918         @ManageTransactions("TrsfOp")
8919         def ScaleAlongAxes(self, theObject, thePoint, theFactorX, theFactorY, theFactorZ, theCopy=False):
8920             """
8921             Scale the given object by different factors along coordinate axes.
8922
8923             Parameters:
8924                 theObject The object to be scaled.
8925                 thePoint Center point for scaling.
8926                             Passing None for it means scaling relatively the origin of global CS.
8927                 theFactorX,theFactorY,theFactorZ Scaling factors along each axis.
8928                 theCopy Flag used to scale object itself or create a copy.
8929
8930             Returns:
8931                 Scaled theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
8932                 new GEOM.GEOM_Object, containing the scaled object if theCopy flag is True.
8933             """
8934             # Example: see GEOM_TestAll.py
8935             theFactorX, theFactorY, theFactorZ, Parameters = ParseParameters(theFactorX, theFactorY, theFactorZ)
8936             if theCopy:
8937                 anObj = self.TrsfOp.ScaleShapeAlongAxesCopy(theObject, thePoint,
8938                                                             theFactorX, theFactorY, theFactorZ)
8939             else:
8940                 anObj = self.TrsfOp.ScaleShapeAlongAxes(theObject, thePoint,
8941                                                         theFactorX, theFactorY, theFactorZ)
8942             RaiseIfFailed("ScaleAlongAxes", self.TrsfOp)
8943             anObj.SetParameters(Parameters)
8944             return anObj
8945
8946         ## Scale the given object by different factors along coordinate axes,
8947         #  creating its copy before the scaling.
8948         #  @param theObject The object to be scaled.
8949         #  @param thePoint Center point for scaling.
8950         #                  Passing None for it means scaling relatively the origin of global CS.
8951         #  @param theFactorX,theFactorY,theFactorZ Scaling factors along each axis.
8952         #  @param theName Object name; when specified, this parameter is used
8953         #         for result publication in the study. Otherwise, if automatic
8954         #         publication is switched on, default value is used for result name.
8955         #
8956         #  @return New GEOM.GEOM_Object, containing the scaled shape.
8957         #
8958         #  @ref swig_scale "Example"
8959         @ManageTransactions("TrsfOp")
8960         def MakeScaleAlongAxes(self, theObject, thePoint, theFactorX, theFactorY, theFactorZ, theName=None):
8961             """
8962             Scale the given object by different factors along coordinate axes,
8963             creating its copy before the scaling.
8964
8965             Parameters:
8966                 theObject The object to be scaled.
8967                 thePoint Center point for scaling.
8968                             Passing None for it means scaling relatively the origin of global CS.
8969                 theFactorX,theFactorY,theFactorZ Scaling factors along each axis.
8970                 theName Object name; when specified, this parameter is used
8971                         for result publication in the study. Otherwise, if automatic
8972                         publication is switched on, default value is used for result name.
8973
8974             Returns:
8975                 New GEOM.GEOM_Object, containing the scaled shape.
8976             """
8977             # Example: see GEOM_TestAll.py
8978             theFactorX, theFactorY, theFactorZ, Parameters = ParseParameters(theFactorX, theFactorY, theFactorZ)
8979             anObj = self.TrsfOp.ScaleShapeAlongAxesCopy(theObject, thePoint,
8980                                                         theFactorX, theFactorY, theFactorZ)
8981             RaiseIfFailed("MakeScaleAlongAxes", self.TrsfOp)
8982             anObj.SetParameters(Parameters)
8983             self._autoPublish(anObj, theName, "scaled")
8984             return anObj
8985
8986         ## Mirror an object relatively the given plane.
8987         #  @param theObject The object to be mirrored.
8988         #  @param thePlane Plane of symmetry.
8989         #  @param theCopy Flag used to mirror object itself or create a copy.
8990         #  @return Mirrored @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
8991         #  new GEOM.GEOM_Object, containing the mirrored object if @a theCopy flag is @c True.
8992         @ManageTransactions("TrsfOp")
8993         def MirrorByPlane(self, theObject, thePlane, theCopy=False):
8994             """
8995             Mirror an object relatively the given plane.
8996
8997             Parameters:
8998                 theObject The object to be mirrored.
8999                 thePlane Plane of symmetry.
9000                 theCopy Flag used to mirror object itself or create a copy.
9001
9002             Returns:
9003                 Mirrored theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
9004                 new GEOM.GEOM_Object, containing the mirrored object if theCopy flag is True.
9005             """
9006             if theCopy:
9007                 anObj = self.TrsfOp.MirrorPlaneCopy(theObject, thePlane)
9008             else:
9009                 anObj = self.TrsfOp.MirrorPlane(theObject, thePlane)
9010             RaiseIfFailed("MirrorByPlane", self.TrsfOp)
9011             return anObj
9012
9013         ## Create an object, symmetrical
9014         #  to the given one relatively the given plane.
9015         #  @param theObject The object to be mirrored.
9016         #  @param thePlane Plane of symmetry.
9017         #  @param theName Object name; when specified, this parameter is used
9018         #         for result publication in the study. Otherwise, if automatic
9019         #         publication is switched on, default value is used for result name.
9020         #
9021         #  @return New GEOM.GEOM_Object, containing the mirrored shape.
9022         #
9023         #  @ref tui_mirror "Example"
9024         @ManageTransactions("TrsfOp")
9025         def MakeMirrorByPlane(self, theObject, thePlane, theName=None):
9026             """
9027             Create an object, symmetrical to the given one relatively the given plane.
9028
9029             Parameters:
9030                 theObject The object to be mirrored.
9031                 thePlane Plane of symmetry.
9032                 theName Object name; when specified, this parameter is used
9033                         for result publication in the study. Otherwise, if automatic
9034                         publication is switched on, default value is used for result name.
9035
9036             Returns:
9037                 New GEOM.GEOM_Object, containing the mirrored shape.
9038             """
9039             # Example: see GEOM_TestAll.py
9040             anObj = self.TrsfOp.MirrorPlaneCopy(theObject, thePlane)
9041             RaiseIfFailed("MirrorPlaneCopy", self.TrsfOp)
9042             self._autoPublish(anObj, theName, "mirrored")
9043             return anObj
9044
9045         ## Mirror an object relatively the given axis.
9046         #  @param theObject The object to be mirrored.
9047         #  @param theAxis Axis of symmetry.
9048         #  @param theCopy Flag used to mirror object itself or create a copy.
9049         #  @return Mirrored @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
9050         #  new GEOM.GEOM_Object, containing the mirrored object if @a theCopy flag is @c True.
9051         @ManageTransactions("TrsfOp")
9052         def MirrorByAxis(self, theObject, theAxis, theCopy=False):
9053             """
9054             Mirror an object relatively the given axis.
9055
9056             Parameters:
9057                 theObject The object to be mirrored.
9058                 theAxis Axis of symmetry.
9059                 theCopy Flag used to mirror object itself or create a copy.
9060
9061             Returns:
9062                 Mirrored theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
9063                 new GEOM.GEOM_Object, containing the mirrored object if theCopy flag is True.
9064             """
9065             if theCopy:
9066                 anObj = self.TrsfOp.MirrorAxisCopy(theObject, theAxis)
9067             else:
9068                 anObj = self.TrsfOp.MirrorAxis(theObject, theAxis)
9069             RaiseIfFailed("MirrorByAxis", self.TrsfOp)
9070             return anObj
9071
9072         ## Create an object, symmetrical
9073         #  to the given one relatively the given axis.
9074         #  @param theObject The object to be mirrored.
9075         #  @param theAxis Axis of symmetry.
9076         #  @param theName Object name; when specified, this parameter is used
9077         #         for result publication in the study. Otherwise, if automatic
9078         #         publication is switched on, default value is used for result name.
9079         #
9080         #  @return New GEOM.GEOM_Object, containing the mirrored shape.
9081         #
9082         #  @ref tui_mirror "Example"
9083         @ManageTransactions("TrsfOp")
9084         def MakeMirrorByAxis(self, theObject, theAxis, theName=None):
9085             """
9086             Create an object, symmetrical to the given one relatively the given axis.
9087
9088             Parameters:
9089                 theObject The object to be mirrored.
9090                 theAxis Axis of symmetry.
9091                 theName Object name; when specified, this parameter is used
9092                         for result publication in the study. Otherwise, if automatic
9093                         publication is switched on, default value is used for result name.
9094
9095             Returns:
9096                 New GEOM.GEOM_Object, containing the mirrored shape.
9097             """
9098             # Example: see GEOM_TestAll.py
9099             anObj = self.TrsfOp.MirrorAxisCopy(theObject, theAxis)
9100             RaiseIfFailed("MirrorAxisCopy", self.TrsfOp)
9101             self._autoPublish(anObj, theName, "mirrored")
9102             return anObj
9103
9104         ## Mirror an object relatively the given point.
9105         #  @param theObject The object to be mirrored.
9106         #  @param thePoint Point of symmetry.
9107         #  @param theCopy Flag used to mirror object itself or create a copy.
9108         #  @return Mirrored @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
9109         #  new GEOM.GEOM_Object, containing the mirrored object if @a theCopy flag is @c True.
9110         @ManageTransactions("TrsfOp")
9111         def MirrorByPoint(self, theObject, thePoint, theCopy=False):
9112             """
9113             Mirror an object relatively the given point.
9114
9115             Parameters:
9116                 theObject The object to be mirrored.
9117                 thePoint Point of symmetry.
9118                 theCopy Flag used to mirror object itself or create a copy.
9119
9120             Returns:
9121                 Mirrored theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
9122                 new GEOM.GEOM_Object, containing the mirrored object if theCopy flag is True.
9123             """
9124             # Example: see GEOM_TestAll.py
9125             if theCopy:
9126                 anObj = self.TrsfOp.MirrorPointCopy(theObject, thePoint)
9127             else:
9128                 anObj = self.TrsfOp.MirrorPoint(theObject, thePoint)
9129             RaiseIfFailed("MirrorByPoint", self.TrsfOp)
9130             return anObj
9131
9132         ## Create an object, symmetrical
9133         #  to the given one relatively the given point.
9134         #  @param theObject The object to be mirrored.
9135         #  @param thePoint Point of symmetry.
9136         #  @param theName Object name; when specified, this parameter is used
9137         #         for result publication in the study. Otherwise, if automatic
9138         #         publication is switched on, default value is used for result name.
9139         #
9140         #  @return New GEOM.GEOM_Object, containing the mirrored shape.
9141         #
9142         #  @ref tui_mirror "Example"
9143         @ManageTransactions("TrsfOp")
9144         def MakeMirrorByPoint(self, theObject, thePoint, theName=None):
9145             """
9146             Create an object, symmetrical
9147             to the given one relatively the given point.
9148
9149             Parameters:
9150                 theObject The object to be mirrored.
9151                 thePoint Point of symmetry.
9152                 theName Object name; when specified, this parameter is used
9153                         for result publication in the study. Otherwise, if automatic
9154                         publication is switched on, default value is used for result name.
9155
9156             Returns:
9157                 New GEOM.GEOM_Object, containing the mirrored shape.
9158             """
9159             # Example: see GEOM_TestAll.py
9160             anObj = self.TrsfOp.MirrorPointCopy(theObject, thePoint)
9161             RaiseIfFailed("MirrorPointCopy", self.TrsfOp)
9162             self._autoPublish(anObj, theName, "mirrored")
9163             return anObj
9164
9165         ## Modify the location of the given object.
9166         #  @param theObject The object to be displaced.
9167         #  @param theStartLCS Coordinate system to perform displacement from it.\n
9168         #                     If \a theStartLCS is NULL, displacement
9169         #                     will be performed from global CS.\n
9170         #                     If \a theObject itself is used as \a theStartLCS,
9171         #                     its location will be changed to \a theEndLCS.
9172         #  @param theEndLCS Coordinate system to perform displacement to it.
9173         #  @param theCopy Flag used to displace object itself or create a copy.
9174         #  @return Displaced @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
9175         #  new GEOM.GEOM_Object, containing the displaced object if @a theCopy flag is @c True.
9176         @ManageTransactions("TrsfOp")
9177         def Position(self, theObject, theStartLCS, theEndLCS, theCopy=False):
9178             """
9179             Modify the Location of the given object by LCS, creating its copy before the setting.
9180
9181             Parameters:
9182                 theObject The object to be displaced.
9183                 theStartLCS Coordinate system to perform displacement from it.
9184                             If theStartLCS is NULL, displacement
9185                             will be performed from global CS.
9186                             If theObject itself is used as theStartLCS,
9187                             its location will be changed to theEndLCS.
9188                 theEndLCS Coordinate system to perform displacement to it.
9189                 theCopy Flag used to displace object itself or create a copy.
9190
9191             Returns:
9192                 Displaced theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
9193                 new GEOM.GEOM_Object, containing the displaced object if theCopy flag is True.
9194             """
9195             # Example: see GEOM_TestAll.py
9196             if theCopy:
9197                 anObj = self.TrsfOp.PositionShapeCopy(theObject, theStartLCS, theEndLCS)
9198             else:
9199                 anObj = self.TrsfOp.PositionShape(theObject, theStartLCS, theEndLCS)
9200             RaiseIfFailed("Displace", self.TrsfOp)
9201             return anObj
9202
9203         ## Modify the Location of the given object by LCS,
9204         #  creating its copy before the setting.
9205         #  @param theObject The object to be displaced.
9206         #  @param theStartLCS Coordinate system to perform displacement from it.\n
9207         #                     If \a theStartLCS is NULL, displacement
9208         #                     will be performed from global CS.\n
9209         #                     If \a theObject itself is used as \a theStartLCS,
9210         #                     its location will be changed to \a theEndLCS.
9211         #  @param theEndLCS Coordinate system to perform displacement to it.
9212         #  @param theName Object name; when specified, this parameter is used
9213         #         for result publication in the study. Otherwise, if automatic
9214         #         publication is switched on, default value is used for result name.
9215         #
9216         #  @return New GEOM.GEOM_Object, containing the displaced shape.
9217         #
9218         #  @ref tui_modify_location "Example"
9219         @ManageTransactions("TrsfOp")
9220         def MakePosition(self, theObject, theStartLCS, theEndLCS, theName=None):
9221             """
9222             Modify the Location of the given object by LCS, creating its copy before the setting.
9223
9224             Parameters:
9225                 theObject The object to be displaced.
9226                 theStartLCS Coordinate system to perform displacement from it.
9227                             If theStartLCS is NULL, displacement
9228                             will be performed from global CS.
9229                             If theObject itself is used as theStartLCS,
9230                             its location will be changed to theEndLCS.
9231                 theEndLCS Coordinate system to perform displacement to it.
9232                 theName Object name; when specified, this parameter is used
9233                         for result publication in the study. Otherwise, if automatic
9234                         publication is switched on, default value is used for result name.
9235
9236             Returns:
9237                 New GEOM.GEOM_Object, containing the displaced shape.
9238
9239             Example of usage:
9240                 # create local coordinate systems
9241                 cs1 = geompy.MakeMarker( 0, 0, 0, 1,0,0, 0,1,0)
9242                 cs2 = geompy.MakeMarker(30,40,40, 1,0,0, 0,1,0)
9243                 # modify the location of the given object
9244                 position = geompy.MakePosition(cylinder, cs1, cs2)
9245             """
9246             # Example: see GEOM_TestAll.py
9247             anObj = self.TrsfOp.PositionShapeCopy(theObject, theStartLCS, theEndLCS)
9248             RaiseIfFailed("PositionShapeCopy", self.TrsfOp)
9249             self._autoPublish(anObj, theName, "displaced")
9250             return anObj
9251
9252         ## Modify the Location of the given object by Path.
9253         #  @param  theObject The object to be displaced.
9254         #  @param  thePath Wire or Edge along that the object will be translated.
9255         #  @param  theDistance progress of Path (0 = start location, 1 = end of path location).
9256         #  @param  theCopy is to create a copy objects if true.
9257         #  @param  theReverse  0 - for usual direction, 1 - to reverse path direction.
9258         #  @return Displaced @a theObject (GEOM.GEOM_Object) if @a theCopy is @c False or
9259         #          new GEOM.GEOM_Object, containing the displaced shape if @a theCopy is @c True.
9260         #
9261         #  @ref tui_modify_location "Example"
9262         @ManageTransactions("TrsfOp")
9263         def PositionAlongPath(self,theObject, thePath, theDistance, theCopy, theReverse):
9264             """
9265             Modify the Location of the given object by Path.
9266
9267             Parameters:
9268                  theObject The object to be displaced.
9269                  thePath Wire or Edge along that the object will be translated.
9270                  theDistance progress of Path (0 = start location, 1 = end of path location).
9271                  theCopy is to create a copy objects if true.
9272                  theReverse  0 - for usual direction, 1 - to reverse path direction.
9273
9274             Returns:
9275                  Displaced theObject (GEOM.GEOM_Object) if theCopy is False or
9276                  new GEOM.GEOM_Object, containing the displaced shape if theCopy is True.
9277
9278             Example of usage:
9279                 position = geompy.PositionAlongPath(cylinder, circle, 0.75, 1, 1)
9280             """
9281             # Example: see GEOM_TestAll.py
9282             anObj = self.TrsfOp.PositionAlongPath(theObject, thePath, theDistance, theCopy, theReverse)
9283             RaiseIfFailed("PositionAlongPath", self.TrsfOp)
9284             return anObj
9285
9286         ## Modify the Location of the given object by Path, creating its copy before the operation.
9287         #  @param theObject The object to be displaced.
9288         #  @param thePath Wire or Edge along that the object will be translated.
9289         #  @param theDistance progress of Path (0 = start location, 1 = end of path location).
9290         #  @param theReverse  0 - for usual direction, 1 - to reverse path direction.
9291         #  @param theName Object name; when specified, this parameter is used
9292         #         for result publication in the study. Otherwise, if automatic
9293         #         publication is switched on, default value is used for result name.
9294         #
9295         #  @return New GEOM.GEOM_Object, containing the displaced shape.
9296         @ManageTransactions("TrsfOp")
9297         def MakePositionAlongPath(self, theObject, thePath, theDistance, theReverse, theName=None):
9298             """
9299             Modify the Location of the given object by Path, creating its copy before the operation.
9300
9301             Parameters:
9302                  theObject The object to be displaced.
9303                  thePath Wire or Edge along that the object will be translated.
9304                  theDistance progress of Path (0 = start location, 1 = end of path location).
9305                  theReverse  0 - for usual direction, 1 - to reverse path direction.
9306                  theName Object name; when specified, this parameter is used
9307                          for result publication in the study. Otherwise, if automatic
9308                          publication is switched on, default value is used for result name.
9309
9310             Returns:
9311                 New GEOM.GEOM_Object, containing the displaced shape.
9312             """
9313             # Example: see GEOM_TestAll.py
9314             anObj = self.TrsfOp.PositionAlongPath(theObject, thePath, theDistance, 1, theReverse)
9315             RaiseIfFailed("PositionAlongPath", self.TrsfOp)
9316             self._autoPublish(anObj, theName, "displaced")
9317             return anObj
9318
9319         ## Offset given shape.
9320         #  @param theObject The base object for the offset.
9321         #  @param theOffset Offset value.
9322         #  @param theCopy Flag used to offset object itself or create a copy.
9323         #  @return Modified @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
9324         #  new GEOM.GEOM_Object, containing the result of offset operation if @a theCopy flag is @c True.
9325         @ManageTransactions("TrsfOp")
9326         def Offset(self, theObject, theOffset, theCopy=False):
9327             """
9328             Offset given shape.
9329
9330             Parameters:
9331                 theObject The base object for the offset.
9332                 theOffset Offset value.
9333                 theCopy Flag used to offset object itself or create a copy.
9334
9335             Returns:
9336                 Modified theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
9337                 new GEOM.GEOM_Object, containing the result of offset operation if theCopy flag is True.
9338             """
9339             theOffset, Parameters = ParseParameters(theOffset)
9340             if theCopy:
9341                 anObj = self.TrsfOp.OffsetShapeCopy(theObject, theOffset, True)
9342             else:
9343                 anObj = self.TrsfOp.OffsetShape(theObject, theOffset, True)
9344             RaiseIfFailed("Offset", self.TrsfOp)
9345             anObj.SetParameters(Parameters)
9346             return anObj
9347
9348         ## Create new object as offset of the given one. Gap between two adjacent
9349         #  offset surfaces is filled by a pipe.
9350         #  @param theObject The base object for the offset.
9351         #  @param theOffset Offset value.
9352         #  @param theName Object name; when specified, this parameter is used
9353         #         for result publication in the study. Otherwise, if automatic
9354         #         publication is switched on, default value is used for result name.
9355         #
9356         #  @return New GEOM.GEOM_Object, containing the offset object.
9357         #
9358         #  @sa MakeOffsetIntersectionJoin
9359         #  @ref tui_offset "Example"
9360         @ManageTransactions("TrsfOp")
9361         def MakeOffset(self, theObject, theOffset, theName=None):
9362             """
9363             Create new object as offset of the given one. Gap between adjacent
9364             offset surfaces is filled by a pipe.
9365
9366             Parameters:
9367                 theObject The base object for the offset.
9368                 theOffset Offset value.
9369                 theName Object name; when specified, this parameter is used
9370                         for result publication in the study. Otherwise, if automatic
9371                         publication is switched on, default value is used for result name.
9372
9373             Returns:
9374                 New GEOM.GEOM_Object, containing the offset object.
9375
9376             Example of usage:
9377                  box = geompy.MakeBox(20, 20, 20, 200, 200, 200)
9378                  # create a new object as offset of the given object
9379                  offset = geompy.MakeOffset(box, 70.)
9380             """
9381             # Example: see GEOM_TestAll.py
9382             theOffset, Parameters = ParseParameters(theOffset)
9383             anObj = self.TrsfOp.OffsetShapeCopy( theObject, theOffset, True )
9384             RaiseIfFailed("OffsetShapeCopy", self.TrsfOp)
9385             anObj.SetParameters(Parameters)
9386             self._autoPublish(anObj, theName, "offset")
9387             return anObj
9388
9389         ## Create new object as offset of the given one. Gap between adjacent
9390         #  offset surfaces is filled by extending and intersecting them.
9391         #  @param theObject The base object for the offset.
9392         #  @param theOffset Offset value.
9393         #  @param theName Object name; when specified, this parameter is used
9394         #         for result publication in the study. Otherwise, if automatic
9395         #         publication is switched on, default value is used for result name.
9396         #
9397         #  @return New GEOM.GEOM_Object, containing the offset object.
9398         #
9399         #  @sa MakeOffset
9400         #  @ref tui_offset "Example"
9401         @ManageTransactions("TrsfOp")
9402         def MakeOffsetIntersectionJoin(self, theObject, theOffset, theName=None):
9403             """
9404             Create new object as offset of the given one. Gap between adjacent
9405             offset surfaces is filled by extending and intersecting them.
9406
9407             Parameters:
9408                 theObject The base object for the offset.
9409                 theOffset Offset value.
9410                 theName Object name; when specified, this parameter is used
9411                         for result publication in the study. Otherwise, if automatic
9412                         publication is switched on, default value is used for result name.
9413
9414             Returns:
9415                 New GEOM.GEOM_Object, containing the offset object.
9416
9417             Example of usage:
9418                  box = geompy.MakeBox(20, 20, 20, 200, 200, 200)
9419                  # create a new box extended by 70
9420                  offset = geompy.MakeOffsetIntersectionJoin(box, 70.)
9421             """
9422             # Example: see GEOM_TestAll.py
9423             theOffset, Parameters = ParseParameters( theOffset )
9424             anObj = self.TrsfOp.OffsetShapeCopy( theObject, theOffset, False )
9425             RaiseIfFailed("OffsetShapeCopy", self.TrsfOp)
9426             anObj.SetParameters(Parameters)
9427             self._autoPublish(anObj, theName, "offset")
9428             return anObj
9429
9430         ## Create new object as projection of the given one on another.
9431         #  @param theSource The source object for the projection. It can be a point, edge or wire.
9432         #         Edge and wire are acceptable if @a theTarget is a face.
9433         #  @param theTarget The target object. It can be planar or cylindrical face, edge or wire.
9434         #  @param theName Object name; when specified, this parameter is used
9435         #         for result publication in the study. Otherwise, if automatic
9436         #         publication is switched on, default value is used for result name.
9437         #
9438         #  @return New GEOM.GEOM_Object, containing the projection.
9439         #
9440         #  @ref tui_projection "Example"
9441         @ManageTransactions("TrsfOp")
9442         def MakeProjection(self, theSource, theTarget, theName=None):
9443             """
9444             Create new object as projection of the given one on another.
9445
9446             Parameters:
9447                 theSource The source object for the projection. It can be a point, edge or wire.
9448                           Edge and wire are acceptable if theTarget is a face.
9449                 theTarget The target object. It can be planar or cylindrical face, edge or wire.
9450                 theName Object name; when specified, this parameter is used
9451                         for result publication in the study. Otherwise, if automatic
9452                         publication is switched on, default value is used for result name.
9453
9454             Returns:
9455                 New GEOM.GEOM_Object, containing the projection.
9456             """
9457             # Example: see GEOM_TestAll.py
9458             anObj = self.TrsfOp.ProjectShapeCopy(theSource, theTarget)
9459             RaiseIfFailed("ProjectShapeCopy", self.TrsfOp)
9460             self._autoPublish(anObj, theName, "projection")
9461             return anObj
9462
9463         ## Create a projection of the given point on a wire or an edge.
9464         #  If there are no solutions or there are 2 or more solutions It throws an
9465         #  exception.
9466         #  @param thePoint the point to be projected.
9467         #  @param theWire the wire. The edge is accepted as well.
9468         #  @param theName Object name; when specified, this parameter is used
9469         #         for result publication in the study. Otherwise, if automatic
9470         #         publication is switched on, default value is used for result name.
9471         #
9472         #  @return [\a u, \a PointOnEdge, \a EdgeInWireIndex]
9473         #  \n \a u: The parameter of projection point on edge.
9474         #  \n \a PointOnEdge: The projection point.
9475         #  \n \a EdgeInWireIndex: The index of an edge in a wire.
9476         #
9477         #  @ref tui_projection "Example"
9478         @ManageTransactions("TrsfOp")
9479         def MakeProjectionOnWire(self, thePoint, theWire, theName=None):
9480             """
9481             Create a projection of the given point on a wire or an edge.
9482             If there are no solutions or there are 2 or more solutions It throws an
9483             exception.
9484
9485             Parameters:
9486                 thePoint the point to be projected.
9487                 theWire the wire. The edge is accepted as well.
9488                 theName Object name; when specified, this parameter is used
9489                         for result publication in the study. Otherwise, if automatic
9490                         publication is switched on, default value is used for result name.
9491
9492             Returns:
9493                 [u, PointOnEdge, EdgeInWireIndex]
9494                  u: The parameter of projection point on edge.
9495                  PointOnEdge: The projection point.
9496                  EdgeInWireIndex: The index of an edge in a wire.
9497             """
9498             # Example: see GEOM_TestAll.py
9499             anObj = self.TrsfOp.ProjectPointOnWire(thePoint, theWire)
9500             RaiseIfFailed("ProjectPointOnWire", self.TrsfOp)
9501             self._autoPublish(anObj[1], theName, "projection")
9502             return anObj
9503
9504         # -----------------------------------------------------------------------------
9505         # Patterns
9506         # -----------------------------------------------------------------------------
9507
9508         ## Translate the given object along the given vector a given number times
9509         #  @param theObject The object to be translated.
9510         #  @param theVector Direction of the translation. DX if None.
9511         #  @param theStep Distance to translate on.
9512         #  @param theNbTimes Quantity of translations to be done.
9513         #  @param theName Object name; when specified, this parameter is used
9514         #         for result publication in the study. Otherwise, if automatic
9515         #         publication is switched on, default value is used for result name.
9516         #
9517         #  @return New GEOM.GEOM_Object, containing compound of all
9518         #          the shapes, obtained after each translation.
9519         #
9520         #  @ref tui_multi_translation "Example"
9521         @ManageTransactions("TrsfOp")
9522         def MakeMultiTranslation1D(self, theObject, theVector, theStep, theNbTimes, theName=None):
9523             """
9524             Translate the given object along the given vector a given number times
9525
9526             Parameters:
9527                 theObject The object to be translated.
9528                 theVector Direction of the translation. DX if None.
9529                 theStep Distance to translate on.
9530                 theNbTimes Quantity of translations to be done.
9531                 theName Object name; when specified, this parameter is used
9532                         for result publication in the study. Otherwise, if automatic
9533                         publication is switched on, default value is used for result name.
9534
9535             Returns:
9536                 New GEOM.GEOM_Object, containing compound of all
9537                 the shapes, obtained after each translation.
9538
9539             Example of usage:
9540                 r1d = geompy.MakeMultiTranslation1D(prism, vect, 20, 4)
9541             """
9542             # Example: see GEOM_TestAll.py
9543             theStep, theNbTimes, Parameters = ParseParameters(theStep, theNbTimes)
9544             anObj = self.TrsfOp.MultiTranslate1D(theObject, theVector, theStep, theNbTimes)
9545             RaiseIfFailed("MultiTranslate1D", self.TrsfOp)
9546             anObj.SetParameters(Parameters)
9547             self._autoPublish(anObj, theName, "multitranslation")
9548             return anObj
9549
9550         ## Conseqently apply two specified translations to theObject specified number of times.
9551         #  @param theObject The object to be translated.
9552         #  @param theVector1 Direction of the first translation. DX if None.
9553         #  @param theStep1 Step of the first translation.
9554         #  @param theNbTimes1 Quantity of translations to be done along theVector1.
9555         #  @param theVector2 Direction of the second translation. DY if None.
9556         #  @param theStep2 Step of the second translation.
9557         #  @param theNbTimes2 Quantity of translations to be done along theVector2.
9558         #  @param theName Object name; when specified, this parameter is used
9559         #         for result publication in the study. Otherwise, if automatic
9560         #         publication is switched on, default value is used for result name.
9561         #
9562         #  @return New GEOM.GEOM_Object, containing compound of all
9563         #          the shapes, obtained after each translation.
9564         #
9565         #  @ref tui_multi_translation "Example"
9566         @ManageTransactions("TrsfOp")
9567         def MakeMultiTranslation2D(self, theObject, theVector1, theStep1, theNbTimes1,
9568                                    theVector2, theStep2, theNbTimes2, theName=None):
9569             """
9570             Conseqently apply two specified translations to theObject specified number of times.
9571
9572             Parameters:
9573                 theObject The object to be translated.
9574                 theVector1 Direction of the first translation. DX if None.
9575                 theStep1 Step of the first translation.
9576                 theNbTimes1 Quantity of translations to be done along theVector1.
9577                 theVector2 Direction of the second translation. DY if None.
9578                 theStep2 Step of the second translation.
9579                 theNbTimes2 Quantity of translations to be done along theVector2.
9580                 theName Object name; when specified, this parameter is used
9581                         for result publication in the study. Otherwise, if automatic
9582                         publication is switched on, default value is used for result name.
9583
9584             Returns:
9585                 New GEOM.GEOM_Object, containing compound of all
9586                 the shapes, obtained after each translation.
9587
9588             Example of usage:
9589                 tr2d = geompy.MakeMultiTranslation2D(prism, vect1, 20, 4, vect2, 80, 3)
9590             """
9591             # Example: see GEOM_TestAll.py
9592             theStep1,theNbTimes1,theStep2,theNbTimes2, Parameters = ParseParameters(theStep1,theNbTimes1,theStep2,theNbTimes2)
9593             anObj = self.TrsfOp.MultiTranslate2D(theObject, theVector1, theStep1, theNbTimes1,
9594                                                  theVector2, theStep2, theNbTimes2)
9595             RaiseIfFailed("MultiTranslate2D", self.TrsfOp)
9596             anObj.SetParameters(Parameters)
9597             self._autoPublish(anObj, theName, "multitranslation")
9598             return anObj
9599
9600         ## Rotate the given object around the given axis a given number times.
9601         #  Rotation angle will be 2*PI/theNbTimes.
9602         #  @param theObject The object to be rotated.
9603         #  @param theAxis The rotation axis. DZ if None.
9604         #  @param theNbTimes Quantity of rotations to be done.
9605         #  @param theName Object name; when specified, this parameter is used
9606         #         for result publication in the study. Otherwise, if automatic
9607         #         publication is switched on, default value is used for result name.
9608         #
9609         #  @return New GEOM.GEOM_Object, containing compound of all the
9610         #          shapes, obtained after each rotation.
9611         #
9612         #  @ref tui_multi_rotation "Example"
9613         @ManageTransactions("TrsfOp")
9614         def MultiRotate1DNbTimes (self, theObject, theAxis, theNbTimes, theName=None):
9615             """
9616             Rotate the given object around the given axis a given number times.
9617             Rotation angle will be 2*PI/theNbTimes.
9618
9619             Parameters:
9620                 theObject The object to be rotated.
9621                 theAxis The rotation axis. DZ if None.
9622                 theNbTimes Quantity of rotations to be done.
9623                 theName Object name; when specified, this parameter is used
9624                         for result publication in the study. Otherwise, if automatic
9625                         publication is switched on, default value is used for result name.
9626
9627             Returns:
9628                 New GEOM.GEOM_Object, containing compound of all the
9629                 shapes, obtained after each rotation.
9630
9631             Example of usage:
9632                 rot1d = geompy.MultiRotate1DNbTimes(prism, vect, 4)
9633             """
9634             # Example: see GEOM_TestAll.py
9635             theNbTimes, Parameters = ParseParameters(theNbTimes)
9636             anObj = self.TrsfOp.MultiRotate1D(theObject, theAxis, theNbTimes)
9637             RaiseIfFailed("MultiRotate1DNbTimes", self.TrsfOp)
9638             anObj.SetParameters(Parameters)
9639             self._autoPublish(anObj, theName, "multirotation")
9640             return anObj
9641
9642         ## Rotate the given object around the given axis
9643         #  a given number times on the given angle.
9644         #  @param theObject The object to be rotated.
9645         #  @param theAxis The rotation axis. DZ if None.
9646         #  @param theAngleStep Rotation angle in radians.
9647         #  @param theNbTimes Quantity of rotations to be done.
9648         #  @param theName Object name; when specified, this parameter is used
9649         #         for result publication in the study. Otherwise, if automatic
9650         #         publication is switched on, default value is used for result name.
9651         #
9652         #  @return New GEOM.GEOM_Object, containing compound of all the
9653         #          shapes, obtained after each rotation.
9654         #
9655         #  @ref tui_multi_rotation "Example"
9656         @ManageTransactions("TrsfOp")
9657         def MultiRotate1DByStep(self, theObject, theAxis, theAngleStep, theNbTimes, theName=None):
9658             """
9659             Rotate the given object around the given axis
9660             a given number times on the given angle.
9661
9662             Parameters:
9663                 theObject The object to be rotated.
9664                 theAxis The rotation axis. DZ if None.
9665                 theAngleStep Rotation angle in radians.
9666                 theNbTimes Quantity of rotations to be done.
9667                 theName Object name; when specified, this parameter is used
9668                         for result publication in the study. Otherwise, if automatic
9669                         publication is switched on, default value is used for result name.
9670
9671             Returns:
9672                 New GEOM.GEOM_Object, containing compound of all the
9673                 shapes, obtained after each rotation.
9674
9675             Example of usage:
9676                 rot1d = geompy.MultiRotate1DByStep(prism, vect, math.pi/4, 4)
9677             """
9678             # Example: see GEOM_TestAll.py
9679             theAngleStep, theNbTimes, Parameters = ParseParameters(theAngleStep, theNbTimes)
9680             anObj = self.TrsfOp.MultiRotate1DByStep(theObject, theAxis, theAngleStep, theNbTimes)
9681             RaiseIfFailed("MultiRotate1DByStep", self.TrsfOp)
9682             anObj.SetParameters(Parameters)
9683             self._autoPublish(anObj, theName, "multirotation")
9684             return anObj
9685
9686         ## Rotate the given object around the given axis a given
9687         #  number times and multi-translate each rotation result.
9688         #  Rotation angle will be 2*PI/theNbTimes1.
9689         #  Translation direction passes through center of gravity
9690         #  of rotated shape and its projection on the rotation axis.
9691         #  @param theObject The object to be rotated.
9692         #  @param theAxis Rotation axis. DZ if None.
9693         #  @param theNbTimes1 Quantity of rotations to be done.
9694         #  @param theRadialStep Translation distance.
9695         #  @param theNbTimes2 Quantity of translations to be done.
9696         #  @param theName Object name; when specified, this parameter is used
9697         #         for result publication in the study. Otherwise, if automatic
9698         #         publication is switched on, default value is used for result name.
9699         #
9700         #  @return New GEOM.GEOM_Object, containing compound of all the
9701         #          shapes, obtained after each transformation.
9702         #
9703         #  @ref tui_multi_rotation "Example"
9704         @ManageTransactions("TrsfOp")
9705         def MultiRotate2DNbTimes(self, theObject, theAxis, theNbTimes1, theRadialStep, theNbTimes2, theName=None):
9706             """
9707             Rotate the given object around the
9708             given axis on the given angle a given number
9709             times and multi-translate each rotation result.
9710             Translation direction passes through center of gravity
9711             of rotated shape and its projection on the rotation axis.
9712
9713             Parameters:
9714                 theObject The object to be rotated.
9715                 theAxis Rotation axis. DZ if None.
9716                 theNbTimes1 Quantity of rotations to be done.
9717                 theRadialStep Translation distance.
9718                 theNbTimes2 Quantity of translations to be done.
9719                 theName Object name; when specified, this parameter is used
9720                         for result publication in the study. Otherwise, if automatic
9721                         publication is switched on, default value is used for result name.
9722
9723             Returns:
9724                 New GEOM.GEOM_Object, containing compound of all the
9725                 shapes, obtained after each transformation.
9726
9727             Example of usage:
9728                 rot2d = geompy.MultiRotate2D(prism, vect, 60, 4, 50, 5)
9729             """
9730             # Example: see GEOM_TestAll.py
9731             theNbTimes1, theRadialStep, theNbTimes2, Parameters = ParseParameters(theNbTimes1, theRadialStep, theNbTimes2)
9732             anObj = self.TrsfOp.MultiRotate2DNbTimes(theObject, theAxis, theNbTimes1, theRadialStep, theNbTimes2)
9733             RaiseIfFailed("MultiRotate2DNbTimes", self.TrsfOp)
9734             anObj.SetParameters(Parameters)
9735             self._autoPublish(anObj, theName, "multirotation")
9736             return anObj
9737
9738         ## Rotate the given object around the
9739         #  given axis on the given angle a given number
9740         #  times and multi-translate each rotation result.
9741         #  Translation direction passes through center of gravity
9742         #  of rotated shape and its projection on the rotation axis.
9743         #  @param theObject The object to be rotated.
9744         #  @param theAxis Rotation axis. DZ if None.
9745         #  @param theAngleStep Rotation angle in radians.
9746         #  @param theNbTimes1 Quantity of rotations to be done.
9747         #  @param theRadialStep Translation distance.
9748         #  @param theNbTimes2 Quantity of translations to be done.
9749         #  @param theName Object name; when specified, this parameter is used
9750         #         for result publication in the study. Otherwise, if automatic
9751         #         publication is switched on, default value is used for result name.
9752         #
9753         #  @return New GEOM.GEOM_Object, containing compound of all the
9754         #          shapes, obtained after each transformation.
9755         #
9756         #  @ref tui_multi_rotation "Example"
9757         @ManageTransactions("TrsfOp")
9758         def MultiRotate2DByStep (self, theObject, theAxis, theAngleStep, theNbTimes1, theRadialStep, theNbTimes2, theName=None):
9759             """
9760             Rotate the given object around the
9761             given axis on the given angle a given number
9762             times and multi-translate each rotation result.
9763             Translation direction passes through center of gravity
9764             of rotated shape and its projection on the rotation axis.
9765
9766             Parameters:
9767                 theObject The object to be rotated.
9768                 theAxis Rotation axis. DZ if None.
9769                 theAngleStep Rotation angle in radians.
9770                 theNbTimes1 Quantity of rotations to be done.
9771                 theRadialStep Translation distance.
9772                 theNbTimes2 Quantity of translations to be done.
9773                 theName Object name; when specified, this parameter is used
9774                         for result publication in the study. Otherwise, if automatic
9775                         publication is switched on, default value is used for result name.
9776
9777             Returns:
9778                 New GEOM.GEOM_Object, containing compound of all the
9779                 shapes, obtained after each transformation.
9780
9781             Example of usage:
9782                 rot2d = geompy.MultiRotate2D(prism, vect, math.pi/3, 4, 50, 5)
9783             """
9784             # Example: see GEOM_TestAll.py
9785             theAngleStep, theNbTimes1, theRadialStep, theNbTimes2, Parameters = ParseParameters(theAngleStep, theNbTimes1, theRadialStep, theNbTimes2)
9786             anObj = self.TrsfOp.MultiRotate2DByStep(theObject, theAxis, theAngleStep, theNbTimes1, theRadialStep, theNbTimes2)
9787             RaiseIfFailed("MultiRotate2DByStep", self.TrsfOp)
9788             anObj.SetParameters(Parameters)
9789             self._autoPublish(anObj, theName, "multirotation")
9790             return anObj
9791
9792         ## The same, as MultiRotate1DNbTimes(), but axis is given by direction and point
9793         #
9794         #  @ref swig_MakeMultiRotation "Example"
9795         def MakeMultiRotation1DNbTimes(self, aShape, aDir, aPoint, aNbTimes, theName=None):
9796             """
9797             The same, as geompy.MultiRotate1DNbTimes, but axis is given by direction and point
9798
9799             Example of usage:
9800                 pz = geompy.MakeVertex(0, 0, 100)
9801                 vy = geompy.MakeVectorDXDYDZ(0, 100, 0)
9802                 MultiRot1D = geompy.MakeMultiRotation1DNbTimes(prism, vy, pz, 6)
9803             """
9804             # Example: see GEOM_TestOthers.py
9805             aVec = self.MakeLine(aPoint,aDir)
9806             # note: auto-publishing is done in self.MultiRotate1D()
9807             anObj = self.MultiRotate1DNbTimes(aShape, aVec, aNbTimes, theName)
9808             return anObj
9809
9810         ## The same, as MultiRotate1DByStep(), but axis is given by direction and point
9811         #
9812         #  @ref swig_MakeMultiRotation "Example"
9813         def MakeMultiRotation1DByStep(self, aShape, aDir, aPoint, anAngle, aNbTimes, theName=None):
9814             """
9815             The same, as geompy.MultiRotate1D, but axis is given by direction and point
9816
9817             Example of usage:
9818                 pz = geompy.MakeVertex(0, 0, 100)
9819                 vy = geompy.MakeVectorDXDYDZ(0, 100, 0)
9820                 MultiRot1D = geompy.MakeMultiRotation1DByStep(prism, vy, pz, math.pi/3, 6)
9821             """
9822             # Example: see GEOM_TestOthers.py
9823             aVec = self.MakeLine(aPoint,aDir)
9824             # note: auto-publishing is done in self.MultiRotate1D()
9825             anObj = self.MultiRotate1DByStep(aShape, aVec, anAngle, aNbTimes, theName)
9826             return anObj
9827
9828         ## The same, as MultiRotate2DNbTimes(), but axis is given by direction and point
9829         #
9830         #  @ref swig_MakeMultiRotation "Example"
9831         def MakeMultiRotation2DNbTimes(self, aShape, aDir, aPoint, nbtimes1, aStep, nbtimes2, theName=None):
9832             """
9833             The same, as MultiRotate2DNbTimes(), but axis is given by direction and point
9834
9835             Example of usage:
9836                 pz = geompy.MakeVertex(0, 0, 100)
9837                 vy = geompy.MakeVectorDXDYDZ(0, 100, 0)
9838                 MultiRot2D = geompy.MakeMultiRotation2DNbTimes(f12, vy, pz, 6, 30, 3)
9839             """
9840             # Example: see GEOM_TestOthers.py
9841             aVec = self.MakeLine(aPoint,aDir)
9842             # note: auto-publishing is done in self.MultiRotate2DNbTimes()
9843             anObj = self.MultiRotate2DNbTimes(aShape, aVec, nbtimes1, aStep, nbtimes2, theName)
9844             return anObj
9845
9846         ## The same, as MultiRotate2DByStep(), but axis is given by direction and point
9847         #
9848         #  @ref swig_MakeMultiRotation "Example"
9849         def MakeMultiRotation2DByStep(self, aShape, aDir, aPoint, anAngle, nbtimes1, aStep, nbtimes2, theName=None):
9850             """
9851             The same, as MultiRotate2DByStep(), but axis is given by direction and point
9852
9853             Example of usage:
9854                 pz = geompy.MakeVertex(0, 0, 100)
9855                 vy = geompy.MakeVectorDXDYDZ(0, 100, 0)
9856                 MultiRot2D = geompy.MakeMultiRotation2DByStep(f12, vy, pz, math.pi/4, 6, 30, 3)
9857             """
9858             # Example: see GEOM_TestOthers.py
9859             aVec = self.MakeLine(aPoint,aDir)
9860             # note: auto-publishing is done in self.MultiRotate2D()
9861             anObj = self.MultiRotate2DByStep(aShape, aVec, anAngle, nbtimes1, aStep, nbtimes2, theName)
9862             return anObj
9863
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         #  @param theObject The object to be projected. It can be either
9870         #         a planar wire or a face.
9871         #  @param theRadius The radius of the cylinder.
9872         #  @param theStartAngle The starting angle in radians from
9873         #         the cylinder's X axis around Z axis. The angle from which
9874         #         the projection is started.
9875         #  @param theAngleLength The projection length angle in radians.
9876         #         The angle in which to project the total length of the wire.
9877         #         If it is negative the projection is not scaled and natural
9878         #         wire length is kept for the projection.
9879         #  @param theAngleRotation The desired angle in radians between
9880         #         the tangent vector to the first curve at the first point of
9881         #         the theObject's projection in 2D space and U-direction of
9882         #         cylinder's 2D space.
9883         #  @param 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         #  @return New GEOM.GEOM_Object, containing the result shape. The result
9888         #         represents a wire or a face that represents a projection of
9889         #         the source shape onto a cylinder.
9890         #
9891         #  @ref tui_projection "Example"
9892         def MakeProjectionOnCylinder (self, theObject, theRadius,
9893                                       theStartAngle=0.0, theAngleLength=-1.0,
9894                                       theAngleRotation=0.0,
9895                                       theName=None):
9896             """
9897             Compute a wire or a face that represents a projection of the source
9898             shape onto cylinder. The cylinder's coordinate system is the same
9899             as the global coordinate system.
9900
9901             Parameters:
9902                 theObject The object to be projected. It can be either
9903                         a planar wire or a face.
9904                 theRadius The radius of the cylinder.
9905                 theStartAngle The starting angle in radians from the cylinder's X axis
9906                         around Z axis. The angle from which the projection is started.
9907                 theAngleLength The projection length angle in radians. The angle in which
9908                         to project the total length of the wire. If it is negative the
9909                         projection is not scaled and natural wire length is kept for
9910                         the projection.
9911                 theAngleRotation The desired angle in radians between
9912                         the tangent vector to the first curve at the first
9913                         point of the theObject's projection in 2D space and
9914                         U-direction of cylinder's 2D space.
9915                 theName Object name; when specified, this parameter is used
9916                         for result publication in the study. Otherwise, if automatic
9917                         publication is switched on, default value is used for result name.
9918
9919             Returns:
9920                 New GEOM.GEOM_Object, containing the result shape. The result
9921                 represents a wire or a face that represents a projection of
9922                 the source shape onto a cylinder.
9923             """
9924             # Example: see GEOM_TestAll.py
9925             flagStartAngle = False
9926             if isinstance(theStartAngle,str):
9927                 flagStartAngle = True
9928             flagAngleLength = False
9929             if isinstance(theAngleLength,str):
9930                 flagAngleLength = True
9931             flagAngleRotation = False
9932             if isinstance(theAngleRotation,str):
9933                 flagAngleRotation = True
9934             theRadius, theStartAngle, theAngleLength, theAngleRotation, Parameters = ParseParameters(
9935               theRadius, theStartAngle, theAngleLength, theAngleRotation)
9936             if flagStartAngle:
9937                 theStartAngle = theStartAngle*math.pi/180.
9938             if flagAngleLength:
9939                 theAngleLength = theAngleLength*math.pi/180.
9940             if flagAngleRotation:
9941                 theAngleRotation = theAngleRotation*math.pi/180.
9942             anObj = self.TrsfOp.MakeProjectionOnCylinder(theObject, theRadius,
9943                 theStartAngle, theAngleLength, theAngleRotation)
9944             RaiseIfFailed("MakeProjectionOnCylinder", self.TrsfOp)
9945             anObj.SetParameters(Parameters)
9946             self._autoPublish(anObj, theName, "projection")
9947             return anObj
9948
9949         # end of l3_transform
9950         ## @}
9951
9952         ## @addtogroup l3_transform_d
9953         ## @{
9954
9955         ## Deprecated method. Use MultiRotate1DNbTimes instead.
9956         def MultiRotate1D(self, theObject, theAxis, theNbTimes, theName=None):
9957             """
9958             Deprecated method. Use MultiRotate1DNbTimes instead.
9959             """
9960             print("The method MultiRotate1D is DEPRECATED. Use MultiRotate1DNbTimes instead.")
9961             return self.MultiRotate1DNbTimes(theObject, theAxis, theNbTimes, theName)
9962
9963         ## The same, as MultiRotate2DByStep(), but theAngle is in degrees.
9964         #  This method is DEPRECATED. Use MultiRotate2DByStep() instead.
9965         @ManageTransactions("TrsfOp")
9966         def MultiRotate2D(self, theObject, theAxis, theAngle, theNbTimes1, theStep, theNbTimes2, theName=None):
9967             """
9968             The same, as MultiRotate2DByStep(), but theAngle is in degrees.
9969             This method is DEPRECATED. Use MultiRotate2DByStep() instead.
9970
9971             Example of usage:
9972                 rot2d = geompy.MultiRotate2D(prism, vect, 60, 4, 50, 5)
9973             """
9974             print("The method MultiRotate2D is DEPRECATED. Use MultiRotate2DByStep instead.")
9975             theAngle, theNbTimes1, theStep, theNbTimes2, Parameters = ParseParameters(theAngle, theNbTimes1, theStep, theNbTimes2)
9976             anObj = self.TrsfOp.MultiRotate2D(theObject, theAxis, theAngle, theNbTimes1, theStep, theNbTimes2)
9977             RaiseIfFailed("MultiRotate2D", self.TrsfOp)
9978             anObj.SetParameters(Parameters)
9979             self._autoPublish(anObj, theName, "multirotation")
9980             return anObj
9981
9982         ## The same, as MultiRotate1D(), but axis is given by direction and point
9983         #  This method is DEPRECATED. Use MakeMultiRotation1DNbTimes instead.
9984         def MakeMultiRotation1D(self, aShape, aDir, aPoint, aNbTimes, theName=None):
9985             """
9986             The same, as geompy.MultiRotate1D, but axis is given by direction and point.
9987             This method is DEPRECATED. Use MakeMultiRotation1DNbTimes instead.
9988
9989             Example of usage:
9990                 pz = geompy.MakeVertex(0, 0, 100)
9991                 vy = geompy.MakeVectorDXDYDZ(0, 100, 0)
9992                 MultiRot1D = geompy.MakeMultiRotation1D(prism, vy, pz, 6)
9993             """
9994             print("The method MakeMultiRotation1D is DEPRECATED. Use MakeMultiRotation1DNbTimes instead.")
9995             aVec = self.MakeLine(aPoint,aDir)
9996             # note: auto-publishing is done in self.MultiRotate1D()
9997             anObj = self.MultiRotate1D(aShape, aVec, aNbTimes, theName)
9998             return anObj
9999
10000         ## The same, as MultiRotate2D(), but axis is given by direction and point
10001         #  This method is DEPRECATED. Use MakeMultiRotation2DByStep instead.
10002         def MakeMultiRotation2D(self, aShape, aDir, aPoint, anAngle, nbtimes1, aStep, nbtimes2, theName=None):
10003             """
10004             The same, as MultiRotate2D(), but axis is given by direction and point
10005             This method is DEPRECATED. Use MakeMultiRotation2DByStep instead.
10006
10007             Example of usage:
10008                 pz = geompy.MakeVertex(0, 0, 100)
10009                 vy = geompy.MakeVectorDXDYDZ(0, 100, 0)
10010                 MultiRot2D = geompy.MakeMultiRotation2D(f12, vy, pz, 45, 6, 30, 3)
10011             """
10012             print("The method MakeMultiRotation2D is DEPRECATED. Use MakeMultiRotation2DByStep instead.")
10013             aVec = self.MakeLine(aPoint,aDir)
10014             # note: auto-publishing is done in self.MultiRotate2D()
10015             anObj = self.MultiRotate2D(aShape, aVec, anAngle, nbtimes1, aStep, nbtimes2, theName)
10016             return anObj
10017
10018         # end of l3_transform_d
10019         ## @}
10020
10021         ## @addtogroup l3_local
10022         ## @{
10023
10024         ## Perform a fillet on all edges of the given shape.
10025         #  @param theShape Shape, to perform fillet on.
10026         #  @param theR Fillet radius.
10027         #  @param theName Object name; when specified, this parameter is used
10028         #         for result publication in the study. Otherwise, if automatic
10029         #         publication is switched on, default value is used for result name.
10030         #
10031         #  @return New GEOM.GEOM_Object, containing the result shape.
10032         #
10033         #  @ref tui_fillet "Example 1"
10034         #  \n @ref swig_MakeFilletAll "Example 2"
10035         @ManageTransactions("LocalOp")
10036         def MakeFilletAll(self, theShape, theR, theName=None):
10037             """
10038             Perform a fillet on all edges of the given shape.
10039
10040             Parameters:
10041                 theShape Shape, to perform fillet on.
10042                 theR Fillet radius.
10043                 theName Object name; when specified, this parameter is used
10044                         for result publication in the study. Otherwise, if automatic
10045                         publication is switched on, default value is used for result name.
10046
10047             Returns:
10048                 New GEOM.GEOM_Object, containing the result shape.
10049
10050             Example of usage:
10051                filletall = geompy.MakeFilletAll(prism, 10.)
10052             """
10053             # Example: see GEOM_TestOthers.py
10054             theR,Parameters = ParseParameters(theR)
10055             anObj = self.LocalOp.MakeFilletAll(theShape, theR)
10056             RaiseIfFailed("MakeFilletAll", self.LocalOp)
10057             anObj.SetParameters(Parameters)
10058             self._autoPublish(anObj, theName, "fillet")
10059             return anObj
10060
10061         ## Perform a fillet on the specified edges/faces of the given shape
10062         #  @param theShape Shape, to perform fillet on.
10063         #  @param theR Fillet radius.
10064         #  @param theShapeType Type of shapes in <VAR>theListShapes</VAR> (see ShapeType())
10065         #  @param theListShapes Global indices of edges/faces to perform fillet on.
10066         #  @param theName Object name; when specified, this parameter is used
10067         #         for result publication in the study. Otherwise, if automatic
10068         #         publication is switched on, default value is used for result name.
10069         #
10070         #  @note Global index of sub-shape can be obtained, using method GetSubShapeID().
10071         #
10072         #  @return New GEOM.GEOM_Object, containing the result shape.
10073         #
10074         #  @ref tui_fillet "Example"
10075         @ManageTransactions("LocalOp")
10076         def MakeFillet(self, theShape, theR, theShapeType, theListShapes, theName=None):
10077             """
10078             Perform a fillet on the specified edges/faces of the given shape
10079
10080             Parameters:
10081                 theShape Shape, to perform fillet on.
10082                 theR Fillet radius.
10083                 theShapeType Type of shapes in theListShapes (see geompy.ShapeTypes)
10084                 theListShapes Global indices of edges/faces to perform fillet on.
10085                 theName Object name; when specified, this parameter is used
10086                         for result publication in the study. Otherwise, if automatic
10087                         publication is switched on, default value is used for result name.
10088
10089             Note:
10090                 Global index of sub-shape can be obtained, using method geompy.GetSubShapeID
10091
10092             Returns:
10093                 New GEOM.GEOM_Object, containing the result shape.
10094
10095             Example of usage:
10096                 # get the list of IDs (IDList) for the fillet
10097                 prism_edges = geompy.SubShapeAllSortedCentres(prism, geompy.ShapeType["EDGE"])
10098                 IDlist_e = []
10099                 IDlist_e.append(geompy.GetSubShapeID(prism, prism_edges[0]))
10100                 IDlist_e.append(geompy.GetSubShapeID(prism, prism_edges[1]))
10101                 IDlist_e.append(geompy.GetSubShapeID(prism, prism_edges[2]))
10102                 # make a fillet on the specified edges of the given shape
10103                 fillet = geompy.MakeFillet(prism, 10., geompy.ShapeType["EDGE"], IDlist_e)
10104             """
10105             # Example: see GEOM_TestAll.py
10106             theR,Parameters = ParseParameters(theR)
10107             anObj = None
10108             if theShapeType == self.ShapeType["EDGE"]:
10109                 anObj = self.LocalOp.MakeFilletEdges(theShape, theR, theListShapes)
10110                 RaiseIfFailed("MakeFilletEdges", self.LocalOp)
10111             else:
10112                 anObj = self.LocalOp.MakeFilletFaces(theShape, theR, theListShapes)
10113                 RaiseIfFailed("MakeFilletFaces", self.LocalOp)
10114             anObj.SetParameters(Parameters)
10115             self._autoPublish(anObj, theName, "fillet")
10116             return anObj
10117
10118         ## The same that MakeFillet() but with two Fillet Radius R1 and R2
10119         @ManageTransactions("LocalOp")
10120         def MakeFilletR1R2(self, theShape, theR1, theR2, theShapeType, theListShapes, theName=None):
10121             """
10122             The same that geompy.MakeFillet but with two Fillet Radius R1 and R2
10123
10124             Example of usage:
10125                 # get the list of IDs (IDList) for the fillet
10126                 prism_edges = geompy.SubShapeAllSortedCentres(prism, geompy.ShapeType["EDGE"])
10127                 IDlist_e = []
10128                 IDlist_e.append(geompy.GetSubShapeID(prism, prism_edges[0]))
10129                 IDlist_e.append(geompy.GetSubShapeID(prism, prism_edges[1]))
10130                 IDlist_e.append(geompy.GetSubShapeID(prism, prism_edges[2]))
10131                 # make a fillet on the specified edges of the given shape
10132                 fillet = geompy.MakeFillet(prism, 10., 15., geompy.ShapeType["EDGE"], IDlist_e)
10133             """
10134             theR1,theR2,Parameters = ParseParameters(theR1,theR2)
10135             anObj = None
10136             if theShapeType == self.ShapeType["EDGE"]:
10137                 anObj = self.LocalOp.MakeFilletEdgesR1R2(theShape, theR1, theR2, theListShapes)
10138                 RaiseIfFailed("MakeFilletEdgesR1R2", self.LocalOp)
10139             else:
10140                 anObj = self.LocalOp.MakeFilletFacesR1R2(theShape, theR1, theR2, theListShapes)
10141                 RaiseIfFailed("MakeFilletFacesR1R2", self.LocalOp)
10142             anObj.SetParameters(Parameters)
10143             self._autoPublish(anObj, theName, "fillet")
10144             return anObj
10145
10146         ## Perform a fillet on the specified edges of the given shape
10147         #  @param theShape  Wire Shape to perform fillet on.
10148         #  @param theR  Fillet radius.
10149         #  @param theListOfVertexes Global indices of vertexes to perform fillet on.
10150         #    \note Global index of sub-shape can be obtained, using method GetSubShapeID()
10151         #    \note The list of vertices could be empty,
10152         #          in this case fillet will done done at all vertices in wire
10153         #  @param doIgnoreSecantVertices If FALSE, fillet radius is always limited
10154         #         by the length of the edges, nearest to the fillet vertex.
10155         #         But sometimes the next edge is C1 continuous with the one, nearest to
10156         #         the fillet point, and such two (or more) edges can be united to allow
10157         #         bigger radius. Set this flag to TRUE to allow collinear edges union,
10158         #         thus ignoring the secant vertex (vertices).
10159         #  @param theName Object name; when specified, this parameter is used
10160         #         for result publication in the study. Otherwise, if automatic
10161         #         publication is switched on, default value is used for result name.
10162         #
10163         #  @return New GEOM.GEOM_Object, containing the result shape.
10164         #
10165         #  @ref tui_fillet2d "Example"
10166         @ManageTransactions("LocalOp")
10167         def MakeFillet1D(self, theShape, theR, theListOfVertexes, doIgnoreSecantVertices = True, theName=None):
10168             """
10169             Perform a fillet on the specified edges of the given shape
10170
10171             Parameters:
10172                 theShape  Wire Shape to perform fillet on.
10173                 theR  Fillet radius.
10174                 theListOfVertexes Global indices of vertexes to perform fillet on.
10175                 doIgnoreSecantVertices If FALSE, fillet radius is always limited
10176                     by the length of the edges, nearest to the fillet vertex.
10177                     But sometimes the next edge is C1 continuous with the one, nearest to
10178                     the fillet point, and such two (or more) edges can be united to allow
10179                     bigger radius. Set this flag to TRUE to allow collinear edges union,
10180                     thus ignoring the secant vertex (vertices).
10181                 theName Object name; when specified, this parameter is used
10182                         for result publication in the study. Otherwise, if automatic
10183                         publication is switched on, default value is used for result name.
10184             Note:
10185                 Global index of sub-shape can be obtained, using method geompy.GetSubShapeID
10186
10187                 The list of vertices could be empty,in this case fillet will done done at all vertices in wire
10188
10189             Returns:
10190                 New GEOM.GEOM_Object, containing the result shape.
10191
10192             Example of usage:
10193                 # create wire
10194                 Wire_1 = geompy.MakeWire([Edge_12, Edge_7, Edge_11, Edge_6, Edge_1,Edge_4])
10195                 # make fillet at given wire vertices with giver radius
10196                 Fillet_1D_1 = geompy.MakeFillet1D(Wire_1, 55, [3, 4, 6, 8, 10])
10197             """
10198             # Example: see GEOM_TestAll.py
10199             theR,doIgnoreSecantVertices,Parameters = ParseParameters(theR,doIgnoreSecantVertices)
10200             anObj = self.LocalOp.MakeFillet1D(theShape, theR, theListOfVertexes, doIgnoreSecantVertices)
10201             RaiseIfFailed("MakeFillet1D", self.LocalOp)
10202             anObj.SetParameters(Parameters)
10203             self._autoPublish(anObj, theName, "fillet")
10204             return anObj
10205
10206         ## Perform a fillet at the specified vertices of the given face/shell.
10207         #  @param theShape Face or Shell shape to perform fillet on.
10208         #  @param theR Fillet radius.
10209         #  @param theListOfVertexes Global indices of vertexes to perform fillet on.
10210         #  @param theName Object name; when specified, this parameter is used
10211         #         for result publication in the study. Otherwise, if automatic
10212         #         publication is switched on, default value is used for result name.
10213         #
10214         #  @note Global index of sub-shape can be obtained, using method GetSubShapeID().
10215         #
10216         #  @return New GEOM.GEOM_Object, containing the result shape.
10217         #
10218         #  @ref tui_fillet2d "Example"
10219         @ManageTransactions("LocalOp")
10220         def MakeFillet2D(self, theShape, theR, theListOfVertexes, theName=None):
10221             """
10222             Perform a fillet at the specified vertices of the given face/shell.
10223
10224             Parameters:
10225                 theShape  Face or Shell shape to perform fillet on.
10226                 theR  Fillet radius.
10227                 theListOfVertexes Global indices of vertexes to perform fillet on.
10228                 theName Object name; when specified, this parameter is used
10229                         for result publication in the study. Otherwise, if automatic
10230                         publication is switched on, default value is used for result name.
10231             Note:
10232                 Global index of sub-shape can be obtained, using method geompy.GetSubShapeID
10233
10234             Returns:
10235                 New GEOM.GEOM_Object, containing the result shape.
10236
10237             Example of usage:
10238                 face = geompy.MakeFaceHW(100, 100, 1)
10239                 fillet2d = geompy.MakeFillet2D(face, 30, [7, 9])
10240             """
10241             # Example: see GEOM_TestAll.py
10242             theR,Parameters = ParseParameters(theR)
10243             anObj = self.LocalOp.MakeFillet2D(theShape, theR, theListOfVertexes)
10244             RaiseIfFailed("MakeFillet2D", self.LocalOp)
10245             anObj.SetParameters(Parameters)
10246             self._autoPublish(anObj, theName, "fillet")
10247             return anObj
10248
10249         ## Perform a symmetric chamfer on all edges of the given shape.
10250         #  @param theShape Shape, to perform chamfer on.
10251         #  @param theD Chamfer size along each face.
10252         #  @param theName Object name; when specified, this parameter is used
10253         #         for result publication in the study. Otherwise, if automatic
10254         #         publication is switched on, default value is used for result name.
10255         #
10256         #  @return New GEOM.GEOM_Object, containing the result shape.
10257         #
10258         #  @ref tui_chamfer "Example 1"
10259         #  \n @ref swig_MakeChamferAll "Example 2"
10260         @ManageTransactions("LocalOp")
10261         def MakeChamferAll(self, theShape, theD, theName=None):
10262             """
10263             Perform a symmetric chamfer on all edges of the given shape.
10264
10265             Parameters:
10266                 theShape Shape, to perform chamfer on.
10267                 theD Chamfer size along each face.
10268                 theName Object name; when specified, this parameter is used
10269                         for result publication in the study. Otherwise, if automatic
10270                         publication is switched on, default value is used for result name.
10271
10272             Returns:
10273                 New GEOM.GEOM_Object, containing the result shape.
10274
10275             Example of usage:
10276                 chamfer_all = geompy.MakeChamferAll(prism, 10.)
10277             """
10278             # Example: see GEOM_TestOthers.py
10279             theD,Parameters = ParseParameters(theD)
10280             anObj = self.LocalOp.MakeChamferAll(theShape, theD)
10281             RaiseIfFailed("MakeChamferAll", self.LocalOp)
10282             anObj.SetParameters(Parameters)
10283             self._autoPublish(anObj, theName, "chamfer")
10284             return anObj
10285
10286         ## Perform a chamfer on edges, common to the specified faces,
10287         #  with distance D1 on the Face1
10288         #  @param theShape Shape, to perform chamfer on.
10289         #  @param theD1 Chamfer size along \a theFace1.
10290         #  @param theD2 Chamfer size along \a theFace2.
10291         #  @param theFace1,theFace2 Global indices of two faces of \a theShape.
10292         #  @param theName Object name; when specified, this parameter is used
10293         #         for result publication in the study. Otherwise, if automatic
10294         #         publication is switched on, default value is used for result name.
10295         #
10296         #  @note Global index of sub-shape can be obtained, using method GetSubShapeID().
10297         #
10298         #  @return New GEOM.GEOM_Object, containing the result shape.
10299         #
10300         #  @ref tui_chamfer "Example"
10301         @ManageTransactions("LocalOp")
10302         def MakeChamferEdge(self, theShape, theD1, theD2, theFace1, theFace2, theName=None):
10303             """
10304             Perform a chamfer on edges, common to the specified faces,
10305             with distance D1 on the Face1
10306
10307             Parameters:
10308                 theShape Shape, to perform chamfer on.
10309                 theD1 Chamfer size along theFace1.
10310                 theD2 Chamfer size along theFace2.
10311                 theFace1,theFace2 Global indices of two faces of theShape.
10312                 theName Object name; when specified, this parameter is used
10313                         for result publication in the study. Otherwise, if automatic
10314                         publication is switched on, default value is used for result name.
10315
10316             Note:
10317                 Global index of sub-shape can be obtained, using method geompy.GetSubShapeID
10318
10319             Returns:
10320                 New GEOM.GEOM_Object, containing the result shape.
10321
10322             Example of usage:
10323                 prism_faces = geompy.SubShapeAllSortedCentres(prism, geompy.ShapeType["FACE"])
10324                 f_ind_1 = geompy.GetSubShapeID(prism, prism_faces[0])
10325                 f_ind_2 = geompy.GetSubShapeID(prism, prism_faces[1])
10326                 chamfer_e = geompy.MakeChamferEdge(prism, 10., 10., f_ind_1, f_ind_2)
10327             """
10328             # Example: see GEOM_TestAll.py
10329             theD1,theD2,Parameters = ParseParameters(theD1,theD2)
10330             anObj = self.LocalOp.MakeChamferEdge(theShape, theD1, theD2, theFace1, theFace2)
10331             RaiseIfFailed("MakeChamferEdge", self.LocalOp)
10332             anObj.SetParameters(Parameters)
10333             self._autoPublish(anObj, theName, "chamfer")
10334             return anObj
10335
10336         ## Perform a chamfer on edges
10337         #  @param theShape Shape, to perform chamfer on.
10338         #  @param theD Chamfer length
10339         #  @param theAngle Angle of chamfer (angle in radians or a name of variable which defines angle in degrees)
10340         #  @param theFace1,theFace2 Global indices of two faces of \a theShape.
10341         #  @param theName Object name; when specified, this parameter is used
10342         #         for result publication in the study. Otherwise, if automatic
10343         #         publication is switched on, default value is used for result name.
10344         #
10345         #  @note Global index of sub-shape can be obtained, using method GetSubShapeID().
10346         #
10347         #  @return New GEOM.GEOM_Object, containing the result shape.
10348         @ManageTransactions("LocalOp")
10349         def MakeChamferEdgeAD(self, theShape, theD, theAngle, theFace1, theFace2, theName=None):
10350             """
10351             Perform a chamfer on edges
10352
10353             Parameters:
10354                 theShape Shape, to perform chamfer on.
10355                 theD1 Chamfer size along theFace1.
10356                 theAngle Angle of chamfer (angle in radians or a name of variable which defines angle in degrees).
10357                 theFace1,theFace2 Global indices of two faces of theShape.
10358                 theName Object name; when specified, this parameter is used
10359                         for result publication in the study. Otherwise, if automatic
10360                         publication is switched on, default value is used for result name.
10361
10362             Note:
10363                 Global index of sub-shape can be obtained, using method geompy.GetSubShapeID
10364
10365             Returns:
10366                 New GEOM.GEOM_Object, containing the result shape.
10367
10368             Example of usage:
10369                 prism_faces = geompy.SubShapeAllSortedCentres(prism, geompy.ShapeType["FACE"])
10370                 f_ind_1 = geompy.GetSubShapeID(prism, prism_faces[0])
10371                 f_ind_2 = geompy.GetSubShapeID(prism, prism_faces[1])
10372                 ang = 30
10373                 chamfer_e = geompy.MakeChamferEdge(prism, 10., ang, f_ind_1, f_ind_2)
10374             """
10375             flag = False
10376             if isinstance(theAngle,str):
10377                 flag = True
10378             theD,theAngle,Parameters = ParseParameters(theD,theAngle)
10379             if flag:
10380                 theAngle = theAngle*math.pi/180.0
10381             anObj = self.LocalOp.MakeChamferEdgeAD(theShape, theD, theAngle, theFace1, theFace2)
10382             RaiseIfFailed("MakeChamferEdgeAD", self.LocalOp)
10383             anObj.SetParameters(Parameters)
10384             self._autoPublish(anObj, theName, "chamfer")
10385             return anObj
10386
10387         ## Perform a chamfer on all edges of the specified faces,
10388         #  with distance D1 on the first specified face (if several for one edge)
10389         #  @param theShape Shape, to perform chamfer on.
10390         #  @param theD1 Chamfer size along face from \a theFaces. If both faces,
10391         #               connected to the edge, are in \a theFaces, \a theD1
10392         #               will be get along face, which is nearer to \a theFaces beginning.
10393         #  @param theD2 Chamfer size along another of two faces, connected to the edge.
10394         #  @param theFaces Sequence of global indices of faces of \a theShape.
10395         #  @param theName Object name; when specified, this parameter is used
10396         #         for result publication in the study. Otherwise, if automatic
10397         #         publication is switched on, default value is used for result name.
10398         #
10399         #  @note Global index of sub-shape can be obtained, using method GetSubShapeID().
10400         #
10401         #  @return New GEOM.GEOM_Object, containing the result shape.
10402         #
10403         #  @ref tui_chamfer "Example"
10404         @ManageTransactions("LocalOp")
10405         def MakeChamferFaces(self, theShape, theD1, theD2, theFaces, theName=None):
10406             """
10407             Perform a chamfer on all edges of the specified faces,
10408             with distance D1 on the first specified face (if several for one edge)
10409
10410             Parameters:
10411                 theShape Shape, to perform chamfer on.
10412                 theD1 Chamfer size along face from  theFaces. If both faces,
10413                       connected to the edge, are in theFaces, theD1
10414                       will be get along face, which is nearer to theFaces beginning.
10415                 theD2 Chamfer size along another of two faces, connected to the edge.
10416                 theFaces Sequence of global indices of faces of theShape.
10417                 theName Object name; when specified, this parameter is used
10418                         for result publication in the study. Otherwise, if automatic
10419                         publication is switched on, default value is used for result name.
10420
10421             Note: Global index of sub-shape can be obtained, using method geompy.GetSubShapeID().
10422
10423             Returns:
10424                 New GEOM.GEOM_Object, containing the result shape.
10425             """
10426             # Example: see GEOM_TestAll.py
10427             theD1,theD2,Parameters = ParseParameters(theD1,theD2)
10428             anObj = self.LocalOp.MakeChamferFaces(theShape, theD1, theD2, theFaces)
10429             RaiseIfFailed("MakeChamferFaces", self.LocalOp)
10430             anObj.SetParameters(Parameters)
10431             self._autoPublish(anObj, theName, "chamfer")
10432             return anObj
10433
10434         ## The Same that MakeChamferFaces() but with params theD is chamfer length and
10435         #  theAngle is Angle of chamfer (angle in radians or a name of variable which defines angle in degrees)
10436         #
10437         #  @ref swig_FilletChamfer "Example"
10438         @ManageTransactions("LocalOp")
10439         def MakeChamferFacesAD(self, theShape, theD, theAngle, theFaces, theName=None):
10440             """
10441             The Same that geompy.MakeChamferFaces but with params theD is chamfer length and
10442             theAngle is Angle of chamfer (angle in radians or a name of variable which defines angle in degrees)
10443             """
10444             flag = False
10445             if isinstance(theAngle,str):
10446                 flag = True
10447             theD,theAngle,Parameters = ParseParameters(theD,theAngle)
10448             if flag:
10449                 theAngle = theAngle*math.pi/180.0
10450             anObj = self.LocalOp.MakeChamferFacesAD(theShape, theD, theAngle, theFaces)
10451             RaiseIfFailed("MakeChamferFacesAD", self.LocalOp)
10452             anObj.SetParameters(Parameters)
10453             self._autoPublish(anObj, theName, "chamfer")
10454             return anObj
10455
10456         ## Perform a chamfer on edges,
10457         #  with distance D1 on the first specified face (if several for one edge)
10458         #  @param theShape Shape, to perform chamfer on.
10459         #  @param theD1,theD2 Chamfer size
10460         #  @param theEdges Sequence of edges of \a theShape.
10461         #  @param theName Object name; when specified, this parameter is used
10462         #         for result publication in the study. Otherwise, if automatic
10463         #         publication is switched on, default value is used for result name.
10464         #
10465         #  @return New GEOM.GEOM_Object, containing the result shape.
10466         #
10467         #  @ref swig_FilletChamfer "Example"
10468         @ManageTransactions("LocalOp")
10469         def MakeChamferEdges(self, theShape, theD1, theD2, theEdges, theName=None):
10470             """
10471             Perform a chamfer on edges,
10472             with distance D1 on the first specified face (if several for one edge)
10473
10474             Parameters:
10475                 theShape Shape, to perform chamfer on.
10476                 theD1,theD2 Chamfer size
10477                 theEdges Sequence of edges of theShape.
10478                 theName Object name; when specified, this parameter is used
10479                         for result publication in the study. Otherwise, if automatic
10480                         publication is switched on, default value is used for result name.
10481
10482             Returns:
10483                 New GEOM.GEOM_Object, containing the result shape.
10484             """
10485             theD1,theD2,Parameters = ParseParameters(theD1,theD2)
10486             anObj = self.LocalOp.MakeChamferEdges(theShape, theD1, theD2, theEdges)
10487             RaiseIfFailed("MakeChamferEdges", self.LocalOp)
10488             anObj.SetParameters(Parameters)
10489             self._autoPublish(anObj, theName, "chamfer")
10490             return anObj
10491
10492         ## The Same that MakeChamferEdges() but with params theD is chamfer length and
10493         #  theAngle is Angle of chamfer (angle in radians or a name of variable which defines angle in degrees)
10494         @ManageTransactions("LocalOp")
10495         def MakeChamferEdgesAD(self, theShape, theD, theAngle, theEdges, theName=None):
10496             """
10497             The Same that geompy.MakeChamferEdges but with params theD is chamfer length and
10498             theAngle is Angle of chamfer (angle in radians or a name of variable which defines angle in degrees)
10499             """
10500             flag = False
10501             if isinstance(theAngle,str):
10502                 flag = True
10503             theD,theAngle,Parameters = ParseParameters(theD,theAngle)
10504             if flag:
10505                 theAngle = theAngle*math.pi/180.0
10506             anObj = self.LocalOp.MakeChamferEdgesAD(theShape, theD, theAngle, theEdges)
10507             RaiseIfFailed("MakeChamferEdgesAD", self.LocalOp)
10508             anObj.SetParameters(Parameters)
10509             self._autoPublish(anObj, theName, "chamfer")
10510             return anObj
10511
10512         ## @sa MakeChamferEdge(), MakeChamferFaces()
10513         #
10514         #  @ref swig_MakeChamfer "Example"
10515         def MakeChamfer(self, aShape, d1, d2, aShapeType, ListShape, theName=None):
10516             """
10517             See geompy.MakeChamferEdge() and geompy.MakeChamferFaces() functions for more information.
10518             """
10519             # Example: see GEOM_TestOthers.py
10520             anObj = None
10521             # note: auto-publishing is done in self.MakeChamferEdge() or self.MakeChamferFaces()
10522             if aShapeType == self.ShapeType["EDGE"]:
10523                 anObj = self.MakeChamferEdge(aShape,d1,d2,ListShape[0],ListShape[1],theName)
10524             else:
10525                 anObj = self.MakeChamferFaces(aShape,d1,d2,ListShape,theName)
10526             return anObj
10527
10528         ## Remove material from a solid by extrusion of the base shape on the given distance.
10529         #  @param theInit Shape to remove material from. It must be a solid or
10530         #  a compound made of a single solid.
10531         #  @param theBase Closed edge or wire defining the base shape to be extruded.
10532         #  @param theH Prism dimension along the normal to theBase
10533         #  @param theAngle Draft angle in degrees.
10534         #  @param theInvert If true material changes the direction
10535         #  @param theName Object name; when specified, this parameter is used
10536         #         for result publication in the study. Otherwise, if automatic
10537         #         publication is switched on, default value is used for result name.
10538         #
10539         #  @return New GEOM.GEOM_Object, containing the initial shape with removed material
10540         #
10541         #  @ref tui_creation_prism "Example"
10542         @ManageTransactions("PrimOp")
10543         def MakeExtrudedCut(self, theInit, theBase, theH, theAngle, theInvert=False, theName=None):
10544             """
10545             Add material to a solid by extrusion of the base shape on the given distance.
10546
10547             Parameters:
10548                 theInit Shape to remove material from. It must be a solid or a compound made of a single solid.
10549                 theBase Closed edge or wire defining the base shape to be extruded.
10550                 theH Prism dimension along the normal to theBase
10551                 theAngle Draft angle in degrees.
10552                 theInvert If true material changes the direction.
10553                 theName Object name; when specified, this parameter is used
10554                         for result publication in the study. Otherwise, if automatic
10555                         publication is switched on, default value is used for result name.
10556
10557             Returns:
10558                 New GEOM.GEOM_Object,  containing the initial shape with removed material.
10559             """
10560             # Example: see GEOM_TestAll.py
10561             theH,theAngle,Parameters = ParseParameters(theH,theAngle)
10562             anObj = self.PrimOp.MakeDraftPrism(theInit, theBase, theH, theAngle, False, theInvert)
10563             RaiseIfFailed("MakeExtrudedBoss", self.PrimOp)
10564             anObj.SetParameters(Parameters)
10565             self._autoPublish(anObj, theName, "extrudedCut")
10566             return anObj
10567
10568         ## Add material to a solid by extrusion of the base shape on the given distance.
10569         #  @param theInit Shape to add material to. It must be a solid or
10570         #  a compound made of a single solid.
10571         #  @param theBase Closed edge or wire defining the base shape to be extruded.
10572         #  @param theH Prism dimension along the normal to theBase
10573         #  @param theAngle Draft angle in degrees.
10574         #  @param theInvert If true material changes the direction
10575         #  @param theName Object name; when specified, this parameter is used
10576         #         for result publication in the study. Otherwise, if automatic
10577         #         publication is switched on, default value is used for result name.
10578         #
10579         #  @return New GEOM.GEOM_Object, containing the initial shape with added material
10580         #
10581         #  @ref tui_creation_prism "Example"
10582         @ManageTransactions("PrimOp")
10583         def MakeExtrudedBoss(self, theInit, theBase, theH, theAngle, theInvert=False, theName=None):
10584             """
10585             Add material to a solid by extrusion of the base shape on the given distance.
10586
10587             Parameters:
10588                 theInit Shape to add material to. It must be a solid or a compound made of a single solid.
10589                 theBase Closed edge or wire defining the base shape to be extruded.
10590                 theH Prism dimension along the normal to theBase
10591                 theAngle Draft angle in degrees.
10592                 theInvert If true material changes the direction.
10593                 theName Object name; when specified, this parameter is used
10594                         for result publication in the study. Otherwise, if automatic
10595                         publication is switched on, default value is used for result name.
10596
10597             Returns:
10598                 New GEOM.GEOM_Object,  containing the initial shape with added material.
10599             """
10600             # Example: see GEOM_TestAll.py
10601             theH,theAngle,Parameters = ParseParameters(theH,theAngle)
10602             anObj = self.PrimOp.MakeDraftPrism(theInit, theBase, theH, theAngle, True, theInvert)
10603             RaiseIfFailed("MakeExtrudedBoss", self.PrimOp)
10604             anObj.SetParameters(Parameters)
10605             self._autoPublish(anObj, theName, "extrudedBoss")
10606             return anObj
10607
10608         # end of l3_local
10609         ## @}
10610
10611         ## @addtogroup l3_basic_op
10612         ## @{
10613
10614         ## Perform an Archimde operation on the given shape with given parameters.
10615         #  The object presenting the resulting face is returned.
10616         #  @param theShape Shape to be put in water.
10617         #  @param theWeight Weight of the shape.
10618         #  @param theWaterDensity Density of the water.
10619         #  @param theMeshDeflection Deflection of the mesh, using to compute the section.
10620         #  @param theName Object name; when specified, this parameter is used
10621         #         for result publication in the study. Otherwise, if automatic
10622         #         publication is switched on, default value is used for result name.
10623         #
10624         #  @return New GEOM.GEOM_Object, containing a section of \a theShape
10625         #          by a plane, corresponding to water level.
10626         #
10627         #  @ref tui_archimede "Example"
10628         @ManageTransactions("LocalOp")
10629         def Archimede(self, theShape, theWeight, theWaterDensity, theMeshDeflection, theName=None):
10630             """
10631             Perform an Archimde operation on the given shape with given parameters.
10632             The object presenting the resulting face is returned.
10633
10634             Parameters:
10635                 theShape Shape to be put in water.
10636                 theWeight Weight of the shape.
10637                 theWaterDensity Density of the water.
10638                 theMeshDeflection Deflection of the mesh, using to compute the section.
10639                 theName Object name; when specified, this parameter is used
10640                         for result publication in the study. Otherwise, if automatic
10641                         publication is switched on, default value is used for result name.
10642
10643             Returns:
10644                 New GEOM.GEOM_Object, containing a section of theShape
10645                 by a plane, corresponding to water level.
10646             """
10647             # Example: see GEOM_TestAll.py
10648             theWeight,theWaterDensity,theMeshDeflection,Parameters = ParseParameters(
10649               theWeight,theWaterDensity,theMeshDeflection)
10650             anObj = self.LocalOp.MakeArchimede(theShape, theWeight, theWaterDensity, theMeshDeflection)
10651             RaiseIfFailed("MakeArchimede", self.LocalOp)
10652             anObj.SetParameters(Parameters)
10653             self._autoPublish(anObj, theName, "archimede")
10654             return anObj
10655
10656         # end of l3_basic_op
10657         ## @}
10658
10659         ## @addtogroup l2_measure
10660         ## @{
10661
10662         ## Get point coordinates
10663         #  @return [x, y, z]
10664         #
10665         #  @ref tui_point_coordinates_page "Example"
10666         @ManageTransactions("MeasuOp")
10667         def PointCoordinates(self,Point):
10668             """
10669             Get point coordinates
10670
10671             Returns:
10672                 [x, y, z]
10673             """
10674             # Example: see GEOM_TestMeasures.py
10675             aTuple = self.MeasuOp.PointCoordinates(Point)
10676             RaiseIfFailed("PointCoordinates", self.MeasuOp)
10677             return aTuple
10678
10679         ## Get vector coordinates
10680         #  @return [x, y, z]
10681         #
10682         #  @ref tui_measurement_tools_page "Example"
10683         def VectorCoordinates(self,Vector):
10684             """
10685             Get vector coordinates
10686
10687             Returns:
10688                 [x, y, z]
10689             """
10690
10691             p1=self.GetFirstVertex(Vector)
10692             p2=self.GetLastVertex(Vector)
10693
10694             X1=self.PointCoordinates(p1)
10695             X2=self.PointCoordinates(p2)
10696
10697             return (X2[0]-X1[0],X2[1]-X1[1],X2[2]-X1[2])
10698
10699
10700         ## Compute cross product
10701         #  @return vector w=u^v
10702         #
10703         #  @ref tui_measurement_tools_page "Example"
10704         def CrossProduct(self, Vector1, Vector2):
10705             """
10706             Compute cross product
10707
10708             Returns: vector w=u^v
10709             """
10710             u=self.VectorCoordinates(Vector1)
10711             v=self.VectorCoordinates(Vector2)
10712             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])
10713
10714             return w
10715
10716         ## Compute cross product
10717         #  @return dot product  p=u.v
10718         #
10719         #  @ref tui_measurement_tools_page "Example"
10720         def DotProduct(self, Vector1, Vector2):
10721             """
10722             Compute cross product
10723
10724             Returns: dot product  p=u.v
10725             """
10726             u=self.VectorCoordinates(Vector1)
10727             v=self.VectorCoordinates(Vector2)
10728             p=u[0]*v[0]+u[1]*v[1]+u[2]*v[2]
10729
10730             return p
10731
10732
10733         ## Get summarized length of all wires,
10734         #  area of surface and volume of the given shape.
10735         #  @param theShape Shape to define properties of.
10736         #  @param theTolerance maximal relative error of area
10737         #         and volume computation.
10738         #  @return [theLength, theSurfArea, theVolume]\n
10739         #  theLength:   Summarized length of all wires of the given shape.\n
10740         #  theSurfArea: Area of surface of the given shape.\n
10741         #  theVolume:   Volume of the given shape.
10742         #
10743         #  @ref tui_basic_properties_page "Example"
10744         @ManageTransactions("MeasuOp")
10745         def BasicProperties(self,theShape, theTolerance=1.e-6):
10746             """
10747             Get summarized length of all wires,
10748             area of surface and volume of the given shape.
10749
10750             Parameters:
10751                 theShape Shape to define properties of.
10752                 theTolerance maximal relative error of area
10753                              and volume computation.
10754
10755             Returns:
10756                 [theLength, theSurfArea, theVolume]
10757                  theLength:   Summarized length of all wires of the given shape.
10758                  theSurfArea: Area of surface of the given shape.
10759                  theVolume:   Volume of the given shape.
10760             """
10761             # Example: see GEOM_TestMeasures.py
10762             aTuple = self.MeasuOp.GetBasicProperties(theShape, theTolerance)
10763             RaiseIfFailed("GetBasicProperties", self.MeasuOp)
10764             return aTuple
10765
10766         ## Get parameters of bounding box of the given shape
10767         #  @param theShape Shape to obtain bounding box of.
10768         #  @param precise TRUE for precise computation; FALSE for fast one.
10769         #  @return [Xmin,Xmax, Ymin,Ymax, Zmin,Zmax]
10770         #  Xmin,Xmax: Limits of shape along OX axis.
10771         #  Ymin,Ymax: Limits of shape along OY axis.
10772         #  Zmin,Zmax: Limits of shape along OZ axis.
10773         #
10774         #  @ref tui_bounding_box_page "Example"
10775         @ManageTransactions("MeasuOp")
10776         def BoundingBox (self, theShape, precise=False):
10777             """
10778             Get parameters of bounding box of the given shape
10779
10780             Parameters:
10781                 theShape Shape to obtain bounding box of.
10782                 precise TRUE for precise computation; FALSE for fast one.
10783
10784             Returns:
10785                 [Xmin,Xmax, Ymin,Ymax, Zmin,Zmax]
10786                  Xmin,Xmax: Limits of shape along OX axis.
10787                  Ymin,Ymax: Limits of shape along OY axis.
10788                  Zmin,Zmax: Limits of shape along OZ axis.
10789             """
10790             # Example: see GEOM_TestMeasures.py
10791             aTuple = self.MeasuOp.GetBoundingBox(theShape, precise)
10792             RaiseIfFailed("GetBoundingBox", self.MeasuOp)
10793             return aTuple
10794
10795         ## Get bounding box of the given shape
10796         #  @param theShape Shape to obtain bounding box of.
10797         #  @param precise TRUE for precise computation; FALSE for fast one.
10798         #  @param theName Object name; when specified, this parameter is used
10799         #         for result publication in the study. Otherwise, if automatic
10800         #         publication is switched on, default value is used for result name.
10801         #
10802         #  @return New GEOM.GEOM_Object, containing the created box.
10803         #
10804         #  @ref tui_bounding_box_page "Example"
10805         @ManageTransactions("MeasuOp")
10806         def MakeBoundingBox (self, theShape, precise=False, theName=None):
10807             """
10808             Get bounding box of the given shape
10809
10810             Parameters:
10811                 theShape Shape to obtain bounding box of.
10812                 precise TRUE for precise computation; FALSE for fast one.
10813                 theName Object name; when specified, this parameter is used
10814                         for result publication in the study. Otherwise, if automatic
10815                         publication is switched on, default value is used for result name.
10816
10817             Returns:
10818                 New GEOM.GEOM_Object, containing the created box.
10819             """
10820             # Example: see GEOM_TestMeasures.py
10821             anObj = self.MeasuOp.MakeBoundingBox(theShape, precise)
10822             RaiseIfFailed("MakeBoundingBox", self.MeasuOp)
10823             self._autoPublish(anObj, theName, "bndbox")
10824             return anObj
10825
10826         ## Get inertia matrix and moments of inertia of theShape.
10827         #  @param theShape Shape to calculate inertia of.
10828         #  @return [I11,I12,I13, I21,I22,I23, I31,I32,I33, Ix,Iy,Iz]
10829         #  I(1-3)(1-3): Components of the inertia matrix of the given shape.
10830         #  Ix,Iy,Iz:    Moments of inertia of the given shape.
10831         #
10832         #  @ref tui_inertia_page "Example"
10833         @ManageTransactions("MeasuOp")
10834         def Inertia(self,theShape):
10835             """
10836             Get inertia matrix and moments of inertia of theShape.
10837
10838             Parameters:
10839                 theShape Shape to calculate inertia of.
10840
10841             Returns:
10842                 [I11,I12,I13, I21,I22,I23, I31,I32,I33, Ix,Iy,Iz]
10843                  I(1-3)(1-3): Components of the inertia matrix of the given shape.
10844                  Ix,Iy,Iz:    Moments of inertia of the given shape.
10845             """
10846             # Example: see GEOM_TestMeasures.py
10847             aTuple = self.MeasuOp.GetInertia(theShape)
10848             RaiseIfFailed("GetInertia", self.MeasuOp)
10849             return aTuple
10850
10851         ## Get if coords are included in the shape (ST_IN or ST_ON)
10852         #  @param theShape Shape
10853         #  @param coords list of points coordinates [x1, y1, z1, x2, y2, z2, ...]
10854         #  @param tolerance to be used (default is 1.0e-7)
10855         #  @return list_of_boolean = [res1, res2, ...]
10856         @ManageTransactions("MeasuOp")
10857         def AreCoordsInside(self, theShape, coords, tolerance=1.e-7):
10858             """
10859             Get if coords are included in the shape (ST_IN or ST_ON)
10860
10861             Parameters:
10862                 theShape Shape
10863                 coords list of points coordinates [x1, y1, z1, x2, y2, z2, ...]
10864                 tolerance to be used (default is 1.0e-7)
10865
10866             Returns:
10867                 list_of_boolean = [res1, res2, ...]
10868             """
10869             return self.MeasuOp.AreCoordsInside(theShape, coords, tolerance)
10870
10871         ## Get minimal distance between the given shapes.
10872         #  @param theShape1,theShape2 Shapes to find minimal distance between.
10873         #  @return Value of the minimal distance between the given shapes.
10874         #
10875         #  @ref tui_min_distance_page "Example"
10876         @ManageTransactions("MeasuOp")
10877         def MinDistance(self, theShape1, theShape2):
10878             """
10879             Get minimal distance between the given shapes.
10880
10881             Parameters:
10882                 theShape1,theShape2 Shapes to find minimal distance between.
10883
10884             Returns:
10885                 Value of the minimal distance between the given shapes.
10886             """
10887             # Example: see GEOM_TestMeasures.py
10888             aTuple = self.MeasuOp.GetMinDistance(theShape1, theShape2)
10889             RaiseIfFailed("GetMinDistance", self.MeasuOp)
10890             return aTuple[0]
10891
10892         ## Get minimal distance between the given shapes.
10893         #  @param theShape1,theShape2 Shapes to find minimal distance between.
10894         #  @return Value of the minimal distance between the given shapes, in form of list
10895         #          [Distance, DX, DY, DZ].
10896         #
10897         #  @ref tui_min_distance_page "Example"
10898         @ManageTransactions("MeasuOp")
10899         def MinDistanceComponents(self, theShape1, theShape2):
10900             """
10901             Get minimal distance between the given shapes.
10902
10903             Parameters:
10904                 theShape1,theShape2 Shapes to find minimal distance between.
10905
10906             Returns:
10907                 Value of the minimal distance between the given shapes, in form of list
10908                 [Distance, DX, DY, DZ]
10909             """
10910             # Example: see GEOM_TestMeasures.py
10911             aTuple = self.MeasuOp.GetMinDistance(theShape1, theShape2)
10912             RaiseIfFailed("GetMinDistance", self.MeasuOp)
10913             aRes = [aTuple[0], aTuple[4] - aTuple[1], aTuple[5] - aTuple[2], aTuple[6] - aTuple[3]]
10914             return aRes
10915
10916         ## Get closest points of the given shapes.
10917         #  @param theShape1,theShape2 Shapes to find closest points of.
10918         #  @return The number of found solutions (-1 in case of infinite number of
10919         #          solutions) and a list of (X, Y, Z) coordinates for all couples of points.
10920         #
10921         #  @ref tui_min_distance_page "Example"
10922         @ManageTransactions("MeasuOp")
10923         def ClosestPoints (self, theShape1, theShape2):
10924             """
10925             Get closest points of the given shapes.
10926
10927             Parameters:
10928                 theShape1,theShape2 Shapes to find closest points of.
10929
10930             Returns:
10931                 The number of found solutions (-1 in case of infinite number of
10932                 solutions) and a list of (X, Y, Z) coordinates for all couples of points.
10933             """
10934             # Example: see GEOM_TestMeasures.py
10935             aTuple = self.MeasuOp.ClosestPoints(theShape1, theShape2)
10936             RaiseIfFailed("ClosestPoints", self.MeasuOp)
10937             return aTuple
10938
10939         ## Get angle between the given shapes in degrees.
10940         #  @param theShape1,theShape2 Lines or linear edges to find angle between.
10941         #  @note If both arguments are vectors, the angle is computed in accordance
10942         #        with their orientations, otherwise the minimum angle is computed.
10943         #  @return Value of the angle between the given shapes in degrees.
10944         #
10945         #  @ref tui_angle_page "Example"
10946         @ManageTransactions("MeasuOp")
10947         def GetAngle(self, theShape1, theShape2):
10948             """
10949             Get angle between the given shapes in degrees.
10950
10951             Parameters:
10952                 theShape1,theShape2 Lines or linear edges to find angle between.
10953
10954             Note:
10955                 If both arguments are vectors, the angle is computed in accordance
10956                 with their orientations, otherwise the minimum angle is computed.
10957
10958             Returns:
10959                 Value of the angle between the given shapes in degrees.
10960             """
10961             # Example: see GEOM_TestMeasures.py
10962             anAngle = self.MeasuOp.GetAngle(theShape1, theShape2)
10963             RaiseIfFailed("GetAngle", self.MeasuOp)
10964             return anAngle
10965
10966         ## Get angle between the given shapes in radians.
10967         #  @param theShape1,theShape2 Lines or linear edges to find angle between.
10968         #  @note If both arguments are vectors, the angle is computed in accordance
10969         #        with their orientations, otherwise the minimum angle is computed.
10970         #  @return Value of the angle between the given shapes in radians.
10971         #
10972         #  @ref tui_angle_page "Example"
10973         @ManageTransactions("MeasuOp")
10974         def GetAngleRadians(self, theShape1, theShape2):
10975             """
10976             Get angle between the given shapes in radians.
10977
10978             Parameters:
10979                 theShape1,theShape2 Lines or linear edges to find angle between.
10980
10981
10982             Note:
10983                 If both arguments are vectors, the angle is computed in accordance
10984                 with their orientations, otherwise the minimum angle is computed.
10985
10986             Returns:
10987                 Value of the angle between the given shapes in radians.
10988             """
10989             # Example: see GEOM_TestMeasures.py
10990             anAngle = self.MeasuOp.GetAngle(theShape1, theShape2)*math.pi/180.
10991             RaiseIfFailed("GetAngle", self.MeasuOp)
10992             return anAngle
10993
10994         ## Get angle between the given vectors in degrees.
10995         #  @param theShape1,theShape2 Vectors to find angle between.
10996         #  @param theFlag If True, the normal vector is defined by the two vectors cross,
10997         #                 if False, the opposite vector to the normal vector is used.
10998         #  @return Value of the angle between the given vectors in degrees.
10999         #
11000         #  @ref tui_angle_page "Example"
11001         @ManageTransactions("MeasuOp")
11002         def GetAngleVectors(self, theShape1, theShape2, theFlag = True):
11003             """
11004             Get angle between the given vectors in degrees.
11005
11006             Parameters:
11007                 theShape1,theShape2 Vectors to find angle between.
11008                 theFlag If True, the normal vector is defined by the two vectors cross,
11009                         if False, the opposite vector to the normal vector is used.
11010
11011             Returns:
11012                 Value of the angle between the given vectors in degrees.
11013             """
11014             anAngle = self.MeasuOp.GetAngleBtwVectors(theShape1, theShape2)
11015             if not theFlag:
11016                 anAngle = 360. - anAngle
11017             RaiseIfFailed("GetAngleVectors", self.MeasuOp)
11018             return anAngle
11019
11020         ## The same as GetAngleVectors, but the result is in radians.
11021         def GetAngleRadiansVectors(self, theShape1, theShape2, theFlag = True):
11022             """
11023             Get angle between the given vectors in radians.
11024
11025             Parameters:
11026                 theShape1,theShape2 Vectors to find angle between.
11027                 theFlag If True, the normal vector is defined by the two vectors cross,
11028                         if False, the opposite vector to the normal vector is used.
11029
11030             Returns:
11031                 Value of the angle between the given vectors in radians.
11032             """
11033             anAngle = self.GetAngleVectors(theShape1, theShape2, theFlag)*math.pi/180.
11034             return anAngle
11035
11036         ## @name Curve Curvature Measurement
11037         #  Methods for receiving radius of curvature of curves
11038         #  in the given point
11039         ## @{
11040
11041         ## Measure curvature of a curve at a point, set by parameter.
11042         #  @param theCurve a curve.
11043         #  @param theParam parameter.
11044         #  @return radius of curvature of \a theCurve.
11045         #
11046         #  @ref swig_todo "Example"
11047         @ManageTransactions("MeasuOp")
11048         def CurveCurvatureByParam(self, theCurve, theParam):
11049             """
11050             Measure curvature of a curve at a point, set by parameter.
11051
11052             Parameters:
11053                 theCurve a curve.
11054                 theParam parameter.
11055
11056             Returns:
11057                 radius of curvature of theCurve.
11058             """
11059             # Example: see GEOM_TestMeasures.py
11060             aCurv = self.MeasuOp.CurveCurvatureByParam(theCurve,theParam)
11061             RaiseIfFailed("CurveCurvatureByParam", self.MeasuOp)
11062             return aCurv
11063
11064         ## Measure curvature of a curve at a point.
11065         #  @param theCurve a curve.
11066         #  @param thePoint given point.
11067         #  @return radius of curvature of \a theCurve.
11068         #
11069         #  @ref swig_todo "Example"
11070         @ManageTransactions("MeasuOp")
11071         def CurveCurvatureByPoint(self, theCurve, thePoint):
11072             """
11073             Measure curvature of a curve at a point.
11074
11075             Parameters:
11076                 theCurve a curve.
11077                 thePoint given point.
11078
11079             Returns:
11080                 radius of curvature of theCurve.
11081             """
11082             aCurv = self.MeasuOp.CurveCurvatureByPoint(theCurve,thePoint)
11083             RaiseIfFailed("CurveCurvatureByPoint", self.MeasuOp)
11084             return aCurv
11085         ## @}
11086
11087         ## @name Surface Curvature Measurement
11088         #  Methods for receiving max and min radius of curvature of surfaces
11089         #  in the given point
11090         ## @{
11091
11092         ## Measure max radius of curvature of surface.
11093         #  @param theSurf the given surface.
11094         #  @param theUParam Value of U-parameter on the referenced surface.
11095         #  @param theVParam Value of V-parameter on the referenced surface.
11096         #  @return max radius of curvature of theSurf.
11097         #
11098         ## @ref swig_todo "Example"
11099         @ManageTransactions("MeasuOp")
11100         def MaxSurfaceCurvatureByParam(self, theSurf, theUParam, theVParam):
11101             """
11102             Measure max radius of curvature of surface.
11103
11104             Parameters:
11105                 theSurf the given surface.
11106                 theUParam Value of U-parameter on the referenced surface.
11107                 theVParam Value of V-parameter on the referenced surface.
11108
11109             Returns:
11110                 max radius of curvature of theSurf.
11111             """
11112             # Example: see GEOM_TestMeasures.py
11113             aSurf = self.MeasuOp.MaxSurfaceCurvatureByParam(theSurf,theUParam,theVParam)
11114             RaiseIfFailed("MaxSurfaceCurvatureByParam", self.MeasuOp)
11115             return aSurf
11116
11117         ## Measure max radius of curvature of surface in the given point
11118         #  @param theSurf the given surface.
11119         #  @param thePoint given point.
11120         #  @return max radius of curvature of theSurf.
11121         #
11122         ## @ref swig_todo "Example"
11123         @ManageTransactions("MeasuOp")
11124         def MaxSurfaceCurvatureByPoint(self, theSurf, thePoint):
11125             """
11126             Measure max radius of curvature of surface in the given point.
11127
11128             Parameters:
11129                 theSurf the given surface.
11130                 thePoint given point.
11131
11132             Returns:
11133                 max radius of curvature of theSurf.
11134             """
11135             aSurf = self.MeasuOp.MaxSurfaceCurvatureByPoint(theSurf,thePoint)
11136             RaiseIfFailed("MaxSurfaceCurvatureByPoint", self.MeasuOp)
11137             return aSurf
11138
11139         ## Measure min radius of curvature of surface.
11140         #  @param theSurf the given surface.
11141         #  @param theUParam Value of U-parameter on the referenced surface.
11142         #  @param theVParam Value of V-parameter on the referenced surface.
11143         #  @return min radius of curvature of theSurf.
11144         #
11145         ## @ref swig_todo "Example"
11146         @ManageTransactions("MeasuOp")
11147         def MinSurfaceCurvatureByParam(self, theSurf, theUParam, theVParam):
11148             """
11149             Measure min radius of curvature of surface.
11150
11151             Parameters:
11152                 theSurf the given surface.
11153                 theUParam Value of U-parameter on the referenced surface.
11154                 theVParam Value of V-parameter on the referenced surface.
11155
11156             Returns:
11157                 Min radius of curvature of theSurf.
11158             """
11159             aSurf = self.MeasuOp.MinSurfaceCurvatureByParam(theSurf,theUParam,theVParam)
11160             RaiseIfFailed("MinSurfaceCurvatureByParam", self.MeasuOp)
11161             return aSurf
11162
11163         ## Measure min radius of curvature of surface in the given point
11164         #  @param theSurf the given surface.
11165         #  @param thePoint given point.
11166         #  @return min radius of curvature of theSurf.
11167         #
11168         ## @ref swig_todo "Example"
11169         @ManageTransactions("MeasuOp")
11170         def MinSurfaceCurvatureByPoint(self, theSurf, thePoint):
11171             """
11172             Measure min radius of curvature of surface in the given point.
11173
11174             Parameters:
11175                 theSurf the given surface.
11176                 thePoint given point.
11177
11178             Returns:
11179                 Min radius of curvature of theSurf.
11180             """
11181             aSurf = self.MeasuOp.MinSurfaceCurvatureByPoint(theSurf,thePoint)
11182             RaiseIfFailed("MinSurfaceCurvatureByPoint", self.MeasuOp)
11183             return aSurf
11184         ## @}
11185
11186         ## Get min and max tolerances of sub-shapes of theShape
11187         #  @param theShape Shape, to get tolerances of.
11188         #  @return [FaceMin,FaceMax, EdgeMin,EdgeMax, VertMin,VertMax]\n
11189         #  FaceMin,FaceMax: Min and max tolerances of the faces.\n
11190         #  EdgeMin,EdgeMax: Min and max tolerances of the edges.\n
11191         #  VertMin,VertMax: Min and max tolerances of the vertices.
11192         #
11193         #  @ref tui_tolerance_page "Example"
11194         @ManageTransactions("MeasuOp")
11195         def Tolerance(self,theShape):
11196             """
11197             Get min and max tolerances of sub-shapes of theShape
11198
11199             Parameters:
11200                 theShape Shape, to get tolerances of.
11201
11202             Returns:
11203                 [FaceMin,FaceMax, EdgeMin,EdgeMax, VertMin,VertMax]
11204                  FaceMin,FaceMax: Min and max tolerances of the faces.
11205                  EdgeMin,EdgeMax: Min and max tolerances of the edges.
11206                  VertMin,VertMax: Min and max tolerances of the vertices.
11207             """
11208             # Example: see GEOM_TestMeasures.py
11209             aTuple = self.MeasuOp.GetTolerance(theShape)
11210             RaiseIfFailed("GetTolerance", self.MeasuOp)
11211             return aTuple
11212
11213         ## Obtain description of the given shape (number of sub-shapes of each type)
11214         #  @param theShape Shape to be described.
11215         #  @return Description of the given shape.
11216         #
11217         #  @ref tui_whatis_page "Example"
11218         @ManageTransactions("MeasuOp")
11219         def WhatIs(self,theShape):
11220             """
11221             Obtain description of the given shape (number of sub-shapes of each type)
11222
11223             Parameters:
11224                 theShape Shape to be described.
11225
11226             Returns:
11227                 Description of the given shape.
11228             """
11229             # Example: see GEOM_TestMeasures.py
11230             aDescr = self.MeasuOp.WhatIs(theShape)
11231             RaiseIfFailed("WhatIs", self.MeasuOp)
11232             return aDescr
11233
11234         ## Obtain quantity of shapes of the given type in \a theShape.
11235         #  If \a theShape is of type \a theType, it is also counted.
11236         #  @param theShape Shape to be described.
11237         #  @param theType the given ShapeType().
11238         #  @return Quantity of shapes of type \a theType in \a theShape.
11239         #
11240         #  @ref tui_measurement_tools_page "Example"
11241         def NbShapes (self, theShape, theType):
11242             """
11243             Obtain quantity of shapes of the given type in theShape.
11244             If theShape is of type theType, it is also counted.
11245
11246             Parameters:
11247                 theShape Shape to be described.
11248                 theType the given geompy.ShapeType
11249
11250             Returns:
11251                 Quantity of shapes of type theType in theShape.
11252             """
11253             # Example: see GEOM_TestMeasures.py
11254             listSh = self.SubShapeAllIDs(theShape, theType)
11255             Nb = len(listSh)
11256             return Nb
11257
11258         ## Obtain quantity of shapes of each type in \a theShape.
11259         #  The \a theShape is also counted.
11260         #  @param theShape Shape to be described.
11261         #  @return Dictionary of ShapeType() with bound quantities of shapes.
11262         #
11263         #  @ref tui_measurement_tools_page "Example"
11264         def ShapeInfo (self, theShape):
11265             """
11266             Obtain quantity of shapes of each type in theShape.
11267             The theShape is also counted.
11268
11269             Parameters:
11270                 theShape Shape to be described.
11271
11272             Returns:
11273                 Dictionary of geompy.ShapeType with bound quantities of shapes.
11274             """
11275             # Example: see GEOM_TestMeasures.py
11276             aDict = {}
11277             for typeSh in self.ShapeType:
11278                 if typeSh in ( "AUTO", "SHAPE" ): continue
11279                 listSh = self.SubShapeAllIDs(theShape, self.ShapeType[typeSh])
11280                 Nb = len(listSh)
11281                 aDict[typeSh] = Nb
11282                 pass
11283             return aDict
11284
11285         def GetCreationInformation(self, theShape):
11286             res = ''
11287             infos = theShape.GetCreationInformation()
11288             for info in infos:
11289                 # operationName
11290                 opName = info.operationName
11291                 if not opName: opName = "no info available"
11292                 if res: res += "\n"
11293                 res += "Operation: " + opName
11294                 # parameters
11295                 for parVal in info.params:
11296                     res += "\n \t%s = %s" % ( parVal.name, parVal.value )
11297             return res
11298
11299         ## Get a point, situated at the centre of mass of theShape.
11300         #  @param theShape Shape to define centre of mass of.
11301         #  @param theName Object name; when specified, this parameter is used
11302         #         for result publication in the study. Otherwise, if automatic
11303         #         publication is switched on, default value is used for result name.
11304         #
11305         #  @return New GEOM.GEOM_Object, containing the created point.
11306         #
11307         #  @ref tui_center_of_mass_page "Example"
11308         @ManageTransactions("MeasuOp")
11309         def MakeCDG(self, theShape, theName=None):
11310             """
11311             Get a point, situated at the centre of mass of theShape.
11312
11313             Parameters:
11314                 theShape Shape to define centre of mass of.
11315                 theName Object name; when specified, this parameter is used
11316                         for result publication in the study. Otherwise, if automatic
11317                         publication is switched on, default value is used for result name.
11318
11319             Returns:
11320                 New GEOM.GEOM_Object, containing the created point.
11321             """
11322             # Example: see GEOM_TestMeasures.py
11323             anObj = self.MeasuOp.GetCentreOfMass(theShape)
11324             RaiseIfFailed("GetCentreOfMass", self.MeasuOp)
11325             self._autoPublish(anObj, theName, "centerOfMass")
11326             return anObj
11327
11328         ## Get a vertex sub-shape by index.
11329         #  @param theShape Shape to find sub-shape.
11330         #  @param theIndex Index to find vertex by this index (starting from zero)
11331         #  @param theUseOri To consider edge/wire orientation or not
11332         #  @param theName Object name; when specified, this parameter is used
11333         #         for result publication in the study. Otherwise, if automatic
11334         #         publication is switched on, default value is used for result name.
11335         #
11336         #  @return New GEOM.GEOM_Object, containing the created vertex.
11337         #
11338         #  @ref tui_measurement_tools_page "Example"
11339         @ManageTransactions("MeasuOp")
11340         def GetVertexByIndex(self, theShape, theIndex, theUseOri=True, theName=None):
11341             """
11342             Get a vertex sub-shape by index.
11343
11344             Parameters:
11345                 theShape Shape to find sub-shape.
11346                 theIndex Index to find vertex by this index (starting from zero)
11347                 theUseOri To consider edge/wire orientation or not
11348                 theName Object name; when specified, this parameter is used
11349                         for result publication in the study. Otherwise, if automatic
11350                         publication is switched on, default value is used for result name.
11351
11352             Returns:
11353                 New GEOM.GEOM_Object, containing the created vertex.
11354             """
11355             # Example: see GEOM_TestMeasures.py
11356             if isinstance( theUseOri, str ): # theUseOri was inserted before theName
11357                 theUseOri, theName = True, theUseOri
11358             anObj = self.MeasuOp.GetVertexByIndex(theShape, theIndex, theUseOri)
11359             RaiseIfFailed("GetVertexByIndex", self.MeasuOp)
11360             self._autoPublish(anObj, theName, "vertex")
11361             return anObj
11362
11363         ## Get the first vertex of wire/edge depended orientation.
11364         #  @param theShape Shape to find first vertex.
11365         #  @param theName Object name; when specified, this parameter is used
11366         #         for result publication in the study. Otherwise, if automatic
11367         #         publication is switched on, default value is used for result name.
11368         #
11369         #  @return New GEOM.GEOM_Object, containing the created vertex.
11370         #
11371         #  @ref tui_measurement_tools_page "Example"
11372         def GetFirstVertex(self, theShape, theName=None):
11373             """
11374             Get the first vertex of wire/edge depended orientation.
11375
11376             Parameters:
11377                 theShape Shape to find first vertex.
11378                 theName Object name; when specified, this parameter is used
11379                         for result publication in the study. Otherwise, if automatic
11380                         publication is switched on, default value is used for result name.
11381
11382             Returns:
11383                 New GEOM.GEOM_Object, containing the created vertex.
11384             """
11385             # Example: see GEOM_TestMeasures.py
11386             # note: auto-publishing is done in self.GetVertexByIndex()
11387             return self.GetVertexByIndex(theShape, 0, True, theName)
11388
11389         ## Get the last vertex of wire/edge depended orientation.
11390         #  @param theShape Shape to find last vertex.
11391         #  @param theName Object name; when specified, this parameter is used
11392         #         for result publication in the study. Otherwise, if automatic
11393         #         publication is switched on, default value is used for result name.
11394         #
11395         #  @return New GEOM.GEOM_Object, containing the created vertex.
11396         #
11397         #  @ref tui_measurement_tools_page "Example"
11398         def GetLastVertex(self, theShape, theName=None):
11399             """
11400             Get the last vertex of wire/edge depended orientation.
11401
11402             Parameters:
11403                 theShape Shape to find last vertex.
11404                 theName Object name; when specified, this parameter is used
11405                         for result publication in the study. Otherwise, if automatic
11406                         publication is switched on, default value is used for result name.
11407
11408             Returns:
11409                 New GEOM.GEOM_Object, containing the created vertex.
11410             """
11411             # Example: see GEOM_TestMeasures.py
11412             nb_vert =  self.NumberOfSubShapes(theShape, self.ShapeType["VERTEX"])
11413             # note: auto-publishing is done in self.GetVertexByIndex()
11414             return self.GetVertexByIndex(theShape, (nb_vert-1), True, theName)
11415
11416         ## Get a normale to the given face. If the point is not given,
11417         #  the normale is calculated at the center of mass.
11418         #  @param theFace Face to define normale of.
11419         #  @param theOptionalPoint Point to compute the normale at.
11420         #  @param theName Object name; when specified, this parameter is used
11421         #         for result publication in the study. Otherwise, if automatic
11422         #         publication is switched on, default value is used for result name.
11423         #
11424         #  @return New GEOM.GEOM_Object, containing the created vector.
11425         #
11426         #  @ref swig_todo "Example"
11427         @ManageTransactions("MeasuOp")
11428         def GetNormal(self, theFace, theOptionalPoint = None, theName=None):
11429             """
11430             Get a normale to the given face. If the point is not given,
11431             the normale is calculated at the center of mass.
11432
11433             Parameters:
11434                 theFace Face to define normale of.
11435                 theOptionalPoint Point to compute the normale at.
11436                 theName Object name; when specified, this parameter is used
11437                         for result publication in the study. Otherwise, if automatic
11438                         publication is switched on, default value is used for result name.
11439
11440             Returns:
11441                 New GEOM.GEOM_Object, containing the created vector.
11442             """
11443             # Example: see GEOM_TestMeasures.py
11444             anObj = self.MeasuOp.GetNormal(theFace, theOptionalPoint)
11445             RaiseIfFailed("GetNormal", self.MeasuOp)
11446             self._autoPublish(anObj, theName, "normal")
11447             return anObj
11448
11449         ## Print shape errors obtained from CheckShape.
11450         #  @param theShape Shape that was checked.
11451         #  @param theShapeErrors the shape errors obtained by CheckShape.
11452         #  @param theReturnStatus If 0 the description of problem is printed.
11453         #                         If 1 the description of problem is returned.
11454         #  @return If theReturnStatus is equal to 1 the description is returned.
11455         #          Otherwise doesn't return anything.
11456         #
11457         #  @ref tui_check_shape_page "Example"
11458         @ManageTransactions("MeasuOp")
11459         def PrintShapeErrors(self, theShape, theShapeErrors, theReturnStatus = 0):
11460             """
11461             Print shape errors obtained from CheckShape.
11462
11463             Parameters:
11464                 theShape Shape that was checked.
11465                 theShapeErrors the shape errors obtained by CheckShape.
11466                 theReturnStatus If 0 the description of problem is printed.
11467                                 If 1 the description of problem is returned.
11468
11469             Returns:
11470                 If theReturnStatus is equal to 1 the description is returned.
11471                   Otherwise doesn't return anything.
11472             """
11473             # Example: see GEOM_TestMeasures.py
11474             Descr = self.MeasuOp.PrintShapeErrors(theShape, theShapeErrors)
11475             if theReturnStatus == 1:
11476                 return Descr
11477             print(Descr)
11478             pass
11479
11480         ## Check a topology of the given shape.
11481         #  @param theShape Shape to check validity of.
11482         #  @param theIsCheckGeom If FALSE, only the shape's topology will be checked, \n
11483         #                        if TRUE, the shape's geometry will be checked also.
11484         #  @param theReturnStatus If 0 and if theShape is invalid, a description
11485         #                         of problem is printed.
11486         #                         If 1 isValid flag and the description of
11487         #                         problem is returned.
11488         #                         If 2 isValid flag and the list of error data
11489         #                         is returned.
11490         #  @return TRUE, if the shape "seems to be valid".
11491         #          If theShape is invalid, prints a description of problem.
11492         #          If theReturnStatus is equal to 1 the description is returned
11493         #          along with IsValid flag.
11494         #          If theReturnStatus is equal to 2 the list of error data is
11495         #          returned along with IsValid flag.
11496         #
11497         #  @ref tui_check_shape_page "Example"
11498         @ManageTransactions("MeasuOp")
11499         def CheckShape(self,theShape, theIsCheckGeom = 0, theReturnStatus = 0):
11500             """
11501             Check a topology of the given shape.
11502
11503             Parameters:
11504                 theShape Shape to check validity of.
11505                 theIsCheckGeom If FALSE, only the shape's topology will be checked,
11506                                if TRUE, the shape's geometry will be checked also.
11507                 theReturnStatus If 0 and if theShape is invalid, a description
11508                                 of problem is printed.
11509                                 If 1 IsValid flag and the description of
11510                                 problem is returned.
11511                                 If 2 IsValid flag and the list of error data
11512                                 is returned.
11513
11514             Returns:
11515                 TRUE, if the shape "seems to be valid".
11516                 If theShape is invalid, prints a description of problem.
11517                 If theReturnStatus is equal to 1 the description is returned
11518                 along with IsValid flag.
11519                 If theReturnStatus is equal to 2 the list of error data is
11520                 returned along with IsValid flag.
11521             """
11522             # Example: see GEOM_TestMeasures.py
11523             if theIsCheckGeom:
11524                 (IsValid, ShapeErrors) = self.MeasuOp.CheckShapeWithGeometry(theShape)
11525                 RaiseIfFailed("CheckShapeWithGeometry", self.MeasuOp)
11526             else:
11527                 (IsValid, ShapeErrors) = self.MeasuOp.CheckShape(theShape)
11528                 RaiseIfFailed("CheckShape", self.MeasuOp)
11529             if IsValid == 0:
11530                 if theReturnStatus == 0:
11531                     Descr = self.MeasuOp.PrintShapeErrors(theShape, ShapeErrors)
11532                     print(Descr)
11533             if theReturnStatus == 1:
11534               Descr = self.MeasuOp.PrintShapeErrors(theShape, ShapeErrors)
11535               return (IsValid, Descr)
11536             elif theReturnStatus == 2:
11537               return (IsValid, ShapeErrors)
11538             return IsValid
11539
11540         ## Detect self-intersections in the given shape.
11541         #  @param theShape Shape to check.
11542         #  @param theCheckLevel is the level of self-intersection check.
11543         #         Possible input values are:
11544         #         - GEOM.SI_V_V(0) - only V/V interferences
11545         #         - GEOM.SI_V_E(1) - V/V and V/E interferences
11546         #         - GEOM.SI_E_E(2) - V/V, V/E and E/E interferences
11547         #         - GEOM.SI_V_F(3) - V/V, V/E, E/E and V/F interferences
11548         #         - GEOM.SI_E_F(4) - V/V, V/E, E/E, V/F and E/F interferences
11549         #         - GEOM.SI_ALL(5) - all interferences.
11550         #  @return TRUE, if the shape contains no self-intersections.
11551         #
11552         #  @ref tui_check_self_intersections_page "Example"
11553         @ManageTransactions("MeasuOp")
11554         def CheckSelfIntersections(self, theShape, theCheckLevel = GEOM.SI_ALL):
11555             """
11556             Detect self-intersections in the given shape.
11557
11558             Parameters:
11559                 theShape Shape to check.
11560                 theCheckLevel is the level of self-intersection check.
11561                   Possible input values are:
11562                    - GEOM.SI_V_V(0) - only V/V interferences
11563                    - GEOM.SI_V_E(1) - V/V and V/E interferences
11564                    - GEOM.SI_E_E(2) - V/V, V/E and E/E interferences
11565                    - GEOM.SI_V_F(3) - V/V, V/E, E/E and V/F interferences
11566                    - GEOM.SI_E_F(4) - V/V, V/E, E/E, V/F and E/F interferences
11567                    - GEOM.SI_ALL(5) - all interferences.
11568  
11569             Returns:
11570                 TRUE, if the shape contains no self-intersections.
11571             """
11572             # Example: see GEOM_TestMeasures.py
11573             (IsValid, Pairs) = self.MeasuOp.CheckSelfIntersections(theShape, EnumToLong(theCheckLevel))
11574             RaiseIfFailed("CheckSelfIntersections", self.MeasuOp)
11575             return IsValid
11576
11577         ## Detect self-intersections of the given shape with algorithm based on mesh intersections.
11578         #  @param theShape Shape to check.
11579         #  @param theDeflection Linear deflection coefficient that specifies quality of tessellation:
11580         #         - if \a theDeflection <= 0, default deflection 0.001 is used
11581         #  @param theTolerance Specifies a distance between sub-shapes used for detecting gaps:
11582         #         - if \a theTolerance <= 0, algorithm detects intersections (default behavior)
11583         #         - if \a theTolerance > 0, algorithm detects gaps
11584         #  @return TRUE, if the shape contains no self-intersections.
11585         #
11586         #  @ref tui_check_self_intersections_fast_page "Example"
11587         @ManageTransactions("MeasuOp")
11588         def CheckSelfIntersectionsFast(self, theShape, theDeflection = 0.001, theTolerance = 0.0):
11589             """
11590             Detect self-intersections of the given shape with algorithm based on mesh intersections.
11591
11592             Parameters:
11593                 theShape Shape to check.
11594                 theDeflection Linear deflection coefficient that specifies quality of tessellation:
11595                     - if theDeflection <= 0, default deflection 0.001 is used
11596                 theTolerance Specifies a distance between shapes used for detecting gaps:
11597                     - if theTolerance <= 0, algorithm detects intersections (default behavior)
11598                     - if theTolerance > 0, algorithm detects gaps
11599  
11600             Returns:
11601                 TRUE, if the shape contains no self-intersections.
11602             """
11603             # Example: see GEOM_TestMeasures.py
11604             (IsValid, Pairs) = self.MeasuOp.CheckSelfIntersectionsFast(theShape, theDeflection, theTolerance)
11605             RaiseIfFailed("CheckSelfIntersectionsFast", self.MeasuOp)
11606             return IsValid
11607
11608         ## Check boolean and partition operations arguments.
11609         #  @param theShape the argument of an operation to be checked
11610         #  @return TRUE if the argument is valid for a boolean or partition
11611         #          operation; FALSE otherwise.
11612         @ManageTransactions("MeasuOp")
11613         def CheckBOPArguments(self, theShape):
11614             """
11615             Check boolean and partition operations arguments.
11616
11617             Parameters:
11618                 theShape the argument of an operation to be checked
11619
11620             Returns:
11621                 TRUE if the argument is valid for a boolean or partition
11622                 operation; FALSE otherwise.
11623             """
11624             return self.MeasuOp.CheckBOPArguments(theShape)
11625
11626         ## Detect intersections of the given shapes with algorithm based on mesh intersections.
11627         #  @param theShape1 First source object
11628         #  @param theShape2 Second source object
11629         #  @param theTolerance Specifies a distance between shapes used for detecting gaps:
11630         #         - if \a theTolerance <= 0, algorithm detects intersections (default behavior)
11631         #         - if \a theTolerance > 0, algorithm detects gaps
11632         #  @param theDeflection Linear deflection coefficient that specifies quality of tessellation:
11633         #         - if \a theDeflection <= 0, default deflection 0.001 is used
11634         #  @return TRUE, if there are intersections (gaps) between source shapes
11635         #  @return List of sub-shapes IDs from 1st shape that localize intersection.
11636         #  @return List of sub-shapes IDs from 2nd shape that localize intersection.
11637         #
11638         #  @ref tui_fast_intersection_page "Example"
11639         @ManageTransactions("MeasuOp")
11640         def FastIntersect(self, theShape1, theShape2, theTolerance = 0.0, theDeflection = 0.001):
11641             """
11642             Detect intersections of the given shapes with algorithm based on mesh intersections.
11643
11644             Parameters:
11645                 theShape1 First source object
11646                 theShape2 Second source object
11647                 theTolerance Specifies a distance between shapes used for detecting gaps:
11648                     - if theTolerance <= 0, algorithm detects intersections (default behavior)
11649                     - if theTolerance > 0, algorithm detects gaps
11650                 theDeflection Linear deflection coefficient that specifies quality of tessellation:
11651                     - if theDeflection <= 0, default deflection 0.001 is used
11652  
11653             Returns:
11654                 TRUE, if there are intersections (gaps) between source shapes
11655                 List of sub-shapes IDs from 1st shape that localize intersection.
11656                 List of sub-shapes IDs from 2nd shape that localize intersection.
11657             """
11658             # Example: see GEOM_TestMeasures.py
11659             IsOk, Res1, Res2 = self.MeasuOp.FastIntersect(theShape1, theShape2, theTolerance, theDeflection)
11660             RaiseIfFailed("FastIntersect", self.MeasuOp)
11661             return IsOk, Res1, Res2
11662
11663         ## Get position (LCS) of theShape.
11664         #
11665         #  Origin of the LCS is situated at the shape's center of mass.
11666         #  Axes of the LCS are obtained from shape's location or,
11667         #  if the shape is a planar face, from position of its plane.
11668         #
11669         #  @param theShape Shape to calculate position of.
11670         #  @return [Ox,Oy,Oz, Zx,Zy,Zz, Xx,Xy,Xz].
11671         #          Ox,Oy,Oz: Coordinates of shape's LCS origin.
11672         #          Zx,Zy,Zz: Coordinates of shape's LCS normal(main) direction.
11673         #          Xx,Xy,Xz: Coordinates of shape's LCS X direction.
11674         #
11675         #  @ref swig_todo "Example"
11676         @ManageTransactions("MeasuOp")
11677         def GetPosition(self,theShape):
11678             """
11679             Get position (LCS) of theShape.
11680             Origin of the LCS is situated at the shape's center of mass.
11681             Axes of the LCS are obtained from shape's location or,
11682             if the shape is a planar face, from position of its plane.
11683
11684             Parameters:
11685                 theShape Shape to calculate position of.
11686
11687             Returns:
11688                 [Ox,Oy,Oz, Zx,Zy,Zz, Xx,Xy,Xz].
11689                  Ox,Oy,Oz: Coordinates of shape's LCS origin.
11690                  Zx,Zy,Zz: Coordinates of shape's LCS normal(main) direction.
11691                  Xx,Xy,Xz: Coordinates of shape's LCS X direction.
11692             """
11693             # Example: see GEOM_TestMeasures.py
11694             aTuple = self.MeasuOp.GetPosition(theShape)
11695             RaiseIfFailed("GetPosition", self.MeasuOp)
11696             return aTuple
11697
11698         ## Get kind of theShape.
11699         #
11700         #  @param theShape Shape to get a kind of.
11701         #  @return Returns a kind of shape in terms of <VAR>GEOM.GEOM_IKindOfShape.shape_kind</VAR> enumeration
11702         #          and a list of parameters, describing the shape.
11703         #  @note  Concrete meaning of each value, returned via \a theIntegers
11704         #         or \a theDoubles list depends on the kind() of the shape.
11705         #
11706         #  @ref swig_todo "Example"
11707         @ManageTransactions("MeasuOp")
11708         def KindOfShape(self,theShape):
11709             """
11710             Get kind of theShape.
11711
11712             Parameters:
11713                 theShape Shape to get a kind of.
11714
11715             Returns:
11716                 a kind of shape in terms of GEOM_IKindOfShape.shape_kind enumeration
11717                     and a list of parameters, describing the shape.
11718             Note:
11719                 Concrete meaning of each value, returned via theIntegers
11720                 or theDoubles list depends on the geompy.kind of the shape
11721             """
11722             # Example: see GEOM_TestMeasures.py
11723             aRoughTuple = self.MeasuOp.KindOfShape(theShape)
11724             RaiseIfFailed("KindOfShape", self.MeasuOp)
11725
11726             aKind  = aRoughTuple[0]
11727             anInts = aRoughTuple[1]
11728             aDbls  = aRoughTuple[2]
11729
11730             # Now there is no exception from this rule:
11731             aKindTuple = [aKind] + aDbls + anInts
11732
11733             # If they are we will regroup parameters for such kind of shape.
11734             # For example:
11735             #if aKind == kind.SOME_KIND:
11736             #    #  SOME_KIND     int int double int double double
11737             #    aKindTuple = [aKind, anInts[0], anInts[1], aDbls[0], anInts[2], aDbls[1], aDbls[2]]
11738
11739             return aKindTuple
11740
11741         ## Returns the string that describes if the shell is good for solid.
11742         #  This is a support method for MakeSolid.
11743         #
11744         #  @param theShell the shell to be checked.
11745         #  @return Returns a string that describes the shell validity for
11746         #          solid construction.
11747         @ManageTransactions("MeasuOp")
11748         def _IsGoodForSolid(self, theShell):
11749             """
11750             Returns the string that describes if the shell is good for solid.
11751             This is a support method for MakeSolid.
11752
11753             Parameter:
11754                 theShell the shell to be checked.
11755
11756             Returns:
11757                 Returns a string that describes the shell validity for
11758                 solid construction.
11759             """
11760             aDescr = self.MeasuOp.IsGoodForSolid(theShell)
11761             return aDescr
11762
11763         # end of l2_measure
11764         ## @}
11765
11766         ## @addtogroup l2_import_export
11767         ## @{
11768
11769         ## Import a shape from the BREP, IGES, STEP or other file
11770         #  (depends on given format) with given name.
11771         #
11772         #  Note: this function is deprecated, it is kept for backward compatibility only
11773         #  Use Import<FormatName> instead, where <FormatName> is a name of desirable format to import.
11774         #
11775         #  @param theFileName The file, containing the shape.
11776         #  @param theFormatName Specify format for the file reading.
11777         #         Available formats can be obtained with InsertOp.ImportTranslators() method.
11778         #         If format 'IGES_SCALE' is used instead of 'IGES' or
11779         #            format 'STEP_SCALE' is used instead of 'STEP',
11780         #            length unit will be set to 'meter' and result model will be scaled.
11781         #  @param theName Object name; when specified, this parameter is used
11782         #         for result publication in the study. Otherwise, if automatic
11783         #         publication is switched on, default value is used for result name.
11784         #
11785         #  @return New GEOM.GEOM_Object, containing the imported shape.
11786         #          If material names are imported it returns the list of
11787         #          objects. The first one is the imported object followed by
11788         #          material groups.
11789         #  @note Auto publishing is allowed for the shape itself. Imported
11790         #        material groups are not automatically published.
11791         #
11792         #  @ref swig_Import_Export "Example"
11793         @ManageTransactions("InsertOp")
11794         def ImportFile(self, theFileName, theFormatName, theName=None):
11795             """
11796             Import a shape from the BREP, IGES, STEP or other file
11797             (depends on given format) with given name.
11798
11799             Note: this function is deprecated, it is kept for backward compatibility only
11800             Use Import<FormatName> instead, where <FormatName> is a name of desirable format to import.
11801
11802             Parameters: 
11803                 theFileName The file, containing the shape.
11804                 theFormatName Specify format for the file reading.
11805                     Available formats can be obtained with geompy.InsertOp.ImportTranslators() method.
11806                     If format 'IGES_SCALE' is used instead of 'IGES' or
11807                        format 'STEP_SCALE' is used instead of 'STEP',
11808                        length unit will be set to 'meter' and result model will be scaled.
11809                 theName Object name; when specified, this parameter is used
11810                         for result publication in the study. Otherwise, if automatic
11811                         publication is switched on, default value is used for result name.
11812
11813             Returns:
11814                 New GEOM.GEOM_Object, containing the imported shape.
11815                 If material names are imported it returns the list of
11816                 objects. The first one is the imported object followed by
11817                 material groups.
11818             Note:
11819                 Auto publishing is allowed for the shape itself. Imported
11820                 material groups are not automatically published.
11821             """
11822             # Example: see GEOM_TestOthers.py
11823             print("""
11824             WARNING: Function ImportFile is deprecated, use Import<FormatName> instead,
11825             where <FormatName> is a name of desirable format for importing.
11826             """)
11827             aListObj = self.InsertOp.ImportFile(theFileName, theFormatName)
11828             RaiseIfFailed("ImportFile", self.InsertOp)
11829             aNbObj = len(aListObj)
11830             if aNbObj > 0:
11831                 self._autoPublish(aListObj[0], theName, "imported")
11832             if aNbObj == 1:
11833                 return aListObj[0]
11834             return aListObj
11835
11836         ## Deprecated analog of ImportFile()
11837         def Import(self, theFileName, theFormatName, theName=None):
11838             """
11839             Deprecated analog of geompy.ImportFile, kept for backward compatibility only.
11840             """
11841             # note: auto-publishing is done in self.ImportFile()
11842             return self.ImportFile(theFileName, theFormatName, theName)
11843
11844         ## Read a shape from the binary stream, containing its bounding representation (BRep).
11845         #
11846         #  @note As the byte-stream representing the shape data can be quite large, this method
11847         #  is not automatically dumped to the Python script with the DumpStudy functionality;
11848         #  so please use this method carefully, only for strong reasons.
11849         #  
11850         #  @note GEOM.GEOM_Object.GetShapeStream() method can be used to obtain the shape's
11851         #  data stream.
11852         #
11853         #  @param theStream The BRep binary stream.
11854         #  @param theName Object name; when specified, this parameter is used
11855         #         for result publication in the study. Otherwise, if automatic
11856         #         publication is switched on, default value is used for result name.
11857         #
11858         #  @return New GEOM_Object, containing the shape, read from theStream.
11859         #
11860         #  @ref swig_Import_Export "Example"
11861         @ManageTransactions("InsertOp")
11862         def RestoreShape (self, theStream, theName=None):
11863             """
11864             Read a shape from the binary stream, containing its bounding representation (BRep).
11865
11866             Note:
11867                 shape.GetShapeStream() method can be used to obtain the shape's BRep stream.
11868
11869             Parameters:
11870                 theStream The BRep binary stream.
11871                 theName Object name; when specified, this parameter is used
11872                         for result publication in the study. Otherwise, if automatic
11873                         publication is switched on, default value is used for result name.
11874
11875             Returns:
11876                 New GEOM_Object, containing the shape, read from theStream.
11877             """
11878             # Example: see GEOM_TestOthers.py
11879             if not theStream:
11880                 # this is the workaround to ignore invalid case when data stream is empty
11881                 if int(os.getenv("GEOM_IGNORE_RESTORE_SHAPE", "0")) > 0:
11882                     print("WARNING: Result of RestoreShape is a NULL shape!")
11883                     return None
11884             anObj = self.InsertOp.RestoreShape(theStream)
11885             RaiseIfFailed("RestoreShape", self.InsertOp)
11886             self._autoPublish(anObj, theName, "restored")
11887             return anObj
11888
11889         ## Export the given shape into a file with given name.
11890         #
11891         #  Note: this function is deprecated, it is kept for backward compatibility only
11892         #  Use Export<FormatName> instead, where <FormatName> is a name of desirable format to export.
11893         #
11894         #  @param theObject Shape to be stored in the file.
11895         #  @param theFileName Name of the file to store the given shape in.
11896         #  @param theFormatName Specify format for the shape storage.
11897         #         Available formats can be obtained with
11898         #         geompy.InsertOp.ExportTranslators()[0] method.
11899         #
11900         #  @ref swig_Import_Export "Example"
11901         @ManageTransactions("InsertOp")
11902         def Export(self, theObject, theFileName, theFormatName):
11903             """
11904             Export the given shape into a file with given name.
11905
11906             Note: this function is deprecated, it is kept for backward compatibility only
11907             Use Export<FormatName> instead, where <FormatName> is a name of desirable format to export.
11908             
11909             Parameters: 
11910                 theObject Shape to be stored in the file.
11911                 theFileName Name of the file to store the given shape in.
11912                 theFormatName Specify format for the shape storage.
11913                               Available formats can be obtained with
11914                               geompy.InsertOp.ExportTranslators()[0] method.
11915             """
11916             # Example: see GEOM_TestOthers.py
11917             print("""
11918             WARNING: Function Export is deprecated, use Export<FormatName> instead,
11919             where <FormatName> is a name of desirable format for exporting.
11920             """)
11921             self.InsertOp.Export(theObject, theFileName, theFormatName)
11922             if self.InsertOp.IsDone() == 0:
11923                 raise RuntimeError("Export : " + self.InsertOp.GetErrorCode())
11924                 pass
11925             pass
11926
11927         # end of l2_import_export
11928         ## @}
11929
11930         ## @addtogroup l3_blocks
11931         ## @{
11932
11933         ## Create a quadrangle face from four edges. Order of Edges is not
11934         #  important. It is not necessary that edges share the same vertex.
11935         #  @param E1,E2,E3,E4 Edges for the face bound.
11936         #  @param theName Object name; when specified, this parameter is used
11937         #         for result publication in the study. Otherwise, if automatic
11938         #         publication is switched on, default value is used for result name.
11939         #
11940         #  @return New GEOM.GEOM_Object, containing the created face.
11941         #
11942         #  @ref tui_building_by_blocks_page "Example"
11943         @ManageTransactions("BlocksOp")
11944         def MakeQuad(self, E1, E2, E3, E4, theName=None):
11945             """
11946             Create a quadrangle face from four edges. Order of Edges is not
11947             important. It is not necessary that edges share the same vertex.
11948
11949             Parameters:
11950                 E1,E2,E3,E4 Edges for the face bound.
11951                 theName Object name; when specified, this parameter is used
11952                         for result publication in the study. Otherwise, if automatic
11953                         publication is switched on, default value is used for result name.
11954
11955             Returns:
11956                 New GEOM.GEOM_Object, containing the created face.
11957
11958             Example of usage:
11959                 qface1 = geompy.MakeQuad(edge1, edge2, edge3, edge4)
11960             """
11961             # Example: see GEOM_Spanner.py
11962             anObj = self.BlocksOp.MakeQuad(E1, E2, E3, E4)
11963             RaiseIfFailed("MakeQuad", self.BlocksOp)
11964             self._autoPublish(anObj, theName, "quad")
11965             return anObj
11966
11967         ## Create a quadrangle face on two edges.
11968         #  The missing edges will be built by creating the shortest ones.
11969         #  @param E1,E2 Two opposite edges for the face.
11970         #  @param theName Object name; when specified, this parameter is used
11971         #         for result publication in the study. Otherwise, if automatic
11972         #         publication is switched on, default value is used for result name.
11973         #
11974         #  @return New GEOM.GEOM_Object, containing the created face.
11975         #
11976         #  @ref tui_building_by_blocks_page "Example"
11977         @ManageTransactions("BlocksOp")
11978         def MakeQuad2Edges(self, E1, E2, theName=None):
11979             """
11980             Create a quadrangle face on two edges.
11981             The missing edges will be built by creating the shortest ones.
11982
11983             Parameters:
11984                 E1,E2 Two opposite edges for the face.
11985                 theName Object name; when specified, this parameter is used
11986                         for result publication in the study. Otherwise, if automatic
11987                         publication is switched on, default value is used for result name.
11988
11989             Returns:
11990                 New GEOM.GEOM_Object, containing the created face.
11991
11992             Example of usage:
11993                 # create vertices
11994                 p1 = geompy.MakeVertex(  0.,   0.,   0.)
11995                 p2 = geompy.MakeVertex(150.,  30.,   0.)
11996                 p3 = geompy.MakeVertex(  0., 120.,  50.)
11997                 p4 = geompy.MakeVertex(  0.,  40.,  70.)
11998                 # create edges
11999                 edge1 = geompy.MakeEdge(p1, p2)
12000                 edge2 = geompy.MakeEdge(p3, p4)
12001                 # create a quadrangle face from two edges
12002                 qface2 = geompy.MakeQuad2Edges(edge1, edge2)
12003             """
12004             # Example: see GEOM_Spanner.py
12005             anObj = self.BlocksOp.MakeQuad2Edges(E1, E2)
12006             RaiseIfFailed("MakeQuad2Edges", self.BlocksOp)
12007             self._autoPublish(anObj, theName, "quad")
12008             return anObj
12009
12010         ## Create a quadrangle face with specified corners.
12011         #  The missing edges will be built by creating the shortest ones.
12012         #  @param V1,V2,V3,V4 Corner vertices for the face.
12013         #  @param theName Object name; when specified, this parameter is used
12014         #         for result publication in the study. Otherwise, if automatic
12015         #         publication is switched on, default value is used for result name.
12016         #
12017         #  @return New GEOM.GEOM_Object, containing the created face.
12018         #
12019         #  @ref tui_building_by_blocks_page "Example 1"
12020         #  \n @ref swig_MakeQuad4Vertices "Example 2"
12021         @ManageTransactions("BlocksOp")
12022         def MakeQuad4Vertices(self, V1, V2, V3, V4, theName=None):
12023             """
12024             Create a quadrangle face with specified corners.
12025             The missing edges will be built by creating the shortest ones.
12026
12027             Parameters:
12028                 V1,V2,V3,V4 Corner vertices for the face.
12029                 theName Object name; when specified, this parameter is used
12030                         for result publication in the study. Otherwise, if automatic
12031                         publication is switched on, default value is used for result name.
12032
12033             Returns:
12034                 New GEOM.GEOM_Object, containing the created face.
12035
12036             Example of usage:
12037                 # create vertices
12038                 p1 = geompy.MakeVertex(  0.,   0.,   0.)
12039                 p2 = geompy.MakeVertex(150.,  30.,   0.)
12040                 p3 = geompy.MakeVertex(  0., 120.,  50.)
12041                 p4 = geompy.MakeVertex(  0.,  40.,  70.)
12042                 # create a quadrangle from four points in its corners
12043                 qface3 = geompy.MakeQuad4Vertices(p1, p2, p3, p4)
12044             """
12045             # Example: see GEOM_Spanner.py
12046             anObj = self.BlocksOp.MakeQuad4Vertices(V1, V2, V3, V4)
12047             RaiseIfFailed("MakeQuad4Vertices", self.BlocksOp)
12048             self._autoPublish(anObj, theName, "quad")
12049             return anObj
12050
12051         ## Create a hexahedral solid, bounded by the six given faces. Order of
12052         #  faces is not important. It is not necessary that Faces share the same edge.
12053         #  @param F1,F2,F3,F4,F5,F6 Faces for the hexahedral solid.
12054         #  @param theName Object name; when specified, this parameter is used
12055         #         for result publication in the study. Otherwise, if automatic
12056         #         publication is switched on, default value is used for result name.
12057         #
12058         #  @return New GEOM.GEOM_Object, containing the created solid.
12059         #
12060         #  @ref tui_building_by_blocks_page "Example 1"
12061         #  \n @ref swig_MakeHexa "Example 2"
12062         @ManageTransactions("BlocksOp")
12063         def MakeHexa(self, F1, F2, F3, F4, F5, F6, theName=None):
12064             """
12065             Create a hexahedral solid, bounded by the six given faces. Order of
12066             faces is not important. It is not necessary that Faces share the same edge.
12067
12068             Parameters:
12069                 F1,F2,F3,F4,F5,F6 Faces for the hexahedral solid.
12070                 theName Object name; when specified, this parameter is used
12071                         for result publication in the study. Otherwise, if automatic
12072                         publication is switched on, default value is used for result name.
12073
12074             Returns:
12075                 New GEOM.GEOM_Object, containing the created solid.
12076
12077             Example of usage:
12078                 solid = geompy.MakeHexa(qface1, qface2, qface3, qface4, qface5, qface6)
12079             """
12080             # Example: see GEOM_Spanner.py
12081             anObj = self.BlocksOp.MakeHexa(F1, F2, F3, F4, F5, F6)
12082             RaiseIfFailed("MakeHexa", self.BlocksOp)
12083             self._autoPublish(anObj, theName, "hexa")
12084             return anObj
12085
12086         ## Create a hexahedral solid between two given faces.
12087         #  The missing faces will be built by creating the smallest ones.
12088         #  @param F1,F2 Two opposite faces for the hexahedral solid.
12089         #  @param theName Object name; when specified, this parameter is used
12090         #         for result publication in the study. Otherwise, if automatic
12091         #         publication is switched on, default value is used for result name.
12092         #
12093         #  @return New GEOM.GEOM_Object, containing the created solid.
12094         #
12095         #  @ref tui_building_by_blocks_page "Example 1"
12096         #  \n @ref swig_MakeHexa2Faces "Example 2"
12097         @ManageTransactions("BlocksOp")
12098         def MakeHexa2Faces(self, F1, F2, theName=None):
12099             """
12100             Create a hexahedral solid between two given faces.
12101             The missing faces will be built by creating the smallest ones.
12102
12103             Parameters:
12104                 F1,F2 Two opposite faces for the hexahedral solid.
12105                 theName Object name; when specified, this parameter is used
12106                         for result publication in the study. Otherwise, if automatic
12107                         publication is switched on, default value is used for result name.
12108
12109             Returns:
12110                 New GEOM.GEOM_Object, containing the created solid.
12111
12112             Example of usage:
12113                 solid1 = geompy.MakeHexa2Faces(qface1, qface2)
12114             """
12115             # Example: see GEOM_Spanner.py
12116             anObj = self.BlocksOp.MakeHexa2Faces(F1, F2)
12117             RaiseIfFailed("MakeHexa2Faces", self.BlocksOp)
12118             self._autoPublish(anObj, theName, "hexa")
12119             return anObj
12120
12121         # end of l3_blocks
12122         ## @}
12123
12124         ## @addtogroup l3_blocks_op
12125         ## @{
12126
12127         ## Get a vertex, found in the given shape by its coordinates.
12128         #  @param theShape Block or a compound of blocks.
12129         #  @param theX,theY,theZ Coordinates of the sought vertex.
12130         #  @param theEpsilon Maximum allowed distance between the resulting
12131         #                    vertex and point with the given coordinates.
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_GetPoint "Example"
12139         @ManageTransactions("BlocksOp")
12140         def GetPoint(self, theShape, theX, theY, theZ, theEpsilon, theName=None):
12141             """
12142             Get a vertex, found in the given shape by its coordinates.
12143
12144             Parameters:
12145                 theShape Block or a compound of blocks.
12146                 theX,theY,theZ Coordinates of the sought vertex.
12147                 theEpsilon Maximum allowed distance between the resulting
12148                            vertex and point with the given coordinates.
12149                 theName Object name; when specified, this parameter is used
12150                         for result publication in the study. Otherwise, if automatic
12151                         publication is switched on, default value is used for result name.
12152
12153             Returns:
12154                 New GEOM.GEOM_Object, containing the found vertex.
12155
12156             Example of usage:
12157                 pnt = geompy.GetPoint(shape, -50,  50,  50, 0.01)
12158             """
12159             # Example: see GEOM_TestOthers.py
12160             anObj = self.BlocksOp.GetPoint(theShape, theX, theY, theZ, theEpsilon)
12161             RaiseIfFailed("GetPoint", self.BlocksOp)
12162             self._autoPublish(anObj, theName, "vertex")
12163             return anObj
12164
12165         ## Find a vertex of the given shape, which has minimal distance to the given point.
12166         #  @param theShape Any shape.
12167         #  @param thePoint Point, close to the desired vertex.
12168         #  @param theName Object name; when specified, this parameter is used
12169         #         for result publication in the study. Otherwise, if automatic
12170         #         publication is switched on, default value is used for result name.
12171         #
12172         #  @return New GEOM.GEOM_Object, containing the found vertex.
12173         #
12174         #  @ref swig_GetVertexNearPoint "Example"
12175         @ManageTransactions("BlocksOp")
12176         def GetVertexNearPoint(self, theShape, thePoint, theName=None):
12177             """
12178             Find a vertex of the given shape, which has minimal distance to the given point.
12179
12180             Parameters:
12181                 theShape Any shape.
12182                 thePoint Point, close to the desired vertex.
12183                 theName Object name; when specified, this parameter is used
12184                         for result publication in the study. Otherwise, if automatic
12185                         publication is switched on, default value is used for result name.
12186
12187             Returns:
12188                 New GEOM.GEOM_Object, containing the found vertex.
12189
12190             Example of usage:
12191                 pmidle = geompy.MakeVertex(50, 0, 50)
12192                 edge1 = geompy.GetEdgeNearPoint(blocksComp, pmidle)
12193             """
12194             # Example: see GEOM_TestOthers.py
12195             anObj = self.BlocksOp.GetVertexNearPoint(theShape, thePoint)
12196             RaiseIfFailed("GetVertexNearPoint", self.BlocksOp)
12197             self._autoPublish(anObj, theName, "vertex")
12198             return anObj
12199
12200         ## Get an edge, found in the given shape by two given vertices.
12201         #  @param theShape Block or a compound of blocks.
12202         #  @param thePoint1,thePoint2 Points, close to the ends of the desired edge.
12203         #  @param theName Object name; when specified, this parameter is used
12204         #         for result publication in the study. Otherwise, if automatic
12205         #         publication is switched on, default value is used for result name.
12206         #
12207         #  @return New GEOM.GEOM_Object, containing the found edge.
12208         #
12209         #  @ref swig_GetEdge "Example"
12210         @ManageTransactions("BlocksOp")
12211         def GetEdge(self, theShape, thePoint1, thePoint2, theName=None):
12212             """
12213             Get an edge, found in the given shape by two given vertices.
12214
12215             Parameters:
12216                 theShape Block or a compound of blocks.
12217                 thePoint1,thePoint2 Points, close to the ends of the desired edge.
12218                 theName Object name; when specified, this parameter is used
12219                         for result publication in the study. Otherwise, if automatic
12220                         publication is switched on, default value is used for result name.
12221
12222             Returns:
12223                 New GEOM.GEOM_Object, containing the found edge.
12224             """
12225             # Example: see GEOM_Spanner.py
12226             anObj = self.BlocksOp.GetEdge(theShape, thePoint1, thePoint2)
12227             RaiseIfFailed("GetEdge", self.BlocksOp)
12228             self._autoPublish(anObj, theName, "edge")
12229             return anObj
12230
12231         ## Find an edge of the given shape, which has minimal distance to the given point.
12232         #  @param theShape Block or a compound of blocks.
12233         #  @param thePoint Point, close to the desired edge.
12234         #  @param theName Object name; when specified, this parameter is used
12235         #         for result publication in the study. Otherwise, if automatic
12236         #         publication is switched on, default value is used for result name.
12237         #
12238         #  @return New GEOM.GEOM_Object, containing the found edge.
12239         #
12240         #  @ref swig_GetEdgeNearPoint "Example"
12241         @ManageTransactions("BlocksOp")
12242         def GetEdgeNearPoint(self, theShape, thePoint, theName=None):
12243             """
12244             Find an edge of the given shape, which has minimal distance to the given point.
12245
12246             Parameters:
12247                 theShape Block or a compound of blocks.
12248                 thePoint Point, close to the desired edge.
12249                 theName Object name; when specified, this parameter is used
12250                         for result publication in the study. Otherwise, if automatic
12251                         publication is switched on, default value is used for result name.
12252
12253             Returns:
12254                 New GEOM.GEOM_Object, containing the found edge.
12255             """
12256             # Example: see GEOM_TestOthers.py
12257             anObj = self.BlocksOp.GetEdgeNearPoint(theShape, thePoint)
12258             RaiseIfFailed("GetEdgeNearPoint", self.BlocksOp)
12259             self._autoPublish(anObj, theName, "edge")
12260             return anObj
12261
12262         ## Returns a face, found in the given shape by four given corner vertices.
12263         #  @param theShape Block or a compound of blocks.
12264         #  @param thePoint1,thePoint2,thePoint3,thePoint4 Points, close to the corners of the desired face.
12265         #  @param theName Object name; when specified, this parameter is used
12266         #         for result publication in the study. Otherwise, if automatic
12267         #         publication is switched on, default value is used for result name.
12268         #
12269         #  @return New GEOM.GEOM_Object, containing the found face.
12270         #
12271         #  @ref swig_todo "Example"
12272         @ManageTransactions("BlocksOp")
12273         def GetFaceByPoints(self, theShape, thePoint1, thePoint2, thePoint3, thePoint4, theName=None):
12274             """
12275             Returns a face, found in the given shape by four given corner vertices.
12276
12277             Parameters:
12278                 theShape Block or a compound of blocks.
12279                 thePoint1,thePoint2,thePoint3,thePoint4 Points, close to the corners of the desired face.
12280                 theName Object name; when specified, this parameter is used
12281                         for result publication in the study. Otherwise, if automatic
12282                         publication is switched on, default value is used for result name.
12283
12284             Returns:
12285                 New GEOM.GEOM_Object, containing the found face.
12286             """
12287             # Example: see GEOM_Spanner.py
12288             anObj = self.BlocksOp.GetFaceByPoints(theShape, thePoint1, thePoint2, thePoint3, thePoint4)
12289             RaiseIfFailed("GetFaceByPoints", self.BlocksOp)
12290             self._autoPublish(anObj, theName, "face")
12291             return anObj
12292
12293         ## Get a face of block, found in the given shape by two given edges.
12294         #  @param theShape Block or a compound of blocks.
12295         #  @param theEdge1,theEdge2 Edges, close to the edges of the desired face.
12296         #  @param theName Object name; when specified, this parameter is used
12297         #         for result publication in the study. Otherwise, if automatic
12298         #         publication is switched on, default value is used for result name.
12299         #
12300         #  @return New GEOM.GEOM_Object, containing the found face.
12301         #
12302         #  @ref swig_todo "Example"
12303         @ManageTransactions("BlocksOp")
12304         def GetFaceByEdges(self, theShape, theEdge1, theEdge2, theName=None):
12305             """
12306             Get a face of block, found in the given shape by two given edges.
12307
12308             Parameters:
12309                 theShape Block or a compound of blocks.
12310                 theEdge1,theEdge2 Edges, close to the edges of the desired face.
12311                 theName Object name; when specified, this parameter is used
12312                         for result publication in the study. Otherwise, if automatic
12313                         publication is switched on, default value is used for result name.
12314
12315             Returns:
12316                 New GEOM.GEOM_Object, containing the found face.
12317             """
12318             # Example: see GEOM_Spanner.py
12319             anObj = self.BlocksOp.GetFaceByEdges(theShape, theEdge1, theEdge2)
12320             RaiseIfFailed("GetFaceByEdges", self.BlocksOp)
12321             self._autoPublish(anObj, theName, "face")
12322             return anObj
12323
12324         ## Find a face, opposite to the given one in the given block.
12325         #  @param theBlock Must be a hexahedral solid.
12326         #  @param theFace Face of \a theBlock, opposite to the desired face.
12327         #  @param theName Object name; when specified, this parameter is used
12328         #         for result publication in the study. Otherwise, if automatic
12329         #         publication is switched on, default value is used for result name.
12330         #
12331         #  @return New GEOM.GEOM_Object, containing the found face.
12332         #
12333         #  @ref swig_GetOppositeFace "Example"
12334         @ManageTransactions("BlocksOp")
12335         def GetOppositeFace(self, theBlock, theFace, theName=None):
12336             """
12337             Find a face, opposite to the given one in the given block.
12338
12339             Parameters:
12340                 theBlock Must be a hexahedral solid.
12341                 theFace Face of theBlock, opposite to the desired face.
12342                 theName Object name; when specified, this parameter is used
12343                         for result publication in the study. Otherwise, if automatic
12344                         publication is switched on, default value is used for result name.
12345
12346             Returns:
12347                 New GEOM.GEOM_Object, containing the found face.
12348             """
12349             # Example: see GEOM_Spanner.py
12350             anObj = self.BlocksOp.GetOppositeFace(theBlock, theFace)
12351             RaiseIfFailed("GetOppositeFace", self.BlocksOp)
12352             self._autoPublish(anObj, theName, "face")
12353             return anObj
12354
12355         ## Find a face of the given shape, which has minimal distance to the given point.
12356         #  @param theShape Block or a compound of blocks.
12357         #  @param thePoint Point, close to the desired face.
12358         #  @param theName Object name; when specified, this parameter is used
12359         #         for result publication in the study. Otherwise, if automatic
12360         #         publication is switched on, default value is used for result name.
12361         #
12362         #  @return New GEOM.GEOM_Object, containing the found face.
12363         #
12364         #  @ref swig_GetFaceNearPoint "Example"
12365         @ManageTransactions("BlocksOp")
12366         def GetFaceNearPoint(self, theShape, thePoint, theName=None):
12367             """
12368             Find a face of the given shape, which has minimal distance to the given point.
12369
12370             Parameters:
12371                 theShape Block or a compound of blocks.
12372                 thePoint Point, close to the desired face.
12373                 theName Object name; when specified, this parameter is used
12374                         for result publication in the study. Otherwise, if automatic
12375                         publication is switched on, default value is used for result name.
12376
12377             Returns:
12378                 New GEOM.GEOM_Object, containing the found face.
12379             """
12380             # Example: see GEOM_Spanner.py
12381             anObj = self.BlocksOp.GetFaceNearPoint(theShape, thePoint)
12382             RaiseIfFailed("GetFaceNearPoint", self.BlocksOp)
12383             self._autoPublish(anObj, theName, "face")
12384             return anObj
12385
12386         ## Find a face of block, whose outside normale has minimal angle with the given vector.
12387         #  @param theBlock Block or a compound of blocks.
12388         #  @param theVector Vector, close to the normale of the desired face.
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.GEOM_Object, containing the found face.
12394         #
12395         #  @ref swig_todo "Example"
12396         @ManageTransactions("BlocksOp")
12397         def GetFaceByNormale(self, theBlock, theVector, theName=None):
12398             """
12399             Find a face of block, whose outside normale has minimal angle with the given vector.
12400
12401             Parameters:
12402                 theBlock Block or a compound of blocks.
12403                 theVector Vector, close to the normale of the desired face.
12404                 theName Object name; when specified, this parameter is used
12405                         for result publication in the study. Otherwise, if automatic
12406                         publication is switched on, default value is used for result name.
12407
12408             Returns:
12409                 New GEOM.GEOM_Object, containing the found face.
12410             """
12411             # Example: see GEOM_Spanner.py
12412             anObj = self.BlocksOp.GetFaceByNormale(theBlock, theVector)
12413             RaiseIfFailed("GetFaceByNormale", self.BlocksOp)
12414             self._autoPublish(anObj, theName, "face")
12415             return anObj
12416
12417         ## Find all sub-shapes of type \a theShapeType of the given shape,
12418         #  which have minimal distance to the given point.
12419         #  @param theShape Any shape.
12420         #  @param thePoint Point, close to the desired shape.
12421         #  @param theShapeType Defines what kind of sub-shapes is searched GEOM::shape_type
12422         #  @param theTolerance The tolerance for distances comparison. All shapes
12423         #                      with distances to the given point in interval
12424         #                      [minimal_distance, minimal_distance + theTolerance] will be gathered.
12425         #  @param theName Object name; when specified, this parameter is used
12426         #         for result publication in the study. Otherwise, if automatic
12427         #         publication is switched on, default value is used for result name.
12428         #
12429         #  @return New GEOM_Object, containing a group of all found shapes.
12430         #
12431         #  @ref swig_GetShapesNearPoint "Example"
12432         @ManageTransactions("BlocksOp")
12433         def GetShapesNearPoint(self, theShape, thePoint, theShapeType, theTolerance = 1e-07, theName=None):
12434             """
12435             Find all sub-shapes of type theShapeType of the given shape,
12436             which have minimal distance to the given point.
12437
12438             Parameters:
12439                 theShape Any shape.
12440                 thePoint Point, close to the desired shape.
12441                 theShapeType Defines what kind of sub-shapes is searched (see GEOM::shape_type)
12442                 theTolerance The tolerance for distances comparison. All shapes
12443                                 with distances to the given point in interval
12444                                 [minimal_distance, minimal_distance + theTolerance] will be gathered.
12445                 theName Object name; when specified, this parameter is used
12446                         for result publication in the study. Otherwise, if automatic
12447                         publication is switched on, default value is used for result name.
12448
12449             Returns:
12450                 New GEOM_Object, containing a group of all found shapes.
12451             """
12452             # Example: see GEOM_TestOthers.py
12453             anObj = self.BlocksOp.GetShapesNearPoint(theShape, thePoint, theShapeType, theTolerance)
12454             RaiseIfFailed("GetShapesNearPoint", self.BlocksOp)
12455             self._autoPublish(anObj, theName, "group")
12456             return anObj
12457
12458         # end of l3_blocks_op
12459         ## @}
12460
12461         ## @addtogroup l4_blocks_measure
12462         ## @{
12463
12464         ## Check, if the compound of blocks is given.
12465         #  To be considered as a compound of blocks, the
12466         #  given shape must satisfy the following conditions:
12467         #  - Each element of the compound should be a Block (6 faces).
12468         #  - Each face should be a quadrangle, i.e. it should have only 1 wire
12469         #       with 4 edges. If <VAR>theIsUseC1</VAR> is set to True and
12470         #       there are more than 4 edges in the only wire of a face,
12471         #       this face is considered to be quadrangle if it has 4 bounds
12472         #       (1 or more edge) of C1 continuity.
12473         #  - A connection between two Blocks should be an entire quadrangle face or an entire edge.
12474         #  - The compound should be connexe.
12475         #  - The glue between two quadrangle faces should be applied.
12476         #  @param theCompound The compound to check.
12477         #  @param theIsUseC1 Flag to check if there are 4 bounds on a face
12478         #         taking into account C1 continuity.
12479         #  @param theAngTolerance the angular tolerance to check if two neighbor
12480         #         edges are codirectional in the common vertex with this
12481         #         tolerance. This parameter is used only if
12482         #         <VAR>theIsUseC1</VAR> is set to True.
12483         #  @return TRUE, if the given shape is a compound of blocks.
12484         #  If theCompound is not valid, prints all discovered errors.
12485         #
12486         #  @ref tui_check_compound_of_blocks_page "Example 1"
12487         #  \n @ref swig_CheckCompoundOfBlocks "Example 2"
12488         @ManageTransactions("BlocksOp")
12489         def CheckCompoundOfBlocks(self,theCompound, theIsUseC1 = False,
12490                                   theAngTolerance = 1.e-12):
12491             """
12492             Check, if the compound of blocks is given.
12493             To be considered as a compound of blocks, the
12494             given shape must satisfy the following conditions:
12495             - Each element of the compound should be a Block (6 faces).
12496             - Each face should be a quadrangle, i.e. it should have only 1 wire
12497                  with 4 edges. If theIsUseC1 is set to True and
12498                  there are more than 4 edges in the only wire of a face,
12499                  this face is considered to be quadrangle if it has 4 bounds
12500                  (1 or more edge) of C1 continuity.
12501             - A connection between two Blocks should be an entire quadrangle face or an entire edge.
12502             - The compound should be connexe.
12503             - The glue between two quadrangle faces should be applied.
12504
12505             Parameters:
12506                 theCompound The compound to check.
12507                 theIsUseC1 Flag to check if there are 4 bounds on a face
12508                            taking into account C1 continuity.
12509                 theAngTolerance the angular tolerance to check if two neighbor
12510                            edges are codirectional in the common vertex with this
12511                            tolerance. This parameter is used only if
12512                            theIsUseC1 is set to True.
12513
12514             Returns:
12515                 TRUE, if the given shape is a compound of blocks.
12516                 If theCompound is not valid, prints all discovered errors.
12517             """
12518             # Example: see GEOM_Spanner.py
12519             aTolerance = -1.0
12520             if theIsUseC1:
12521                 aTolerance = theAngTolerance
12522             (IsValid, BCErrors) = self.BlocksOp.CheckCompoundOfBlocks(theCompound, aTolerance)
12523             RaiseIfFailed("CheckCompoundOfBlocks", self.BlocksOp)
12524             if IsValid == 0:
12525                 Descr = self.BlocksOp.PrintBCErrors(theCompound, BCErrors)
12526                 print(Descr)
12527             return IsValid
12528
12529         ## Retrieve all non blocks solids and faces from \a theShape.
12530         #  @param theShape The shape to explore.
12531         #  @param theIsUseC1 Flag to check if there are 4 bounds on a face
12532         #         taking into account C1 continuity.
12533         #  @param theAngTolerance the angular tolerance to check if two neighbor
12534         #         edges are codirectional in the common vertex with this
12535         #         tolerance. This parameter is used only if
12536         #         <VAR>theIsUseC1</VAR> is set to True.
12537         #  @param theName Object name; when specified, this parameter is used
12538         #         for result publication in the study. Otherwise, if automatic
12539         #         publication is switched on, default value is used for result name.
12540         #
12541         #  @return A tuple of two GEOM_Objects. The first object is a group of all
12542         #          non block solids (= not 6 faces, or with 6 faces, but with the
12543         #          presence of non-quadrangular faces). The second object is a
12544         #          group of all non quadrangular faces (= faces with more then
12545         #          1 wire or, if <VAR>theIsUseC1</VAR> is set to True, faces
12546         #          with 1 wire with not 4 edges that do not form 4 bounds of
12547         #          C1 continuity).
12548         #
12549         #  @ref tui_get_non_blocks_page "Example 1"
12550         #  \n @ref swig_GetNonBlocks "Example 2"
12551         @ManageTransactions("BlocksOp")
12552         def GetNonBlocks (self, theShape, theIsUseC1 = False,
12553                           theAngTolerance = 1.e-12, theName=None):
12554             """
12555             Retrieve all non blocks solids and faces from theShape.
12556
12557             Parameters:
12558                 theShape The shape to explore.
12559                 theIsUseC1 Flag to check if there are 4 bounds on a face
12560                            taking into account C1 continuity.
12561                 theAngTolerance the angular tolerance to check if two neighbor
12562                            edges are codirectional in the common vertex with this
12563                            tolerance. This parameter is used only if
12564                            theIsUseC1 is set to True.
12565                 theName Object name; when specified, this parameter is used
12566                         for result publication in the study. Otherwise, if automatic
12567                         publication is switched on, default value is used for result name.
12568
12569             Returns:
12570                 A tuple of two GEOM_Objects. The first object is a group of all
12571                 non block solids (= not 6 faces, or with 6 faces, but with the
12572                 presence of non-quadrangular faces). The second object is a
12573                 group of all non quadrangular faces (= faces with more then
12574                 1 wire or, if <VAR>theIsUseC1</VAR> is set to True, faces
12575                 with 1 wire with not 4 edges that do not form 4 bounds of
12576                 C1 continuity).
12577
12578             Usage:
12579                 (res_sols, res_faces) = geompy.GetNonBlocks(myShape1)
12580             """
12581             # Example: see GEOM_Spanner.py
12582             aTolerance = -1.0
12583             if theIsUseC1:
12584                 aTolerance = theAngTolerance
12585             aTuple = self.BlocksOp.GetNonBlocks(theShape, aTolerance)
12586             RaiseIfFailed("GetNonBlocks", self.BlocksOp)
12587             self._autoPublish(aTuple, theName, ("groupNonHexas", "groupNonQuads"))
12588             return aTuple
12589
12590         ## Remove all seam and degenerated edges from \a theShape.
12591         #  Unite faces and edges, sharing one surface. It means that
12592         #  this faces must have references to one C++ surface object (handle).
12593         #  @param theShape The compound or single solid to remove irregular edges from.
12594         #  @param doUnionFaces If True, then unite faces. If False (the default value),
12595         #         do not unite faces.
12596         #  @param theName Object name; when specified, this parameter is used
12597         #         for result publication in the study. Otherwise, if automatic
12598         #         publication is switched on, default value is used for result name.
12599         #
12600         #  @return Improved shape.
12601         #
12602         #  @ref swig_RemoveExtraEdges "Example"
12603         @ManageTransactions("BlocksOp")
12604         def RemoveExtraEdges(self, theShape, doUnionFaces=False, theName=None):
12605             """
12606             Remove all seam and degenerated edges from theShape.
12607             Unite faces and edges, sharing one surface. It means that
12608             this faces must have references to one C++ surface object (handle).
12609
12610             Parameters:
12611                 theShape The compound or single solid to remove irregular edges from.
12612                 doUnionFaces If True, then unite faces. If False (the default value),
12613                              do not unite faces.
12614                 theName Object name; when specified, this parameter is used
12615                         for result publication in the study. Otherwise, if automatic
12616                         publication is switched on, default value is used for result name.
12617
12618             Returns:
12619                 Improved shape.
12620             """
12621             # Example: see GEOM_TestOthers.py
12622             nbFacesOptimum = -1 # -1 means do not unite faces
12623             if doUnionFaces is True: nbFacesOptimum = 0 # 0 means unite faces
12624             anObj = self.BlocksOp.RemoveExtraEdges(theShape, nbFacesOptimum)
12625             RaiseIfFailed("RemoveExtraEdges", self.BlocksOp)
12626             self._autoPublish(anObj, theName, "removeExtraEdges")
12627             return anObj
12628
12629         ## Performs union faces of \a theShape
12630         #  Unite faces sharing one surface. It means that
12631         #  these faces must have references to one C++ surface object (handle).
12632         #  @param theShape The compound or single solid that contains faces
12633         #         to perform union.
12634         #  @param theName Object name; when specified, this parameter is used
12635         #         for result publication in the study. Otherwise, if automatic
12636         #         publication is switched on, default value is used for result name.
12637         #
12638         #  @return Improved shape.
12639         #
12640         #  @ref swig_UnionFaces "Example"
12641         @ManageTransactions("BlocksOp")
12642         def UnionFaces(self, theShape, theName=None):
12643             """
12644             Performs union faces of theShape.
12645             Unite faces sharing one surface. It means that
12646             these faces must have references to one C++ surface object (handle).
12647
12648             Parameters:
12649                 theShape The compound or single solid that contains faces
12650                          to perform union.
12651                 theName Object name; when specified, this parameter is used
12652                         for result publication in the study. Otherwise, if automatic
12653                         publication is switched on, default value is used for result name.
12654
12655             Returns:
12656                 Improved shape.
12657             """
12658             # Example: see GEOM_TestOthers.py
12659             anObj = self.BlocksOp.UnionFaces(theShape)
12660             RaiseIfFailed("UnionFaces", self.BlocksOp)
12661             self._autoPublish(anObj, theName, "unionFaces")
12662             return anObj
12663
12664         ## Check, if the given shape is a blocks compound.
12665         #  Fix all detected errors.
12666         #    \note Single block can be also fixed by this method.
12667         #  @param theShape The compound to check and improve.
12668         #  @param theName Object name; when specified, this parameter is used
12669         #         for result publication in the study. Otherwise, if automatic
12670         #         publication is switched on, default value is used for result name.
12671         #
12672         #  @return Improved compound.
12673         #
12674         #  @ref swig_CheckAndImprove "Example"
12675         @ManageTransactions("BlocksOp")
12676         def CheckAndImprove(self, theShape, theName=None):
12677             """
12678             Check, if the given shape is a blocks compound.
12679             Fix all detected errors.
12680
12681             Note:
12682                 Single block can be also fixed by this method.
12683
12684             Parameters:
12685                 theShape The compound to check and improve.
12686                 theName Object name; when specified, this parameter is used
12687                         for result publication in the study. Otherwise, if automatic
12688                         publication is switched on, default value is used for result name.
12689
12690             Returns:
12691                 Improved compound.
12692             """
12693             # Example: see GEOM_TestOthers.py
12694             anObj = self.BlocksOp.CheckAndImprove(theShape)
12695             RaiseIfFailed("CheckAndImprove", self.BlocksOp)
12696             self._autoPublish(anObj, theName, "improved")
12697             return anObj
12698
12699         # end of l4_blocks_measure
12700         ## @}
12701
12702         ## @addtogroup l3_blocks_op
12703         ## @{
12704
12705         ## Get all the blocks, contained in the given compound.
12706         #  @param theCompound The compound to explode.
12707         #  @param theMinNbFaces If solid has lower number of faces, it is not a block.
12708         #  @param theMaxNbFaces If solid has higher number of faces, it is not a block.
12709         #  @param theName Object name; when specified, this parameter is used
12710         #         for result publication in the study. Otherwise, if automatic
12711         #         publication is switched on, default value is used for result name.
12712         #
12713         #  @note If theMaxNbFaces = 0, the maximum number of faces is not restricted.
12714         #
12715         #  @return List of GEOM.GEOM_Object, containing the retrieved blocks.
12716         #
12717         #  @ref tui_explode_on_blocks "Example 1"
12718         #  \n @ref swig_MakeBlockExplode "Example 2"
12719         @ManageTransactions("BlocksOp")
12720         def MakeBlockExplode(self, theCompound, theMinNbFaces, theMaxNbFaces, theName=None):
12721             """
12722             Get all the blocks, contained in the given compound.
12723
12724             Parameters:
12725                 theCompound The compound to explode.
12726                 theMinNbFaces If solid has lower number of faces, it is not a block.
12727                 theMaxNbFaces If solid has higher number of faces, it is not a block.
12728                 theName Object name; when specified, this parameter is used
12729                         for result publication in the study. Otherwise, if automatic
12730                         publication is switched on, default value is used for result name.
12731
12732             Note:
12733                 If theMaxNbFaces = 0, the maximum number of faces is not restricted.
12734
12735             Returns:
12736                 List of GEOM.GEOM_Object, containing the retrieved blocks.
12737             """
12738             # Example: see GEOM_TestOthers.py
12739             theMinNbFaces,theMaxNbFaces,Parameters = ParseParameters(theMinNbFaces,theMaxNbFaces)
12740             aList = self.BlocksOp.ExplodeCompoundOfBlocks(theCompound, theMinNbFaces, theMaxNbFaces)
12741             RaiseIfFailed("ExplodeCompoundOfBlocks", self.BlocksOp)
12742             for anObj in aList:
12743                 anObj.SetParameters(Parameters)
12744                 pass
12745             self._autoPublish(aList, theName, "block")
12746             return aList
12747
12748         ## Find block, containing the given point inside its volume or on boundary.
12749         #  @param theCompound Compound, to find block in.
12750         #  @param thePoint Point, close to the desired block. If the point lays on
12751         #         boundary between some blocks, we return block with nearest center.
12752         #  @param theName Object name; when specified, this parameter is used
12753         #         for result publication in the study. Otherwise, if automatic
12754         #         publication is switched on, default value is used for result name.
12755         #
12756         #  @return New GEOM.GEOM_Object, containing the found block.
12757         #
12758         #  @ref swig_todo "Example"
12759         @ManageTransactions("BlocksOp")
12760         def GetBlockNearPoint(self, theCompound, thePoint, theName=None):
12761             """
12762             Find block, containing the given point inside its volume or on boundary.
12763
12764             Parameters:
12765                 theCompound Compound, to find block in.
12766                 thePoint Point, close to the desired block. If the point lays on
12767                          boundary between some blocks, we return block with nearest center.
12768                 theName Object name; when specified, this parameter is used
12769                         for result publication in the study. Otherwise, if automatic
12770                         publication is switched on, default value is used for result name.
12771
12772             Returns:
12773                 New GEOM.GEOM_Object, containing the found block.
12774             """
12775             # Example: see GEOM_Spanner.py
12776             anObj = self.BlocksOp.GetBlockNearPoint(theCompound, thePoint)
12777             RaiseIfFailed("GetBlockNearPoint", self.BlocksOp)
12778             self._autoPublish(anObj, theName, "block")
12779             return anObj
12780
12781         ## Find block, containing all the elements, passed as the parts, or maximum quantity of them.
12782         #  @param theCompound Compound, to find block in.
12783         #  @param theParts List of faces and/or edges and/or vertices to be parts of the found block.
12784         #  @param theName Object name; when specified, this parameter is used
12785         #         for result publication in the study. Otherwise, if automatic
12786         #         publication is switched on, default value is used for result name.
12787         #
12788         #  @return New GEOM.GEOM_Object, containing the found block.
12789         #
12790         #  @ref swig_GetBlockByParts "Example"
12791         @ManageTransactions("BlocksOp")
12792         def GetBlockByParts(self, theCompound, theParts, theName=None):
12793             """
12794              Find block, containing all the elements, passed as the parts, or maximum quantity of them.
12795
12796              Parameters:
12797                 theCompound Compound, to find block in.
12798                 theParts List of faces and/or edges and/or vertices to be parts of the found block.
12799                 theName Object name; when specified, this parameter is used
12800                         for result publication in the study. Otherwise, if automatic
12801                         publication is switched on, default value is used for result name.
12802
12803             Returns:
12804                 New GEOM_Object, containing the found block.
12805             """
12806             # Example: see GEOM_TestOthers.py
12807             anObj = self.BlocksOp.GetBlockByParts(theCompound, theParts)
12808             RaiseIfFailed("GetBlockByParts", self.BlocksOp)
12809             self._autoPublish(anObj, theName, "block")
12810             return anObj
12811
12812         ## Return all blocks, containing all the elements, passed as the parts.
12813         #  @param theCompound Compound, to find blocks in.
12814         #  @param theParts List of faces and/or edges and/or vertices to be parts of the found blocks.
12815         #  @param theName Object name; when specified, this parameter is used
12816         #         for result publication in the study. Otherwise, if automatic
12817         #         publication is switched on, default value is used for result name.
12818         #
12819         #  @return List of GEOM.GEOM_Object, containing the found blocks.
12820         #
12821         #  @ref swig_todo "Example"
12822         @ManageTransactions("BlocksOp")
12823         def GetBlocksByParts(self, theCompound, theParts, theName=None):
12824             """
12825             Return all blocks, containing all the elements, passed as the parts.
12826
12827             Parameters:
12828                 theCompound Compound, to find blocks in.
12829                 theParts List of faces and/or edges and/or vertices to be parts of the found blocks.
12830                 theName Object name; when specified, this parameter is used
12831                         for result publication in the study. Otherwise, if automatic
12832                         publication is switched on, default value is used for result name.
12833
12834             Returns:
12835                 List of GEOM.GEOM_Object, containing the found blocks.
12836             """
12837             # Example: see GEOM_Spanner.py
12838             aList = self.BlocksOp.GetBlocksByParts(theCompound, theParts)
12839             RaiseIfFailed("GetBlocksByParts", self.BlocksOp)
12840             self._autoPublish(aList, theName, "block")
12841             return aList
12842
12843         ## Multi-transformate block and glue the result.
12844         #  Transformation is defined so, as to superpose direction faces.
12845         #  @param Block Hexahedral solid to be multi-transformed.
12846         #  @param DirFace1 ID of First direction face.
12847         #  @param DirFace2 ID of Second direction face.
12848         #  @param NbTimes Quantity of transformations to be done.
12849         #  @param theName Object name; when specified, this parameter is used
12850         #         for result publication in the study. Otherwise, if automatic
12851         #         publication is switched on, default value is used for result name.
12852         #
12853         #  @note Unique ID of sub-shape can be obtained, using method GetSubShapeID().
12854         #
12855         #  @return New GEOM.GEOM_Object, containing the result shape.
12856         #
12857         #  @ref tui_multi_transformation "Example"
12858         @ManageTransactions("BlocksOp")
12859         def MakeMultiTransformation1D(self, Block, DirFace1, DirFace2, NbTimes, theName=None):
12860             """
12861             Multi-transformate block and glue the result.
12862             Transformation is defined so, as to superpose direction faces.
12863
12864             Parameters:
12865                 Block Hexahedral solid to be multi-transformed.
12866                 DirFace1 ID of First direction face.
12867                 DirFace2 ID of Second direction face.
12868                 NbTimes Quantity of transformations to be done.
12869                 theName Object name; when specified, this parameter is used
12870                         for result publication in the study. Otherwise, if automatic
12871                         publication is switched on, default value is used for result name.
12872
12873             Note:
12874                 Unique ID of sub-shape can be obtained, using method GetSubShapeID().
12875
12876             Returns:
12877                 New GEOM.GEOM_Object, containing the result shape.
12878             """
12879             # Example: see GEOM_Spanner.py
12880             DirFace1,DirFace2,NbTimes,Parameters = ParseParameters(DirFace1,DirFace2,NbTimes)
12881             anObj = self.BlocksOp.MakeMultiTransformation1D(Block, DirFace1, DirFace2, NbTimes)
12882             RaiseIfFailed("MakeMultiTransformation1D", self.BlocksOp)
12883             anObj.SetParameters(Parameters)
12884             self._autoPublish(anObj, theName, "transformed")
12885             return anObj
12886
12887         ## Multi-transformate block and glue the result.
12888         #  @param Block Hexahedral solid to be multi-transformed.
12889         #  @param DirFace1U,DirFace2U IDs of Direction faces for the first transformation.
12890         #  @param DirFace1V,DirFace2V IDs of Direction faces for the second transformation.
12891         #  @param NbTimesU,NbTimesV Quantity of transformations to be done.
12892         #  @param theName Object name; when specified, this parameter is used
12893         #         for result publication in the study. Otherwise, if automatic
12894         #         publication is switched on, default value is used for result name.
12895         #
12896         #  @return New GEOM.GEOM_Object, containing the result shape.
12897         #
12898         #  @ref tui_multi_transformation "Example"
12899         @ManageTransactions("BlocksOp")
12900         def MakeMultiTransformation2D(self, Block, DirFace1U, DirFace2U, NbTimesU,
12901                                       DirFace1V, DirFace2V, NbTimesV, theName=None):
12902             """
12903             Multi-transformate block and glue the result.
12904
12905             Parameters:
12906                 Block Hexahedral solid to be multi-transformed.
12907                 DirFace1U,DirFace2U IDs of Direction faces for the first transformation.
12908                 DirFace1V,DirFace2V IDs of Direction faces for the second transformation.
12909                 NbTimesU,NbTimesV Quantity of transformations to be done.
12910                 theName Object name; when specified, this parameter is used
12911                         for result publication in the study. Otherwise, if automatic
12912                         publication is switched on, default value is used for result name.
12913
12914             Returns:
12915                 New GEOM.GEOM_Object, containing the result shape.
12916             """
12917             # Example: see GEOM_Spanner.py
12918             DirFace1U,DirFace2U,NbTimesU,DirFace1V,DirFace2V,NbTimesV,Parameters = ParseParameters(
12919               DirFace1U,DirFace2U,NbTimesU,DirFace1V,DirFace2V,NbTimesV)
12920             anObj = self.BlocksOp.MakeMultiTransformation2D(Block, DirFace1U, DirFace2U, NbTimesU,
12921                                                             DirFace1V, DirFace2V, NbTimesV)
12922             RaiseIfFailed("MakeMultiTransformation2D", self.BlocksOp)
12923             anObj.SetParameters(Parameters)
12924             self._autoPublish(anObj, theName, "transformed")
12925             return anObj
12926
12927         ## Build all possible propagation groups.
12928         #  Propagation group is a set of all edges, opposite to one (main)
12929         #  edge of this group directly or through other opposite edges.
12930         #  Notion of Opposite Edge make sense only on quadrangle face.
12931         #  @param theShape Shape to build propagation groups on.
12932         #  @param theName Object name; when specified, this parameter is used
12933         #         for result publication in the study. Otherwise, if automatic
12934         #         publication is switched on, default value is used for result name.
12935         #
12936         #  @return List of GEOM.GEOM_Object, each of them is a propagation group.
12937         #
12938         #  @ref swig_Propagate "Example"
12939         @ManageTransactions("BlocksOp")
12940         def Propagate(self, theShape, theName=None):
12941             """
12942             Build all possible propagation groups.
12943             Propagation group is a set of all edges, opposite to one (main)
12944             edge of this group directly or through other opposite edges.
12945             Notion of Opposite Edge make sense only on quadrangle face.
12946
12947             Parameters:
12948                 theShape Shape to build propagation groups on.
12949                 theName Object name; when specified, this parameter is used
12950                         for result publication in the study. Otherwise, if automatic
12951                         publication is switched on, default value is used for result name.
12952
12953             Returns:
12954                 List of GEOM.GEOM_Object, each of them is a propagation group.
12955             """
12956             # Example: see GEOM_TestOthers.py
12957             listChains = self.BlocksOp.Propagate(theShape)
12958             RaiseIfFailed("Propagate", self.BlocksOp)
12959             self._autoPublish(listChains, theName, "propagate")
12960             return listChains
12961
12962         # end of l3_blocks_op
12963         ## @}
12964
12965         ## @addtogroup l3_groups
12966         ## @{
12967
12968         ## Creates a new group which will store sub-shapes of theMainShape
12969         #  @param theMainShape is a GEOM object on which the group is selected
12970         #  @param theShapeType defines a shape type of the group (see GEOM::shape_type)
12971         #  @param theName Object name; when specified, this parameter is used
12972         #         for result publication in the study. Otherwise, if automatic
12973         #         publication is switched on, default value is used for result name.
12974         #
12975         #  @return a newly created GEOM group (GEOM.GEOM_Object)
12976         #
12977         #  @ref tui_working_with_groups_page "Example 1"
12978         #  \n @ref swig_CreateGroup "Example 2"
12979         @ManageTransactions("GroupOp")
12980         def CreateGroup(self, theMainShape, theShapeType, theName=None):
12981             """
12982             Creates a new group which will store sub-shapes of theMainShape
12983
12984             Parameters:
12985                theMainShape is a GEOM object on which the group is selected
12986                theShapeType defines a shape type of the group:"COMPOUND", "COMPSOLID",
12987                             "SOLID", "SHELL", "FACE", "WIRE", "EDGE", "VERTEX", "SHAPE".
12988                 theName Object name; when specified, this parameter is used
12989                         for result publication in the study. Otherwise, if automatic
12990                         publication is switched on, default value is used for result name.
12991
12992             Returns:
12993                a newly created GEOM group
12994
12995             Example of usage:
12996                 group = geompy.CreateGroup(Box, geompy.ShapeType["FACE"])
12997
12998             """
12999             # Example: see GEOM_TestOthers.py
13000             anObj = self.GroupOp.CreateGroup(theMainShape, theShapeType)
13001             RaiseIfFailed("CreateGroup", self.GroupOp)
13002             self._autoPublish(anObj, theName, "group")
13003             return anObj
13004
13005         ## Adds a sub-object with ID theSubShapeId to the group
13006         #  @param theGroup is a GEOM group to which the new sub-shape is added
13007         #  @param theSubShapeID is a sub-shape ID in the main object.
13008         #  \note Use method GetSubShapeID() to get an unique ID of the sub-shape
13009         #
13010         #  @ref tui_working_with_groups_page "Example"
13011         @ManageTransactions("GroupOp")
13012         def AddObject(self,theGroup, theSubShapeID):
13013             """
13014             Adds a sub-object with ID theSubShapeId to the group
13015
13016             Parameters:
13017                 theGroup       is a GEOM group to which the new sub-shape is added
13018                 theSubShapeID  is a sub-shape ID in the main object.
13019
13020             Note:
13021                 Use method GetSubShapeID() to get an unique ID of the sub-shape
13022             """
13023             # Example: see GEOM_TestOthers.py
13024             self.GroupOp.AddObject(theGroup, theSubShapeID)
13025             if self.GroupOp.GetErrorCode() != "PAL_ELEMENT_ALREADY_PRESENT":
13026                 RaiseIfFailed("AddObject", self.GroupOp)
13027                 pass
13028             pass
13029
13030         ## Removes a sub-object with ID \a theSubShapeId from the group
13031         #  @param theGroup is a GEOM group from which the new sub-shape is removed
13032         #  @param theSubShapeID is a sub-shape ID in the main object.
13033         #  \note Use method GetSubShapeID() to get an unique ID of the sub-shape
13034         #
13035         #  @ref tui_working_with_groups_page "Example"
13036         @ManageTransactions("GroupOp")
13037         def RemoveObject(self,theGroup, theSubShapeID):
13038             """
13039             Removes a sub-object with ID theSubShapeId from the group
13040
13041             Parameters:
13042                 theGroup is a GEOM group from which the new sub-shape is removed
13043                 theSubShapeID is a sub-shape ID in the main object.
13044
13045             Note:
13046                 Use method GetSubShapeID() to get an unique ID of the sub-shape
13047             """
13048             # Example: see GEOM_TestOthers.py
13049             self.GroupOp.RemoveObject(theGroup, theSubShapeID)
13050             RaiseIfFailed("RemoveObject", self.GroupOp)
13051             pass
13052
13053         ## Adds to the group all the given shapes. No errors, if some shapes are already included.
13054         #  @param theGroup is a GEOM group to which the new sub-shapes are added.
13055         #  @param theSubShapes is a list of sub-shapes to be added.
13056         #
13057         #  @ref tui_working_with_groups_page "Example"
13058         @ManageTransactions("GroupOp")
13059         def UnionList (self,theGroup, theSubShapes):
13060             """
13061             Adds to the group all the given shapes. No errors, if some shapes are already included.
13062
13063             Parameters:
13064                 theGroup is a GEOM group to which the new sub-shapes are added.
13065                 theSubShapes is a list of sub-shapes to be added.
13066             """
13067             # Example: see GEOM_TestOthers.py
13068             self.GroupOp.UnionList(theGroup, theSubShapes)
13069             RaiseIfFailed("UnionList", self.GroupOp)
13070             pass
13071
13072         ## Adds to the group all the given shapes. No errors, if some shapes are already included.
13073         #  @param theGroup is a GEOM group to which the new sub-shapes are added.
13074         #  @param theSubShapes is a list of indices of sub-shapes to be added.
13075         #
13076         #  @ref swig_UnionIDs "Example"
13077         @ManageTransactions("GroupOp")
13078         def UnionIDs(self,theGroup, theSubShapes):
13079             """
13080             Adds to the group all the given shapes. No errors, if some shapes are already included.
13081
13082             Parameters:
13083                 theGroup is a GEOM group to which the new sub-shapes are added.
13084                 theSubShapes is a list of indices of sub-shapes to be added.
13085             """
13086             # Example: see GEOM_TestOthers.py
13087             self.GroupOp.UnionIDs(theGroup, theSubShapes)
13088             RaiseIfFailed("UnionIDs", self.GroupOp)
13089             pass
13090
13091         ## Removes from the group all the given shapes. No errors, if some shapes are not included.
13092         #  @param theGroup is a GEOM group from which the sub-shapes are removed.
13093         #  @param theSubShapes is a list of sub-shapes to be removed.
13094         #
13095         #  @ref tui_working_with_groups_page "Example"
13096         @ManageTransactions("GroupOp")
13097         def DifferenceList (self,theGroup, theSubShapes):
13098             """
13099             Removes from the group all the given shapes. No errors, if some shapes are not included.
13100
13101             Parameters:
13102                 theGroup is a GEOM group from which the sub-shapes are removed.
13103                 theSubShapes is a list of sub-shapes to be removed.
13104             """
13105             # Example: see GEOM_TestOthers.py
13106             self.GroupOp.DifferenceList(theGroup, theSubShapes)
13107             RaiseIfFailed("DifferenceList", self.GroupOp)
13108             pass
13109
13110         ## Removes from the group all the given shapes. No errors, if some shapes are not included.
13111         #  @param theGroup is a GEOM group from which the sub-shapes are removed.
13112         #  @param theSubShapes is a list of indices of sub-shapes to be removed.
13113         #
13114         #  @ref swig_DifferenceIDs "Example"
13115         @ManageTransactions("GroupOp")
13116         def DifferenceIDs(self,theGroup, theSubShapes):
13117             """
13118             Removes from the group all the given shapes. No errors, if some shapes are not included.
13119
13120             Parameters:
13121                 theGroup is a GEOM group from which the sub-shapes are removed.
13122                 theSubShapes is a list of indices of sub-shapes to be removed.
13123             """
13124             # Example: see GEOM_TestOthers.py
13125             self.GroupOp.DifferenceIDs(theGroup, theSubShapes)
13126             RaiseIfFailed("DifferenceIDs", self.GroupOp)
13127             pass
13128
13129         ## Union of two groups.
13130         #  New group is created. It will contain all entities
13131         #  which are present in groups theGroup1 and theGroup2.
13132         #  @param theGroup1, theGroup2 are the initial GEOM groups
13133         #                              to create the united group from.
13134         #  @param theName Object name; when specified, this parameter is used
13135         #         for result publication in the study. Otherwise, if automatic
13136         #         publication is switched on, default value is used for result name.
13137         #
13138         #  @return a newly created GEOM group.
13139         #
13140         #  @ref tui_union_groups_anchor "Example"
13141         @ManageTransactions("GroupOp")
13142         def UnionGroups (self, theGroup1, theGroup2, theName=None):
13143             """
13144             Union of two groups.
13145             New group is created. It will contain all entities
13146             which are present in groups theGroup1 and theGroup2.
13147
13148             Parameters:
13149                 theGroup1, theGroup2 are the initial GEOM groups
13150                                      to create the united group from.
13151                 theName Object name; when specified, this parameter is used
13152                         for result publication in the study. Otherwise, if automatic
13153                         publication is switched on, default value is used for result name.
13154
13155             Returns:
13156                 a newly created GEOM group.
13157             """
13158             # Example: see GEOM_TestOthers.py
13159             aGroup = self.GroupOp.UnionGroups(theGroup1, theGroup2)
13160             RaiseIfFailed("UnionGroups", self.GroupOp)
13161             self._autoPublish(aGroup, theName, "group")
13162             return aGroup
13163
13164         ## Intersection of two groups.
13165         #  New group is created. It will contain only those entities
13166         #  which are present in both groups theGroup1 and theGroup2.
13167         #  @param theGroup1, theGroup2 are the initial GEOM groups to get common part of.
13168         #  @param theName Object name; when specified, this parameter is used
13169         #         for result publication in the study. Otherwise, if automatic
13170         #         publication is switched on, default value is used for result name.
13171         #
13172         #  @return a newly created GEOM group.
13173         #
13174         #  @ref tui_intersect_groups_anchor "Example"
13175         @ManageTransactions("GroupOp")
13176         def IntersectGroups (self, theGroup1, theGroup2, theName=None):
13177             """
13178             Intersection of two groups.
13179             New group is created. It will contain only those entities
13180             which are present in both groups theGroup1 and theGroup2.
13181
13182             Parameters:
13183                 theGroup1, theGroup2 are the initial GEOM groups to get common part of.
13184                 theName Object name; when specified, this parameter is used
13185                         for result publication in the study. Otherwise, if automatic
13186                         publication is switched on, default value is used for result name.
13187
13188             Returns:
13189                 a newly created GEOM group.
13190             """
13191             # Example: see GEOM_TestOthers.py
13192             aGroup = self.GroupOp.IntersectGroups(theGroup1, theGroup2)
13193             RaiseIfFailed("IntersectGroups", self.GroupOp)
13194             self._autoPublish(aGroup, theName, "group")
13195             return aGroup
13196
13197         ## Cut of two groups.
13198         #  New group is created. It will contain entities which are
13199         #  present in group theGroup1 but are not present in group theGroup2.
13200         #  @param theGroup1 is a GEOM group to include elements of.
13201         #  @param theGroup2 is a GEOM group to exclude elements of.
13202         #  @param theName Object name; when specified, this parameter is used
13203         #         for result publication in the study. Otherwise, if automatic
13204         #         publication is switched on, default value is used for result name.
13205         #
13206         #  @return a newly created GEOM group.
13207         #
13208         #  @ref tui_cut_groups_anchor "Example"
13209         @ManageTransactions("GroupOp")
13210         def CutGroups (self, theGroup1, theGroup2, theName=None):
13211             """
13212             Cut of two groups.
13213             New group is created. It will contain entities which are
13214             present in group theGroup1 but are not present in group theGroup2.
13215
13216             Parameters:
13217                 theGroup1 is a GEOM group to include elements of.
13218                 theGroup2 is a GEOM group to exclude elements of.
13219                 theName Object name; when specified, this parameter is used
13220                         for result publication in the study. Otherwise, if automatic
13221                         publication is switched on, default value is used for result name.
13222
13223             Returns:
13224                 a newly created GEOM group.
13225             """
13226             # Example: see GEOM_TestOthers.py
13227             aGroup = self.GroupOp.CutGroups(theGroup1, theGroup2)
13228             RaiseIfFailed("CutGroups", self.GroupOp)
13229             self._autoPublish(aGroup, theName, "group")
13230             return aGroup
13231
13232         ## Union of list of groups.
13233         #  New group is created. It will contain all entities that are
13234         #  present in groups listed in theGList.
13235         #  @param theGList is a list of GEOM groups to create the united group from.
13236         #  @param theName Object name; when specified, this parameter is used
13237         #         for result publication in the study. Otherwise, if automatic
13238         #         publication is switched on, default value is used for result name.
13239         #
13240         #  @return a newly created GEOM group.
13241         #
13242         #  @ref tui_union_groups_anchor "Example"
13243         @ManageTransactions("GroupOp")
13244         def UnionListOfGroups (self, theGList, theName=None):
13245             """
13246             Union of list of groups.
13247             New group is created. It will contain all entities that are
13248             present in groups listed in theGList.
13249
13250             Parameters:
13251                 theGList is a list of GEOM groups to create the united group from.
13252                 theName Object name; when specified, this parameter is used
13253                         for result publication in the study. Otherwise, if automatic
13254                         publication is switched on, default value is used for result name.
13255
13256             Returns:
13257                 a newly created GEOM group.
13258             """
13259             # Example: see GEOM_TestOthers.py
13260             aGroup = self.GroupOp.UnionListOfGroups(theGList)
13261             RaiseIfFailed("UnionListOfGroups", self.GroupOp)
13262             self._autoPublish(aGroup, theName, "group")
13263             return aGroup
13264
13265         ## Cut of lists of groups.
13266         #  New group is created. It will contain only entities
13267         #  which are present in groups listed in theGList.
13268         #  @param theGList is a list of GEOM groups to include elements of.
13269         #  @param theName Object name; when specified, this parameter is used
13270         #         for result publication in the study. Otherwise, if automatic
13271         #         publication is switched on, default value is used for result name.
13272         #
13273         #  @return a newly created GEOM group.
13274         #
13275         #  @ref tui_intersect_groups_anchor "Example"
13276         @ManageTransactions("GroupOp")
13277         def IntersectListOfGroups (self, theGList, theName=None):
13278             """
13279             Cut of lists of groups.
13280             New group is created. It will contain only entities
13281             which are present in groups listed in theGList.
13282
13283             Parameters:
13284                 theGList is a list of GEOM groups to include elements of.
13285                 theName Object name; when specified, this parameter is used
13286                         for result publication in the study. Otherwise, if automatic
13287                         publication is switched on, default value is used for result name.
13288
13289             Returns:
13290                 a newly created GEOM group.
13291             """
13292             # Example: see GEOM_TestOthers.py
13293             aGroup = self.GroupOp.IntersectListOfGroups(theGList)
13294             RaiseIfFailed("IntersectListOfGroups", self.GroupOp)
13295             self._autoPublish(aGroup, theName, "group")
13296             return aGroup
13297
13298         ## Cut of lists of groups.
13299         #  New group is created. It will contain only entities
13300         #  which are present in groups listed in theGList1 but
13301         #  are not present in groups from theGList2.
13302         #  @param theGList1 is a list of GEOM groups to include elements of.
13303         #  @param theGList2 is a list of GEOM groups to exclude elements of.
13304         #  @param theName Object name; when specified, this parameter is used
13305         #         for result publication in the study. Otherwise, if automatic
13306         #         publication is switched on, default value is used for result name.
13307         #
13308         #  @return a newly created GEOM group.
13309         #
13310         #  @ref tui_cut_groups_anchor "Example"
13311         @ManageTransactions("GroupOp")
13312         def CutListOfGroups (self, theGList1, theGList2, theName=None):
13313             """
13314             Cut of lists of groups.
13315             New group is created. It will contain only entities
13316             which are present in groups listed in theGList1 but
13317             are not present in groups from theGList2.
13318
13319             Parameters:
13320                 theGList1 is a list of GEOM groups to include elements of.
13321                 theGList2 is a list of GEOM groups to exclude elements of.
13322                 theName Object name; when specified, this parameter is used
13323                         for result publication in the study. Otherwise, if automatic
13324                         publication is switched on, default value is used for result name.
13325
13326             Returns:
13327                 a newly created GEOM group.
13328             """
13329             # Example: see GEOM_TestOthers.py
13330             aGroup = self.GroupOp.CutListOfGroups(theGList1, theGList2)
13331             RaiseIfFailed("CutListOfGroups", self.GroupOp)
13332             self._autoPublish(aGroup, theName, "group")
13333             return aGroup
13334
13335         ## Returns a list of sub-objects ID stored in the group
13336         #  @param theGroup is a GEOM group for which a list of IDs is requested
13337         #
13338         #  @ref swig_GetObjectIDs "Example"
13339         @ManageTransactions("GroupOp")
13340         def GetObjectIDs(self,theGroup):
13341             """
13342             Returns a list of sub-objects ID stored in the group
13343
13344             Parameters:
13345                 theGroup is a GEOM group for which a list of IDs is requested
13346             """
13347             # Example: see GEOM_TestOthers.py
13348             ListIDs = self.GroupOp.GetObjects(theGroup)
13349             RaiseIfFailed("GetObjects", self.GroupOp)
13350             return ListIDs
13351
13352         ## Returns a type of sub-objects stored in the group
13353         #  @param theGroup is a GEOM group which type is returned.
13354         #
13355         #  @ref swig_GetType "Example"
13356         @ManageTransactions("GroupOp")
13357         def GetType(self,theGroup):
13358             """
13359             Returns a type of sub-objects stored in the group
13360
13361             Parameters:
13362                 theGroup is a GEOM group which type is returned.
13363             """
13364             # Example: see GEOM_TestOthers.py
13365             aType = self.GroupOp.GetType(theGroup)
13366             RaiseIfFailed("GetType", self.GroupOp)
13367             return aType
13368
13369         ## Convert a type of geom object from id to string value
13370         #  @param theId is a GEOM object type id.
13371         #  @return type of geom object (POINT, VECTOR, PLANE, LINE, TORUS, ... )
13372         #  @ref swig_GetType "Example"
13373         def ShapeIdToType(self, theId):
13374             """
13375             Convert a type of geom object from id to string value
13376
13377             Parameters:
13378                 theId is a GEOM object type id.
13379
13380             Returns:
13381                 type of geom object (POINT, VECTOR, PLANE, LINE, TORUS, ... )
13382             """
13383             if theId == 0:
13384                 return "COPY"
13385             if theId == 1:
13386                 return "IMPORT"
13387             if theId == 2:
13388                 return "POINT"
13389             if theId == 3:
13390                 return "VECTOR"
13391             if theId == 4:
13392                 return "PLANE"
13393             if theId == 5:
13394                 return "LINE"
13395             if theId == 6:
13396                 return "TORUS"
13397             if theId == 7:
13398                 return "BOX"
13399             if theId == 8:
13400                 return "CYLINDER"
13401             if theId == 9:
13402                 return "CONE"
13403             if theId == 10:
13404                 return "SPHERE"
13405             if theId == 11:
13406                 return "PRISM"
13407             if theId == 12:
13408                 return "REVOLUTION"
13409             if theId == 13:
13410                 return "BOOLEAN"
13411             if theId == 14:
13412                 return "PARTITION"
13413             if theId == 15:
13414                 return "POLYLINE"
13415             if theId == 16:
13416                 return "CIRCLE"
13417             if theId == 17:
13418                 return "SPLINE"
13419             if theId == 18:
13420                 return "ELLIPSE"
13421             if theId == 19:
13422                 return "CIRC_ARC"
13423             if theId == 20:
13424                 return "FILLET"
13425             if theId == 21:
13426                 return "CHAMFER"
13427             if theId == 22:
13428                 return "EDGE"
13429             if theId == 23:
13430                 return "WIRE"
13431             if theId == 24:
13432                 return "FACE"
13433             if theId == 25:
13434                 return "SHELL"
13435             if theId == 26:
13436                 return "SOLID"
13437             if theId == 27:
13438                 return "COMPOUND"
13439             if theId == 28:
13440                 return "SUBSHAPE"
13441             if theId == 29:
13442                 return "PIPE"
13443             if theId == 30:
13444                 return "ARCHIMEDE"
13445             if theId == 31:
13446                 return "FILLING"
13447             if theId == 32:
13448                 return "EXPLODE"
13449             if theId == 33:
13450                 return "GLUED"
13451             if theId == 34:
13452                 return "SKETCHER"
13453             if theId == 35:
13454                 return "CDG"
13455             if theId == 36:
13456                 return "FREE_BOUNDS"
13457             if theId == 37:
13458                 return "GROUP"
13459             if theId == 38:
13460                 return "BLOCK"
13461             if theId == 39:
13462                 return "MARKER"
13463             if theId == 40:
13464                 return "THRUSECTIONS"
13465             if theId == 41:
13466                 return "COMPOUNDFILTER"
13467             if theId == 42:
13468                 return "SHAPES_ON_SHAPE"
13469             if theId == 43:
13470                 return "ELLIPSE_ARC"
13471             if theId == 44:
13472                 return "3DSKETCHER"
13473             if theId == 45:
13474                 return "FILLET_2D"
13475             if theId == 46:
13476                 return "FILLET_1D"
13477             if theId == 201:
13478                 return "PIPETSHAPE"
13479             return "Shape Id not exist."
13480
13481         ## Returns a main shape associated with the group
13482         #  @param theGroup is a GEOM group for which a main shape object is requested
13483         #  @return a GEOM object which is a main shape for theGroup
13484         #
13485         #  @ref swig_GetMainShape "Example"
13486         @ManageTransactions("GroupOp")
13487         def GetMainShape(self,theGroup):
13488             """
13489             Returns a main shape associated with the group
13490
13491             Parameters:
13492                 theGroup is a GEOM group for which a main shape object is requested
13493
13494             Returns:
13495                 a GEOM object which is a main shape for theGroup
13496
13497             Example of usage: BoxCopy = geompy.GetMainShape(CreateGroup)
13498             """
13499             # Example: see GEOM_TestOthers.py
13500             anObj = self.GroupOp.GetMainShape(theGroup)
13501             RaiseIfFailed("GetMainShape", self.GroupOp)
13502             return anObj
13503
13504         ## Create group of edges of theShape, whose length is in range [min_length, max_length].
13505         #  If include_min/max == 0, edges with length == min/max_length will not be included in result.
13506         #  @param theShape given shape (see GEOM.GEOM_Object)
13507         #  @param min_length minimum length of edges of theShape
13508         #  @param max_length maximum length of edges of theShape
13509         #  @param include_max indicating if edges with length == max_length should be included in result, 1-yes, 0-no (default=1)
13510         #  @param include_min indicating if edges with length == min_length should be included in result, 1-yes, 0-no (default=1)
13511         #  @param theName Object name; when specified, this parameter is used
13512         #         for result publication in the study. Otherwise, if automatic
13513         #         publication is switched on, default value is used for result name.
13514         #
13515         #  @return a newly created GEOM group of edges
13516         #
13517         #  @@ref swig_todo "Example"
13518         def GetEdgesByLength (self, theShape, min_length, max_length, include_min = 1, include_max = 1, theName=None):
13519             """
13520             Create group of edges of theShape, whose length is in range [min_length, max_length].
13521             If include_min/max == 0, edges with length == min/max_length will not be included in result.
13522
13523             Parameters:
13524                 theShape given shape
13525                 min_length minimum length of edges of theShape
13526                 max_length maximum length of edges of theShape
13527                 include_max indicating if edges with length == max_length should be included in result, 1-yes, 0-no (default=1)
13528                 include_min indicating if edges with length == min_length should be included in result, 1-yes, 0-no (default=1)
13529                 theName Object name; when specified, this parameter is used
13530                         for result publication in the study. Otherwise, if automatic
13531                         publication is switched on, default value is used for result name.
13532
13533              Returns:
13534                 a newly created GEOM group of edges.
13535             """
13536             edges = self.SubShapeAll(theShape, self.ShapeType["EDGE"])
13537             edges_in_range = []
13538             for edge in edges:
13539                 Props = self.BasicProperties(edge)
13540                 if min_length <= Props[0] and Props[0] <= max_length:
13541                     if (not include_min) and (min_length == Props[0]):
13542                         skip = 1
13543                     else:
13544                         if (not include_max) and (Props[0] == max_length):
13545                             skip = 1
13546                         else:
13547                             edges_in_range.append(edge)
13548
13549             if len(edges_in_range) <= 0:
13550                 print("No edges found by given criteria")
13551                 return None
13552
13553             # note: auto-publishing is done in self.CreateGroup()
13554             group_edges = self.CreateGroup(theShape, self.ShapeType["EDGE"], theName)
13555             self.UnionList(group_edges, edges_in_range)
13556
13557             return group_edges
13558
13559         ## Create group of edges of selected shape, whose length is in range [min_length, max_length].
13560         #  If include_min/max == 0, edges with length == min/max_length will not be included in result.
13561         #  @param min_length minimum length of edges of selected shape
13562         #  @param max_length maximum length of edges of selected shape
13563         #  @param include_max indicating if edges with length == max_length should be included in result, 1-yes, 0-no (default=1)
13564         #  @param include_min indicating if edges with length == min_length should be included in result, 1-yes, 0-no (default=1)
13565         #  @return a newly created GEOM group of edges
13566         #  @ref swig_todo "Example"
13567         def SelectEdges (self, min_length, max_length, include_min = 1, include_max = 1):
13568             """
13569             Create group of edges of selected shape, whose length is in range [min_length, max_length].
13570             If include_min/max == 0, edges with length == min/max_length will not be included in result.
13571
13572             Parameters:
13573                 min_length minimum length of edges of selected shape
13574                 max_length maximum length of edges of selected shape
13575                 include_max indicating if edges with length == max_length should be included in result, 1-yes, 0-no (default=1)
13576                 include_min indicating if edges with length == min_length should be included in result, 1-yes, 0-no (default=1)
13577
13578              Returns:
13579                 a newly created GEOM group of edges.
13580             """
13581             nb_selected = sg.SelectedCount()
13582             if nb_selected < 1:
13583                 print("Select a shape before calling this function, please.")
13584                 return 0
13585             if nb_selected > 1:
13586                 print("Only one shape must be selected")
13587                 return 0
13588
13589             id_shape = sg.getSelected(0)
13590             shape = IDToObject( id_shape )
13591
13592             group_edges = self.GetEdgesByLength(shape, min_length, max_length, include_min, include_max)
13593
13594             left_str  = " < "
13595             right_str = " < "
13596             if include_min: left_str  = " <= "
13597             if include_max: right_str  = " <= "
13598
13599             self.addToStudyInFather(shape, group_edges, "Group of edges with " + repr(min_length)
13600                                     + left_str + "length" + right_str + repr(max_length))
13601
13602             sg.updateObjBrowser()
13603
13604             return group_edges
13605
13606         # end of l3_groups
13607         ## @}
13608
13609         #@@ insert new functions before this line @@ do not remove this line @@#
13610
13611         ## Create a copy of the given object
13612         #
13613         #  @param theOriginal geometry object for copy
13614         #  @param theName Object name; when specified, this parameter is used
13615         #         for result publication in the study. Otherwise, if automatic
13616         #         publication is switched on, default value is used for result name.
13617         #
13618         #  @return New GEOM_Object, containing the copied shape.
13619         #
13620         #  @ingroup l1_geomBuilder_auxiliary
13621         #  @ref swig_MakeCopy "Example"
13622         @ManageTransactions("InsertOp")
13623         def MakeCopy(self, theOriginal, theName=None):
13624             """
13625             Create a copy of the given object
13626
13627             Parameters:
13628                 theOriginal geometry object for copy
13629                 theName Object name; when specified, this parameter is used
13630                         for result publication in the study. Otherwise, if automatic
13631                         publication is switched on, default value is used for result name.
13632
13633             Returns:
13634                 New GEOM_Object, containing the copied shape.
13635
13636             Example of usage: Copy = geompy.MakeCopy(Box)
13637             """
13638             # Example: see GEOM_TestAll.py
13639             anObj = self.InsertOp.MakeCopy(theOriginal)
13640             RaiseIfFailed("MakeCopy", self.InsertOp)
13641             self._autoPublish(anObj, theName, "copy")
13642             return anObj
13643
13644         ## Add Path to load python scripts from
13645         #  @param Path a path to load python scripts from
13646         #  @ingroup l1_geomBuilder_auxiliary
13647         def addPath(self,Path):
13648             """
13649             Add Path to load python scripts from
13650
13651             Parameters:
13652                 Path a path to load python scripts from
13653             """
13654             if (sys.path.count(Path) < 1):
13655                 sys.path.append(Path)
13656                 pass
13657             pass
13658
13659         ## Load marker texture from the file
13660         #  @param Path a path to the texture file
13661         #  @return unique texture identifier
13662         #  @ingroup l1_geomBuilder_auxiliary
13663         @ManageTransactions("InsertOp")
13664         def LoadTexture(self, Path):
13665             """
13666             Load marker texture from the file
13667
13668             Parameters:
13669                 Path a path to the texture file
13670
13671             Returns:
13672                 unique texture identifier
13673             """
13674             # Example: see GEOM_TestAll.py
13675             ID = self.InsertOp.LoadTexture(Path)
13676             RaiseIfFailed("LoadTexture", self.InsertOp)
13677             return ID
13678
13679         ## Get internal name of the object based on its study entry
13680         #  @note This method does not provide an unique identifier of the geometry object.
13681         #  @note This is internal function of GEOM component, though it can be used outside it for
13682         #  appropriate reason (e.g. for identification of geometry object).
13683         #  @param obj geometry object
13684         #  @return unique object identifier
13685         #  @ingroup l1_geomBuilder_auxiliary
13686         def getObjectID(self, obj):
13687             """
13688             Get internal name of the object based on its study entry.
13689             Note: this method does not provide an unique identifier of the geometry object.
13690             It is an internal function of GEOM component, though it can be used outside GEOM for
13691             appropriate reason (e.g. for identification of geometry object).
13692
13693             Parameters:
13694                 obj geometry object
13695
13696             Returns:
13697                 unique object identifier
13698             """
13699             ID = ""
13700             entry = salome.ObjectToID(obj)
13701             if entry is not None:
13702                 lst = entry.split(":")
13703                 if len(lst) > 0:
13704                     ID = lst[-1] # -1 means last item in the list
13705                     return "GEOM_" + ID
13706             return ID
13707
13708
13709
13710         ## Add marker texture. @a Width and @a Height parameters
13711         #  specify width and height of the texture in pixels.
13712         #  If @a RowData is @c True, @a Texture parameter should represent texture data
13713         #  packed into the byte array. If @a RowData is @c False (default), @a Texture
13714         #  parameter should be unpacked string, in which '1' symbols represent opaque
13715         #  pixels and '0' represent transparent pixels of the texture bitmap.
13716         #
13717         #  @param Width texture width in pixels
13718         #  @param Height texture height in pixels
13719         #  @param Texture texture data
13720         #  @param RowData if @c True, @a Texture data are packed in the byte stream
13721         #  @return unique texture identifier
13722         #  @ingroup l1_geomBuilder_auxiliary
13723         @ManageTransactions("InsertOp")
13724         def AddTexture(self, Width, Height, Texture, RowData=False):
13725             """
13726             Add marker texture. Width and Height parameters
13727             specify width and height of the texture in pixels.
13728             If RowData is True, Texture parameter should represent texture data
13729             packed into the byte array. If RowData is False (default), Texture
13730             parameter should be unpacked string, in which '1' symbols represent opaque
13731             pixels and '0' represent transparent pixels of the texture bitmap.
13732
13733             Parameters:
13734                 Width texture width in pixels
13735                 Height texture height in pixels
13736                 Texture texture data
13737                 RowData if True, Texture data are packed in the byte stream
13738
13739             Returns:
13740                 return unique texture identifier
13741             """
13742             if not RowData: Texture = PackData(Texture)
13743             ID = self.InsertOp.AddTexture(Width, Height, Texture)
13744             RaiseIfFailed("AddTexture", self.InsertOp)
13745             return ID
13746
13747         ## Transfer not topological data from one GEOM object to another.
13748         #
13749         #  @param theObjectFrom the source object of non-topological data
13750         #  @param theObjectTo the destination object of non-topological data
13751         #  @param theFindMethod method to search sub-shapes of theObjectFrom
13752         #         in shape theObjectTo. Possible values are: GEOM.FSM_GetInPlace,
13753         #         GEOM.FSM_GetInPlaceByHistory and GEOM.FSM_GetInPlace_Old.
13754         #         Other values of GEOM.find_shape_method are not supported.
13755         #
13756         #  @return True in case of success; False otherwise.
13757         #
13758         #  @ingroup l1_geomBuilder_auxiliary
13759         #
13760         #  @ref swig_TransferData "Example"
13761         @ManageTransactions("InsertOp")
13762         def TransferData(self, theObjectFrom, theObjectTo,
13763                          theFindMethod=GEOM.FSM_GetInPlace):
13764             """
13765             Transfer not topological data from one GEOM object to another.
13766
13767             Parameters:
13768                 theObjectFrom the source object of non-topological data
13769                 theObjectTo the destination object of non-topological data
13770                 theFindMethod method to search sub-shapes of theObjectFrom
13771                               in shape theObjectTo. Possible values are:
13772                               GEOM.FSM_GetInPlace, GEOM.FSM_GetInPlaceByHistory
13773                               and GEOM.FSM_GetInPlace_Old. Other values of
13774                               GEOM.find_shape_method are not supported.
13775
13776             Returns:
13777                 True in case of success; False otherwise.
13778
13779             # Example: see GEOM_TestOthers.py
13780             """
13781             # Example: see GEOM_TestAll.py
13782             isOk = self.InsertOp.TransferData(theObjectFrom,
13783                                                theObjectTo, theFindMethod)
13784             RaiseIfFailed("TransferData", self.InsertOp)
13785             return isOk
13786
13787         ## Creates a new folder object. It is a container for any GEOM objects.
13788         #  @param Name name of the container
13789         #  @param Father parent object. If None,
13790         #         folder under 'Geometry' root object will be created.
13791         #  @return a new created folder
13792         #  @ingroup l1_publish_data
13793         def NewFolder(self, Name, Father=None):
13794             """
13795             Create a new folder object. It is an auxiliary container for any GEOM objects.
13796
13797             Parameters:
13798                 Name name of the container
13799                 Father parent object. If None,
13800                 folder under 'Geometry' root object will be created.
13801
13802             Returns:
13803                 a new created folder
13804             """
13805             if not Father: Father = self.father
13806             return self.CreateFolder(Name, Father)
13807
13808         ## Move object to the specified folder
13809         #  @param Object object to move
13810         #  @param Folder target folder
13811         #  @ingroup l1_publish_data
13812         def PutToFolder(self, Object, Folder):
13813             """
13814             Move object to the specified folder
13815
13816             Parameters:
13817                 Object object to move
13818                 Folder target folder
13819             """
13820             self.MoveToFolder(Object, Folder)
13821             pass
13822
13823         ## Move list of objects to the specified folder
13824         #  @param ListOfSO list of objects to move
13825         #  @param Folder target folder
13826         #  @ingroup l1_publish_data
13827         def PutListToFolder(self, ListOfSO, Folder):
13828             """
13829             Move list of objects to the specified folder
13830
13831             Parameters:
13832                 ListOfSO list of objects to move
13833                 Folder target folder
13834             """
13835             self.MoveListToFolder(ListOfSO, Folder)
13836             pass
13837
13838         ## @addtogroup l2_field
13839         ## @{
13840
13841         ## Creates a field
13842         #  @param shape the shape the field lies on
13843         #  @param name the field name
13844         #  @param type type of field data: 0 - bool, 1 - int, 2 - double, 3 - string
13845         #  @param dimension dimension of the shape the field lies on
13846         #         0 - VERTEX, 1 - EDGE, 2 - FACE, 3 - SOLID, -1 - whole shape
13847         #  @param componentNames names of components
13848         #  @return a created field
13849         @ManageTransactions("FieldOp")
13850         def CreateField(self, shape, name, type, dimension, componentNames):
13851             """
13852             Creates a field
13853
13854             Parameters:
13855                 shape the shape the field lies on
13856                 name  the field name
13857                 type  type of field data
13858                 dimension dimension of the shape the field lies on
13859                           0 - VERTEX, 1 - EDGE, 2 - FACE, 3 - SOLID, -1 - whole shape
13860                 componentNames names of components
13861
13862             Returns:
13863                 a created field
13864             """
13865             if isinstance( type, int ):
13866                 if type < 0 or type > 3:
13867                     raise RuntimeError("CreateField : Error: data type must be within [0-3] range")
13868                 type = [GEOM.FDT_Bool,GEOM.FDT_Int,GEOM.FDT_Double,GEOM.FDT_String][type]
13869
13870             f = self.FieldOp.CreateField( shape, name, type, dimension, componentNames)
13871             RaiseIfFailed("CreateField", self.FieldOp)
13872             global geom
13873             geom._autoPublish( f, "", name)
13874             return f
13875
13876         ## Removes a field from the GEOM component
13877         #  @param field the field to remove
13878         def RemoveField(self, field):
13879             "Removes a field from the GEOM component"
13880             global geom
13881             if isinstance( field, GEOM._objref_GEOM_Field ):
13882                 geom.RemoveObject( field )
13883             elif isinstance( field, geomField ):
13884                 geom.RemoveObject( field.field )
13885             else:
13886                 raise RuntimeError("RemoveField() : the object is not a field")
13887             return
13888
13889         ## Returns number of fields on a shape
13890         @ManageTransactions("FieldOp")
13891         def CountFields(self, shape):
13892             "Returns number of fields on a shape"
13893             nb = self.FieldOp.CountFields( shape )
13894             RaiseIfFailed("CountFields", self.FieldOp)
13895             return nb
13896
13897         ## Returns all fields on a shape
13898         @ManageTransactions("FieldOp")
13899         def GetFields(self, shape):
13900             "Returns all fields on a shape"
13901             ff = self.FieldOp.GetFields( shape )
13902             RaiseIfFailed("GetFields", self.FieldOp)
13903             return ff
13904
13905         ## Returns a field on a shape by its name
13906         @ManageTransactions("FieldOp")
13907         def GetField(self, shape, name):
13908             "Returns a field on a shape by its name"
13909             f = self.FieldOp.GetField( shape, name )
13910             RaiseIfFailed("GetField", self.FieldOp)
13911             return f
13912
13913         # end of l2_field
13914         ## @}
13915
13916
13917 # Register the new proxy for GEOM_Gen
13918 omniORB.registerObjref(GEOM._objref_GEOM_Gen._NP_RepositoryId, geomBuilder)
13919
13920
13921 ## Field on Geometry
13922 #  @ingroup l2_field
13923 class geomField( GEOM._objref_GEOM_Field ):
13924
13925     def __init__(self, *args):
13926         GEOM._objref_GEOM_Field.__init__(self, *args)
13927         self.field = GEOM._objref_GEOM_Field
13928         return
13929
13930     ## Returns the shape the field lies on
13931     def getShape(self):
13932         "Returns the shape the field lies on"
13933         return self.field.GetShape(self)
13934
13935     ## Returns the field name
13936     def getName(self):
13937         "Returns the field name"
13938         return self.field.GetName(self)
13939
13940     ## Returns type of field data as integer [0-3]
13941     def getType(self):
13942         "Returns type of field data"
13943         return EnumToLong(self.field.GetDataType(self))
13944
13945     ## Returns type of field data:
13946     #  one of GEOM.FDT_Bool, GEOM.FDT_Int, GEOM.FDT_Double, GEOM.FDT_String
13947     def getTypeEnum(self):
13948         "Returns type of field data"
13949         return self.field.GetDataType(self)
13950
13951     ## Returns dimension of the shape the field lies on:
13952     #  0 - VERTEX, 1 - EDGE, 2 - FACE, 3 - SOLID, -1 - whole shape
13953     def getDimension(self):
13954         """Returns dimension of the shape the field lies on:
13955         0 - VERTEX, 1 - EDGE, 2 - FACE, 3 - SOLID, -1 - whole shape"""
13956         return self.field.GetDimension(self)
13957
13958     ## Returns names of components
13959     def getComponents(self):
13960         "Returns names of components"
13961         return self.field.GetComponents(self)
13962
13963     ## Adds a time step to the field
13964     #  @param step the time step number further used as the step identifier
13965     #  @param stamp the time step time
13966     #  @param values the values of the time step
13967     def addStep(self, step, stamp, values):
13968         "Adds a time step to the field"
13969         stp = self.field.AddStep( self, step, stamp )
13970         if not stp:
13971             raise RuntimeError("Field.addStep() : Error: step %s already exists in this field"%step)
13972         global geom
13973         geom._autoPublish( stp, "", "Step %s, %s"%(step,stamp))
13974         self.setValues( step, values )
13975         return stp
13976
13977     ## Remove a time step from the field
13978     def removeStep(self,step):
13979         "Remove a time step from the field"
13980         stepSO = None
13981         try:
13982             stepObj = self.field.GetStep( self, step )
13983             if stepObj:
13984                 stepSO = geom.myStudy.FindObjectID( stepObj.GetStudyEntry() )
13985         except:
13986             #import traceback
13987             #traceback.print_exc()
13988             pass
13989         self.field.RemoveStep( self, step )
13990         if stepSO:
13991             geom.myBuilder.RemoveObjectWithChildren( stepSO )
13992         return
13993
13994     ## Returns number of time steps in the field
13995     def countSteps(self):
13996         "Returns number of time steps in the field"
13997         return self.field.CountSteps(self)
13998
13999     ## Returns a list of time step IDs in the field
14000     def getSteps(self):
14001         "Returns a list of time step IDs in the field"
14002         return self.field.GetSteps(self)
14003
14004     ## Returns a time step by its ID
14005     def getStep(self,step):
14006         "Returns a time step by its ID"
14007         stp = self.field.GetStep(self, step)
14008         if not stp:
14009             raise RuntimeError("Step %s is missing from this field"%step)
14010         return stp
14011
14012     ## Returns the time of the field step
14013     def getStamp(self,step):
14014         "Returns the time of the field step"
14015         return self.getStep(step).GetStamp()
14016
14017     ## Changes the time of the field step
14018     def setStamp(self, step, stamp):
14019         "Changes the time of the field step"
14020         return self.getStep(step).SetStamp(stamp)
14021
14022     ## Returns values of the field step
14023     def getValues(self, step):
14024         "Returns values of the field step"
14025         return self.getStep(step).GetValues()
14026
14027     ## Changes values of the field step
14028     def setValues(self, step, values):
14029         "Changes values of the field step"
14030         stp = self.getStep(step)
14031         errBeg = "Field.setValues(values) : Error: "
14032         try:
14033             ok = stp.SetValues( values )
14034         except Exception as e:
14035             excStr = str(e)
14036             if excStr.find("WrongPythonType") > 0:
14037                 raise RuntimeError(errBeg +\
14038                       "wrong type of values, %s values are expected"%str(self.getTypeEnum())[4:])
14039             raise RuntimeError(errBeg + str(e))
14040         if not ok:
14041             nbOK = self.field.GetArraySize(self)
14042             nbKO = len(values)
14043             if nbOK != nbKO:
14044                 raise RuntimeError(errBeg + "len(values) must be %s but not %s"%(nbOK,nbKO))
14045             else:
14046                 raise RuntimeError(errBeg + "failed")
14047         return
14048
14049     pass # end of class geomField
14050
14051 # Register the new proxy for GEOM_Field
14052 omniORB.registerObjref(GEOM._objref_GEOM_Field._NP_RepositoryId, geomField)
14053
14054
14055 ## Create a new geomBuilder instance.The geomBuilder class provides the Python
14056 #  interface to GEOM operations.
14057 #
14058 #  Typical use is:
14059 #  \code
14060 #    import salome
14061 #    salome.salome_init()
14062 #    from salome.geom import geomBuilder
14063 #    geompy = geomBuilder.New()
14064 #  \endcode
14065 #  @param  instance  CORBA proxy of GEOM Engine. If None, the default Engine is used.
14066 #  @return geomBuilder instance
14067 def New( instance=None):
14068     """
14069     Create a new geomBuilder instance.The geomBuilder class provides the Python
14070     interface to GEOM operations.
14071
14072     Typical use is:
14073         import salome
14074         salome.salome_init()
14075         from salome.geom import geomBuilder
14076         geompy = geomBuilder.New()
14077
14078     Parameters:
14079         instance  CORBA proxy of GEOM Engine. If None, the default Engine is used.
14080     Returns:
14081         geomBuilder instance
14082     """
14083     #print "New geomBuilder ", study, instance
14084     global engine
14085     global geom
14086     global doLcc
14087     if instance and isinstance( instance, SALOMEDS._objref_Study ):
14088         import sys
14089         sys.stderr.write("Warning: 'study' argument is no more needed in geomBuilder.New(). Consider updating your script!!!\n\n")
14090         instance = None
14091     engine = instance
14092     if engine is None:
14093       doLcc = True
14094     geom = geomBuilder()
14095     assert isinstance(geom,geomBuilder), "Geom engine class is %s but should be geomBuilder.geomBuilder. Import geomBuilder before creating the instance."%geom.__class__
14096     geom.init_geom()
14097     return geom
14098
14099
14100 # Register methods from the plug-ins in the geomBuilder class 
14101 plugins_var = os.environ.get( "GEOM_PluginsList" )
14102
14103 plugins = None
14104 if plugins_var is not None:
14105     plugins = plugins_var.split( ":" )
14106     plugins=[x for x in plugins if len(x)>0]
14107 if plugins is not None:
14108     for pluginName in plugins:
14109         pluginBuilderName = pluginName + "Builder"
14110         try:
14111             exec( "from salome.%s.%s import *" % (pluginName, pluginBuilderName))
14112         except Exception as e:
14113             from salome_utils import verbose
14114             print("Exception while loading %s: %s" % ( pluginBuilderName, e ))
14115             continue
14116         exec( "from salome.%s import %s" % (pluginName, pluginBuilderName))
14117         plugin = eval( pluginBuilderName )
14118         
14119         # add methods from plugin module to the geomBuilder class
14120         for k in dir( plugin ):
14121             if k[0] == '_': continue
14122             method = getattr( plugin, k )
14123             if type( method ).__name__ == 'function':
14124                 if not hasattr( geomBuilder, k ):
14125                     setattr( geomBuilder, k, method )
14126                 pass
14127             pass
14128         del pluginName
14129         pass
14130     pass