Salome HOME
49115d58acebcea80805e6999fee71176ef15050
[modules/geom.git] / src / GEOM_SWIG / geomBuilder.py
1 #  -*- coding: iso-8859-1 -*-
2 # Copyright (C) 2007-2022  CEA/DEN, EDF R&D, OPEN CASCADE
3 #
4 # This library is free software; you can redistribute it and/or
5 # modify it under the terms of the GNU Lesser General Public
6 # License as published by the Free Software Foundation; either
7 # version 2.1 of the License, or (at your option) any later version.
8 #
9 # This library is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12 # Lesser General Public License for more details.
13 #
14 # You should have received a copy of the GNU Lesser General Public
15 # License along with this library; if not, write to the Free Software
16 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
17 #
18 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
19 #
20
21 #  GEOM GEOM_SWIG : binding of C++ implementation with Python
22 #  File   : geomBuilder.py
23 #  Author : Paul RASCLE, EDF
24 #  Module : GEOM
25
26 """
27     \namespace geomBuilder
28     \brief Module geomBuilder
29 """
30
31 ##
32 ## @defgroup geomBuilder geomBuilder Python module
33 ## @{
34 ##
35 ## @details
36 ##
37 ## By default, all functions of geomBuilder Python module do not publish
38 ## resulting geometrical objects. This can be done in the Python script
39 ## by means of \ref geomBuilder.geomBuilder.addToStudy() "addToStudy()"
40 ## or \ref geomBuilder.geomBuilder.addToStudyInFather() "addToStudyInFather()"
41 ## functions.
42 ##
43 ## However, it is possible to publish result data in the study
44 ## automatically. For this, almost each function of
45 ## \ref geomBuilder.geomBuilder "geomBuilder" class has
46 ## an additional @a theName parameter (@c None by default).
47 ## As soon as non-empty string value is passed to this parameter,
48 ## the result object is published in the study automatically.
49 ##
50 ## For example, consider the following Python script:
51 ##
52 ## @code
53 ## import salome
54 ## from salome.geom import geomBuilder
55 ## geompy = geomBuilder.New()
56 ## box = geompy.MakeBoxDXDYDZ(100, 100, 100) # box is not published in the study yet
57 ## geompy.addToStudy(box, "box")             # explicit publishing
58 ## @endcode
59 ##
60 ## Last two lines can be replaced by one-line instruction:
61 ##
62 ## @code
63 ## box = geompy.MakeBoxDXDYDZ(100, 100, 100, theName="box") # box is published in the study with "box" name
64 ## @endcode
65 ##
66 ## ... or simply
67 ##
68 ## @code
69 ## box = geompy.MakeBoxDXDYDZ(100, 100, 100, "box") # box is published in the study with "box" name
70 ## @endcode
71 ##
72 ## Note, that some functions produce more than one geometrical objects. For example,
73 ## \ref geomBuilder.geomBuilder.GetNonBlocks() "GetNonBlocks()" function returns two objects:
74 ## group of all non-hexa solids and group of all non-quad faces.
75 ## For such functions it is possible to specify separate names for results.
76 ##
77 ## For example
78 ##
79 ## @code
80 ## # create and publish cylinder
81 ## cyl = geompy.MakeCylinderRH(100, 100, "cylinder")
82 ## # get non blocks from cylinder
83 ## g1, g2 = geompy.GetNonBlocks(cyl, theName="nonblock")
84 ## @endcode
85 ##
86 ## Above example will publish both result compounds (first with non-hexa solids and
87 ## second with non-quad faces) as two items, both named "nonblock".
88 ## However, if second command is invoked as
89 ##
90 ## @code
91 ## g1, g2 = geompy.GetNonBlocks(cyl, theName=("nonhexa", "nonquad"))
92 ## @endcode
93 ##
94 ## ... the first compound will be published with "nonhexa" name, and second will be named "nonquad".
95 ##
96 ## Automatic publication of all results can be also enabled/disabled by means of the function
97 ## \ref geomBuilder.geomBuilder.addToStudyAuto() "addToStudyAuto()". The automatic publishing
98 ## is managed by the numeric parameter passed to this function:
99 ## - if @a maxNbSubShapes = 0, automatic publishing is disabled.
100 ## - if @a maxNbSubShapes = -1 (default), automatic publishing is enabled and
101 ##   maximum number of sub-shapes allowed for publishing is unlimited; any negative
102 ##   value passed as parameter has the same effect.
103 ## - if @a maxNbSubShapes is any positive value, automatic publishing is enabled and
104 ##   maximum number of sub-shapes allowed for publishing is set to specified value.
105 ##
106 ## When automatic publishing is enabled, you even do not need to pass @a theName parameter
107 ## to the functions creating objects, instead default names will be used. However, you
108 ## can always change the behavior, by passing explicit name to the @a theName parameter
109 ## and it will be used instead default one.
110 ## The publishing of the collections of objects will be done according to the above
111 ## mentioned rules (maximum allowed number of sub-shapes).
112 ##
113 ## For example:
114 ##
115 ## @code
116 ## import salome
117 ## from salome.geom import geomBuilder
118 ## geompy = geomBuilder.New()
119 ## geompy.addToStudyAuto() # enable automatic publication
120 ## box = geompy.MakeBoxDXDYDZ(100, 100, 100)
121 ## # the box is created and published in the study with default name
122 ## geompy.addToStudyAuto(5) # set max allowed number of sub-shapes to 5
123 ## vertices = geompy.SubShapeAll(box, geomBuilder.ShapeType['VERTEX'])
124 ## # only 5 first vertices will be published, with default names
125 ## print len(vertices)
126 ## # note, that result value still contains all 8 vertices
127 ## geompy.addToStudyAuto(-1) # disable automatic publication
128 ## @endcode
129 ##
130 ## This feature can be used, for example, for debugging purposes.
131 ##
132 ## @note
133 ## - Use automatic publication feature with caution. When it is enabled, any function of
134 ##   \ref geomBuilder.geomBuilder "geomBuilder" class publishes the results in the study,
135 ##   that can lead to the huge size of the study data tree.
136 ##   For example, repeating call of \ref geomBuilder.geomBuilder.SubShapeAll() "SubShapeAll()"
137 ##   command on the same main shape each time will publish all child objects, that will lead
138 ##   to a lot of duplicated items in the study.
139 ## - Sub-shapes are automatically published as child items of the parent main shape in the study if main
140 ##   shape was also published before. Otherwise, sub-shapes are published as top-level objects.
141 ## - Some functions of \ref geomBuilder.geomBuilder "geomBuilder" class do not have
142 ##   \a theName parameter (and, thus, do not support automatic publication).
143 ##   For example, some transformation operations like
144 ##   \ref geomBuilder.geomBuilder.TranslateDXDYDZ() "TranslateDXDYDZ()".
145 ##   Refer to the documentation to check if some function has such possibility.
146 ##
147 ## It is possible to customize the representation of the geometrical
148 ## data in the data tree; this can be done by using folders. A folder can
149 ## be created in the study tree using function
150 ## \ref geomBuilder.geomBuilder.NewFolder() "NewFolder()"
151 ## (by default it is created under the "Geometry" root object).
152 ## As soon as folder is created, any published geometry object
153 ## can be moved into it.
154 ##
155 ## For example:
156 ##
157 ## @code
158 ## import salome
159 ## from salome.geom import geomBuilder
160 ## geompy = geomBuilder.New()
161 ## box = geompy.MakeBoxDXDYDZ(100, 100, 100, "Box")
162 ## # the box was created and published in the study
163 ## folder = geompy.NewFolder("Primitives")
164 ## # an empty "Primitives" folder was created under default "Geometry" root object
165 ## geompy.PutToFolder(box, folder)
166 ## # the box was moved into "Primitives" folder
167 ## @endcode
168 ##
169 ## Subfolders are also can be created by specifying another folder as a parent:
170 ##
171 ## @code
172 ## subfolder = geompy.NewFolder("3D", folder)
173 ## # "3D" folder was created under "Primitives" folder
174 ## @endcode
175 ##
176 ## @note
177 ## - Folder container is just a representation layer object that
178 ## deals with already published objects only. So, any geometry object
179 ## should be published in the study (for example, with
180 ## \ref geomBuilder.geomBuilder.PutToFolder() "addToStudy()" function)
181 ## BEFORE moving it into any existing folder.
182 ## - \ref geomBuilder.geomBuilder.PutToFolder() "PutToFolder()" function
183 ## does not change physical position of geometry object in the study tree,
184 ## it only affects on the representation of the data tree.
185 ## - It is impossible to publish geometry object using any folder as father.
186 ##
187 ##  \defgroup l1_publish_data
188 ##  \defgroup l1_geomBuilder_auxiliary
189 ##  \defgroup l1_geomBuilder_purpose
190 ## @}
191
192 ## @defgroup l1_publish_data Publishing results in SALOME study
193
194 ## @defgroup l1_geomBuilder_auxiliary Auxiliary data structures and methods
195
196 ## @defgroup l1_geomBuilder_purpose   All package methods, grouped by their purpose
197 ## @{
198 ##   @defgroup l2_import_export Importing/exporting geometrical objects
199 ##   @defgroup l2_creating      Creating geometrical objects
200 ##   @{
201 ##     @defgroup l3_basic_go      Creating Basic Geometric Objects
202 ##     @{
203 ##       @defgroup l4_curves        Creating Curves
204
205 ##     @}
206 ##     @defgroup l3_3d_primitives Creating 3D Primitives
207 ##     @defgroup l3_complex       Creating Complex Objects
208 ##     @defgroup l3_groups        Working with groups
209 ##     @defgroup l3_blocks        Building by blocks
210 ##     @{
211 ##       @defgroup l4_blocks_measure Check and Improve
212
213 ##     @}
214 ##     @defgroup l3_sketcher      Sketcher
215 ##     @defgroup l3_advanced      Creating Advanced Geometrical Objects
216 ##     @{
217 ##       @defgroup l4_decompose     Decompose objects
218 ##       @defgroup l4_decompose_d   Decompose objects deprecated methods
219 ##       @defgroup l4_access        Access to sub-shapes by their unique IDs inside the main shape
220 ##       @defgroup l4_obtain        Access to sub-shapes by a criteria
221 ##       @defgroup l4_advanced      Advanced objects creation functions
222
223 ##     @}
224
225 ##   @}
226 ##   @defgroup l2_transforming  Transforming geometrical objects
227 ##   @{
228 ##     @defgroup l3_basic_op      Basic Operations
229 ##     @defgroup l3_boolean       Boolean Operations
230 ##     @defgroup l3_transform     Transformation Operations
231 ##     @defgroup l3_transform_d   Transformation Operations deprecated methods
232 ##     @defgroup l3_local         Local Operations (Fillet, Chamfer and other Features)
233 ##     @defgroup l3_blocks_op     Blocks Operations
234 ##     @defgroup l3_healing       Repairing Operations
235 ##     @defgroup l3_restore_ss    Restore presentation parameters and a tree of sub-shapes
236
237 ##   @}
238 ##   @defgroup l2_measure       Using measurement tools
239 ##   @defgroup l2_field         Field on Geometry
240 ##   @defgroup l2_testing       Testing
241
242 ## @}
243
244 import omniORB
245
246 # initialize SALOME session in try/except block
247 # to avoid problems in some cases, e.g. when generating documentation
248 try:
249     import salome
250     salome.salome_init()
251     from salome import *
252 except:
253     pass
254
255 from salome_notebook import *
256
257 import GEOM
258 import math
259 import os
260 import functools
261
262 from salome.geom.gsketcher import Sketcher3D, Sketcher2D, Polyline2D
263 from salome.geom.canonicalrecognition import CanonicalRecognition
264
265 # In case the omniORBpy EnumItem class does not fully support Python 3
266 # (for instance in version 4.2.1-2), the comparison ordering methods must be
267 # defined
268 #
269 try:
270     GEOM.COMPOUND < GEOM.SOLID
271 except TypeError:
272     def enumitem_eq(self, other):
273         try:
274             if isinstance(other, omniORB.EnumItem):
275                 if other._parent_id == self._parent_id:
276                     return self._v == other._v
277                 else:
278                     return self._parent_id == other._parent_id
279             else:
280                 return id(self) == id(other)
281         except:
282             return id(self) == id(other)
283
284     def enumitem_lt(self, other):
285         try:
286             if isinstance(other, omniORB.EnumItem):
287                 if other._parent_id == self._parent_id:
288                     return self._v < other._v
289                 else:
290                     return self._parent_id < other._parent_id
291             else:
292                 return id(self) < id(other)
293         except:
294             return id(self) < id(other)
295
296     def enumitem_le(self, other):
297         try:
298             if isinstance(other, omniORB.EnumItem):
299                 if other._parent_id == self._parent_id:
300                     return self._v <= other._v
301                 else:
302                     return self._parent_id <= other._parent_id
303             else:
304                 return id(self) <= id(other)
305         except:
306             return id(self) <= id(other)
307
308     def enumitem_gt(self, other):
309         try:
310             if isinstance(other, omniORB.EnumItem):
311                 if other._parent_id == self._parent_id:
312                     return self._v > other._v
313                 else:
314                     return self._parent_id > other._parent_id
315             else:
316                 return id(self) > id(other)
317         except:
318             return id(self) > id(other)
319
320     def enumitem_ge(self, other):
321         try:
322             if isinstance(other, omniORB.EnumItem):
323                 if other._parent_id == self._parent_id:
324                     return self._v >= other._v
325                 else:
326                     return self._parent_id >= other._parent_id
327             else:
328                 return id(self) >= id(other)
329         except:
330             return id(self) >= id(other)
331
332     GEOM.omniORB.EnumItem.__eq__ = enumitem_eq
333     GEOM.omniORB.EnumItem.__lt__ = enumitem_lt
334     GEOM.omniORB.EnumItem.__le__ = enumitem_le
335     GEOM.omniORB.EnumItem.__gt__ = enumitem_gt
336     GEOM.omniORB.EnumItem.__ge__ = enumitem_ge
337     omniORB.EnumItem.__eq__ = enumitem_eq
338     omniORB.EnumItem.__lt__ = enumitem_lt
339     omniORB.EnumItem.__le__ = enumitem_le
340     omniORB.EnumItem.__gt__ = enumitem_gt
341     omniORB.EnumItem.__ge__ = enumitem_ge
342
343 # service function
344 def _toListOfNames(_names, _size=-1):
345     l = []
346     import types
347     if type(_names) in [list, tuple]:
348         for i in _names: l.append(i)
349     elif _names:
350         l.append(_names)
351     if l and len(l) < _size:
352         for i in range(len(l), _size): l.append("%s_%d"%(l[0],i))
353     return l
354
355 # Decorator function to manage transactions for all geometric operations.
356 def ManageTransactions(theOpeName):
357     def MTDecorator(theFunction):
358         # To keep the original function name an documentation.
359         @functools.wraps(theFunction)
360         def OpenCallClose(self, *args, **kwargs):
361             # Open transaction
362             anOperation = getattr(self, theOpeName)
363             anOperation.StartOperation()
364             try:
365                 # Call the function
366                 res = theFunction(self, *args, **kwargs)
367                 # Commit transaction
368                 anOperation.FinishOperation()
369                 return res
370             except:
371                 # Abort transaction
372                 anOperation.AbortOperation()
373                 raise
374         return OpenCallClose
375     return MTDecorator
376
377 ## Raise an Error, containing the Method_name, if Operation is Failed
378 ## @ingroup l1_geomBuilder_auxiliary
379 def RaiseIfFailed (Method_name, Operation):
380     if not Operation.IsDone() and Operation.GetErrorCode() != "NOT_FOUND_ANY":
381         raise RuntimeError(Method_name + " : " + Operation.GetErrorCode())
382
383 def PrintOrRaise(message, raiseException=False):
384     if raiseException:
385         raise RuntimeError(message)
386     else:
387         print(message)
388
389 ## Return list of variables value from salome notebook
390 ## @ingroup l1_geomBuilder_auxiliary
391 def ParseParameters(*parameters):
392     Result = []
393     StringResult = []
394     for parameter in parameters:
395         if isinstance(parameter, list):
396             lResults = ParseParameters(*parameter)
397             if len(lResults) > 0:
398                 Result.append(lResults[:-1])
399                 StringResult += lResults[-1].split(":")
400                 pass
401             pass
402         else:
403             if isinstance(parameter,str):
404                 if notebook.isVariable(parameter):
405                     Result.append(notebook.get(parameter))
406                 else:
407                     raise RuntimeError("Variable with name '" + parameter + "' doesn't exist!!!")
408                 pass
409             else:
410                 Result.append(parameter)
411                 pass
412             StringResult.append(str(parameter))
413             pass
414         pass
415     if Result:
416         Result.append(":".join(StringResult))
417     else:
418         Result = ":".join(StringResult)
419     return Result
420
421 ## Return list of variables value from salome notebook
422 ## @ingroup l1_geomBuilder_auxiliary
423 def ParseList(list):
424     Result = []
425     StringResult = ""
426     for parameter in list:
427         if isinstance(parameter,str) and notebook.isVariable(parameter):
428             Result.append(str(notebook.get(parameter)))
429             pass
430         else:
431             Result.append(str(parameter))
432             pass
433
434         StringResult = StringResult + str(parameter)
435         StringResult = StringResult + ":"
436         pass
437     StringResult = StringResult[:len(StringResult)-1]
438     return Result, StringResult
439
440 ## Return list of variables value from salome notebook
441 ## @ingroup l1_geomBuilder_auxiliary
442 def ParseSketcherCommand(command):
443     Result = ""
444     StringResult = ""
445     sections = command.split(":")
446     for section in sections:
447         parameters = section.split(" ")
448         paramIndex = 1
449         for parameter in parameters:
450             if paramIndex > 1 and parameter.find("'") != -1:
451                 parameter = parameter.replace("'","")
452                 if notebook.isVariable(parameter):
453                     Result = Result + str(notebook.get(parameter)) + " "
454                     pass
455                 else:
456                     raise RuntimeError("Variable with name '" + parameter + "' doesn't exist!!!")
457                     pass
458                 pass
459             else:
460                 Result = Result + str(parameter) + " "
461                 pass
462             if paramIndex > 1:
463                 StringResult = StringResult + parameter
464                 StringResult = StringResult + ":"
465                 pass
466             paramIndex = paramIndex + 1
467             pass
468         Result = Result[:len(Result)-1] + ":"
469         pass
470     Result = Result[:len(Result)-1]
471     return Result, StringResult
472
473 ## Helper function which can be used to pack the passed string to the byte data.
474 ## Only '1' an '0' symbols are valid for the string. The missing bits are replaced by zeroes.
475 ## If the string contains invalid symbol (neither '1' nor '0'), the function raises an exception.
476 ## For example,
477 ## \code
478 ## val = PackData("10001110") # val = 0xAE
479 ## val = PackData("1")        # val = 0x80
480 ## \endcode
481 ## @param data unpacked data - a string containing '1' and '0' symbols
482 ## @return data packed to the byte stream
483 ## @ingroup l1_geomBuilder_auxiliary
484 def PackData(data):
485     """
486     Helper function which can be used to pack the passed string to the byte data.
487     Only '1' an '0' symbols are valid for the string. The missing bits are replaced by zeroes.
488     If the string contains invalid symbol (neither '1' nor '0'), the function raises an exception.
489
490     Parameters:
491         data unpacked data - a string containing '1' and '0' symbols
492
493     Returns:
494         data packed to the byte stream
495
496     Example of usage:
497         val = PackData("10001110") # val = 0xAE
498         val = PackData("1")        # val = 0x80
499     """
500     bytes = len(data)/8
501     if len(data)%8: bytes += 1
502     res = ""
503     for b in range(bytes):
504         d = data[b*8:(b+1)*8]
505         val = 0
506         for i in range(8):
507             val *= 2
508             if i < len(d):
509                 if d[i] == "1": val += 1
510                 elif d[i] != "0":
511                     raise "Invalid symbol %s" % d[i]
512                 pass
513             pass
514         res += chr(val)
515         pass
516     return res
517
518 ## Read bitmap texture from the text file.
519 ## In that file, any non-zero symbol represents '1' opaque pixel of the bitmap.
520 ## A zero symbol ('0') represents transparent pixel of the texture bitmap.
521 ## The function returns width and height of the pixmap in pixels and byte stream representing
522 ## texture bitmap itself.
523 ##
524 ## This function can be used to read the texture to the byte stream in order to pass it to
525 ## the AddTexture() function of geomBuilder class.
526 ## For example,
527 ## \code
528 ## from salome.geom import geomBuilder
529 ## geompy = geomBuilder.New()
530 ## texture = geompy.readtexture('mytexture.dat')
531 ## texture = geompy.AddTexture(*texture)
532 ## obj.SetMarkerTexture(texture)
533 ## \endcode
534 ## @param fname texture file name
535 ## @return sequence of tree values: texture's width, height in pixels and its byte stream
536 ## @ingroup l1_geomBuilder_auxiliary
537 def ReadTexture(fname):
538     """
539     Read bitmap texture from the text file.
540     In that file, any non-zero symbol represents '1' opaque pixel of the bitmap.
541     A zero symbol ('0') represents transparent pixel of the texture bitmap.
542     The function returns width and height of the pixmap in pixels and byte stream representing
543     texture bitmap itself.
544     This function can be used to read the texture to the byte stream in order to pass it to
545     the AddTexture() function of geomBuilder class.
546
547     Parameters:
548         fname texture file name
549
550     Returns:
551         sequence of tree values: texture's width, height in pixels and its byte stream
552
553     Example of usage:
554         from salome.geom import geomBuilder
555         geompy = geomBuilder.New()
556         texture = geompy.readtexture('mytexture.dat')
557         texture = geompy.AddTexture(*texture)
558         obj.SetMarkerTexture(texture)
559     """
560     try:
561         f = open(fname)
562         lines = [ l.strip() for l in f.readlines()]
563         f.close()
564         maxlen = 0
565         if lines: maxlen = max([len(x) for x in lines])
566         lenbytes = maxlen/8
567         if maxlen%8: lenbytes += 1
568         bytedata=""
569         for line in lines:
570             if len(line)%8:
571                 lenline = (len(line)/8+1)*8
572                 pass
573             else:
574                 lenline = (len(line)/8)*8
575                 pass
576             for i in range(lenline/8):
577                 byte=""
578                 for j in range(8):
579                     if i*8+j < len(line) and line[i*8+j] != "0": byte += "1"
580                     else: byte += "0"
581                     pass
582                 bytedata += PackData(byte)
583                 pass
584             for i in range(lenline/8, lenbytes):
585                 bytedata += PackData("0")
586             pass
587         return lenbytes*8, len(lines), bytedata
588     except:
589         pass
590     return 0, 0, ""
591
592 ## Returns a long value from enumeration type
593 #  Can be used for CORBA enumerator types like GEOM.shape_type
594 #  @param theItem enumeration type
595 #  @ingroup l1_geomBuilder_auxiliary
596 def EnumToLong(theItem):
597     """
598     Returns a long value from enumeration type
599     Can be used for CORBA enumerator types like geomBuilder.ShapeType
600
601     Parameters:
602         theItem enumeration type
603     """
604     ret = theItem
605     if hasattr(theItem, "_v"): ret = theItem._v
606     return ret
607
608 ## Pack an argument into a list
609 def ToList( arg ):
610     if isinstance( arg, list ):
611         return arg
612     if hasattr( arg, "__getitem__" ):
613         return list( arg )
614     return [ arg ]
615
616 ## Information about closed/unclosed state of shell or wire
617 #  @ingroup l1_geomBuilder_auxiliary
618 class info:
619     """
620     Information about closed/unclosed state of shell or wire
621     """
622     UNKNOWN  = 0
623     CLOSED   = 1
624     UNCLOSED = 2
625
626 ## Private class used to bind calls of plugin operations to geomBuilder
627 class PluginOperation:
628   def __init__(self, operation, function):
629     self.operation = operation
630     self.function = function
631     pass
632
633   @ManageTransactions("operation")
634   def __call__(self, *args):
635     res = self.function(self.operation, *args)
636     RaiseIfFailed(self.function.__name__, self.operation)
637     return res
638
639 # Warning: geom is a singleton
640 geom = None
641 engine = None
642 doLcc = False
643 created = False
644
645 class geomBuilder(GEOM._objref_GEOM_Gen):
646
647         ## Enumeration ShapeType as a dictionary. \n
648         ## Topological types of shapes (like Open Cascade types). See GEOM::shape_type for details.
649         #  @ingroup l1_geomBuilder_auxiliary
650         ShapeType = {"AUTO":-1, "COMPOUND":0, "COMPSOLID":1, "SOLID":2, "SHELL":3, "FACE":4, "WIRE":5, "EDGE":6, "VERTEX":7, "SHAPE":8, "FLAT":9}
651
652         ## Kinds of shape in terms of <VAR>GEOM.GEOM_IKindOfShape.shape_kind</VAR> enumeration
653         #  and a list of parameters, describing the shape.
654         #  List of parameters, describing the shape:
655         #  - COMPOUND:            [nb_solids  nb_faces  nb_edges  nb_vertices]
656         #  - COMPSOLID:           [nb_solids  nb_faces  nb_edges  nb_vertices]
657         #
658         #  - SHELL:       [info.CLOSED / info.UNCLOSED  nb_faces  nb_edges  nb_vertices]
659         #
660         #  - WIRE:        [info.CLOSED / info.UNCLOSED nb_edges  nb_vertices]
661         #
662         #  - SPHERE:       [xc yc zc            R]
663         #  - CYLINDER:     [xb yb zb  dx dy dz  R         H]
664         #  - BOX:          [xc yc zc                      ax ay az]
665         #  - ROTATED_BOX:  [xc yc zc  zx zy zz  xx xy xz  ax ay az]
666         #  - TORUS:        [xc yc zc  dx dy dz  R_1  R_2]
667         #  - CONE:         [xb yb zb  dx dy dz  R_1  R_2  H]
668         #  - POLYHEDRON:                       [nb_faces  nb_edges  nb_vertices]
669         #  - SOLID:                            [nb_faces  nb_edges  nb_vertices]
670         #
671         #  - SPHERE2D:     [xc yc zc            R]
672         #  - CYLINDER2D:   [xb yb zb  dx dy dz  R         H]
673         #  - TORUS2D:      [xc yc zc  dx dy dz  R_1  R_2]
674         #  - CONE2D:       [xc yc zc  dx dy dz  R_1  R_2  H]
675         #  - DISK_CIRCLE:  [xc yc zc  dx dy dz  R]
676         #  - DISK_ELLIPSE: [xc yc zc  dx dy dz  R_1  R_2]
677         #  - POLYGON:      [xo yo zo  dx dy dz            nb_edges  nb_vertices]
678         #  - PLANE:        [xo yo zo  dx dy dz]
679         #  - PLANAR:       [xo yo zo  dx dy dz            nb_edges  nb_vertices]
680         #  - FACE:                                       [nb_edges  nb_vertices]
681         #
682         #  - CIRCLE:       [xc yc zc  dx dy dz  R]
683         #  - ARC_CIRCLE:   [xc yc zc  dx dy dz  R         x1 y1 z1  x2 y2 z2]
684         #  - ELLIPSE:      [xc yc zc  dx dy dz  R_1  R_2]
685         #  - ARC_ELLIPSE:  [xc yc zc  dx dy dz  R_1  R_2  x1 y1 z1  x2 y2 z2]
686         #  - LINE:         [xo yo zo  dx dy dz]
687         #  - SEGMENT:      [x1 y1 z1  x2 y2 z2]
688         #  - EDGE:                                                 [nb_vertices]
689         #
690         #  - VERTEX:       [x  y  z]
691         #
692         #  - LCS:          [x y z  xx xy xz  yx yy yz  zx zy zz]
693         #  @ingroup l1_geomBuilder_auxiliary
694         kind = GEOM.GEOM_IKindOfShape
695
696         def __new__(cls, *args):
697             global engine
698             global geom
699             global doLcc
700             global created
701             #print "==== __new__ ", engine, geom, doLcc, created
702             if geom is None:
703                 # geom engine is either retrieved from engine, or created
704                 geom = engine
705                 # Following test avoids a recursive loop
706                 if doLcc:
707                     if geom is not None:
708                         # geom engine not created: existing engine found
709                         doLcc = False
710                     if doLcc and not created:
711                         doLcc = False
712                         # FindOrLoadComponent called:
713                         # 1. CORBA resolution of server
714                         # 2. the __new__ method is called again
715                         #print "==== FindOrLoadComponent ", engine, geom, doLcc, created
716                         geom = lcc.FindOrLoadComponent( "FactoryServer", "GEOM" )
717                         #print "====1 ",geom
718                 else:
719                     # FindOrLoadComponent not called
720                     if geom is None:
721                         # geomBuilder instance is created from lcc.FindOrLoadComponent
722                         #print "==== super ", engine, geom, doLcc, created
723                         geom = super(geomBuilder,cls).__new__(cls)
724                         #print "====2 ",geom
725                     else:
726                         # geom engine not created: existing engine found
727                         #print "==== existing ", engine, geom, doLcc, created
728                         pass
729                 #print "return geom 1 ", geom
730                 return geom
731
732             #print "return geom 2 ", geom
733             return geom
734
735         def __init__(self, *args):
736             global created
737             #print "-------- geomBuilder __init__ --- ", created, self
738             if not created:
739               created = True
740               GEOM._objref_GEOM_Gen.__init__(self, *args)
741               self.myMaxNbSubShapesAllowed = 0 # auto-publishing is disabled by default
742               self.myBuilder = None
743               self.BasicOp  = None
744               self.CurvesOp = None
745               self.PrimOp   = None
746               self.ShapesOp = None
747               self.HealOp   = None
748               self.InsertOp = None
749               self.BoolOp   = None
750               self.TrsfOp   = None
751               self.LocalOp  = None
752               self.MeasuOp  = None
753               self.BlocksOp = None
754               self.GroupOp  = None
755               self.FieldOp  = None
756               self.TestOp   = None
757             pass
758
759         ## Process object publication in the study, as follows:
760         #  - if @a theName is specified (not None), the object is published in the study
761         #    with this name, not taking into account "auto-publishing" option;
762         #  - if @a theName is NOT specified, the object is published in the study
763         #    (using default name, which can be customized using @a theDefaultName parameter)
764         #    only if auto-publishing is switched on.
765         #
766         #  @param theObj  object, a subject for publishing
767         #  @param theName object name for study
768         #  @param theDefaultName default name for the auto-publishing
769         #
770         #  @sa addToStudyAuto()
771         def _autoPublish(self, theObj, theName, theDefaultName="noname"):
772             # ---
773             def _item_name(_names, _defname, _idx=-1):
774                 if not _names: _names = _defname
775                 if type(_names) in [list, tuple]:
776                     if _idx >= 0:
777                         if _idx >= len(_names) or not _names[_idx]:
778                             if type(_defname) not in [list, tuple]:
779                                 _name = "%s_%d"%(_defname, _idx+1)
780                             elif len(_defname) > 0 and _idx >= 0 and _idx < len(_defname):
781                                 _name = _defname[_idx]
782                             else:
783                                 _name = "%noname_%d"%(dn, _idx+1)
784                             pass
785                         else:
786                             _name = _names[_idx]
787                         pass
788                     else:
789                         # must be wrong  usage
790                         _name = _names[0]
791                     pass
792                 else:
793                     if _idx >= 0:
794                         _name = "%s_%d"%(_names, _idx+1)
795                     else:
796                         _name = _names
797                     pass
798                 return _name
799             # ---
800             def _publish( _name, _obj ):
801                 fatherObj = None
802                 if isinstance( _obj, GEOM._objref_GEOM_Field ):
803                     fatherObj = _obj.GetShape()
804                 elif isinstance( _obj, GEOM._objref_GEOM_FieldStep ):
805                     fatherObj = _obj.GetField()
806                 elif not _obj.IsMainShape():
807                     fatherObj = _obj.GetMainShape()
808                     pass
809                 if fatherObj and fatherObj.GetStudyEntry():
810                     self.addToStudyInFather(fatherObj, _obj, _name)
811                 else:
812                     self.addToStudy(_obj, _name)
813                     pass
814                 return
815             # ---
816             if not theObj:
817                 return # null object
818             if not theName and not self.myMaxNbSubShapesAllowed:
819                 return # nothing to do: auto-publishing is disabled
820             if not theName and not theDefaultName:
821                 return # neither theName nor theDefaultName is given
822             import types
823             if type(theObj) in [list, tuple]:
824                 # list of objects is being published
825                 idx = 0
826                 for obj in theObj:
827                     if not obj: continue # bad object
828                     name = _item_name(theName, theDefaultName, idx)
829                     _publish( name, obj )
830                     idx = idx+1
831                     if not theName and idx == self.myMaxNbSubShapesAllowed: break
832                     pass
833                 pass
834             else:
835                 # single object is published
836                 name = _item_name(theName, theDefaultName)
837                 _publish( name, theObj )
838             pass
839
840         ## @addtogroup l1_geomBuilder_auxiliary
841         ## @{
842         def init_geom(self):
843             self.myStudy = salome.myStudy
844             self.myBuilder = self.myStudy.NewBuilder()
845
846             # load data from the study file, if necessary
847             component = self.myStudy.FindComponent("GEOM")
848             if component:
849                 self.myBuilder.LoadWith(component, self)
850
851             self.BasicOp  = self.GetIBasicOperations    ()
852             self.CurvesOp = self.GetICurvesOperations   ()
853             self.PrimOp   = self.GetI3DPrimOperations   ()
854             self.ShapesOp = self.GetIShapesOperations   ()
855             self.HealOp   = self.GetIHealingOperations  ()
856             self.InsertOp = self.GetIInsertOperations   ()
857             self.BoolOp   = self.GetIBooleanOperations  ()
858             self.TrsfOp   = self.GetITransformOperations()
859             self.LocalOp  = self.GetILocalOperations    ()
860             self.MeasuOp  = self.GetIMeasureOperations  ()
861             self.BlocksOp = self.GetIBlocksOperations   ()
862             self.GroupOp  = self.GetIGroupOperations    ()
863             self.FieldOp  = self.GetIFieldOperations    ()
864             self.TestOp   = self.GetITestOperations     ()
865
866             notebook.myStudy = self.myStudy
867             pass
868
869         def GetPluginOperations(self, libraryName):
870             op = GEOM._objref_GEOM_Gen.GetPluginOperations(self, libraryName)
871             return op
872
873         ## Enable / disable results auto-publishing
874         #
875         #  The automatic publishing is managed in the following way:
876         #  - if @a maxNbSubShapes = 0, automatic publishing is disabled.
877         #  - if @a maxNbSubShapes = -1 (default), automatic publishing is enabled and
878         #  maximum number of sub-shapes allowed for publishing is unlimited; any negative
879         #  value passed as parameter has the same effect.
880         #  - if @a maxNbSubShapes is any positive value, automatic publishing is enabled and
881         #  maximum number of sub-shapes allowed for publishing is set to specified value.
882         #
883         #  @param maxNbSubShapes maximum number of sub-shapes allowed for publishing.
884         #  @ingroup l1_publish_data
885         def addToStudyAuto(self, maxNbSubShapes=-1):
886             """
887             Enable / disable results auto-publishing
888
889             The automatic publishing is managed in the following way:
890             - if @a maxNbSubShapes = 0, automatic publishing is disabled;
891             - if @a maxNbSubShapes = -1 (default), automatic publishing is enabled and
892             maximum number of sub-shapes allowed for publishing is unlimited; any negative
893             value passed as parameter has the same effect.
894             - if @a maxNbSubShapes is any positive value, automatic publishing is enabled and
895             maximum number of sub-shapes allowed for publishing is set to this value.
896
897             Parameters:
898                 maxNbSubShapes maximum number of sub-shapes allowed for publishing.
899
900             Example of usage:
901                 geompy.addToStudyAuto()   # enable auto-publishing
902                 geompy.MakeBoxDXDYDZ(100) # box is created and published with default name
903                 geompy.addToStudyAuto(0)  # disable auto-publishing
904             """
905             self.myMaxNbSubShapesAllowed = max(-1, maxNbSubShapes)
906             pass
907
908         ## Dump component to the Python script
909         #  This method overrides IDL function to allow default values for the parameters.
910         def DumpPython(self, theIsPublished=True, theIsMultiFile=True):
911             """
912             Dump component to the Python script
913             This method overrides IDL function to allow default values for the parameters.
914             """
915             return GEOM._objref_GEOM_Gen.DumpPython(self, theIsPublished, theIsMultiFile)
916
917         ## Get name for sub-shape aSubObj of shape aMainObj
918         #
919         # @ref swig_SubShapeName "Example"
920         @ManageTransactions("ShapesOp")
921         def SubShapeName(self,aSubObj, aMainObj):
922             """
923             Get name for sub-shape aSubObj of shape aMainObj
924             """
925             # Example: see GEOM_TestAll.py
926
927             #aSubId  = orb.object_to_string(aSubObj)
928             #aMainId = orb.object_to_string(aMainObj)
929             #index = gg.getIndexTopology(aSubId, aMainId)
930             #name = gg.getShapeTypeString(aSubId) + "_%d"%(index)
931             index = self.ShapesOp.GetTopologyIndex(aMainObj, aSubObj)
932             name = self.ShapesOp.GetShapeTypeString(aSubObj) + "_%d"%(index)
933             return name
934
935         ## Publish in study aShape with name aName
936         #
937         #  \param aShape the shape to be published
938         #  \param aName  the name for the shape
939         #  \param doRestoreSubShapes if True, finds and publishes also
940         #         sub-shapes of <VAR>aShape</VAR>, corresponding to its arguments
941         #         and published sub-shapes of arguments
942         #  \param theArgs,theFindMethod,theInheritFirstArg see RestoreSubShapes() for
943         #                                                  these arguments description
944         #  \return study entry of the published shape in form of string
945         #
946         #  @ingroup l1_publish_data
947         #  @ref swig_all_addtostudy "Example"
948         def addToStudy(self, aShape, aName, doRestoreSubShapes=False,
949                        theArgs=[], theFindMethod=GEOM.FSM_GetInPlace, theInheritFirstArg=False):
950             """
951             Publish in study aShape with name aName
952
953             Parameters:
954                 aShape the shape to be published
955                 aName  the name for the shape
956                 doRestoreSubShapes if True, finds and publishes also
957                                    sub-shapes of aShape, corresponding to its arguments
958                                    and published sub-shapes of arguments
959                 theArgs,theFindMethod,theInheritFirstArg see geompy.RestoreSubShapes() for
960                                                          these arguments description
961
962             Returns:
963                 study entry of the published shape in form of string
964
965             Example of usage:
966                 id_block1 = geompy.addToStudy(Block1, "Block 1")
967             """
968             # Example: see GEOM_TestAll.py
969             try:
970                 aSObject = self.AddInStudy(aShape, aName, None)
971                 if aSObject and aName: aSObject.SetAttrString("AttributeName", aName)
972                 if doRestoreSubShapes:
973                     self.RestoreSubShapesSO(aSObject, theArgs,
974                                             theFindMethod, theInheritFirstArg, True )
975             except:
976                 print("addToStudy() failed")
977                 return ""
978             return aShape.GetStudyEntry()
979
980         ## Publish in study aShape with name aName as sub-object of previously published aFather
981         #  \param aFather previously published object
982         #  \param aShape the shape to be published as sub-object of <VAR>aFather</VAR>
983         #  \param aName  the name for the shape
984         #
985         #  \return study entry of the published shape in form of string
986         #
987         #  @ingroup l1_publish_data
988         #  @ref swig_all_addtostudyInFather "Example"
989         def addToStudyInFather(self, aFather, aShape, aName):
990             """
991             Publish in study aShape with name aName as sub-object of previously published aFather
992
993             Parameters:
994                 aFather previously published object
995                 aShape the shape to be published as sub-object of aFather
996                 aName  the name for the shape
997
998             Returns:
999                 study entry of the published shape in form of string
1000             """
1001             # Example: see GEOM_TestAll.py
1002             try:
1003                 aSObject = self.AddInStudy(aShape, aName, aFather)
1004                 if aSObject and aName: aSObject.SetAttrString("AttributeName", aName)
1005             except:
1006                 print("addToStudyInFather() failed")
1007                 return ""
1008             return aShape.GetStudyEntry()
1009
1010         ## Unpublish object in study
1011         #
1012         #  \param obj the object to be unpublished
1013         def hideInStudy(self, obj):
1014             """
1015             Unpublish object in study
1016
1017             Parameters:
1018                 obj the object to be unpublished
1019             """
1020             ior = salome.orb.object_to_string(obj)
1021             aSObject = self.myStudy.FindObjectIOR(ior)
1022             if aSObject is not None:
1023                 genericAttribute = self.myBuilder.FindOrCreateAttribute(aSObject, "AttributeDrawable")
1024                 drwAttribute = genericAttribute._narrow(SALOMEDS.AttributeDrawable)
1025                 drwAttribute.SetDrawable(False)
1026                 # hide references if any
1027                 vso = self.myStudy.FindDependances(aSObject);
1028                 for refObj in vso :
1029                     genericAttribute = self.myBuilder.FindOrCreateAttribute(refObj, "AttributeDrawable")
1030                     drwAttribute = genericAttribute._narrow(SALOMEDS.AttributeDrawable)
1031                     drwAttribute.SetDrawable(False)
1032                     pass
1033                 pass
1034
1035         # end of l1_geomBuilder_auxiliary
1036         ## @}
1037
1038         ## @addtogroup l3_restore_ss
1039         ## @{
1040
1041         ## Publish sub-shapes, standing for arguments and sub-shapes of arguments
1042         #  To be used from python scripts out of addToStudy() (non-default usage)
1043         #  \param theObject published GEOM.GEOM_Object, arguments of which will be published
1044         #  \param theArgs   list of GEOM.GEOM_Object, operation arguments to be published.
1045         #                   If this list is empty, all operation arguments will be published
1046         #  \param theFindMethod method to search sub-shapes, corresponding to arguments and
1047         #                       their sub-shapes. Value from enumeration GEOM.find_shape_method.
1048         #  \param theInheritFirstArg set properties of the first argument for <VAR>theObject</VAR>.
1049         #                            Do not publish sub-shapes in place of arguments, but only
1050         #                            in place of sub-shapes of the first argument,
1051         #                            because the whole shape corresponds to the first argument.
1052         #                            Mainly to be used after transformations, but it also can be
1053         #                            useful after partition with one object shape, and some other
1054         #                            operations, where only the first argument has to be considered.
1055         #                            If theObject has only one argument shape, this flag is automatically
1056         #                            considered as True, not regarding really passed value.
1057         #  \param theAddPrefix add prefix "from_" to names of restored sub-shapes,
1058         #                      and prefix "from_subshapes_of_" to names of partially restored sub-shapes.
1059         #  \return list of published sub-shapes
1060         #
1061         #  @ref tui_restore_prs_params "Example"
1062         def RestoreSubShapes (self, theObject, theArgs=[], theFindMethod=GEOM.FSM_GetInPlace,
1063                               theInheritFirstArg=False, theAddPrefix=True):
1064             """
1065             Publish sub-shapes, standing for arguments and sub-shapes of arguments
1066             To be used from python scripts out of geompy.addToStudy (non-default usage)
1067
1068             Parameters:
1069                 theObject published GEOM.GEOM_Object, arguments of which will be published
1070                 theArgs   list of GEOM.GEOM_Object, operation arguments to be published.
1071                           If this list is empty, all operation arguments will be published
1072                 theFindMethod method to search sub-shapes, corresponding to arguments and
1073                               their sub-shapes. Value from enumeration GEOM.find_shape_method.
1074                 theInheritFirstArg set properties of the first argument for theObject.
1075                                    Do not publish sub-shapes in place of arguments, but only
1076                                    in place of sub-shapes of the first argument,
1077                                    because the whole shape corresponds to the first argument.
1078                                    Mainly to be used after transformations, but it also can be
1079                                    useful after partition with one object shape, and some other
1080                                    operations, where only the first argument has to be considered.
1081                                    If theObject has only one argument shape, this flag is automatically
1082                                    considered as True, not regarding really passed value.
1083                 theAddPrefix add prefix "from_" to names of restored sub-shapes,
1084                              and prefix "from_subshapes_of_" to names of partially restored sub-shapes.
1085             Returns:
1086                 list of published sub-shapes
1087             """
1088             # Example: see GEOM_TestAll.py
1089             return self.RestoreSubShapesO(theObject, theArgs,
1090                                           theFindMethod, theInheritFirstArg, theAddPrefix)
1091
1092         ## Publish sub-shapes, standing for arguments and sub-shapes of arguments
1093         #  To be used from python scripts out of addToStudy() (non-default usage)
1094         #  \param theObject published GEOM.GEOM_Object, arguments of which will be published
1095         #  \param theArgs   list of GEOM.GEOM_Object, operation arguments to be published.
1096         #                   If this list is empty, all operation arguments will be published
1097         #  \param theFindMethod method to search sub-shapes, corresponding to arguments and
1098         #                       their sub-shapes. Value from enumeration GEOM::find_shape_method.
1099         #  \param theInheritFirstArg set properties of the first argument for <VAR>theObject</VAR>.
1100         #                            Do not publish sub-shapes in place of arguments, but only
1101         #                            in place of sub-shapes of the first argument,
1102         #                            because the whole shape corresponds to the first argument.
1103         #                            Mainly to be used after transformations, but it also can be
1104         #                            useful after partition with one object shape, and some other
1105         #                            operations, where only the first argument has to be considered.
1106         #                            If theObject has only one argument shape, this flag is automatically
1107         #                            considered as True, not regarding really passed value.
1108         #  \param theAddPrefix add prefix "from_" to names of restored sub-shapes,
1109         #                      and prefix "from_subshapes_of_" to names of partially restored sub-shapes.
1110         #  \return list of published sub-shapes
1111         #
1112         #  @ref tui_restore_prs_params "Example"
1113         def RestoreGivenSubShapes (self, theObject, theArgs=[], theFindMethod=GEOM.FSM_GetInPlace,
1114                                    theInheritFirstArg=False, theAddPrefix=True):
1115             """
1116             Publish sub-shapes, standing for arguments and sub-shapes of arguments
1117             To be used from python scripts out of geompy.addToStudy() (non-default usage)
1118
1119             Parameters:
1120                 theObject published GEOM.GEOM_Object, arguments of which will be published
1121                 theArgs   list of GEOM.GEOM_Object, operation arguments to be published.
1122                           If this list is empty, all operation arguments will be published
1123                 theFindMethod method to search sub-shapes, corresponding to arguments and
1124                               their sub-shapes. Value from enumeration GEOM::find_shape_method.
1125                 theInheritFirstArg set properties of the first argument for theObject.
1126                                    Do not publish sub-shapes in place of arguments, but only
1127                                    in place of sub-shapes of the first argument,
1128                                    because the whole shape corresponds to the first argument.
1129                                    Mainly to be used after transformations, but it also can be
1130                                    useful after partition with one object shape, and some other
1131                                    operations, where only the first argument has to be considered.
1132                                    If theObject has only one argument shape, this flag is automatically
1133                                    considered as True, not regarding really passed value.
1134                 theAddPrefix add prefix "from_" to names of restored sub-shapes,
1135                              and prefix "from_subshapes_of_" to names of partially restored sub-shapes.
1136
1137             Returns:
1138                 list of published sub-shapes
1139             """
1140             # Example: see GEOM_TestAll.py
1141             return self.RestoreGivenSubShapesO(theObject, theArgs,
1142                                                theFindMethod, theInheritFirstArg, theAddPrefix)
1143
1144         # end of l3_restore_ss
1145         ## @}
1146
1147         ## @addtogroup l3_basic_go
1148         ## @{
1149
1150         ## Create point by three coordinates.
1151         #  @param theX The X coordinate of the point.
1152         #  @param theY The Y coordinate of the point.
1153         #  @param theZ The Z coordinate of the point.
1154         #  @param theName Object name; when specified, this parameter is used
1155         #         for result publication in the study. Otherwise, if automatic
1156         #         publication is switched on, default value is used for result name.
1157         #
1158         #  @return New GEOM.GEOM_Object, containing the created point.
1159         #
1160         #  @ref tui_creation_point "Example"
1161         @ManageTransactions("BasicOp")
1162         def MakeVertex(self, theX, theY, theZ, theName=None):
1163             """
1164             Create point by three coordinates.
1165
1166             Parameters:
1167                 theX The X coordinate of the point.
1168                 theY The Y coordinate of the point.
1169                 theZ The Z coordinate of the point.
1170                 theName Object name; when specified, this parameter is used
1171                         for result publication in the study. Otherwise, if automatic
1172                         publication is switched on, default value is used for result name.
1173
1174             Returns:
1175                 New GEOM.GEOM_Object, containing the created point.
1176             """
1177             # Example: see GEOM_TestAll.py
1178             theX,theY,theZ,Parameters = ParseParameters(theX, theY, theZ)
1179             anObj = self.BasicOp.MakePointXYZ(theX, theY, theZ)
1180             RaiseIfFailed("MakePointXYZ", self.BasicOp)
1181             anObj.SetParameters(Parameters)
1182             self._autoPublish(anObj, theName, "vertex")
1183             return anObj
1184
1185         ## Create a point, distant from the referenced point
1186         #  on the given distances along the coordinate axes.
1187         #  @param theReference The referenced point.
1188         #  @param theX Displacement from the referenced point along OX axis.
1189         #  @param theY Displacement from the referenced point along OY axis.
1190         #  @param theZ Displacement from the referenced point along OZ axis.
1191         #  @param theName Object name; when specified, this parameter is used
1192         #         for result publication in the study. Otherwise, if automatic
1193         #         publication is switched on, default value is used for result name.
1194         #
1195         #  @return New GEOM.GEOM_Object, containing the created point.
1196         #
1197         #  @ref tui_creation_point "Example"
1198         @ManageTransactions("BasicOp")
1199         def MakeVertexWithRef(self, theReference, theX, theY, theZ, theName=None):
1200             """
1201             Create a point, distant from the referenced point
1202             on the given distances along the coordinate axes.
1203
1204             Parameters:
1205                 theReference The referenced point.
1206                 theX Displacement from the referenced point along OX axis.
1207                 theY Displacement from the referenced point along OY axis.
1208                 theZ Displacement from the referenced point along OZ axis.
1209                 theName Object name; when specified, this parameter is used
1210                         for result publication in the study. Otherwise, if automatic
1211                         publication is switched on, default value is used for result name.
1212
1213             Returns:
1214                 New GEOM.GEOM_Object, containing the created point.
1215             """
1216             # Example: see GEOM_TestAll.py
1217             theX,theY,theZ,Parameters = ParseParameters(theX, theY, theZ)
1218             anObj = self.BasicOp.MakePointWithReference(theReference, theX, theY, theZ)
1219             RaiseIfFailed("MakePointWithReference", self.BasicOp)
1220             anObj.SetParameters(Parameters)
1221             self._autoPublish(anObj, theName, "vertex")
1222             return anObj
1223
1224         ## Create a point, corresponding to the given parameter on the given curve.
1225         #  @param theRefCurve The referenced curve.
1226         #  @param theParameter Value of parameter on the referenced curve.
1227         #  @param takeOrientationIntoAccount flag that tells if it is necessary
1228         #         to take the curve's orientation into account for the
1229         #         operation. I.e. if this flag is set, the results for the same
1230         #         parameters (except the value 0.5) is different for forward
1231         #         and reversed curves. If it is not set the result is the same.
1232         #  @param theName Object name; when specified, this parameter is used
1233         #         for result publication in the study. Otherwise, if automatic
1234         #         publication is switched on, default value is used for result name.
1235         #
1236         #  @return New GEOM.GEOM_Object, containing the created point.
1237         #
1238         #  @ref tui_creation_point "Example"
1239         @ManageTransactions("BasicOp")
1240         def MakeVertexOnCurve(self, theRefCurve, theParameter,
1241                               takeOrientationIntoAccount=False, theName=None):
1242             """
1243             Create a point, corresponding to the given parameter on the given curve.
1244
1245             Parameters:
1246                 theRefCurve The referenced curve.
1247                 theParameter Value of parameter on the referenced curve.
1248                 takeOrientationIntoAccount flag that tells if it is necessary
1249                         to take the curve's orientation into account for the
1250                         operation. I.e. if this flag is set, the results for
1251                         the same parameters (except the value 0.5) is different
1252                         for forward and reversed curves. If it is not set
1253                         the result is the same.
1254                 theName Object name; when specified, this parameter is used
1255                         for result publication in the study. Otherwise, if automatic
1256                         publication is switched on, default value is used for result name.
1257
1258             Returns:
1259                 New GEOM.GEOM_Object, containing the created point.
1260
1261             Example of usage:
1262                 p_on_arc = geompy.MakeVertexOnCurve(Arc, 0.25)
1263             """
1264             # Example: see GEOM_TestAll.py
1265             theParameter, takeOrientationIntoAccount, Parameters = ParseParameters(
1266                 theParameter, takeOrientationIntoAccount)
1267             anObj = self.BasicOp.MakePointOnCurve(theRefCurve, theParameter,
1268                                                   takeOrientationIntoAccount)
1269             RaiseIfFailed("MakePointOnCurve", self.BasicOp)
1270             anObj.SetParameters(Parameters)
1271             self._autoPublish(anObj, theName, "vertex")
1272             return anObj
1273
1274         ## Create a point by projection give coordinates on the given curve
1275         #  @param theRefCurve The referenced curve.
1276         #  @param theX X-coordinate in 3D space
1277         #  @param theY Y-coordinate in 3D space
1278         #  @param theZ Z-coordinate in 3D space
1279         #  @param theName Object name; when specified, this parameter is used
1280         #         for result publication in the study. Otherwise, if automatic
1281         #         publication is switched on, default value is used for result name.
1282         #
1283         #  @return New GEOM.GEOM_Object, containing the created point.
1284         #
1285         #  @ref tui_creation_point "Example"
1286         @ManageTransactions("BasicOp")
1287         def MakeVertexOnCurveByCoord(self, theRefCurve, theX, theY, theZ, theName=None):
1288             """
1289             Create a point by projection give coordinates on the given curve
1290
1291             Parameters:
1292                 theRefCurve The referenced curve.
1293                 theX X-coordinate in 3D space
1294                 theY Y-coordinate in 3D space
1295                 theZ Z-coordinate in 3D space
1296                 theName Object name; when specified, this parameter is used
1297                         for result publication in the study. Otherwise, if automatic
1298                         publication is switched on, default value is used for result name.
1299
1300             Returns:
1301                 New GEOM.GEOM_Object, containing the created point.
1302
1303             Example of usage:
1304                 p_on_arc3 = geompy.MakeVertexOnCurveByCoord(Arc, 100, -10, 10)
1305             """
1306             # Example: see GEOM_TestAll.py
1307             theX, theY, theZ, Parameters = ParseParameters(theX, theY, theZ)
1308             anObj = self.BasicOp.MakePointOnCurveByCoord(theRefCurve, theX, theY, theZ)
1309             RaiseIfFailed("MakeVertexOnCurveByCoord", self.BasicOp)
1310             anObj.SetParameters(Parameters)
1311             self._autoPublish(anObj, theName, "vertex")
1312             return anObj
1313
1314         ## Create a point, corresponding to the given length on the given curve.
1315         #  @param theRefCurve The referenced curve.
1316         #  @param theLength Length on the referenced curve. It can be negative.
1317         #  @param theStartPoint Point allowing to choose the direction for the calculation
1318         #                       of the length. If None, start from the first point of theRefCurve.
1319         #  @param theName Object name; when specified, this parameter is used
1320         #         for result publication in the study. Otherwise, if automatic
1321         #         publication is switched on, default value is used for result name.
1322         #
1323         #  @return New GEOM.GEOM_Object, containing the created point.
1324         #
1325         #  @ref tui_creation_point "Example"
1326         @ManageTransactions("BasicOp")
1327         def MakeVertexOnCurveByLength(self, theRefCurve, theLength, theStartPoint = None, theName=None):
1328             """
1329             Create a point, corresponding to the given length on the given curve.
1330
1331             Parameters:
1332                 theRefCurve The referenced curve.
1333                 theLength Length on the referenced curve. It can be negative.
1334                 theStartPoint Point allowing to choose the direction for the calculation
1335                               of the length. If None, start from the first point of theRefCurve.
1336                 theName Object name; when specified, this parameter is used
1337                         for result publication in the study. Otherwise, if automatic
1338                         publication is switched on, default value is used for result name.
1339
1340             Returns:
1341                 New GEOM.GEOM_Object, containing the created point.
1342             """
1343             # Example: see GEOM_TestAll.py
1344             theLength, Parameters = ParseParameters(theLength)
1345             anObj = self.BasicOp.MakePointOnCurveByLength(theRefCurve, theLength, theStartPoint)
1346             RaiseIfFailed("MakePointOnCurveByLength", self.BasicOp)
1347             anObj.SetParameters(Parameters)
1348             self._autoPublish(anObj, theName, "vertex")
1349             return anObj
1350
1351         ## Create a point, corresponding to the given parameters on the
1352         #    given surface.
1353         #  @param theRefSurf The referenced surface.
1354         #  @param theUParameter Value of U-parameter on the referenced surface.
1355         #  @param theVParameter Value of V-parameter on the referenced surface.
1356         #  @param theName Object name; when specified, this parameter is used
1357         #         for result publication in the study. Otherwise, if automatic
1358         #         publication is switched on, default value is used for result name.
1359         #
1360         #  @return New GEOM.GEOM_Object, containing the created point.
1361         #
1362         #  @ref swig_MakeVertexOnSurface "Example"
1363         @ManageTransactions("BasicOp")
1364         def MakeVertexOnSurface(self, theRefSurf, theUParameter, theVParameter, theName=None):
1365             """
1366             Create a point, corresponding to the given parameters on the
1367             given surface.
1368
1369             Parameters:
1370                 theRefSurf The referenced surface.
1371                 theUParameter Value of U-parameter on the referenced surface.
1372                 theVParameter Value of V-parameter on the referenced surface.
1373                 theName Object name; when specified, this parameter is used
1374                         for result publication in the study. Otherwise, if automatic
1375                         publication is switched on, default value is used for result name.
1376
1377             Returns:
1378                 New GEOM.GEOM_Object, containing the created point.
1379
1380             Example of usage:
1381                 p_on_face = geompy.MakeVertexOnSurface(Face, 0.1, 0.8)
1382             """
1383             theUParameter, theVParameter, Parameters = ParseParameters(theUParameter, theVParameter)
1384             # Example: see GEOM_TestAll.py
1385             anObj = self.BasicOp.MakePointOnSurface(theRefSurf, theUParameter, theVParameter)
1386             RaiseIfFailed("MakePointOnSurface", self.BasicOp)
1387             anObj.SetParameters(Parameters);
1388             self._autoPublish(anObj, theName, "vertex")
1389             return anObj
1390
1391         ## Create a point by projection give coordinates on the given surface
1392         #  @param theRefSurf The referenced surface.
1393         #  @param theX X-coordinate in 3D space
1394         #  @param theY Y-coordinate in 3D space
1395         #  @param theZ Z-coordinate in 3D space
1396         #  @param theName Object name; when specified, this parameter is used
1397         #         for result publication in the study. Otherwise, if automatic
1398         #         publication is switched on, default value is used for result name.
1399         #
1400         #  @return New GEOM.GEOM_Object, containing the created point.
1401         #
1402         #  @ref swig_MakeVertexOnSurfaceByCoord "Example"
1403         @ManageTransactions("BasicOp")
1404         def MakeVertexOnSurfaceByCoord(self, theRefSurf, theX, theY, theZ, theName=None):
1405             """
1406             Create a point by projection give coordinates on the given surface
1407
1408             Parameters:
1409                 theRefSurf The referenced surface.
1410                 theX X-coordinate in 3D space
1411                 theY Y-coordinate in 3D space
1412                 theZ Z-coordinate in 3D space
1413                 theName Object name; when specified, this parameter is used
1414                         for result publication in the study. Otherwise, if automatic
1415                         publication is switched on, default value is used for result name.
1416
1417             Returns:
1418                 New GEOM.GEOM_Object, containing the created point.
1419
1420             Example of usage:
1421                 p_on_face2 = geompy.MakeVertexOnSurfaceByCoord(Face, 0., 0., 0.)
1422             """
1423             theX, theY, theZ, Parameters = ParseParameters(theX, theY, theZ)
1424             # Example: see GEOM_TestAll.py
1425             anObj = self.BasicOp.MakePointOnSurfaceByCoord(theRefSurf, theX, theY, theZ)
1426             RaiseIfFailed("MakeVertexOnSurfaceByCoord", self.BasicOp)
1427             anObj.SetParameters(Parameters);
1428             self._autoPublish(anObj, theName, "vertex")
1429             return anObj
1430
1431         ## Create a point, which lays on the given face.
1432         #  The point will lay in arbitrary place of the face.
1433         #  The only condition on it is a non-zero distance to the face boundary.
1434         #  Such point can be used to uniquely identify the face inside any
1435         #  shape in case, when the shape does not contain overlapped faces.
1436         #  @param theFace The referenced face.
1437         #  @param theName Object name; when specified, this parameter is used
1438         #         for result publication in the study. Otherwise, if automatic
1439         #         publication is switched on, default value is used for result name.
1440         #
1441         #  @return New GEOM.GEOM_Object, containing the created point.
1442         #
1443         #  @ref swig_MakeVertexInsideFace "Example"
1444         @ManageTransactions("BasicOp")
1445         def MakeVertexInsideFace (self, theFace, theNumberOfPnts=1, theName=None):
1446             """
1447             Create a point, which lays on the given face.
1448             The point will lay in arbitrary place of the face.
1449             The only condition on it is a non-zero distance to the face boundary.
1450             Such point can be used to uniquely identify the face inside any
1451             shape in case, when the shape does not contain overlapped faces.
1452
1453             Parameters:
1454                 theFace The referenced face.
1455                 theNumberOfPnts The number of points we want to get, 1 by default.
1456                 theName Object name; when specified, this parameter is used
1457                         for result publication in the study. Otherwise, if automatic
1458                         publication is switched on, default value is used for result name.
1459
1460             Returns:
1461                 New GEOM.GEOM_Object, containing the created point.
1462
1463             Example of usage:
1464                 p_on_face = geompy.MakeVertexInsideFace(Face)
1465             """
1466             # Example: see GEOM_TestAll.py
1467             anObj = self.BasicOp.MakePointOnFace(theFace, theNumberOfPnts)
1468             RaiseIfFailed("MakeVertexInsideFace", self.BasicOp)
1469             self._autoPublish(anObj, theName, "vertex")
1470             return anObj
1471
1472         ## Create a point on intersection of two lines.
1473         #  @param theRefLine1, theRefLine2 The referenced lines.
1474         #  @param theName Object name; when specified, this parameter is used
1475         #         for result publication in the study. Otherwise, if automatic
1476         #         publication is switched on, default value is used for result name.
1477         #
1478         #  @return New GEOM.GEOM_Object, containing the created point.
1479         #
1480         #  @ref swig_MakeVertexOnLinesIntersection "Example"
1481         @ManageTransactions("BasicOp")
1482         def MakeVertexOnLinesIntersection(self, theRefLine1, theRefLine2, theName=None):
1483             """
1484             Create a point on intersection of two lines.
1485
1486             Parameters:
1487                 theRefLine1, theRefLine2 The referenced lines.
1488                 theName Object name; when specified, this parameter is used
1489                         for result publication in the study. Otherwise, if automatic
1490                         publication is switched on, default value is used for result name.
1491
1492             Returns:
1493                 New GEOM.GEOM_Object, containing the created point.
1494             """
1495             # Example: see GEOM_TestAll.py
1496             anObj = self.BasicOp.MakePointOnLinesIntersection(theRefLine1, theRefLine2)
1497             RaiseIfFailed("MakePointOnLinesIntersection", self.BasicOp)
1498             self._autoPublish(anObj, theName, "vertex")
1499             return anObj
1500
1501         ## Create a tangent, corresponding to the given parameter on the given curve.
1502         #  @param theRefCurve The referenced curve.
1503         #  @param theParameter Value of parameter on the referenced curve.
1504         #  @param theName Object name; when specified, this parameter is used
1505         #         for result publication in the study. Otherwise, if automatic
1506         #         publication is switched on, default value is used for result name.
1507         #
1508         #  @return New GEOM.GEOM_Object, containing the created tangent.
1509         #
1510         #  @ref swig_MakeTangentOnCurve "Example"
1511         @ManageTransactions("BasicOp")
1512         def MakeTangentOnCurve(self, theRefCurve, theParameter, theName=None):
1513             """
1514             Create a tangent, corresponding to the given parameter on the given curve.
1515
1516             Parameters:
1517                 theRefCurve The referenced curve.
1518                 theParameter Value of parameter on the referenced curve.
1519                 theName Object name; when specified, this parameter is used
1520                         for result publication in the study. Otherwise, if automatic
1521                         publication is switched on, default value is used for result name.
1522
1523             Returns:
1524                 New GEOM.GEOM_Object, containing the created tangent.
1525
1526             Example of usage:
1527                 tan_on_arc = geompy.MakeTangentOnCurve(Arc, 0.7)
1528             """
1529             anObj = self.BasicOp.MakeTangentOnCurve(theRefCurve, theParameter)
1530             RaiseIfFailed("MakeTangentOnCurve", self.BasicOp)
1531             self._autoPublish(anObj, theName, "tangent")
1532             return anObj
1533
1534         ## Create a tangent plane, corresponding to the given parameter on the given face.
1535         #  @param theFace The face for which tangent plane should be built.
1536         #  @param theParameterV vertical value of the center point (0.0 - 1.0).
1537         #  @param theParameterU horisontal value of the center point (0.0 - 1.0).
1538         #  @param theTrimSize the size of plane.
1539         #  @param theName Object name; when specified, this parameter is used
1540         #         for result publication in the study. Otherwise, if automatic
1541         #         publication is switched on, default value is used for result name.
1542         #
1543         #  @return New GEOM.GEOM_Object, containing the created tangent.
1544         #
1545         #  @ref swig_MakeTangentPlaneOnFace "Example"
1546         @ManageTransactions("BasicOp")
1547         def MakeTangentPlaneOnFace(self, theFace, theParameterU, theParameterV, theTrimSize, theName=None):
1548             """
1549             Create a tangent plane, corresponding to the given parameter on the given face.
1550
1551             Parameters:
1552                 theFace The face for which tangent plane should be built.
1553                 theParameterV vertical value of the center point (0.0 - 1.0).
1554                 theParameterU horisontal value of the center point (0.0 - 1.0).
1555                 theTrimSize the size of plane.
1556                 theName Object name; when specified, this parameter is used
1557                         for result publication in the study. Otherwise, if automatic
1558                         publication is switched on, default value is used for result name.
1559
1560            Returns:
1561                 New GEOM.GEOM_Object, containing the created tangent.
1562
1563            Example of usage:
1564                 an_on_face = geompy.MakeTangentPlaneOnFace(tan_extrusion, 0.7, 0.5, 150)
1565             """
1566             anObj = self.BasicOp.MakeTangentPlaneOnFace(theFace, theParameterU, theParameterV, theTrimSize)
1567             RaiseIfFailed("MakeTangentPlaneOnFace", self.BasicOp)
1568             self._autoPublish(anObj, theName, "tangent")
1569             return anObj
1570
1571         ## Create a vector with the given components.
1572         #  @param theDX X component of the vector.
1573         #  @param theDY Y component of the vector.
1574         #  @param theDZ Z component of the vector.
1575         #  @param theName Object name; when specified, this parameter is used
1576         #         for result publication in the study. Otherwise, if automatic
1577         #         publication is switched on, default value is used for result name.
1578         #
1579         #  @return New GEOM.GEOM_Object, containing the created vector.
1580         #
1581         #  @ref tui_creation_vector "Example"
1582         @ManageTransactions("BasicOp")
1583         def MakeVectorDXDYDZ(self, theDX, theDY, theDZ, theName=None):
1584             """
1585             Create a vector with the given components.
1586
1587             Parameters:
1588                 theDX X component of the vector.
1589                 theDY Y component of the vector.
1590                 theDZ Z component of the vector.
1591                 theName Object name; when specified, this parameter is used
1592                         for result publication in the study. Otherwise, if automatic
1593                         publication is switched on, default value is used for result name.
1594
1595             Returns:
1596                 New GEOM.GEOM_Object, containing the created vector.
1597             """
1598             # Example: see GEOM_TestAll.py
1599             theDX,theDY,theDZ,Parameters = ParseParameters(theDX, theDY, theDZ)
1600             anObj = self.BasicOp.MakeVectorDXDYDZ(theDX, theDY, theDZ)
1601             RaiseIfFailed("MakeVectorDXDYDZ", self.BasicOp)
1602             anObj.SetParameters(Parameters)
1603             self._autoPublish(anObj, theName, "vector")
1604             return anObj
1605
1606         ## Create a vector between two points.
1607         #  @param thePnt1 Start point for the vector.
1608         #  @param thePnt2 End point for the vector.
1609         #  @param theName Object name; when specified, this parameter is used
1610         #         for result publication in the study. Otherwise, if automatic
1611         #         publication is switched on, default value is used for result name.
1612         #
1613         #  @return New GEOM.GEOM_Object, containing the created vector.
1614         #
1615         #  @ref tui_creation_vector "Example"
1616         @ManageTransactions("BasicOp")
1617         def MakeVector(self, thePnt1, thePnt2, theName=None):
1618             """
1619             Create a vector between two points.
1620
1621             Parameters:
1622                 thePnt1 Start point for the vector.
1623                 thePnt2 End point for the vector.
1624                 theName Object name; when specified, this parameter is used
1625                         for result publication in the study. Otherwise, if automatic
1626                         publication is switched on, default value is used for result name.
1627
1628             Returns:
1629                 New GEOM.GEOM_Object, containing the created vector.
1630             """
1631             # Example: see GEOM_TestAll.py
1632             anObj = self.BasicOp.MakeVectorTwoPnt(thePnt1, thePnt2)
1633             RaiseIfFailed("MakeVectorTwoPnt", self.BasicOp)
1634             self._autoPublish(anObj, theName, "vector")
1635             return anObj
1636
1637         ## Create a line, passing through the given point
1638         #  and parallel to the given direction
1639         #  @param thePnt Point. The resulting line will pass through it.
1640         #  @param theDir Direction. The resulting line will be parallel to it.
1641         #  @param theName Object name; when specified, this parameter is used
1642         #         for result publication in the study. Otherwise, if automatic
1643         #         publication is switched on, default value is used for result name.
1644         #
1645         #  @return New GEOM.GEOM_Object, containing the created line.
1646         #
1647         #  @ref tui_creation_line "Example"
1648         @ManageTransactions("BasicOp")
1649         def MakeLine(self, thePnt, theDir, theName=None):
1650             """
1651             Create a line, passing through the given point
1652             and parallel to the given direction
1653
1654             Parameters:
1655                 thePnt Point. The resulting line will pass through it.
1656                 theDir Direction. The resulting line will be parallel to it.
1657                 theName Object name; when specified, this parameter is used
1658                         for result publication in the study. Otherwise, if automatic
1659                         publication is switched on, default value is used for result name.
1660
1661             Returns:
1662                 New GEOM.GEOM_Object, containing the created line.
1663             """
1664             # Example: see GEOM_TestAll.py
1665             anObj = self.BasicOp.MakeLine(thePnt, theDir)
1666             RaiseIfFailed("MakeLine", self.BasicOp)
1667             self._autoPublish(anObj, theName, "line")
1668             return anObj
1669
1670         ## Create a line, passing through the given points
1671         #  @param thePnt1 First of two points, defining the line.
1672         #  @param thePnt2 Second of two points, defining the line.
1673         #  @param theName Object name; when specified, this parameter is used
1674         #         for result publication in the study. Otherwise, if automatic
1675         #         publication is switched on, default value is used for result name.
1676         #
1677         #  @return New GEOM.GEOM_Object, containing the created line.
1678         #
1679         #  @ref tui_creation_line "Example"
1680         @ManageTransactions("BasicOp")
1681         def MakeLineTwoPnt(self, thePnt1, thePnt2, theName=None):
1682             """
1683             Create a line, passing through the given points
1684
1685             Parameters:
1686                 thePnt1 First of two points, defining the line.
1687                 thePnt2 Second of two points, defining the line.
1688                 theName Object name; when specified, this parameter is used
1689                         for result publication in the study. Otherwise, if automatic
1690                         publication is switched on, default value is used for result name.
1691
1692             Returns:
1693                 New GEOM.GEOM_Object, containing the created line.
1694             """
1695             # Example: see GEOM_TestAll.py
1696             anObj = self.BasicOp.MakeLineTwoPnt(thePnt1, thePnt2)
1697             RaiseIfFailed("MakeLineTwoPnt", self.BasicOp)
1698             self._autoPublish(anObj, theName, "line")
1699             return anObj
1700
1701         ## Create a line on two faces intersection.
1702         #  @param theFace1 First of two faces, defining the line.
1703         #  @param theFace2 Second of two faces, defining the line.
1704         #  @param theName Object name; when specified, this parameter is used
1705         #         for result publication in the study. Otherwise, if automatic
1706         #         publication is switched on, default value is used for result name.
1707         #
1708         #  @return New GEOM.GEOM_Object, containing the created line.
1709         #
1710         #  @ref swig_MakeLineTwoFaces "Example"
1711         @ManageTransactions("BasicOp")
1712         def MakeLineTwoFaces(self, theFace1, theFace2, theName=None):
1713             """
1714             Create a line on two faces intersection.
1715
1716             Parameters:
1717                 theFace1 First of two faces, defining the line.
1718                 theFace2 Second of two faces, defining the line.
1719                 theName Object name; when specified, this parameter is used
1720                         for result publication in the study. Otherwise, if automatic
1721                         publication is switched on, default value is used for result name.
1722
1723             Returns:
1724                 New GEOM.GEOM_Object, containing the created line.
1725             """
1726             # Example: see GEOM_TestAll.py
1727             anObj = self.BasicOp.MakeLineTwoFaces(theFace1, theFace2)
1728             RaiseIfFailed("MakeLineTwoFaces", self.BasicOp)
1729             self._autoPublish(anObj, theName, "line")
1730             return anObj
1731
1732         ## Create a plane, passing through the given point
1733         #  and normal to the given vector.
1734         #  @param thePnt Point, the plane has to pass through.
1735         #  @param theVec Vector, defining the plane normal direction.
1736         #  @param theTrimSize Half size of a side of quadrangle face, representing the plane.
1737         #  @param theName Object name; when specified, this parameter is used
1738         #         for result publication in the study. Otherwise, if automatic
1739         #         publication is switched on, default value is used for result name.
1740         #
1741         #  @return New GEOM.GEOM_Object, containing the created plane.
1742         #
1743         #  @ref tui_creation_plane "Example"
1744         @ManageTransactions("BasicOp")
1745         def MakePlane(self, thePnt, theVec, theTrimSize, theName=None):
1746             """
1747             Create a plane, passing through the given point
1748             and normal to the given vector.
1749
1750             Parameters:
1751                 thePnt Point, the plane has to pass through.
1752                 theVec Vector, defining the plane normal direction.
1753                 theTrimSize Half size of a side of quadrangle face, representing the plane.
1754                 theName Object name; when specified, this parameter is used
1755                         for result publication in the study. Otherwise, if automatic
1756                         publication is switched on, default value is used for result name.
1757
1758             Returns:
1759                 New GEOM.GEOM_Object, containing the created plane.
1760             """
1761             # Example: see GEOM_TestAll.py
1762             theTrimSize, Parameters = ParseParameters(theTrimSize);
1763             anObj = self.BasicOp.MakePlanePntVec(thePnt, theVec, theTrimSize)
1764             RaiseIfFailed("MakePlanePntVec", self.BasicOp)
1765             anObj.SetParameters(Parameters)
1766             self._autoPublish(anObj, theName, "plane")
1767             return anObj
1768
1769         ## Create a plane, passing through the three given points
1770         #  @param thePnt1 First of three points, defining the plane.
1771         #  @param thePnt2 Second of three points, defining the plane.
1772         #  @param thePnt3 Third of three points, defining the plane.
1773         #  @param theTrimSize Half size of a side of quadrangle face, representing the plane.
1774         #  @param theName Object name; when specified, this parameter is used
1775         #         for result publication in the study. Otherwise, if automatic
1776         #         publication is switched on, default value is used for result name.
1777         #
1778         #  @return New GEOM.GEOM_Object, containing the created plane.
1779         #
1780         #  @ref tui_creation_plane "Example"
1781         @ManageTransactions("BasicOp")
1782         def MakePlaneThreePnt(self, thePnt1, thePnt2, thePnt3, theTrimSize, theName=None):
1783             """
1784             Create a plane, passing through the three given points
1785
1786             Parameters:
1787                 thePnt1 First of three points, defining the plane.
1788                 thePnt2 Second of three points, defining the plane.
1789                 thePnt3 Third of three points, defining the plane.
1790                 theTrimSize Half size of a side of quadrangle face, representing the plane.
1791                 theName Object name; when specified, this parameter is used
1792                         for result publication in the study. Otherwise, if automatic
1793                         publication is switched on, default value is used for result name.
1794
1795             Returns:
1796                 New GEOM.GEOM_Object, containing the created plane.
1797             """
1798             # Example: see GEOM_TestAll.py
1799             theTrimSize, Parameters = ParseParameters(theTrimSize);
1800             anObj = self.BasicOp.MakePlaneThreePnt(thePnt1, thePnt2, thePnt3, theTrimSize)
1801             RaiseIfFailed("MakePlaneThreePnt", self.BasicOp)
1802             anObj.SetParameters(Parameters)
1803             self._autoPublish(anObj, theName, "plane")
1804             return anObj
1805
1806         ## Create a plane, similar to the existing one, but with another size of representing face.
1807         #  @param theFace Referenced plane or LCS(Marker).
1808         #  @param theTrimSize New half size of a side of quadrangle face, representing the plane.
1809         #  @param theName Object name; when specified, this parameter is used
1810         #         for result publication in the study. Otherwise, if automatic
1811         #         publication is switched on, default value is used for result name.
1812         #
1813         #  @return New GEOM.GEOM_Object, containing the created plane.
1814         #
1815         #  @ref tui_creation_plane "Example"
1816         @ManageTransactions("BasicOp")
1817         def MakePlaneFace(self, theFace, theTrimSize, theName=None):
1818             """
1819             Create a plane, similar to the existing one, but with another size of representing face.
1820
1821             Parameters:
1822                 theFace Referenced plane or LCS(Marker).
1823                 theTrimSize New half size of a side of quadrangle face, representing the plane.
1824                 theName Object name; when specified, this parameter is used
1825                         for result publication in the study. Otherwise, if automatic
1826                         publication is switched on, default value is used for result name.
1827
1828             Returns:
1829                 New GEOM.GEOM_Object, containing the created plane.
1830             """
1831             # Example: see GEOM_TestAll.py
1832             theTrimSize, Parameters = ParseParameters(theTrimSize);
1833             anObj = self.BasicOp.MakePlaneFace(theFace, theTrimSize)
1834             RaiseIfFailed("MakePlaneFace", self.BasicOp)
1835             anObj.SetParameters(Parameters)
1836             self._autoPublish(anObj, theName, "plane")
1837             return anObj
1838
1839         ## Create a plane, passing through the 2 vectors
1840         #  with center in a start point of the first vector.
1841         #  @param theVec1 Vector, defining center point and plane direction.
1842         #  @param theVec2 Vector, defining the plane normal direction.
1843         #  @param theTrimSize Half size of a side of quadrangle face, representing the plane.
1844         #  @param theName Object name; when specified, this parameter is used
1845         #         for result publication in the study. Otherwise, if automatic
1846         #         publication is switched on, default value is used for result name.
1847         #
1848         #  @return New GEOM.GEOM_Object, containing the created plane.
1849         #
1850         #  @ref tui_creation_plane "Example"
1851         @ManageTransactions("BasicOp")
1852         def MakePlane2Vec(self, theVec1, theVec2, theTrimSize, theName=None):
1853             """
1854             Create a plane, passing through the 2 vectors
1855             with center in a start point of the first vector.
1856
1857             Parameters:
1858                 theVec1 Vector, defining center point and plane direction.
1859                 theVec2 Vector, defining the plane normal direction.
1860                 theTrimSize Half size of a side of quadrangle face, representing the plane.
1861                 theName Object name; when specified, this parameter is used
1862                         for result publication in the study. Otherwise, if automatic
1863                         publication is switched on, default value is used for result name.
1864
1865             Returns:
1866                 New GEOM.GEOM_Object, containing the created plane.
1867             """
1868             # Example: see GEOM_TestAll.py
1869             theTrimSize, Parameters = ParseParameters(theTrimSize);
1870             anObj = self.BasicOp.MakePlane2Vec(theVec1, theVec2, theTrimSize)
1871             RaiseIfFailed("MakePlane2Vec", self.BasicOp)
1872             anObj.SetParameters(Parameters)
1873             self._autoPublish(anObj, theName, "plane")
1874             return anObj
1875
1876         ## Create a plane, based on a Local coordinate system.
1877         #  @param theLCS  coordinate system, defining plane.
1878         #  @param theTrimSize Half size of a side of quadrangle face, representing the plane.
1879         #  @param theOrientation OXY, OYZ or OZX orientation - (1, 2 or 3)
1880         #  @param theName Object name; when specified, this parameter is used
1881         #         for result publication in the study. Otherwise, if automatic
1882         #         publication is switched on, default value is used for result name.
1883         #
1884         #  @return New GEOM.GEOM_Object, containing the created plane.
1885         #
1886         #  @ref tui_creation_plane "Example"
1887         @ManageTransactions("BasicOp")
1888         def MakePlaneLCS(self, theLCS, theTrimSize, theOrientation, theName=None):
1889             """
1890             Create a plane, based on a Local coordinate system.
1891
1892            Parameters:
1893                 theLCS  coordinate system, defining plane.
1894                 theTrimSize Half size of a side of quadrangle face, representing the plane.
1895                 theOrientation OXY, OYZ or OZX orientation - (1, 2 or 3)
1896                 theName Object name; when specified, this parameter is used
1897                         for result publication in the study. Otherwise, if automatic
1898                         publication is switched on, default value is used for result name.
1899
1900             Returns:
1901                 New GEOM.GEOM_Object, containing the created plane.
1902             """
1903             # Example: see GEOM_TestAll.py
1904             theTrimSize, Parameters = ParseParameters(theTrimSize);
1905             anObj = self.BasicOp.MakePlaneLCS(theLCS, theTrimSize, theOrientation)
1906             RaiseIfFailed("MakePlaneLCS", self.BasicOp)
1907             anObj.SetParameters(Parameters)
1908             self._autoPublish(anObj, theName, "plane")
1909             return anObj
1910
1911         ## Create a local coordinate system.
1912         #  @param OX,OY,OZ Three coordinates of coordinate system origin.
1913         #  @param XDX,XDY,XDZ Three components of OX direction
1914         #  @param YDX,YDY,YDZ Three components of OY direction
1915         #  @param theName Object name; when specified, this parameter is used
1916         #         for result publication in the study. Otherwise, if automatic
1917         #         publication is switched on, default value is used for result name.
1918         #
1919         #  @return New GEOM.GEOM_Object, containing the created coordinate system.
1920         #
1921         #  @ref swig_MakeMarker "Example"
1922         @ManageTransactions("BasicOp")
1923         def MakeMarker(self, OX,OY,OZ, XDX,XDY,XDZ, YDX,YDY,YDZ, theName=None):
1924             """
1925             Create a local coordinate system.
1926
1927             Parameters:
1928                 OX,OY,OZ Three coordinates of coordinate system origin.
1929                 XDX,XDY,XDZ Three components of OX direction
1930                 YDX,YDY,YDZ Three components of OY direction
1931                 theName Object name; when specified, this parameter is used
1932                         for result publication in the study. Otherwise, if automatic
1933                         publication is switched on, default value is used for result name.
1934
1935             Returns:
1936                 New GEOM.GEOM_Object, containing the created coordinate system.
1937             """
1938             # Example: see GEOM_TestAll.py
1939             OX,OY,OZ, XDX,XDY,XDZ, YDX,YDY,YDZ, Parameters = ParseParameters(OX,OY,OZ, XDX,XDY,XDZ, YDX,YDY,YDZ);
1940             anObj = self.BasicOp.MakeMarker(OX,OY,OZ, XDX,XDY,XDZ, YDX,YDY,YDZ)
1941             RaiseIfFailed("MakeMarker", self.BasicOp)
1942             anObj.SetParameters(Parameters)
1943             self._autoPublish(anObj, theName, "lcs")
1944             return anObj
1945
1946         ## Create a local coordinate system from shape.
1947         #  @param theShape The initial shape to detect the coordinate system.
1948         #  @param theName Object name; when specified, this parameter is used
1949         #         for result publication in the study. Otherwise, if automatic
1950         #         publication is switched on, default value is used for result name.
1951         #
1952         #  @return New GEOM.GEOM_Object, containing the created coordinate system.
1953         #
1954         #  @ref tui_creation_lcs "Example"
1955         @ManageTransactions("BasicOp")
1956         def MakeMarkerFromShape(self, theShape, theName=None):
1957             """
1958             Create a local coordinate system from shape.
1959
1960             Parameters:
1961                 theShape The initial shape to detect the coordinate system.
1962                 theName Object name; when specified, this parameter is used
1963                         for result publication in the study. Otherwise, if automatic
1964                         publication is switched on, default value is used for result name.
1965
1966             Returns:
1967                 New GEOM.GEOM_Object, containing the created coordinate system.
1968             """
1969             anObj = self.BasicOp.MakeMarkerFromShape(theShape)
1970             RaiseIfFailed("MakeMarkerFromShape", self.BasicOp)
1971             self._autoPublish(anObj, theName, "lcs")
1972             return anObj
1973
1974         ## Create a local coordinate system from point and two vectors.
1975         #  @param theOrigin Point of coordinate system origin.
1976         #  @param theXVec Vector of X direction
1977         #  @param theYVec Vector of Y direction
1978         #  @param theName Object name; when specified, this parameter is used
1979         #         for result publication in the study. Otherwise, if automatic
1980         #         publication is switched on, default value is used for result name.
1981         #
1982         #  @return New GEOM.GEOM_Object, containing the created coordinate system.
1983         #
1984         #  @ref tui_creation_lcs "Example"
1985         @ManageTransactions("BasicOp")
1986         def MakeMarkerPntTwoVec(self, theOrigin, theXVec, theYVec, theName=None):
1987             """
1988             Create a local coordinate system from point and two vectors.
1989
1990             Parameters:
1991                 theOrigin Point of coordinate system origin.
1992                 theXVec Vector of X direction
1993                 theYVec Vector of Y direction
1994                 theName Object name; when specified, this parameter is used
1995                         for result publication in the study. Otherwise, if automatic
1996                         publication is switched on, default value is used for result name.
1997
1998             Returns:
1999                 New GEOM.GEOM_Object, containing the created coordinate system.
2000
2001             """
2002             anObj = self.BasicOp.MakeMarkerPntTwoVec(theOrigin, theXVec, theYVec)
2003             RaiseIfFailed("MakeMarkerPntTwoVec", self.BasicOp)
2004             self._autoPublish(anObj, theName, "lcs")
2005             return anObj
2006
2007         # end of l3_basic_go
2008         ## @}
2009
2010         ## @addtogroup l4_curves
2011         ## @{
2012
2013         ##  Create an arc of circle, passing through three given points.
2014         #  @param thePnt1 Start point of the arc.
2015         #  @param thePnt2 Middle point of the arc.
2016         #  @param thePnt3 End point of the arc.
2017         #  @param theName Object name; when specified, this parameter is used
2018         #         for result publication in the study. Otherwise, if automatic
2019         #         publication is switched on, default value is used for result name.
2020         #
2021         #  @return New GEOM.GEOM_Object, containing the created arc.
2022         #
2023         #  @ref swig_MakeArc "Example"
2024         @ManageTransactions("CurvesOp")
2025         def MakeArc(self, thePnt1, thePnt2, thePnt3, theName=None):
2026             """
2027             Create an arc of circle, passing through three given points.
2028
2029             Parameters:
2030                 thePnt1 Start point of the arc.
2031                 thePnt2 Middle point of the arc.
2032                 thePnt3 End point of the arc.
2033                 theName Object name; when specified, this parameter is used
2034                         for result publication in the study. Otherwise, if automatic
2035                         publication is switched on, default value is used for result name.
2036
2037             Returns:
2038                 New GEOM.GEOM_Object, containing the created arc.
2039             """
2040             # Example: see GEOM_TestAll.py
2041             anObj = self.CurvesOp.MakeArc(thePnt1, thePnt2, thePnt3)
2042             RaiseIfFailed("MakeArc", self.CurvesOp)
2043             self._autoPublish(anObj, theName, "arc")
2044             return anObj
2045
2046         ##  Create an arc of circle from a center and 2 points.
2047         #  @param thePnt1 Center of the arc
2048         #  @param thePnt2 Start point of the arc. (Gives also the radius of the arc)
2049         #  @param thePnt3 End point of the arc (Gives also a direction)
2050         #  @param theSense Orientation of the arc
2051         #  @param theName Object name; when specified, this parameter is used
2052         #         for result publication in the study. Otherwise, if automatic
2053         #         publication is switched on, default value is used for result name.
2054         #
2055         #  @return New GEOM.GEOM_Object, containing the created arc.
2056         #
2057         #  @ref swig_MakeArc "Example"
2058         @ManageTransactions("CurvesOp")
2059         def MakeArcCenter(self, thePnt1, thePnt2, thePnt3, theSense=False, theName=None):
2060             """
2061             Create an arc of circle from a center and 2 points.
2062
2063             Parameters:
2064                 thePnt1 Center of the arc
2065                 thePnt2 Start point of the arc. (Gives also the radius of the arc)
2066                 thePnt3 End point of the arc (Gives also a direction)
2067                 theSense Orientation of the arc
2068                 theName Object name; when specified, this parameter is used
2069                         for result publication in the study. Otherwise, if automatic
2070                         publication is switched on, default value is used for result name.
2071
2072             Returns:
2073                 New GEOM.GEOM_Object, containing the created arc.
2074             """
2075             # Example: see GEOM_TestAll.py
2076             anObj = self.CurvesOp.MakeArcCenter(thePnt1, thePnt2, thePnt3, theSense)
2077             RaiseIfFailed("MakeArcCenter", self.CurvesOp)
2078             self._autoPublish(anObj, theName, "arc")
2079             return anObj
2080
2081         ##  Create an arc of ellipse, of center and two points.
2082         #  @param theCenter Center of the arc.
2083         #  @param thePnt1 defines major radius of the arc by distance from Pnt1 to Pnt2.
2084         #  @param thePnt2 defines plane of ellipse and minor radius as distance from Pnt3 to line from Pnt1 to Pnt2.
2085         #  @param theName Object name; when specified, this parameter is used
2086         #         for result publication in the study. Otherwise, if automatic
2087         #         publication is switched on, default value is used for result name.
2088         #
2089         #  @return New GEOM.GEOM_Object, containing the created arc.
2090         #
2091         #  @ref swig_MakeArc "Example"
2092         @ManageTransactions("CurvesOp")
2093         def MakeArcOfEllipse(self, theCenter, thePnt1, thePnt2, theName=None):
2094             """
2095             Create an arc of ellipse, of center and two points.
2096
2097             Parameters:
2098                 theCenter Center of the arc.
2099                 thePnt1 defines major radius of the arc by distance from Pnt1 to Pnt2.
2100                 thePnt2 defines plane of ellipse and minor radius as distance from Pnt3 to line from Pnt1 to Pnt2.
2101                 theName Object name; when specified, this parameter is used
2102                         for result publication in the study. Otherwise, if automatic
2103                         publication is switched on, default value is used for result name.
2104
2105             Returns:
2106                 New GEOM.GEOM_Object, containing the created arc.
2107             """
2108             # Example: see GEOM_TestAll.py
2109             anObj = self.CurvesOp.MakeArcOfEllipse(theCenter, thePnt1, thePnt2)
2110             RaiseIfFailed("MakeArcOfEllipse", self.CurvesOp)
2111             self._autoPublish(anObj, theName, "arc")
2112             return anObj
2113
2114         ## Create a circle with given center, normal vector and radius.
2115         #  @param thePnt Circle center.
2116         #  @param theVec Vector, normal to the plane of the circle.
2117         #  @param theR Circle radius.
2118         #  @param theName Object name; when specified, this parameter is used
2119         #         for result publication in the study. Otherwise, if automatic
2120         #         publication is switched on, default value is used for result name.
2121         #
2122         #  @return New GEOM.GEOM_Object, containing the created circle.
2123         #
2124         #  @ref tui_creation_circle "Example"
2125         @ManageTransactions("CurvesOp")
2126         def MakeCircle(self, thePnt, theVec, theR, theName=None):
2127             """
2128             Create a circle with given center, normal vector and radius.
2129
2130             Parameters:
2131                 thePnt Circle center.
2132                 theVec Vector, normal to the plane of the circle.
2133                 theR Circle radius.
2134                 theName Object name; when specified, this parameter is used
2135                         for result publication in the study. Otherwise, if automatic
2136                         publication is switched on, default value is used for result name.
2137
2138             Returns:
2139                 New GEOM.GEOM_Object, containing the created circle.
2140             """
2141             # Example: see GEOM_TestAll.py
2142             theR, Parameters = ParseParameters(theR)
2143             anObj = self.CurvesOp.MakeCirclePntVecR(thePnt, theVec, theR)
2144             RaiseIfFailed("MakeCirclePntVecR", self.CurvesOp)
2145             anObj.SetParameters(Parameters)
2146             self._autoPublish(anObj, theName, "circle")
2147             return anObj
2148
2149         ## Create a circle with given radius.
2150         #  Center of the circle will be in the origin of global
2151         #  coordinate system and normal vector will be codirected with Z axis
2152         #  @param theR Circle radius.
2153         #  @param theName Object name; when specified, this parameter is used
2154         #         for result publication in the study. Otherwise, if automatic
2155         #         publication is switched on, default value is used for result name.
2156         #
2157         #  @return New GEOM.GEOM_Object, containing the created circle.
2158         @ManageTransactions("CurvesOp")
2159         def MakeCircleR(self, theR, theName=None):
2160             """
2161             Create a circle with given radius.
2162             Center of the circle will be in the origin of global
2163             coordinate system and normal vector will be codirected with Z axis
2164
2165             Parameters:
2166                 theR Circle radius.
2167                 theName Object name; when specified, this parameter is used
2168                         for result publication in the study. Otherwise, if automatic
2169                         publication is switched on, default value is used for result name.
2170
2171             Returns:
2172                 New GEOM.GEOM_Object, containing the created circle.
2173             """
2174             anObj = self.CurvesOp.MakeCirclePntVecR(None, None, theR)
2175             RaiseIfFailed("MakeCirclePntVecR", self.CurvesOp)
2176             self._autoPublish(anObj, theName, "circle")
2177             return anObj
2178
2179         ## Create a circle, passing through three given points
2180         #  @param thePnt1,thePnt2,thePnt3 Points, defining the circle.
2181         #  @param theName Object name; when specified, this parameter is used
2182         #         for result publication in the study. Otherwise, if automatic
2183         #         publication is switched on, default value is used for result name.
2184         #
2185         #  @return New GEOM.GEOM_Object, containing the created circle.
2186         #
2187         #  @ref tui_creation_circle "Example"
2188         @ManageTransactions("CurvesOp")
2189         def MakeCircleThreePnt(self, thePnt1, thePnt2, thePnt3, theName=None):
2190             """
2191             Create a circle, passing through three given points
2192
2193             Parameters:
2194                 thePnt1,thePnt2,thePnt3 Points, defining the circle.
2195                 theName Object name; when specified, this parameter is used
2196                         for result publication in the study. Otherwise, if automatic
2197                         publication is switched on, default value is used for result name.
2198
2199             Returns:
2200                 New GEOM.GEOM_Object, containing the created circle.
2201             """
2202             # Example: see GEOM_TestAll.py
2203             anObj = self.CurvesOp.MakeCircleThreePnt(thePnt1, thePnt2, thePnt3)
2204             RaiseIfFailed("MakeCircleThreePnt", self.CurvesOp)
2205             self._autoPublish(anObj, theName, "circle")
2206             return anObj
2207
2208         ## Create a circle, with given point1 as center,
2209         #  passing through the point2 as radius and laying in the plane,
2210         #  defined by all three given points.
2211         #  @param thePnt1,thePnt2,thePnt3 Points, defining the circle.
2212         #  @param theName Object name; when specified, this parameter is used
2213         #         for result publication in the study. Otherwise, if automatic
2214         #         publication is switched on, default value is used for result name.
2215         #
2216         #  @return New GEOM.GEOM_Object, containing the created circle.
2217         #
2218         #  @ref swig_MakeCircle "Example"
2219         @ManageTransactions("CurvesOp")
2220         def MakeCircleCenter2Pnt(self, thePnt1, thePnt2, thePnt3, theName=None):
2221             """
2222             Create a circle, with given point1 as center,
2223             passing through the point2 as radius and laying in the plane,
2224             defined by all three given points.
2225
2226             Parameters:
2227                 thePnt1,thePnt2,thePnt3 Points, defining the circle.
2228                 theName Object name; when specified, this parameter is used
2229                         for result publication in the study. Otherwise, if automatic
2230                         publication is switched on, default value is used for result name.
2231
2232             Returns:
2233                 New GEOM.GEOM_Object, containing the created circle.
2234             """
2235             # Example: see GEOM_example6.py
2236             anObj = self.CurvesOp.MakeCircleCenter2Pnt(thePnt1, thePnt2, thePnt3)
2237             RaiseIfFailed("MakeCircleCenter2Pnt", self.CurvesOp)
2238             self._autoPublish(anObj, theName, "circle")
2239             return anObj
2240
2241         ## Create an ellipse with given center, normal vector and radiuses.
2242         #  @param thePnt Ellipse center.
2243         #  @param theVec Vector, normal to the plane of the ellipse.
2244         #  @param theRMajor Major ellipse radius.
2245         #  @param theRMinor Minor ellipse radius.
2246         #  @param theVecMaj Vector, direction of the ellipse's main axis.
2247         #  @param theName Object name; when specified, this parameter is used
2248         #         for result publication in the study. Otherwise, if automatic
2249         #         publication is switched on, default value is used for result name.
2250         #
2251         #  @return New GEOM.GEOM_Object, containing the created ellipse.
2252         #
2253         #  @ref tui_creation_ellipse "Example"
2254         @ManageTransactions("CurvesOp")
2255         def MakeEllipse(self, thePnt, theVec, theRMajor, theRMinor, theVecMaj=None, theName=None):
2256             """
2257             Create an ellipse with given center, normal vector and radiuses.
2258
2259             Parameters:
2260                 thePnt Ellipse center.
2261                 theVec Vector, normal to the plane of the ellipse.
2262                 theRMajor Major ellipse radius.
2263                 theRMinor Minor ellipse radius.
2264                 theVecMaj Vector, direction of the ellipse's main axis.
2265                 theName Object name; when specified, this parameter is used
2266                         for result publication in the study. Otherwise, if automatic
2267                         publication is switched on, default value is used for result name.
2268
2269             Returns:
2270                 New GEOM.GEOM_Object, containing the created ellipse.
2271             """
2272             # Example: see GEOM_TestAll.py
2273             theRMajor, theRMinor, Parameters = ParseParameters(theRMajor, theRMinor)
2274             if theVecMaj is not None:
2275                 anObj = self.CurvesOp.MakeEllipseVec(thePnt, theVec, theRMajor, theRMinor, theVecMaj)
2276             else:
2277                 anObj = self.CurvesOp.MakeEllipse(thePnt, theVec, theRMajor, theRMinor)
2278                 pass
2279             RaiseIfFailed("MakeEllipse", self.CurvesOp)
2280             anObj.SetParameters(Parameters)
2281             self._autoPublish(anObj, theName, "ellipse")
2282             return anObj
2283
2284         ## Create an ellipse with given radiuses.
2285         #  Center of the ellipse will be in the origin of global
2286         #  coordinate system and normal vector will be codirected with Z axis
2287         #  @param theRMajor Major ellipse radius.
2288         #  @param theRMinor Minor ellipse radius.
2289         #  @param theName Object name; when specified, this parameter is used
2290         #         for result publication in the study. Otherwise, if automatic
2291         #         publication is switched on, default value is used for result name.
2292         #
2293         #  @return New GEOM.GEOM_Object, containing the created ellipse.
2294         @ManageTransactions("CurvesOp")
2295         def MakeEllipseRR(self, theRMajor, theRMinor, theName=None):
2296             """
2297             Create an ellipse with given radiuses.
2298             Center of the ellipse will be in the origin of global
2299             coordinate system and normal vector will be codirected with Z axis
2300
2301             Parameters:
2302                 theRMajor Major ellipse radius.
2303                 theRMinor Minor ellipse radius.
2304                 theName Object name; when specified, this parameter is used
2305                         for result publication in the study. Otherwise, if automatic
2306                         publication is switched on, default value is used for result name.
2307
2308             Returns:
2309             New GEOM.GEOM_Object, containing the created ellipse.
2310             """
2311             anObj = self.CurvesOp.MakeEllipse(None, None, theRMajor, theRMinor)
2312             RaiseIfFailed("MakeEllipse", self.CurvesOp)
2313             self._autoPublish(anObj, theName, "ellipse")
2314             return anObj
2315
2316         ## Create a polyline on the set of points.
2317         #  @param thePoints Sequence of points for the polyline.
2318         #  @param theIsClosed If True, build a closed wire.
2319         #  @param theName Object name; when specified, this parameter is used
2320         #         for result publication in the study. Otherwise, if automatic
2321         #         publication is switched on, default value is used for result name.
2322         #
2323         #  @return New GEOM.GEOM_Object, containing the created polyline.
2324         #
2325         #  @ref tui_creation_curve "Example"
2326         @ManageTransactions("CurvesOp")
2327         def MakePolyline(self, thePoints, theIsClosed=False, theName=None):
2328             """
2329             Create a polyline on the set of points.
2330
2331             Parameters:
2332                 thePoints Sequence of points for the polyline.
2333                 theIsClosed If True, build a closed wire.
2334                 theName Object name; when specified, this parameter is used
2335                         for result publication in the study. Otherwise, if automatic
2336                         publication is switched on, default value is used for result name.
2337
2338             Returns:
2339                 New GEOM.GEOM_Object, containing the created polyline.
2340             """
2341             # Example: see GEOM_TestAll.py
2342             anObj = self.CurvesOp.MakePolyline(thePoints, theIsClosed)
2343             RaiseIfFailed("MakePolyline", self.CurvesOp)
2344             self._autoPublish(anObj, theName, "polyline")
2345             return anObj
2346
2347         ## Create bezier curve on the set of points.
2348         #  @param thePoints Sequence of points for the bezier curve.
2349         #  @param theIsClosed If True, build a closed curve.
2350         #  @param theName Object name; when specified, this parameter is used
2351         #         for result publication in the study. Otherwise, if automatic
2352         #         publication is switched on, default value is used for result name.
2353         #
2354         #  @return New GEOM.GEOM_Object, containing the created bezier curve.
2355         #
2356         #  @ref tui_creation_curve "Example"
2357         @ManageTransactions("CurvesOp")
2358         def MakeBezier(self, thePoints, theIsClosed=False, theName=None):
2359             """
2360             Create bezier curve on the set of points.
2361
2362             Parameters:
2363                 thePoints Sequence of points for the bezier curve.
2364                 theIsClosed If True, build a closed curve.
2365                 theName Object name; when specified, this parameter is used
2366                         for result publication in the study. Otherwise, if automatic
2367                         publication is switched on, default value is used for result name.
2368
2369             Returns:
2370                 New GEOM.GEOM_Object, containing the created bezier curve.
2371             """
2372             # Example: see GEOM_TestAll.py
2373             anObj = self.CurvesOp.MakeSplineBezier(thePoints, theIsClosed)
2374             RaiseIfFailed("MakeSplineBezier", self.CurvesOp)
2375             self._autoPublish(anObj, theName, "bezier")
2376             return anObj
2377
2378         ## Create B-Spline curve on the set of points.
2379         #  @param thePoints Sequence of points for the B-Spline curve.
2380         #  @param theIsClosed If True, build a closed curve.
2381         #  @param theDoReordering If TRUE, the algo does not follow the order of
2382         #                         \a thePoints but searches for the closest vertex.
2383         #  @param theName Object name; when specified, this parameter is used
2384         #         for result publication in the study. Otherwise, if automatic
2385         #         publication is switched on, default value is used for result name.
2386         #
2387         #  @return New GEOM.GEOM_Object, containing the created B-Spline curve.
2388         #
2389         #  @ref tui_creation_curve "Example"
2390         @ManageTransactions("CurvesOp")
2391         def MakeInterpol(self, thePoints, theIsClosed=False, theDoReordering=False, theName=None):
2392             """
2393             Create B-Spline curve on the set of points.
2394
2395             Parameters:
2396                 thePoints Sequence of points for the B-Spline curve.
2397                 theIsClosed If True, build a closed curve.
2398                 theDoReordering If True, the algo does not follow the order of
2399                                 thePoints but searches for the closest vertex.
2400                 theName Object name; when specified, this parameter is used
2401                         for result publication in the study. Otherwise, if automatic
2402                         publication is switched on, default value is used for result name.
2403
2404             Returns:
2405                 New GEOM.GEOM_Object, containing the created B-Spline curve.
2406             """
2407             # Example: see GEOM_TestAll.py
2408             anObj = self.CurvesOp.MakeSplineInterpolation(thePoints, theIsClosed, theDoReordering)
2409             RaiseIfFailed("MakeInterpol", self.CurvesOp)
2410             self._autoPublish(anObj, theName, "bspline")
2411             return anObj
2412
2413         ## Create B-Spline curve on the set of points.
2414         #  @param thePoints Sequence of points for the B-Spline curve.
2415         #  @param theFirstVec Vector object, defining the curve direction at its first point.
2416         #  @param theLastVec Vector object, defining the curve direction at its last point.
2417         #  @param theName Object name; when specified, this parameter is used
2418         #         for result publication in the study. Otherwise, if automatic
2419         #         publication is switched on, default value is used for result name.
2420         #
2421         #  @return New GEOM.GEOM_Object, containing the created B-Spline curve.
2422         #
2423         #  @ref tui_creation_curve "Example"
2424         @ManageTransactions("CurvesOp")
2425         def MakeInterpolWithTangents(self, thePoints, theFirstVec, theLastVec, theName=None):
2426             """
2427             Create B-Spline curve on the set of points.
2428
2429             Parameters:
2430                 thePoints Sequence of points for the B-Spline curve.
2431                 theFirstVec Vector object, defining the curve direction at its first point.
2432                 theLastVec Vector object, defining the curve direction at its last point.
2433                 theName Object name; when specified, this parameter is used
2434                         for result publication in the study. Otherwise, if automatic
2435                         publication is switched on, default value is used for result name.
2436
2437             Returns:
2438                 New GEOM.GEOM_Object, containing the created B-Spline curve.
2439             """
2440             # Example: see GEOM_TestAll.py
2441             anObj = self.CurvesOp.MakeSplineInterpolWithTangents(thePoints, theFirstVec, theLastVec)
2442             RaiseIfFailed("MakeInterpolWithTangents", self.CurvesOp)
2443             self._autoPublish(anObj, theName, "bspline")
2444             return anObj
2445
2446         ## Creates a curve using the parametric definition of the basic points.
2447         #  @param thexExpr parametric equation of the coordinates X.
2448         #  @param theyExpr parametric equation of the coordinates Y.
2449         #  @param thezExpr parametric equation of the coordinates Z.
2450         #  @param theParamMin the minimal value of the parameter.
2451         #  @param theParamMax the maximum value of the parameter.
2452         #  @param theParamStep the number of steps if theNewMethod = True, else step value of the parameter.
2453         #  @param theCurveType the type of the curve,
2454         #         one of GEOM.Polyline, GEOM.Bezier, GEOM.Interpolation.
2455         #  @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.
2456         #  @param theName Object name; when specified, this parameter is used
2457         #         for result publication in the study. Otherwise, if automatic
2458         #         publication is switched on, default value is used for result name.
2459         #
2460         #  @return New GEOM.GEOM_Object, containing the created curve.
2461         #
2462         #  @ref tui_creation_curve "Example"
2463         @ManageTransactions("CurvesOp")
2464         def MakeCurveParametric(self, thexExpr, theyExpr, thezExpr,
2465                                 theParamMin, theParamMax, theParamStep, theCurveType, theNewMethod=False, theName=None ):
2466             """
2467             Creates a curve using the parametric definition of the basic points.
2468
2469             Parameters:
2470                 thexExpr parametric equation of the coordinates X.
2471                 theyExpr parametric equation of the coordinates Y.
2472                 thezExpr parametric equation of the coordinates Z.
2473                 theParamMin the minimal value of the parameter.
2474                 theParamMax the maximum value of the parameter.
2475                 theParamStep the number of steps if theNewMethod = True, else step value of the parameter.
2476                 theCurveType the type of the curve,
2477                              one of GEOM.Polyline, GEOM.Bezier, GEOM.Interpolation.
2478                 theNewMethod flag for switching to the new method if the flag is set to false a deprecated
2479                              method is used which can lead to a bug.
2480                 theName Object name; when specified, this parameter is used
2481                         for result publication in the study. Otherwise, if automatic
2482                         publication is switched on, default value is used for result name.
2483
2484             Returns:
2485                 New GEOM.GEOM_Object, containing the created curve.
2486             """
2487             theParamMin,theParamMax,theParamStep,Parameters = ParseParameters(theParamMin,theParamMax,theParamStep)
2488             if theNewMethod:
2489               anObj = self.CurvesOp.MakeCurveParametricNew(thexExpr,theyExpr,thezExpr,theParamMin,theParamMax,theParamStep,theCurveType)
2490             else:
2491               anObj = self.CurvesOp.MakeCurveParametric(thexExpr,theyExpr,thezExpr,theParamMin,theParamMax,theParamStep,theCurveType)
2492             RaiseIfFailed("MakeCurveParametric", self.CurvesOp)
2493             anObj.SetParameters(Parameters)
2494             self._autoPublish(anObj, theName, "curve")
2495             return anObj
2496
2497         ## Create an isoline curve on a face.
2498         #  @param theFace the face for which an isoline is created.
2499         #  @param IsUIsoline True for U-isoline creation; False for V-isoline
2500         #         creation.
2501         #  @param theParameter the U parameter for U-isoline or V parameter
2502         #         for V-isoline.
2503         #  @param theName Object name; when specified, this parameter is used
2504         #         for result publication in the study. Otherwise, if automatic
2505         #         publication is switched on, default value is used for result name.
2506         #
2507         #  @return New GEOM.GEOM_Object, containing the created isoline edge or
2508         #          a compound of edges.
2509         #
2510         #  @ref tui_creation_curve "Example"
2511         @ManageTransactions("CurvesOp")
2512         def MakeIsoline(self, theFace, IsUIsoline, theParameter, theName=None):
2513             """
2514             Create an isoline curve on a face.
2515
2516             Parameters:
2517                 theFace the face for which an isoline is created.
2518                 IsUIsoline True for U-isoline creation; False for V-isoline
2519                            creation.
2520                 theParameter the U parameter for U-isoline or V parameter
2521                              for V-isoline.
2522                 theName Object name; when specified, this parameter is used
2523                         for result publication in the study. Otherwise, if automatic
2524                         publication is switched on, default value is used for result name.
2525
2526             Returns:
2527                 New GEOM.GEOM_Object, containing the created isoline edge or a
2528                 compound of edges.
2529             """
2530             # Example: see GEOM_TestAll.py
2531             anObj = self.CurvesOp.MakeIsoline(theFace, IsUIsoline, theParameter)
2532             RaiseIfFailed("MakeIsoline", self.CurvesOp)
2533             if IsUIsoline:
2534                 self._autoPublish(anObj, theName, "U-Isoline")
2535             else:
2536                 self._autoPublish(anObj, theName, "V-Isoline")
2537             return anObj
2538
2539         # end of l4_curves
2540         ## @}
2541
2542         ## @addtogroup l3_sketcher
2543         ## @{
2544
2545         ## Create a sketcher (wire or face), following the textual description,
2546         #  passed through <VAR>theCommand</VAR> argument. \n
2547         #  Edges of the resulting wire or face will be arcs of circles and/or linear segments. \n
2548         #  Format of the description string have to be the following:
2549         #
2550         #  "Sketcher[:F x1 y1]:CMD[:CMD[:CMD...]]"
2551         #
2552         #  Where:
2553         #  - x1, y1 are coordinates of the first sketcher point (zero by default),
2554         #  - CMD is one of
2555         #     - "R angle" : Set the direction by angle
2556         #     - "D dx dy" : Set the direction by DX & DY
2557         #     .
2558         #       \n
2559         #     - "TT x y" : Create segment by point at X & Y
2560         #     - "T dx dy" : Create segment by point with DX & DY
2561         #     - "L length" : Create segment by direction & Length
2562         #     - "IX x" : Create segment by direction & Intersect. X
2563         #     - "IY y" : Create segment by direction & Intersect. Y
2564         #     .
2565         #       \n
2566         #     - "C radius length" : Create arc by direction, radius and length(in degree)
2567         #     - "AA x y": Create arc by point at X & Y
2568         #     - "A dx dy" : Create arc by point with DX & DY
2569         #     - "UU x y radius flag1": Create arc by point at X & Y with given radiUs
2570         #     - "U dx dy radius flag1" : Create arc by point with DX & DY with given radiUs
2571         #     - "EE x y xc yc flag1 flag2": Create arc by point at X & Y with given cEnter coordinates
2572         #     - "E dx dy dxc dyc radius flag1 flag2" : Create arc by point with DX & DY with given cEnter coordinates
2573         #     .
2574         #       \n
2575         #     - "WW" : Close Wire (to finish)
2576         #     - "WF" : Close Wire and build face (to finish)
2577         #     .
2578         #        \n
2579         #  - Flag1 (= reverse) is 0 or 2 ...
2580         #     - if 0 the drawn arc is the one of lower angle (< Pi)
2581         #     - if 2 the drawn arc ius the one of greater angle (> Pi)
2582         #     .
2583         #        \n
2584         #  - Flag2 (= control tolerance) is 0 or 1 ...
2585         #     - if 0 the specified end point can be at a distance of the arc greater than the tolerance (10^-7)
2586         #     - if 1 the wire is built only if the end point is on the arc
2587         #       with a tolerance of 10^-7 on the distance else the creation fails
2588         #
2589         #  @param theCommand String, defining the sketcher in local
2590         #                    coordinates of the working plane.
2591         #  @param theWorkingPlane Nine double values, defining origin,
2592         #                         OZ and OX directions of the working plane.
2593         #  @param theName Object name; when specified, this parameter is used
2594         #         for result publication in the study. Otherwise, if automatic
2595         #         publication is switched on, default value is used for result name.
2596         #
2597         #  @return New GEOM.GEOM_Object, containing the created wire.
2598         #
2599         #  @ref tui_sketcher_page "Example"
2600         @ManageTransactions("CurvesOp")
2601         def MakeSketcher(self, theCommand, theWorkingPlane = [0,0,0, 0,0,1, 1,0,0], theName=None):
2602             """
2603             Create a sketcher (wire or face), following the textual description, passed
2604             through theCommand argument.
2605             Edges of the resulting wire or face will be arcs of circles and/or linear segments.
2606             Format of the description string have to be the following:
2607                 "Sketcher[:F x1 y1]:CMD[:CMD[:CMD...]]"
2608             Where:
2609             - x1, y1 are coordinates of the first sketcher point (zero by default),
2610             - CMD is one of
2611                - "R angle" : Set the direction by angle
2612                - "D dx dy" : Set the direction by DX & DY
2613
2614                - "TT x y" : Create segment by point at X & Y
2615                - "T dx dy" : Create segment by point with DX & DY
2616                - "L length" : Create segment by direction & Length
2617                - "IX x" : Create segment by direction & Intersect. X
2618                - "IY y" : Create segment by direction & Intersect. Y
2619
2620                - "C radius length" : Create arc by direction, radius and length(in degree)
2621                - "AA x y": Create arc by point at X & Y
2622                - "A dx dy" : Create arc by point with DX & DY
2623                - "UU x y radius flag1": Create arc by point at X & Y with given radiUs
2624                - "U dx dy radius flag1" : Create arc by point with DX & DY with given radiUs
2625                - "EE x y xc yc flag1 flag2": Create arc by point at X & Y with given cEnter coordinates
2626                - "E dx dy dxc dyc radius flag1 flag2" : Create arc by point with DX & DY with given cEnter coordinates
2627
2628                - "WW" : Close Wire (to finish)
2629                - "WF" : Close Wire and build face (to finish)
2630
2631             - Flag1 (= reverse) is 0 or 2 ...
2632                - if 0 the drawn arc is the one of lower angle (< Pi)
2633                - if 2 the drawn arc ius the one of greater angle (> Pi)
2634
2635             - Flag2 (= control tolerance) is 0 or 1 ...
2636                - if 0 the specified end point can be at a distance of the arc greater than the tolerance (10^-7)
2637                - if 1 the wire is built only if the end point is on the arc
2638                  with a tolerance of 10^-7 on the distance else the creation fails
2639
2640             Parameters:
2641                 theCommand String, defining the sketcher in local
2642                            coordinates of the working plane.
2643                 theWorkingPlane Nine double values, defining origin,
2644                                 OZ and OX directions of the working plane.
2645                 theName Object name; when specified, this parameter is used
2646                         for result publication in the study. Otherwise, if automatic
2647                         publication is switched on, default value is used for result name.
2648
2649             Returns:
2650                 New GEOM.GEOM_Object, containing the created wire.
2651             """
2652             # Example: see GEOM_TestAll.py
2653             theCommand,Parameters = ParseSketcherCommand(theCommand)
2654             anObj = self.CurvesOp.MakeSketcher(theCommand, theWorkingPlane)
2655             RaiseIfFailed("MakeSketcher", self.CurvesOp)
2656             anObj.SetParameters(Parameters)
2657             self._autoPublish(anObj, theName, "wire")
2658             return anObj
2659
2660         ## Create a sketcher (wire or face), following the textual description,
2661         #  passed through <VAR>theCommand</VAR> argument. \n
2662         #  For format of the description string see MakeSketcher() method.\n
2663         #  @param theCommand String, defining the sketcher in local
2664         #                    coordinates of the working plane.
2665         #  @param theWorkingPlane Planar Face or LCS(Marker) of the working plane.
2666         #  @param theName Object name; when specified, this parameter is used
2667         #         for result publication in the study. Otherwise, if automatic
2668         #         publication is switched on, default value is used for result name.
2669         #
2670         #  @return New GEOM.GEOM_Object, containing the created wire.
2671         #
2672         #  @ref tui_sketcher_page "Example"
2673         @ManageTransactions("CurvesOp")
2674         def MakeSketcherOnPlane(self, theCommand, theWorkingPlane, theName=None):
2675             """
2676             Create a sketcher (wire or face), following the textual description,
2677             passed through theCommand argument.
2678             For format of the description string see geompy.MakeSketcher() method.
2679
2680             Parameters:
2681                 theCommand String, defining the sketcher in local
2682                            coordinates of the working plane.
2683                 theWorkingPlane Planar Face or LCS(Marker) of the working plane.
2684                 theName Object name; when specified, this parameter is used
2685                         for result publication in the study. Otherwise, if automatic
2686                         publication is switched on, default value is used for result name.
2687
2688             Returns:
2689                 New GEOM.GEOM_Object, containing the created wire.
2690             """
2691             theCommand,Parameters = ParseSketcherCommand(theCommand)
2692             anObj = self.CurvesOp.MakeSketcherOnPlane(theCommand, theWorkingPlane)
2693             RaiseIfFailed("MakeSketcherOnPlane", self.CurvesOp)
2694             anObj.SetParameters(Parameters)
2695             self._autoPublish(anObj, theName, "wire")
2696             return anObj
2697
2698         ## Obtain a 2D sketcher interface
2699         #  @return An instance of @ref gsketcher.Sketcher2D "Sketcher2D" interface
2700         def Sketcher2D (self):
2701             """
2702             Obtain a 2D sketcher interface.
2703
2704             Example of usage:
2705                sk = geompy.Sketcher2D()
2706                sk.addPoint(20, 20)
2707                sk.addSegmentRelative(15, 70)
2708                sk.addSegmentPerpY(50)
2709                sk.addArcRadiusRelative(25, 15, 14.5, 0)
2710                sk.addArcCenterAbsolute(1, 1, 50, 50, 0, 0)
2711                sk.addArcDirectionRadiusLength(20, 20, 101, 162.13)
2712                sk.close()
2713                Sketch_1 = sk.wire(geomObj_1)
2714             """
2715             sk = Sketcher2D (self)
2716             return sk
2717
2718         ## Create a sketcher wire, following the numerical description,
2719         #  passed through <VAR>theCoordinates</VAR> argument. \n
2720         #  @param theCoordinates double values, defining points to create a wire,
2721         #                                                      passing from it.
2722         #  @param theName Object name; when specified, this parameter is used
2723         #         for result publication in the study. Otherwise, if automatic
2724         #         publication is switched on, default value is used for result name.
2725         #
2726         #  @return New GEOM.GEOM_Object, containing the created wire.
2727         #
2728         #  @ref tui_3dsketcher_page "Example"
2729         @ManageTransactions("CurvesOp")
2730         def Make3DSketcher(self, theCoordinates, theName=None):
2731             """
2732             Create a sketcher wire, following the numerical description,
2733             passed through theCoordinates argument.
2734
2735             Parameters:
2736                 theCoordinates double values, defining points to create a wire,
2737                                passing from it.
2738                 theName Object name; when specified, this parameter is used
2739                         for result publication in the study. Otherwise, if automatic
2740                         publication is switched on, default value is used for result name.
2741
2742             Returns:
2743                 New GEOM_Object, containing the created wire.
2744             """
2745             theCoordinates,Parameters = ParseParameters(theCoordinates)
2746             anObj = self.CurvesOp.Make3DSketcher(theCoordinates)
2747             RaiseIfFailed("Make3DSketcher", self.CurvesOp)
2748             anObj.SetParameters(Parameters)
2749             self._autoPublish(anObj, theName, "wire")
2750             return anObj
2751
2752         ## Obtain a 3D sketcher interface
2753         #  @return An instance of @ref gsketcher.Sketcher3D "Sketcher3D" interface
2754         #
2755         #  @ref tui_3dsketcher_page "Example"
2756         def Sketcher3D (self):
2757             """
2758             Obtain a 3D sketcher interface.
2759
2760             Example of usage:
2761                 sk = geompy.Sketcher3D()
2762                 sk.addPointsAbsolute(0,0,0, 70,0,0)
2763                 sk.addPointsRelative(0, 0, 130)
2764                 sk.addPointAnglesLength("OXY", 50, 0, 100)
2765                 sk.addPointAnglesLength("OXZ", 30, 80, 130)
2766                 sk.close()
2767                 a3D_Sketcher_1 = sk.wire()
2768             """
2769             sk = Sketcher3D (self)
2770             return sk
2771
2772         ## Obtain a 2D polyline creation interface
2773         #  @return An instance of @ref gsketcher.Polyline2D "Polyline2D" interface
2774         #
2775         #  @ref tui_3dsketcher_page "Example"
2776         def Polyline2D (self):
2777             """
2778             Obtain a 2D polyline creation interface.
2779
2780             Example of usage:
2781                 pl = geompy.Polyline2D()
2782                 pl.addSection("section 1", GEOM.Polyline, True)
2783                 pl.addPoints(0, 0, 10, 0, 10, 10)
2784                 pl.addSection("section 2", GEOM.Interpolation, False)
2785                 pl.addPoints(20, 0, 30, 0, 30, 10)
2786                 resultObj = pl.result(WorkingPlane)
2787             """
2788             pl = Polyline2D (self)
2789             return pl
2790
2791         # end of l3_sketcher
2792         ## @}
2793
2794         ## @addtogroup l3_3d_primitives
2795         ## @{
2796
2797         ## Create a box by coordinates of two opposite vertices.
2798         #
2799         #  @param x1,y1,z1 double values, defining first point it.
2800         #  @param x2,y2,z2 double values, defining first point it.
2801         #  @param theName Object name; when specified, this parameter is used
2802         #         for result publication in the study. Otherwise, if automatic
2803         #         publication is switched on, default value is used for result name.
2804         #
2805         #  @return New GEOM.GEOM_Object, containing the created box.
2806         #
2807         #  @ref tui_creation_box "Example"
2808         def MakeBox(self, x1, y1, z1, x2, y2, z2, theName=None):
2809             """
2810             Create a box by coordinates of two opposite vertices.
2811
2812             Parameters:
2813                 x1,y1,z1 double values, defining first point.
2814                 x2,y2,z2 double values, defining second point.
2815                 theName Object name; when specified, this parameter is used
2816                         for result publication in the study. Otherwise, if automatic
2817                         publication is switched on, default value is used for result name.
2818
2819             Returns:
2820                 New GEOM.GEOM_Object, containing the created box.
2821             """
2822             # Example: see GEOM_TestAll.py
2823             pnt1 = self.MakeVertex(x1,y1,z1)
2824             pnt2 = self.MakeVertex(x2,y2,z2)
2825             # note: auto-publishing is done in self.MakeBoxTwoPnt()
2826             return self.MakeBoxTwoPnt(pnt1, pnt2, theName)
2827
2828         ## Create a box with specified dimensions along the coordinate axes
2829         #  and with edges, parallel to the coordinate axes.
2830         #  Center of the box will be at point (DX/2, DY/2, DZ/2).
2831         #  @param theDX Length of Box edges, parallel to OX axis.
2832         #  @param theDY Length of Box edges, parallel to OY axis.
2833         #  @param theDZ Length of Box edges, parallel to OZ axis.
2834         #  @param theName Object name; when specified, this parameter is used
2835         #         for result publication in the study. Otherwise, if automatic
2836         #         publication is switched on, default value is used for result name.
2837         #
2838         #  @return New GEOM.GEOM_Object, containing the created box.
2839         #
2840         #  @ref tui_creation_box "Example"
2841         @ManageTransactions("PrimOp")
2842         def MakeBoxDXDYDZ(self, theDX, theDY, theDZ, theName=None):
2843             """
2844             Create a box with specified dimensions along the coordinate axes
2845             and with edges, parallel to the coordinate axes.
2846             Center of the box will be at point (DX/2, DY/2, DZ/2).
2847
2848             Parameters:
2849                 theDX Length of Box edges, parallel to OX axis.
2850                 theDY Length of Box edges, parallel to OY axis.
2851                 theDZ Length of Box edges, parallel to OZ axis.
2852                 theName Object name; when specified, this parameter is used
2853                         for result publication in the study. Otherwise, if automatic
2854                         publication is switched on, default value is used for result name.
2855
2856             Returns:
2857                 New GEOM.GEOM_Object, containing the created box.
2858             """
2859             # Example: see GEOM_TestAll.py
2860             theDX,theDY,theDZ,Parameters = ParseParameters(theDX, theDY, theDZ)
2861             anObj = self.PrimOp.MakeBoxDXDYDZ(theDX, theDY, theDZ)
2862             RaiseIfFailed("MakeBoxDXDYDZ", self.PrimOp)
2863             anObj.SetParameters(Parameters)
2864             self._autoPublish(anObj, theName, "box")
2865             return anObj
2866
2867         ## Create a box with two specified opposite vertices,
2868         #  and with edges, parallel to the coordinate axes
2869         #  @param thePnt1 First of two opposite vertices.
2870         #  @param thePnt2 Second of two opposite vertices.
2871         #  @param theName Object name; when specified, this parameter is used
2872         #         for result publication in the study. Otherwise, if automatic
2873         #         publication is switched on, default value is used for result name.
2874         #
2875         #  @return New GEOM.GEOM_Object, containing the created box.
2876         #
2877         #  @ref tui_creation_box "Example"
2878         @ManageTransactions("PrimOp")
2879         def MakeBoxTwoPnt(self, thePnt1, thePnt2, theName=None):
2880             """
2881             Create a box with two specified opposite vertices,
2882             and with edges, parallel to the coordinate axes
2883
2884             Parameters:
2885                 thePnt1 First of two opposite vertices.
2886                 thePnt2 Second of two opposite vertices.
2887                 theName Object name; when specified, this parameter is used
2888                         for result publication in the study. Otherwise, if automatic
2889                         publication is switched on, default value is used for result name.
2890
2891             Returns:
2892                 New GEOM.GEOM_Object, containing the created box.
2893             """
2894             # Example: see GEOM_TestAll.py
2895             anObj = self.PrimOp.MakeBoxTwoPnt(thePnt1, thePnt2)
2896             RaiseIfFailed("MakeBoxTwoPnt", self.PrimOp)
2897             self._autoPublish(anObj, theName, "box")
2898             return anObj
2899
2900         ## Create a face with specified dimensions with edges parallel to coordinate axes.
2901         #  @param theH height of Face.
2902         #  @param theW width of Face.
2903         #  @param theOrientation face orientation: 1-OXY, 2-OYZ, 3-OZX
2904         #  @param theName Object name; when specified, this parameter is used
2905         #         for result publication in the study. Otherwise, if automatic
2906         #         publication is switched on, default value is used for result name.
2907         #
2908         #  @return New GEOM.GEOM_Object, containing the created face.
2909         #
2910         #  @ref tui_creation_face "Example"
2911         @ManageTransactions("PrimOp")
2912         def MakeFaceHW(self, theH, theW, theOrientation, theName=None):
2913             """
2914             Create a face with specified dimensions with edges parallel to coordinate axes.
2915
2916             Parameters:
2917                 theH height of Face.
2918                 theW width of Face.
2919                 theOrientation face orientation: 1-OXY, 2-OYZ, 3-OZX
2920                 theName Object name; when specified, this parameter is used
2921                         for result publication in the study. Otherwise, if automatic
2922                         publication is switched on, default value is used for result name.
2923
2924             Returns:
2925                 New GEOM.GEOM_Object, containing the created face.
2926             """
2927             # Example: see GEOM_TestAll.py
2928             theH,theW,Parameters = ParseParameters(theH, theW)
2929             anObj = self.PrimOp.MakeFaceHW(theH, theW, theOrientation)
2930             RaiseIfFailed("MakeFaceHW", self.PrimOp)
2931             anObj.SetParameters(Parameters)
2932             self._autoPublish(anObj, theName, "rectangle")
2933             return anObj
2934
2935         ## Create a face from another plane and two sizes,
2936         #  vertical size and horisontal size.
2937         #  @param theObj   Normale vector to the creating face or
2938         #  the face object.
2939         #  @param theH     Height (vertical size).
2940         #  @param theW     Width (horisontal size).
2941         #  @param theName Object name; when specified, this parameter is used
2942         #         for result publication in the study. Otherwise, if automatic
2943         #         publication is switched on, default value is used for result name.
2944         #
2945         #  @return New GEOM.GEOM_Object, containing the created face.
2946         #
2947         #  @ref tui_creation_face "Example"
2948         @ManageTransactions("PrimOp")
2949         def MakeFaceObjHW(self, theObj, theH, theW, theName=None):
2950             """
2951             Create a face from another plane and two sizes,
2952             vertical size and horisontal size.
2953
2954             Parameters:
2955                 theObj   Normale vector to the creating face or
2956                          the face object.
2957                 theH     Height (vertical size).
2958                 theW     Width (horisontal size).
2959                 theName Object name; when specified, this parameter is used
2960                         for result publication in the study. Otherwise, if automatic
2961                         publication is switched on, default value is used for result name.
2962
2963             Returns:
2964                 New GEOM_Object, containing the created face.
2965             """
2966             # Example: see GEOM_TestAll.py
2967             theH,theW,Parameters = ParseParameters(theH, theW)
2968             anObj = self.PrimOp.MakeFaceObjHW(theObj, theH, theW)
2969             RaiseIfFailed("MakeFaceObjHW", self.PrimOp)
2970             anObj.SetParameters(Parameters)
2971             self._autoPublish(anObj, theName, "rectangle")
2972             return anObj
2973
2974         ## Create a disk with given center, normal vector and radius.
2975         #  @param thePnt Disk center.
2976         #  @param theVec Vector, normal to the plane of the disk.
2977         #  @param theR Disk radius.
2978         #  @param theName Object name; when specified, this parameter is used
2979         #         for result publication in the study. Otherwise, if automatic
2980         #         publication is switched on, default value is used for result name.
2981         #
2982         #  @return New GEOM.GEOM_Object, containing the created disk.
2983         #
2984         #  @ref tui_creation_disk "Example"
2985         @ManageTransactions("PrimOp")
2986         def MakeDiskPntVecR(self, thePnt, theVec, theR, theName=None):
2987             """
2988             Create a disk with given center, normal vector and radius.
2989
2990             Parameters:
2991                 thePnt Disk center.
2992                 theVec Vector, normal to the plane of the disk.
2993                 theR Disk radius.
2994                 theName Object name; when specified, this parameter is used
2995                         for result publication in the study. Otherwise, if automatic
2996                         publication is switched on, default value is used for result name.
2997
2998             Returns:
2999                 New GEOM.GEOM_Object, containing the created disk.
3000             """
3001             # Example: see GEOM_TestAll.py
3002             theR,Parameters = ParseParameters(theR)
3003             anObj = self.PrimOp.MakeDiskPntVecR(thePnt, theVec, theR)
3004             RaiseIfFailed("MakeDiskPntVecR", self.PrimOp)
3005             anObj.SetParameters(Parameters)
3006             self._autoPublish(anObj, theName, "disk")
3007             return anObj
3008
3009         ## Create a disk, passing through three given points
3010         #  @param thePnt1,thePnt2,thePnt3 Points, defining the disk.
3011         #  @param theName Object name; when specified, this parameter is used
3012         #         for result publication in the study. Otherwise, if automatic
3013         #         publication is switched on, default value is used for result name.
3014         #
3015         #  @return New GEOM.GEOM_Object, containing the created disk.
3016         #
3017         #  @ref tui_creation_disk "Example"
3018         @ManageTransactions("PrimOp")
3019         def MakeDiskThreePnt(self, thePnt1, thePnt2, thePnt3, theName=None):
3020             """
3021             Create a disk, passing through three given points
3022
3023             Parameters:
3024                 thePnt1,thePnt2,thePnt3 Points, defining the disk.
3025                 theName Object name; when specified, this parameter is used
3026                         for result publication in the study. Otherwise, if automatic
3027                         publication is switched on, default value is used for result name.
3028
3029             Returns:
3030                 New GEOM.GEOM_Object, containing the created disk.
3031             """
3032             # Example: see GEOM_TestAll.py
3033             anObj = self.PrimOp.MakeDiskThreePnt(thePnt1, thePnt2, thePnt3)
3034             RaiseIfFailed("MakeDiskThreePnt", self.PrimOp)
3035             self._autoPublish(anObj, theName, "disk")
3036             return anObj
3037
3038         ## Create a disk with specified dimensions along OX-OY coordinate axes.
3039         #  @param theR Radius of Face.
3040         #  @param theOrientation set the orientation belong axis OXY or OYZ or OZX
3041         #  @param theName Object name; when specified, this parameter is used
3042         #         for result publication in the study. Otherwise, if automatic
3043         #         publication is switched on, default value is used for result name.
3044         #
3045         #  @return New GEOM.GEOM_Object, containing the created disk.
3046         #
3047         #  @ref tui_creation_face "Example"
3048         @ManageTransactions("PrimOp")
3049         def MakeDiskR(self, theR, theOrientation, theName=None):
3050             """
3051             Create a disk with specified dimensions along OX-OY coordinate axes.
3052
3053             Parameters:
3054                 theR Radius of Face.
3055                 theOrientation set the orientation belong axis OXY or OYZ or OZX
3056                 theName Object name; when specified, this parameter is used
3057                         for result publication in the study. Otherwise, if automatic
3058                         publication is switched on, default value is used for result name.
3059
3060             Returns:
3061                 New GEOM.GEOM_Object, containing the created disk.
3062
3063             Example of usage:
3064                 Disk3 = geompy.MakeDiskR(100., 1)
3065             """
3066             # Example: see GEOM_TestAll.py
3067             theR,Parameters = ParseParameters(theR)
3068             anObj = self.PrimOp.MakeDiskR(theR, theOrientation)
3069             RaiseIfFailed("MakeDiskR", self.PrimOp)
3070             anObj.SetParameters(Parameters)
3071             self._autoPublish(anObj, theName, "disk")
3072             return anObj
3073
3074         ## Create a cylinder with given base point, axis, radius and height.
3075         #  @param thePnt Central point of cylinder base.
3076         #  @param theAxis Cylinder axis.
3077         #  @param theR Cylinder radius.
3078         #  @param theH Cylinder height.
3079         #  @param theName Object name; when specified, this parameter is used
3080         #         for result publication in the study. Otherwise, if automatic
3081         #         publication is switched on, default value is used for result name.
3082         #
3083         #  @return New GEOM.GEOM_Object, containing the created cylinder.
3084         #
3085         #  @ref tui_creation_cylinder "Example"
3086         @ManageTransactions("PrimOp")
3087         def MakeCylinder(self, thePnt, theAxis, theR, theH, theName=None):
3088             """
3089             Create a cylinder with given base point, axis, radius and height.
3090
3091             Parameters:
3092                 thePnt Central point of cylinder base.
3093                 theAxis Cylinder axis.
3094                 theR Cylinder radius.
3095                 theH Cylinder height.
3096                 theName Object name; when specified, this parameter is used
3097                         for result publication in the study. Otherwise, if automatic
3098                         publication is switched on, default value is used for result name.
3099
3100             Returns:
3101                 New GEOM.GEOM_Object, containing the created cylinder.
3102             """
3103             # Example: see GEOM_TestAll.py
3104             theR,theH,Parameters = ParseParameters(theR, theH)
3105             anObj = self.PrimOp.MakeCylinderPntVecRH(thePnt, theAxis, theR, theH)
3106             RaiseIfFailed("MakeCylinderPntVecRH", self.PrimOp)
3107             anObj.SetParameters(Parameters)
3108             self._autoPublish(anObj, theName, "cylinder")
3109             return anObj
3110             
3111         ## Create a portion of cylinder with given base point, axis, radius, height and angle.
3112         #  @param thePnt Central point of cylinder base.
3113         #  @param theAxis Cylinder axis.
3114         #  @param theR Cylinder radius.
3115         #  @param theH Cylinder height.
3116         #  @param theA Cylinder angle in radians.
3117         #  @param theName Object name; when specified, this parameter is used
3118         #         for result publication in the study. Otherwise, if automatic
3119         #         publication is switched on, default value is used for result name.
3120         #
3121         #  @return New GEOM.GEOM_Object, containing the created cylinder.
3122         #
3123         #  @ref tui_creation_cylinder "Example"
3124         @ManageTransactions("PrimOp")
3125         def MakeCylinderA(self, thePnt, theAxis, theR, theH, theA, theName=None):
3126             """
3127             Create a portion of cylinder with given base point, axis, radius, height and angle.
3128
3129             Parameters:
3130                 thePnt Central point of cylinder base.
3131                 theAxis Cylinder axis.
3132                 theR Cylinder radius.
3133                 theH Cylinder height.
3134                 theA Cylinder angle in radians.
3135                 theName Object name; when specified, this parameter is used
3136                         for result publication in the study. Otherwise, if automatic
3137                         publication is switched on, default value is used for result name.
3138
3139             Returns:
3140                 New GEOM.GEOM_Object, containing the created cylinder.
3141             """
3142             # Example: see GEOM_TestAll.py
3143             flag = False
3144             if isinstance(theA,str):
3145                 flag = True
3146             theR,theH,theA,Parameters = ParseParameters(theR, theH, theA)
3147             if flag:
3148                 theA = theA*math.pi/180.
3149             if theA<=0. or theA>=2*math.pi:
3150                 raise ValueError("The angle parameter should be strictly between 0 and 2*pi.")
3151             anObj = self.PrimOp.MakeCylinderPntVecRHA(thePnt, theAxis, theR, theH, theA)
3152             RaiseIfFailed("MakeCylinderPntVecRHA", self.PrimOp)
3153             anObj.SetParameters(Parameters)
3154             self._autoPublish(anObj, theName, "cylinder")
3155             return anObj
3156
3157         ## Create a cylinder with given radius and height at
3158         #  the origin of coordinate system. Axis of the cylinder
3159         #  will be collinear to the OZ axis of the coordinate system.
3160         #  @param theR Cylinder radius.
3161         #  @param theH Cylinder height.
3162         #  @param theName Object name; when specified, this parameter is used
3163         #         for result publication in the study. Otherwise, if automatic
3164         #         publication is switched on, default value is used for result name.
3165         #
3166         #  @return New GEOM.GEOM_Object, containing the created cylinder.
3167         #
3168         #  @ref tui_creation_cylinder "Example"
3169         @ManageTransactions("PrimOp")
3170         def MakeCylinderRH(self, theR, theH, theName=None):
3171             """
3172             Create a cylinder with given radius and height at
3173             the origin of coordinate system. Axis of the cylinder
3174             will be collinear to the OZ axis of the coordinate system.
3175
3176             Parameters:
3177                 theR Cylinder radius.
3178                 theH Cylinder height.
3179                 theName Object name; when specified, this parameter is used
3180                         for result publication in the study. Otherwise, if automatic
3181                         publication is switched on, default value is used for result name.
3182
3183             Returns:
3184                 New GEOM.GEOM_Object, containing the created cylinder.
3185             """
3186             # Example: see GEOM_TestAll.py
3187             theR,theH,Parameters = ParseParameters(theR, theH)
3188             anObj = self.PrimOp.MakeCylinderRH(theR, theH)
3189             RaiseIfFailed("MakeCylinderRH", self.PrimOp)
3190             anObj.SetParameters(Parameters)
3191             self._autoPublish(anObj, theName, "cylinder")
3192             return anObj
3193             
3194         ## Create a portion of cylinder with given radius, height and angle at
3195         #  the origin of coordinate system. Axis of the cylinder
3196         #  will be collinear to the OZ axis of the coordinate system.
3197         #  @param theR Cylinder radius.
3198         #  @param theH Cylinder height.
3199         #  @param theA Cylinder angle in radians.
3200         #  @param theName Object name; when specified, this parameter is used
3201         #         for result publication in the study. Otherwise, if automatic
3202         #         publication is switched on, default value is used for result name.
3203         #
3204         #  @return New GEOM.GEOM_Object, containing the created cylinder.
3205         #
3206         #  @ref tui_creation_cylinder "Example"
3207         @ManageTransactions("PrimOp")
3208         def MakeCylinderRHA(self, theR, theH, theA, theName=None):
3209             """
3210             Create a portion of cylinder with given radius, height and angle at
3211             the origin of coordinate system. Axis of the cylinder
3212             will be collinear to the OZ axis of the coordinate system.
3213
3214             Parameters:
3215                 theR Cylinder radius.
3216                 theH Cylinder height.
3217                 theA Cylinder angle in radians.
3218                 theName Object name; when specified, this parameter is used
3219                         for result publication in the study. Otherwise, if automatic
3220                         publication is switched on, default value is used for result name.
3221
3222             Returns:
3223                 New GEOM.GEOM_Object, containing the created cylinder.
3224             """
3225             # Example: see GEOM_TestAll.py
3226             flag = False
3227             if isinstance(theA,str):
3228                 flag = True
3229             theR,theH,theA,Parameters = ParseParameters(theR, theH, theA)
3230             if flag:
3231                 theA = theA*math.pi/180.
3232             if theA<=0. or theA>=2*math.pi:
3233                 raise ValueError("The angle parameter should be strictly between 0 and 2*pi.")
3234             anObj = self.PrimOp.MakeCylinderRHA(theR, theH, theA)
3235             RaiseIfFailed("MakeCylinderRHA", self.PrimOp)
3236             anObj.SetParameters(Parameters)
3237             self._autoPublish(anObj, theName, "cylinder")
3238             return anObj
3239
3240         ## Create a sphere with given center and radius.
3241         #  @param thePnt Sphere center.
3242         #  @param theR Sphere radius.
3243         #  @param theName Object name; when specified, this parameter is used
3244         #         for result publication in the study. Otherwise, if automatic
3245         #         publication is switched on, default value is used for result name.
3246         #
3247         #  @return New GEOM.GEOM_Object, containing the created sphere.
3248         #
3249         #  @ref tui_creation_sphere "Example"
3250         @ManageTransactions("PrimOp")
3251         def MakeSpherePntR(self, thePnt, theR, theName=None):
3252             """
3253             Create a sphere with given center and radius.
3254
3255             Parameters:
3256                 thePnt Sphere center.
3257                 theR Sphere radius.
3258                 theName Object name; when specified, this parameter is used
3259                         for result publication in the study. Otherwise, if automatic
3260                         publication is switched on, default value is used for result name.
3261
3262             Returns:
3263                 New GEOM.GEOM_Object, containing the created sphere.
3264             """
3265             # Example: see GEOM_TestAll.py
3266             theR,Parameters = ParseParameters(theR)
3267             anObj = self.PrimOp.MakeSpherePntR(thePnt, theR)
3268             RaiseIfFailed("MakeSpherePntR", self.PrimOp)
3269             anObj.SetParameters(Parameters)
3270             self._autoPublish(anObj, theName, "sphere")
3271             return anObj
3272
3273         ## Create a sphere with given center and radius.
3274         #  @param x,y,z Coordinates of sphere center.
3275         #  @param theR Sphere radius.
3276         #  @param theName Object name; when specified, this parameter is used
3277         #         for result publication in the study. Otherwise, if automatic
3278         #         publication is switched on, default value is used for result name.
3279         #
3280         #  @return New GEOM.GEOM_Object, containing the created sphere.
3281         #
3282         #  @ref tui_creation_sphere "Example"
3283         def MakeSphere(self, x, y, z, theR, theName=None):
3284             """
3285             Create a sphere with given center and radius.
3286
3287             Parameters:
3288                 x,y,z Coordinates of sphere center.
3289                 theR Sphere radius.
3290                 theName Object name; when specified, this parameter is used
3291                         for result publication in the study. Otherwise, if automatic
3292                         publication is switched on, default value is used for result name.
3293
3294             Returns:
3295                 New GEOM.GEOM_Object, containing the created sphere.
3296             """
3297             # Example: see GEOM_TestAll.py
3298             point = self.MakeVertex(x, y, z)
3299             # note: auto-publishing is done in self.MakeSpherePntR()
3300             anObj = self.MakeSpherePntR(point, theR, theName)
3301             return anObj
3302
3303         ## Create a sphere with given radius at the origin of coordinate system.
3304         #  @param theR Sphere radius.
3305         #  @param theName Object name; when specified, this parameter is used
3306         #         for result publication in the study. Otherwise, if automatic
3307         #         publication is switched on, default value is used for result name.
3308         #
3309         #  @return New GEOM.GEOM_Object, containing the created sphere.
3310         #
3311         #  @ref tui_creation_sphere "Example"
3312         @ManageTransactions("PrimOp")
3313         def MakeSphereR(self, theR, theName=None):
3314             """
3315             Create a sphere with given radius at the origin of coordinate system.
3316
3317             Parameters:
3318                 theR Sphere radius.
3319                 theName Object name; when specified, this parameter is used
3320                         for result publication in the study. Otherwise, if automatic
3321                         publication is switched on, default value is used for result name.
3322
3323             Returns:
3324                 New GEOM.GEOM_Object, containing the created sphere.
3325             """
3326             # Example: see GEOM_TestAll.py
3327             theR,Parameters = ParseParameters(theR)
3328             anObj = self.PrimOp.MakeSphereR(theR)
3329             RaiseIfFailed("MakeSphereR", self.PrimOp)
3330             anObj.SetParameters(Parameters)
3331             self._autoPublish(anObj, theName, "sphere")
3332             return anObj
3333
3334         ## Create a cone with given base point, axis, height and radiuses.
3335         #  @param thePnt Central point of the first cone base.
3336         #  @param theAxis Cone axis.
3337         #  @param theR1 Radius of the first cone base.
3338         #  @param theR2 Radius of the second cone base.
3339         #    \note If both radiuses are non-zero, the cone will be truncated.
3340         #    \note If the radiuses are equal, a cylinder will be created instead.
3341         #  @param theH Cone height.
3342         #  @param theName Object name; when specified, this parameter is used
3343         #         for result publication in the study. Otherwise, if automatic
3344         #         publication is switched on, default value is used for result name.
3345         #
3346         #  @return New GEOM.GEOM_Object, containing the created cone.
3347         #
3348         #  @ref tui_creation_cone "Example"
3349         @ManageTransactions("PrimOp")
3350         def MakeCone(self, thePnt, theAxis, theR1, theR2, theH, theName=None):
3351             """
3352             Create a cone with given base point, axis, height and radiuses.
3353
3354             Parameters:
3355                 thePnt Central point of the first cone base.
3356                 theAxis Cone axis.
3357                 theR1 Radius of the first cone base.
3358                 theR2 Radius of the second cone base.
3359                 theH Cone height.
3360                 theName Object name; when specified, this parameter is used
3361                         for result publication in the study. Otherwise, if automatic
3362                         publication is switched on, default value is used for result name.
3363
3364             Note:
3365                 If both radiuses are non-zero, the cone will be truncated.
3366                 If the radiuses are equal, a cylinder will be created instead.
3367
3368             Returns:
3369                 New GEOM.GEOM_Object, containing the created cone.
3370             """
3371             # Example: see GEOM_TestAll.py
3372             theR1,theR2,theH,Parameters = ParseParameters(theR1,theR2,theH)
3373             anObj = self.PrimOp.MakeConePntVecR1R2H(thePnt, theAxis, theR1, theR2, theH)
3374             RaiseIfFailed("MakeConePntVecR1R2H", self.PrimOp)
3375             anObj.SetParameters(Parameters)
3376             self._autoPublish(anObj, theName, "cone")
3377             return anObj
3378
3379         ## Create a cone with given height and radiuses at
3380         #  the origin of coordinate system. Axis of the cone will
3381         #  be collinear to the OZ axis of the coordinate system.
3382         #  @param theR1 Radius of the first cone base.
3383         #  @param theR2 Radius of the second cone base.
3384         #    \note If both radiuses are non-zero, the cone will be truncated.
3385         #    \note If the radiuses are equal, a cylinder will be created instead.
3386         #  @param theH Cone height.
3387         #  @param theName Object name; when specified, this parameter is used
3388         #         for result publication in the study. Otherwise, if automatic
3389         #         publication is switched on, default value is used for result name.
3390         #
3391         #  @return New GEOM.GEOM_Object, containing the created cone.
3392         #
3393         #  @ref tui_creation_cone "Example"
3394         @ManageTransactions("PrimOp")
3395         def MakeConeR1R2H(self, theR1, theR2, theH, theName=None):
3396             """
3397             Create a cone with given height and radiuses at
3398             the origin of coordinate system. Axis of the cone will
3399             be collinear to the OZ axis of the coordinate system.
3400
3401             Parameters:
3402                 theR1 Radius of the first cone base.
3403                 theR2 Radius of the second cone base.
3404                 theH Cone height.
3405                 theName Object name; when specified, this parameter is used
3406                         for result publication in the study. Otherwise, if automatic
3407                         publication is switched on, default value is used for result name.
3408
3409             Note:
3410                 If both radiuses are non-zero, the cone will be truncated.
3411                 If the radiuses are equal, a cylinder will be created instead.
3412
3413             Returns:
3414                 New GEOM.GEOM_Object, containing the created cone.
3415             """
3416             # Example: see GEOM_TestAll.py
3417             theR1,theR2,theH,Parameters = ParseParameters(theR1,theR2,theH)
3418             anObj = self.PrimOp.MakeConeR1R2H(theR1, theR2, theH)
3419             RaiseIfFailed("MakeConeR1R2H", self.PrimOp)
3420             anObj.SetParameters(Parameters)
3421             self._autoPublish(anObj, theName, "cone")
3422             return anObj
3423
3424         ## Create a torus with given center, normal vector and radiuses.
3425         #  @param thePnt Torus central point.
3426         #  @param theVec Torus axis of symmetry.
3427         #  @param theRMajor Torus major radius.
3428         #  @param theRMinor Torus minor radius.
3429         #  @param theName Object name; when specified, this parameter is used
3430         #         for result publication in the study. Otherwise, if automatic
3431         #         publication is switched on, default value is used for result name.
3432         #
3433         #  @return New GEOM.GEOM_Object, containing the created torus.
3434         #
3435         #  @ref tui_creation_torus "Example"
3436         @ManageTransactions("PrimOp")
3437         def MakeTorus(self, thePnt, theVec, theRMajor, theRMinor, theName=None):
3438             """
3439             Create a torus with given center, normal vector and radiuses.
3440
3441             Parameters:
3442                 thePnt Torus central point.
3443                 theVec Torus axis of symmetry.
3444                 theRMajor Torus major radius.
3445                 theRMinor Torus minor radius.
3446                 theName Object name; when specified, this parameter is used
3447                         for result publication in the study. Otherwise, if automatic
3448                         publication is switched on, default value is used for result name.
3449
3450            Returns:
3451                 New GEOM.GEOM_Object, containing the created torus.
3452             """
3453             # Example: see GEOM_TestAll.py
3454             theRMajor,theRMinor,Parameters = ParseParameters(theRMajor,theRMinor)
3455             anObj = self.PrimOp.MakeTorusPntVecRR(thePnt, theVec, theRMajor, theRMinor)
3456             RaiseIfFailed("MakeTorusPntVecRR", self.PrimOp)
3457             anObj.SetParameters(Parameters)
3458             self._autoPublish(anObj, theName, "torus")
3459             return anObj
3460
3461         ## Create a torus with given radiuses at the origin of coordinate system.
3462         #  @param theRMajor Torus major radius.
3463         #  @param theRMinor Torus minor radius.
3464         #  @param theName Object name; when specified, this parameter is used
3465         #         for result publication in the study. Otherwise, if automatic
3466         #         publication is switched on, default value is used for result name.
3467         #
3468         #  @return New GEOM.GEOM_Object, containing the created torus.
3469         #
3470         #  @ref tui_creation_torus "Example"
3471         @ManageTransactions("PrimOp")
3472         def MakeTorusRR(self, theRMajor, theRMinor, theName=None):
3473             """
3474            Create a torus with given radiuses at the origin of coordinate system.
3475
3476            Parameters:
3477                 theRMajor Torus major radius.
3478                 theRMinor Torus minor radius.
3479                 theName Object name; when specified, this parameter is used
3480                         for result publication in the study. Otherwise, if automatic
3481                         publication is switched on, default value is used for result name.
3482
3483            Returns:
3484                 New GEOM.GEOM_Object, containing the created torus.
3485             """
3486             # Example: see GEOM_TestAll.py
3487             theRMajor,theRMinor,Parameters = ParseParameters(theRMajor,theRMinor)
3488             anObj = self.PrimOp.MakeTorusRR(theRMajor, theRMinor)
3489             RaiseIfFailed("MakeTorusRR", self.PrimOp)
3490             anObj.SetParameters(Parameters)
3491             self._autoPublish(anObj, theName, "torus")
3492             return anObj
3493
3494         # end of l3_3d_primitives
3495         ## @}
3496
3497         ## @addtogroup l3_complex
3498         ## @{
3499
3500         ## Create a shape by extrusion of the base shape along a vector, defined by two points.
3501         #  @param theBase Base shape to be extruded.
3502         #  @param thePoint1 First end of extrusion vector.
3503         #  @param thePoint2 Second end of extrusion vector.
3504         #  @param theScaleFactor Use it to make prism with scaled second base.
3505         #                        Nagative value means not scaled second base.
3506         #  @param theName Object name; when specified, this parameter is used
3507         #         for result publication in the study. Otherwise, if automatic
3508         #         publication is switched on, default value is used for result name.
3509         #
3510         #  @return New GEOM.GEOM_Object, containing the created prism.
3511         #
3512         #  @ref tui_creation_prism "Example"
3513         @ManageTransactions("PrimOp")
3514         def MakePrism(self, theBase, thePoint1, thePoint2, theScaleFactor = -1.0, theName=None):
3515             """
3516             Create a shape by extrusion of the base shape along a vector, defined by two points.
3517
3518             Parameters:
3519                 theBase Base shape to be extruded.
3520                 thePoint1 First end of extrusion vector.
3521                 thePoint2 Second end of extrusion vector.
3522                 theScaleFactor Use it to make prism with scaled second base.
3523                                Nagative value means not scaled second base.
3524                 theName Object name; when specified, this parameter is used
3525                         for result publication in the study. Otherwise, if automatic
3526                         publication is switched on, default value is used for result name.
3527
3528             Returns:
3529                 New GEOM.GEOM_Object, containing the created prism.
3530             """
3531             # Example: see GEOM_TestAll.py
3532             anObj = None
3533             Parameters = ""
3534             if theScaleFactor > 0:
3535                 theScaleFactor,Parameters = ParseParameters(theScaleFactor)
3536                 anObj = self.PrimOp.MakePrismTwoPntWithScaling(theBase, thePoint1, thePoint2, theScaleFactor)
3537             else:
3538                 anObj = self.PrimOp.MakePrismTwoPnt(theBase, thePoint1, thePoint2)
3539             RaiseIfFailed("MakePrismTwoPnt", self.PrimOp)
3540             anObj.SetParameters(Parameters)
3541             self._autoPublish(anObj, theName, "prism")
3542             return anObj
3543
3544         ## Create a shape by extrusion of the base shape along a
3545         #  vector, defined by two points, in 2 Ways (forward/backward).
3546         #  @param theBase Base shape to be extruded.
3547         #  @param thePoint1 First end of extrusion vector.
3548         #  @param thePoint2 Second end of extrusion vector.
3549         #  @param theName Object name; when specified, this parameter is used
3550         #         for result publication in the study. Otherwise, if automatic
3551         #         publication is switched on, default value is used for result name.
3552         #
3553         #  @return New GEOM.GEOM_Object, containing the created prism.
3554         #
3555         #  @ref tui_creation_prism "Example"
3556         @ManageTransactions("PrimOp")
3557         def MakePrism2Ways(self, theBase, thePoint1, thePoint2, theName=None):
3558             """
3559             Create a shape by extrusion of the base shape along a
3560             vector, defined by two points, in 2 Ways (forward/backward).
3561
3562             Parameters:
3563                 theBase Base shape to be extruded.
3564                 thePoint1 First end of extrusion vector.
3565                 thePoint2 Second end of extrusion vector.
3566                 theName Object name; when specified, this parameter is used
3567                         for result publication in the study. Otherwise, if automatic
3568                         publication is switched on, default value is used for result name.
3569
3570             Returns:
3571                 New GEOM.GEOM_Object, containing the created prism.
3572             """
3573             # Example: see GEOM_TestAll.py
3574             anObj = self.PrimOp.MakePrismTwoPnt2Ways(theBase, thePoint1, thePoint2)
3575             RaiseIfFailed("MakePrismTwoPnt", self.PrimOp)
3576             self._autoPublish(anObj, theName, "prism")
3577             return anObj
3578
3579         ## Create a shape by extrusion of the base shape along the vector,
3580         #  i.e. all the space, transfixed by the base shape during its translation
3581         #  along the vector on the given distance.
3582         #  @param theBase Base shape to be extruded.
3583         #  @param theVec Direction of extrusion.
3584         #  @param theH Prism dimension along theVec.
3585         #  @param theScaleFactor Use it to make prism with scaled second base.
3586         #                        Negative value means not scaled second base.
3587         #  @param theName Object name; when specified, this parameter is used
3588         #         for result publication in the study. Otherwise, if automatic
3589         #         publication is switched on, default value is used for result name.
3590         #
3591         #  @return New GEOM.GEOM_Object, containing the created prism.
3592         #
3593         #  @ref tui_creation_prism "Example"
3594         @ManageTransactions("PrimOp")
3595         def MakePrismVecH(self, theBase, theVec, theH, theScaleFactor = -1.0, theName=None):
3596             """
3597             Create a shape by extrusion of the base shape along the vector,
3598             i.e. all the space, transfixed by the base shape during its translation
3599             along the vector on the given distance.
3600
3601             Parameters:
3602                 theBase Base shape to be extruded.
3603                 theVec Direction of extrusion.
3604                 theH Prism dimension along theVec.
3605                 theScaleFactor Use it to make prism with scaled second base.
3606                                Negative value means not scaled second base.
3607                 theName Object name; when specified, this parameter is used
3608                         for result publication in the study. Otherwise, if automatic
3609                         publication is switched on, default value is used for result name.
3610
3611             Returns:
3612                 New GEOM.GEOM_Object, containing the created prism.
3613             """
3614             # Example: see GEOM_TestAll.py
3615             anObj = None
3616             Parameters = ""
3617             if theScaleFactor > 0:
3618                 theH,theScaleFactor,Parameters = ParseParameters(theH,theScaleFactor)
3619                 anObj = self.PrimOp.MakePrismVecHWithScaling(theBase, theVec, theH, theScaleFactor)
3620             else:
3621                 theH,Parameters = ParseParameters(theH)
3622                 anObj = self.PrimOp.MakePrismVecH(theBase, theVec, theH)
3623             RaiseIfFailed("MakePrismVecH", self.PrimOp)
3624             anObj.SetParameters(Parameters)
3625             self._autoPublish(anObj, theName, "prism")
3626             return anObj
3627
3628         ## Create a shape by extrusion of the base shape along the vector,
3629         #  i.e. all the space, transfixed by the base shape during its translation
3630         #  along the vector on the given distance in 2 Ways (forward/backward).
3631         #  @param theBase Base shape to be extruded.
3632         #  @param theVec Direction of extrusion.
3633         #  @param theH Prism dimension along theVec in forward direction.
3634         #  @param theName Object name; when specified, this parameter is used
3635         #         for result publication in the study. Otherwise, if automatic
3636         #         publication is switched on, default value is used for result name.
3637         #
3638         #  @return New GEOM.GEOM_Object, containing the created prism.
3639         #
3640         #  @ref tui_creation_prism "Example"
3641         @ManageTransactions("PrimOp")
3642         def MakePrismVecH2Ways(self, theBase, theVec, theH, theName=None):
3643             """
3644             Create a shape by extrusion of the base shape along the vector,
3645             i.e. all the space, transfixed by the base shape during its translation
3646             along the vector on the given distance in 2 Ways (forward/backward).
3647
3648             Parameters:
3649                 theBase Base shape to be extruded.
3650                 theVec Direction of extrusion.
3651                 theH Prism dimension along theVec in forward direction.
3652                 theName Object name; when specified, this parameter is used
3653                         for result publication in the study. Otherwise, if automatic
3654                         publication is switched on, default value is used for result name.
3655
3656             Returns:
3657                 New GEOM.GEOM_Object, containing the created prism.
3658             """
3659             # Example: see GEOM_TestAll.py
3660             theH,Parameters = ParseParameters(theH)
3661             anObj = self.PrimOp.MakePrismVecH2Ways(theBase, theVec, theH)
3662             RaiseIfFailed("MakePrismVecH2Ways", self.PrimOp)
3663             anObj.SetParameters(Parameters)
3664             self._autoPublish(anObj, theName, "prism")
3665             return anObj
3666
3667         ## Create a shape by extrusion of the base shape along the dx, dy, dz direction
3668         #  @param theBase Base shape to be extruded.
3669         #  @param theDX, theDY, theDZ Directions of extrusion.
3670         #  @param theScaleFactor Use it to make prism with scaled second base.
3671         #                        Nagative value means not scaled second base.
3672         #  @param theName Object name; when specified, this parameter is used
3673         #         for result publication in the study. Otherwise, if automatic
3674         #         publication is switched on, default value is used for result name.
3675         #
3676         #  @return New GEOM.GEOM_Object, containing the created prism.
3677         #
3678         #  @ref tui_creation_prism "Example"
3679         @ManageTransactions("PrimOp")
3680         def MakePrismDXDYDZ(self, theBase, theDX, theDY, theDZ, theScaleFactor = -1.0, theName=None):
3681             """
3682             Create a shape by extrusion of the base shape along the dx, dy, dz direction
3683
3684             Parameters:
3685                 theBase Base shape to be extruded.
3686                 theDX, theDY, theDZ Directions of extrusion.
3687                 theScaleFactor Use it to make prism with scaled second base.
3688                                Nagative value means not scaled second base.
3689                 theName Object name; when specified, this parameter is used
3690                         for result publication in the study. Otherwise, if automatic
3691                         publication is switched on, default value is used for result name.
3692
3693             Returns:
3694                 New GEOM.GEOM_Object, containing the created prism.
3695             """
3696             # Example: see GEOM_TestAll.py
3697             anObj = None
3698             Parameters = ""
3699             if theScaleFactor > 0:
3700                 theDX,theDY,theDZ,theScaleFactor,Parameters = ParseParameters(theDX, theDY, theDZ, theScaleFactor)
3701                 anObj = self.PrimOp.MakePrismDXDYDZWithScaling(theBase, theDX, theDY, theDZ, theScaleFactor)
3702             else:
3703                 theDX,theDY,theDZ,Parameters = ParseParameters(theDX, theDY, theDZ)
3704                 anObj = self.PrimOp.MakePrismDXDYDZ(theBase, theDX, theDY, theDZ)
3705             RaiseIfFailed("MakePrismDXDYDZ", self.PrimOp)
3706             anObj.SetParameters(Parameters)
3707             self._autoPublish(anObj, theName, "prism")
3708             return anObj
3709
3710         ## Create a shape by extrusion of the base shape along the dx, dy, dz direction
3711         #  i.e. all the space, transfixed by the base shape during its translation
3712         #  along the vector on the given distance in 2 Ways (forward/backward).
3713         #  @param theBase Base shape to be extruded.
3714         #  @param theDX, theDY, theDZ Directions of extrusion.
3715         #  @param theName Object name; when specified, this parameter is used
3716         #         for result publication in the study. Otherwise, if automatic
3717         #         publication is switched on, default value is used for result name.
3718         #
3719         #  @return New GEOM.GEOM_Object, containing the created prism.
3720         #
3721         #  @ref tui_creation_prism "Example"
3722         @ManageTransactions("PrimOp")
3723         def MakePrismDXDYDZ2Ways(self, theBase, theDX, theDY, theDZ, theName=None):
3724             """
3725             Create a shape by extrusion of the base shape along the dx, dy, dz direction
3726             i.e. all the space, transfixed by the base shape during its translation
3727             along the vector on the given distance in 2 Ways (forward/backward).
3728
3729             Parameters:
3730                 theBase Base shape to be extruded.
3731                 theDX, theDY, theDZ Directions of extrusion.
3732                 theName Object name; when specified, this parameter is used
3733                         for result publication in the study. Otherwise, if automatic
3734                         publication is switched on, default value is used for result name.
3735
3736             Returns:
3737                 New GEOM.GEOM_Object, containing the created prism.
3738             """
3739             # Example: see GEOM_TestAll.py
3740             theDX,theDY,theDZ,Parameters = ParseParameters(theDX, theDY, theDZ)
3741             anObj = self.PrimOp.MakePrismDXDYDZ2Ways(theBase, theDX, theDY, theDZ)
3742             RaiseIfFailed("MakePrismDXDYDZ2Ways", self.PrimOp)
3743             anObj.SetParameters(Parameters)
3744             self._autoPublish(anObj, theName, "prism")
3745             return anObj
3746
3747         ## Create a shape by revolution of the base shape around the axis
3748         #  on the given angle, i.e. all the space, transfixed by the base
3749         #  shape during its rotation around the axis on the given angle.
3750         #  @param theBase Base shape to be rotated.
3751         #  @param theAxis Rotation axis.
3752         #  @param theAngle Rotation angle in radians.
3753         #  @param theName Object name; when specified, this parameter is used
3754         #         for result publication in the study. Otherwise, if automatic
3755         #         publication is switched on, default value is used for result name.
3756         #
3757         #  @return New GEOM.GEOM_Object, containing the created revolution.
3758         #
3759         #  @ref tui_creation_revolution "Example"
3760         @ManageTransactions("PrimOp")
3761         def MakeRevolution(self, theBase, theAxis, theAngle, theName=None):
3762             """
3763             Create a shape by revolution of the base shape around the axis
3764             on the given angle, i.e. all the space, transfixed by the base
3765             shape during its rotation around the axis on the given angle.
3766
3767             Parameters:
3768                 theBase Base shape to be rotated.
3769                 theAxis Rotation axis.
3770                 theAngle Rotation angle in radians.
3771                 theName Object name; when specified, this parameter is used
3772                         for result publication in the study. Otherwise, if automatic
3773                         publication is switched on, default value is used for result name.
3774
3775             Returns:
3776                 New GEOM.GEOM_Object, containing the created revolution.
3777             """
3778             # Example: see GEOM_TestAll.py
3779             theAngle,Parameters = ParseParameters(theAngle)
3780             anObj = self.PrimOp.MakeRevolutionAxisAngle(theBase, theAxis, theAngle)
3781             RaiseIfFailed("MakeRevolutionAxisAngle", self.PrimOp)
3782             anObj.SetParameters(Parameters)
3783             self._autoPublish(anObj, theName, "revolution")
3784             return anObj
3785
3786         ## Create a shape by revolution of the base shape around the axis
3787         #  on the given angle, i.e. all the space, transfixed by the base
3788         #  shape during its rotation around the axis on the given angle in
3789         #  both directions (forward/backward)
3790         #  @param theBase Base shape to be rotated.
3791         #  @param theAxis Rotation axis.
3792         #  @param theAngle Rotation angle in radians.
3793         #  @param theName Object name; when specified, this parameter is used
3794         #         for result publication in the study. Otherwise, if automatic
3795         #         publication is switched on, default value is used for result name.
3796         #
3797         #  @return New GEOM.GEOM_Object, containing the created revolution.
3798         #
3799         #  @ref tui_creation_revolution "Example"
3800         @ManageTransactions("PrimOp")
3801         def MakeRevolution2Ways(self, theBase, theAxis, theAngle, theName=None):
3802             """
3803             Create a shape by revolution of the base shape around the axis
3804             on the given angle, i.e. all the space, transfixed by the base
3805             shape during its rotation around the axis on the given angle in
3806             both directions (forward/backward).
3807
3808             Parameters:
3809                 theBase Base shape to be rotated.
3810                 theAxis Rotation axis.
3811                 theAngle Rotation angle in radians.
3812                 theName Object name; when specified, this parameter is used
3813                         for result publication in the study. Otherwise, if automatic
3814                         publication is switched on, default value is used for result name.
3815
3816             Returns:
3817                 New GEOM.GEOM_Object, containing the created revolution.
3818             """
3819             theAngle,Parameters = ParseParameters(theAngle)
3820             anObj = self.PrimOp.MakeRevolutionAxisAngle2Ways(theBase, theAxis, theAngle)
3821             RaiseIfFailed("MakeRevolutionAxisAngle2Ways", self.PrimOp)
3822             anObj.SetParameters(Parameters)
3823             self._autoPublish(anObj, theName, "revolution")
3824             return anObj
3825
3826         ## Create a face from a given set of contours.
3827         #  @param theContours either a list or a compound of edges/wires.
3828         #  @param theMinDeg a minimal degree of BSpline surface to create.
3829         #  @param theMaxDeg a maximal degree of BSpline surface to create.
3830         #  @param theTol2D a 2d tolerance to be reached.
3831         #  @param theTol3D a 3d tolerance to be reached.
3832         #  @param theNbIter a number of iteration of approximation algorithm.
3833         #  @param theMethod Kind of method to perform filling operation
3834         #         (see GEOM.filling_oper_method enum).
3835         #  @param isApprox if True, BSpline curves are generated in the process
3836         #                  of surface construction. By default it is False, that means
3837         #                  the surface is created using given curves. The usage of
3838         #                  Approximation makes the algorithm work slower, but allows
3839         #                  building the surface for rather complex cases.
3840         #  @param theName Object name; when specified, this parameter is used
3841         #         for result publication in the study. Otherwise, if automatic
3842         #         publication is switched on, default value is used for result name.
3843         #
3844         #  @return New GEOM.GEOM_Object (face), containing the created filling surface.
3845         #
3846         #  @ref tui_creation_filling "Example"
3847         @ManageTransactions("PrimOp")
3848         def MakeFilling(self, theContours, theMinDeg=2, theMaxDeg=5, theTol2D=0.0001,
3849                         theTol3D=0.0001, theNbIter=0, theMethod=GEOM.FOM_Default, isApprox=0, theName=None):
3850             """
3851             Create a face from a given set of contours.
3852
3853             Parameters:
3854                 theContours either a list or a compound of edges/wires.
3855                 theMinDeg a minimal degree of BSpline surface to create.
3856                 theMaxDeg a maximal degree of BSpline surface to create.
3857                 theTol2D a 2d tolerance to be reached.
3858                 theTol3D a 3d tolerance to be reached.
3859                 theNbIter a number of iteration of approximation algorithm.
3860                 theMethod Kind of method to perform filling operation
3861                           (see GEOM.filling_oper_method enum).
3862                 isApprox if True, BSpline curves are generated in the process
3863                          of surface construction. By default it is False, that means
3864                          the surface is created using given curves. The usage of
3865                          Approximation makes the algorithm work slower, but allows
3866                          building the surface for rather complex cases.
3867                 theName Object name; when specified, this parameter is used
3868                         for result publication in the study. Otherwise, if automatic
3869                         publication is switched on, default value is used for result name.
3870
3871             Returns:
3872                 New GEOM.GEOM_Object (face), containing the created filling surface.
3873
3874             Example of usage:
3875                 filling = geompy.MakeFilling(compound, 2, 5, 0.0001, 0.0001, 5)
3876             """
3877             # Example: see GEOM_TestAll.py
3878             theMinDeg,theMaxDeg,theTol2D,theTol3D,theNbIter,Parameters = ParseParameters(theMinDeg, theMaxDeg, theTol2D, theTol3D, theNbIter)
3879             anObj = self.PrimOp.MakeFilling(ToList(theContours), theMinDeg, theMaxDeg,
3880                                             theTol2D, theTol3D, theNbIter,
3881                                             theMethod, isApprox)
3882             RaiseIfFailed("MakeFilling", self.PrimOp)
3883             anObj.SetParameters(Parameters)
3884             self._autoPublish(anObj, theName, "filling")
3885             return anObj
3886
3887
3888         ## Create a face from a given set of contours.
3889         #  This method corresponds to MakeFilling() with isApprox=True.
3890         #  @param theContours either a list or a compound of edges/wires.
3891         #  @param theMinDeg a minimal degree of BSpline surface to create.
3892         #  @param theMaxDeg a maximal degree of BSpline surface to create.
3893         #  @param theTol3D a 3d tolerance to be reached.
3894         #  @param theName Object name; when specified, this parameter is used
3895         #         for result publication in the study. Otherwise, if automatic
3896         #         publication is switched on, default value is used for result name.
3897         #
3898         #  @return New GEOM.GEOM_Object (face), containing the created filling surface.
3899         #
3900         #  @ref tui_creation_filling "Example"
3901         @ManageTransactions("PrimOp")
3902         def MakeFillingNew(self, theContours, theMinDeg=2, theMaxDeg=5, theTol3D=0.0001, theName=None):
3903             """
3904             Create a filling from the given compound of contours.
3905             This method corresponds to MakeFilling() with isApprox=True.
3906
3907             Parameters:
3908                 theContours either a list or a compound of edges/wires.
3909                 theMinDeg a minimal degree of BSpline surface to create.
3910                 theMaxDeg a maximal degree of BSpline surface to create.
3911                 theTol3D a 3d tolerance to be reached.
3912                 theName Object name; when specified, this parameter is used
3913                         for result publication in the study. Otherwise, if automatic
3914                         publication is switched on, default value is used for result name.
3915
3916             Returns:
3917                 New GEOM.GEOM_Object (face), containing the created filling surface.
3918
3919             Example of usage:
3920                 filling = geompy.MakeFillingNew(compound, 2, 5, 0.0001)
3921             """
3922             # Example: see GEOM_TestAll.py
3923             theMinDeg,theMaxDeg,theTol3D,Parameters = ParseParameters(theMinDeg, theMaxDeg, theTol3D)
3924             anObj = self.PrimOp.MakeFilling(ToList(theContours), theMinDeg, theMaxDeg,
3925                                             0, theTol3D, 0, GEOM.FOM_Default, True)
3926             RaiseIfFailed("MakeFillingNew", self.PrimOp)
3927             anObj.SetParameters(Parameters)
3928             self._autoPublish(anObj, theName, "filling")
3929             return anObj
3930
3931         ## Create a shell or solid passing through set of sections.Sections should be wires,edges or vertices.
3932         #  @param theSeqSections - set of specified sections.
3933         #  @param theModeSolid - mode defining building solid or shell
3934         #  @param thePreci - precision 3D used for smoothing
3935         #  @param theRuled - mode defining type of the result surfaces (ruled or smoothed).
3936         #  @param theName Object name; when specified, this parameter is used
3937         #         for result publication in the study. Otherwise, if automatic
3938         #         publication is switched on, default value is used for result name.
3939         #
3940         #  @return New GEOM.GEOM_Object, containing the created shell or solid.
3941         #
3942         #  @ref swig_todo "Example"
3943         @ManageTransactions("PrimOp")
3944         def MakeThruSections(self, theSeqSections, theModeSolid, thePreci, theRuled, theName=None):
3945             """
3946             Create a shell or solid passing through set of sections.Sections should be wires,edges or vertices.
3947
3948             Parameters:
3949                 theSeqSections - set of specified sections.
3950                 theModeSolid - mode defining building solid or shell
3951                 thePreci - precision 3D used for smoothing
3952                 theRuled - mode defining type of the result surfaces (ruled or smoothed).
3953                 theName Object name; when specified, this parameter is used
3954                         for result publication in the study. Otherwise, if automatic
3955                         publication is switched on, default value is used for result name.
3956
3957             Returns:
3958                 New GEOM.GEOM_Object, containing the created shell or solid.
3959             """
3960             # Example: see GEOM_TestAll.py
3961             anObj = self.PrimOp.MakeThruSections(theSeqSections,theModeSolid,thePreci,theRuled)
3962             RaiseIfFailed("MakeThruSections", self.PrimOp)
3963             self._autoPublish(anObj, theName, "filling")
3964             return anObj
3965
3966         ## Create a shape by extrusion of the base shape along
3967         #  the path shape. The path shape can be a wire or an edge. It is
3968         #  possible to generate groups along with the result by means of
3969         #  setting the flag \a IsGenerateGroups.<BR>
3970         #  If \a thePath is a closed edge or wire and \a IsGenerateGroups is
3971         #  set, an error is occurred. If \a thePath is not closed edge/wire,
3972         #  the following groups are returned:
3973         #  - If \a theBase is unclosed edge or wire: "Down", "Up", "Side1",
3974         #    "Side2";
3975         #  - If \a theBase is closed edge or wire, face or shell: "Down", "Up",
3976         #    "Other".
3977         #  .
3978         #  "Down" and "Up" groups contain:
3979         #  - Edges if \a theBase is edge or wire;
3980         #  - Faces if \a theBase is face or shell.<BR>
3981         #  .
3982         #  "Side1" and "Side2" groups contain edges generated from the first
3983         #  and last vertices of \a theBase. The first and last vertices are
3984         #  determined taking into account edge/wire orientation.<BR>
3985         #  "Other" group represents faces generated from the bounding edges of
3986         #  \a theBase.
3987         #
3988         #  @param theBase Base shape to be extruded.
3989         #  @param thePath Path shape to extrude the base shape along it.
3990         #  @param IsGenerateGroups flag that tells if it is necessary to
3991         #         create groups. It is equal to False by default.
3992         #  @param theName Object name; when specified, this parameter is used
3993         #         for result publication in the study. Otherwise, if automatic
3994         #         publication is switched on, default value is used for result name.
3995         #
3996         #  @return New GEOM.GEOM_Object, containing the created pipe if 
3997         #          \a IsGenerateGroups is not set. Otherwise it returns a
3998         #          list of GEOM.GEOM_Object. Its first element is the created pipe, the
3999         #          remaining ones are created groups.
4000         #
4001         #  @ref tui_creation_pipe "Example"
4002         @ManageTransactions("PrimOp")
4003         def MakePipe(self, theBase, thePath,
4004                      IsGenerateGroups=False, theName=None):
4005             """
4006             Create a shape by extrusion of the base shape along
4007             the path shape. The path shape can be a wire or an edge. It is
4008             possible to generate groups along with the result by means of
4009             setting the flag IsGenerateGroups.
4010             If thePath is a closed edge or wire and IsGenerateGroups is
4011             set, an error is occurred. If thePath is not closed edge/wire,
4012             the following groups are returned:
4013             - If theBase is unclosed edge or wire: "Down", "Up", "Side1",
4014               "Side2";
4015             - If theBase is closed edge or wire, face or shell: "Down", "Up",
4016               "Other".
4017             "Down" and "Up" groups contain:
4018             - Edges if theBase is edge or wire;
4019             - Faces if theBase is face or shell.
4020             "Side1" and "Side2" groups contain edges generated from the first
4021             and last vertices of theBase. The first and last vertices are
4022             determined taking into account edge/wire orientation.
4023             "Other" group represents faces generated from the bounding edges of
4024             theBase.
4025
4026             Parameters:
4027                 theBase Base shape to be extruded.
4028                 thePath Path shape to extrude the base shape along it.
4029                 IsGenerateGroups flag that tells if it is necessary to
4030                         create groups. It is equal to False by default.
4031                 theName Object name; when specified, this parameter is used
4032                         for result publication in the study. Otherwise, if automatic
4033                         publication is switched on, default value is used for result name.
4034
4035             Returns:
4036                 New GEOM.GEOM_Object, containing the created pipe if 
4037                 IsGenerateGroups is not set. Otherwise it returns a
4038                 list of GEOM.GEOM_Object. Its first element is the created pipe, the
4039                 remaining ones are created groups.
4040             """
4041             # Example: see GEOM_TestAll.py
4042             aList = self.PrimOp.MakePipe(theBase, thePath, IsGenerateGroups)
4043             RaiseIfFailed("MakePipe", self.PrimOp)
4044
4045             if IsGenerateGroups:
4046               self._autoPublish(aList, theName, "pipe")
4047               return aList
4048
4049             self._autoPublish(aList[0], theName, "pipe")
4050             return aList[0]
4051
4052         ## Create a shape by extrusion of the profile shape along
4053         #  the path shape. The path shape can be a wire or an edge.
4054         #  the several profiles can be specified in the several locations of path.
4055         #  It is possible to generate groups along with the result by means of
4056         #  setting the flag \a IsGenerateGroups. For detailed information on
4057         #  groups that can be created please see the method MakePipe().
4058         #  @param theSeqBases - list of  Bases shape to be extruded.
4059         #  @param theLocations - list of locations on the path corresponding
4060         #                        specified list of the Bases shapes. Number of locations
4061         #                        should be equal to number of bases or list of locations can be empty.
4062         #  @param thePath - Path shape to extrude the base shape along it.
4063         #  @param theWithContact - the mode defining that the section is translated to be in
4064         #                          contact with the spine.
4065         #  @param theWithCorrection - defining that the section is rotated to be
4066         #                             orthogonal to the spine tangent in the correspondent point
4067         #  @param IsGenerateGroups - flag that tells if it is necessary to
4068         #                          create groups. It is equal to False by default.
4069         #  @param theName Object name; when specified, this parameter is used
4070         #         for result publication in the study. Otherwise, if automatic
4071         #         publication is switched on, default value is used for result name.
4072         #
4073         #  @return New GEOM.GEOM_Object, containing the created pipe if 
4074         #          \a IsGenerateGroups is not set. Otherwise it returns new
4075         #          GEOM.ListOfGO. Its first element is the created pipe, the
4076         #          remaining ones are created groups.
4077         #
4078         #  @ref tui_creation_pipe_with_diff_sec "Example"
4079         @ManageTransactions("PrimOp")
4080         def MakePipeWithDifferentSections(self, theSeqBases,
4081                                           theLocations, thePath,
4082                                           theWithContact, theWithCorrection,
4083                                           IsGenerateGroups=False, theName=None):
4084             """
4085             Create a shape by extrusion of the profile shape along
4086             the path shape. The path shape can be a wire or an edge.
4087             the several profiles can be specified in the several locations of path.
4088             It is possible to generate groups along with the result by means of
4089             setting the flag IsGenerateGroups. For detailed information on
4090             groups that can be created please see the method geompy.MakePipe().
4091
4092             Parameters:
4093                 theSeqBases - list of  Bases shape to be extruded.
4094                 theLocations - list of locations on the path corresponding
4095                                specified list of the Bases shapes. Number of locations
4096                                should be equal to number of bases or list of locations can be empty.
4097                 thePath - Path shape to extrude the base shape along it.
4098                 theWithContact - the mode defining that the section is translated to be in
4099                                  contact with the spine(0/1)
4100                 theWithCorrection - defining that the section is rotated to be
4101                                     orthogonal to the spine tangent in the correspondent point (0/1)
4102                 IsGenerateGroups - flag that tells if it is necessary to
4103                                  create groups. It is equal to False by default.
4104                 theName Object name; when specified, this parameter is used
4105                         for result publication in the study. Otherwise, if automatic
4106                         publication is switched on, default value is used for result name.
4107
4108             Returns:
4109                 New GEOM.GEOM_Object, containing the created pipe if 
4110                 IsGenerateGroups is not set. Otherwise it returns new
4111                 GEOM.ListOfGO. Its first element is the created pipe, the
4112                 remaining ones are created groups.
4113             """
4114             aList = self.PrimOp.MakePipeWithDifferentSections(theSeqBases,
4115                                                               theLocations, thePath,
4116                                                               theWithContact, theWithCorrection,
4117                                                               False, IsGenerateGroups)
4118             RaiseIfFailed("MakePipeWithDifferentSections", self.PrimOp)
4119
4120             if IsGenerateGroups:
4121               self._autoPublish(aList, theName, "pipe")
4122               return aList
4123
4124             self._autoPublish(aList[0], theName, "pipe")
4125             return aList[0]
4126
4127         ## Create a shape by extrusion of the profile shape along
4128         #  the path shape. This function is a version of
4129         #  MakePipeWithDifferentSections() with the same parameters, except
4130         #  eliminated theWithContact and theWithCorrection. So it is
4131         #  possible to find the description of all parameters is in this
4132         #  method. The difference is that this method performs the operation
4133         #  step by step, i.e. it creates pipes between each pair of neighbor
4134         #  sections and fuses them into a single shape.
4135         #
4136         #  @ref tui_creation_pipe_with_diff_sec "Example"
4137         @ManageTransactions("PrimOp")
4138         def MakePipeWithDifferentSectionsBySteps(self, theSeqBases,
4139                                                  theLocations, thePath,
4140                                                  IsGenerateGroups=False, theName=None):
4141             """
4142             Create a shape by extrusion of the profile shape along
4143             the path shape. This function is a version of
4144             MakePipeWithDifferentSections() with the same parameters, except
4145             eliminated theWithContact and theWithCorrection. So it is
4146             possible to find the description of all parameters is in this
4147             method. The difference is that this method performs the operation
4148             step by step, i.e. it creates pipes between each pair of neighbor
4149             sections and fuses them into a single shape.
4150             """
4151             aList = self.PrimOp.MakePipeWithDifferentSections(theSeqBases,
4152                                                               theLocations, thePath,
4153                                                               False, False,
4154                                                               True, IsGenerateGroups)
4155             RaiseIfFailed("MakePipeWithDifferentSectionsBySteps", self.PrimOp)
4156
4157             if IsGenerateGroups:
4158               self._autoPublish(aList, theName, "pipe")
4159               return aList
4160
4161             self._autoPublish(aList[0], theName, "pipe")
4162             return aList[0]
4163
4164         ## Create a shape by extrusion of the profile shape along
4165         #  the path shape. The path shape can be a wire or an edge.
4166         #  the several profiles can be specified in the several locations of path.
4167         #  It is possible to generate groups along with the result by means of
4168         #  setting the flag \a IsGenerateGroups. For detailed information on
4169         #  groups that can be created please see the method MakePipe().
4170         #  @param theSeqBases - list of  Bases shape to be extruded. Base shape must be
4171         #                       shell or face. If number of faces in neighbour sections
4172         #                       aren't coincided result solid between such sections will
4173         #                       be created using external boundaries of this shells.
4174         #  @param theSeqSubBases - list of corresponding sub-shapes of section shapes.
4175         #                          This list is used for searching correspondences between
4176         #                          faces in the sections. Size of this list must be equal
4177         #                          to size of list of base shapes.
4178         #  @param theLocations - list of locations on the path corresponding
4179         #                        specified list of the Bases shapes. Number of locations
4180         #                        should be equal to number of bases. First and last
4181         #                        locations must be coincided with first and last vertexes
4182         #                        of path correspondingly.
4183         #  @param thePath - Path shape to extrude the base shape along it.
4184         #  @param theWithContact - the mode defining that the section is translated to be in
4185         #                          contact with the spine.
4186         #  @param theWithCorrection - defining that the section is rotated to be
4187         #                             orthogonal to the spine tangent in the correspondent point
4188         #  @param IsGenerateGroups - flag that tells if it is necessary to
4189         #                          create groups. It is equal to False by default.
4190         #  @param theName Object name; when specified, this parameter is used
4191         #         for result publication in the study. Otherwise, if automatic
4192         #         publication is switched on, default value is used for result name.
4193         #
4194         #  @return New GEOM.GEOM_Object, containing the created solids if 
4195         #          \a IsGenerateGroups is not set. Otherwise it returns new
4196         #          GEOM.ListOfGO. Its first element is the created solids, the
4197         #          remaining ones are created groups.
4198         #
4199         #  @ref tui_creation_pipe_with_shell_sec "Example"
4200         @ManageTransactions("PrimOp")
4201         def MakePipeWithShellSections(self, theSeqBases, theSeqSubBases,
4202                                       theLocations, thePath,
4203                                       theWithContact, theWithCorrection,
4204                                       IsGenerateGroups=False, theName=None):
4205             """
4206             Create a shape by extrusion of the profile shape along
4207             the path shape. The path shape can be a wire or an edge.
4208             the several profiles can be specified in the several locations of path.
4209             It is possible to generate groups along with the result by means of
4210             setting the flag IsGenerateGroups. For detailed information on
4211             groups that can be created please see the method geompy.MakePipe().
4212
4213             Parameters:
4214                 theSeqBases - list of  Bases shape to be extruded. Base shape must be
4215                               shell or face. If number of faces in neighbour sections
4216                               aren't coincided result solid between such sections will
4217                               be created using external boundaries of this shells.
4218                 theSeqSubBases - list of corresponding sub-shapes of section shapes.
4219                                  This list is used for searching correspondences between
4220                                  faces in the sections. Size of this list must be equal
4221                                  to size of list of base shapes.
4222                 theLocations - list of locations on the path corresponding
4223                                specified list of the Bases shapes. Number of locations
4224                                should be equal to number of bases. First and last
4225                                locations must be coincided with first and last vertexes
4226                                of path correspondingly.
4227                 thePath - Path shape to extrude the base shape along it.
4228                 theWithContact - the mode defining that the section is translated to be in
4229                                  contact with the spine (0/1)
4230                 theWithCorrection - defining that the section is rotated to be
4231                                     orthogonal to the spine tangent in the correspondent point (0/1)
4232                 IsGenerateGroups - flag that tells if it is necessary to
4233                                  create groups. It is equal to False by default.
4234                 theName Object name; when specified, this parameter is used
4235                         for result publication in the study. Otherwise, if automatic
4236                         publication is switched on, default value is used for result name.
4237
4238             Returns:
4239                 New GEOM.GEOM_Object, containing the created solids if 
4240                 IsGenerateGroups is not set. Otherwise it returns new
4241                 GEOM.ListOfGO. Its first element is the created solids, the
4242                 remaining ones are created groups.
4243             """
4244             aList = self.PrimOp.MakePipeWithShellSections(theSeqBases, theSeqSubBases,
4245                                                           theLocations, thePath,
4246                                                           theWithContact, theWithCorrection,
4247                                                           IsGenerateGroups)
4248             RaiseIfFailed("MakePipeWithShellSections", self.PrimOp)
4249
4250             if IsGenerateGroups:
4251               self._autoPublish(aList, theName, "pipe")
4252               return aList
4253
4254             self._autoPublish(aList[0], theName, "pipe")
4255             return aList[0]
4256
4257         ## Create a shape by extrusion of the profile shape along
4258         #  the path shape. This function is used only for debug pipe
4259         #  functionality - it is a version of function MakePipeWithShellSections()
4260         #  which give a possibility to receive information about
4261         #  creating pipe between each pair of sections step by step.
4262         @ManageTransactions("PrimOp")
4263         def MakePipeWithShellSectionsBySteps(self, theSeqBases, theSeqSubBases,
4264                                              theLocations, thePath,
4265                                              theWithContact, theWithCorrection,
4266                                              IsGenerateGroups=False, theName=None):
4267             """
4268             Create a shape by extrusion of the profile shape along
4269             the path shape. This function is used only for debug pipe
4270             functionality - it is a version of previous function
4271             geompy.MakePipeWithShellSections() which give a possibility to
4272             receive information about creating pipe between each pair of
4273             sections step by step.
4274             """
4275             res = []
4276             nbsect = len(theSeqBases)
4277             nbsubsect = len(theSeqSubBases)
4278             #print "nbsect = ",nbsect
4279             for i in range(1,nbsect):
4280                 #print "  i = ",i
4281                 tmpSeqBases = [ theSeqBases[i-1], theSeqBases[i] ]
4282                 tmpLocations = [ theLocations[i-1], theLocations[i] ]
4283                 tmpSeqSubBases = []
4284                 if nbsubsect>0: tmpSeqSubBases = [ theSeqSubBases[i-1], theSeqSubBases[i] ]
4285                 aList = self.PrimOp.MakePipeWithShellSections(tmpSeqBases, tmpSeqSubBases,
4286                                                               tmpLocations, thePath,
4287                                                               theWithContact, theWithCorrection,
4288                                                               IsGenerateGroups)
4289                 if self.PrimOp.IsDone() == 0:
4290                     print("Problems with pipe creation between ",i," and ",i+1," sections")
4291                     RaiseIfFailed("MakePipeWithShellSections", self.PrimOp)
4292                     break
4293                 else:
4294                     print("Pipe between ",i," and ",i+1," sections is OK")
4295                     res.append(aList[0])
4296                     pass
4297                 pass
4298
4299             resc = self.MakeCompound(res)
4300             #resc = self.MakeSewing(res, 0.001)
4301             #print "resc: ",resc
4302             self._autoPublish(resc, theName, "pipe")
4303             return resc
4304
4305         ## Create solids between given sections.
4306         #  It is possible to generate groups along with the result by means of
4307         #  setting the flag \a IsGenerateGroups. For detailed information on
4308         #  groups that can be created please see the method MakePipe().
4309         #  @param theSeqBases - list of sections (shell or face).
4310         #  @param theLocations - list of corresponding vertexes
4311         #  @param IsGenerateGroups - flag that tells if it is necessary to
4312         #         create groups. It is equal to False by default.
4313         #  @param theName Object name; when specified, this parameter is used
4314         #         for result publication in the study. Otherwise, if automatic
4315         #         publication is switched on, default value is used for result name.
4316         #
4317         #  @return New GEOM.GEOM_Object, containing the created solids if 
4318         #          \a IsGenerateGroups is not set. Otherwise it returns new
4319         #          GEOM.ListOfGO. Its first element is the created solids, the
4320         #          remaining ones are created groups.
4321         #
4322         #  @ref tui_creation_pipe_without_path "Example"
4323         @ManageTransactions("PrimOp")
4324         def MakePipeShellsWithoutPath(self, theSeqBases, theLocations,
4325                                       IsGenerateGroups=False, theName=None):
4326             """
4327             Create solids between given sections.
4328             It is possible to generate groups along with the result by means of
4329             setting the flag IsGenerateGroups. For detailed information on
4330             groups that can be created please see the method geompy.MakePipe().
4331
4332             Parameters:
4333                 theSeqBases - list of sections (shell or face).
4334                 theLocations - list of corresponding vertexes
4335                 IsGenerateGroups - flag that tells if it is necessary to
4336                                  create groups. It is equal to False by default.
4337                 theName Object name; when specified, this parameter is used
4338                         for result publication in the study. Otherwise, if automatic
4339                         publication is switched on, default value is used for result name.
4340
4341             Returns:
4342                 New GEOM.GEOM_Object, containing the created solids if 
4343                 IsGenerateGroups is not set. Otherwise it returns new
4344                 GEOM.ListOfGO. Its first element is the created solids, the
4345                 remaining ones are created groups.
4346             """
4347             aList = self.PrimOp.MakePipeShellsWithoutPath(theSeqBases, theLocations,
4348                                                           IsGenerateGroups)
4349             RaiseIfFailed("MakePipeShellsWithoutPath", self.PrimOp)
4350
4351             if IsGenerateGroups:
4352               self._autoPublish(aList, theName, "pipe")
4353               return aList
4354
4355             self._autoPublish(aList[0], theName, "pipe")
4356             return aList[0]
4357
4358         ## Create a shape by extrusion of the base shape along
4359         #  the path shape with constant bi-normal direction along the given vector.
4360         #  The path shape can be a wire or an edge.
4361         #  It is possible to generate groups along with the result by means of
4362         #  setting the flag \a IsGenerateGroups. For detailed information on
4363         #  groups that can be created please see the method MakePipe().
4364         #  @param theBase Base shape to be extruded.
4365         #  @param thePath Path shape to extrude the base shape along it.
4366         #  @param theVec Vector defines a constant binormal direction to keep the
4367         #                same angle between the direction and the sections
4368         #                along the sweep surface.
4369         #  @param IsGenerateGroups flag that tells if it is necessary to
4370         #         create groups. It is equal to False by default.
4371         #  @param theName Object name; when specified, this parameter is used
4372         #         for result publication in the study. Otherwise, if automatic
4373         #         publication is switched on, default value is used for result name.
4374         #
4375         #  @return New GEOM.GEOM_Object, containing the created pipe if 
4376         #          \a IsGenerateGroups is not set. Otherwise it returns new
4377         #          GEOM.ListOfGO. Its first element is the created pipe, the
4378         #          remaining ones are created groups.
4379         #
4380         #  @ref tui_creation_pipe "Example"
4381         @ManageTransactions("PrimOp")
4382         def MakePipeBiNormalAlongVector(self, theBase, thePath, theVec,
4383                                         IsGenerateGroups=False, theName=None):
4384             """
4385             Create a shape by extrusion of the base shape along
4386             the path shape with constant bi-normal direction along the given vector.
4387             The path shape can be a wire or an edge.
4388             It is possible to generate groups along with the result by means of
4389             setting the flag IsGenerateGroups. For detailed information on
4390             groups that can be created please see the method geompy.MakePipe().
4391
4392             Parameters:
4393                 theBase Base shape to be extruded.
4394                 thePath Path shape to extrude the base shape along it.
4395                 theVec Vector defines a constant binormal direction to keep the
4396                        same angle between the direction and the sections
4397                        along the sweep surface.
4398                 IsGenerateGroups flag that tells if it is necessary to
4399                                  create groups. It is equal to False by default.
4400                 theName Object name; when specified, this parameter is used
4401                         for result publication in the study. Otherwise, if automatic
4402                         publication is switched on, default value is used for result name.
4403
4404             Returns:
4405                 New GEOM.GEOM_Object, containing the created pipe if 
4406                 IsGenerateGroups is not set. Otherwise it returns new
4407                 GEOM.ListOfGO. Its first element is the created pipe, the
4408                 remaining ones are created groups.
4409             """
4410             # Example: see GEOM_TestAll.py
4411             aList = self.PrimOp.MakePipeBiNormalAlongVector(theBase, thePath,
4412                           theVec, IsGenerateGroups)
4413             RaiseIfFailed("MakePipeBiNormalAlongVector", self.PrimOp)
4414
4415             if IsGenerateGroups:
4416               self._autoPublish(aList, theName, "pipe")
4417               return aList
4418
4419             self._autoPublish(aList[0], theName, "pipe")
4420             return aList[0]
4421
4422         ## Makes a thick solid from a shape. If the input is a surface shape
4423         #  (face or shell) the result is a thick solid. If an input shape is
4424         #  a solid the result is a hollowed solid with removed faces.
4425         #  @param theShape Face or Shell to get thick solid or solid to get
4426         #         hollowed solid.
4427         #  @param theThickness Thickness of the resulting solid
4428         #  @param theFacesIDs the list of face IDs to be removed from the
4429         #         result. It is ignored if \a theShape is a face or a shell.
4430         #         It is empty by default. 
4431         #  @param theInside If true the thickness is applied towards inside
4432         #  @param theName Object name; when specified, this parameter is used
4433         #         for result publication in the study. Otherwise, if automatic
4434         #         publication is switched on, default value is used for result name.
4435         #
4436         #  @return New GEOM.GEOM_Object, containing the created solid
4437         #
4438         #  @ref tui_creation_thickness "Example"
4439         @ManageTransactions("PrimOp")
4440         def MakeThickSolid(self, theShape, theThickness,
4441                            theFacesIDs=[], theInside=False, theName=None):
4442             """
4443             Make a thick solid from a shape. If the input is a surface shape
4444             (face or shell) the result is a thick solid. If an input shape is
4445             a solid the result is a hollowed solid with removed faces.
4446
4447             Parameters:
4448                  theShape Face or Shell to get thick solid or solid to get
4449                           hollowed solid.
4450                  theThickness Thickness of the resulting solid
4451                  theFacesIDs the list of face IDs to be removed from the
4452                           result. It is ignored if theShape is a face or a
4453                           shell. It is empty by default. 
4454                  theInside If true the thickness is applied towards inside
4455                  theName Object name; when specified, this parameter is used
4456                          for result publication in the study. Otherwise, if automatic
4457                          publication is switched on, default value is used for result name.
4458
4459             Returns:
4460                 New GEOM.GEOM_Object, containing the created solid
4461             """
4462             # Example: see GEOM_TestAll.py
4463             theThickness,Parameters = ParseParameters(theThickness)
4464             anObj = self.PrimOp.MakeThickening(theShape, theFacesIDs,
4465                                                theThickness, True, theInside)
4466             RaiseIfFailed("MakeThickSolid", self.PrimOp)
4467             anObj.SetParameters(Parameters)
4468             self._autoPublish(anObj, theName, "thickSolid")
4469             return anObj
4470
4471
4472         ## Modifies a shape to make it a thick solid. If the input is a surface
4473         #  shape (face or shell) the result is a thick solid. If an input shape
4474         #  is a solid the result is a hollowed solid with removed faces.
4475         #  @param theShape Face or Shell to get thick solid or solid to get
4476         #         hollowed solid.
4477         #  @param theThickness Thickness of the resulting solid
4478         #  @param theFacesIDs the list of face IDs to be removed from the
4479         #         result. It is ignored if \a theShape is a face or a shell.
4480         #         It is empty by default. 
4481         #  @param theInside If true the thickness is applied towards inside
4482         #
4483         #  @return The modified shape
4484         #
4485         #  @ref tui_creation_thickness "Example"
4486         @ManageTransactions("PrimOp")
4487         def Thicken(self, theShape, theThickness, theFacesIDs=[], theInside=False):
4488             """
4489             Modifies a shape to make it a thick solid. If the input is a
4490             surface shape (face or shell) the result is a thick solid. If
4491             an input shape is a solid the result is a hollowed solid with
4492             removed faces.
4493
4494             Parameters:
4495                 theShape Face or Shell to get thick solid or solid to get
4496                          hollowed solid.
4497                 theThickness Thickness of the resulting solid
4498                 theFacesIDs the list of face IDs to be removed from the
4499                          result. It is ignored if \a theShape is a face or
4500                          a shell. It is empty by default. 
4501                 theInside If true the thickness is applied towards inside
4502
4503             Returns:
4504                 The modified shape
4505             """
4506             # Example: see GEOM_TestAll.py
4507             theThickness,Parameters = ParseParameters(theThickness)
4508             anObj = self.PrimOp.MakeThickening(theShape, theFacesIDs,
4509                                                theThickness, False, theInside)
4510             RaiseIfFailed("Thicken", self.PrimOp)
4511             anObj.SetParameters(Parameters)
4512             return anObj
4513
4514         ## Build a middle path of a pipe-like shape.
4515         #  The path shape can be a wire or an edge.
4516         #  @param theShape It can be closed or unclosed pipe-like shell
4517         #                  or a pipe-like solid.
4518         #  @param theBase1, theBase2 Two bases of the supposed pipe. This
4519         #                            should be wires or faces of theShape.
4520         #  @param theName Object name; when specified, this parameter is used
4521         #         for result publication in the study. Otherwise, if automatic
4522         #         publication is switched on, default value is used for result name.
4523         #
4524         #  @note It is not assumed that exact or approximate copy of theShape
4525         #        can be obtained by applying existing Pipe operation on the
4526         #        resulting "Path" wire taking theBase1 as the base - it is not
4527         #        always possible; though in some particular cases it might work
4528         #        it is not guaranteed. Thus, RestorePath function should not be
4529         #        considered as an exact reverse operation of the Pipe.
4530         #
4531         #  @return New GEOM.GEOM_Object, containing an edge or wire that represent
4532         #                                source pipe's "path".
4533         #
4534         #  @ref tui_creation_pipe_path "Example"
4535         @ManageTransactions("PrimOp")
4536         def RestorePath (self, theShape, theBase1, theBase2, theName=None):
4537             """
4538             Build a middle path of a pipe-like shape.
4539             The path shape can be a wire or an edge.
4540
4541             Parameters:
4542                 theShape It can be closed or unclosed pipe-like shell
4543                          or a pipe-like solid.
4544                 theBase1, theBase2 Two bases of the supposed pipe. This
4545                                    should be wires or faces of theShape.
4546                 theName Object name; when specified, this parameter is used
4547                         for result publication in the study. Otherwise, if automatic
4548                         publication is switched on, default value is used for result name.
4549
4550             Returns:
4551                 New GEOM_Object, containing an edge or wire that represent
4552                                  source pipe's path.
4553             """
4554             anObj = self.PrimOp.RestorePath(theShape, theBase1, theBase2)
4555             RaiseIfFailed("RestorePath", self.PrimOp)
4556             self._autoPublish(anObj, theName, "path")
4557             return anObj
4558
4559         ## Build a middle path of a pipe-like shape.
4560         #  The path shape can be a wire or an edge.
4561         #  @param theShape It can be closed or unclosed pipe-like shell
4562         #                  or a pipe-like solid.
4563         #  @param listEdges1, listEdges2 Two bases of the supposed pipe. This
4564         #                                should be lists of edges of theShape.
4565         #  @param theName Object name; when specified, this parameter is used
4566         #         for result publication in the study. Otherwise, if automatic
4567         #         publication is switched on, default value is used for result name.
4568         #
4569         #  @note It is not assumed that exact or approximate copy of theShape
4570         #        can be obtained by applying existing Pipe operation on the
4571         #        resulting "Path" wire taking theBase1 as the base - it is not
4572         #        always possible; though in some particular cases it might work
4573         #        it is not guaranteed. Thus, RestorePath function should not be
4574         #        considered as an exact reverse operation of the Pipe.
4575         #
4576         #  @return New GEOM.GEOM_Object, containing an edge or wire that represent
4577         #                                source pipe's "path".
4578         #
4579         #  @ref tui_creation_pipe_path "Example"
4580         @ManageTransactions("PrimOp")
4581         def RestorePathEdges (self, theShape, listEdges1, listEdges2, theName=None):
4582             """
4583             Build a middle path of a pipe-like shape.
4584             The path shape can be a wire or an edge.
4585
4586             Parameters:
4587                 theShape It can be closed or unclosed pipe-like shell
4588                          or a pipe-like solid.
4589                 listEdges1, listEdges2 Two bases of the supposed pipe. This
4590                                        should be lists of edges of theShape.
4591                 theName Object name; when specified, this parameter is used
4592                         for result publication in the study. Otherwise, if automatic
4593                         publication is switched on, default value is used for result name.
4594
4595             Returns:
4596                 New GEOM_Object, containing an edge or wire that represent
4597                                  source pipe's path.
4598             """
4599             anObj = self.PrimOp.RestorePathEdges(theShape, listEdges1, listEdges2)
4600             RaiseIfFailed("RestorePath", self.PrimOp)
4601             self._autoPublish(anObj, theName, "path")
4602             return anObj
4603
4604         # end of l3_complex
4605         ## @}
4606
4607         ## @addtogroup l3_basic_go
4608         ## @{
4609
4610         ## Create a linear edge with specified ends.
4611         #  @param thePnt1 Point for the first end of edge.
4612         #  @param thePnt2 Point for the second end of edge.
4613         #  @param theName Object name; when specified, this parameter is used
4614         #         for result publication in the study. Otherwise, if automatic
4615         #         publication is switched on, default value is used for result name.
4616         #
4617         #  @return New GEOM.GEOM_Object, containing the created edge.
4618         #
4619         #  @ref tui_creation_edge "Example"
4620         @ManageTransactions("ShapesOp")
4621         def MakeEdge(self, thePnt1, thePnt2, theName=None):
4622             """
4623             Create a linear edge with specified ends.
4624
4625             Parameters:
4626                 thePnt1 Point for the first end of edge.
4627                 thePnt2 Point for the second end of edge.
4628                 theName Object name; when specified, this parameter is used
4629                         for result publication in the study. Otherwise, if automatic
4630                         publication is switched on, default value is used for result name.
4631
4632             Returns:
4633                 New GEOM.GEOM_Object, containing the created edge.
4634             """
4635             # Example: see GEOM_TestAll.py
4636             anObj = self.ShapesOp.MakeEdge(thePnt1, thePnt2)
4637             RaiseIfFailed("MakeEdge", self.ShapesOp)
4638             self._autoPublish(anObj, theName, "edge")
4639             return anObj
4640
4641         ## Create a new edge, corresponding to the given length on the given curve.
4642         #  @param theRefCurve The referenced curve (edge).
4643         #  @param theLength Length on the referenced curve. It can be negative.
4644         #  @param theStartPoint Any point can be selected for it, the new edge will begin
4645         #                       at the end of \a theRefCurve, close to the selected point.
4646         #                       If None, start from the first point of \a theRefCurve.
4647         #  @param theName Object name; when specified, this parameter is used
4648         #         for result publication in the study. Otherwise, if automatic
4649         #         publication is switched on, default value is used for result name.
4650         #
4651         #  @return New GEOM.GEOM_Object, containing the created edge.
4652         #
4653         #  @ref tui_creation_edge "Example"
4654         @ManageTransactions("ShapesOp")
4655         def MakeEdgeOnCurveByLength(self, theRefCurve, theLength, theStartPoint = None, theName=None):
4656             """
4657             Create a new edge, corresponding to the given length on the given curve.
4658
4659             Parameters:
4660                 theRefCurve The referenced curve (edge).
4661                 theLength Length on the referenced curve. It can be negative.
4662                 theStartPoint Any point can be selected for it, the new edge will begin
4663                               at the end of theRefCurve, close to the selected point.
4664                               If None, start from the first point of theRefCurve.
4665                 theName Object name; when specified, this parameter is used
4666                         for result publication in the study. Otherwise, if automatic
4667                         publication is switched on, default value is used for result name.
4668
4669             Returns:
4670                 New GEOM.GEOM_Object, containing the created edge.
4671             """
4672             # Example: see GEOM_TestAll.py
4673             theLength, Parameters = ParseParameters(theLength)
4674             anObj = self.ShapesOp.MakeEdgeOnCurveByLength(theRefCurve, theLength, theStartPoint)
4675             RaiseIfFailed("MakeEdgeOnCurveByLength", self.ShapesOp)
4676             anObj.SetParameters(Parameters)
4677             self._autoPublish(anObj, theName, "edge")
4678             return anObj
4679
4680         ## Create an edge from specified wire.
4681         #  @param theWire source Wire
4682         #  @param theLinearTolerance linear tolerance value (default = 1e-07)
4683         #  @param theAngularTolerance angular tolerance value (default = 1e-12)
4684         #  @param theName Object name; when specified, this parameter is used
4685         #         for result publication in the study. Otherwise, if automatic
4686         #         publication is switched on, default value is used for result name.
4687         #
4688         #  @return New GEOM.GEOM_Object, containing the created edge.
4689         #
4690         #  @ref tui_creation_edge "Example"
4691         @ManageTransactions("ShapesOp")
4692         def MakeEdgeWire(self, theWire, theLinearTolerance = 1e-07, theAngularTolerance = 1e-12, theName=None):
4693             """
4694             Create an edge from specified wire.
4695
4696             Parameters:
4697                 theWire source Wire
4698                 theLinearTolerance linear tolerance value (default = 1e-07)
4699                 theAngularTolerance angular tolerance value (default = 1e-12)
4700                 theName Object name; when specified, this parameter is used
4701                         for result publication in the study. Otherwise, if automatic
4702                         publication is switched on, default value is used for result name.
4703
4704             Returns:
4705                 New GEOM.GEOM_Object, containing the created edge.
4706             """
4707             # Example: see GEOM_TestAll.py
4708             anObj = self.ShapesOp.MakeEdgeWire(theWire, theLinearTolerance, theAngularTolerance)
4709             RaiseIfFailed("MakeEdgeWire", self.ShapesOp)
4710             self._autoPublish(anObj, theName, "edge")
4711             return anObj
4712
4713         ## Create a wire from the set of edges and wires.
4714         #  @param theEdgesAndWires List of edges and/or wires.
4715         #  @param theTolerance Maximum distance between vertices, that will be merged.
4716         #                      Values less than 1e-07 are equivalent to 1e-07 (Precision::Confusion())
4717         #  @param theName Object name; when specified, this parameter is used
4718         #         for result publication in the study. Otherwise, if automatic
4719         #         publication is switched on, default value is used for result name.
4720         #
4721         #  @return New GEOM.GEOM_Object, containing the created wire.
4722         #
4723         #  @ref tui_creation_wire "Example"
4724         @ManageTransactions("ShapesOp")
4725         def MakeWire(self, theEdgesAndWires, theTolerance = 1e-07, theName=None):
4726             """
4727             Create a wire from the set of edges and wires.
4728
4729             Parameters:
4730                 theEdgesAndWires List of edges and/or wires.
4731                 theTolerance Maximum distance between vertices, that will be merged.
4732                              Values less than 1e-07 are equivalent to 1e-07 (Precision::Confusion()).
4733                 theName Object name; when specified, this parameter is used
4734                         for result publication in the study. Otherwise, if automatic
4735                         publication is switched on, default value is used for result name.
4736
4737             Returns:
4738                 New GEOM.GEOM_Object, containing the created wire.
4739             """
4740             # Example: see GEOM_TestAll.py
4741             anObj = self.ShapesOp.MakeWire(theEdgesAndWires, theTolerance)
4742             RaiseIfFailed("MakeWire", self.ShapesOp)
4743             self._autoPublish(anObj, theName, "wire")
4744             return anObj
4745
4746         ## Create a face on the given wire.
4747         #  @param theWire closed Wire or Edge to build the face on.
4748         #  @param isPlanarWanted If TRUE, the algorithm tries to build a planar face.
4749         #                        If the tolerance of the obtained planar face is less
4750         #                        than 1e-06, this face will be returned, otherwise the
4751         #                        algorithm tries to build any suitable face on the given
4752         #                        wire and prints a warning message.
4753         #  @param theName Object name; when specified, this parameter is used
4754         #         for result publication in the study. Otherwise, if automatic
4755         #         publication is switched on, default value is used for result name.
4756         #
4757         #  @return New GEOM.GEOM_Object, containing the created face (compound of faces).
4758         #
4759         #  @ref tui_creation_face "Example"
4760         @ManageTransactions("ShapesOp")
4761         def MakeFace(self, theWire, isPlanarWanted, theName=None, raiseException=False):
4762             """
4763             Create a face on the given wire.
4764
4765             Parameters:
4766                 theWire closed Wire or Edge to build the face on.
4767                 isPlanarWanted If TRUE, the algorithm tries to build a planar face.
4768                                If the tolerance of the obtained planar face is less
4769                                than 1e-06, this face will be returned, otherwise the
4770                                algorithm tries to build any suitable face on the given
4771                                wire and prints a warning message.
4772                 theName Object name; when specified, this parameter is used
4773                         for result publication in the study. Otherwise, if automatic
4774                         publication is switched on, default value is used for result name.
4775
4776             Returns:
4777                 New GEOM.GEOM_Object, containing the created face (compound of faces).
4778             """
4779             # Example: see GEOM_TestAll.py
4780             anObj = self.ShapesOp.MakeFace(theWire, isPlanarWanted)
4781             if isPlanarWanted and anObj is not None and self.ShapesOp.GetErrorCode() == "MAKE_FACE_TOLERANCE_TOO_BIG":
4782                 PrintOrRaise("WARNING: Cannot build a planar face: required tolerance is too big. Non-planar face is built.",raiseException)
4783             else:
4784                 RaiseIfFailed("MakeFace", self.ShapesOp)
4785             self._autoPublish(anObj, theName, "face")
4786             return anObj
4787
4788         ## Create a face on the given wires set.
4789         #  @param theWires List of closed wires or edges to build the face on.
4790         #  @param isPlanarWanted If TRUE, the algorithm tries to build a planar face.
4791         #                        If the tolerance of the obtained planar face is less
4792         #                        than 1e-06, this face will be returned, otherwise the
4793         #                        algorithm tries to build any suitable face on the given
4794         #                        wire and prints a warning message.
4795         #  @param theName Object name; when specified, this parameter is used
4796         #         for result publication in the study. Otherwise, if automatic
4797         #         publication is switched on, default value is used for result name.
4798         #
4799         #  @return New GEOM.GEOM_Object, containing the created face (compound of faces).
4800         #
4801         #  @ref tui_creation_face "Example"
4802         @ManageTransactions("ShapesOp")
4803         def MakeFaceWires(self, theWires, isPlanarWanted, theName=None, raiseException=False):
4804             """
4805             Create a face on the given wires set.
4806
4807             Parameters:
4808                 theWires List of closed wires or edges to build the face on.
4809                 isPlanarWanted If TRUE, the algorithm tries to build a planar face.
4810                                If the tolerance of the obtained planar face is less
4811                                than 1e-06, this face will be returned, otherwise the
4812                                algorithm tries to build any suitable face on the given
4813                                wire and prints a warning message.
4814                 theName Object name; when specified, this parameter is used
4815                         for result publication in the study. Otherwise, if automatic
4816                         publication is switched on, default value is used for result name.
4817
4818             Returns:
4819                 New GEOM.GEOM_Object, containing the created face (compound of faces).
4820             """
4821             # Example: see GEOM_TestAll.py
4822             anObj = self.ShapesOp.MakeFaceWires(ToList(theWires), isPlanarWanted)
4823             if isPlanarWanted and anObj is not None and self.ShapesOp.GetErrorCode() == "MAKE_FACE_TOLERANCE_TOO_BIG":
4824                 PrintOrRaise("WARNING: Cannot build a planar face: required tolerance is too big. Non-planar face is built.",raiseException)
4825             else:
4826                 RaiseIfFailed("MakeFaceWires", self.ShapesOp)
4827             self._autoPublish(anObj, theName, "face")
4828             return anObj
4829
4830         ## See MakeFaceWires() method for details.
4831         #
4832         #  @ref tui_creation_face "Example 1"
4833         #  \n @ref swig_MakeFaces  "Example 2"
4834         def MakeFaces(self, theWires, isPlanarWanted, theName=None):
4835             """
4836             See geompy.MakeFaceWires() method for details.
4837             """
4838             # Example: see GEOM_TestOthers.py
4839             # note: auto-publishing is done in self.MakeFaceWires()
4840             anObj = self.MakeFaceWires(theWires, isPlanarWanted, theName)
4841             return anObj
4842
4843         ## Create a face based on a surface from given face bounded
4844         #  by given wire.
4845         #  @param theFace the face whose surface is used to create a new face.
4846         #  @param theWire the wire that will bound a new face.
4847         #  @param theName Object name; when specified, this parameter is used
4848         #         for result publication in the study. Otherwise, if automatic
4849         #         publication is switched on, default value is used for result name.
4850         #
4851         #  @return New GEOM.GEOM_Object, containing the created face.
4852         #
4853         #  @ref tui_creation_face "Example"
4854         @ManageTransactions("ShapesOp")
4855         def MakeFaceFromSurface(self, theFace, theWire, theName=None):
4856             """
4857             Create a face based on a surface from given face bounded
4858             by given wire.
4859
4860             Parameters:
4861                 theFace the face whose surface is used to create a new face.
4862                 theWire the wire that will bound a new face.
4863                 theName Object name; when specified, this parameter is used
4864                         for result publication in the study. Otherwise, if automatic
4865                         publication is switched on, default value is used for result name.
4866
4867             Returns:
4868                 New GEOM.GEOM_Object, containing the created face.
4869             """
4870             # Example: see GEOM_TestAll.py
4871             anObj = self.ShapesOp.MakeFaceFromSurface(theFace, theWire)
4872             RaiseIfFailed("MakeFaceFromSurface", self.ShapesOp)
4873             self._autoPublish(anObj, theName, "face")
4874             return anObj
4875           
4876         ## Create a face from a set of edges with the given constraints.
4877         #  @param theConstraints List of edges and constraint faces (as a sequence of a Edge + Face couples):
4878         #         - edges should form a closed wire;
4879         #         - for each edge, constraint face is optional: if a constraint face is missing
4880         #           for some edge, this means that there no constraint associated with this edge.
4881         #  @param theName Object name; when specified, this parameter is used
4882         #         for result publication in the study. Otherwise, if automatic
4883         #         publication is switched on, default value is used for result name.
4884         # 
4885         # @return New GEOM.GEOM_Object, containing the created face.
4886         # 
4887         # @ref tui_creation_face "Example"
4888         @ManageTransactions("ShapesOp")
4889         def MakeFaceWithConstraints(self, theConstraints, theName=None):
4890             """
4891             Create a face from a set of edges with the given constraints.
4892
4893             Parameters:
4894                 theConstraints List of edges and constraint faces (as a sequence of a Edge + Face couples):
4895                         - edges should form a closed wire;
4896                         - for each edge, constraint face is optional: if a constraint face is missing
4897                           for some edge, this means that there no constraint associated with this edge.
4898                 theName Object name; when specified, this parameter is used
4899                         for result publication in the study. Otherwise, if automatic
4900                         publication is switched on, default value is used for result name.
4901
4902             Returns:
4903                 New GEOM.GEOM_Object, containing the created face.
4904             """
4905             # Example: see GEOM_TestAll.py
4906             anObj = self.ShapesOp.MakeFaceWithConstraints(theConstraints)
4907             if anObj is None:
4908                 RaiseIfFailed("MakeFaceWithConstraints", self.ShapesOp)
4909             self._autoPublish(anObj, theName, "face")
4910             return anObj
4911
4912         ## Create a shell from the set of faces, shells and/or compounds of faces.
4913         #  @param theFacesAndShells List of faces, shells and/or compounds of faces.
4914         #  @param theName Object name; when specified, this parameter is used
4915         #         for result publication in the study. Otherwise, if automatic
4916         #         publication is switched on, default value is used for result name.
4917         #
4918         #  @return New GEOM.GEOM_Object, containing the created shell (compound of shells).
4919         #
4920         #  @ref tui_creation_shell "Example"
4921         @ManageTransactions("ShapesOp")
4922         def MakeShell(self, theFacesAndShells, theName=None):
4923             """
4924             Create a shell from the set of faces and shells.
4925
4926             Parameters:
4927                 theFacesAndShells List of faces and/or shells.
4928                 theName Object name; when specified, this parameter is used
4929                         for result publication in the study. Otherwise, if automatic
4930                         publication is switched on, default value is used for result name.
4931
4932             Returns:
4933                 New GEOM.GEOM_Object, containing the created shell (compound of shells).
4934             """
4935             # Example: see GEOM_TestAll.py
4936             anObj = self.ShapesOp.MakeShell( ToList( theFacesAndShells ))
4937             RaiseIfFailed("MakeShell", self.ShapesOp)
4938             self._autoPublish(anObj, theName, "shell")
4939             return anObj
4940
4941         ## Create a solid, bounded by the given shells.
4942         #  @param theShells Sequence of bounding shells.
4943         #  @param theName Object name; when specified, this parameter is used
4944         #         for result publication in the study. Otherwise, if automatic
4945         #         publication is switched on, default value is used for result name.
4946         #
4947         #  @return New GEOM.GEOM_Object, containing the created solid.
4948         #
4949         #  @ref tui_creation_solid "Example"
4950         @ManageTransactions("ShapesOp")
4951         def MakeSolid(self, theShells, theName=None):
4952             """
4953             Create a solid, bounded by the given shells.
4954
4955             Parameters:
4956                 theShells Sequence of bounding shells.
4957                 theName Object name; when specified, this parameter is used
4958                         for result publication in the study. Otherwise, if automatic
4959                         publication is switched on, default value is used for result name.
4960
4961             Returns:
4962                 New GEOM.GEOM_Object, containing the created solid.
4963             """
4964             # Example: see GEOM_TestAll.py
4965             theShells = ToList(theShells)
4966             if len(theShells) == 1:
4967                 descr = self._IsGoodForSolid(theShells[0])
4968                 #if len(descr) > 0:
4969                 #    raise RuntimeError, "MakeSolidShells : " + descr
4970                 if descr == "WRN_SHAPE_UNCLOSED":
4971                     raise RuntimeError("MakeSolidShells : Unable to create solid from unclosed shape")
4972             anObj = self.ShapesOp.MakeSolidShells(theShells)
4973             RaiseIfFailed("MakeSolidShells", self.ShapesOp)
4974             self._autoPublish(anObj, theName, "solid")
4975             return anObj
4976
4977         ## Create a compound of the given shapes.
4978         #  @param theShapes List of shapes to put in compound.
4979         #  @param theName Object name; when specified, this parameter is used
4980         #         for result publication in the study. Otherwise, if automatic
4981         #         publication is switched on, default value is used for result name.
4982         #
4983         #  @return New GEOM.GEOM_Object, containing the created compound.
4984         #
4985         #  @ref tui_creation_compound "Example"
4986         @ManageTransactions("ShapesOp")
4987         def MakeCompound(self, theShapes, theName=None):
4988             """
4989             Create a compound of the given shapes.
4990
4991             Parameters:
4992                 theShapes List of shapes to put in compound.
4993                 theName Object name; when specified, this parameter is used
4994                         for result publication in the study. Otherwise, if automatic
4995                         publication is switched on, default value is used for result name.
4996
4997             Returns:
4998                 New GEOM.GEOM_Object, containing the created compound.
4999             """
5000             # Example: see GEOM_TestAll.py
5001             anObj = self.ShapesOp.MakeCompound(ToList(theShapes))
5002             RaiseIfFailed("MakeCompound", self.ShapesOp)
5003             self._autoPublish(anObj, theName, "compound")
5004             return anObj
5005         
5006         ## Create a solid (or solids) from the set of faces and/or shells.
5007         #  @param theFacesOrShells List of faces and/or shells.
5008         #  @param isIntersect If TRUE, forces performing intersections
5009         #         between arguments; otherwise (default) intersection is not performed.
5010         #  @param theName Object name; when specified, this parameter is used
5011         #         for result publication in the study. Otherwise, if automatic
5012         #         publication is switched on, default value is used for result name.
5013         #
5014         #  @return New GEOM.GEOM_Object, containing the created solid (or compound of solids).
5015         #
5016         #  @ref tui_creation_solid_from_faces "Example"
5017         @ManageTransactions("ShapesOp")
5018         def MakeSolidFromConnectedFaces(self, theFacesOrShells, isIntersect = False, theName=None):
5019             """
5020             Create a solid (or solids) from the set of connected faces and/or shells.
5021
5022             Parameters:
5023                 theFacesOrShells List of faces and/or shells.
5024                 isIntersect If TRUE, forces performing intersections
5025                         between arguments; otherwise (default) intersection is not performed
5026                 theName Object name; when specified, this parameter is used.
5027                         for result publication in the study. Otherwise, if automatic
5028                         publication is switched on, default value is used for result name.
5029
5030             Returns:
5031                 New GEOM.GEOM_Object, containing the created solid (or compound of solids).
5032             """
5033             # Example: see GEOM_TestAll.py
5034             anObj = self.ShapesOp.MakeSolidFromConnectedFaces(theFacesOrShells, isIntersect)
5035             RaiseIfFailed("MakeSolidFromConnectedFaces", self.ShapesOp)
5036             self._autoPublish(anObj, theName, "solid")
5037             return anObj
5038
5039         # end of l3_basic_go
5040         ## @}
5041
5042         ## @addtogroup l2_measure
5043         ## @{
5044
5045         ## Gives quantity of faces in the given shape.
5046         #  @param theShape Shape to count faces of.
5047         #  @return Quantity of faces.
5048         #
5049         #  @ref swig_NumberOf "Example"
5050         @ManageTransactions("ShapesOp")
5051         def NumberOfFaces(self, theShape):
5052             """
5053             Gives quantity of faces in the given shape.
5054
5055             Parameters:
5056                 theShape Shape to count faces of.
5057
5058             Returns:
5059                 Quantity of faces.
5060             """
5061             # Example: see GEOM_TestOthers.py
5062             nb_faces = self.ShapesOp.NumberOfFaces(theShape)
5063             RaiseIfFailed("NumberOfFaces", self.ShapesOp)
5064             return nb_faces
5065
5066         ## Gives quantity of edges in the given shape.
5067         #  @param theShape Shape to count edges of.
5068         #  @return Quantity of edges.
5069         #
5070         #  @ref swig_NumberOf "Example"
5071         @ManageTransactions("ShapesOp")
5072         def NumberOfEdges(self, theShape):
5073             """
5074             Gives quantity of edges in the given shape.
5075
5076             Parameters:
5077                 theShape Shape to count edges of.
5078
5079             Returns:
5080                 Quantity of edges.
5081             """
5082             # Example: see GEOM_TestOthers.py
5083             nb_edges = self.ShapesOp.NumberOfEdges(theShape)
5084             RaiseIfFailed("NumberOfEdges", self.ShapesOp)
5085             return nb_edges
5086
5087         ## Gives quantity of sub-shapes of type theShapeType in the given shape.
5088         #  @param theShape Shape to count sub-shapes of.
5089         #  @param theShapeType Type of sub-shapes to count (see ShapeType())
5090         #  @return Quantity of sub-shapes of given type.
5091         #
5092         #  @ref swig_NumberOf "Example"
5093         @ManageTransactions("ShapesOp")
5094         def NumberOfSubShapes(self, theShape, theShapeType):
5095             """
5096             Gives quantity of sub-shapes of type theShapeType in the given shape.
5097
5098             Parameters:
5099                 theShape Shape to count sub-shapes of.
5100                 theShapeType Type of sub-shapes to count (see geompy.ShapeType)
5101
5102             Returns:
5103                 Quantity of sub-shapes of given type.
5104             """
5105             # Example: see GEOM_TestOthers.py
5106             nb_ss = self.ShapesOp.NumberOfSubShapes(theShape, theShapeType)
5107             RaiseIfFailed("NumberOfSubShapes", self.ShapesOp)
5108             return nb_ss
5109
5110         ## Gives quantity of solids in the given shape.
5111         #  @param theShape Shape to count solids in.
5112         #  @return Quantity of solids.
5113         #
5114         #  @ref swig_NumberOf "Example"
5115         @ManageTransactions("ShapesOp")
5116         def NumberOfSolids(self, theShape):
5117             """
5118             Gives quantity of solids in the given shape.
5119
5120             Parameters:
5121                 theShape Shape to count solids in.
5122
5123             Returns:
5124                 Quantity of solids.
5125             """
5126             # Example: see GEOM_TestOthers.py
5127             nb_solids = self.ShapesOp.NumberOfSubShapes(theShape, self.ShapeType["SOLID"])
5128             RaiseIfFailed("NumberOfSolids", self.ShapesOp)
5129             return nb_solids
5130
5131         # end of l2_measure
5132         ## @}
5133
5134         ## @addtogroup l3_healing
5135         ## @{
5136
5137         ## Reverses an orientation the given shape.
5138         #  @param theShape Shape to be reversed.
5139         #  @param theName Object name; when specified, this parameter is used
5140         #         for result publication in the study. Otherwise, if automatic
5141         #         publication is switched on, default value is used for result name.
5142         #
5143         #  @return The reversed copy of theShape.
5144         #
5145         #  @ref swig_ChangeOrientation "Example"
5146         @ManageTransactions("ShapesOp")
5147         def ChangeOrientation(self, theShape, theName=None):
5148             """
5149             Reverses an orientation the given shape.
5150
5151             Parameters:
5152                 theShape Shape to be reversed.
5153                 theName Object name; when specified, this parameter is used
5154                         for result publication in the study. Otherwise, if automatic
5155                         publication is switched on, default value is used for result name.
5156
5157             Returns:
5158                 The reversed copy of theShape.
5159             """
5160             # Example: see GEOM_TestAll.py
5161             anObj = self.ShapesOp.ChangeOrientation(theShape)
5162             RaiseIfFailed("ChangeOrientation", self.ShapesOp)
5163             self._autoPublish(anObj, theName, "reversed")
5164             return anObj
5165
5166         ## See ChangeOrientation() method for details.
5167         #
5168         #  @ref swig_OrientationChange "Example"
5169         def OrientationChange(self, theShape, theName=None):
5170             """
5171             See geompy.ChangeOrientation method for details.
5172             """
5173             # Example: see GEOM_TestOthers.py
5174             # note: auto-publishing is done in self.ChangeOrientation()
5175             anObj = self.ChangeOrientation(theShape, theName)
5176             return anObj
5177
5178         # end of l3_healing
5179         ## @}
5180
5181         ## @addtogroup l4_obtain
5182         ## @{
5183
5184         ## Retrieve all free faces from the given shape.
5185         #  Free face is a face, which is not shared between two shells of the shape.
5186         #  @param theShape Shape to find free faces in.
5187         #  @return List of IDs of all free faces, contained in theShape.
5188         #
5189         #  @ref tui_free_faces_page "Example"
5190         @ManageTransactions("ShapesOp")
5191         def GetFreeFacesIDs(self,theShape):
5192             """
5193             Retrieve all free faces from the given shape.
5194             Free face is a face, which is not shared between two shells of the shape.
5195
5196             Parameters:
5197                 theShape Shape to find free faces in.
5198
5199             Returns:
5200                 List of IDs of all free faces, contained in theShape.
5201             """
5202             # Example: see GEOM_TestOthers.py
5203             anIDs = self.ShapesOp.GetFreeFacesIDs(theShape)
5204             RaiseIfFailed("GetFreeFacesIDs", self.ShapesOp)
5205             return anIDs
5206
5207         ## Get all sub-shapes of theShape1 of the given type, shared with theShape2.
5208         #  @param theShape1 Shape to find sub-shapes in.
5209         #  @param theShape2 Shape to find shared sub-shapes with.
5210         #  @param theShapeType Type of sub-shapes to be retrieved.
5211         #  @param theName Object name; when specified, this parameter is used
5212         #         for result publication in the study. Otherwise, if automatic
5213         #         publication is switched on, default value is used for result name.
5214         #
5215         #  @return List of sub-shapes of theShape1, shared with theShape2.
5216         #
5217         #  @ref swig_GetSharedShapes "Example"
5218         @ManageTransactions("ShapesOp")
5219         def GetSharedShapes(self, theShape1, theShape2, theShapeType, theName=None):
5220             """
5221             Get all sub-shapes of theShape1 of the given type, shared with theShape2.
5222
5223             Parameters:
5224                 theShape1 Shape to find sub-shapes in.
5225                 theShape2 Shape to find shared sub-shapes with.
5226                 theShapeType Type of sub-shapes to be retrieved.
5227                 theName Object name; when specified, this parameter is used
5228                         for result publication in the study. Otherwise, if automatic
5229                         publication is switched on, default value is used for result name.
5230
5231             Returns:
5232                 List of sub-shapes of theShape1, shared with theShape2.
5233             """
5234             # Example: see GEOM_TestOthers.py
5235             aList = self.ShapesOp.GetSharedShapes(theShape1, theShape2, theShapeType)
5236             RaiseIfFailed("GetSharedShapes", self.ShapesOp)
5237             self._autoPublish(aList, theName, "shared")
5238             return aList
5239
5240         ## Get sub-shapes, shared by input shapes.
5241         #  @param theShapes Either a list or compound of shapes to find common sub-shapes of.
5242         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType()).
5243         #  @param theMultiShare Specifies what type of shares should be checked:
5244         #         - @c True (default): search sub-shapes from 1st input shape shared with all other input shapes;
5245         #         - @c False: causes to search sub-shapes shared between couples of input shapes.
5246         #  @param theName Object name; when specified, this parameter is used
5247         #         for result publication in the study. Otherwise, if automatic
5248         #         publication is switched on, default value is used for result name.
5249         #
5250         #  @note If @a theShapes contains single compound, the shares between all possible couples of 
5251         #        its top-level shapes are returned; otherwise, only shares between 1st input shape
5252         #        and all rest input shapes are returned.
5253         #
5254         #  @return List of all found sub-shapes.
5255         #
5256         #  Examples:
5257         #  - @ref tui_shared_shapes "Example 1"
5258         #  - @ref swig_GetSharedShapes "Example 2"
5259         @ManageTransactions("ShapesOp")
5260         def GetSharedShapesMulti(self, theShapes, theShapeType, theMultiShare=True, theName=None):
5261             """
5262             Get sub-shapes, shared by input shapes.
5263
5264             Parameters:
5265                 theShapes Either a list or compound of shapes to find common sub-shapes of.
5266                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType).
5267                 theMultiShare Specifies what type of shares should be checked:
5268                   - True (default): search sub-shapes from 1st input shape shared with all other input shapes;
5269                   - False: causes to search sub-shapes shared between couples of input shapes.
5270                 theName Object name; when specified, this parameter is used
5271                         for result publication in the study. Otherwise, if automatic
5272                         publication is switched on, default value is used for result name.
5273
5274             Note: if theShapes contains single compound, the shares between all possible couples of 
5275                   its top-level shapes are returned; otherwise, only shares between 1st input shape
5276                   and all rest input shapes are returned.
5277
5278             Returns:
5279                 List of all found sub-shapes.
5280             """
5281             # Example: see GEOM_TestOthers.py
5282             aList = self.ShapesOp.GetSharedShapesMulti(ToList(theShapes), theShapeType, theMultiShare)
5283             RaiseIfFailed("GetSharedShapesMulti", self.ShapesOp)
5284             self._autoPublish(aList, theName, "shared")
5285             return aList
5286
5287         ## Find in <VAR>theShape</VAR> all sub-shapes of type <VAR>theShapeType</VAR>,
5288         #  situated relatively the specified plane by the certain way,
5289         #  defined through <VAR>theState</VAR> parameter.
5290         #  @param theShape Shape to find sub-shapes of.
5291         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5292         #  @param theAx1 Vector (or line, or linear edge), specifying normal
5293         #                direction and location of the plane to find shapes on.
5294         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5295         #  @param theName Object name; when specified, this parameter is used
5296         #         for result publication in the study. Otherwise, if automatic
5297         #         publication is switched on, default value is used for result name.
5298         #
5299         #  @return List of all found sub-shapes.
5300         #
5301         #  @ref swig_GetShapesOnPlane "Example"
5302         @ManageTransactions("ShapesOp")
5303         def GetShapesOnPlane(self, theShape, theShapeType, theAx1, theState, theName=None):
5304             """
5305             Find in theShape all sub-shapes of type theShapeType,
5306             situated relatively the specified plane by the certain way,
5307             defined through theState parameter.
5308
5309             Parameters:
5310                 theShape Shape to find sub-shapes of.
5311                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5312                 theAx1 Vector (or line, or linear edge), specifying normal
5313                        direction and location of the plane to find shapes on.
5314                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5315                 theName Object name; when specified, this parameter is used
5316                         for result publication in the study. Otherwise, if automatic
5317                         publication is switched on, default value is used for result name.
5318
5319             Returns:
5320                 List of all found sub-shapes.
5321             """
5322             # Example: see GEOM_TestOthers.py
5323             aList = self.ShapesOp.GetShapesOnPlane(theShape, theShapeType, theAx1, theState)
5324             RaiseIfFailed("GetShapesOnPlane", self.ShapesOp)
5325             self._autoPublish(aList, theName, "shapeOnPlane")
5326             return aList
5327
5328         ## Find in <VAR>theShape</VAR> all sub-shapes of type <VAR>theShapeType</VAR>,
5329         #  situated relatively the specified plane by the certain way,
5330         #  defined through <VAR>theState</VAR> parameter.
5331         #  @param theShape Shape to find sub-shapes of.
5332         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5333         #  @param theAx1 Vector (or line, or linear edge), specifying normal
5334         #                direction and location of the plane to find shapes on.
5335         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5336         #
5337         #  @return List of all found sub-shapes indices.
5338         #
5339         #  @ref swig_GetShapesOnPlaneIDs "Example"
5340         @ManageTransactions("ShapesOp")
5341         def GetShapesOnPlaneIDs(self, theShape, theShapeType, theAx1, theState):
5342             """
5343             Find in theShape all sub-shapes of type theShapeType,
5344             situated relatively the specified plane by the certain way,
5345             defined through theState parameter.
5346
5347             Parameters:
5348                 theShape Shape to find sub-shapes of.
5349                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5350                 theAx1 Vector (or line, or linear edge), specifying normal
5351                        direction and location of the plane to find shapes on.
5352                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5353
5354             Returns:
5355                 List of all found sub-shapes indices.
5356             """
5357             # Example: see GEOM_TestOthers.py
5358             aList = self.ShapesOp.GetShapesOnPlaneIDs(theShape, theShapeType, theAx1, theState)
5359             RaiseIfFailed("GetShapesOnPlaneIDs", self.ShapesOp)
5360             return aList
5361
5362         ## Find in <VAR>theShape</VAR> all sub-shapes of type <VAR>theShapeType</VAR>,
5363         #  situated relatively the specified plane by the certain way,
5364         #  defined through <VAR>theState</VAR> parameter.
5365         #  @param theShape Shape to find sub-shapes of.
5366         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5367         #  @param theAx1 Vector (or line, or linear edge), specifying normal
5368         #                direction of the plane to find shapes on.
5369         #  @param thePnt Point specifying location of the plane to find shapes on.
5370         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5371         #  @param theName Object name; when specified, this parameter is used
5372         #         for result publication in the study. Otherwise, if automatic
5373         #         publication is switched on, default value is used for result name.
5374         #
5375         #  @return List of all found sub-shapes.
5376         #
5377         #  @ref swig_GetShapesOnPlaneWithLocation "Example"
5378         @ManageTransactions("ShapesOp")
5379         def GetShapesOnPlaneWithLocation(self, theShape, theShapeType, theAx1, thePnt, theState, theName=None):
5380             """
5381             Find in theShape all sub-shapes of type theShapeType,
5382             situated relatively the specified plane by the certain way,
5383             defined through theState parameter.
5384
5385             Parameters:
5386                 theShape Shape to find sub-shapes of.
5387                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5388                 theAx1 Vector (or line, or linear edge), specifying normal
5389                        direction and location of the plane to find shapes on.
5390                 thePnt Point specifying location of the plane to find shapes on.
5391                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5392                 theName Object name; when specified, this parameter is used
5393                         for result publication in the study. Otherwise, if automatic
5394                         publication is switched on, default value is used for result name.
5395
5396             Returns:
5397                 List of all found sub-shapes.
5398             """
5399             # Example: see GEOM_TestOthers.py
5400             aList = self.ShapesOp.GetShapesOnPlaneWithLocation(theShape, theShapeType,
5401                                                                theAx1, thePnt, theState)
5402             RaiseIfFailed("GetShapesOnPlaneWithLocation", self.ShapesOp)
5403             self._autoPublish(aList, theName, "shapeOnPlane")
5404             return aList
5405
5406         ## Find in <VAR>theShape</VAR> all sub-shapes of type <VAR>theShapeType</VAR>,
5407         #  situated relatively the specified plane by the certain way,
5408         #  defined through <VAR>theState</VAR> parameter.
5409         #  @param theShape Shape to find sub-shapes of.
5410         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5411         #  @param theAx1 Vector (or line, or linear edge), specifying normal
5412         #                direction of the plane to find shapes on.
5413         #  @param thePnt Point specifying location of the plane to find shapes on.
5414         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5415         #
5416         #  @return List of all found sub-shapes indices.
5417         #
5418         #  @ref swig_GetShapesOnPlaneWithLocationIDs "Example"
5419         @ManageTransactions("ShapesOp")
5420         def GetShapesOnPlaneWithLocationIDs(self, theShape, theShapeType, theAx1, thePnt, theState):
5421             """
5422             Find in theShape all sub-shapes of type theShapeType,
5423             situated relatively the specified plane by the certain way,
5424             defined through theState parameter.
5425
5426             Parameters:
5427                 theShape Shape to find sub-shapes of.
5428                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5429                 theAx1 Vector (or line, or linear edge), specifying normal
5430                        direction and location of the plane to find shapes on.
5431                 thePnt Point specifying location of the plane to find shapes on.
5432                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5433
5434             Returns:
5435                 List of all found sub-shapes indices.
5436             """
5437             # Example: see GEOM_TestOthers.py
5438             aList = self.ShapesOp.GetShapesOnPlaneWithLocationIDs(theShape, theShapeType,
5439                                                                   theAx1, thePnt, theState)
5440             RaiseIfFailed("GetShapesOnPlaneWithLocationIDs", self.ShapesOp)
5441             return aList
5442
5443         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
5444         #  the specified cylinder by the certain way, defined through \a theState parameter.
5445         #  @param theShape Shape to find sub-shapes of.
5446         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5447         #  @param theAxis Vector (or line, or linear edge), specifying
5448         #                 axis of the cylinder to find shapes on.
5449         #  @param theRadius Radius of the cylinder to find shapes on.
5450         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5451         #  @param theName Object name; when specified, this parameter is used
5452         #         for result publication in the study. Otherwise, if automatic
5453         #         publication is switched on, default value is used for result name.
5454         #
5455         #  @return List of all found sub-shapes.
5456         #
5457         #  @ref swig_GetShapesOnCylinder "Example"
5458         @ManageTransactions("ShapesOp")
5459         def GetShapesOnCylinder(self, theShape, theShapeType, theAxis, theRadius, theState, theName=None):
5460             """
5461             Find in theShape all sub-shapes of type theShapeType, situated relatively
5462             the specified cylinder by the certain way, defined through theState parameter.
5463
5464             Parameters:
5465                 theShape Shape to find sub-shapes of.
5466                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5467                 theAxis Vector (or line, or linear edge), specifying
5468                         axis of the cylinder to find shapes on.
5469                 theRadius Radius of the cylinder to find shapes on.
5470                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5471                 theName Object name; when specified, this parameter is used
5472                         for result publication in the study. Otherwise, if automatic
5473                         publication is switched on, default value is used for result name.
5474
5475             Returns:
5476                 List of all found sub-shapes.
5477             """
5478             # Example: see GEOM_TestOthers.py
5479             aList = self.ShapesOp.GetShapesOnCylinder(theShape, theShapeType, theAxis, theRadius, theState)
5480             RaiseIfFailed("GetShapesOnCylinder", self.ShapesOp)
5481             self._autoPublish(aList, theName, "shapeOnCylinder")
5482             return aList
5483
5484         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
5485         #  the specified cylinder by the certain way, defined through \a theState parameter.
5486         #  @param theShape Shape to find sub-shapes of.
5487         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5488         #  @param theAxis Vector (or line, or linear edge), specifying
5489         #                 axis of the cylinder to find shapes on.
5490         #  @param theRadius Radius of the cylinder to find shapes on.
5491         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5492         #
5493         #  @return List of all found sub-shapes indices.
5494         #
5495         #  @ref swig_GetShapesOnCylinderIDs "Example"
5496         @ManageTransactions("ShapesOp")
5497         def GetShapesOnCylinderIDs(self, theShape, theShapeType, theAxis, theRadius, theState):
5498             """
5499             Find in theShape all sub-shapes of type theShapeType, situated relatively
5500             the specified cylinder by the certain way, defined through theState parameter.
5501
5502             Parameters:
5503                 theShape Shape to find sub-shapes of.
5504                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5505                 theAxis Vector (or line, or linear edge), specifying
5506                         axis of the cylinder to find shapes on.
5507                 theRadius Radius of the cylinder to find shapes on.
5508                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5509
5510             Returns:
5511                 List of all found sub-shapes indices.
5512             """
5513             # Example: see GEOM_TestOthers.py
5514             aList = self.ShapesOp.GetShapesOnCylinderIDs(theShape, theShapeType, theAxis, theRadius, theState)
5515             RaiseIfFailed("GetShapesOnCylinderIDs", self.ShapesOp)
5516             return aList
5517
5518         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
5519         #  the specified cylinder by the certain way, defined through \a theState parameter.
5520         #  @param theShape Shape to find sub-shapes of.
5521         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5522         #  @param theAxis Vector (or line, or linear edge), specifying
5523         #                 axis of the cylinder to find shapes on.
5524         #  @param thePnt Point specifying location of the bottom of the cylinder.
5525         #  @param theRadius Radius of the cylinder to find shapes on.
5526         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5527         #  @param theName Object name; when specified, this parameter is used
5528         #         for result publication in the study. Otherwise, if automatic
5529         #         publication is switched on, default value is used for result name.
5530         #
5531         #  @return List of all found sub-shapes.
5532         #
5533         #  @ref swig_GetShapesOnCylinderWithLocation "Example"
5534         @ManageTransactions("ShapesOp")
5535         def GetShapesOnCylinderWithLocation(self, theShape, theShapeType, theAxis, thePnt, theRadius, theState, theName=None):
5536             """
5537             Find in theShape all sub-shapes of type theShapeType, situated relatively
5538             the specified cylinder by the certain way, defined through theState parameter.
5539
5540             Parameters:
5541                 theShape Shape to find sub-shapes of.
5542                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5543                 theAxis Vector (or line, or linear edge), specifying
5544                         axis of the cylinder to find shapes on.
5545                 theRadius Radius of the cylinder to find shapes on.
5546                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5547                 theName Object name; when specified, this parameter is used
5548                         for result publication in the study. Otherwise, if automatic
5549                         publication is switched on, default value is used for result name.
5550
5551             Returns:
5552                 List of all found sub-shapes.
5553             """
5554             # Example: see GEOM_TestOthers.py
5555             aList = self.ShapesOp.GetShapesOnCylinderWithLocation(theShape, theShapeType, theAxis, thePnt, theRadius, theState)
5556             RaiseIfFailed("GetShapesOnCylinderWithLocation", self.ShapesOp)
5557             self._autoPublish(aList, theName, "shapeOnCylinder")
5558             return aList
5559
5560         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
5561         #  the specified cylinder by the certain way, defined through \a theState parameter.
5562         #  @param theShape Shape to find sub-shapes of.
5563         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5564         #  @param theAxis Vector (or line, or linear edge), specifying
5565         #                 axis of the cylinder to find shapes on.
5566         #  @param thePnt Point specifying location of the bottom of the cylinder.
5567         #  @param theRadius Radius of the cylinder to find shapes on.
5568         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5569         #
5570         #  @return List of all found sub-shapes indices
5571         #
5572         #  @ref swig_GetShapesOnCylinderWithLocationIDs "Example"
5573         @ManageTransactions("ShapesOp")
5574         def GetShapesOnCylinderWithLocationIDs(self, theShape, theShapeType, theAxis, thePnt, theRadius, theState):
5575             """
5576             Find in theShape all sub-shapes of type theShapeType, situated relatively
5577             the specified cylinder by the certain way, defined through theState parameter.
5578
5579             Parameters:
5580                 theShape Shape to find sub-shapes of.
5581                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5582                 theAxis Vector (or line, or linear edge), specifying
5583                         axis of the cylinder to find shapes on.
5584                 theRadius Radius of the cylinder to find shapes on.
5585                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5586
5587             Returns:
5588                 List of all found sub-shapes indices.
5589             """
5590             # Example: see GEOM_TestOthers.py
5591             aList = self.ShapesOp.GetShapesOnCylinderWithLocationIDs(theShape, theShapeType, theAxis, thePnt, theRadius, theState)
5592             RaiseIfFailed("GetShapesOnCylinderWithLocationIDs", self.ShapesOp)
5593             return aList
5594
5595         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
5596         #  the specified sphere by the certain way, defined through \a theState parameter.
5597         #  @param theShape Shape to find sub-shapes of.
5598         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5599         #  @param theCenter Point, specifying center of the sphere to find shapes on.
5600         #  @param theRadius Radius of the sphere to find shapes on.
5601         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5602         #  @param theName Object name; when specified, this parameter is used
5603         #         for result publication in the study. Otherwise, if automatic
5604         #         publication is switched on, default value is used for result name.
5605         #
5606         #  @return List of all found sub-shapes.
5607         #
5608         #  @ref swig_GetShapesOnSphere "Example"
5609         @ManageTransactions("ShapesOp")
5610         def GetShapesOnSphere(self, theShape, theShapeType, theCenter, theRadius, theState, theName=None):
5611             """
5612             Find in theShape all sub-shapes of type theShapeType, situated relatively
5613             the specified sphere by the certain way, defined through theState parameter.
5614
5615             Parameters:
5616                 theShape Shape to find sub-shapes of.
5617                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5618                 theCenter Point, specifying center of the sphere to find shapes on.
5619                 theRadius Radius of the sphere to find shapes on.
5620                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5621                 theName Object name; when specified, this parameter is used
5622                         for result publication in the study. Otherwise, if automatic
5623                         publication is switched on, default value is used for result name.
5624
5625             Returns:
5626                 List of all found sub-shapes.
5627             """
5628             # Example: see GEOM_TestOthers.py
5629             aList = self.ShapesOp.GetShapesOnSphere(theShape, theShapeType, theCenter, theRadius, theState)
5630             RaiseIfFailed("GetShapesOnSphere", self.ShapesOp)
5631             self._autoPublish(aList, theName, "shapeOnSphere")
5632             return aList
5633
5634         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
5635         #  the specified sphere by the certain way, defined through \a theState parameter.
5636         #  @param theShape Shape to find sub-shapes of.
5637         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5638         #  @param theCenter Point, specifying center of the sphere to find shapes on.
5639         #  @param theRadius Radius of the sphere to find shapes on.
5640         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5641         #
5642         #  @return List of all found sub-shapes indices.
5643         #
5644         #  @ref swig_GetShapesOnSphereIDs "Example"
5645         @ManageTransactions("ShapesOp")
5646         def GetShapesOnSphereIDs(self, theShape, theShapeType, theCenter, theRadius, theState):
5647             """
5648             Find in theShape all sub-shapes of type theShapeType, situated relatively
5649             the specified sphere by the certain way, defined through theState parameter.
5650
5651             Parameters:
5652                 theShape Shape to find sub-shapes of.
5653                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5654                 theCenter Point, specifying center of the sphere to find shapes on.
5655                 theRadius Radius of the sphere to find shapes on.
5656                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5657
5658             Returns:
5659                 List of all found sub-shapes indices.
5660             """
5661             # Example: see GEOM_TestOthers.py
5662             aList = self.ShapesOp.GetShapesOnSphereIDs(theShape, theShapeType, theCenter, theRadius, theState)
5663             RaiseIfFailed("GetShapesOnSphereIDs", self.ShapesOp)
5664             return aList
5665
5666         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
5667         #  the specified quadrangle by the certain way, defined through \a theState parameter.
5668         #  @param theShape Shape to find sub-shapes of.
5669         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5670         #  @param theTopLeftPoint Point, specifying top left corner of a quadrangle
5671         #  @param theTopRightPoint Point, specifying top right corner of a quadrangle
5672         #  @param theBottomLeftPoint Point, specifying bottom left corner of a quadrangle
5673         #  @param theBottomRightPoint Point, specifying bottom right corner of a quadrangle
5674         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5675         #  @param theName Object name; when specified, this parameter is used
5676         #         for result publication in the study. Otherwise, if automatic
5677         #         publication is switched on, default value is used for result name.
5678         #
5679         #  @return List of all found sub-shapes.
5680         #
5681         #  @ref swig_GetShapesOnQuadrangle "Example"
5682         @ManageTransactions("ShapesOp")
5683         def GetShapesOnQuadrangle(self, theShape, theShapeType,
5684                                   theTopLeftPoint, theTopRightPoint,
5685                                   theBottomLeftPoint, theBottomRightPoint, theState, theName=None):
5686             """
5687             Find in theShape all sub-shapes of type theShapeType, situated relatively
5688             the specified quadrangle by the certain way, defined through theState parameter.
5689
5690             Parameters:
5691                 theShape Shape to find sub-shapes of.
5692                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5693                 theTopLeftPoint Point, specifying top left corner of a quadrangle
5694                 theTopRightPoint Point, specifying top right corner of a quadrangle
5695                 theBottomLeftPoint Point, specifying bottom left corner of a quadrangle
5696                 theBottomRightPoint Point, specifying bottom right corner of a quadrangle
5697                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5698                 theName Object name; when specified, this parameter is used
5699                         for result publication in the study. Otherwise, if automatic
5700                         publication is switched on, default value is used for result name.
5701
5702             Returns:
5703                 List of all found sub-shapes.
5704             """
5705             # Example: see GEOM_TestOthers.py
5706             aList = self.ShapesOp.GetShapesOnQuadrangle(theShape, theShapeType,
5707                                                         theTopLeftPoint, theTopRightPoint,
5708                                                         theBottomLeftPoint, theBottomRightPoint, theState)
5709             RaiseIfFailed("GetShapesOnQuadrangle", self.ShapesOp)
5710             self._autoPublish(aList, theName, "shapeOnQuadrangle")
5711             return aList
5712
5713         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
5714         #  the specified quadrangle by the certain way, defined through \a theState parameter.
5715         #  @param theShape Shape to find sub-shapes of.
5716         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5717         #  @param theTopLeftPoint Point, specifying top left corner of a quadrangle
5718         #  @param theTopRightPoint Point, specifying top right corner of a quadrangle
5719         #  @param theBottomLeftPoint Point, specifying bottom left corner of a quadrangle
5720         #  @param theBottomRightPoint Point, specifying bottom right corner of a quadrangle
5721         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5722         #
5723         #  @return List of all found sub-shapes indices.
5724         #
5725         #  @ref swig_GetShapesOnQuadrangleIDs "Example"
5726         @ManageTransactions("ShapesOp")
5727         def GetShapesOnQuadrangleIDs(self, theShape, theShapeType,
5728                                      theTopLeftPoint, theTopRightPoint,
5729                                      theBottomLeftPoint, theBottomRightPoint, theState):
5730             """
5731             Find in theShape all sub-shapes of type theShapeType, situated relatively
5732             the specified quadrangle by the certain way, defined through theState parameter.
5733
5734             Parameters:
5735                 theShape Shape to find sub-shapes of.
5736                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5737                 theTopLeftPoint Point, specifying top left corner of a quadrangle
5738                 theTopRightPoint Point, specifying top right corner of a quadrangle
5739                 theBottomLeftPoint Point, specifying bottom left corner of a quadrangle
5740                 theBottomRightPoint Point, specifying bottom right corner of a quadrangle
5741                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5742
5743             Returns:
5744                 List of all found sub-shapes indices.
5745             """
5746
5747             # Example: see GEOM_TestOthers.py
5748             aList = self.ShapesOp.GetShapesOnQuadrangleIDs(theShape, theShapeType,
5749                                                            theTopLeftPoint, theTopRightPoint,
5750                                                            theBottomLeftPoint, theBottomRightPoint, theState)
5751             RaiseIfFailed("GetShapesOnQuadrangleIDs", self.ShapesOp)
5752             return aList
5753
5754         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
5755         #  the specified \a theBox by the certain way, defined through \a theState parameter.
5756         #  @param theBox Shape for relative comparing.
5757         #  @param theShape Shape to find sub-shapes of.
5758         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5759         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5760         #  @param theName Object name; when specified, this parameter is used
5761         #         for result publication in the study. Otherwise, if automatic
5762         #         publication is switched on, default value is used for result name.
5763         #
5764         #  @return List of all found sub-shapes.
5765         #
5766         #  @ref swig_GetShapesOnBox "Example"
5767         @ManageTransactions("ShapesOp")
5768         def GetShapesOnBox(self, theBox, theShape, theShapeType, theState, theName=None):
5769             """
5770             Find in theShape all sub-shapes of type theShapeType, situated relatively
5771             the specified theBox by the certain way, defined through theState parameter.
5772
5773             Parameters:
5774                 theBox Shape for relative comparing.
5775                 theShape Shape to find sub-shapes of.
5776                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5777                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5778                 theName Object name; when specified, this parameter is used
5779                         for result publication in the study. Otherwise, if automatic
5780                         publication is switched on, default value is used for result name.
5781
5782             Returns:
5783                 List of all found sub-shapes.
5784             """
5785             # Example: see GEOM_TestOthers.py
5786             aList = self.ShapesOp.GetShapesOnBox(theBox, theShape, theShapeType, theState)
5787             RaiseIfFailed("GetShapesOnBox", self.ShapesOp)
5788             self._autoPublish(aList, theName, "shapeOnBox")
5789             return aList
5790
5791         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
5792         #  the specified \a theBox by the certain way, defined through \a theState parameter.
5793         #  @param theBox Shape for relative comparing.
5794         #  @param theShape Shape to find sub-shapes of.
5795         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5796         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5797         #
5798         #  @return List of all found sub-shapes indices.
5799         #
5800         #  @ref swig_GetShapesOnBoxIDs "Example"
5801         @ManageTransactions("ShapesOp")
5802         def GetShapesOnBoxIDs(self, theBox, theShape, theShapeType, theState):
5803             """
5804             Find in theShape all sub-shapes of type theShapeType, situated relatively
5805             the specified theBox by the certain way, defined through theState parameter.
5806
5807             Parameters:
5808                 theBox Shape for relative comparing.
5809                 theShape Shape to find sub-shapes of.
5810                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5811                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5812
5813             Returns:
5814                 List of all found sub-shapes indices.
5815             """
5816             # Example: see GEOM_TestOthers.py
5817             aList = self.ShapesOp.GetShapesOnBoxIDs(theBox, theShape, theShapeType, theState)
5818             RaiseIfFailed("GetShapesOnBoxIDs", self.ShapesOp)
5819             return aList
5820
5821         ## Find in \a theShape all sub-shapes of type \a theShapeType,
5822         #  situated relatively the specified \a theCheckShape by the
5823         #  certain way, defined through \a theState parameter.
5824         #  @param theCheckShape Shape for relative comparing. It must be a solid.
5825         #  @param theShape Shape to find sub-shapes of.
5826         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5827         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5828         #  @param theName Object name; when specified, this parameter is used
5829         #         for result publication in the study. Otherwise, if automatic
5830         #         publication is switched on, default value is used for result name.
5831         #
5832         #  @return List of all found sub-shapes.
5833         #
5834         #  @ref swig_GetShapesOnShape "Example"
5835         @ManageTransactions("ShapesOp")
5836         def GetShapesOnShape(self, theCheckShape, theShape, theShapeType, theState, theName=None):
5837             """
5838             Find in theShape all sub-shapes of type theShapeType,
5839             situated relatively the specified theCheckShape by the
5840             certain way, defined through theState parameter.
5841
5842             Parameters:
5843                 theCheckShape Shape for relative comparing. It must be a solid.
5844                 theShape Shape to find sub-shapes of.
5845                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5846                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5847                 theName Object name; when specified, this parameter is used
5848                         for result publication in the study. Otherwise, if automatic
5849                         publication is switched on, default value is used for result name.
5850
5851             Returns:
5852                 List of all found sub-shapes.
5853             """
5854             # Example: see GEOM_TestOthers.py
5855             aList = self.ShapesOp.GetShapesOnShape(theCheckShape, theShape,
5856                                                    theShapeType, theState)
5857             RaiseIfFailed("GetShapesOnShape", self.ShapesOp)
5858             self._autoPublish(aList, theName, "shapeOnShape")
5859             return aList
5860
5861         ## Find in \a theShape all sub-shapes of type \a theShapeType,
5862         #  situated relatively the specified \a theCheckShape by the
5863         #  certain way, defined through \a theState parameter.
5864         #  @param theCheckShape Shape for relative comparing. It must be a solid.
5865         #  @param theShape Shape to find sub-shapes of.
5866         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5867         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5868         #  @param theName Object name; when specified, this parameter is used
5869         #         for result publication in the study. Otherwise, if automatic
5870         #         publication is switched on, default value is used for result name.
5871         #
5872         #  @return All found sub-shapes as compound.
5873         #
5874         #  @ref swig_GetShapesOnShapeAsCompound "Example"
5875         @ManageTransactions("ShapesOp")
5876         def GetShapesOnShapeAsCompound(self, theCheckShape, theShape, theShapeType, theState, theName=None):
5877             """
5878             Find in theShape all sub-shapes of type theShapeType,
5879             situated relatively the specified theCheckShape by the
5880             certain way, defined through theState parameter.
5881
5882             Parameters:
5883                 theCheckShape Shape for relative comparing. It must be a solid.
5884                 theShape Shape to find sub-shapes of.
5885                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5886                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5887                 theName Object name; when specified, this parameter is used
5888                         for result publication in the study. Otherwise, if automatic
5889                         publication is switched on, default value is used for result name.
5890
5891             Returns:
5892                 All found sub-shapes as compound.
5893             """
5894             # Example: see GEOM_TestOthers.py
5895             anObj = self.ShapesOp.GetShapesOnShapeAsCompound(theCheckShape, theShape,
5896                                                              theShapeType, theState)
5897             RaiseIfFailed("GetShapesOnShapeAsCompound", self.ShapesOp)
5898             self._autoPublish(anObj, theName, "shapeOnShape")
5899             return anObj
5900
5901         ## Find in \a theShape all sub-shapes of type \a theShapeType,
5902         #  situated relatively the specified \a theCheckShape by the
5903         #  certain way, defined through \a theState parameter.
5904         #  @param theCheckShape Shape for relative comparing. It must be a solid.
5905         #  @param theShape Shape to find sub-shapes of.
5906         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5907         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5908         #
5909         #  @return List of all found sub-shapes indices.
5910         #
5911         #  @ref swig_GetShapesOnShapeIDs "Example"
5912         @ManageTransactions("ShapesOp")
5913         def GetShapesOnShapeIDs(self, theCheckShape, theShape, theShapeType, theState):
5914             """
5915             Find in theShape all sub-shapes of type theShapeType,
5916             situated relatively the specified theCheckShape by the
5917             certain way, defined through theState parameter.
5918
5919             Parameters:
5920                 theCheckShape Shape for relative comparing. It must be a solid.
5921                 theShape Shape to find sub-shapes of.
5922                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5923                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5924
5925             Returns:
5926                 List of all found sub-shapes indices.
5927             """
5928             # Example: see GEOM_TestOthers.py
5929             aList = self.ShapesOp.GetShapesOnShapeIDs(theCheckShape, theShape,
5930                                                       theShapeType, theState)
5931             RaiseIfFailed("GetShapesOnShapeIDs", self.ShapesOp)
5932             return aList
5933
5934         ## Get sub-shape(s) of theShapeWhere, which are
5935         #  coincident with \a theShapeWhat or could be a part of it.
5936         #  @param theShapeWhere Shape to find sub-shapes of.
5937         #  @param theShapeWhat Shape, specifying what to find.
5938         #  @param isNewImplementation implementation of GetInPlace functionality
5939         #             (default = False, old alghorithm based on shape properties)
5940         #  @param theName Object name; when specified, this parameter is used
5941         #         for result publication in the study. Otherwise, if automatic
5942         #         publication is switched on, default value is used for result name.
5943         #
5944         #  @return Compound which includes all found sub-shapes if they have different types; 
5945         #          or group of all found shapes of the equal type; or a single found sub-shape.
5946         #
5947         #  @note This function has a restriction on argument shapes.
5948         #        If \a theShapeWhere has curved parts with significantly
5949         #        outstanding centres (i.e. the mass centre of a part is closer to
5950         #        \a theShapeWhat than to the part), such parts will not be found.
5951         #        @image html get_in_place_lost_part.png
5952         #
5953         #  @ref swig_GetInPlace "Example"
5954         @ManageTransactions("ShapesOp")
5955         def GetInPlace(self, theShapeWhere, theShapeWhat, isNewImplementation = False, theName=None):
5956             """
5957             Get sub-shape(s) of theShapeWhere, which are
5958             coincident with  theShapeWhat or could be a part of it.
5959
5960             Parameters:
5961                 theShapeWhere Shape to find sub-shapes of.
5962                 theShapeWhat Shape, specifying what to find.
5963                 isNewImplementation Implementation of GetInPlace functionality
5964                                     (default = False, old alghorithm based on shape properties)
5965                 theName Object name; when specified, this parameter is used
5966                         for result publication in the study. Otherwise, if automatic
5967                         publication is switched on, default value is used for result name.
5968
5969             Returns:
5970                 Compound which includes all found sub-shapes if they have different types; 
5971                 or group of all found shapes of the equal type; or a single found sub-shape.
5972
5973
5974             Note:
5975                 This function has a restriction on argument shapes.
5976                 If theShapeWhere has curved parts with significantly
5977                 outstanding centres (i.e. the mass centre of a part is closer to
5978                 theShapeWhat than to the part), such parts will not be found.
5979             """
5980             # Example: see GEOM_TestOthers.py
5981             anObj = None
5982             if isNewImplementation:
5983                 anObj = self.ShapesOp.GetInPlace(theShapeWhere, theShapeWhat)
5984             else:
5985                 anObj = self.ShapesOp.GetInPlaceOld(theShapeWhere, theShapeWhat)
5986                 pass
5987             RaiseIfFailed("GetInPlace", self.ShapesOp)
5988             self._autoPublish(anObj, theName, "inplace")
5989             return anObj
5990
5991         ## Get sub-shape(s) of \a theShapeWhere, which are
5992         #  coincident with \a theShapeWhat or could be a part of it.
5993         #
5994         #  Implementation of this method is based on a saved history of an operation,
5995         #  produced \a theShapeWhere. The \a theShapeWhat must be among this operation's
5996         #  arguments (an argument shape or a sub-shape of an argument shape).
5997         #  The operation could be the Partition or one of boolean operations,
5998         #  performed on simple shapes (not on compounds).
5999         #
6000         #  @param theShapeWhere Shape to find sub-shapes of.
6001         #  @param theShapeWhat Shape, specifying what to find (must be in the
6002         #                      building history of the ShapeWhere).
6003         #  @param theName Object name; when specified, this parameter is used
6004         #         for result publication in the study. Otherwise, if automatic
6005         #         publication is switched on, default value is used for result name.
6006         #
6007         #  @return Compound which includes all found sub-shapes if they have different types; 
6008         #          or group of all found shapes of the equal type; or a single found sub-shape.
6009         #
6010         #  @ref swig_GetInPlace "Example"
6011         @ManageTransactions("ShapesOp")
6012         def GetInPlaceByHistory(self, theShapeWhere, theShapeWhat, theName=None):
6013             """
6014             Implementation of this method is based on a saved history of an operation,
6015             produced theShapeWhere. The theShapeWhat must be among this operation's
6016             arguments (an argument shape or a sub-shape of an argument shape).
6017             The operation could be the Partition or one of boolean operations,
6018             performed on simple shapes (not on compounds).
6019
6020             Parameters:
6021                 theShapeWhere Shape to find sub-shapes of.
6022                 theShapeWhat Shape, specifying what to find (must be in the
6023                                 building history of the ShapeWhere).
6024                 theName Object name; when specified, this parameter is used
6025                         for result publication in the study. Otherwise, if automatic
6026                         publication is switched on, default value is used for result name.
6027
6028             Returns:
6029                 Compound which includes all found sub-shapes if they have different types; 
6030                 or group of all found shapes of the equal type; or a single found sub-shape.
6031             """
6032             # Example: see GEOM_TestOthers.py
6033             anObj = self.ShapesOp.GetInPlaceByHistory(theShapeWhere, theShapeWhat)
6034             RaiseIfFailed("GetInPlaceByHistory", self.ShapesOp)
6035             self._autoPublish(anObj, theName, "inplace")
6036             return anObj
6037
6038         ## A sort of GetInPlace functionality, returning IDs of sub-shapes.
6039         #  For each sub-shape ID of @a theShapeWhat return a list of corresponding sub-shape
6040         #  IDs of @a theShapeWhere.
6041         #  For example, if theShapeWhat is a box and theShapeWhere is this box cut into 
6042         #  two parts by a plane, then the result can be as this: 
6043         #    len( result_list ) = 35,
6044         #    result_list[ 1 ] = [ 2, 36 ], which means that the box  (ID 1) turned into two
6045         #  solids with IDs 2 and 36 within theShapeWhere
6046         #
6047         #  @param theShapeWhere Shape to find sub-shapes of.
6048         #  @param theShapeWhat Shape, specifying what to find.
6049         #  @return List of lists of sub-shape IDS of theShapeWhere.
6050         def GetInPlaceMap(self, theShapeWhere, theShapeWhat):
6051             """
6052             A sort of GetInPlace functionality, returning IDs of sub-shapes.
6053             For each sub-shape ID of @a theShapeWhat return a list of corresponding sub-shape
6054             IDs of @a theShapeWhere.
6055             For example, if theShapeWhat is a box and theShapeWhere is this box cut into 
6056             two parts by a plane, then the result can be as this: 
6057               len( result_list ) = 35,
6058               result_list[ 1 ] = [ 2, 36 ], which means that the box (ID 1) turned into two
6059             solids with IDs 2 and 36 within theShapeWhere
6060
6061             Parameters:
6062                 theShapeWhere Shape to find sub-shapes of.
6063                 theShapeWhat Shape, specifying what to find.
6064
6065             Returns:
6066                 List of lists of sub-shape IDS of theShapeWhere.
6067             """
6068             return self.ShapesOp.GetInPlaceMap(theShapeWhere, theShapeWhat)
6069
6070         ## Get sub-shape of theShapeWhere, which is
6071         #  equal to \a theShapeWhat.
6072         #  @param theShapeWhere Shape to find sub-shape of.
6073         #  @param theShapeWhat Shape, specifying what to find.
6074         #  @param theName Object name; when specified, this parameter is used
6075         #         for result publication in the study. Otherwise, if automatic
6076         #         publication is switched on, default value is used for result name.
6077         #
6078         #  @return New GEOM.GEOM_Object for found sub-shape.
6079         #
6080         #  @ref swig_GetSame "Example"
6081         @ManageTransactions("ShapesOp")
6082         def GetSame(self, theShapeWhere, theShapeWhat, theName=None):
6083             """
6084             Get sub-shape of theShapeWhere, which is
6085             equal to theShapeWhat.
6086
6087             Parameters:
6088                 theShapeWhere Shape to find sub-shape of.
6089                 theShapeWhat Shape, specifying what to find.
6090                 theName Object name; when specified, this parameter is used
6091                         for result publication in the study. Otherwise, if automatic
6092                         publication is switched on, default value is used for result name.
6093
6094             Returns:
6095                 New GEOM.GEOM_Object for found sub-shape.
6096             """
6097             anObj = self.ShapesOp.GetSame(theShapeWhere, theShapeWhat)
6098             RaiseIfFailed("GetSame", self.ShapesOp)
6099             self._autoPublish(anObj, theName, "sameShape")
6100             return anObj
6101
6102
6103         ## Get sub-shape indices of theShapeWhere, which is
6104         #  equal to \a theShapeWhat.
6105         #  @param theShapeWhere Shape to find sub-shape of.
6106         #  @param theShapeWhat Shape, specifying what to find.
6107         #  @return List of all found sub-shapes indices.
6108         #
6109         #  @ref swig_GetSame "Example"
6110         @ManageTransactions("ShapesOp")
6111         def GetSameIDs(self, theShapeWhere, theShapeWhat):
6112             """
6113             Get sub-shape indices of theShapeWhere, which is
6114             equal to theShapeWhat.
6115
6116             Parameters:
6117                 theShapeWhere Shape to find sub-shape of.
6118                 theShapeWhat Shape, specifying what to find.
6119
6120             Returns:
6121                 List of all found sub-shapes indices.
6122             """
6123             anObj = self.ShapesOp.GetSameIDs(theShapeWhere, theShapeWhat)
6124             RaiseIfFailed("GetSameIDs", self.ShapesOp)
6125             return anObj
6126
6127         ## Resize the input edge with the new Min and Max parameters.
6128         #  The input edge parameters range is [0, 1]. If theMin parameter is
6129         #  negative, the input edge is extended, otherwise it is shrinked by
6130         #  theMin parameter. If theMax is greater than 1, the edge is extended,
6131         #  otherwise it is shrinked by theMax parameter.
6132         #  @param theEdge the input edge to be resized.
6133         #  @param theMin the minimal parameter value.
6134         #  @param theMax the maximal parameter value.
6135         #  @param theName Object name; when specified, this parameter is used
6136         #         for result publication in the study. Otherwise, if automatic
6137         #         publication is switched on, default value is used for result name.
6138         #  @return New GEOM.GEOM_Object, containing the created edge.
6139         #
6140         #  @ref tui_extend "Example"
6141         @ManageTransactions("ShapesOp")
6142         def ExtendEdge(self, theEdge, theMin, theMax, theName=None):
6143             """
6144             Resize the input edge with the new Min and Max parameters.
6145             The input edge parameters range is [0, 1]. If theMin parameter is
6146             negative, the input edge is extended, otherwise it is shrinked by
6147             theMin parameter. If theMax is greater than 1, the edge is extended,
6148             otherwise it is shrinked by theMax parameter.
6149
6150             Parameters:
6151                 theEdge the input edge to be resized.
6152                 theMin the minimal parameter value.
6153                 theMax the maximal parameter value.
6154                 theName Object name; when specified, this parameter is used
6155                         for result publication in the study. Otherwise, if automatic
6156                         publication is switched on, default value is used for result name.
6157
6158             Returns:
6159                 New GEOM.GEOM_Object, containing the created edge.
6160             """
6161             theMin, theMax, Parameters = ParseParameters(theMin, theMax)
6162             anObj = self.ShapesOp.ExtendEdge(theEdge, theMin, theMax)
6163             RaiseIfFailed("ExtendEdge", self.ShapesOp)
6164             anObj.SetParameters(Parameters)
6165             self._autoPublish(anObj, theName, "edge")
6166             return anObj
6167
6168         ## Resize the input face with the new UMin, UMax, VMin and VMax
6169         #  parameters. The input face U and V parameters range is [0, 1]. If
6170         #  theUMin parameter is negative, the input face is extended, otherwise
6171         #  it is shrinked along U direction by theUMin parameter. If theUMax is
6172         #  greater than 1, the face is extended, otherwise it is shrinked along
6173         #  U direction by theUMax parameter. So as for theVMin, theVMax and
6174         #  V direction of the input face.
6175         #  @param theFace the input face to be resized.
6176         #  @param theUMin the minimal U parameter value.
6177         #  @param theUMax the maximal U parameter value.
6178         #  @param theVMin the minimal V parameter value.
6179         #  @param theVMax the maximal V parameter value.
6180         #  @param theName Object name; when specified, this parameter is used
6181         #         for result publication in the study. Otherwise, if automatic
6182         #         publication is switched on, default value is used for result name.
6183         #  @return New GEOM.GEOM_Object, containing the created face.
6184         #
6185         #  @ref tui_extend "Example"
6186         @ManageTransactions("ShapesOp")
6187         def ExtendFace(self, theFace, theUMin, theUMax,
6188                        theVMin, theVMax, theName=None):
6189             """
6190             Resize the input face with the new UMin, UMax, VMin and VMax
6191             parameters. The input face U and V parameters range is [0, 1]. If
6192             theUMin parameter is negative, the input face is extended, otherwise
6193             it is shrinked along U direction by theUMin parameter. If theUMax is
6194             greater than 1, the face is extended, otherwise it is shrinked along
6195             U direction by theUMax parameter. So as for theVMin, theVMax and
6196             V direction of the input face.
6197
6198             Parameters:
6199                 theFace the input face to be resized.
6200                 theUMin the minimal U parameter value.
6201                 theUMax the maximal U parameter value.
6202                 theVMin the minimal V parameter value.
6203                 theVMax the maximal V parameter value.
6204                 theName Object name; when specified, this parameter is used
6205                         for result publication in the study. Otherwise, if automatic
6206                         publication is switched on, default value is used for result name.
6207
6208             Returns:
6209                 New GEOM.GEOM_Object, containing the created face.
6210             """
6211             theUMin, theUMax, theVMin, theVMax, Parameters = ParseParameters(theUMin, theUMax, theVMin, theVMax)
6212             anObj = self.ShapesOp.ExtendFace(theFace, theUMin, theUMax,
6213                                              theVMin, theVMax)
6214             RaiseIfFailed("ExtendFace", self.ShapesOp)
6215             anObj.SetParameters(Parameters)
6216             self._autoPublish(anObj, theName, "face")
6217             return anObj
6218
6219         ## This function takes some face as input parameter and creates new
6220         #  GEOM_Object, i.e. topological shape by extracting underlying surface
6221         #  of the source face and limiting it by the Umin, Umax, Vmin, Vmax
6222         #  parameters of the source face (in the parametrical space).
6223         #  @param theFace the input face.
6224         #  @param theName Object name; when specified, this parameter is used
6225         #         for result publication in the study. Otherwise, if automatic
6226         #         publication is switched on, default value is used for result name.
6227         #  @return New GEOM.GEOM_Object, containing the created face.
6228         #
6229         #  @ref tui_creation_surface "Example"
6230         @ManageTransactions("ShapesOp")
6231         def MakeSurfaceFromFace(self, theFace, theName=None):
6232             """
6233             This function takes some face as input parameter and creates new
6234             GEOM_Object, i.e. topological shape by extracting underlying surface
6235             of the source face and limiting it by the Umin, Umax, Vmin, Vmax
6236             parameters of the source face (in the parametrical space).
6237
6238             Parameters:
6239                 theFace the input face.
6240                 theName Object name; when specified, this parameter is used
6241                         for result publication in the study. Otherwise, if automatic
6242                         publication is switched on, default value is used for result name.
6243
6244             Returns:
6245                 New GEOM.GEOM_Object, containing the created face.
6246             """
6247             anObj = self.ShapesOp.MakeSurfaceFromFace(theFace)
6248             RaiseIfFailed("MakeSurfaceFromFace", self.ShapesOp)
6249             self._autoPublish(anObj, theName, "surface")
6250             return anObj
6251
6252         # end of l4_obtain
6253         ## @}
6254
6255         ## @addtogroup l4_access
6256         ## @{
6257
6258         ## Obtain a composite sub-shape of <VAR>aShape</VAR>, composed from sub-shapes
6259         #  of aShape, selected by their unique IDs inside <VAR>aShape</VAR>
6260         #  @param aShape Shape to get sub-shape of.
6261         #  @param ListOfID List of sub-shapes indices.
6262         #  @param theName Object name; when specified, this parameter is used
6263         #         for result publication in the study. Otherwise, if automatic
6264         #         publication is switched on, default value is used for result name.
6265         #
6266         #  @return Found sub-shape.
6267         #
6268         #  @ref swig_all_decompose "Example"
6269         def GetSubShape(self, aShape, ListOfID, theName=None):
6270             """
6271             Obtain a composite sub-shape of aShape, composed from sub-shapes
6272             of aShape, selected by their unique IDs inside aShape
6273
6274             Parameters:
6275                 aShape Shape to get sub-shape of.
6276                 ListOfID List of sub-shapes indices.
6277                 theName Object name; when specified, this parameter is used
6278                         for result publication in the study. Otherwise, if automatic
6279                         publication is switched on, default value is used for result name.
6280
6281             Returns:
6282                 Found sub-shape.
6283             """
6284             # Example: see GEOM_TestAll.py
6285             anObj = self.AddSubShape(aShape,ListOfID)
6286             self._autoPublish(anObj, theName, "subshape")
6287             return anObj
6288
6289         ## Obtain unique ID of sub-shape <VAR>aSubShape</VAR> inside <VAR>aShape</VAR>
6290         #  of aShape, selected by their unique IDs inside <VAR>aShape</VAR>
6291         #  @param aShape Shape to get sub-shape of.
6292         #  @param aSubShape Sub-shapes of aShape.
6293         #  @return ID of found sub-shape.
6294         #
6295         #  @ref swig_all_decompose "Example"
6296         @ManageTransactions("LocalOp")
6297         def GetSubShapeID(self, aShape, aSubShape):
6298             """
6299             Obtain unique ID of sub-shape aSubShape inside aShape
6300             of aShape, selected by their unique IDs inside aShape
6301
6302             Parameters:
6303                aShape Shape to get sub-shape of.
6304                aSubShape Sub-shapes of aShape.
6305
6306             Returns:
6307                ID of found sub-shape.
6308             """
6309             # Example: see GEOM_TestAll.py
6310             anID = self.LocalOp.GetSubShapeIndex(aShape, aSubShape)
6311             RaiseIfFailed("GetSubShapeIndex", self.LocalOp)
6312             return anID
6313
6314         ## Obtain unique IDs of sub-shapes <VAR>aSubShapes</VAR> inside <VAR>aShape</VAR>
6315         #  This function is provided for performance purpose. The complexity is O(n) with n
6316         #  the number of subobjects of aShape
6317         #  @param aShape Shape to get sub-shape of.
6318         #  @param aSubShapes Sub-shapes of aShape.
6319         #  @return list of IDs of found sub-shapes.
6320         #
6321         #  @ref swig_all_decompose "Example"
6322         @ManageTransactions("ShapesOp")
6323         def GetSubShapesIDs(self, aShape, aSubShapes):
6324             """
6325             Obtain a list of IDs of sub-shapes aSubShapes inside aShape
6326             This function is provided for performance purpose. The complexity is O(n) with n
6327             the number of subobjects of aShape
6328
6329             Parameters:
6330                aShape Shape to get sub-shape of.
6331                aSubShapes Sub-shapes of aShape.
6332
6333             Returns:
6334                List of IDs of found sub-shape.
6335             """
6336             # Example: see GEOM_TestAll.py
6337             anIDs = self.ShapesOp.GetSubShapesIndices(aShape, aSubShapes)
6338             RaiseIfFailed("GetSubShapesIndices", self.ShapesOp)
6339             return anIDs
6340
6341         # end of l4_access
6342         ## @}
6343
6344         ## @addtogroup l4_decompose
6345         ## @{
6346
6347         ## Get all sub-shapes and groups of \a theShape,
6348         #  that were created already by any other methods.
6349         #  @param theShape Any shape.
6350         #  @param theGroupsOnly If this parameter is TRUE, only groups will be
6351         #                       returned, else all found sub-shapes and groups.
6352         #  @return List of existing sub-objects of \a theShape.
6353         #
6354         #  @ref swig_all_decompose "Example"
6355         @ManageTransactions("ShapesOp")
6356         def GetExistingSubObjects(self, theShape, theGroupsOnly = False):
6357             """
6358             Get all sub-shapes and groups of theShape,
6359             that were created already by any other methods.
6360
6361             Parameters:
6362                 theShape Any shape.
6363                 theGroupsOnly If this parameter is TRUE, only groups will be
6364                                  returned, else all found sub-shapes and groups.
6365
6366             Returns:
6367                 List of existing sub-objects of theShape.
6368             """
6369             # Example: see GEOM_TestAll.py
6370             ListObj = self.ShapesOp.GetExistingSubObjects(theShape, theGroupsOnly)
6371             RaiseIfFailed("GetExistingSubObjects", self.ShapesOp)
6372             return ListObj
6373
6374         ## Get all groups of \a theShape,
6375         #  that were created already by any other methods.
6376         #  @param theShape Any shape.
6377         #  @return List of existing groups of \a theShape.
6378         #
6379         #  @ref swig_all_decompose "Example"
6380         @ManageTransactions("ShapesOp")
6381         def GetGroups(self, theShape):
6382             """
6383             Get all groups of theShape,
6384             that were created already by any other methods.
6385
6386             Parameters:
6387                 theShape Any shape.
6388
6389             Returns:
6390                 List of existing groups of theShape.
6391             """
6392             # Example: see GEOM_TestAll.py
6393             ListObj = self.ShapesOp.GetExistingSubObjects(theShape, True)
6394             RaiseIfFailed("GetExistingSubObjects", self.ShapesOp)
6395             return ListObj
6396
6397         ## Explode a shape on sub-shapes of a given type.
6398         #  If the shape itself matches the type, it is also returned.
6399         #  @param aShape Shape to be exploded.
6400         #  @param aType Type of sub-shapes to be retrieved (see ShapeType())
6401         #  @param theName Object name; when specified, this parameter is used
6402         #         for result publication in the study. Otherwise, if automatic
6403         #         publication is switched on, default value is used for result name.
6404         #
6405         #  @return List of sub-shapes of type theShapeType, contained in theShape.
6406         #
6407         #  @ref swig_all_decompose "Example"
6408         @ManageTransactions("ShapesOp")
6409         def SubShapeAll(self, aShape, aType, theName=None):
6410             """
6411             Explode a shape on sub-shapes of a given type.
6412             If the shape itself matches the type, it is also returned.
6413
6414             Parameters:
6415                 aShape Shape to be exploded.
6416                 aType Type of sub-shapes to be retrieved (see geompy.ShapeType)
6417                 theName Object name; when specified, this parameter is used
6418                         for result publication in the study. Otherwise, if automatic
6419                         publication is switched on, default value is used for result name.
6420
6421             Returns:
6422                 List of sub-shapes of type theShapeType, contained in theShape.
6423             """
6424             # Example: see GEOM_TestAll.py
6425             ListObj = self.ShapesOp.MakeAllSubShapes(aShape, EnumToLong( aType ), False)
6426             RaiseIfFailed("SubShapeAll", self.ShapesOp)
6427             self._autoPublish(ListObj, theName, "subshape")
6428             return ListObj
6429
6430         ## Explode a shape on sub-shapes of a given type.
6431         #  @param aShape Shape to be exploded.
6432         #  @param aType Type of sub-shapes to be retrieved (see ShapeType())
6433         #  @return List of IDs of sub-shapes.
6434         #
6435         #  @ref swig_all_decompose "Example"
6436         @ManageTransactions("ShapesOp")
6437         def SubShapeAllIDs(self, aShape, aType):
6438             """
6439             Explode a shape on sub-shapes of a given type.
6440
6441             Parameters:
6442                 aShape Shape to be exploded (see geompy.ShapeType)
6443                 aType Type of sub-shapes to be retrieved (see geompy.ShapeType)
6444
6445             Returns:
6446                 List of IDs of sub-shapes.
6447             """
6448             ListObj = self.ShapesOp.GetAllSubShapesIDs(aShape, EnumToLong( aType ), False)
6449             RaiseIfFailed("SubShapeAllIDs", self.ShapesOp)
6450             return ListObj
6451
6452         ## Obtain a compound of sub-shapes of <VAR>aShape</VAR>,
6453         #  selected by their indices in list of all sub-shapes of type <VAR>aType</VAR>.
6454         #  Each index is in range [1, Nb_Sub-Shapes_Of_Given_Type]
6455         #  @param aShape Shape to get sub-shape of.
6456         #  @param ListOfInd List of sub-shapes indices.
6457         #  @param aType Type of sub-shapes to be retrieved (see ShapeType())
6458         #  @param theName Object name; when specified, this parameter is used
6459         #         for result publication in the study. Otherwise, if automatic
6460         #         publication is switched on, default value is used for result name.
6461         #
6462         #  @return A compound of sub-shapes of aShape.
6463         #
6464         #  @ref swig_all_decompose "Example"
6465         def SubShape(self, aShape, aType, ListOfInd, theName=None):
6466             """
6467             Obtain a compound of sub-shapes of aShape,
6468             selected by their indices in list of all sub-shapes of type aType.
6469             Each index is in range [1, Nb_Sub-Shapes_Of_Given_Type]
6470
6471             Parameters:
6472                 aShape Shape to get sub-shape of.
6473                 ListOfID List of sub-shapes indices.
6474                 aType Type of sub-shapes to be retrieved (see geompy.ShapeType)
6475                 theName Object name; when specified, this parameter is used
6476                         for result publication in the study. Otherwise, if automatic
6477                         publication is switched on, default value is used for result name.
6478
6479             Returns:
6480                 A compound of sub-shapes of aShape.
6481             """
6482             # Example: see GEOM_TestAll.py
6483             ListOfIDs = []
6484             AllShapeIDsList = self.SubShapeAllIDs(aShape, EnumToLong( aType ))
6485             for ind in ListOfInd:
6486                 ListOfIDs.append(AllShapeIDsList[ind - 1])
6487             # note: auto-publishing is done in self.GetSubShape()
6488             anObj = self.GetSubShape(aShape, ListOfIDs, theName)
6489             return anObj
6490
6491         ## Explode a shape on sub-shapes of a given type.
6492         #  Sub-shapes will be sorted taking into account their gravity centers,
6493         #  to provide stable order of sub-shapes. Please see
6494         #  @ref sorting_shapes_page "Description of Sorting Shapes Algorithm".
6495         #  If the shape itself matches the type, it is also returned.
6496         #  @param aShape Shape to be exploded.
6497         #  @param aType Type of sub-shapes to be retrieved (see ShapeType())
6498         #  @param theName Object name; when specified, this parameter is used
6499         #         for result publication in the study. Otherwise, if automatic
6500         #         publication is switched on, default value is used for result name.
6501         #
6502         #  @return List of sub-shapes of type theShapeType, contained in theShape.
6503         #
6504         #  @ref swig_SubShapeAllSorted "Example"
6505         @ManageTransactions("ShapesOp")
6506         def SubShapeAllSortedCentres(self, aShape, aType, theName=None):
6507             """
6508             Explode a shape on sub-shapes of a given type.
6509             Sub-shapes will be sorted taking into account their gravity centers,
6510             to provide stable order of sub-shapes.
6511             If the shape itself matches the type, it is also returned.
6512
6513             Parameters:
6514                 aShape Shape to be exploded.
6515                 aType Type of sub-shapes to be retrieved (see geompy.ShapeType)
6516                 theName Object name; when specified, this parameter is used
6517                         for result publication in the study. Otherwise, if automatic
6518                         publication is switched on, default value is used for result name.
6519
6520             Returns:
6521                 List of sub-shapes of type theShapeType, contained in theShape.
6522             """
6523             # Example: see GEOM_TestAll.py
6524             ListObj = self.ShapesOp.MakeAllSubShapes(aShape, EnumToLong( aType ), True)
6525             RaiseIfFailed("SubShapeAllSortedCentres", self.ShapesOp)
6526             self._autoPublish(ListObj, theName, "subshape")
6527             return ListObj
6528
6529         ## Explode a shape on sub-shapes of a given type.
6530         #  Sub-shapes will be sorted taking into account their gravity centers,
6531         #  to provide stable order of sub-shapes. Please see
6532         #  @ref sorting_shapes_page "Description of Sorting Shapes Algorithm".
6533         #  @param aShape Shape to be exploded.
6534         #  @param aType Type of sub-shapes to be retrieved (see ShapeType())
6535         #  @return List of IDs of sub-shapes.
6536         #
6537         #  @ref swig_all_decompose "Example"
6538         @ManageTransactions("ShapesOp")
6539         def SubShapeAllSortedCentresIDs(self, aShape, aType):
6540             """
6541             Explode a shape on sub-shapes of a given type.
6542             Sub-shapes will be sorted taking into account their gravity centers,
6543             to provide stable order of sub-shapes.
6544
6545             Parameters:
6546                 aShape Shape to be exploded.
6547                 aType Type of sub-shapes to be retrieved (see geompy.ShapeType)
6548
6549             Returns:
6550                 List of IDs of sub-shapes.
6551             """
6552             ListIDs = self.ShapesOp.GetAllSubShapesIDs(aShape, EnumToLong( aType ), True)
6553             RaiseIfFailed("SubShapeAllIDs", self.ShapesOp)
6554             return ListIDs
6555
6556         ## Obtain a compound of sub-shapes of <VAR>aShape</VAR>,
6557         #  selected by they indices in sorted list of all sub-shapes of type <VAR>aType</VAR>.
6558         #  Please see @ref sorting_shapes_page "Description of Sorting Shapes Algorithm".
6559         #  Each index is in range [1, Nb_Sub-Shapes_Of_Given_Type]
6560         #  @param aShape Shape to get sub-shape of.
6561         #  @param ListOfInd List of sub-shapes indices.
6562         #  @param aType Type of sub-shapes to be retrieved (see ShapeType())
6563         #  @param theName Object name; when specified, this parameter is used
6564         #         for result publication in the study. Otherwise, if automatic
6565         #         publication is switched on, default value is used for result name.
6566         #
6567         #  @return A compound of sub-shapes of aShape.
6568         #
6569         #  @ref swig_all_decompose "Example"
6570         def SubShapeSortedCentres(self, aShape, aType, ListOfInd, theName=None):
6571             """
6572             Obtain a compound of sub-shapes of aShape,
6573             selected by they indices in sorted list of all sub-shapes of type aType.
6574             Each index is in range [1, Nb_Sub-Shapes_Of_Given_Type]
6575
6576             Parameters:
6577                 aShape Shape to get sub-shape of.
6578                 ListOfID List of sub-shapes indices.
6579                 aType Type of sub-shapes to be retrieved (see geompy.ShapeType)
6580                 theName Object name; when specified, this parameter is used
6581                         for result publication in the study. Otherwise, if automatic
6582                         publication is switched on, default value is used for result name.
6583
6584             Returns:
6585                 A compound of sub-shapes of aShape.
6586             """
6587             # Example: see GEOM_TestAll.py
6588             ListOfIDs = []
6589             AllShapeIDsList = self.SubShapeAllSortedCentresIDs(aShape, EnumToLong( aType ))
6590             for ind in ListOfInd:
6591                 ListOfIDs.append(AllShapeIDsList[ind - 1])
6592             # note: auto-publishing is done in self.GetSubShape()
6593             anObj = self.GetSubShape(aShape, ListOfIDs, theName)
6594             return anObj
6595
6596         ## Extract shapes (excluding the main shape) of given type.
6597         #  @param aShape The shape.
6598         #  @param aType  The shape type (see ShapeType())
6599         #  @param isSorted Boolean flag to switch sorting on/off. Please see
6600         #         @ref sorting_shapes_page "Description of Sorting Shapes Algorithm".
6601         #  @param theName Object name; when specified, this parameter is used
6602         #         for result publication in the study. Otherwise, if automatic
6603         #         publication is switched on, default value is used for result name.
6604         #
6605         #  @return List of sub-shapes of type aType, contained in aShape.
6606         #
6607         #  @ref swig_FilletChamfer "Example"
6608         @ManageTransactions("ShapesOp")
6609         def ExtractShapes(self, aShape, aType, isSorted = False, theName=None):
6610             """
6611             Extract shapes (excluding the main shape) of given type.
6612
6613             Parameters:
6614                 aShape The shape.
6615                 aType  The shape type (see geompy.ShapeType)
6616                 isSorted Boolean flag to switch sorting on/off.
6617                 theName Object name; when specified, this parameter is used
6618                         for result publication in the study. Otherwise, if automatic
6619                         publication is switched on, default value is used for result name.
6620
6621             Returns:
6622                 List of sub-shapes of type aType, contained in aShape.
6623             """
6624             # Example: see GEOM_TestAll.py
6625             ListObj = self.ShapesOp.ExtractSubShapes(aShape, EnumToLong( aType ), isSorted)
6626             RaiseIfFailed("ExtractSubShapes", self.ShapesOp)
6627             self._autoPublish(ListObj, theName, "subshape")
6628             return ListObj
6629
6630         ## Get a set of sub-shapes defined by their unique IDs inside <VAR>aShape</VAR>
6631         #  @param aShape Main shape.
6632         #  @param anIDs List of unique IDs of sub-shapes inside <VAR>aShape</VAR>.
6633         #  @param theName Object name; when specified, this parameter is used
6634         #         for result publication in the study. Otherwise, if automatic
6635         #         publication is switched on, default value is used for result name.
6636         #  @return List of GEOM.GEOM_Object, corresponding to found sub-shapes.
6637         #
6638         #  @ref swig_all_decompose "Example"
6639         @ManageTransactions("ShapesOp")
6640         def SubShapes(self, aShape, anIDs, theName=None):
6641             """
6642             Get a set of sub-shapes defined by their unique IDs inside theMainShape
6643
6644             Parameters:
6645                 aShape Main shape.
6646                 anIDs List of unique IDs of sub-shapes inside theMainShape.
6647                 theName Object name; when specified, this parameter is used
6648                         for result publication in the study. Otherwise, if automatic
6649                         publication is switched on, default value is used for result name.
6650
6651             Returns:
6652                 List of GEOM.GEOM_Object, corresponding to found sub-shapes.
6653             """
6654             # Example: see GEOM_TestAll.py
6655             ListObj = self.ShapesOp.MakeSubShapes(aShape, anIDs)
6656             RaiseIfFailed("SubShapes", self.ShapesOp)
6657             self._autoPublish(ListObj, theName, "subshape")
6658             return ListObj
6659
6660         ## Explode a shape into edges sorted in a row from a starting point.
6661         #  @param theShape the shape to be exploded on edges.
6662         #  @param theStartPoint the starting point.
6663         #  @param theName Object name; when specified, this parameter is used
6664         #         for result publication in the study. Otherwise, if automatic
6665         #         publication is switched on, default value is used for result name.
6666         #  @return List of GEOM.GEOM_Object that is actually an ordered list
6667         #          of edges sorted in a row from a starting point.
6668         #
6669         #  @ref swig_GetSubShapeEdgeSorted "Example"
6670         @ManageTransactions("ShapesOp")
6671         def GetSubShapeEdgeSorted(self, theShape, theStartPoint, theName=None):
6672             """
6673             Explode a shape into edges sorted in a row from a starting point.
6674
6675             Parameters:
6676                 theShape the shape to be exploded on edges.
6677                 theStartPoint the starting point.
6678                 theName Object name; when specified, this parameter is used
6679                         for result publication in the study. Otherwise, if automatic
6680                         publication is switched on, default value is used for result name.
6681
6682             Returns:
6683                 List of GEOM.GEOM_Object that is actually an ordered list
6684                 of edges sorted in a row from a starting point.
6685             """
6686             # Example: see GEOM_TestAll.py
6687             ListObj = self.ShapesOp.GetSubShapeEdgeSorted(theShape, theStartPoint)
6688             RaiseIfFailed("GetSubShapeEdgeSorted", self.ShapesOp)
6689             self._autoPublish(ListObj, theName, "SortedEdges")
6690             return ListObj
6691
6692         ##
6693         # Return the list of subshapes that satisfies a certain tolerance
6694         # criterion. The user defines the type of shapes to be returned, the
6695         # condition and the tolerance value. The operation is defined for
6696         # faces, edges and vertices only. E.g. for theShapeType FACE,
6697         # theCondition GEOM::CC_GT and theTolerance 1.e-7 this method returns
6698         # all faces of theShape that have tolerances greater then 1.e7.
6699         #
6700         #  @param theShape the shape to be exploded
6701         #  @param theShapeType the type of sub-shapes to be returned (see
6702         #         ShapeType()). Can have the values FACE, EDGE and VERTEX only.
6703         #  @param theCondition the condition type (see GEOM::comparison_condition).
6704         #  @param theTolerance the tolerance filter.
6705         #  @param theName Object name; when specified, this parameter is used
6706         #         for result publication in the study. Otherwise, if automatic
6707         #         publication is switched on, default value is used for result name.
6708         #  @return the list of shapes that satisfy the conditions.
6709         #
6710         #  @ref swig_GetSubShapesWithTolerance "Example"
6711         @ManageTransactions("ShapesOp")
6712         def GetSubShapesWithTolerance(self, theShape, theShapeType,
6713                                       theCondition, theTolerance, theName=None):
6714             """
6715             Return the list of subshapes that satisfies a certain tolerance
6716             criterion. The user defines the type of shapes to be returned, the
6717             condition and the tolerance value. The operation is defined for
6718             faces, edges and vertices only. E.g. for theShapeType FACE,
6719             theCondition GEOM::CC_GT and theTolerance 1.e-7 this method returns
6720             all faces of theShape that have tolerances greater then 1.e7.
6721             
6722             Parameters:
6723                 theShape the shape to be exploded
6724                 theShapeType the type of sub-shapes to be returned (see
6725                              ShapeType()). Can have the values FACE,
6726                              EDGE and VERTEX only.
6727                 theCondition the condition type (see GEOM::comparison_condition).
6728                 theTolerance the tolerance filter.
6729                 theName Object name; when specified, this parameter is used
6730                         for result publication in the study. Otherwise, if automatic
6731                         publication is switched on, default value is used for result name.
6732
6733             Returns:
6734                 The list of shapes that satisfy the conditions.
6735             """
6736             # Example: see GEOM_TestAll.py
6737             ListObj = self.ShapesOp.GetSubShapesWithTolerance(theShape, EnumToLong(theShapeType),
6738                                                               theCondition, theTolerance)
6739             RaiseIfFailed("GetSubShapesWithTolerance", self.ShapesOp)
6740             self._autoPublish(ListObj, theName, "SubShapeWithTolerance")
6741             return ListObj
6742
6743         ## Check if the object is a sub-object of another GEOM object.
6744         #  @param aSubObject Checked sub-object (or its parent object, in case if
6745         #         \a theSubObjectIndex is non-zero).
6746         #  @param anObject An object that is checked for ownership (or its parent object,
6747         #         in case if \a theObjectIndex is non-zero).
6748         #  @param aSubObjectIndex When non-zero, specifies a sub-shape index that
6749         #         identifies a sub-object within its parent specified via \a theSubObject.
6750         #  @param anObjectIndex When non-zero, specifies a sub-shape index that
6751         #         identifies an object within its parent specified via \a theObject.
6752         #  @return TRUE, if the given object contains sub-object.
6753         @ManageTransactions("ShapesOp")
6754         def IsSubShapeBelongsTo(self, aSubObject, anObject, aSubObjectIndex = 0, anObjectIndex = 0):
6755             """
6756             Check if the object is a sub-object of another GEOM object.
6757             
6758             Parameters:
6759                 aSubObject Checked sub-object (or its parent object, in case if
6760                     \a theSubObjectIndex is non-zero).
6761                 anObject An object that is checked for ownership (or its parent object,
6762                     in case if \a theObjectIndex is non-zero).
6763                 aSubObjectIndex When non-zero, specifies a sub-shape index that
6764                     identifies a sub-object within its parent specified via \a theSubObject.
6765                 anObjectIndex When non-zero, specifies a sub-shape index that
6766                     identifies an object within its parent specified via \a theObject.
6767
6768             Returns
6769                 TRUE, if the given object contains sub-object.
6770             """
6771             IsOk = self.ShapesOp.IsSubShapeBelongsTo(aSubObject, aSubObjectIndex, anObject, anObjectIndex)
6772             RaiseIfFailed("IsSubShapeBelongsTo", self.ShapesOp)
6773             return IsOk
6774
6775         ## Perform extraction of sub-shapes from the main shape.
6776         #
6777         #  @param theShape the main shape
6778         #  @param theListOfID the list of sub-shape IDs to be extracted from
6779         #         the main shape.
6780         #  @return New GEOM.GEOM_Object, containing the shape without
6781         #          extracted sub-shapes.
6782         #
6783         #  @ref swig_MakeExtraction "Example"
6784         @ManageTransactions("ShapesOp")
6785         def MakeExtraction(self, theShape, theListOfID, theName=None):
6786             """
6787             Perform extraction of sub-shapes from the main shape.
6788
6789             Parameters:
6790                 theShape the main shape
6791                 theListOfID the list of sub-shape IDs to be extracted from
6792                             the main shape.
6793
6794             Returns
6795                 New GEOM.GEOM_Object, containing the shape without
6796                 extracted sub-shapes.
6797             """
6798             # Example: see GEOM_TestAll.py
6799             (anObj, aStat) = self.ShapesOp.MakeExtraction(theShape, theListOfID)
6800             RaiseIfFailed("MakeExtraction", self.ShapesOp)
6801             self._autoPublish(anObj, theName, "Extraction")
6802             return anObj
6803
6804         # end of l4_decompose
6805         ## @}
6806
6807         ## @addtogroup l4_decompose_d
6808         ## @{
6809
6810         ## Deprecated method
6811         #  It works like SubShapeAllSortedCentres(), but wrongly
6812         #  defines centres of faces, shells and solids.
6813         @ManageTransactions("ShapesOp")
6814         def SubShapeAllSorted(self, aShape, aType, theName=None):
6815             """
6816             Deprecated method
6817             It works like geompy.SubShapeAllSortedCentres, but wrongly
6818             defines centres of faces, shells and solids.
6819             """
6820             ListObj = self.ShapesOp.MakeExplode(aShape, EnumToLong( aType ), True)
6821             RaiseIfFailed("MakeExplode", self.ShapesOp)
6822             self._autoPublish(ListObj, theName, "subshape")
6823             return ListObj
6824
6825         ## Deprecated method
6826         #  It works like SubShapeAllSortedCentresIDs(), but wrongly
6827         #  defines centres of faces, shells and solids.
6828         @ManageTransactions("ShapesOp")
6829         def SubShapeAllSortedIDs(self, aShape, aType):
6830             """
6831             Deprecated method
6832             It works like geompy.SubShapeAllSortedCentresIDs, but wrongly
6833             defines centres of faces, shells and solids.
6834             """
6835             ListIDs = self.ShapesOp.SubShapeAllIDs(aShape, EnumToLong( aType ), True)
6836             RaiseIfFailed("SubShapeAllIDs", self.ShapesOp)
6837             return ListIDs
6838
6839         ## Deprecated method
6840         #  It works like SubShapeSortedCentres(), but has a bug
6841         #  (wrongly defines centres of faces, shells and solids).
6842         def SubShapeSorted(self, aShape, aType, ListOfInd, theName=None):
6843             """
6844             Deprecated method
6845             It works like geompy.SubShapeSortedCentres, but has a bug
6846             (wrongly defines centres of faces, shells and solids).
6847             """
6848             ListOfIDs = []
6849             AllShapeIDsList = self.SubShapeAllSortedIDs(aShape, EnumToLong( aType ))
6850             for ind in ListOfInd:
6851                 ListOfIDs.append(AllShapeIDsList[ind - 1])
6852             # note: auto-publishing is done in self.GetSubShape()
6853             anObj = self.GetSubShape(aShape, ListOfIDs, theName)
6854             return anObj
6855
6856         # end of l4_decompose_d
6857         ## @}
6858
6859         ## @addtogroup l3_healing
6860         ## @{
6861
6862         ## Apply a sequence of Shape Healing operators to the given object.
6863         #  @param theShape Shape to be processed.
6864         #  @param theOperators List of names of operators ("FixShape", "SplitClosedFaces", etc.).
6865         #  @param theParameters List of names of parameters
6866         #                    ("FixShape.Tolerance3d", "SplitClosedFaces.NbSplitPoints", etc.).
6867         #  @param theValues List of values of parameters, in the same order
6868         #                    as parameters are listed in <VAR>theParameters</VAR> list.
6869         #  @param theName Object name; when specified, this parameter is used
6870         #         for result publication in the study. Otherwise, if automatic
6871         #         publication is switched on, default value is used for result name.
6872         #
6873         #  <b> Operators and Parameters: </b> \n
6874         #
6875         #  * \b FixShape - corrects invalid shapes. \n
6876         #  - \b FixShape.Tolerance3d - work tolerance for detection of the problems and correction of them. \n
6877         #  - \b FixShape.MaxTolerance3d - maximal possible tolerance of the shape after correction. \n
6878         #
6879         #  * \b FixFaceSize - removes small faces, such as spots and strips.\n
6880         #  - \b FixFaceSize.Tolerance - defines minimum possible face size. \n
6881         #  - \b DropSmallEdges - removes edges, which merge with neighbouring edges. \n
6882         #  - \b DropSmallEdges.Tolerance3d - defines minimum possible distance between two parallel edges.\n
6883         #  - \b DropSmallSolids - either removes small solids or merges them with neighboring ones. \n
6884         #  - \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
6885         #  - \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
6886         #  - \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
6887         #
6888         #  * \b SplitAngle - splits faces based on conical surfaces, surfaces of revolution and cylindrical
6889         #    surfaces in segments using a certain angle. \n
6890         #  - \b SplitAngle.Angle - the central angle of the resulting segments (i.e. we obtain two segments
6891         #    if Angle=180, four if Angle=90, etc). \n
6892         #  - \b SplitAngle.MaxTolerance - maximum possible tolerance among the resulting segments.\n
6893         #
6894         #  * \b SplitClosedFaces - splits closed faces in segments.
6895         #    The number of segments depends on the number of splitting points.\n
6896         #  - \b SplitClosedFaces.NbSplitPoints - the number of splitting points.\n
6897         #
6898         #  * \b SplitContinuity - splits shapes to reduce continuities of curves and surfaces.\n
6899         #  - \b SplitContinuity.Tolerance3d - 3D tolerance for correction of geometry.\n
6900         #  - \b SplitContinuity.SurfaceContinuity - required continuity for surfaces.\n
6901         #  - \b SplitContinuity.CurveContinuity - required continuity for curves.\n
6902         #   This and the previous parameters can take the following values:\n
6903         #   \b Parametric \b Continuity \n
6904         #   \b C0 (Positional Continuity): curves are joined (the end positions of curves or surfaces
6905         #   are coincidental. The curves or surfaces may still meet at an angle, giving rise to a sharp corner or edge).\n
6906         #   \b C1 (Tangential Continuity): first derivatives are equal (the end vectors of curves or surfaces are parallel,
6907         #    ruling out sharp edges).\n
6908         #   \b C2 (Curvature Continuity): first and second derivatives are equal (the end vectors of curves or surfaces
6909         #       are of the same magnitude).\n
6910         #   \b CN N-th derivatives are equal (both the direction and the magnitude of the Nth derivatives of curves
6911         #    or surfaces (d/du C(u)) are the same at junction. \n
6912         #   \b Geometric \b Continuity \n
6913         #   \b G1: first derivatives are proportional at junction.\n
6914         #   The curve tangents thus have the same direction, but not necessarily the same magnitude.
6915         #      i.e., C1'(1) = (a,b,c) and C2'(0) = (k*a, k*b, k*c).\n
6916         #   \b G2: first and second derivatives are proportional at junction.
6917         #   As the names imply, geometric continuity requires the geometry to be continuous, while parametric
6918         #    continuity requires that the underlying parameterization was continuous as well.
6919         #   Parametric continuity of order n implies geometric continuity of order n, but not vice-versa.\n
6920         #
6921         #  * \b BsplineRestriction - converts curves and surfaces to Bsplines and processes them with the following parameters:\n
6922         #  - \b BSplineRestriction.SurfaceMode - approximation of surfaces if restriction is necessary.\n
6923         #  - \b BSplineRestriction.Curve3dMode - conversion of any 3D curve to BSpline and approximation.\n
6924         #  - \b BSplineRestriction.Curve2dMode - conversion of any 2D curve to BSpline and approximation.\n
6925         #  - \b BSplineRestriction.Tolerance3d - defines the possibility of surfaces and 3D curves approximation
6926         #       with the specified parameters.\n
6927         #  - \b BSplineRestriction.Tolerance2d - defines the possibility of surfaces and 2D curves approximation
6928         #       with the specified parameters.\n
6929         #  - \b BSplineRestriction.RequiredDegree - required degree of the resulting BSplines.\n
6930         #  - \b BSplineRestriction.RequiredNbSegments - required maximum number of segments of resultant BSplines.\n
6931         #  - \b BSplineRestriction.Continuity3d - continuity of the resulting surfaces and 3D curves.\n
6932         #  - \b BSplineRestriction.Continuity2d - continuity of the resulting 2D curves.\n
6933         #
6934         #  * \b ToBezier - converts curves and surfaces of any type to Bezier curves and surfaces.\n
6935         #  - \b ToBezier.SurfaceMode - if checked in, allows conversion of surfaces.\n
6936         #  - \b ToBezier.Curve3dMode - if checked in, allows conversion of 3D curves.\n
6937         #  - \b ToBezier.Curve2dMode - if checked in, allows conversion of 2D curves.\n
6938         #  - \b ToBezier.MaxTolerance - defines tolerance for detection and correction of problems.\n
6939         #
6940         #  * \b SameParameter - fixes edges of 2D and 3D curves not having the same parameter.\n
6941         #  - \b SameParameter.Tolerance3d - defines tolerance for fixing of edges.\n
6942         #
6943         #
6944         #  @return New GEOM.GEOM_Object, containing processed shape.
6945         #
6946         #  \n @ref tui_shape_processing "Example"
6947         @ManageTransactions("HealOp")
6948         def ProcessShape(self, theShape, theOperators, theParameters, theValues, theName=None):
6949             """
6950             Apply a sequence of Shape Healing operators to the given object.
6951
6952             Parameters:
6953                 theShape Shape to be processed.
6954                 theValues List of values of parameters, in the same order
6955                           as parameters are listed in theParameters list.
6956                 theOperators List of names of operators ('FixShape', 'SplitClosedFaces', etc.).
6957                 theParameters List of names of parameters
6958                               ('FixShape.Tolerance3d', 'SplitClosedFaces.NbSplitPoints', etc.).
6959                 theName Object name; when specified, this parameter is used
6960                         for result publication in the study. Otherwise, if automatic
6961                         publication is switched on, default value is used for result name.
6962
6963                 Operators and Parameters:
6964
6965                  * FixShape - corrects invalid shapes.
6966                      * FixShape.Tolerance3d - work tolerance for detection of the problems and correction of them.
6967                      * FixShape.MaxTolerance3d - maximal possible tolerance of the shape after correction.
6968                  * FixFaceSize - removes small faces, such as spots and strips.
6969                      * FixFaceSize.Tolerance - defines minimum possible face size.
6970                  * DropSmallEdges - removes edges, which merge with neighbouring edges.
6971                      * DropSmallEdges.Tolerance3d - defines minimum possible distance between two parallel edges.
6972                  * DropSmallSolids - either removes small solids or merges them with neighboring ones.
6973                      * 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.
6974                      * 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.
6975                      * 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.
6976
6977                  * SplitAngle - splits faces based on conical surfaces, surfaces of revolution and cylindrical surfaces
6978                                 in segments using a certain angle.
6979                      * SplitAngle.Angle - the central angle of the resulting segments (i.e. we obtain two segments
6980                                           if Angle=180, four if Angle=90, etc).
6981                      * SplitAngle.MaxTolerance - maximum possible tolerance among the resulting segments.
6982                  * SplitClosedFaces - splits closed faces in segments. The number of segments depends on the number of
6983                                       splitting points.
6984                      * SplitClosedFaces.NbSplitPoints - the number of splitting points.
6985                  * SplitContinuity - splits shapes to reduce continuities of curves and surfaces.
6986                      * SplitContinuity.Tolerance3d - 3D tolerance for correction of geometry.
6987                      * SplitContinuity.SurfaceContinuity - required continuity for surfaces.
6988                      * SplitContinuity.CurveContinuity - required continuity for curves.
6989                        This and the previous parameters can take the following values:
6990
6991                        Parametric Continuity:
6992                        C0 (Positional Continuity): curves are joined (the end positions of curves or surfaces are
6993                                                    coincidental. The curves or surfaces may still meet at an angle,
6994                                                    giving rise to a sharp corner or edge).
6995                        C1 (Tangential Continuity): first derivatives are equal (the end vectors of curves or surfaces
6996                                                    are parallel, ruling out sharp edges).
6997                        C2 (Curvature Continuity): first and second derivatives are equal (the end vectors of curves
6998                                                   or surfaces are of the same magnitude).
6999                        CN N-th derivatives are equal (both the direction and the magnitude of the Nth derivatives of
7000                           curves or surfaces (d/du C(u)) are the same at junction.
7001
7002                        Geometric Continuity:
7003                        G1: first derivatives are proportional at junction.
7004                            The curve tangents thus have the same direction, but not necessarily the same magnitude.
7005                            i.e., C1'(1) = (a,b,c) and C2'(0) = (k*a, k*b, k*c).
7006                        G2: first and second derivatives are proportional at junction. As the names imply,
7007                            geometric continuity requires the geometry to be continuous, while parametric continuity requires
7008                            that the underlying parameterization was continuous as well. Parametric continuity of order n implies
7009                            geometric continuity of order n, but not vice-versa.
7010                  * BsplineRestriction - converts curves and surfaces to Bsplines and processes them with the following parameters:
7011                      * BSplineRestriction.SurfaceMode - approximation of surfaces if restriction is necessary.
7012                      * BSplineRestriction.Curve3dMode - conversion of any 3D curve to BSpline and approximation.
7013                      * BSplineRestriction.Curve2dMode - conversion of any 2D curve to BSpline and approximation.
7014                      * BSplineRestriction.Tolerance3d - defines the possibility of surfaces and 3D curves approximation with
7015                                                         the specified parameters.
7016                      * BSplineRestriction.Tolerance2d - defines the possibility of surfaces and 2D curves approximation with
7017                                                         the specified parameters.
7018                      * BSplineRestriction.RequiredDegree - required degree of the resulting BSplines.
7019                      * BSplineRestriction.RequiredNbSegments - required maximum number of segments of resultant BSplines.
7020                      * BSplineRestriction.Continuity3d - continuity of the resulting surfaces and 3D curves.
7021                      * BSplineRestriction.Continuity2d - continuity of the resulting 2D curves.
7022                  * ToBezier - converts curves and surfaces of any type to Bezier curves and surfaces.
7023                      * ToBezier.SurfaceMode - if checked in, allows conversion of surfaces.
7024                      * ToBezier.Curve3dMode - if checked in, allows conversion of 3D curves.
7025                      * ToBezier.Curve2dMode - if checked in, allows conversion of 2D curves.
7026                      * ToBezier.MaxTolerance - defines tolerance for detection and correction of problems.
7027                  * SameParameter - fixes edges of 2D and 3D curves not having the same parameter.
7028                      * SameParameter.Tolerance3d - defines tolerance for fixing of edges.
7029
7030             Returns:
7031                 New GEOM.GEOM_Object, containing processed shape.
7032
7033             Note: For more information look through SALOME Geometry User's Guide->
7034                   -> Introduction to Geometry-> Repairing Operations-> Shape Processing
7035             """
7036             # Example: see GEOM_TestHealing.py
7037             theValues,Parameters = ParseList(theValues)
7038             anObj = self.HealOp.ProcessShape(theShape, theOperators, theParameters, theValues)
7039             # To avoid script failure in case of good argument shape
7040             if self.HealOp.GetErrorCode() == "ShHealOper_NotError_msg":
7041                 return theShape
7042             RaiseIfFailed("ProcessShape", self.HealOp)
7043             for string in (theOperators + theParameters):
7044                 Parameters = ":" + Parameters
7045                 pass
7046             anObj.SetParameters(Parameters)
7047             self._autoPublish(anObj, theName, "healed")
7048             return anObj
7049
7050         ## Remove faces from the given object (shape).
7051         #  @param theObject Shape to be processed.
7052         #  @param theFaces Indices of faces to be removed, if EMPTY then the method
7053         #                  removes ALL faces of the given object.
7054         #  @param theName Object name; when specified, this parameter is used
7055         #         for result publication in the study. Otherwise, if automatic
7056         #         publication is switched on, default value is used for result name.
7057         #
7058         #  @return New GEOM.GEOM_Object, containing processed shape.
7059         #
7060         #  @ref tui_suppress_faces "Example"
7061         @ManageTransactions("HealOp")
7062         def SuppressFaces(self, theObject, theFaces, theName=None):
7063             """
7064             Remove faces from the given object (shape).
7065
7066             Parameters:
7067                 theObject Shape to be processed.
7068                 theFaces Indices of faces to be removed, if EMPTY then the method
7069                          removes ALL faces of the given object.
7070                 theName Object name; when specified, this parameter is used
7071                         for result publication in the study. Otherwise, if automatic
7072                         publication is switched on, default value is used for result name.
7073
7074             Returns:
7075                 New GEOM.GEOM_Object, containing processed shape.
7076             """
7077             # Example: see GEOM_TestHealing.py
7078             anObj = self.HealOp.SuppressFaces(theObject, theFaces)
7079             RaiseIfFailed("SuppressFaces", self.HealOp)
7080             self._autoPublish(anObj, theName, "suppressFaces")
7081             return anObj
7082
7083         ## Sewing of faces into a single shell.
7084         #  @param ListShape Shapes to be processed.
7085         #  @param theTolerance Required tolerance value.
7086         #  @param AllowNonManifold Flag that allows non-manifold sewing.
7087         #  @param theName Object name; when specified, this parameter is used
7088         #         for result publication in the study. Otherwise, if automatic
7089         #         publication is switched on, default value is used for result name.
7090         #
7091         #  @return New GEOM.GEOM_Object, containing a result shell.
7092         #
7093         #  @ref tui_sewing "Example"
7094         def MakeSewing(self, ListShape, theTolerance, AllowNonManifold=False, theName=None):
7095             """
7096             Sewing of faces into a single shell.
7097
7098             Parameters:
7099                 ListShape Shapes to be processed.
7100                 theTolerance Required tolerance value.
7101                 AllowNonManifold Flag that allows non-manifold sewing.
7102                 theName Object name; when specified, this parameter is used
7103                         for result publication in the study. Otherwise, if automatic
7104                         publication is switched on, default value is used for result name.
7105
7106             Returns:
7107                 New GEOM.GEOM_Object, containing containing a result shell.
7108             """
7109             # Example: see GEOM_TestHealing.py
7110             # note: auto-publishing is done in self.Sew()
7111             anObj = self.Sew(ListShape, theTolerance, AllowNonManifold, theName)
7112             return anObj
7113
7114         ## Sewing of faces into a single shell.
7115         #  @param ListShape Shapes to be processed.
7116         #  @param theTolerance Required tolerance value.
7117         #  @param AllowNonManifold Flag that allows non-manifold sewing.
7118         #  @param theName Object name; when specified, this parameter is used
7119         #         for result publication in the study. Otherwise, if automatic
7120         #         publication is switched on, default value is used for result name.
7121         #
7122         #  @return New GEOM.GEOM_Object, containing a result shell.
7123         @ManageTransactions("HealOp")
7124         def Sew(self, ListShape, theTolerance, AllowNonManifold=False, theName=None):
7125             """
7126             Sewing of faces into a single shell.
7127
7128             Parameters:
7129                 ListShape Shapes to be processed.
7130                 theTolerance Required tolerance value.
7131                 AllowNonManifold Flag that allows non-manifold sewing.
7132                 theName Object name; when specified, this parameter is used
7133                         for result publication in the study. Otherwise, if automatic
7134                         publication is switched on, default value is used for result name.
7135
7136             Returns:
7137                 New GEOM.GEOM_Object, containing a result shell.
7138             """
7139             # Example: see MakeSewing() above
7140             theTolerance,Parameters = ParseParameters(theTolerance)
7141             if AllowNonManifold:
7142                 anObj = self.HealOp.SewAllowNonManifold( ToList( ListShape ), theTolerance)
7143             else:
7144                 anObj = self.HealOp.Sew( ToList( ListShape ), theTolerance)
7145             # To avoid script failure in case of good argument shape
7146             # (Fix of test cases geom/bugs11/L7,L8)
7147             if self.HealOp.GetErrorCode() == "ShHealOper_NotError_msg":
7148                 return anObj
7149             RaiseIfFailed("Sew", self.HealOp)
7150             anObj.SetParameters(Parameters)
7151             self._autoPublish(anObj, theName, "sewed")
7152             return anObj
7153
7154         ## Rebuild the topology of theSolids by removing
7155         #  the faces that are shared by several solids.
7156         #  @param theSolids A compound or a list of solids to be processed.
7157         #  @param theName Object name; when specified, this parameter is used
7158         #         for result publication in the study. Otherwise, if automatic
7159         #         publication is switched on, default value is used for result name.
7160         #
7161         #  @return New GEOM.GEOM_Object, containing processed shape.
7162         #
7163         #  @ref tui_remove_webs "Example"
7164         @ManageTransactions("HealOp")
7165         def RemoveInternalFaces (self, theSolids, theName=None):
7166             """
7167             Rebuild the topology of theSolids by removing
7168             the faces that are shared by several solids.
7169
7170             Parameters:
7171                 theSolids A compound or a list of solids to be processed.
7172                 theName Object name; when specified, this parameter is used
7173                         for result publication in the study. Otherwise, if automatic
7174                         publication is switched on, default value is used for result name.
7175
7176             Returns:
7177                 New GEOM.GEOM_Object, containing processed shape.
7178             """
7179             # Example: see GEOM_TestHealing.py
7180             anObj = self.HealOp.RemoveInternalFaces(ToList(theSolids))
7181             RaiseIfFailed("RemoveInternalFaces", self.HealOp)
7182             self._autoPublish(anObj, theName, "removeWebs")
7183             return anObj
7184
7185         ## Remove internal wires and edges from the given object (face).
7186         #  @param theObject Shape to be processed.
7187         #  @param theWires Indices of wires to be removed, if EMPTY then the method
7188         #                  removes ALL internal wires of the given object.
7189         #  @param theName Object name; when specified, this parameter is used
7190         #         for result publication in the study. Otherwise, if automatic
7191         #         publication is switched on, default value is used for result name.
7192         #
7193         #  @return New GEOM.GEOM_Object, containing processed shape.
7194         #
7195         #  @ref tui_suppress_internal_wires "Example"
7196         @ManageTransactions("HealOp")
7197         def SuppressInternalWires(self, theObject, theWires, theName=None):
7198             """
7199             Remove internal wires and edges from the given object (face).
7200
7201             Parameters:
7202                 theObject Shape to be processed.
7203                 theWires Indices of wires to be removed, if EMPTY then the method
7204                          removes ALL internal wires of the given object.
7205                 theName Object name; when specified, this parameter is used
7206                         for result publication in the study. Otherwise, if automatic
7207                         publication is switched on, default value is used for result name.
7208
7209             Returns:
7210                 New GEOM.GEOM_Object, containing processed shape.
7211             """
7212             # Example: see GEOM_TestHealing.py
7213             anObj = self.HealOp.RemoveIntWires(theObject, theWires)
7214             RaiseIfFailed("RemoveIntWires", self.HealOp)
7215             self._autoPublish(anObj, theName, "suppressWires")
7216             return anObj
7217
7218         ## Remove internal closed contours (holes) from the given object.
7219         #  @param theObject Shape to be processed.
7220         #  @param theWires Indices of wires to be removed, if EMPTY then the method
7221         #                  removes ALL internal holes of the given object
7222         #  @param theName Object name; when specified, this parameter is used
7223         #         for result publication in the study. Otherwise, if automatic
7224         #         publication is switched on, default value is used for result name.
7225         #
7226         #  @return New GEOM.GEOM_Object, containing processed shape.
7227         #
7228         #  @ref tui_suppress_holes "Example"
7229         @ManageTransactions("HealOp")
7230         def SuppressHoles(self, theObject, theWires, theName=None):
7231             """
7232             Remove internal closed contours (holes) from the given object.
7233
7234             Parameters:
7235                 theObject Shape to be processed.
7236                 theWires Indices of wires to be removed, if EMPTY then the method
7237                          removes ALL internal holes of the given object
7238                 theName Object name; when specified, this parameter is used
7239                         for result publication in the study. Otherwise, if automatic
7240                         publication is switched on, default value is used for result name.
7241
7242             Returns:
7243                 New GEOM.GEOM_Object, containing processed shape.
7244             """
7245             # Example: see GEOM_TestHealing.py
7246             anObj = self.HealOp.FillHoles(theObject, theWires)
7247             RaiseIfFailed("FillHoles", self.HealOp)
7248             self._autoPublish(anObj, theName, "suppressHoles")
7249             return anObj
7250
7251         ## Close an open wire.
7252         #  @param theObject Shape to be processed.
7253         #  @param theWires Indexes of edge(s) and wire(s) to be closed within <VAR>theObject</VAR>'s shape,
7254         #                  if [ ], then <VAR>theObject</VAR> itself is a wire.
7255         #  @param isCommonVertex If True  : closure by creation of a common vertex,
7256         #                        If False : closure by creation of an edge between ends.
7257         #  @param theName Object name; when specified, this parameter is used
7258         #         for result publication in the study. Otherwise, if automatic
7259         #         publication is switched on, default value is used for result name.
7260         #
7261         #  @return New GEOM.GEOM_Object, containing processed shape.
7262         #
7263         #  @ref tui_close_contour "Example"
7264         @ManageTransactions("HealOp")
7265         def CloseContour(self,theObject, theWires, isCommonVertex, theName=None):
7266             """
7267             Close an open wire.
7268
7269             Parameters:
7270                 theObject Shape to be processed.
7271                 theWires Indexes of edge(s) and wire(s) to be closed within theObject's shape,
7272                          if [ ], then theObject itself is a wire.
7273                 isCommonVertex If True  : closure by creation of a common vertex,
7274                                If False : closure by creation of an edge between ends.
7275                 theName Object name; when specified, this parameter is used
7276                         for result publication in the study. Otherwise, if automatic
7277                         publication is switched on, default value is used for result name.
7278
7279             Returns:
7280                 New GEOM.GEOM_Object, containing processed shape.
7281             """
7282             # Example: see GEOM_TestHealing.py
7283             anObj = self.HealOp.CloseContour(theObject, theWires, isCommonVertex)
7284             RaiseIfFailed("CloseContour", self.HealOp)
7285             self._autoPublish(anObj, theName, "closeContour")
7286             return anObj
7287
7288         ## Addition of a point to a given edge object.
7289         #  @param theObject Shape to be processed.
7290         #  @param theEdgeIndex Index of edge to be divided within theObject's shape,
7291         #                      if -1, then theObject itself is the edge.
7292         #  @param theValue Value of parameter on edge or length parameter,
7293         #                  depending on \a isByParameter.
7294         #  @param isByParameter If TRUE : \a theValue is treated as a curve parameter [0..1], \n
7295         #                       if FALSE : \a theValue is treated as a length parameter [0..1]
7296         #  @param theName Object name; when specified, this parameter is used
7297         #         for result publication in the study. Otherwise, if automatic
7298         #         publication is switched on, default value is used for result name.
7299         #
7300         #  @return New GEOM.GEOM_Object, containing processed shape.
7301         #
7302         #  @ref tui_add_point_on_edge "Example"
7303         @ManageTransactions("HealOp")
7304         def DivideEdge(self, theObject, theEdgeIndex, theValue, isByParameter, theName=None):
7305             """
7306             Addition of a point to a given edge object.
7307
7308             Parameters:
7309                 theObject Shape to be processed.
7310                 theEdgeIndex Index of edge to be divided within theObject's shape,
7311                              if -1, then theObject itself is the edge.
7312                 theValue Value of parameter on edge or length parameter,
7313                          depending on isByParameter.
7314                 isByParameter If TRUE :  theValue is treated as a curve parameter [0..1],
7315                               if FALSE : theValue is treated as a length parameter [0..1]
7316                 theName Object name; when specified, this parameter is used
7317                         for result publication in the study. Otherwise, if automatic
7318                         publication is switched on, default value is used for result name.
7319
7320             Returns:
7321                 New GEOM.GEOM_Object, containing processed shape.
7322             """
7323             # Example: see GEOM_TestHealing.py
7324             theEdgeIndex,theValue,isByParameter,Parameters = ParseParameters(theEdgeIndex,theValue,isByParameter)
7325             anObj = self.HealOp.DivideEdge(theObject, theEdgeIndex, theValue, isByParameter)
7326             RaiseIfFailed("DivideEdge", self.HealOp)
7327             anObj.SetParameters(Parameters)
7328             self._autoPublish(anObj, theName, "divideEdge")
7329             return anObj
7330
7331         ## Addition of points to a given edge of \a theObject by projecting
7332         #  other points to the given edge.
7333         #  @param theObject Shape to be processed.
7334         #  @param theEdgeIndex Index of edge to be divided within theObject's shape,
7335         #                      if -1, then theObject itself is the edge.
7336         #  @param thePoints List of points to project to theEdgeIndex-th edge.
7337         #  @param theName Object name; when specified, this parameter is used
7338         #         for result publication in the study. Otherwise, if automatic
7339         #         publication is switched on, default value is used for result name.
7340         #
7341         #  @return New GEOM.GEOM_Object, containing processed shape.
7342         #
7343         #  @ref tui_add_point_on_edge "Example"
7344         @ManageTransactions("HealOp")
7345         def DivideEdgeByPoint(self, theObject, theEdgeIndex, thePoints, theName=None):
7346             """
7347             Addition of points to a given edge of \a theObject by projecting
7348             other points to the given edge.
7349
7350             Parameters:
7351                 theObject Shape to be processed.
7352                 theEdgeIndex The edge or its index to be divided within theObject's shape,
7353                              if -1, then theObject itself is the edge.
7354                 thePoints List of points to project to theEdgeIndex-th edge.
7355                 theName Object name; when specified, this parameter is used
7356                         for result publication in the study. Otherwise, if automatic
7357                         publication is switched on, default value is used for result name.
7358
7359             Returns:
7360                 New GEOM.GEOM_Object, containing processed shape.
7361             """
7362             # Example: see GEOM_TestHealing.py
7363             if isinstance( theEdgeIndex, GEOM._objref_GEOM_Object ):
7364                 theEdgeIndex = self.GetSubShapeID( theObject, theEdgeIndex )
7365             anObj = self.HealOp.DivideEdgeByPoint(theObject, theEdgeIndex, ToList( thePoints ))
7366             RaiseIfFailed("DivideEdgeByPoint", self.HealOp)
7367             self._autoPublish(anObj, theName, "divideEdge")
7368             return anObj
7369
7370         ## Suppress the vertices in the wire in case if adjacent edges are C1 continuous.
7371         #  @param theWire Wire to minimize the number of C1 continuous edges in.
7372         #  @param theVertices A list of vertices to suppress. If the list
7373         #                     is empty, all vertices in a wire will be assumed.
7374         #  @param theName Object name; when specified, this parameter is used
7375         #         for result publication in the study. Otherwise, if automatic
7376         #         publication is switched on, default value is used for result name.
7377         #
7378         #  @return New GEOM.GEOM_Object with modified wire.
7379         #
7380         #  @ref tui_fuse_collinear_edges "Example"
7381         @ManageTransactions("HealOp")
7382         def FuseCollinearEdgesWithinWire(self, theWire, theVertices = [], theName=None):
7383             """
7384             Suppress the vertices in the wire in case if adjacent edges are C1 continuous.
7385
7386             Parameters:
7387                 theWire Wire to minimize the number of C1 continuous edges in.
7388                 theVertices A list of vertices to suppress. If the list
7389                             is empty, all vertices in a wire will be assumed.
7390                 theName Object name; when specified, this parameter is used
7391                         for result publication in the study. Otherwise, if automatic
7392                         publication is switched on, default value is used for result name.
7393
7394             Returns:
7395                 New GEOM.GEOM_Object with modified wire.
7396             """
7397             anObj = self.HealOp.FuseCollinearEdgesWithinWire(theWire, theVertices)
7398             RaiseIfFailed("FuseCollinearEdgesWithinWire", self.HealOp)
7399             self._autoPublish(anObj, theName, "fuseEdges")
7400             return anObj
7401
7402         ## Change orientation of the given object. Updates given shape.
7403         #  @param theObject Shape to be processed.
7404         #  @return Updated <var>theObject</var>
7405         #
7406         #  @ref swig_todo "Example"
7407         @ManageTransactions("HealOp")
7408         def ChangeOrientationShell(self,theObject):
7409             """
7410             Change orientation of the given object. Updates given shape.
7411
7412             Parameters:
7413                 theObject Shape to be processed.
7414
7415             Returns:
7416                 Updated theObject
7417             """
7418             theObject = self.HealOp.ChangeOrientation(theObject)
7419             RaiseIfFailed("ChangeOrientation", self.HealOp)
7420             pass
7421
7422         ## Change orientation of the given object.
7423         #  @param theObject Shape to be processed.
7424         #  @param theName Object name; when specified, this parameter is used
7425         #         for result publication in the study. Otherwise, if automatic
7426         #         publication is switched on, default value is used for result name.
7427         #
7428         #  @return New GEOM.GEOM_Object, containing processed shape.
7429         #
7430         #  @ref swig_todo "Example"
7431         @ManageTransactions("HealOp")
7432         def ChangeOrientationShellCopy(self, theObject, theName=None):
7433             """
7434             Change orientation of the given object.
7435
7436             Parameters:
7437                 theObject Shape to be processed.
7438                 theName Object name; when specified, this parameter is used
7439                         for result publication in the study. Otherwise, if automatic
7440                         publication is switched on, default value is used for result name.
7441
7442             Returns:
7443                 New GEOM.GEOM_Object, containing processed shape.
7444             """
7445             anObj = self.HealOp.ChangeOrientationCopy(theObject)
7446             RaiseIfFailed("ChangeOrientationCopy", self.HealOp)
7447             self._autoPublish(anObj, theName, "reversed")
7448             return anObj
7449
7450         ## Try to limit tolerance of the given object by value \a theTolerance.
7451         #  @param theObject Shape to be processed.
7452         #  @param theTolerance Required tolerance value.
7453         #  @param theName Object name; when specified, this parameter is used
7454         #         for result publication in the study. Otherwise, if automatic
7455         #         publication is switched on, default value is used for result name.
7456         #
7457         #  @return New GEOM.GEOM_Object, containing processed shape.
7458         #
7459         #  @ref tui_limit_tolerance "Example"
7460         @ManageTransactions("HealOp")
7461         def LimitTolerance(self, theObject, theTolerance = 1e-07, theName=None):
7462             """
7463             Try to limit tolerance of the given object by value theTolerance.
7464
7465             Parameters:
7466                 theObject Shape to be processed.
7467                 theTolerance Required tolerance value.
7468                 theName Object name; when specified, this parameter is used
7469                         for result publication in the study. Otherwise, if automatic
7470                         publication is switched on, default value is used for result name.
7471
7472             Returns:
7473                 New GEOM.GEOM_Object, containing processed shape.
7474             """
7475             anObj = self.HealOp.LimitTolerance(theObject, theTolerance)
7476             RaiseIfFailed("LimitTolerance", self.HealOp)
7477             self._autoPublish(anObj, theName, "limitTolerance")
7478             return anObj
7479
7480         ## Get a list of wires (wrapped in GEOM.GEOM_Object-s),
7481         #  that constitute a free boundary of the given shape.
7482         #  @param theObject Shape to get free boundary of.
7483         #  @param theName Object name; when specified, this parameter is used
7484         #         for result publication in the study. Otherwise, if automatic
7485         #         publication is switched on, default value is used for result name.
7486         #
7487         #  @return [\a status, \a theClosedWires, \a theOpenWires]
7488         #  \n \a status: FALSE, if an error(s) occurred during the method execution.
7489         #  \n \a theClosedWires: Closed wires on the free boundary of the given shape.
7490         #  \n \a theOpenWires: Open wires on the free boundary of the given shape.
7491         #
7492         #  @ref tui_free_boundaries_page "Example"
7493         @ManageTransactions("HealOp")
7494         def GetFreeBoundary(self, theObject, theName=None):
7495             """
7496             Get a list of wires (wrapped in GEOM.GEOM_Object-s),
7497             that constitute a free boundary of the given shape.
7498
7499             Parameters:
7500                 theObject Shape to get free boundary of.
7501                 theName Object name; when specified, this parameter is used
7502                         for result publication in the study. Otherwise, if automatic
7503                         publication is switched on, default value is used for result name.
7504
7505             Returns:
7506                 [status, theClosedWires, theOpenWires]
7507                  status: FALSE, if an error(s) occurred during the method execution.
7508                  theClosedWires: Closed wires on the free boundary of the given shape.
7509                  theOpenWires: Open wires on the free boundary of the given shape.
7510             """
7511             # Example: see GEOM_TestHealing.py
7512             anObj = self.HealOp.GetFreeBoundary( ToList( theObject ))
7513             RaiseIfFailed("GetFreeBoundary", self.HealOp)
7514             self._autoPublish(anObj[1], theName, "closedWire")
7515             self._autoPublish(anObj[2], theName, "openWire")
7516             return anObj
7517
7518         ## Replace coincident faces in \a theShapes by one face.
7519         #  @param theShapes Initial shapes, either a list or compound of shapes.
7520         #  @param theTolerance Maximum distance between faces, which can be considered as coincident.
7521         #  @param doKeepNonSolids If FALSE, only solids will present in the result,
7522         #                         otherwise all initial shapes.
7523         #  @param theName Object name; when specified, this parameter is used
7524         #         for result publication in the study. Otherwise, if automatic
7525         #         publication is switched on, default value is used for result name.
7526         #
7527         #  @return New GEOM.GEOM_Object, containing copies of theShapes without coincident faces.
7528         #
7529         #  @ref tui_glue_faces "Example"
7530         @ManageTransactions("ShapesOp")
7531         def MakeGlueFaces(self, theShapes, theTolerance, doKeepNonSolids=True, theName=None):
7532             """
7533             Replace coincident faces in theShapes by one face.
7534
7535             Parameters:
7536                 theShapes Initial shapes, either a list or compound of shapes.
7537                 theTolerance Maximum distance between faces, which can be considered as coincident.
7538                 doKeepNonSolids If FALSE, only solids will present in the result,
7539                                 otherwise all initial shapes.
7540                 theName Object name; when specified, this parameter is used
7541                         for result publication in the study. Otherwise, if automatic
7542                         publication is switched on, default value is used for result name.
7543
7544             Returns:
7545                 New GEOM.GEOM_Object, containing copies of theShapes without coincident faces.
7546             """
7547             # Example: see GEOM_Spanner.py
7548             theTolerance,Parameters = ParseParameters(theTolerance)
7549             anObj = self.ShapesOp.MakeGlueFaces(ToList(theShapes), theTolerance, doKeepNonSolids)
7550             if anObj is None:
7551                 raise RuntimeError("MakeGlueFaces : " + self.ShapesOp.GetErrorCode())
7552             anObj.SetParameters(Parameters)
7553             self._autoPublish(anObj, theName, "glueFaces")
7554             return anObj
7555
7556         ## Find coincident faces in \a theShapes for possible gluing.
7557         #  @param theShapes Initial shapes, either a list or compound of shapes.
7558         #  @param theTolerance Maximum distance between faces,
7559         #                      which can be considered as coincident.
7560         #  @param theName Object name; when specified, this parameter is used
7561         #         for result publication in the study. Otherwise, if automatic
7562         #         publication is switched on, default value is used for result name.
7563         #
7564         #  @return GEOM.ListOfGO
7565         #
7566         #  @ref tui_glue_faces "Example"
7567         @ManageTransactions("ShapesOp")
7568         def GetGlueFaces(self, theShapes, theTolerance, theName=None):
7569             """
7570             Find coincident faces in theShapes for possible gluing.
7571
7572             Parameters:
7573                 theShapes Initial shapes, either a list or compound of shapes.
7574                 theTolerance Maximum distance between faces,
7575                              which can be considered as coincident.
7576                 theName Object name; when specified, this parameter is used
7577                         for result publication in the study. Otherwise, if automatic
7578                         publication is switched on, default value is used for result name.
7579
7580             Returns:
7581                 GEOM.ListOfGO
7582             """
7583             anObj = self.ShapesOp.GetGlueFaces(ToList(theShapes), theTolerance)
7584             RaiseIfFailed("GetGlueFaces", self.ShapesOp)
7585             self._autoPublish(anObj, theName, "facesToGlue")
7586             return anObj
7587
7588         ## Replace coincident faces in \a theShapes by one face
7589         #  in compliance with given list of faces
7590         #  @param theShapes Initial shapes, either a list or compound of shapes.
7591         #  @param theTolerance Maximum distance between faces,
7592         #                      which can be considered as coincident.
7593         #  @param theFaces List of faces for gluing.
7594         #  @param doKeepNonSolids If FALSE, only solids will present in the result,
7595         #                         otherwise all initial shapes.
7596         #  @param doGlueAllEdges If TRUE, all coincident edges of <VAR>theShape</VAR>
7597         #                        will be glued, otherwise only the edges,
7598         #                        belonging to <VAR>theFaces</VAR>.
7599         #  @param theName Object name; when specified, this parameter is used
7600         #         for result publication in the study. Otherwise, if automatic
7601         #         publication is switched on, default value is used for result name.
7602         #
7603         #  @return New GEOM.GEOM_Object, containing copies of theShapes without coincident faces.
7604         #
7605         #  @ref tui_glue_faces "Example"
7606         @ManageTransactions("ShapesOp")
7607         def MakeGlueFacesByList(self, theShapes, theTolerance, theFaces,
7608                                 doKeepNonSolids=True, doGlueAllEdges=True, theName=None):
7609             """
7610             Replace coincident faces in theShapes by one face
7611             in compliance with given list of faces
7612
7613             Parameters:
7614                 theShapes theShapes Initial shapes, either a list or compound of shapes.
7615                 theTolerance Maximum distance between faces,
7616                              which can be considered as coincident.
7617                 theFaces List of faces for gluing.
7618                 doKeepNonSolids If FALSE, only solids will present in the result,
7619                                 otherwise all initial shapes.
7620                 doGlueAllEdges If TRUE, all coincident edges of theShape
7621                                will be glued, otherwise only the edges,
7622                                belonging to theFaces.
7623                 theName Object name; when specified, this parameter is used
7624                         for result publication in the study. Otherwise, if automatic
7625                         publication is switched on, default value is used for result name.
7626
7627             Returns:
7628                 New GEOM.GEOM_Object, containing copies of theShapes without coincident faces.
7629             """
7630             anObj = self.ShapesOp.MakeGlueFacesByList(ToList(theShapes), theTolerance, ToList(theFaces),
7631                                                       doKeepNonSolids, doGlueAllEdges)
7632             if anObj is None:
7633                 raise RuntimeError("MakeGlueFacesByList : " + self.ShapesOp.GetErrorCode())
7634             self._autoPublish(anObj, theName, "glueFaces")
7635             return anObj
7636
7637         ## Replace coincident edges in \a theShapes by one edge.
7638         #  @param theShapes Initial shapes, either a list or compound of shapes.
7639         #  @param theTolerance Maximum distance between edges, which can be considered as coincident.
7640         #  @param theName Object name; when specified, this parameter is used
7641         #         for result publication in the study. Otherwise, if automatic
7642         #         publication is switched on, default value is used for result name.
7643         #
7644         #  @return New GEOM.GEOM_Object, containing copies of theShapes without coincident edges.
7645         #
7646         #  @ref tui_glue_edges "Example"
7647         @ManageTransactions("ShapesOp")
7648         def MakeGlueEdges(self, theShapes, theTolerance, theName=None):
7649             """
7650             Replace coincident edges in theShapes by one edge.
7651
7652             Parameters:
7653                 theShapes Initial shapes, either a list or compound of shapes.
7654                 theTolerance Maximum distance between edges, which can be considered as coincident.
7655                 theName Object name; when specified, this parameter is used
7656                         for result publication in the study. Otherwise, if automatic
7657                         publication is switched on, default value is used for result name.
7658
7659             Returns:
7660                 New GEOM.GEOM_Object, containing copies of theShapes without coincident edges.
7661             """
7662             theTolerance,Parameters = ParseParameters(theTolerance)
7663             anObj = self.ShapesOp.MakeGlueEdges(ToList(theShapes), theTolerance)
7664             if anObj is None:
7665                 raise RuntimeError("MakeGlueEdges : " + self.ShapesOp.GetErrorCode())
7666             anObj.SetParameters(Parameters)
7667             self._autoPublish(anObj, theName, "glueEdges")
7668             return anObj
7669
7670         ## Find coincident edges in \a theShapes for possible gluing.
7671         #  @param theShapes Initial shapes, either a list or compound of shapes.
7672         #  @param theTolerance Maximum distance between edges,
7673         #                      which can be considered as coincident.
7674         #  @param theName Object name; when specified, this parameter is used
7675         #         for result publication in the study. Otherwise, if automatic
7676         #         publication is switched on, default value is used for result name.
7677         #
7678         #  @return GEOM.ListOfGO
7679         #
7680         #  @ref tui_glue_edges "Example"
7681         @ManageTransactions("ShapesOp")
7682         def GetGlueEdges(self, theShapes, theTolerance, theName=None):
7683             """
7684             Find coincident edges in theShapes for possible gluing.
7685
7686             Parameters:
7687                 theShapes Initial shapes, either a list or compound of shapes.
7688                 theTolerance Maximum distance between edges,
7689                              which can be considered as coincident.
7690                 theName Object name; when specified, this parameter is used
7691                         for result publication in the study. Otherwise, if automatic
7692                         publication is switched on, default value is used for result name.
7693
7694             Returns:
7695                 GEOM.ListOfGO
7696             """
7697             anObj = self.ShapesOp.GetGlueEdges(ToList(theShapes), theTolerance)
7698             RaiseIfFailed("GetGlueEdges", self.ShapesOp)
7699             self._autoPublish(anObj, theName, "edgesToGlue")
7700             return anObj
7701
7702         ## Replace coincident edges in theShapes by one edge
7703         #  in compliance with given list of edges.
7704         #  @param theShapes Initial shapes, either a list or compound of shapes.
7705         #  @param theTolerance Maximum distance between edges,
7706         #                      which can be considered as coincident.
7707         #  @param theEdges List of edges for gluing.
7708         #  @param theName Object name; when specified, this parameter is used
7709         #         for result publication in the study. Otherwise, if automatic
7710         #         publication is switched on, default value is used for result name.
7711         #
7712         #  @return New GEOM.GEOM_Object, containing copies of theShapes without coincident edges.
7713         #
7714         #  @ref tui_glue_edges "Example"
7715         @ManageTransactions("ShapesOp")
7716         def MakeGlueEdgesByList(self, theShapes, theTolerance, theEdges, theName=None):
7717             """
7718             Replace coincident edges in theShapes by one edge
7719             in compliance with given list of edges.
7720
7721             Parameters:
7722                 theShapes Initial shapes, either a list or compound of shapes.
7723                 theTolerance Maximum distance between edges,
7724                              which can be considered as coincident.
7725                 theEdges List of edges for gluing.
7726                 theName Object name; when specified, this parameter is used
7727                         for result publication in the study. Otherwise, if automatic
7728                         publication is switched on, default value is used for result name.
7729
7730             Returns:
7731                 New GEOM.GEOM_Object, containing copies of theShapes without coincident edges.
7732             """
7733             anObj = self.ShapesOp.MakeGlueEdgesByList(ToList(theShapes), theTolerance, theEdges)
7734             if anObj is None:
7735                 raise RuntimeError("MakeGlueEdgesByList : " + self.ShapesOp.GetErrorCode())
7736             self._autoPublish(anObj, theName, "glueEdges")
7737             return anObj
7738
7739         # end of l3_healing
7740         ## @}
7741
7742         ## @addtogroup l3_boolean Boolean Operations
7743         ## @{
7744
7745         # -----------------------------------------------------------------------------
7746         # Boolean (Common, Cut, Fuse, Section)
7747         # -----------------------------------------------------------------------------
7748
7749         ## Perform one of boolean operations on two given shapes.
7750         #  @param theShape1 First argument for boolean operation.
7751         #  @param theShape2 Second argument for boolean operation.
7752         #  @param theOperation Indicates the operation to be done:\n
7753         #                      1 - Common, 2 - Cut, 3 - Fuse, 4 - Section.
7754         #  @param checkSelfInte The flag that tells if the arguments should
7755         #         be checked for self-intersection prior to the operation.
7756         #  @param theName Object name; when specified, this parameter is used
7757         #         for result publication in the study. Otherwise, if automatic
7758         #         publication is switched on, default value is used for result name.
7759         #
7760         #  @note This algorithm doesn't find all types of self-intersections.
7761         #        It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7762         #        vertex/face and edge/face intersections. Face/face
7763         #        intersections detection is switched off as it is a
7764         #        time-consuming operation that gives an impact on performance.
7765         #        To find all self-intersections please use
7766         #        CheckSelfIntersections() method.
7767         #
7768         #  @return New GEOM.GEOM_Object, containing the result shape.
7769         #
7770         #  @ref tui_fuse "Example"
7771         @ManageTransactions("BoolOp")
7772         def MakeBoolean(self, theShape1, theShape2, theOperation, checkSelfInte=False, theName=None):
7773             """
7774             Perform one of boolean operations on two given shapes.
7775
7776             Parameters:
7777                 theShape1 First argument for boolean operation.
7778                 theShape2 Second argument for boolean operation.
7779                 theOperation Indicates the operation to be done:
7780                              1 - Common, 2 - Cut, 3 - Fuse, 4 - Section.
7781                 checkSelfInte The flag that tells if the arguments should
7782                               be checked for self-intersection prior to
7783                               the operation.
7784                 theName Object name; when specified, this parameter is used
7785                         for result publication in the study. Otherwise, if automatic
7786                         publication is switched on, default value is used for result name.
7787
7788             Note:
7789                     This algorithm doesn't find all types of self-intersections.
7790                     It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7791                     vertex/face and edge/face intersections. Face/face
7792                     intersections detection is switched off as it is a
7793                     time-consuming operation that gives an impact on performance.
7794                     To find all self-intersections please use
7795                     CheckSelfIntersections() method.
7796
7797             Returns:
7798                 New GEOM.GEOM_Object, containing the result shape.
7799             """
7800             # Example: see GEOM_TestAll.py
7801             anObj = self.BoolOp.MakeBoolean(theShape1, theShape2, theOperation, checkSelfInte)
7802             RaiseIfFailed("MakeBoolean", self.BoolOp)
7803             def_names = { 1: "common", 2: "cut", 3: "fuse", 4: "section" }
7804             self._autoPublish(anObj, theName, def_names[theOperation])
7805             return anObj
7806
7807         ## Perform Common boolean operation on two given shapes.
7808         #  @param theShape1 First argument for boolean operation.
7809         #  @param theShape2 Second argument for boolean operation.
7810         #  @param checkSelfInte The flag that tells if the arguments should
7811         #         be checked for self-intersection prior to the operation.
7812         #  @param theName Object name; when specified, this parameter is used
7813         #         for result publication in the study. Otherwise, if automatic
7814         #         publication is switched on, default value is used for result name.
7815         #
7816         #  @note This algorithm doesn't find all types of self-intersections.
7817         #        It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7818         #        vertex/face and edge/face intersections. Face/face
7819         #        intersections detection is switched off as it is a
7820         #        time-consuming operation that gives an impact on performance.
7821         #        To find all self-intersections please use
7822         #        CheckSelfIntersections() method.
7823         #
7824         #  @return New GEOM.GEOM_Object, containing the result shape.
7825         #
7826         #  @ref tui_common "Example 1"
7827         #  \n @ref swig_MakeCommon "Example 2"
7828         def MakeCommon(self, theShape1, theShape2, checkSelfInte=False, theName=None):
7829             """
7830             Perform Common boolean operation on two given shapes.
7831
7832             Parameters:
7833                 theShape1 First argument for boolean operation.
7834                 theShape2 Second argument for boolean operation.
7835                 checkSelfInte The flag that tells if the arguments should
7836                               be checked for self-intersection prior to
7837                               the operation.
7838                 theName Object name; when specified, this parameter is used
7839                         for result publication in the study. Otherwise, if automatic
7840                         publication is switched on, default value is used for result name.
7841
7842             Note:
7843                     This algorithm doesn't find all types of self-intersections.
7844                     It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7845                     vertex/face and edge/face intersections. Face/face
7846                     intersections detection is switched off as it is a
7847                     time-consuming operation that gives an impact on performance.
7848                     To find all self-intersections please use
7849                     CheckSelfIntersections() method.
7850
7851             Returns:
7852                 New GEOM.GEOM_Object, containing the result shape.
7853             """
7854             # Example: see GEOM_TestOthers.py
7855             # note: auto-publishing is done in self.MakeBoolean()
7856             return self.MakeBoolean(theShape1, theShape2, 1, checkSelfInte, theName)
7857
7858         ## Perform Cut boolean operation on two given shapes.
7859         #  @param theShape1 First argument for boolean operation.
7860         #  @param theShape2 Second argument for boolean operation.
7861         #  @param checkSelfInte The flag that tells if the arguments should
7862         #         be checked for self-intersection prior to the operation.
7863         #  @param theName Object name; when specified, this parameter is used
7864         #         for result publication in the study. Otherwise, if automatic
7865         #         publication is switched on, default value is used for result name.
7866         #
7867         #  @note This algorithm doesn't find all types of self-intersections.
7868         #        It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7869         #        vertex/face and edge/face intersections. Face/face
7870         #        intersections detection is switched off as it is a
7871         #        time-consuming operation that gives an impact on performance.
7872         #        To find all self-intersections please use
7873         #        CheckSelfIntersections() method.
7874         #
7875         #  @return New GEOM.GEOM_Object, containing the result shape.
7876         #
7877         #  @ref tui_cut "Example 1"
7878         #  \n @ref swig_MakeCommon "Example 2"
7879         def MakeCut(self, theShape1, theShape2, checkSelfInte=False, theName=None):
7880             """
7881             Perform Cut boolean operation on two given shapes.
7882
7883             Parameters:
7884                 theShape1 First argument for boolean operation.
7885                 theShape2 Second argument for boolean operation.
7886                 checkSelfInte The flag that tells if the arguments should
7887                               be checked for self-intersection prior to
7888                               the operation.
7889                 theName Object name; when specified, this parameter is used
7890                         for result publication in the study. Otherwise, if automatic
7891                         publication is switched on, default value is used for result name.
7892
7893             Note:
7894                     This algorithm doesn't find all types of self-intersections.
7895                     It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7896                     vertex/face and edge/face intersections. Face/face
7897                     intersections detection is switched off as it is a
7898                     time-consuming operation that gives an impact on performance.
7899                     To find all self-intersections please use
7900                     CheckSelfIntersections() method.
7901
7902             Returns:
7903                 New GEOM.GEOM_Object, containing the result shape.
7904
7905             """
7906             # Example: see GEOM_TestOthers.py
7907             # note: auto-publishing is done in self.MakeBoolean()
7908             return self.MakeBoolean(theShape1, theShape2, 2, checkSelfInte, theName)
7909
7910         ## Perform Fuse boolean operation on two given shapes.
7911         #  @param theShape1 First argument for boolean operation.
7912         #  @param theShape2 Second argument for boolean operation.
7913         #  @param checkSelfInte The flag that tells if the arguments should
7914         #         be checked for self-intersection prior to the operation.
7915         #  @param rmExtraEdges The flag that tells if Remove Extra Edges
7916         #         operation should be performed during the operation.
7917         #  @param theName Object name; when specified, this parameter is used
7918         #         for result publication in the study. Otherwise, if automatic
7919         #         publication is switched on, default value is used for result name.
7920         #
7921         #  @note This algorithm doesn't find all types of self-intersections.
7922         #        It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7923         #        vertex/face and edge/face intersections. Face/face
7924         #        intersections detection is switched off as it is a
7925         #        time-consuming operation that gives an impact on performance.
7926         #        To find all self-intersections please use
7927         #        CheckSelfIntersections() method.
7928         #
7929         #  @return New GEOM.GEOM_Object, containing the result shape.
7930         #
7931         #  @ref tui_fuse "Example 1"
7932         #  \n @ref swig_MakeCommon "Example 2"
7933         @ManageTransactions("BoolOp")
7934         def MakeFuse(self, theShape1, theShape2, checkSelfInte=False,
7935                      rmExtraEdges=False, theName=None):
7936             """
7937             Perform Fuse boolean operation on two given shapes.
7938
7939             Parameters:
7940                 theShape1 First argument for boolean operation.
7941                 theShape2 Second argument for boolean operation.
7942                 checkSelfInte The flag that tells if the arguments should
7943                               be checked for self-intersection prior to
7944                               the operation.
7945                 rmExtraEdges The flag that tells if Remove Extra Edges
7946                              operation should be performed during the operation.
7947                 theName Object name; when specified, this parameter is used
7948                         for result publication in the study. Otherwise, if automatic
7949                         publication is switched on, default value is used for result name.
7950
7951             Note:
7952                     This algorithm doesn't find all types of self-intersections.
7953                     It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7954                     vertex/face and edge/face intersections. Face/face
7955                     intersections detection is switched off as it is a
7956                     time-consuming operation that gives an impact on performance.
7957                     To find all self-intersections please use
7958                     CheckSelfIntersections() method.
7959
7960             Returns:
7961                 New GEOM.GEOM_Object, containing the result shape.
7962
7963             """
7964             # Example: see GEOM_TestOthers.py
7965             anObj = self.BoolOp.MakeFuse(theShape1, theShape2,
7966                                          checkSelfInte, rmExtraEdges)
7967             RaiseIfFailed("MakeFuse", self.BoolOp)
7968             self._autoPublish(anObj, theName, "fuse")
7969             return anObj
7970
7971         ## Perform Section boolean operation on two given shapes.
7972         #  @param theShape1 First argument for boolean operation.
7973         #  @param theShape2 Second argument for boolean operation.
7974         #  @param checkSelfInte The flag that tells if the arguments should
7975         #         be checked for self-intersection prior to the operation.
7976         #         If a self-intersection detected the operation fails.
7977         #  @param theName Object name; when specified, this parameter is used
7978         #         for result publication in the study. Otherwise, if automatic
7979         #         publication is switched on, default value is used for result name.
7980         #  @return New GEOM.GEOM_Object, containing the result shape.
7981         #
7982         #  @ref tui_section "Example 1"
7983         #  \n @ref swig_MakeCommon "Example 2"
7984         def MakeSection(self, theShape1, theShape2, checkSelfInte=False, theName=None):
7985             """
7986             Perform Section boolean operation on two given shapes.
7987
7988             Parameters:
7989                 theShape1 First argument for boolean operation.
7990                 theShape2 Second argument for boolean operation.
7991                 checkSelfInte The flag that tells if the arguments should
7992                               be checked for self-intersection prior to the operation.
7993                               If a self-intersection detected the operation fails.
7994                 theName Object name; when specified, this parameter is used
7995                         for result publication in the study. Otherwise, if automatic
7996                         publication is switched on, default value is used for result name.
7997             Returns:
7998                 New GEOM.GEOM_Object, containing the result shape.
7999
8000             """
8001             # Example: see GEOM_TestOthers.py
8002             # note: auto-publishing is done in self.MakeBoolean()
8003             return self.MakeBoolean(theShape1, theShape2, 4, checkSelfInte, theName)
8004
8005         ## Perform Fuse boolean operation on the list of shapes.
8006         #  @param theShapesList Shapes to be fused.
8007         #  @param checkSelfInte The flag that tells if the arguments should
8008         #         be checked for self-intersection prior to the operation.
8009         #  @param rmExtraEdges The flag that tells if Remove Extra Edges
8010         #         operation should be performed during the operation.
8011         #  @param theName Object name; when specified, this parameter is used
8012         #         for result publication in the study. Otherwise, if automatic
8013         #         publication is switched on, default value is used for result name.
8014         #
8015         #  @note This algorithm doesn't find all types of self-intersections.
8016         #        It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
8017         #        vertex/face and edge/face intersections. Face/face
8018         #        intersections detection is switched off as it is a
8019         #        time-consuming operation that gives an impact on performance.
8020         #        To find all self-intersections please use
8021         #        CheckSelfIntersections() method.
8022         #
8023         #  @return New GEOM.GEOM_Object, containing the result shape.
8024         #
8025         #  @ref tui_fuse "Example 1"
8026         #  \n @ref swig_MakeCommon "Example 2"
8027         @ManageTransactions("BoolOp")
8028         def MakeFuseList(self, theShapesList, checkSelfInte=False,
8029                          rmExtraEdges=False, theName=None):
8030             """
8031             Perform Fuse boolean operation on the list of shapes.
8032
8033             Parameters:
8034                 theShapesList Shapes to be fused.
8035                 checkSelfInte The flag that tells if the arguments should
8036                               be checked for self-intersection prior to
8037                               the operation.
8038                 rmExtraEdges The flag that tells if Remove Extra Edges
8039                              operation should be performed during the operation.
8040                 theName Object name; when specified, this parameter is used
8041                         for result publication in the study. Otherwise, if automatic
8042                         publication is switched on, default value is used for result name.
8043
8044             Note:
8045                     This algorithm doesn't find all types of self-intersections.
8046                     It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
8047                     vertex/face and edge/face intersections. Face/face
8048                     intersections detection is switched off as it is a
8049                     time-consuming operation that gives an impact on performance.
8050                     To find all self-intersections please use
8051                     CheckSelfIntersections() method.
8052
8053             Returns:
8054                 New GEOM.GEOM_Object, containing the result shape.
8055
8056             """
8057             # Example: see GEOM_TestOthers.py
8058             anObj = self.BoolOp.MakeFuseList(theShapesList, checkSelfInte,
8059                                              rmExtraEdges)
8060             RaiseIfFailed("MakeFuseList", self.BoolOp)
8061             self._autoPublish(anObj, theName, "fuse")
8062             return anObj
8063
8064         ## Perform Common boolean operation on the list of shapes.
8065         #  @param theShapesList Shapes for Common operation.
8066         #  @param checkSelfInte The flag that tells if the arguments should
8067         #         be checked for self-intersection prior to the operation.
8068         #  @param theName Object name; when specified, this parameter is used
8069         #         for result publication in the study. Otherwise, if automatic
8070         #         publication is switched on, default value is used for result name.
8071         #
8072         #  @note This algorithm doesn't find all types of self-intersections.
8073         #        It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
8074         #        vertex/face and edge/face intersections. Face/face
8075         #        intersections detection is switched off as it is a
8076         #        time-consuming operation that gives an impact on performance.
8077         #        To find all self-intersections please use
8078         #        CheckSelfIntersections() method.
8079         #
8080         #  @return New GEOM.GEOM_Object, containing the result shape.
8081         #
8082         #  @ref tui_common "Example 1"
8083         #  \n @ref swig_MakeCommon "Example 2"
8084         @ManageTransactions("BoolOp")
8085         def MakeCommonList(self, theShapesList, checkSelfInte=False, theName=None):
8086             """
8087             Perform Common boolean operation on the list of shapes.
8088
8089             Parameters:
8090                 theShapesList Shapes for Common operation.
8091                 checkSelfInte The flag that tells if the arguments should
8092                               be checked for self-intersection prior to
8093                               the operation.
8094                 theName Object name; when specified, this parameter is used
8095                         for result publication in the study. Otherwise, if automatic
8096                         publication is switched on, default value is used for result name.
8097
8098             Note:
8099                     This algorithm doesn't find all types of self-intersections.
8100                     It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
8101                     vertex/face and edge/face intersections. Face/face
8102                     intersections detection is switched off as it is a
8103                     time-consuming operation that gives an impact on performance.
8104                     To find all self-intersections please use
8105                     CheckSelfIntersections() method.
8106
8107             Returns:
8108                 New GEOM.GEOM_Object, containing the result shape.
8109
8110             """
8111             # Example: see GEOM_TestOthers.py
8112             anObj = self.BoolOp.MakeCommonList(theShapesList, checkSelfInte)
8113             RaiseIfFailed("MakeCommonList", self.BoolOp)
8114             self._autoPublish(anObj, theName, "common")
8115             return anObj
8116
8117         ## Perform Cut boolean operation on one object and the list of tools.
8118         #  @param theMainShape The object of the operation.
8119         #  @param theShapesList The list of tools of the operation.
8120         #  @param checkSelfInte The flag that tells if the arguments should
8121         #         be checked for self-intersection prior to the operation.
8122         #  @param theName Object name; when specified, this parameter is used
8123         #         for result publication in the study. Otherwise, if automatic
8124         #         publication is switched on, default value is used for result name.
8125         #
8126         #  @note This algorithm doesn't find all types of self-intersections.
8127         #        It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
8128         #        vertex/face and edge/face intersections. Face/face
8129         #        intersections detection is switched off as it is a
8130         #        time-consuming operation that gives an impact on performance.
8131         #        To find all self-intersections please use
8132         #        CheckSelfIntersections() method.
8133         #
8134         #  @return New GEOM.GEOM_Object, containing the result shape.
8135         #
8136         #  @ref tui_cut "Example 1"
8137         #  \n @ref swig_MakeCommon "Example 2"
8138         @ManageTransactions("BoolOp")
8139         def MakeCutList(self, theMainShape, theShapesList, checkSelfInte=False, theName=None):
8140             """
8141             Perform Cut boolean operation on one object and the list of tools.
8142
8143             Parameters:
8144                 theMainShape The object of the operation.
8145                 theShapesList The list of tools of the operation.
8146                 checkSelfInte The flag that tells if the arguments should
8147                               be checked for self-intersection prior to
8148                               the operation.
8149                 theName Object name; when specified, this parameter is used
8150                         for result publication in the study. Otherwise, if automatic
8151                         publication is switched on, default value is used for result name.
8152
8153             Note:
8154                     This algorithm doesn't find all types of self-intersections.
8155                     It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
8156                     vertex/face and edge/face intersections. Face/face
8157                     intersections detection is switched off as it is a
8158                     time-consuming operation that gives an impact on performance.
8159                     To find all self-intersections please use
8160                     CheckSelfIntersections() method.
8161
8162             Returns:
8163                 New GEOM.GEOM_Object, containing the result shape.
8164
8165             """
8166             # Example: see GEOM_TestOthers.py
8167             anObj = self.BoolOp.MakeCutList(theMainShape, theShapesList, checkSelfInte)
8168             RaiseIfFailed("MakeCutList", self.BoolOp)
8169             self._autoPublish(anObj, theName, "cut")
8170             return anObj
8171
8172         # end of l3_boolean
8173         ## @}
8174
8175         ## @addtogroup l3_basic_op
8176         ## @{
8177
8178         ## Perform partition operation.
8179         #  @param ListShapes Shapes to be intersected.
8180         #  @param ListTools Shapes to intersect theShapes.
8181         #  @param Limit Type of resulting shapes (see ShapeType()).\n
8182         #         If this parameter is set to -1 ("Auto"), most appropriate shape limit
8183         #         type will be detected automatically.
8184         #  @param KeepNonlimitShapes if this parameter == 0, then only shapes of
8185         #                             target type (equal to Limit) are kept in the result,
8186         #                             else standalone shapes of lower dimension
8187         #                             are kept also (if they exist).
8188         #
8189         #  @param theName Object name; when specified, this parameter is used
8190         #         for result publication in the study. Otherwise, if automatic
8191         #         publication is switched on, default value is used for result name.
8192         #
8193         #  @note Each compound from ListShapes and ListTools will be exploded
8194         #        in order to avoid possible intersection between shapes from this compound.
8195         #
8196         #  After implementation new version of PartitionAlgo (October 2006)
8197         #  other parameters are ignored by current functionality. They are kept
8198         #  in this function only for support old versions.
8199         #      @param ListKeepInside Shapes, outside which the results will be deleted.
8200         #         Each shape from theKeepInside must belong to theShapes also.
8201         #      @param ListRemoveInside Shapes, inside which the results will be deleted.
8202         #         Each shape from theRemoveInside must belong to theShapes also.
8203         #      @param RemoveWebs If TRUE, perform Glue 3D algorithm.
8204         #      @param ListMaterials Material indices for each shape. Make sense,
8205         #         only if theRemoveWebs is TRUE.
8206         #
8207         #  @return New GEOM.GEOM_Object, containing the result shapes.
8208         #
8209         #  @ref tui_partition "Example"
8210         @ManageTransactions("BoolOp")
8211         def MakePartition(self, ListShapes, ListTools=[], ListKeepInside=[], ListRemoveInside=[],
8212                           Limit=ShapeType["AUTO"], RemoveWebs=0, ListMaterials=[],
8213                           KeepNonlimitShapes=0, theName=None):
8214             """
8215             Perform partition operation.
8216
8217             Parameters:
8218                 ListShapes Shapes to be intersected.
8219                 ListTools Shapes to intersect theShapes.
8220                 Limit Type of resulting shapes (see geompy.ShapeType)
8221                       If this parameter is set to -1 ("Auto"), most appropriate shape limit
8222                       type will be detected automatically.
8223                 KeepNonlimitShapes if this parameter == 0, then only shapes of
8224                                     target type (equal to Limit) are kept in the result,
8225                                     else standalone shapes of lower dimension
8226                                     are kept also (if they exist).
8227
8228                 theName Object name; when specified, this parameter is used
8229                         for result publication in the study. Otherwise, if automatic
8230                         publication is switched on, default value is used for result name.
8231             Note:
8232                     Each compound from ListShapes and ListTools will be exploded
8233                     in order to avoid possible intersection between shapes from
8234                     this compound.
8235
8236             After implementation new version of PartitionAlgo (October 2006) other
8237             parameters are ignored by current functionality. They are kept in this
8238             function only for support old versions.
8239
8240             Ignored parameters:
8241                 ListKeepInside Shapes, outside which the results will be deleted.
8242                                Each shape from theKeepInside must belong to theShapes also.
8243                 ListRemoveInside Shapes, inside which the results will be deleted.
8244                                  Each shape from theRemoveInside must belong to theShapes also.
8245                 RemoveWebs If TRUE, perform Glue 3D algorithm.
8246                 ListMaterials Material indices for each shape. Make sense, only if theRemoveWebs is TRUE.
8247
8248             Returns:
8249                 New GEOM.GEOM_Object, containing the result shapes.
8250             """
8251             # Example: see GEOM_TestAll.py
8252             if Limit == self.ShapeType["AUTO"]:
8253                 # automatic detection of the most appropriate shape limit type
8254                 lim = GEOM.SHAPE
8255                 for s in ListShapes: lim = min(lim, s.GetMaxShapeType())
8256                 Limit = EnumToLong(lim)
8257                 pass
8258             anObj = self.BoolOp.MakePartition(ListShapes, ListTools,
8259                                               ListKeepInside, ListRemoveInside,
8260                                               Limit, RemoveWebs, ListMaterials,
8261                                               KeepNonlimitShapes);
8262             RaiseIfFailed("MakePartition", self.BoolOp)
8263             self._autoPublish(anObj, theName, "partition")
8264             return anObj
8265
8266         ## Perform partition operation.
8267         #  This method may be useful if it is needed to make a partition for
8268         #  compound contains nonintersected shapes. Performance will be better
8269         #  since intersection between shapes from compound is not performed.
8270         #
8271         #  Description of all parameters as in previous method MakePartition().
8272         #  One additional parameter is provided:
8273         #  @param checkSelfInte The flag that tells if the arguments should
8274         #         be checked for self-intersection prior to the operation.
8275         #
8276         #  @note This algorithm doesn't find all types of self-intersections.
8277         #        It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
8278         #        vertex/face and edge/face intersections. Face/face
8279         #        intersections detection is switched off as it is a
8280         #        time-consuming operation that gives an impact on performance.
8281         #        To find all self-intersections please use
8282         #        CheckSelfIntersections() method.
8283         #
8284         #  @note Passed compounds (via ListShapes or via ListTools)
8285         #           have to consist of nonintersecting shapes.
8286         #
8287         #  @return New GEOM.GEOM_Object, containing the result shapes.
8288         #
8289         #  @ref swig_todo "Example"
8290         @ManageTransactions("BoolOp")
8291         def MakePartitionNonSelfIntersectedShape(self, ListShapes, ListTools=[],
8292                                                  ListKeepInside=[], ListRemoveInside=[],
8293                                                  Limit=ShapeType["AUTO"], RemoveWebs=0,
8294                                                  ListMaterials=[], KeepNonlimitShapes=0,
8295                                                  checkSelfInte=False, theName=None):
8296             """
8297             Perform partition operation.
8298             This method may be useful if it is needed to make a partition for
8299             compound contains nonintersected shapes. Performance will be better
8300             since intersection between shapes from compound is not performed.
8301
8302             Parameters:
8303                 Description of all parameters as in method geompy.MakePartition.
8304                 One additional parameter is provided:
8305                 checkSelfInte The flag that tells if the arguments should
8306                               be checked for self-intersection prior to
8307                               the operation.
8308
8309             Note:
8310                     This algorithm doesn't find all types of self-intersections.
8311                     It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
8312                     vertex/face and edge/face intersections. Face/face
8313                     intersections detection is switched off as it is a
8314                     time-consuming operation that gives an impact on performance.
8315                     To find all self-intersections please use
8316                     CheckSelfIntersections() method.
8317
8318             NOTE:
8319                 Passed compounds (via ListShapes or via ListTools)
8320                 have to consist of nonintersecting shapes.
8321
8322             Returns:
8323                 New GEOM.GEOM_Object, containing the result shapes.
8324             """
8325             if Limit == self.ShapeType["AUTO"]:
8326                 # automatic detection of the most appropriate shape limit type
8327                 lim = GEOM.SHAPE
8328                 for s in ListShapes: lim = min(lim, s.GetMaxShapeType())
8329                 Limit = EnumToLong(lim)
8330                 pass
8331             anObj = self.BoolOp.MakePartitionNonSelfIntersectedShape(ListShapes, ListTools,
8332                                                                      ListKeepInside, ListRemoveInside,
8333                                                                      Limit, RemoveWebs, ListMaterials,
8334                                                                      KeepNonlimitShapes, checkSelfInte);
8335             RaiseIfFailed("MakePartitionNonSelfIntersectedShape", self.BoolOp)
8336             self._autoPublish(anObj, theName, "partition")
8337             return anObj
8338
8339         ## See method MakePartition() for more information.
8340         #
8341         #  @ref tui_partition "Example 1"
8342         #  \n @ref swig_Partition "Example 2"
8343         def Partition(self, ListShapes, ListTools=[], ListKeepInside=[], ListRemoveInside=[],
8344                       Limit=ShapeType["AUTO"], RemoveWebs=0, ListMaterials=[],
8345                       KeepNonlimitShapes=0, theName=None):
8346             """
8347             See method geompy.MakePartition for more information.
8348             """
8349             # Example: see GEOM_TestOthers.py
8350             # note: auto-publishing is done in self.MakePartition()
8351             anObj = self.MakePartition(ListShapes, ListTools,
8352                                        ListKeepInside, ListRemoveInside,
8353                                        Limit, RemoveWebs, ListMaterials,
8354                                        KeepNonlimitShapes, theName);
8355             return anObj
8356
8357         ## Perform partition of the Shape with the Plane
8358         #  @param theShape Shape to be intersected.
8359         #  @param thePlane Tool shape, to intersect theShape.
8360         #  @param theName Object name; when specified, this parameter is used
8361         #         for result publication in the study. Otherwise, if automatic
8362         #         publication is switched on, default value is used for result name.
8363         #
8364         #  @return New GEOM.GEOM_Object, containing the result shape.
8365         #
8366         #  @note This operation is a shortcut to the more general @ref MakePartition
8367         #  operation, where @a theShape specifies single "object" (shape being partitioned)
8368         #  and @a thePlane specifies single "tool" (intersector shape). Other parameters of
8369         #  @ref MakePartition operation have default values:
8370         #  - @a Limit: GEOM::SHAPE (shape limit corresponds to the type of @a theShape)
8371         #  - @a KeepNonlimitShapes: 0
8372         #  - @a KeepInside, @a RemoveInside, @a RemoveWebs,
8373         #    @a Materials (obsolete parameters): empty
8374         #
8375         #  @note I.e. the following two operations are equivalent:
8376         #  @code
8377         #  Result = geompy.MakeHalfPartition(Object, Plane)
8378         #  Result = geompy.MakePartition([Object], [Plane])
8379         #  @endcode
8380         #
8381         #  @sa MakePartition, MakePartitionNonSelfIntersectedShape
8382         #
8383         #  @ref tui_partition "Example"
8384         @ManageTransactions("BoolOp")
8385         def MakeHalfPartition(self, theShape, thePlane, theName=None):
8386             """
8387             Perform partition of the Shape with the Plane
8388
8389             Parameters:
8390                 theShape Shape to be intersected.
8391                 thePlane Tool shape, to intersect theShape.
8392                 theName Object name; when specified, this parameter is used
8393                         for result publication in the study. Otherwise, if automatic
8394                         publication is switched on, default value is used for result name.
8395
8396             Returns:
8397                 New GEOM.GEOM_Object, containing the result shape.
8398          
8399             Note: This operation is a shortcut to the more general MakePartition
8400             operation, where theShape specifies single "object" (shape being partitioned)
8401             and thePlane specifies single "tool" (intersector shape). Other parameters of
8402             MakePartition operation have default values:
8403             - Limit: GEOM::SHAPE (shape limit corresponds to the type of theShape)
8404             - KeepNonlimitShapes: 0
8405             - KeepInside, RemoveInside, RemoveWebs, Materials (obsolete parameters): empty
8406          
8407             I.e. the following two operations are equivalent:
8408               Result = geompy.MakeHalfPartition(Object, Plane)
8409               Result = geompy.MakePartition([Object], [Plane])
8410             """
8411             # Example: see GEOM_TestAll.py
8412             anObj = self.BoolOp.MakeHalfPartition(theShape, thePlane)
8413             RaiseIfFailed("MakeHalfPartition", self.BoolOp)
8414             self._autoPublish(anObj, theName, "partition")
8415             return anObj
8416
8417         # end of l3_basic_op
8418         ## @}
8419
8420         ## @addtogroup l3_transform
8421         ## @{
8422
8423         ## Translate the given object along the vector, specified
8424         #  by its end points.
8425         #  @param theObject The object to be translated.
8426         #  @param thePoint1 Start point of translation vector.
8427         #  @param thePoint2 End point of translation vector.
8428         #  @param theCopy Flag used to translate object itself or create a copy.
8429         #  @return Translated @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
8430         #  new GEOM.GEOM_Object, containing the translated object if @a theCopy flag is @c True.
8431         @ManageTransactions("TrsfOp")
8432         def TranslateTwoPoints(self, theObject, thePoint1, thePoint2, theCopy=False):
8433             """
8434             Translate the given object along the vector, specified by its end points.
8435
8436             Parameters:
8437                 theObject The object to be translated.
8438                 thePoint1 Start point of translation vector.
8439                 thePoint2 End point of translation vector.
8440                 theCopy Flag used to translate object itself or create a copy.
8441
8442             Returns:
8443                 Translated theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
8444                 new GEOM.GEOM_Object, containing the translated object if theCopy flag is True.
8445             """
8446             if theCopy:
8447                 anObj = self.TrsfOp.TranslateTwoPointsCopy(theObject, thePoint1, thePoint2)
8448             else:
8449                 anObj = self.TrsfOp.TranslateTwoPoints(theObject, thePoint1, thePoint2)
8450             RaiseIfFailed("TranslateTwoPoints", self.TrsfOp)
8451             return anObj
8452
8453         ## Translate the given object along the vector, specified
8454         #  by its end points, creating its copy before the translation.
8455         #  @param theObject The object to be translated.
8456         #  @param thePoint1 Start point of translation vector.
8457         #  @param thePoint2 End point of translation vector.
8458         #  @param theName Object name; when specified, this parameter is used
8459         #         for result publication in the study. Otherwise, if automatic
8460         #         publication is switched on, default value is used for result name.
8461         #
8462         #  @return New GEOM.GEOM_Object, containing the translated object.
8463         #
8464         #  @ref tui_translation "Example 1"
8465         #  \n @ref swig_MakeTranslationTwoPoints "Example 2"
8466         @ManageTransactions("TrsfOp")
8467         def MakeTranslationTwoPoints(self, theObject, thePoint1, thePoint2, theName=None):
8468             """
8469             Translate the given object along the vector, specified
8470             by its end points, creating its copy before the translation.
8471
8472             Parameters:
8473                 theObject The object to be translated.
8474                 thePoint1 Start point of translation vector.
8475                 thePoint2 End point of translation vector.
8476                 theName Object name; when specified, this parameter is used
8477                         for result publication in the study. Otherwise, if automatic
8478                         publication is switched on, default value is used for result name.
8479
8480             Returns:
8481                 New GEOM.GEOM_Object, containing the translated object.
8482             """
8483             # Example: see GEOM_TestAll.py
8484             anObj = self.TrsfOp.TranslateTwoPointsCopy(theObject, thePoint1, thePoint2)
8485             RaiseIfFailed("TranslateTwoPointsCopy", self.TrsfOp)
8486             self._autoPublish(anObj, theName, "translated")
8487             return anObj
8488
8489         ## Translate the given object along the vector, specified by its components.
8490         #  @param theObject The object to be translated.
8491         #  @param theDX,theDY,theDZ Components of translation vector.
8492         #  @param theCopy Flag used to translate object itself or create a copy.
8493         #  @return Translated @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
8494         #  new GEOM.GEOM_Object, containing the translated object if @a theCopy flag is @c True.
8495         #
8496         #  @ref tui_translation "Example"
8497         @ManageTransactions("TrsfOp")
8498         def TranslateDXDYDZ(self, theObject, theDX, theDY, theDZ, theCopy=False):
8499             """
8500             Translate the given object along the vector, specified by its components.
8501
8502             Parameters:
8503                 theObject The object to be translated.
8504                 theDX,theDY,theDZ Components of translation vector.
8505                 theCopy Flag used to translate object itself or create a copy.
8506
8507             Returns:
8508                 Translated theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
8509                 new GEOM.GEOM_Object, containing the translated object if theCopy flag is True.
8510             """
8511             # Example: see GEOM_TestAll.py
8512             theDX, theDY, theDZ, Parameters = ParseParameters(theDX, theDY, theDZ)
8513             if theCopy:
8514                 anObj = self.TrsfOp.TranslateDXDYDZCopy(theObject, theDX, theDY, theDZ)
8515             else:
8516                 anObj = self.TrsfOp.TranslateDXDYDZ(theObject, theDX, theDY, theDZ)
8517             anObj.SetParameters(Parameters)
8518             RaiseIfFailed("TranslateDXDYDZ", self.TrsfOp)
8519             return anObj
8520
8521         ## Translate the given object along the vector, specified
8522         #  by its components, creating its copy before the translation.
8523         #  @param theObject The object to be translated.
8524         #  @param theDX,theDY,theDZ Components of translation vector.
8525         #  @param theName Object name; when specified, this parameter is used
8526         #         for result publication in the study. Otherwise, if automatic
8527         #         publication is switched on, default value is used for result name.
8528         #
8529         #  @return New GEOM.GEOM_Object, containing the translated object.
8530         #
8531         #  @ref tui_translation "Example"
8532         @ManageTransactions("TrsfOp")
8533         def MakeTranslation(self,theObject, theDX, theDY, theDZ, theName=None):
8534             """
8535             Translate the given object along the vector, specified
8536             by its components, creating its copy before the translation.
8537
8538             Parameters:
8539                 theObject The object to be translated.
8540                 theDX,theDY,theDZ Components of translation vector.
8541                 theName Object name; when specified, this parameter is used
8542                         for result publication in the study. Otherwise, if automatic
8543                         publication is switched on, default value is used for result name.
8544
8545             Returns:
8546                 New GEOM.GEOM_Object, containing the translated object.
8547             """
8548             # Example: see GEOM_TestAll.py
8549             theDX, theDY, theDZ, Parameters = ParseParameters(theDX, theDY, theDZ)
8550             anObj = self.TrsfOp.TranslateDXDYDZCopy(theObject, theDX, theDY, theDZ)
8551             anObj.SetParameters(Parameters)
8552             RaiseIfFailed("TranslateDXDYDZ", self.TrsfOp)
8553             self._autoPublish(anObj, theName, "translated")
8554             return anObj
8555
8556         ## Translate the given object along the given vector.
8557         #  @param theObject The object to be translated.
8558         #  @param theVector The translation vector.
8559         #  @param theCopy Flag used to translate object itself or create a copy.
8560         #  @return Translated @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
8561         #  new GEOM.GEOM_Object, containing the translated object if @a theCopy flag is @c True.
8562         @ManageTransactions("TrsfOp")
8563         def TranslateVector(self, theObject, theVector, theCopy=False):
8564             """
8565             Translate the given object along the given vector.
8566
8567             Parameters:
8568                 theObject The object to be translated.
8569                 theVector The translation vector.
8570                 theCopy Flag used to translate object itself or create a copy.
8571
8572             Returns:
8573                 Translated theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
8574                 new GEOM.GEOM_Object, containing the translated object if theCopy flag is True.
8575             """
8576             if theCopy:
8577                 anObj = self.TrsfOp.TranslateVectorCopy(theObject, theVector)
8578             else:
8579                 anObj = self.TrsfOp.TranslateVector(theObject, theVector)
8580             RaiseIfFailed("TranslateVector", self.TrsfOp)
8581             return anObj
8582
8583         ## Translate the given object along the given vector,
8584         #  creating its copy before the translation.
8585         #  @param theObject The object to be translated.
8586         #  @param theVector The translation vector.
8587         #  @param theName Object name; when specified, this parameter is used
8588         #         for result publication in the study. Otherwise, if automatic
8589         #         publication is switched on, default value is used for result name.
8590         #
8591         #  @return New GEOM.GEOM_Object, containing the translated object.
8592         #
8593         #  @ref tui_translation "Example"
8594         @ManageTransactions("TrsfOp")
8595         def MakeTranslationVector(self, theObject, theVector, theName=None):
8596             """
8597             Translate the given object along the given vector,
8598             creating its copy before the translation.
8599
8600             Parameters:
8601                 theObject The object to be translated.
8602                 theVector The translation vector.
8603                 theName Object name; when specified, this parameter is used
8604                         for result publication in the study. Otherwise, if automatic
8605                         publication is switched on, default value is used for result name.
8606
8607             Returns:
8608                 New GEOM.GEOM_Object, containing the translated object.
8609             """
8610             # Example: see GEOM_TestAll.py
8611             anObj = self.TrsfOp.TranslateVectorCopy(theObject, theVector)
8612             RaiseIfFailed("TranslateVectorCopy", self.TrsfOp)
8613             self._autoPublish(anObj, theName, "translated")
8614             return anObj
8615
8616         ## Translate the given object along the given vector on given distance.
8617         #  @param theObject The object to be translated.
8618         #  @param theVector The translation vector.
8619         #  @param theDistance The translation distance.
8620         #  @param theCopy Flag used to translate object itself or create a copy.
8621         #  @return Translated @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
8622         #  new GEOM.GEOM_Object, containing the translated object if @a theCopy flag is @c True.
8623         #
8624         #  @ref tui_translation "Example"
8625         @ManageTransactions("TrsfOp")
8626         def TranslateVectorDistance(self, theObject, theVector, theDistance, theCopy=False):
8627             """
8628             Translate the given object along the given vector on given distance.
8629
8630             Parameters:
8631                 theObject The object to be translated.
8632                 theVector The translation vector.
8633                 theDistance The translation distance.
8634                 theCopy Flag used to translate object itself or create a copy.
8635
8636             Returns:
8637                 Translated theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
8638                 new GEOM.GEOM_Object, containing the translated object if theCopy flag is True.
8639             """
8640             # Example: see GEOM_TestAll.py
8641             theDistance,Parameters = ParseParameters(theDistance)
8642             anObj = self.TrsfOp.TranslateVectorDistance(theObject, theVector, theDistance, theCopy)
8643             RaiseIfFailed("TranslateVectorDistance", self.TrsfOp)
8644             anObj.SetParameters(Parameters)
8645             return anObj
8646
8647         ## Translate the given object along the given vector on given distance,
8648         #  creating its copy before the translation.
8649         #  @param theObject The object to be translated.
8650         #  @param theVector The translation vector.
8651         #  @param theDistance The translation distance.
8652         #  @param theName Object name; when specified, this parameter is used
8653         #         for result publication in the study. Otherwise, if automatic
8654         #         publication is switched on, default value is used for result name.
8655         #
8656         #  @return New GEOM.GEOM_Object, containing the translated object.
8657         #
8658         #  @ref tui_translation "Example"
8659         @ManageTransactions("TrsfOp")
8660         def MakeTranslationVectorDistance(self, theObject, theVector, theDistance, theName=None):
8661             """
8662             Translate the given object along the given vector on given distance,
8663             creating its copy before the translation.
8664
8665             Parameters:
8666                 theObject The object to be translated.
8667                 theVector The translation vector.
8668                 theDistance The translation distance.
8669                 theName Object name; when specified, this parameter is used
8670                         for result publication in the study. Otherwise, if automatic
8671                         publication is switched on, default value is used for result name.
8672
8673             Returns:
8674                 New GEOM.GEOM_Object, containing the translated object.
8675             """
8676             # Example: see GEOM_TestAll.py
8677             theDistance,Parameters = ParseParameters(theDistance)
8678             anObj = self.TrsfOp.TranslateVectorDistance(theObject, theVector, theDistance, 1)
8679             RaiseIfFailed("TranslateVectorDistance", self.TrsfOp)
8680             anObj.SetParameters(Parameters)
8681             self._autoPublish(anObj, theName, "translated")
8682             return anObj
8683
8684         ## Rotate the given object around the given axis on the given angle.
8685         #  @param theObject The object to be rotated.
8686         #  @param theAxis Rotation axis.
8687         #  @param theAngle Rotation angle in radians.
8688         #  @param theCopy Flag used to rotate object itself or create a copy.
8689         #
8690         #  @return Rotated @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
8691         #  new GEOM.GEOM_Object, containing the rotated object if @a theCopy flag is @c True.
8692         #
8693         #  @ref tui_rotation "Example"
8694         @ManageTransactions("TrsfOp")
8695         def Rotate(self, theObject, theAxis, theAngle, theCopy=False):
8696             """
8697             Rotate the given object around the given axis on the given angle.
8698
8699             Parameters:
8700                 theObject The object to be rotated.
8701                 theAxis Rotation axis.
8702                 theAngle Rotation angle in radians.
8703                 theCopy Flag used to rotate object itself or create a copy.
8704
8705             Returns:
8706                 Rotated theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
8707                 new GEOM.GEOM_Object, containing the rotated object if theCopy flag is True.
8708             """
8709             # Example: see GEOM_TestAll.py
8710             flag = False
8711             if isinstance(theAngle,str):
8712                 flag = True
8713             theAngle, Parameters = ParseParameters(theAngle)
8714             if flag:
8715                 theAngle = theAngle*math.pi/180.0
8716             if theCopy:
8717                 anObj = self.TrsfOp.RotateCopy(theObject, theAxis, theAngle)
8718             else:
8719                 anObj = self.TrsfOp.Rotate(theObject, theAxis, theAngle)
8720             RaiseIfFailed("Rotate", self.TrsfOp)
8721             anObj.SetParameters(Parameters)
8722             return anObj
8723
8724         ## Rotate the given object around the given axis
8725         #  on the given angle, creating its copy before the rotation.
8726         #  @param theObject The object to be rotated.
8727         #  @param theAxis Rotation axis.
8728         #  @param theAngle Rotation angle in radians.
8729         #  @param theName Object name; when specified, this parameter is used
8730         #         for result publication in the study. Otherwise, if automatic
8731         #         publication is switched on, default value is used for result name.
8732         #
8733         #  @return New GEOM.GEOM_Object, containing the rotated object.
8734         #
8735         #  @ref tui_rotation "Example"
8736         @ManageTransactions("TrsfOp")
8737         def MakeRotation(self, theObject, theAxis, theAngle, theName=None):
8738             """
8739             Rotate the given object around the given axis
8740             on the given angle, creating its copy before the rotatation.
8741
8742             Parameters:
8743                 theObject The object to be rotated.
8744                 theAxis Rotation axis.
8745                 theAngle Rotation angle in radians.
8746                 theName Object name; when specified, this parameter is used
8747                         for result publication in the study. Otherwise, if automatic
8748                         publication is switched on, default value is used for result name.
8749
8750             Returns:
8751                 New GEOM.GEOM_Object, containing the rotated object.
8752             """
8753             # Example: see GEOM_TestAll.py
8754             flag = False
8755             if isinstance(theAngle,str):
8756                 flag = True
8757             theAngle, Parameters = ParseParameters(theAngle)
8758             if flag:
8759                 theAngle = theAngle*math.pi/180.0
8760             anObj = self.TrsfOp.RotateCopy(theObject, theAxis, theAngle)
8761             RaiseIfFailed("RotateCopy", self.TrsfOp)
8762             anObj.SetParameters(Parameters)
8763             self._autoPublish(anObj, theName, "rotated")
8764             return anObj
8765
8766         ## Rotate given object around vector perpendicular to plane
8767         #  containing three points.
8768         #  @param theObject The object to be rotated.
8769         #  @param theCentPoint central point the axis is the vector perpendicular to the plane
8770         #  containing the three points.
8771         #  @param thePoint1,thePoint2 points in a perpendicular plane of the axis.
8772         #  @param theCopy Flag used to rotate object itself or create a copy.
8773         #  @return Rotated @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
8774         #  new GEOM.GEOM_Object, containing the rotated object if @a theCopy flag is @c True.
8775         @ManageTransactions("TrsfOp")
8776         def RotateThreePoints(self, theObject, theCentPoint, thePoint1, thePoint2, theCopy=False):
8777             """
8778             Rotate given object around vector perpendicular to plane
8779             containing three points.
8780
8781             Parameters:
8782                 theObject The object to be rotated.
8783                 theCentPoint central point  the axis is the vector perpendicular to the plane
8784                              containing the three points.
8785                 thePoint1,thePoint2 points in a perpendicular plane of the axis.
8786                 theCopy Flag used to rotate object itself or create a copy.
8787
8788             Returns:
8789                 Rotated theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
8790                 new GEOM.GEOM_Object, containing the rotated object if theCopy flag is True.
8791             """
8792             if theCopy:
8793                 anObj = self.TrsfOp.RotateThreePointsCopy(theObject, theCentPoint, thePoint1, thePoint2)
8794             else:
8795                 anObj = self.TrsfOp.RotateThreePoints(theObject, theCentPoint, thePoint1, thePoint2)
8796             RaiseIfFailed("RotateThreePoints", self.TrsfOp)
8797             return anObj
8798
8799         ## Rotate given object around vector perpendicular to plane
8800         #  containing three points, creating its copy before the rotatation.
8801         #  @param theObject The object to be rotated.
8802         #  @param theCentPoint central point the axis is the vector perpendicular to the plane
8803         #  containing the three points.
8804         #  @param thePoint1,thePoint2 in a perpendicular plane of the axis.
8805         #  @param theName Object name; when specified, this parameter is used
8806         #         for result publication in the study. Otherwise, if automatic
8807         #         publication is switched on, default value is used for result name.
8808         #
8809         #  @return New GEOM.GEOM_Object, containing the rotated object.
8810         #
8811         #  @ref tui_rotation "Example"
8812         @ManageTransactions("TrsfOp")
8813         def MakeRotationThreePoints(self, theObject, theCentPoint, thePoint1, thePoint2, theName=None):
8814             """
8815             Rotate given object around vector perpendicular to plane
8816             containing three points, creating its copy before the rotatation.
8817
8818             Parameters:
8819                 theObject The object to be rotated.
8820                 theCentPoint central point  the axis is the vector perpendicular to the plane
8821                              containing the three points.
8822                 thePoint1,thePoint2  in a perpendicular plane of the axis.
8823                 theName Object name; when specified, this parameter is used
8824                         for result publication in the study. Otherwise, if automatic
8825                         publication is switched on, default value is used for result name.
8826
8827             Returns:
8828                 New GEOM.GEOM_Object, containing the rotated object.
8829             """
8830             # Example: see GEOM_TestAll.py
8831             anObj = self.TrsfOp.RotateThreePointsCopy(theObject, theCentPoint, thePoint1, thePoint2)
8832             RaiseIfFailed("RotateThreePointsCopy", self.TrsfOp)
8833             self._autoPublish(anObj, theName, "rotated")
8834             return anObj
8835
8836         ## Scale the given object by the specified factor.
8837         #  @param theObject The object to be scaled.
8838         #  @param thePoint Center point for scaling.
8839         #                  Passing None for it means scaling relatively the origin of global CS.
8840         #  @param theFactor Scaling factor value.
8841         #  @param theCopy Flag used to scale object itself or create a copy.
8842         #  @return Scaled @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
8843         #  new GEOM.GEOM_Object, containing the scaled object if @a theCopy flag is @c True.
8844         @ManageTransactions("TrsfOp")
8845         def Scale(self, theObject, thePoint, theFactor, theCopy=False):
8846             """
8847             Scale the given object by the specified factor.
8848
8849             Parameters:
8850                 theObject The object to be scaled.
8851                 thePoint Center point for scaling.
8852                          Passing None for it means scaling relatively the origin of global CS.
8853                 theFactor Scaling factor value.
8854                 theCopy Flag used to scale object itself or create a copy.
8855
8856             Returns:
8857                 Scaled theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
8858                 new GEOM.GEOM_Object, containing the scaled object if theCopy flag is True.
8859             """
8860             # Example: see GEOM_TestAll.py
8861             theFactor, Parameters = ParseParameters(theFactor)
8862             if theCopy:
8863                 anObj = self.TrsfOp.ScaleShapeCopy(theObject, thePoint, theFactor)
8864             else:
8865                 anObj = self.TrsfOp.ScaleShape(theObject, thePoint, theFactor)
8866             RaiseIfFailed("Scale", self.TrsfOp)
8867             anObj.SetParameters(Parameters)
8868             return anObj
8869
8870         ## Scale the given object by the factor, creating its copy before the scaling.
8871         #  @param theObject The object to be scaled.
8872         #  @param thePoint Center point for scaling.
8873         #                  Passing None for it means scaling relatively the origin of global CS.
8874         #  @param theFactor Scaling factor value.
8875         #  @param theName Object name; when specified, this parameter is used
8876         #         for result publication in the study. Otherwise, if automatic
8877         #         publication is switched on, default value is used for result name.
8878         #
8879         #  @return New GEOM.GEOM_Object, containing the scaled shape.
8880         #
8881         #  @ref tui_scale "Example"
8882         @ManageTransactions("TrsfOp")
8883         def MakeScaleTransform(self, theObject, thePoint, theFactor, theName=None):
8884             """
8885             Scale the given object by the factor, creating its copy before the scaling.
8886
8887             Parameters:
8888                 theObject The object to be scaled.
8889                 thePoint Center point for scaling.
8890                          Passing None for it means scaling relatively the origin of global CS.
8891                 theFactor Scaling factor value.
8892                 theName Object name; when specified, this parameter is used
8893                         for result publication in the study. Otherwise, if automatic
8894                         publication is switched on, default value is used for result name.
8895
8896             Returns:
8897                 New GEOM.GEOM_Object, containing the scaled shape.
8898             """
8899             # Example: see GEOM_TestAll.py
8900             theFactor, Parameters = ParseParameters(theFactor)
8901             anObj = self.TrsfOp.ScaleShapeCopy(theObject, thePoint, theFactor)
8902             RaiseIfFailed("ScaleShapeCopy", self.TrsfOp)
8903             anObj.SetParameters(Parameters)
8904             self._autoPublish(anObj, theName, "scaled")
8905             return anObj
8906
8907         ## Scale the given object by different factors along coordinate axes.
8908         #  @param theObject The object to be scaled.
8909         #  @param thePoint Center point for scaling.
8910         #                  Passing None for it means scaling relatively the origin of global CS.
8911         #  @param theFactorX,theFactorY,theFactorZ Scaling factors along each axis.
8912         #  @param theCopy Flag used to scale object itself or create a copy.
8913         #  @return Scaled @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
8914         #  new GEOM.GEOM_Object, containing the scaled object if @a theCopy flag is @c True.
8915         @ManageTransactions("TrsfOp")
8916         def ScaleAlongAxes(self, theObject, thePoint, theFactorX, theFactorY, theFactorZ, theCopy=False):
8917             """
8918             Scale the given object by different factors along coordinate axes.
8919
8920             Parameters:
8921                 theObject The object to be scaled.
8922                 thePoint Center point for scaling.
8923                             Passing None for it means scaling relatively the origin of global CS.
8924                 theFactorX,theFactorY,theFactorZ Scaling factors along each axis.
8925                 theCopy Flag used to scale object itself or create a copy.
8926
8927             Returns:
8928                 Scaled theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
8929                 new GEOM.GEOM_Object, containing the scaled object if theCopy flag is True.
8930             """
8931             # Example: see GEOM_TestAll.py
8932             theFactorX, theFactorY, theFactorZ, Parameters = ParseParameters(theFactorX, theFactorY, theFactorZ)
8933             if theCopy:
8934                 anObj = self.TrsfOp.ScaleShapeAlongAxesCopy(theObject, thePoint,
8935                                                             theFactorX, theFactorY, theFactorZ)
8936             else:
8937                 anObj = self.TrsfOp.ScaleShapeAlongAxes(theObject, thePoint,
8938                                                         theFactorX, theFactorY, theFactorZ)
8939             RaiseIfFailed("ScaleAlongAxes", self.TrsfOp)
8940             anObj.SetParameters(Parameters)
8941             return anObj
8942
8943         ## Scale the given object by different factors along coordinate axes,
8944         #  creating its copy before the scaling.
8945         #  @param theObject The object to be scaled.
8946         #  @param thePoint Center point for scaling.
8947         #                  Passing None for it means scaling relatively the origin of global CS.
8948         #  @param theFactorX,theFactorY,theFactorZ Scaling factors along each axis.
8949         #  @param theName Object name; when specified, this parameter is used
8950         #         for result publication in the study. Otherwise, if automatic
8951         #         publication is switched on, default value is used for result name.
8952         #
8953         #  @return New GEOM.GEOM_Object, containing the scaled shape.
8954         #
8955         #  @ref swig_scale "Example"
8956         @ManageTransactions("TrsfOp")
8957         def MakeScaleAlongAxes(self, theObject, thePoint, theFactorX, theFactorY, theFactorZ, theName=None):
8958             """
8959             Scale the given object by different factors along coordinate axes,
8960             creating its copy before the scaling.
8961
8962             Parameters:
8963                 theObject The object to be scaled.
8964                 thePoint Center point for scaling.
8965                             Passing None for it means scaling relatively the origin of global CS.
8966                 theFactorX,theFactorY,theFactorZ Scaling factors along each axis.
8967                 theName Object name; when specified, this parameter is used
8968                         for result publication in the study. Otherwise, if automatic
8969                         publication is switched on, default value is used for result name.
8970
8971             Returns:
8972                 New GEOM.GEOM_Object, containing the scaled shape.
8973             """
8974             # Example: see GEOM_TestAll.py
8975             theFactorX, theFactorY, theFactorZ, Parameters = ParseParameters(theFactorX, theFactorY, theFactorZ)
8976             anObj = self.TrsfOp.ScaleShapeAlongAxesCopy(theObject, thePoint,
8977                                                         theFactorX, theFactorY, theFactorZ)
8978             RaiseIfFailed("MakeScaleAlongAxes", self.TrsfOp)
8979             anObj.SetParameters(Parameters)
8980             self._autoPublish(anObj, theName, "scaled")
8981             return anObj
8982
8983         ## Mirror an object relatively the given plane.
8984         #  @param theObject The object to be mirrored.
8985         #  @param thePlane Plane of symmetry.
8986         #  @param theCopy Flag used to mirror object itself or create a copy.
8987         #  @return Mirrored @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
8988         #  new GEOM.GEOM_Object, containing the mirrored object if @a theCopy flag is @c True.
8989         @ManageTransactions("TrsfOp")
8990         def MirrorByPlane(self, theObject, thePlane, theCopy=False):
8991             """
8992             Mirror an object relatively the given plane.
8993
8994             Parameters:
8995                 theObject The object to be mirrored.
8996                 thePlane Plane of symmetry.
8997                 theCopy Flag used to mirror object itself or create a copy.
8998
8999             Returns:
9000                 Mirrored theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
9001                 new GEOM.GEOM_Object, containing the mirrored object if theCopy flag is True.
9002             """
9003             if theCopy:
9004                 anObj = self.TrsfOp.MirrorPlaneCopy(theObject, thePlane)
9005             else:
9006                 anObj = self.TrsfOp.MirrorPlane(theObject, thePlane)
9007             RaiseIfFailed("MirrorByPlane", self.TrsfOp)
9008             return anObj
9009
9010         ## Create an object, symmetrical
9011         #  to the given one relatively the given plane.
9012         #  @param theObject The object to be mirrored.
9013         #  @param thePlane Plane of symmetry.
9014         #  @param theName Object name; when specified, this parameter is used
9015         #         for result publication in the study. Otherwise, if automatic
9016         #         publication is switched on, default value is used for result name.
9017         #
9018         #  @return New GEOM.GEOM_Object, containing the mirrored shape.
9019         #
9020         #  @ref tui_mirror "Example"
9021         @ManageTransactions("TrsfOp")
9022         def MakeMirrorByPlane(self, theObject, thePlane, theName=None):
9023             """
9024             Create an object, symmetrical to the given one relatively the given plane.
9025
9026             Parameters:
9027                 theObject The object to be mirrored.
9028                 thePlane Plane of symmetry.
9029                 theName Object name; when specified, this parameter is used
9030                         for result publication in the study. Otherwise, if automatic
9031                         publication is switched on, default value is used for result name.
9032
9033             Returns:
9034                 New GEOM.GEOM_Object, containing the mirrored shape.
9035             """
9036             # Example: see GEOM_TestAll.py
9037             anObj = self.TrsfOp.MirrorPlaneCopy(theObject, thePlane)
9038             RaiseIfFailed("MirrorPlaneCopy", self.TrsfOp)
9039             self._autoPublish(anObj, theName, "mirrored")
9040             return anObj
9041
9042         ## Mirror an object relatively the given axis.
9043         #  @param theObject The object to be mirrored.
9044         #  @param theAxis Axis of symmetry.
9045         #  @param theCopy Flag used to mirror object itself or create a copy.
9046         #  @return Mirrored @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
9047         #  new GEOM.GEOM_Object, containing the mirrored object if @a theCopy flag is @c True.
9048         @ManageTransactions("TrsfOp")
9049         def MirrorByAxis(self, theObject, theAxis, theCopy=False):
9050             """
9051             Mirror an object relatively the given axis.
9052
9053             Parameters:
9054                 theObject The object to be mirrored.
9055                 theAxis Axis of symmetry.
9056                 theCopy Flag used to mirror object itself or create a copy.
9057
9058             Returns:
9059                 Mirrored theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
9060                 new GEOM.GEOM_Object, containing the mirrored object if theCopy flag is True.
9061             """
9062             if theCopy:
9063                 anObj = self.TrsfOp.MirrorAxisCopy(theObject, theAxis)
9064             else:
9065                 anObj = self.TrsfOp.MirrorAxis(theObject, theAxis)
9066             RaiseIfFailed("MirrorByAxis", self.TrsfOp)
9067             return anObj
9068
9069         ## Create an object, symmetrical
9070         #  to the given one relatively the given axis.
9071         #  @param theObject The object to be mirrored.
9072         #  @param theAxis Axis of symmetry.
9073         #  @param theName Object name; when specified, this parameter is used
9074         #         for result publication in the study. Otherwise, if automatic
9075         #         publication is switched on, default value is used for result name.
9076         #
9077         #  @return New GEOM.GEOM_Object, containing the mirrored shape.
9078         #
9079         #  @ref tui_mirror "Example"
9080         @ManageTransactions("TrsfOp")
9081         def MakeMirrorByAxis(self, theObject, theAxis, theName=None):
9082             """
9083             Create an object, symmetrical to the given one relatively the given axis.
9084
9085             Parameters:
9086                 theObject The object to be mirrored.
9087                 theAxis Axis of symmetry.
9088                 theName Object name; when specified, this parameter is used
9089                         for result publication in the study. Otherwise, if automatic
9090                         publication is switched on, default value is used for result name.
9091
9092             Returns:
9093                 New GEOM.GEOM_Object, containing the mirrored shape.
9094             """
9095             # Example: see GEOM_TestAll.py
9096             anObj = self.TrsfOp.MirrorAxisCopy(theObject, theAxis)
9097             RaiseIfFailed("MirrorAxisCopy", self.TrsfOp)
9098             self._autoPublish(anObj, theName, "mirrored")
9099             return anObj
9100
9101         ## Mirror an object relatively the given point.
9102         #  @param theObject The object to be mirrored.
9103         #  @param thePoint Point of symmetry.
9104         #  @param theCopy Flag used to mirror object itself or create a copy.
9105         #  @return Mirrored @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
9106         #  new GEOM.GEOM_Object, containing the mirrored object if @a theCopy flag is @c True.
9107         @ManageTransactions("TrsfOp")
9108         def MirrorByPoint(self, theObject, thePoint, theCopy=False):
9109             """
9110             Mirror an object relatively the given point.
9111
9112             Parameters:
9113                 theObject The object to be mirrored.
9114                 thePoint Point of symmetry.
9115                 theCopy Flag used to mirror object itself or create a copy.
9116
9117             Returns:
9118                 Mirrored theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
9119                 new GEOM.GEOM_Object, containing the mirrored object if theCopy flag is True.
9120             """
9121             # Example: see GEOM_TestAll.py
9122             if theCopy:
9123                 anObj = self.TrsfOp.MirrorPointCopy(theObject, thePoint)
9124             else:
9125                 anObj = self.TrsfOp.MirrorPoint(theObject, thePoint)
9126             RaiseIfFailed("MirrorByPoint", self.TrsfOp)
9127             return anObj
9128
9129         ## Create an object, symmetrical
9130         #  to the given one relatively the given point.
9131         #  @param theObject The object to be mirrored.
9132         #  @param thePoint Point of symmetry.
9133         #  @param theName Object name; when specified, this parameter is used
9134         #         for result publication in the study. Otherwise, if automatic
9135         #         publication is switched on, default value is used for result name.
9136         #
9137         #  @return New GEOM.GEOM_Object, containing the mirrored shape.
9138         #
9139         #  @ref tui_mirror "Example"
9140         @ManageTransactions("TrsfOp")
9141         def MakeMirrorByPoint(self, theObject, thePoint, theName=None):
9142             """
9143             Create an object, symmetrical
9144             to the given one relatively the given point.
9145
9146             Parameters:
9147                 theObject The object to be mirrored.
9148                 thePoint Point of symmetry.
9149                 theName Object name; when specified, this parameter is used
9150                         for result publication in the study. Otherwise, if automatic
9151                         publication is switched on, default value is used for result name.
9152
9153             Returns:
9154                 New GEOM.GEOM_Object, containing the mirrored shape.
9155             """
9156             # Example: see GEOM_TestAll.py
9157             anObj = self.TrsfOp.MirrorPointCopy(theObject, thePoint)
9158             RaiseIfFailed("MirrorPointCopy", self.TrsfOp)
9159             self._autoPublish(anObj, theName, "mirrored")
9160             return anObj
9161
9162         ## Modify the location of the given object.
9163         #  @param theObject The object to be displaced.
9164         #  @param theStartLCS Coordinate system to perform displacement from it.\n
9165         #                     If \a theStartLCS is NULL, displacement
9166         #                     will be performed from global CS.\n
9167         #                     If \a theObject itself is used as \a theStartLCS,
9168         #                     its location will be changed to \a theEndLCS.
9169         #  @param theEndLCS Coordinate system to perform displacement to it.
9170         #  @param theCopy Flag used to displace object itself or create a copy.
9171         #  @return Displaced @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
9172         #  new GEOM.GEOM_Object, containing the displaced object if @a theCopy flag is @c True.
9173         @ManageTransactions("TrsfOp")
9174         def Position(self, theObject, theStartLCS, theEndLCS, theCopy=False):
9175             """
9176             Modify the Location of the given object by LCS, creating its copy before the setting.
9177
9178             Parameters:
9179                 theObject The object to be displaced.
9180                 theStartLCS Coordinate system to perform displacement from it.
9181                             If theStartLCS is NULL, displacement
9182                             will be performed from global CS.
9183                             If theObject itself is used as theStartLCS,
9184                             its location will be changed to theEndLCS.
9185                 theEndLCS Coordinate system to perform displacement to it.
9186                 theCopy Flag used to displace object itself or create a copy.
9187
9188             Returns:
9189                 Displaced theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
9190                 new GEOM.GEOM_Object, containing the displaced object if theCopy flag is True.
9191             """
9192             # Example: see GEOM_TestAll.py
9193             if theCopy:
9194                 anObj = self.TrsfOp.PositionShapeCopy(theObject, theStartLCS, theEndLCS)
9195             else:
9196                 anObj = self.TrsfOp.PositionShape(theObject, theStartLCS, theEndLCS)
9197             RaiseIfFailed("Displace", self.TrsfOp)
9198             return anObj
9199
9200         ## Modify the Location of the given object by LCS,
9201         #  creating its copy before the setting.
9202         #  @param theObject The object to be displaced.
9203         #  @param theStartLCS Coordinate system to perform displacement from it.\n
9204         #                     If \a theStartLCS is NULL, displacement
9205         #                     will be performed from global CS.\n
9206         #                     If \a theObject itself is used as \a theStartLCS,
9207         #                     its location will be changed to \a theEndLCS.
9208         #  @param theEndLCS Coordinate system to perform displacement to it.
9209         #  @param theName Object name; when specified, this parameter is used
9210         #         for result publication in the study. Otherwise, if automatic
9211         #         publication is switched on, default value is used for result name.
9212         #
9213         #  @return New GEOM.GEOM_Object, containing the displaced shape.
9214         #
9215         #  @ref tui_modify_location "Example"
9216         @ManageTransactions("TrsfOp")
9217         def MakePosition(self, theObject, theStartLCS, theEndLCS, theName=None):
9218             """
9219             Modify the Location of the given object by LCS, creating its copy before the setting.
9220
9221             Parameters:
9222                 theObject The object to be displaced.
9223                 theStartLCS Coordinate system to perform displacement from it.
9224                             If theStartLCS is NULL, displacement
9225                             will be performed from global CS.
9226                             If theObject itself is used as theStartLCS,
9227                             its location will be changed to theEndLCS.
9228                 theEndLCS Coordinate system to perform displacement to it.
9229                 theName Object name; when specified, this parameter is used
9230                         for result publication in the study. Otherwise, if automatic
9231                         publication is switched on, default value is used for result name.
9232
9233             Returns:
9234                 New GEOM.GEOM_Object, containing the displaced shape.
9235
9236             Example of usage:
9237                 # create local coordinate systems
9238                 cs1 = geompy.MakeMarker( 0, 0, 0, 1,0,0, 0,1,0)
9239                 cs2 = geompy.MakeMarker(30,40,40, 1,0,0, 0,1,0)
9240                 # modify the location of the given object
9241                 position = geompy.MakePosition(cylinder, cs1, cs2)
9242             """
9243             # Example: see GEOM_TestAll.py
9244             anObj = self.TrsfOp.PositionShapeCopy(theObject, theStartLCS, theEndLCS)
9245             RaiseIfFailed("PositionShapeCopy", self.TrsfOp)
9246             self._autoPublish(anObj, theName, "displaced")
9247             return anObj
9248
9249         ## Modify the Location of the given object by Path.
9250         #  @param  theObject The object to be displaced.
9251         #  @param  thePath Wire or Edge along that the object will be translated.
9252         #  @param  theDistance progress of Path (0 = start location, 1 = end of path location).
9253         #  @param  theCopy is to create a copy objects if true.
9254         #  @param  theReverse  0 - for usual direction, 1 - to reverse path direction.
9255         #  @return Displaced @a theObject (GEOM.GEOM_Object) if @a theCopy is @c False or
9256         #          new GEOM.GEOM_Object, containing the displaced shape if @a theCopy is @c True.
9257         #
9258         #  @ref tui_modify_location "Example"
9259         @ManageTransactions("TrsfOp")
9260         def PositionAlongPath(self,theObject, thePath, theDistance, theCopy, theReverse):
9261             """
9262             Modify the Location of the given object by Path.
9263
9264             Parameters:
9265                  theObject The object to be displaced.
9266                  thePath Wire or Edge along that the object will be translated.
9267                  theDistance progress of Path (0 = start location, 1 = end of path location).
9268                  theCopy is to create a copy objects if true.
9269                  theReverse  0 - for usual direction, 1 - to reverse path direction.
9270
9271             Returns:
9272                  Displaced theObject (GEOM.GEOM_Object) if theCopy is False or
9273                  new GEOM.GEOM_Object, containing the displaced shape if theCopy is True.
9274
9275             Example of usage:
9276                 position = geompy.PositionAlongPath(cylinder, circle, 0.75, 1, 1)
9277             """
9278             # Example: see GEOM_TestAll.py
9279             anObj = self.TrsfOp.PositionAlongPath(theObject, thePath, theDistance, theCopy, theReverse)
9280             RaiseIfFailed("PositionAlongPath", self.TrsfOp)
9281             return anObj
9282
9283         ## Modify the Location of the given object by Path, creating its copy before the operation.
9284         #  @param theObject The object to be displaced.
9285         #  @param thePath Wire or Edge along that the object will be translated.
9286         #  @param theDistance progress of Path (0 = start location, 1 = end of path location).
9287         #  @param theReverse  0 - for usual direction, 1 - to reverse path direction.
9288         #  @param theName Object name; when specified, this parameter is used
9289         #         for result publication in the study. Otherwise, if automatic
9290         #         publication is switched on, default value is used for result name.
9291         #
9292         #  @return New GEOM.GEOM_Object, containing the displaced shape.
9293         @ManageTransactions("TrsfOp")
9294         def MakePositionAlongPath(self, theObject, thePath, theDistance, theReverse, theName=None):
9295             """
9296             Modify the Location of the given object by Path, creating its copy before the operation.
9297
9298             Parameters:
9299                  theObject The object to be displaced.
9300                  thePath Wire or Edge along that the object will be translated.
9301                  theDistance progress of Path (0 = start location, 1 = end of path location).
9302                  theReverse  0 - for usual direction, 1 - to reverse path direction.
9303                  theName Object name; when specified, this parameter is used
9304                          for result publication in the study. Otherwise, if automatic
9305                          publication is switched on, default value is used for result name.
9306
9307             Returns:
9308                 New GEOM.GEOM_Object, containing the displaced shape.
9309             """
9310             # Example: see GEOM_TestAll.py
9311             anObj = self.TrsfOp.PositionAlongPath(theObject, thePath, theDistance, 1, theReverse)
9312             RaiseIfFailed("PositionAlongPath", self.TrsfOp)
9313             self._autoPublish(anObj, theName, "displaced")
9314             return anObj
9315
9316         ## Offset given shape.
9317         #  @param theObject The base object for the offset.
9318         #  @param theOffset Offset value.
9319         #  @param theCopy Flag used to offset object itself or create a copy.
9320         #  @return Modified @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
9321         #  new GEOM.GEOM_Object, containing the result of offset operation if @a theCopy flag is @c True.
9322         @ManageTransactions("TrsfOp")
9323         def Offset(self, theObject, theOffset, theCopy=False):
9324             """
9325             Offset given shape.
9326
9327             Parameters:
9328                 theObject The base object for the offset.
9329                 theOffset Offset value.
9330                 theCopy Flag used to offset object itself or create a copy.
9331
9332             Returns:
9333                 Modified theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
9334                 new GEOM.GEOM_Object, containing the result of offset operation if theCopy flag is True.
9335             """
9336             theOffset, Parameters = ParseParameters(theOffset)
9337             if theCopy:
9338                 anObj = self.TrsfOp.OffsetShapeCopy(theObject, theOffset, True)
9339             else:
9340                 anObj = self.TrsfOp.OffsetShape(theObject, theOffset, True)
9341             RaiseIfFailed("Offset", self.TrsfOp)
9342             anObj.SetParameters(Parameters)
9343             return anObj
9344
9345         ## Create new object as offset of the given one. Gap between two adjacent
9346         #  offset surfaces is filled by a pipe.
9347         #  @param theObject The base object for the offset.
9348         #  @param theOffset Offset value.
9349         #  @param theName Object name; when specified, this parameter is used
9350         #         for result publication in the study. Otherwise, if automatic
9351         #         publication is switched on, default value is used for result name.
9352         #
9353         #  @return New GEOM.GEOM_Object, containing the offset object.
9354         #
9355         #  @sa MakeOffsetIntersectionJoin
9356         #  @ref tui_offset "Example"
9357         @ManageTransactions("TrsfOp")
9358         def MakeOffset(self, theObject, theOffset, theName=None):
9359             """
9360             Create new object as offset of the given one. Gap between adjacent
9361             offset surfaces is filled by a pipe.
9362
9363             Parameters:
9364                 theObject The base object for the offset.
9365                 theOffset Offset value.
9366                 theName Object name; when specified, this parameter is used
9367                         for result publication in the study. Otherwise, if automatic
9368                         publication is switched on, default value is used for result name.
9369
9370             Returns:
9371                 New GEOM.GEOM_Object, containing the offset object.
9372
9373             Example of usage:
9374                  box = geompy.MakeBox(20, 20, 20, 200, 200, 200)
9375                  # create a new object as offset of the given object
9376                  offset = geompy.MakeOffset(box, 70.)
9377             """
9378             # Example: see GEOM_TestAll.py
9379             theOffset, Parameters = ParseParameters(theOffset)
9380             anObj = self.TrsfOp.OffsetShapeCopy( theObject, theOffset, True )
9381             RaiseIfFailed("OffsetShapeCopy", self.TrsfOp)
9382             anObj.SetParameters(Parameters)
9383             self._autoPublish(anObj, theName, "offset")
9384             return anObj
9385
9386         ## Create new object as offset of the given one. Gap between adjacent
9387         #  offset surfaces is filled by extending and intersecting them.
9388         #  @param theObject The base object for the offset.
9389         #  @param theOffset Offset value.
9390         #  @param theName Object name; when specified, this parameter is used
9391         #         for result publication in the study. Otherwise, if automatic
9392         #         publication is switched on, default value is used for result name.
9393         #
9394         #  @return New GEOM.GEOM_Object, containing the offset object.
9395         #
9396         #  @sa MakeOffset
9397         #  @ref tui_offset "Example"
9398         @ManageTransactions("TrsfOp")
9399         def MakeOffsetIntersectionJoin(self, theObject, theOffset, theName=None):
9400             """
9401             Create new object as offset of the given one. Gap between adjacent
9402             offset surfaces is filled by extending and intersecting them.
9403
9404             Parameters:
9405                 theObject The base object for the offset.
9406                 theOffset Offset value.
9407                 theName Object name; when specified, this parameter is used
9408                         for result publication in the study. Otherwise, if automatic
9409                         publication is switched on, default value is used for result name.
9410
9411             Returns:
9412                 New GEOM.GEOM_Object, containing the offset object.
9413
9414             Example of usage:
9415                  box = geompy.MakeBox(20, 20, 20, 200, 200, 200)
9416                  # create a new box extended by 70
9417                  offset = geompy.MakeOffsetIntersectionJoin(box, 70.)
9418             """
9419             # Example: see GEOM_TestAll.py
9420             theOffset, Parameters = ParseParameters( theOffset )
9421             anObj = self.TrsfOp.OffsetShapeCopy( theObject, theOffset, False )
9422             RaiseIfFailed("OffsetShapeCopy", self.TrsfOp)
9423             anObj.SetParameters(Parameters)
9424             self._autoPublish(anObj, theName, "offset")
9425             return anObj
9426
9427         ## Create new object as projection of the given one on another.
9428         #  @param theSource The source object for the projection. It can be a point, edge or wire.
9429         #         Edge and wire are acceptable if @a theTarget is a face.
9430         #  @param theTarget The target object. It can be planar or cylindrical face, edge or wire.
9431         #  @param theName Object name; when specified, this parameter is used
9432         #         for result publication in the study. Otherwise, if automatic
9433         #         publication is switched on, default value is used for result name.
9434         #
9435         #  @return New GEOM.GEOM_Object, containing the projection.
9436         #
9437         #  @ref tui_projection "Example"
9438         @ManageTransactions("TrsfOp")
9439         def MakeProjection(self, theSource, theTarget, theName=None):
9440             """
9441             Create new object as projection of the given one on another.
9442
9443             Parameters:
9444                 theSource The source object for the projection. It can be a point, edge or wire.
9445                           Edge and wire are acceptable if theTarget is a face.
9446                 theTarget The target object. It can be planar or cylindrical face, edge or wire.
9447                 theName Object name; when specified, this parameter is used
9448                         for result publication in the study. Otherwise, if automatic
9449                         publication is switched on, default value is used for result name.
9450
9451             Returns:
9452                 New GEOM.GEOM_Object, containing the projection.
9453             """
9454             # Example: see GEOM_TestAll.py
9455             anObj = self.TrsfOp.ProjectShapeCopy(theSource, theTarget)
9456             RaiseIfFailed("ProjectShapeCopy", self.TrsfOp)
9457             self._autoPublish(anObj, theName, "projection")
9458             return anObj
9459
9460         ## Create a projection of the given point on a wire or an edge.
9461         #  If there are no solutions or there are 2 or more solutions It throws an
9462         #  exception.
9463         #  @param thePoint the point to be projected.
9464         #  @param theWire the wire. The edge is accepted as well.
9465         #  @param theName Object name; when specified, this parameter is used
9466         #         for result publication in the study. Otherwise, if automatic
9467         #         publication is switched on, default value is used for result name.
9468         #
9469         #  @return [\a u, \a PointOnEdge, \a EdgeInWireIndex]
9470         #  \n \a u: The parameter of projection point on edge.
9471         #  \n \a PointOnEdge: The projection point.
9472         #  \n \a EdgeInWireIndex: The index of an edge in a wire.
9473         #
9474         #  @ref tui_projection "Example"
9475         @ManageTransactions("TrsfOp")
9476         def MakeProjectionOnWire(self, thePoint, theWire, theName=None):
9477             """
9478             Create a projection of the given point on a wire or an edge.
9479             If there are no solutions or there are 2 or more solutions It throws an
9480             exception.
9481
9482             Parameters:
9483                 thePoint the point to be projected.
9484                 theWire the wire. The edge is accepted as well.
9485                 theName Object name; when specified, this parameter is used
9486                         for result publication in the study. Otherwise, if automatic
9487                         publication is switched on, default value is used for result name.
9488
9489             Returns:
9490                 [u, PointOnEdge, EdgeInWireIndex]
9491                  u: The parameter of projection point on edge.
9492                  PointOnEdge: The projection point.
9493                  EdgeInWireIndex: The index of an edge in a wire.
9494             """
9495             # Example: see GEOM_TestAll.py
9496             anObj = self.TrsfOp.ProjectPointOnWire(thePoint, theWire)
9497             RaiseIfFailed("ProjectPointOnWire", self.TrsfOp)
9498             self._autoPublish(anObj[1], theName, "projection")
9499             return anObj
9500
9501         # -----------------------------------------------------------------------------
9502         # Patterns
9503         # -----------------------------------------------------------------------------
9504
9505         ## Translate the given object along the given vector a given number times
9506         #  @param theObject The object to be translated.
9507         #  @param theVector Direction of the translation. DX if None.
9508         #  @param theStep Distance to translate on.
9509         #  @param theNbTimes Quantity of translations to be done.
9510         #  @param theName Object name; when specified, this parameter is used
9511         #         for result publication in the study. Otherwise, if automatic
9512         #         publication is switched on, default value is used for result name.
9513         #
9514         #  @return New GEOM.GEOM_Object, containing compound of all
9515         #          the shapes, obtained after each translation.
9516         #
9517         #  @ref tui_multi_translation "Example"
9518         @ManageTransactions("TrsfOp")
9519         def MakeMultiTranslation1D(self, theObject, theVector, theStep, theNbTimes, theName=None):
9520             """
9521             Translate the given object along the given vector a given number times
9522
9523             Parameters:
9524                 theObject The object to be translated.
9525                 theVector Direction of the translation. DX if None.
9526                 theStep Distance to translate on.
9527                 theNbTimes Quantity of translations to be done.
9528                 theName Object name; when specified, this parameter is used
9529                         for result publication in the study. Otherwise, if automatic
9530                         publication is switched on, default value is used for result name.
9531
9532             Returns:
9533                 New GEOM.GEOM_Object, containing compound of all
9534                 the shapes, obtained after each translation.
9535
9536             Example of usage:
9537                 r1d = geompy.MakeMultiTranslation1D(prism, vect, 20, 4)
9538             """
9539             # Example: see GEOM_TestAll.py
9540             theStep, theNbTimes, Parameters = ParseParameters(theStep, theNbTimes)
9541             anObj = self.TrsfOp.MultiTranslate1D(theObject, theVector, theStep, theNbTimes)
9542             RaiseIfFailed("MultiTranslate1D", self.TrsfOp)
9543             anObj.SetParameters(Parameters)
9544             self._autoPublish(anObj, theName, "multitranslation")
9545             return anObj
9546
9547         ## Conseqently apply two specified translations to theObject specified number of times.
9548         #  @param theObject The object to be translated.
9549         #  @param theVector1 Direction of the first translation. DX if None.
9550         #  @param theStep1 Step of the first translation.
9551         #  @param theNbTimes1 Quantity of translations to be done along theVector1.
9552         #  @param theVector2 Direction of the second translation. DY if None.
9553         #  @param theStep2 Step of the second translation.
9554         #  @param theNbTimes2 Quantity of translations to be done along theVector2.
9555         #  @param theName Object name; when specified, this parameter is used
9556         #         for result publication in the study. Otherwise, if automatic
9557         #         publication is switched on, default value is used for result name.
9558         #
9559         #  @return New GEOM.GEOM_Object, containing compound of all
9560         #          the shapes, obtained after each translation.
9561         #
9562         #  @ref tui_multi_translation "Example"
9563         @ManageTransactions("TrsfOp")
9564         def MakeMultiTranslation2D(self, theObject, theVector1, theStep1, theNbTimes1,
9565                                    theVector2, theStep2, theNbTimes2, theName=None):
9566             """
9567             Conseqently apply two specified translations to theObject specified number of times.
9568
9569             Parameters:
9570                 theObject The object to be translated.
9571                 theVector1 Direction of the first translation. DX if None.
9572                 theStep1 Step of the first translation.
9573                 theNbTimes1 Quantity of translations to be done along theVector1.
9574                 theVector2 Direction of the second translation. DY if None.
9575                 theStep2 Step of the second translation.
9576                 theNbTimes2 Quantity of translations to be done along theVector2.
9577                 theName Object name; when specified, this parameter is used
9578                         for result publication in the study. Otherwise, if automatic
9579                         publication is switched on, default value is used for result name.
9580
9581             Returns:
9582                 New GEOM.GEOM_Object, containing compound of all
9583                 the shapes, obtained after each translation.
9584
9585             Example of usage:
9586                 tr2d = geompy.MakeMultiTranslation2D(prism, vect1, 20, 4, vect2, 80, 3)
9587             """
9588             # Example: see GEOM_TestAll.py
9589             theStep1,theNbTimes1,theStep2,theNbTimes2, Parameters = ParseParameters(theStep1,theNbTimes1,theStep2,theNbTimes2)
9590             anObj = self.TrsfOp.MultiTranslate2D(theObject, theVector1, theStep1, theNbTimes1,
9591                                                  theVector2, theStep2, theNbTimes2)
9592             RaiseIfFailed("MultiTranslate2D", self.TrsfOp)
9593             anObj.SetParameters(Parameters)
9594             self._autoPublish(anObj, theName, "multitranslation")
9595             return anObj
9596
9597         ## Rotate the given object around the given axis a given number times.
9598         #  Rotation angle will be 2*PI/theNbTimes.
9599         #  @param theObject The object to be rotated.
9600         #  @param theAxis The rotation axis. DZ if None.
9601         #  @param theNbTimes Quantity of rotations to be done.
9602         #  @param theName Object name; when specified, this parameter is used
9603         #         for result publication in the study. Otherwise, if automatic
9604         #         publication is switched on, default value is used for result name.
9605         #
9606         #  @return New GEOM.GEOM_Object, containing compound of all the
9607         #          shapes, obtained after each rotation.
9608         #
9609         #  @ref tui_multi_rotation "Example"
9610         @ManageTransactions("TrsfOp")
9611         def MultiRotate1DNbTimes (self, theObject, theAxis, theNbTimes, theName=None):
9612             """
9613             Rotate the given object around the given axis a given number times.
9614             Rotation angle will be 2*PI/theNbTimes.
9615
9616             Parameters:
9617                 theObject The object to be rotated.
9618                 theAxis The rotation axis. DZ if None.
9619                 theNbTimes Quantity of rotations to be done.
9620                 theName Object name; when specified, this parameter is used
9621                         for result publication in the study. Otherwise, if automatic
9622                         publication is switched on, default value is used for result name.
9623
9624             Returns:
9625                 New GEOM.GEOM_Object, containing compound of all the
9626                 shapes, obtained after each rotation.
9627
9628             Example of usage:
9629                 rot1d = geompy.MultiRotate1DNbTimes(prism, vect, 4)
9630             """
9631             # Example: see GEOM_TestAll.py
9632             theNbTimes, Parameters = ParseParameters(theNbTimes)
9633             anObj = self.TrsfOp.MultiRotate1D(theObject, theAxis, theNbTimes)
9634             RaiseIfFailed("MultiRotate1DNbTimes", self.TrsfOp)
9635             anObj.SetParameters(Parameters)
9636             self._autoPublish(anObj, theName, "multirotation")
9637             return anObj
9638
9639         ## Rotate the given object around the given axis
9640         #  a given number times on the given angle.
9641         #  @param theObject The object to be rotated.
9642         #  @param theAxis The rotation axis. DZ if None.
9643         #  @param theAngleStep Rotation angle in radians.
9644         #  @param theNbTimes Quantity of rotations to be done.
9645         #  @param theName Object name; when specified, this parameter is used
9646         #         for result publication in the study. Otherwise, if automatic
9647         #         publication is switched on, default value is used for result name.
9648         #
9649         #  @return New GEOM.GEOM_Object, containing compound of all the
9650         #          shapes, obtained after each rotation.
9651         #
9652         #  @ref tui_multi_rotation "Example"
9653         @ManageTransactions("TrsfOp")
9654         def MultiRotate1DByStep(self, theObject, theAxis, theAngleStep, theNbTimes, theName=None):
9655             """
9656             Rotate the given object around the given axis
9657             a given number times on the given angle.
9658
9659             Parameters:
9660                 theObject The object to be rotated.
9661                 theAxis The rotation axis. DZ if None.
9662                 theAngleStep Rotation angle in radians.
9663                 theNbTimes Quantity of rotations to be done.
9664                 theName Object name; when specified, this parameter is used
9665                         for result publication in the study. Otherwise, if automatic
9666                         publication is switched on, default value is used for result name.
9667
9668             Returns:
9669                 New GEOM.GEOM_Object, containing compound of all the
9670                 shapes, obtained after each rotation.
9671
9672             Example of usage:
9673                 rot1d = geompy.MultiRotate1DByStep(prism, vect, math.pi/4, 4)
9674             """
9675             # Example: see GEOM_TestAll.py
9676             theAngleStep, theNbTimes, Parameters = ParseParameters(theAngleStep, theNbTimes)
9677             anObj = self.TrsfOp.MultiRotate1DByStep(theObject, theAxis, theAngleStep, theNbTimes)
9678             RaiseIfFailed("MultiRotate1DByStep", self.TrsfOp)
9679             anObj.SetParameters(Parameters)
9680             self._autoPublish(anObj, theName, "multirotation")
9681             return anObj
9682
9683         ## Rotate the given object around the given axis a given
9684         #  number times and multi-translate each rotation result.
9685         #  Rotation angle will be 2*PI/theNbTimes1.
9686         #  Translation direction passes through center of gravity
9687         #  of rotated shape and its projection on the rotation axis.
9688         #  @param theObject The object to be rotated.
9689         #  @param theAxis Rotation axis. DZ if None.
9690         #  @param theNbTimes1 Quantity of rotations to be done.
9691         #  @param theRadialStep Translation distance.
9692         #  @param theNbTimes2 Quantity of translations to be done.
9693         #  @param theName Object name; when specified, this parameter is used
9694         #         for result publication in the study. Otherwise, if automatic
9695         #         publication is switched on, default value is used for result name.
9696         #
9697         #  @return New GEOM.GEOM_Object, containing compound of all the
9698         #          shapes, obtained after each transformation.
9699         #
9700         #  @ref tui_multi_rotation "Example"
9701         @ManageTransactions("TrsfOp")
9702         def MultiRotate2DNbTimes(self, theObject, theAxis, theNbTimes1, theRadialStep, theNbTimes2, theName=None):
9703             """
9704             Rotate the given object around the
9705             given axis on the given angle a given number
9706             times and multi-translate each rotation result.
9707             Translation direction passes through center of gravity
9708             of rotated shape and its projection on the rotation axis.
9709
9710             Parameters:
9711                 theObject The object to be rotated.
9712                 theAxis Rotation axis. DZ if None.
9713                 theNbTimes1 Quantity of rotations to be done.
9714                 theRadialStep Translation distance.
9715                 theNbTimes2 Quantity of translations to be done.
9716                 theName Object name; when specified, this parameter is used
9717                         for result publication in the study. Otherwise, if automatic
9718                         publication is switched on, default value is used for result name.
9719
9720             Returns:
9721                 New GEOM.GEOM_Object, containing compound of all the
9722                 shapes, obtained after each transformation.
9723
9724             Example of usage:
9725                 rot2d = geompy.MultiRotate2D(prism, vect, 60, 4, 50, 5)
9726             """
9727             # Example: see GEOM_TestAll.py
9728             theNbTimes1, theRadialStep, theNbTimes2, Parameters = ParseParameters(theNbTimes1, theRadialStep, theNbTimes2)
9729             anObj = self.TrsfOp.MultiRotate2DNbTimes(theObject, theAxis, theNbTimes1, theRadialStep, theNbTimes2)
9730             RaiseIfFailed("MultiRotate2DNbTimes", self.TrsfOp)
9731             anObj.SetParameters(Parameters)
9732             self._autoPublish(anObj, theName, "multirotation")
9733             return anObj
9734
9735         ## Rotate the given object around the
9736         #  given axis on the given angle a given number
9737         #  times and multi-translate each rotation result.
9738         #  Translation direction passes through center of gravity
9739         #  of rotated shape and its projection on the rotation axis.
9740         #  @param theObject The object to be rotated.
9741         #  @param theAxis Rotation axis. DZ if None.
9742         #  @param theAngleStep Rotation angle in radians.
9743         #  @param theNbTimes1 Quantity of rotations to be done.
9744         #  @param theRadialStep Translation distance.
9745         #  @param theNbTimes2 Quantity of translations to be done.
9746         #  @param theName Object name; when specified, this parameter is used
9747         #         for result publication in the study. Otherwise, if automatic
9748         #         publication is switched on, default value is used for result name.
9749         #
9750         #  @return New GEOM.GEOM_Object, containing compound of all the
9751         #          shapes, obtained after each transformation.
9752         #
9753         #  @ref tui_multi_rotation "Example"
9754         @ManageTransactions("TrsfOp")
9755         def MultiRotate2DByStep (self, theObject, theAxis, theAngleStep, theNbTimes1, theRadialStep, theNbTimes2, theName=None):
9756             """
9757             Rotate the given object around the
9758             given axis on the given angle a given number
9759             times and multi-translate each rotation result.
9760             Translation direction passes through center of gravity
9761             of rotated shape and its projection on the rotation axis.
9762
9763             Parameters:
9764                 theObject The object to be rotated.
9765                 theAxis Rotation axis. DZ if None.
9766                 theAngleStep Rotation angle in radians.
9767                 theNbTimes1 Quantity of rotations to be done.
9768                 theRadialStep Translation distance.
9769                 theNbTimes2 Quantity of translations to be done.
9770                 theName Object name; when specified, this parameter is used
9771                         for result publication in the study. Otherwise, if automatic
9772                         publication is switched on, default value is used for result name.
9773
9774             Returns:
9775                 New GEOM.GEOM_Object, containing compound of all the
9776                 shapes, obtained after each transformation.
9777
9778             Example of usage:
9779                 rot2d = geompy.MultiRotate2D(prism, vect, math.pi/3, 4, 50, 5)
9780             """
9781             # Example: see GEOM_TestAll.py
9782             theAngleStep, theNbTimes1, theRadialStep, theNbTimes2, Parameters = ParseParameters(theAngleStep, theNbTimes1, theRadialStep, theNbTimes2)
9783             anObj = self.TrsfOp.MultiRotate2DByStep(theObject, theAxis, theAngleStep, theNbTimes1, theRadialStep, theNbTimes2)
9784             RaiseIfFailed("MultiRotate2DByStep", self.TrsfOp)
9785             anObj.SetParameters(Parameters)
9786             self._autoPublish(anObj, theName, "multirotation")
9787             return anObj
9788
9789         ## The same, as MultiRotate1DNbTimes(), but axis is given by direction and point
9790         #
9791         #  @ref swig_MakeMultiRotation "Example"
9792         def MakeMultiRotation1DNbTimes(self, aShape, aDir, aPoint, aNbTimes, theName=None):
9793             """
9794             The same, as geompy.MultiRotate1DNbTimes, but axis is given by direction and point
9795
9796             Example of usage:
9797                 pz = geompy.MakeVertex(0, 0, 100)
9798                 vy = geompy.MakeVectorDXDYDZ(0, 100, 0)
9799                 MultiRot1D = geompy.MakeMultiRotation1DNbTimes(prism, vy, pz, 6)
9800             """
9801             # Example: see GEOM_TestOthers.py
9802             aVec = self.MakeLine(aPoint,aDir)
9803             # note: auto-publishing is done in self.MultiRotate1D()
9804             anObj = self.MultiRotate1DNbTimes(aShape, aVec, aNbTimes, theName)
9805             return anObj
9806
9807         ## The same, as MultiRotate1DByStep(), but axis is given by direction and point
9808         #
9809         #  @ref swig_MakeMultiRotation "Example"
9810         def MakeMultiRotation1DByStep(self, aShape, aDir, aPoint, anAngle, aNbTimes, theName=None):
9811             """
9812             The same, as geompy.MultiRotate1D, but axis is given by direction and point
9813
9814             Example of usage:
9815                 pz = geompy.MakeVertex(0, 0, 100)
9816                 vy = geompy.MakeVectorDXDYDZ(0, 100, 0)
9817                 MultiRot1D = geompy.MakeMultiRotation1DByStep(prism, vy, pz, math.pi/3, 6)
9818             """
9819             # Example: see GEOM_TestOthers.py
9820             aVec = self.MakeLine(aPoint,aDir)
9821             # note: auto-publishing is done in self.MultiRotate1D()
9822             anObj = self.MultiRotate1DByStep(aShape, aVec, anAngle, aNbTimes, theName)
9823             return anObj
9824
9825         ## The same, as MultiRotate2DNbTimes(), but axis is given by direction and point
9826         #
9827         #  @ref swig_MakeMultiRotation "Example"
9828         def MakeMultiRotation2DNbTimes(self, aShape, aDir, aPoint, nbtimes1, aStep, nbtimes2, theName=None):
9829             """
9830             The same, as MultiRotate2DNbTimes(), but axis is given by direction and point
9831
9832             Example of usage:
9833                 pz = geompy.MakeVertex(0, 0, 100)
9834                 vy = geompy.MakeVectorDXDYDZ(0, 100, 0)
9835                 MultiRot2D = geompy.MakeMultiRotation2DNbTimes(f12, vy, pz, 6, 30, 3)
9836             """
9837             # Example: see GEOM_TestOthers.py
9838             aVec = self.MakeLine(aPoint,aDir)
9839             # note: auto-publishing is done in self.MultiRotate2DNbTimes()
9840             anObj = self.MultiRotate2DNbTimes(aShape, aVec, nbtimes1, aStep, nbtimes2, theName)
9841             return anObj
9842
9843         ## The same, as MultiRotate2DByStep(), but axis is given by direction and point
9844         #
9845         #  @ref swig_MakeMultiRotation "Example"
9846         def MakeMultiRotation2DByStep(self, aShape, aDir, aPoint, anAngle, nbtimes1, aStep, nbtimes2, theName=None):
9847             """
9848             The same, as MultiRotate2DByStep(), but axis is given by direction and point
9849
9850             Example of usage:
9851                 pz = geompy.MakeVertex(0, 0, 100)
9852                 vy = geompy.MakeVectorDXDYDZ(0, 100, 0)
9853                 MultiRot2D = geompy.MakeMultiRotation2DByStep(f12, vy, pz, math.pi/4, 6, 30, 3)
9854             """
9855             # Example: see GEOM_TestOthers.py
9856             aVec = self.MakeLine(aPoint,aDir)
9857             # note: auto-publishing is done in self.MultiRotate2D()
9858             anObj = self.MultiRotate2DByStep(aShape, aVec, anAngle, nbtimes1, aStep, nbtimes2, theName)
9859             return anObj
9860
9861         ##
9862         #  Compute a wire or a face that represents a projection of the source
9863         #  shape onto cylinder. The cylinder's coordinate system is the same
9864         #  as the global coordinate system.
9865         #
9866         #  @param theObject The object to be projected. It can be either
9867         #         a planar wire or a face.
9868         #  @param theRadius The radius of the cylinder.
9869         #  @param theStartAngle The starting angle in radians from
9870         #         the cylinder's X axis around Z axis. The angle from which
9871         #         the projection is started.
9872         #  @param theAngleLength The projection length angle in radians.
9873         #         The angle in which to project the total length of the wire.
9874         #         If it is negative the projection is not scaled and natural
9875         #         wire length is kept for the projection.
9876         #  @param theAngleRotation The desired angle in radians between
9877         #         the tangent vector to the first curve at the first point of
9878         #         the theObject's projection in 2D space and U-direction of
9879         #         cylinder's 2D space.
9880         #  @param theName Object name; when specified, this parameter is used
9881         #         for result publication in the study. Otherwise, if automatic
9882         #         publication is switched on, default value is used for result name.
9883         #
9884         #  @return New GEOM.GEOM_Object, containing the result shape. The result
9885         #         represents a wire or a face that represents a projection of
9886         #         the source shape onto a cylinder.
9887         #
9888         #  @ref tui_projection "Example"
9889         def MakeProjectionOnCylinder (self, theObject, theRadius,
9890                                       theStartAngle=0.0, theAngleLength=-1.0,
9891                                       theAngleRotation=0.0,
9892                                       theName=None):
9893             """
9894             Compute a wire or a face that represents a projection of the source
9895             shape onto cylinder. The cylinder's coordinate system is the same
9896             as the global coordinate system.
9897
9898             Parameters:
9899                 theObject The object to be projected. It can be either
9900                         a planar wire or a face.
9901                 theRadius The radius of the cylinder.
9902                 theStartAngle The starting angle in radians from the cylinder's X axis
9903                         around Z axis. The angle from which the projection is started.
9904                 theAngleLength The projection length angle in radians. The angle in which
9905                         to project the total length of the wire. If it is negative the
9906                         projection is not scaled and natural wire length is kept for
9907                         the projection.
9908                 theAngleRotation The desired angle in radians between
9909                         the tangent vector to the first curve at the first
9910                         point of the theObject's projection in 2D space and
9911                         U-direction of cylinder's 2D space.
9912                 theName Object name; when specified, this parameter is used
9913                         for result publication in the study. Otherwise, if automatic
9914                         publication is switched on, default value is used for result name.
9915
9916             Returns:
9917                 New GEOM.GEOM_Object, containing the result shape. The result
9918                 represents a wire or a face that represents a projection of
9919                 the source shape onto a cylinder.
9920             """
9921             # Example: see GEOM_TestAll.py
9922             flagStartAngle = False
9923             if isinstance(theStartAngle,str):
9924                 flagStartAngle = True
9925             flagAngleLength = False
9926             if isinstance(theAngleLength,str):
9927                 flagAngleLength = True
9928             flagAngleRotation = False
9929             if isinstance(theAngleRotation,str):
9930                 flagAngleRotation = True
9931             theRadius, theStartAngle, theAngleLength, theAngleRotation, Parameters = ParseParameters(
9932               theRadius, theStartAngle, theAngleLength, theAngleRotation)
9933             if flagStartAngle:
9934                 theStartAngle = theStartAngle*math.pi/180.
9935             if flagAngleLength:
9936                 theAngleLength = theAngleLength*math.pi/180.
9937             if flagAngleRotation:
9938                 theAngleRotation = theAngleRotation*math.pi/180.
9939             anObj = self.TrsfOp.MakeProjectionOnCylinder(theObject, theRadius,
9940                 theStartAngle, theAngleLength, theAngleRotation)
9941             RaiseIfFailed("MakeProjectionOnCylinder", self.TrsfOp)
9942             anObj.SetParameters(Parameters)
9943             self._autoPublish(anObj, theName, "projection")
9944             return anObj
9945
9946         # end of l3_transform
9947         ## @}
9948
9949         ## @addtogroup l3_transform_d
9950         ## @{
9951
9952         ## Deprecated method. Use MultiRotate1DNbTimes instead.
9953         def MultiRotate1D(self, theObject, theAxis, theNbTimes, theName=None):
9954             """
9955             Deprecated method. Use MultiRotate1DNbTimes instead.
9956             """
9957             print("The method MultiRotate1D is DEPRECATED. Use MultiRotate1DNbTimes instead.")
9958             return self.MultiRotate1DNbTimes(theObject, theAxis, theNbTimes, theName)
9959
9960         ## The same, as MultiRotate2DByStep(), but theAngle is in degrees.
9961         #  This method is DEPRECATED. Use MultiRotate2DByStep() instead.
9962         @ManageTransactions("TrsfOp")
9963         def MultiRotate2D(self, theObject, theAxis, theAngle, theNbTimes1, theStep, theNbTimes2, theName=None):
9964             """
9965             The same, as MultiRotate2DByStep(), but theAngle is in degrees.
9966             This method is DEPRECATED. Use MultiRotate2DByStep() instead.
9967
9968             Example of usage:
9969                 rot2d = geompy.MultiRotate2D(prism, vect, 60, 4, 50, 5)
9970             """
9971             print("The method MultiRotate2D is DEPRECATED. Use MultiRotate2DByStep instead.")
9972             theAngle, theNbTimes1, theStep, theNbTimes2, Parameters = ParseParameters(theAngle, theNbTimes1, theStep, theNbTimes2)
9973             anObj = self.TrsfOp.MultiRotate2D(theObject, theAxis, theAngle, theNbTimes1, theStep, theNbTimes2)
9974             RaiseIfFailed("MultiRotate2D", self.TrsfOp)
9975             anObj.SetParameters(Parameters)
9976             self._autoPublish(anObj, theName, "multirotation")
9977             return anObj
9978
9979         ## The same, as MultiRotate1D(), but axis is given by direction and point
9980         #  This method is DEPRECATED. Use MakeMultiRotation1DNbTimes instead.
9981         def MakeMultiRotation1D(self, aShape, aDir, aPoint, aNbTimes, theName=None):
9982             """
9983             The same, as geompy.MultiRotate1D, but axis is given by direction and point.
9984             This method is DEPRECATED. Use MakeMultiRotation1DNbTimes instead.
9985
9986             Example of usage:
9987                 pz = geompy.MakeVertex(0, 0, 100)
9988                 vy = geompy.MakeVectorDXDYDZ(0, 100, 0)
9989                 MultiRot1D = geompy.MakeMultiRotation1D(prism, vy, pz, 6)
9990             """
9991             print("The method MakeMultiRotation1D is DEPRECATED. Use MakeMultiRotation1DNbTimes instead.")
9992             aVec = self.MakeLine(aPoint,aDir)
9993             # note: auto-publishing is done in self.MultiRotate1D()
9994             anObj = self.MultiRotate1D(aShape, aVec, aNbTimes, theName)
9995             return anObj
9996
9997         ## The same, as MultiRotate2D(), but axis is given by direction and point
9998         #  This method is DEPRECATED. Use MakeMultiRotation2DByStep instead.
9999         def MakeMultiRotation2D(self, aShape, aDir, aPoint, anAngle, nbtimes1, aStep, nbtimes2, theName=None):
10000             """
10001             The same, as MultiRotate2D(), but axis is given by direction and point
10002             This method is DEPRECATED. Use MakeMultiRotation2DByStep instead.
10003
10004             Example of usage:
10005                 pz = geompy.MakeVertex(0, 0, 100)
10006                 vy = geompy.MakeVectorDXDYDZ(0, 100, 0)
10007                 MultiRot2D = geompy.MakeMultiRotation2D(f12, vy, pz, 45, 6, 30, 3)
10008             """
10009             print("The method MakeMultiRotation2D is DEPRECATED. Use MakeMultiRotation2DByStep instead.")
10010             aVec = self.MakeLine(aPoint,aDir)
10011             # note: auto-publishing is done in self.MultiRotate2D()
10012             anObj = self.MultiRotate2D(aShape, aVec, anAngle, nbtimes1, aStep, nbtimes2, theName)
10013             return anObj
10014
10015         # end of l3_transform_d
10016         ## @}
10017
10018         ## @addtogroup l3_local
10019         ## @{
10020
10021         ## Perform a fillet on all edges of the given shape.
10022         #  @param theShape Shape, to perform fillet on.
10023         #  @param theR Fillet radius.
10024         #  @param theName Object name; when specified, this parameter is used
10025         #         for result publication in the study. Otherwise, if automatic
10026         #         publication is switched on, default value is used for result name.
10027         #
10028         #  @return New GEOM.GEOM_Object, containing the result shape.
10029         #
10030         #  @ref tui_fillet "Example 1"
10031         #  \n @ref swig_MakeFilletAll "Example 2"
10032         @ManageTransactions("LocalOp")
10033         def MakeFilletAll(self, theShape, theR, theName=None):
10034             """
10035             Perform a fillet on all edges of the given shape.
10036
10037             Parameters:
10038                 theShape Shape, to perform fillet on.
10039                 theR Fillet radius.
10040                 theName Object name; when specified, this parameter is used
10041                         for result publication in the study. Otherwise, if automatic
10042                         publication is switched on, default value is used for result name.
10043
10044             Returns:
10045                 New GEOM.GEOM_Object, containing the result shape.
10046
10047             Example of usage:
10048                filletall = geompy.MakeFilletAll(prism, 10.)
10049             """
10050             # Example: see GEOM_TestOthers.py
10051             theR,Parameters = ParseParameters(theR)
10052             anObj = self.LocalOp.MakeFilletAll(theShape, theR)
10053             RaiseIfFailed("MakeFilletAll", self.LocalOp)
10054             anObj.SetParameters(Parameters)
10055             self._autoPublish(anObj, theName, "fillet")
10056             return anObj
10057
10058         ## Perform a fillet on the specified edges/faces of the given shape
10059         #  @param theShape Shape, to perform fillet on.
10060         #  @param theR Fillet radius.
10061         #  @param theShapeType Type of shapes in <VAR>theListShapes</VAR> (see ShapeType())
10062         #  @param theListShapes Global indices of edges/faces to perform fillet on.
10063         #  @param theName Object name; when specified, this parameter is used
10064         #         for result publication in the study. Otherwise, if automatic
10065         #         publication is switched on, default value is used for result name.
10066         #
10067         #  @note Global index of sub-shape can be obtained, using method GetSubShapeID().
10068         #
10069         #  @return New GEOM.GEOM_Object, containing the result shape.
10070         #
10071         #  @ref tui_fillet "Example"
10072         @ManageTransactions("LocalOp")
10073         def MakeFillet(self, theShape, theR, theShapeType, theListShapes, theName=None):
10074             """
10075             Perform a fillet on the specified edges/faces of the given shape
10076
10077             Parameters:
10078                 theShape Shape, to perform fillet on.
10079                 theR Fillet radius.
10080                 theShapeType Type of shapes in theListShapes (see geompy.ShapeTypes)
10081                 theListShapes Global indices of edges/faces to perform fillet on.
10082                 theName Object name; when specified, this parameter is used
10083                         for result publication in the study. Otherwise, if automatic
10084                         publication is switched on, default value is used for result name.
10085
10086             Note:
10087                 Global index of sub-shape can be obtained, using method geompy.GetSubShapeID
10088
10089             Returns:
10090                 New GEOM.GEOM_Object, containing the result shape.
10091
10092             Example of usage:
10093                 # get the list of IDs (IDList) for the fillet
10094                 prism_edges = geompy.SubShapeAllSortedCentres(prism, geompy.ShapeType["EDGE"])
10095                 IDlist_e = []
10096                 IDlist_e.append(geompy.GetSubShapeID(prism, prism_edges[0]))
10097                 IDlist_e.append(geompy.GetSubShapeID(prism, prism_edges[1]))
10098                 IDlist_e.append(geompy.GetSubShapeID(prism, prism_edges[2]))
10099                 # make a fillet on the specified edges of the given shape
10100                 fillet = geompy.MakeFillet(prism, 10., geompy.ShapeType["EDGE"], IDlist_e)
10101             """
10102             # Example: see GEOM_TestAll.py
10103             theR,Parameters = ParseParameters(theR)
10104             anObj = None
10105             if theShapeType == self.ShapeType["EDGE"]:
10106                 anObj = self.LocalOp.MakeFilletEdges(theShape, theR, theListShapes)
10107                 RaiseIfFailed("MakeFilletEdges", self.LocalOp)
10108             else:
10109                 anObj = self.LocalOp.MakeFilletFaces(theShape, theR, theListShapes)
10110                 RaiseIfFailed("MakeFilletFaces", self.LocalOp)
10111             anObj.SetParameters(Parameters)
10112             self._autoPublish(anObj, theName, "fillet")
10113             return anObj
10114
10115         ## The same that MakeFillet() but with two Fillet Radius R1 and R2
10116         @ManageTransactions("LocalOp")
10117         def MakeFilletR1R2(self, theShape, theR1, theR2, theShapeType, theListShapes, theName=None):
10118             """
10119             The same that geompy.MakeFillet but with two Fillet Radius R1 and R2
10120
10121             Example of usage:
10122                 # get the list of IDs (IDList) for the fillet
10123                 prism_edges = geompy.SubShapeAllSortedCentres(prism, geompy.ShapeType["EDGE"])
10124                 IDlist_e = []
10125                 IDlist_e.append(geompy.GetSubShapeID(prism, prism_edges[0]))
10126                 IDlist_e.append(geompy.GetSubShapeID(prism, prism_edges[1]))
10127                 IDlist_e.append(geompy.GetSubShapeID(prism, prism_edges[2]))
10128                 # make a fillet on the specified edges of the given shape
10129                 fillet = geompy.MakeFillet(prism, 10., 15., geompy.ShapeType["EDGE"], IDlist_e)
10130             """
10131             theR1,theR2,Parameters = ParseParameters(theR1,theR2)
10132             anObj = None
10133             if theShapeType == self.ShapeType["EDGE"]:
10134                 anObj = self.LocalOp.MakeFilletEdgesR1R2(theShape, theR1, theR2, theListShapes)
10135                 RaiseIfFailed("MakeFilletEdgesR1R2", self.LocalOp)
10136             else:
10137                 anObj = self.LocalOp.MakeFilletFacesR1R2(theShape, theR1, theR2, theListShapes)
10138                 RaiseIfFailed("MakeFilletFacesR1R2", self.LocalOp)
10139             anObj.SetParameters(Parameters)
10140             self._autoPublish(anObj, theName, "fillet")
10141             return anObj
10142
10143         ## Perform a fillet on the specified edges of the given shape
10144         #  @param theShape  Wire Shape to perform fillet on.
10145         #  @param theR  Fillet radius.
10146         #  @param theListOfVertexes Global indices of vertexes to perform fillet on.
10147         #    \note Global index of sub-shape can be obtained, using method GetSubShapeID()
10148         #    \note The list of vertices could be empty,
10149         #          in this case fillet will done done at all vertices in wire
10150         #  @param doIgnoreSecantVertices If FALSE, fillet radius is always limited
10151         #         by the length of the edges, nearest to the fillet vertex.
10152         #         But sometimes the next edge is C1 continuous with the one, nearest to
10153         #         the fillet point, and such two (or more) edges can be united to allow
10154         #         bigger radius. Set this flag to TRUE to allow collinear edges union,
10155         #         thus ignoring the secant vertex (vertices).
10156         #  @param theName Object name; when specified, this parameter is used
10157         #         for result publication in the study. Otherwise, if automatic
10158         #         publication is switched on, default value is used for result name.
10159         #
10160         #  @return New GEOM.GEOM_Object, containing the result shape.
10161         #
10162         #  @ref tui_fillet2d "Example"
10163         @ManageTransactions("LocalOp")
10164         def MakeFillet1D(self, theShape, theR, theListOfVertexes, doIgnoreSecantVertices = True, theName=None):
10165             """
10166             Perform a fillet on the specified edges of the given shape
10167
10168             Parameters:
10169                 theShape  Wire Shape to perform fillet on.
10170                 theR  Fillet radius.
10171                 theListOfVertexes Global indices of vertexes to perform fillet on.
10172                 doIgnoreSecantVertices If FALSE, fillet radius is always limited
10173                     by the length of the edges, nearest to the fillet vertex.
10174                     But sometimes the next edge is C1 continuous with the one, nearest to
10175                     the fillet point, and such two (or more) edges can be united to allow
10176                     bigger radius. Set this flag to TRUE to allow collinear edges union,
10177                     thus ignoring the secant vertex (vertices).
10178                 theName Object name; when specified, this parameter is used
10179                         for result publication in the study. Otherwise, if automatic
10180                         publication is switched on, default value is used for result name.
10181             Note:
10182                 Global index of sub-shape can be obtained, using method geompy.GetSubShapeID
10183
10184                 The list of vertices could be empty,in this case fillet will done done at all vertices in wire
10185
10186             Returns:
10187                 New GEOM.GEOM_Object, containing the result shape.
10188
10189             Example of usage:
10190                 # create wire
10191                 Wire_1 = geompy.MakeWire([Edge_12, Edge_7, Edge_11, Edge_6, Edge_1,Edge_4])
10192                 # make fillet at given wire vertices with giver radius
10193                 Fillet_1D_1 = geompy.MakeFillet1D(Wire_1, 55, [3, 4, 6, 8, 10])
10194             """
10195             # Example: see GEOM_TestAll.py
10196             theR,doIgnoreSecantVertices,Parameters = ParseParameters(theR,doIgnoreSecantVertices)
10197             anObj = self.LocalOp.MakeFillet1D(theShape, theR, theListOfVertexes, doIgnoreSecantVertices)
10198             RaiseIfFailed("MakeFillet1D", self.LocalOp)
10199             anObj.SetParameters(Parameters)
10200             self._autoPublish(anObj, theName, "fillet")
10201             return anObj
10202
10203         ## Perform a fillet at the specified vertices of the given face/shell.
10204         #  @param theShape Face or Shell shape to perform fillet on.
10205         #  @param theR Fillet radius.
10206         #  @param theListOfVertexes Global indices of vertexes to perform fillet on.
10207         #  @param theName Object name; when specified, this parameter is used
10208         #         for result publication in the study. Otherwise, if automatic
10209         #         publication is switched on, default value is used for result name.
10210         #
10211         #  @note Global index of sub-shape can be obtained, using method GetSubShapeID().
10212         #
10213         #  @return New GEOM.GEOM_Object, containing the result shape.
10214         #
10215         #  @ref tui_fillet2d "Example"
10216         @ManageTransactions("LocalOp")
10217         def MakeFillet2D(self, theShape, theR, theListOfVertexes, theName=None):
10218             """
10219             Perform a fillet at the specified vertices of the given face/shell.
10220
10221             Parameters:
10222                 theShape  Face or Shell shape to perform fillet on.
10223                 theR  Fillet radius.
10224                 theListOfVertexes Global indices of vertexes to perform fillet on.
10225                 theName Object name; when specified, this parameter is used
10226                         for result publication in the study. Otherwise, if automatic
10227                         publication is switched on, default value is used for result name.
10228             Note:
10229                 Global index of sub-shape can be obtained, using method geompy.GetSubShapeID
10230
10231             Returns:
10232                 New GEOM.GEOM_Object, containing the result shape.
10233
10234             Example of usage:
10235                 face = geompy.MakeFaceHW(100, 100, 1)
10236                 fillet2d = geompy.MakeFillet2D(face, 30, [7, 9])
10237             """
10238             # Example: see GEOM_TestAll.py
10239             theR,Parameters = ParseParameters(theR)
10240             anObj = self.LocalOp.MakeFillet2D(theShape, theR, theListOfVertexes)
10241             RaiseIfFailed("MakeFillet2D", self.LocalOp)
10242             anObj.SetParameters(Parameters)
10243             self._autoPublish(anObj, theName, "fillet")
10244             return anObj
10245
10246         ## Perform a symmetric chamfer on all edges of the given shape.
10247         #  @param theShape Shape, to perform chamfer on.
10248         #  @param theD Chamfer size along each face.
10249         #  @param theName Object name; when specified, this parameter is used
10250         #         for result publication in the study. Otherwise, if automatic
10251         #         publication is switched on, default value is used for result name.
10252         #
10253         #  @return New GEOM.GEOM_Object, containing the result shape.
10254         #
10255         #  @ref tui_chamfer "Example 1"
10256         #  \n @ref swig_MakeChamferAll "Example 2"
10257         @ManageTransactions("LocalOp")
10258         def MakeChamferAll(self, theShape, theD, theName=None):
10259             """
10260             Perform a symmetric chamfer on all edges of the given shape.
10261
10262             Parameters:
10263                 theShape Shape, to perform chamfer on.
10264                 theD Chamfer size along each face.
10265                 theName Object name; when specified, this parameter is used
10266                         for result publication in the study. Otherwise, if automatic
10267                         publication is switched on, default value is used for result name.
10268
10269             Returns:
10270                 New GEOM.GEOM_Object, containing the result shape.
10271
10272             Example of usage:
10273                 chamfer_all = geompy.MakeChamferAll(prism, 10.)
10274             """
10275             # Example: see GEOM_TestOthers.py
10276             theD,Parameters = ParseParameters(theD)
10277             anObj = self.LocalOp.MakeChamferAll(theShape, theD)
10278             RaiseIfFailed("MakeChamferAll", self.LocalOp)
10279             anObj.SetParameters(Parameters)
10280             self._autoPublish(anObj, theName, "chamfer")
10281             return anObj
10282
10283         ## Perform a chamfer on edges, common to the specified faces,
10284         #  with distance D1 on the Face1
10285         #  @param theShape Shape, to perform chamfer on.
10286         #  @param theD1 Chamfer size along \a theFace1.
10287         #  @param theD2 Chamfer size along \a theFace2.
10288         #  @param theFace1,theFace2 Global indices of two faces of \a theShape.
10289         #  @param theName Object name; when specified, this parameter is used
10290         #         for result publication in the study. Otherwise, if automatic
10291         #         publication is switched on, default value is used for result name.
10292         #
10293         #  @note Global index of sub-shape can be obtained, using method GetSubShapeID().
10294         #
10295         #  @return New GEOM.GEOM_Object, containing the result shape.
10296         #
10297         #  @ref tui_chamfer "Example"
10298         @ManageTransactions("LocalOp")
10299         def MakeChamferEdge(self, theShape, theD1, theD2, theFace1, theFace2, theName=None):
10300             """
10301             Perform a chamfer on edges, common to the specified faces,
10302             with distance D1 on the Face1
10303
10304             Parameters:
10305                 theShape Shape, to perform chamfer on.
10306                 theD1 Chamfer size along theFace1.
10307                 theD2 Chamfer size along theFace2.
10308                 theFace1,theFace2 Global indices of two faces of theShape.
10309                 theName Object name; when specified, this parameter is used
10310                         for result publication in the study. Otherwise, if automatic
10311                         publication is switched on, default value is used for result name.
10312
10313             Note:
10314                 Global index of sub-shape can be obtained, using method geompy.GetSubShapeID
10315
10316             Returns:
10317                 New GEOM.GEOM_Object, containing the result shape.
10318
10319             Example of usage:
10320                 prism_faces = geompy.SubShapeAllSortedCentres(prism, geompy.ShapeType["FACE"])
10321                 f_ind_1 = geompy.GetSubShapeID(prism, prism_faces[0])
10322                 f_ind_2 = geompy.GetSubShapeID(prism, prism_faces[1])
10323                 chamfer_e = geompy.MakeChamferEdge(prism, 10., 10., f_ind_1, f_ind_2)
10324             """
10325             # Example: see GEOM_TestAll.py
10326             theD1,theD2,Parameters = ParseParameters(theD1,theD2)
10327             anObj = self.LocalOp.MakeChamferEdge(theShape, theD1, theD2, theFace1, theFace2)
10328             RaiseIfFailed("MakeChamferEdge", self.LocalOp)
10329             anObj.SetParameters(Parameters)
10330             self._autoPublish(anObj, theName, "chamfer")
10331             return anObj
10332
10333         ## Perform a chamfer on edges
10334         #  @param theShape Shape, to perform chamfer on.
10335         #  @param theD Chamfer length
10336         #  @param theAngle Angle of chamfer (angle in radians or a name of variable which defines angle in degrees)
10337         #  @param theFace1,theFace2 Global indices of two faces of \a theShape.
10338         #  @param theName Object name; when specified, this parameter is used
10339         #         for result publication in the study. Otherwise, if automatic
10340         #         publication is switched on, default value is used for result name.
10341         #
10342         #  @note Global index of sub-shape can be obtained, using method GetSubShapeID().
10343         #
10344         #  @return New GEOM.GEOM_Object, containing the result shape.
10345         @ManageTransactions("LocalOp")
10346         def MakeChamferEdgeAD(self, theShape, theD, theAngle, theFace1, theFace2, theName=None):
10347             """
10348             Perform a chamfer on edges
10349
10350             Parameters:
10351                 theShape Shape, to perform chamfer on.
10352                 theD1 Chamfer size along theFace1.
10353                 theAngle Angle of chamfer (angle in radians or a name of variable which defines angle in degrees).
10354                 theFace1,theFace2 Global indices of two faces of theShape.
10355                 theName Object name; when specified, this parameter is used
10356                         for result publication in the study. Otherwise, if automatic
10357                         publication is switched on, default value is used for result name.
10358
10359             Note:
10360                 Global index of sub-shape can be obtained, using method geompy.GetSubShapeID
10361
10362             Returns:
10363                 New GEOM.GEOM_Object, containing the result shape.
10364
10365             Example of usage:
10366                 prism_faces = geompy.SubShapeAllSortedCentres(prism, geompy.ShapeType["FACE"])
10367                 f_ind_1 = geompy.GetSubShapeID(prism, prism_faces[0])
10368                 f_ind_2 = geompy.GetSubShapeID(prism, prism_faces[1])
10369                 ang = 30
10370                 chamfer_e = geompy.MakeChamferEdge(prism, 10., ang, f_ind_1, f_ind_2)
10371             """
10372             flag = False
10373             if isinstance(theAngle,str):
10374                 flag = True
10375             theD,theAngle,Parameters = ParseParameters(theD,theAngle)
10376             if flag:
10377                 theAngle = theAngle*math.pi/180.0
10378             anObj = self.LocalOp.MakeChamferEdgeAD(theShape, theD, theAngle, theFace1, theFace2)
10379             RaiseIfFailed("MakeChamferEdgeAD", self.LocalOp)
10380             anObj.SetParameters(Parameters)
10381             self._autoPublish(anObj, theName, "chamfer")
10382             return anObj
10383
10384         ## Perform a chamfer on all edges of the specified faces,
10385         #  with distance D1 on the first specified face (if several for one edge)
10386         #  @param theShape Shape, to perform chamfer on.
10387         #  @param theD1 Chamfer size along face from \a theFaces. If both faces,
10388         #               connected to the edge, are in \a theFaces, \a theD1
10389         #               will be get along face, which is nearer to \a theFaces beginning.
10390         #  @param theD2 Chamfer size along another of two faces, connected to the edge.
10391         #  @param theFaces Sequence of global indices of faces of \a theShape.
10392         #  @param theName Object name; when specified, this parameter is used
10393         #         for result publication in the study. Otherwise, if automatic
10394         #         publication is switched on, default value is used for result name.
10395         #
10396         #  @note Global index of sub-shape can be obtained, using method GetSubShapeID().
10397         #
10398         #  @return New GEOM.GEOM_Object, containing the result shape.
10399         #
10400         #  @ref tui_chamfer "Example"
10401         @ManageTransactions("LocalOp")
10402         def MakeChamferFaces(self, theShape, theD1, theD2, theFaces, theName=None):
10403             """
10404             Perform a chamfer on all edges of the specified faces,
10405             with distance D1 on the first specified face (if several for one edge)
10406
10407             Parameters:
10408                 theShape Shape, to perform chamfer on.
10409                 theD1 Chamfer size along face from  theFaces. If both faces,
10410                       connected to the edge, are in theFaces, theD1
10411                       will be get along face, which is nearer to theFaces beginning.
10412                 theD2 Chamfer size along another of two faces, connected to the edge.
10413                 theFaces Sequence of global indices of faces of theShape.
10414                 theName Object name; when specified, this parameter is used
10415                         for result publication in the study. Otherwise, if automatic
10416                         publication is switched on, default value is used for result name.
10417
10418             Note: Global index of sub-shape can be obtained, using method geompy.GetSubShapeID().
10419
10420             Returns:
10421                 New GEOM.GEOM_Object, containing the result shape.
10422             """
10423             # Example: see GEOM_TestAll.py
10424             theD1,theD2,Parameters = ParseParameters(theD1,theD2)
10425             anObj = self.LocalOp.MakeChamferFaces(theShape, theD1, theD2, theFaces)
10426             RaiseIfFailed("MakeChamferFaces", self.LocalOp)
10427             anObj.SetParameters(Parameters)
10428             self._autoPublish(anObj, theName, "chamfer")
10429             return anObj
10430
10431         ## The Same that MakeChamferFaces() but with params theD is chamfer length and
10432         #  theAngle is Angle of chamfer (angle in radians or a name of variable which defines angle in degrees)
10433         #
10434         #  @ref swig_FilletChamfer "Example"
10435         @ManageTransactions("LocalOp")
10436         def MakeChamferFacesAD(self, theShape, theD, theAngle, theFaces, theName=None):
10437             """
10438             The Same that geompy.MakeChamferFaces but with params theD is chamfer length and
10439             theAngle is Angle of chamfer (angle in radians or a name of variable which defines angle in degrees)
10440             """
10441             flag = False
10442             if isinstance(theAngle,str):
10443                 flag = True
10444             theD,theAngle,Parameters = ParseParameters(theD,theAngle)
10445             if flag:
10446                 theAngle = theAngle*math.pi/180.0
10447             anObj = self.LocalOp.MakeChamferFacesAD(theShape, theD, theAngle, theFaces)
10448             RaiseIfFailed("MakeChamferFacesAD", self.LocalOp)
10449             anObj.SetParameters(Parameters)
10450             self._autoPublish(anObj, theName, "chamfer")
10451             return anObj
10452
10453         ## Perform a chamfer on edges,
10454         #  with distance D1 on the first specified face (if several for one edge)
10455         #  @param theShape Shape, to perform chamfer on.
10456         #  @param theD1,theD2 Chamfer size
10457         #  @param theEdges Sequence of edges of \a theShape.
10458         #  @param theName Object name; when specified, this parameter is used
10459         #         for result publication in the study. Otherwise, if automatic
10460         #         publication is switched on, default value is used for result name.
10461         #
10462         #  @return New GEOM.GEOM_Object, containing the result shape.
10463         #
10464         #  @ref swig_FilletChamfer "Example"
10465         @ManageTransactions("LocalOp")
10466         def MakeChamferEdges(self, theShape, theD1, theD2, theEdges, theName=None):
10467             """
10468             Perform a chamfer on edges,
10469             with distance D1 on the first specified face (if several for one edge)
10470
10471             Parameters:
10472                 theShape Shape, to perform chamfer on.
10473                 theD1,theD2 Chamfer size
10474                 theEdges Sequence of edges of theShape.
10475                 theName Object name; when specified, this parameter is used
10476                         for result publication in the study. Otherwise, if automatic
10477                         publication is switched on, default value is used for result name.
10478
10479             Returns:
10480                 New GEOM.GEOM_Object, containing the result shape.
10481             """
10482             theD1,theD2,Parameters = ParseParameters(theD1,theD2)
10483             anObj = self.LocalOp.MakeChamferEdges(theShape, theD1, theD2, theEdges)
10484             RaiseIfFailed("MakeChamferEdges", self.LocalOp)
10485             anObj.SetParameters(Parameters)
10486             self._autoPublish(anObj, theName, "chamfer")
10487             return anObj
10488
10489         ## The Same that MakeChamferEdges() but with params theD is chamfer length and
10490         #  theAngle is Angle of chamfer (angle in radians or a name of variable which defines angle in degrees)
10491         @ManageTransactions("LocalOp")
10492         def MakeChamferEdgesAD(self, theShape, theD, theAngle, theEdges, theName=None):
10493             """
10494             The Same that geompy.MakeChamferEdges but with params theD is chamfer length and
10495             theAngle is Angle of chamfer (angle in radians or a name of variable which defines angle in degrees)
10496             """
10497             flag = False
10498             if isinstance(theAngle,str):
10499                 flag = True
10500             theD,theAngle,Parameters = ParseParameters(theD,theAngle)
10501             if flag:
10502                 theAngle = theAngle*math.pi/180.0
10503             anObj = self.LocalOp.MakeChamferEdgesAD(theShape, theD, theAngle, theEdges)
10504             RaiseIfFailed("MakeChamferEdgesAD", self.LocalOp)
10505             anObj.SetParameters(Parameters)
10506             self._autoPublish(anObj, theName, "chamfer")
10507             return anObj
10508
10509         ## @sa MakeChamferEdge(), MakeChamferFaces()
10510         #
10511         #  @ref swig_MakeChamfer "Example"
10512         def MakeChamfer(self, aShape, d1, d2, aShapeType, ListShape, theName=None):
10513             """
10514             See geompy.MakeChamferEdge() and geompy.MakeChamferFaces() functions for more information.
10515             """
10516             # Example: see GEOM_TestOthers.py
10517             anObj = None
10518             # note: auto-publishing is done in self.MakeChamferEdge() or self.MakeChamferFaces()
10519             if aShapeType == self.ShapeType["EDGE"]:
10520                 anObj = self.MakeChamferEdge(aShape,d1,d2,ListShape[0],ListShape[1],theName)
10521             else:
10522                 anObj = self.MakeChamferFaces(aShape,d1,d2,ListShape,theName)
10523             return anObj
10524
10525         ## Remove material from a solid by extrusion of the base shape on the given distance.
10526         #  @param theInit Shape to remove material from. It must be a solid or
10527         #  a compound made of a single solid.
10528         #  @param theBase Closed edge or wire defining the base shape to be extruded.
10529         #  @param theH Prism dimension along the normal to theBase
10530         #  @param theAngle Draft angle in degrees.
10531         #  @param theInvert If true material changes the direction
10532         #  @param theName Object name; when specified, this parameter is used
10533         #         for result publication in the study. Otherwise, if automatic
10534         #         publication is switched on, default value is used for result name.
10535         #
10536         #  @return New GEOM.GEOM_Object, containing the initial shape with removed material
10537         #
10538         #  @ref tui_creation_prism "Example"
10539         @ManageTransactions("PrimOp")
10540         def MakeExtrudedCut(self, theInit, theBase, theH, theAngle, theInvert=False, theName=None):
10541             """
10542             Add material to a solid by extrusion of the base shape on the given distance.
10543
10544             Parameters:
10545                 theInit Shape to remove material from. It must be a solid or a compound made of a single solid.
10546                 theBase Closed edge or wire defining the base shape to be extruded.
10547                 theH Prism dimension along the normal to theBase
10548                 theAngle Draft angle in degrees.
10549                 theInvert If true material changes the direction.
10550                 theName Object name; when specified, this parameter is used
10551                         for result publication in the study. Otherwise, if automatic
10552                         publication is switched on, default value is used for result name.
10553
10554             Returns:
10555                 New GEOM.GEOM_Object,  containing the initial shape with removed material.
10556             """
10557             # Example: see GEOM_TestAll.py
10558             theH,theAngle,Parameters = ParseParameters(theH,theAngle)
10559             anObj = self.PrimOp.MakeDraftPrism(theInit, theBase, theH, theAngle, False, theInvert)
10560             RaiseIfFailed("MakeExtrudedBoss", self.PrimOp)
10561             anObj.SetParameters(Parameters)
10562             self._autoPublish(anObj, theName, "extrudedCut")
10563             return anObj
10564
10565         ## Add material to a solid by extrusion of the base shape on the given distance.
10566         #  @param theInit Shape to add material to. It must be a solid or
10567         #  a compound made of a single solid.
10568         #  @param theBase Closed edge or wire defining the base shape to be extruded.
10569         #  @param theH Prism dimension along the normal to theBase
10570         #  @param theAngle Draft angle in degrees.
10571         #  @param theInvert If true material changes the direction
10572         #  @param theName Object name; when specified, this parameter is used
10573         #         for result publication in the study. Otherwise, if automatic
10574         #         publication is switched on, default value is used for result name.
10575         #
10576         #  @return New GEOM.GEOM_Object, containing the initial shape with added material
10577         #
10578         #  @ref tui_creation_prism "Example"
10579         @ManageTransactions("PrimOp")
10580         def MakeExtrudedBoss(self, theInit, theBase, theH, theAngle, theInvert=False, theName=None):
10581             """
10582             Add material to a solid by extrusion of the base shape on the given distance.
10583
10584             Parameters:
10585                 theInit Shape to add material to. It must be a solid or a compound made of a single solid.
10586                 theBase Closed edge or wire defining the base shape to be extruded.
10587                 theH Prism dimension along the normal to theBase
10588                 theAngle Draft angle in degrees.
10589                 theInvert If true material changes the direction.
10590                 theName Object name; when specified, this parameter is used
10591                         for result publication in the study. Otherwise, if automatic
10592                         publication is switched on, default value is used for result name.
10593
10594             Returns:
10595                 New GEOM.GEOM_Object,  containing the initial shape with added material.
10596             """
10597             # Example: see GEOM_TestAll.py
10598             theH,theAngle,Parameters = ParseParameters(theH,theAngle)
10599             anObj = self.PrimOp.MakeDraftPrism(theInit, theBase, theH, theAngle, True, theInvert)
10600             RaiseIfFailed("MakeExtrudedBoss", self.PrimOp)
10601             anObj.SetParameters(Parameters)
10602             self._autoPublish(anObj, theName, "extrudedBoss")
10603             return anObj
10604
10605         # end of l3_local
10606         ## @}
10607
10608         ## @addtogroup l3_basic_op
10609         ## @{
10610
10611         ## Perform an Archimde operation on the given shape with given parameters.
10612         #  The object presenting the resulting face is returned.
10613         #  @param theShape Shape to be put in water.
10614         #  @param theWeight Weight of the shape.
10615         #  @param theWaterDensity Density of the water.
10616         #  @param theMeshDeflection Deflection of the mesh, using to compute the section.
10617         #  @param theName Object name; when specified, this parameter is used
10618         #         for result publication in the study. Otherwise, if automatic
10619         #         publication is switched on, default value is used for result name.
10620         #
10621         #  @return New GEOM.GEOM_Object, containing a section of \a theShape
10622         #          by a plane, corresponding to water level.
10623         #
10624         #  @ref tui_archimede "Example"
10625         @ManageTransactions("LocalOp")
10626         def Archimede(self, theShape, theWeight, theWaterDensity, theMeshDeflection, theName=None):
10627             """
10628             Perform an Archimde operation on the given shape with given parameters.
10629             The object presenting the resulting face is returned.
10630
10631             Parameters:
10632                 theShape Shape to be put in water.
10633                 theWeight Weight of the shape.
10634                 theWaterDensity Density of the water.
10635                 theMeshDeflection Deflection of the mesh, using to compute the section.
10636                 theName Object name; when specified, this parameter is used
10637                         for result publication in the study. Otherwise, if automatic
10638                         publication is switched on, default value is used for result name.
10639
10640             Returns:
10641                 New GEOM.GEOM_Object, containing a section of theShape
10642                 by a plane, corresponding to water level.
10643             """
10644             # Example: see GEOM_TestAll.py
10645             theWeight,theWaterDensity,theMeshDeflection,Parameters = ParseParameters(
10646               theWeight,theWaterDensity,theMeshDeflection)
10647             anObj = self.LocalOp.MakeArchimede(theShape, theWeight, theWaterDensity, theMeshDeflection)
10648             RaiseIfFailed("MakeArchimede", self.LocalOp)
10649             anObj.SetParameters(Parameters)
10650             self._autoPublish(anObj, theName, "archimede")
10651             return anObj
10652
10653         # end of l3_basic_op
10654         ## @}
10655
10656         ## @addtogroup l2_measure
10657         ## @{
10658
10659         ## Get point coordinates
10660         #  @return [x, y, z]
10661         #
10662         #  @ref tui_point_coordinates_page "Example"
10663         @ManageTransactions("MeasuOp")
10664         def PointCoordinates(self,Point):
10665             """
10666             Get point coordinates
10667
10668             Returns:
10669                 [x, y, z]
10670             """
10671             # Example: see GEOM_TestMeasures.py
10672             aTuple = self.MeasuOp.PointCoordinates(Point)
10673             RaiseIfFailed("PointCoordinates", self.MeasuOp)
10674             return aTuple
10675
10676         ## Get vector coordinates
10677         #  @return [x, y, z]
10678         #
10679         #  @ref tui_measurement_tools_page "Example"
10680         def VectorCoordinates(self,Vector):
10681             """
10682             Get vector coordinates
10683
10684             Returns:
10685                 [x, y, z]
10686             """
10687
10688             p1=self.GetFirstVertex(Vector)
10689             p2=self.GetLastVertex(Vector)
10690
10691             X1=self.PointCoordinates(p1)
10692             X2=self.PointCoordinates(p2)
10693
10694             return (X2[0]-X1[0],X2[1]-X1[1],X2[2]-X1[2])
10695
10696
10697         ## Compute cross product
10698         #  @return vector w=u^v
10699         #
10700         #  @ref tui_measurement_tools_page "Example"
10701         def CrossProduct(self, Vector1, Vector2):
10702             """
10703             Compute cross product
10704
10705             Returns: vector w=u^v
10706             """
10707             u=self.VectorCoordinates(Vector1)
10708             v=self.VectorCoordinates(Vector2)
10709             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])
10710
10711             return w
10712
10713         ## Compute cross product
10714         #  @return dot product  p=u.v
10715         #
10716         #  @ref tui_measurement_tools_page "Example"
10717         def DotProduct(self, Vector1, Vector2):
10718             """
10719             Compute cross product
10720
10721             Returns: dot product  p=u.v
10722             """
10723             u=self.VectorCoordinates(Vector1)
10724             v=self.VectorCoordinates(Vector2)
10725             p=u[0]*v[0]+u[1]*v[1]+u[2]*v[2]
10726
10727             return p
10728
10729
10730         ## Get summarized length of all wires,
10731         #  area of surface and volume of the given shape.
10732         #  @param theShape Shape to define properties of.
10733         #  @param theTolerance maximal relative error of area
10734         #         and volume computation.
10735         #  @return [theLength, theSurfArea, theVolume]\n
10736         #  theLength:   Summarized length of all wires of the given shape.\n
10737         #  theSurfArea: Area of surface of the given shape.\n
10738         #  theVolume:   Volume of the given shape.
10739         #
10740         #  @ref tui_basic_properties_page "Example"
10741         @ManageTransactions("MeasuOp")
10742         def BasicProperties(self,theShape, theTolerance=1.e-6):
10743             """
10744             Get summarized length of all wires,
10745             area of surface and volume of the given shape.
10746
10747             Parameters:
10748                 theShape Shape to define properties of.
10749                 theTolerance maximal relative error of area
10750                              and volume computation.
10751
10752             Returns:
10753                 [theLength, theSurfArea, theVolume]
10754                  theLength:   Summarized length of all wires of the given shape.
10755                  theSurfArea: Area of surface of the given shape.
10756                  theVolume:   Volume of the given shape.
10757             """
10758             # Example: see GEOM_TestMeasures.py
10759             aTuple = self.MeasuOp.GetBasicProperties(theShape, theTolerance)
10760             RaiseIfFailed("GetBasicProperties", self.MeasuOp)
10761             return aTuple
10762
10763         ## Get parameters of bounding box of the given shape
10764         #  @param theShape Shape to obtain bounding box of.
10765         #  @param precise TRUE for precise computation; FALSE for fast one.
10766         #  @return [Xmin,Xmax, Ymin,Ymax, Zmin,Zmax]
10767         #  Xmin,Xmax: Limits of shape along OX axis.
10768         #  Ymin,Ymax: Limits of shape along OY axis.
10769         #  Zmin,Zmax: Limits of shape along OZ axis.
10770         #
10771         #  @ref tui_bounding_box_page "Example"
10772         @ManageTransactions("MeasuOp")
10773         def BoundingBox (self, theShape, precise=False):
10774             """
10775             Get parameters of bounding box of the given shape
10776
10777             Parameters:
10778                 theShape Shape to obtain bounding box of.
10779                 precise TRUE for precise computation; FALSE for fast one.
10780
10781             Returns:
10782                 [Xmin,Xmax, Ymin,Ymax, Zmin,Zmax]
10783                  Xmin,Xmax: Limits of shape along OX axis.
10784                  Ymin,Ymax: Limits of shape along OY axis.
10785                  Zmin,Zmax: Limits of shape along OZ axis.
10786             """
10787             # Example: see GEOM_TestMeasures.py
10788             aTuple = self.MeasuOp.GetBoundingBox(theShape, precise)
10789             RaiseIfFailed("GetBoundingBox", self.MeasuOp)
10790             return aTuple
10791
10792         ## Get bounding box of the given shape
10793         #  @param theShape Shape to obtain bounding box of.
10794         #  @param precise TRUE for precise computation; FALSE for fast one.
10795         #  @param theName Object name; when specified, this parameter is used
10796         #         for result publication in the study. Otherwise, if automatic
10797         #         publication is switched on, default value is used for result name.
10798         #
10799         #  @return New GEOM.GEOM_Object, containing the created box.
10800         #
10801         #  @ref tui_bounding_box_page "Example"
10802         @ManageTransactions("MeasuOp")
10803         def MakeBoundingBox (self, theShape, precise=False, theName=None):
10804             """
10805             Get bounding box of the given shape
10806
10807             Parameters:
10808                 theShape Shape to obtain bounding box of.
10809                 precise TRUE for precise computation; FALSE for fast one.
10810                 theName Object name; when specified, this parameter is used
10811                         for result publication in the study. Otherwise, if automatic
10812                         publication is switched on, default value is used for result name.
10813
10814             Returns:
10815                 New GEOM.GEOM_Object, containing the created box.
10816             """
10817             # Example: see GEOM_TestMeasures.py
10818             anObj = self.MeasuOp.MakeBoundingBox(theShape, precise)
10819             RaiseIfFailed("MakeBoundingBox", self.MeasuOp)
10820             self._autoPublish(anObj, theName, "bndbox")
10821             return anObj
10822
10823         ## Get inertia matrix and moments of inertia of theShape.
10824         #  @param theShape Shape to calculate inertia of.
10825         #  @return [I11,I12,I13, I21,I22,I23, I31,I32,I33, Ix,Iy,Iz]
10826         #  I(1-3)(1-3): Components of the inertia matrix of the given shape.
10827         #  Ix,Iy,Iz:    Moments of inertia of the given shape.
10828         #
10829         #  @ref tui_inertia_page "Example"
10830         @ManageTransactions("MeasuOp")
10831         def Inertia(self,theShape):
10832             """
10833             Get inertia matrix and moments of inertia of theShape.
10834
10835             Parameters:
10836                 theShape Shape to calculate inertia of.
10837
10838             Returns:
10839                 [I11,I12,I13, I21,I22,I23, I31,I32,I33, Ix,Iy,Iz]
10840                  I(1-3)(1-3): Components of the inertia matrix of the given shape.
10841                  Ix,Iy,Iz:    Moments of inertia of the given shape.
10842             """
10843             # Example: see GEOM_TestMeasures.py
10844             aTuple = self.MeasuOp.GetInertia(theShape)
10845             RaiseIfFailed("GetInertia", self.MeasuOp)
10846             return aTuple
10847
10848         ## Get if coords are included in the shape (ST_IN or ST_ON)
10849         #  @param theShape Shape
10850         #  @param coords list of points coordinates [x1, y1, z1, x2, y2, z2, ...]
10851         #  @param tolerance to be used (default is 1.0e-7)
10852         #  @return list_of_boolean = [res1, res2, ...]
10853         @ManageTransactions("MeasuOp")
10854         def AreCoordsInside(self, theShape, coords, tolerance=1.e-7):
10855             """
10856             Get if coords are included in the shape (ST_IN or ST_ON)
10857
10858             Parameters:
10859                 theShape Shape
10860                 coords list of points coordinates [x1, y1, z1, x2, y2, z2, ...]
10861                 tolerance to be used (default is 1.0e-7)
10862
10863             Returns:
10864                 list_of_boolean = [res1, res2, ...]
10865             """
10866             return self.MeasuOp.AreCoordsInside(theShape, coords, tolerance)
10867
10868         ## Get minimal distance between the given shapes.
10869         #  @param theShape1,theShape2 Shapes to find minimal distance between.
10870         #  @return Value of the minimal distance between the given shapes.
10871         #
10872         #  @ref tui_min_distance_page "Example"
10873         @ManageTransactions("MeasuOp")
10874         def MinDistance(self, theShape1, theShape2):
10875             """
10876             Get minimal distance between the given shapes.
10877
10878             Parameters:
10879                 theShape1,theShape2 Shapes to find minimal distance between.
10880
10881             Returns:
10882                 Value of the minimal distance between the given shapes.
10883             """
10884             # Example: see GEOM_TestMeasures.py
10885             aTuple = self.MeasuOp.GetMinDistance(theShape1, theShape2)
10886             RaiseIfFailed("GetMinDistance", self.MeasuOp)
10887             return aTuple[0]
10888
10889         ## Get minimal distance between the given shapes.
10890         #  @param theShape1,theShape2 Shapes to find minimal distance between.
10891         #  @return Value of the minimal distance between the given shapes, in form of list
10892         #          [Distance, DX, DY, DZ].
10893         #
10894         #  @ref tui_min_distance_page "Example"
10895         @ManageTransactions("MeasuOp")
10896         def MinDistanceComponents(self, theShape1, theShape2):
10897             """
10898             Get minimal distance between the given shapes.
10899
10900             Parameters:
10901                 theShape1,theShape2 Shapes to find minimal distance between.
10902
10903             Returns:
10904                 Value of the minimal distance between the given shapes, in form of list
10905                 [Distance, DX, DY, DZ]
10906             """
10907             # Example: see GEOM_TestMeasures.py
10908             aTuple = self.MeasuOp.GetMinDistance(theShape1, theShape2)
10909             RaiseIfFailed("GetMinDistance", self.MeasuOp)
10910             aRes = [aTuple[0], aTuple[4] - aTuple[1], aTuple[5] - aTuple[2], aTuple[6] - aTuple[3]]
10911             return aRes
10912
10913         ## Get closest points of the given shapes.
10914         #  @param theShape1,theShape2 Shapes to find closest points of.
10915         #  @return The number of found solutions (-1 in case of infinite number of
10916         #          solutions) and a list of (X, Y, Z) coordinates for all couples of points.
10917         #
10918         #  @ref tui_min_distance_page "Example"
10919         @ManageTransactions("MeasuOp")
10920         def ClosestPoints (self, theShape1, theShape2):
10921             """
10922             Get closest points of the given shapes.
10923
10924             Parameters:
10925                 theShape1,theShape2 Shapes to find closest points of.
10926
10927             Returns:
10928                 The number of found solutions (-1 in case of infinite number of
10929                 solutions) and a list of (X, Y, Z) coordinates for all couples of points.
10930             """
10931             # Example: see GEOM_TestMeasures.py
10932             aTuple = self.MeasuOp.ClosestPoints(theShape1, theShape2)
10933             RaiseIfFailed("ClosestPoints", self.MeasuOp)
10934             return aTuple
10935
10936         ## Get angle between the given shapes in degrees.
10937         #  @param theShape1,theShape2 Lines or linear edges to find angle between.
10938         #  @note If both arguments are vectors, the angle is computed in accordance
10939         #        with their orientations, otherwise the minimum angle is computed.
10940         #  @return Value of the angle between the given shapes in degrees.
10941         #
10942         #  @ref tui_angle_page "Example"
10943         @ManageTransactions("MeasuOp")
10944         def GetAngle(self, theShape1, theShape2):
10945             """
10946             Get angle between the given shapes in degrees.
10947
10948             Parameters:
10949                 theShape1,theShape2 Lines or linear edges to find angle between.
10950
10951             Note:
10952                 If both arguments are vectors, the angle is computed in accordance
10953                 with their orientations, otherwise the minimum angle is computed.
10954
10955             Returns:
10956                 Value of the angle between the given shapes in degrees.
10957             """
10958             # Example: see GEOM_TestMeasures.py
10959             anAngle = self.MeasuOp.GetAngle(theShape1, theShape2)
10960             RaiseIfFailed("GetAngle", self.MeasuOp)
10961             return anAngle
10962
10963         ## Get angle between the given shapes in radians.
10964         #  @param theShape1,theShape2 Lines or linear edges to find angle between.
10965         #  @note If both arguments are vectors, the angle is computed in accordance
10966         #        with their orientations, otherwise the minimum angle is computed.
10967         #  @return Value of the angle between the given shapes in radians.
10968         #
10969         #  @ref tui_angle_page "Example"
10970         @ManageTransactions("MeasuOp")
10971         def GetAngleRadians(self, theShape1, theShape2):
10972             """
10973             Get angle between the given shapes in radians.
10974
10975             Parameters:
10976                 theShape1,theShape2 Lines or linear edges to find angle between.
10977
10978
10979             Note:
10980                 If both arguments are vectors, the angle is computed in accordance
10981                 with their orientations, otherwise the minimum angle is computed.
10982
10983             Returns:
10984                 Value of the angle between the given shapes in radians.
10985             """
10986             # Example: see GEOM_TestMeasures.py
10987             anAngle = self.MeasuOp.GetAngle(theShape1, theShape2)*math.pi/180.
10988             RaiseIfFailed("GetAngle", self.MeasuOp)
10989             return anAngle
10990
10991         ## Get angle between the given vectors in degrees.
10992         #  @param theShape1,theShape2 Vectors to find angle between.
10993         #  @param theFlag If True, the normal vector is defined by the two vectors cross,
10994         #                 if False, the opposite vector to the normal vector is used.
10995         #  @return Value of the angle between the given vectors in degrees.
10996         #
10997         #  @ref tui_angle_page "Example"
10998         @ManageTransactions("MeasuOp")
10999         def GetAngleVectors(self, theShape1, theShape2, theFlag = True):
11000             """
11001             Get angle between the given vectors in degrees.
11002
11003             Parameters:
11004                 theShape1,theShape2 Vectors to find angle between.
11005                 theFlag If True, the normal vector is defined by the two vectors cross,
11006                         if False, the opposite vector to the normal vector is used.
11007
11008             Returns:
11009                 Value of the angle between the given vectors in degrees.
11010             """
11011             anAngle = self.MeasuOp.GetAngleBtwVectors(theShape1, theShape2)
11012             if not theFlag:
11013                 anAngle = 360. - anAngle
11014             RaiseIfFailed("GetAngleVectors", self.MeasuOp)
11015             return anAngle
11016
11017         ## The same as GetAngleVectors, but the result is in radians.
11018         def GetAngleRadiansVectors(self, theShape1, theShape2, theFlag = True):
11019             """
11020             Get angle between the given vectors in radians.
11021
11022             Parameters:
11023                 theShape1,theShape2 Vectors to find angle between.
11024                 theFlag If True, the normal vector is defined by the two vectors cross,
11025                         if False, the opposite vector to the normal vector is used.
11026
11027             Returns:
11028                 Value of the angle between the given vectors in radians.
11029             """
11030             anAngle = self.GetAngleVectors(theShape1, theShape2, theFlag)*math.pi/180.
11031             return anAngle
11032
11033         ## @name Curve Curvature Measurement
11034         #  Methods for receiving radius of curvature of curves
11035         #  in the given point
11036         ## @{
11037
11038         ## Measure curvature of a curve at a point, set by parameter.
11039         #  @param theCurve a curve.
11040         #  @param theParam parameter.
11041         #  @return radius of curvature of \a theCurve.
11042         #
11043         #  @ref swig_todo "Example"
11044         @ManageTransactions("MeasuOp")
11045         def CurveCurvatureByParam(self, theCurve, theParam):
11046             """
11047             Measure curvature of a curve at a point, set by parameter.
11048
11049             Parameters:
11050                 theCurve a curve.
11051                 theParam parameter.
11052
11053             Returns:
11054                 radius of curvature of theCurve.
11055             """
11056             # Example: see GEOM_TestMeasures.py
11057             aCurv = self.MeasuOp.CurveCurvatureByParam(theCurve,theParam)
11058             RaiseIfFailed("CurveCurvatureByParam", self.MeasuOp)
11059             return aCurv
11060
11061         ## Measure curvature of a curve at a point.
11062         #  @param theCurve a curve.
11063         #  @param thePoint given point.
11064         #  @return radius of curvature of \a theCurve.
11065         #
11066         #  @ref swig_todo "Example"
11067         @ManageTransactions("MeasuOp")
11068         def CurveCurvatureByPoint(self, theCurve, thePoint):
11069             """
11070             Measure curvature of a curve at a point.
11071
11072             Parameters:
11073                 theCurve a curve.
11074                 thePoint given point.
11075
11076             Returns:
11077                 radius of curvature of theCurve.
11078             """
11079             aCurv = self.MeasuOp.CurveCurvatureByPoint(theCurve,thePoint)
11080             RaiseIfFailed("CurveCurvatureByPoint", self.MeasuOp)
11081             return aCurv
11082         ## @}
11083
11084         ## @name Surface Curvature Measurement
11085         #  Methods for receiving max and min radius of curvature of surfaces
11086         #  in the given point
11087         ## @{
11088
11089         ## Measure max radius of curvature of surface.
11090         #  @param theSurf the given surface.
11091         #  @param theUParam Value of U-parameter on the referenced surface.
11092         #  @param theVParam Value of V-parameter on the referenced surface.
11093         #  @return max radius of curvature of theSurf.
11094         #
11095         ## @ref swig_todo "Example"
11096         @ManageTransactions("MeasuOp")
11097         def MaxSurfaceCurvatureByParam(self, theSurf, theUParam, theVParam):
11098             """
11099             Measure max radius of curvature of surface.
11100
11101             Parameters:
11102                 theSurf the given surface.
11103                 theUParam Value of U-parameter on the referenced surface.
11104                 theVParam Value of V-parameter on the referenced surface.
11105
11106             Returns:
11107                 max radius of curvature of theSurf.
11108             """
11109             # Example: see GEOM_TestMeasures.py
11110             aSurf = self.MeasuOp.MaxSurfaceCurvatureByParam(theSurf,theUParam,theVParam)
11111             RaiseIfFailed("MaxSurfaceCurvatureByParam", self.MeasuOp)
11112             return aSurf
11113
11114         ## Measure max radius of curvature of surface in the given point
11115         #  @param theSurf the given surface.
11116         #  @param thePoint given point.
11117         #  @return max radius of curvature of theSurf.
11118         #
11119         ## @ref swig_todo "Example"
11120         @ManageTransactions("MeasuOp")
11121         def MaxSurfaceCurvatureByPoint(self, theSurf, thePoint):
11122             """
11123             Measure max radius of curvature of surface in the given point.
11124
11125             Parameters:
11126                 theSurf the given surface.
11127                 thePoint given point.
11128
11129             Returns:
11130                 max radius of curvature of theSurf.
11131             """
11132             aSurf = self.MeasuOp.MaxSurfaceCurvatureByPoint(theSurf,thePoint)
11133             RaiseIfFailed("MaxSurfaceCurvatureByPoint", self.MeasuOp)
11134             return aSurf
11135
11136         ## Measure min radius of curvature of surface.
11137         #  @param theSurf the given surface.
11138         #  @param theUParam Value of U-parameter on the referenced surface.
11139         #  @param theVParam Value of V-parameter on the referenced surface.
11140         #  @return min radius of curvature of theSurf.
11141         #
11142         ## @ref swig_todo "Example"
11143         @ManageTransactions("MeasuOp")
11144         def MinSurfaceCurvatureByParam(self, theSurf, theUParam, theVParam):
11145             """
11146             Measure min radius of curvature of surface.
11147
11148             Parameters:
11149                 theSurf the given surface.
11150                 theUParam Value of U-parameter on the referenced surface.
11151                 theVParam Value of V-parameter on the referenced surface.
11152
11153             Returns:
11154                 Min radius of curvature of theSurf.
11155             """
11156             aSurf = self.MeasuOp.MinSurfaceCurvatureByParam(theSurf,theUParam,theVParam)
11157             RaiseIfFailed("MinSurfaceCurvatureByParam", self.MeasuOp)
11158             return aSurf
11159
11160         ## Measure min radius of curvature of surface in the given point
11161         #  @param theSurf the given surface.
11162         #  @param thePoint given point.
11163         #  @return min radius of curvature of theSurf.
11164         #
11165         ## @ref swig_todo "Example"
11166         @ManageTransactions("MeasuOp")
11167         def MinSurfaceCurvatureByPoint(self, theSurf, thePoint):
11168             """
11169             Measure min radius of curvature of surface in the given point.
11170
11171             Parameters:
11172                 theSurf the given surface.
11173                 thePoint given point.
11174
11175             Returns:
11176                 Min radius of curvature of theSurf.
11177             """
11178             aSurf = self.MeasuOp.MinSurfaceCurvatureByPoint(theSurf,thePoint)
11179             RaiseIfFailed("MinSurfaceCurvatureByPoint", self.MeasuOp)
11180             return aSurf
11181         ## @}
11182
11183         ## Measure curvature radius of surface in the given point along the given direction.
11184         #  @param theSurf the given face.
11185         #  @param thePoint given point.
11186         #  @param theDirection given direction.
11187         #  @param theName Object name; when specified, this parameter is used
11188         #         for result publication in the study. Otherwise, if automatic
11189         #         publication is switched on, default value is used for result name.
11190         #
11191         #  @return New GEOM.GEOM_Object, containing vector of curvature of theSurf.
11192         #          The returned vector is codirectional with the normal to the face
11193         #          in the given point in case of positive curvature value
11194         #          and opposite to the normal in case of negative curvature.
11195         #          The normal of the returned vector is equal to the
11196         #          absolute value of the curvature radius.
11197         #          Null shape is returned in case of infinite radius
11198         #          (zero curvature), for example, in case of flat face.
11199         #
11200         ## @ref swig_CurvatureOnFace "Example"
11201         @ManageTransactions("MeasuOp")
11202         def CurvatureOnFace(self, theSurf, thePoint, theDirection, theName=None):
11203             """
11204             Measure curvature radius of surface in the given point along the given direction.
11205
11206             Parameters:
11207                 theSurf the given face.
11208                 thePoint given point.
11209                 theDirection given direction.
11210                 theName Object name; when specified, this parameter is used
11211                         for result publication in the study. Otherwise, if automatic
11212                         publication is switched on, default value is used for result name.
11213
11214             Returns:
11215                 New GEOM.GEOM_Object, containing vector of curvature of theSurf.
11216                 The returned vector is codirectional with the normal to the face
11217                 in the given point in case of positive curvature value
11218                 and opposite to the normal in case of negative curvature.
11219                 The normal of the returned vector is equal to the
11220                 absolute value of the curvature radius.
11221                 Null shape is returned in case of infinite radius
11222                 (zero curvature), for example, in case of flat face.
11223
11224             Example of usage:
11225                 curvature_1 = geompy.CurvatureOnFace(Face_1, Vertex_1, OX)
11226             """
11227             aVec = self.MeasuOp.SurfaceCurvatureByPointAndDirection(theSurf,thePoint,theDirection)
11228             if self.MeasuOp.GetErrorCode() != "ZERO_CURVATURE":
11229                 RaiseIfFailed("CurvatureOnFace", self.MeasuOp)
11230                 self._autoPublish(aVec, theName, "curvature")
11231             return aVec
11232
11233         ## Get min and max tolerances of sub-shapes of theShape
11234         #  @param theShape Shape, to get tolerances of.
11235         #  @return [FaceMin,FaceMax, EdgeMin,EdgeMax, VertMin,VertMax]\n
11236         #  FaceMin,FaceMax: Min and max tolerances of the faces.\n
11237         #  EdgeMin,EdgeMax: Min and max tolerances of the edges.\n
11238         #  VertMin,VertMax: Min and max tolerances of the vertices.
11239         #
11240         #  @ref tui_tolerance_page "Example"
11241         @ManageTransactions("MeasuOp")
11242         def Tolerance(self,theShape):
11243             """
11244             Get min and max tolerances of sub-shapes of theShape
11245
11246             Parameters:
11247                 theShape Shape, to get tolerances of.
11248
11249             Returns:
11250                 [FaceMin,FaceMax, EdgeMin,EdgeMax, VertMin,VertMax]
11251                  FaceMin,FaceMax: Min and max tolerances of the faces.
11252                  EdgeMin,EdgeMax: Min and max tolerances of the edges.
11253                  VertMin,VertMax: Min and max tolerances of the vertices.
11254             """
11255             # Example: see GEOM_TestMeasures.py
11256             aTuple = self.MeasuOp.GetTolerance(theShape)
11257             RaiseIfFailed("GetTolerance", self.MeasuOp)
11258             return aTuple
11259
11260         ## Obtain description of the given shape (number of sub-shapes of each type)
11261         #  @param theShape Shape to be described.
11262         #  @return Description of the given shape.
11263         #
11264         #  @ref tui_whatis_page "Example"
11265         @ManageTransactions("MeasuOp")
11266         def WhatIs(self,theShape):
11267             """
11268             Obtain description of the given shape (number of sub-shapes of each type)
11269
11270             Parameters:
11271                 theShape Shape to be described.
11272
11273             Returns:
11274                 Description of the given shape.
11275             """
11276             # Example: see GEOM_TestMeasures.py
11277             aDescr = self.MeasuOp.WhatIs(theShape)
11278             RaiseIfFailed("WhatIs", self.MeasuOp)
11279             return aDescr
11280
11281         ## Obtain quantity of shapes of the given type in \a theShape.
11282         #  If \a theShape is of type \a theType, it is also counted.
11283         #  @param theShape Shape to be described.
11284         #  @param theType the given ShapeType().
11285         #  @return Quantity of shapes of type \a theType in \a theShape.
11286         #
11287         #  @ref tui_measurement_tools_page "Example"
11288         def NbShapes (self, theShape, theType):
11289             """
11290             Obtain quantity of shapes of the given type in theShape.
11291             If theShape is of type theType, it is also counted.
11292
11293             Parameters:
11294                 theShape Shape to be described.
11295                 theType the given geompy.ShapeType
11296
11297             Returns:
11298                 Quantity of shapes of type theType in theShape.
11299             """
11300             # Example: see GEOM_TestMeasures.py
11301             listSh = self.SubShapeAllIDs(theShape, theType)
11302             Nb = len(listSh)
11303             return Nb
11304
11305         ## Obtain quantity of shapes of each type in \a theShape.
11306         #  The \a theShape is also counted.
11307         #  @param theShape Shape to be described.
11308         #  @return Dictionary of ShapeType() with bound quantities of shapes.
11309         #
11310         #  @ref tui_measurement_tools_page "Example"
11311         def ShapeInfo (self, theShape):
11312             """
11313             Obtain quantity of shapes of each type in theShape.
11314             The theShape is also counted.
11315
11316             Parameters:
11317                 theShape Shape to be described.
11318
11319             Returns:
11320                 Dictionary of geompy.ShapeType with bound quantities of shapes.
11321             """
11322             # Example: see GEOM_TestMeasures.py
11323             aDict = {}
11324             for typeSh in self.ShapeType:
11325                 if typeSh in ( "AUTO", "SHAPE" ): continue
11326                 listSh = self.SubShapeAllIDs(theShape, self.ShapeType[typeSh])
11327                 Nb = len(listSh)
11328                 aDict[typeSh] = Nb
11329                 pass
11330             return aDict
11331
11332         def GetCreationInformation(self, theShape):
11333             res = ''
11334             infos = theShape.GetCreationInformation()
11335             for info in infos:
11336                 # operationName
11337                 opName = info.operationName
11338                 if not opName: opName = "no info available"
11339                 if res: res += "\n"
11340                 res += "Operation: " + opName
11341                 # parameters
11342                 for parVal in info.params:
11343                     res += "\n \t%s = %s" % ( parVal.name, parVal.value )
11344             return res
11345
11346         ## Get a point, situated at the centre of mass of theShape.
11347         #  @param theShape Shape to define centre of mass of.
11348         #  @param 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         #  @return New GEOM.GEOM_Object, containing the created point.
11353         #
11354         #  @ref tui_center_of_mass_page "Example"
11355         @ManageTransactions("MeasuOp")
11356         def MakeCDG(self, theShape, theName=None):
11357             """
11358             Get a point, situated at the centre of mass of theShape.
11359
11360             Parameters:
11361                 theShape Shape to define centre of mass of.
11362                 theName Object name; when specified, this parameter is used
11363                         for result publication in the study. Otherwise, if automatic
11364                         publication is switched on, default value is used for result name.
11365
11366             Returns:
11367                 New GEOM.GEOM_Object, containing the created point.
11368             """
11369             # Example: see GEOM_TestMeasures.py
11370             anObj = self.MeasuOp.GetCentreOfMass(theShape)
11371             RaiseIfFailed("GetCentreOfMass", self.MeasuOp)
11372             self._autoPublish(anObj, theName, "centerOfMass")
11373             return anObj
11374
11375         ## Get a vertex sub-shape by index.
11376         #  @param theShape Shape to find sub-shape.
11377         #  @param theIndex Index to find vertex by this index (starting from zero)
11378         #  @param theUseOri To consider edge/wire orientation or not
11379         #  @param theName Object name; when specified, this parameter is used
11380         #         for result publication in the study. Otherwise, if automatic
11381         #         publication is switched on, default value is used for result name.
11382         #
11383         #  @return New GEOM.GEOM_Object, containing the created vertex.
11384         #
11385         #  @ref tui_measurement_tools_page "Example"
11386         @ManageTransactions("MeasuOp")
11387         def GetVertexByIndex(self, theShape, theIndex, theUseOri=True, theName=None):
11388             """
11389             Get a vertex sub-shape by index.
11390
11391             Parameters:
11392                 theShape Shape to find sub-shape.
11393                 theIndex Index to find vertex by this index (starting from zero)
11394                 theUseOri To consider edge/wire orientation or not
11395                 theName Object name; when specified, this parameter is used
11396                         for result publication in the study. Otherwise, if automatic
11397                         publication is switched on, default value is used for result name.
11398
11399             Returns:
11400                 New GEOM.GEOM_Object, containing the created vertex.
11401             """
11402             # Example: see GEOM_TestMeasures.py
11403             if isinstance( theUseOri, str ): # theUseOri was inserted before theName
11404                 theUseOri, theName = True, theUseOri
11405             anObj = self.MeasuOp.GetVertexByIndex(theShape, theIndex, theUseOri)
11406             RaiseIfFailed("GetVertexByIndex", self.MeasuOp)
11407             self._autoPublish(anObj, theName, "vertex")
11408             return anObj
11409
11410         ## Get the first vertex of wire/edge depended orientation.
11411         #  @param theShape Shape to find first vertex.
11412         #  @param theName Object name; when specified, this parameter is used
11413         #         for result publication in the study. Otherwise, if automatic
11414         #         publication is switched on, default value is used for result name.
11415         #
11416         #  @return New GEOM.GEOM_Object, containing the created vertex.
11417         #
11418         #  @ref tui_measurement_tools_page "Example"
11419         def GetFirstVertex(self, theShape, theName=None):
11420             """
11421             Get the first vertex of wire/edge depended orientation.
11422
11423             Parameters:
11424                 theShape Shape to find first vertex.
11425                 theName Object name; when specified, this parameter is used
11426                         for result publication in the study. Otherwise, if automatic
11427                         publication is switched on, default value is used for result name.
11428
11429             Returns:
11430                 New GEOM.GEOM_Object, containing the created vertex.
11431             """
11432             # Example: see GEOM_TestMeasures.py
11433             # note: auto-publishing is done in self.GetVertexByIndex()
11434             return self.GetVertexByIndex(theShape, 0, True, theName)
11435
11436         ## Get the last vertex of wire/edge depended orientation.
11437         #  @param theShape Shape to find last vertex.
11438         #  @param theName Object name; when specified, this parameter is used
11439         #         for result publication in the study. Otherwise, if automatic
11440         #         publication is switched on, default value is used for result name.
11441         #
11442         #  @return New GEOM.GEOM_Object, containing the created vertex.
11443         #
11444         #  @ref tui_measurement_tools_page "Example"
11445         def GetLastVertex(self, theShape, theName=None):
11446             """
11447             Get the last vertex of wire/edge depended orientation.
11448
11449             Parameters:
11450                 theShape Shape to find last vertex.
11451                 theName Object name; when specified, this parameter is used
11452                         for result publication in the study. Otherwise, if automatic
11453                         publication is switched on, default value is used for result name.
11454
11455             Returns:
11456                 New GEOM.GEOM_Object, containing the created vertex.
11457             """
11458             # Example: see GEOM_TestMeasures.py
11459             nb_vert =  self.NumberOfSubShapes(theShape, self.ShapeType["VERTEX"])
11460             # note: auto-publishing is done in self.GetVertexByIndex()
11461             return self.GetVertexByIndex(theShape, (nb_vert-1), True, theName)
11462
11463         ## Get a normale to the given face. If the point is not given,
11464         #  the normale is calculated at the center of mass.
11465         #  @param theFace Face to define normale of.
11466         #  @param theOptionalPoint Point to compute the normale at.
11467         #  @param theName Object name; when specified, this parameter is used
11468         #         for result publication in the study. Otherwise, if automatic
11469         #         publication is switched on, default value is used for result name.
11470         #
11471         #  @return New GEOM.GEOM_Object, containing the created vector.
11472         #
11473         #  @ref swig_todo "Example"
11474         @ManageTransactions("MeasuOp")
11475         def GetNormal(self, theFace, theOptionalPoint = None, theName=None):
11476             """
11477             Get a normale to the given face. If the point is not given,
11478             the normale is calculated at the center of mass.
11479
11480             Parameters:
11481                 theFace Face to define normale of.
11482                 theOptionalPoint Point to compute the normale at.
11483                 theName Object name; when specified, this parameter is used
11484                         for result publication in the study. Otherwise, if automatic
11485                         publication is switched on, default value is used for result name.
11486
11487             Returns:
11488                 New GEOM.GEOM_Object, containing the created vector.
11489             """
11490             # Example: see GEOM_TestMeasures.py
11491             anObj = self.MeasuOp.GetNormal(theFace, theOptionalPoint)
11492             RaiseIfFailed("GetNormal", self.MeasuOp)
11493             self._autoPublish(anObj, theName, "normal")
11494             return anObj
11495
11496         ## Print shape errors obtained from CheckShape.
11497         #  @param theShape Shape that was checked.
11498         #  @param theShapeErrors the shape errors obtained by CheckShape.
11499         #  @param theReturnStatus If 0 the description of problem is printed.
11500         #                         If 1 the description of problem is returned.
11501         #  @return If theReturnStatus is equal to 1 the description is returned.
11502         #          Otherwise doesn't return anything.
11503         #
11504         #  @ref tui_check_shape_page "Example"
11505         @ManageTransactions("MeasuOp")
11506         def PrintShapeErrors(self, theShape, theShapeErrors, theReturnStatus = 0):
11507             """
11508             Print shape errors obtained from CheckShape.
11509
11510             Parameters:
11511                 theShape Shape that was checked.
11512                 theShapeErrors the shape errors obtained by CheckShape.
11513                 theReturnStatus If 0 the description of problem is printed.
11514                                 If 1 the description of problem is returned.
11515
11516             Returns:
11517                 If theReturnStatus is equal to 1 the description is returned.
11518                   Otherwise doesn't return anything.
11519             """
11520             # Example: see GEOM_TestMeasures.py
11521             Descr = self.MeasuOp.PrintShapeErrors(theShape, theShapeErrors)
11522             if theReturnStatus == 1:
11523                 return Descr
11524             print(Descr)
11525             pass
11526
11527         ## Check a topology of the given shape.
11528         #  @param theShape Shape to check validity of.
11529         #  @param theIsCheckGeom If FALSE, only the shape's topology will be checked, \n
11530         #                        if TRUE, the shape's geometry will be checked also.
11531         #  @param theReturnStatus If 0 and if theShape is invalid, a description
11532         #                         of problem is printed.
11533         #                         If 1 isValid flag and the description of
11534         #                         problem is returned.
11535         #                         If 2 isValid flag and the list of error data
11536         #                         is returned.
11537         #  @return TRUE, if the shape "seems to be valid".
11538         #          If theShape is invalid, prints a description of problem.
11539         #          If theReturnStatus is equal to 1 the description is returned
11540         #          along with IsValid flag.
11541         #          If theReturnStatus is equal to 2 the list of error data is
11542         #          returned along with IsValid flag.
11543         #
11544         #  @ref tui_check_shape_page "Example"
11545         @ManageTransactions("MeasuOp")
11546         def CheckShape(self,theShape, theIsCheckGeom = 0, theReturnStatus = 0):
11547             """
11548             Check a topology of the given shape.
11549
11550             Parameters:
11551                 theShape Shape to check validity of.
11552                 theIsCheckGeom If FALSE, only the shape's topology will be checked,
11553                                if TRUE, the shape's geometry will be checked also.
11554                 theReturnStatus If 0 and if theShape is invalid, a description
11555                                 of problem is printed.
11556                                 If 1 IsValid flag and the description of
11557                                 problem is returned.
11558                                 If 2 IsValid flag and the list of error data
11559                                 is returned.
11560
11561             Returns:
11562                 TRUE, if the shape "seems to be valid".
11563                 If theShape is invalid, prints a description of problem.
11564                 If theReturnStatus is equal to 1 the description is returned
11565                 along with IsValid flag.
11566                 If theReturnStatus is equal to 2 the list of error data is
11567                 returned along with IsValid flag.
11568             """
11569             # Example: see GEOM_TestMeasures.py
11570             if theIsCheckGeom:
11571                 (IsValid, ShapeErrors) = self.MeasuOp.CheckShapeWithGeometry(theShape)
11572                 RaiseIfFailed("CheckShapeWithGeometry", self.MeasuOp)
11573             else:
11574                 (IsValid, ShapeErrors) = self.MeasuOp.CheckShape(theShape)
11575                 RaiseIfFailed("CheckShape", self.MeasuOp)
11576             if IsValid == 0:
11577                 if theReturnStatus == 0:
11578                     Descr = self.MeasuOp.PrintShapeErrors(theShape, ShapeErrors)
11579                     print(Descr)
11580             if theReturnStatus == 1:
11581               Descr = self.MeasuOp.PrintShapeErrors(theShape, ShapeErrors)
11582               return (IsValid, Descr)
11583             elif theReturnStatus == 2:
11584               return (IsValid, ShapeErrors)
11585             return IsValid
11586
11587         ## Detect self-intersections in the given shape.
11588         #  @param theShape Shape to check.
11589         #  @param theCheckLevel is the level of self-intersection check.
11590         #         Possible input values are:
11591         #         - GEOM.SI_V_V(0) - only V/V interferences
11592         #         - GEOM.SI_V_E(1) - V/V and V/E interferences
11593         #         - GEOM.SI_E_E(2) - V/V, V/E and E/E interferences
11594         #         - GEOM.SI_V_F(3) - V/V, V/E, E/E and V/F interferences
11595         #         - GEOM.SI_E_F(4) - V/V, V/E, E/E, V/F and E/F interferences
11596         #         - GEOM.SI_ALL(5) - all interferences.
11597         #  @return TRUE, if the shape contains no self-intersections.
11598         #
11599         #  @ref tui_check_self_intersections_page "Example"
11600         @ManageTransactions("MeasuOp")
11601         def CheckSelfIntersections(self, theShape, theCheckLevel = GEOM.SI_ALL):
11602             """
11603             Detect self-intersections in the given shape.
11604
11605             Parameters:
11606                 theShape Shape to check.
11607                 theCheckLevel is the level of self-intersection check.
11608                   Possible input values are:
11609                    - GEOM.SI_V_V(0) - only V/V interferences
11610                    - GEOM.SI_V_E(1) - V/V and V/E interferences
11611                    - GEOM.SI_E_E(2) - V/V, V/E and E/E interferences
11612                    - GEOM.SI_V_F(3) - V/V, V/E, E/E and V/F interferences
11613                    - GEOM.SI_E_F(4) - V/V, V/E, E/E, V/F and E/F interferences
11614                    - GEOM.SI_ALL(5) - all interferences.
11615  
11616             Returns:
11617                 TRUE, if the shape contains no self-intersections.
11618             """
11619             # Example: see GEOM_TestMeasures.py
11620             (IsValid, Pairs) = self.MeasuOp.CheckSelfIntersections(theShape, EnumToLong(theCheckLevel))
11621             RaiseIfFailed("CheckSelfIntersections", self.MeasuOp)
11622             return IsValid
11623
11624         ## Detect self-intersections of the given shape with algorithm based on mesh intersections.
11625         #  @param theShape Shape to check.
11626         #  @param theDeflection Linear deflection coefficient that specifies quality of tessellation:
11627         #         - if \a theDeflection <= 0, default deflection 0.001 is used
11628         #  @param theTolerance Specifies a distance between sub-shapes used for detecting gaps:
11629         #         - if \a theTolerance <= 0, algorithm detects intersections (default behavior)
11630         #         - if \a theTolerance > 0, algorithm detects gaps
11631         #  @return TRUE, if the shape contains no self-intersections.
11632         #
11633         #  @ref tui_check_self_intersections_fast_page "Example"
11634         @ManageTransactions("MeasuOp")
11635         def CheckSelfIntersectionsFast(self, theShape, theDeflection = 0.001, theTolerance = 0.0):
11636             """
11637             Detect self-intersections of the given shape with algorithm based on mesh intersections.
11638
11639             Parameters:
11640                 theShape Shape to check.
11641                 theDeflection Linear deflection coefficient that specifies quality of tessellation:
11642                     - if theDeflection <= 0, default deflection 0.001 is used
11643                 theTolerance Specifies a distance between shapes used for detecting gaps:
11644                     - if theTolerance <= 0, algorithm detects intersections (default behavior)
11645                     - if theTolerance > 0, algorithm detects gaps
11646  
11647             Returns:
11648                 TRUE, if the shape contains no self-intersections.
11649             """
11650             # Example: see GEOM_TestMeasures.py
11651             (IsValid, Pairs) = self.MeasuOp.CheckSelfIntersectionsFast(theShape, theDeflection, theTolerance)
11652             RaiseIfFailed("CheckSelfIntersectionsFast", self.MeasuOp)
11653             return IsValid
11654
11655         ## Check boolean and partition operations arguments.
11656         #  @param theShape the argument of an operation to be checked
11657         #  @return TRUE if the argument is valid for a boolean or partition
11658         #          operation; FALSE otherwise.
11659         @ManageTransactions("MeasuOp")
11660         def CheckBOPArguments(self, theShape):
11661             """
11662             Check boolean and partition operations arguments.
11663
11664             Parameters:
11665                 theShape the argument of an operation to be checked
11666
11667             Returns:
11668                 TRUE if the argument is valid for a boolean or partition
11669                 operation; FALSE otherwise.
11670             """
11671             return self.MeasuOp.CheckBOPArguments(theShape)
11672
11673         ## Detect intersections of the given shapes with algorithm based on mesh intersections.
11674         #  @param theShape1 First source object
11675         #  @param theShape2 Second source object
11676         #  @param theTolerance Specifies a distance between shapes used for detecting gaps:
11677         #         - if \a theTolerance <= 0, algorithm detects intersections (default behavior)
11678         #         - if \a theTolerance > 0, algorithm detects gaps
11679         #  @param theDeflection Linear deflection coefficient that specifies quality of tessellation:
11680         #         - if \a theDeflection <= 0, default deflection 0.001 is used
11681         #  @return TRUE, if there are intersections (gaps) between source shapes
11682         #  @return List of sub-shapes IDs from 1st shape that localize intersection.
11683         #  @return List of sub-shapes IDs from 2nd shape that localize intersection.
11684         #
11685         #  @ref tui_fast_intersection_page "Example"
11686         @ManageTransactions("MeasuOp")
11687         def FastIntersect(self, theShape1, theShape2, theTolerance = 0.0, theDeflection = 0.001):
11688             """
11689             Detect intersections of the given shapes with algorithm based on mesh intersections.
11690
11691             Parameters:
11692                 theShape1 First source object
11693                 theShape2 Second source object
11694                 theTolerance Specifies a distance between shapes used for detecting gaps:
11695                     - if theTolerance <= 0, algorithm detects intersections (default behavior)
11696                     - if theTolerance > 0, algorithm detects gaps
11697                 theDeflection Linear deflection coefficient that specifies quality of tessellation:
11698                     - if theDeflection <= 0, default deflection 0.001 is used
11699  
11700             Returns:
11701                 TRUE, if there are intersections (gaps) between source shapes
11702                 List of sub-shapes IDs from 1st shape that localize intersection.
11703                 List of sub-shapes IDs from 2nd shape that localize intersection.
11704             """
11705             # Example: see GEOM_TestMeasures.py
11706             IsOk, Res1, Res2 = self.MeasuOp.FastIntersect(theShape1, theShape2, theTolerance, theDeflection)
11707             RaiseIfFailed("FastIntersect", self.MeasuOp)
11708             return IsOk, Res1, Res2
11709
11710         ## Get position (LCS) of theShape.
11711         #
11712         #  Origin of the LCS is situated at the shape's center of mass.
11713         #  Axes of the LCS are obtained from shape's location or,
11714         #  if the shape is a planar face, from position of its plane.
11715         #
11716         #  @param theShape Shape to calculate position of.
11717         #  @return [Ox,Oy,Oz, Zx,Zy,Zz, Xx,Xy,Xz].
11718         #          Ox,Oy,Oz: Coordinates of shape's LCS origin.
11719         #          Zx,Zy,Zz: Coordinates of shape's LCS normal(main) direction.
11720         #          Xx,Xy,Xz: Coordinates of shape's LCS X direction.
11721         #
11722         #  @ref swig_todo "Example"
11723         @ManageTransactions("MeasuOp")
11724         def GetPosition(self,theShape):
11725             """
11726             Get position (LCS) of theShape.
11727             Origin of the LCS is situated at the shape's center of mass.
11728             Axes of the LCS are obtained from shape's location or,
11729             if the shape is a planar face, from position of its plane.
11730
11731             Parameters:
11732                 theShape Shape to calculate position of.
11733
11734             Returns:
11735                 [Ox,Oy,Oz, Zx,Zy,Zz, Xx,Xy,Xz].
11736                  Ox,Oy,Oz: Coordinates of shape's LCS origin.
11737                  Zx,Zy,Zz: Coordinates of shape's LCS normal(main) direction.
11738                  Xx,Xy,Xz: Coordinates of shape's LCS X direction.
11739             """
11740             # Example: see GEOM_TestMeasures.py
11741             aTuple = self.MeasuOp.GetPosition(theShape)
11742             RaiseIfFailed("GetPosition", self.MeasuOp)
11743             return aTuple
11744
11745         ## Get kind of theShape.
11746         #
11747         #  @param theShape Shape to get a kind of.
11748         #  @return Returns a kind of shape in terms of <VAR>GEOM.GEOM_IKindOfShape.shape_kind</VAR> enumeration
11749         #          and a list of parameters, describing the shape.
11750         #  @note  Concrete meaning of each value, returned via \a theIntegers
11751         #         or \a theDoubles list depends on the kind() of the shape.
11752         #
11753         #  @ref swig_todo "Example"
11754         @ManageTransactions("MeasuOp")
11755         def KindOfShape(self,theShape):
11756             """
11757             Get kind of theShape.
11758
11759             Parameters:
11760                 theShape Shape to get a kind of.
11761
11762             Returns:
11763                 a kind of shape in terms of GEOM_IKindOfShape.shape_kind enumeration
11764                     and a list of parameters, describing the shape.
11765             Note:
11766                 Concrete meaning of each value, returned via theIntegers
11767                 or theDoubles list depends on the geompy.kind of the shape
11768             """
11769             # Example: see GEOM_TestMeasures.py
11770             aRoughTuple = self.MeasuOp.KindOfShape(theShape)
11771             RaiseIfFailed("KindOfShape", self.MeasuOp)
11772
11773             aKind  = aRoughTuple[0]
11774             anInts = aRoughTuple[1]
11775             aDbls  = aRoughTuple[2]
11776
11777             # Now there is no exception from this rule:
11778             aKindTuple = [aKind] + aDbls + anInts
11779
11780             # If they are we will regroup parameters for such kind of shape.
11781             # For example:
11782             #if aKind == kind.SOME_KIND:
11783             #    #  SOME_KIND     int int double int double double
11784             #    aKindTuple = [aKind, anInts[0], anInts[1], aDbls[0], anInts[2], aDbls[1], aDbls[2]]
11785
11786             return aKindTuple
11787
11788         ## The function takes a single face with holes and returns a list of faces,
11789         #  first of them is the original face without holes, and the other faces are placed
11790         #  on the same surface as the original face but bounded by each hole wire.
11791         #  If the original face has no holes, it will be returned as an output
11792         #  @param theShape Face to perform operation on.
11793         #
11794         #  @return GEOM.ListOfGO, list created faces, where first of them is the original face without holes
11795         @ManageTransactions("MeasuOp")
11796         def PatchFace(self, theShape):
11797             """
11798             The function takes a single face with holes and returns a list of faces,
11799             first of them is the original face without holes, and the other faces are placed
11800             on the same surface as the original face but bounded by each hole wire.
11801             If the original face has no holes, it will be returned as an output
11802
11803             Parameters:
11804                 theShape  Face to perform operation on.
11805
11806             Returns:
11807                 GEOM.ListOfGO, list created faces, where first of them is the original face without holes
11808
11809             Example of usage:
11810                 Circle_1 = geompy.MakeCircle(None, None, 190)
11811                 Circle_2 = geompy.MakeCircle(None, None, 100)
11812                 Face_1 = geompy.MakeFaceWires([Circle_1], 1)
11813                 Face_2 = geompy.MakeFaceWires([Circle_2], 1)
11814                 Cut_1 = geompy.MakeCutList(Face_1, [Face_2], True)
11815                 faces = geompy.PatchFace(Cut_1)
11816             """
11817             aList = self.MeasuOp.PatchFace(theShape)
11818             RaiseIfFailed("PatchFace", self.MeasuOp)
11819             return aList
11820
11821         ## Returns the string that describes if the shell is good for solid.
11822         #  This is a support method for MakeSolid.
11823         #
11824         #  @param theShell the shell to be checked.
11825         #  @return Returns a string that describes the shell validity for
11826         #          solid construction.
11827         @ManageTransactions("MeasuOp")
11828         def _IsGoodForSolid(self, theShell):
11829             """
11830             Returns the string that describes if the shell is good for solid.
11831             This is a support method for MakeSolid.
11832
11833             Parameter:
11834                 theShell the shell to be checked.
11835
11836             Returns:
11837                 Returns a string that describes the shell validity for
11838                 solid construction.
11839             """
11840             aDescr = self.MeasuOp.IsGoodForSolid(theShell)
11841             return aDescr
11842
11843         ## Obtain a canonical recognition interface.
11844         #  @return An instance of
11845         #          @ref canonicalrecognition.CanonicalRecognition "CanonicalRecognition" interface
11846         #
11847         #  @ref tui_3dsketcher_page "Example"
11848         def CanonicalRecognition (self):
11849             """
11850             Obtain a canonical recognition interface.
11851
11852             Example of usage:
11853                 cr = geompy.CanonicalRecognition()
11854                 cr.isLine(aLine, tolerance)
11855             """
11856             cr = CanonicalRecognition (self)
11857             return cr
11858
11859         # end of l2_measure
11860         ## @}
11861
11862         ## @addtogroup l2_import_export
11863         ## @{
11864
11865         ## Import a shape from the BREP, IGES, STEP or other file
11866         #  (depends on given format) with given name.
11867         #
11868         #  Note: this function is deprecated, it is kept for backward compatibility only
11869         #  Use Import<FormatName> instead, where <FormatName> is a name of desirable format to import.
11870         #
11871         #  @param theFileName The file, containing the shape.
11872         #  @param theFormatName Specify format for the file reading.
11873         #         Available formats can be obtained with InsertOp.ImportTranslators() method.
11874         #         If format 'IGES_SCALE' is used instead of 'IGES' or
11875         #            format 'STEP_SCALE' is used instead of 'STEP',
11876         #            length unit will be set to 'meter' and result model will be scaled.
11877         #  @param theName Object name; when specified, this parameter is used
11878         #         for result publication in the study. Otherwise, if automatic
11879         #         publication is switched on, default value is used for result name.
11880         #
11881         #  @return New GEOM.GEOM_Object, containing the imported shape.
11882         #          If material names are imported it returns the list of
11883         #          objects. The first one is the imported object followed by
11884         #          material groups.
11885         #  @note Auto publishing is allowed for the shape itself. Imported
11886         #        material groups are not automatically published.
11887         #
11888         #  @ref swig_Import_Export "Example"
11889         @ManageTransactions("InsertOp")
11890         def ImportFile(self, theFileName, theFormatName, theName=None):
11891             """
11892             Import a shape from the BREP, IGES, STEP or other file
11893             (depends on given format) with given name.
11894
11895             Note: this function is deprecated, it is kept for backward compatibility only
11896             Use Import<FormatName> instead, where <FormatName> is a name of desirable format to import.
11897
11898             Parameters: 
11899                 theFileName The file, containing the shape.
11900                 theFormatName Specify format for the file reading.
11901                     Available formats can be obtained with geompy.InsertOp.ImportTranslators() method.
11902                     If format 'IGES_SCALE' is used instead of 'IGES' or
11903                        format 'STEP_SCALE' is used instead of 'STEP',
11904                        length unit will be set to 'meter' and result model will be scaled.
11905                 theName Object name; when specified, this parameter is used
11906                         for result publication in the study. Otherwise, if automatic
11907                         publication is switched on, default value is used for result name.
11908
11909             Returns:
11910                 New GEOM.GEOM_Object, containing the imported shape.
11911                 If material names are imported it returns the list of
11912                 objects. The first one is the imported object followed by
11913                 material groups.
11914             Note:
11915                 Auto publishing is allowed for the shape itself. Imported
11916                 material groups are not automatically published.
11917             """
11918             # Example: see GEOM_TestOthers.py
11919             print("""
11920             WARNING: Function ImportFile is deprecated, use Import<FormatName> instead,
11921             where <FormatName> is a name of desirable format for importing.
11922             """)
11923             aListObj = self.InsertOp.ImportFile(theFileName, theFormatName)
11924             RaiseIfFailed("ImportFile", self.InsertOp)
11925             aNbObj = len(aListObj)
11926             if aNbObj > 0:
11927                 self._autoPublish(aListObj[0], theName, "imported")
11928             if aNbObj == 1:
11929                 return aListObj[0]
11930             return aListObj
11931
11932         ## Deprecated analog of ImportFile()
11933         def Import(self, theFileName, theFormatName, theName=None):
11934             """
11935             Deprecated analog of geompy.ImportFile, kept for backward compatibility only.
11936             """
11937             # note: auto-publishing is done in self.ImportFile()
11938             return self.ImportFile(theFileName, theFormatName, theName)
11939
11940         ## Read a shape from the binary stream, containing its bounding representation (BRep).
11941         #
11942         #  @note As the byte-stream representing the shape data can be quite large, this method
11943         #  is not automatically dumped to the Python script with the DumpStudy functionality;
11944         #  so please use this method carefully, only for strong reasons.
11945         #  
11946         #  @note GEOM.GEOM_Object.GetShapeStream() method can be used to obtain the shape's
11947         #  data stream.
11948         #
11949         #  @param theStream The BRep binary stream.
11950         #  @param theName Object name; when specified, this parameter is used
11951         #         for result publication in the study. Otherwise, if automatic
11952         #         publication is switched on, default value is used for result name.
11953         #
11954         #  @return New GEOM_Object, containing the shape, read from theStream.
11955         #
11956         #  @ref swig_Import_Export "Example"
11957         @ManageTransactions("InsertOp")
11958         def RestoreShape (self, theStream, theName=None):
11959             """
11960             Read a shape from the binary stream, containing its bounding representation (BRep).
11961
11962             Note:
11963                 shape.GetShapeStream() method can be used to obtain the shape's BRep stream.
11964
11965             Parameters:
11966                 theStream The BRep binary stream.
11967                 theName Object name; when specified, this parameter is used
11968                         for result publication in the study. Otherwise, if automatic
11969                         publication is switched on, default value is used for result name.
11970
11971             Returns:
11972                 New GEOM_Object, containing the shape, read from theStream.
11973             """
11974             # Example: see GEOM_TestOthers.py
11975             if not theStream:
11976                 # this is the workaround to ignore invalid case when data stream is empty
11977                 if int(os.getenv("GEOM_IGNORE_RESTORE_SHAPE", "0")) > 0:
11978                     print("WARNING: Result of RestoreShape is a NULL shape!")
11979                     return None
11980             anObj = self.InsertOp.RestoreShape(theStream)
11981             RaiseIfFailed("RestoreShape", self.InsertOp)
11982             self._autoPublish(anObj, theName, "restored")
11983             return anObj
11984
11985         ## Export the given shape into a file with given name.
11986         #
11987         #  Note: this function is deprecated, it is kept for backward compatibility only
11988         #  Use Export<FormatName> instead, where <FormatName> is a name of desirable format to export.
11989         #
11990         #  @param theObject Shape to be stored in the file.
11991         #  @param theFileName Name of the file to store the given shape in.
11992         #  @param theFormatName Specify format for the shape storage.
11993         #         Available formats can be obtained with
11994         #         geompy.InsertOp.ExportTranslators()[0] method.
11995         #
11996         #  @ref swig_Import_Export "Example"
11997         @ManageTransactions("InsertOp")
11998         def Export(self, theObject, theFileName, theFormatName):
11999             """
12000             Export the given shape into a file with given name.
12001
12002             Note: this function is deprecated, it is kept for backward compatibility only
12003             Use Export<FormatName> instead, where <FormatName> is a name of desirable format to export.
12004             
12005             Parameters: 
12006                 theObject Shape to be stored in the file.
12007                 theFileName Name of the file to store the given shape in.
12008                 theFormatName Specify format for the shape storage.
12009                               Available formats can be obtained with
12010                               geompy.InsertOp.ExportTranslators()[0] method.
12011             """
12012             # Example: see GEOM_TestOthers.py
12013             print("""
12014             WARNING: Function Export is deprecated, use Export<FormatName> instead,
12015             where <FormatName> is a name of desirable format for exporting.
12016             """)
12017             self.InsertOp.Export(theObject, theFileName, theFormatName)
12018             if self.InsertOp.IsDone() == 0:
12019                 raise RuntimeError("Export : " + self.InsertOp.GetErrorCode())
12020                 pass
12021             pass
12022
12023         # end of l2_import_export
12024         ## @}
12025
12026         ## @addtogroup l3_blocks
12027         ## @{
12028
12029         ## Create a quadrangle face from four edges. Order of Edges is not
12030         #  important. It is not necessary that edges share the same vertex.
12031         #  @param E1,E2,E3,E4 Edges for the face bound.
12032         #  @param theName Object name; when specified, this parameter is used
12033         #         for result publication in the study. Otherwise, if automatic
12034         #         publication is switched on, default value is used for result name.
12035         #
12036         #  @return New GEOM.GEOM_Object, containing the created face.
12037         #
12038         #  @ref tui_building_by_blocks_page "Example"
12039         @ManageTransactions("BlocksOp")
12040         def MakeQuad(self, E1, E2, E3, E4, theName=None):
12041             """
12042             Create a quadrangle face from four edges. Order of Edges is not
12043             important. It is not necessary that edges share the same vertex.
12044
12045             Parameters:
12046                 E1,E2,E3,E4 Edges for the face bound.
12047                 theName Object name; when specified, this parameter is used
12048                         for result publication in the study. Otherwise, if automatic
12049                         publication is switched on, default value is used for result name.
12050
12051             Returns:
12052                 New GEOM.GEOM_Object, containing the created face.
12053
12054             Example of usage:
12055                 qface1 = geompy.MakeQuad(edge1, edge2, edge3, edge4)
12056             """
12057             # Example: see GEOM_Spanner.py
12058             anObj = self.BlocksOp.MakeQuad(E1, E2, E3, E4)
12059             RaiseIfFailed("MakeQuad", self.BlocksOp)
12060             self._autoPublish(anObj, theName, "quad")
12061             return anObj
12062
12063         ## Create a quadrangle face on two edges.
12064         #  The missing edges will be built by creating the shortest ones.
12065         #  @param E1,E2 Two opposite edges for the face.
12066         #  @param theName Object name; when specified, this parameter is used
12067         #         for result publication in the study. Otherwise, if automatic
12068         #         publication is switched on, default value is used for result name.
12069         #
12070         #  @return New GEOM.GEOM_Object, containing the created face.
12071         #
12072         #  @ref tui_building_by_blocks_page "Example"
12073         @ManageTransactions("BlocksOp")
12074         def MakeQuad2Edges(self, E1, E2, theName=None):
12075             """
12076             Create a quadrangle face on two edges.
12077             The missing edges will be built by creating the shortest ones.
12078
12079             Parameters:
12080                 E1,E2 Two opposite edges for the face.
12081                 theName Object name; when specified, this parameter is used
12082                         for result publication in the study. Otherwise, if automatic
12083                         publication is switched on, default value is used for result name.
12084
12085             Returns:
12086                 New GEOM.GEOM_Object, containing the created face.
12087
12088             Example of usage:
12089                 # create vertices
12090                 p1 = geompy.MakeVertex(  0.,   0.,   0.)
12091                 p2 = geompy.MakeVertex(150.,  30.,   0.)
12092                 p3 = geompy.MakeVertex(  0., 120.,  50.)
12093                 p4 = geompy.MakeVertex(  0.,  40.,  70.)
12094                 # create edges
12095                 edge1 = geompy.MakeEdge(p1, p2)
12096                 edge2 = geompy.MakeEdge(p3, p4)
12097                 # create a quadrangle face from two edges
12098                 qface2 = geompy.MakeQuad2Edges(edge1, edge2)
12099             """
12100             # Example: see GEOM_Spanner.py
12101             anObj = self.BlocksOp.MakeQuad2Edges(E1, E2)
12102             RaiseIfFailed("MakeQuad2Edges", self.BlocksOp)
12103             self._autoPublish(anObj, theName, "quad")
12104             return anObj
12105
12106         ## Create a quadrangle face with specified corners.
12107         #  The missing edges will be built by creating the shortest ones.
12108         #  @param V1,V2,V3,V4 Corner vertices for the face.
12109         #  @param theName Object name; when specified, this parameter is used
12110         #         for result publication in the study. Otherwise, if automatic
12111         #         publication is switched on, default value is used for result name.
12112         #
12113         #  @return New GEOM.GEOM_Object, containing the created face.
12114         #
12115         #  @ref tui_building_by_blocks_page "Example 1"
12116         #  \n @ref swig_MakeQuad4Vertices "Example 2"
12117         @ManageTransactions("BlocksOp")
12118         def MakeQuad4Vertices(self, V1, V2, V3, V4, theName=None):
12119             """
12120             Create a quadrangle face with specified corners.
12121             The missing edges will be built by creating the shortest ones.
12122
12123             Parameters:
12124                 V1,V2,V3,V4 Corner vertices for the face.
12125                 theName Object name; when specified, this parameter is used
12126                         for result publication in the study. Otherwise, if automatic
12127                         publication is switched on, default value is used for result name.
12128
12129             Returns:
12130                 New GEOM.GEOM_Object, containing the created face.
12131
12132             Example of usage:
12133                 # create vertices
12134                 p1 = geompy.MakeVertex(  0.,   0.,   0.)
12135                 p2 = geompy.MakeVertex(150.,  30.,   0.)
12136                 p3 = geompy.MakeVertex(  0., 120.,  50.)
12137                 p4 = geompy.MakeVertex(  0.,  40.,  70.)
12138                 # create a quadrangle from four points in its corners
12139                 qface3 = geompy.MakeQuad4Vertices(p1, p2, p3, p4)
12140             """
12141             # Example: see GEOM_Spanner.py
12142             anObj = self.BlocksOp.MakeQuad4Vertices(V1, V2, V3, V4)
12143             RaiseIfFailed("MakeQuad4Vertices", self.BlocksOp)
12144             self._autoPublish(anObj, theName, "quad")
12145             return anObj
12146
12147         ## Create a hexahedral solid, bounded by the six given faces. Order of
12148         #  faces is not important. It is not necessary that Faces share the same edge.
12149         #  @param F1,F2,F3,F4,F5,F6 Faces for the hexahedral solid.
12150         #  @param theName Object name; when specified, this parameter is used
12151         #         for result publication in the study. Otherwise, if automatic
12152         #         publication is switched on, default value is used for result name.
12153         #
12154         #  @return New GEOM.GEOM_Object, containing the created solid.
12155         #
12156         #  @ref tui_building_by_blocks_page "Example 1"
12157         #  \n @ref swig_MakeHexa "Example 2"
12158         @ManageTransactions("BlocksOp")
12159         def MakeHexa(self, F1, F2, F3, F4, F5, F6, theName=None):
12160             """
12161             Create a hexahedral solid, bounded by the six given faces. Order of
12162             faces is not important. It is not necessary that Faces share the same edge.
12163
12164             Parameters:
12165                 F1,F2,F3,F4,F5,F6 Faces for the hexahedral solid.
12166                 theName Object name; when specified, this parameter is used
12167                         for result publication in the study. Otherwise, if automatic
12168                         publication is switched on, default value is used for result name.
12169
12170             Returns:
12171                 New GEOM.GEOM_Object, containing the created solid.
12172
12173             Example of usage:
12174                 solid = geompy.MakeHexa(qface1, qface2, qface3, qface4, qface5, qface6)
12175             """
12176             # Example: see GEOM_Spanner.py
12177             anObj = self.BlocksOp.MakeHexa(F1, F2, F3, F4, F5, F6)
12178             RaiseIfFailed("MakeHexa", self.BlocksOp)
12179             self._autoPublish(anObj, theName, "hexa")
12180             return anObj
12181
12182         ## Create a hexahedral solid between two given faces.
12183         #  The missing faces will be built by creating the smallest ones.
12184         #  @param F1,F2 Two opposite faces for the hexahedral solid.
12185         #  @param theName Object name; when specified, this parameter is used
12186         #         for result publication in the study. Otherwise, if automatic
12187         #         publication is switched on, default value is used for result name.
12188         #
12189         #  @return New GEOM.GEOM_Object, containing the created solid.
12190         #
12191         #  @ref tui_building_by_blocks_page "Example 1"
12192         #  \n @ref swig_MakeHexa2Faces "Example 2"
12193         @ManageTransactions("BlocksOp")
12194         def MakeHexa2Faces(self, F1, F2, theName=None):
12195             """
12196             Create a hexahedral solid between two given faces.
12197             The missing faces will be built by creating the smallest ones.
12198
12199             Parameters:
12200                 F1,F2 Two opposite faces for the hexahedral solid.
12201                 theName Object name; when specified, this parameter is used
12202                         for result publication in the study. Otherwise, if automatic
12203                         publication is switched on, default value is used for result name.
12204
12205             Returns:
12206                 New GEOM.GEOM_Object, containing the created solid.
12207
12208             Example of usage:
12209                 solid1 = geompy.MakeHexa2Faces(qface1, qface2)
12210             """
12211             # Example: see GEOM_Spanner.py
12212             anObj = self.BlocksOp.MakeHexa2Faces(F1, F2)
12213             RaiseIfFailed("MakeHexa2Faces", self.BlocksOp)
12214             self._autoPublish(anObj, theName, "hexa")
12215             return anObj
12216
12217         # end of l3_blocks
12218         ## @}
12219
12220         ## @addtogroup l3_blocks_op
12221         ## @{
12222
12223         ## Get a vertex, found in the given shape by its coordinates.
12224         #  @param theShape Block or a compound of blocks.
12225         #  @param theX,theY,theZ Coordinates of the sought vertex.
12226         #  @param theEpsilon Maximum allowed distance between the resulting
12227         #                    vertex and point with the given coordinates.
12228         #  @param theName Object name; when specified, this parameter is used
12229         #         for result publication in the study. Otherwise, if automatic
12230         #         publication is switched on, default value is used for result name.
12231         #
12232         #  @return New GEOM.GEOM_Object, containing the found vertex.
12233         #
12234         #  @ref swig_GetPoint "Example"
12235         @ManageTransactions("BlocksOp")
12236         def GetPoint(self, theShape, theX, theY, theZ, theEpsilon, theName=None):
12237             """
12238             Get a vertex, found in the given shape by its coordinates.
12239
12240             Parameters:
12241                 theShape Block or a compound of blocks.
12242                 theX,theY,theZ Coordinates of the sought vertex.
12243                 theEpsilon Maximum allowed distance between the resulting
12244                            vertex and point with the given coordinates.
12245                 theName Object name; when specified, this parameter is used
12246                         for result publication in the study. Otherwise, if automatic
12247                         publication is switched on, default value is used for result name.
12248
12249             Returns:
12250                 New GEOM.GEOM_Object, containing the found vertex.
12251
12252             Example of usage:
12253                 pnt = geompy.GetPoint(shape, -50,  50,  50, 0.01)
12254             """
12255             # Example: see GEOM_TestOthers.py
12256             anObj = self.BlocksOp.GetPoint(theShape, theX, theY, theZ, theEpsilon)
12257             RaiseIfFailed("GetPoint", self.BlocksOp)
12258             self._autoPublish(anObj, theName, "vertex")
12259             return anObj
12260
12261         ## Find a vertex of the given shape, which has minimal distance to the given point.
12262         #  @param theShape Any shape.
12263         #  @param thePoint Point, close to the desired vertex.
12264         #  @param theName Object name; when specified, this parameter is used
12265         #         for result publication in the study. Otherwise, if automatic
12266         #         publication is switched on, default value is used for result name.
12267         #
12268         #  @return New GEOM.GEOM_Object, containing the found vertex.
12269         #
12270         #  @ref swig_GetVertexNearPoint "Example"
12271         @ManageTransactions("BlocksOp")
12272         def GetVertexNearPoint(self, theShape, thePoint, theName=None):
12273             """
12274             Find a vertex of the given shape, which has minimal distance to the given point.
12275
12276             Parameters:
12277                 theShape Any shape.
12278                 thePoint Point, close to the desired vertex.
12279                 theName Object name; when specified, this parameter is used
12280                         for result publication in the study. Otherwise, if automatic
12281                         publication is switched on, default value is used for result name.
12282
12283             Returns:
12284                 New GEOM.GEOM_Object, containing the found vertex.
12285
12286             Example of usage:
12287                 pmidle = geompy.MakeVertex(50, 0, 50)
12288                 edge1 = geompy.GetEdgeNearPoint(blocksComp, pmidle)
12289             """
12290             # Example: see GEOM_TestOthers.py
12291             anObj = self.BlocksOp.GetVertexNearPoint(theShape, thePoint)
12292             RaiseIfFailed("GetVertexNearPoint", self.BlocksOp)
12293             self._autoPublish(anObj, theName, "vertex")
12294             return anObj
12295
12296         ## Get an edge, found in the given shape by two given vertices.
12297         #  @param theShape Block or a compound of blocks.
12298         #  @param thePoint1,thePoint2 Points, close to the ends of the desired edge.
12299         #  @param theName Object name; when specified, this parameter is used
12300         #         for result publication in the study. Otherwise, if automatic
12301         #         publication is switched on, default value is used for result name.
12302         #
12303         #  @return New GEOM.GEOM_Object, containing the found edge.
12304         #
12305         #  @ref swig_GetEdge "Example"
12306         @ManageTransactions("BlocksOp")
12307         def GetEdge(self, theShape, thePoint1, thePoint2, theName=None):
12308             """
12309             Get an edge, found in the given shape by two given vertices.
12310
12311             Parameters:
12312                 theShape Block or a compound of blocks.
12313                 thePoint1,thePoint2 Points, close to the ends of the desired edge.
12314                 theName Object name; when specified, this parameter is used
12315                         for result publication in the study. Otherwise, if automatic
12316                         publication is switched on, default value is used for result name.
12317
12318             Returns:
12319                 New GEOM.GEOM_Object, containing the found edge.
12320             """
12321             # Example: see GEOM_Spanner.py
12322             anObj = self.BlocksOp.GetEdge(theShape, thePoint1, thePoint2)
12323             RaiseIfFailed("GetEdge", self.BlocksOp)
12324             self._autoPublish(anObj, theName, "edge")
12325             return anObj
12326
12327         ## Find an edge of the given shape, which has minimal distance to the given point.
12328         #  @param theShape Block or a compound of blocks.
12329         #  @param thePoint Point, close to the desired edge.
12330         #  @param theName Object name; when specified, this parameter is used
12331         #         for result publication in the study. Otherwise, if automatic
12332         #         publication is switched on, default value is used for result name.
12333         #
12334         #  @return New GEOM.GEOM_Object, containing the found edge.
12335         #
12336         #  @ref swig_GetEdgeNearPoint "Example"
12337         @ManageTransactions("BlocksOp")
12338         def GetEdgeNearPoint(self, theShape, thePoint, theName=None):
12339             """
12340             Find an edge of the given shape, which has minimal distance to the given point.
12341
12342             Parameters:
12343                 theShape Block or a compound of blocks.
12344                 thePoint Point, close to the desired edge.
12345                 theName Object name; when specified, this parameter is used
12346                         for result publication in the study. Otherwise, if automatic
12347                         publication is switched on, default value is used for result name.
12348
12349             Returns:
12350                 New GEOM.GEOM_Object, containing the found edge.
12351             """
12352             # Example: see GEOM_TestOthers.py
12353             anObj = self.BlocksOp.GetEdgeNearPoint(theShape, thePoint)
12354             RaiseIfFailed("GetEdgeNearPoint", self.BlocksOp)
12355             self._autoPublish(anObj, theName, "edge")
12356             return anObj
12357
12358         ## Returns a face, found in the given shape by four given corner vertices.
12359         #  @param theShape Block or a compound of blocks.
12360         #  @param thePoint1,thePoint2,thePoint3,thePoint4 Points, close to the corners of the desired face.
12361         #  @param theName Object name; when specified, this parameter is used
12362         #         for result publication in the study. Otherwise, if automatic
12363         #         publication is switched on, default value is used for result name.
12364         #
12365         #  @return New GEOM.GEOM_Object, containing the found face.
12366         #
12367         #  @ref swig_todo "Example"
12368         @ManageTransactions("BlocksOp")
12369         def GetFaceByPoints(self, theShape, thePoint1, thePoint2, thePoint3, thePoint4, theName=None):
12370             """
12371             Returns a face, found in the given shape by four given corner vertices.
12372
12373             Parameters:
12374                 theShape Block or a compound of blocks.
12375                 thePoint1,thePoint2,thePoint3,thePoint4 Points, close to the corners of the desired face.
12376                 theName Object name; when specified, this parameter is used
12377                         for result publication in the study. Otherwise, if automatic
12378                         publication is switched on, default value is used for result name.
12379
12380             Returns:
12381                 New GEOM.GEOM_Object, containing the found face.
12382             """
12383             # Example: see GEOM_Spanner.py
12384             anObj = self.BlocksOp.GetFaceByPoints(theShape, thePoint1, thePoint2, thePoint3, thePoint4)
12385             RaiseIfFailed("GetFaceByPoints", self.BlocksOp)
12386             self._autoPublish(anObj, theName, "face")
12387             return anObj
12388
12389         ## Get a face of block, found in the given shape by two given edges.
12390         #  @param theShape Block or a compound of blocks.
12391         #  @param theEdge1,theEdge2 Edges, close to the edges of the desired face.
12392         #  @param theName Object name; when specified, this parameter is used
12393         #         for result publication in the study. Otherwise, if automatic
12394         #         publication is switched on, default value is used for result name.
12395         #
12396         #  @return New GEOM.GEOM_Object, containing the found face.
12397         #
12398         #  @ref swig_todo "Example"
12399         @ManageTransactions("BlocksOp")
12400         def GetFaceByEdges(self, theShape, theEdge1, theEdge2, theName=None):
12401             """
12402             Get a face of block, found in the given shape by two given edges.
12403
12404             Parameters:
12405                 theShape Block or a compound of blocks.
12406                 theEdge1,theEdge2 Edges, close to the edges of the desired face.
12407                 theName Object name; when specified, this parameter is used
12408                         for result publication in the study. Otherwise, if automatic
12409                         publication is switched on, default value is used for result name.
12410
12411             Returns:
12412                 New GEOM.GEOM_Object, containing the found face.
12413             """
12414             # Example: see GEOM_Spanner.py
12415             anObj = self.BlocksOp.GetFaceByEdges(theShape, theEdge1, theEdge2)
12416             RaiseIfFailed("GetFaceByEdges", self.BlocksOp)
12417             self._autoPublish(anObj, theName, "face")
12418             return anObj
12419
12420         ## Find a face, opposite to the given one in the given block.
12421         #  @param theBlock Must be a hexahedral solid.
12422         #  @param theFace Face of \a theBlock, opposite to the desired face.
12423         #  @param theName Object name; when specified, this parameter is used
12424         #         for result publication in the study. Otherwise, if automatic
12425         #         publication is switched on, default value is used for result name.
12426         #
12427         #  @return New GEOM.GEOM_Object, containing the found face.
12428         #
12429         #  @ref swig_GetOppositeFace "Example"
12430         @ManageTransactions("BlocksOp")
12431         def GetOppositeFace(self, theBlock, theFace, theName=None):
12432             """
12433             Find a face, opposite to the given one in the given block.
12434
12435             Parameters:
12436                 theBlock Must be a hexahedral solid.
12437                 theFace Face of theBlock, opposite to the desired face.
12438                 theName Object name; when specified, this parameter is used
12439                         for result publication in the study. Otherwise, if automatic
12440                         publication is switched on, default value is used for result name.
12441
12442             Returns:
12443                 New GEOM.GEOM_Object, containing the found face.
12444             """
12445             # Example: see GEOM_Spanner.py
12446             anObj = self.BlocksOp.GetOppositeFace(theBlock, theFace)
12447             RaiseIfFailed("GetOppositeFace", self.BlocksOp)
12448             self._autoPublish(anObj, theName, "face")
12449             return anObj
12450
12451         ## Find a face of the given shape, which has minimal distance to the given point.
12452         #  @param theShape Block or a compound of blocks.
12453         #  @param thePoint Point, close to the desired face.
12454         #  @param theName Object name; when specified, this parameter is used
12455         #         for result publication in the study. Otherwise, if automatic
12456         #         publication is switched on, default value is used for result name.
12457         #
12458         #  @return New GEOM.GEOM_Object, containing the found face.
12459         #
12460         #  @ref swig_GetFaceNearPoint "Example"
12461         @ManageTransactions("BlocksOp")
12462         def GetFaceNearPoint(self, theShape, thePoint, theName=None):
12463             """
12464             Find a face of the given shape, which has minimal distance to the given point.
12465
12466             Parameters:
12467                 theShape Block or a compound of blocks.
12468                 thePoint Point, close to the desired face.
12469                 theName Object name; when specified, this parameter is used
12470                         for result publication in the study. Otherwise, if automatic
12471                         publication is switched on, default value is used for result name.
12472
12473             Returns:
12474                 New GEOM.GEOM_Object, containing the found face.
12475             """
12476             # Example: see GEOM_Spanner.py
12477             anObj = self.BlocksOp.GetFaceNearPoint(theShape, thePoint)
12478             RaiseIfFailed("GetFaceNearPoint", self.BlocksOp)
12479             self._autoPublish(anObj, theName, "face")
12480             return anObj
12481
12482         ## Find a face of block, whose outside normale has minimal angle with the given vector.
12483         #  @param theBlock Block or a compound of blocks.
12484         #  @param theVector Vector, close to the normale of the desired face.
12485         #  @param theName Object name; when specified, this parameter is used
12486         #         for result publication in the study. Otherwise, if automatic
12487         #         publication is switched on, default value is used for result name.
12488         #
12489         #  @return New GEOM.GEOM_Object, containing the found face.
12490         #
12491         #  @ref swig_todo "Example"
12492         @ManageTransactions("BlocksOp")
12493         def GetFaceByNormale(self, theBlock, theVector, theName=None):
12494             """
12495             Find a face of block, whose outside normale has minimal angle with the given vector.
12496
12497             Parameters:
12498                 theBlock Block or a compound of blocks.
12499                 theVector Vector, close to the normale of the desired face.
12500                 theName Object name; when specified, this parameter is used
12501                         for result publication in the study. Otherwise, if automatic
12502                         publication is switched on, default value is used for result name.
12503
12504             Returns:
12505                 New GEOM.GEOM_Object, containing the found face.
12506             """
12507             # Example: see GEOM_Spanner.py
12508             anObj = self.BlocksOp.GetFaceByNormale(theBlock, theVector)
12509             RaiseIfFailed("GetFaceByNormale", self.BlocksOp)
12510             self._autoPublish(anObj, theName, "face")
12511             return anObj
12512
12513         ## Find all sub-shapes of type \a theShapeType of the given shape,
12514         #  which have minimal distance to the given point.
12515         #  @param theShape Any shape.
12516         #  @param thePoint Point, close to the desired shape.
12517         #  @param theShapeType Defines what kind of sub-shapes is searched GEOM::shape_type
12518         #  @param theTolerance The tolerance for distances comparison. All shapes
12519         #                      with distances to the given point in interval
12520         #                      [minimal_distance, minimal_distance + theTolerance] will be gathered.
12521         #  @param theName Object name; when specified, this parameter is used
12522         #         for result publication in the study. Otherwise, if automatic
12523         #         publication is switched on, default value is used for result name.
12524         #
12525         #  @return New GEOM_Object, containing a group of all found shapes.
12526         #
12527         #  @ref swig_GetShapesNearPoint "Example"
12528         @ManageTransactions("BlocksOp")
12529         def GetShapesNearPoint(self, theShape, thePoint, theShapeType, theTolerance = 1e-07, theName=None):
12530             """
12531             Find all sub-shapes of type theShapeType of the given shape,
12532             which have minimal distance to the given point.
12533
12534             Parameters:
12535                 theShape Any shape.
12536                 thePoint Point, close to the desired shape.
12537                 theShapeType Defines what kind of sub-shapes is searched (see GEOM::shape_type)
12538                 theTolerance The tolerance for distances comparison. All shapes
12539                                 with distances to the given point in interval
12540                                 [minimal_distance, minimal_distance + theTolerance] will be gathered.
12541                 theName Object name; when specified, this parameter is used
12542                         for result publication in the study. Otherwise, if automatic
12543                         publication is switched on, default value is used for result name.
12544
12545             Returns:
12546                 New GEOM_Object, containing a group of all found shapes.
12547             """
12548             # Example: see GEOM_TestOthers.py
12549             anObj = self.BlocksOp.GetShapesNearPoint(theShape, thePoint, theShapeType, theTolerance)
12550             RaiseIfFailed("GetShapesNearPoint", self.BlocksOp)
12551             self._autoPublish(anObj, theName, "group")
12552             return anObj
12553
12554         # end of l3_blocks_op
12555         ## @}
12556
12557         ## @addtogroup l4_blocks_measure
12558         ## @{
12559
12560         ## Check, if the compound of blocks is given.
12561         #  To be considered as a compound of blocks, the
12562         #  given shape must satisfy the following conditions:
12563         #  - Each element of the compound should be a Block (6 faces).
12564         #  - Each face should be a quadrangle, i.e. it should have only 1 wire
12565         #       with 4 edges. If <VAR>theIsUseC1</VAR> is set to True and
12566         #       there are more than 4 edges in the only wire of a face,
12567         #       this face is considered to be quadrangle if it has 4 bounds
12568         #       (1 or more edge) of C1 continuity.
12569         #  - A connection between two Blocks should be an entire quadrangle face or an entire edge.
12570         #  - The compound should be connexe.
12571         #  - The glue between two quadrangle faces should be applied.
12572         #  @param theCompound The compound to check.
12573         #  @param theIsUseC1 Flag to check if there are 4 bounds on a face
12574         #         taking into account C1 continuity.
12575         #  @param theAngTolerance the angular tolerance to check if two neighbor
12576         #         edges are codirectional in the common vertex with this
12577         #         tolerance. This parameter is used only if
12578         #         <VAR>theIsUseC1</VAR> is set to True.
12579         #  @return TRUE, if the given shape is a compound of blocks.
12580         #  If theCompound is not valid, prints all discovered errors.
12581         #
12582         #  @ref tui_check_compound_of_blocks_page "Example 1"
12583         #  \n @ref swig_CheckCompoundOfBlocks "Example 2"
12584         @ManageTransactions("BlocksOp")
12585         def CheckCompoundOfBlocks(self,theCompound, theIsUseC1 = False,
12586                                   theAngTolerance = 1.e-12):
12587             """
12588             Check, if the compound of blocks is given.
12589             To be considered as a compound of blocks, the
12590             given shape must satisfy the following conditions:
12591             - Each element of the compound should be a Block (6 faces).
12592             - Each face should be a quadrangle, i.e. it should have only 1 wire
12593                  with 4 edges. If theIsUseC1 is set to True and
12594                  there are more than 4 edges in the only wire of a face,
12595                  this face is considered to be quadrangle if it has 4 bounds
12596                  (1 or more edge) of C1 continuity.
12597             - A connection between two Blocks should be an entire quadrangle face or an entire edge.
12598             - The compound should be connexe.
12599             - The glue between two quadrangle faces should be applied.
12600
12601             Parameters:
12602                 theCompound The compound to check.
12603                 theIsUseC1 Flag to check if there are 4 bounds on a face
12604                            taking into account C1 continuity.
12605                 theAngTolerance the angular tolerance to check if two neighbor
12606                            edges are codirectional in the common vertex with this
12607                            tolerance. This parameter is used only if
12608                            theIsUseC1 is set to True.
12609
12610             Returns:
12611                 TRUE, if the given shape is a compound of blocks.
12612                 If theCompound is not valid, prints all discovered errors.
12613             """
12614             # Example: see GEOM_Spanner.py
12615             aTolerance = -1.0
12616             if theIsUseC1:
12617                 aTolerance = theAngTolerance
12618             (IsValid, BCErrors) = self.BlocksOp.CheckCompoundOfBlocks(theCompound, aTolerance)
12619             RaiseIfFailed("CheckCompoundOfBlocks", self.BlocksOp)
12620             if IsValid == 0:
12621                 Descr = self.BlocksOp.PrintBCErrors(theCompound, BCErrors)
12622                 print(Descr)
12623             return IsValid
12624
12625         ## Retrieve all non blocks solids and faces from \a theShape.
12626         #  @param theShape The shape to explore.
12627         #  @param theIsUseC1 Flag to check if there are 4 bounds on a face
12628         #         taking into account C1 continuity.
12629         #  @param theAngTolerance the angular tolerance to check if two neighbor
12630         #         edges are codirectional in the common vertex with this
12631         #         tolerance. This parameter is used only if
12632         #         <VAR>theIsUseC1</VAR> is set to True.
12633         #  @param theName Object name; when specified, this parameter is used
12634         #         for result publication in the study. Otherwise, if automatic
12635         #         publication is switched on, default value is used for result name.
12636         #
12637         #  @return A tuple of two GEOM_Objects. The first object is a group of all
12638         #          non block solids (= not 6 faces, or with 6 faces, but with the
12639         #          presence of non-quadrangular faces). The second object is a
12640         #          group of all non quadrangular faces (= faces with more then
12641         #          1 wire or, if <VAR>theIsUseC1</VAR> is set to True, faces
12642         #          with 1 wire with not 4 edges that do not form 4 bounds of
12643         #          C1 continuity).
12644         #
12645         #  @ref tui_get_non_blocks_page "Example 1"
12646         #  \n @ref swig_GetNonBlocks "Example 2"
12647         @ManageTransactions("BlocksOp")
12648         def GetNonBlocks (self, theShape, theIsUseC1 = False,
12649                           theAngTolerance = 1.e-12, theName=None):
12650             """
12651             Retrieve all non blocks solids and faces from theShape.
12652
12653             Parameters:
12654                 theShape The shape to explore.
12655                 theIsUseC1 Flag to check if there are 4 bounds on a face
12656                            taking into account C1 continuity.
12657                 theAngTolerance the angular tolerance to check if two neighbor
12658                            edges are codirectional in the common vertex with this
12659                            tolerance. This parameter is used only if
12660                            theIsUseC1 is set to True.
12661                 theName Object name; when specified, this parameter is used
12662                         for result publication in the study. Otherwise, if automatic
12663                         publication is switched on, default value is used for result name.
12664
12665             Returns:
12666                 A tuple of two GEOM_Objects. The first object is a group of all
12667                 non block solids (= not 6 faces, or with 6 faces, but with the
12668                 presence of non-quadrangular faces). The second object is a
12669                 group of all non quadrangular faces (= faces with more then
12670                 1 wire or, if <VAR>theIsUseC1</VAR> is set to True, faces
12671                 with 1 wire with not 4 edges that do not form 4 bounds of
12672                 C1 continuity).
12673
12674             Usage:
12675                 (res_sols, res_faces) = geompy.GetNonBlocks(myShape1)
12676             """
12677             # Example: see GEOM_Spanner.py
12678             aTolerance = -1.0
12679             if theIsUseC1:
12680                 aTolerance = theAngTolerance
12681             aTuple = self.BlocksOp.GetNonBlocks(theShape, aTolerance)
12682             RaiseIfFailed("GetNonBlocks", self.BlocksOp)
12683             self._autoPublish(aTuple, theName, ("groupNonHexas", "groupNonQuads"))
12684             return aTuple
12685
12686         ## Remove all seam and degenerated edges from \a theShape.
12687         #  Unite faces and edges, sharing one surface. It means that
12688         #  this faces must have references to one C++ surface object (handle).
12689         #  @param theShape The compound or single solid to remove irregular edges from.
12690         #  @param doUnionFaces If True, then unite faces. If False (the default value),
12691         #         do not unite faces.
12692         #  @param theName Object name; when specified, this parameter is used
12693         #         for result publication in the study. Otherwise, if automatic
12694         #         publication is switched on, default value is used for result name.
12695         #
12696         #  @return Improved shape.
12697         #
12698         #  @ref swig_RemoveExtraEdges "Example"
12699         @ManageTransactions("BlocksOp")
12700         def RemoveExtraEdges(self, theShape, doUnionFaces=False, theName=None):
12701             """
12702             Remove all seam and degenerated edges from theShape.
12703             Unite faces and edges, sharing one surface. It means that
12704             this faces must have references to one C++ surface object (handle).
12705
12706             Parameters:
12707                 theShape The compound or single solid to remove irregular edges from.
12708                 doUnionFaces If True, then unite faces. If False (the default value),
12709                              do not unite faces.
12710                 theName Object name; when specified, this parameter is used
12711                         for result publication in the study. Otherwise, if automatic
12712                         publication is switched on, default value is used for result name.
12713
12714             Returns:
12715                 Improved shape.
12716             """
12717             # Example: see GEOM_TestOthers.py
12718             nbFacesOptimum = -1 # -1 means do not unite faces
12719             if doUnionFaces is True: nbFacesOptimum = 0 # 0 means unite faces
12720             anObj = self.BlocksOp.RemoveExtraEdges(theShape, nbFacesOptimum)
12721             RaiseIfFailed("RemoveExtraEdges", self.BlocksOp)
12722             self._autoPublish(anObj, theName, "removeExtraEdges")
12723             return anObj
12724
12725         ## Performs union faces of \a theShape
12726         #  Unite faces sharing one surface. It means that
12727         #  these faces must have references to one C++ surface object (handle).
12728         #  @param theShape The compound or single solid that contains faces
12729         #         to perform union.
12730         #  @param theName Object name; when specified, this parameter is used
12731         #         for result publication in the study. Otherwise, if automatic
12732         #         publication is switched on, default value is used for result name.
12733         #
12734         #  @return Improved shape.
12735         #
12736         #  @ref swig_UnionFaces "Example"
12737         @ManageTransactions("BlocksOp")
12738         def UnionFaces(self, theShape, theName=None):
12739             """
12740             Performs union faces of theShape.
12741             Unite faces sharing one surface. It means that
12742             these faces must have references to one C++ surface object (handle).
12743
12744             Parameters:
12745                 theShape The compound or single solid that contains faces
12746                          to perform union.
12747                 theName Object name; when specified, this parameter is used
12748                         for result publication in the study. Otherwise, if automatic
12749                         publication is switched on, default value is used for result name.
12750
12751             Returns:
12752                 Improved shape.
12753             """
12754             # Example: see GEOM_TestOthers.py
12755             anObj = self.BlocksOp.UnionFaces(theShape)
12756             RaiseIfFailed("UnionFaces", self.BlocksOp)
12757             self._autoPublish(anObj, theName, "unionFaces")
12758             return anObj
12759
12760         ## Check, if the given shape is a blocks compound.
12761         #  Fix all detected errors.
12762         #    \note Single block can be also fixed by this method.
12763         #  @param theShape The compound to check and improve.
12764         #  @param theName Object name; when specified, this parameter is used
12765         #         for result publication in the study. Otherwise, if automatic
12766         #         publication is switched on, default value is used for result name.
12767         #
12768         #  @return Improved compound.
12769         #
12770         #  @ref swig_CheckAndImprove "Example"
12771         @ManageTransactions("BlocksOp")
12772         def CheckAndImprove(self, theShape, theName=None):
12773             """
12774             Check, if the given shape is a blocks compound.
12775             Fix all detected errors.
12776
12777             Note:
12778                 Single block can be also fixed by this method.
12779
12780             Parameters:
12781                 theShape The compound to check and improve.
12782                 theName Object name; when specified, this parameter is used
12783                         for result publication in the study. Otherwise, if automatic
12784                         publication is switched on, default value is used for result name.
12785
12786             Returns:
12787                 Improved compound.
12788             """
12789             # Example: see GEOM_TestOthers.py
12790             anObj = self.BlocksOp.CheckAndImprove(theShape)
12791             RaiseIfFailed("CheckAndImprove", self.BlocksOp)
12792             self._autoPublish(anObj, theName, "improved")
12793             return anObj
12794
12795         # end of l4_blocks_measure
12796         ## @}
12797
12798         ## @addtogroup l3_blocks_op
12799         ## @{
12800
12801         ## Get all the blocks, contained in the given compound.
12802         #  @param theCompound The compound to explode.
12803         #  @param theMinNbFaces If solid has lower number of faces, it is not a block.
12804         #  @param theMaxNbFaces If solid has higher number of faces, it is not a block.
12805         #  @param theName Object name; when specified, this parameter is used
12806         #         for result publication in the study. Otherwise, if automatic
12807         #         publication is switched on, default value is used for result name.
12808         #
12809         #  @note If theMaxNbFaces = 0, the maximum number of faces is not restricted.
12810         #
12811         #  @return List of GEOM.GEOM_Object, containing the retrieved blocks.
12812         #
12813         #  @ref tui_explode_on_blocks "Example 1"
12814         #  \n @ref swig_MakeBlockExplode "Example 2"
12815         @ManageTransactions("BlocksOp")
12816         def MakeBlockExplode(self, theCompound, theMinNbFaces, theMaxNbFaces, theName=None):
12817             """
12818             Get all the blocks, contained in the given compound.
12819
12820             Parameters:
12821                 theCompound The compound to explode.
12822                 theMinNbFaces If solid has lower number of faces, it is not a block.
12823                 theMaxNbFaces If solid has higher number of faces, it is not a block.
12824                 theName Object name; when specified, this parameter is used
12825                         for result publication in the study. Otherwise, if automatic
12826                         publication is switched on, default value is used for result name.
12827
12828             Note:
12829                 If theMaxNbFaces = 0, the maximum number of faces is not restricted.
12830
12831             Returns:
12832                 List of GEOM.GEOM_Object, containing the retrieved blocks.
12833             """
12834             # Example: see GEOM_TestOthers.py
12835             theMinNbFaces,theMaxNbFaces,Parameters = ParseParameters(theMinNbFaces,theMaxNbFaces)
12836             aList = self.BlocksOp.ExplodeCompoundOfBlocks(theCompound, theMinNbFaces, theMaxNbFaces)
12837             RaiseIfFailed("ExplodeCompoundOfBlocks", self.BlocksOp)
12838             for anObj in aList:
12839                 anObj.SetParameters(Parameters)
12840                 pass
12841             self._autoPublish(aList, theName, "block")
12842             return aList
12843
12844         ## Find block, containing the given point inside its volume or on boundary.
12845         #  @param theCompound Compound, to find block in.
12846         #  @param thePoint Point, close to the desired block. If the point lays on
12847         #         boundary between some blocks, we return block with nearest center.
12848         #  @param theName Object name; when specified, this parameter is used
12849         #         for result publication in the study. Otherwise, if automatic
12850         #         publication is switched on, default value is used for result name.
12851         #
12852         #  @return New GEOM.GEOM_Object, containing the found block.
12853         #
12854         #  @ref swig_todo "Example"
12855         @ManageTransactions("BlocksOp")
12856         def GetBlockNearPoint(self, theCompound, thePoint, theName=None):
12857             """
12858             Find block, containing the given point inside its volume or on boundary.
12859
12860             Parameters:
12861                 theCompound Compound, to find block in.
12862                 thePoint Point, close to the desired block. If the point lays on
12863                          boundary between some blocks, we return block with nearest center.
12864                 theName Object name; when specified, this parameter is used
12865                         for result publication in the study. Otherwise, if automatic
12866                         publication is switched on, default value is used for result name.
12867
12868             Returns:
12869                 New GEOM.GEOM_Object, containing the found block.
12870             """
12871             # Example: see GEOM_Spanner.py
12872             anObj = self.BlocksOp.GetBlockNearPoint(theCompound, thePoint)
12873             RaiseIfFailed("GetBlockNearPoint", self.BlocksOp)
12874             self._autoPublish(anObj, theName, "block")
12875             return anObj
12876
12877         ## Find block, containing all the elements, passed as the parts, or maximum quantity of them.
12878         #  @param theCompound Compound, to find block in.
12879         #  @param theParts List of faces and/or edges and/or vertices to be parts of the found block.
12880         #  @param theName Object name; when specified, this parameter is used
12881         #         for result publication in the study. Otherwise, if automatic
12882         #         publication is switched on, default value is used for result name.
12883         #
12884         #  @return New GEOM.GEOM_Object, containing the found block.
12885         #
12886         #  @ref swig_GetBlockByParts "Example"
12887         @ManageTransactions("BlocksOp")
12888         def GetBlockByParts(self, theCompound, theParts, theName=None):
12889             """
12890              Find block, containing all the elements, passed as the parts, or maximum quantity of them.
12891
12892              Parameters:
12893                 theCompound Compound, to find block in.
12894                 theParts List of faces and/or edges and/or vertices to be parts of the found block.
12895                 theName Object name; when specified, this parameter is used
12896                         for result publication in the study. Otherwise, if automatic
12897                         publication is switched on, default value is used for result name.
12898
12899             Returns:
12900                 New GEOM_Object, containing the found block.
12901             """
12902             # Example: see GEOM_TestOthers.py
12903             anObj = self.BlocksOp.GetBlockByParts(theCompound, theParts)
12904             RaiseIfFailed("GetBlockByParts", self.BlocksOp)
12905             self._autoPublish(anObj, theName, "block")
12906             return anObj
12907
12908         ## Return all blocks, containing all the elements, passed as the parts.
12909         #  @param theCompound Compound, to find blocks in.
12910         #  @param theParts List of faces and/or edges and/or vertices to be parts of the found blocks.
12911         #  @param theName Object name; when specified, this parameter is used
12912         #         for result publication in the study. Otherwise, if automatic
12913         #         publication is switched on, default value is used for result name.
12914         #
12915         #  @return List of GEOM.GEOM_Object, containing the found blocks.
12916         #
12917         #  @ref swig_todo "Example"
12918         @ManageTransactions("BlocksOp")
12919         def GetBlocksByParts(self, theCompound, theParts, theName=None):
12920             """
12921             Return all blocks, containing all the elements, passed as the parts.
12922
12923             Parameters:
12924                 theCompound Compound, to find blocks in.
12925                 theParts List of faces and/or edges and/or vertices to be parts of the found blocks.
12926                 theName Object name; when specified, this parameter is used
12927                         for result publication in the study. Otherwise, if automatic
12928                         publication is switched on, default value is used for result name.
12929
12930             Returns:
12931                 List of GEOM.GEOM_Object, containing the found blocks.
12932             """
12933             # Example: see GEOM_Spanner.py
12934             aList = self.BlocksOp.GetBlocksByParts(theCompound, theParts)
12935             RaiseIfFailed("GetBlocksByParts", self.BlocksOp)
12936             self._autoPublish(aList, theName, "block")
12937             return aList
12938
12939         ## Multi-transformate block and glue the result.
12940         #  Transformation is defined so, as to superpose direction faces.
12941         #  @param Block Hexahedral solid to be multi-transformed.
12942         #  @param DirFace1 ID of First direction face.
12943         #  @param DirFace2 ID of Second direction face.
12944         #  @param NbTimes Quantity of transformations to be done.
12945         #  @param theName Object name; when specified, this parameter is used
12946         #         for result publication in the study. Otherwise, if automatic
12947         #         publication is switched on, default value is used for result name.
12948         #
12949         #  @note Unique ID of sub-shape can be obtained, using method GetSubShapeID().
12950         #
12951         #  @return New GEOM.GEOM_Object, containing the result shape.
12952         #
12953         #  @ref tui_multi_transformation "Example"
12954         @ManageTransactions("BlocksOp")
12955         def MakeMultiTransformation1D(self, Block, DirFace1, DirFace2, NbTimes, theName=None):
12956             """
12957             Multi-transformate block and glue the result.
12958             Transformation is defined so, as to superpose direction faces.
12959
12960             Parameters:
12961                 Block Hexahedral solid to be multi-transformed.
12962                 DirFace1 ID of First direction face.
12963                 DirFace2 ID of Second direction face.
12964                 NbTimes Quantity of transformations to be done.
12965                 theName Object name; when specified, this parameter is used
12966                         for result publication in the study. Otherwise, if automatic
12967                         publication is switched on, default value is used for result name.
12968
12969             Note:
12970                 Unique ID of sub-shape can be obtained, using method GetSubShapeID().
12971
12972             Returns:
12973                 New GEOM.GEOM_Object, containing the result shape.
12974             """
12975             # Example: see GEOM_Spanner.py
12976             DirFace1,DirFace2,NbTimes,Parameters = ParseParameters(DirFace1,DirFace2,NbTimes)
12977             anObj = self.BlocksOp.MakeMultiTransformation1D(Block, DirFace1, DirFace2, NbTimes)
12978             RaiseIfFailed("MakeMultiTransformation1D", self.BlocksOp)
12979             anObj.SetParameters(Parameters)
12980             self._autoPublish(anObj, theName, "transformed")
12981             return anObj
12982
12983         ## Multi-transformate block and glue the result.
12984         #  @param Block Hexahedral solid to be multi-transformed.
12985         #  @param DirFace1U,DirFace2U IDs of Direction faces for the first transformation.
12986         #  @param DirFace1V,DirFace2V IDs of Direction faces for the second transformation.
12987         #  @param NbTimesU,NbTimesV Quantity of transformations to be done.
12988         #  @param 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         #  @return New GEOM.GEOM_Object, containing the result shape.
12993         #
12994         #  @ref tui_multi_transformation "Example"
12995         @ManageTransactions("BlocksOp")
12996         def MakeMultiTransformation2D(self, Block, DirFace1U, DirFace2U, NbTimesU,
12997                                       DirFace1V, DirFace2V, NbTimesV, theName=None):
12998             """
12999             Multi-transformate block and glue the result.
13000
13001             Parameters:
13002                 Block Hexahedral solid to be multi-transformed.
13003                 DirFace1U,DirFace2U IDs of Direction faces for the first transformation.
13004                 DirFace1V,DirFace2V IDs of Direction faces for the second transformation.
13005                 NbTimesU,NbTimesV Quantity of transformations to be done.
13006                 theName Object name; when specified, this parameter is used
13007                         for result publication in the study. Otherwise, if automatic
13008                         publication is switched on, default value is used for result name.
13009
13010             Returns:
13011                 New GEOM.GEOM_Object, containing the result shape.
13012             """
13013             # Example: see GEOM_Spanner.py
13014             DirFace1U,DirFace2U,NbTimesU,DirFace1V,DirFace2V,NbTimesV,Parameters = ParseParameters(
13015               DirFace1U,DirFace2U,NbTimesU,DirFace1V,DirFace2V,NbTimesV)
13016             anObj = self.BlocksOp.MakeMultiTransformation2D(Block, DirFace1U, DirFace2U, NbTimesU,
13017                                                             DirFace1V, DirFace2V, NbTimesV)
13018             RaiseIfFailed("MakeMultiTransformation2D", self.BlocksOp)
13019             anObj.SetParameters(Parameters)
13020             self._autoPublish(anObj, theName, "transformed")
13021             return anObj
13022
13023         ## Build all possible propagation groups.
13024         #  Propagation group is a set of all edges, opposite to one (main)
13025         #  edge of this group directly or through other opposite edges.
13026         #  Notion of Opposite Edge make sense only on quadrangle face.
13027         #  @param theShape Shape to build propagation groups on.
13028         #  @param theName Object name; when specified, this parameter is used
13029         #         for result publication in the study. Otherwise, if automatic
13030         #         publication is switched on, default value is used for result name.
13031         #
13032         #  @return List of GEOM.GEOM_Object, each of them is a propagation group.
13033         #
13034         #  @ref swig_Propagate "Example"
13035         @ManageTransactions("BlocksOp")
13036         def Propagate(self, theShape, theName=None):
13037             """
13038             Build all possible propagation groups.
13039             Propagation group is a set of all edges, opposite to one (main)
13040             edge of this group directly or through other opposite edges.
13041             Notion of Opposite Edge make sense only on quadrangle face.
13042
13043             Parameters:
13044                 theShape Shape to build propagation groups on.
13045                 theName Object name; when specified, this parameter is used
13046                         for result publication in the study. Otherwise, if automatic
13047                         publication is switched on, default value is used for result name.
13048
13049             Returns:
13050                 List of GEOM.GEOM_Object, each of them is a propagation group.
13051             """
13052             # Example: see GEOM_TestOthers.py
13053             listChains = self.BlocksOp.Propagate(theShape)
13054             RaiseIfFailed("Propagate", self.BlocksOp)
13055             self._autoPublish(listChains, theName, "propagate")
13056             return listChains
13057
13058         # end of l3_blocks_op
13059         ## @}
13060
13061         ## @addtogroup l3_groups
13062         ## @{
13063
13064         ## Creates a new group which will store sub-shapes of theMainShape
13065         #  @param theMainShape is a GEOM object on which the group is selected
13066         #  @param theShapeType defines a shape type of the group (see GEOM::shape_type)
13067         #  @param theName Object name; when specified, this parameter is used
13068         #         for result publication in the study. Otherwise, if automatic
13069         #         publication is switched on, default value is used for result name.
13070         #
13071         #  @return a newly created GEOM group (GEOM.GEOM_Object)
13072         #
13073         #  @ref tui_working_with_groups_page "Example 1"
13074         #  \n @ref swig_CreateGroup "Example 2"
13075         @ManageTransactions("GroupOp")
13076         def CreateGroup(self, theMainShape, theShapeType, theName=None):
13077             """
13078             Creates a new group which will store sub-shapes of theMainShape
13079
13080             Parameters:
13081                theMainShape is a GEOM object on which the group is selected
13082                theShapeType defines a shape type of the group:"COMPOUND", "COMPSOLID",
13083                             "SOLID", "SHELL", "FACE", "WIRE", "EDGE", "VERTEX", "SHAPE".
13084                 theName Object name; when specified, this parameter is used
13085                         for result publication in the study. Otherwise, if automatic
13086                         publication is switched on, default value is used for result name.
13087
13088             Returns:
13089                a newly created GEOM group
13090
13091             Example of usage:
13092                 group = geompy.CreateGroup(Box, geompy.ShapeType["FACE"])
13093
13094             """
13095             # Example: see GEOM_TestOthers.py
13096             anObj = self.GroupOp.CreateGroup(theMainShape, theShapeType)
13097             RaiseIfFailed("CreateGroup", self.GroupOp)
13098             self._autoPublish(anObj, theName, "group")
13099             return anObj
13100
13101         ## Adds a sub-object with ID theSubShapeId to the group
13102         #  @param theGroup is a GEOM group to which the new sub-shape is added
13103         #  @param theSubShapeID is a sub-shape ID in the main object.
13104         #  \note Use method GetSubShapeID() to get an unique ID of the sub-shape
13105         #
13106         #  @ref tui_working_with_groups_page "Example"
13107         @ManageTransactions("GroupOp")
13108         def AddObject(self,theGroup, theSubShapeID):
13109             """
13110             Adds a sub-object with ID theSubShapeId to the group
13111
13112             Parameters:
13113                 theGroup       is a GEOM group to which the new sub-shape is added
13114                 theSubShapeID  is a sub-shape ID in the main object.
13115
13116             Note:
13117                 Use method GetSubShapeID() to get an unique ID of the sub-shape
13118             """
13119             # Example: see GEOM_TestOthers.py
13120             self.GroupOp.AddObject(theGroup, theSubShapeID)
13121             if self.GroupOp.GetErrorCode() != "PAL_ELEMENT_ALREADY_PRESENT":
13122                 RaiseIfFailed("AddObject", self.GroupOp)
13123                 pass
13124             pass
13125
13126         ## Removes a sub-object with ID \a theSubShapeId from the group
13127         #  @param theGroup is a GEOM group from which the new sub-shape is removed
13128         #  @param theSubShapeID is a sub-shape ID in the main object.
13129         #  \note Use method GetSubShapeID() to get an unique ID of the sub-shape
13130         #
13131         #  @ref tui_working_with_groups_page "Example"
13132         @ManageTransactions("GroupOp")
13133         def RemoveObject(self,theGroup, theSubShapeID):
13134             """
13135             Removes a sub-object with ID theSubShapeId from the group
13136
13137             Parameters:
13138                 theGroup is a GEOM group from which the new sub-shape is removed
13139                 theSubShapeID is a sub-shape ID in the main object.
13140
13141             Note:
13142                 Use method GetSubShapeID() to get an unique ID of the sub-shape
13143             """
13144             # Example: see GEOM_TestOthers.py
13145             self.GroupOp.RemoveObject(theGroup, theSubShapeID)
13146             RaiseIfFailed("RemoveObject", self.GroupOp)
13147             pass
13148
13149         ## Adds to the group all the given shapes. No errors, if some shapes are already included.
13150         #  @param theGroup is a GEOM group to which the new sub-shapes are added.
13151         #  @param theSubShapes is a list of sub-shapes to be added.
13152         #
13153         #  @ref tui_working_with_groups_page "Example"
13154         @ManageTransactions("GroupOp")
13155         def UnionList (self,theGroup, theSubShapes):
13156             """
13157             Adds to the group all the given shapes. No errors, if some shapes are already included.
13158
13159             Parameters:
13160                 theGroup is a GEOM group to which the new sub-shapes are added.
13161                 theSubShapes is a list of sub-shapes to be added.
13162             """
13163             # Example: see GEOM_TestOthers.py
13164             self.GroupOp.UnionList(theGroup, theSubShapes)
13165             RaiseIfFailed("UnionList", self.GroupOp)
13166             pass
13167
13168         ## Adds to the group all the given shapes. No errors, if some shapes are already included.
13169         #  @param theGroup is a GEOM group to which the new sub-shapes are added.
13170         #  @param theSubShapes is a list of indices of sub-shapes to be added.
13171         #
13172         #  @ref swig_UnionIDs "Example"
13173         @ManageTransactions("GroupOp")
13174         def UnionIDs(self,theGroup, theSubShapes):
13175             """
13176             Adds to the group all the given shapes. No errors, if some shapes are already included.
13177
13178             Parameters:
13179                 theGroup is a GEOM group to which the new sub-shapes are added.
13180                 theSubShapes is a list of indices of sub-shapes to be added.
13181             """
13182             # Example: see GEOM_TestOthers.py
13183             self.GroupOp.UnionIDs(theGroup, theSubShapes)
13184             RaiseIfFailed("UnionIDs", self.GroupOp)
13185             pass
13186
13187         ## Removes from the group all the given shapes. No errors, if some shapes are not included.
13188         #  @param theGroup is a GEOM group from which the sub-shapes are removed.
13189         #  @param theSubShapes is a list of sub-shapes to be removed.
13190         #
13191         #  @ref tui_working_with_groups_page "Example"
13192         @ManageTransactions("GroupOp")
13193         def DifferenceList (self,theGroup, theSubShapes):
13194             """
13195             Removes from the group all the given shapes. No errors, if some shapes are not included.
13196
13197             Parameters:
13198                 theGroup is a GEOM group from which the sub-shapes are removed.
13199                 theSubShapes is a list of sub-shapes to be removed.
13200             """
13201             # Example: see GEOM_TestOthers.py
13202             self.GroupOp.DifferenceList(theGroup, theSubShapes)
13203             RaiseIfFailed("DifferenceList", self.GroupOp)
13204             pass
13205
13206         ## Removes from the group all the given shapes. No errors, if some shapes are not included.
13207         #  @param theGroup is a GEOM group from which the sub-shapes are removed.
13208         #  @param theSubShapes is a list of indices of sub-shapes to be removed.
13209         #
13210         #  @ref swig_DifferenceIDs "Example"
13211         @ManageTransactions("GroupOp")
13212         def DifferenceIDs(self,theGroup, theSubShapes):
13213             """
13214             Removes from the group all the given shapes. No errors, if some shapes are not included.
13215
13216             Parameters:
13217                 theGroup is a GEOM group from which the sub-shapes are removed.
13218                 theSubShapes is a list of indices of sub-shapes to be removed.
13219             """
13220             # Example: see GEOM_TestOthers.py
13221             self.GroupOp.DifferenceIDs(theGroup, theSubShapes)
13222             RaiseIfFailed("DifferenceIDs", self.GroupOp)
13223             pass
13224
13225         ## Union of two groups.
13226         #  New group is created. It will contain all entities
13227         #  which are present in groups theGroup1 and theGroup2.
13228         #  @param theGroup1, theGroup2 are the initial GEOM groups
13229         #                              to create the united group from.
13230         #  @param theName Object name; when specified, this parameter is used
13231         #         for result publication in the study. Otherwise, if automatic
13232         #         publication is switched on, default value is used for result name.
13233         #
13234         #  @return a newly created GEOM group.
13235         #
13236         #  @ref tui_union_groups_anchor "Example"
13237         @ManageTransactions("GroupOp")
13238         def UnionGroups (self, theGroup1, theGroup2, theName=None):
13239             """
13240             Union of two groups.
13241             New group is created. It will contain all entities
13242             which are present in groups theGroup1 and theGroup2.
13243
13244             Parameters:
13245                 theGroup1, theGroup2 are the initial GEOM groups
13246                                      to create the united group from.
13247                 theName Object name; when specified, this parameter is used
13248                         for result publication in the study. Otherwise, if automatic
13249                         publication is switched on, default value is used for result name.
13250
13251             Returns:
13252                 a newly created GEOM group.
13253             """
13254             # Example: see GEOM_TestOthers.py
13255             aGroup = self.GroupOp.UnionGroups(theGroup1, theGroup2)
13256             RaiseIfFailed("UnionGroups", self.GroupOp)
13257             self._autoPublish(aGroup, theName, "group")
13258             return aGroup
13259
13260         ## Intersection of two groups.
13261         #  New group is created. It will contain only those entities
13262         #  which are present in both groups theGroup1 and theGroup2.
13263         #  @param theGroup1, theGroup2 are the initial GEOM groups to get common part of.
13264         #  @param theName Object name; when specified, this parameter is used
13265         #         for result publication in the study. Otherwise, if automatic
13266         #         publication is switched on, default value is used for result name.
13267         #
13268         #  @return a newly created GEOM group.
13269         #
13270         #  @ref tui_intersect_groups_anchor "Example"
13271         @ManageTransactions("GroupOp")
13272         def IntersectGroups (self, theGroup1, theGroup2, theName=None):
13273             """
13274             Intersection of two groups.
13275             New group is created. It will contain only those entities
13276             which are present in both groups theGroup1 and theGroup2.
13277
13278             Parameters:
13279                 theGroup1, theGroup2 are the initial GEOM groups to get common part of.
13280                 theName Object name; when specified, this parameter is used
13281                         for result publication in the study. Otherwise, if automatic
13282                         publication is switched on, default value is used for result name.
13283
13284             Returns:
13285                 a newly created GEOM group.
13286             """
13287             # Example: see GEOM_TestOthers.py
13288             aGroup = self.GroupOp.IntersectGroups(theGroup1, theGroup2)
13289             RaiseIfFailed("IntersectGroups", self.GroupOp)
13290             self._autoPublish(aGroup, theName, "group")
13291             return aGroup
13292
13293         ## Cut of two groups.
13294         #  New group is created. It will contain entities which are
13295         #  present in group theGroup1 but are not present in group theGroup2.
13296         #  @param theGroup1 is a GEOM group to include elements of.
13297         #  @param theGroup2 is a GEOM group to exclude elements of.
13298         #  @param theName Object name; when specified, this parameter is used
13299         #         for result publication in the study. Otherwise, if automatic
13300         #         publication is switched on, default value is used for result name.
13301         #
13302         #  @return a newly created GEOM group.
13303         #
13304         #  @ref tui_cut_groups_anchor "Example"
13305         @ManageTransactions("GroupOp")
13306         def CutGroups (self, theGroup1, theGroup2, theName=None):
13307             """
13308             Cut of two groups.
13309             New group is created. It will contain entities which are
13310             present in group theGroup1 but are not present in group theGroup2.
13311
13312             Parameters:
13313                 theGroup1 is a GEOM group to include elements of.
13314                 theGroup2 is a GEOM group to exclude elements of.
13315                 theName Object name; when specified, this parameter is used
13316                         for result publication in the study. Otherwise, if automatic
13317                         publication is switched on, default value is used for result name.
13318
13319             Returns:
13320                 a newly created GEOM group.
13321             """
13322             # Example: see GEOM_TestOthers.py
13323             aGroup = self.GroupOp.CutGroups(theGroup1, theGroup2)
13324             RaiseIfFailed("CutGroups", self.GroupOp)
13325             self._autoPublish(aGroup, theName, "group")
13326             return aGroup
13327
13328         ## Union of list of groups.
13329         #  New group is created. It will contain all entities that are
13330         #  present in groups listed in theGList.
13331         #  @param theGList is a list of GEOM groups to create the united group from.
13332         #  @param theName Object name; when specified, this parameter is used
13333         #         for result publication in the study. Otherwise, if automatic
13334         #         publication is switched on, default value is used for result name.
13335         #
13336         #  @return a newly created GEOM group.
13337         #
13338         #  @ref tui_union_groups_anchor "Example"
13339         @ManageTransactions("GroupOp")
13340         def UnionListOfGroups (self, theGList, theName=None):
13341             """
13342             Union of list of groups.
13343             New group is created. It will contain all entities that are
13344             present in groups listed in theGList.
13345
13346             Parameters:
13347                 theGList is a list of GEOM groups to create the united group from.
13348                 theName Object name; when specified, this parameter is used
13349                         for result publication in the study. Otherwise, if automatic
13350                         publication is switched on, default value is used for result name.
13351
13352             Returns:
13353                 a newly created GEOM group.
13354             """
13355             # Example: see GEOM_TestOthers.py
13356             aGroup = self.GroupOp.UnionListOfGroups(theGList)
13357             RaiseIfFailed("UnionListOfGroups", self.GroupOp)
13358             self._autoPublish(aGroup, theName, "group")
13359             return aGroup
13360
13361         ## Cut of lists of groups.
13362         #  New group is created. It will contain only entities
13363         #  which are present in groups listed in theGList.
13364         #  @param theGList is a list of GEOM groups to include elements of.
13365         #  @param theName Object name; when specified, this parameter is used
13366         #         for result publication in the study. Otherwise, if automatic
13367         #         publication is switched on, default value is used for result name.
13368         #
13369         #  @return a newly created GEOM group.
13370         #
13371         #  @ref tui_intersect_groups_anchor "Example"
13372         @ManageTransactions("GroupOp")
13373         def IntersectListOfGroups (self, theGList, theName=None):
13374             """
13375             Cut of lists of groups.
13376             New group is created. It will contain only entities
13377             which are present in groups listed in theGList.
13378
13379             Parameters:
13380                 theGList is a list of GEOM groups to include elements of.
13381                 theName Object name; when specified, this parameter is used
13382                         for result publication in the study. Otherwise, if automatic
13383                         publication is switched on, default value is used for result name.
13384
13385             Returns:
13386                 a newly created GEOM group.
13387             """
13388             # Example: see GEOM_TestOthers.py
13389             aGroup = self.GroupOp.IntersectListOfGroups(theGList)
13390             RaiseIfFailed("IntersectListOfGroups", self.GroupOp)
13391             self._autoPublish(aGroup, theName, "group")
13392             return aGroup
13393
13394         ## Cut of lists of groups.
13395         #  New group is created. It will contain only entities
13396         #  which are present in groups listed in theGList1 but
13397         #  are not present in groups from theGList2.
13398         #  @param theGList1 is a list of GEOM groups to include elements of.
13399         #  @param theGList2 is a list of GEOM groups to exclude elements of.
13400         #  @param theName Object name; when specified, this parameter is used
13401         #         for result publication in the study. Otherwise, if automatic
13402         #         publication is switched on, default value is used for result name.
13403         #
13404         #  @return a newly created GEOM group.
13405         #
13406         #  @ref tui_cut_groups_anchor "Example"
13407         @ManageTransactions("GroupOp")
13408         def CutListOfGroups (self, theGList1, theGList2, theName=None):
13409             """
13410             Cut of lists of groups.
13411             New group is created. It will contain only entities
13412             which are present in groups listed in theGList1 but
13413             are not present in groups from theGList2.
13414
13415             Parameters:
13416                 theGList1 is a list of GEOM groups to include elements of.
13417                 theGList2 is a list of GEOM groups to exclude elements of.
13418                 theName Object name; when specified, this parameter is used
13419                         for result publication in the study. Otherwise, if automatic
13420                         publication is switched on, default value is used for result name.
13421
13422             Returns:
13423                 a newly created GEOM group.
13424             """
13425             # Example: see GEOM_TestOthers.py
13426             aGroup = self.GroupOp.CutListOfGroups(theGList1, theGList2)
13427             RaiseIfFailed("CutListOfGroups", self.GroupOp)
13428             self._autoPublish(aGroup, theName, "group")
13429             return aGroup
13430
13431         ## Returns a list of sub-objects ID stored in the group
13432         #  @param theGroup is a GEOM group for which a list of IDs is requested
13433         #
13434         #  @ref swig_GetObjectIDs "Example"
13435         @ManageTransactions("GroupOp")
13436         def GetObjectIDs(self,theGroup):
13437             """
13438             Returns a list of sub-objects ID stored in the group
13439
13440             Parameters:
13441                 theGroup is a GEOM group for which a list of IDs is requested
13442             """
13443             # Example: see GEOM_TestOthers.py
13444             ListIDs = self.GroupOp.GetObjects(theGroup)
13445             RaiseIfFailed("GetObjects", self.GroupOp)
13446             return ListIDs
13447
13448         ## Returns a type of sub-objects stored in the group
13449         #  @param theGroup is a GEOM group which type is returned.
13450         #
13451         #  @ref swig_GetType "Example"
13452         @ManageTransactions("GroupOp")
13453         def GetType(self,theGroup):
13454             """
13455             Returns a type of sub-objects stored in the group
13456
13457             Parameters:
13458                 theGroup is a GEOM group which type is returned.
13459             """
13460             # Example: see GEOM_TestOthers.py
13461             aType = self.GroupOp.GetType(theGroup)
13462             RaiseIfFailed("GetType", self.GroupOp)
13463             return aType
13464
13465         ## Convert a type of geom object from id to string value
13466         #  @param theId is a GEOM object type id.
13467         #  @return type of geom object (POINT, VECTOR, PLANE, LINE, TORUS, ... )
13468         #  @ref swig_GetType "Example"
13469         def ShapeIdToType(self, theId):
13470             """
13471             Convert a type of geom object from id to string value
13472
13473             Parameters:
13474                 theId is a GEOM object type id.
13475
13476             Returns:
13477                 type of geom object (POINT, VECTOR, PLANE, LINE, TORUS, ... )
13478             """
13479             if theId == 0:
13480                 return "COPY"
13481             if theId == 1:
13482                 return "IMPORT"
13483             if theId == 2:
13484                 return "POINT"
13485             if theId == 3:
13486                 return "VECTOR"
13487             if theId == 4:
13488                 return "PLANE"
13489             if theId == 5:
13490                 return "LINE"
13491             if theId == 6:
13492                 return "TORUS"
13493             if theId == 7:
13494                 return "BOX"
13495             if theId == 8:
13496                 return "CYLINDER"
13497             if theId == 9:
13498                 return "CONE"
13499             if theId == 10:
13500                 return "SPHERE"
13501             if theId == 11:
13502                 return "PRISM"
13503             if theId == 12:
13504                 return "REVOLUTION"
13505             if theId == 13:
13506                 return "BOOLEAN"
13507             if theId == 14:
13508                 return "PARTITION"
13509             if theId == 15:
13510                 return "POLYLINE"
13511             if theId == 16:
13512                 return "CIRCLE"
13513             if theId == 17:
13514                 return "SPLINE"
13515             if theId == 18:
13516                 return "ELLIPSE"
13517             if theId == 19:
13518                 return "CIRC_ARC"
13519             if theId == 20:
13520                 return "FILLET"
13521             if theId == 21:
13522                 return "CHAMFER"
13523             if theId == 22:
13524                 return "EDGE"
13525             if theId == 23:
13526                 return "WIRE"
13527             if theId == 24:
13528                 return "FACE"
13529             if theId == 25:
13530                 return "SHELL"
13531             if theId == 26:
13532                 return "SOLID"
13533             if theId == 27:
13534                 return "COMPOUND"
13535             if theId == 28:
13536                 return "SUBSHAPE"
13537             if theId == 29:
13538                 return "PIPE"
13539             if theId == 30:
13540                 return "ARCHIMEDE"
13541             if theId == 31:
13542                 return "FILLING"
13543             if theId == 32:
13544                 return "EXPLODE"
13545             if theId == 33:
13546                 return "GLUED"
13547             if theId == 34:
13548                 return "SKETCHER"
13549             if theId == 35:
13550                 return "CDG"
13551             if theId == 36:
13552                 return "FREE_BOUNDS"
13553             if theId == 37:
13554                 return "GROUP"
13555             if theId == 38:
13556                 return "BLOCK"
13557             if theId == 39:
13558                 return "MARKER"
13559             if theId == 40:
13560                 return "THRUSECTIONS"
13561             if theId == 41:
13562                 return "COMPOUNDFILTER"
13563             if theId == 42:
13564                 return "SHAPES_ON_SHAPE"
13565             if theId == 43:
13566                 return "ELLIPSE_ARC"
13567             if theId == 44:
13568                 return "3DSKETCHER"
13569             if theId == 45:
13570                 return "FILLET_2D"
13571             if theId == 46:
13572                 return "FILLET_1D"
13573             if theId == 201:
13574                 return "PIPETSHAPE"
13575             return "Shape Id not exist."
13576
13577         ## Returns a main shape associated with the group
13578         #  @param theGroup is a GEOM group for which a main shape object is requested
13579         #  @return a GEOM object which is a main shape for theGroup
13580         #
13581         #  @ref swig_GetMainShape "Example"
13582         @ManageTransactions("GroupOp")
13583         def GetMainShape(self,theGroup):
13584             """
13585             Returns a main shape associated with the group
13586
13587             Parameters:
13588                 theGroup is a GEOM group for which a main shape object is requested
13589
13590             Returns:
13591                 a GEOM object which is a main shape for theGroup
13592
13593             Example of usage: BoxCopy = geompy.GetMainShape(CreateGroup)
13594             """
13595             # Example: see GEOM_TestOthers.py
13596             anObj = self.GroupOp.GetMainShape(theGroup)
13597             RaiseIfFailed("GetMainShape", self.GroupOp)
13598             return anObj
13599
13600         ## Create group of edges of theShape, whose length is in range [min_length, max_length].
13601         #  If include_min/max == 0, edges with length == min/max_length will not be included in result.
13602         #  @param theShape given shape (see GEOM.GEOM_Object)
13603         #  @param min_length minimum length of edges of theShape
13604         #  @param max_length maximum length of edges of theShape
13605         #  @param include_max indicating if edges with length == max_length should be included in result, 1-yes, 0-no (default=1)
13606         #  @param include_min indicating if edges with length == min_length should be included in result, 1-yes, 0-no (default=1)
13607         #  @param theName Object name; when specified, this parameter is used
13608         #         for result publication in the study. Otherwise, if automatic
13609         #         publication is switched on, default value is used for result name.
13610         #
13611         #  @return a newly created GEOM group of edges
13612         #
13613         #  @@ref swig_todo "Example"
13614         def GetEdgesByLength (self, theShape, min_length, max_length, include_min = 1, include_max = 1, theName=None):
13615             """
13616             Create group of edges of theShape, whose length is in range [min_length, max_length].
13617             If include_min/max == 0, edges with length == min/max_length will not be included in result.
13618
13619             Parameters:
13620                 theShape given shape
13621                 min_length minimum length of edges of theShape
13622                 max_length maximum length of edges of theShape
13623                 include_max indicating if edges with length == max_length should be included in result, 1-yes, 0-no (default=1)
13624                 include_min indicating if edges with length == min_length should be included in result, 1-yes, 0-no (default=1)
13625                 theName Object name; when specified, this parameter is used
13626                         for result publication in the study. Otherwise, if automatic
13627                         publication is switched on, default value is used for result name.
13628
13629              Returns:
13630                 a newly created GEOM group of edges.
13631             """
13632             edges = self.SubShapeAll(theShape, self.ShapeType["EDGE"])
13633             edges_in_range = []
13634             for edge in edges:
13635                 Props = self.BasicProperties(edge)
13636                 if min_length <= Props[0] and Props[0] <= max_length:
13637                     if (not include_min) and (min_length == Props[0]):
13638                         skip = 1
13639                     else:
13640                         if (not include_max) and (Props[0] == max_length):
13641                             skip = 1
13642                         else:
13643                             edges_in_range.append(edge)
13644
13645             if len(edges_in_range) <= 0:
13646                 print("No edges found by given criteria")
13647                 return None
13648
13649             # note: auto-publishing is done in self.CreateGroup()
13650             group_edges = self.CreateGroup(theShape, self.ShapeType["EDGE"], theName)
13651             self.UnionList(group_edges, edges_in_range)
13652
13653             return group_edges
13654
13655         ## Create group of edges of selected shape, whose length is in range [min_length, max_length].
13656         #  If include_min/max == 0, edges with length == min/max_length will not be included in result.
13657         #  @param min_length minimum length of edges of selected shape
13658         #  @param max_length maximum length of edges of selected shape
13659         #  @param include_max indicating if edges with length == max_length should be included in result, 1-yes, 0-no (default=1)
13660         #  @param include_min indicating if edges with length == min_length should be included in result, 1-yes, 0-no (default=1)
13661         #  @return a newly created GEOM group of edges
13662         #  @ref swig_todo "Example"
13663         def SelectEdges (self, min_length, max_length, include_min = 1, include_max = 1):
13664             """
13665             Create group of edges of selected shape, whose length is in range [min_length, max_length].
13666             If include_min/max == 0, edges with length == min/max_length will not be included in result.
13667
13668             Parameters:
13669                 min_length minimum length of edges of selected shape
13670                 max_length maximum length of edges of selected shape
13671                 include_max indicating if edges with length == max_length should be included in result, 1-yes, 0-no (default=1)
13672                 include_min indicating if edges with length == min_length should be included in result, 1-yes, 0-no (default=1)
13673
13674              Returns:
13675                 a newly created GEOM group of edges.
13676             """
13677             nb_selected = sg.SelectedCount()
13678             if nb_selected < 1:
13679                 print("Select a shape before calling this function, please.")
13680                 return 0
13681             if nb_selected > 1:
13682                 print("Only one shape must be selected")
13683                 return 0
13684
13685             id_shape = sg.getSelected(0)
13686             shape = IDToObject( id_shape )
13687
13688             group_edges = self.GetEdgesByLength(shape, min_length, max_length, include_min, include_max)
13689
13690             left_str  = " < "
13691             right_str = " < "
13692             if include_min: left_str  = " <= "
13693             if include_max: right_str  = " <= "
13694
13695             self.addToStudyInFather(shape, group_edges, "Group of edges with " + repr(min_length)
13696                                     + left_str + "length" + right_str + repr(max_length))
13697
13698             sg.updateObjBrowser()
13699
13700             return group_edges
13701
13702         # end of l3_groups
13703         ## @}
13704
13705         #@@ insert new functions before this line @@ do not remove this line @@#
13706
13707         ## Create a copy of the given object
13708         #
13709         #  @param theOriginal geometry object for copy
13710         #  @param theName Object name; when specified, this parameter is used
13711         #         for result publication in the study. Otherwise, if automatic
13712         #         publication is switched on, default value is used for result name.
13713         #
13714         #  @return New GEOM_Object, containing the copied shape.
13715         #
13716         #  @ingroup l1_geomBuilder_auxiliary
13717         #  @ref swig_MakeCopy "Example"
13718         @ManageTransactions("InsertOp")
13719         def MakeCopy(self, theOriginal, theName=None):
13720             """
13721             Create a copy of the given object
13722
13723             Parameters:
13724                 theOriginal geometry object for copy
13725                 theName Object name; when specified, this parameter is used
13726                         for result publication in the study. Otherwise, if automatic
13727                         publication is switched on, default value is used for result name.
13728
13729             Returns:
13730                 New GEOM_Object, containing the copied shape.
13731
13732             Example of usage: Copy = geompy.MakeCopy(Box)
13733             """
13734             # Example: see GEOM_TestAll.py
13735             anObj = self.InsertOp.MakeCopy(theOriginal)
13736             RaiseIfFailed("MakeCopy", self.InsertOp)
13737             self._autoPublish(anObj, theName, "copy")
13738             return anObj
13739
13740         ## Add Path to load python scripts from
13741         #  @param Path a path to load python scripts from
13742         #  @ingroup l1_geomBuilder_auxiliary
13743         def addPath(self,Path):
13744             """
13745             Add Path to load python scripts from
13746
13747             Parameters:
13748                 Path a path to load python scripts from
13749             """
13750             if (sys.path.count(Path) < 1):
13751                 sys.path.append(Path)
13752                 pass
13753             pass
13754
13755         ## Load marker texture from the file
13756         #  @param Path a path to the texture file
13757         #  @return unique texture identifier
13758         #  @ingroup l1_geomBuilder_auxiliary
13759         @ManageTransactions("InsertOp")
13760         def LoadTexture(self, Path):
13761             """
13762             Load marker texture from the file
13763
13764             Parameters:
13765                 Path a path to the texture file
13766
13767             Returns:
13768                 unique texture identifier
13769             """
13770             # Example: see GEOM_TestAll.py
13771             ID = self.InsertOp.LoadTexture(Path)
13772             RaiseIfFailed("LoadTexture", self.InsertOp)
13773             return ID
13774
13775         ## Get internal name of the object based on its study entry
13776         #  @note This method does not provide an unique identifier of the geometry object.
13777         #  @note This is internal function of GEOM component, though it can be used outside it for
13778         #  appropriate reason (e.g. for identification of geometry object).
13779         #  @param obj geometry object
13780         #  @return unique object identifier
13781         #  @ingroup l1_geomBuilder_auxiliary
13782         def getObjectID(self, obj):
13783             """
13784             Get internal name of the object based on its study entry.
13785             Note: this method does not provide an unique identifier of the geometry object.
13786             It is an internal function of GEOM component, though it can be used outside GEOM for
13787             appropriate reason (e.g. for identification of geometry object).
13788
13789             Parameters:
13790                 obj geometry object
13791
13792             Returns:
13793                 unique object identifier
13794             """
13795             ID = ""
13796             entry = salome.ObjectToID(obj)
13797             if entry is not None:
13798                 lst = entry.split(":")
13799                 if len(lst) > 0:
13800                     ID = lst[-1] # -1 means last item in the list
13801                     return "GEOM_" + ID
13802             return ID
13803
13804
13805
13806         ## Add marker texture. @a Width and @a Height parameters
13807         #  specify width and height of the texture in pixels.
13808         #  If @a RowData is @c True, @a Texture parameter should represent texture data
13809         #  packed into the byte array. If @a RowData is @c False (default), @a Texture
13810         #  parameter should be unpacked string, in which '1' symbols represent opaque
13811         #  pixels and '0' represent transparent pixels of the texture bitmap.
13812         #
13813         #  @param Width texture width in pixels
13814         #  @param Height texture height in pixels
13815         #  @param Texture texture data
13816         #  @param RowData if @c True, @a Texture data are packed in the byte stream
13817         #  @return unique texture identifier
13818         #  @ingroup l1_geomBuilder_auxiliary
13819         @ManageTransactions("InsertOp")
13820         def AddTexture(self, Width, Height, Texture, RowData=False):
13821             """
13822             Add marker texture. Width and Height parameters
13823             specify width and height of the texture in pixels.
13824             If RowData is True, Texture parameter should represent texture data
13825             packed into the byte array. If RowData is False (default), Texture
13826             parameter should be unpacked string, in which '1' symbols represent opaque
13827             pixels and '0' represent transparent pixels of the texture bitmap.
13828
13829             Parameters:
13830                 Width texture width in pixels
13831                 Height texture height in pixels
13832                 Texture texture data
13833                 RowData if True, Texture data are packed in the byte stream
13834
13835             Returns:
13836                 return unique texture identifier
13837             """
13838             if not RowData: Texture = PackData(Texture)
13839             ID = self.InsertOp.AddTexture(Width, Height, Texture)
13840             RaiseIfFailed("AddTexture", self.InsertOp)
13841             return ID
13842
13843         ## Transfer not topological data from one GEOM object to another.
13844         #
13845         #  @param theObjectFrom the source object of non-topological data
13846         #  @param theObjectTo the destination object of non-topological data
13847         #  @param theFindMethod method to search sub-shapes of theObjectFrom
13848         #         in shape theObjectTo. Possible values are: GEOM.FSM_GetInPlace,
13849         #         GEOM.FSM_GetInPlaceByHistory and GEOM.FSM_GetInPlace_Old.
13850         #         Other values of GEOM.find_shape_method are not supported.
13851         #
13852         #  @return True in case of success; False otherwise.
13853         #
13854         #  @ingroup l1_geomBuilder_auxiliary
13855         #
13856         #  @ref swig_TransferData "Example"
13857         @ManageTransactions("InsertOp")
13858         def TransferData(self, theObjectFrom, theObjectTo,
13859                          theFindMethod=GEOM.FSM_GetInPlace):
13860             """
13861             Transfer not topological data from one GEOM object to another.
13862
13863             Parameters:
13864                 theObjectFrom the source object of non-topological data
13865                 theObjectTo the destination object of non-topological data
13866                 theFindMethod method to search sub-shapes of theObjectFrom
13867                               in shape theObjectTo. Possible values are:
13868                               GEOM.FSM_GetInPlace, GEOM.FSM_GetInPlaceByHistory
13869                               and GEOM.FSM_GetInPlace_Old. Other values of
13870                               GEOM.find_shape_method are not supported.
13871
13872             Returns:
13873                 True in case of success; False otherwise.
13874
13875             # Example: see GEOM_TestOthers.py
13876             """
13877             # Example: see GEOM_TestAll.py
13878             isOk = self.InsertOp.TransferData(theObjectFrom,
13879                                                theObjectTo, theFindMethod)
13880             RaiseIfFailed("TransferData", self.InsertOp)
13881             return isOk
13882
13883         ## Creates a new folder object. It is a container for any GEOM objects.
13884         #  @param Name name of the container
13885         #  @param Father parent object. If None,
13886         #         folder under 'Geometry' root object will be created.
13887         #  @return a new created folder
13888         #  @ingroup l1_publish_data
13889         def NewFolder(self, Name, Father=None):
13890             """
13891             Create a new folder object. It is an auxiliary container for any GEOM objects.
13892
13893             Parameters:
13894                 Name name of the container
13895                 Father parent object. If None,
13896                 folder under 'Geometry' root object will be created.
13897
13898             Returns:
13899                 a new created folder
13900             """
13901             return self.CreateFolder(Name, Father)
13902
13903         ## Move object to the specified folder
13904         #  @param Object object to move
13905         #  @param Folder target folder
13906         #  @ingroup l1_publish_data
13907         def PutToFolder(self, Object, Folder):
13908             """
13909             Move object to the specified folder
13910
13911             Parameters:
13912                 Object object to move
13913                 Folder target folder
13914             """
13915             self.MoveToFolder(Object, Folder)
13916             pass
13917
13918         ## Move list of objects to the specified folder
13919         #  @param ListOfSO list of objects to move
13920         #  @param Folder target folder
13921         #  @ingroup l1_publish_data
13922         def PutListToFolder(self, ListOfSO, Folder):
13923             """
13924             Move list of objects to the specified folder
13925
13926             Parameters:
13927                 ListOfSO list of objects to move
13928                 Folder target folder
13929             """
13930             self.MoveListToFolder(ListOfSO, Folder)
13931             pass
13932
13933         ## @addtogroup l2_field
13934         ## @{
13935
13936         ## Creates a field
13937         #  @param shape the shape the field lies on
13938         #  @param name the field name
13939         #  @param type type of field data: 0 - bool, 1 - int, 2 - double, 3 - string
13940         #  @param dimension dimension of the shape the field lies on
13941         #         0 - VERTEX, 1 - EDGE, 2 - FACE, 3 - SOLID, -1 - whole shape
13942         #  @param componentNames names of components
13943         #  @return a created field
13944         @ManageTransactions("FieldOp")
13945         def CreateField(self, shape, name, type, dimension, componentNames):
13946             """
13947             Creates a field
13948
13949             Parameters:
13950                 shape the shape the field lies on
13951                 name  the field name
13952                 type  type of field data
13953                 dimension dimension of the shape the field lies on
13954                           0 - VERTEX, 1 - EDGE, 2 - FACE, 3 - SOLID, -1 - whole shape
13955                 componentNames names of components
13956
13957             Returns:
13958                 a created field
13959             """
13960             if isinstance( type, int ):
13961                 if type < 0 or type > 3:
13962                     raise RuntimeError("CreateField : Error: data type must be within [0-3] range")
13963                 type = [GEOM.FDT_Bool,GEOM.FDT_Int,GEOM.FDT_Double,GEOM.FDT_String][type]
13964
13965             f = self.FieldOp.CreateField( shape, name, type, dimension, componentNames)
13966             RaiseIfFailed("CreateField", self.FieldOp)
13967             global geom
13968             geom._autoPublish( f, "", name)
13969             return f
13970
13971         ## Removes a field from the GEOM component
13972         #  @param field the field to remove
13973         def RemoveField(self, field):
13974             "Removes a field from the GEOM component"
13975             global geom
13976             if isinstance( field, GEOM._objref_GEOM_Field ):
13977                 geom.RemoveObject( field )
13978             elif isinstance( field, geomField ):
13979                 geom.RemoveObject( field.field )
13980             else:
13981                 raise RuntimeError("RemoveField() : the object is not a field")
13982             return
13983
13984         ## Returns number of fields on a shape
13985         @ManageTransactions("FieldOp")
13986         def CountFields(self, shape):
13987             "Returns number of fields on a shape"
13988             nb = self.FieldOp.CountFields( shape )
13989             RaiseIfFailed("CountFields", self.FieldOp)
13990             return nb
13991
13992         ## Returns all fields on a shape
13993         @ManageTransactions("FieldOp")
13994         def GetFields(self, shape):
13995             "Returns all fields on a shape"
13996             ff = self.FieldOp.GetFields( shape )
13997             RaiseIfFailed("GetFields", self.FieldOp)
13998             return ff
13999
14000         ## Returns a field on a shape by its name
14001         @ManageTransactions("FieldOp")
14002         def GetField(self, shape, name):
14003             "Returns a field on a shape by its name"
14004             f = self.FieldOp.GetField( shape, name )
14005             RaiseIfFailed("GetField", self.FieldOp)
14006             return f
14007
14008         # end of l2_field
14009         ## @}
14010
14011         ## @addtogroup l2_testing
14012         ## @{
14013
14014         ## Build a mesh on the given shape.
14015         # @param shape the source shape
14016         # @param linear_deflection linear deflection coefficient
14017         # @param is_relative says if given value of deflection is relative to shape's bounding box
14018         # @param angular_deflection angular deflection for edges in degrees
14019         # @return True in case of success; otherwise False.
14020         @ManageTransactions("TestOp")
14021         def Tesselate(self, shape, linear_deflection=0, is_relative=True, angular_deflection=0):
14022             """Build a mesh on the given shape.
14023
14024             Parameters:
14025                 shape the source shape
14026                 linear_deflection linear deflection coefficient
14027                 is_relative says if given value of deflection is relative to shape's bounding box
14028                 angular_deflection angular deflection for edges in degrees
14029
14030             Returns:
14031                 True in case of success; otherwise False.
14032             """
14033             if angular_deflection > 0:
14034                 angular_deflection = angular_deflection * math.pi / 180.
14035             r = self.TestOp.Tesselate(shape, linear_deflection, is_relative, angular_deflection)
14036             RaiseIfFailed("Tesselate", self.TestOp)
14037             return r
14038
14039         # end of l2_testing
14040         ## @}
14041
14042
14043 # Register the new proxy for GEOM_Gen
14044 omniORB.registerObjref(GEOM._objref_GEOM_Gen._NP_RepositoryId, geomBuilder)
14045
14046
14047 ## Field on Geometry
14048 #  @ingroup l2_field
14049 class geomField( GEOM._objref_GEOM_Field ):
14050
14051     def __init__(self, *args):
14052         GEOM._objref_GEOM_Field.__init__(self, *args)
14053         self.field = GEOM._objref_GEOM_Field
14054         return
14055
14056     ## Returns the shape the field lies on
14057     def getShape(self):
14058         "Returns the shape the field lies on"
14059         return self.field.GetShape(self)
14060
14061     ## Returns the field name
14062     def getName(self):
14063         "Returns the field name"
14064         return self.field.GetName(self)
14065
14066     ## Returns type of field data as integer [0-3]
14067     def getType(self):
14068         "Returns type of field data"
14069         return EnumToLong(self.field.GetDataType(self))
14070
14071     ## Returns type of field data:
14072     #  one of GEOM.FDT_Bool, GEOM.FDT_Int, GEOM.FDT_Double, GEOM.FDT_String
14073     def getTypeEnum(self):
14074         "Returns type of field data"
14075         return self.field.GetDataType(self)
14076
14077     ## Returns dimension of the shape the field lies on:
14078     #  0 - VERTEX, 1 - EDGE, 2 - FACE, 3 - SOLID, -1 - whole shape
14079     def getDimension(self):
14080         """Returns dimension of the shape the field lies on:
14081         0 - VERTEX, 1 - EDGE, 2 - FACE, 3 - SOLID, -1 - whole shape"""
14082         return self.field.GetDimension(self)
14083
14084     ## Returns names of components
14085     def getComponents(self):
14086         "Returns names of components"
14087         return self.field.GetComponents(self)
14088
14089     ## Adds a time step to the field
14090     #  @param step the time step number further used as the step identifier
14091     #  @param stamp the time step time
14092     #  @param values the values of the time step
14093     def addStep(self, step, stamp, values):
14094         "Adds a time step to the field"
14095         stp = self.field.AddStep( self, step, stamp )
14096         if not stp:
14097             raise RuntimeError("Field.addStep() : Error: step %s already exists in this field"%step)
14098         global geom
14099         geom._autoPublish( stp, "", "Step %s, %s"%(step,stamp))
14100         self.setValues( step, values )
14101         return stp
14102
14103     ## Remove a time step from the field
14104     def removeStep(self,step):
14105         "Remove a time step from the field"
14106         stepSO = None
14107         try:
14108             stepObj = self.field.GetStep( self, step )
14109             if stepObj:
14110                 stepSO = geom.myStudy.FindObjectID( stepObj.GetStudyEntry() )
14111         except:
14112             #import traceback
14113             #traceback.print_exc()
14114             pass
14115         self.field.RemoveStep( self, step )
14116         if stepSO:
14117             geom.myBuilder.RemoveObjectWithChildren( stepSO )
14118         return
14119
14120     ## Returns number of time steps in the field
14121     def countSteps(self):
14122         "Returns number of time steps in the field"
14123         return self.field.CountSteps(self)
14124
14125     ## Returns a list of time step IDs in the field
14126     def getSteps(self):
14127         "Returns a list of time step IDs in the field"
14128         return self.field.GetSteps(self)
14129
14130     ## Returns a time step by its ID
14131     def getStep(self,step):
14132         "Returns a time step by its ID"
14133         stp = self.field.GetStep(self, step)
14134         if not stp:
14135             raise RuntimeError("Step %s is missing from this field"%step)
14136         return stp
14137
14138     ## Returns the time of the field step
14139     def getStamp(self,step):
14140         "Returns the time of the field step"
14141         return self.getStep(step).GetStamp()
14142
14143     ## Changes the time of the field step
14144     def setStamp(self, step, stamp):
14145         "Changes the time of the field step"
14146         return self.getStep(step).SetStamp(stamp)
14147
14148     ## Returns values of the field step
14149     def getValues(self, step):
14150         "Returns values of the field step"
14151         return self.getStep(step).GetValues()
14152
14153     ## Changes values of the field step
14154     def setValues(self, step, values):
14155         "Changes values of the field step"
14156         stp = self.getStep(step)
14157         errBeg = "Field.setValues(values) : Error: "
14158         try:
14159             ok = stp.SetValues( values )
14160         except Exception as e:
14161             excStr = str(e)
14162             if excStr.find("WrongPythonType") > 0:
14163                 raise RuntimeError(errBeg +\
14164                       "wrong type of values, %s values are expected"%str(self.getTypeEnum())[4:])
14165             raise RuntimeError(errBeg + str(e))
14166         if not ok:
14167             nbOK = self.field.GetArraySize(self)
14168             nbKO = len(values)
14169             if nbOK != nbKO:
14170                 raise RuntimeError(errBeg + "len(values) must be %s but not %s"%(nbOK,nbKO))
14171             else:
14172                 raise RuntimeError(errBeg + "failed")
14173         return
14174
14175     pass # end of class geomField
14176
14177 # Register the new proxy for GEOM_Field
14178 omniORB.registerObjref(GEOM._objref_GEOM_Field._NP_RepositoryId, geomField)
14179
14180
14181 ## Create a new geomBuilder instance.The geomBuilder class provides the Python
14182 #  interface to GEOM operations.
14183 #
14184 #  Typical use is:
14185 #  \code
14186 #    import salome
14187 #    salome.salome_init()
14188 #    from salome.geom import geomBuilder
14189 #    geompy = geomBuilder.New()
14190 #  \endcode
14191 #  @param  instance  CORBA proxy of GEOM Engine. If None, the default Engine is used.
14192 #  @return geomBuilder instance
14193 def New( instance=None):
14194     """
14195     Create a new geomBuilder instance.The geomBuilder class provides the Python
14196     interface to GEOM operations.
14197
14198     Typical use is:
14199         import salome
14200         salome.salome_init()
14201         from salome.geom import geomBuilder
14202         geompy = geomBuilder.New()
14203
14204     Parameters:
14205         instance  CORBA proxy of GEOM Engine. If None, the default Engine is used.
14206     Returns:
14207         geomBuilder instance
14208     """
14209     #print "New geomBuilder ", study, instance
14210     global engine
14211     global geom
14212     global doLcc
14213     if instance and isinstance( instance, SALOMEDS._objref_Study ):
14214         import sys
14215         sys.stderr.write("Warning: 'study' argument is no more needed in geomBuilder.New(). Consider updating your script!!!\n\n")
14216         instance = None
14217     engine = instance
14218     if engine is None:
14219       doLcc = True
14220     geom = geomBuilder()
14221     assert isinstance(geom,geomBuilder), "Geom engine class is %s but should be geomBuilder.geomBuilder. Import geomBuilder before creating the instance."%geom.__class__
14222     geom.init_geom()
14223     return geom
14224
14225
14226 # Register methods from the plug-ins in the geomBuilder class 
14227 plugins_var = os.environ.get( "GEOM_PluginsList" )
14228
14229 plugins = None
14230 if plugins_var is not None:
14231     plugins = plugins_var.split( ":" )
14232     plugins=[x for x in plugins if len(x)>0]
14233 if plugins is not None:
14234     for pluginName in plugins:
14235         pluginBuilderName = pluginName + "Builder"
14236         try:
14237             exec( "from salome.%s.%s import *" % (pluginName, pluginBuilderName))
14238         except Exception as e:
14239             from salome_utils import verbose
14240             print("Exception while loading %s: %s" % ( pluginBuilderName, e ))
14241             continue
14242         exec( "from salome.%s import %s" % (pluginName, pluginBuilderName))
14243         plugin = eval( pluginBuilderName )
14244         
14245         # add methods from plugin module to the geomBuilder class
14246         for k in dir( plugin ):
14247             if k[0] == '_': continue
14248             method = getattr( plugin, k )
14249             if type( method ).__name__ == 'function':
14250                 if not hasattr( geomBuilder, k ):
14251                     setattr( geomBuilder, k, method )
14252                 pass
14253             pass
14254         del pluginName
14255         pass
14256     pass