Salome HOME
cf5a9dba0bcd519c8477c7212a46ac2387486ec8
[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 from salome.geom.conformity import CheckConformity
265
266 # In case the omniORBpy EnumItem class does not fully support Python 3
267 # (for instance in version 4.2.1-2), the comparison ordering methods must be
268 # defined
269 #
270 try:
271     GEOM.COMPOUND < GEOM.SOLID
272 except TypeError:
273     def enumitem_eq(self, other):
274         try:
275             if isinstance(other, omniORB.EnumItem):
276                 if other._parent_id == self._parent_id:
277                     return self._v == other._v
278                 else:
279                     return self._parent_id == other._parent_id
280             else:
281                 return id(self) == id(other)
282         except:
283             return id(self) == id(other)
284
285     def enumitem_lt(self, other):
286         try:
287             if isinstance(other, omniORB.EnumItem):
288                 if other._parent_id == self._parent_id:
289                     return self._v < other._v
290                 else:
291                     return self._parent_id < other._parent_id
292             else:
293                 return id(self) < id(other)
294         except:
295             return id(self) < id(other)
296
297     def enumitem_le(self, other):
298         try:
299             if isinstance(other, omniORB.EnumItem):
300                 if other._parent_id == self._parent_id:
301                     return self._v <= other._v
302                 else:
303                     return self._parent_id <= other._parent_id
304             else:
305                 return id(self) <= id(other)
306         except:
307             return id(self) <= id(other)
308
309     def enumitem_gt(self, other):
310         try:
311             if isinstance(other, omniORB.EnumItem):
312                 if other._parent_id == self._parent_id:
313                     return self._v > other._v
314                 else:
315                     return self._parent_id > other._parent_id
316             else:
317                 return id(self) > id(other)
318         except:
319             return id(self) > id(other)
320
321     def enumitem_ge(self, other):
322         try:
323             if isinstance(other, omniORB.EnumItem):
324                 if other._parent_id == self._parent_id:
325                     return self._v >= other._v
326                 else:
327                     return self._parent_id >= other._parent_id
328             else:
329                 return id(self) >= id(other)
330         except:
331             return id(self) >= id(other)
332
333     GEOM.omniORB.EnumItem.__eq__ = enumitem_eq
334     GEOM.omniORB.EnumItem.__lt__ = enumitem_lt
335     GEOM.omniORB.EnumItem.__le__ = enumitem_le
336     GEOM.omniORB.EnumItem.__gt__ = enumitem_gt
337     GEOM.omniORB.EnumItem.__ge__ = enumitem_ge
338     omniORB.EnumItem.__eq__ = enumitem_eq
339     omniORB.EnumItem.__lt__ = enumitem_lt
340     omniORB.EnumItem.__le__ = enumitem_le
341     omniORB.EnumItem.__gt__ = enumitem_gt
342     omniORB.EnumItem.__ge__ = enumitem_ge
343
344 # service function
345 def _toListOfNames(_names, _size=-1):
346     l = []
347     import types
348     if type(_names) in [list, tuple]:
349         for i in _names: l.append(i)
350     elif _names:
351         l.append(_names)
352     if l and len(l) < _size:
353         for i in range(len(l), _size): l.append("%s_%d"%(l[0],i))
354     return l
355
356 # Decorator function to manage transactions for all geometric operations.
357 def ManageTransactions(theOpeName):
358     def MTDecorator(theFunction):
359         # To keep the original function name an documentation.
360         @functools.wraps(theFunction)
361         def OpenCallClose(self, *args, **kwargs):
362             # Open transaction
363             anOperation = getattr(self, theOpeName)
364             anOperation.StartOperation()
365             try:
366                 # Call the function
367                 res = theFunction(self, *args, **kwargs)
368                 # Commit transaction
369                 anOperation.FinishOperation()
370                 return res
371             except:
372                 # Abort transaction
373                 anOperation.AbortOperation()
374                 raise
375         return OpenCallClose
376     return MTDecorator
377
378 ## Raise an Error, containing the Method_name, if Operation is Failed
379 ## @ingroup l1_geomBuilder_auxiliary
380 def RaiseIfFailed (Method_name, Operation):
381     if not Operation.IsDone() and Operation.GetErrorCode() != "NOT_FOUND_ANY":
382         raise RuntimeError(Method_name + " : " + Operation.GetErrorCode())
383
384 def PrintOrRaise(message, raiseException=False):
385     if raiseException:
386         raise RuntimeError(message)
387     else:
388         print(message)
389
390 ## Return list of variables value from salome notebook
391 ## @ingroup l1_geomBuilder_auxiliary
392 def ParseParameters(*parameters):
393     Result = []
394     StringResult = []
395     for parameter in parameters:
396         if isinstance(parameter, list):
397             lResults = ParseParameters(*parameter)
398             if len(lResults) > 0:
399                 Result.append(lResults[:-1])
400                 StringResult += lResults[-1].split(":")
401                 pass
402             pass
403         else:
404             if isinstance(parameter,str):
405                 if notebook.isVariable(parameter):
406                     Result.append(notebook.get(parameter))
407                 else:
408                     raise RuntimeError("Variable with name '" + parameter + "' doesn't exist!!!")
409                 pass
410             else:
411                 Result.append(parameter)
412                 pass
413             StringResult.append(str(parameter))
414             pass
415         pass
416     if Result:
417         Result.append(":".join(StringResult))
418     else:
419         Result = ":".join(StringResult)
420     return Result
421
422 ## Return list of variables value from salome notebook
423 ## @ingroup l1_geomBuilder_auxiliary
424 def ParseList(list):
425     Result = []
426     StringResult = ""
427     for parameter in list:
428         if isinstance(parameter,str) and notebook.isVariable(parameter):
429             Result.append(str(notebook.get(parameter)))
430             pass
431         else:
432             Result.append(str(parameter))
433             pass
434
435         StringResult = StringResult + str(parameter)
436         StringResult = StringResult + ":"
437         pass
438     StringResult = StringResult[:len(StringResult)-1]
439     return Result, StringResult
440
441 ## Return list of variables value from salome notebook
442 ## @ingroup l1_geomBuilder_auxiliary
443 def ParseSketcherCommand(command):
444     Result = ""
445     StringResult = ""
446     sections = command.split(":")
447     for section in sections:
448         parameters = section.split(" ")
449         paramIndex = 1
450         for parameter in parameters:
451             if paramIndex > 1 and parameter.find("'") != -1:
452                 parameter = parameter.replace("'","")
453                 if notebook.isVariable(parameter):
454                     Result = Result + str(notebook.get(parameter)) + " "
455                     pass
456                 else:
457                     raise RuntimeError("Variable with name '" + parameter + "' doesn't exist!!!")
458                     pass
459                 pass
460             else:
461                 Result = Result + str(parameter) + " "
462                 pass
463             if paramIndex > 1:
464                 StringResult = StringResult + parameter
465                 StringResult = StringResult + ":"
466                 pass
467             paramIndex = paramIndex + 1
468             pass
469         Result = Result[:len(Result)-1] + ":"
470         pass
471     Result = Result[:len(Result)-1]
472     return Result, StringResult
473
474 ## Helper function which can be used to pack the passed string to the byte data.
475 ## Only '1' an '0' symbols are valid for the string. The missing bits are replaced by zeroes.
476 ## If the string contains invalid symbol (neither '1' nor '0'), the function raises an exception.
477 ## For example,
478 ## \code
479 ## val = PackData("10001110") # val = 0xAE
480 ## val = PackData("1")        # val = 0x80
481 ## \endcode
482 ## @param data unpacked data - a string containing '1' and '0' symbols
483 ## @return data packed to the byte stream
484 ## @ingroup l1_geomBuilder_auxiliary
485 def PackData(data):
486     """
487     Helper function which can be used to pack the passed string to the byte data.
488     Only '1' an '0' symbols are valid for the string. The missing bits are replaced by zeroes.
489     If the string contains invalid symbol (neither '1' nor '0'), the function raises an exception.
490
491     Parameters:
492         data unpacked data - a string containing '1' and '0' symbols
493
494     Returns:
495         data packed to the byte stream
496
497     Example of usage:
498         val = PackData("10001110") # val = 0xAE
499         val = PackData("1")        # val = 0x80
500     """
501     bytes = len(data)/8
502     if len(data)%8: bytes += 1
503     res = ""
504     for b in range(bytes):
505         d = data[b*8:(b+1)*8]
506         val = 0
507         for i in range(8):
508             val *= 2
509             if i < len(d):
510                 if d[i] == "1": val += 1
511                 elif d[i] != "0":
512                     raise "Invalid symbol %s" % d[i]
513                 pass
514             pass
515         res += chr(val)
516         pass
517     return res
518
519 ## Read bitmap texture from the text file.
520 ## In that file, any non-zero symbol represents '1' opaque pixel of the bitmap.
521 ## A zero symbol ('0') represents transparent pixel of the texture bitmap.
522 ## The function returns width and height of the pixmap in pixels and byte stream representing
523 ## texture bitmap itself.
524 ##
525 ## This function can be used to read the texture to the byte stream in order to pass it to
526 ## the AddTexture() function of geomBuilder class.
527 ## For example,
528 ## \code
529 ## from salome.geom import geomBuilder
530 ## geompy = geomBuilder.New()
531 ## texture = geompy.readtexture('mytexture.dat')
532 ## texture = geompy.AddTexture(*texture)
533 ## obj.SetMarkerTexture(texture)
534 ## \endcode
535 ## @param fname texture file name
536 ## @return sequence of tree values: texture's width, height in pixels and its byte stream
537 ## @ingroup l1_geomBuilder_auxiliary
538 def ReadTexture(fname):
539     """
540     Read bitmap texture from the text file.
541     In that file, any non-zero symbol represents '1' opaque pixel of the bitmap.
542     A zero symbol ('0') represents transparent pixel of the texture bitmap.
543     The function returns width and height of the pixmap in pixels and byte stream representing
544     texture bitmap itself.
545     This function can be used to read the texture to the byte stream in order to pass it to
546     the AddTexture() function of geomBuilder class.
547
548     Parameters:
549         fname texture file name
550
551     Returns:
552         sequence of tree values: texture's width, height in pixels and its byte stream
553
554     Example of usage:
555         from salome.geom import geomBuilder
556         geompy = geomBuilder.New()
557         texture = geompy.readtexture('mytexture.dat')
558         texture = geompy.AddTexture(*texture)
559         obj.SetMarkerTexture(texture)
560     """
561     try:
562         f = open(fname)
563         lines = [ l.strip() for l in f.readlines()]
564         f.close()
565         maxlen = 0
566         if lines: maxlen = max([len(x) for x in lines])
567         lenbytes = maxlen/8
568         if maxlen%8: lenbytes += 1
569         bytedata=""
570         for line in lines:
571             if len(line)%8:
572                 lenline = (len(line)/8+1)*8
573                 pass
574             else:
575                 lenline = (len(line)/8)*8
576                 pass
577             for i in range(lenline/8):
578                 byte=""
579                 for j in range(8):
580                     if i*8+j < len(line) and line[i*8+j] != "0": byte += "1"
581                     else: byte += "0"
582                     pass
583                 bytedata += PackData(byte)
584                 pass
585             for i in range(lenline/8, lenbytes):
586                 bytedata += PackData("0")
587             pass
588         return lenbytes*8, len(lines), bytedata
589     except:
590         pass
591     return 0, 0, ""
592
593 ## Returns a long value from enumeration type
594 #  Can be used for CORBA enumerator types like GEOM.shape_type
595 #  @param theItem enumeration type
596 #  @ingroup l1_geomBuilder_auxiliary
597 def EnumToLong(theItem):
598     """
599     Returns a long value from enumeration type
600     Can be used for CORBA enumerator types like geomBuilder.ShapeType
601
602     Parameters:
603         theItem enumeration type
604     """
605     ret = theItem
606     if hasattr(theItem, "_v"): ret = theItem._v
607     return ret
608
609 ## Pack an argument into a list
610 def ToList( arg ):
611     if isinstance( arg, list ):
612         return arg
613     if hasattr( arg, "__getitem__" ):
614         return list( arg )
615     return [ arg ]
616
617 ## Information about closed/unclosed state of shell or wire
618 #  @ingroup l1_geomBuilder_auxiliary
619 class info:
620     """
621     Information about closed/unclosed state of shell or wire
622     """
623     UNKNOWN  = 0
624     CLOSED   = 1
625     UNCLOSED = 2
626
627 ## Private class used to bind calls of plugin operations to geomBuilder
628 class PluginOperation:
629   def __init__(self, operation, function):
630     self.operation = operation
631     self.function = function
632     pass
633
634   @ManageTransactions("operation")
635   def __call__(self, *args):
636     res = self.function(self.operation, *args)
637     RaiseIfFailed(self.function.__name__, self.operation)
638     return res
639
640 # Warning: geom is a singleton
641 geom = None
642 engine = None
643 doLcc = False
644 created = False
645
646 class geomBuilder(GEOM._objref_GEOM_Gen):
647
648         ## Enumeration ShapeType as a dictionary. \n
649         ## Topological types of shapes (like Open Cascade types). See GEOM::shape_type for details.
650         #  @ingroup l1_geomBuilder_auxiliary
651         ShapeType = {"AUTO":-1, "COMPOUND":0, "COMPSOLID":1, "SOLID":2, "SHELL":3, "FACE":4, "WIRE":5, "EDGE":6, "VERTEX":7, "SHAPE":8, "FLAT":9}
652
653         ## Kinds of shape in terms of <VAR>GEOM.GEOM_IKindOfShape.shape_kind</VAR> enumeration
654         #  and a list of parameters, describing the shape.
655         #  List of parameters, describing the shape:
656         #  - COMPOUND:            [nb_solids  nb_faces  nb_edges  nb_vertices]
657         #  - COMPSOLID:           [nb_solids  nb_faces  nb_edges  nb_vertices]
658         #
659         #  - SHELL:       [info.CLOSED / info.UNCLOSED  nb_faces  nb_edges  nb_vertices]
660         #
661         #  - WIRE:        [info.CLOSED / info.UNCLOSED nb_edges  nb_vertices]
662         #
663         #  - SPHERE:       [xc yc zc            R]
664         #  - CYLINDER:     [xb yb zb  dx dy dz  R         H]
665         #  - BOX:          [xc yc zc                      ax ay az]
666         #  - ROTATED_BOX:  [xc yc zc  zx zy zz  xx xy xz  ax ay az]
667         #  - TORUS:        [xc yc zc  dx dy dz  R_1  R_2]
668         #  - CONE:         [xb yb zb  dx dy dz  R_1  R_2  H]
669         #  - POLYHEDRON:                       [nb_faces  nb_edges  nb_vertices]
670         #  - SOLID:                            [nb_faces  nb_edges  nb_vertices]
671         #
672         #  - SPHERE2D:     [xc yc zc            R]
673         #  - CYLINDER2D:   [xb yb zb  dx dy dz  R         H]
674         #  - TORUS2D:      [xc yc zc  dx dy dz  R_1  R_2]
675         #  - CONE2D:       [xc yc zc  dx dy dz  R_1  R_2  H]
676         #  - DISK_CIRCLE:  [xc yc zc  dx dy dz  R]
677         #  - DISK_ELLIPSE: [xc yc zc  dx dy dz  R_1  R_2]
678         #  - POLYGON:      [xo yo zo  dx dy dz            nb_edges  nb_vertices]
679         #  - PLANE:        [xo yo zo  dx dy dz]
680         #  - PLANAR:       [xo yo zo  dx dy dz            nb_edges  nb_vertices]
681         #  - FACE:                                       [nb_edges  nb_vertices]
682         #
683         #  - CIRCLE:       [xc yc zc  dx dy dz  R]
684         #  - ARC_CIRCLE:   [xc yc zc  dx dy dz  R         x1 y1 z1  x2 y2 z2]
685         #  - ELLIPSE:      [xc yc zc  dx dy dz  R_1  R_2]
686         #  - ARC_ELLIPSE:  [xc yc zc  dx dy dz  R_1  R_2  x1 y1 z1  x2 y2 z2]
687         #  - LINE:         [xo yo zo  dx dy dz]
688         #  - SEGMENT:      [x1 y1 z1  x2 y2 z2]
689         #  - EDGE:                                                 [nb_vertices]
690         #
691         #  - VERTEX:       [x  y  z]
692         #
693         #  - LCS:          [x y z  xx xy xz  yx yy yz  zx zy zz]
694         #  @ingroup l1_geomBuilder_auxiliary
695         kind = GEOM.GEOM_IKindOfShape
696
697         def __new__(cls, *args):
698             global engine
699             global geom
700             global doLcc
701             global created
702             #print "==== __new__ ", engine, geom, doLcc, created
703             if geom is None:
704                 # geom engine is either retrieved from engine, or created
705                 geom = engine
706                 # Following test avoids a recursive loop
707                 if doLcc:
708                     if geom is not None:
709                         # geom engine not created: existing engine found
710                         doLcc = False
711                     if doLcc and not created:
712                         doLcc = False
713                         # FindOrLoadComponent called:
714                         # 1. CORBA resolution of server
715                         # 2. the __new__ method is called again
716                         #print "==== FindOrLoadComponent ", engine, geom, doLcc, created
717                         geom = lcc.FindOrLoadComponent( "FactoryServer", "GEOM" )
718                         #print "====1 ",geom
719                 else:
720                     # FindOrLoadComponent not called
721                     if geom is None:
722                         # geomBuilder instance is created from lcc.FindOrLoadComponent
723                         #print "==== super ", engine, geom, doLcc, created
724                         geom = super(geomBuilder,cls).__new__(cls)
725                         #print "====2 ",geom
726                     else:
727                         # geom engine not created: existing engine found
728                         #print "==== existing ", engine, geom, doLcc, created
729                         pass
730                 #print "return geom 1 ", geom
731                 return geom
732
733             #print "return geom 2 ", geom
734             return geom
735
736         def __init__(self, *args):
737             global created
738             #print "-------- geomBuilder __init__ --- ", created, self
739             if not created:
740               created = True
741               GEOM._objref_GEOM_Gen.__init__(self, *args)
742               self.myMaxNbSubShapesAllowed = 0 # auto-publishing is disabled by default
743               self.myBuilder = None
744               self.BasicOp  = None
745               self.CurvesOp = None
746               self.PrimOp   = None
747               self.ShapesOp = None
748               self.HealOp   = None
749               self.InsertOp = None
750               self.BoolOp   = None
751               self.TrsfOp   = None
752               self.LocalOp  = None
753               self.MeasuOp  = None
754               self.BlocksOp = None
755               self.GroupOp  = None
756               self.FieldOp  = None
757               self.TestOp   = None
758             pass
759
760         ## Process object publication in the study, as follows:
761         #  - if @a theName is specified (not None), the object is published in the study
762         #    with this name, not taking into account "auto-publishing" option;
763         #  - if @a theName is NOT specified, the object is published in the study
764         #    (using default name, which can be customized using @a theDefaultName parameter)
765         #    only if auto-publishing is switched on.
766         #
767         #  @param theObj  object, a subject for publishing
768         #  @param theName object name for study
769         #  @param theDefaultName default name for the auto-publishing
770         #
771         #  @sa addToStudyAuto()
772         def _autoPublish(self, theObj, theName, theDefaultName="noname"):
773             # ---
774             def _item_name(_names, _defname, _idx=-1):
775                 if not _names: _names = _defname
776                 if type(_names) in [list, tuple]:
777                     if _idx >= 0:
778                         if _idx >= len(_names) or not _names[_idx]:
779                             if type(_defname) not in [list, tuple]:
780                                 _name = "%s_%d"%(_defname, _idx+1)
781                             elif len(_defname) > 0 and _idx >= 0 and _idx < len(_defname):
782                                 _name = _defname[_idx]
783                             else:
784                                 _name = "%noname_%d"%(dn, _idx+1)
785                             pass
786                         else:
787                             _name = _names[_idx]
788                         pass
789                     else:
790                         # must be wrong  usage
791                         _name = _names[0]
792                     pass
793                 else:
794                     if _idx >= 0:
795                         _name = "%s_%d"%(_names, _idx+1)
796                     else:
797                         _name = _names
798                     pass
799                 return _name
800             # ---
801             def _publish( _name, _obj ):
802                 fatherObj = None
803                 if isinstance( _obj, GEOM._objref_GEOM_Field ):
804                     fatherObj = _obj.GetShape()
805                 elif isinstance( _obj, GEOM._objref_GEOM_FieldStep ):
806                     fatherObj = _obj.GetField()
807                 elif not _obj.IsMainShape():
808                     fatherObj = _obj.GetMainShape()
809                     pass
810                 if fatherObj and fatherObj.GetStudyEntry():
811                     self.addToStudyInFather(fatherObj, _obj, _name)
812                 else:
813                     self.addToStudy(_obj, _name)
814                     pass
815                 return
816             # ---
817             if not theObj:
818                 return # null object
819             if not theName and not self.myMaxNbSubShapesAllowed:
820                 return # nothing to do: auto-publishing is disabled
821             if not theName and not theDefaultName:
822                 return # neither theName nor theDefaultName is given
823             import types
824             if type(theObj) in [list, tuple]:
825                 # list of objects is being published
826                 idx = 0
827                 for obj in theObj:
828                     if not obj: continue # bad object
829                     name = _item_name(theName, theDefaultName, idx)
830                     _publish( name, obj )
831                     idx = idx+1
832                     if not theName and idx == self.myMaxNbSubShapesAllowed: break
833                     pass
834                 pass
835             else:
836                 # single object is published
837                 name = _item_name(theName, theDefaultName)
838                 _publish( name, theObj )
839             pass
840
841         ## @addtogroup l1_geomBuilder_auxiliary
842         ## @{
843         def init_geom(self):
844             self.myStudy = salome.myStudy
845             self.myBuilder = self.myStudy.NewBuilder()
846
847             # load data from the study file, if necessary
848             component = self.myStudy.FindComponent("GEOM")
849             if component:
850                 self.myBuilder.LoadWith(component, self)
851
852             self.BasicOp  = self.GetIBasicOperations    ()
853             self.CurvesOp = self.GetICurvesOperations   ()
854             self.PrimOp   = self.GetI3DPrimOperations   ()
855             self.ShapesOp = self.GetIShapesOperations   ()
856             self.HealOp   = self.GetIHealingOperations  ()
857             self.InsertOp = self.GetIInsertOperations   ()
858             self.BoolOp   = self.GetIBooleanOperations  ()
859             self.TrsfOp   = self.GetITransformOperations()
860             self.LocalOp  = self.GetILocalOperations    ()
861             self.MeasuOp  = self.GetIMeasureOperations  ()
862             self.BlocksOp = self.GetIBlocksOperations   ()
863             self.GroupOp  = self.GetIGroupOperations    ()
864             self.FieldOp  = self.GetIFieldOperations    ()
865             self.TestOp   = self.GetITestOperations     ()
866
867             notebook.myStudy = self.myStudy
868             pass
869
870         def GetPluginOperations(self, libraryName):
871             op = GEOM._objref_GEOM_Gen.GetPluginOperations(self, libraryName)
872             return op
873
874         ## Enable / disable results auto-publishing
875         #
876         #  The automatic publishing is managed in the following way:
877         #  - if @a maxNbSubShapes = 0, automatic publishing is disabled.
878         #  - if @a maxNbSubShapes = -1 (default), automatic publishing is enabled and
879         #  maximum number of sub-shapes allowed for publishing is unlimited; any negative
880         #  value passed as parameter has the same effect.
881         #  - if @a maxNbSubShapes is any positive value, automatic publishing is enabled and
882         #  maximum number of sub-shapes allowed for publishing is set to specified value.
883         #
884         #  @param maxNbSubShapes maximum number of sub-shapes allowed for publishing.
885         #  @ingroup l1_publish_data
886         def addToStudyAuto(self, maxNbSubShapes=-1):
887             """
888             Enable / disable results auto-publishing
889
890             The automatic publishing is managed in the following way:
891             - if @a maxNbSubShapes = 0, automatic publishing is disabled;
892             - if @a maxNbSubShapes = -1 (default), automatic publishing is enabled and
893             maximum number of sub-shapes allowed for publishing is unlimited; any negative
894             value passed as parameter has the same effect.
895             - if @a maxNbSubShapes is any positive value, automatic publishing is enabled and
896             maximum number of sub-shapes allowed for publishing is set to this value.
897
898             Parameters:
899                 maxNbSubShapes maximum number of sub-shapes allowed for publishing.
900
901             Example of usage:
902                 geompy.addToStudyAuto()   # enable auto-publishing
903                 geompy.MakeBoxDXDYDZ(100) # box is created and published with default name
904                 geompy.addToStudyAuto(0)  # disable auto-publishing
905             """
906             self.myMaxNbSubShapesAllowed = max(-1, maxNbSubShapes)
907             pass
908
909         ## Dump component to the Python script
910         #  This method overrides IDL function to allow default values for the parameters.
911         def DumpPython(self, theIsPublished=True, theIsMultiFile=True):
912             """
913             Dump component to the Python script
914             This method overrides IDL function to allow default values for the parameters.
915             """
916             return GEOM._objref_GEOM_Gen.DumpPython(self, theIsPublished, theIsMultiFile)
917
918         ## Get name for sub-shape aSubObj of shape aMainObj
919         #
920         # @ref swig_SubShapeName "Example"
921         @ManageTransactions("ShapesOp")
922         def SubShapeName(self,aSubObj, aMainObj):
923             """
924             Get name for sub-shape aSubObj of shape aMainObj
925             """
926             # Example: see GEOM_TestAll.py
927
928             #aSubId  = orb.object_to_string(aSubObj)
929             #aMainId = orb.object_to_string(aMainObj)
930             #index = gg.getIndexTopology(aSubId, aMainId)
931             #name = gg.getShapeTypeString(aSubId) + "_%d"%(index)
932             index = self.ShapesOp.GetTopologyIndex(aMainObj, aSubObj)
933             name = self.ShapesOp.GetShapeTypeString(aSubObj) + "_%d"%(index)
934             return name
935
936         ## Publish in study aShape with name aName
937         #
938         #  \param aShape the shape to be published
939         #  \param aName  the name for the shape
940         #  \param doRestoreSubShapes if True, finds and publishes also
941         #         sub-shapes of <VAR>aShape</VAR>, corresponding to its arguments
942         #         and published sub-shapes of arguments
943         #  \param theArgs,theFindMethod,theInheritFirstArg see RestoreSubShapes() for
944         #                                                  these arguments description
945         #  \return study entry of the published shape in form of string
946         #
947         #  @ingroup l1_publish_data
948         #  @ref swig_all_addtostudy "Example"
949         def addToStudy(self, aShape, aName, doRestoreSubShapes=False,
950                        theArgs=[], theFindMethod=GEOM.FSM_GetInPlace, theInheritFirstArg=False):
951             """
952             Publish in study aShape with name aName
953
954             Parameters:
955                 aShape the shape to be published
956                 aName  the name for the shape
957                 doRestoreSubShapes if True, finds and publishes also
958                                    sub-shapes of aShape, corresponding to its arguments
959                                    and published sub-shapes of arguments
960                 theArgs,theFindMethod,theInheritFirstArg see geompy.RestoreSubShapes() for
961                                                          these arguments description
962
963             Returns:
964                 study entry of the published shape in form of string
965
966             Example of usage:
967                 id_block1 = geompy.addToStudy(Block1, "Block 1")
968             """
969             # Example: see GEOM_TestAll.py
970             try:
971                 aSObject = self.AddInStudy(aShape, aName, None)
972                 if aSObject and aName: aSObject.SetAttrString("AttributeName", aName)
973                 if doRestoreSubShapes:
974                     self.RestoreSubShapesSO(aSObject, theArgs,
975                                             theFindMethod, theInheritFirstArg, True )
976             except:
977                 print("addToStudy() failed")
978                 return ""
979             return aShape.GetStudyEntry()
980
981         ## Publish in study aShape with name aName as sub-object of previously published aFather
982         #  \param aFather previously published object
983         #  \param aShape the shape to be published as sub-object of <VAR>aFather</VAR>
984         #  \param aName  the name for the shape
985         #
986         #  \return study entry of the published shape in form of string
987         #
988         #  @ingroup l1_publish_data
989         #  @ref swig_all_addtostudyInFather "Example"
990         def addToStudyInFather(self, aFather, aShape, aName):
991             """
992             Publish in study aShape with name aName as sub-object of previously published aFather
993
994             Parameters:
995                 aFather previously published object
996                 aShape the shape to be published as sub-object of aFather
997                 aName  the name for the shape
998
999             Returns:
1000                 study entry of the published shape in form of string
1001             """
1002             # Example: see GEOM_TestAll.py
1003             try:
1004                 aSObject = self.AddInStudy(aShape, aName, aFather)
1005                 if aSObject and aName: aSObject.SetAttrString("AttributeName", aName)
1006             except:
1007                 print("addToStudyInFather() failed")
1008                 return ""
1009             return aShape.GetStudyEntry()
1010
1011         ## Unpublish object in study
1012         #
1013         #  \param obj the object to be unpublished
1014         def hideInStudy(self, obj):
1015             """
1016             Unpublish object in study
1017
1018             Parameters:
1019                 obj the object to be unpublished
1020             """
1021             ior = salome.orb.object_to_string(obj)
1022             aSObject = self.myStudy.FindObjectIOR(ior)
1023             if aSObject is not None:
1024                 genericAttribute = self.myBuilder.FindOrCreateAttribute(aSObject, "AttributeDrawable")
1025                 drwAttribute = genericAttribute._narrow(SALOMEDS.AttributeDrawable)
1026                 drwAttribute.SetDrawable(False)
1027                 # hide references if any
1028                 vso = self.myStudy.FindDependances(aSObject);
1029                 for refObj in vso :
1030                     genericAttribute = self.myBuilder.FindOrCreateAttribute(refObj, "AttributeDrawable")
1031                     drwAttribute = genericAttribute._narrow(SALOMEDS.AttributeDrawable)
1032                     drwAttribute.SetDrawable(False)
1033                     pass
1034                 pass
1035
1036         # end of l1_geomBuilder_auxiliary
1037         ## @}
1038
1039         ## @addtogroup l3_restore_ss
1040         ## @{
1041
1042         ## Publish sub-shapes, standing for arguments and sub-shapes of arguments
1043         #  To be used from python scripts out of addToStudy() (non-default usage)
1044         #  \param theObject published GEOM.GEOM_Object, arguments of which will be published
1045         #  \param theArgs   list of GEOM.GEOM_Object, operation arguments to be published.
1046         #                   If this list is empty, all operation arguments will be published
1047         #  \param theFindMethod method to search sub-shapes, corresponding to arguments and
1048         #                       their sub-shapes. Value from enumeration GEOM.find_shape_method.
1049         #  \param theInheritFirstArg set properties of the first argument for <VAR>theObject</VAR>.
1050         #                            Do not publish sub-shapes in place of arguments, but only
1051         #                            in place of sub-shapes of the first argument,
1052         #                            because the whole shape corresponds to the first argument.
1053         #                            Mainly to be used after transformations, but it also can be
1054         #                            useful after partition with one object shape, and some other
1055         #                            operations, where only the first argument has to be considered.
1056         #                            If theObject has only one argument shape, this flag is automatically
1057         #                            considered as True, not regarding really passed value.
1058         #  \param theAddPrefix add prefix "from_" to names of restored sub-shapes,
1059         #                      and prefix "from_subshapes_of_" to names of partially restored sub-shapes.
1060         #  \return list of published sub-shapes
1061         #
1062         #  @ref tui_restore_prs_params "Example"
1063         def RestoreSubShapes (self, theObject, theArgs=[], theFindMethod=GEOM.FSM_GetInPlace,
1064                               theInheritFirstArg=False, theAddPrefix=True):
1065             """
1066             Publish sub-shapes, standing for arguments and sub-shapes of arguments
1067             To be used from python scripts out of geompy.addToStudy (non-default usage)
1068
1069             Parameters:
1070                 theObject published GEOM.GEOM_Object, arguments of which will be published
1071                 theArgs   list of GEOM.GEOM_Object, operation arguments to be published.
1072                           If this list is empty, all operation arguments will be published
1073                 theFindMethod method to search sub-shapes, corresponding to arguments and
1074                               their sub-shapes. Value from enumeration GEOM.find_shape_method.
1075                 theInheritFirstArg set properties of the first argument for theObject.
1076                                    Do not publish sub-shapes in place of arguments, but only
1077                                    in place of sub-shapes of the first argument,
1078                                    because the whole shape corresponds to the first argument.
1079                                    Mainly to be used after transformations, but it also can be
1080                                    useful after partition with one object shape, and some other
1081                                    operations, where only the first argument has to be considered.
1082                                    If theObject has only one argument shape, this flag is automatically
1083                                    considered as True, not regarding really passed value.
1084                 theAddPrefix add prefix "from_" to names of restored sub-shapes,
1085                              and prefix "from_subshapes_of_" to names of partially restored sub-shapes.
1086             Returns:
1087                 list of published sub-shapes
1088             """
1089             # Example: see GEOM_TestAll.py
1090             return self.RestoreSubShapesO(theObject, theArgs,
1091                                           theFindMethod, theInheritFirstArg, theAddPrefix)
1092
1093         ## Publish sub-shapes, standing for arguments and sub-shapes of arguments
1094         #  To be used from python scripts out of addToStudy() (non-default usage)
1095         #  \param theObject published GEOM.GEOM_Object, arguments of which will be published
1096         #  \param theArgs   list of GEOM.GEOM_Object, operation arguments to be published.
1097         #                   If this list is empty, all operation arguments will be published
1098         #  \param theFindMethod method to search sub-shapes, corresponding to arguments and
1099         #                       their sub-shapes. Value from enumeration GEOM::find_shape_method.
1100         #  \param theInheritFirstArg set properties of the first argument for <VAR>theObject</VAR>.
1101         #                            Do not publish sub-shapes in place of arguments, but only
1102         #                            in place of sub-shapes of the first argument,
1103         #                            because the whole shape corresponds to the first argument.
1104         #                            Mainly to be used after transformations, but it also can be
1105         #                            useful after partition with one object shape, and some other
1106         #                            operations, where only the first argument has to be considered.
1107         #                            If theObject has only one argument shape, this flag is automatically
1108         #                            considered as True, not regarding really passed value.
1109         #  \param theAddPrefix add prefix "from_" to names of restored sub-shapes,
1110         #                      and prefix "from_subshapes_of_" to names of partially restored sub-shapes.
1111         #  \return list of published sub-shapes
1112         #
1113         #  @ref tui_restore_prs_params "Example"
1114         def RestoreGivenSubShapes (self, theObject, theArgs=[], theFindMethod=GEOM.FSM_GetInPlace,
1115                                    theInheritFirstArg=False, theAddPrefix=True):
1116             """
1117             Publish sub-shapes, standing for arguments and sub-shapes of arguments
1118             To be used from python scripts out of geompy.addToStudy() (non-default usage)
1119
1120             Parameters:
1121                 theObject published GEOM.GEOM_Object, arguments of which will be published
1122                 theArgs   list of GEOM.GEOM_Object, operation arguments to be published.
1123                           If this list is empty, all operation arguments will be published
1124                 theFindMethod method to search sub-shapes, corresponding to arguments and
1125                               their sub-shapes. Value from enumeration GEOM::find_shape_method.
1126                 theInheritFirstArg set properties of the first argument for theObject.
1127                                    Do not publish sub-shapes in place of arguments, but only
1128                                    in place of sub-shapes of the first argument,
1129                                    because the whole shape corresponds to the first argument.
1130                                    Mainly to be used after transformations, but it also can be
1131                                    useful after partition with one object shape, and some other
1132                                    operations, where only the first argument has to be considered.
1133                                    If theObject has only one argument shape, this flag is automatically
1134                                    considered as True, not regarding really passed value.
1135                 theAddPrefix add prefix "from_" to names of restored sub-shapes,
1136                              and prefix "from_subshapes_of_" to names of partially restored sub-shapes.
1137
1138             Returns:
1139                 list of published sub-shapes
1140             """
1141             # Example: see GEOM_TestAll.py
1142             return self.RestoreGivenSubShapesO(theObject, theArgs,
1143                                                theFindMethod, theInheritFirstArg, theAddPrefix)
1144
1145         # end of l3_restore_ss
1146         ## @}
1147
1148         ## @addtogroup l3_basic_go
1149         ## @{
1150
1151         ## Create point by three coordinates.
1152         #  @param theX The X coordinate of the point.
1153         #  @param theY The Y coordinate of the point.
1154         #  @param theZ The Z coordinate of the point.
1155         #  @param theName Object name; when specified, this parameter is used
1156         #         for result publication in the study. Otherwise, if automatic
1157         #         publication is switched on, default value is used for result name.
1158         #
1159         #  @return New GEOM.GEOM_Object, containing the created point.
1160         #
1161         #  @ref tui_creation_point "Example"
1162         @ManageTransactions("BasicOp")
1163         def MakeVertex(self, theX, theY, theZ, theName=None):
1164             """
1165             Create point by three coordinates.
1166
1167             Parameters:
1168                 theX The X coordinate of the point.
1169                 theY The Y coordinate of the point.
1170                 theZ The Z coordinate of the point.
1171                 theName Object name; when specified, this parameter is used
1172                         for result publication in the study. Otherwise, if automatic
1173                         publication is switched on, default value is used for result name.
1174
1175             Returns:
1176                 New GEOM.GEOM_Object, containing the created point.
1177             """
1178             # Example: see GEOM_TestAll.py
1179             theX,theY,theZ,Parameters = ParseParameters(theX, theY, theZ)
1180             anObj = self.BasicOp.MakePointXYZ(theX, theY, theZ)
1181             RaiseIfFailed("MakePointXYZ", self.BasicOp)
1182             anObj.SetParameters(Parameters)
1183             self._autoPublish(anObj, theName, "vertex")
1184             return anObj
1185
1186         ## Create a point, distant from the referenced point
1187         #  on the given distances along the coordinate axes.
1188         #  @param theReference The referenced point.
1189         #  @param theX Displacement from the referenced point along OX axis.
1190         #  @param theY Displacement from the referenced point along OY axis.
1191         #  @param theZ Displacement from the referenced point along OZ axis.
1192         #  @param theName Object name; when specified, this parameter is used
1193         #         for result publication in the study. Otherwise, if automatic
1194         #         publication is switched on, default value is used for result name.
1195         #
1196         #  @return New GEOM.GEOM_Object, containing the created point.
1197         #
1198         #  @ref tui_creation_point "Example"
1199         @ManageTransactions("BasicOp")
1200         def MakeVertexWithRef(self, theReference, theX, theY, theZ, theName=None):
1201             """
1202             Create a point, distant from the referenced point
1203             on the given distances along the coordinate axes.
1204
1205             Parameters:
1206                 theReference The referenced point.
1207                 theX Displacement from the referenced point along OX axis.
1208                 theY Displacement from the referenced point along OY axis.
1209                 theZ Displacement from the referenced point along OZ axis.
1210                 theName Object name; when specified, this parameter is used
1211                         for result publication in the study. Otherwise, if automatic
1212                         publication is switched on, default value is used for result name.
1213
1214             Returns:
1215                 New GEOM.GEOM_Object, containing the created point.
1216             """
1217             # Example: see GEOM_TestAll.py
1218             theX,theY,theZ,Parameters = ParseParameters(theX, theY, theZ)
1219             anObj = self.BasicOp.MakePointWithReference(theReference, theX, theY, theZ)
1220             RaiseIfFailed("MakePointWithReference", self.BasicOp)
1221             anObj.SetParameters(Parameters)
1222             self._autoPublish(anObj, theName, "vertex")
1223             return anObj
1224
1225         ## Create a point, corresponding to the given parameter on the given curve.
1226         #  @param theRefCurve The referenced curve.
1227         #  @param theParameter Value of parameter on the referenced curve.
1228         #  @param takeOrientationIntoAccount flag that tells if it is necessary
1229         #         to take the curve's orientation into account for the
1230         #         operation. I.e. if this flag is set, the results for the same
1231         #         parameters (except the value 0.5) is different for forward
1232         #         and reversed curves. If it is not set the result is the same.
1233         #  @param theName Object name; when specified, this parameter is used
1234         #         for result publication in the study. Otherwise, if automatic
1235         #         publication is switched on, default value is used for result name.
1236         #
1237         #  @return New GEOM.GEOM_Object, containing the created point.
1238         #
1239         #  @ref tui_creation_point "Example"
1240         @ManageTransactions("BasicOp")
1241         def MakeVertexOnCurve(self, theRefCurve, theParameter,
1242                               takeOrientationIntoAccount=False, theName=None):
1243             """
1244             Create a point, corresponding to the given parameter on the given curve.
1245
1246             Parameters:
1247                 theRefCurve The referenced curve.
1248                 theParameter Value of parameter on the referenced curve.
1249                 takeOrientationIntoAccount flag that tells if it is necessary
1250                         to take the curve's orientation into account for the
1251                         operation. I.e. if this flag is set, the results for
1252                         the same parameters (except the value 0.5) is different
1253                         for forward and reversed curves. If it is not set
1254                         the result is the same.
1255                 theName Object name; when specified, this parameter is used
1256                         for result publication in the study. Otherwise, if automatic
1257                         publication is switched on, default value is used for result name.
1258
1259             Returns:
1260                 New GEOM.GEOM_Object, containing the created point.
1261
1262             Example of usage:
1263                 p_on_arc = geompy.MakeVertexOnCurve(Arc, 0.25)
1264             """
1265             # Example: see GEOM_TestAll.py
1266             theParameter, takeOrientationIntoAccount, Parameters = ParseParameters(
1267                 theParameter, takeOrientationIntoAccount)
1268             anObj = self.BasicOp.MakePointOnCurve(theRefCurve, theParameter,
1269                                                   takeOrientationIntoAccount)
1270             RaiseIfFailed("MakePointOnCurve", self.BasicOp)
1271             anObj.SetParameters(Parameters)
1272             self._autoPublish(anObj, theName, "vertex")
1273             return anObj
1274
1275         ## Create a point by projection give coordinates on the given curve
1276         #  @param theRefCurve The referenced curve.
1277         #  @param theX X-coordinate in 3D space
1278         #  @param theY Y-coordinate in 3D space
1279         #  @param theZ Z-coordinate in 3D space
1280         #  @param theName Object name; when specified, this parameter is used
1281         #         for result publication in the study. Otherwise, if automatic
1282         #         publication is switched on, default value is used for result name.
1283         #
1284         #  @return New GEOM.GEOM_Object, containing the created point.
1285         #
1286         #  @ref tui_creation_point "Example"
1287         @ManageTransactions("BasicOp")
1288         def MakeVertexOnCurveByCoord(self, theRefCurve, theX, theY, theZ, theName=None):
1289             """
1290             Create a point by projection give coordinates on the given curve
1291
1292             Parameters:
1293                 theRefCurve The referenced curve.
1294                 theX X-coordinate in 3D space
1295                 theY Y-coordinate in 3D space
1296                 theZ Z-coordinate in 3D space
1297                 theName Object name; when specified, this parameter is used
1298                         for result publication in the study. Otherwise, if automatic
1299                         publication is switched on, default value is used for result name.
1300
1301             Returns:
1302                 New GEOM.GEOM_Object, containing the created point.
1303
1304             Example of usage:
1305                 p_on_arc3 = geompy.MakeVertexOnCurveByCoord(Arc, 100, -10, 10)
1306             """
1307             # Example: see GEOM_TestAll.py
1308             theX, theY, theZ, Parameters = ParseParameters(theX, theY, theZ)
1309             anObj = self.BasicOp.MakePointOnCurveByCoord(theRefCurve, theX, theY, theZ)
1310             RaiseIfFailed("MakeVertexOnCurveByCoord", self.BasicOp)
1311             anObj.SetParameters(Parameters)
1312             self._autoPublish(anObj, theName, "vertex")
1313             return anObj
1314
1315         ## Create a point, corresponding to the given length on the given curve.
1316         #  @param theRefCurve The referenced curve.
1317         #  @param theLength Length on the referenced curve. It can be negative.
1318         #  @param theStartPoint Point allowing to choose the direction for the calculation
1319         #                       of the length. If None, start from the first point of theRefCurve.
1320         #  @param theName Object name; when specified, this parameter is used
1321         #         for result publication in the study. Otherwise, if automatic
1322         #         publication is switched on, default value is used for result name.
1323         #
1324         #  @return New GEOM.GEOM_Object, containing the created point.
1325         #
1326         #  @ref tui_creation_point "Example"
1327         @ManageTransactions("BasicOp")
1328         def MakeVertexOnCurveByLength(self, theRefCurve, theLength, theStartPoint = None, theName=None):
1329             """
1330             Create a point, corresponding to the given length on the given curve.
1331
1332             Parameters:
1333                 theRefCurve The referenced curve.
1334                 theLength Length on the referenced curve. It can be negative.
1335                 theStartPoint Point allowing to choose the direction for the calculation
1336                               of the length. If None, start from the first point of theRefCurve.
1337                 theName Object name; when specified, this parameter is used
1338                         for result publication in the study. Otherwise, if automatic
1339                         publication is switched on, default value is used for result name.
1340
1341             Returns:
1342                 New GEOM.GEOM_Object, containing the created point.
1343             """
1344             # Example: see GEOM_TestAll.py
1345             theLength, Parameters = ParseParameters(theLength)
1346             anObj = self.BasicOp.MakePointOnCurveByLength(theRefCurve, theLength, theStartPoint)
1347             RaiseIfFailed("MakePointOnCurveByLength", self.BasicOp)
1348             anObj.SetParameters(Parameters)
1349             self._autoPublish(anObj, theName, "vertex")
1350             return anObj
1351
1352         ## Create a point, corresponding to the given parameters on the
1353         #    given surface.
1354         #  @param theRefSurf The referenced surface.
1355         #  @param theUParameter Value of U-parameter on the referenced surface.
1356         #  @param theVParameter Value of V-parameter on the referenced surface.
1357         #  @param theName Object name; when specified, this parameter is used
1358         #         for result publication in the study. Otherwise, if automatic
1359         #         publication is switched on, default value is used for result name.
1360         #
1361         #  @return New GEOM.GEOM_Object, containing the created point.
1362         #
1363         #  @ref swig_MakeVertexOnSurface "Example"
1364         @ManageTransactions("BasicOp")
1365         def MakeVertexOnSurface(self, theRefSurf, theUParameter, theVParameter, theName=None):
1366             """
1367             Create a point, corresponding to the given parameters on the
1368             given surface.
1369
1370             Parameters:
1371                 theRefSurf The referenced surface.
1372                 theUParameter Value of U-parameter on the referenced surface.
1373                 theVParameter Value of V-parameter on the referenced surface.
1374                 theName Object name; when specified, this parameter is used
1375                         for result publication in the study. Otherwise, if automatic
1376                         publication is switched on, default value is used for result name.
1377
1378             Returns:
1379                 New GEOM.GEOM_Object, containing the created point.
1380
1381             Example of usage:
1382                 p_on_face = geompy.MakeVertexOnSurface(Face, 0.1, 0.8)
1383             """
1384             theUParameter, theVParameter, Parameters = ParseParameters(theUParameter, theVParameter)
1385             # Example: see GEOM_TestAll.py
1386             anObj = self.BasicOp.MakePointOnSurface(theRefSurf, theUParameter, theVParameter)
1387             RaiseIfFailed("MakePointOnSurface", self.BasicOp)
1388             anObj.SetParameters(Parameters);
1389             self._autoPublish(anObj, theName, "vertex")
1390             return anObj
1391
1392         ## Create a point by projection give coordinates on the given surface
1393         #  @param theRefSurf The referenced surface.
1394         #  @param theX X-coordinate in 3D space
1395         #  @param theY Y-coordinate in 3D space
1396         #  @param theZ Z-coordinate in 3D space
1397         #  @param theName Object name; when specified, this parameter is used
1398         #         for result publication in the study. Otherwise, if automatic
1399         #         publication is switched on, default value is used for result name.
1400         #
1401         #  @return New GEOM.GEOM_Object, containing the created point.
1402         #
1403         #  @ref swig_MakeVertexOnSurfaceByCoord "Example"
1404         @ManageTransactions("BasicOp")
1405         def MakeVertexOnSurfaceByCoord(self, theRefSurf, theX, theY, theZ, theName=None):
1406             """
1407             Create a point by projection give coordinates on the given surface
1408
1409             Parameters:
1410                 theRefSurf The referenced surface.
1411                 theX X-coordinate in 3D space
1412                 theY Y-coordinate in 3D space
1413                 theZ Z-coordinate in 3D space
1414                 theName Object name; when specified, this parameter is used
1415                         for result publication in the study. Otherwise, if automatic
1416                         publication is switched on, default value is used for result name.
1417
1418             Returns:
1419                 New GEOM.GEOM_Object, containing the created point.
1420
1421             Example of usage:
1422                 p_on_face2 = geompy.MakeVertexOnSurfaceByCoord(Face, 0., 0., 0.)
1423             """
1424             theX, theY, theZ, Parameters = ParseParameters(theX, theY, theZ)
1425             # Example: see GEOM_TestAll.py
1426             anObj = self.BasicOp.MakePointOnSurfaceByCoord(theRefSurf, theX, theY, theZ)
1427             RaiseIfFailed("MakeVertexOnSurfaceByCoord", self.BasicOp)
1428             anObj.SetParameters(Parameters);
1429             self._autoPublish(anObj, theName, "vertex")
1430             return anObj
1431
1432         ## Create a point, which lays on the given face.
1433         #  The point will lay in arbitrary place of the face.
1434         #  The only condition on it is a non-zero distance to the face boundary.
1435         #  Such point can be used to uniquely identify the face inside any
1436         #  shape in case, when the shape does not contain overlapped faces.
1437         #  @param theFace The referenced face.
1438         #  @param theName Object name; when specified, this parameter is used
1439         #         for result publication in the study. Otherwise, if automatic
1440         #         publication is switched on, default value is used for result name.
1441         #
1442         #  @return New GEOM.GEOM_Object, containing the created point.
1443         #
1444         #  @ref swig_MakeVertexInsideFace "Example"
1445         @ManageTransactions("BasicOp")
1446         def MakeVertexInsideFace (self, theFace, theNumberOfPnts=1, theName=None):
1447             """
1448             Create a point, which lays on the given face.
1449             The point will lay in arbitrary place of the face.
1450             The only condition on it is a non-zero distance to the face boundary.
1451             Such point can be used to uniquely identify the face inside any
1452             shape in case, when the shape does not contain overlapped faces.
1453
1454             Parameters:
1455                 theFace The referenced face.
1456                 theNumberOfPnts The number of points we want to get, 1 by default.
1457                 theName Object name; when specified, this parameter is used
1458                         for result publication in the study. Otherwise, if automatic
1459                         publication is switched on, default value is used for result name.
1460
1461             Returns:
1462                 New GEOM.GEOM_Object, containing the created point.
1463
1464             Example of usage:
1465                 p_on_face = geompy.MakeVertexInsideFace(Face)
1466             """
1467             # Example: see GEOM_TestAll.py
1468             anObj = self.BasicOp.MakePointOnFace(theFace, theNumberOfPnts)
1469             RaiseIfFailed("MakeVertexInsideFace", self.BasicOp)
1470             self._autoPublish(anObj, theName, "vertex")
1471             return anObj
1472
1473         ## Create a point on intersection of two lines.
1474         #  @param theRefLine1, theRefLine2 The referenced lines.
1475         #  @param theName Object name; when specified, this parameter is used
1476         #         for result publication in the study. Otherwise, if automatic
1477         #         publication is switched on, default value is used for result name.
1478         #
1479         #  @return New GEOM.GEOM_Object, containing the created point.
1480         #
1481         #  @ref swig_MakeVertexOnLinesIntersection "Example"
1482         @ManageTransactions("BasicOp")
1483         def MakeVertexOnLinesIntersection(self, theRefLine1, theRefLine2, theName=None):
1484             """
1485             Create a point on intersection of two lines.
1486
1487             Parameters:
1488                 theRefLine1, theRefLine2 The referenced lines.
1489                 theName Object name; when specified, this parameter is used
1490                         for result publication in the study. Otherwise, if automatic
1491                         publication is switched on, default value is used for result name.
1492
1493             Returns:
1494                 New GEOM.GEOM_Object, containing the created point.
1495             """
1496             # Example: see GEOM_TestAll.py
1497             anObj = self.BasicOp.MakePointOnLinesIntersection(theRefLine1, theRefLine2)
1498             RaiseIfFailed("MakePointOnLinesIntersection", self.BasicOp)
1499             self._autoPublish(anObj, theName, "vertex")
1500             return anObj
1501
1502         ## Create a tangent, corresponding to the given parameter on the given curve.
1503         #  @param theRefCurve The referenced curve.
1504         #  @param theParameter Value of parameter on the referenced curve.
1505         #  @param theName Object name; when specified, this parameter is used
1506         #         for result publication in the study. Otherwise, if automatic
1507         #         publication is switched on, default value is used for result name.
1508         #
1509         #  @return New GEOM.GEOM_Object, containing the created tangent.
1510         #
1511         #  @ref swig_MakeTangentOnCurve "Example"
1512         @ManageTransactions("BasicOp")
1513         def MakeTangentOnCurve(self, theRefCurve, theParameter, theName=None):
1514             """
1515             Create a tangent, corresponding to the given parameter on the given curve.
1516
1517             Parameters:
1518                 theRefCurve The referenced curve.
1519                 theParameter Value of parameter on the referenced curve.
1520                 theName Object name; when specified, this parameter is used
1521                         for result publication in the study. Otherwise, if automatic
1522                         publication is switched on, default value is used for result name.
1523
1524             Returns:
1525                 New GEOM.GEOM_Object, containing the created tangent.
1526
1527             Example of usage:
1528                 tan_on_arc = geompy.MakeTangentOnCurve(Arc, 0.7)
1529             """
1530             anObj = self.BasicOp.MakeTangentOnCurve(theRefCurve, theParameter)
1531             RaiseIfFailed("MakeTangentOnCurve", self.BasicOp)
1532             self._autoPublish(anObj, theName, "tangent")
1533             return anObj
1534
1535         ## Create a tangent plane, corresponding to the given parameter on the given face.
1536         #  @param theFace The face for which tangent plane should be built.
1537         #  @param theParameterV vertical value of the center point (0.0 - 1.0).
1538         #  @param theParameterU horisontal value of the center point (0.0 - 1.0).
1539         #  @param theTrimSize the size of plane.
1540         #  @param theName Object name; when specified, this parameter is used
1541         #         for result publication in the study. Otherwise, if automatic
1542         #         publication is switched on, default value is used for result name.
1543         #
1544         #  @return New GEOM.GEOM_Object, containing the created tangent.
1545         #
1546         #  @ref swig_MakeTangentPlaneOnFace "Example"
1547         @ManageTransactions("BasicOp")
1548         def MakeTangentPlaneOnFace(self, theFace, theParameterU, theParameterV, theTrimSize, theName=None):
1549             """
1550             Create a tangent plane, corresponding to the given parameter on the given face.
1551
1552             Parameters:
1553                 theFace The face for which tangent plane should be built.
1554                 theParameterV vertical value of the center point (0.0 - 1.0).
1555                 theParameterU horisontal value of the center point (0.0 - 1.0).
1556                 theTrimSize the size of plane.
1557                 theName Object name; when specified, this parameter is used
1558                         for result publication in the study. Otherwise, if automatic
1559                         publication is switched on, default value is used for result name.
1560
1561            Returns:
1562                 New GEOM.GEOM_Object, containing the created tangent.
1563
1564            Example of usage:
1565                 an_on_face = geompy.MakeTangentPlaneOnFace(tan_extrusion, 0.7, 0.5, 150)
1566             """
1567             anObj = self.BasicOp.MakeTangentPlaneOnFace(theFace, theParameterU, theParameterV, theTrimSize)
1568             RaiseIfFailed("MakeTangentPlaneOnFace", self.BasicOp)
1569             self._autoPublish(anObj, theName, "tangent")
1570             return anObj
1571
1572         ## Create a vector with the given components.
1573         #  @param theDX X component of the vector.
1574         #  @param theDY Y component of the vector.
1575         #  @param theDZ Z component of the vector.
1576         #  @param theName Object name; when specified, this parameter is used
1577         #         for result publication in the study. Otherwise, if automatic
1578         #         publication is switched on, default value is used for result name.
1579         #
1580         #  @return New GEOM.GEOM_Object, containing the created vector.
1581         #
1582         #  @ref tui_creation_vector "Example"
1583         @ManageTransactions("BasicOp")
1584         def MakeVectorDXDYDZ(self, theDX, theDY, theDZ, theName=None):
1585             """
1586             Create a vector with the given components.
1587
1588             Parameters:
1589                 theDX X component of the vector.
1590                 theDY Y component of the vector.
1591                 theDZ Z component of the vector.
1592                 theName Object name; when specified, this parameter is used
1593                         for result publication in the study. Otherwise, if automatic
1594                         publication is switched on, default value is used for result name.
1595
1596             Returns:
1597                 New GEOM.GEOM_Object, containing the created vector.
1598             """
1599             # Example: see GEOM_TestAll.py
1600             theDX,theDY,theDZ,Parameters = ParseParameters(theDX, theDY, theDZ)
1601             anObj = self.BasicOp.MakeVectorDXDYDZ(theDX, theDY, theDZ)
1602             RaiseIfFailed("MakeVectorDXDYDZ", self.BasicOp)
1603             anObj.SetParameters(Parameters)
1604             self._autoPublish(anObj, theName, "vector")
1605             return anObj
1606
1607         ## Create a vector between two points.
1608         #  @param thePnt1 Start point for the vector.
1609         #  @param thePnt2 End point for the vector.
1610         #  @param theName Object name; when specified, this parameter is used
1611         #         for result publication in the study. Otherwise, if automatic
1612         #         publication is switched on, default value is used for result name.
1613         #
1614         #  @return New GEOM.GEOM_Object, containing the created vector.
1615         #
1616         #  @ref tui_creation_vector "Example"
1617         @ManageTransactions("BasicOp")
1618         def MakeVector(self, thePnt1, thePnt2, theName=None):
1619             """
1620             Create a vector between two points.
1621
1622             Parameters:
1623                 thePnt1 Start point for the vector.
1624                 thePnt2 End point for the vector.
1625                 theName Object name; when specified, this parameter is used
1626                         for result publication in the study. Otherwise, if automatic
1627                         publication is switched on, default value is used for result name.
1628
1629             Returns:
1630                 New GEOM.GEOM_Object, containing the created vector.
1631             """
1632             # Example: see GEOM_TestAll.py
1633             anObj = self.BasicOp.MakeVectorTwoPnt(thePnt1, thePnt2)
1634             RaiseIfFailed("MakeVectorTwoPnt", self.BasicOp)
1635             self._autoPublish(anObj, theName, "vector")
1636             return anObj
1637
1638         ## Create a line, passing through the given point
1639         #  and parallel to the given direction
1640         #  @param thePnt Point. The resulting line will pass through it.
1641         #  @param theDir Direction. The resulting line will be parallel to it.
1642         #  @param theName Object name; when specified, this parameter is used
1643         #         for result publication in the study. Otherwise, if automatic
1644         #         publication is switched on, default value is used for result name.
1645         #
1646         #  @return New GEOM.GEOM_Object, containing the created line.
1647         #
1648         #  @ref tui_creation_line "Example"
1649         @ManageTransactions("BasicOp")
1650         def MakeLine(self, thePnt, theDir, theName=None):
1651             """
1652             Create a line, passing through the given point
1653             and parallel to the given direction
1654
1655             Parameters:
1656                 thePnt Point. The resulting line will pass through it.
1657                 theDir Direction. The resulting line will be parallel to it.
1658                 theName Object name; when specified, this parameter is used
1659                         for result publication in the study. Otherwise, if automatic
1660                         publication is switched on, default value is used for result name.
1661
1662             Returns:
1663                 New GEOM.GEOM_Object, containing the created line.
1664             """
1665             # Example: see GEOM_TestAll.py
1666             anObj = self.BasicOp.MakeLine(thePnt, theDir)
1667             RaiseIfFailed("MakeLine", self.BasicOp)
1668             self._autoPublish(anObj, theName, "line")
1669             return anObj
1670
1671         ## Create a line, passing through the given points
1672         #  @param thePnt1 First of two points, defining the line.
1673         #  @param thePnt2 Second of two points, defining the line.
1674         #  @param theName Object name; when specified, this parameter is used
1675         #         for result publication in the study. Otherwise, if automatic
1676         #         publication is switched on, default value is used for result name.
1677         #
1678         #  @return New GEOM.GEOM_Object, containing the created line.
1679         #
1680         #  @ref tui_creation_line "Example"
1681         @ManageTransactions("BasicOp")
1682         def MakeLineTwoPnt(self, thePnt1, thePnt2, theName=None):
1683             """
1684             Create a line, passing through the given points
1685
1686             Parameters:
1687                 thePnt1 First of two points, defining the line.
1688                 thePnt2 Second of two points, defining the line.
1689                 theName Object name; when specified, this parameter is used
1690                         for result publication in the study. Otherwise, if automatic
1691                         publication is switched on, default value is used for result name.
1692
1693             Returns:
1694                 New GEOM.GEOM_Object, containing the created line.
1695             """
1696             # Example: see GEOM_TestAll.py
1697             anObj = self.BasicOp.MakeLineTwoPnt(thePnt1, thePnt2)
1698             RaiseIfFailed("MakeLineTwoPnt", self.BasicOp)
1699             self._autoPublish(anObj, theName, "line")
1700             return anObj
1701
1702         ## Create a line on two faces intersection.
1703         #  @param theFace1 First of two faces, defining the line.
1704         #  @param theFace2 Second of two faces, defining the line.
1705         #  @param theName Object name; when specified, this parameter is used
1706         #         for result publication in the study. Otherwise, if automatic
1707         #         publication is switched on, default value is used for result name.
1708         #
1709         #  @return New GEOM.GEOM_Object, containing the created line.
1710         #
1711         #  @ref swig_MakeLineTwoFaces "Example"
1712         @ManageTransactions("BasicOp")
1713         def MakeLineTwoFaces(self, theFace1, theFace2, theName=None):
1714             """
1715             Create a line on two faces intersection.
1716
1717             Parameters:
1718                 theFace1 First of two faces, defining the line.
1719                 theFace2 Second of two faces, defining the line.
1720                 theName Object name; when specified, this parameter is used
1721                         for result publication in the study. Otherwise, if automatic
1722                         publication is switched on, default value is used for result name.
1723
1724             Returns:
1725                 New GEOM.GEOM_Object, containing the created line.
1726             """
1727             # Example: see GEOM_TestAll.py
1728             anObj = self.BasicOp.MakeLineTwoFaces(theFace1, theFace2)
1729             RaiseIfFailed("MakeLineTwoFaces", self.BasicOp)
1730             self._autoPublish(anObj, theName, "line")
1731             return anObj
1732
1733         ## Create a plane, passing through the given point
1734         #  and normal to the given vector.
1735         #  @param thePnt Point, the plane has to pass through.
1736         #  @param theVec Vector, defining the plane normal direction.
1737         #  @param theTrimSize Half size of a side of quadrangle face, representing the plane.
1738         #  @param theName Object name; when specified, this parameter is used
1739         #         for result publication in the study. Otherwise, if automatic
1740         #         publication is switched on, default value is used for result name.
1741         #
1742         #  @return New GEOM.GEOM_Object, containing the created plane.
1743         #
1744         #  @ref tui_creation_plane "Example"
1745         @ManageTransactions("BasicOp")
1746         def MakePlane(self, thePnt, theVec, theTrimSize, theName=None):
1747             """
1748             Create a plane, passing through the given point
1749             and normal to the given vector.
1750
1751             Parameters:
1752                 thePnt Point, the plane has to pass through.
1753                 theVec Vector, defining the plane normal direction.
1754                 theTrimSize Half size of a side of quadrangle face, representing the plane.
1755                 theName Object name; when specified, this parameter is used
1756                         for result publication in the study. Otherwise, if automatic
1757                         publication is switched on, default value is used for result name.
1758
1759             Returns:
1760                 New GEOM.GEOM_Object, containing the created plane.
1761             """
1762             # Example: see GEOM_TestAll.py
1763             theTrimSize, Parameters = ParseParameters(theTrimSize);
1764             anObj = self.BasicOp.MakePlanePntVec(thePnt, theVec, theTrimSize)
1765             RaiseIfFailed("MakePlanePntVec", self.BasicOp)
1766             anObj.SetParameters(Parameters)
1767             self._autoPublish(anObj, theName, "plane")
1768             return anObj
1769
1770         ## Create a plane, passing through the three given points
1771         #  @param thePnt1 First of three points, defining the plane.
1772         #  @param thePnt2 Second of three points, defining the plane.
1773         #  @param thePnt3 Third of three points, defining the plane.
1774         #  @param theTrimSize Half size of a side of quadrangle face, representing the plane.
1775         #  @param theName Object name; when specified, this parameter is used
1776         #         for result publication in the study. Otherwise, if automatic
1777         #         publication is switched on, default value is used for result name.
1778         #
1779         #  @return New GEOM.GEOM_Object, containing the created plane.
1780         #
1781         #  @ref tui_creation_plane "Example"
1782         @ManageTransactions("BasicOp")
1783         def MakePlaneThreePnt(self, thePnt1, thePnt2, thePnt3, theTrimSize, theName=None):
1784             """
1785             Create a plane, passing through the three given points
1786
1787             Parameters:
1788                 thePnt1 First of three points, defining the plane.
1789                 thePnt2 Second of three points, defining the plane.
1790                 thePnt3 Third of three points, defining the plane.
1791                 theTrimSize Half size of a side of quadrangle face, representing the plane.
1792                 theName Object name; when specified, this parameter is used
1793                         for result publication in the study. Otherwise, if automatic
1794                         publication is switched on, default value is used for result name.
1795
1796             Returns:
1797                 New GEOM.GEOM_Object, containing the created plane.
1798             """
1799             # Example: see GEOM_TestAll.py
1800             theTrimSize, Parameters = ParseParameters(theTrimSize);
1801             anObj = self.BasicOp.MakePlaneThreePnt(thePnt1, thePnt2, thePnt3, theTrimSize)
1802             RaiseIfFailed("MakePlaneThreePnt", self.BasicOp)
1803             anObj.SetParameters(Parameters)
1804             self._autoPublish(anObj, theName, "plane")
1805             return anObj
1806
1807         ## Create a plane, similar to the existing one, but with another size of representing face.
1808         #  @param theFace Referenced plane or LCS(Marker).
1809         #  @param theTrimSize New half size of a side of quadrangle face, representing the plane.
1810         #  @param theName Object name; when specified, this parameter is used
1811         #         for result publication in the study. Otherwise, if automatic
1812         #         publication is switched on, default value is used for result name.
1813         #
1814         #  @return New GEOM.GEOM_Object, containing the created plane.
1815         #
1816         #  @ref tui_creation_plane "Example"
1817         @ManageTransactions("BasicOp")
1818         def MakePlaneFace(self, theFace, theTrimSize, theName=None):
1819             """
1820             Create a plane, similar to the existing one, but with another size of representing face.
1821
1822             Parameters:
1823                 theFace Referenced plane or LCS(Marker).
1824                 theTrimSize New half size of a side of quadrangle face, representing the plane.
1825                 theName Object name; when specified, this parameter is used
1826                         for result publication in the study. Otherwise, if automatic
1827                         publication is switched on, default value is used for result name.
1828
1829             Returns:
1830                 New GEOM.GEOM_Object, containing the created plane.
1831             """
1832             # Example: see GEOM_TestAll.py
1833             theTrimSize, Parameters = ParseParameters(theTrimSize);
1834             anObj = self.BasicOp.MakePlaneFace(theFace, theTrimSize)
1835             RaiseIfFailed("MakePlaneFace", self.BasicOp)
1836             anObj.SetParameters(Parameters)
1837             self._autoPublish(anObj, theName, "plane")
1838             return anObj
1839
1840         ## Create a plane, passing through the 2 vectors
1841         #  with center in a start point of the first vector.
1842         #  @param theVec1 Vector, defining center point and plane direction.
1843         #  @param theVec2 Vector, defining the plane normal direction.
1844         #  @param theTrimSize Half size of a side of quadrangle face, representing the plane.
1845         #  @param theName Object name; when specified, this parameter is used
1846         #         for result publication in the study. Otherwise, if automatic
1847         #         publication is switched on, default value is used for result name.
1848         #
1849         #  @return New GEOM.GEOM_Object, containing the created plane.
1850         #
1851         #  @ref tui_creation_plane "Example"
1852         @ManageTransactions("BasicOp")
1853         def MakePlane2Vec(self, theVec1, theVec2, theTrimSize, theName=None):
1854             """
1855             Create a plane, passing through the 2 vectors
1856             with center in a start point of the first vector.
1857
1858             Parameters:
1859                 theVec1 Vector, defining center point and plane direction.
1860                 theVec2 Vector, defining the plane normal direction.
1861                 theTrimSize Half size of a side of quadrangle face, representing the plane.
1862                 theName Object name; when specified, this parameter is used
1863                         for result publication in the study. Otherwise, if automatic
1864                         publication is switched on, default value is used for result name.
1865
1866             Returns:
1867                 New GEOM.GEOM_Object, containing the created plane.
1868             """
1869             # Example: see GEOM_TestAll.py
1870             theTrimSize, Parameters = ParseParameters(theTrimSize);
1871             anObj = self.BasicOp.MakePlane2Vec(theVec1, theVec2, theTrimSize)
1872             RaiseIfFailed("MakePlane2Vec", self.BasicOp)
1873             anObj.SetParameters(Parameters)
1874             self._autoPublish(anObj, theName, "plane")
1875             return anObj
1876
1877         ## Create a plane, based on a Local coordinate system.
1878         #  @param theLCS  coordinate system, defining plane.
1879         #  @param theTrimSize Half size of a side of quadrangle face, representing the plane.
1880         #  @param theOrientation OXY, OYZ or OZX orientation - (1, 2 or 3)
1881         #  @param theName Object name; when specified, this parameter is used
1882         #         for result publication in the study. Otherwise, if automatic
1883         #         publication is switched on, default value is used for result name.
1884         #
1885         #  @return New GEOM.GEOM_Object, containing the created plane.
1886         #
1887         #  @ref tui_creation_plane "Example"
1888         @ManageTransactions("BasicOp")
1889         def MakePlaneLCS(self, theLCS, theTrimSize, theOrientation, theName=None):
1890             """
1891             Create a plane, based on a Local coordinate system.
1892
1893            Parameters:
1894                 theLCS  coordinate system, defining plane.
1895                 theTrimSize Half size of a side of quadrangle face, representing the plane.
1896                 theOrientation OXY, OYZ or OZX orientation - (1, 2 or 3)
1897                 theName Object name; when specified, this parameter is used
1898                         for result publication in the study. Otherwise, if automatic
1899                         publication is switched on, default value is used for result name.
1900
1901             Returns:
1902                 New GEOM.GEOM_Object, containing the created plane.
1903             """
1904             # Example: see GEOM_TestAll.py
1905             theTrimSize, Parameters = ParseParameters(theTrimSize);
1906             anObj = self.BasicOp.MakePlaneLCS(theLCS, theTrimSize, theOrientation)
1907             RaiseIfFailed("MakePlaneLCS", self.BasicOp)
1908             anObj.SetParameters(Parameters)
1909             self._autoPublish(anObj, theName, "plane")
1910             return anObj
1911
1912         ## Create a local coordinate system.
1913         #  @param OX,OY,OZ Three coordinates of coordinate system origin.
1914         #  @param XDX,XDY,XDZ Three components of OX direction
1915         #  @param YDX,YDY,YDZ Three components of OY direction
1916         #  @param theName Object name; when specified, this parameter is used
1917         #         for result publication in the study. Otherwise, if automatic
1918         #         publication is switched on, default value is used for result name.
1919         #
1920         #  @return New GEOM.GEOM_Object, containing the created coordinate system.
1921         #
1922         #  @ref swig_MakeMarker "Example"
1923         @ManageTransactions("BasicOp")
1924         def MakeMarker(self, OX,OY,OZ, XDX,XDY,XDZ, YDX,YDY,YDZ, theName=None):
1925             """
1926             Create a local coordinate system.
1927
1928             Parameters:
1929                 OX,OY,OZ Three coordinates of coordinate system origin.
1930                 XDX,XDY,XDZ Three components of OX direction
1931                 YDX,YDY,YDZ Three components of OY direction
1932                 theName Object name; when specified, this parameter is used
1933                         for result publication in the study. Otherwise, if automatic
1934                         publication is switched on, default value is used for result name.
1935
1936             Returns:
1937                 New GEOM.GEOM_Object, containing the created coordinate system.
1938             """
1939             # Example: see GEOM_TestAll.py
1940             OX,OY,OZ, XDX,XDY,XDZ, YDX,YDY,YDZ, Parameters = ParseParameters(OX,OY,OZ, XDX,XDY,XDZ, YDX,YDY,YDZ);
1941             anObj = self.BasicOp.MakeMarker(OX,OY,OZ, XDX,XDY,XDZ, YDX,YDY,YDZ)
1942             RaiseIfFailed("MakeMarker", self.BasicOp)
1943             anObj.SetParameters(Parameters)
1944             self._autoPublish(anObj, theName, "lcs")
1945             return anObj
1946
1947         ## Create a local coordinate system from shape.
1948         #  @param theShape The initial shape to detect the coordinate system.
1949         #  @param theName Object name; when specified, this parameter is used
1950         #         for result publication in the study. Otherwise, if automatic
1951         #         publication is switched on, default value is used for result name.
1952         #
1953         #  @return New GEOM.GEOM_Object, containing the created coordinate system.
1954         #
1955         #  @ref tui_creation_lcs "Example"
1956         @ManageTransactions("BasicOp")
1957         def MakeMarkerFromShape(self, theShape, theName=None):
1958             """
1959             Create a local coordinate system from shape.
1960
1961             Parameters:
1962                 theShape The initial shape to detect the coordinate system.
1963                 theName Object name; when specified, this parameter is used
1964                         for result publication in the study. Otherwise, if automatic
1965                         publication is switched on, default value is used for result name.
1966
1967             Returns:
1968                 New GEOM.GEOM_Object, containing the created coordinate system.
1969             """
1970             anObj = self.BasicOp.MakeMarkerFromShape(theShape)
1971             RaiseIfFailed("MakeMarkerFromShape", self.BasicOp)
1972             self._autoPublish(anObj, theName, "lcs")
1973             return anObj
1974
1975         ## Create a local coordinate system from point and two vectors.
1976         #  @param theOrigin Point of coordinate system origin.
1977         #  @param theXVec Vector of X direction
1978         #  @param theYVec Vector of Y direction
1979         #  @param theName Object name; when specified, this parameter is used
1980         #         for result publication in the study. Otherwise, if automatic
1981         #         publication is switched on, default value is used for result name.
1982         #
1983         #  @return New GEOM.GEOM_Object, containing the created coordinate system.
1984         #
1985         #  @ref tui_creation_lcs "Example"
1986         @ManageTransactions("BasicOp")
1987         def MakeMarkerPntTwoVec(self, theOrigin, theXVec, theYVec, theName=None):
1988             """
1989             Create a local coordinate system from point and two vectors.
1990
1991             Parameters:
1992                 theOrigin Point of coordinate system origin.
1993                 theXVec Vector of X direction
1994                 theYVec Vector of Y direction
1995                 theName Object name; when specified, this parameter is used
1996                         for result publication in the study. Otherwise, if automatic
1997                         publication is switched on, default value is used for result name.
1998
1999             Returns:
2000                 New GEOM.GEOM_Object, containing the created coordinate system.
2001
2002             """
2003             anObj = self.BasicOp.MakeMarkerPntTwoVec(theOrigin, theXVec, theYVec)
2004             RaiseIfFailed("MakeMarkerPntTwoVec", self.BasicOp)
2005             self._autoPublish(anObj, theName, "lcs")
2006             return anObj
2007
2008         # end of l3_basic_go
2009         ## @}
2010
2011         ## @addtogroup l4_curves
2012         ## @{
2013
2014         ##  Create an arc of circle, passing through three given points.
2015         #  @param thePnt1 Start point of the arc.
2016         #  @param thePnt2 Middle point of the arc.
2017         #  @param thePnt3 End point of the arc.
2018         #  @param theName Object name; when specified, this parameter is used
2019         #         for result publication in the study. Otherwise, if automatic
2020         #         publication is switched on, default value is used for result name.
2021         #
2022         #  @return New GEOM.GEOM_Object, containing the created arc.
2023         #
2024         #  @ref swig_MakeArc "Example"
2025         @ManageTransactions("CurvesOp")
2026         def MakeArc(self, thePnt1, thePnt2, thePnt3, theName=None):
2027             """
2028             Create an arc of circle, passing through three given points.
2029
2030             Parameters:
2031                 thePnt1 Start point of the arc.
2032                 thePnt2 Middle point of the arc.
2033                 thePnt3 End point of the arc.
2034                 theName Object name; when specified, this parameter is used
2035                         for result publication in the study. Otherwise, if automatic
2036                         publication is switched on, default value is used for result name.
2037
2038             Returns:
2039                 New GEOM.GEOM_Object, containing the created arc.
2040             """
2041             # Example: see GEOM_TestAll.py
2042             anObj = self.CurvesOp.MakeArc(thePnt1, thePnt2, thePnt3)
2043             RaiseIfFailed("MakeArc", self.CurvesOp)
2044             self._autoPublish(anObj, theName, "arc")
2045             return anObj
2046
2047         ##  Create an arc of circle from a center and 2 points.
2048         #  @param thePnt1 Center of the arc
2049         #  @param thePnt2 Start point of the arc. (Gives also the radius of the arc)
2050         #  @param thePnt3 End point of the arc (Gives also a direction)
2051         #  @param theSense Orientation of the arc
2052         #  @param theName Object name; when specified, this parameter is used
2053         #         for result publication in the study. Otherwise, if automatic
2054         #         publication is switched on, default value is used for result name.
2055         #
2056         #  @return New GEOM.GEOM_Object, containing the created arc.
2057         #
2058         #  @ref swig_MakeArc "Example"
2059         @ManageTransactions("CurvesOp")
2060         def MakeArcCenter(self, thePnt1, thePnt2, thePnt3, theSense=False, theName=None):
2061             """
2062             Create an arc of circle from a center and 2 points.
2063
2064             Parameters:
2065                 thePnt1 Center of the arc
2066                 thePnt2 Start point of the arc. (Gives also the radius of the arc)
2067                 thePnt3 End point of the arc (Gives also a direction)
2068                 theSense Orientation of the arc
2069                 theName Object name; when specified, this parameter is used
2070                         for result publication in the study. Otherwise, if automatic
2071                         publication is switched on, default value is used for result name.
2072
2073             Returns:
2074                 New GEOM.GEOM_Object, containing the created arc.
2075             """
2076             # Example: see GEOM_TestAll.py
2077             anObj = self.CurvesOp.MakeArcCenter(thePnt1, thePnt2, thePnt3, theSense)
2078             RaiseIfFailed("MakeArcCenter", self.CurvesOp)
2079             self._autoPublish(anObj, theName, "arc")
2080             return anObj
2081
2082         ##  Create an arc of ellipse, of center and two points.
2083         #  @param theCenter Center of the arc.
2084         #  @param thePnt1 defines major radius of the arc by distance from Pnt1 to Pnt2.
2085         #  @param thePnt2 defines plane of ellipse and minor radius as distance from Pnt3 to line from Pnt1 to Pnt2.
2086         #  @param theName Object name; when specified, this parameter is used
2087         #         for result publication in the study. Otherwise, if automatic
2088         #         publication is switched on, default value is used for result name.
2089         #
2090         #  @return New GEOM.GEOM_Object, containing the created arc.
2091         #
2092         #  @ref swig_MakeArc "Example"
2093         @ManageTransactions("CurvesOp")
2094         def MakeArcOfEllipse(self, theCenter, thePnt1, thePnt2, theName=None):
2095             """
2096             Create an arc of ellipse, of center and two points.
2097
2098             Parameters:
2099                 theCenter Center of the arc.
2100                 thePnt1 defines major radius of the arc by distance from Pnt1 to Pnt2.
2101                 thePnt2 defines plane of ellipse and minor radius as distance from Pnt3 to line from Pnt1 to Pnt2.
2102                 theName Object name; when specified, this parameter is used
2103                         for result publication in the study. Otherwise, if automatic
2104                         publication is switched on, default value is used for result name.
2105
2106             Returns:
2107                 New GEOM.GEOM_Object, containing the created arc.
2108             """
2109             # Example: see GEOM_TestAll.py
2110             anObj = self.CurvesOp.MakeArcOfEllipse(theCenter, thePnt1, thePnt2)
2111             RaiseIfFailed("MakeArcOfEllipse", self.CurvesOp)
2112             self._autoPublish(anObj, theName, "arc")
2113             return anObj
2114
2115         ## Create a circle with given center, normal vector and radius.
2116         #  @param thePnt Circle center.
2117         #  @param theVec Vector, normal to the plane of the circle.
2118         #  @param theR Circle radius.
2119         #  @param theName Object name; when specified, this parameter is used
2120         #         for result publication in the study. Otherwise, if automatic
2121         #         publication is switched on, default value is used for result name.
2122         #
2123         #  @return New GEOM.GEOM_Object, containing the created circle.
2124         #
2125         #  @ref tui_creation_circle "Example"
2126         @ManageTransactions("CurvesOp")
2127         def MakeCircle(self, thePnt, theVec, theR, theName=None):
2128             """
2129             Create a circle with given center, normal vector and radius.
2130
2131             Parameters:
2132                 thePnt Circle center.
2133                 theVec Vector, normal to the plane of the circle.
2134                 theR Circle radius.
2135                 theName Object name; when specified, this parameter is used
2136                         for result publication in the study. Otherwise, if automatic
2137                         publication is switched on, default value is used for result name.
2138
2139             Returns:
2140                 New GEOM.GEOM_Object, containing the created circle.
2141             """
2142             # Example: see GEOM_TestAll.py
2143             theR, Parameters = ParseParameters(theR)
2144             anObj = self.CurvesOp.MakeCirclePntVecR(thePnt, theVec, theR)
2145             RaiseIfFailed("MakeCirclePntVecR", self.CurvesOp)
2146             anObj.SetParameters(Parameters)
2147             self._autoPublish(anObj, theName, "circle")
2148             return anObj
2149
2150         ## Create a circle with given radius.
2151         #  Center of the circle will be in the origin of global
2152         #  coordinate system and normal vector will be codirected with Z axis
2153         #  @param theR Circle radius.
2154         #  @param theName Object name; when specified, this parameter is used
2155         #         for result publication in the study. Otherwise, if automatic
2156         #         publication is switched on, default value is used for result name.
2157         #
2158         #  @return New GEOM.GEOM_Object, containing the created circle.
2159         @ManageTransactions("CurvesOp")
2160         def MakeCircleR(self, theR, theName=None):
2161             """
2162             Create a circle with given radius.
2163             Center of the circle will be in the origin of global
2164             coordinate system and normal vector will be codirected with Z axis
2165
2166             Parameters:
2167                 theR Circle radius.
2168                 theName Object name; when specified, this parameter is used
2169                         for result publication in the study. Otherwise, if automatic
2170                         publication is switched on, default value is used for result name.
2171
2172             Returns:
2173                 New GEOM.GEOM_Object, containing the created circle.
2174             """
2175             anObj = self.CurvesOp.MakeCirclePntVecR(None, None, theR)
2176             RaiseIfFailed("MakeCirclePntVecR", self.CurvesOp)
2177             self._autoPublish(anObj, theName, "circle")
2178             return anObj
2179
2180         ## Create a circle, passing through three given points
2181         #  @param thePnt1,thePnt2,thePnt3 Points, defining the circle.
2182         #  @param theName Object name; when specified, this parameter is used
2183         #         for result publication in the study. Otherwise, if automatic
2184         #         publication is switched on, default value is used for result name.
2185         #
2186         #  @return New GEOM.GEOM_Object, containing the created circle.
2187         #
2188         #  @ref tui_creation_circle "Example"
2189         @ManageTransactions("CurvesOp")
2190         def MakeCircleThreePnt(self, thePnt1, thePnt2, thePnt3, theName=None):
2191             """
2192             Create a circle, passing through three given points
2193
2194             Parameters:
2195                 thePnt1,thePnt2,thePnt3 Points, defining the circle.
2196                 theName Object name; when specified, this parameter is used
2197                         for result publication in the study. Otherwise, if automatic
2198                         publication is switched on, default value is used for result name.
2199
2200             Returns:
2201                 New GEOM.GEOM_Object, containing the created circle.
2202             """
2203             # Example: see GEOM_TestAll.py
2204             anObj = self.CurvesOp.MakeCircleThreePnt(thePnt1, thePnt2, thePnt3)
2205             RaiseIfFailed("MakeCircleThreePnt", self.CurvesOp)
2206             self._autoPublish(anObj, theName, "circle")
2207             return anObj
2208
2209         ## Create a circle, with given point1 as center,
2210         #  passing through the point2 as radius and laying in the plane,
2211         #  defined by all three given points.
2212         #  @param thePnt1,thePnt2,thePnt3 Points, defining the circle.
2213         #  @param theName Object name; when specified, this parameter is used
2214         #         for result publication in the study. Otherwise, if automatic
2215         #         publication is switched on, default value is used for result name.
2216         #
2217         #  @return New GEOM.GEOM_Object, containing the created circle.
2218         #
2219         #  @ref swig_MakeCircle "Example"
2220         @ManageTransactions("CurvesOp")
2221         def MakeCircleCenter2Pnt(self, thePnt1, thePnt2, thePnt3, theName=None):
2222             """
2223             Create a circle, with given point1 as center,
2224             passing through the point2 as radius and laying in the plane,
2225             defined by all three given points.
2226
2227             Parameters:
2228                 thePnt1,thePnt2,thePnt3 Points, defining the circle.
2229                 theName Object name; when specified, this parameter is used
2230                         for result publication in the study. Otherwise, if automatic
2231                         publication is switched on, default value is used for result name.
2232
2233             Returns:
2234                 New GEOM.GEOM_Object, containing the created circle.
2235             """
2236             # Example: see GEOM_example6.py
2237             anObj = self.CurvesOp.MakeCircleCenter2Pnt(thePnt1, thePnt2, thePnt3)
2238             RaiseIfFailed("MakeCircleCenter2Pnt", self.CurvesOp)
2239             self._autoPublish(anObj, theName, "circle")
2240             return anObj
2241
2242         ## Create an ellipse with given center, normal vector and radiuses.
2243         #  @param thePnt Ellipse center.
2244         #  @param theVec Vector, normal to the plane of the ellipse.
2245         #  @param theRMajor Major ellipse radius.
2246         #  @param theRMinor Minor ellipse radius.
2247         #  @param theVecMaj Vector, direction of the ellipse's main axis.
2248         #  @param theName Object name; when specified, this parameter is used
2249         #         for result publication in the study. Otherwise, if automatic
2250         #         publication is switched on, default value is used for result name.
2251         #
2252         #  @return New GEOM.GEOM_Object, containing the created ellipse.
2253         #
2254         #  @ref tui_creation_ellipse "Example"
2255         @ManageTransactions("CurvesOp")
2256         def MakeEllipse(self, thePnt, theVec, theRMajor, theRMinor, theVecMaj=None, theName=None):
2257             """
2258             Create an ellipse with given center, normal vector and radiuses.
2259
2260             Parameters:
2261                 thePnt Ellipse center.
2262                 theVec Vector, normal to the plane of the ellipse.
2263                 theRMajor Major ellipse radius.
2264                 theRMinor Minor ellipse radius.
2265                 theVecMaj Vector, direction of the ellipse's main axis.
2266                 theName Object name; when specified, this parameter is used
2267                         for result publication in the study. Otherwise, if automatic
2268                         publication is switched on, default value is used for result name.
2269
2270             Returns:
2271                 New GEOM.GEOM_Object, containing the created ellipse.
2272             """
2273             # Example: see GEOM_TestAll.py
2274             theRMajor, theRMinor, Parameters = ParseParameters(theRMajor, theRMinor)
2275             if theVecMaj is not None:
2276                 anObj = self.CurvesOp.MakeEllipseVec(thePnt, theVec, theRMajor, theRMinor, theVecMaj)
2277             else:
2278                 anObj = self.CurvesOp.MakeEllipse(thePnt, theVec, theRMajor, theRMinor)
2279                 pass
2280             RaiseIfFailed("MakeEllipse", self.CurvesOp)
2281             anObj.SetParameters(Parameters)
2282             self._autoPublish(anObj, theName, "ellipse")
2283             return anObj
2284
2285         ## Create an ellipse with given radiuses.
2286         #  Center of the ellipse will be in the origin of global
2287         #  coordinate system and normal vector will be codirected with Z axis
2288         #  @param theRMajor Major ellipse radius.
2289         #  @param theRMinor Minor ellipse radius.
2290         #  @param theName Object name; when specified, this parameter is used
2291         #         for result publication in the study. Otherwise, if automatic
2292         #         publication is switched on, default value is used for result name.
2293         #
2294         #  @return New GEOM.GEOM_Object, containing the created ellipse.
2295         @ManageTransactions("CurvesOp")
2296         def MakeEllipseRR(self, theRMajor, theRMinor, theName=None):
2297             """
2298             Create an ellipse with given radiuses.
2299             Center of the ellipse will be in the origin of global
2300             coordinate system and normal vector will be codirected with Z axis
2301
2302             Parameters:
2303                 theRMajor Major ellipse radius.
2304                 theRMinor Minor ellipse radius.
2305                 theName Object name; when specified, this parameter is used
2306                         for result publication in the study. Otherwise, if automatic
2307                         publication is switched on, default value is used for result name.
2308
2309             Returns:
2310             New GEOM.GEOM_Object, containing the created ellipse.
2311             """
2312             anObj = self.CurvesOp.MakeEllipse(None, None, theRMajor, theRMinor)
2313             RaiseIfFailed("MakeEllipse", self.CurvesOp)
2314             self._autoPublish(anObj, theName, "ellipse")
2315             return anObj
2316
2317         ## Create a polyline on the set of points.
2318         #  @param thePoints Sequence of points for the polyline.
2319         #  @param theIsClosed If True, build a closed wire.
2320         #  @param theName Object name; when specified, this parameter is used
2321         #         for result publication in the study. Otherwise, if automatic
2322         #         publication is switched on, default value is used for result name.
2323         #
2324         #  @return New GEOM.GEOM_Object, containing the created polyline.
2325         #
2326         #  @ref tui_creation_curve "Example"
2327         @ManageTransactions("CurvesOp")
2328         def MakePolyline(self, thePoints, theIsClosed=False, theName=None):
2329             """
2330             Create a polyline on the set of points.
2331
2332             Parameters:
2333                 thePoints Sequence of points for the polyline.
2334                 theIsClosed If True, build a closed wire.
2335                 theName Object name; when specified, this parameter is used
2336                         for result publication in the study. Otherwise, if automatic
2337                         publication is switched on, default value is used for result name.
2338
2339             Returns:
2340                 New GEOM.GEOM_Object, containing the created polyline.
2341             """
2342             # Example: see GEOM_TestAll.py
2343             anObj = self.CurvesOp.MakePolyline(thePoints, theIsClosed)
2344             RaiseIfFailed("MakePolyline", self.CurvesOp)
2345             self._autoPublish(anObj, theName, "polyline")
2346             return anObj
2347
2348         ## Create bezier curve on the set of points.
2349         #  @param thePoints Sequence of points for the bezier curve.
2350         #  @param theIsClosed If True, build a closed curve.
2351         #  @param theName Object name; when specified, this parameter is used
2352         #         for result publication in the study. Otherwise, if automatic
2353         #         publication is switched on, default value is used for result name.
2354         #
2355         #  @return New GEOM.GEOM_Object, containing the created bezier curve.
2356         #
2357         #  @ref tui_creation_curve "Example"
2358         @ManageTransactions("CurvesOp")
2359         def MakeBezier(self, thePoints, theIsClosed=False, theName=None):
2360             """
2361             Create bezier curve on the set of points.
2362
2363             Parameters:
2364                 thePoints Sequence of points for the bezier curve.
2365                 theIsClosed If True, build a closed curve.
2366                 theName Object name; when specified, this parameter is used
2367                         for result publication in the study. Otherwise, if automatic
2368                         publication is switched on, default value is used for result name.
2369
2370             Returns:
2371                 New GEOM.GEOM_Object, containing the created bezier curve.
2372             """
2373             # Example: see GEOM_TestAll.py
2374             anObj = self.CurvesOp.MakeSplineBezier(thePoints, theIsClosed)
2375             RaiseIfFailed("MakeSplineBezier", self.CurvesOp)
2376             self._autoPublish(anObj, theName, "bezier")
2377             return anObj
2378
2379         ## Create B-Spline curve on the set of points.
2380         #  @param thePoints Sequence of points for the B-Spline curve.
2381         #  @param theIsClosed If True, build a closed curve.
2382         #  @param theDoReordering If TRUE, the algo does not follow the order of
2383         #                         \a thePoints but searches for the closest vertex.
2384         #  @param theName Object name; when specified, this parameter is used
2385         #         for result publication in the study. Otherwise, if automatic
2386         #         publication is switched on, default value is used for result name.
2387         #
2388         #  @return New GEOM.GEOM_Object, containing the created B-Spline curve.
2389         #
2390         #  @ref tui_creation_curve "Example"
2391         @ManageTransactions("CurvesOp")
2392         def MakeInterpol(self, thePoints, theIsClosed=False, theDoReordering=False, theName=None):
2393             """
2394             Create B-Spline curve on the set of points.
2395
2396             Parameters:
2397                 thePoints Sequence of points for the B-Spline curve.
2398                 theIsClosed If True, build a closed curve.
2399                 theDoReordering If True, the algo does not follow the order of
2400                                 thePoints but searches for the closest vertex.
2401                 theName Object name; when specified, this parameter is used
2402                         for result publication in the study. Otherwise, if automatic
2403                         publication is switched on, default value is used for result name.
2404
2405             Returns:
2406                 New GEOM.GEOM_Object, containing the created B-Spline curve.
2407             """
2408             # Example: see GEOM_TestAll.py
2409             anObj = self.CurvesOp.MakeSplineInterpolation(thePoints, theIsClosed, theDoReordering)
2410             RaiseIfFailed("MakeInterpol", self.CurvesOp)
2411             self._autoPublish(anObj, theName, "bspline")
2412             return anObj
2413
2414         ## Create B-Spline curve on the set of points.
2415         #  @param thePoints Sequence of points for the B-Spline curve.
2416         #  @param theFirstVec Vector object, defining the curve direction at its first point.
2417         #  @param theLastVec Vector object, defining the curve direction at its last point.
2418         #  @param theName Object name; when specified, this parameter is used
2419         #         for result publication in the study. Otherwise, if automatic
2420         #         publication is switched on, default value is used for result name.
2421         #
2422         #  @return New GEOM.GEOM_Object, containing the created B-Spline curve.
2423         #
2424         #  @ref tui_creation_curve "Example"
2425         @ManageTransactions("CurvesOp")
2426         def MakeInterpolWithTangents(self, thePoints, theFirstVec, theLastVec, theName=None):
2427             """
2428             Create B-Spline curve on the set of points.
2429
2430             Parameters:
2431                 thePoints Sequence of points for the B-Spline curve.
2432                 theFirstVec Vector object, defining the curve direction at its first point.
2433                 theLastVec Vector object, defining the curve direction at its last point.
2434                 theName Object name; when specified, this parameter is used
2435                         for result publication in the study. Otherwise, if automatic
2436                         publication is switched on, default value is used for result name.
2437
2438             Returns:
2439                 New GEOM.GEOM_Object, containing the created B-Spline curve.
2440             """
2441             # Example: see GEOM_TestAll.py
2442             anObj = self.CurvesOp.MakeSplineInterpolWithTangents(thePoints, theFirstVec, theLastVec)
2443             RaiseIfFailed("MakeInterpolWithTangents", self.CurvesOp)
2444             self._autoPublish(anObj, theName, "bspline")
2445             return anObj
2446
2447         ## Creates a curve using the parametric definition of the basic points.
2448         #  @param thexExpr parametric equation of the coordinates X.
2449         #  @param theyExpr parametric equation of the coordinates Y.
2450         #  @param thezExpr parametric equation of the coordinates Z.
2451         #  @param theParamMin the minimal value of the parameter.
2452         #  @param theParamMax the maximum value of the parameter.
2453         #  @param theParamStep the number of steps if theNewMethod = True, else step value of the parameter.
2454         #  @param theCurveType the type of the curve,
2455         #         one of GEOM.Polyline, GEOM.Bezier, GEOM.Interpolation.
2456         #  @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.
2457         #  @param theName Object name; when specified, this parameter is used
2458         #         for result publication in the study. Otherwise, if automatic
2459         #         publication is switched on, default value is used for result name.
2460         #
2461         #  @return New GEOM.GEOM_Object, containing the created curve.
2462         #
2463         #  @ref tui_creation_curve "Example"
2464         @ManageTransactions("CurvesOp")
2465         def MakeCurveParametric(self, thexExpr, theyExpr, thezExpr,
2466                                 theParamMin, theParamMax, theParamStep, theCurveType, theNewMethod=False, theName=None ):
2467             """
2468             Creates a curve using the parametric definition of the basic points.
2469
2470             Parameters:
2471                 thexExpr parametric equation of the coordinates X.
2472                 theyExpr parametric equation of the coordinates Y.
2473                 thezExpr parametric equation of the coordinates Z.
2474                 theParamMin the minimal value of the parameter.
2475                 theParamMax the maximum value of the parameter.
2476                 theParamStep the number of steps if theNewMethod = True, else step value of the parameter.
2477                 theCurveType the type of the curve,
2478                              one of GEOM.Polyline, GEOM.Bezier, GEOM.Interpolation.
2479                 theNewMethod flag for switching to the new method if the flag is set to false a deprecated
2480                              method is used which can lead to a bug.
2481                 theName Object name; when specified, this parameter is used
2482                         for result publication in the study. Otherwise, if automatic
2483                         publication is switched on, default value is used for result name.
2484
2485             Returns:
2486                 New GEOM.GEOM_Object, containing the created curve.
2487             """
2488             theParamMin,theParamMax,theParamStep,Parameters = ParseParameters(theParamMin,theParamMax,theParamStep)
2489             if theNewMethod:
2490               anObj = self.CurvesOp.MakeCurveParametricNew(thexExpr,theyExpr,thezExpr,theParamMin,theParamMax,theParamStep,theCurveType)
2491             else:
2492               anObj = self.CurvesOp.MakeCurveParametric(thexExpr,theyExpr,thezExpr,theParamMin,theParamMax,theParamStep,theCurveType)
2493             RaiseIfFailed("MakeCurveParametric", self.CurvesOp)
2494             anObj.SetParameters(Parameters)
2495             self._autoPublish(anObj, theName, "curve")
2496             return anObj
2497
2498         ## Create an isoline curve on a face.
2499         #  @param theFace the face for which an isoline is created.
2500         #  @param IsUIsoline True for U-isoline creation; False for V-isoline
2501         #         creation.
2502         #  @param theParameter the U parameter for U-isoline or V parameter
2503         #         for V-isoline.
2504         #  @param theName Object name; when specified, this parameter is used
2505         #         for result publication in the study. Otherwise, if automatic
2506         #         publication is switched on, default value is used for result name.
2507         #
2508         #  @return New GEOM.GEOM_Object, containing the created isoline edge or
2509         #          a compound of edges.
2510         #
2511         #  @ref tui_creation_curve "Example"
2512         @ManageTransactions("CurvesOp")
2513         def MakeIsoline(self, theFace, IsUIsoline, theParameter, theName=None):
2514             """
2515             Create an isoline curve on a face.
2516
2517             Parameters:
2518                 theFace the face for which an isoline is created.
2519                 IsUIsoline True for U-isoline creation; False for V-isoline
2520                            creation.
2521                 theParameter the U parameter for U-isoline or V parameter
2522                              for V-isoline.
2523                 theName Object name; when specified, this parameter is used
2524                         for result publication in the study. Otherwise, if automatic
2525                         publication is switched on, default value is used for result name.
2526
2527             Returns:
2528                 New GEOM.GEOM_Object, containing the created isoline edge or a
2529                 compound of edges.
2530             """
2531             # Example: see GEOM_TestAll.py
2532             anObj = self.CurvesOp.MakeIsoline(theFace, IsUIsoline, theParameter)
2533             RaiseIfFailed("MakeIsoline", self.CurvesOp)
2534             if IsUIsoline:
2535                 self._autoPublish(anObj, theName, "U-Isoline")
2536             else:
2537                 self._autoPublish(anObj, theName, "V-Isoline")
2538             return anObj
2539
2540         # end of l4_curves
2541         ## @}
2542
2543         ## @addtogroup l3_sketcher
2544         ## @{
2545
2546         ## Create a sketcher (wire or face), following the textual description,
2547         #  passed through <VAR>theCommand</VAR> argument. \n
2548         #  Edges of the resulting wire or face will be arcs of circles and/or linear segments. \n
2549         #  Format of the description string have to be the following:
2550         #
2551         #  "Sketcher[:F x1 y1]:CMD[:CMD[:CMD...]]"
2552         #
2553         #  Where:
2554         #  - x1, y1 are coordinates of the first sketcher point (zero by default),
2555         #  - CMD is one of
2556         #     - "R angle" : Set the direction by angle
2557         #     - "D dx dy" : Set the direction by DX & DY
2558         #     .
2559         #       \n
2560         #     - "TT x y" : Create segment by point at X & Y
2561         #     - "T dx dy" : Create segment by point with DX & DY
2562         #     - "L length" : Create segment by direction & Length
2563         #     - "IX x" : Create segment by direction & Intersect. X
2564         #     - "IY y" : Create segment by direction & Intersect. Y
2565         #     .
2566         #       \n
2567         #     - "C radius length" : Create arc by direction, radius and length(in degree)
2568         #     - "AA x y": Create arc by point at X & Y
2569         #     - "A dx dy" : Create arc by point with DX & DY
2570         #     - "UU x y radius flag1": Create arc by point at X & Y with given radiUs
2571         #     - "U dx dy radius flag1" : Create arc by point with DX & DY with given radiUs
2572         #     - "EE x y xc yc flag1 flag2": Create arc by point at X & Y with given cEnter coordinates
2573         #     - "E dx dy dxc dyc radius flag1 flag2" : Create arc by point with DX & DY with given cEnter coordinates
2574         #     .
2575         #       \n
2576         #     - "WW" : Close Wire (to finish)
2577         #     - "WF" : Close Wire and build face (to finish)
2578         #     .
2579         #        \n
2580         #  - Flag1 (= reverse) is 0 or 2 ...
2581         #     - if 0 the drawn arc is the one of lower angle (< Pi)
2582         #     - if 2 the drawn arc ius the one of greater angle (> Pi)
2583         #     .
2584         #        \n
2585         #  - Flag2 (= control tolerance) is 0 or 1 ...
2586         #     - if 0 the specified end point can be at a distance of the arc greater than the tolerance (10^-7)
2587         #     - if 1 the wire is built only if the end point is on the arc
2588         #       with a tolerance of 10^-7 on the distance else the creation fails
2589         #
2590         #  @param theCommand String, defining the sketcher in local
2591         #                    coordinates of the working plane.
2592         #  @param theWorkingPlane Nine double values, defining origin,
2593         #                         OZ and OX directions of the working plane.
2594         #  @param theName Object name; when specified, this parameter is used
2595         #         for result publication in the study. Otherwise, if automatic
2596         #         publication is switched on, default value is used for result name.
2597         #
2598         #  @return New GEOM.GEOM_Object, containing the created wire.
2599         #
2600         #  @ref tui_sketcher_page "Example"
2601         @ManageTransactions("CurvesOp")
2602         def MakeSketcher(self, theCommand, theWorkingPlane = [0,0,0, 0,0,1, 1,0,0], theName=None):
2603             """
2604             Create a sketcher (wire or face), following the textual description, passed
2605             through theCommand argument.
2606             Edges of the resulting wire or face will be arcs of circles and/or linear segments.
2607             Format of the description string have to be the following:
2608                 "Sketcher[:F x1 y1]:CMD[:CMD[:CMD...]]"
2609             Where:
2610             - x1, y1 are coordinates of the first sketcher point (zero by default),
2611             - CMD is one of
2612                - "R angle" : Set the direction by angle
2613                - "D dx dy" : Set the direction by DX & DY
2614
2615                - "TT x y" : Create segment by point at X & Y
2616                - "T dx dy" : Create segment by point with DX & DY
2617                - "L length" : Create segment by direction & Length
2618                - "IX x" : Create segment by direction & Intersect. X
2619                - "IY y" : Create segment by direction & Intersect. Y
2620
2621                - "C radius length" : Create arc by direction, radius and length(in degree)
2622                - "AA x y": Create arc by point at X & Y
2623                - "A dx dy" : Create arc by point with DX & DY
2624                - "UU x y radius flag1": Create arc by point at X & Y with given radiUs
2625                - "U dx dy radius flag1" : Create arc by point with DX & DY with given radiUs
2626                - "EE x y xc yc flag1 flag2": Create arc by point at X & Y with given cEnter coordinates
2627                - "E dx dy dxc dyc radius flag1 flag2" : Create arc by point with DX & DY with given cEnter coordinates
2628
2629                - "WW" : Close Wire (to finish)
2630                - "WF" : Close Wire and build face (to finish)
2631
2632             - Flag1 (= reverse) is 0 or 2 ...
2633                - if 0 the drawn arc is the one of lower angle (< Pi)
2634                - if 2 the drawn arc ius the one of greater angle (> Pi)
2635
2636             - Flag2 (= control tolerance) is 0 or 1 ...
2637                - if 0 the specified end point can be at a distance of the arc greater than the tolerance (10^-7)
2638                - if 1 the wire is built only if the end point is on the arc
2639                  with a tolerance of 10^-7 on the distance else the creation fails
2640
2641             Parameters:
2642                 theCommand String, defining the sketcher in local
2643                            coordinates of the working plane.
2644                 theWorkingPlane Nine double values, defining origin,
2645                                 OZ and OX directions of the working plane.
2646                 theName Object name; when specified, this parameter is used
2647                         for result publication in the study. Otherwise, if automatic
2648                         publication is switched on, default value is used for result name.
2649
2650             Returns:
2651                 New GEOM.GEOM_Object, containing the created wire.
2652             """
2653             # Example: see GEOM_TestAll.py
2654             theCommand,Parameters = ParseSketcherCommand(theCommand)
2655             anObj = self.CurvesOp.MakeSketcher(theCommand, theWorkingPlane)
2656             RaiseIfFailed("MakeSketcher", self.CurvesOp)
2657             anObj.SetParameters(Parameters)
2658             self._autoPublish(anObj, theName, "wire")
2659             return anObj
2660
2661         ## Create a sketcher (wire or face), following the textual description,
2662         #  passed through <VAR>theCommand</VAR> argument. \n
2663         #  For format of the description string see MakeSketcher() method.\n
2664         #  @param theCommand String, defining the sketcher in local
2665         #                    coordinates of the working plane.
2666         #  @param theWorkingPlane Planar Face or LCS(Marker) of the working plane.
2667         #  @param theName Object name; when specified, this parameter is used
2668         #         for result publication in the study. Otherwise, if automatic
2669         #         publication is switched on, default value is used for result name.
2670         #
2671         #  @return New GEOM.GEOM_Object, containing the created wire.
2672         #
2673         #  @ref tui_sketcher_page "Example"
2674         @ManageTransactions("CurvesOp")
2675         def MakeSketcherOnPlane(self, theCommand, theWorkingPlane, theName=None):
2676             """
2677             Create a sketcher (wire or face), following the textual description,
2678             passed through theCommand argument.
2679             For format of the description string see geompy.MakeSketcher() method.
2680
2681             Parameters:
2682                 theCommand String, defining the sketcher in local
2683                            coordinates of the working plane.
2684                 theWorkingPlane Planar Face or LCS(Marker) of the working plane.
2685                 theName Object name; when specified, this parameter is used
2686                         for result publication in the study. Otherwise, if automatic
2687                         publication is switched on, default value is used for result name.
2688
2689             Returns:
2690                 New GEOM.GEOM_Object, containing the created wire.
2691             """
2692             theCommand,Parameters = ParseSketcherCommand(theCommand)
2693             anObj = self.CurvesOp.MakeSketcherOnPlane(theCommand, theWorkingPlane)
2694             RaiseIfFailed("MakeSketcherOnPlane", self.CurvesOp)
2695             anObj.SetParameters(Parameters)
2696             self._autoPublish(anObj, theName, "wire")
2697             return anObj
2698
2699         ## Obtain a 2D sketcher interface
2700         #  @return An instance of @ref gsketcher.Sketcher2D "Sketcher2D" interface
2701         def Sketcher2D (self):
2702             """
2703             Obtain a 2D sketcher interface.
2704
2705             Example of usage:
2706                sk = geompy.Sketcher2D()
2707                sk.addPoint(20, 20)
2708                sk.addSegmentRelative(15, 70)
2709                sk.addSegmentPerpY(50)
2710                sk.addArcRadiusRelative(25, 15, 14.5, 0)
2711                sk.addArcCenterAbsolute(1, 1, 50, 50, 0, 0)
2712                sk.addArcDirectionRadiusLength(20, 20, 101, 162.13)
2713                sk.close()
2714                Sketch_1 = sk.wire(geomObj_1)
2715             """
2716             sk = Sketcher2D (self)
2717             return sk
2718
2719         ## Create a sketcher wire, following the numerical description,
2720         #  passed through <VAR>theCoordinates</VAR> argument. \n
2721         #  @param theCoordinates double values, defining points to create a wire,
2722         #                                                      passing from it.
2723         #  @param theName Object name; when specified, this parameter is used
2724         #         for result publication in the study. Otherwise, if automatic
2725         #         publication is switched on, default value is used for result name.
2726         #
2727         #  @return New GEOM.GEOM_Object, containing the created wire.
2728         #
2729         #  @ref tui_3dsketcher_page "Example"
2730         @ManageTransactions("CurvesOp")
2731         def Make3DSketcher(self, theCoordinates, theName=None):
2732             """
2733             Create a sketcher wire, following the numerical description,
2734             passed through theCoordinates argument.
2735
2736             Parameters:
2737                 theCoordinates double values, defining points to create a wire,
2738                                passing from it.
2739                 theName Object name; when specified, this parameter is used
2740                         for result publication in the study. Otherwise, if automatic
2741                         publication is switched on, default value is used for result name.
2742
2743             Returns:
2744                 New GEOM_Object, containing the created wire.
2745             """
2746             theCoordinates,Parameters = ParseParameters(theCoordinates)
2747             anObj = self.CurvesOp.Make3DSketcher(theCoordinates)
2748             RaiseIfFailed("Make3DSketcher", self.CurvesOp)
2749             anObj.SetParameters(Parameters)
2750             self._autoPublish(anObj, theName, "wire")
2751             return anObj
2752
2753         ## Obtain a 3D sketcher interface
2754         #  @return An instance of @ref gsketcher.Sketcher3D "Sketcher3D" interface
2755         #
2756         #  @ref tui_3dsketcher_page "Example"
2757         def Sketcher3D (self):
2758             """
2759             Obtain a 3D sketcher interface.
2760
2761             Example of usage:
2762                 sk = geompy.Sketcher3D()
2763                 sk.addPointsAbsolute(0,0,0, 70,0,0)
2764                 sk.addPointsRelative(0, 0, 130)
2765                 sk.addPointAnglesLength("OXY", 50, 0, 100)
2766                 sk.addPointAnglesLength("OXZ", 30, 80, 130)
2767                 sk.close()
2768                 a3D_Sketcher_1 = sk.wire()
2769             """
2770             sk = Sketcher3D (self)
2771             return sk
2772
2773         ## Obtain a 2D polyline creation interface
2774         #  @return An instance of @ref gsketcher.Polyline2D "Polyline2D" interface
2775         #
2776         #  @ref tui_3dsketcher_page "Example"
2777         def Polyline2D (self):
2778             """
2779             Obtain a 2D polyline creation interface.
2780
2781             Example of usage:
2782                 pl = geompy.Polyline2D()
2783                 pl.addSection("section 1", GEOM.Polyline, True)
2784                 pl.addPoints(0, 0, 10, 0, 10, 10)
2785                 pl.addSection("section 2", GEOM.Interpolation, False)
2786                 pl.addPoints(20, 0, 30, 0, 30, 10)
2787                 resultObj = pl.result(WorkingPlane)
2788             """
2789             pl = Polyline2D (self)
2790             return pl
2791
2792         # end of l3_sketcher
2793         ## @}
2794
2795         ## @addtogroup l3_3d_primitives
2796         ## @{
2797
2798         ## Create a box by coordinates of two opposite vertices.
2799         #
2800         #  @param x1,y1,z1 double values, defining first point it.
2801         #  @param x2,y2,z2 double values, defining first point it.
2802         #  @param theName Object name; when specified, this parameter is used
2803         #         for result publication in the study. Otherwise, if automatic
2804         #         publication is switched on, default value is used for result name.
2805         #
2806         #  @return New GEOM.GEOM_Object, containing the created box.
2807         #
2808         #  @ref tui_creation_box "Example"
2809         def MakeBox(self, x1, y1, z1, x2, y2, z2, theName=None):
2810             """
2811             Create a box by coordinates of two opposite vertices.
2812
2813             Parameters:
2814                 x1,y1,z1 double values, defining first point.
2815                 x2,y2,z2 double values, defining second point.
2816                 theName Object name; when specified, this parameter is used
2817                         for result publication in the study. Otherwise, if automatic
2818                         publication is switched on, default value is used for result name.
2819
2820             Returns:
2821                 New GEOM.GEOM_Object, containing the created box.
2822             """
2823             # Example: see GEOM_TestAll.py
2824             pnt1 = self.MakeVertex(x1,y1,z1)
2825             pnt2 = self.MakeVertex(x2,y2,z2)
2826             # note: auto-publishing is done in self.MakeBoxTwoPnt()
2827             return self.MakeBoxTwoPnt(pnt1, pnt2, theName)
2828
2829         ## Create a box with specified dimensions along the coordinate axes
2830         #  and with edges, parallel to the coordinate axes.
2831         #  Center of the box will be at point (DX/2, DY/2, DZ/2).
2832         #  @param theDX Length of Box edges, parallel to OX axis.
2833         #  @param theDY Length of Box edges, parallel to OY axis.
2834         #  @param theDZ Length of Box edges, parallel to OZ axis.
2835         #  @param theName Object name; when specified, this parameter is used
2836         #         for result publication in the study. Otherwise, if automatic
2837         #         publication is switched on, default value is used for result name.
2838         #
2839         #  @return New GEOM.GEOM_Object, containing the created box.
2840         #
2841         #  @ref tui_creation_box "Example"
2842         @ManageTransactions("PrimOp")
2843         def MakeBoxDXDYDZ(self, theDX, theDY, theDZ, theName=None):
2844             """
2845             Create a box with specified dimensions along the coordinate axes
2846             and with edges, parallel to the coordinate axes.
2847             Center of the box will be at point (DX/2, DY/2, DZ/2).
2848
2849             Parameters:
2850                 theDX Length of Box edges, parallel to OX axis.
2851                 theDY Length of Box edges, parallel to OY axis.
2852                 theDZ Length of Box edges, parallel to OZ axis.
2853                 theName Object name; when specified, this parameter is used
2854                         for result publication in the study. Otherwise, if automatic
2855                         publication is switched on, default value is used for result name.
2856
2857             Returns:
2858                 New GEOM.GEOM_Object, containing the created box.
2859             """
2860             # Example: see GEOM_TestAll.py
2861             theDX,theDY,theDZ,Parameters = ParseParameters(theDX, theDY, theDZ)
2862             anObj = self.PrimOp.MakeBoxDXDYDZ(theDX, theDY, theDZ)
2863             RaiseIfFailed("MakeBoxDXDYDZ", self.PrimOp)
2864             anObj.SetParameters(Parameters)
2865             self._autoPublish(anObj, theName, "box")
2866             return anObj
2867
2868         ## Create a box with two specified opposite vertices,
2869         #  and with edges, parallel to the coordinate axes
2870         #  @param thePnt1 First of two opposite vertices.
2871         #  @param thePnt2 Second of two opposite vertices.
2872         #  @param theName Object name; when specified, this parameter is used
2873         #         for result publication in the study. Otherwise, if automatic
2874         #         publication is switched on, default value is used for result name.
2875         #
2876         #  @return New GEOM.GEOM_Object, containing the created box.
2877         #
2878         #  @ref tui_creation_box "Example"
2879         @ManageTransactions("PrimOp")
2880         def MakeBoxTwoPnt(self, thePnt1, thePnt2, theName=None):
2881             """
2882             Create a box with two specified opposite vertices,
2883             and with edges, parallel to the coordinate axes
2884
2885             Parameters:
2886                 thePnt1 First of two opposite vertices.
2887                 thePnt2 Second of two opposite vertices.
2888                 theName Object name; when specified, this parameter is used
2889                         for result publication in the study. Otherwise, if automatic
2890                         publication is switched on, default value is used for result name.
2891
2892             Returns:
2893                 New GEOM.GEOM_Object, containing the created box.
2894             """
2895             # Example: see GEOM_TestAll.py
2896             anObj = self.PrimOp.MakeBoxTwoPnt(thePnt1, thePnt2)
2897             RaiseIfFailed("MakeBoxTwoPnt", self.PrimOp)
2898             self._autoPublish(anObj, theName, "box")
2899             return anObj
2900
2901         ## Create a face with specified dimensions with edges parallel to coordinate axes.
2902         #  @param theH height of Face.
2903         #  @param theW width of Face.
2904         #  @param theOrientation face orientation: 1-OXY, 2-OYZ, 3-OZX
2905         #  @param theName Object name; when specified, this parameter is used
2906         #         for result publication in the study. Otherwise, if automatic
2907         #         publication is switched on, default value is used for result name.
2908         #
2909         #  @return New GEOM.GEOM_Object, containing the created face.
2910         #
2911         #  @ref tui_creation_face "Example"
2912         @ManageTransactions("PrimOp")
2913         def MakeFaceHW(self, theH, theW, theOrientation, theName=None):
2914             """
2915             Create a face with specified dimensions with edges parallel to coordinate axes.
2916
2917             Parameters:
2918                 theH height of Face.
2919                 theW width of Face.
2920                 theOrientation face orientation: 1-OXY, 2-OYZ, 3-OZX
2921                 theName Object name; when specified, this parameter is used
2922                         for result publication in the study. Otherwise, if automatic
2923                         publication is switched on, default value is used for result name.
2924
2925             Returns:
2926                 New GEOM.GEOM_Object, containing the created face.
2927             """
2928             # Example: see GEOM_TestAll.py
2929             theH,theW,Parameters = ParseParameters(theH, theW)
2930             anObj = self.PrimOp.MakeFaceHW(theH, theW, theOrientation)
2931             RaiseIfFailed("MakeFaceHW", self.PrimOp)
2932             anObj.SetParameters(Parameters)
2933             self._autoPublish(anObj, theName, "rectangle")
2934             return anObj
2935
2936         ## Create a face from another plane and two sizes,
2937         #  vertical size and horisontal size.
2938         #  @param theObj   Normale vector to the creating face or
2939         #  the face object.
2940         #  @param theH     Height (vertical size).
2941         #  @param theW     Width (horisontal size).
2942         #  @param theName Object name; when specified, this parameter is used
2943         #         for result publication in the study. Otherwise, if automatic
2944         #         publication is switched on, default value is used for result name.
2945         #
2946         #  @return New GEOM.GEOM_Object, containing the created face.
2947         #
2948         #  @ref tui_creation_face "Example"
2949         @ManageTransactions("PrimOp")
2950         def MakeFaceObjHW(self, theObj, theH, theW, theName=None):
2951             """
2952             Create a face from another plane and two sizes,
2953             vertical size and horisontal size.
2954
2955             Parameters:
2956                 theObj   Normale vector to the creating face or
2957                          the face object.
2958                 theH     Height (vertical size).
2959                 theW     Width (horisontal size).
2960                 theName Object name; when specified, this parameter is used
2961                         for result publication in the study. Otherwise, if automatic
2962                         publication is switched on, default value is used for result name.
2963
2964             Returns:
2965                 New GEOM_Object, containing the created face.
2966             """
2967             # Example: see GEOM_TestAll.py
2968             theH,theW,Parameters = ParseParameters(theH, theW)
2969             anObj = self.PrimOp.MakeFaceObjHW(theObj, theH, theW)
2970             RaiseIfFailed("MakeFaceObjHW", self.PrimOp)
2971             anObj.SetParameters(Parameters)
2972             self._autoPublish(anObj, theName, "rectangle")
2973             return anObj
2974
2975         ## Create a disk with given center, normal vector and radius.
2976         #  @param thePnt Disk center.
2977         #  @param theVec Vector, normal to the plane of the disk.
2978         #  @param theR Disk radius.
2979         #  @param theName Object name; when specified, this parameter is used
2980         #         for result publication in the study. Otherwise, if automatic
2981         #         publication is switched on, default value is used for result name.
2982         #
2983         #  @return New GEOM.GEOM_Object, containing the created disk.
2984         #
2985         #  @ref tui_creation_disk "Example"
2986         @ManageTransactions("PrimOp")
2987         def MakeDiskPntVecR(self, thePnt, theVec, theR, theName=None):
2988             """
2989             Create a disk with given center, normal vector and radius.
2990
2991             Parameters:
2992                 thePnt Disk center.
2993                 theVec Vector, normal to the plane of the disk.
2994                 theR Disk radius.
2995                 theName Object name; when specified, this parameter is used
2996                         for result publication in the study. Otherwise, if automatic
2997                         publication is switched on, default value is used for result name.
2998
2999             Returns:
3000                 New GEOM.GEOM_Object, containing the created disk.
3001             """
3002             # Example: see GEOM_TestAll.py
3003             theR,Parameters = ParseParameters(theR)
3004             anObj = self.PrimOp.MakeDiskPntVecR(thePnt, theVec, theR)
3005             RaiseIfFailed("MakeDiskPntVecR", self.PrimOp)
3006             anObj.SetParameters(Parameters)
3007             self._autoPublish(anObj, theName, "disk")
3008             return anObj
3009
3010         ## Create a disk, passing through three given points
3011         #  @param thePnt1,thePnt2,thePnt3 Points, defining the disk.
3012         #  @param theName Object name; when specified, this parameter is used
3013         #         for result publication in the study. Otherwise, if automatic
3014         #         publication is switched on, default value is used for result name.
3015         #
3016         #  @return New GEOM.GEOM_Object, containing the created disk.
3017         #
3018         #  @ref tui_creation_disk "Example"
3019         @ManageTransactions("PrimOp")
3020         def MakeDiskThreePnt(self, thePnt1, thePnt2, thePnt3, theName=None):
3021             """
3022             Create a disk, passing through three given points
3023
3024             Parameters:
3025                 thePnt1,thePnt2,thePnt3 Points, defining the disk.
3026                 theName Object name; when specified, this parameter is used
3027                         for result publication in the study. Otherwise, if automatic
3028                         publication is switched on, default value is used for result name.
3029
3030             Returns:
3031                 New GEOM.GEOM_Object, containing the created disk.
3032             """
3033             # Example: see GEOM_TestAll.py
3034             anObj = self.PrimOp.MakeDiskThreePnt(thePnt1, thePnt2, thePnt3)
3035             RaiseIfFailed("MakeDiskThreePnt", self.PrimOp)
3036             self._autoPublish(anObj, theName, "disk")
3037             return anObj
3038
3039         ## Create a disk with specified dimensions along OX-OY coordinate axes.
3040         #  @param theR Radius of Face.
3041         #  @param theOrientation set the orientation belong axis OXY or OYZ or OZX
3042         #  @param theName Object name; when specified, this parameter is used
3043         #         for result publication in the study. Otherwise, if automatic
3044         #         publication is switched on, default value is used for result name.
3045         #
3046         #  @return New GEOM.GEOM_Object, containing the created disk.
3047         #
3048         #  @ref tui_creation_face "Example"
3049         @ManageTransactions("PrimOp")
3050         def MakeDiskR(self, theR, theOrientation, theName=None):
3051             """
3052             Create a disk with specified dimensions along OX-OY coordinate axes.
3053
3054             Parameters:
3055                 theR Radius of Face.
3056                 theOrientation set the orientation belong axis OXY or OYZ or OZX
3057                 theName Object name; when specified, this parameter is used
3058                         for result publication in the study. Otherwise, if automatic
3059                         publication is switched on, default value is used for result name.
3060
3061             Returns:
3062                 New GEOM.GEOM_Object, containing the created disk.
3063
3064             Example of usage:
3065                 Disk3 = geompy.MakeDiskR(100., 1)
3066             """
3067             # Example: see GEOM_TestAll.py
3068             theR,Parameters = ParseParameters(theR)
3069             anObj = self.PrimOp.MakeDiskR(theR, theOrientation)
3070             RaiseIfFailed("MakeDiskR", self.PrimOp)
3071             anObj.SetParameters(Parameters)
3072             self._autoPublish(anObj, theName, "disk")
3073             return anObj
3074
3075         ## Create a cylinder with given base point, axis, radius and height.
3076         #  @param thePnt Central point of cylinder base.
3077         #  @param theAxis Cylinder axis.
3078         #  @param theR Cylinder radius.
3079         #  @param theH Cylinder height.
3080         #  @param theName Object name; when specified, this parameter is used
3081         #         for result publication in the study. Otherwise, if automatic
3082         #         publication is switched on, default value is used for result name.
3083         #
3084         #  @return New GEOM.GEOM_Object, containing the created cylinder.
3085         #
3086         #  @ref tui_creation_cylinder "Example"
3087         @ManageTransactions("PrimOp")
3088         def MakeCylinder(self, thePnt, theAxis, theR, theH, theName=None):
3089             """
3090             Create a cylinder with given base point, axis, radius and height.
3091
3092             Parameters:
3093                 thePnt Central point of cylinder base.
3094                 theAxis Cylinder axis.
3095                 theR Cylinder radius.
3096                 theH Cylinder height.
3097                 theName Object name; when specified, this parameter is used
3098                         for result publication in the study. Otherwise, if automatic
3099                         publication is switched on, default value is used for result name.
3100
3101             Returns:
3102                 New GEOM.GEOM_Object, containing the created cylinder.
3103             """
3104             # Example: see GEOM_TestAll.py
3105             theR,theH,Parameters = ParseParameters(theR, theH)
3106             anObj = self.PrimOp.MakeCylinderPntVecRH(thePnt, theAxis, theR, theH)
3107             RaiseIfFailed("MakeCylinderPntVecRH", self.PrimOp)
3108             anObj.SetParameters(Parameters)
3109             self._autoPublish(anObj, theName, "cylinder")
3110             return anObj
3111             
3112         ## Create a portion of cylinder with given base point, axis, radius, height and angle.
3113         #  @param thePnt Central point of cylinder base.
3114         #  @param theAxis Cylinder axis.
3115         #  @param theR Cylinder radius.
3116         #  @param theH Cylinder height.
3117         #  @param theA Cylinder angle in radians.
3118         #  @param theName Object name; when specified, this parameter is used
3119         #         for result publication in the study. Otherwise, if automatic
3120         #         publication is switched on, default value is used for result name.
3121         #
3122         #  @return New GEOM.GEOM_Object, containing the created cylinder.
3123         #
3124         #  @ref tui_creation_cylinder "Example"
3125         @ManageTransactions("PrimOp")
3126         def MakeCylinderA(self, thePnt, theAxis, theR, theH, theA, theName=None):
3127             """
3128             Create a portion of cylinder with given base point, axis, radius, height and angle.
3129
3130             Parameters:
3131                 thePnt Central point of cylinder base.
3132                 theAxis Cylinder axis.
3133                 theR Cylinder radius.
3134                 theH Cylinder height.
3135                 theA Cylinder angle in radians.
3136                 theName Object name; when specified, this parameter is used
3137                         for result publication in the study. Otherwise, if automatic
3138                         publication is switched on, default value is used for result name.
3139
3140             Returns:
3141                 New GEOM.GEOM_Object, containing the created cylinder.
3142             """
3143             # Example: see GEOM_TestAll.py
3144             flag = False
3145             if isinstance(theA,str):
3146                 flag = True
3147             theR,theH,theA,Parameters = ParseParameters(theR, theH, theA)
3148             if flag:
3149                 theA = theA*math.pi/180.
3150             if theA<=0. or theA>=2*math.pi:
3151                 raise ValueError("The angle parameter should be strictly between 0 and 2*pi.")
3152             anObj = self.PrimOp.MakeCylinderPntVecRHA(thePnt, theAxis, theR, theH, theA)
3153             RaiseIfFailed("MakeCylinderPntVecRHA", self.PrimOp)
3154             anObj.SetParameters(Parameters)
3155             self._autoPublish(anObj, theName, "cylinder")
3156             return anObj
3157
3158         ## Create a cylinder with given radius and height at
3159         #  the origin of coordinate system. Axis of the cylinder
3160         #  will be collinear to the OZ axis of the coordinate system.
3161         #  @param theR Cylinder radius.
3162         #  @param theH Cylinder height.
3163         #  @param theName Object name; when specified, this parameter is used
3164         #         for result publication in the study. Otherwise, if automatic
3165         #         publication is switched on, default value is used for result name.
3166         #
3167         #  @return New GEOM.GEOM_Object, containing the created cylinder.
3168         #
3169         #  @ref tui_creation_cylinder "Example"
3170         @ManageTransactions("PrimOp")
3171         def MakeCylinderRH(self, theR, theH, theName=None):
3172             """
3173             Create a cylinder with given radius and height at
3174             the origin of coordinate system. Axis of the cylinder
3175             will be collinear to the OZ axis of the coordinate system.
3176
3177             Parameters:
3178                 theR Cylinder radius.
3179                 theH Cylinder height.
3180                 theName Object name; when specified, this parameter is used
3181                         for result publication in the study. Otherwise, if automatic
3182                         publication is switched on, default value is used for result name.
3183
3184             Returns:
3185                 New GEOM.GEOM_Object, containing the created cylinder.
3186             """
3187             # Example: see GEOM_TestAll.py
3188             theR,theH,Parameters = ParseParameters(theR, theH)
3189             anObj = self.PrimOp.MakeCylinderRH(theR, theH)
3190             RaiseIfFailed("MakeCylinderRH", self.PrimOp)
3191             anObj.SetParameters(Parameters)
3192             self._autoPublish(anObj, theName, "cylinder")
3193             return anObj
3194             
3195         ## Create a portion of cylinder with given radius, height and angle at
3196         #  the origin of coordinate system. Axis of the cylinder
3197         #  will be collinear to the OZ axis of the coordinate system.
3198         #  @param theR Cylinder radius.
3199         #  @param theH Cylinder height.
3200         #  @param theA Cylinder angle in radians.
3201         #  @param theName Object name; when specified, this parameter is used
3202         #         for result publication in the study. Otherwise, if automatic
3203         #         publication is switched on, default value is used for result name.
3204         #
3205         #  @return New GEOM.GEOM_Object, containing the created cylinder.
3206         #
3207         #  @ref tui_creation_cylinder "Example"
3208         @ManageTransactions("PrimOp")
3209         def MakeCylinderRHA(self, theR, theH, theA, theName=None):
3210             """
3211             Create a portion of cylinder with given radius, height and angle at
3212             the origin of coordinate system. Axis of the cylinder
3213             will be collinear to the OZ axis of the coordinate system.
3214
3215             Parameters:
3216                 theR Cylinder radius.
3217                 theH Cylinder height.
3218                 theA Cylinder angle in radians.
3219                 theName Object name; when specified, this parameter is used
3220                         for result publication in the study. Otherwise, if automatic
3221                         publication is switched on, default value is used for result name.
3222
3223             Returns:
3224                 New GEOM.GEOM_Object, containing the created cylinder.
3225             """
3226             # Example: see GEOM_TestAll.py
3227             flag = False
3228             if isinstance(theA,str):
3229                 flag = True
3230             theR,theH,theA,Parameters = ParseParameters(theR, theH, theA)
3231             if flag:
3232                 theA = theA*math.pi/180.
3233             if theA<=0. or theA>=2*math.pi:
3234                 raise ValueError("The angle parameter should be strictly between 0 and 2*pi.")
3235             anObj = self.PrimOp.MakeCylinderRHA(theR, theH, theA)
3236             RaiseIfFailed("MakeCylinderRHA", self.PrimOp)
3237             anObj.SetParameters(Parameters)
3238             self._autoPublish(anObj, theName, "cylinder")
3239             return anObj
3240
3241         ## Create a sphere with given center and radius.
3242         #  @param thePnt Sphere center.
3243         #  @param theR Sphere radius.
3244         #  @param theName Object name; when specified, this parameter is used
3245         #         for result publication in the study. Otherwise, if automatic
3246         #         publication is switched on, default value is used for result name.
3247         #
3248         #  @return New GEOM.GEOM_Object, containing the created sphere.
3249         #
3250         #  @ref tui_creation_sphere "Example"
3251         @ManageTransactions("PrimOp")
3252         def MakeSpherePntR(self, thePnt, theR, theName=None):
3253             """
3254             Create a sphere with given center and radius.
3255
3256             Parameters:
3257                 thePnt Sphere center.
3258                 theR Sphere radius.
3259                 theName Object name; when specified, this parameter is used
3260                         for result publication in the study. Otherwise, if automatic
3261                         publication is switched on, default value is used for result name.
3262
3263             Returns:
3264                 New GEOM.GEOM_Object, containing the created sphere.
3265             """
3266             # Example: see GEOM_TestAll.py
3267             theR,Parameters = ParseParameters(theR)
3268             anObj = self.PrimOp.MakeSpherePntR(thePnt, theR)
3269             RaiseIfFailed("MakeSpherePntR", self.PrimOp)
3270             anObj.SetParameters(Parameters)
3271             self._autoPublish(anObj, theName, "sphere")
3272             return anObj
3273
3274         ## Create a sphere with given center and radius.
3275         #  @param x,y,z Coordinates of sphere center.
3276         #  @param theR Sphere radius.
3277         #  @param theName Object name; when specified, this parameter is used
3278         #         for result publication in the study. Otherwise, if automatic
3279         #         publication is switched on, default value is used for result name.
3280         #
3281         #  @return New GEOM.GEOM_Object, containing the created sphere.
3282         #
3283         #  @ref tui_creation_sphere "Example"
3284         def MakeSphere(self, x, y, z, theR, theName=None):
3285             """
3286             Create a sphere with given center and radius.
3287
3288             Parameters:
3289                 x,y,z Coordinates of sphere center.
3290                 theR Sphere radius.
3291                 theName Object name; when specified, this parameter is used
3292                         for result publication in the study. Otherwise, if automatic
3293                         publication is switched on, default value is used for result name.
3294
3295             Returns:
3296                 New GEOM.GEOM_Object, containing the created sphere.
3297             """
3298             # Example: see GEOM_TestAll.py
3299             point = self.MakeVertex(x, y, z)
3300             # note: auto-publishing is done in self.MakeSpherePntR()
3301             anObj = self.MakeSpherePntR(point, theR, theName)
3302             return anObj
3303
3304         ## Create a sphere with given radius at the origin of coordinate system.
3305         #  @param theR Sphere radius.
3306         #  @param theName Object name; when specified, this parameter is used
3307         #         for result publication in the study. Otherwise, if automatic
3308         #         publication is switched on, default value is used for result name.
3309         #
3310         #  @return New GEOM.GEOM_Object, containing the created sphere.
3311         #
3312         #  @ref tui_creation_sphere "Example"
3313         @ManageTransactions("PrimOp")
3314         def MakeSphereR(self, theR, theName=None):
3315             """
3316             Create a sphere with given radius at the origin of coordinate system.
3317
3318             Parameters:
3319                 theR Sphere radius.
3320                 theName Object name; when specified, this parameter is used
3321                         for result publication in the study. Otherwise, if automatic
3322                         publication is switched on, default value is used for result name.
3323
3324             Returns:
3325                 New GEOM.GEOM_Object, containing the created sphere.
3326             """
3327             # Example: see GEOM_TestAll.py
3328             theR,Parameters = ParseParameters(theR)
3329             anObj = self.PrimOp.MakeSphereR(theR)
3330             RaiseIfFailed("MakeSphereR", self.PrimOp)
3331             anObj.SetParameters(Parameters)
3332             self._autoPublish(anObj, theName, "sphere")
3333             return anObj
3334
3335         ## Create a cone with given base point, axis, height and radiuses.
3336         #  @param thePnt Central point of the first cone base.
3337         #  @param theAxis Cone axis.
3338         #  @param theR1 Radius of the first cone base.
3339         #  @param theR2 Radius of the second cone base.
3340         #    \note If both radiuses are non-zero, the cone will be truncated.
3341         #    \note If the radiuses are equal, a cylinder will be created instead.
3342         #  @param theH Cone height.
3343         #  @param theName Object name; when specified, this parameter is used
3344         #         for result publication in the study. Otherwise, if automatic
3345         #         publication is switched on, default value is used for result name.
3346         #
3347         #  @return New GEOM.GEOM_Object, containing the created cone.
3348         #
3349         #  @ref tui_creation_cone "Example"
3350         @ManageTransactions("PrimOp")
3351         def MakeCone(self, thePnt, theAxis, theR1, theR2, theH, theName=None):
3352             """
3353             Create a cone with given base point, axis, height and radiuses.
3354
3355             Parameters:
3356                 thePnt Central point of the first cone base.
3357                 theAxis Cone axis.
3358                 theR1 Radius of the first cone base.
3359                 theR2 Radius of the second cone base.
3360                 theH Cone height.
3361                 theName Object name; when specified, this parameter is used
3362                         for result publication in the study. Otherwise, if automatic
3363                         publication is switched on, default value is used for result name.
3364
3365             Note:
3366                 If both radiuses are non-zero, the cone will be truncated.
3367                 If the radiuses are equal, a cylinder will be created instead.
3368
3369             Returns:
3370                 New GEOM.GEOM_Object, containing the created cone.
3371             """
3372             # Example: see GEOM_TestAll.py
3373             theR1,theR2,theH,Parameters = ParseParameters(theR1,theR2,theH)
3374             anObj = self.PrimOp.MakeConePntVecR1R2H(thePnt, theAxis, theR1, theR2, theH)
3375             RaiseIfFailed("MakeConePntVecR1R2H", self.PrimOp)
3376             anObj.SetParameters(Parameters)
3377             self._autoPublish(anObj, theName, "cone")
3378             return anObj
3379
3380         ## Create a cone with given height and radiuses at
3381         #  the origin of coordinate system. Axis of the cone will
3382         #  be collinear to the OZ axis of the coordinate system.
3383         #  @param theR1 Radius of the first cone base.
3384         #  @param theR2 Radius of the second cone base.
3385         #    \note If both radiuses are non-zero, the cone will be truncated.
3386         #    \note If the radiuses are equal, a cylinder will be created instead.
3387         #  @param theH Cone height.
3388         #  @param theName Object name; when specified, this parameter is used
3389         #         for result publication in the study. Otherwise, if automatic
3390         #         publication is switched on, default value is used for result name.
3391         #
3392         #  @return New GEOM.GEOM_Object, containing the created cone.
3393         #
3394         #  @ref tui_creation_cone "Example"
3395         @ManageTransactions("PrimOp")
3396         def MakeConeR1R2H(self, theR1, theR2, theH, theName=None):
3397             """
3398             Create a cone with given height and radiuses at
3399             the origin of coordinate system. Axis of the cone will
3400             be collinear to the OZ axis of the coordinate system.
3401
3402             Parameters:
3403                 theR1 Radius of the first cone base.
3404                 theR2 Radius of the second cone base.
3405                 theH Cone height.
3406                 theName Object name; when specified, this parameter is used
3407                         for result publication in the study. Otherwise, if automatic
3408                         publication is switched on, default value is used for result name.
3409
3410             Note:
3411                 If both radiuses are non-zero, the cone will be truncated.
3412                 If the radiuses are equal, a cylinder will be created instead.
3413
3414             Returns:
3415                 New GEOM.GEOM_Object, containing the created cone.
3416             """
3417             # Example: see GEOM_TestAll.py
3418             theR1,theR2,theH,Parameters = ParseParameters(theR1,theR2,theH)
3419             anObj = self.PrimOp.MakeConeR1R2H(theR1, theR2, theH)
3420             RaiseIfFailed("MakeConeR1R2H", self.PrimOp)
3421             anObj.SetParameters(Parameters)
3422             self._autoPublish(anObj, theName, "cone")
3423             return anObj
3424
3425         ## Create a torus with given center, normal vector and radiuses.
3426         #  @param thePnt Torus central point.
3427         #  @param theVec Torus axis of symmetry.
3428         #  @param theRMajor Torus major radius.
3429         #  @param theRMinor Torus minor radius.
3430         #  @param theName Object name; when specified, this parameter is used
3431         #         for result publication in the study. Otherwise, if automatic
3432         #         publication is switched on, default value is used for result name.
3433         #
3434         #  @return New GEOM.GEOM_Object, containing the created torus.
3435         #
3436         #  @ref tui_creation_torus "Example"
3437         @ManageTransactions("PrimOp")
3438         def MakeTorus(self, thePnt, theVec, theRMajor, theRMinor, theName=None):
3439             """
3440             Create a torus with given center, normal vector and radiuses.
3441
3442             Parameters:
3443                 thePnt Torus central point.
3444                 theVec Torus axis of symmetry.
3445                 theRMajor Torus major radius.
3446                 theRMinor Torus minor radius.
3447                 theName Object name; when specified, this parameter is used
3448                         for result publication in the study. Otherwise, if automatic
3449                         publication is switched on, default value is used for result name.
3450
3451            Returns:
3452                 New GEOM.GEOM_Object, containing the created torus.
3453             """
3454             # Example: see GEOM_TestAll.py
3455             theRMajor,theRMinor,Parameters = ParseParameters(theRMajor,theRMinor)
3456             anObj = self.PrimOp.MakeTorusPntVecRR(thePnt, theVec, theRMajor, theRMinor)
3457             RaiseIfFailed("MakeTorusPntVecRR", self.PrimOp)
3458             anObj.SetParameters(Parameters)
3459             self._autoPublish(anObj, theName, "torus")
3460             return anObj
3461
3462         ## Create a torus with given radiuses at the origin of coordinate system.
3463         #  @param theRMajor Torus major radius.
3464         #  @param theRMinor Torus minor radius.
3465         #  @param theName Object name; when specified, this parameter is used
3466         #         for result publication in the study. Otherwise, if automatic
3467         #         publication is switched on, default value is used for result name.
3468         #
3469         #  @return New GEOM.GEOM_Object, containing the created torus.
3470         #
3471         #  @ref tui_creation_torus "Example"
3472         @ManageTransactions("PrimOp")
3473         def MakeTorusRR(self, theRMajor, theRMinor, theName=None):
3474             """
3475            Create a torus with given radiuses at the origin of coordinate system.
3476
3477            Parameters:
3478                 theRMajor Torus major radius.
3479                 theRMinor Torus minor radius.
3480                 theName Object name; when specified, this parameter is used
3481                         for result publication in the study. Otherwise, if automatic
3482                         publication is switched on, default value is used for result name.
3483
3484            Returns:
3485                 New GEOM.GEOM_Object, containing the created torus.
3486             """
3487             # Example: see GEOM_TestAll.py
3488             theRMajor,theRMinor,Parameters = ParseParameters(theRMajor,theRMinor)
3489             anObj = self.PrimOp.MakeTorusRR(theRMajor, theRMinor)
3490             RaiseIfFailed("MakeTorusRR", self.PrimOp)
3491             anObj.SetParameters(Parameters)
3492             self._autoPublish(anObj, theName, "torus")
3493             return anObj
3494
3495         # end of l3_3d_primitives
3496         ## @}
3497
3498         ## @addtogroup l3_complex
3499         ## @{
3500
3501         ## Create a shape by extrusion of the base shape along a vector, defined by two points.
3502         #  @param theBase Base shape to be extruded.
3503         #  @param thePoint1 First end of extrusion vector.
3504         #  @param thePoint2 Second end of extrusion vector.
3505         #  @param theScaleFactor Use it to make prism with scaled second base.
3506         #                        Nagative value means not scaled second base.
3507         #  @param theName Object name; when specified, this parameter is used
3508         #         for result publication in the study. Otherwise, if automatic
3509         #         publication is switched on, default value is used for result name.
3510         #
3511         #  @return New GEOM.GEOM_Object, containing the created prism.
3512         #
3513         #  @ref tui_creation_prism "Example"
3514         @ManageTransactions("PrimOp")
3515         def MakePrism(self, theBase, thePoint1, thePoint2, theScaleFactor = -1.0, theName=None):
3516             """
3517             Create a shape by extrusion of the base shape along a vector, defined by two points.
3518
3519             Parameters:
3520                 theBase Base shape to be extruded.
3521                 thePoint1 First end of extrusion vector.
3522                 thePoint2 Second end of extrusion vector.
3523                 theScaleFactor Use it to make prism with scaled second base.
3524                                Nagative value means not scaled second base.
3525                 theName Object name; when specified, this parameter is used
3526                         for result publication in the study. Otherwise, if automatic
3527                         publication is switched on, default value is used for result name.
3528
3529             Returns:
3530                 New GEOM.GEOM_Object, containing the created prism.
3531             """
3532             # Example: see GEOM_TestAll.py
3533             anObj = None
3534             Parameters = ""
3535             if theScaleFactor > 0:
3536                 theScaleFactor,Parameters = ParseParameters(theScaleFactor)
3537                 anObj = self.PrimOp.MakePrismTwoPntWithScaling(theBase, thePoint1, thePoint2, theScaleFactor)
3538             else:
3539                 anObj = self.PrimOp.MakePrismTwoPnt(theBase, thePoint1, thePoint2)
3540             RaiseIfFailed("MakePrismTwoPnt", self.PrimOp)
3541             anObj.SetParameters(Parameters)
3542             self._autoPublish(anObj, theName, "prism")
3543             return anObj
3544
3545         ## Create a shape by extrusion of the base shape along a
3546         #  vector, defined by two points, in 2 Ways (forward/backward).
3547         #  @param theBase Base shape to be extruded.
3548         #  @param thePoint1 First end of extrusion vector.
3549         #  @param thePoint2 Second end of extrusion vector.
3550         #  @param theName Object name; when specified, this parameter is used
3551         #         for result publication in the study. Otherwise, if automatic
3552         #         publication is switched on, default value is used for result name.
3553         #
3554         #  @return New GEOM.GEOM_Object, containing the created prism.
3555         #
3556         #  @ref tui_creation_prism "Example"
3557         @ManageTransactions("PrimOp")
3558         def MakePrism2Ways(self, theBase, thePoint1, thePoint2, theName=None):
3559             """
3560             Create a shape by extrusion of the base shape along a
3561             vector, defined by two points, in 2 Ways (forward/backward).
3562
3563             Parameters:
3564                 theBase Base shape to be extruded.
3565                 thePoint1 First end of extrusion vector.
3566                 thePoint2 Second end of extrusion vector.
3567                 theName Object name; when specified, this parameter is used
3568                         for result publication in the study. Otherwise, if automatic
3569                         publication is switched on, default value is used for result name.
3570
3571             Returns:
3572                 New GEOM.GEOM_Object, containing the created prism.
3573             """
3574             # Example: see GEOM_TestAll.py
3575             anObj = self.PrimOp.MakePrismTwoPnt2Ways(theBase, thePoint1, thePoint2)
3576             RaiseIfFailed("MakePrismTwoPnt", self.PrimOp)
3577             self._autoPublish(anObj, theName, "prism")
3578             return anObj
3579
3580         ## Create a shape by extrusion of the base shape along the vector,
3581         #  i.e. all the space, transfixed by the base shape during its translation
3582         #  along the vector on the given distance.
3583         #  @param theBase Base shape to be extruded.
3584         #  @param theVec Direction of extrusion.
3585         #  @param theH Prism dimension along theVec.
3586         #  @param theScaleFactor Use it to make prism with scaled second base.
3587         #                        Negative value means not scaled second base.
3588         #  @param theName Object name; when specified, this parameter is used
3589         #         for result publication in the study. Otherwise, if automatic
3590         #         publication is switched on, default value is used for result name.
3591         #
3592         #  @return New GEOM.GEOM_Object, containing the created prism.
3593         #
3594         #  @ref tui_creation_prism "Example"
3595         @ManageTransactions("PrimOp")
3596         def MakePrismVecH(self, theBase, theVec, theH, theScaleFactor = -1.0, theName=None):
3597             """
3598             Create a shape by extrusion of the base shape along the vector,
3599             i.e. all the space, transfixed by the base shape during its translation
3600             along the vector on the given distance.
3601
3602             Parameters:
3603                 theBase Base shape to be extruded.
3604                 theVec Direction of extrusion.
3605                 theH Prism dimension along theVec.
3606                 theScaleFactor Use it to make prism with scaled second base.
3607                                Negative value means not scaled second base.
3608                 theName Object name; when specified, this parameter is used
3609                         for result publication in the study. Otherwise, if automatic
3610                         publication is switched on, default value is used for result name.
3611
3612             Returns:
3613                 New GEOM.GEOM_Object, containing the created prism.
3614             """
3615             # Example: see GEOM_TestAll.py
3616             anObj = None
3617             Parameters = ""
3618             if theScaleFactor > 0:
3619                 theH,theScaleFactor,Parameters = ParseParameters(theH,theScaleFactor)
3620                 anObj = self.PrimOp.MakePrismVecHWithScaling(theBase, theVec, theH, theScaleFactor)
3621             else:
3622                 theH,Parameters = ParseParameters(theH)
3623                 anObj = self.PrimOp.MakePrismVecH(theBase, theVec, theH)
3624             RaiseIfFailed("MakePrismVecH", self.PrimOp)
3625             anObj.SetParameters(Parameters)
3626             self._autoPublish(anObj, theName, "prism")
3627             return anObj
3628
3629         ## Create a shape by extrusion of the base shape along the vector,
3630         #  i.e. all the space, transfixed by the base shape during its translation
3631         #  along the vector on the given distance in 2 Ways (forward/backward).
3632         #  @param theBase Base shape to be extruded.
3633         #  @param theVec Direction of extrusion.
3634         #  @param theH Prism dimension along theVec in forward direction.
3635         #  @param theName Object name; when specified, this parameter is used
3636         #         for result publication in the study. Otherwise, if automatic
3637         #         publication is switched on, default value is used for result name.
3638         #
3639         #  @return New GEOM.GEOM_Object, containing the created prism.
3640         #
3641         #  @ref tui_creation_prism "Example"
3642         @ManageTransactions("PrimOp")
3643         def MakePrismVecH2Ways(self, theBase, theVec, theH, theName=None):
3644             """
3645             Create a shape by extrusion of the base shape along the vector,
3646             i.e. all the space, transfixed by the base shape during its translation
3647             along the vector on the given distance in 2 Ways (forward/backward).
3648
3649             Parameters:
3650                 theBase Base shape to be extruded.
3651                 theVec Direction of extrusion.
3652                 theH Prism dimension along theVec in forward direction.
3653                 theName Object name; when specified, this parameter is used
3654                         for result publication in the study. Otherwise, if automatic
3655                         publication is switched on, default value is used for result name.
3656
3657             Returns:
3658                 New GEOM.GEOM_Object, containing the created prism.
3659             """
3660             # Example: see GEOM_TestAll.py
3661             theH,Parameters = ParseParameters(theH)
3662             anObj = self.PrimOp.MakePrismVecH2Ways(theBase, theVec, theH)
3663             RaiseIfFailed("MakePrismVecH2Ways", self.PrimOp)
3664             anObj.SetParameters(Parameters)
3665             self._autoPublish(anObj, theName, "prism")
3666             return anObj
3667
3668         ## Create a shape by extrusion of the base shape along the dx, dy, dz direction
3669         #  @param theBase Base shape to be extruded.
3670         #  @param theDX, theDY, theDZ Directions of extrusion.
3671         #  @param theScaleFactor Use it to make prism with scaled second base.
3672         #                        Nagative value means not scaled second base.
3673         #  @param theName Object name; when specified, this parameter is used
3674         #         for result publication in the study. Otherwise, if automatic
3675         #         publication is switched on, default value is used for result name.
3676         #
3677         #  @return New GEOM.GEOM_Object, containing the created prism.
3678         #
3679         #  @ref tui_creation_prism "Example"
3680         @ManageTransactions("PrimOp")
3681         def MakePrismDXDYDZ(self, theBase, theDX, theDY, theDZ, theScaleFactor = -1.0, theName=None):
3682             """
3683             Create a shape by extrusion of the base shape along the dx, dy, dz direction
3684
3685             Parameters:
3686                 theBase Base shape to be extruded.
3687                 theDX, theDY, theDZ Directions of extrusion.
3688                 theScaleFactor Use it to make prism with scaled second base.
3689                                Nagative value means not scaled second base.
3690                 theName Object name; when specified, this parameter is used
3691                         for result publication in the study. Otherwise, if automatic
3692                         publication is switched on, default value is used for result name.
3693
3694             Returns:
3695                 New GEOM.GEOM_Object, containing the created prism.
3696             """
3697             # Example: see GEOM_TestAll.py
3698             anObj = None
3699             Parameters = ""
3700             if theScaleFactor > 0:
3701                 theDX,theDY,theDZ,theScaleFactor,Parameters = ParseParameters(theDX, theDY, theDZ, theScaleFactor)
3702                 anObj = self.PrimOp.MakePrismDXDYDZWithScaling(theBase, theDX, theDY, theDZ, theScaleFactor)
3703             else:
3704                 theDX,theDY,theDZ,Parameters = ParseParameters(theDX, theDY, theDZ)
3705                 anObj = self.PrimOp.MakePrismDXDYDZ(theBase, theDX, theDY, theDZ)
3706             RaiseIfFailed("MakePrismDXDYDZ", self.PrimOp)
3707             anObj.SetParameters(Parameters)
3708             self._autoPublish(anObj, theName, "prism")
3709             return anObj
3710
3711         ## Create a shape by extrusion of the base shape along the dx, dy, dz direction
3712         #  i.e. all the space, transfixed by the base shape during its translation
3713         #  along the vector on the given distance in 2 Ways (forward/backward).
3714         #  @param theBase Base shape to be extruded.
3715         #  @param theDX, theDY, theDZ Directions of extrusion.
3716         #  @param theName Object name; when specified, this parameter is used
3717         #         for result publication in the study. Otherwise, if automatic
3718         #         publication is switched on, default value is used for result name.
3719         #
3720         #  @return New GEOM.GEOM_Object, containing the created prism.
3721         #
3722         #  @ref tui_creation_prism "Example"
3723         @ManageTransactions("PrimOp")
3724         def MakePrismDXDYDZ2Ways(self, theBase, theDX, theDY, theDZ, theName=None):
3725             """
3726             Create a shape by extrusion of the base shape along the dx, dy, dz direction
3727             i.e. all the space, transfixed by the base shape during its translation
3728             along the vector on the given distance in 2 Ways (forward/backward).
3729
3730             Parameters:
3731                 theBase Base shape to be extruded.
3732                 theDX, theDY, theDZ Directions of extrusion.
3733                 theName Object name; when specified, this parameter is used
3734                         for result publication in the study. Otherwise, if automatic
3735                         publication is switched on, default value is used for result name.
3736
3737             Returns:
3738                 New GEOM.GEOM_Object, containing the created prism.
3739             """
3740             # Example: see GEOM_TestAll.py
3741             theDX,theDY,theDZ,Parameters = ParseParameters(theDX, theDY, theDZ)
3742             anObj = self.PrimOp.MakePrismDXDYDZ2Ways(theBase, theDX, theDY, theDZ)
3743             RaiseIfFailed("MakePrismDXDYDZ2Ways", self.PrimOp)
3744             anObj.SetParameters(Parameters)
3745             self._autoPublish(anObj, theName, "prism")
3746             return anObj
3747
3748         ## Create a shape by revolution of the base shape around the axis
3749         #  on the given angle, i.e. all the space, transfixed by the base
3750         #  shape during its rotation around the axis on the given angle.
3751         #  @param theBase Base shape to be rotated.
3752         #  @param theAxis Rotation axis.
3753         #  @param theAngle Rotation angle in radians.
3754         #  @param theName Object name; when specified, this parameter is used
3755         #         for result publication in the study. Otherwise, if automatic
3756         #         publication is switched on, default value is used for result name.
3757         #
3758         #  @return New GEOM.GEOM_Object, containing the created revolution.
3759         #
3760         #  @ref tui_creation_revolution "Example"
3761         @ManageTransactions("PrimOp")
3762         def MakeRevolution(self, theBase, theAxis, theAngle, theName=None):
3763             """
3764             Create a shape by revolution of the base shape around the axis
3765             on the given angle, i.e. all the space, transfixed by the base
3766             shape during its rotation around the axis on the given angle.
3767
3768             Parameters:
3769                 theBase Base shape to be rotated.
3770                 theAxis Rotation axis.
3771                 theAngle Rotation angle in radians.
3772                 theName Object name; when specified, this parameter is used
3773                         for result publication in the study. Otherwise, if automatic
3774                         publication is switched on, default value is used for result name.
3775
3776             Returns:
3777                 New GEOM.GEOM_Object, containing the created revolution.
3778             """
3779             # Example: see GEOM_TestAll.py
3780             theAngle,Parameters = ParseParameters(theAngle)
3781             anObj = self.PrimOp.MakeRevolutionAxisAngle(theBase, theAxis, theAngle)
3782             RaiseIfFailed("MakeRevolutionAxisAngle", self.PrimOp)
3783             anObj.SetParameters(Parameters)
3784             self._autoPublish(anObj, theName, "revolution")
3785             return anObj
3786
3787         ## Create a shape by revolution of the base shape around the axis
3788         #  on the given angle, i.e. all the space, transfixed by the base
3789         #  shape during its rotation around the axis on the given angle in
3790         #  both directions (forward/backward)
3791         #  @param theBase Base shape to be rotated.
3792         #  @param theAxis Rotation axis.
3793         #  @param theAngle Rotation angle in radians.
3794         #  @param theName Object name; when specified, this parameter is used
3795         #         for result publication in the study. Otherwise, if automatic
3796         #         publication is switched on, default value is used for result name.
3797         #
3798         #  @return New GEOM.GEOM_Object, containing the created revolution.
3799         #
3800         #  @ref tui_creation_revolution "Example"
3801         @ManageTransactions("PrimOp")
3802         def MakeRevolution2Ways(self, theBase, theAxis, theAngle, theName=None):
3803             """
3804             Create a shape by revolution of the base shape around the axis
3805             on the given angle, i.e. all the space, transfixed by the base
3806             shape during its rotation around the axis on the given angle in
3807             both directions (forward/backward).
3808
3809             Parameters:
3810                 theBase Base shape to be rotated.
3811                 theAxis Rotation axis.
3812                 theAngle Rotation angle in radians.
3813                 theName Object name; when specified, this parameter is used
3814                         for result publication in the study. Otherwise, if automatic
3815                         publication is switched on, default value is used for result name.
3816
3817             Returns:
3818                 New GEOM.GEOM_Object, containing the created revolution.
3819             """
3820             theAngle,Parameters = ParseParameters(theAngle)
3821             anObj = self.PrimOp.MakeRevolutionAxisAngle2Ways(theBase, theAxis, theAngle)
3822             RaiseIfFailed("MakeRevolutionAxisAngle2Ways", self.PrimOp)
3823             anObj.SetParameters(Parameters)
3824             self._autoPublish(anObj, theName, "revolution")
3825             return anObj
3826
3827         ## Create a face from a given set of contours.
3828         #  @param theContours either a list or a compound of edges/wires.
3829         #  @param theMinDeg a minimal degree of BSpline surface to create.
3830         #  @param theMaxDeg a maximal degree of BSpline surface to create.
3831         #  @param theTol2D a 2d tolerance to be reached.
3832         #  @param theTol3D a 3d tolerance to be reached.
3833         #  @param theNbIter a number of iteration of approximation algorithm.
3834         #  @param theMethod Kind of method to perform filling operation
3835         #         (see GEOM.filling_oper_method enum).
3836         #  @param isApprox if True, BSpline curves are generated in the process
3837         #                  of surface construction. By default it is False, that means
3838         #                  the surface is created using given curves. The usage of
3839         #                  Approximation makes the algorithm work slower, but allows
3840         #                  building the surface for rather complex cases.
3841         #  @param theName Object name; when specified, this parameter is used
3842         #         for result publication in the study. Otherwise, if automatic
3843         #         publication is switched on, default value is used for result name.
3844         #
3845         #  @return New GEOM.GEOM_Object (face), containing the created filling surface.
3846         #
3847         #  @ref tui_creation_filling "Example"
3848         @ManageTransactions("PrimOp")
3849         def MakeFilling(self, theContours, theMinDeg=2, theMaxDeg=5, theTol2D=0.0001,
3850                         theTol3D=0.0001, theNbIter=0, theMethod=GEOM.FOM_Default, isApprox=0, theName=None):
3851             """
3852             Create a face from a given set of contours.
3853
3854             Parameters:
3855                 theContours either a list or a compound of edges/wires.
3856                 theMinDeg a minimal degree of BSpline surface to create.
3857                 theMaxDeg a maximal degree of BSpline surface to create.
3858                 theTol2D a 2d tolerance to be reached.
3859                 theTol3D a 3d tolerance to be reached.
3860                 theNbIter a number of iteration of approximation algorithm.
3861                 theMethod Kind of method to perform filling operation
3862                           (see GEOM.filling_oper_method enum).
3863                 isApprox if True, BSpline curves are generated in the process
3864                          of surface construction. By default it is False, that means
3865                          the surface is created using given curves. The usage of
3866                          Approximation makes the algorithm work slower, but allows
3867                          building the surface for rather complex cases.
3868                 theName Object name; when specified, this parameter is used
3869                         for result publication in the study. Otherwise, if automatic
3870                         publication is switched on, default value is used for result name.
3871
3872             Returns:
3873                 New GEOM.GEOM_Object (face), containing the created filling surface.
3874
3875             Example of usage:
3876                 filling = geompy.MakeFilling(compound, 2, 5, 0.0001, 0.0001, 5)
3877             """
3878             # Example: see GEOM_TestAll.py
3879             theMinDeg,theMaxDeg,theTol2D,theTol3D,theNbIter,Parameters = ParseParameters(theMinDeg, theMaxDeg, theTol2D, theTol3D, theNbIter)
3880             anObj = self.PrimOp.MakeFilling(ToList(theContours), theMinDeg, theMaxDeg,
3881                                             theTol2D, theTol3D, theNbIter,
3882                                             theMethod, isApprox)
3883             RaiseIfFailed("MakeFilling", self.PrimOp)
3884             anObj.SetParameters(Parameters)
3885             self._autoPublish(anObj, theName, "filling")
3886             return anObj
3887
3888
3889         ## Create a face from a given set of contours.
3890         #  This method corresponds to MakeFilling() with isApprox=True.
3891         #  @param theContours either a list or a compound of edges/wires.
3892         #  @param theMinDeg a minimal degree of BSpline surface to create.
3893         #  @param theMaxDeg a maximal degree of BSpline surface to create.
3894         #  @param theTol3D a 3d tolerance to be reached.
3895         #  @param theName Object name; when specified, this parameter is used
3896         #         for result publication in the study. Otherwise, if automatic
3897         #         publication is switched on, default value is used for result name.
3898         #
3899         #  @return New GEOM.GEOM_Object (face), containing the created filling surface.
3900         #
3901         #  @ref tui_creation_filling "Example"
3902         @ManageTransactions("PrimOp")
3903         def MakeFillingNew(self, theContours, theMinDeg=2, theMaxDeg=5, theTol3D=0.0001, theName=None):
3904             """
3905             Create a filling from the given compound of contours.
3906             This method corresponds to MakeFilling() with isApprox=True.
3907
3908             Parameters:
3909                 theContours either a list or a compound of edges/wires.
3910                 theMinDeg a minimal degree of BSpline surface to create.
3911                 theMaxDeg a maximal degree of BSpline surface to create.
3912                 theTol3D a 3d tolerance to be reached.
3913                 theName Object name; when specified, this parameter is used
3914                         for result publication in the study. Otherwise, if automatic
3915                         publication is switched on, default value is used for result name.
3916
3917             Returns:
3918                 New GEOM.GEOM_Object (face), containing the created filling surface.
3919
3920             Example of usage:
3921                 filling = geompy.MakeFillingNew(compound, 2, 5, 0.0001)
3922             """
3923             # Example: see GEOM_TestAll.py
3924             theMinDeg,theMaxDeg,theTol3D,Parameters = ParseParameters(theMinDeg, theMaxDeg, theTol3D)
3925             anObj = self.PrimOp.MakeFilling(ToList(theContours), theMinDeg, theMaxDeg,
3926                                             0, theTol3D, 0, GEOM.FOM_Default, True)
3927             RaiseIfFailed("MakeFillingNew", self.PrimOp)
3928             anObj.SetParameters(Parameters)
3929             self._autoPublish(anObj, theName, "filling")
3930             return anObj
3931
3932         ## Create a shell or solid passing through set of sections.Sections should be wires,edges or vertices.
3933         #  @param theSeqSections - set of specified sections.
3934         #  @param theModeSolid - mode defining building solid or shell
3935         #  @param thePreci - precision 3D used for smoothing
3936         #  @param theRuled - mode defining type of the result surfaces (ruled or smoothed).
3937         #  @param theName Object name; when specified, this parameter is used
3938         #         for result publication in the study. Otherwise, if automatic
3939         #         publication is switched on, default value is used for result name.
3940         #
3941         #  @return New GEOM.GEOM_Object, containing the created shell or solid.
3942         #
3943         #  @ref swig_todo "Example"
3944         @ManageTransactions("PrimOp")
3945         def MakeThruSections(self, theSeqSections, theModeSolid, thePreci, theRuled, theName=None):
3946             """
3947             Create a shell or solid passing through set of sections.Sections should be wires,edges or vertices.
3948
3949             Parameters:
3950                 theSeqSections - set of specified sections.
3951                 theModeSolid - mode defining building solid or shell
3952                 thePreci - precision 3D used for smoothing
3953                 theRuled - mode defining type of the result surfaces (ruled or smoothed).
3954                 theName Object name; when specified, this parameter is used
3955                         for result publication in the study. Otherwise, if automatic
3956                         publication is switched on, default value is used for result name.
3957
3958             Returns:
3959                 New GEOM.GEOM_Object, containing the created shell or solid.
3960             """
3961             # Example: see GEOM_TestAll.py
3962             anObj = self.PrimOp.MakeThruSections(theSeqSections,theModeSolid,thePreci,theRuled)
3963             RaiseIfFailed("MakeThruSections", self.PrimOp)
3964             self._autoPublish(anObj, theName, "filling")
3965             return anObj
3966
3967         ## Create a shape by extrusion of the base shape along
3968         #  the path shape. The path shape can be a wire or an edge. It is
3969         #  possible to generate groups along with the result by means of
3970         #  setting the flag \a IsGenerateGroups.<BR>
3971         #  If \a thePath is a closed edge or wire and \a IsGenerateGroups is
3972         #  set, an error is occurred. If \a thePath is not closed edge/wire,
3973         #  the following groups are returned:
3974         #  - If \a theBase is unclosed edge or wire: "Down", "Up", "Side1",
3975         #    "Side2";
3976         #  - If \a theBase is closed edge or wire, face or shell: "Down", "Up",
3977         #    "Other".
3978         #  .
3979         #  "Down" and "Up" groups contain:
3980         #  - Edges if \a theBase is edge or wire;
3981         #  - Faces if \a theBase is face or shell.<BR>
3982         #  .
3983         #  "Side1" and "Side2" groups contain edges generated from the first
3984         #  and last vertices of \a theBase. The first and last vertices are
3985         #  determined taking into account edge/wire orientation.<BR>
3986         #  "Other" group represents faces generated from the bounding edges of
3987         #  \a theBase.
3988         #
3989         #  @param theBase Base shape to be extruded.
3990         #  @param thePath Path shape to extrude the base shape along it.
3991         #  @param IsGenerateGroups flag that tells if it is necessary to
3992         #         create groups. It is equal to False by default.
3993         #  @param theName Object name; when specified, this parameter is used
3994         #         for result publication in the study. Otherwise, if automatic
3995         #         publication is switched on, default value is used for result name.
3996         #
3997         #  @return New GEOM.GEOM_Object, containing the created pipe if 
3998         #          \a IsGenerateGroups is not set. Otherwise it returns a
3999         #          list of GEOM.GEOM_Object. Its first element is the created pipe, the
4000         #          remaining ones are created groups.
4001         #
4002         #  @ref tui_creation_pipe "Example"
4003         @ManageTransactions("PrimOp")
4004         def MakePipe(self, theBase, thePath,
4005                      IsGenerateGroups=False, theName=None):
4006             """
4007             Create a shape by extrusion of the base shape along
4008             the path shape. The path shape can be a wire or an edge. It is
4009             possible to generate groups along with the result by means of
4010             setting the flag IsGenerateGroups.
4011             If thePath is a closed edge or wire and IsGenerateGroups is
4012             set, an error is occurred. If thePath is not closed edge/wire,
4013             the following groups are returned:
4014             - If theBase is unclosed edge or wire: "Down", "Up", "Side1",
4015               "Side2";
4016             - If theBase is closed edge or wire, face or shell: "Down", "Up",
4017               "Other".
4018             "Down" and "Up" groups contain:
4019             - Edges if theBase is edge or wire;
4020             - Faces if theBase is face or shell.
4021             "Side1" and "Side2" groups contain edges generated from the first
4022             and last vertices of theBase. The first and last vertices are
4023             determined taking into account edge/wire orientation.
4024             "Other" group represents faces generated from the bounding edges of
4025             theBase.
4026
4027             Parameters:
4028                 theBase Base shape to be extruded.
4029                 thePath Path shape to extrude the base shape along it.
4030                 IsGenerateGroups flag that tells if it is necessary to
4031                         create groups. It is equal to False by default.
4032                 theName Object name; when specified, this parameter is used
4033                         for result publication in the study. Otherwise, if automatic
4034                         publication is switched on, default value is used for result name.
4035
4036             Returns:
4037                 New GEOM.GEOM_Object, containing the created pipe if 
4038                 IsGenerateGroups is not set. Otherwise it returns a
4039                 list of GEOM.GEOM_Object. Its first element is the created pipe, the
4040                 remaining ones are created groups.
4041             """
4042             # Example: see GEOM_TestAll.py
4043             aList = self.PrimOp.MakePipe(theBase, thePath, IsGenerateGroups)
4044             RaiseIfFailed("MakePipe", self.PrimOp)
4045
4046             if IsGenerateGroups:
4047               self._autoPublish(aList, theName, "pipe")
4048               return aList
4049
4050             self._autoPublish(aList[0], theName, "pipe")
4051             return aList[0]
4052
4053         ## Create a shape by extrusion of the profile shape along
4054         #  the path shape. The path shape can be a wire or an edge.
4055         #  the several profiles can be specified in the several locations of path.
4056         #  It is possible to generate groups along with the result by means of
4057         #  setting the flag \a IsGenerateGroups. For detailed information on
4058         #  groups that can be created please see the method MakePipe().
4059         #  @param theSeqBases - list of  Bases shape to be extruded.
4060         #  @param theLocations - list of locations on the path corresponding
4061         #                        specified list of the Bases shapes. Number of locations
4062         #                        should be equal to number of bases or list of locations can be empty.
4063         #  @param thePath - Path shape to extrude the base shape along it.
4064         #  @param theWithContact - the mode defining that the section is translated to be in
4065         #                          contact with the spine.
4066         #  @param theWithCorrection - defining that the section is rotated to be
4067         #                             orthogonal to the spine tangent in the correspondent point
4068         #  @param IsGenerateGroups - flag that tells if it is necessary to
4069         #                          create groups. It is equal to False by default.
4070         #  @param theName Object name; when specified, this parameter is used
4071         #         for result publication in the study. Otherwise, if automatic
4072         #         publication is switched on, default value is used for result name.
4073         #
4074         #  @return New GEOM.GEOM_Object, containing the created pipe if 
4075         #          \a IsGenerateGroups is not set. Otherwise it returns new
4076         #          GEOM.ListOfGO. Its first element is the created pipe, the
4077         #          remaining ones are created groups.
4078         #
4079         #  @ref tui_creation_pipe_with_diff_sec "Example"
4080         @ManageTransactions("PrimOp")
4081         def MakePipeWithDifferentSections(self, theSeqBases,
4082                                           theLocations, thePath,
4083                                           theWithContact, theWithCorrection,
4084                                           IsGenerateGroups=False, theName=None):
4085             """
4086             Create a shape by extrusion of the profile shape along
4087             the path shape. The path shape can be a wire or an edge.
4088             the several profiles can be specified in the several locations of path.
4089             It is possible to generate groups along with the result by means of
4090             setting the flag IsGenerateGroups. For detailed information on
4091             groups that can be created please see the method geompy.MakePipe().
4092
4093             Parameters:
4094                 theSeqBases - list of  Bases shape to be extruded.
4095                 theLocations - list of locations on the path corresponding
4096                                specified list of the Bases shapes. Number of locations
4097                                should be equal to number of bases or list of locations can be empty.
4098                 thePath - Path shape to extrude the base shape along it.
4099                 theWithContact - the mode defining that the section is translated to be in
4100                                  contact with the spine(0/1)
4101                 theWithCorrection - defining that the section is rotated to be
4102                                     orthogonal to the spine tangent in the correspondent point (0/1)
4103                 IsGenerateGroups - flag that tells if it is necessary to
4104                                  create groups. It is equal to False by default.
4105                 theName Object name; when specified, this parameter is used
4106                         for result publication in the study. Otherwise, if automatic
4107                         publication is switched on, default value is used for result name.
4108
4109             Returns:
4110                 New GEOM.GEOM_Object, containing the created pipe if 
4111                 IsGenerateGroups is not set. Otherwise it returns new
4112                 GEOM.ListOfGO. Its first element is the created pipe, the
4113                 remaining ones are created groups.
4114             """
4115             aList = self.PrimOp.MakePipeWithDifferentSections(theSeqBases,
4116                                                               theLocations, thePath,
4117                                                               theWithContact, theWithCorrection,
4118                                                               False, IsGenerateGroups)
4119             RaiseIfFailed("MakePipeWithDifferentSections", self.PrimOp)
4120
4121             if IsGenerateGroups:
4122               self._autoPublish(aList, theName, "pipe")
4123               return aList
4124
4125             self._autoPublish(aList[0], theName, "pipe")
4126             return aList[0]
4127
4128         ## Create a shape by extrusion of the profile shape along
4129         #  the path shape. This function is a version of
4130         #  MakePipeWithDifferentSections() with the same parameters, except
4131         #  eliminated theWithContact and theWithCorrection. So it is
4132         #  possible to find the description of all parameters is in this
4133         #  method. The difference is that this method performs the operation
4134         #  step by step, i.e. it creates pipes between each pair of neighbor
4135         #  sections and fuses them into a single shape.
4136         #
4137         #  @ref tui_creation_pipe_with_diff_sec "Example"
4138         @ManageTransactions("PrimOp")
4139         def MakePipeWithDifferentSectionsBySteps(self, theSeqBases,
4140                                                  theLocations, thePath,
4141                                                  IsGenerateGroups=False, theName=None):
4142             """
4143             Create a shape by extrusion of the profile shape along
4144             the path shape. This function is a version of
4145             MakePipeWithDifferentSections() with the same parameters, except
4146             eliminated theWithContact and theWithCorrection. So it is
4147             possible to find the description of all parameters is in this
4148             method. The difference is that this method performs the operation
4149             step by step, i.e. it creates pipes between each pair of neighbor
4150             sections and fuses them into a single shape.
4151             """
4152             aList = self.PrimOp.MakePipeWithDifferentSections(theSeqBases,
4153                                                               theLocations, thePath,
4154                                                               False, False,
4155                                                               True, IsGenerateGroups)
4156             RaiseIfFailed("MakePipeWithDifferentSectionsBySteps", self.PrimOp)
4157
4158             if IsGenerateGroups:
4159               self._autoPublish(aList, theName, "pipe")
4160               return aList
4161
4162             self._autoPublish(aList[0], theName, "pipe")
4163             return aList[0]
4164
4165         ## Create a shape by extrusion of the profile shape along
4166         #  the path shape. The path shape can be a wire or an edge.
4167         #  the several profiles can be specified in the several locations of path.
4168         #  It is possible to generate groups along with the result by means of
4169         #  setting the flag \a IsGenerateGroups. For detailed information on
4170         #  groups that can be created please see the method MakePipe().
4171         #  @param theSeqBases - list of  Bases shape to be extruded. Base shape must be
4172         #                       shell or face. If number of faces in neighbour sections
4173         #                       aren't coincided result solid between such sections will
4174         #                       be created using external boundaries of this shells.
4175         #  @param theSeqSubBases - list of corresponding sub-shapes of section shapes.
4176         #                          This list is used for searching correspondences between
4177         #                          faces in the sections. Size of this list must be equal
4178         #                          to size of list of base shapes.
4179         #  @param theLocations - list of locations on the path corresponding
4180         #                        specified list of the Bases shapes. Number of locations
4181         #                        should be equal to number of bases. First and last
4182         #                        locations must be coincided with first and last vertexes
4183         #                        of path correspondingly.
4184         #  @param thePath - Path shape to extrude the base shape along it.
4185         #  @param theWithContact - the mode defining that the section is translated to be in
4186         #                          contact with the spine.
4187         #  @param theWithCorrection - defining that the section is rotated to be
4188         #                             orthogonal to the spine tangent in the correspondent point
4189         #  @param IsGenerateGroups - flag that tells if it is necessary to
4190         #                          create groups. It is equal to False by default.
4191         #  @param theName Object name; when specified, this parameter is used
4192         #         for result publication in the study. Otherwise, if automatic
4193         #         publication is switched on, default value is used for result name.
4194         #
4195         #  @return New GEOM.GEOM_Object, containing the created solids if 
4196         #          \a IsGenerateGroups is not set. Otherwise it returns new
4197         #          GEOM.ListOfGO. Its first element is the created solids, the
4198         #          remaining ones are created groups.
4199         #
4200         #  @ref tui_creation_pipe_with_shell_sec "Example"
4201         @ManageTransactions("PrimOp")
4202         def MakePipeWithShellSections(self, theSeqBases, theSeqSubBases,
4203                                       theLocations, thePath,
4204                                       theWithContact, theWithCorrection,
4205                                       IsGenerateGroups=False, theName=None):
4206             """
4207             Create a shape by extrusion of the profile shape along
4208             the path shape. The path shape can be a wire or an edge.
4209             the several profiles can be specified in the several locations of path.
4210             It is possible to generate groups along with the result by means of
4211             setting the flag IsGenerateGroups. For detailed information on
4212             groups that can be created please see the method geompy.MakePipe().
4213
4214             Parameters:
4215                 theSeqBases - list of  Bases shape to be extruded. Base shape must be
4216                               shell or face. If number of faces in neighbour sections
4217                               aren't coincided result solid between such sections will
4218                               be created using external boundaries of this shells.
4219                 theSeqSubBases - list of corresponding sub-shapes of section shapes.
4220                                  This list is used for searching correspondences between
4221                                  faces in the sections. Size of this list must be equal
4222                                  to size of list of base shapes.
4223                 theLocations - list of locations on the path corresponding
4224                                specified list of the Bases shapes. Number of locations
4225                                should be equal to number of bases. First and last
4226                                locations must be coincided with first and last vertexes
4227                                of path correspondingly.
4228                 thePath - Path shape to extrude the base shape along it.
4229                 theWithContact - the mode defining that the section is translated to be in
4230                                  contact with the spine (0/1)
4231                 theWithCorrection - defining that the section is rotated to be
4232                                     orthogonal to the spine tangent in the correspondent point (0/1)
4233                 IsGenerateGroups - flag that tells if it is necessary to
4234                                  create groups. It is equal to False by default.
4235                 theName Object name; when specified, this parameter is used
4236                         for result publication in the study. Otherwise, if automatic
4237                         publication is switched on, default value is used for result name.
4238
4239             Returns:
4240                 New GEOM.GEOM_Object, containing the created solids if 
4241                 IsGenerateGroups is not set. Otherwise it returns new
4242                 GEOM.ListOfGO. Its first element is the created solids, the
4243                 remaining ones are created groups.
4244             """
4245             aList = self.PrimOp.MakePipeWithShellSections(theSeqBases, theSeqSubBases,
4246                                                           theLocations, thePath,
4247                                                           theWithContact, theWithCorrection,
4248                                                           IsGenerateGroups)
4249             RaiseIfFailed("MakePipeWithShellSections", self.PrimOp)
4250
4251             if IsGenerateGroups:
4252               self._autoPublish(aList, theName, "pipe")
4253               return aList
4254
4255             self._autoPublish(aList[0], theName, "pipe")
4256             return aList[0]
4257
4258         ## Create a shape by extrusion of the profile shape along
4259         #  the path shape. This function is used only for debug pipe
4260         #  functionality - it is a version of function MakePipeWithShellSections()
4261         #  which give a possibility to receive information about
4262         #  creating pipe between each pair of sections step by step.
4263         @ManageTransactions("PrimOp")
4264         def MakePipeWithShellSectionsBySteps(self, theSeqBases, theSeqSubBases,
4265                                              theLocations, thePath,
4266                                              theWithContact, theWithCorrection,
4267                                              IsGenerateGroups=False, theName=None):
4268             """
4269             Create a shape by extrusion of the profile shape along
4270             the path shape. This function is used only for debug pipe
4271             functionality - it is a version of previous function
4272             geompy.MakePipeWithShellSections() which give a possibility to
4273             receive information about creating pipe between each pair of
4274             sections step by step.
4275             """
4276             res = []
4277             nbsect = len(theSeqBases)
4278             nbsubsect = len(theSeqSubBases)
4279             #print "nbsect = ",nbsect
4280             for i in range(1,nbsect):
4281                 #print "  i = ",i
4282                 tmpSeqBases = [ theSeqBases[i-1], theSeqBases[i] ]
4283                 tmpLocations = [ theLocations[i-1], theLocations[i] ]
4284                 tmpSeqSubBases = []
4285                 if nbsubsect>0: tmpSeqSubBases = [ theSeqSubBases[i-1], theSeqSubBases[i] ]
4286                 aList = self.PrimOp.MakePipeWithShellSections(tmpSeqBases, tmpSeqSubBases,
4287                                                               tmpLocations, thePath,
4288                                                               theWithContact, theWithCorrection,
4289                                                               IsGenerateGroups)
4290                 if self.PrimOp.IsDone() == 0:
4291                     print("Problems with pipe creation between ",i," and ",i+1," sections")
4292                     RaiseIfFailed("MakePipeWithShellSections", self.PrimOp)
4293                     break
4294                 else:
4295                     print("Pipe between ",i," and ",i+1," sections is OK")
4296                     res.append(aList[0])
4297                     pass
4298                 pass
4299
4300             resc = self.MakeCompound(res)
4301             #resc = self.MakeSewing(res, 0.001)
4302             #print "resc: ",resc
4303             self._autoPublish(resc, theName, "pipe")
4304             return resc
4305
4306         ## Create solids between given sections.
4307         #  It is possible to generate groups along with the result by means of
4308         #  setting the flag \a IsGenerateGroups. For detailed information on
4309         #  groups that can be created please see the method MakePipe().
4310         #  @param theSeqBases - list of sections (shell or face).
4311         #  @param theLocations - list of corresponding vertexes
4312         #  @param IsGenerateGroups - flag that tells if it is necessary to
4313         #         create groups. It is equal to False by default.
4314         #  @param theName Object name; when specified, this parameter is used
4315         #         for result publication in the study. Otherwise, if automatic
4316         #         publication is switched on, default value is used for result name.
4317         #
4318         #  @return New GEOM.GEOM_Object, containing the created solids if 
4319         #          \a IsGenerateGroups is not set. Otherwise it returns new
4320         #          GEOM.ListOfGO. Its first element is the created solids, the
4321         #          remaining ones are created groups.
4322         #
4323         #  @ref tui_creation_pipe_without_path "Example"
4324         @ManageTransactions("PrimOp")
4325         def MakePipeShellsWithoutPath(self, theSeqBases, theLocations,
4326                                       IsGenerateGroups=False, theName=None):
4327             """
4328             Create solids between given sections.
4329             It is possible to generate groups along with the result by means of
4330             setting the flag IsGenerateGroups. For detailed information on
4331             groups that can be created please see the method geompy.MakePipe().
4332
4333             Parameters:
4334                 theSeqBases - list of sections (shell or face).
4335                 theLocations - list of corresponding vertexes
4336                 IsGenerateGroups - flag that tells if it is necessary to
4337                                  create groups. It is equal to False by default.
4338                 theName Object name; when specified, this parameter is used
4339                         for result publication in the study. Otherwise, if automatic
4340                         publication is switched on, default value is used for result name.
4341
4342             Returns:
4343                 New GEOM.GEOM_Object, containing the created solids if 
4344                 IsGenerateGroups is not set. Otherwise it returns new
4345                 GEOM.ListOfGO. Its first element is the created solids, the
4346                 remaining ones are created groups.
4347             """
4348             aList = self.PrimOp.MakePipeShellsWithoutPath(theSeqBases, theLocations,
4349                                                           IsGenerateGroups)
4350             RaiseIfFailed("MakePipeShellsWithoutPath", self.PrimOp)
4351
4352             if IsGenerateGroups:
4353               self._autoPublish(aList, theName, "pipe")
4354               return aList
4355
4356             self._autoPublish(aList[0], theName, "pipe")
4357             return aList[0]
4358
4359         ## Create a shape by extrusion of the base shape along
4360         #  the path shape with constant bi-normal direction along the given vector.
4361         #  The path shape can be a wire or an edge.
4362         #  It is possible to generate groups along with the result by means of
4363         #  setting the flag \a IsGenerateGroups. For detailed information on
4364         #  groups that can be created please see the method MakePipe().
4365         #  @param theBase Base shape to be extruded.
4366         #  @param thePath Path shape to extrude the base shape along it.
4367         #  @param theVec Vector defines a constant binormal direction to keep the
4368         #                same angle between the direction and the sections
4369         #                along the sweep surface.
4370         #  @param IsGenerateGroups flag that tells if it is necessary to
4371         #         create groups. It is equal to False by default.
4372         #  @param theName Object name; when specified, this parameter is used
4373         #         for result publication in the study. Otherwise, if automatic
4374         #         publication is switched on, default value is used for result name.
4375         #
4376         #  @return New GEOM.GEOM_Object, containing the created pipe if 
4377         #          \a IsGenerateGroups is not set. Otherwise it returns new
4378         #          GEOM.ListOfGO. Its first element is the created pipe, the
4379         #          remaining ones are created groups.
4380         #
4381         #  @ref tui_creation_pipe "Example"
4382         @ManageTransactions("PrimOp")
4383         def MakePipeBiNormalAlongVector(self, theBase, thePath, theVec,
4384                                         IsGenerateGroups=False, theName=None):
4385             """
4386             Create a shape by extrusion of the base shape along
4387             the path shape with constant bi-normal direction along the given vector.
4388             The path shape can be a wire or an edge.
4389             It is possible to generate groups along with the result by means of
4390             setting the flag IsGenerateGroups. For detailed information on
4391             groups that can be created please see the method geompy.MakePipe().
4392
4393             Parameters:
4394                 theBase Base shape to be extruded.
4395                 thePath Path shape to extrude the base shape along it.
4396                 theVec Vector defines a constant binormal direction to keep the
4397                        same angle between the direction and the sections
4398                        along the sweep surface.
4399                 IsGenerateGroups flag that tells if it is necessary to
4400                                  create groups. It is equal to False by default.
4401                 theName Object name; when specified, this parameter is used
4402                         for result publication in the study. Otherwise, if automatic
4403                         publication is switched on, default value is used for result name.
4404
4405             Returns:
4406                 New GEOM.GEOM_Object, containing the created pipe if 
4407                 IsGenerateGroups is not set. Otherwise it returns new
4408                 GEOM.ListOfGO. Its first element is the created pipe, the
4409                 remaining ones are created groups.
4410             """
4411             # Example: see GEOM_TestAll.py
4412             aList = self.PrimOp.MakePipeBiNormalAlongVector(theBase, thePath,
4413                           theVec, IsGenerateGroups)
4414             RaiseIfFailed("MakePipeBiNormalAlongVector", self.PrimOp)
4415
4416             if IsGenerateGroups:
4417               self._autoPublish(aList, theName, "pipe")
4418               return aList
4419
4420             self._autoPublish(aList[0], theName, "pipe")
4421             return aList[0]
4422
4423         ## Makes a thick solid from a shape. If the input is a surface shape
4424         #  (face or shell) the result is a thick solid. If an input shape is
4425         #  a solid the result is a hollowed solid with removed faces.
4426         #  @param theShape Face or Shell to get thick solid or solid to get
4427         #         hollowed solid.
4428         #  @param theThickness Thickness of the resulting solid
4429         #  @param theFacesIDs the list of face IDs to be removed from the
4430         #         result. It is ignored if \a theShape is a face or a shell.
4431         #         It is empty by default. 
4432         #  @param theInside If true the thickness is applied towards inside
4433         #  @param theName Object name; when specified, this parameter is used
4434         #         for result publication in the study. Otherwise, if automatic
4435         #         publication is switched on, default value is used for result name.
4436         #
4437         #  @return New GEOM.GEOM_Object, containing the created solid
4438         #
4439         #  @ref tui_creation_thickness "Example"
4440         @ManageTransactions("PrimOp")
4441         def MakeThickSolid(self, theShape, theThickness,
4442                            theFacesIDs=[], theInside=False, theName=None):
4443             """
4444             Make a thick solid from a shape. If the input is a surface shape
4445             (face or shell) the result is a thick solid. If an input shape is
4446             a solid the result is a hollowed solid with removed faces.
4447
4448             Parameters:
4449                  theShape Face or Shell to get thick solid or solid to get
4450                           hollowed solid.
4451                  theThickness Thickness of the resulting solid
4452                  theFacesIDs the list of face IDs to be removed from the
4453                           result. It is ignored if theShape is a face or a
4454                           shell. It is empty by default. 
4455                  theInside If true the thickness is applied towards inside
4456                  theName Object name; when specified, this parameter is used
4457                          for result publication in the study. Otherwise, if automatic
4458                          publication is switched on, default value is used for result name.
4459
4460             Returns:
4461                 New GEOM.GEOM_Object, containing the created solid
4462             """
4463             # Example: see GEOM_TestAll.py
4464             theThickness,Parameters = ParseParameters(theThickness)
4465             anObj = self.PrimOp.MakeThickening(theShape, theFacesIDs,
4466                                                theThickness, True, theInside)
4467             RaiseIfFailed("MakeThickSolid", self.PrimOp)
4468             anObj.SetParameters(Parameters)
4469             self._autoPublish(anObj, theName, "thickSolid")
4470             return anObj
4471
4472
4473         ## Modifies a shape to make it a thick solid. If the input is a surface
4474         #  shape (face or shell) the result is a thick solid. If an input shape
4475         #  is a solid the result is a hollowed solid with removed faces.
4476         #  @param theShape Face or Shell to get thick solid or solid to get
4477         #         hollowed solid.
4478         #  @param theThickness Thickness of the resulting solid
4479         #  @param theFacesIDs the list of face IDs to be removed from the
4480         #         result. It is ignored if \a theShape is a face or a shell.
4481         #         It is empty by default. 
4482         #  @param theInside If true the thickness is applied towards inside
4483         #
4484         #  @return The modified shape
4485         #
4486         #  @ref tui_creation_thickness "Example"
4487         @ManageTransactions("PrimOp")
4488         def Thicken(self, theShape, theThickness, theFacesIDs=[], theInside=False):
4489             """
4490             Modifies a shape to make it a thick solid. If the input is a
4491             surface shape (face or shell) the result is a thick solid. If
4492             an input shape is a solid the result is a hollowed solid with
4493             removed faces.
4494
4495             Parameters:
4496                 theShape Face or Shell to get thick solid or solid to get
4497                          hollowed solid.
4498                 theThickness Thickness of the resulting solid
4499                 theFacesIDs the list of face IDs to be removed from the
4500                          result. It is ignored if \a theShape is a face or
4501                          a shell. It is empty by default. 
4502                 theInside If true the thickness is applied towards inside
4503
4504             Returns:
4505                 The modified shape
4506             """
4507             # Example: see GEOM_TestAll.py
4508             theThickness,Parameters = ParseParameters(theThickness)
4509             anObj = self.PrimOp.MakeThickening(theShape, theFacesIDs,
4510                                                theThickness, False, theInside)
4511             RaiseIfFailed("Thicken", self.PrimOp)
4512             anObj.SetParameters(Parameters)
4513             return anObj
4514
4515         ## Build a middle path of a pipe-like shape.
4516         #  The path shape can be a wire or an edge.
4517         #  @param theShape It can be closed or unclosed pipe-like shell
4518         #                  or a pipe-like solid.
4519         #  @param theBase1, theBase2 Two bases of the supposed pipe. This
4520         #                            should be wires or faces of theShape.
4521         #  @param theName Object name; when specified, this parameter is used
4522         #         for result publication in the study. Otherwise, if automatic
4523         #         publication is switched on, default value is used for result name.
4524         #
4525         #  @note It is not assumed that exact or approximate copy of theShape
4526         #        can be obtained by applying existing Pipe operation on the
4527         #        resulting "Path" wire taking theBase1 as the base - it is not
4528         #        always possible; though in some particular cases it might work
4529         #        it is not guaranteed. Thus, RestorePath function should not be
4530         #        considered as an exact reverse operation of the Pipe.
4531         #
4532         #  @return New GEOM.GEOM_Object, containing an edge or wire that represent
4533         #                                source pipe's "path".
4534         #
4535         #  @ref tui_creation_pipe_path "Example"
4536         @ManageTransactions("PrimOp")
4537         def RestorePath (self, theShape, theBase1, theBase2, theName=None):
4538             """
4539             Build a middle path of a pipe-like shape.
4540             The path shape can be a wire or an edge.
4541
4542             Parameters:
4543                 theShape It can be closed or unclosed pipe-like shell
4544                          or a pipe-like solid.
4545                 theBase1, theBase2 Two bases of the supposed pipe. This
4546                                    should be wires or faces of theShape.
4547                 theName Object name; when specified, this parameter is used
4548                         for result publication in the study. Otherwise, if automatic
4549                         publication is switched on, default value is used for result name.
4550
4551             Returns:
4552                 New GEOM_Object, containing an edge or wire that represent
4553                                  source pipe's path.
4554             """
4555             anObj = self.PrimOp.RestorePath(theShape, theBase1, theBase2)
4556             RaiseIfFailed("RestorePath", self.PrimOp)
4557             self._autoPublish(anObj, theName, "path")
4558             return anObj
4559
4560         ## Build a middle path of a pipe-like shape.
4561         #  The path shape can be a wire or an edge.
4562         #  @param theShape It can be closed or unclosed pipe-like shell
4563         #                  or a pipe-like solid.
4564         #  @param listEdges1, listEdges2 Two bases of the supposed pipe. This
4565         #                                should be lists of edges of theShape.
4566         #  @param theName Object name; when specified, this parameter is used
4567         #         for result publication in the study. Otherwise, if automatic
4568         #         publication is switched on, default value is used for result name.
4569         #
4570         #  @note It is not assumed that exact or approximate copy of theShape
4571         #        can be obtained by applying existing Pipe operation on the
4572         #        resulting "Path" wire taking theBase1 as the base - it is not
4573         #        always possible; though in some particular cases it might work
4574         #        it is not guaranteed. Thus, RestorePath function should not be
4575         #        considered as an exact reverse operation of the Pipe.
4576         #
4577         #  @return New GEOM.GEOM_Object, containing an edge or wire that represent
4578         #                                source pipe's "path".
4579         #
4580         #  @ref tui_creation_pipe_path "Example"
4581         @ManageTransactions("PrimOp")
4582         def RestorePathEdges (self, theShape, listEdges1, listEdges2, theName=None):
4583             """
4584             Build a middle path of a pipe-like shape.
4585             The path shape can be a wire or an edge.
4586
4587             Parameters:
4588                 theShape It can be closed or unclosed pipe-like shell
4589                          or a pipe-like solid.
4590                 listEdges1, listEdges2 Two bases of the supposed pipe. This
4591                                        should be lists of edges of theShape.
4592                 theName Object name; when specified, this parameter is used
4593                         for result publication in the study. Otherwise, if automatic
4594                         publication is switched on, default value is used for result name.
4595
4596             Returns:
4597                 New GEOM_Object, containing an edge or wire that represent
4598                                  source pipe's path.
4599             """
4600             anObj = self.PrimOp.RestorePathEdges(theShape, listEdges1, listEdges2)
4601             RaiseIfFailed("RestorePath", self.PrimOp)
4602             self._autoPublish(anObj, theName, "path")
4603             return anObj
4604
4605         # end of l3_complex
4606         ## @}
4607
4608         ## @addtogroup l3_basic_go
4609         ## @{
4610
4611         ## Create a linear edge with specified ends.
4612         #  @param thePnt1 Point for the first end of edge.
4613         #  @param thePnt2 Point for the second end of edge.
4614         #  @param theName Object name; when specified, this parameter is used
4615         #         for result publication in the study. Otherwise, if automatic
4616         #         publication is switched on, default value is used for result name.
4617         #
4618         #  @return New GEOM.GEOM_Object, containing the created edge.
4619         #
4620         #  @ref tui_creation_edge "Example"
4621         @ManageTransactions("ShapesOp")
4622         def MakeEdge(self, thePnt1, thePnt2, theName=None):
4623             """
4624             Create a linear edge with specified ends.
4625
4626             Parameters:
4627                 thePnt1 Point for the first end of edge.
4628                 thePnt2 Point for the second end of edge.
4629                 theName Object name; when specified, this parameter is used
4630                         for result publication in the study. Otherwise, if automatic
4631                         publication is switched on, default value is used for result name.
4632
4633             Returns:
4634                 New GEOM.GEOM_Object, containing the created edge.
4635             """
4636             # Example: see GEOM_TestAll.py
4637             anObj = self.ShapesOp.MakeEdge(thePnt1, thePnt2)
4638             RaiseIfFailed("MakeEdge", self.ShapesOp)
4639             self._autoPublish(anObj, theName, "edge")
4640             return anObj
4641
4642         ## Create a new edge, corresponding to the given length on the given curve.
4643         #  @param theRefCurve The referenced curve (edge).
4644         #  @param theLength Length on the referenced curve. It can be negative.
4645         #  @param theStartPoint Any point can be selected for it, the new edge will begin
4646         #                       at the end of \a theRefCurve, close to the selected point.
4647         #                       If None, start from the first point of \a theRefCurve.
4648         #  @param theName Object name; when specified, this parameter is used
4649         #         for result publication in the study. Otherwise, if automatic
4650         #         publication is switched on, default value is used for result name.
4651         #
4652         #  @return New GEOM.GEOM_Object, containing the created edge.
4653         #
4654         #  @ref tui_creation_edge "Example"
4655         @ManageTransactions("ShapesOp")
4656         def MakeEdgeOnCurveByLength(self, theRefCurve, theLength, theStartPoint = None, theName=None):
4657             """
4658             Create a new edge, corresponding to the given length on the given curve.
4659
4660             Parameters:
4661                 theRefCurve The referenced curve (edge).
4662                 theLength Length on the referenced curve. It can be negative.
4663                 theStartPoint Any point can be selected for it, the new edge will begin
4664                               at the end of theRefCurve, close to the selected point.
4665                               If None, start from the first point of theRefCurve.
4666                 theName Object name; when specified, this parameter is used
4667                         for result publication in the study. Otherwise, if automatic
4668                         publication is switched on, default value is used for result name.
4669
4670             Returns:
4671                 New GEOM.GEOM_Object, containing the created edge.
4672             """
4673             # Example: see GEOM_TestAll.py
4674             theLength, Parameters = ParseParameters(theLength)
4675             anObj = self.ShapesOp.MakeEdgeOnCurveByLength(theRefCurve, theLength, theStartPoint)
4676             RaiseIfFailed("MakeEdgeOnCurveByLength", self.ShapesOp)
4677             anObj.SetParameters(Parameters)
4678             self._autoPublish(anObj, theName, "edge")
4679             return anObj
4680
4681         ## Create an edge from specified wire.
4682         #  @param theWire source Wire
4683         #  @param theLinearTolerance linear tolerance value (default = 1e-07)
4684         #  @param theAngularTolerance angular tolerance value (default = 1e-12)
4685         #  @param theName Object name; when specified, this parameter is used
4686         #         for result publication in the study. Otherwise, if automatic
4687         #         publication is switched on, default value is used for result name.
4688         #
4689         #  @return New GEOM.GEOM_Object, containing the created edge.
4690         #
4691         #  @ref tui_creation_edge "Example"
4692         @ManageTransactions("ShapesOp")
4693         def MakeEdgeWire(self, theWire, theLinearTolerance = 1e-07, theAngularTolerance = 1e-12, theName=None):
4694             """
4695             Create an edge from specified wire.
4696
4697             Parameters:
4698                 theWire source Wire
4699                 theLinearTolerance linear tolerance value (default = 1e-07)
4700                 theAngularTolerance angular tolerance value (default = 1e-12)
4701                 theName Object name; when specified, this parameter is used
4702                         for result publication in the study. Otherwise, if automatic
4703                         publication is switched on, default value is used for result name.
4704
4705             Returns:
4706                 New GEOM.GEOM_Object, containing the created edge.
4707             """
4708             # Example: see GEOM_TestAll.py
4709             anObj = self.ShapesOp.MakeEdgeWire(theWire, theLinearTolerance, theAngularTolerance)
4710             RaiseIfFailed("MakeEdgeWire", self.ShapesOp)
4711             self._autoPublish(anObj, theName, "edge")
4712             return anObj
4713
4714         ## Create a wire from the set of edges and wires.
4715         #  @param theEdgesAndWires List of edges and/or wires.
4716         #  @param theTolerance Maximum distance between vertices, that will be merged.
4717         #                      Values less than 1e-07 are equivalent to 1e-07 (Precision::Confusion())
4718         #  @param theName Object name; when specified, this parameter is used
4719         #         for result publication in the study. Otherwise, if automatic
4720         #         publication is switched on, default value is used for result name.
4721         #
4722         #  @return New GEOM.GEOM_Object, containing the created wire.
4723         #
4724         #  @ref tui_creation_wire "Example"
4725         @ManageTransactions("ShapesOp")
4726         def MakeWire(self, theEdgesAndWires, theTolerance = 1e-07, theName=None):
4727             """
4728             Create a wire from the set of edges and wires.
4729
4730             Parameters:
4731                 theEdgesAndWires List of edges and/or wires.
4732                 theTolerance Maximum distance between vertices, that will be merged.
4733                              Values less than 1e-07 are equivalent to 1e-07 (Precision::Confusion()).
4734                 theName Object name; when specified, this parameter is used
4735                         for result publication in the study. Otherwise, if automatic
4736                         publication is switched on, default value is used for result name.
4737
4738             Returns:
4739                 New GEOM.GEOM_Object, containing the created wire.
4740             """
4741             # Example: see GEOM_TestAll.py
4742             anObj = self.ShapesOp.MakeWire(theEdgesAndWires, theTolerance)
4743             RaiseIfFailed("MakeWire", self.ShapesOp)
4744             self._autoPublish(anObj, theName, "wire")
4745             return anObj
4746
4747         ## Create a face on the given wire.
4748         #  @param theWire closed Wire or Edge to build the face on.
4749         #  @param isPlanarWanted If TRUE, the algorithm tries to build a planar face.
4750         #                        If the tolerance of the obtained planar face is less
4751         #                        than 1e-06, this face will be returned, otherwise the
4752         #                        algorithm tries to build any suitable face on the given
4753         #                        wire and prints a warning message.
4754         #  @param theName Object name; when specified, this parameter is used
4755         #         for result publication in the study. Otherwise, if automatic
4756         #         publication is switched on, default value is used for result name.
4757         #
4758         #  @return New GEOM.GEOM_Object, containing the created face (compound of faces).
4759         #
4760         #  @ref tui_creation_face "Example"
4761         @ManageTransactions("ShapesOp")
4762         def MakeFace(self, theWire, isPlanarWanted, theName=None, raiseException=False):
4763             """
4764             Create a face on the given wire.
4765
4766             Parameters:
4767                 theWire closed Wire or Edge to build the face on.
4768                 isPlanarWanted If TRUE, the algorithm tries to build a planar face.
4769                                If the tolerance of the obtained planar face is less
4770                                than 1e-06, this face will be returned, otherwise the
4771                                algorithm tries to build any suitable face on the given
4772                                wire and prints a warning message.
4773                 theName Object name; when specified, this parameter is used
4774                         for result publication in the study. Otherwise, if automatic
4775                         publication is switched on, default value is used for result name.
4776
4777             Returns:
4778                 New GEOM.GEOM_Object, containing the created face (compound of faces).
4779             """
4780             # Example: see GEOM_TestAll.py
4781             anObj = self.ShapesOp.MakeFace(theWire, isPlanarWanted)
4782             if isPlanarWanted and anObj is not None and self.ShapesOp.GetErrorCode() == "MAKE_FACE_TOLERANCE_TOO_BIG":
4783                 PrintOrRaise("WARNING: Cannot build a planar face: required tolerance is too big. Non-planar face is built.",raiseException)
4784             else:
4785                 RaiseIfFailed("MakeFace", self.ShapesOp)
4786             self._autoPublish(anObj, theName, "face")
4787             return anObj
4788
4789         ## Create a face on the given wires set.
4790         #  @param theWires List of closed wires or edges to build the face on.
4791         #  @param isPlanarWanted If TRUE, the algorithm tries to build a planar face.
4792         #                        If the tolerance of the obtained planar face is less
4793         #                        than 1e-06, this face will be returned, otherwise the
4794         #                        algorithm tries to build any suitable face on the given
4795         #                        wire and prints a warning message.
4796         #  @param theName Object name; when specified, this parameter is used
4797         #         for result publication in the study. Otherwise, if automatic
4798         #         publication is switched on, default value is used for result name.
4799         #
4800         #  @return New GEOM.GEOM_Object, containing the created face (compound of faces).
4801         #
4802         #  @ref tui_creation_face "Example"
4803         @ManageTransactions("ShapesOp")
4804         def MakeFaceWires(self, theWires, isPlanarWanted, theName=None, raiseException=False):
4805             """
4806             Create a face on the given wires set.
4807
4808             Parameters:
4809                 theWires List of closed wires or edges to build the face on.
4810                 isPlanarWanted If TRUE, the algorithm tries to build a planar face.
4811                                If the tolerance of the obtained planar face is less
4812                                than 1e-06, this face will be returned, otherwise the
4813                                algorithm tries to build any suitable face on the given
4814                                wire and prints a warning message.
4815                 theName Object name; when specified, this parameter is used
4816                         for result publication in the study. Otherwise, if automatic
4817                         publication is switched on, default value is used for result name.
4818
4819             Returns:
4820                 New GEOM.GEOM_Object, containing the created face (compound of faces).
4821             """
4822             # Example: see GEOM_TestAll.py
4823             anObj = self.ShapesOp.MakeFaceWires(ToList(theWires), isPlanarWanted)
4824             if isPlanarWanted and anObj is not None and self.ShapesOp.GetErrorCode() == "MAKE_FACE_TOLERANCE_TOO_BIG":
4825                 PrintOrRaise("WARNING: Cannot build a planar face: required tolerance is too big. Non-planar face is built.",raiseException)
4826             else:
4827                 RaiseIfFailed("MakeFaceWires", self.ShapesOp)
4828             self._autoPublish(anObj, theName, "face")
4829             return anObj
4830
4831         ## See MakeFaceWires() method for details.
4832         #
4833         #  @ref tui_creation_face "Example 1"
4834         #  \n @ref swig_MakeFaces  "Example 2"
4835         def MakeFaces(self, theWires, isPlanarWanted, theName=None):
4836             """
4837             See geompy.MakeFaceWires() method for details.
4838             """
4839             # Example: see GEOM_TestOthers.py
4840             # note: auto-publishing is done in self.MakeFaceWires()
4841             anObj = self.MakeFaceWires(theWires, isPlanarWanted, theName)
4842             return anObj
4843
4844         ## Create a face based on a surface from given face bounded
4845         #  by given wire.
4846         #  @param theFace the face whose surface is used to create a new face.
4847         #  @param theWire the wire that will bound a new face.
4848         #  @param theName Object name; when specified, this parameter is used
4849         #         for result publication in the study. Otherwise, if automatic
4850         #         publication is switched on, default value is used for result name.
4851         #
4852         #  @return New GEOM.GEOM_Object, containing the created face.
4853         #
4854         #  @ref tui_creation_face "Example"
4855         @ManageTransactions("ShapesOp")
4856         def MakeFaceFromSurface(self, theFace, theWire, theName=None):
4857             """
4858             Create a face based on a surface from given face bounded
4859             by given wire.
4860
4861             Parameters:
4862                 theFace the face whose surface is used to create a new face.
4863                 theWire the wire that will bound a new face.
4864                 theName Object name; when specified, this parameter is used
4865                         for result publication in the study. Otherwise, if automatic
4866                         publication is switched on, default value is used for result name.
4867
4868             Returns:
4869                 New GEOM.GEOM_Object, containing the created face.
4870             """
4871             # Example: see GEOM_TestAll.py
4872             anObj = self.ShapesOp.MakeFaceFromSurface(theFace, theWire)
4873             RaiseIfFailed("MakeFaceFromSurface", self.ShapesOp)
4874             self._autoPublish(anObj, theName, "face")
4875             return anObj
4876           
4877         ## Create a face from a set of edges with the given constraints.
4878         #  @param theConstraints List of edges and constraint faces (as a sequence of a Edge + Face couples):
4879         #         - edges should form a closed wire;
4880         #         - for each edge, constraint face is optional: if a constraint face is missing
4881         #           for some edge, this means that there no constraint associated with this edge.
4882         #  @param theName Object name; when specified, this parameter is used
4883         #         for result publication in the study. Otherwise, if automatic
4884         #         publication is switched on, default value is used for result name.
4885         # 
4886         # @return New GEOM.GEOM_Object, containing the created face.
4887         # 
4888         # @ref tui_creation_face "Example"
4889         @ManageTransactions("ShapesOp")
4890         def MakeFaceWithConstraints(self, theConstraints, theName=None):
4891             """
4892             Create a face from a set of edges with the given constraints.
4893
4894             Parameters:
4895                 theConstraints List of edges and constraint faces (as a sequence of a Edge + Face couples):
4896                         - edges should form a closed wire;
4897                         - for each edge, constraint face is optional: if a constraint face is missing
4898                           for some edge, this means that there no constraint associated with this edge.
4899                 theName Object name; when specified, this parameter is used
4900                         for result publication in the study. Otherwise, if automatic
4901                         publication is switched on, default value is used for result name.
4902
4903             Returns:
4904                 New GEOM.GEOM_Object, containing the created face.
4905             """
4906             # Example: see GEOM_TestAll.py
4907             anObj = self.ShapesOp.MakeFaceWithConstraints(theConstraints)
4908             if anObj is None:
4909                 RaiseIfFailed("MakeFaceWithConstraints", self.ShapesOp)
4910             self._autoPublish(anObj, theName, "face")
4911             return anObj
4912
4913         ## Create a shell from the set of faces, shells and/or compounds of faces.
4914         #  @param theFacesAndShells List of faces, shells and/or compounds of faces.
4915         #  @param theName Object name; when specified, this parameter is used
4916         #         for result publication in the study. Otherwise, if automatic
4917         #         publication is switched on, default value is used for result name.
4918         #
4919         #  @return New GEOM.GEOM_Object, containing the created shell (compound of shells).
4920         #
4921         #  @ref tui_creation_shell "Example"
4922         @ManageTransactions("ShapesOp")
4923         def MakeShell(self, theFacesAndShells, theName=None):
4924             """
4925             Create a shell from the set of faces and shells.
4926
4927             Parameters:
4928                 theFacesAndShells List of faces and/or shells.
4929                 theName Object name; when specified, this parameter is used
4930                         for result publication in the study. Otherwise, if automatic
4931                         publication is switched on, default value is used for result name.
4932
4933             Returns:
4934                 New GEOM.GEOM_Object, containing the created shell (compound of shells).
4935             """
4936             # Example: see GEOM_TestAll.py
4937             anObj = self.ShapesOp.MakeShell( ToList( theFacesAndShells ))
4938             RaiseIfFailed("MakeShell", self.ShapesOp)
4939             self._autoPublish(anObj, theName, "shell")
4940             return anObj
4941
4942         ## Create a solid, bounded by the given shells.
4943         #  @param theShells Sequence of bounding shells.
4944         #  @param theName Object name; when specified, this parameter is used
4945         #         for result publication in the study. Otherwise, if automatic
4946         #         publication is switched on, default value is used for result name.
4947         #
4948         #  @return New GEOM.GEOM_Object, containing the created solid.
4949         #
4950         #  @ref tui_creation_solid "Example"
4951         @ManageTransactions("ShapesOp")
4952         def MakeSolid(self, theShells, theName=None):
4953             """
4954             Create a solid, bounded by the given shells.
4955
4956             Parameters:
4957                 theShells Sequence of bounding shells.
4958                 theName Object name; when specified, this parameter is used
4959                         for result publication in the study. Otherwise, if automatic
4960                         publication is switched on, default value is used for result name.
4961
4962             Returns:
4963                 New GEOM.GEOM_Object, containing the created solid.
4964             """
4965             # Example: see GEOM_TestAll.py
4966             theShells = ToList(theShells)
4967             if len(theShells) == 1:
4968                 descr = self._IsGoodForSolid(theShells[0])
4969                 #if len(descr) > 0:
4970                 #    raise RuntimeError, "MakeSolidShells : " + descr
4971                 if descr == "WRN_SHAPE_UNCLOSED":
4972                     raise RuntimeError("MakeSolidShells : Unable to create solid from unclosed shape")
4973             anObj = self.ShapesOp.MakeSolidShells(theShells)
4974             RaiseIfFailed("MakeSolidShells", self.ShapesOp)
4975             self._autoPublish(anObj, theName, "solid")
4976             return anObj
4977
4978         ## Create a compound of the given shapes.
4979         #  @param theShapes List of shapes to put in compound.
4980         #  @param theName Object name; when specified, this parameter is used
4981         #         for result publication in the study. Otherwise, if automatic
4982         #         publication is switched on, default value is used for result name.
4983         #
4984         #  @return New GEOM.GEOM_Object, containing the created compound.
4985         #
4986         #  @ref tui_creation_compound "Example"
4987         @ManageTransactions("ShapesOp")
4988         def MakeCompound(self, theShapes, theName=None):
4989             """
4990             Create a compound of the given shapes.
4991
4992             Parameters:
4993                 theShapes List of shapes to put in compound.
4994                 theName Object name; when specified, this parameter is used
4995                         for result publication in the study. Otherwise, if automatic
4996                         publication is switched on, default value is used for result name.
4997
4998             Returns:
4999                 New GEOM.GEOM_Object, containing the created compound.
5000             """
5001             # Example: see GEOM_TestAll.py
5002             anObj = self.ShapesOp.MakeCompound(ToList(theShapes))
5003             RaiseIfFailed("MakeCompound", self.ShapesOp)
5004             self._autoPublish(anObj, theName, "compound")
5005             return anObj
5006         
5007         ## Create a solid (or solids) from the set of faces and/or shells.
5008         #  @param theFacesOrShells List of faces and/or shells.
5009         #  @param isIntersect If TRUE, forces performing intersections
5010         #         between arguments; otherwise (default) intersection is not performed.
5011         #  @param theName Object name; when specified, this parameter is used
5012         #         for result publication in the study. Otherwise, if automatic
5013         #         publication is switched on, default value is used for result name.
5014         #
5015         #  @return New GEOM.GEOM_Object, containing the created solid (or compound of solids).
5016         #
5017         #  @ref tui_creation_solid_from_faces "Example"
5018         @ManageTransactions("ShapesOp")
5019         def MakeSolidFromConnectedFaces(self, theFacesOrShells, isIntersect = False, theName=None):
5020             """
5021             Create a solid (or solids) from the set of connected faces and/or shells.
5022
5023             Parameters:
5024                 theFacesOrShells List of faces and/or shells.
5025                 isIntersect If TRUE, forces performing intersections
5026                         between arguments; otherwise (default) intersection is not performed
5027                 theName Object name; when specified, this parameter is used.
5028                         for result publication in the study. Otherwise, if automatic
5029                         publication is switched on, default value is used for result name.
5030
5031             Returns:
5032                 New GEOM.GEOM_Object, containing the created solid (or compound of solids).
5033             """
5034             # Example: see GEOM_TestAll.py
5035             anObj = self.ShapesOp.MakeSolidFromConnectedFaces(theFacesOrShells, isIntersect)
5036             RaiseIfFailed("MakeSolidFromConnectedFaces", self.ShapesOp)
5037             self._autoPublish(anObj, theName, "solid")
5038             return anObj
5039
5040         # end of l3_basic_go
5041         ## @}
5042
5043         ## @addtogroup l2_measure
5044         ## @{
5045
5046         ## Gives quantity of faces in the given shape.
5047         #  @param theShape Shape to count faces of.
5048         #  @return Quantity of faces.
5049         #
5050         #  @ref swig_NumberOf "Example"
5051         @ManageTransactions("ShapesOp")
5052         def NumberOfFaces(self, theShape):
5053             """
5054             Gives quantity of faces in the given shape.
5055
5056             Parameters:
5057                 theShape Shape to count faces of.
5058
5059             Returns:
5060                 Quantity of faces.
5061             """
5062             # Example: see GEOM_TestOthers.py
5063             nb_faces = self.ShapesOp.NumberOfFaces(theShape)
5064             RaiseIfFailed("NumberOfFaces", self.ShapesOp)
5065             return nb_faces
5066
5067         ## Gives quantity of edges in the given shape.
5068         #  @param theShape Shape to count edges of.
5069         #  @return Quantity of edges.
5070         #
5071         #  @ref swig_NumberOf "Example"
5072         @ManageTransactions("ShapesOp")
5073         def NumberOfEdges(self, theShape):
5074             """
5075             Gives quantity of edges in the given shape.
5076
5077             Parameters:
5078                 theShape Shape to count edges of.
5079
5080             Returns:
5081                 Quantity of edges.
5082             """
5083             # Example: see GEOM_TestOthers.py
5084             nb_edges = self.ShapesOp.NumberOfEdges(theShape)
5085             RaiseIfFailed("NumberOfEdges", self.ShapesOp)
5086             return nb_edges
5087
5088         ## Gives quantity of sub-shapes of type theShapeType in the given shape.
5089         #  @param theShape Shape to count sub-shapes of.
5090         #  @param theShapeType Type of sub-shapes to count (see ShapeType())
5091         #  @return Quantity of sub-shapes of given type.
5092         #
5093         #  @ref swig_NumberOf "Example"
5094         @ManageTransactions("ShapesOp")
5095         def NumberOfSubShapes(self, theShape, theShapeType):
5096             """
5097             Gives quantity of sub-shapes of type theShapeType in the given shape.
5098
5099             Parameters:
5100                 theShape Shape to count sub-shapes of.
5101                 theShapeType Type of sub-shapes to count (see geompy.ShapeType)
5102
5103             Returns:
5104                 Quantity of sub-shapes of given type.
5105             """
5106             # Example: see GEOM_TestOthers.py
5107             nb_ss = self.ShapesOp.NumberOfSubShapes(theShape, theShapeType)
5108             RaiseIfFailed("NumberOfSubShapes", self.ShapesOp)
5109             return nb_ss
5110
5111         ## Gives quantity of solids in the given shape.
5112         #  @param theShape Shape to count solids in.
5113         #  @return Quantity of solids.
5114         #
5115         #  @ref swig_NumberOf "Example"
5116         @ManageTransactions("ShapesOp")
5117         def NumberOfSolids(self, theShape):
5118             """
5119             Gives quantity of solids in the given shape.
5120
5121             Parameters:
5122                 theShape Shape to count solids in.
5123
5124             Returns:
5125                 Quantity of solids.
5126             """
5127             # Example: see GEOM_TestOthers.py
5128             nb_solids = self.ShapesOp.NumberOfSubShapes(theShape, self.ShapeType["SOLID"])
5129             RaiseIfFailed("NumberOfSolids", self.ShapesOp)
5130             return nb_solids
5131
5132         # end of l2_measure
5133         ## @}
5134
5135         ## @addtogroup l3_healing
5136         ## @{
5137
5138         ## Reverses an orientation the given shape.
5139         #  @param theShape Shape to be reversed.
5140         #  @param theName Object name; when specified, this parameter is used
5141         #         for result publication in the study. Otherwise, if automatic
5142         #         publication is switched on, default value is used for result name.
5143         #
5144         #  @return The reversed copy of theShape.
5145         #
5146         #  @ref swig_ChangeOrientation "Example"
5147         @ManageTransactions("ShapesOp")
5148         def ChangeOrientation(self, theShape, theName=None):
5149             """
5150             Reverses an orientation the given shape.
5151
5152             Parameters:
5153                 theShape Shape to be reversed.
5154                 theName Object name; when specified, this parameter is used
5155                         for result publication in the study. Otherwise, if automatic
5156                         publication is switched on, default value is used for result name.
5157
5158             Returns:
5159                 The reversed copy of theShape.
5160             """
5161             # Example: see GEOM_TestAll.py
5162             anObj = self.ShapesOp.ChangeOrientation(theShape)
5163             RaiseIfFailed("ChangeOrientation", self.ShapesOp)
5164             self._autoPublish(anObj, theName, "reversed")
5165             return anObj
5166
5167         ## See ChangeOrientation() method for details.
5168         #
5169         #  @ref swig_OrientationChange "Example"
5170         def OrientationChange(self, theShape, theName=None):
5171             """
5172             See geompy.ChangeOrientation method for details.
5173             """
5174             # Example: see GEOM_TestOthers.py
5175             # note: auto-publishing is done in self.ChangeOrientation()
5176             anObj = self.ChangeOrientation(theShape, theName)
5177             return anObj
5178
5179         # end of l3_healing
5180         ## @}
5181
5182         ## @addtogroup l4_obtain
5183         ## @{
5184
5185         ## Retrieve all free faces from the given shape.
5186         #  Free face is a face, which is not shared between two shells of the shape.
5187         #  @param theShape Shape to find free faces in.
5188         #  @return List of IDs of all free faces, contained in theShape.
5189         #
5190         #  @ref tui_free_faces_page "Example"
5191         @ManageTransactions("ShapesOp")
5192         def GetFreeFacesIDs(self,theShape):
5193             """
5194             Retrieve all free faces from the given shape.
5195             Free face is a face, which is not shared between two shells of the shape.
5196
5197             Parameters:
5198                 theShape Shape to find free faces in.
5199
5200             Returns:
5201                 List of IDs of all free faces, contained in theShape.
5202             """
5203             # Example: see GEOM_TestOthers.py
5204             anIDs = self.ShapesOp.GetFreeFacesIDs(theShape)
5205             RaiseIfFailed("GetFreeFacesIDs", self.ShapesOp)
5206             return anIDs
5207
5208         ## Get all sub-shapes of theShape1 of the given type, shared with theShape2.
5209         #  @param theShape1 Shape to find sub-shapes in.
5210         #  @param theShape2 Shape to find shared sub-shapes with.
5211         #  @param theShapeType Type of sub-shapes to be retrieved.
5212         #  @param theName Object name; when specified, this parameter is used
5213         #         for result publication in the study. Otherwise, if automatic
5214         #         publication is switched on, default value is used for result name.
5215         #
5216         #  @return List of sub-shapes of theShape1, shared with theShape2.
5217         #
5218         #  @ref swig_GetSharedShapes "Example"
5219         @ManageTransactions("ShapesOp")
5220         def GetSharedShapes(self, theShape1, theShape2, theShapeType, theName=None):
5221             """
5222             Get all sub-shapes of theShape1 of the given type, shared with theShape2.
5223
5224             Parameters:
5225                 theShape1 Shape to find sub-shapes in.
5226                 theShape2 Shape to find shared sub-shapes with.
5227                 theShapeType Type of sub-shapes to be retrieved.
5228                 theName Object name; when specified, this parameter is used
5229                         for result publication in the study. Otherwise, if automatic
5230                         publication is switched on, default value is used for result name.
5231
5232             Returns:
5233                 List of sub-shapes of theShape1, shared with theShape2.
5234             """
5235             # Example: see GEOM_TestOthers.py
5236             aList = self.ShapesOp.GetSharedShapes(theShape1, theShape2, theShapeType)
5237             RaiseIfFailed("GetSharedShapes", self.ShapesOp)
5238             self._autoPublish(aList, theName, "shared")
5239             return aList
5240
5241         ## Get sub-shapes, shared by input shapes.
5242         #  @param theShapes Either a list or compound of shapes to find common sub-shapes of.
5243         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType()).
5244         #  @param theMultiShare Specifies what type of shares should be checked:
5245         #         - @c True (default): search sub-shapes from 1st input shape shared with all other input shapes;
5246         #         - @c False: causes to search sub-shapes shared between couples of input shapes.
5247         #  @param theName Object name; when specified, this parameter is used
5248         #         for result publication in the study. Otherwise, if automatic
5249         #         publication is switched on, default value is used for result name.
5250         #
5251         #  @note If @a theShapes contains single compound, the shares between all possible couples of 
5252         #        its top-level shapes are returned; otherwise, only shares between 1st input shape
5253         #        and all rest input shapes are returned.
5254         #
5255         #  @return List of all found sub-shapes.
5256         #
5257         #  Examples:
5258         #  - @ref tui_shared_shapes "Example 1"
5259         #  - @ref swig_GetSharedShapes "Example 2"
5260         @ManageTransactions("ShapesOp")
5261         def GetSharedShapesMulti(self, theShapes, theShapeType, theMultiShare=True, theName=None):
5262             """
5263             Get sub-shapes, shared by input shapes.
5264
5265             Parameters:
5266                 theShapes Either a list or compound of shapes to find common sub-shapes of.
5267                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType).
5268                 theMultiShare Specifies what type of shares should be checked:
5269                   - True (default): search sub-shapes from 1st input shape shared with all other input shapes;
5270                   - False: causes to search sub-shapes shared between couples of input shapes.
5271                 theName Object name; when specified, this parameter is used
5272                         for result publication in the study. Otherwise, if automatic
5273                         publication is switched on, default value is used for result name.
5274
5275             Note: if theShapes contains single compound, the shares between all possible couples of 
5276                   its top-level shapes are returned; otherwise, only shares between 1st input shape
5277                   and all rest input shapes are returned.
5278
5279             Returns:
5280                 List of all found sub-shapes.
5281             """
5282             # Example: see GEOM_TestOthers.py
5283             aList = self.ShapesOp.GetSharedShapesMulti(ToList(theShapes), theShapeType, theMultiShare)
5284             RaiseIfFailed("GetSharedShapesMulti", self.ShapesOp)
5285             self._autoPublish(aList, theName, "shared")
5286             return aList
5287
5288         ## Find in <VAR>theShape</VAR> all sub-shapes of type <VAR>theShapeType</VAR>,
5289         #  situated relatively the specified plane by the certain way,
5290         #  defined through <VAR>theState</VAR> parameter.
5291         #  @param theShape Shape to find sub-shapes of.
5292         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5293         #  @param theAx1 Vector (or line, or linear edge), specifying normal
5294         #                direction and location of the plane to find shapes on.
5295         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5296         #  @param theName Object name; when specified, this parameter is used
5297         #         for result publication in the study. Otherwise, if automatic
5298         #         publication is switched on, default value is used for result name.
5299         #
5300         #  @return List of all found sub-shapes.
5301         #
5302         #  @ref swig_GetShapesOnPlane "Example"
5303         @ManageTransactions("ShapesOp")
5304         def GetShapesOnPlane(self, theShape, theShapeType, theAx1, theState, theName=None):
5305             """
5306             Find in theShape all sub-shapes of type theShapeType,
5307             situated relatively the specified plane by the certain way,
5308             defined through theState parameter.
5309
5310             Parameters:
5311                 theShape Shape to find sub-shapes of.
5312                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5313                 theAx1 Vector (or line, or linear edge), specifying normal
5314                        direction and location of the plane to find shapes on.
5315                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5316                 theName Object name; when specified, this parameter is used
5317                         for result publication in the study. Otherwise, if automatic
5318                         publication is switched on, default value is used for result name.
5319
5320             Returns:
5321                 List of all found sub-shapes.
5322             """
5323             # Example: see GEOM_TestOthers.py
5324             aList = self.ShapesOp.GetShapesOnPlane(theShape, theShapeType, theAx1, theState)
5325             RaiseIfFailed("GetShapesOnPlane", self.ShapesOp)
5326             self._autoPublish(aList, theName, "shapeOnPlane")
5327             return aList
5328
5329         ## Find in <VAR>theShape</VAR> all sub-shapes of type <VAR>theShapeType</VAR>,
5330         #  situated relatively the specified plane by the certain way,
5331         #  defined through <VAR>theState</VAR> parameter.
5332         #  @param theShape Shape to find sub-shapes of.
5333         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5334         #  @param theAx1 Vector (or line, or linear edge), specifying normal
5335         #                direction and location of the plane to find shapes on.
5336         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5337         #
5338         #  @return List of all found sub-shapes indices.
5339         #
5340         #  @ref swig_GetShapesOnPlaneIDs "Example"
5341         @ManageTransactions("ShapesOp")
5342         def GetShapesOnPlaneIDs(self, theShape, theShapeType, theAx1, theState):
5343             """
5344             Find in theShape all sub-shapes of type theShapeType,
5345             situated relatively the specified plane by the certain way,
5346             defined through theState parameter.
5347
5348             Parameters:
5349                 theShape Shape to find sub-shapes of.
5350                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5351                 theAx1 Vector (or line, or linear edge), specifying normal
5352                        direction and location of the plane to find shapes on.
5353                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5354
5355             Returns:
5356                 List of all found sub-shapes indices.
5357             """
5358             # Example: see GEOM_TestOthers.py
5359             aList = self.ShapesOp.GetShapesOnPlaneIDs(theShape, theShapeType, theAx1, theState)
5360             RaiseIfFailed("GetShapesOnPlaneIDs", self.ShapesOp)
5361             return aList
5362
5363         ## Find in <VAR>theShape</VAR> all sub-shapes of type <VAR>theShapeType</VAR>,
5364         #  situated relatively the specified plane by the certain way,
5365         #  defined through <VAR>theState</VAR> parameter.
5366         #  @param theShape Shape to find sub-shapes of.
5367         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5368         #  @param theAx1 Vector (or line, or linear edge), specifying normal
5369         #                direction of the plane to find shapes on.
5370         #  @param thePnt Point specifying location of the plane to find shapes on.
5371         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5372         #  @param theName Object name; when specified, this parameter is used
5373         #         for result publication in the study. Otherwise, if automatic
5374         #         publication is switched on, default value is used for result name.
5375         #
5376         #  @return List of all found sub-shapes.
5377         #
5378         #  @ref swig_GetShapesOnPlaneWithLocation "Example"
5379         @ManageTransactions("ShapesOp")
5380         def GetShapesOnPlaneWithLocation(self, theShape, theShapeType, theAx1, thePnt, theState, theName=None):
5381             """
5382             Find in theShape all sub-shapes of type theShapeType,
5383             situated relatively the specified plane by the certain way,
5384             defined through theState parameter.
5385
5386             Parameters:
5387                 theShape Shape to find sub-shapes of.
5388                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5389                 theAx1 Vector (or line, or linear edge), specifying normal
5390                        direction and location of the plane to find shapes on.
5391                 thePnt Point specifying location of the plane to find shapes on.
5392                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5393                 theName Object name; when specified, this parameter is used
5394                         for result publication in the study. Otherwise, if automatic
5395                         publication is switched on, default value is used for result name.
5396
5397             Returns:
5398                 List of all found sub-shapes.
5399             """
5400             # Example: see GEOM_TestOthers.py
5401             aList = self.ShapesOp.GetShapesOnPlaneWithLocation(theShape, theShapeType,
5402                                                                theAx1, thePnt, theState)
5403             RaiseIfFailed("GetShapesOnPlaneWithLocation", self.ShapesOp)
5404             self._autoPublish(aList, theName, "shapeOnPlane")
5405             return aList
5406
5407         ## Find in <VAR>theShape</VAR> all sub-shapes of type <VAR>theShapeType</VAR>,
5408         #  situated relatively the specified plane by the certain way,
5409         #  defined through <VAR>theState</VAR> parameter.
5410         #  @param theShape Shape to find sub-shapes of.
5411         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5412         #  @param theAx1 Vector (or line, or linear edge), specifying normal
5413         #                direction of the plane to find shapes on.
5414         #  @param thePnt Point specifying location of the plane to find shapes on.
5415         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5416         #
5417         #  @return List of all found sub-shapes indices.
5418         #
5419         #  @ref swig_GetShapesOnPlaneWithLocationIDs "Example"
5420         @ManageTransactions("ShapesOp")
5421         def GetShapesOnPlaneWithLocationIDs(self, theShape, theShapeType, theAx1, thePnt, theState):
5422             """
5423             Find in theShape all sub-shapes of type theShapeType,
5424             situated relatively the specified plane by the certain way,
5425             defined through theState parameter.
5426
5427             Parameters:
5428                 theShape Shape to find sub-shapes of.
5429                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5430                 theAx1 Vector (or line, or linear edge), specifying normal
5431                        direction and location of the plane to find shapes on.
5432                 thePnt Point specifying location of the plane to find shapes on.
5433                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5434
5435             Returns:
5436                 List of all found sub-shapes indices.
5437             """
5438             # Example: see GEOM_TestOthers.py
5439             aList = self.ShapesOp.GetShapesOnPlaneWithLocationIDs(theShape, theShapeType,
5440                                                                   theAx1, thePnt, theState)
5441             RaiseIfFailed("GetShapesOnPlaneWithLocationIDs", self.ShapesOp)
5442             return aList
5443
5444         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
5445         #  the specified cylinder by the certain way, defined through \a theState parameter.
5446         #  @param theShape Shape to find sub-shapes of.
5447         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5448         #  @param theAxis Vector (or line, or linear edge), specifying
5449         #                 axis of the cylinder to find shapes on.
5450         #  @param theRadius Radius of the cylinder to find shapes on.
5451         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5452         #  @param theName Object name; when specified, this parameter is used
5453         #         for result publication in the study. Otherwise, if automatic
5454         #         publication is switched on, default value is used for result name.
5455         #
5456         #  @return List of all found sub-shapes.
5457         #
5458         #  @ref swig_GetShapesOnCylinder "Example"
5459         @ManageTransactions("ShapesOp")
5460         def GetShapesOnCylinder(self, theShape, theShapeType, theAxis, theRadius, theState, theName=None):
5461             """
5462             Find in theShape all sub-shapes of type theShapeType, situated relatively
5463             the specified cylinder by the certain way, defined through theState parameter.
5464
5465             Parameters:
5466                 theShape Shape to find sub-shapes of.
5467                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5468                 theAxis Vector (or line, or linear edge), specifying
5469                         axis of the cylinder to find shapes on.
5470                 theRadius Radius of the cylinder to find shapes on.
5471                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5472                 theName Object name; when specified, this parameter is used
5473                         for result publication in the study. Otherwise, if automatic
5474                         publication is switched on, default value is used for result name.
5475
5476             Returns:
5477                 List of all found sub-shapes.
5478             """
5479             # Example: see GEOM_TestOthers.py
5480             aList = self.ShapesOp.GetShapesOnCylinder(theShape, theShapeType, theAxis, theRadius, theState)
5481             RaiseIfFailed("GetShapesOnCylinder", self.ShapesOp)
5482             self._autoPublish(aList, theName, "shapeOnCylinder")
5483             return aList
5484
5485         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
5486         #  the specified cylinder by the certain way, defined through \a theState parameter.
5487         #  @param theShape Shape to find sub-shapes of.
5488         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5489         #  @param theAxis Vector (or line, or linear edge), specifying
5490         #                 axis of the cylinder to find shapes on.
5491         #  @param theRadius Radius of the cylinder to find shapes on.
5492         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5493         #
5494         #  @return List of all found sub-shapes indices.
5495         #
5496         #  @ref swig_GetShapesOnCylinderIDs "Example"
5497         @ManageTransactions("ShapesOp")
5498         def GetShapesOnCylinderIDs(self, theShape, theShapeType, theAxis, theRadius, theState):
5499             """
5500             Find in theShape all sub-shapes of type theShapeType, situated relatively
5501             the specified cylinder by the certain way, defined through theState parameter.
5502
5503             Parameters:
5504                 theShape Shape to find sub-shapes of.
5505                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5506                 theAxis Vector (or line, or linear edge), specifying
5507                         axis of the cylinder to find shapes on.
5508                 theRadius Radius of the cylinder to find shapes on.
5509                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5510
5511             Returns:
5512                 List of all found sub-shapes indices.
5513             """
5514             # Example: see GEOM_TestOthers.py
5515             aList = self.ShapesOp.GetShapesOnCylinderIDs(theShape, theShapeType, theAxis, theRadius, theState)
5516             RaiseIfFailed("GetShapesOnCylinderIDs", self.ShapesOp)
5517             return aList
5518
5519         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
5520         #  the specified cylinder by the certain way, defined through \a theState parameter.
5521         #  @param theShape Shape to find sub-shapes of.
5522         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5523         #  @param theAxis Vector (or line, or linear edge), specifying
5524         #                 axis of the cylinder to find shapes on.
5525         #  @param thePnt Point specifying location of the bottom of the cylinder.
5526         #  @param theRadius Radius of the cylinder to find shapes on.
5527         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5528         #  @param theName Object name; when specified, this parameter is used
5529         #         for result publication in the study. Otherwise, if automatic
5530         #         publication is switched on, default value is used for result name.
5531         #
5532         #  @return List of all found sub-shapes.
5533         #
5534         #  @ref swig_GetShapesOnCylinderWithLocation "Example"
5535         @ManageTransactions("ShapesOp")
5536         def GetShapesOnCylinderWithLocation(self, theShape, theShapeType, theAxis, thePnt, theRadius, theState, theName=None):
5537             """
5538             Find in theShape all sub-shapes of type theShapeType, situated relatively
5539             the specified cylinder by the certain way, defined through theState parameter.
5540
5541             Parameters:
5542                 theShape Shape to find sub-shapes of.
5543                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5544                 theAxis Vector (or line, or linear edge), specifying
5545                         axis of the cylinder to find shapes on.
5546                 theRadius Radius of the cylinder to find shapes on.
5547                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5548                 theName Object name; when specified, this parameter is used
5549                         for result publication in the study. Otherwise, if automatic
5550                         publication is switched on, default value is used for result name.
5551
5552             Returns:
5553                 List of all found sub-shapes.
5554             """
5555             # Example: see GEOM_TestOthers.py
5556             aList = self.ShapesOp.GetShapesOnCylinderWithLocation(theShape, theShapeType, theAxis, thePnt, theRadius, theState)
5557             RaiseIfFailed("GetShapesOnCylinderWithLocation", self.ShapesOp)
5558             self._autoPublish(aList, theName, "shapeOnCylinder")
5559             return aList
5560
5561         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
5562         #  the specified cylinder by the certain way, defined through \a theState parameter.
5563         #  @param theShape Shape to find sub-shapes of.
5564         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5565         #  @param theAxis Vector (or line, or linear edge), specifying
5566         #                 axis of the cylinder to find shapes on.
5567         #  @param thePnt Point specifying location of the bottom of the cylinder.
5568         #  @param theRadius Radius of the cylinder to find shapes on.
5569         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5570         #
5571         #  @return List of all found sub-shapes indices
5572         #
5573         #  @ref swig_GetShapesOnCylinderWithLocationIDs "Example"
5574         @ManageTransactions("ShapesOp")
5575         def GetShapesOnCylinderWithLocationIDs(self, theShape, theShapeType, theAxis, thePnt, theRadius, theState):
5576             """
5577             Find in theShape all sub-shapes of type theShapeType, situated relatively
5578             the specified cylinder by the certain way, defined through theState parameter.
5579
5580             Parameters:
5581                 theShape Shape to find sub-shapes of.
5582                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5583                 theAxis Vector (or line, or linear edge), specifying
5584                         axis of the cylinder to find shapes on.
5585                 theRadius Radius of the cylinder to find shapes on.
5586                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5587
5588             Returns:
5589                 List of all found sub-shapes indices.
5590             """
5591             # Example: see GEOM_TestOthers.py
5592             aList = self.ShapesOp.GetShapesOnCylinderWithLocationIDs(theShape, theShapeType, theAxis, thePnt, theRadius, theState)
5593             RaiseIfFailed("GetShapesOnCylinderWithLocationIDs", self.ShapesOp)
5594             return aList
5595
5596         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
5597         #  the specified sphere by the certain way, defined through \a theState parameter.
5598         #  @param theShape Shape to find sub-shapes of.
5599         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5600         #  @param theCenter Point, specifying center of the sphere to find shapes on.
5601         #  @param theRadius Radius of the sphere to find shapes on.
5602         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5603         #  @param theName Object name; when specified, this parameter is used
5604         #         for result publication in the study. Otherwise, if automatic
5605         #         publication is switched on, default value is used for result name.
5606         #
5607         #  @return List of all found sub-shapes.
5608         #
5609         #  @ref swig_GetShapesOnSphere "Example"
5610         @ManageTransactions("ShapesOp")
5611         def GetShapesOnSphere(self, theShape, theShapeType, theCenter, theRadius, theState, theName=None):
5612             """
5613             Find in theShape all sub-shapes of type theShapeType, situated relatively
5614             the specified sphere by the certain way, defined through theState parameter.
5615
5616             Parameters:
5617                 theShape Shape to find sub-shapes of.
5618                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5619                 theCenter Point, specifying center of the sphere to find shapes on.
5620                 theRadius Radius of the sphere to find shapes on.
5621                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5622                 theName Object name; when specified, this parameter is used
5623                         for result publication in the study. Otherwise, if automatic
5624                         publication is switched on, default value is used for result name.
5625
5626             Returns:
5627                 List of all found sub-shapes.
5628             """
5629             # Example: see GEOM_TestOthers.py
5630             aList = self.ShapesOp.GetShapesOnSphere(theShape, theShapeType, theCenter, theRadius, theState)
5631             RaiseIfFailed("GetShapesOnSphere", self.ShapesOp)
5632             self._autoPublish(aList, theName, "shapeOnSphere")
5633             return aList
5634
5635         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
5636         #  the specified sphere by the certain way, defined through \a theState parameter.
5637         #  @param theShape Shape to find sub-shapes of.
5638         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5639         #  @param theCenter Point, specifying center of the sphere to find shapes on.
5640         #  @param theRadius Radius of the sphere to find shapes on.
5641         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5642         #
5643         #  @return List of all found sub-shapes indices.
5644         #
5645         #  @ref swig_GetShapesOnSphereIDs "Example"
5646         @ManageTransactions("ShapesOp")
5647         def GetShapesOnSphereIDs(self, theShape, theShapeType, theCenter, theRadius, theState):
5648             """
5649             Find in theShape all sub-shapes of type theShapeType, situated relatively
5650             the specified sphere by the certain way, defined through theState parameter.
5651
5652             Parameters:
5653                 theShape Shape to find sub-shapes of.
5654                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5655                 theCenter Point, specifying center of the sphere to find shapes on.
5656                 theRadius Radius of the sphere to find shapes on.
5657                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5658
5659             Returns:
5660                 List of all found sub-shapes indices.
5661             """
5662             # Example: see GEOM_TestOthers.py
5663             aList = self.ShapesOp.GetShapesOnSphereIDs(theShape, theShapeType, theCenter, theRadius, theState)
5664             RaiseIfFailed("GetShapesOnSphereIDs", self.ShapesOp)
5665             return aList
5666
5667         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
5668         #  the specified quadrangle by the certain way, defined through \a theState parameter.
5669         #  @param theShape Shape to find sub-shapes of.
5670         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5671         #  @param theTopLeftPoint Point, specifying top left corner of a quadrangle
5672         #  @param theTopRightPoint Point, specifying top right corner of a quadrangle
5673         #  @param theBottomLeftPoint Point, specifying bottom left corner of a quadrangle
5674         #  @param theBottomRightPoint Point, specifying bottom right corner of a quadrangle
5675         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5676         #  @param theName Object name; when specified, this parameter is used
5677         #         for result publication in the study. Otherwise, if automatic
5678         #         publication is switched on, default value is used for result name.
5679         #
5680         #  @return List of all found sub-shapes.
5681         #
5682         #  @ref swig_GetShapesOnQuadrangle "Example"
5683         @ManageTransactions("ShapesOp")
5684         def GetShapesOnQuadrangle(self, theShape, theShapeType,
5685                                   theTopLeftPoint, theTopRightPoint,
5686                                   theBottomLeftPoint, theBottomRightPoint, theState, theName=None):
5687             """
5688             Find in theShape all sub-shapes of type theShapeType, situated relatively
5689             the specified quadrangle by the certain way, defined through theState parameter.
5690
5691             Parameters:
5692                 theShape Shape to find sub-shapes of.
5693                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5694                 theTopLeftPoint Point, specifying top left corner of a quadrangle
5695                 theTopRightPoint Point, specifying top right corner of a quadrangle
5696                 theBottomLeftPoint Point, specifying bottom left corner of a quadrangle
5697                 theBottomRightPoint Point, specifying bottom right corner of a quadrangle
5698                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5699                 theName Object name; when specified, this parameter is used
5700                         for result publication in the study. Otherwise, if automatic
5701                         publication is switched on, default value is used for result name.
5702
5703             Returns:
5704                 List of all found sub-shapes.
5705             """
5706             # Example: see GEOM_TestOthers.py
5707             aList = self.ShapesOp.GetShapesOnQuadrangle(theShape, theShapeType,
5708                                                         theTopLeftPoint, theTopRightPoint,
5709                                                         theBottomLeftPoint, theBottomRightPoint, theState)
5710             RaiseIfFailed("GetShapesOnQuadrangle", self.ShapesOp)
5711             self._autoPublish(aList, theName, "shapeOnQuadrangle")
5712             return aList
5713
5714         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
5715         #  the specified quadrangle by the certain way, defined through \a theState parameter.
5716         #  @param theShape Shape to find sub-shapes of.
5717         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5718         #  @param theTopLeftPoint Point, specifying top left corner of a quadrangle
5719         #  @param theTopRightPoint Point, specifying top right corner of a quadrangle
5720         #  @param theBottomLeftPoint Point, specifying bottom left corner of a quadrangle
5721         #  @param theBottomRightPoint Point, specifying bottom right corner of a quadrangle
5722         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5723         #
5724         #  @return List of all found sub-shapes indices.
5725         #
5726         #  @ref swig_GetShapesOnQuadrangleIDs "Example"
5727         @ManageTransactions("ShapesOp")
5728         def GetShapesOnQuadrangleIDs(self, theShape, theShapeType,
5729                                      theTopLeftPoint, theTopRightPoint,
5730                                      theBottomLeftPoint, theBottomRightPoint, theState):
5731             """
5732             Find in theShape all sub-shapes of type theShapeType, situated relatively
5733             the specified quadrangle by the certain way, defined through theState parameter.
5734
5735             Parameters:
5736                 theShape Shape to find sub-shapes of.
5737                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5738                 theTopLeftPoint Point, specifying top left corner of a quadrangle
5739                 theTopRightPoint Point, specifying top right corner of a quadrangle
5740                 theBottomLeftPoint Point, specifying bottom left corner of a quadrangle
5741                 theBottomRightPoint Point, specifying bottom right corner of a quadrangle
5742                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5743
5744             Returns:
5745                 List of all found sub-shapes indices.
5746             """
5747
5748             # Example: see GEOM_TestOthers.py
5749             aList = self.ShapesOp.GetShapesOnQuadrangleIDs(theShape, theShapeType,
5750                                                            theTopLeftPoint, theTopRightPoint,
5751                                                            theBottomLeftPoint, theBottomRightPoint, theState)
5752             RaiseIfFailed("GetShapesOnQuadrangleIDs", self.ShapesOp)
5753             return aList
5754
5755         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
5756         #  the specified \a theBox by the certain way, defined through \a theState parameter.
5757         #  @param theBox Shape for relative comparing.
5758         #  @param theShape Shape to find sub-shapes of.
5759         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5760         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5761         #  @param theName Object name; when specified, this parameter is used
5762         #         for result publication in the study. Otherwise, if automatic
5763         #         publication is switched on, default value is used for result name.
5764         #
5765         #  @return List of all found sub-shapes.
5766         #
5767         #  @ref swig_GetShapesOnBox "Example"
5768         @ManageTransactions("ShapesOp")
5769         def GetShapesOnBox(self, theBox, theShape, theShapeType, theState, theName=None):
5770             """
5771             Find in theShape all sub-shapes of type theShapeType, situated relatively
5772             the specified theBox by the certain way, defined through theState parameter.
5773
5774             Parameters:
5775                 theBox Shape for relative comparing.
5776                 theShape Shape to find sub-shapes of.
5777                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5778                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5779                 theName Object name; when specified, this parameter is used
5780                         for result publication in the study. Otherwise, if automatic
5781                         publication is switched on, default value is used for result name.
5782
5783             Returns:
5784                 List of all found sub-shapes.
5785             """
5786             # Example: see GEOM_TestOthers.py
5787             aList = self.ShapesOp.GetShapesOnBox(theBox, theShape, theShapeType, theState)
5788             RaiseIfFailed("GetShapesOnBox", self.ShapesOp)
5789             self._autoPublish(aList, theName, "shapeOnBox")
5790             return aList
5791
5792         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
5793         #  the specified \a theBox by the certain way, defined through \a theState parameter.
5794         #  @param theBox Shape for relative comparing.
5795         #  @param theShape Shape to find sub-shapes of.
5796         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5797         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5798         #
5799         #  @return List of all found sub-shapes indices.
5800         #
5801         #  @ref swig_GetShapesOnBoxIDs "Example"
5802         @ManageTransactions("ShapesOp")
5803         def GetShapesOnBoxIDs(self, theBox, theShape, theShapeType, theState):
5804             """
5805             Find in theShape all sub-shapes of type theShapeType, situated relatively
5806             the specified theBox by the certain way, defined through theState parameter.
5807
5808             Parameters:
5809                 theBox Shape for relative comparing.
5810                 theShape Shape to find sub-shapes of.
5811                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5812                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5813
5814             Returns:
5815                 List of all found sub-shapes indices.
5816             """
5817             # Example: see GEOM_TestOthers.py
5818             aList = self.ShapesOp.GetShapesOnBoxIDs(theBox, theShape, theShapeType, theState)
5819             RaiseIfFailed("GetShapesOnBoxIDs", self.ShapesOp)
5820             return aList
5821
5822         ## Find in \a theShape all sub-shapes of type \a theShapeType,
5823         #  situated relatively the specified \a theCheckShape by the
5824         #  certain way, defined through \a theState parameter.
5825         #  @param theCheckShape Shape for relative comparing. It must be a solid.
5826         #  @param theShape Shape to find sub-shapes of.
5827         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5828         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5829         #  @param theName Object name; when specified, this parameter is used
5830         #         for result publication in the study. Otherwise, if automatic
5831         #         publication is switched on, default value is used for result name.
5832         #
5833         #  @return List of all found sub-shapes.
5834         #
5835         #  @ref swig_GetShapesOnShape "Example"
5836         @ManageTransactions("ShapesOp")
5837         def GetShapesOnShape(self, theCheckShape, theShape, theShapeType, theState, theName=None):
5838             """
5839             Find in theShape all sub-shapes of type theShapeType,
5840             situated relatively the specified theCheckShape by the
5841             certain way, defined through theState parameter.
5842
5843             Parameters:
5844                 theCheckShape Shape for relative comparing. It must be a solid.
5845                 theShape Shape to find sub-shapes of.
5846                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5847                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5848                 theName Object name; when specified, this parameter is used
5849                         for result publication in the study. Otherwise, if automatic
5850                         publication is switched on, default value is used for result name.
5851
5852             Returns:
5853                 List of all found sub-shapes.
5854             """
5855             # Example: see GEOM_TestOthers.py
5856             aList = self.ShapesOp.GetShapesOnShape(theCheckShape, theShape,
5857                                                    theShapeType, theState)
5858             RaiseIfFailed("GetShapesOnShape", self.ShapesOp)
5859             self._autoPublish(aList, theName, "shapeOnShape")
5860             return aList
5861
5862         ## Find in \a theShape all sub-shapes of type \a theShapeType,
5863         #  situated relatively the specified \a theCheckShape by the
5864         #  certain way, defined through \a theState parameter.
5865         #  @param theCheckShape Shape for relative comparing. It must be a solid.
5866         #  @param theShape Shape to find sub-shapes of.
5867         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5868         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5869         #  @param theName Object name; when specified, this parameter is used
5870         #         for result publication in the study. Otherwise, if automatic
5871         #         publication is switched on, default value is used for result name.
5872         #
5873         #  @return All found sub-shapes as compound.
5874         #
5875         #  @ref swig_GetShapesOnShapeAsCompound "Example"
5876         @ManageTransactions("ShapesOp")
5877         def GetShapesOnShapeAsCompound(self, theCheckShape, theShape, theShapeType, theState, theName=None):
5878             """
5879             Find in theShape all sub-shapes of type theShapeType,
5880             situated relatively the specified theCheckShape by the
5881             certain way, defined through theState parameter.
5882
5883             Parameters:
5884                 theCheckShape Shape for relative comparing. It must be a solid.
5885                 theShape Shape to find sub-shapes of.
5886                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5887                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5888                 theName Object name; when specified, this parameter is used
5889                         for result publication in the study. Otherwise, if automatic
5890                         publication is switched on, default value is used for result name.
5891
5892             Returns:
5893                 All found sub-shapes as compound.
5894             """
5895             # Example: see GEOM_TestOthers.py
5896             anObj = self.ShapesOp.GetShapesOnShapeAsCompound(theCheckShape, theShape,
5897                                                              theShapeType, theState)
5898             RaiseIfFailed("GetShapesOnShapeAsCompound", self.ShapesOp)
5899             self._autoPublish(anObj, theName, "shapeOnShape")
5900             return anObj
5901
5902         ## Find in \a theShape all sub-shapes of type \a theShapeType,
5903         #  situated relatively the specified \a theCheckShape by the
5904         #  certain way, defined through \a theState parameter.
5905         #  @param theCheckShape Shape for relative comparing. It must be a solid.
5906         #  @param theShape Shape to find sub-shapes of.
5907         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5908         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5909         #
5910         #  @return List of all found sub-shapes indices.
5911         #
5912         #  @ref swig_GetShapesOnShapeIDs "Example"
5913         @ManageTransactions("ShapesOp")
5914         def GetShapesOnShapeIDs(self, theCheckShape, theShape, theShapeType, theState):
5915             """
5916             Find in theShape all sub-shapes of type theShapeType,
5917             situated relatively the specified theCheckShape by the
5918             certain way, defined through theState parameter.
5919
5920             Parameters:
5921                 theCheckShape Shape for relative comparing. It must be a solid.
5922                 theShape Shape to find sub-shapes of.
5923                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5924                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5925
5926             Returns:
5927                 List of all found sub-shapes indices.
5928             """
5929             # Example: see GEOM_TestOthers.py
5930             aList = self.ShapesOp.GetShapesOnShapeIDs(theCheckShape, theShape,
5931                                                       theShapeType, theState)
5932             RaiseIfFailed("GetShapesOnShapeIDs", self.ShapesOp)
5933             return aList
5934
5935         ## Get sub-shape(s) of theShapeWhere, which are
5936         #  coincident with \a theShapeWhat or could be a part of it.
5937         #  @param theShapeWhere Shape to find sub-shapes of.
5938         #  @param theShapeWhat Shape, specifying what to find.
5939         #  @param isNewImplementation implementation of GetInPlace functionality
5940         #             (default = False, old alghorithm based on shape properties)
5941         #  @param theName Object name; when specified, this parameter is used
5942         #         for result publication in the study. Otherwise, if automatic
5943         #         publication is switched on, default value is used for result name.
5944         #
5945         #  @return Compound which includes all found sub-shapes if they have different types; 
5946         #          or group of all found shapes of the equal type; or a single found sub-shape.
5947         #
5948         #  @note This function has a restriction on argument shapes.
5949         #        If \a theShapeWhere has curved parts with significantly
5950         #        outstanding centres (i.e. the mass centre of a part is closer to
5951         #        \a theShapeWhat than to the part), such parts will not be found.
5952         #        @image html get_in_place_lost_part.png
5953         #
5954         #  @ref swig_GetInPlace "Example"
5955         @ManageTransactions("ShapesOp")
5956         def GetInPlace(self, theShapeWhere, theShapeWhat, isNewImplementation = False, theName=None):
5957             """
5958             Get sub-shape(s) of theShapeWhere, which are
5959             coincident with  theShapeWhat or could be a part of it.
5960
5961             Parameters:
5962                 theShapeWhere Shape to find sub-shapes of.
5963                 theShapeWhat Shape, specifying what to find.
5964                 isNewImplementation Implementation of GetInPlace functionality
5965                                     (default = False, old alghorithm based on shape properties)
5966                 theName Object name; when specified, this parameter is used
5967                         for result publication in the study. Otherwise, if automatic
5968                         publication is switched on, default value is used for result name.
5969
5970             Returns:
5971                 Compound which includes all found sub-shapes if they have different types; 
5972                 or group of all found shapes of the equal type; or a single found sub-shape.
5973
5974
5975             Note:
5976                 This function has a restriction on argument shapes.
5977                 If theShapeWhere has curved parts with significantly
5978                 outstanding centres (i.e. the mass centre of a part is closer to
5979                 theShapeWhat than to the part), such parts will not be found.
5980             """
5981             # Example: see GEOM_TestOthers.py
5982             anObj = None
5983             if isNewImplementation:
5984                 anObj = self.ShapesOp.GetInPlace(theShapeWhere, theShapeWhat)
5985             else:
5986                 anObj = self.ShapesOp.GetInPlaceOld(theShapeWhere, theShapeWhat)
5987                 pass
5988             RaiseIfFailed("GetInPlace", self.ShapesOp)
5989             self._autoPublish(anObj, theName, "inplace")
5990             return anObj
5991
5992         ## Get sub-shape(s) of \a theShapeWhere, which are
5993         #  coincident with \a theShapeWhat or could be a part of it.
5994         #
5995         #  Implementation of this method is based on a saved history of an operation,
5996         #  produced \a theShapeWhere. The \a theShapeWhat must be among this operation's
5997         #  arguments (an argument shape or a sub-shape of an argument shape).
5998         #  The operation could be the Partition or one of boolean operations,
5999         #  performed on simple shapes (not on compounds).
6000         #
6001         #  @param theShapeWhere Shape to find sub-shapes of.
6002         #  @param theShapeWhat Shape, specifying what to find (must be in the
6003         #                      building history of the ShapeWhere).
6004         #  @param theName Object name; when specified, this parameter is used
6005         #         for result publication in the study. Otherwise, if automatic
6006         #         publication is switched on, default value is used for result name.
6007         #
6008         #  @return Compound which includes all found sub-shapes if they have different types; 
6009         #          or group of all found shapes of the equal type; or a single found sub-shape.
6010         #
6011         #  @ref swig_GetInPlace "Example"
6012         @ManageTransactions("ShapesOp")
6013         def GetInPlaceByHistory(self, theShapeWhere, theShapeWhat, theName=None):
6014             """
6015             Implementation of this method is based on a saved history of an operation,
6016             produced theShapeWhere. The theShapeWhat must be among this operation's
6017             arguments (an argument shape or a sub-shape of an argument shape).
6018             The operation could be the Partition or one of boolean operations,
6019             performed on simple shapes (not on compounds).
6020
6021             Parameters:
6022                 theShapeWhere Shape to find sub-shapes of.
6023                 theShapeWhat Shape, specifying what to find (must be in the
6024                                 building history of the ShapeWhere).
6025                 theName Object name; when specified, this parameter is used
6026                         for result publication in the study. Otherwise, if automatic
6027                         publication is switched on, default value is used for result name.
6028
6029             Returns:
6030                 Compound which includes all found sub-shapes if they have different types; 
6031                 or group of all found shapes of the equal type; or a single found sub-shape.
6032             """
6033             # Example: see GEOM_TestOthers.py
6034             anObj = self.ShapesOp.GetInPlaceByHistory(theShapeWhere, theShapeWhat)
6035             RaiseIfFailed("GetInPlaceByHistory", self.ShapesOp)
6036             self._autoPublish(anObj, theName, "inplace")
6037             return anObj
6038
6039         ## A sort of GetInPlace functionality, returning IDs of sub-shapes.
6040         #  For each sub-shape ID of @a theShapeWhat return a list of corresponding sub-shape
6041         #  IDs of @a theShapeWhere.
6042         #  For example, if theShapeWhat is a box and theShapeWhere is this box cut into 
6043         #  two parts by a plane, then the result can be as this: 
6044         #    len( result_list ) = 35,
6045         #    result_list[ 1 ] = [ 2, 36 ], which means that the box  (ID 1) turned into two
6046         #  solids with IDs 2 and 36 within theShapeWhere
6047         #
6048         #  @param theShapeWhere Shape to find sub-shapes of.
6049         #  @param theShapeWhat Shape, specifying what to find.
6050         #  @return List of lists of sub-shape IDS of theShapeWhere.
6051         def GetInPlaceMap(self, theShapeWhere, theShapeWhat):
6052             """
6053             A sort of GetInPlace functionality, returning IDs of sub-shapes.
6054             For each sub-shape ID of @a theShapeWhat return a list of corresponding sub-shape
6055             IDs of @a theShapeWhere.
6056             For example, if theShapeWhat is a box and theShapeWhere is this box cut into 
6057             two parts by a plane, then the result can be as this: 
6058               len( result_list ) = 35,
6059               result_list[ 1 ] = [ 2, 36 ], which means that the box (ID 1) turned into two
6060             solids with IDs 2 and 36 within theShapeWhere
6061
6062             Parameters:
6063                 theShapeWhere Shape to find sub-shapes of.
6064                 theShapeWhat Shape, specifying what to find.
6065
6066             Returns:
6067                 List of lists of sub-shape IDS of theShapeWhere.
6068             """
6069             return self.ShapesOp.GetInPlaceMap(theShapeWhere, theShapeWhat)
6070
6071         ## Get sub-shape of theShapeWhere, which is
6072         #  equal to \a theShapeWhat.
6073         #  @param theShapeWhere Shape to find sub-shape of.
6074         #  @param theShapeWhat Shape, specifying what to find.
6075         #  @param theName Object name; when specified, this parameter is used
6076         #         for result publication in the study. Otherwise, if automatic
6077         #         publication is switched on, default value is used for result name.
6078         #
6079         #  @return New GEOM.GEOM_Object for found sub-shape.
6080         #
6081         #  @ref swig_GetSame "Example"
6082         @ManageTransactions("ShapesOp")
6083         def GetSame(self, theShapeWhere, theShapeWhat, theName=None):
6084             """
6085             Get sub-shape of theShapeWhere, which is
6086             equal to theShapeWhat.
6087
6088             Parameters:
6089                 theShapeWhere Shape to find sub-shape of.
6090                 theShapeWhat Shape, specifying what to find.
6091                 theName Object name; when specified, this parameter is used
6092                         for result publication in the study. Otherwise, if automatic
6093                         publication is switched on, default value is used for result name.
6094
6095             Returns:
6096                 New GEOM.GEOM_Object for found sub-shape.
6097             """
6098             anObj = self.ShapesOp.GetSame(theShapeWhere, theShapeWhat)
6099             RaiseIfFailed("GetSame", self.ShapesOp)
6100             self._autoPublish(anObj, theName, "sameShape")
6101             return anObj
6102
6103
6104         ## Get sub-shape indices of theShapeWhere, which is
6105         #  equal to \a theShapeWhat.
6106         #  @param theShapeWhere Shape to find sub-shape of.
6107         #  @param theShapeWhat Shape, specifying what to find.
6108         #  @return List of all found sub-shapes indices.
6109         #
6110         #  @ref swig_GetSame "Example"
6111         @ManageTransactions("ShapesOp")
6112         def GetSameIDs(self, theShapeWhere, theShapeWhat):
6113             """
6114             Get sub-shape indices of theShapeWhere, which is
6115             equal to theShapeWhat.
6116
6117             Parameters:
6118                 theShapeWhere Shape to find sub-shape of.
6119                 theShapeWhat Shape, specifying what to find.
6120
6121             Returns:
6122                 List of all found sub-shapes indices.
6123             """
6124             anObj = self.ShapesOp.GetSameIDs(theShapeWhere, theShapeWhat)
6125             RaiseIfFailed("GetSameIDs", self.ShapesOp)
6126             return anObj
6127
6128         ## Resize the input edge with the new Min and Max parameters.
6129         #  The input edge parameters range is [0, 1]. If theMin parameter is
6130         #  negative, the input edge is extended, otherwise it is shrinked by
6131         #  theMin parameter. If theMax is greater than 1, the edge is extended,
6132         #  otherwise it is shrinked by theMax parameter.
6133         #  @param theEdge the input edge to be resized.
6134         #  @param theMin the minimal parameter value.
6135         #  @param theMax the maximal parameter value.
6136         #  @param theName Object name; when specified, this parameter is used
6137         #         for result publication in the study. Otherwise, if automatic
6138         #         publication is switched on, default value is used for result name.
6139         #  @return New GEOM.GEOM_Object, containing the created edge.
6140         #
6141         #  @ref tui_extend "Example"
6142         @ManageTransactions("ShapesOp")
6143         def ExtendEdge(self, theEdge, theMin, theMax, theName=None):
6144             """
6145             Resize the input edge with the new Min and Max parameters.
6146             The input edge parameters range is [0, 1]. If theMin parameter is
6147             negative, the input edge is extended, otherwise it is shrinked by
6148             theMin parameter. If theMax is greater than 1, the edge is extended,
6149             otherwise it is shrinked by theMax parameter.
6150
6151             Parameters:
6152                 theEdge the input edge to be resized.
6153                 theMin the minimal parameter value.
6154                 theMax the maximal parameter value.
6155                 theName Object name; when specified, this parameter is used
6156                         for result publication in the study. Otherwise, if automatic
6157                         publication is switched on, default value is used for result name.
6158
6159             Returns:
6160                 New GEOM.GEOM_Object, containing the created edge.
6161             """
6162             theMin, theMax, Parameters = ParseParameters(theMin, theMax)
6163             anObj = self.ShapesOp.ExtendEdge(theEdge, theMin, theMax)
6164             RaiseIfFailed("ExtendEdge", self.ShapesOp)
6165             anObj.SetParameters(Parameters)
6166             self._autoPublish(anObj, theName, "edge")
6167             return anObj
6168
6169         ## Resize the input face with the new UMin, UMax, VMin and VMax
6170         #  parameters. The input face U and V parameters range is [0, 1]. If
6171         #  theUMin parameter is negative, the input face is extended, otherwise
6172         #  it is shrinked along U direction by theUMin parameter. If theUMax is
6173         #  greater than 1, the face is extended, otherwise it is shrinked along
6174         #  U direction by theUMax parameter. So as for theVMin, theVMax and
6175         #  V direction of the input face.
6176         #  @param theFace the input face to be resized.
6177         #  @param theUMin the minimal U parameter value.
6178         #  @param theUMax the maximal U parameter value.
6179         #  @param theVMin the minimal V parameter value.
6180         #  @param theVMax the maximal V parameter value.
6181         #  @param theName Object name; when specified, this parameter is used
6182         #         for result publication in the study. Otherwise, if automatic
6183         #         publication is switched on, default value is used for result name.
6184         #  @return New GEOM.GEOM_Object, containing the created face.
6185         #
6186         #  @ref tui_extend "Example"
6187         @ManageTransactions("ShapesOp")
6188         def ExtendFace(self, theFace, theUMin, theUMax,
6189                        theVMin, theVMax, theName=None):
6190             """
6191             Resize the input face with the new UMin, UMax, VMin and VMax
6192             parameters. The input face U and V parameters range is [0, 1]. If
6193             theUMin parameter is negative, the input face is extended, otherwise
6194             it is shrinked along U direction by theUMin parameter. If theUMax is
6195             greater than 1, the face is extended, otherwise it is shrinked along
6196             U direction by theUMax parameter. So as for theVMin, theVMax and
6197             V direction of the input face.
6198
6199             Parameters:
6200                 theFace the input face to be resized.
6201                 theUMin the minimal U parameter value.
6202                 theUMax the maximal U parameter value.
6203                 theVMin the minimal V parameter value.
6204                 theVMax the maximal V parameter value.
6205                 theName Object name; when specified, this parameter is used
6206                         for result publication in the study. Otherwise, if automatic
6207                         publication is switched on, default value is used for result name.
6208
6209             Returns:
6210                 New GEOM.GEOM_Object, containing the created face.
6211             """
6212             theUMin, theUMax, theVMin, theVMax, Parameters = ParseParameters(theUMin, theUMax, theVMin, theVMax)
6213             anObj = self.ShapesOp.ExtendFace(theFace, theUMin, theUMax,
6214                                              theVMin, theVMax)
6215             RaiseIfFailed("ExtendFace", self.ShapesOp)
6216             anObj.SetParameters(Parameters)
6217             self._autoPublish(anObj, theName, "face")
6218             return anObj
6219
6220         ## This function takes some face as input parameter and creates new
6221         #  GEOM_Object, i.e. topological shape by extracting underlying surface
6222         #  of the source face and limiting it by the Umin, Umax, Vmin, Vmax
6223         #  parameters of the source face (in the parametrical space).
6224         #  @param theFace the input face.
6225         #  @param theName Object name; when specified, this parameter is used
6226         #         for result publication in the study. Otherwise, if automatic
6227         #         publication is switched on, default value is used for result name.
6228         #  @return New GEOM.GEOM_Object, containing the created face.
6229         #
6230         #  @ref tui_creation_surface "Example"
6231         @ManageTransactions("ShapesOp")
6232         def MakeSurfaceFromFace(self, theFace, theName=None):
6233             """
6234             This function takes some face as input parameter and creates new
6235             GEOM_Object, i.e. topological shape by extracting underlying surface
6236             of the source face and limiting it by the Umin, Umax, Vmin, Vmax
6237             parameters of the source face (in the parametrical space).
6238
6239             Parameters:
6240                 theFace the input face.
6241                 theName Object name; when specified, this parameter is used
6242                         for result publication in the study. Otherwise, if automatic
6243                         publication is switched on, default value is used for result name.
6244
6245             Returns:
6246                 New GEOM.GEOM_Object, containing the created face.
6247             """
6248             anObj = self.ShapesOp.MakeSurfaceFromFace(theFace)
6249             RaiseIfFailed("MakeSurfaceFromFace", self.ShapesOp)
6250             self._autoPublish(anObj, theName, "surface")
6251             return anObj
6252
6253         # end of l4_obtain
6254         ## @}
6255
6256         ## @addtogroup l4_access
6257         ## @{
6258
6259         ## Obtain a composite sub-shape of <VAR>aShape</VAR>, composed from sub-shapes
6260         #  of aShape, selected by their unique IDs inside <VAR>aShape</VAR>
6261         #  @param aShape Shape to get sub-shape of.
6262         #  @param ListOfID List of sub-shapes indices.
6263         #  @param theName Object name; when specified, this parameter is used
6264         #         for result publication in the study. Otherwise, if automatic
6265         #         publication is switched on, default value is used for result name.
6266         #
6267         #  @return Found sub-shape.
6268         #
6269         #  @ref swig_all_decompose "Example"
6270         def GetSubShape(self, aShape, ListOfID, theName=None):
6271             """
6272             Obtain a composite sub-shape of aShape, composed from sub-shapes
6273             of aShape, selected by their unique IDs inside aShape
6274
6275             Parameters:
6276                 aShape Shape to get sub-shape of.
6277                 ListOfID List of sub-shapes indices.
6278                 theName Object name; when specified, this parameter is used
6279                         for result publication in the study. Otherwise, if automatic
6280                         publication is switched on, default value is used for result name.
6281
6282             Returns:
6283                 Found sub-shape.
6284             """
6285             # Example: see GEOM_TestAll.py
6286             anObj = self.AddSubShape(aShape,ListOfID)
6287             self._autoPublish(anObj, theName, "subshape")
6288             return anObj
6289
6290         ## Obtain unique ID of sub-shape <VAR>aSubShape</VAR> inside <VAR>aShape</VAR>
6291         #  of aShape, selected by their unique IDs inside <VAR>aShape</VAR>
6292         #  @param aShape Shape to get sub-shape of.
6293         #  @param aSubShape Sub-shapes of aShape.
6294         #  @return ID of found sub-shape.
6295         #
6296         #  @ref swig_all_decompose "Example"
6297         @ManageTransactions("LocalOp")
6298         def GetSubShapeID(self, aShape, aSubShape):
6299             """
6300             Obtain unique ID of sub-shape aSubShape inside aShape
6301             of aShape, selected by their unique IDs inside aShape
6302
6303             Parameters:
6304                aShape Shape to get sub-shape of.
6305                aSubShape Sub-shapes of aShape.
6306
6307             Returns:
6308                ID of found sub-shape.
6309             """
6310             # Example: see GEOM_TestAll.py
6311             anID = self.LocalOp.GetSubShapeIndex(aShape, aSubShape)
6312             RaiseIfFailed("GetSubShapeIndex", self.LocalOp)
6313             return anID
6314
6315         ## Obtain unique IDs of sub-shapes <VAR>aSubShapes</VAR> inside <VAR>aShape</VAR>
6316         #  This function is provided for performance purpose. The complexity is O(n) with n
6317         #  the number of subobjects of aShape
6318         #  @param aShape Shape to get sub-shape of.
6319         #  @param aSubShapes Sub-shapes of aShape.
6320         #  @return list of IDs of found sub-shapes.
6321         #
6322         #  @ref swig_all_decompose "Example"
6323         @ManageTransactions("ShapesOp")
6324         def GetSubShapesIDs(self, aShape, aSubShapes):
6325             """
6326             Obtain a list of IDs of sub-shapes aSubShapes inside aShape
6327             This function is provided for performance purpose. The complexity is O(n) with n
6328             the number of subobjects of aShape
6329
6330             Parameters:
6331                aShape Shape to get sub-shape of.
6332                aSubShapes Sub-shapes of aShape.
6333
6334             Returns:
6335                List of IDs of found sub-shape.
6336             """
6337             # Example: see GEOM_TestAll.py
6338             anIDs = self.ShapesOp.GetSubShapesIndices(aShape, aSubShapes)
6339             RaiseIfFailed("GetSubShapesIndices", self.ShapesOp)
6340             return anIDs
6341
6342         # end of l4_access
6343         ## @}
6344
6345         ## @addtogroup l4_decompose
6346         ## @{
6347
6348         ## Get all sub-shapes and groups of \a theShape,
6349         #  that were created already by any other methods.
6350         #  @param theShape Any shape.
6351         #  @param theGroupsOnly If this parameter is TRUE, only groups will be
6352         #                       returned, else all found sub-shapes and groups.
6353         #  @return List of existing sub-objects of \a theShape.
6354         #
6355         #  @ref swig_all_decompose "Example"
6356         @ManageTransactions("ShapesOp")
6357         def GetExistingSubObjects(self, theShape, theGroupsOnly = False):
6358             """
6359             Get all sub-shapes and groups of theShape,
6360             that were created already by any other methods.
6361
6362             Parameters:
6363                 theShape Any shape.
6364                 theGroupsOnly If this parameter is TRUE, only groups will be
6365                                  returned, else all found sub-shapes and groups.
6366
6367             Returns:
6368                 List of existing sub-objects of theShape.
6369             """
6370             # Example: see GEOM_TestAll.py
6371             ListObj = self.ShapesOp.GetExistingSubObjects(theShape, theGroupsOnly)
6372             RaiseIfFailed("GetExistingSubObjects", self.ShapesOp)
6373             return ListObj
6374
6375         ## Get all groups of \a theShape,
6376         #  that were created already by any other methods.
6377         #  @param theShape Any shape.
6378         #  @return List of existing groups of \a theShape.
6379         #
6380         #  @ref swig_all_decompose "Example"
6381         @ManageTransactions("ShapesOp")
6382         def GetGroups(self, theShape):
6383             """
6384             Get all groups of theShape,
6385             that were created already by any other methods.
6386
6387             Parameters:
6388                 theShape Any shape.
6389
6390             Returns:
6391                 List of existing groups of theShape.
6392             """
6393             # Example: see GEOM_TestAll.py
6394             ListObj = self.ShapesOp.GetExistingSubObjects(theShape, True)
6395             RaiseIfFailed("GetExistingSubObjects", self.ShapesOp)
6396             return ListObj
6397
6398         ## Explode a shape on sub-shapes of a given type.
6399         #  If the shape itself matches the type, it is also returned.
6400         #  @param aShape Shape to be exploded.
6401         #  @param aType Type of sub-shapes to be retrieved (see ShapeType())
6402         #  @param theName Object name; when specified, this parameter is used
6403         #         for result publication in the study. Otherwise, if automatic
6404         #         publication is switched on, default value is used for result name.
6405         #
6406         #  @return List of sub-shapes of type theShapeType, contained in theShape.
6407         #
6408         #  @ref swig_all_decompose "Example"
6409         @ManageTransactions("ShapesOp")
6410         def SubShapeAll(self, aShape, aType, theName=None):
6411             """
6412             Explode a shape on sub-shapes of a given type.
6413             If the shape itself matches the type, it is also returned.
6414
6415             Parameters:
6416                 aShape Shape to be exploded.
6417                 aType Type of sub-shapes to be retrieved (see geompy.ShapeType)
6418                 theName Object name; when specified, this parameter is used
6419                         for result publication in the study. Otherwise, if automatic
6420                         publication is switched on, default value is used for result name.
6421
6422             Returns:
6423                 List of sub-shapes of type theShapeType, contained in theShape.
6424             """
6425             # Example: see GEOM_TestAll.py
6426             ListObj = self.ShapesOp.MakeAllSubShapes(aShape, EnumToLong( aType ), False)
6427             RaiseIfFailed("SubShapeAll", self.ShapesOp)
6428             self._autoPublish(ListObj, theName, "subshape")
6429             return ListObj
6430
6431         ## Explode a shape on sub-shapes of a given type.
6432         #  @param aShape Shape to be exploded.
6433         #  @param aType Type of sub-shapes to be retrieved (see ShapeType())
6434         #  @return List of IDs of sub-shapes.
6435         #
6436         #  @ref swig_all_decompose "Example"
6437         @ManageTransactions("ShapesOp")
6438         def SubShapeAllIDs(self, aShape, aType):
6439             """
6440             Explode a shape on sub-shapes of a given type.
6441
6442             Parameters:
6443                 aShape Shape to be exploded (see geompy.ShapeType)
6444                 aType Type of sub-shapes to be retrieved (see geompy.ShapeType)
6445
6446             Returns:
6447                 List of IDs of sub-shapes.
6448             """
6449             ListObj = self.ShapesOp.GetAllSubShapesIDs(aShape, EnumToLong( aType ), False)
6450             RaiseIfFailed("SubShapeAllIDs", self.ShapesOp)
6451             return ListObj
6452
6453         ## Obtain a compound of sub-shapes of <VAR>aShape</VAR>,
6454         #  selected by their indices in list of all sub-shapes of type <VAR>aType</VAR>.
6455         #  Each index is in range [1, Nb_Sub-Shapes_Of_Given_Type]
6456         #  @param aShape Shape to get sub-shape of.
6457         #  @param ListOfInd List of sub-shapes indices.
6458         #  @param aType Type of sub-shapes to be retrieved (see ShapeType())
6459         #  @param theName Object name; when specified, this parameter is used
6460         #         for result publication in the study. Otherwise, if automatic
6461         #         publication is switched on, default value is used for result name.
6462         #
6463         #  @return A compound of sub-shapes of aShape.
6464         #
6465         #  @ref swig_all_decompose "Example"
6466         def SubShape(self, aShape, aType, ListOfInd, theName=None):
6467             """
6468             Obtain a compound of sub-shapes of aShape,
6469             selected by their indices in list of all sub-shapes of type aType.
6470             Each index is in range [1, Nb_Sub-Shapes_Of_Given_Type]
6471
6472             Parameters:
6473                 aShape Shape to get sub-shape of.
6474                 ListOfID List of sub-shapes indices.
6475                 aType Type of sub-shapes to be retrieved (see geompy.ShapeType)
6476                 theName Object name; when specified, this parameter is used
6477                         for result publication in the study. Otherwise, if automatic
6478                         publication is switched on, default value is used for result name.
6479
6480             Returns:
6481                 A compound of sub-shapes of aShape.
6482             """
6483             # Example: see GEOM_TestAll.py
6484             ListOfIDs = []
6485             AllShapeIDsList = self.SubShapeAllIDs(aShape, EnumToLong( aType ))
6486             for ind in ListOfInd:
6487                 ListOfIDs.append(AllShapeIDsList[ind - 1])
6488             # note: auto-publishing is done in self.GetSubShape()
6489             anObj = self.GetSubShape(aShape, ListOfIDs, theName)
6490             return anObj
6491
6492         ## Explode a shape on sub-shapes of a given type.
6493         #  Sub-shapes will be sorted taking into account their gravity centers,
6494         #  to provide stable order of sub-shapes. Please see
6495         #  @ref sorting_shapes_page "Description of Sorting Shapes Algorithm".
6496         #  If the shape itself matches the type, it is also returned.
6497         #  @param aShape Shape to be exploded.
6498         #  @param aType Type of sub-shapes to be retrieved (see ShapeType())
6499         #  @param theName Object name; when specified, this parameter is used
6500         #         for result publication in the study. Otherwise, if automatic
6501         #         publication is switched on, default value is used for result name.
6502         #
6503         #  @return List of sub-shapes of type theShapeType, contained in theShape.
6504         #
6505         #  @ref swig_SubShapeAllSorted "Example"
6506         @ManageTransactions("ShapesOp")
6507         def SubShapeAllSortedCentres(self, aShape, aType, theName=None):
6508             """
6509             Explode a shape on sub-shapes of a given type.
6510             Sub-shapes will be sorted taking into account their gravity centers,
6511             to provide stable order of sub-shapes.
6512             If the shape itself matches the type, it is also returned.
6513
6514             Parameters:
6515                 aShape Shape to be exploded.
6516                 aType Type of sub-shapes to be retrieved (see geompy.ShapeType)
6517                 theName Object name; when specified, this parameter is used
6518                         for result publication in the study. Otherwise, if automatic
6519                         publication is switched on, default value is used for result name.
6520
6521             Returns:
6522                 List of sub-shapes of type theShapeType, contained in theShape.
6523             """
6524             # Example: see GEOM_TestAll.py
6525             ListObj = self.ShapesOp.MakeAllSubShapes(aShape, EnumToLong( aType ), True)
6526             RaiseIfFailed("SubShapeAllSortedCentres", self.ShapesOp)
6527             self._autoPublish(ListObj, theName, "subshape")
6528             return ListObj
6529
6530         ## Explode a shape on sub-shapes of a given type.
6531         #  Sub-shapes will be sorted taking into account their gravity centers,
6532         #  to provide stable order of sub-shapes. Please see
6533         #  @ref sorting_shapes_page "Description of Sorting Shapes Algorithm".
6534         #  @param aShape Shape to be exploded.
6535         #  @param aType Type of sub-shapes to be retrieved (see ShapeType())
6536         #  @return List of IDs of sub-shapes.
6537         #
6538         #  @ref swig_all_decompose "Example"
6539         @ManageTransactions("ShapesOp")
6540         def SubShapeAllSortedCentresIDs(self, aShape, aType):
6541             """
6542             Explode a shape on sub-shapes of a given type.
6543             Sub-shapes will be sorted taking into account their gravity centers,
6544             to provide stable order of sub-shapes.
6545
6546             Parameters:
6547                 aShape Shape to be exploded.
6548                 aType Type of sub-shapes to be retrieved (see geompy.ShapeType)
6549
6550             Returns:
6551                 List of IDs of sub-shapes.
6552             """
6553             ListIDs = self.ShapesOp.GetAllSubShapesIDs(aShape, EnumToLong( aType ), True)
6554             RaiseIfFailed("SubShapeAllIDs", self.ShapesOp)
6555             return ListIDs
6556
6557         ## Obtain a compound of sub-shapes of <VAR>aShape</VAR>,
6558         #  selected by they indices in sorted list of all sub-shapes of type <VAR>aType</VAR>.
6559         #  Please see @ref sorting_shapes_page "Description of Sorting Shapes Algorithm".
6560         #  Each index is in range [1, Nb_Sub-Shapes_Of_Given_Type]
6561         #  @param aShape Shape to get sub-shape of.
6562         #  @param ListOfInd List of sub-shapes indices.
6563         #  @param aType Type of sub-shapes to be retrieved (see ShapeType())
6564         #  @param theName Object name; when specified, this parameter is used
6565         #         for result publication in the study. Otherwise, if automatic
6566         #         publication is switched on, default value is used for result name.
6567         #
6568         #  @return A compound of sub-shapes of aShape.
6569         #
6570         #  @ref swig_all_decompose "Example"
6571         def SubShapeSortedCentres(self, aShape, aType, ListOfInd, theName=None):
6572             """
6573             Obtain a compound of sub-shapes of aShape,
6574             selected by they indices in sorted list of all sub-shapes of type aType.
6575             Each index is in range [1, Nb_Sub-Shapes_Of_Given_Type]
6576
6577             Parameters:
6578                 aShape Shape to get sub-shape of.
6579                 ListOfID List of sub-shapes indices.
6580                 aType Type of sub-shapes to be retrieved (see geompy.ShapeType)
6581                 theName Object name; when specified, this parameter is used
6582                         for result publication in the study. Otherwise, if automatic
6583                         publication is switched on, default value is used for result name.
6584
6585             Returns:
6586                 A compound of sub-shapes of aShape.
6587             """
6588             # Example: see GEOM_TestAll.py
6589             ListOfIDs = []
6590             AllShapeIDsList = self.SubShapeAllSortedCentresIDs(aShape, EnumToLong( aType ))
6591             for ind in ListOfInd:
6592                 ListOfIDs.append(AllShapeIDsList[ind - 1])
6593             # note: auto-publishing is done in self.GetSubShape()
6594             anObj = self.GetSubShape(aShape, ListOfIDs, theName)
6595             return anObj
6596
6597         ## Extract shapes (excluding the main shape) of given type.
6598         #  @param aShape The shape.
6599         #  @param aType  The shape type (see ShapeType())
6600         #  @param isSorted Boolean flag to switch sorting on/off. Please see
6601         #         @ref sorting_shapes_page "Description of Sorting Shapes Algorithm".
6602         #  @param theName Object name; when specified, this parameter is used
6603         #         for result publication in the study. Otherwise, if automatic
6604         #         publication is switched on, default value is used for result name.
6605         #
6606         #  @return List of sub-shapes of type aType, contained in aShape.
6607         #
6608         #  @ref swig_FilletChamfer "Example"
6609         @ManageTransactions("ShapesOp")
6610         def ExtractShapes(self, aShape, aType, isSorted = False, theName=None):
6611             """
6612             Extract shapes (excluding the main shape) of given type.
6613
6614             Parameters:
6615                 aShape The shape.
6616                 aType  The shape type (see geompy.ShapeType)
6617                 isSorted Boolean flag to switch sorting on/off.
6618                 theName Object name; when specified, this parameter is used
6619                         for result publication in the study. Otherwise, if automatic
6620                         publication is switched on, default value is used for result name.
6621
6622             Returns:
6623                 List of sub-shapes of type aType, contained in aShape.
6624             """
6625             # Example: see GEOM_TestAll.py
6626             ListObj = self.ShapesOp.ExtractSubShapes(aShape, EnumToLong( aType ), isSorted)
6627             RaiseIfFailed("ExtractSubShapes", self.ShapesOp)
6628             self._autoPublish(ListObj, theName, "subshape")
6629             return ListObj
6630
6631         ## Get a set of sub-shapes defined by their unique IDs inside <VAR>aShape</VAR>
6632         #  @param aShape Main shape.
6633         #  @param anIDs List of unique IDs of sub-shapes inside <VAR>aShape</VAR>.
6634         #  @param theName Object name; when specified, this parameter is used
6635         #         for result publication in the study. Otherwise, if automatic
6636         #         publication is switched on, default value is used for result name.
6637         #  @return List of GEOM.GEOM_Object, corresponding to found sub-shapes.
6638         #
6639         #  @ref swig_all_decompose "Example"
6640         @ManageTransactions("ShapesOp")
6641         def SubShapes(self, aShape, anIDs, theName=None):
6642             """
6643             Get a set of sub-shapes defined by their unique IDs inside theMainShape
6644
6645             Parameters:
6646                 aShape Main shape.
6647                 anIDs List of unique IDs of sub-shapes inside theMainShape.
6648                 theName Object name; when specified, this parameter is used
6649                         for result publication in the study. Otherwise, if automatic
6650                         publication is switched on, default value is used for result name.
6651
6652             Returns:
6653                 List of GEOM.GEOM_Object, corresponding to found sub-shapes.
6654             """
6655             # Example: see GEOM_TestAll.py
6656             ListObj = self.ShapesOp.MakeSubShapes(aShape, anIDs)
6657             RaiseIfFailed("SubShapes", self.ShapesOp)
6658             self._autoPublish(ListObj, theName, "subshape")
6659             return ListObj
6660
6661         ## Explode a shape into edges sorted in a row from a starting point.
6662         #  @param theShape the shape to be exploded on edges.
6663         #  @param theStartPoint the starting point.
6664         #  @param theName Object name; when specified, this parameter is used
6665         #         for result publication in the study. Otherwise, if automatic
6666         #         publication is switched on, default value is used for result name.
6667         #  @return List of GEOM.GEOM_Object that is actually an ordered list
6668         #          of edges sorted in a row from a starting point.
6669         #
6670         #  @ref swig_GetSubShapeEdgeSorted "Example"
6671         @ManageTransactions("ShapesOp")
6672         def GetSubShapeEdgeSorted(self, theShape, theStartPoint, theName=None):
6673             """
6674             Explode a shape into edges sorted in a row from a starting point.
6675
6676             Parameters:
6677                 theShape the shape to be exploded on edges.
6678                 theStartPoint the starting point.
6679                 theName Object name; when specified, this parameter is used
6680                         for result publication in the study. Otherwise, if automatic
6681                         publication is switched on, default value is used for result name.
6682
6683             Returns:
6684                 List of GEOM.GEOM_Object that is actually an ordered list
6685                 of edges sorted in a row from a starting point.
6686             """
6687             # Example: see GEOM_TestAll.py
6688             ListObj = self.ShapesOp.GetSubShapeEdgeSorted(theShape, theStartPoint)
6689             RaiseIfFailed("GetSubShapeEdgeSorted", self.ShapesOp)
6690             self._autoPublish(ListObj, theName, "SortedEdges")
6691             return ListObj
6692
6693         ##
6694         # Return the list of subshapes that satisfies a certain tolerance
6695         # criterion. The user defines the type of shapes to be returned, the
6696         # condition and the tolerance value. The operation is defined for
6697         # faces, edges and vertices only. E.g. for theShapeType FACE,
6698         # theCondition GEOM::CC_GT and theTolerance 1.e-7 this method returns
6699         # all faces of theShape that have tolerances greater then 1.e7.
6700         #
6701         #  @param theShape the shape to be exploded
6702         #  @param theShapeType the type of sub-shapes to be returned (see
6703         #         ShapeType()). Can have the values FACE, EDGE and VERTEX only.
6704         #  @param theCondition the condition type (see GEOM::comparison_condition).
6705         #  @param theTolerance the tolerance filter.
6706         #  @param theName Object name; when specified, this parameter is used
6707         #         for result publication in the study. Otherwise, if automatic
6708         #         publication is switched on, default value is used for result name.
6709         #  @return the list of shapes that satisfy the conditions.
6710         #
6711         #  @ref swig_GetSubShapesWithTolerance "Example"
6712         @ManageTransactions("ShapesOp")
6713         def GetSubShapesWithTolerance(self, theShape, theShapeType,
6714                                       theCondition, theTolerance, theName=None):
6715             """
6716             Return the list of subshapes that satisfies a certain tolerance
6717             criterion. The user defines the type of shapes to be returned, the
6718             condition and the tolerance value. The operation is defined for
6719             faces, edges and vertices only. E.g. for theShapeType FACE,
6720             theCondition GEOM::CC_GT and theTolerance 1.e-7 this method returns
6721             all faces of theShape that have tolerances greater then 1.e7.
6722             
6723             Parameters:
6724                 theShape the shape to be exploded
6725                 theShapeType the type of sub-shapes to be returned (see
6726                              ShapeType()). Can have the values FACE,
6727                              EDGE and VERTEX only.
6728                 theCondition the condition type (see GEOM::comparison_condition).
6729                 theTolerance the tolerance filter.
6730                 theName Object name; when specified, this parameter is used
6731                         for result publication in the study. Otherwise, if automatic
6732                         publication is switched on, default value is used for result name.
6733
6734             Returns:
6735                 The list of shapes that satisfy the conditions.
6736             """
6737             # Example: see GEOM_TestAll.py
6738             ListObj = self.ShapesOp.GetSubShapesWithTolerance(theShape, EnumToLong(theShapeType),
6739                                                               theCondition, theTolerance)
6740             RaiseIfFailed("GetSubShapesWithTolerance", self.ShapesOp)
6741             self._autoPublish(ListObj, theName, "SubShapeWithTolerance")
6742             return ListObj
6743
6744         ## Check if the object is a sub-object of another GEOM object.
6745         #  @param aSubObject Checked sub-object (or its parent object, in case if
6746         #         \a theSubObjectIndex is non-zero).
6747         #  @param anObject An object that is checked for ownership (or its parent object,
6748         #         in case if \a theObjectIndex is non-zero).
6749         #  @param aSubObjectIndex When non-zero, specifies a sub-shape index that
6750         #         identifies a sub-object within its parent specified via \a theSubObject.
6751         #  @param anObjectIndex When non-zero, specifies a sub-shape index that
6752         #         identifies an object within its parent specified via \a theObject.
6753         #  @return TRUE, if the given object contains sub-object.
6754         @ManageTransactions("ShapesOp")
6755         def IsSubShapeBelongsTo(self, aSubObject, anObject, aSubObjectIndex = 0, anObjectIndex = 0):
6756             """
6757             Check if the object is a sub-object of another GEOM object.
6758             
6759             Parameters:
6760                 aSubObject Checked sub-object (or its parent object, in case if
6761                     \a theSubObjectIndex is non-zero).
6762                 anObject An object that is checked for ownership (or its parent object,
6763                     in case if \a theObjectIndex is non-zero).
6764                 aSubObjectIndex When non-zero, specifies a sub-shape index that
6765                     identifies a sub-object within its parent specified via \a theSubObject.
6766                 anObjectIndex When non-zero, specifies a sub-shape index that
6767                     identifies an object within its parent specified via \a theObject.
6768
6769             Returns
6770                 TRUE, if the given object contains sub-object.
6771             """
6772             IsOk = self.ShapesOp.IsSubShapeBelongsTo(aSubObject, aSubObjectIndex, anObject, anObjectIndex)
6773             RaiseIfFailed("IsSubShapeBelongsTo", self.ShapesOp)
6774             return IsOk
6775
6776         ## Perform extraction of sub-shapes from the main shape.
6777         #
6778         #  @param theShape the main shape
6779         #  @param theListOfID the list of sub-shape IDs to be extracted from
6780         #         the main shape.
6781         #  @return New GEOM.GEOM_Object, containing the shape without
6782         #          extracted sub-shapes.
6783         #
6784         #  @ref swig_MakeExtraction "Example"
6785         @ManageTransactions("ShapesOp")
6786         def MakeExtraction(self, theShape, theListOfID, theName=None):
6787             """
6788             Perform extraction of sub-shapes from the main shape.
6789
6790             Parameters:
6791                 theShape the main shape
6792                 theListOfID the list of sub-shape IDs to be extracted from
6793                             the main shape.
6794
6795             Returns
6796                 New GEOM.GEOM_Object, containing the shape without
6797                 extracted sub-shapes.
6798             """
6799             # Example: see GEOM_TestAll.py
6800             (anObj, aStat) = self.ShapesOp.MakeExtraction(theShape, theListOfID)
6801             RaiseIfFailed("MakeExtraction", self.ShapesOp)
6802             self._autoPublish(anObj, theName, "Extraction")
6803             return anObj
6804
6805         # end of l4_decompose
6806         ## @}
6807
6808         ## @addtogroup l4_decompose_d
6809         ## @{
6810
6811         ## Deprecated method
6812         #  It works like SubShapeAllSortedCentres(), but wrongly
6813         #  defines centres of faces, shells and solids.
6814         @ManageTransactions("ShapesOp")
6815         def SubShapeAllSorted(self, aShape, aType, theName=None):
6816             """
6817             Deprecated method
6818             It works like geompy.SubShapeAllSortedCentres, but wrongly
6819             defines centres of faces, shells and solids.
6820             """
6821             ListObj = self.ShapesOp.MakeExplode(aShape, EnumToLong( aType ), True)
6822             RaiseIfFailed("MakeExplode", self.ShapesOp)
6823             self._autoPublish(ListObj, theName, "subshape")
6824             return ListObj
6825
6826         ## Deprecated method
6827         #  It works like SubShapeAllSortedCentresIDs(), but wrongly
6828         #  defines centres of faces, shells and solids.
6829         @ManageTransactions("ShapesOp")
6830         def SubShapeAllSortedIDs(self, aShape, aType):
6831             """
6832             Deprecated method
6833             It works like geompy.SubShapeAllSortedCentresIDs, but wrongly
6834             defines centres of faces, shells and solids.
6835             """
6836             ListIDs = self.ShapesOp.SubShapeAllIDs(aShape, EnumToLong( aType ), True)
6837             RaiseIfFailed("SubShapeAllIDs", self.ShapesOp)
6838             return ListIDs
6839
6840         ## Deprecated method
6841         #  It works like SubShapeSortedCentres(), but has a bug
6842         #  (wrongly defines centres of faces, shells and solids).
6843         def SubShapeSorted(self, aShape, aType, ListOfInd, theName=None):
6844             """
6845             Deprecated method
6846             It works like geompy.SubShapeSortedCentres, but has a bug
6847             (wrongly defines centres of faces, shells and solids).
6848             """
6849             ListOfIDs = []
6850             AllShapeIDsList = self.SubShapeAllSortedIDs(aShape, EnumToLong( aType ))
6851             for ind in ListOfInd:
6852                 ListOfIDs.append(AllShapeIDsList[ind - 1])
6853             # note: auto-publishing is done in self.GetSubShape()
6854             anObj = self.GetSubShape(aShape, ListOfIDs, theName)
6855             return anObj
6856
6857         # end of l4_decompose_d
6858         ## @}
6859
6860         ## @addtogroup l3_healing
6861         ## @{
6862
6863         ## Apply a sequence of Shape Healing operators to the given object.
6864         #  @param theShape Shape to be processed.
6865         #  @param theOperators List of names of operators ("FixShape", "SplitClosedFaces", etc.).
6866         #  @param theParameters List of names of parameters
6867         #                    ("FixShape.Tolerance3d", "SplitClosedFaces.NbSplitPoints", etc.).
6868         #  @param theValues List of values of parameters, in the same order
6869         #                    as parameters are listed in <VAR>theParameters</VAR> list.
6870         #  @param theName Object name; when specified, this parameter is used
6871         #         for result publication in the study. Otherwise, if automatic
6872         #         publication is switched on, default value is used for result name.
6873         #
6874         #  <b> Operators and Parameters: </b> \n
6875         #
6876         #  * \b FixShape - corrects invalid shapes. \n
6877         #  - \b FixShape.Tolerance3d - work tolerance for detection of the problems and correction of them. \n
6878         #  - \b FixShape.MaxTolerance3d - maximal possible tolerance of the shape after correction. \n
6879         #
6880         #  * \b FixFaceSize - removes small faces, such as spots and strips.\n
6881         #  - \b FixFaceSize.Tolerance - defines minimum possible face size. \n
6882         #  - \b DropSmallEdges - removes edges, which merge with neighbouring edges. \n
6883         #  - \b DropSmallEdges.Tolerance3d - defines minimum possible distance between two parallel edges.\n
6884         #  - \b DropSmallSolids - either removes small solids or merges them with neighboring ones. \n
6885         #  - \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
6886         #  - \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
6887         #  - \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
6888         #
6889         #  * \b SplitAngle - splits faces based on conical surfaces, surfaces of revolution and cylindrical
6890         #    surfaces in segments using a certain angle. \n
6891         #  - \b SplitAngle.Angle - the central angle of the resulting segments (i.e. we obtain two segments
6892         #    if Angle=180, four if Angle=90, etc). \n
6893         #  - \b SplitAngle.MaxTolerance - maximum possible tolerance among the resulting segments.\n
6894         #
6895         #  * \b SplitClosedFaces - splits closed faces in segments.
6896         #    The number of segments depends on the number of splitting points.\n
6897         #  - \b SplitClosedFaces.NbSplitPoints - the number of splitting points.\n
6898         #
6899         #  * \b SplitContinuity - splits shapes to reduce continuities of curves and surfaces.\n
6900         #  - \b SplitContinuity.Tolerance3d - 3D tolerance for correction of geometry.\n
6901         #  - \b SplitContinuity.SurfaceContinuity - required continuity for surfaces.\n
6902         #  - \b SplitContinuity.CurveContinuity - required continuity for curves.\n
6903         #   This and the previous parameters can take the following values:\n
6904         #   \b Parametric \b Continuity \n
6905         #   \b C0 (Positional Continuity): curves are joined (the end positions of curves or surfaces
6906         #   are coincidental. The curves or surfaces may still meet at an angle, giving rise to a sharp corner or edge).\n
6907         #   \b C1 (Tangential Continuity): first derivatives are equal (the end vectors of curves or surfaces are parallel,
6908         #    ruling out sharp edges).\n
6909         #   \b C2 (Curvature Continuity): first and second derivatives are equal (the end vectors of curves or surfaces
6910         #       are of the same magnitude).\n
6911         #   \b CN N-th derivatives are equal (both the direction and the magnitude of the Nth derivatives of curves
6912         #    or surfaces (d/du C(u)) are the same at junction. \n
6913         #   \b Geometric \b Continuity \n
6914         #   \b G1: first derivatives are proportional at junction.\n
6915         #   The curve tangents thus have the same direction, but not necessarily the same magnitude.
6916         #      i.e., C1'(1) = (a,b,c) and C2'(0) = (k*a, k*b, k*c).\n
6917         #   \b G2: first and second derivatives are proportional at junction.
6918         #   As the names imply, geometric continuity requires the geometry to be continuous, while parametric
6919         #    continuity requires that the underlying parameterization was continuous as well.
6920         #   Parametric continuity of order n implies geometric continuity of order n, but not vice-versa.\n
6921         #
6922         #  * \b BsplineRestriction - converts curves and surfaces to Bsplines and processes them with the following parameters:\n
6923         #  - \b BSplineRestriction.SurfaceMode - approximation of surfaces if restriction is necessary.\n
6924         #  - \b BSplineRestriction.Curve3dMode - conversion of any 3D curve to BSpline and approximation.\n
6925         #  - \b BSplineRestriction.Curve2dMode - conversion of any 2D curve to BSpline and approximation.\n
6926         #  - \b BSplineRestriction.Tolerance3d - defines the possibility of surfaces and 3D curves approximation
6927         #       with the specified parameters.\n
6928         #  - \b BSplineRestriction.Tolerance2d - defines the possibility of surfaces and 2D curves approximation
6929         #       with the specified parameters.\n
6930         #  - \b BSplineRestriction.RequiredDegree - required degree of the resulting BSplines.\n
6931         #  - \b BSplineRestriction.RequiredNbSegments - required maximum number of segments of resultant BSplines.\n
6932         #  - \b BSplineRestriction.Continuity3d - continuity of the resulting surfaces and 3D curves.\n
6933         #  - \b BSplineRestriction.Continuity2d - continuity of the resulting 2D curves.\n
6934         #
6935         #  * \b ToBezier - converts curves and surfaces of any type to Bezier curves and surfaces.\n
6936         #  - \b ToBezier.SurfaceMode - if checked in, allows conversion of surfaces.\n
6937         #  - \b ToBezier.Curve3dMode - if checked in, allows conversion of 3D curves.\n
6938         #  - \b ToBezier.Curve2dMode - if checked in, allows conversion of 2D curves.\n
6939         #  - \b ToBezier.MaxTolerance - defines tolerance for detection and correction of problems.\n
6940         #
6941         #  * \b SameParameter - fixes edges of 2D and 3D curves not having the same parameter.\n
6942         #  - \b SameParameter.Tolerance3d - defines tolerance for fixing of edges.\n
6943         #
6944         #
6945         #  @return New GEOM.GEOM_Object, containing processed shape.
6946         #
6947         #  \n @ref tui_shape_processing "Example"
6948         @ManageTransactions("HealOp")
6949         def ProcessShape(self, theShape, theOperators, theParameters, theValues, theName=None):
6950             """
6951             Apply a sequence of Shape Healing operators to the given object.
6952
6953             Parameters:
6954                 theShape Shape to be processed.
6955                 theValues List of values of parameters, in the same order
6956                           as parameters are listed in theParameters list.
6957                 theOperators List of names of operators ('FixShape', 'SplitClosedFaces', etc.).
6958                 theParameters List of names of parameters
6959                               ('FixShape.Tolerance3d', 'SplitClosedFaces.NbSplitPoints', etc.).
6960                 theName Object name; when specified, this parameter is used
6961                         for result publication in the study. Otherwise, if automatic
6962                         publication is switched on, default value is used for result name.
6963
6964                 Operators and Parameters:
6965
6966                  * FixShape - corrects invalid shapes.
6967                      * FixShape.Tolerance3d - work tolerance for detection of the problems and correction of them.
6968                      * FixShape.MaxTolerance3d - maximal possible tolerance of the shape after correction.
6969                  * FixFaceSize - removes small faces, such as spots and strips.
6970                      * FixFaceSize.Tolerance - defines minimum possible face size.
6971                  * DropSmallEdges - removes edges, which merge with neighbouring edges.
6972                      * DropSmallEdges.Tolerance3d - defines minimum possible distance between two parallel edges.
6973                  * DropSmallSolids - either removes small solids or merges them with neighboring ones.
6974                      * 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.
6975                      * 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.
6976                      * 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.
6977
6978                  * SplitAngle - splits faces based on conical surfaces, surfaces of revolution and cylindrical surfaces
6979                                 in segments using a certain angle.
6980                      * SplitAngle.Angle - the central angle of the resulting segments (i.e. we obtain two segments
6981                                           if Angle=180, four if Angle=90, etc).
6982                      * SplitAngle.MaxTolerance - maximum possible tolerance among the resulting segments.
6983                  * SplitClosedFaces - splits closed faces in segments. The number of segments depends on the number of
6984                                       splitting points.
6985                      * SplitClosedFaces.NbSplitPoints - the number of splitting points.
6986                  * SplitContinuity - splits shapes to reduce continuities of curves and surfaces.
6987                      * SplitContinuity.Tolerance3d - 3D tolerance for correction of geometry.
6988                      * SplitContinuity.SurfaceContinuity - required continuity for surfaces.
6989                      * SplitContinuity.CurveContinuity - required continuity for curves.
6990                        This and the previous parameters can take the following values:
6991
6992                        Parametric Continuity:
6993                        C0 (Positional Continuity): curves are joined (the end positions of curves or surfaces are
6994                                                    coincidental. The curves or surfaces may still meet at an angle,
6995                                                    giving rise to a sharp corner or edge).
6996                        C1 (Tangential Continuity): first derivatives are equal (the end vectors of curves or surfaces
6997                                                    are parallel, ruling out sharp edges).
6998                        C2 (Curvature Continuity): first and second derivatives are equal (the end vectors of curves
6999                                                   or surfaces are of the same magnitude).
7000                        CN N-th derivatives are equal (both the direction and the magnitude of the Nth derivatives of
7001                           curves or surfaces (d/du C(u)) are the same at junction.
7002
7003                        Geometric Continuity:
7004                        G1: first derivatives are proportional at junction.
7005                            The curve tangents thus have the same direction, but not necessarily the same magnitude.
7006                            i.e., C1'(1) = (a,b,c) and C2'(0) = (k*a, k*b, k*c).
7007                        G2: first and second derivatives are proportional at junction. As the names imply,
7008                            geometric continuity requires the geometry to be continuous, while parametric continuity requires
7009                            that the underlying parameterization was continuous as well. Parametric continuity of order n implies
7010                            geometric continuity of order n, but not vice-versa.
7011                  * BsplineRestriction - converts curves and surfaces to Bsplines and processes them with the following parameters:
7012                      * BSplineRestriction.SurfaceMode - approximation of surfaces if restriction is necessary.
7013                      * BSplineRestriction.Curve3dMode - conversion of any 3D curve to BSpline and approximation.
7014                      * BSplineRestriction.Curve2dMode - conversion of any 2D curve to BSpline and approximation.
7015                      * BSplineRestriction.Tolerance3d - defines the possibility of surfaces and 3D curves approximation with
7016                                                         the specified parameters.
7017                      * BSplineRestriction.Tolerance2d - defines the possibility of surfaces and 2D curves approximation with
7018                                                         the specified parameters.
7019                      * BSplineRestriction.RequiredDegree - required degree of the resulting BSplines.
7020                      * BSplineRestriction.RequiredNbSegments - required maximum number of segments of resultant BSplines.
7021                      * BSplineRestriction.Continuity3d - continuity of the resulting surfaces and 3D curves.
7022                      * BSplineRestriction.Continuity2d - continuity of the resulting 2D curves.
7023                  * ToBezier - converts curves and surfaces of any type to Bezier curves and surfaces.
7024                      * ToBezier.SurfaceMode - if checked in, allows conversion of surfaces.
7025                      * ToBezier.Curve3dMode - if checked in, allows conversion of 3D curves.
7026                      * ToBezier.Curve2dMode - if checked in, allows conversion of 2D curves.
7027                      * ToBezier.MaxTolerance - defines tolerance for detection and correction of problems.
7028                  * SameParameter - fixes edges of 2D and 3D curves not having the same parameter.
7029                      * SameParameter.Tolerance3d - defines tolerance for fixing of edges.
7030
7031             Returns:
7032                 New GEOM.GEOM_Object, containing processed shape.
7033
7034             Note: For more information look through SALOME Geometry User's Guide->
7035                   -> Introduction to Geometry-> Repairing Operations-> Shape Processing
7036             """
7037             # Example: see GEOM_TestHealing.py
7038             theValues,Parameters = ParseList(theValues)
7039             anObj = self.HealOp.ProcessShape(theShape, theOperators, theParameters, theValues)
7040             # To avoid script failure in case of good argument shape
7041             if self.HealOp.GetErrorCode() == "ShHealOper_NotError_msg":
7042                 return theShape
7043             RaiseIfFailed("ProcessShape", self.HealOp)
7044             for string in (theOperators + theParameters):
7045                 Parameters = ":" + Parameters
7046                 pass
7047             anObj.SetParameters(Parameters)
7048             self._autoPublish(anObj, theName, "healed")
7049             return anObj
7050
7051         ## Remove faces from the given object (shape).
7052         #  @param theObject Shape to be processed.
7053         #  @param theFaces Indices of faces to be removed, if EMPTY then the method
7054         #                  removes ALL faces of the given object.
7055         #  @param theName Object name; when specified, this parameter is used
7056         #         for result publication in the study. Otherwise, if automatic
7057         #         publication is switched on, default value is used for result name.
7058         #
7059         #  @return New GEOM.GEOM_Object, containing processed shape.
7060         #
7061         #  @ref tui_suppress_faces "Example"
7062         @ManageTransactions("HealOp")
7063         def SuppressFaces(self, theObject, theFaces, theName=None):
7064             """
7065             Remove faces from the given object (shape).
7066
7067             Parameters:
7068                 theObject Shape to be processed.
7069                 theFaces Indices of faces to be removed, if EMPTY then the method
7070                          removes ALL faces of the given object.
7071                 theName Object name; when specified, this parameter is used
7072                         for result publication in the study. Otherwise, if automatic
7073                         publication is switched on, default value is used for result name.
7074
7075             Returns:
7076                 New GEOM.GEOM_Object, containing processed shape.
7077             """
7078             # Example: see GEOM_TestHealing.py
7079             anObj = self.HealOp.SuppressFaces(theObject, theFaces)
7080             RaiseIfFailed("SuppressFaces", self.HealOp)
7081             self._autoPublish(anObj, theName, "suppressFaces")
7082             return anObj
7083
7084         ## Sewing of faces into a single shell.
7085         #  @param ListShape Shapes to be processed.
7086         #  @param theTolerance Required tolerance value.
7087         #  @param AllowNonManifold Flag that allows non-manifold sewing.
7088         #  @param theName Object name; when specified, this parameter is used
7089         #         for result publication in the study. Otherwise, if automatic
7090         #         publication is switched on, default value is used for result name.
7091         #
7092         #  @return New GEOM.GEOM_Object, containing a result shell.
7093         #
7094         #  @ref tui_sewing "Example"
7095         def MakeSewing(self, ListShape, theTolerance, AllowNonManifold=False, theName=None):
7096             """
7097             Sewing of faces into a single shell.
7098
7099             Parameters:
7100                 ListShape Shapes to be processed.
7101                 theTolerance Required tolerance value.
7102                 AllowNonManifold Flag that allows non-manifold sewing.
7103                 theName Object name; when specified, this parameter is used
7104                         for result publication in the study. Otherwise, if automatic
7105                         publication is switched on, default value is used for result name.
7106
7107             Returns:
7108                 New GEOM.GEOM_Object, containing containing a result shell.
7109             """
7110             # Example: see GEOM_TestHealing.py
7111             # note: auto-publishing is done in self.Sew()
7112             anObj = self.Sew(ListShape, theTolerance, AllowNonManifold, theName)
7113             return anObj
7114
7115         ## Sewing of faces into a single shell.
7116         #  @param ListShape Shapes to be processed.
7117         #  @param theTolerance Required tolerance value.
7118         #  @param AllowNonManifold Flag that allows non-manifold sewing.
7119         #  @param theName Object name; when specified, this parameter is used
7120         #         for result publication in the study. Otherwise, if automatic
7121         #         publication is switched on, default value is used for result name.
7122         #
7123         #  @return New GEOM.GEOM_Object, containing a result shell.
7124         @ManageTransactions("HealOp")
7125         def Sew(self, ListShape, theTolerance, AllowNonManifold=False, theName=None):
7126             """
7127             Sewing of faces into a single shell.
7128
7129             Parameters:
7130                 ListShape Shapes to be processed.
7131                 theTolerance Required tolerance value.
7132                 AllowNonManifold Flag that allows non-manifold sewing.
7133                 theName Object name; when specified, this parameter is used
7134                         for result publication in the study. Otherwise, if automatic
7135                         publication is switched on, default value is used for result name.
7136
7137             Returns:
7138                 New GEOM.GEOM_Object, containing a result shell.
7139             """
7140             # Example: see MakeSewing() above
7141             theTolerance,Parameters = ParseParameters(theTolerance)
7142             if AllowNonManifold:
7143                 anObj = self.HealOp.SewAllowNonManifold( ToList( ListShape ), theTolerance)
7144             else:
7145                 anObj = self.HealOp.Sew( ToList( ListShape ), theTolerance)
7146             # To avoid script failure in case of good argument shape
7147             # (Fix of test cases geom/bugs11/L7,L8)
7148             if self.HealOp.GetErrorCode() == "ShHealOper_NotError_msg":
7149                 return anObj
7150             RaiseIfFailed("Sew", self.HealOp)
7151             anObj.SetParameters(Parameters)
7152             self._autoPublish(anObj, theName, "sewed")
7153             return anObj
7154
7155         ## Rebuild the topology of theSolids by removing
7156         #  the faces that are shared by several solids.
7157         #  @param theSolids A compound or a list of solids to be processed.
7158         #  @param theName Object name; when specified, this parameter is used
7159         #         for result publication in the study. Otherwise, if automatic
7160         #         publication is switched on, default value is used for result name.
7161         #
7162         #  @return New GEOM.GEOM_Object, containing processed shape.
7163         #
7164         #  @ref tui_remove_webs "Example"
7165         @ManageTransactions("HealOp")
7166         def RemoveInternalFaces (self, theSolids, theName=None):
7167             """
7168             Rebuild the topology of theSolids by removing
7169             the faces that are shared by several solids.
7170
7171             Parameters:
7172                 theSolids A compound or a list of solids to be processed.
7173                 theName Object name; when specified, this parameter is used
7174                         for result publication in the study. Otherwise, if automatic
7175                         publication is switched on, default value is used for result name.
7176
7177             Returns:
7178                 New GEOM.GEOM_Object, containing processed shape.
7179             """
7180             # Example: see GEOM_TestHealing.py
7181             anObj = self.HealOp.RemoveInternalFaces(ToList(theSolids))
7182             RaiseIfFailed("RemoveInternalFaces", self.HealOp)
7183             self._autoPublish(anObj, theName, "removeWebs")
7184             return anObj
7185
7186         ## Remove internal wires and edges from the given object (face).
7187         #  @param theObject Shape to be processed.
7188         #  @param theWires Indices of wires to be removed, if EMPTY then the method
7189         #                  removes ALL internal wires of the given object.
7190         #  @param theName Object name; when specified, this parameter is used
7191         #         for result publication in the study. Otherwise, if automatic
7192         #         publication is switched on, default value is used for result name.
7193         #
7194         #  @return New GEOM.GEOM_Object, containing processed shape.
7195         #
7196         #  @ref tui_suppress_internal_wires "Example"
7197         @ManageTransactions("HealOp")
7198         def SuppressInternalWires(self, theObject, theWires, theName=None):
7199             """
7200             Remove internal wires and edges from the given object (face).
7201
7202             Parameters:
7203                 theObject Shape to be processed.
7204                 theWires Indices of wires to be removed, if EMPTY then the method
7205                          removes ALL internal wires of the given object.
7206                 theName Object name; when specified, this parameter is used
7207                         for result publication in the study. Otherwise, if automatic
7208                         publication is switched on, default value is used for result name.
7209
7210             Returns:
7211                 New GEOM.GEOM_Object, containing processed shape.
7212             """
7213             # Example: see GEOM_TestHealing.py
7214             anObj = self.HealOp.RemoveIntWires(theObject, theWires)
7215             RaiseIfFailed("RemoveIntWires", self.HealOp)
7216             self._autoPublish(anObj, theName, "suppressWires")
7217             return anObj
7218
7219         ## Remove internal closed contours (holes) from the given object.
7220         #  @param theObject Shape to be processed.
7221         #  @param theWires Indices of wires to be removed, if EMPTY then the method
7222         #                  removes ALL internal holes of the given object
7223         #  @param theName Object name; when specified, this parameter is used
7224         #         for result publication in the study. Otherwise, if automatic
7225         #         publication is switched on, default value is used for result name.
7226         #
7227         #  @return New GEOM.GEOM_Object, containing processed shape.
7228         #
7229         #  @ref tui_suppress_holes "Example"
7230         @ManageTransactions("HealOp")
7231         def SuppressHoles(self, theObject, theWires, theName=None):
7232             """
7233             Remove internal closed contours (holes) from the given object.
7234
7235             Parameters:
7236                 theObject Shape to be processed.
7237                 theWires Indices of wires to be removed, if EMPTY then the method
7238                          removes ALL internal holes of the given object
7239                 theName Object name; when specified, this parameter is used
7240                         for result publication in the study. Otherwise, if automatic
7241                         publication is switched on, default value is used for result name.
7242
7243             Returns:
7244                 New GEOM.GEOM_Object, containing processed shape.
7245             """
7246             # Example: see GEOM_TestHealing.py
7247             anObj = self.HealOp.FillHoles(theObject, theWires)
7248             RaiseIfFailed("FillHoles", self.HealOp)
7249             self._autoPublish(anObj, theName, "suppressHoles")
7250             return anObj
7251
7252         ## Close an open wire.
7253         #  @param theObject Shape to be processed.
7254         #  @param theWires Indexes of edge(s) and wire(s) to be closed within <VAR>theObject</VAR>'s shape,
7255         #                  if [ ], then <VAR>theObject</VAR> itself is a wire.
7256         #  @param isCommonVertex If True  : closure by creation of a common vertex,
7257         #                        If False : closure by creation of an edge between ends.
7258         #  @param theName Object name; when specified, this parameter is used
7259         #         for result publication in the study. Otherwise, if automatic
7260         #         publication is switched on, default value is used for result name.
7261         #
7262         #  @return New GEOM.GEOM_Object, containing processed shape.
7263         #
7264         #  @ref tui_close_contour "Example"
7265         @ManageTransactions("HealOp")
7266         def CloseContour(self,theObject, theWires, isCommonVertex, theName=None):
7267             """
7268             Close an open wire.
7269
7270             Parameters:
7271                 theObject Shape to be processed.
7272                 theWires Indexes of edge(s) and wire(s) to be closed within theObject's shape,
7273                          if [ ], then theObject itself is a wire.
7274                 isCommonVertex If True  : closure by creation of a common vertex,
7275                                If False : closure by creation of an edge between ends.
7276                 theName Object name; when specified, this parameter is used
7277                         for result publication in the study. Otherwise, if automatic
7278                         publication is switched on, default value is used for result name.
7279
7280             Returns:
7281                 New GEOM.GEOM_Object, containing processed shape.
7282             """
7283             # Example: see GEOM_TestHealing.py
7284             anObj = self.HealOp.CloseContour(theObject, theWires, isCommonVertex)
7285             RaiseIfFailed("CloseContour", self.HealOp)
7286             self._autoPublish(anObj, theName, "closeContour")
7287             return anObj
7288
7289         ## Addition of a point to a given edge object.
7290         #  @param theObject Shape to be processed.
7291         #  @param theEdgeIndex Index of edge to be divided within theObject's shape,
7292         #                      if -1, then theObject itself is the edge.
7293         #  @param theValue Value of parameter on edge or length parameter,
7294         #                  depending on \a isByParameter.
7295         #  @param isByParameter If TRUE : \a theValue is treated as a curve parameter [0..1], \n
7296         #                       if FALSE : \a theValue is treated as a length parameter [0..1]
7297         #  @param theName Object name; when specified, this parameter is used
7298         #         for result publication in the study. Otherwise, if automatic
7299         #         publication is switched on, default value is used for result name.
7300         #
7301         #  @return New GEOM.GEOM_Object, containing processed shape.
7302         #
7303         #  @ref tui_add_point_on_edge "Example"
7304         @ManageTransactions("HealOp")
7305         def DivideEdge(self, theObject, theEdgeIndex, theValue, isByParameter, theName=None):
7306             """
7307             Addition of a point to a given edge object.
7308
7309             Parameters:
7310                 theObject Shape to be processed.
7311                 theEdgeIndex Index of edge to be divided within theObject's shape,
7312                              if -1, then theObject itself is the edge.
7313                 theValue Value of parameter on edge or length parameter,
7314                          depending on isByParameter.
7315                 isByParameter If TRUE :  theValue is treated as a curve parameter [0..1],
7316                               if FALSE : theValue is treated as a length parameter [0..1]
7317                 theName Object name; when specified, this parameter is used
7318                         for result publication in the study. Otherwise, if automatic
7319                         publication is switched on, default value is used for result name.
7320
7321             Returns:
7322                 New GEOM.GEOM_Object, containing processed shape.
7323             """
7324             # Example: see GEOM_TestHealing.py
7325             theEdgeIndex,theValue,isByParameter,Parameters = ParseParameters(theEdgeIndex,theValue,isByParameter)
7326             anObj = self.HealOp.DivideEdge(theObject, theEdgeIndex, theValue, isByParameter)
7327             RaiseIfFailed("DivideEdge", self.HealOp)
7328             anObj.SetParameters(Parameters)
7329             self._autoPublish(anObj, theName, "divideEdge")
7330             return anObj
7331
7332         ## Addition of points to a given edge of \a theObject by projecting
7333         #  other points to the given edge.
7334         #  @param theObject Shape to be processed.
7335         #  @param theEdgeIndex Index of edge to be divided within theObject's shape,
7336         #                      if -1, then theObject itself is the edge.
7337         #  @param thePoints List of points to project to theEdgeIndex-th edge.
7338         #  @param theName Object name; when specified, this parameter is used
7339         #         for result publication in the study. Otherwise, if automatic
7340         #         publication is switched on, default value is used for result name.
7341         #
7342         #  @return New GEOM.GEOM_Object, containing processed shape.
7343         #
7344         #  @ref tui_add_point_on_edge "Example"
7345         @ManageTransactions("HealOp")
7346         def DivideEdgeByPoint(self, theObject, theEdgeIndex, thePoints, theName=None):
7347             """
7348             Addition of points to a given edge of \a theObject by projecting
7349             other points to the given edge.
7350
7351             Parameters:
7352                 theObject Shape to be processed.
7353                 theEdgeIndex The edge or its index to be divided within theObject's shape,
7354                              if -1, then theObject itself is the edge.
7355                 thePoints List of points to project to theEdgeIndex-th edge.
7356                 theName Object name; when specified, this parameter is used
7357                         for result publication in the study. Otherwise, if automatic
7358                         publication is switched on, default value is used for result name.
7359
7360             Returns:
7361                 New GEOM.GEOM_Object, containing processed shape.
7362             """
7363             # Example: see GEOM_TestHealing.py
7364             if isinstance( theEdgeIndex, GEOM._objref_GEOM_Object ):
7365                 theEdgeIndex = self.GetSubShapeID( theObject, theEdgeIndex )
7366             anObj = self.HealOp.DivideEdgeByPoint(theObject, theEdgeIndex, ToList( thePoints ))
7367             RaiseIfFailed("DivideEdgeByPoint", self.HealOp)
7368             self._autoPublish(anObj, theName, "divideEdge")
7369             return anObj
7370
7371         ## Suppress the vertices in the wire in case if adjacent edges are C1 continuous.
7372         #  @param theWire Wire to minimize the number of C1 continuous edges in.
7373         #  @param theVertices A list of vertices to suppress. If the list
7374         #                     is empty, all vertices in a wire will be assumed.
7375         #  @param theName Object name; when specified, this parameter is used
7376         #         for result publication in the study. Otherwise, if automatic
7377         #         publication is switched on, default value is used for result name.
7378         #
7379         #  @return New GEOM.GEOM_Object with modified wire.
7380         #
7381         #  @ref tui_fuse_collinear_edges "Example"
7382         @ManageTransactions("HealOp")
7383         def FuseCollinearEdgesWithinWire(self, theWire, theVertices = [], theName=None):
7384             """
7385             Suppress the vertices in the wire in case if adjacent edges are C1 continuous.
7386
7387             Parameters:
7388                 theWire Wire to minimize the number of C1 continuous edges in.
7389                 theVertices A list of vertices to suppress. If the list
7390                             is empty, all vertices in a wire will be assumed.
7391                 theName Object name; when specified, this parameter is used
7392                         for result publication in the study. Otherwise, if automatic
7393                         publication is switched on, default value is used for result name.
7394
7395             Returns:
7396                 New GEOM.GEOM_Object with modified wire.
7397             """
7398             anObj = self.HealOp.FuseCollinearEdgesWithinWire(theWire, theVertices)
7399             RaiseIfFailed("FuseCollinearEdgesWithinWire", self.HealOp)
7400             self._autoPublish(anObj, theName, "fuseEdges")
7401             return anObj
7402
7403         ## Change orientation of the given object. Updates given shape.
7404         #  @param theObject Shape to be processed.
7405         #  @return Updated <var>theObject</var>
7406         #
7407         #  @ref swig_todo "Example"
7408         @ManageTransactions("HealOp")
7409         def ChangeOrientationShell(self,theObject):
7410             """
7411             Change orientation of the given object. Updates given shape.
7412
7413             Parameters:
7414                 theObject Shape to be processed.
7415
7416             Returns:
7417                 Updated theObject
7418             """
7419             theObject = self.HealOp.ChangeOrientation(theObject)
7420             RaiseIfFailed("ChangeOrientation", self.HealOp)
7421             pass
7422
7423         ## Change orientation of the given object.
7424         #  @param theObject Shape to be processed.
7425         #  @param theName Object name; when specified, this parameter is used
7426         #         for result publication in the study. Otherwise, if automatic
7427         #         publication is switched on, default value is used for result name.
7428         #
7429         #  @return New GEOM.GEOM_Object, containing processed shape.
7430         #
7431         #  @ref swig_todo "Example"
7432         @ManageTransactions("HealOp")
7433         def ChangeOrientationShellCopy(self, theObject, theName=None):
7434             """
7435             Change orientation of the given object.
7436
7437             Parameters:
7438                 theObject Shape to be processed.
7439                 theName Object name; when specified, this parameter is used
7440                         for result publication in the study. Otherwise, if automatic
7441                         publication is switched on, default value is used for result name.
7442
7443             Returns:
7444                 New GEOM.GEOM_Object, containing processed shape.
7445             """
7446             anObj = self.HealOp.ChangeOrientationCopy(theObject)
7447             RaiseIfFailed("ChangeOrientationCopy", self.HealOp)
7448             self._autoPublish(anObj, theName, "reversed")
7449             return anObj
7450
7451         ## Try to limit tolerance of the given object by value \a theTolerance.
7452         #  @param theObject Shape to be processed.
7453         #  @param theTolerance Required tolerance value.
7454         #  @param theName Object name; when specified, this parameter is used
7455         #         for result publication in the study. Otherwise, if automatic
7456         #         publication is switched on, default value is used for result name.
7457         #
7458         #  @return New GEOM.GEOM_Object, containing processed shape.
7459         #
7460         #  @ref tui_limit_tolerance "Example"
7461         @ManageTransactions("HealOp")
7462         def LimitTolerance(self, theObject, theTolerance = 1e-07, theName=None):
7463             """
7464             Try to limit tolerance of the given object by value theTolerance.
7465
7466             Parameters:
7467                 theObject Shape to be processed.
7468                 theTolerance Required tolerance value.
7469                 theName Object name; when specified, this parameter is used
7470                         for result publication in the study. Otherwise, if automatic
7471                         publication is switched on, default value is used for result name.
7472
7473             Returns:
7474                 New GEOM.GEOM_Object, containing processed shape.
7475             """
7476             anObj = self.HealOp.LimitTolerance(theObject, theTolerance)
7477             RaiseIfFailed("LimitTolerance", self.HealOp)
7478             self._autoPublish(anObj, theName, "limitTolerance")
7479             return anObj
7480
7481         ## Get a list of wires (wrapped in GEOM.GEOM_Object-s),
7482         #  that constitute a free boundary of the given shape.
7483         #  @param theObject Shape to get free boundary of.
7484         #  @param theName Object name; when specified, this parameter is used
7485         #         for result publication in the study. Otherwise, if automatic
7486         #         publication is switched on, default value is used for result name.
7487         #
7488         #  @return [\a status, \a theClosedWires, \a theOpenWires]
7489         #  \n \a status: FALSE, if an error(s) occurred during the method execution.
7490         #  \n \a theClosedWires: Closed wires on the free boundary of the given shape.
7491         #  \n \a theOpenWires: Open wires on the free boundary of the given shape.
7492         #
7493         #  @ref tui_free_boundaries_page "Example"
7494         @ManageTransactions("HealOp")
7495         def GetFreeBoundary(self, theObject, theName=None):
7496             """
7497             Get a list of wires (wrapped in GEOM.GEOM_Object-s),
7498             that constitute a free boundary of the given shape.
7499
7500             Parameters:
7501                 theObject Shape to get free boundary of.
7502                 theName Object name; when specified, this parameter is used
7503                         for result publication in the study. Otherwise, if automatic
7504                         publication is switched on, default value is used for result name.
7505
7506             Returns:
7507                 [status, theClosedWires, theOpenWires]
7508                  status: FALSE, if an error(s) occurred during the method execution.
7509                  theClosedWires: Closed wires on the free boundary of the given shape.
7510                  theOpenWires: Open wires on the free boundary of the given shape.
7511             """
7512             # Example: see GEOM_TestHealing.py
7513             anObj = self.HealOp.GetFreeBoundary( ToList( theObject ))
7514             RaiseIfFailed("GetFreeBoundary", self.HealOp)
7515             self._autoPublish(anObj[1], theName, "closedWire")
7516             self._autoPublish(anObj[2], theName, "openWire")
7517             return anObj
7518
7519         ## Replace coincident faces in \a theShapes by one face.
7520         #  @param theShapes Initial shapes, either a list or compound of shapes.
7521         #  @param theTolerance Maximum distance between faces, which can be considered as coincident.
7522         #  @param doKeepNonSolids If FALSE, only solids will present in the result,
7523         #                         otherwise all initial shapes.
7524         #  @param theName Object name; when specified, this parameter is used
7525         #         for result publication in the study. Otherwise, if automatic
7526         #         publication is switched on, default value is used for result name.
7527         #
7528         #  @return New GEOM.GEOM_Object, containing copies of theShapes without coincident faces.
7529         #
7530         #  @ref tui_glue_faces "Example"
7531         @ManageTransactions("ShapesOp")
7532         def MakeGlueFaces(self, theShapes, theTolerance, doKeepNonSolids=True, theName=None):
7533             """
7534             Replace coincident faces in theShapes by one face.
7535
7536             Parameters:
7537                 theShapes Initial shapes, either a list or compound of shapes.
7538                 theTolerance Maximum distance between faces, which can be considered as coincident.
7539                 doKeepNonSolids If FALSE, only solids will present in the result,
7540                                 otherwise all initial shapes.
7541                 theName Object name; when specified, this parameter is used
7542                         for result publication in the study. Otherwise, if automatic
7543                         publication is switched on, default value is used for result name.
7544
7545             Returns:
7546                 New GEOM.GEOM_Object, containing copies of theShapes without coincident faces.
7547             """
7548             # Example: see GEOM_Spanner.py
7549             theTolerance,Parameters = ParseParameters(theTolerance)
7550             anObj = self.ShapesOp.MakeGlueFaces(ToList(theShapes), theTolerance, doKeepNonSolids)
7551             if anObj is None:
7552                 raise RuntimeError("MakeGlueFaces : " + self.ShapesOp.GetErrorCode())
7553             anObj.SetParameters(Parameters)
7554             self._autoPublish(anObj, theName, "glueFaces")
7555             return anObj
7556
7557         ## Find coincident faces in \a theShapes for possible gluing.
7558         #  @param theShapes Initial shapes, either a list or compound of shapes.
7559         #  @param theTolerance Maximum distance between faces,
7560         #                      which can be considered as coincident.
7561         #  @param theName Object name; when specified, this parameter is used
7562         #         for result publication in the study. Otherwise, if automatic
7563         #         publication is switched on, default value is used for result name.
7564         #
7565         #  @return GEOM.ListOfGO
7566         #
7567         #  @ref tui_glue_faces "Example"
7568         @ManageTransactions("ShapesOp")
7569         def GetGlueFaces(self, theShapes, theTolerance, theName=None):
7570             """
7571             Find coincident faces in theShapes for possible gluing.
7572
7573             Parameters:
7574                 theShapes Initial shapes, either a list or compound of shapes.
7575                 theTolerance Maximum distance between faces,
7576                              which can be considered as coincident.
7577                 theName Object name; when specified, this parameter is used
7578                         for result publication in the study. Otherwise, if automatic
7579                         publication is switched on, default value is used for result name.
7580
7581             Returns:
7582                 GEOM.ListOfGO
7583             """
7584             anObj = self.ShapesOp.GetGlueFaces(ToList(theShapes), theTolerance)
7585             RaiseIfFailed("GetGlueFaces", self.ShapesOp)
7586             self._autoPublish(anObj, theName, "facesToGlue")
7587             return anObj
7588
7589         ## Replace coincident faces in \a theShapes by one face
7590         #  in compliance with given list of faces
7591         #  @param theShapes Initial shapes, either a list or compound of shapes.
7592         #  @param theTolerance Maximum distance between faces,
7593         #                      which can be considered as coincident.
7594         #  @param theFaces List of faces for gluing.
7595         #  @param doKeepNonSolids If FALSE, only solids will present in the result,
7596         #                         otherwise all initial shapes.
7597         #  @param doGlueAllEdges If TRUE, all coincident edges of <VAR>theShape</VAR>
7598         #                        will be glued, otherwise only the edges,
7599         #                        belonging to <VAR>theFaces</VAR>.
7600         #  @param theName Object name; when specified, this parameter is used
7601         #         for result publication in the study. Otherwise, if automatic
7602         #         publication is switched on, default value is used for result name.
7603         #
7604         #  @return New GEOM.GEOM_Object, containing copies of theShapes without coincident faces.
7605         #
7606         #  @ref tui_glue_faces "Example"
7607         @ManageTransactions("ShapesOp")
7608         def MakeGlueFacesByList(self, theShapes, theTolerance, theFaces,
7609                                 doKeepNonSolids=True, doGlueAllEdges=True, theName=None):
7610             """
7611             Replace coincident faces in theShapes by one face
7612             in compliance with given list of faces
7613
7614             Parameters:
7615                 theShapes theShapes Initial shapes, either a list or compound of shapes.
7616                 theTolerance Maximum distance between faces,
7617                              which can be considered as coincident.
7618                 theFaces List of faces for gluing.
7619                 doKeepNonSolids If FALSE, only solids will present in the result,
7620                                 otherwise all initial shapes.
7621                 doGlueAllEdges If TRUE, all coincident edges of theShape
7622                                will be glued, otherwise only the edges,
7623                                belonging to theFaces.
7624                 theName Object name; when specified, this parameter is used
7625                         for result publication in the study. Otherwise, if automatic
7626                         publication is switched on, default value is used for result name.
7627
7628             Returns:
7629                 New GEOM.GEOM_Object, containing copies of theShapes without coincident faces.
7630             """
7631             anObj = self.ShapesOp.MakeGlueFacesByList(ToList(theShapes), theTolerance, ToList(theFaces),
7632                                                       doKeepNonSolids, doGlueAllEdges)
7633             if anObj is None:
7634                 raise RuntimeError("MakeGlueFacesByList : " + self.ShapesOp.GetErrorCode())
7635             self._autoPublish(anObj, theName, "glueFaces")
7636             return anObj
7637
7638         ## Replace coincident edges in \a theShapes by one edge.
7639         #  @param theShapes Initial shapes, either a list or compound of shapes.
7640         #  @param theTolerance Maximum distance between edges, which can be considered as coincident.
7641         #  @param theName Object name; when specified, this parameter is used
7642         #         for result publication in the study. Otherwise, if automatic
7643         #         publication is switched on, default value is used for result name.
7644         #
7645         #  @return New GEOM.GEOM_Object, containing copies of theShapes without coincident edges.
7646         #
7647         #  @ref tui_glue_edges "Example"
7648         @ManageTransactions("ShapesOp")
7649         def MakeGlueEdges(self, theShapes, theTolerance, theName=None):
7650             """
7651             Replace coincident edges in theShapes by one edge.
7652
7653             Parameters:
7654                 theShapes Initial shapes, either a list or compound of shapes.
7655                 theTolerance Maximum distance between edges, which can be considered as coincident.
7656                 theName Object name; when specified, this parameter is used
7657                         for result publication in the study. Otherwise, if automatic
7658                         publication is switched on, default value is used for result name.
7659
7660             Returns:
7661                 New GEOM.GEOM_Object, containing copies of theShapes without coincident edges.
7662             """
7663             theTolerance,Parameters = ParseParameters(theTolerance)
7664             anObj = self.ShapesOp.MakeGlueEdges(ToList(theShapes), theTolerance)
7665             if anObj is None:
7666                 raise RuntimeError("MakeGlueEdges : " + self.ShapesOp.GetErrorCode())
7667             anObj.SetParameters(Parameters)
7668             self._autoPublish(anObj, theName, "glueEdges")
7669             return anObj
7670
7671         ## Find coincident edges in \a theShapes for possible gluing.
7672         #  @param theShapes Initial shapes, either a list or compound of shapes.
7673         #  @param theTolerance Maximum distance between edges,
7674         #                      which can be considered as coincident.
7675         #  @param theName Object name; when specified, this parameter is used
7676         #         for result publication in the study. Otherwise, if automatic
7677         #         publication is switched on, default value is used for result name.
7678         #
7679         #  @return GEOM.ListOfGO
7680         #
7681         #  @ref tui_glue_edges "Example"
7682         @ManageTransactions("ShapesOp")
7683         def GetGlueEdges(self, theShapes, theTolerance, theName=None):
7684             """
7685             Find coincident edges in theShapes for possible gluing.
7686
7687             Parameters:
7688                 theShapes Initial shapes, either a list or compound of shapes.
7689                 theTolerance Maximum distance between edges,
7690                              which can be considered as coincident.
7691                 theName Object name; when specified, this parameter is used
7692                         for result publication in the study. Otherwise, if automatic
7693                         publication is switched on, default value is used for result name.
7694
7695             Returns:
7696                 GEOM.ListOfGO
7697             """
7698             anObj = self.ShapesOp.GetGlueEdges(ToList(theShapes), theTolerance)
7699             RaiseIfFailed("GetGlueEdges", self.ShapesOp)
7700             self._autoPublish(anObj, theName, "edgesToGlue")
7701             return anObj
7702
7703         ## Replace coincident edges in theShapes by one edge
7704         #  in compliance with given list of edges.
7705         #  @param theShapes Initial shapes, either a list or compound of shapes.
7706         #  @param theTolerance Maximum distance between edges,
7707         #                      which can be considered as coincident.
7708         #  @param theEdges List of edges for gluing.
7709         #  @param theName Object name; when specified, this parameter is used
7710         #         for result publication in the study. Otherwise, if automatic
7711         #         publication is switched on, default value is used for result name.
7712         #
7713         #  @return New GEOM.GEOM_Object, containing copies of theShapes without coincident edges.
7714         #
7715         #  @ref tui_glue_edges "Example"
7716         @ManageTransactions("ShapesOp")
7717         def MakeGlueEdgesByList(self, theShapes, theTolerance, theEdges, theName=None):
7718             """
7719             Replace coincident edges in theShapes by one edge
7720             in compliance with given list of edges.
7721
7722             Parameters:
7723                 theShapes Initial shapes, either a list or compound of shapes.
7724                 theTolerance Maximum distance between edges,
7725                              which can be considered as coincident.
7726                 theEdges List of edges for gluing.
7727                 theName Object name; when specified, this parameter is used
7728                         for result publication in the study. Otherwise, if automatic
7729                         publication is switched on, default value is used for result name.
7730
7731             Returns:
7732                 New GEOM.GEOM_Object, containing copies of theShapes without coincident edges.
7733             """
7734             anObj = self.ShapesOp.MakeGlueEdgesByList(ToList(theShapes), theTolerance, theEdges)
7735             if anObj is None:
7736                 raise RuntimeError("MakeGlueEdgesByList : " + self.ShapesOp.GetErrorCode())
7737             self._autoPublish(anObj, theName, "glueEdges")
7738             return anObj
7739
7740         # end of l3_healing
7741         ## @}
7742
7743         ## @addtogroup l3_boolean Boolean Operations
7744         ## @{
7745
7746         # -----------------------------------------------------------------------------
7747         # Boolean (Common, Cut, Fuse, Section)
7748         # -----------------------------------------------------------------------------
7749
7750         ## Perform one of boolean operations on two given shapes.
7751         #  @param theShape1 First argument for boolean operation.
7752         #  @param theShape2 Second argument for boolean operation.
7753         #  @param theOperation Indicates the operation to be done:\n
7754         #                      1 - Common, 2 - Cut, 3 - Fuse, 4 - Section.
7755         #  @param checkSelfInte The flag that tells if the arguments should
7756         #         be checked for self-intersection prior to the operation.
7757         #  @param theName Object name; when specified, this parameter is used
7758         #         for result publication in the study. Otherwise, if automatic
7759         #         publication is switched on, default value is used for result name.
7760         #
7761         #  @note This algorithm doesn't find all types of self-intersections.
7762         #        It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7763         #        vertex/face and edge/face intersections. Face/face
7764         #        intersections detection is switched off as it is a
7765         #        time-consuming operation that gives an impact on performance.
7766         #        To find all self-intersections please use
7767         #        CheckSelfIntersections() method.
7768         #
7769         #  @return New GEOM.GEOM_Object, containing the result shape.
7770         #
7771         #  @ref tui_fuse "Example"
7772         @ManageTransactions("BoolOp")
7773         def MakeBoolean(self, theShape1, theShape2, theOperation, checkSelfInte=False, theName=None):
7774             """
7775             Perform one of boolean operations on two given shapes.
7776
7777             Parameters:
7778                 theShape1 First argument for boolean operation.
7779                 theShape2 Second argument for boolean operation.
7780                 theOperation Indicates the operation to be done:
7781                              1 - Common, 2 - Cut, 3 - Fuse, 4 - Section.
7782                 checkSelfInte The flag that tells if the arguments should
7783                               be checked for self-intersection prior to
7784                               the operation.
7785                 theName Object name; when specified, this parameter is used
7786                         for result publication in the study. Otherwise, if automatic
7787                         publication is switched on, default value is used for result name.
7788
7789             Note:
7790                     This algorithm doesn't find all types of self-intersections.
7791                     It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7792                     vertex/face and edge/face intersections. Face/face
7793                     intersections detection is switched off as it is a
7794                     time-consuming operation that gives an impact on performance.
7795                     To find all self-intersections please use
7796                     CheckSelfIntersections() method.
7797
7798             Returns:
7799                 New GEOM.GEOM_Object, containing the result shape.
7800             """
7801             # Example: see GEOM_TestAll.py
7802             anObj = self.BoolOp.MakeBoolean(theShape1, theShape2, theOperation, checkSelfInte)
7803             RaiseIfFailed("MakeBoolean", self.BoolOp)
7804             def_names = { 1: "common", 2: "cut", 3: "fuse", 4: "section" }
7805             self._autoPublish(anObj, theName, def_names[theOperation])
7806             return anObj
7807
7808         ## Perform Common boolean operation on two given shapes.
7809         #  @param theShape1 First argument for boolean operation.
7810         #  @param theShape2 Second argument for boolean operation.
7811         #  @param checkSelfInte The flag that tells if the arguments should
7812         #         be checked for self-intersection prior to the operation.
7813         #  @param theName Object name; when specified, this parameter is used
7814         #         for result publication in the study. Otherwise, if automatic
7815         #         publication is switched on, default value is used for result name.
7816         #
7817         #  @note This algorithm doesn't find all types of self-intersections.
7818         #        It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7819         #        vertex/face and edge/face intersections. Face/face
7820         #        intersections detection is switched off as it is a
7821         #        time-consuming operation that gives an impact on performance.
7822         #        To find all self-intersections please use
7823         #        CheckSelfIntersections() method.
7824         #
7825         #  @return New GEOM.GEOM_Object, containing the result shape.
7826         #
7827         #  @ref tui_common "Example 1"
7828         #  \n @ref swig_MakeCommon "Example 2"
7829         def MakeCommon(self, theShape1, theShape2, checkSelfInte=False, theName=None):
7830             """
7831             Perform Common boolean operation on two given shapes.
7832
7833             Parameters:
7834                 theShape1 First argument for boolean operation.
7835                 theShape2 Second argument for boolean operation.
7836                 checkSelfInte The flag that tells if the arguments should
7837                               be checked for self-intersection prior to
7838                               the operation.
7839                 theName Object name; when specified, this parameter is used
7840                         for result publication in the study. Otherwise, if automatic
7841                         publication is switched on, default value is used for result name.
7842
7843             Note:
7844                     This algorithm doesn't find all types of self-intersections.
7845                     It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7846                     vertex/face and edge/face intersections. Face/face
7847                     intersections detection is switched off as it is a
7848                     time-consuming operation that gives an impact on performance.
7849                     To find all self-intersections please use
7850                     CheckSelfIntersections() method.
7851
7852             Returns:
7853                 New GEOM.GEOM_Object, containing the result shape.
7854             """
7855             # Example: see GEOM_TestOthers.py
7856             # note: auto-publishing is done in self.MakeBoolean()
7857             return self.MakeBoolean(theShape1, theShape2, 1, checkSelfInte, theName)
7858
7859         ## Perform Cut boolean operation on two given shapes.
7860         #  @param theShape1 First argument for boolean operation.
7861         #  @param theShape2 Second argument for boolean operation.
7862         #  @param checkSelfInte The flag that tells if the arguments should
7863         #         be checked for self-intersection prior to the operation.
7864         #  @param theName Object name; when specified, this parameter is used
7865         #         for result publication in the study. Otherwise, if automatic
7866         #         publication is switched on, default value is used for result name.
7867         #
7868         #  @note This algorithm doesn't find all types of self-intersections.
7869         #        It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7870         #        vertex/face and edge/face intersections. Face/face
7871         #        intersections detection is switched off as it is a
7872         #        time-consuming operation that gives an impact on performance.
7873         #        To find all self-intersections please use
7874         #        CheckSelfIntersections() method.
7875         #
7876         #  @return New GEOM.GEOM_Object, containing the result shape.
7877         #
7878         #  @ref tui_cut "Example 1"
7879         #  \n @ref swig_MakeCommon "Example 2"
7880         def MakeCut(self, theShape1, theShape2, checkSelfInte=False, theName=None):
7881             """
7882             Perform Cut boolean operation on two given shapes.
7883
7884             Parameters:
7885                 theShape1 First argument for boolean operation.
7886                 theShape2 Second argument for boolean operation.
7887                 checkSelfInte The flag that tells if the arguments should
7888                               be checked for self-intersection prior to
7889                               the operation.
7890                 theName Object name; when specified, this parameter is used
7891                         for result publication in the study. Otherwise, if automatic
7892                         publication is switched on, default value is used for result name.
7893
7894             Note:
7895                     This algorithm doesn't find all types of self-intersections.
7896                     It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7897                     vertex/face and edge/face intersections. Face/face
7898                     intersections detection is switched off as it is a
7899                     time-consuming operation that gives an impact on performance.
7900                     To find all self-intersections please use
7901                     CheckSelfIntersections() method.
7902
7903             Returns:
7904                 New GEOM.GEOM_Object, containing the result shape.
7905
7906             """
7907             # Example: see GEOM_TestOthers.py
7908             # note: auto-publishing is done in self.MakeBoolean()
7909             return self.MakeBoolean(theShape1, theShape2, 2, checkSelfInte, theName)
7910
7911         ## Perform Fuse boolean operation on two given shapes.
7912         #  @param theShape1 First argument for boolean operation.
7913         #  @param theShape2 Second argument for boolean operation.
7914         #  @param checkSelfInte The flag that tells if the arguments should
7915         #         be checked for self-intersection prior to the operation.
7916         #  @param rmExtraEdges The flag that tells if Remove Extra Edges
7917         #         operation should be performed during the operation.
7918         #  @param theName Object name; when specified, this parameter is used
7919         #         for result publication in the study. Otherwise, if automatic
7920         #         publication is switched on, default value is used for result name.
7921         #
7922         #  @note This algorithm doesn't find all types of self-intersections.
7923         #        It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7924         #        vertex/face and edge/face intersections. Face/face
7925         #        intersections detection is switched off as it is a
7926         #        time-consuming operation that gives an impact on performance.
7927         #        To find all self-intersections please use
7928         #        CheckSelfIntersections() method.
7929         #
7930         #  @return New GEOM.GEOM_Object, containing the result shape.
7931         #
7932         #  @ref tui_fuse "Example 1"
7933         #  \n @ref swig_MakeCommon "Example 2"
7934         @ManageTransactions("BoolOp")
7935         def MakeFuse(self, theShape1, theShape2, checkSelfInte=False,
7936                      rmExtraEdges=False, theName=None):
7937             """
7938             Perform Fuse boolean operation on two given shapes.
7939
7940             Parameters:
7941                 theShape1 First argument for boolean operation.
7942                 theShape2 Second argument for boolean operation.
7943                 checkSelfInte The flag that tells if the arguments should
7944                               be checked for self-intersection prior to
7945                               the operation.
7946                 rmExtraEdges The flag that tells if Remove Extra Edges
7947                              operation should be performed during the operation.
7948                 theName Object name; when specified, this parameter is used
7949                         for result publication in the study. Otherwise, if automatic
7950                         publication is switched on, default value is used for result name.
7951
7952             Note:
7953                     This algorithm doesn't find all types of self-intersections.
7954                     It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7955                     vertex/face and edge/face intersections. Face/face
7956                     intersections detection is switched off as it is a
7957                     time-consuming operation that gives an impact on performance.
7958                     To find all self-intersections please use
7959                     CheckSelfIntersections() method.
7960
7961             Returns:
7962                 New GEOM.GEOM_Object, containing the result shape.
7963
7964             """
7965             # Example: see GEOM_TestOthers.py
7966             anObj = self.BoolOp.MakeFuse(theShape1, theShape2,
7967                                          checkSelfInte, rmExtraEdges)
7968             RaiseIfFailed("MakeFuse", self.BoolOp)
7969             self._autoPublish(anObj, theName, "fuse")
7970             return anObj
7971
7972         ## Perform Section boolean operation on two given shapes.
7973         #  @param theShape1 First argument for boolean operation.
7974         #  @param theShape2 Second argument for boolean operation.
7975         #  @param checkSelfInte The flag that tells if the arguments should
7976         #         be checked for self-intersection prior to the operation.
7977         #         If a self-intersection detected the operation fails.
7978         #  @param theName Object name; when specified, this parameter is used
7979         #         for result publication in the study. Otherwise, if automatic
7980         #         publication is switched on, default value is used for result name.
7981         #  @return New GEOM.GEOM_Object, containing the result shape.
7982         #
7983         #  @ref tui_section "Example 1"
7984         #  \n @ref swig_MakeCommon "Example 2"
7985         def MakeSection(self, theShape1, theShape2, checkSelfInte=False, theName=None):
7986             """
7987             Perform Section boolean operation on two given shapes.
7988
7989             Parameters:
7990                 theShape1 First argument for boolean operation.
7991                 theShape2 Second argument for boolean operation.
7992                 checkSelfInte The flag that tells if the arguments should
7993                               be checked for self-intersection prior to the operation.
7994                               If a self-intersection detected the operation fails.
7995                 theName Object name; when specified, this parameter is used
7996                         for result publication in the study. Otherwise, if automatic
7997                         publication is switched on, default value is used for result name.
7998             Returns:
7999                 New GEOM.GEOM_Object, containing the result shape.
8000
8001             """
8002             # Example: see GEOM_TestOthers.py
8003             # note: auto-publishing is done in self.MakeBoolean()
8004             return self.MakeBoolean(theShape1, theShape2, 4, checkSelfInte, theName)
8005
8006         ## Perform Fuse boolean operation on the list of shapes.
8007         #  @param theShapesList Shapes to be fused.
8008         #  @param checkSelfInte The flag that tells if the arguments should
8009         #         be checked for self-intersection prior to the operation.
8010         #  @param rmExtraEdges The flag that tells if Remove Extra Edges
8011         #         operation should be performed during the operation.
8012         #  @param theName Object name; when specified, this parameter is used
8013         #         for result publication in the study. Otherwise, if automatic
8014         #         publication is switched on, default value is used for result name.
8015         #
8016         #  @note This algorithm doesn't find all types of self-intersections.
8017         #        It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
8018         #        vertex/face and edge/face intersections. Face/face
8019         #        intersections detection is switched off as it is a
8020         #        time-consuming operation that gives an impact on performance.
8021         #        To find all self-intersections please use
8022         #        CheckSelfIntersections() method.
8023         #
8024         #  @return New GEOM.GEOM_Object, containing the result shape.
8025         #
8026         #  @ref tui_fuse "Example 1"
8027         #  \n @ref swig_MakeCommon "Example 2"
8028         @ManageTransactions("BoolOp")
8029         def MakeFuseList(self, theShapesList, checkSelfInte=False,
8030                          rmExtraEdges=False, theName=None):
8031             """
8032             Perform Fuse boolean operation on the list of shapes.
8033
8034             Parameters:
8035                 theShapesList Shapes to be fused.
8036                 checkSelfInte The flag that tells if the arguments should
8037                               be checked for self-intersection prior to
8038                               the operation.
8039                 rmExtraEdges The flag that tells if Remove Extra Edges
8040                              operation should be performed during the operation.
8041                 theName Object name; when specified, this parameter is used
8042                         for result publication in the study. Otherwise, if automatic
8043                         publication is switched on, default value is used for result name.
8044
8045             Note:
8046                     This algorithm doesn't find all types of self-intersections.
8047                     It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
8048                     vertex/face and edge/face intersections. Face/face
8049                     intersections detection is switched off as it is a
8050                     time-consuming operation that gives an impact on performance.
8051                     To find all self-intersections please use
8052                     CheckSelfIntersections() method.
8053
8054             Returns:
8055                 New GEOM.GEOM_Object, containing the result shape.
8056
8057             """
8058             # Example: see GEOM_TestOthers.py
8059             anObj = self.BoolOp.MakeFuseList(theShapesList, checkSelfInte,
8060                                              rmExtraEdges)
8061             RaiseIfFailed("MakeFuseList", self.BoolOp)
8062             self._autoPublish(anObj, theName, "fuse")
8063             return anObj
8064
8065         ## Perform Common boolean operation on the list of shapes.
8066         #  @param theShapesList Shapes for Common operation.
8067         #  @param checkSelfInte The flag that tells if the arguments should
8068         #         be checked for self-intersection prior to the operation.
8069         #  @param theName Object name; when specified, this parameter is used
8070         #         for result publication in the study. Otherwise, if automatic
8071         #         publication is switched on, default value is used for result name.
8072         #
8073         #  @note This algorithm doesn't find all types of self-intersections.
8074         #        It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
8075         #        vertex/face and edge/face intersections. Face/face
8076         #        intersections detection is switched off as it is a
8077         #        time-consuming operation that gives an impact on performance.
8078         #        To find all self-intersections please use
8079         #        CheckSelfIntersections() method.
8080         #
8081         #  @return New GEOM.GEOM_Object, containing the result shape.
8082         #
8083         #  @ref tui_common "Example 1"
8084         #  \n @ref swig_MakeCommon "Example 2"
8085         @ManageTransactions("BoolOp")
8086         def MakeCommonList(self, theShapesList, checkSelfInte=False, theName=None):
8087             """
8088             Perform Common boolean operation on the list of shapes.
8089
8090             Parameters:
8091                 theShapesList Shapes for Common operation.
8092                 checkSelfInte The flag that tells if the arguments should
8093                               be checked for self-intersection prior to
8094                               the operation.
8095                 theName Object name; when specified, this parameter is used
8096                         for result publication in the study. Otherwise, if automatic
8097                         publication is switched on, default value is used for result name.
8098
8099             Note:
8100                     This algorithm doesn't find all types of self-intersections.
8101                     It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
8102                     vertex/face and edge/face intersections. Face/face
8103                     intersections detection is switched off as it is a
8104                     time-consuming operation that gives an impact on performance.
8105                     To find all self-intersections please use
8106                     CheckSelfIntersections() method.
8107
8108             Returns:
8109                 New GEOM.GEOM_Object, containing the result shape.
8110
8111             """
8112             # Example: see GEOM_TestOthers.py
8113             anObj = self.BoolOp.MakeCommonList(theShapesList, checkSelfInte)
8114             RaiseIfFailed("MakeCommonList", self.BoolOp)
8115             self._autoPublish(anObj, theName, "common")
8116             return anObj
8117
8118         ## Perform Cut boolean operation on one object and the list of tools.
8119         #  @param theMainShape The object of the operation.
8120         #  @param theShapesList The list of tools of the operation.
8121         #  @param checkSelfInte The flag that tells if the arguments should
8122         #         be checked for self-intersection prior to the operation.
8123         #  @param theName Object name; when specified, this parameter is used
8124         #         for result publication in the study. Otherwise, if automatic
8125         #         publication is switched on, default value is used for result name.
8126         #
8127         #  @note This algorithm doesn't find all types of self-intersections.
8128         #        It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
8129         #        vertex/face and edge/face intersections. Face/face
8130         #        intersections detection is switched off as it is a
8131         #        time-consuming operation that gives an impact on performance.
8132         #        To find all self-intersections please use
8133         #        CheckSelfIntersections() method.
8134         #
8135         #  @return New GEOM.GEOM_Object, containing the result shape.
8136         #
8137         #  @ref tui_cut "Example 1"
8138         #  \n @ref swig_MakeCommon "Example 2"
8139         @ManageTransactions("BoolOp")
8140         def MakeCutList(self, theMainShape, theShapesList, checkSelfInte=False, theName=None):
8141             """
8142             Perform Cut boolean operation on one object and the list of tools.
8143
8144             Parameters:
8145                 theMainShape The object of the operation.
8146                 theShapesList The list of tools of the operation.
8147                 checkSelfInte The flag that tells if the arguments should
8148                               be checked for self-intersection prior to
8149                               the operation.
8150                 theName Object name; when specified, this parameter is used
8151                         for result publication in the study. Otherwise, if automatic
8152                         publication is switched on, default value is used for result name.
8153
8154             Note:
8155                     This algorithm doesn't find all types of self-intersections.
8156                     It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
8157                     vertex/face and edge/face intersections. Face/face
8158                     intersections detection is switched off as it is a
8159                     time-consuming operation that gives an impact on performance.
8160                     To find all self-intersections please use
8161                     CheckSelfIntersections() method.
8162
8163             Returns:
8164                 New GEOM.GEOM_Object, containing the result shape.
8165
8166             """
8167             # Example: see GEOM_TestOthers.py
8168             anObj = self.BoolOp.MakeCutList(theMainShape, theShapesList, checkSelfInte)
8169             RaiseIfFailed("MakeCutList", self.BoolOp)
8170             self._autoPublish(anObj, theName, "cut")
8171             return anObj
8172
8173         # end of l3_boolean
8174         ## @}
8175
8176         ## @addtogroup l3_basic_op
8177         ## @{
8178
8179         ## Perform partition operation.
8180         #  @param ListShapes Shapes to be intersected.
8181         #  @param ListTools Shapes to intersect theShapes.
8182         #  @param Limit Type of resulting shapes (see ShapeType()).\n
8183         #         If this parameter is set to -1 ("Auto"), most appropriate shape limit
8184         #         type will be detected automatically.
8185         #  @param KeepNonlimitShapes if this parameter == 0, then only shapes of
8186         #                             target type (equal to Limit) are kept in the result,
8187         #                             else standalone shapes of lower dimension
8188         #                             are kept also (if they exist).
8189         #
8190         #  @param theName Object name; when specified, this parameter is used
8191         #         for result publication in the study. Otherwise, if automatic
8192         #         publication is switched on, default value is used for result name.
8193         #
8194         #  @note Each compound from ListShapes and ListTools will be exploded
8195         #        in order to avoid possible intersection between shapes from this compound.
8196         #
8197         #  After implementation new version of PartitionAlgo (October 2006)
8198         #  other parameters are ignored by current functionality. They are kept
8199         #  in this function only for support old versions.
8200         #      @param ListKeepInside Shapes, outside which the results will be deleted.
8201         #         Each shape from theKeepInside must belong to theShapes also.
8202         #      @param ListRemoveInside Shapes, inside which the results will be deleted.
8203         #         Each shape from theRemoveInside must belong to theShapes also.
8204         #      @param RemoveWebs If TRUE, perform Glue 3D algorithm.
8205         #      @param ListMaterials Material indices for each shape. Make sense,
8206         #         only if theRemoveWebs is TRUE.
8207         #
8208         #  @return New GEOM.GEOM_Object, containing the result shapes.
8209         #
8210         #  @ref tui_partition "Example"
8211         @ManageTransactions("BoolOp")
8212         def MakePartition(self, ListShapes, ListTools=[], ListKeepInside=[], ListRemoveInside=[],
8213                           Limit=ShapeType["AUTO"], RemoveWebs=0, ListMaterials=[],
8214                           KeepNonlimitShapes=0, theName=None):
8215             """
8216             Perform partition operation.
8217
8218             Parameters:
8219                 ListShapes Shapes to be intersected.
8220                 ListTools Shapes to intersect theShapes.
8221                 Limit Type of resulting shapes (see geompy.ShapeType)
8222                       If this parameter is set to -1 ("Auto"), most appropriate shape limit
8223                       type will be detected automatically.
8224                 KeepNonlimitShapes if this parameter == 0, then only shapes of
8225                                     target type (equal to Limit) are kept in the result,
8226                                     else standalone shapes of lower dimension
8227                                     are kept also (if they exist).
8228
8229                 theName Object name; when specified, this parameter is used
8230                         for result publication in the study. Otherwise, if automatic
8231                         publication is switched on, default value is used for result name.
8232             Note:
8233                     Each compound from ListShapes and ListTools will be exploded
8234                     in order to avoid possible intersection between shapes from
8235                     this compound.
8236
8237             After implementation new version of PartitionAlgo (October 2006) other
8238             parameters are ignored by current functionality. They are kept in this
8239             function only for support old versions.
8240
8241             Ignored parameters:
8242                 ListKeepInside Shapes, outside which the results will be deleted.
8243                                Each shape from theKeepInside must belong to theShapes also.
8244                 ListRemoveInside Shapes, inside which the results will be deleted.
8245                                  Each shape from theRemoveInside must belong to theShapes also.
8246                 RemoveWebs If TRUE, perform Glue 3D algorithm.
8247                 ListMaterials Material indices for each shape. Make sense, only if theRemoveWebs is TRUE.
8248
8249             Returns:
8250                 New GEOM.GEOM_Object, containing the result shapes.
8251             """
8252             # Example: see GEOM_TestAll.py
8253             if Limit == self.ShapeType["AUTO"]:
8254                 # automatic detection of the most appropriate shape limit type
8255                 lim = GEOM.SHAPE
8256                 for s in ListShapes: lim = min(lim, s.GetMaxShapeType())
8257                 Limit = EnumToLong(lim)
8258                 pass
8259             anObj = self.BoolOp.MakePartition(ListShapes, ListTools,
8260                                               ListKeepInside, ListRemoveInside,
8261                                               Limit, RemoveWebs, ListMaterials,
8262                                               KeepNonlimitShapes);
8263             RaiseIfFailed("MakePartition", self.BoolOp)
8264             self._autoPublish(anObj, theName, "partition")
8265             return anObj
8266
8267         ## Perform partition operation.
8268         #  This method may be useful if it is needed to make a partition for
8269         #  compound contains nonintersected shapes. Performance will be better
8270         #  since intersection between shapes from compound is not performed.
8271         #
8272         #  Description of all parameters as in previous method MakePartition().
8273         #  One additional parameter is provided:
8274         #  @param checkSelfInte The flag that tells if the arguments should
8275         #         be checked for self-intersection prior to the operation.
8276         #
8277         #  @note This algorithm doesn't find all types of self-intersections.
8278         #        It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
8279         #        vertex/face and edge/face intersections. Face/face
8280         #        intersections detection is switched off as it is a
8281         #        time-consuming operation that gives an impact on performance.
8282         #        To find all self-intersections please use
8283         #        CheckSelfIntersections() method.
8284         #
8285         #  @note Passed compounds (via ListShapes or via ListTools)
8286         #           have to consist of nonintersecting shapes.
8287         #
8288         #  @return New GEOM.GEOM_Object, containing the result shapes.
8289         #
8290         #  @ref swig_todo "Example"
8291         @ManageTransactions("BoolOp")
8292         def MakePartitionNonSelfIntersectedShape(self, ListShapes, ListTools=[],
8293                                                  ListKeepInside=[], ListRemoveInside=[],
8294                                                  Limit=ShapeType["AUTO"], RemoveWebs=0,
8295                                                  ListMaterials=[], KeepNonlimitShapes=0,
8296                                                  checkSelfInte=False, theName=None):
8297             """
8298             Perform partition operation.
8299             This method may be useful if it is needed to make a partition for
8300             compound contains nonintersected shapes. Performance will be better
8301             since intersection between shapes from compound is not performed.
8302
8303             Parameters:
8304                 Description of all parameters as in method geompy.MakePartition.
8305                 One additional parameter is provided:
8306                 checkSelfInte The flag that tells if the arguments should
8307                               be checked for self-intersection prior to
8308                               the operation.
8309
8310             Note:
8311                     This algorithm doesn't find all types of self-intersections.
8312                     It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
8313                     vertex/face and edge/face intersections. Face/face
8314                     intersections detection is switched off as it is a
8315                     time-consuming operation that gives an impact on performance.
8316                     To find all self-intersections please use
8317                     CheckSelfIntersections() method.
8318
8319             NOTE:
8320                 Passed compounds (via ListShapes or via ListTools)
8321                 have to consist of nonintersecting shapes.
8322
8323             Returns:
8324                 New GEOM.GEOM_Object, containing the result shapes.
8325             """
8326             if Limit == self.ShapeType["AUTO"]:
8327                 # automatic detection of the most appropriate shape limit type
8328                 lim = GEOM.SHAPE
8329                 for s in ListShapes: lim = min(lim, s.GetMaxShapeType())
8330                 Limit = EnumToLong(lim)
8331                 pass
8332             anObj = self.BoolOp.MakePartitionNonSelfIntersectedShape(ListShapes, ListTools,
8333                                                                      ListKeepInside, ListRemoveInside,
8334                                                                      Limit, RemoveWebs, ListMaterials,
8335                                                                      KeepNonlimitShapes, checkSelfInte);
8336             RaiseIfFailed("MakePartitionNonSelfIntersectedShape", self.BoolOp)
8337             self._autoPublish(anObj, theName, "partition")
8338             return anObj
8339
8340         ## See method MakePartition() for more information.
8341         #
8342         #  @ref tui_partition "Example 1"
8343         #  \n @ref swig_Partition "Example 2"
8344         def Partition(self, ListShapes, ListTools=[], ListKeepInside=[], ListRemoveInside=[],
8345                       Limit=ShapeType["AUTO"], RemoveWebs=0, ListMaterials=[],
8346                       KeepNonlimitShapes=0, theName=None):
8347             """
8348             See method geompy.MakePartition for more information.
8349             """
8350             # Example: see GEOM_TestOthers.py
8351             # note: auto-publishing is done in self.MakePartition()
8352             anObj = self.MakePartition(ListShapes, ListTools,
8353                                        ListKeepInside, ListRemoveInside,
8354                                        Limit, RemoveWebs, ListMaterials,
8355                                        KeepNonlimitShapes, theName);
8356             return anObj
8357
8358         ## Perform partition of the Shape with the Plane
8359         #  @param theShape Shape to be intersected.
8360         #  @param thePlane Tool shape, to intersect theShape.
8361         #  @param theName Object name; when specified, this parameter is used
8362         #         for result publication in the study. Otherwise, if automatic
8363         #         publication is switched on, default value is used for result name.
8364         #
8365         #  @return New GEOM.GEOM_Object, containing the result shape.
8366         #
8367         #  @note This operation is a shortcut to the more general @ref MakePartition
8368         #  operation, where @a theShape specifies single "object" (shape being partitioned)
8369         #  and @a thePlane specifies single "tool" (intersector shape). Other parameters of
8370         #  @ref MakePartition operation have default values:
8371         #  - @a Limit: GEOM::SHAPE (shape limit corresponds to the type of @a theShape)
8372         #  - @a KeepNonlimitShapes: 0
8373         #  - @a KeepInside, @a RemoveInside, @a RemoveWebs,
8374         #    @a Materials (obsolete parameters): empty
8375         #
8376         #  @note I.e. the following two operations are equivalent:
8377         #  @code
8378         #  Result = geompy.MakeHalfPartition(Object, Plane)
8379         #  Result = geompy.MakePartition([Object], [Plane])
8380         #  @endcode
8381         #
8382         #  @sa MakePartition, MakePartitionNonSelfIntersectedShape
8383         #
8384         #  @ref tui_partition "Example"
8385         @ManageTransactions("BoolOp")
8386         def MakeHalfPartition(self, theShape, thePlane, theName=None):
8387             """
8388             Perform partition of the Shape with the Plane
8389
8390             Parameters:
8391                 theShape Shape to be intersected.
8392                 thePlane Tool shape, to intersect theShape.
8393                 theName Object name; when specified, this parameter is used
8394                         for result publication in the study. Otherwise, if automatic
8395                         publication is switched on, default value is used for result name.
8396
8397             Returns:
8398                 New GEOM.GEOM_Object, containing the result shape.
8399          
8400             Note: This operation is a shortcut to the more general MakePartition
8401             operation, where theShape specifies single "object" (shape being partitioned)
8402             and thePlane specifies single "tool" (intersector shape). Other parameters of
8403             MakePartition operation have default values:
8404             - Limit: GEOM::SHAPE (shape limit corresponds to the type of theShape)
8405             - KeepNonlimitShapes: 0
8406             - KeepInside, RemoveInside, RemoveWebs, Materials (obsolete parameters): empty
8407          
8408             I.e. the following two operations are equivalent:
8409               Result = geompy.MakeHalfPartition(Object, Plane)
8410               Result = geompy.MakePartition([Object], [Plane])
8411             """
8412             # Example: see GEOM_TestAll.py
8413             anObj = self.BoolOp.MakeHalfPartition(theShape, thePlane)
8414             RaiseIfFailed("MakeHalfPartition", self.BoolOp)
8415             self._autoPublish(anObj, theName, "partition")
8416             return anObj
8417
8418         # end of l3_basic_op
8419         ## @}
8420
8421         ## @addtogroup l3_transform
8422         ## @{
8423
8424         ## Translate the given object along the vector, specified
8425         #  by its end points.
8426         #  @param theObject The object to be translated.
8427         #  @param thePoint1 Start point of translation vector.
8428         #  @param thePoint2 End point of translation vector.
8429         #  @param theCopy Flag used to translate object itself or create a copy.
8430         #  @return Translated @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
8431         #  new GEOM.GEOM_Object, containing the translated object if @a theCopy flag is @c True.
8432         @ManageTransactions("TrsfOp")
8433         def TranslateTwoPoints(self, theObject, thePoint1, thePoint2, theCopy=False):
8434             """
8435             Translate the given object along the vector, specified by its end points.
8436
8437             Parameters:
8438                 theObject The object to be translated.
8439                 thePoint1 Start point of translation vector.
8440                 thePoint2 End point of translation vector.
8441                 theCopy Flag used to translate object itself or create a copy.
8442
8443             Returns:
8444                 Translated theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
8445                 new GEOM.GEOM_Object, containing the translated object if theCopy flag is True.
8446             """
8447             if theCopy:
8448                 anObj = self.TrsfOp.TranslateTwoPointsCopy(theObject, thePoint1, thePoint2)
8449             else:
8450                 anObj = self.TrsfOp.TranslateTwoPoints(theObject, thePoint1, thePoint2)
8451             RaiseIfFailed("TranslateTwoPoints", self.TrsfOp)
8452             return anObj
8453
8454         ## Translate the given object along the vector, specified
8455         #  by its end points, creating its copy before the translation.
8456         #  @param theObject The object to be translated.
8457         #  @param thePoint1 Start point of translation vector.
8458         #  @param thePoint2 End point of translation vector.
8459         #  @param theName Object name; when specified, this parameter is used
8460         #         for result publication in the study. Otherwise, if automatic
8461         #         publication is switched on, default value is used for result name.
8462         #
8463         #  @return New GEOM.GEOM_Object, containing the translated object.
8464         #
8465         #  @ref tui_translation "Example 1"
8466         #  \n @ref swig_MakeTranslationTwoPoints "Example 2"
8467         @ManageTransactions("TrsfOp")
8468         def MakeTranslationTwoPoints(self, theObject, thePoint1, thePoint2, theName=None):
8469             """
8470             Translate the given object along the vector, specified
8471             by its end points, creating its copy before the translation.
8472
8473             Parameters:
8474                 theObject The object to be translated.
8475                 thePoint1 Start point of translation vector.
8476                 thePoint2 End point of translation vector.
8477                 theName Object name; when specified, this parameter is used
8478                         for result publication in the study. Otherwise, if automatic
8479                         publication is switched on, default value is used for result name.
8480
8481             Returns:
8482                 New GEOM.GEOM_Object, containing the translated object.
8483             """
8484             # Example: see GEOM_TestAll.py
8485             anObj = self.TrsfOp.TranslateTwoPointsCopy(theObject, thePoint1, thePoint2)
8486             RaiseIfFailed("TranslateTwoPointsCopy", self.TrsfOp)
8487             self._autoPublish(anObj, theName, "translated")
8488             return anObj
8489
8490         ## Translate the given object along the vector, specified by its components.
8491         #  @param theObject The object to be translated.
8492         #  @param theDX,theDY,theDZ Components of translation vector.
8493         #  @param theCopy Flag used to translate object itself or create a copy.
8494         #  @return Translated @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
8495         #  new GEOM.GEOM_Object, containing the translated object if @a theCopy flag is @c True.
8496         #
8497         #  @ref tui_translation "Example"
8498         @ManageTransactions("TrsfOp")
8499         def TranslateDXDYDZ(self, theObject, theDX, theDY, theDZ, theCopy=False):
8500             """
8501             Translate the given object along the vector, specified by its components.
8502
8503             Parameters:
8504                 theObject The object to be translated.
8505                 theDX,theDY,theDZ Components of translation vector.
8506                 theCopy Flag used to translate object itself or create a copy.
8507
8508             Returns:
8509                 Translated theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
8510                 new GEOM.GEOM_Object, containing the translated object if theCopy flag is True.
8511             """
8512             # Example: see GEOM_TestAll.py
8513             theDX, theDY, theDZ, Parameters = ParseParameters(theDX, theDY, theDZ)
8514             if theCopy:
8515                 anObj = self.TrsfOp.TranslateDXDYDZCopy(theObject, theDX, theDY, theDZ)
8516             else:
8517                 anObj = self.TrsfOp.TranslateDXDYDZ(theObject, theDX, theDY, theDZ)
8518             anObj.SetParameters(Parameters)
8519             RaiseIfFailed("TranslateDXDYDZ", self.TrsfOp)
8520             return anObj
8521
8522         ## Translate the given object along the vector, specified
8523         #  by its components, creating its copy before the translation.
8524         #  @param theObject The object to be translated.
8525         #  @param theDX,theDY,theDZ Components of translation vector.
8526         #  @param theName Object name; when specified, this parameter is used
8527         #         for result publication in the study. Otherwise, if automatic
8528         #         publication is switched on, default value is used for result name.
8529         #
8530         #  @return New GEOM.GEOM_Object, containing the translated object.
8531         #
8532         #  @ref tui_translation "Example"
8533         @ManageTransactions("TrsfOp")
8534         def MakeTranslation(self,theObject, theDX, theDY, theDZ, theName=None):
8535             """
8536             Translate the given object along the vector, specified
8537             by its components, creating its copy before the translation.
8538
8539             Parameters:
8540                 theObject The object to be translated.
8541                 theDX,theDY,theDZ Components of translation vector.
8542                 theName Object name; when specified, this parameter is used
8543                         for result publication in the study. Otherwise, if automatic
8544                         publication is switched on, default value is used for result name.
8545
8546             Returns:
8547                 New GEOM.GEOM_Object, containing the translated object.
8548             """
8549             # Example: see GEOM_TestAll.py
8550             theDX, theDY, theDZ, Parameters = ParseParameters(theDX, theDY, theDZ)
8551             anObj = self.TrsfOp.TranslateDXDYDZCopy(theObject, theDX, theDY, theDZ)
8552             anObj.SetParameters(Parameters)
8553             RaiseIfFailed("TranslateDXDYDZ", self.TrsfOp)
8554             self._autoPublish(anObj, theName, "translated")
8555             return anObj
8556
8557         ## Translate the given object along the given vector.
8558         #  @param theObject The object to be translated.
8559         #  @param theVector The translation vector.
8560         #  @param theCopy Flag used to translate object itself or create a copy.
8561         #  @return Translated @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
8562         #  new GEOM.GEOM_Object, containing the translated object if @a theCopy flag is @c True.
8563         @ManageTransactions("TrsfOp")
8564         def TranslateVector(self, theObject, theVector, theCopy=False):
8565             """
8566             Translate the given object along the given vector.
8567
8568             Parameters:
8569                 theObject The object to be translated.
8570                 theVector The translation vector.
8571                 theCopy Flag used to translate object itself or create a copy.
8572
8573             Returns:
8574                 Translated theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
8575                 new GEOM.GEOM_Object, containing the translated object if theCopy flag is True.
8576             """
8577             if theCopy:
8578                 anObj = self.TrsfOp.TranslateVectorCopy(theObject, theVector)
8579             else:
8580                 anObj = self.TrsfOp.TranslateVector(theObject, theVector)
8581             RaiseIfFailed("TranslateVector", self.TrsfOp)
8582             return anObj
8583
8584         ## Translate the given object along the given vector,
8585         #  creating its copy before the translation.
8586         #  @param theObject The object to be translated.
8587         #  @param theVector The translation vector.
8588         #  @param theName Object name; when specified, this parameter is used
8589         #         for result publication in the study. Otherwise, if automatic
8590         #         publication is switched on, default value is used for result name.
8591         #
8592         #  @return New GEOM.GEOM_Object, containing the translated object.
8593         #
8594         #  @ref tui_translation "Example"
8595         @ManageTransactions("TrsfOp")
8596         def MakeTranslationVector(self, theObject, theVector, theName=None):
8597             """
8598             Translate the given object along the given vector,
8599             creating its copy before the translation.
8600
8601             Parameters:
8602                 theObject The object to be translated.
8603                 theVector The translation vector.
8604                 theName Object name; when specified, this parameter is used
8605                         for result publication in the study. Otherwise, if automatic
8606                         publication is switched on, default value is used for result name.
8607
8608             Returns:
8609                 New GEOM.GEOM_Object, containing the translated object.
8610             """
8611             # Example: see GEOM_TestAll.py
8612             anObj = self.TrsfOp.TranslateVectorCopy(theObject, theVector)
8613             RaiseIfFailed("TranslateVectorCopy", self.TrsfOp)
8614             self._autoPublish(anObj, theName, "translated")
8615             return anObj
8616
8617         ## Translate the given object along the given vector on given distance.
8618         #  @param theObject The object to be translated.
8619         #  @param theVector The translation vector.
8620         #  @param theDistance The translation distance.
8621         #  @param theCopy Flag used to translate object itself or create a copy.
8622         #  @return Translated @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
8623         #  new GEOM.GEOM_Object, containing the translated object if @a theCopy flag is @c True.
8624         #
8625         #  @ref tui_translation "Example"
8626         @ManageTransactions("TrsfOp")
8627         def TranslateVectorDistance(self, theObject, theVector, theDistance, theCopy=False):
8628             """
8629             Translate the given object along the given vector on given distance.
8630
8631             Parameters:
8632                 theObject The object to be translated.
8633                 theVector The translation vector.
8634                 theDistance The translation distance.
8635                 theCopy Flag used to translate object itself or create a copy.
8636
8637             Returns:
8638                 Translated theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
8639                 new GEOM.GEOM_Object, containing the translated object if theCopy flag is True.
8640             """
8641             # Example: see GEOM_TestAll.py
8642             theDistance,Parameters = ParseParameters(theDistance)
8643             anObj = self.TrsfOp.TranslateVectorDistance(theObject, theVector, theDistance, theCopy)
8644             RaiseIfFailed("TranslateVectorDistance", self.TrsfOp)
8645             anObj.SetParameters(Parameters)
8646             return anObj
8647
8648         ## Translate the given object along the given vector on given distance,
8649         #  creating its copy before the translation.
8650         #  @param theObject The object to be translated.
8651         #  @param theVector The translation vector.
8652         #  @param theDistance The translation distance.
8653         #  @param theName Object name; when specified, this parameter is used
8654         #         for result publication in the study. Otherwise, if automatic
8655         #         publication is switched on, default value is used for result name.
8656         #
8657         #  @return New GEOM.GEOM_Object, containing the translated object.
8658         #
8659         #  @ref tui_translation "Example"
8660         @ManageTransactions("TrsfOp")
8661         def MakeTranslationVectorDistance(self, theObject, theVector, theDistance, theName=None):
8662             """
8663             Translate the given object along the given vector on given distance,
8664             creating its copy before the translation.
8665
8666             Parameters:
8667                 theObject The object to be translated.
8668                 theVector The translation vector.
8669                 theDistance The translation distance.
8670                 theName Object name; when specified, this parameter is used
8671                         for result publication in the study. Otherwise, if automatic
8672                         publication is switched on, default value is used for result name.
8673
8674             Returns:
8675                 New GEOM.GEOM_Object, containing the translated object.
8676             """
8677             # Example: see GEOM_TestAll.py
8678             theDistance,Parameters = ParseParameters(theDistance)
8679             anObj = self.TrsfOp.TranslateVectorDistance(theObject, theVector, theDistance, 1)
8680             RaiseIfFailed("TranslateVectorDistance", self.TrsfOp)
8681             anObj.SetParameters(Parameters)
8682             self._autoPublish(anObj, theName, "translated")
8683             return anObj
8684
8685         ## Rotate the given object around the given axis on the given angle.
8686         #  @param theObject The object to be rotated.
8687         #  @param theAxis Rotation axis.
8688         #  @param theAngle Rotation angle in radians.
8689         #  @param theCopy Flag used to rotate object itself or create a copy.
8690         #
8691         #  @return Rotated @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
8692         #  new GEOM.GEOM_Object, containing the rotated object if @a theCopy flag is @c True.
8693         #
8694         #  @ref tui_rotation "Example"
8695         @ManageTransactions("TrsfOp")
8696         def Rotate(self, theObject, theAxis, theAngle, theCopy=False):
8697             """
8698             Rotate the given object around the given axis on the given angle.
8699
8700             Parameters:
8701                 theObject The object to be rotated.
8702                 theAxis Rotation axis.
8703                 theAngle Rotation angle in radians.
8704                 theCopy Flag used to rotate object itself or create a copy.
8705
8706             Returns:
8707                 Rotated theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
8708                 new GEOM.GEOM_Object, containing the rotated object if theCopy flag is True.
8709             """
8710             # Example: see GEOM_TestAll.py
8711             flag = False
8712             if isinstance(theAngle,str):
8713                 flag = True
8714             theAngle, Parameters = ParseParameters(theAngle)
8715             if flag:
8716                 theAngle = theAngle*math.pi/180.0
8717             if theCopy:
8718                 anObj = self.TrsfOp.RotateCopy(theObject, theAxis, theAngle)
8719             else:
8720                 anObj = self.TrsfOp.Rotate(theObject, theAxis, theAngle)
8721             RaiseIfFailed("Rotate", self.TrsfOp)
8722             anObj.SetParameters(Parameters)
8723             return anObj
8724
8725         ## Rotate the given object around the given axis
8726         #  on the given angle, creating its copy before the rotation.
8727         #  @param theObject The object to be rotated.
8728         #  @param theAxis Rotation axis.
8729         #  @param theAngle Rotation angle in radians.
8730         #  @param theName Object name; when specified, this parameter is used
8731         #         for result publication in the study. Otherwise, if automatic
8732         #         publication is switched on, default value is used for result name.
8733         #
8734         #  @return New GEOM.GEOM_Object, containing the rotated object.
8735         #
8736         #  @ref tui_rotation "Example"
8737         @ManageTransactions("TrsfOp")
8738         def MakeRotation(self, theObject, theAxis, theAngle, theName=None):
8739             """
8740             Rotate the given object around the given axis
8741             on the given angle, creating its copy before the rotatation.
8742
8743             Parameters:
8744                 theObject The object to be rotated.
8745                 theAxis Rotation axis.
8746                 theAngle Rotation angle in radians.
8747                 theName Object name; when specified, this parameter is used
8748                         for result publication in the study. Otherwise, if automatic
8749                         publication is switched on, default value is used for result name.
8750
8751             Returns:
8752                 New GEOM.GEOM_Object, containing the rotated object.
8753             """
8754             # Example: see GEOM_TestAll.py
8755             flag = False
8756             if isinstance(theAngle,str):
8757                 flag = True
8758             theAngle, Parameters = ParseParameters(theAngle)
8759             if flag:
8760                 theAngle = theAngle*math.pi/180.0
8761             anObj = self.TrsfOp.RotateCopy(theObject, theAxis, theAngle)
8762             RaiseIfFailed("RotateCopy", self.TrsfOp)
8763             anObj.SetParameters(Parameters)
8764             self._autoPublish(anObj, theName, "rotated")
8765             return anObj
8766
8767         ## Rotate given object around vector perpendicular to plane
8768         #  containing three points.
8769         #  @param theObject The object to be rotated.
8770         #  @param theCentPoint central point the axis is the vector perpendicular to the plane
8771         #  containing the three points.
8772         #  @param thePoint1,thePoint2 points in a perpendicular plane of the axis.
8773         #  @param theCopy Flag used to rotate object itself or create a copy.
8774         #  @return Rotated @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
8775         #  new GEOM.GEOM_Object, containing the rotated object if @a theCopy flag is @c True.
8776         @ManageTransactions("TrsfOp")
8777         def RotateThreePoints(self, theObject, theCentPoint, thePoint1, thePoint2, theCopy=False):
8778             """
8779             Rotate given object around vector perpendicular to plane
8780             containing three points.
8781
8782             Parameters:
8783                 theObject The object to be rotated.
8784                 theCentPoint central point  the axis is the vector perpendicular to the plane
8785                              containing the three points.
8786                 thePoint1,thePoint2 points in a perpendicular plane of the axis.
8787                 theCopy Flag used to rotate object itself or create a copy.
8788
8789             Returns:
8790                 Rotated theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
8791                 new GEOM.GEOM_Object, containing the rotated object if theCopy flag is True.
8792             """
8793             if theCopy:
8794                 anObj = self.TrsfOp.RotateThreePointsCopy(theObject, theCentPoint, thePoint1, thePoint2)
8795             else:
8796                 anObj = self.TrsfOp.RotateThreePoints(theObject, theCentPoint, thePoint1, thePoint2)
8797             RaiseIfFailed("RotateThreePoints", self.TrsfOp)
8798             return anObj
8799
8800         ## Rotate given object around vector perpendicular to plane
8801         #  containing three points, creating its copy before the rotatation.
8802         #  @param theObject The object to be rotated.
8803         #  @param theCentPoint central point the axis is the vector perpendicular to the plane
8804         #  containing the three points.
8805         #  @param thePoint1,thePoint2 in a perpendicular plane of the axis.
8806         #  @param theName Object name; when specified, this parameter is used
8807         #         for result publication in the study. Otherwise, if automatic
8808         #         publication is switched on, default value is used for result name.
8809         #
8810         #  @return New GEOM.GEOM_Object, containing the rotated object.
8811         #
8812         #  @ref tui_rotation "Example"
8813         @ManageTransactions("TrsfOp")
8814         def MakeRotationThreePoints(self, theObject, theCentPoint, thePoint1, thePoint2, theName=None):
8815             """
8816             Rotate given object around vector perpendicular to plane
8817             containing three points, creating its copy before the rotatation.
8818
8819             Parameters:
8820                 theObject The object to be rotated.
8821                 theCentPoint central point  the axis is the vector perpendicular to the plane
8822                              containing the three points.
8823                 thePoint1,thePoint2  in a perpendicular plane of the axis.
8824                 theName Object name; when specified, this parameter is used
8825                         for result publication in the study. Otherwise, if automatic
8826                         publication is switched on, default value is used for result name.
8827
8828             Returns:
8829                 New GEOM.GEOM_Object, containing the rotated object.
8830             """
8831             # Example: see GEOM_TestAll.py
8832             anObj = self.TrsfOp.RotateThreePointsCopy(theObject, theCentPoint, thePoint1, thePoint2)
8833             RaiseIfFailed("RotateThreePointsCopy", self.TrsfOp)
8834             self._autoPublish(anObj, theName, "rotated")
8835             return anObj
8836
8837         ## Scale the given object by the specified factor.
8838         #  @param theObject The object to be scaled.
8839         #  @param thePoint Center point for scaling.
8840         #                  Passing None for it means scaling relatively the origin of global CS.
8841         #  @param theFactor Scaling factor value.
8842         #  @param theCopy Flag used to scale object itself or create a copy.
8843         #  @return Scaled @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
8844         #  new GEOM.GEOM_Object, containing the scaled object if @a theCopy flag is @c True.
8845         @ManageTransactions("TrsfOp")
8846         def Scale(self, theObject, thePoint, theFactor, theCopy=False):
8847             """
8848             Scale the given object by the specified factor.
8849
8850             Parameters:
8851                 theObject The object to be scaled.
8852                 thePoint Center point for scaling.
8853                          Passing None for it means scaling relatively the origin of global CS.
8854                 theFactor Scaling factor value.
8855                 theCopy Flag used to scale object itself or create a copy.
8856
8857             Returns:
8858                 Scaled theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
8859                 new GEOM.GEOM_Object, containing the scaled object if theCopy flag is True.
8860             """
8861             # Example: see GEOM_TestAll.py
8862             theFactor, Parameters = ParseParameters(theFactor)
8863             if theCopy:
8864                 anObj = self.TrsfOp.ScaleShapeCopy(theObject, thePoint, theFactor)
8865             else:
8866                 anObj = self.TrsfOp.ScaleShape(theObject, thePoint, theFactor)
8867             RaiseIfFailed("Scale", self.TrsfOp)
8868             anObj.SetParameters(Parameters)
8869             return anObj
8870
8871         ## Scale the given object by the factor, creating its copy before the scaling.
8872         #  @param theObject The object to be scaled.
8873         #  @param thePoint Center point for scaling.
8874         #                  Passing None for it means scaling relatively the origin of global CS.
8875         #  @param theFactor Scaling factor value.
8876         #  @param theName Object name; when specified, this parameter is used
8877         #         for result publication in the study. Otherwise, if automatic
8878         #         publication is switched on, default value is used for result name.
8879         #
8880         #  @return New GEOM.GEOM_Object, containing the scaled shape.
8881         #
8882         #  @ref tui_scale "Example"
8883         @ManageTransactions("TrsfOp")
8884         def MakeScaleTransform(self, theObject, thePoint, theFactor, theName=None):
8885             """
8886             Scale the given object by the factor, creating its copy before the scaling.
8887
8888             Parameters:
8889                 theObject The object to be scaled.
8890                 thePoint Center point for scaling.
8891                          Passing None for it means scaling relatively the origin of global CS.
8892                 theFactor Scaling factor value.
8893                 theName Object name; when specified, this parameter is used
8894                         for result publication in the study. Otherwise, if automatic
8895                         publication is switched on, default value is used for result name.
8896
8897             Returns:
8898                 New GEOM.GEOM_Object, containing the scaled shape.
8899             """
8900             # Example: see GEOM_TestAll.py
8901             theFactor, Parameters = ParseParameters(theFactor)
8902             anObj = self.TrsfOp.ScaleShapeCopy(theObject, thePoint, theFactor)
8903             RaiseIfFailed("ScaleShapeCopy", self.TrsfOp)
8904             anObj.SetParameters(Parameters)
8905             self._autoPublish(anObj, theName, "scaled")
8906             return anObj
8907
8908         ## Scale the given object by different factors along coordinate axes.
8909         #  @param theObject The object to be scaled.
8910         #  @param thePoint Center point for scaling.
8911         #                  Passing None for it means scaling relatively the origin of global CS.
8912         #  @param theFactorX,theFactorY,theFactorZ Scaling factors along each axis.
8913         #  @param theCopy Flag used to scale object itself or create a copy.
8914         #  @return Scaled @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
8915         #  new GEOM.GEOM_Object, containing the scaled object if @a theCopy flag is @c True.
8916         @ManageTransactions("TrsfOp")
8917         def ScaleAlongAxes(self, theObject, thePoint, theFactorX, theFactorY, theFactorZ, theCopy=False):
8918             """
8919             Scale the given object by different factors along coordinate axes.
8920
8921             Parameters:
8922                 theObject The object to be scaled.
8923                 thePoint Center point for scaling.
8924                             Passing None for it means scaling relatively the origin of global CS.
8925                 theFactorX,theFactorY,theFactorZ Scaling factors along each axis.
8926                 theCopy Flag used to scale object itself or create a copy.
8927
8928             Returns:
8929                 Scaled theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
8930                 new GEOM.GEOM_Object, containing the scaled object if theCopy flag is True.
8931             """
8932             # Example: see GEOM_TestAll.py
8933             theFactorX, theFactorY, theFactorZ, Parameters = ParseParameters(theFactorX, theFactorY, theFactorZ)
8934             if theCopy:
8935                 anObj = self.TrsfOp.ScaleShapeAlongAxesCopy(theObject, thePoint,
8936                                                             theFactorX, theFactorY, theFactorZ)
8937             else:
8938                 anObj = self.TrsfOp.ScaleShapeAlongAxes(theObject, thePoint,
8939                                                         theFactorX, theFactorY, theFactorZ)
8940             RaiseIfFailed("ScaleAlongAxes", self.TrsfOp)
8941             anObj.SetParameters(Parameters)
8942             return anObj
8943
8944         ## Scale the given object by different factors along coordinate axes,
8945         #  creating its copy before the scaling.
8946         #  @param theObject The object to be scaled.
8947         #  @param thePoint Center point for scaling.
8948         #                  Passing None for it means scaling relatively the origin of global CS.
8949         #  @param theFactorX,theFactorY,theFactorZ Scaling factors along each axis.
8950         #  @param theName Object name; when specified, this parameter is used
8951         #         for result publication in the study. Otherwise, if automatic
8952         #         publication is switched on, default value is used for result name.
8953         #
8954         #  @return New GEOM.GEOM_Object, containing the scaled shape.
8955         #
8956         #  @ref swig_scale "Example"
8957         @ManageTransactions("TrsfOp")
8958         def MakeScaleAlongAxes(self, theObject, thePoint, theFactorX, theFactorY, theFactorZ, theName=None):
8959             """
8960             Scale the given object by different factors along coordinate axes,
8961             creating its copy before the scaling.
8962
8963             Parameters:
8964                 theObject The object to be scaled.
8965                 thePoint Center point for scaling.
8966                             Passing None for it means scaling relatively the origin of global CS.
8967                 theFactorX,theFactorY,theFactorZ Scaling factors along each axis.
8968                 theName Object name; when specified, this parameter is used
8969                         for result publication in the study. Otherwise, if automatic
8970                         publication is switched on, default value is used for result name.
8971
8972             Returns:
8973                 New GEOM.GEOM_Object, containing the scaled shape.
8974             """
8975             # Example: see GEOM_TestAll.py
8976             theFactorX, theFactorY, theFactorZ, Parameters = ParseParameters(theFactorX, theFactorY, theFactorZ)
8977             anObj = self.TrsfOp.ScaleShapeAlongAxesCopy(theObject, thePoint,
8978                                                         theFactorX, theFactorY, theFactorZ)
8979             RaiseIfFailed("MakeScaleAlongAxes", self.TrsfOp)
8980             anObj.SetParameters(Parameters)
8981             self._autoPublish(anObj, theName, "scaled")
8982             return anObj
8983
8984         ## Mirror an object relatively the given plane.
8985         #  @param theObject The object to be mirrored.
8986         #  @param thePlane Plane of symmetry.
8987         #  @param theCopy Flag used to mirror object itself or create a copy.
8988         #  @return Mirrored @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
8989         #  new GEOM.GEOM_Object, containing the mirrored object if @a theCopy flag is @c True.
8990         @ManageTransactions("TrsfOp")
8991         def MirrorByPlane(self, theObject, thePlane, theCopy=False):
8992             """
8993             Mirror an object relatively the given plane.
8994
8995             Parameters:
8996                 theObject The object to be mirrored.
8997                 thePlane Plane of symmetry.
8998                 theCopy Flag used to mirror object itself or create a copy.
8999
9000             Returns:
9001                 Mirrored theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
9002                 new GEOM.GEOM_Object, containing the mirrored object if theCopy flag is True.
9003             """
9004             if theCopy:
9005                 anObj = self.TrsfOp.MirrorPlaneCopy(theObject, thePlane)
9006             else:
9007                 anObj = self.TrsfOp.MirrorPlane(theObject, thePlane)
9008             RaiseIfFailed("MirrorByPlane", self.TrsfOp)
9009             return anObj
9010
9011         ## Create an object, symmetrical
9012         #  to the given one relatively the given plane.
9013         #  @param theObject The object to be mirrored.
9014         #  @param thePlane Plane of symmetry.
9015         #  @param theName Object name; when specified, this parameter is used
9016         #         for result publication in the study. Otherwise, if automatic
9017         #         publication is switched on, default value is used for result name.
9018         #
9019         #  @return New GEOM.GEOM_Object, containing the mirrored shape.
9020         #
9021         #  @ref tui_mirror "Example"
9022         @ManageTransactions("TrsfOp")
9023         def MakeMirrorByPlane(self, theObject, thePlane, theName=None):
9024             """
9025             Create an object, symmetrical to the given one relatively the given plane.
9026
9027             Parameters:
9028                 theObject The object to be mirrored.
9029                 thePlane Plane of symmetry.
9030                 theName Object name; when specified, this parameter is used
9031                         for result publication in the study. Otherwise, if automatic
9032                         publication is switched on, default value is used for result name.
9033
9034             Returns:
9035                 New GEOM.GEOM_Object, containing the mirrored shape.
9036             """
9037             # Example: see GEOM_TestAll.py
9038             anObj = self.TrsfOp.MirrorPlaneCopy(theObject, thePlane)
9039             RaiseIfFailed("MirrorPlaneCopy", self.TrsfOp)
9040             self._autoPublish(anObj, theName, "mirrored")
9041             return anObj
9042
9043         ## Mirror an object relatively the given axis.
9044         #  @param theObject The object to be mirrored.
9045         #  @param theAxis Axis of symmetry.
9046         #  @param theCopy Flag used to mirror object itself or create a copy.
9047         #  @return Mirrored @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
9048         #  new GEOM.GEOM_Object, containing the mirrored object if @a theCopy flag is @c True.
9049         @ManageTransactions("TrsfOp")
9050         def MirrorByAxis(self, theObject, theAxis, theCopy=False):
9051             """
9052             Mirror an object relatively the given axis.
9053
9054             Parameters:
9055                 theObject The object to be mirrored.
9056                 theAxis Axis of symmetry.
9057                 theCopy Flag used to mirror object itself or create a copy.
9058
9059             Returns:
9060                 Mirrored theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
9061                 new GEOM.GEOM_Object, containing the mirrored object if theCopy flag is True.
9062             """
9063             if theCopy:
9064                 anObj = self.TrsfOp.MirrorAxisCopy(theObject, theAxis)
9065             else:
9066                 anObj = self.TrsfOp.MirrorAxis(theObject, theAxis)
9067             RaiseIfFailed("MirrorByAxis", self.TrsfOp)
9068             return anObj
9069
9070         ## Create an object, symmetrical
9071         #  to the given one relatively the given axis.
9072         #  @param theObject The object to be mirrored.
9073         #  @param theAxis Axis of symmetry.
9074         #  @param theName Object name; when specified, this parameter is used
9075         #         for result publication in the study. Otherwise, if automatic
9076         #         publication is switched on, default value is used for result name.
9077         #
9078         #  @return New GEOM.GEOM_Object, containing the mirrored shape.
9079         #
9080         #  @ref tui_mirror "Example"
9081         @ManageTransactions("TrsfOp")
9082         def MakeMirrorByAxis(self, theObject, theAxis, theName=None):
9083             """
9084             Create an object, symmetrical to the given one relatively the given axis.
9085
9086             Parameters:
9087                 theObject The object to be mirrored.
9088                 theAxis Axis of symmetry.
9089                 theName Object name; when specified, this parameter is used
9090                         for result publication in the study. Otherwise, if automatic
9091                         publication is switched on, default value is used for result name.
9092
9093             Returns:
9094                 New GEOM.GEOM_Object, containing the mirrored shape.
9095             """
9096             # Example: see GEOM_TestAll.py
9097             anObj = self.TrsfOp.MirrorAxisCopy(theObject, theAxis)
9098             RaiseIfFailed("MirrorAxisCopy", self.TrsfOp)
9099             self._autoPublish(anObj, theName, "mirrored")
9100             return anObj
9101
9102         ## Mirror an object relatively the given point.
9103         #  @param theObject The object to be mirrored.
9104         #  @param thePoint Point of symmetry.
9105         #  @param theCopy Flag used to mirror object itself or create a copy.
9106         #  @return Mirrored @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
9107         #  new GEOM.GEOM_Object, containing the mirrored object if @a theCopy flag is @c True.
9108         @ManageTransactions("TrsfOp")
9109         def MirrorByPoint(self, theObject, thePoint, theCopy=False):
9110             """
9111             Mirror an object relatively the given point.
9112
9113             Parameters:
9114                 theObject The object to be mirrored.
9115                 thePoint Point of symmetry.
9116                 theCopy Flag used to mirror object itself or create a copy.
9117
9118             Returns:
9119                 Mirrored theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
9120                 new GEOM.GEOM_Object, containing the mirrored object if theCopy flag is True.
9121             """
9122             # Example: see GEOM_TestAll.py
9123             if theCopy:
9124                 anObj = self.TrsfOp.MirrorPointCopy(theObject, thePoint)
9125             else:
9126                 anObj = self.TrsfOp.MirrorPoint(theObject, thePoint)
9127             RaiseIfFailed("MirrorByPoint", self.TrsfOp)
9128             return anObj
9129
9130         ## Create an object, symmetrical
9131         #  to the given one relatively the given point.
9132         #  @param theObject The object to be mirrored.
9133         #  @param thePoint Point of symmetry.
9134         #  @param theName Object name; when specified, this parameter is used
9135         #         for result publication in the study. Otherwise, if automatic
9136         #         publication is switched on, default value is used for result name.
9137         #
9138         #  @return New GEOM.GEOM_Object, containing the mirrored shape.
9139         #
9140         #  @ref tui_mirror "Example"
9141         @ManageTransactions("TrsfOp")
9142         def MakeMirrorByPoint(self, theObject, thePoint, theName=None):
9143             """
9144             Create an object, symmetrical
9145             to the given one relatively the given point.
9146
9147             Parameters:
9148                 theObject The object to be mirrored.
9149                 thePoint Point of symmetry.
9150                 theName Object name; when specified, this parameter is used
9151                         for result publication in the study. Otherwise, if automatic
9152                         publication is switched on, default value is used for result name.
9153
9154             Returns:
9155                 New GEOM.GEOM_Object, containing the mirrored shape.
9156             """
9157             # Example: see GEOM_TestAll.py
9158             anObj = self.TrsfOp.MirrorPointCopy(theObject, thePoint)
9159             RaiseIfFailed("MirrorPointCopy", self.TrsfOp)
9160             self._autoPublish(anObj, theName, "mirrored")
9161             return anObj
9162
9163         ## Modify the location of the given object.
9164         #  @param theObject The object to be displaced.
9165         #  @param theStartLCS Coordinate system to perform displacement from it.\n
9166         #                     If \a theStartLCS is NULL, displacement
9167         #                     will be performed from global CS.\n
9168         #                     If \a theObject itself is used as \a theStartLCS,
9169         #                     its location will be changed to \a theEndLCS.
9170         #  @param theEndLCS Coordinate system to perform displacement to it.
9171         #  @param theCopy Flag used to displace object itself or create a copy.
9172         #  @return Displaced @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
9173         #  new GEOM.GEOM_Object, containing the displaced object if @a theCopy flag is @c True.
9174         @ManageTransactions("TrsfOp")
9175         def Position(self, theObject, theStartLCS, theEndLCS, theCopy=False):
9176             """
9177             Modify the Location of the given object by LCS, creating its copy before the setting.
9178
9179             Parameters:
9180                 theObject The object to be displaced.
9181                 theStartLCS Coordinate system to perform displacement from it.
9182                             If theStartLCS is NULL, displacement
9183                             will be performed from global CS.
9184                             If theObject itself is used as theStartLCS,
9185                             its location will be changed to theEndLCS.
9186                 theEndLCS Coordinate system to perform displacement to it.
9187                 theCopy Flag used to displace object itself or create a copy.
9188
9189             Returns:
9190                 Displaced theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
9191                 new GEOM.GEOM_Object, containing the displaced object if theCopy flag is True.
9192             """
9193             # Example: see GEOM_TestAll.py
9194             if theCopy:
9195                 anObj = self.TrsfOp.PositionShapeCopy(theObject, theStartLCS, theEndLCS)
9196             else:
9197                 anObj = self.TrsfOp.PositionShape(theObject, theStartLCS, theEndLCS)
9198             RaiseIfFailed("Displace", self.TrsfOp)
9199             return anObj
9200
9201         ## Modify the Location of the given object by LCS,
9202         #  creating its copy before the setting.
9203         #  @param theObject The object to be displaced.
9204         #  @param theStartLCS Coordinate system to perform displacement from it.\n
9205         #                     If \a theStartLCS is NULL, displacement
9206         #                     will be performed from global CS.\n
9207         #                     If \a theObject itself is used as \a theStartLCS,
9208         #                     its location will be changed to \a theEndLCS.
9209         #  @param theEndLCS Coordinate system to perform displacement to it.
9210         #  @param theName Object name; when specified, this parameter is used
9211         #         for result publication in the study. Otherwise, if automatic
9212         #         publication is switched on, default value is used for result name.
9213         #
9214         #  @return New GEOM.GEOM_Object, containing the displaced shape.
9215         #
9216         #  @ref tui_modify_location "Example"
9217         @ManageTransactions("TrsfOp")
9218         def MakePosition(self, theObject, theStartLCS, theEndLCS, theName=None):
9219             """
9220             Modify the Location of the given object by LCS, creating its copy before the setting.
9221
9222             Parameters:
9223                 theObject The object to be displaced.
9224                 theStartLCS Coordinate system to perform displacement from it.
9225                             If theStartLCS is NULL, displacement
9226                             will be performed from global CS.
9227                             If theObject itself is used as theStartLCS,
9228                             its location will be changed to theEndLCS.
9229                 theEndLCS Coordinate system to perform displacement to it.
9230                 theName Object name; when specified, this parameter is used
9231                         for result publication in the study. Otherwise, if automatic
9232                         publication is switched on, default value is used for result name.
9233
9234             Returns:
9235                 New GEOM.GEOM_Object, containing the displaced shape.
9236
9237             Example of usage:
9238                 # create local coordinate systems
9239                 cs1 = geompy.MakeMarker( 0, 0, 0, 1,0,0, 0,1,0)
9240                 cs2 = geompy.MakeMarker(30,40,40, 1,0,0, 0,1,0)
9241                 # modify the location of the given object
9242                 position = geompy.MakePosition(cylinder, cs1, cs2)
9243             """
9244             # Example: see GEOM_TestAll.py
9245             anObj = self.TrsfOp.PositionShapeCopy(theObject, theStartLCS, theEndLCS)
9246             RaiseIfFailed("PositionShapeCopy", self.TrsfOp)
9247             self._autoPublish(anObj, theName, "displaced")
9248             return anObj
9249
9250         ## Modify the Location of the given object by Path.
9251         #  @param  theObject The object to be displaced.
9252         #  @param  thePath Wire or Edge along that the object will be translated.
9253         #  @param  theDistance progress of Path (0 = start location, 1 = end of path location).
9254         #  @param  theCopy is to create a copy objects if true.
9255         #  @param  theReverse  0 - for usual direction, 1 - to reverse path direction.
9256         #  @return Displaced @a theObject (GEOM.GEOM_Object) if @a theCopy is @c False or
9257         #          new GEOM.GEOM_Object, containing the displaced shape if @a theCopy is @c True.
9258         #
9259         #  @ref tui_modify_location "Example"
9260         @ManageTransactions("TrsfOp")
9261         def PositionAlongPath(self,theObject, thePath, theDistance, theCopy, theReverse):
9262             """
9263             Modify the Location of the given object by Path.
9264
9265             Parameters:
9266                  theObject The object to be displaced.
9267                  thePath Wire or Edge along that the object will be translated.
9268                  theDistance progress of Path (0 = start location, 1 = end of path location).
9269                  theCopy is to create a copy objects if true.
9270                  theReverse  0 - for usual direction, 1 - to reverse path direction.
9271
9272             Returns:
9273                  Displaced theObject (GEOM.GEOM_Object) if theCopy is False or
9274                  new GEOM.GEOM_Object, containing the displaced shape if theCopy is True.
9275
9276             Example of usage:
9277                 position = geompy.PositionAlongPath(cylinder, circle, 0.75, 1, 1)
9278             """
9279             # Example: see GEOM_TestAll.py
9280             anObj = self.TrsfOp.PositionAlongPath(theObject, thePath, theDistance, theCopy, theReverse)
9281             RaiseIfFailed("PositionAlongPath", self.TrsfOp)
9282             return anObj
9283
9284         ## Modify the Location of the given object by Path, creating its copy before the operation.
9285         #  @param theObject The object to be displaced.
9286         #  @param thePath Wire or Edge along that the object will be translated.
9287         #  @param theDistance progress of Path (0 = start location, 1 = end of path location).
9288         #  @param theReverse  0 - for usual direction, 1 - to reverse path direction.
9289         #  @param theName Object name; when specified, this parameter is used
9290         #         for result publication in the study. Otherwise, if automatic
9291         #         publication is switched on, default value is used for result name.
9292         #
9293         #  @return New GEOM.GEOM_Object, containing the displaced shape.
9294         @ManageTransactions("TrsfOp")
9295         def MakePositionAlongPath(self, theObject, thePath, theDistance, theReverse, theName=None):
9296             """
9297             Modify the Location of the given object by Path, creating its copy before the operation.
9298
9299             Parameters:
9300                  theObject The object to be displaced.
9301                  thePath Wire or Edge along that the object will be translated.
9302                  theDistance progress of Path (0 = start location, 1 = end of path location).
9303                  theReverse  0 - for usual direction, 1 - to reverse path direction.
9304                  theName Object name; when specified, this parameter is used
9305                          for result publication in the study. Otherwise, if automatic
9306                          publication is switched on, default value is used for result name.
9307
9308             Returns:
9309                 New GEOM.GEOM_Object, containing the displaced shape.
9310             """
9311             # Example: see GEOM_TestAll.py
9312             anObj = self.TrsfOp.PositionAlongPath(theObject, thePath, theDistance, 1, theReverse)
9313             RaiseIfFailed("PositionAlongPath", self.TrsfOp)
9314             self._autoPublish(anObj, theName, "displaced")
9315             return anObj
9316
9317         ## Offset given shape.
9318         #  @param theObject The base object for the offset.
9319         #  @param theOffset Offset value.
9320         #  @param theCopy Flag used to offset object itself or create a copy.
9321         #  @return Modified @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
9322         #  new GEOM.GEOM_Object, containing the result of offset operation if @a theCopy flag is @c True.
9323         @ManageTransactions("TrsfOp")
9324         def Offset(self, theObject, theOffset, theCopy=False):
9325             """
9326             Offset given shape.
9327
9328             Parameters:
9329                 theObject The base object for the offset.
9330                 theOffset Offset value.
9331                 theCopy Flag used to offset object itself or create a copy.
9332
9333             Returns:
9334                 Modified theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
9335                 new GEOM.GEOM_Object, containing the result of offset operation if theCopy flag is True.
9336             """
9337             theOffset, Parameters = ParseParameters(theOffset)
9338             if theCopy:
9339                 anObj = self.TrsfOp.OffsetShapeCopy(theObject, theOffset, True)
9340             else:
9341                 anObj = self.TrsfOp.OffsetShape(theObject, theOffset, True)
9342             RaiseIfFailed("Offset", self.TrsfOp)
9343             anObj.SetParameters(Parameters)
9344             return anObj
9345
9346         ## Create new object as offset of the given one. Gap between two adjacent
9347         #  offset surfaces is filled by a pipe.
9348         #  @param theObject The base object for the offset.
9349         #  @param theOffset Offset value.
9350         #  @param theName Object name; when specified, this parameter is used
9351         #         for result publication in the study. Otherwise, if automatic
9352         #         publication is switched on, default value is used for result name.
9353         #
9354         #  @return New GEOM.GEOM_Object, containing the offset object.
9355         #
9356         #  @sa MakeOffsetIntersectionJoin
9357         #  @ref tui_offset "Example"
9358         @ManageTransactions("TrsfOp")
9359         def MakeOffset(self, theObject, theOffset, theName=None):
9360             """
9361             Create new object as offset of the given one. Gap between adjacent
9362             offset surfaces is filled by a pipe.
9363
9364             Parameters:
9365                 theObject The base object for the offset.
9366                 theOffset Offset value.
9367                 theName Object name; when specified, this parameter is used
9368                         for result publication in the study. Otherwise, if automatic
9369                         publication is switched on, default value is used for result name.
9370
9371             Returns:
9372                 New GEOM.GEOM_Object, containing the offset object.
9373
9374             Example of usage:
9375                  box = geompy.MakeBox(20, 20, 20, 200, 200, 200)
9376                  # create a new object as offset of the given object
9377                  offset = geompy.MakeOffset(box, 70.)
9378             """
9379             # Example: see GEOM_TestAll.py
9380             theOffset, Parameters = ParseParameters(theOffset)
9381             anObj = self.TrsfOp.OffsetShapeCopy( theObject, theOffset, True )
9382             RaiseIfFailed("OffsetShapeCopy", self.TrsfOp)
9383             anObj.SetParameters(Parameters)
9384             self._autoPublish(anObj, theName, "offset")
9385             return anObj
9386
9387         ## Create new object as offset of the given one. Gap between adjacent
9388         #  offset surfaces is filled by extending and intersecting them.
9389         #  @param theObject The base object for the offset.
9390         #  @param theOffset Offset value.
9391         #  @param theName Object name; when specified, this parameter is used
9392         #         for result publication in the study. Otherwise, if automatic
9393         #         publication is switched on, default value is used for result name.
9394         #
9395         #  @return New GEOM.GEOM_Object, containing the offset object.
9396         #
9397         #  @sa MakeOffset
9398         #  @ref tui_offset "Example"
9399         @ManageTransactions("TrsfOp")
9400         def MakeOffsetIntersectionJoin(self, theObject, theOffset, theName=None):
9401             """
9402             Create new object as offset of the given one. Gap between adjacent
9403             offset surfaces is filled by extending and intersecting them.
9404
9405             Parameters:
9406                 theObject The base object for the offset.
9407                 theOffset Offset value.
9408                 theName Object name; when specified, this parameter is used
9409                         for result publication in the study. Otherwise, if automatic
9410                         publication is switched on, default value is used for result name.
9411
9412             Returns:
9413                 New GEOM.GEOM_Object, containing the offset object.
9414
9415             Example of usage:
9416                  box = geompy.MakeBox(20, 20, 20, 200, 200, 200)
9417                  # create a new box extended by 70
9418                  offset = geompy.MakeOffsetIntersectionJoin(box, 70.)
9419             """
9420             # Example: see GEOM_TestAll.py
9421             theOffset, Parameters = ParseParameters( theOffset )
9422             anObj = self.TrsfOp.OffsetShapeCopy( theObject, theOffset, False )
9423             RaiseIfFailed("OffsetShapeCopy", self.TrsfOp)
9424             anObj.SetParameters(Parameters)
9425             self._autoPublish(anObj, theName, "offset")
9426             return anObj
9427
9428         ## Create new object as projection of the given one on another.
9429         #  @param theSource The source object for the projection. It can be a point, edge or wire.
9430         #         Edge and wire are acceptable if @a theTarget is a face.
9431         #  @param theTarget The target object. It can be planar or cylindrical face, edge or wire.
9432         #  @param theName Object name; when specified, this parameter is used
9433         #         for result publication in the study. Otherwise, if automatic
9434         #         publication is switched on, default value is used for result name.
9435         #
9436         #  @return New GEOM.GEOM_Object, containing the projection.
9437         #
9438         #  @ref tui_projection "Example"
9439         @ManageTransactions("TrsfOp")
9440         def MakeProjection(self, theSource, theTarget, theName=None):
9441             """
9442             Create new object as projection of the given one on another.
9443
9444             Parameters:
9445                 theSource The source object for the projection. It can be a point, edge or wire.
9446                           Edge and wire are acceptable if theTarget is a face.
9447                 theTarget The target object. It can be planar or cylindrical face, edge or wire.
9448                 theName Object name; when specified, this parameter is used
9449                         for result publication in the study. Otherwise, if automatic
9450                         publication is switched on, default value is used for result name.
9451
9452             Returns:
9453                 New GEOM.GEOM_Object, containing the projection.
9454             """
9455             # Example: see GEOM_TestAll.py
9456             anObj = self.TrsfOp.ProjectShapeCopy(theSource, theTarget)
9457             RaiseIfFailed("ProjectShapeCopy", self.TrsfOp)
9458             self._autoPublish(anObj, theName, "projection")
9459             return anObj
9460
9461         ## Create a projection of the given point on a wire or an edge.
9462         #  If there are no solutions or there are 2 or more solutions It throws an
9463         #  exception.
9464         #  @param thePoint the point to be projected.
9465         #  @param theWire the wire. The edge is accepted as well.
9466         #  @param theName Object name; when specified, this parameter is used
9467         #         for result publication in the study. Otherwise, if automatic
9468         #         publication is switched on, default value is used for result name.
9469         #
9470         #  @return [\a u, \a PointOnEdge, \a EdgeInWireIndex]
9471         #  \n \a u: The parameter of projection point on edge.
9472         #  \n \a PointOnEdge: The projection point.
9473         #  \n \a EdgeInWireIndex: The index of an edge in a wire.
9474         #
9475         #  @ref tui_projection "Example"
9476         @ManageTransactions("TrsfOp")
9477         def MakeProjectionOnWire(self, thePoint, theWire, theName=None):
9478             """
9479             Create a projection of the given point on a wire or an edge.
9480             If there are no solutions or there are 2 or more solutions It throws an
9481             exception.
9482
9483             Parameters:
9484                 thePoint the point to be projected.
9485                 theWire the wire. The edge is accepted as well.
9486                 theName Object name; when specified, this parameter is used
9487                         for result publication in the study. Otherwise, if automatic
9488                         publication is switched on, default value is used for result name.
9489
9490             Returns:
9491                 [u, PointOnEdge, EdgeInWireIndex]
9492                  u: The parameter of projection point on edge.
9493                  PointOnEdge: The projection point.
9494                  EdgeInWireIndex: The index of an edge in a wire.
9495             """
9496             # Example: see GEOM_TestAll.py
9497             anObj = self.TrsfOp.ProjectPointOnWire(thePoint, theWire)
9498             RaiseIfFailed("ProjectPointOnWire", self.TrsfOp)
9499             self._autoPublish(anObj[1], theName, "projection")
9500             return anObj
9501
9502         # -----------------------------------------------------------------------------
9503         # Patterns
9504         # -----------------------------------------------------------------------------
9505
9506         ## Translate the given object along the given vector a given number times
9507         #  @param theObject The object to be translated.
9508         #  @param theVector Direction of the translation. DX if None.
9509         #  @param theStep Distance to translate on.
9510         #  @param theNbTimes Quantity of translations to be done.
9511         #  @param theName Object name; when specified, this parameter is used
9512         #         for result publication in the study. Otherwise, if automatic
9513         #         publication is switched on, default value is used for result name.
9514         #
9515         #  @return New GEOM.GEOM_Object, containing compound of all
9516         #          the shapes, obtained after each translation.
9517         #
9518         #  @ref tui_multi_translation "Example"
9519         @ManageTransactions("TrsfOp")
9520         def MakeMultiTranslation1D(self, theObject, theVector, theStep, theNbTimes, theName=None):
9521             """
9522             Translate the given object along the given vector a given number times
9523
9524             Parameters:
9525                 theObject The object to be translated.
9526                 theVector Direction of the translation. DX if None.
9527                 theStep Distance to translate on.
9528                 theNbTimes Quantity of translations to be done.
9529                 theName Object name; when specified, this parameter is used
9530                         for result publication in the study. Otherwise, if automatic
9531                         publication is switched on, default value is used for result name.
9532
9533             Returns:
9534                 New GEOM.GEOM_Object, containing compound of all
9535                 the shapes, obtained after each translation.
9536
9537             Example of usage:
9538                 r1d = geompy.MakeMultiTranslation1D(prism, vect, 20, 4)
9539             """
9540             # Example: see GEOM_TestAll.py
9541             theStep, theNbTimes, Parameters = ParseParameters(theStep, theNbTimes)
9542             anObj = self.TrsfOp.MultiTranslate1D(theObject, theVector, theStep, theNbTimes)
9543             RaiseIfFailed("MultiTranslate1D", self.TrsfOp)
9544             anObj.SetParameters(Parameters)
9545             self._autoPublish(anObj, theName, "multitranslation")
9546             return anObj
9547
9548         ## Conseqently apply two specified translations to theObject specified number of times.
9549         #  @param theObject The object to be translated.
9550         #  @param theVector1 Direction of the first translation. DX if None.
9551         #  @param theStep1 Step of the first translation.
9552         #  @param theNbTimes1 Quantity of translations to be done along theVector1.
9553         #  @param theVector2 Direction of the second translation. DY if None.
9554         #  @param theStep2 Step of the second translation.
9555         #  @param theNbTimes2 Quantity of translations to be done along theVector2.
9556         #  @param theName Object name; when specified, this parameter is used
9557         #         for result publication in the study. Otherwise, if automatic
9558         #         publication is switched on, default value is used for result name.
9559         #
9560         #  @return New GEOM.GEOM_Object, containing compound of all
9561         #          the shapes, obtained after each translation.
9562         #
9563         #  @ref tui_multi_translation "Example"
9564         @ManageTransactions("TrsfOp")
9565         def MakeMultiTranslation2D(self, theObject, theVector1, theStep1, theNbTimes1,
9566                                    theVector2, theStep2, theNbTimes2, theName=None):
9567             """
9568             Conseqently apply two specified translations to theObject specified number of times.
9569
9570             Parameters:
9571                 theObject The object to be translated.
9572                 theVector1 Direction of the first translation. DX if None.
9573                 theStep1 Step of the first translation.
9574                 theNbTimes1 Quantity of translations to be done along theVector1.
9575                 theVector2 Direction of the second translation. DY if None.
9576                 theStep2 Step of the second translation.
9577                 theNbTimes2 Quantity of translations to be done along theVector2.
9578                 theName Object name; when specified, this parameter is used
9579                         for result publication in the study. Otherwise, if automatic
9580                         publication is switched on, default value is used for result name.
9581
9582             Returns:
9583                 New GEOM.GEOM_Object, containing compound of all
9584                 the shapes, obtained after each translation.
9585
9586             Example of usage:
9587                 tr2d = geompy.MakeMultiTranslation2D(prism, vect1, 20, 4, vect2, 80, 3)
9588             """
9589             # Example: see GEOM_TestAll.py
9590             theStep1,theNbTimes1,theStep2,theNbTimes2, Parameters = ParseParameters(theStep1,theNbTimes1,theStep2,theNbTimes2)
9591             anObj = self.TrsfOp.MultiTranslate2D(theObject, theVector1, theStep1, theNbTimes1,
9592                                                  theVector2, theStep2, theNbTimes2)
9593             RaiseIfFailed("MultiTranslate2D", self.TrsfOp)
9594             anObj.SetParameters(Parameters)
9595             self._autoPublish(anObj, theName, "multitranslation")
9596             return anObj
9597
9598         ## Rotate the given object around the given axis a given number times.
9599         #  Rotation angle will be 2*PI/theNbTimes.
9600         #  @param theObject The object to be rotated.
9601         #  @param theAxis The rotation axis. DZ if None.
9602         #  @param theNbTimes Quantity of rotations to be done.
9603         #  @param theName Object name; when specified, this parameter is used
9604         #         for result publication in the study. Otherwise, if automatic
9605         #         publication is switched on, default value is used for result name.
9606         #
9607         #  @return New GEOM.GEOM_Object, containing compound of all the
9608         #          shapes, obtained after each rotation.
9609         #
9610         #  @ref tui_multi_rotation "Example"
9611         @ManageTransactions("TrsfOp")
9612         def MultiRotate1DNbTimes (self, theObject, theAxis, theNbTimes, theName=None):
9613             """
9614             Rotate the given object around the given axis a given number times.
9615             Rotation angle will be 2*PI/theNbTimes.
9616
9617             Parameters:
9618                 theObject The object to be rotated.
9619                 theAxis The rotation axis. DZ if None.
9620                 theNbTimes Quantity of rotations to be done.
9621                 theName Object name; when specified, this parameter is used
9622                         for result publication in the study. Otherwise, if automatic
9623                         publication is switched on, default value is used for result name.
9624
9625             Returns:
9626                 New GEOM.GEOM_Object, containing compound of all the
9627                 shapes, obtained after each rotation.
9628
9629             Example of usage:
9630                 rot1d = geompy.MultiRotate1DNbTimes(prism, vect, 4)
9631             """
9632             # Example: see GEOM_TestAll.py
9633             theNbTimes, Parameters = ParseParameters(theNbTimes)
9634             anObj = self.TrsfOp.MultiRotate1D(theObject, theAxis, theNbTimes)
9635             RaiseIfFailed("MultiRotate1DNbTimes", self.TrsfOp)
9636             anObj.SetParameters(Parameters)
9637             self._autoPublish(anObj, theName, "multirotation")
9638             return anObj
9639
9640         ## Rotate the given object around the given axis
9641         #  a given number times on the given angle.
9642         #  @param theObject The object to be rotated.
9643         #  @param theAxis The rotation axis. DZ if None.
9644         #  @param theAngleStep Rotation angle in radians.
9645         #  @param theNbTimes Quantity of rotations to be done.
9646         #  @param theName Object name; when specified, this parameter is used
9647         #         for result publication in the study. Otherwise, if automatic
9648         #         publication is switched on, default value is used for result name.
9649         #
9650         #  @return New GEOM.GEOM_Object, containing compound of all the
9651         #          shapes, obtained after each rotation.
9652         #
9653         #  @ref tui_multi_rotation "Example"
9654         @ManageTransactions("TrsfOp")
9655         def MultiRotate1DByStep(self, theObject, theAxis, theAngleStep, theNbTimes, theName=None):
9656             """
9657             Rotate the given object around the given axis
9658             a given number times on the given angle.
9659
9660             Parameters:
9661                 theObject The object to be rotated.
9662                 theAxis The rotation axis. DZ if None.
9663                 theAngleStep Rotation angle in radians.
9664                 theNbTimes Quantity of rotations to be done.
9665                 theName Object name; when specified, this parameter is used
9666                         for result publication in the study. Otherwise, if automatic
9667                         publication is switched on, default value is used for result name.
9668
9669             Returns:
9670                 New GEOM.GEOM_Object, containing compound of all the
9671                 shapes, obtained after each rotation.
9672
9673             Example of usage:
9674                 rot1d = geompy.MultiRotate1DByStep(prism, vect, math.pi/4, 4)
9675             """
9676             # Example: see GEOM_TestAll.py
9677             theAngleStep, theNbTimes, Parameters = ParseParameters(theAngleStep, theNbTimes)
9678             anObj = self.TrsfOp.MultiRotate1DByStep(theObject, theAxis, theAngleStep, theNbTimes)
9679             RaiseIfFailed("MultiRotate1DByStep", self.TrsfOp)
9680             anObj.SetParameters(Parameters)
9681             self._autoPublish(anObj, theName, "multirotation")
9682             return anObj
9683
9684         ## Rotate the given object around the given axis a given
9685         #  number times and multi-translate each rotation result.
9686         #  Rotation angle will be 2*PI/theNbTimes1.
9687         #  Translation direction passes through center of gravity
9688         #  of rotated shape and its projection on the rotation axis.
9689         #  @param theObject The object to be rotated.
9690         #  @param theAxis Rotation axis. DZ if None.
9691         #  @param theNbTimes1 Quantity of rotations to be done.
9692         #  @param theRadialStep Translation distance.
9693         #  @param theNbTimes2 Quantity of translations to be done.
9694         #  @param theName Object name; when specified, this parameter is used
9695         #         for result publication in the study. Otherwise, if automatic
9696         #         publication is switched on, default value is used for result name.
9697         #
9698         #  @return New GEOM.GEOM_Object, containing compound of all the
9699         #          shapes, obtained after each transformation.
9700         #
9701         #  @ref tui_multi_rotation "Example"
9702         @ManageTransactions("TrsfOp")
9703         def MultiRotate2DNbTimes(self, theObject, theAxis, theNbTimes1, theRadialStep, theNbTimes2, theName=None):
9704             """
9705             Rotate the given object around the
9706             given axis on the given angle a given number
9707             times and multi-translate each rotation result.
9708             Translation direction passes through center of gravity
9709             of rotated shape and its projection on the rotation axis.
9710
9711             Parameters:
9712                 theObject The object to be rotated.
9713                 theAxis Rotation axis. DZ if None.
9714                 theNbTimes1 Quantity of rotations to be done.
9715                 theRadialStep Translation distance.
9716                 theNbTimes2 Quantity of translations to be done.
9717                 theName Object name; when specified, this parameter is used
9718                         for result publication in the study. Otherwise, if automatic
9719                         publication is switched on, default value is used for result name.
9720
9721             Returns:
9722                 New GEOM.GEOM_Object, containing compound of all the
9723                 shapes, obtained after each transformation.
9724
9725             Example of usage:
9726                 rot2d = geompy.MultiRotate2D(prism, vect, 60, 4, 50, 5)
9727             """
9728             # Example: see GEOM_TestAll.py
9729             theNbTimes1, theRadialStep, theNbTimes2, Parameters = ParseParameters(theNbTimes1, theRadialStep, theNbTimes2)
9730             anObj = self.TrsfOp.MultiRotate2DNbTimes(theObject, theAxis, theNbTimes1, theRadialStep, theNbTimes2)
9731             RaiseIfFailed("MultiRotate2DNbTimes", self.TrsfOp)
9732             anObj.SetParameters(Parameters)
9733             self._autoPublish(anObj, theName, "multirotation")
9734             return anObj
9735
9736         ## Rotate the given object around the
9737         #  given axis on the given angle a given number
9738         #  times and multi-translate each rotation result.
9739         #  Translation direction passes through center of gravity
9740         #  of rotated shape and its projection on the rotation axis.
9741         #  @param theObject The object to be rotated.
9742         #  @param theAxis Rotation axis. DZ if None.
9743         #  @param theAngleStep Rotation angle in radians.
9744         #  @param theNbTimes1 Quantity of rotations to be done.
9745         #  @param theRadialStep Translation distance.
9746         #  @param theNbTimes2 Quantity of translations to be done.
9747         #  @param theName Object name; when specified, this parameter is used
9748         #         for result publication in the study. Otherwise, if automatic
9749         #         publication is switched on, default value is used for result name.
9750         #
9751         #  @return New GEOM.GEOM_Object, containing compound of all the
9752         #          shapes, obtained after each transformation.
9753         #
9754         #  @ref tui_multi_rotation "Example"
9755         @ManageTransactions("TrsfOp")
9756         def MultiRotate2DByStep (self, theObject, theAxis, theAngleStep, theNbTimes1, theRadialStep, theNbTimes2, theName=None):
9757             """
9758             Rotate the given object around the
9759             given axis on the given angle a given number
9760             times and multi-translate each rotation result.
9761             Translation direction passes through center of gravity
9762             of rotated shape and its projection on the rotation axis.
9763
9764             Parameters:
9765                 theObject The object to be rotated.
9766                 theAxis Rotation axis. DZ if None.
9767                 theAngleStep Rotation angle in radians.
9768                 theNbTimes1 Quantity of rotations to be done.
9769                 theRadialStep Translation distance.
9770                 theNbTimes2 Quantity of translations to be done.
9771                 theName Object name; when specified, this parameter is used
9772                         for result publication in the study. Otherwise, if automatic
9773                         publication is switched on, default value is used for result name.
9774
9775             Returns:
9776                 New GEOM.GEOM_Object, containing compound of all the
9777                 shapes, obtained after each transformation.
9778
9779             Example of usage:
9780                 rot2d = geompy.MultiRotate2D(prism, vect, math.pi/3, 4, 50, 5)
9781             """
9782             # Example: see GEOM_TestAll.py
9783             theAngleStep, theNbTimes1, theRadialStep, theNbTimes2, Parameters = ParseParameters(theAngleStep, theNbTimes1, theRadialStep, theNbTimes2)
9784             anObj = self.TrsfOp.MultiRotate2DByStep(theObject, theAxis, theAngleStep, theNbTimes1, theRadialStep, theNbTimes2)
9785             RaiseIfFailed("MultiRotate2DByStep", self.TrsfOp)
9786             anObj.SetParameters(Parameters)
9787             self._autoPublish(anObj, theName, "multirotation")
9788             return anObj
9789
9790         ## The same, as MultiRotate1DNbTimes(), but axis is given by direction and point
9791         #
9792         #  @ref swig_MakeMultiRotation "Example"
9793         def MakeMultiRotation1DNbTimes(self, aShape, aDir, aPoint, aNbTimes, theName=None):
9794             """
9795             The same, as geompy.MultiRotate1DNbTimes, but axis is given by direction and point
9796
9797             Example of usage:
9798                 pz = geompy.MakeVertex(0, 0, 100)
9799                 vy = geompy.MakeVectorDXDYDZ(0, 100, 0)
9800                 MultiRot1D = geompy.MakeMultiRotation1DNbTimes(prism, vy, pz, 6)
9801             """
9802             # Example: see GEOM_TestOthers.py
9803             aVec = self.MakeLine(aPoint,aDir)
9804             # note: auto-publishing is done in self.MultiRotate1D()
9805             anObj = self.MultiRotate1DNbTimes(aShape, aVec, aNbTimes, theName)
9806             return anObj
9807
9808         ## The same, as MultiRotate1DByStep(), but axis is given by direction and point
9809         #
9810         #  @ref swig_MakeMultiRotation "Example"
9811         def MakeMultiRotation1DByStep(self, aShape, aDir, aPoint, anAngle, aNbTimes, theName=None):
9812             """
9813             The same, as geompy.MultiRotate1D, but axis is given by direction and point
9814
9815             Example of usage:
9816                 pz = geompy.MakeVertex(0, 0, 100)
9817                 vy = geompy.MakeVectorDXDYDZ(0, 100, 0)
9818                 MultiRot1D = geompy.MakeMultiRotation1DByStep(prism, vy, pz, math.pi/3, 6)
9819             """
9820             # Example: see GEOM_TestOthers.py
9821             aVec = self.MakeLine(aPoint,aDir)
9822             # note: auto-publishing is done in self.MultiRotate1D()
9823             anObj = self.MultiRotate1DByStep(aShape, aVec, anAngle, aNbTimes, theName)
9824             return anObj
9825
9826         ## The same, as MultiRotate2DNbTimes(), but axis is given by direction and point
9827         #
9828         #  @ref swig_MakeMultiRotation "Example"
9829         def MakeMultiRotation2DNbTimes(self, aShape, aDir, aPoint, nbtimes1, aStep, nbtimes2, theName=None):
9830             """
9831             The same, as MultiRotate2DNbTimes(), but axis is given by direction and point
9832
9833             Example of usage:
9834                 pz = geompy.MakeVertex(0, 0, 100)
9835                 vy = geompy.MakeVectorDXDYDZ(0, 100, 0)
9836                 MultiRot2D = geompy.MakeMultiRotation2DNbTimes(f12, vy, pz, 6, 30, 3)
9837             """
9838             # Example: see GEOM_TestOthers.py
9839             aVec = self.MakeLine(aPoint,aDir)
9840             # note: auto-publishing is done in self.MultiRotate2DNbTimes()
9841             anObj = self.MultiRotate2DNbTimes(aShape, aVec, nbtimes1, aStep, nbtimes2, theName)
9842             return anObj
9843
9844         ## The same, as MultiRotate2DByStep(), but axis is given by direction and point
9845         #
9846         #  @ref swig_MakeMultiRotation "Example"
9847         def MakeMultiRotation2DByStep(self, aShape, aDir, aPoint, anAngle, nbtimes1, aStep, nbtimes2, theName=None):
9848             """
9849             The same, as MultiRotate2DByStep(), but axis is given by direction and point
9850
9851             Example of usage:
9852                 pz = geompy.MakeVertex(0, 0, 100)
9853                 vy = geompy.MakeVectorDXDYDZ(0, 100, 0)
9854                 MultiRot2D = geompy.MakeMultiRotation2DByStep(f12, vy, pz, math.pi/4, 6, 30, 3)
9855             """
9856             # Example: see GEOM_TestOthers.py
9857             aVec = self.MakeLine(aPoint,aDir)
9858             # note: auto-publishing is done in self.MultiRotate2D()
9859             anObj = self.MultiRotate2DByStep(aShape, aVec, anAngle, nbtimes1, aStep, nbtimes2, theName)
9860             return anObj
9861
9862         ##
9863         #  Compute a wire or a face that represents a projection of the source
9864         #  shape onto cylinder. The cylinder's coordinate system is the same
9865         #  as the global coordinate system.
9866         #
9867         #  @param theObject The object to be projected. It can be either
9868         #         a planar wire or a face.
9869         #  @param theRadius The radius of the cylinder.
9870         #  @param theStartAngle The starting angle in radians from
9871         #         the cylinder's X axis around Z axis. The angle from which
9872         #         the projection is started.
9873         #  @param theAngleLength The projection length angle in radians.
9874         #         The angle in which to project the total length of the wire.
9875         #         If it is negative the projection is not scaled and natural
9876         #         wire length is kept for the projection.
9877         #  @param theAngleRotation The desired angle in radians between
9878         #         the tangent vector to the first curve at the first point of
9879         #         the theObject's projection in 2D space and U-direction of
9880         #         cylinder's 2D space.
9881         #  @param theName Object name; when specified, this parameter is used
9882         #         for result publication in the study. Otherwise, if automatic
9883         #         publication is switched on, default value is used for result name.
9884         #
9885         #  @return New GEOM.GEOM_Object, containing the result shape. The result
9886         #         represents a wire or a face that represents a projection of
9887         #         the source shape onto a cylinder.
9888         #
9889         #  @ref tui_projection "Example"
9890         def MakeProjectionOnCylinder (self, theObject, theRadius,
9891                                       theStartAngle=0.0, theAngleLength=-1.0,
9892                                       theAngleRotation=0.0,
9893                                       theName=None):
9894             """
9895             Compute a wire or a face that represents a projection of the source
9896             shape onto cylinder. The cylinder's coordinate system is the same
9897             as the global coordinate system.
9898
9899             Parameters:
9900                 theObject The object to be projected. It can be either
9901                         a planar wire or a face.
9902                 theRadius The radius of the cylinder.
9903                 theStartAngle The starting angle in radians from the cylinder's X axis
9904                         around Z axis. The angle from which the projection is started.
9905                 theAngleLength The projection length angle in radians. The angle in which
9906                         to project the total length of the wire. If it is negative the
9907                         projection is not scaled and natural wire length is kept for
9908                         the projection.
9909                 theAngleRotation The desired angle in radians between
9910                         the tangent vector to the first curve at the first
9911                         point of the theObject's projection in 2D space and
9912                         U-direction of cylinder's 2D space.
9913                 theName Object name; when specified, this parameter is used
9914                         for result publication in the study. Otherwise, if automatic
9915                         publication is switched on, default value is used for result name.
9916
9917             Returns:
9918                 New GEOM.GEOM_Object, containing the result shape. The result
9919                 represents a wire or a face that represents a projection of
9920                 the source shape onto a cylinder.
9921             """
9922             # Example: see GEOM_TestAll.py
9923             flagStartAngle = False
9924             if isinstance(theStartAngle,str):
9925                 flagStartAngle = True
9926             flagAngleLength = False
9927             if isinstance(theAngleLength,str):
9928                 flagAngleLength = True
9929             flagAngleRotation = False
9930             if isinstance(theAngleRotation,str):
9931                 flagAngleRotation = True
9932             theRadius, theStartAngle, theAngleLength, theAngleRotation, Parameters = ParseParameters(
9933               theRadius, theStartAngle, theAngleLength, theAngleRotation)
9934             if flagStartAngle:
9935                 theStartAngle = theStartAngle*math.pi/180.
9936             if flagAngleLength:
9937                 theAngleLength = theAngleLength*math.pi/180.
9938             if flagAngleRotation:
9939                 theAngleRotation = theAngleRotation*math.pi/180.
9940             anObj = self.TrsfOp.MakeProjectionOnCylinder(theObject, theRadius,
9941                 theStartAngle, theAngleLength, theAngleRotation)
9942             RaiseIfFailed("MakeProjectionOnCylinder", self.TrsfOp)
9943             anObj.SetParameters(Parameters)
9944             self._autoPublish(anObj, theName, "projection")
9945             return anObj
9946
9947         # end of l3_transform
9948         ## @}
9949
9950         ## @addtogroup l3_transform_d
9951         ## @{
9952
9953         ## Deprecated method. Use MultiRotate1DNbTimes instead.
9954         def MultiRotate1D(self, theObject, theAxis, theNbTimes, theName=None):
9955             """
9956             Deprecated method. Use MultiRotate1DNbTimes instead.
9957             """
9958             print("The method MultiRotate1D is DEPRECATED. Use MultiRotate1DNbTimes instead.")
9959             return self.MultiRotate1DNbTimes(theObject, theAxis, theNbTimes, theName)
9960
9961         ## The same, as MultiRotate2DByStep(), but theAngle is in degrees.
9962         #  This method is DEPRECATED. Use MultiRotate2DByStep() instead.
9963         @ManageTransactions("TrsfOp")
9964         def MultiRotate2D(self, theObject, theAxis, theAngle, theNbTimes1, theStep, theNbTimes2, theName=None):
9965             """
9966             The same, as MultiRotate2DByStep(), but theAngle is in degrees.
9967             This method is DEPRECATED. Use MultiRotate2DByStep() instead.
9968
9969             Example of usage:
9970                 rot2d = geompy.MultiRotate2D(prism, vect, 60, 4, 50, 5)
9971             """
9972             print("The method MultiRotate2D is DEPRECATED. Use MultiRotate2DByStep instead.")
9973             theAngle, theNbTimes1, theStep, theNbTimes2, Parameters = ParseParameters(theAngle, theNbTimes1, theStep, theNbTimes2)
9974             anObj = self.TrsfOp.MultiRotate2D(theObject, theAxis, theAngle, theNbTimes1, theStep, theNbTimes2)
9975             RaiseIfFailed("MultiRotate2D", self.TrsfOp)
9976             anObj.SetParameters(Parameters)
9977             self._autoPublish(anObj, theName, "multirotation")
9978             return anObj
9979
9980         ## The same, as MultiRotate1D(), but axis is given by direction and point
9981         #  This method is DEPRECATED. Use MakeMultiRotation1DNbTimes instead.
9982         def MakeMultiRotation1D(self, aShape, aDir, aPoint, aNbTimes, theName=None):
9983             """
9984             The same, as geompy.MultiRotate1D, but axis is given by direction and point.
9985             This method is DEPRECATED. Use MakeMultiRotation1DNbTimes instead.
9986
9987             Example of usage:
9988                 pz = geompy.MakeVertex(0, 0, 100)
9989                 vy = geompy.MakeVectorDXDYDZ(0, 100, 0)
9990                 MultiRot1D = geompy.MakeMultiRotation1D(prism, vy, pz, 6)
9991             """
9992             print("The method MakeMultiRotation1D is DEPRECATED. Use MakeMultiRotation1DNbTimes instead.")
9993             aVec = self.MakeLine(aPoint,aDir)
9994             # note: auto-publishing is done in self.MultiRotate1D()
9995             anObj = self.MultiRotate1D(aShape, aVec, aNbTimes, theName)
9996             return anObj
9997
9998         ## The same, as MultiRotate2D(), but axis is given by direction and point
9999         #  This method is DEPRECATED. Use MakeMultiRotation2DByStep instead.
10000         def MakeMultiRotation2D(self, aShape, aDir, aPoint, anAngle, nbtimes1, aStep, nbtimes2, theName=None):
10001             """
10002             The same, as MultiRotate2D(), but axis is given by direction and point
10003             This method is DEPRECATED. Use MakeMultiRotation2DByStep instead.
10004
10005             Example of usage:
10006                 pz = geompy.MakeVertex(0, 0, 100)
10007                 vy = geompy.MakeVectorDXDYDZ(0, 100, 0)
10008                 MultiRot2D = geompy.MakeMultiRotation2D(f12, vy, pz, 45, 6, 30, 3)
10009             """
10010             print("The method MakeMultiRotation2D is DEPRECATED. Use MakeMultiRotation2DByStep instead.")
10011             aVec = self.MakeLine(aPoint,aDir)
10012             # note: auto-publishing is done in self.MultiRotate2D()
10013             anObj = self.MultiRotate2D(aShape, aVec, anAngle, nbtimes1, aStep, nbtimes2, theName)
10014             return anObj
10015
10016         # end of l3_transform_d
10017         ## @}
10018
10019         ## @addtogroup l3_local
10020         ## @{
10021
10022         ## Perform a fillet on all edges of the given shape.
10023         #  @param theShape Shape, to perform fillet on.
10024         #  @param theR Fillet radius.
10025         #  @param theName Object name; when specified, this parameter is used
10026         #         for result publication in the study. Otherwise, if automatic
10027         #         publication is switched on, default value is used for result name.
10028         #
10029         #  @return New GEOM.GEOM_Object, containing the result shape.
10030         #
10031         #  @ref tui_fillet "Example 1"
10032         #  \n @ref swig_MakeFilletAll "Example 2"
10033         @ManageTransactions("LocalOp")
10034         def MakeFilletAll(self, theShape, theR, theName=None):
10035             """
10036             Perform a fillet on all edges of the given shape.
10037
10038             Parameters:
10039                 theShape Shape, to perform fillet on.
10040                 theR Fillet radius.
10041                 theName Object name; when specified, this parameter is used
10042                         for result publication in the study. Otherwise, if automatic
10043                         publication is switched on, default value is used for result name.
10044
10045             Returns:
10046                 New GEOM.GEOM_Object, containing the result shape.
10047
10048             Example of usage:
10049                filletall = geompy.MakeFilletAll(prism, 10.)
10050             """
10051             # Example: see GEOM_TestOthers.py
10052             theR,Parameters = ParseParameters(theR)
10053             anObj = self.LocalOp.MakeFilletAll(theShape, theR)
10054             RaiseIfFailed("MakeFilletAll", self.LocalOp)
10055             anObj.SetParameters(Parameters)
10056             self._autoPublish(anObj, theName, "fillet")
10057             return anObj
10058
10059         ## Perform a fillet on the specified edges/faces of the given shape
10060         #  @param theShape Shape, to perform fillet on.
10061         #  @param theR Fillet radius.
10062         #  @param theShapeType Type of shapes in <VAR>theListShapes</VAR> (see ShapeType())
10063         #  @param theListShapes Global indices of edges/faces to perform fillet on.
10064         #  @param theName Object name; when specified, this parameter is used
10065         #         for result publication in the study. Otherwise, if automatic
10066         #         publication is switched on, default value is used for result name.
10067         #
10068         #  @note Global index of sub-shape can be obtained, using method GetSubShapeID().
10069         #
10070         #  @return New GEOM.GEOM_Object, containing the result shape.
10071         #
10072         #  @ref tui_fillet "Example"
10073         @ManageTransactions("LocalOp")
10074         def MakeFillet(self, theShape, theR, theShapeType, theListShapes, theName=None):
10075             """
10076             Perform a fillet on the specified edges/faces of the given shape
10077
10078             Parameters:
10079                 theShape Shape, to perform fillet on.
10080                 theR Fillet radius.
10081                 theShapeType Type of shapes in theListShapes (see geompy.ShapeTypes)
10082                 theListShapes Global indices of edges/faces to perform fillet on.
10083                 theName Object name; when specified, this parameter is used
10084                         for result publication in the study. Otherwise, if automatic
10085                         publication is switched on, default value is used for result name.
10086
10087             Note:
10088                 Global index of sub-shape can be obtained, using method geompy.GetSubShapeID
10089
10090             Returns:
10091                 New GEOM.GEOM_Object, containing the result shape.
10092
10093             Example of usage:
10094                 # get the list of IDs (IDList) for the fillet
10095                 prism_edges = geompy.SubShapeAllSortedCentres(prism, geompy.ShapeType["EDGE"])
10096                 IDlist_e = []
10097                 IDlist_e.append(geompy.GetSubShapeID(prism, prism_edges[0]))
10098                 IDlist_e.append(geompy.GetSubShapeID(prism, prism_edges[1]))
10099                 IDlist_e.append(geompy.GetSubShapeID(prism, prism_edges[2]))
10100                 # make a fillet on the specified edges of the given shape
10101                 fillet = geompy.MakeFillet(prism, 10., geompy.ShapeType["EDGE"], IDlist_e)
10102             """
10103             # Example: see GEOM_TestAll.py
10104             theR,Parameters = ParseParameters(theR)
10105             anObj = None
10106             if theShapeType == self.ShapeType["EDGE"]:
10107                 anObj = self.LocalOp.MakeFilletEdges(theShape, theR, theListShapes)
10108                 RaiseIfFailed("MakeFilletEdges", self.LocalOp)
10109             else:
10110                 anObj = self.LocalOp.MakeFilletFaces(theShape, theR, theListShapes)
10111                 RaiseIfFailed("MakeFilletFaces", self.LocalOp)
10112             anObj.SetParameters(Parameters)
10113             self._autoPublish(anObj, theName, "fillet")
10114             return anObj
10115
10116         ## The same that MakeFillet() but with two Fillet Radius R1 and R2
10117         @ManageTransactions("LocalOp")
10118         def MakeFilletR1R2(self, theShape, theR1, theR2, theShapeType, theListShapes, theName=None):
10119             """
10120             The same that geompy.MakeFillet but with two Fillet Radius R1 and R2
10121
10122             Example of usage:
10123                 # get the list of IDs (IDList) for the fillet
10124                 prism_edges = geompy.SubShapeAllSortedCentres(prism, geompy.ShapeType["EDGE"])
10125                 IDlist_e = []
10126                 IDlist_e.append(geompy.GetSubShapeID(prism, prism_edges[0]))
10127                 IDlist_e.append(geompy.GetSubShapeID(prism, prism_edges[1]))
10128                 IDlist_e.append(geompy.GetSubShapeID(prism, prism_edges[2]))
10129                 # make a fillet on the specified edges of the given shape
10130                 fillet = geompy.MakeFillet(prism, 10., 15., geompy.ShapeType["EDGE"], IDlist_e)
10131             """
10132             theR1,theR2,Parameters = ParseParameters(theR1,theR2)
10133             anObj = None
10134             if theShapeType == self.ShapeType["EDGE"]:
10135                 anObj = self.LocalOp.MakeFilletEdgesR1R2(theShape, theR1, theR2, theListShapes)
10136                 RaiseIfFailed("MakeFilletEdgesR1R2", self.LocalOp)
10137             else:
10138                 anObj = self.LocalOp.MakeFilletFacesR1R2(theShape, theR1, theR2, theListShapes)
10139                 RaiseIfFailed("MakeFilletFacesR1R2", self.LocalOp)
10140             anObj.SetParameters(Parameters)
10141             self._autoPublish(anObj, theName, "fillet")
10142             return anObj
10143
10144         ## Perform a fillet on the specified edges of the given shape
10145         #  @param theShape  Wire Shape to perform fillet on.
10146         #  @param theR  Fillet radius.
10147         #  @param theListOfVertexes Global indices of vertexes to perform fillet on.
10148         #    \note Global index of sub-shape can be obtained, using method GetSubShapeID()
10149         #    \note The list of vertices could be empty,
10150         #          in this case fillet will done done at all vertices in wire
10151         #  @param doIgnoreSecantVertices If FALSE, fillet radius is always limited
10152         #         by the length of the edges, nearest to the fillet vertex.
10153         #         But sometimes the next edge is C1 continuous with the one, nearest to
10154         #         the fillet point, and such two (or more) edges can be united to allow
10155         #         bigger radius. Set this flag to TRUE to allow collinear edges union,
10156         #         thus ignoring the secant vertex (vertices).
10157         #  @param theName Object name; when specified, this parameter is used
10158         #         for result publication in the study. Otherwise, if automatic
10159         #         publication is switched on, default value is used for result name.
10160         #
10161         #  @return New GEOM.GEOM_Object, containing the result shape.
10162         #
10163         #  @ref tui_fillet2d "Example"
10164         @ManageTransactions("LocalOp")
10165         def MakeFillet1D(self, theShape, theR, theListOfVertexes, doIgnoreSecantVertices = True, theName=None):
10166             """
10167             Perform a fillet on the specified edges of the given shape
10168
10169             Parameters:
10170                 theShape  Wire Shape to perform fillet on.
10171                 theR  Fillet radius.
10172                 theListOfVertexes Global indices of vertexes to perform fillet on.
10173                 doIgnoreSecantVertices If FALSE, fillet radius is always limited
10174                     by the length of the edges, nearest to the fillet vertex.
10175                     But sometimes the next edge is C1 continuous with the one, nearest to
10176                     the fillet point, and such two (or more) edges can be united to allow
10177                     bigger radius. Set this flag to TRUE to allow collinear edges union,
10178                     thus ignoring the secant vertex (vertices).
10179                 theName Object name; when specified, this parameter is used
10180                         for result publication in the study. Otherwise, if automatic
10181                         publication is switched on, default value is used for result name.
10182             Note:
10183                 Global index of sub-shape can be obtained, using method geompy.GetSubShapeID
10184
10185                 The list of vertices could be empty,in this case fillet will done done at all vertices in wire
10186
10187             Returns:
10188                 New GEOM.GEOM_Object, containing the result shape.
10189
10190             Example of usage:
10191                 # create wire
10192                 Wire_1 = geompy.MakeWire([Edge_12, Edge_7, Edge_11, Edge_6, Edge_1,Edge_4])
10193                 # make fillet at given wire vertices with giver radius
10194                 Fillet_1D_1 = geompy.MakeFillet1D(Wire_1, 55, [3, 4, 6, 8, 10])
10195             """
10196             # Example: see GEOM_TestAll.py
10197             theR,doIgnoreSecantVertices,Parameters = ParseParameters(theR,doIgnoreSecantVertices)
10198             anObj = self.LocalOp.MakeFillet1D(theShape, theR, theListOfVertexes, doIgnoreSecantVertices)
10199             RaiseIfFailed("MakeFillet1D", self.LocalOp)
10200             anObj.SetParameters(Parameters)
10201             self._autoPublish(anObj, theName, "fillet")
10202             return anObj
10203
10204         ## Perform a fillet at the specified vertices of the given face/shell.
10205         #  @param theShape Face or Shell shape to perform fillet on.
10206         #  @param theR Fillet radius.
10207         #  @param theListOfVertexes Global indices of vertexes to perform fillet on.
10208         #  @param theName Object name; when specified, this parameter is used
10209         #         for result publication in the study. Otherwise, if automatic
10210         #         publication is switched on, default value is used for result name.
10211         #
10212         #  @note Global index of sub-shape can be obtained, using method GetSubShapeID().
10213         #
10214         #  @return New GEOM.GEOM_Object, containing the result shape.
10215         #
10216         #  @ref tui_fillet2d "Example"
10217         @ManageTransactions("LocalOp")
10218         def MakeFillet2D(self, theShape, theR, theListOfVertexes, theName=None):
10219             """
10220             Perform a fillet at the specified vertices of the given face/shell.
10221
10222             Parameters:
10223                 theShape  Face or Shell shape to perform fillet on.
10224                 theR  Fillet radius.
10225                 theListOfVertexes Global indices of vertexes to perform fillet on.
10226                 theName Object name; when specified, this parameter is used
10227                         for result publication in the study. Otherwise, if automatic
10228                         publication is switched on, default value is used for result name.
10229             Note:
10230                 Global index of sub-shape can be obtained, using method geompy.GetSubShapeID
10231
10232             Returns:
10233                 New GEOM.GEOM_Object, containing the result shape.
10234
10235             Example of usage:
10236                 face = geompy.MakeFaceHW(100, 100, 1)
10237                 fillet2d = geompy.MakeFillet2D(face, 30, [7, 9])
10238             """
10239             # Example: see GEOM_TestAll.py
10240             theR,Parameters = ParseParameters(theR)
10241             anObj = self.LocalOp.MakeFillet2D(theShape, theR, theListOfVertexes)
10242             RaiseIfFailed("MakeFillet2D", self.LocalOp)
10243             anObj.SetParameters(Parameters)
10244             self._autoPublish(anObj, theName, "fillet")
10245             return anObj
10246
10247         ## Perform a symmetric chamfer on all edges of the given shape.
10248         #  @param theShape Shape, to perform chamfer on.
10249         #  @param theD Chamfer size along each face.
10250         #  @param theName Object name; when specified, this parameter is used
10251         #         for result publication in the study. Otherwise, if automatic
10252         #         publication is switched on, default value is used for result name.
10253         #
10254         #  @return New GEOM.GEOM_Object, containing the result shape.
10255         #
10256         #  @ref tui_chamfer "Example 1"
10257         #  \n @ref swig_MakeChamferAll "Example 2"
10258         @ManageTransactions("LocalOp")
10259         def MakeChamferAll(self, theShape, theD, theName=None):
10260             """
10261             Perform a symmetric chamfer on all edges of the given shape.
10262
10263             Parameters:
10264                 theShape Shape, to perform chamfer on.
10265                 theD Chamfer size along each face.
10266                 theName Object name; when specified, this parameter is used
10267                         for result publication in the study. Otherwise, if automatic
10268                         publication is switched on, default value is used for result name.
10269
10270             Returns:
10271                 New GEOM.GEOM_Object, containing the result shape.
10272
10273             Example of usage:
10274                 chamfer_all = geompy.MakeChamferAll(prism, 10.)
10275             """
10276             # Example: see GEOM_TestOthers.py
10277             theD,Parameters = ParseParameters(theD)
10278             anObj = self.LocalOp.MakeChamferAll(theShape, theD)
10279             RaiseIfFailed("MakeChamferAll", self.LocalOp)
10280             anObj.SetParameters(Parameters)
10281             self._autoPublish(anObj, theName, "chamfer")
10282             return anObj
10283
10284         ## Perform a chamfer on edges, common to the specified faces,
10285         #  with distance D1 on the Face1
10286         #  @param theShape Shape, to perform chamfer on.
10287         #  @param theD1 Chamfer size along \a theFace1.
10288         #  @param theD2 Chamfer size along \a theFace2.
10289         #  @param theFace1,theFace2 Global indices of two faces of \a theShape.
10290         #  @param theName Object name; when specified, this parameter is used
10291         #         for result publication in the study. Otherwise, if automatic
10292         #         publication is switched on, default value is used for result name.
10293         #
10294         #  @note Global index of sub-shape can be obtained, using method GetSubShapeID().
10295         #
10296         #  @return New GEOM.GEOM_Object, containing the result shape.
10297         #
10298         #  @ref tui_chamfer "Example"
10299         @ManageTransactions("LocalOp")
10300         def MakeChamferEdge(self, theShape, theD1, theD2, theFace1, theFace2, theName=None):
10301             """
10302             Perform a chamfer on edges, common to the specified faces,
10303             with distance D1 on the Face1
10304
10305             Parameters:
10306                 theShape Shape, to perform chamfer on.
10307                 theD1 Chamfer size along theFace1.
10308                 theD2 Chamfer size along theFace2.
10309                 theFace1,theFace2 Global indices of two faces of theShape.
10310                 theName Object name; when specified, this parameter is used
10311                         for result publication in the study. Otherwise, if automatic
10312                         publication is switched on, default value is used for result name.
10313
10314             Note:
10315                 Global index of sub-shape can be obtained, using method geompy.GetSubShapeID
10316
10317             Returns:
10318                 New GEOM.GEOM_Object, containing the result shape.
10319
10320             Example of usage:
10321                 prism_faces = geompy.SubShapeAllSortedCentres(prism, geompy.ShapeType["FACE"])
10322                 f_ind_1 = geompy.GetSubShapeID(prism, prism_faces[0])
10323                 f_ind_2 = geompy.GetSubShapeID(prism, prism_faces[1])
10324                 chamfer_e = geompy.MakeChamferEdge(prism, 10., 10., f_ind_1, f_ind_2)
10325             """
10326             # Example: see GEOM_TestAll.py
10327             theD1,theD2,Parameters = ParseParameters(theD1,theD2)
10328             anObj = self.LocalOp.MakeChamferEdge(theShape, theD1, theD2, theFace1, theFace2)
10329             RaiseIfFailed("MakeChamferEdge", self.LocalOp)
10330             anObj.SetParameters(Parameters)
10331             self._autoPublish(anObj, theName, "chamfer")
10332             return anObj
10333
10334         ## Perform a chamfer on edges
10335         #  @param theShape Shape, to perform chamfer on.
10336         #  @param theD Chamfer length
10337         #  @param theAngle Angle of chamfer (angle in radians or a name of variable which defines angle in degrees)
10338         #  @param theFace1,theFace2 Global indices of two faces of \a theShape.
10339         #  @param theName Object name; when specified, this parameter is used
10340         #         for result publication in the study. Otherwise, if automatic
10341         #         publication is switched on, default value is used for result name.
10342         #
10343         #  @note Global index of sub-shape can be obtained, using method GetSubShapeID().
10344         #
10345         #  @return New GEOM.GEOM_Object, containing the result shape.
10346         @ManageTransactions("LocalOp")
10347         def MakeChamferEdgeAD(self, theShape, theD, theAngle, theFace1, theFace2, theName=None):
10348             """
10349             Perform a chamfer on edges
10350
10351             Parameters:
10352                 theShape Shape, to perform chamfer on.
10353                 theD1 Chamfer size along theFace1.
10354                 theAngle Angle of chamfer (angle in radians or a name of variable which defines angle in degrees).
10355                 theFace1,theFace2 Global indices of two faces of theShape.
10356                 theName Object name; when specified, this parameter is used
10357                         for result publication in the study. Otherwise, if automatic
10358                         publication is switched on, default value is used for result name.
10359
10360             Note:
10361                 Global index of sub-shape can be obtained, using method geompy.GetSubShapeID
10362
10363             Returns:
10364                 New GEOM.GEOM_Object, containing the result shape.
10365
10366             Example of usage:
10367                 prism_faces = geompy.SubShapeAllSortedCentres(prism, geompy.ShapeType["FACE"])
10368                 f_ind_1 = geompy.GetSubShapeID(prism, prism_faces[0])
10369                 f_ind_2 = geompy.GetSubShapeID(prism, prism_faces[1])
10370                 ang = 30
10371                 chamfer_e = geompy.MakeChamferEdge(prism, 10., ang, f_ind_1, f_ind_2)
10372             """
10373             flag = False
10374             if isinstance(theAngle,str):
10375                 flag = True
10376             theD,theAngle,Parameters = ParseParameters(theD,theAngle)
10377             if flag:
10378                 theAngle = theAngle*math.pi/180.0
10379             anObj = self.LocalOp.MakeChamferEdgeAD(theShape, theD, theAngle, theFace1, theFace2)
10380             RaiseIfFailed("MakeChamferEdgeAD", self.LocalOp)
10381             anObj.SetParameters(Parameters)
10382             self._autoPublish(anObj, theName, "chamfer")
10383             return anObj
10384
10385         ## Perform a chamfer on all edges of the specified faces,
10386         #  with distance D1 on the first specified face (if several for one edge)
10387         #  @param theShape Shape, to perform chamfer on.
10388         #  @param theD1 Chamfer size along face from \a theFaces. If both faces,
10389         #               connected to the edge, are in \a theFaces, \a theD1
10390         #               will be get along face, which is nearer to \a theFaces beginning.
10391         #  @param theD2 Chamfer size along another of two faces, connected to the edge.
10392         #  @param theFaces Sequence of global indices of faces of \a theShape.
10393         #  @param theName Object name; when specified, this parameter is used
10394         #         for result publication in the study. Otherwise, if automatic
10395         #         publication is switched on, default value is used for result name.
10396         #
10397         #  @note Global index of sub-shape can be obtained, using method GetSubShapeID().
10398         #
10399         #  @return New GEOM.GEOM_Object, containing the result shape.
10400         #
10401         #  @ref tui_chamfer "Example"
10402         @ManageTransactions("LocalOp")
10403         def MakeChamferFaces(self, theShape, theD1, theD2, theFaces, theName=None):
10404             """
10405             Perform a chamfer on all edges of the specified faces,
10406             with distance D1 on the first specified face (if several for one edge)
10407
10408             Parameters:
10409                 theShape Shape, to perform chamfer on.
10410                 theD1 Chamfer size along face from  theFaces. If both faces,
10411                       connected to the edge, are in theFaces, theD1
10412                       will be get along face, which is nearer to theFaces beginning.
10413                 theD2 Chamfer size along another of two faces, connected to the edge.
10414                 theFaces Sequence of global indices of faces of theShape.
10415                 theName Object name; when specified, this parameter is used
10416                         for result publication in the study. Otherwise, if automatic
10417                         publication is switched on, default value is used for result name.
10418
10419             Note: Global index of sub-shape can be obtained, using method geompy.GetSubShapeID().
10420
10421             Returns:
10422                 New GEOM.GEOM_Object, containing the result shape.
10423             """
10424             # Example: see GEOM_TestAll.py
10425             theD1,theD2,Parameters = ParseParameters(theD1,theD2)
10426             anObj = self.LocalOp.MakeChamferFaces(theShape, theD1, theD2, theFaces)
10427             RaiseIfFailed("MakeChamferFaces", self.LocalOp)
10428             anObj.SetParameters(Parameters)
10429             self._autoPublish(anObj, theName, "chamfer")
10430             return anObj
10431
10432         ## The Same that MakeChamferFaces() but with params theD is chamfer length and
10433         #  theAngle is Angle of chamfer (angle in radians or a name of variable which defines angle in degrees)
10434         #
10435         #  @ref swig_FilletChamfer "Example"
10436         @ManageTransactions("LocalOp")
10437         def MakeChamferFacesAD(self, theShape, theD, theAngle, theFaces, theName=None):
10438             """
10439             The Same that geompy.MakeChamferFaces but with params theD is chamfer length and
10440             theAngle is Angle of chamfer (angle in radians or a name of variable which defines angle in degrees)
10441             """
10442             flag = False
10443             if isinstance(theAngle,str):
10444                 flag = True
10445             theD,theAngle,Parameters = ParseParameters(theD,theAngle)
10446             if flag:
10447                 theAngle = theAngle*math.pi/180.0
10448             anObj = self.LocalOp.MakeChamferFacesAD(theShape, theD, theAngle, theFaces)
10449             RaiseIfFailed("MakeChamferFacesAD", self.LocalOp)
10450             anObj.SetParameters(Parameters)
10451             self._autoPublish(anObj, theName, "chamfer")
10452             return anObj
10453
10454         ## Perform a chamfer on edges,
10455         #  with distance D1 on the first specified face (if several for one edge)
10456         #  @param theShape Shape, to perform chamfer on.
10457         #  @param theD1,theD2 Chamfer size
10458         #  @param theEdges Sequence of edges of \a theShape.
10459         #  @param theName Object name; when specified, this parameter is used
10460         #         for result publication in the study. Otherwise, if automatic
10461         #         publication is switched on, default value is used for result name.
10462         #
10463         #  @return New GEOM.GEOM_Object, containing the result shape.
10464         #
10465         #  @ref swig_FilletChamfer "Example"
10466         @ManageTransactions("LocalOp")
10467         def MakeChamferEdges(self, theShape, theD1, theD2, theEdges, theName=None):
10468             """
10469             Perform a chamfer on edges,
10470             with distance D1 on the first specified face (if several for one edge)
10471
10472             Parameters:
10473                 theShape Shape, to perform chamfer on.
10474                 theD1,theD2 Chamfer size
10475                 theEdges Sequence of edges of theShape.
10476                 theName Object name; when specified, this parameter is used
10477                         for result publication in the study. Otherwise, if automatic
10478                         publication is switched on, default value is used for result name.
10479
10480             Returns:
10481                 New GEOM.GEOM_Object, containing the result shape.
10482             """
10483             theD1,theD2,Parameters = ParseParameters(theD1,theD2)
10484             anObj = self.LocalOp.MakeChamferEdges(theShape, theD1, theD2, theEdges)
10485             RaiseIfFailed("MakeChamferEdges", self.LocalOp)
10486             anObj.SetParameters(Parameters)
10487             self._autoPublish(anObj, theName, "chamfer")
10488             return anObj
10489
10490         ## The Same that MakeChamferEdges() but with params theD is chamfer length and
10491         #  theAngle is Angle of chamfer (angle in radians or a name of variable which defines angle in degrees)
10492         @ManageTransactions("LocalOp")
10493         def MakeChamferEdgesAD(self, theShape, theD, theAngle, theEdges, theName=None):
10494             """
10495             The Same that geompy.MakeChamferEdges but with params theD is chamfer length and
10496             theAngle is Angle of chamfer (angle in radians or a name of variable which defines angle in degrees)
10497             """
10498             flag = False
10499             if isinstance(theAngle,str):
10500                 flag = True
10501             theD,theAngle,Parameters = ParseParameters(theD,theAngle)
10502             if flag:
10503                 theAngle = theAngle*math.pi/180.0
10504             anObj = self.LocalOp.MakeChamferEdgesAD(theShape, theD, theAngle, theEdges)
10505             RaiseIfFailed("MakeChamferEdgesAD", self.LocalOp)
10506             anObj.SetParameters(Parameters)
10507             self._autoPublish(anObj, theName, "chamfer")
10508             return anObj
10509
10510         ## @sa MakeChamferEdge(), MakeChamferFaces()
10511         #
10512         #  @ref swig_MakeChamfer "Example"
10513         def MakeChamfer(self, aShape, d1, d2, aShapeType, ListShape, theName=None):
10514             """
10515             See geompy.MakeChamferEdge() and geompy.MakeChamferFaces() functions for more information.
10516             """
10517             # Example: see GEOM_TestOthers.py
10518             anObj = None
10519             # note: auto-publishing is done in self.MakeChamferEdge() or self.MakeChamferFaces()
10520             if aShapeType == self.ShapeType["EDGE"]:
10521                 anObj = self.MakeChamferEdge(aShape,d1,d2,ListShape[0],ListShape[1],theName)
10522             else:
10523                 anObj = self.MakeChamferFaces(aShape,d1,d2,ListShape,theName)
10524             return anObj
10525
10526         ## Remove material from a solid by extrusion of the base shape on the given distance.
10527         #  @param theInit Shape to remove material from. It must be a solid or
10528         #  a compound made of a single solid.
10529         #  @param theBase Closed edge or wire defining the base shape to be extruded.
10530         #  @param theH Prism dimension along the normal to theBase
10531         #  @param theAngle Draft angle in degrees.
10532         #  @param theInvert If true material changes the direction
10533         #  @param theName Object name; when specified, this parameter is used
10534         #         for result publication in the study. Otherwise, if automatic
10535         #         publication is switched on, default value is used for result name.
10536         #
10537         #  @return New GEOM.GEOM_Object, containing the initial shape with removed material
10538         #
10539         #  @ref tui_creation_prism "Example"
10540         @ManageTransactions("PrimOp")
10541         def MakeExtrudedCut(self, theInit, theBase, theH, theAngle, theInvert=False, theName=None):
10542             """
10543             Add material to a solid by extrusion of the base shape on the given distance.
10544
10545             Parameters:
10546                 theInit Shape to remove material from. It must be a solid or a compound made of a single solid.
10547                 theBase Closed edge or wire defining the base shape to be extruded.
10548                 theH Prism dimension along the normal to theBase
10549                 theAngle Draft angle in degrees.
10550                 theInvert If true material changes the direction.
10551                 theName Object name; when specified, this parameter is used
10552                         for result publication in the study. Otherwise, if automatic
10553                         publication is switched on, default value is used for result name.
10554
10555             Returns:
10556                 New GEOM.GEOM_Object,  containing the initial shape with removed material.
10557             """
10558             # Example: see GEOM_TestAll.py
10559             theH,theAngle,Parameters = ParseParameters(theH,theAngle)
10560             anObj = self.PrimOp.MakeDraftPrism(theInit, theBase, theH, theAngle, False, theInvert)
10561             RaiseIfFailed("MakeExtrudedBoss", self.PrimOp)
10562             anObj.SetParameters(Parameters)
10563             self._autoPublish(anObj, theName, "extrudedCut")
10564             return anObj
10565
10566         ## Add material to a solid by extrusion of the base shape on the given distance.
10567         #  @param theInit Shape to add material to. It must be a solid or
10568         #  a compound made of a single solid.
10569         #  @param theBase Closed edge or wire defining the base shape to be extruded.
10570         #  @param theH Prism dimension along the normal to theBase
10571         #  @param theAngle Draft angle in degrees.
10572         #  @param theInvert If true material changes the direction
10573         #  @param theName Object name; when specified, this parameter is used
10574         #         for result publication in the study. Otherwise, if automatic
10575         #         publication is switched on, default value is used for result name.
10576         #
10577         #  @return New GEOM.GEOM_Object, containing the initial shape with added material
10578         #
10579         #  @ref tui_creation_prism "Example"
10580         @ManageTransactions("PrimOp")
10581         def MakeExtrudedBoss(self, theInit, theBase, theH, theAngle, theInvert=False, theName=None):
10582             """
10583             Add material to a solid by extrusion of the base shape on the given distance.
10584
10585             Parameters:
10586                 theInit Shape to add material to. It must be a solid or a compound made of a single solid.
10587                 theBase Closed edge or wire defining the base shape to be extruded.
10588                 theH Prism dimension along the normal to theBase
10589                 theAngle Draft angle in degrees.
10590                 theInvert If true material changes the direction.
10591                 theName Object name; when specified, this parameter is used
10592                         for result publication in the study. Otherwise, if automatic
10593                         publication is switched on, default value is used for result name.
10594
10595             Returns:
10596                 New GEOM.GEOM_Object,  containing the initial shape with added material.
10597             """
10598             # Example: see GEOM_TestAll.py
10599             theH,theAngle,Parameters = ParseParameters(theH,theAngle)
10600             anObj = self.PrimOp.MakeDraftPrism(theInit, theBase, theH, theAngle, True, theInvert)
10601             RaiseIfFailed("MakeExtrudedBoss", self.PrimOp)
10602             anObj.SetParameters(Parameters)
10603             self._autoPublish(anObj, theName, "extrudedBoss")
10604             return anObj
10605
10606         # end of l3_local
10607         ## @}
10608
10609         ## @addtogroup l3_basic_op
10610         ## @{
10611
10612         ## Perform an Archimde operation on the given shape with given parameters.
10613         #  The object presenting the resulting face is returned.
10614         #  @param theShape Shape to be put in water.
10615         #  @param theWeight Weight of the shape.
10616         #  @param theWaterDensity Density of the water.
10617         #  @param theMeshDeflection Deflection of the mesh, using to compute the section.
10618         #  @param theName Object name; when specified, this parameter is used
10619         #         for result publication in the study. Otherwise, if automatic
10620         #         publication is switched on, default value is used for result name.
10621         #
10622         #  @return New GEOM.GEOM_Object, containing a section of \a theShape
10623         #          by a plane, corresponding to water level.
10624         #
10625         #  @ref tui_archimede "Example"
10626         @ManageTransactions("LocalOp")
10627         def Archimede(self, theShape, theWeight, theWaterDensity, theMeshDeflection, theName=None):
10628             """
10629             Perform an Archimde operation on the given shape with given parameters.
10630             The object presenting the resulting face is returned.
10631
10632             Parameters:
10633                 theShape Shape to be put in water.
10634                 theWeight Weight of the shape.
10635                 theWaterDensity Density of the water.
10636                 theMeshDeflection Deflection of the mesh, using to compute the section.
10637                 theName Object name; when specified, this parameter is used
10638                         for result publication in the study. Otherwise, if automatic
10639                         publication is switched on, default value is used for result name.
10640
10641             Returns:
10642                 New GEOM.GEOM_Object, containing a section of theShape
10643                 by a plane, corresponding to water level.
10644             """
10645             # Example: see GEOM_TestAll.py
10646             theWeight,theWaterDensity,theMeshDeflection,Parameters = ParseParameters(
10647               theWeight,theWaterDensity,theMeshDeflection)
10648             anObj = self.LocalOp.MakeArchimede(theShape, theWeight, theWaterDensity, theMeshDeflection)
10649             RaiseIfFailed("MakeArchimede", self.LocalOp)
10650             anObj.SetParameters(Parameters)
10651             self._autoPublish(anObj, theName, "archimede")
10652             return anObj
10653
10654         # end of l3_basic_op
10655         ## @}
10656
10657         ## @addtogroup l2_measure
10658         ## @{
10659
10660         ## Get point coordinates
10661         #  @return [x, y, z]
10662         #
10663         #  @ref tui_point_coordinates_page "Example"
10664         @ManageTransactions("MeasuOp")
10665         def PointCoordinates(self,Point):
10666             """
10667             Get point coordinates
10668
10669             Returns:
10670                 [x, y, z]
10671             """
10672             # Example: see GEOM_TestMeasures.py
10673             aTuple = self.MeasuOp.PointCoordinates(Point)
10674             RaiseIfFailed("PointCoordinates", self.MeasuOp)
10675             return aTuple
10676
10677         ## Get vector coordinates
10678         #  @return [x, y, z]
10679         #
10680         #  @ref tui_measurement_tools_page "Example"
10681         def VectorCoordinates(self,Vector):
10682             """
10683             Get vector coordinates
10684
10685             Returns:
10686                 [x, y, z]
10687             """
10688
10689             p1=self.GetFirstVertex(Vector)
10690             p2=self.GetLastVertex(Vector)
10691
10692             X1=self.PointCoordinates(p1)
10693             X2=self.PointCoordinates(p2)
10694
10695             return (X2[0]-X1[0],X2[1]-X1[1],X2[2]-X1[2])
10696
10697
10698         ## Compute cross product
10699         #  @return vector w=u^v
10700         #
10701         #  @ref tui_measurement_tools_page "Example"
10702         def CrossProduct(self, Vector1, Vector2):
10703             """
10704             Compute cross product
10705
10706             Returns: vector w=u^v
10707             """
10708             u=self.VectorCoordinates(Vector1)
10709             v=self.VectorCoordinates(Vector2)
10710             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])
10711
10712             return w
10713
10714         ## Compute cross product
10715         #  @return dot product  p=u.v
10716         #
10717         #  @ref tui_measurement_tools_page "Example"
10718         def DotProduct(self, Vector1, Vector2):
10719             """
10720             Compute cross product
10721
10722             Returns: dot product  p=u.v
10723             """
10724             u=self.VectorCoordinates(Vector1)
10725             v=self.VectorCoordinates(Vector2)
10726             p=u[0]*v[0]+u[1]*v[1]+u[2]*v[2]
10727
10728             return p
10729
10730
10731         ## Get summarized length of all wires,
10732         #  area of surface and volume of the given shape.
10733         #  @param theShape Shape to define properties of.
10734         #  @param theTolerance maximal relative error of area
10735         #         and volume computation.
10736         #  @return [theLength, theSurfArea, theVolume]\n
10737         #  theLength:   Summarized length of all wires of the given shape.\n
10738         #  theSurfArea: Area of surface of the given shape.\n
10739         #  theVolume:   Volume of the given shape.
10740         #
10741         #  @ref tui_basic_properties_page "Example"
10742         @ManageTransactions("MeasuOp")
10743         def BasicProperties(self,theShape, theTolerance=1.e-6):
10744             """
10745             Get summarized length of all wires,
10746             area of surface and volume of the given shape.
10747
10748             Parameters:
10749                 theShape Shape to define properties of.
10750                 theTolerance maximal relative error of area
10751                              and volume computation.
10752
10753             Returns:
10754                 [theLength, theSurfArea, theVolume]
10755                  theLength:   Summarized length of all wires of the given shape.
10756                  theSurfArea: Area of surface of the given shape.
10757                  theVolume:   Volume of the given shape.
10758             """
10759             # Example: see GEOM_TestMeasures.py
10760             aTuple = self.MeasuOp.GetBasicProperties(theShape, theTolerance)
10761             RaiseIfFailed("GetBasicProperties", self.MeasuOp)
10762             return aTuple
10763
10764         ## Get parameters of bounding box of the given shape
10765         #  @param theShape Shape to obtain bounding box of.
10766         #  @param precise TRUE for precise computation; FALSE for fast one.
10767         #  @return [Xmin,Xmax, Ymin,Ymax, Zmin,Zmax]
10768         #  Xmin,Xmax: Limits of shape along OX axis.
10769         #  Ymin,Ymax: Limits of shape along OY axis.
10770         #  Zmin,Zmax: Limits of shape along OZ axis.
10771         #
10772         #  @ref tui_bounding_box_page "Example"
10773         @ManageTransactions("MeasuOp")
10774         def BoundingBox (self, theShape, precise=False):
10775             """
10776             Get parameters of bounding box of the given shape
10777
10778             Parameters:
10779                 theShape Shape to obtain bounding box of.
10780                 precise TRUE for precise computation; FALSE for fast one.
10781
10782             Returns:
10783                 [Xmin,Xmax, Ymin,Ymax, Zmin,Zmax]
10784                  Xmin,Xmax: Limits of shape along OX axis.
10785                  Ymin,Ymax: Limits of shape along OY axis.
10786                  Zmin,Zmax: Limits of shape along OZ axis.
10787             """
10788             # Example: see GEOM_TestMeasures.py
10789             aTuple = self.MeasuOp.GetBoundingBox(theShape, precise)
10790             RaiseIfFailed("GetBoundingBox", self.MeasuOp)
10791             return aTuple
10792
10793         ## Get bounding box of the given shape
10794         #  @param theShape Shape to obtain bounding box of.
10795         #  @param precise TRUE for precise computation; FALSE for fast one.
10796         #  @param theName Object name; when specified, this parameter is used
10797         #         for result publication in the study. Otherwise, if automatic
10798         #         publication is switched on, default value is used for result name.
10799         #
10800         #  @return New GEOM.GEOM_Object, containing the created box.
10801         #
10802         #  @ref tui_bounding_box_page "Example"
10803         @ManageTransactions("MeasuOp")
10804         def MakeBoundingBox (self, theShape, precise=False, theName=None):
10805             """
10806             Get bounding box of the given shape
10807
10808             Parameters:
10809                 theShape Shape to obtain bounding box of.
10810                 precise TRUE for precise computation; FALSE for fast one.
10811                 theName Object name; when specified, this parameter is used
10812                         for result publication in the study. Otherwise, if automatic
10813                         publication is switched on, default value is used for result name.
10814
10815             Returns:
10816                 New GEOM.GEOM_Object, containing the created box.
10817             """
10818             # Example: see GEOM_TestMeasures.py
10819             anObj = self.MeasuOp.MakeBoundingBox(theShape, precise)
10820             RaiseIfFailed("MakeBoundingBox", self.MeasuOp)
10821             self._autoPublish(anObj, theName, "bndbox")
10822             return anObj
10823
10824         ## Get inertia matrix and moments of inertia of theShape.
10825         #  @param theShape Shape to calculate inertia of.
10826         #  @return [I11,I12,I13, I21,I22,I23, I31,I32,I33, Ix,Iy,Iz]
10827         #  I(1-3)(1-3): Components of the inertia matrix of the given shape.
10828         #  Ix,Iy,Iz:    Moments of inertia of the given shape.
10829         #
10830         #  @ref tui_inertia_page "Example"
10831         @ManageTransactions("MeasuOp")
10832         def Inertia(self,theShape):
10833             """
10834             Get inertia matrix and moments of inertia of theShape.
10835
10836             Parameters:
10837                 theShape Shape to calculate inertia of.
10838
10839             Returns:
10840                 [I11,I12,I13, I21,I22,I23, I31,I32,I33, Ix,Iy,Iz]
10841                  I(1-3)(1-3): Components of the inertia matrix of the given shape.
10842                  Ix,Iy,Iz:    Moments of inertia of the given shape.
10843             """
10844             # Example: see GEOM_TestMeasures.py
10845             aTuple = self.MeasuOp.GetInertia(theShape)
10846             RaiseIfFailed("GetInertia", self.MeasuOp)
10847             return aTuple
10848
10849         ## Get if coords are included in the shape (ST_IN or ST_ON)
10850         #  @param theShape Shape
10851         #  @param coords list of points coordinates [x1, y1, z1, x2, y2, z2, ...]
10852         #  @param tolerance to be used (default is 1.0e-7)
10853         #  @return list_of_boolean = [res1, res2, ...]
10854         @ManageTransactions("MeasuOp")
10855         def AreCoordsInside(self, theShape, coords, tolerance=1.e-7):
10856             """
10857             Get if coords are included in the shape (ST_IN or ST_ON)
10858
10859             Parameters:
10860                 theShape Shape
10861                 coords list of points coordinates [x1, y1, z1, x2, y2, z2, ...]
10862                 tolerance to be used (default is 1.0e-7)
10863
10864             Returns:
10865                 list_of_boolean = [res1, res2, ...]
10866             """
10867             return self.MeasuOp.AreCoordsInside(theShape, coords, tolerance)
10868
10869         ## Get minimal distance between the given shapes.
10870         #  @param theShape1,theShape2 Shapes to find minimal distance between.
10871         #  @return Value of the minimal distance between the given shapes.
10872         #
10873         #  @ref tui_min_distance_page "Example"
10874         @ManageTransactions("MeasuOp")
10875         def MinDistance(self, theShape1, theShape2):
10876             """
10877             Get minimal distance between the given shapes.
10878
10879             Parameters:
10880                 theShape1,theShape2 Shapes to find minimal distance between.
10881
10882             Returns:
10883                 Value of the minimal distance between the given shapes.
10884             """
10885             # Example: see GEOM_TestMeasures.py
10886             aTuple = self.MeasuOp.GetMinDistance(theShape1, theShape2)
10887             RaiseIfFailed("GetMinDistance", self.MeasuOp)
10888             return aTuple[0]
10889
10890         ## Get minimal distance between the given shapes.
10891         #  @param theShape1,theShape2 Shapes to find minimal distance between.
10892         #  @return Value of the minimal distance between the given shapes, in form of list
10893         #          [Distance, DX, DY, DZ].
10894         #
10895         #  @ref tui_min_distance_page "Example"
10896         @ManageTransactions("MeasuOp")
10897         def MinDistanceComponents(self, theShape1, theShape2):
10898             """
10899             Get minimal distance between the given shapes.
10900
10901             Parameters:
10902                 theShape1,theShape2 Shapes to find minimal distance between.
10903
10904             Returns:
10905                 Value of the minimal distance between the given shapes, in form of list
10906                 [Distance, DX, DY, DZ]
10907             """
10908             # Example: see GEOM_TestMeasures.py
10909             aTuple = self.MeasuOp.GetMinDistance(theShape1, theShape2)
10910             RaiseIfFailed("GetMinDistance", self.MeasuOp)
10911             aRes = [aTuple[0], aTuple[4] - aTuple[1], aTuple[5] - aTuple[2], aTuple[6] - aTuple[3]]
10912             return aRes
10913
10914         ## Get closest points of the given shapes.
10915         #  @param theShape1,theShape2 Shapes to find closest points of.
10916         #  @return The number of found solutions (-1 in case of infinite number of
10917         #          solutions) and a list of (X, Y, Z) coordinates for all couples of points.
10918         #
10919         #  @ref tui_min_distance_page "Example"
10920         @ManageTransactions("MeasuOp")
10921         def ClosestPoints (self, theShape1, theShape2):
10922             """
10923             Get closest points of the given shapes.
10924
10925             Parameters:
10926                 theShape1,theShape2 Shapes to find closest points of.
10927
10928             Returns:
10929                 The number of found solutions (-1 in case of infinite number of
10930                 solutions) and a list of (X, Y, Z) coordinates for all couples of points.
10931             """
10932             # Example: see GEOM_TestMeasures.py
10933             aTuple = self.MeasuOp.ClosestPoints(theShape1, theShape2)
10934             RaiseIfFailed("ClosestPoints", self.MeasuOp)
10935             return aTuple
10936
10937         ## Get angle between the given shapes in degrees.
10938         #  @param theShape1,theShape2 Lines or linear edges to find angle between.
10939         #  @note If both arguments are vectors, the angle is computed in accordance
10940         #        with their orientations, otherwise the minimum angle is computed.
10941         #  @return Value of the angle between the given shapes in degrees.
10942         #
10943         #  @ref tui_angle_page "Example"
10944         @ManageTransactions("MeasuOp")
10945         def GetAngle(self, theShape1, theShape2):
10946             """
10947             Get angle between the given shapes in degrees.
10948
10949             Parameters:
10950                 theShape1,theShape2 Lines or linear edges to find angle between.
10951
10952             Note:
10953                 If both arguments are vectors, the angle is computed in accordance
10954                 with their orientations, otherwise the minimum angle is computed.
10955
10956             Returns:
10957                 Value of the angle between the given shapes in degrees.
10958             """
10959             # Example: see GEOM_TestMeasures.py
10960             anAngle = self.MeasuOp.GetAngle(theShape1, theShape2)
10961             RaiseIfFailed("GetAngle", self.MeasuOp)
10962             return anAngle
10963
10964         ## Get angle between the given shapes in radians.
10965         #  @param theShape1,theShape2 Lines or linear edges to find angle between.
10966         #  @note If both arguments are vectors, the angle is computed in accordance
10967         #        with their orientations, otherwise the minimum angle is computed.
10968         #  @return Value of the angle between the given shapes in radians.
10969         #
10970         #  @ref tui_angle_page "Example"
10971         @ManageTransactions("MeasuOp")
10972         def GetAngleRadians(self, theShape1, theShape2):
10973             """
10974             Get angle between the given shapes in radians.
10975
10976             Parameters:
10977                 theShape1,theShape2 Lines or linear edges to find angle between.
10978
10979
10980             Note:
10981                 If both arguments are vectors, the angle is computed in accordance
10982                 with their orientations, otherwise the minimum angle is computed.
10983
10984             Returns:
10985                 Value of the angle between the given shapes in radians.
10986             """
10987             # Example: see GEOM_TestMeasures.py
10988             anAngle = self.MeasuOp.GetAngle(theShape1, theShape2)*math.pi/180.
10989             RaiseIfFailed("GetAngle", self.MeasuOp)
10990             return anAngle
10991
10992         ## Get angle between the given vectors in degrees.
10993         #  @param theShape1,theShape2 Vectors to find angle between.
10994         #  @param theFlag If True, the normal vector is defined by the two vectors cross,
10995         #                 if False, the opposite vector to the normal vector is used.
10996         #  @return Value of the angle between the given vectors in degrees.
10997         #
10998         #  @ref tui_angle_page "Example"
10999         @ManageTransactions("MeasuOp")
11000         def GetAngleVectors(self, theShape1, theShape2, theFlag = True):
11001             """
11002             Get angle between the given vectors in degrees.
11003
11004             Parameters:
11005                 theShape1,theShape2 Vectors to find angle between.
11006                 theFlag If True, the normal vector is defined by the two vectors cross,
11007                         if False, the opposite vector to the normal vector is used.
11008
11009             Returns:
11010                 Value of the angle between the given vectors in degrees.
11011             """
11012             anAngle = self.MeasuOp.GetAngleBtwVectors(theShape1, theShape2)
11013             if not theFlag:
11014                 anAngle = 360. - anAngle
11015             RaiseIfFailed("GetAngleVectors", self.MeasuOp)
11016             return anAngle
11017
11018         ## The same as GetAngleVectors, but the result is in radians.
11019         def GetAngleRadiansVectors(self, theShape1, theShape2, theFlag = True):
11020             """
11021             Get angle between the given vectors in radians.
11022
11023             Parameters:
11024                 theShape1,theShape2 Vectors to find angle between.
11025                 theFlag If True, the normal vector is defined by the two vectors cross,
11026                         if False, the opposite vector to the normal vector is used.
11027
11028             Returns:
11029                 Value of the angle between the given vectors in radians.
11030             """
11031             anAngle = self.GetAngleVectors(theShape1, theShape2, theFlag)*math.pi/180.
11032             return anAngle
11033
11034         ## @name Curve Curvature Measurement
11035         #  Methods for receiving radius of curvature of curves
11036         #  in the given point
11037         ## @{
11038
11039         ## Measure curvature of a curve at a point, set by parameter.
11040         #  @param theCurve a curve.
11041         #  @param theParam parameter.
11042         #  @return radius of curvature of \a theCurve.
11043         #
11044         #  @ref swig_todo "Example"
11045         @ManageTransactions("MeasuOp")
11046         def CurveCurvatureByParam(self, theCurve, theParam):
11047             """
11048             Measure curvature of a curve at a point, set by parameter.
11049
11050             Parameters:
11051                 theCurve a curve.
11052                 theParam parameter.
11053
11054             Returns:
11055                 radius of curvature of theCurve.
11056             """
11057             # Example: see GEOM_TestMeasures.py
11058             aCurv = self.MeasuOp.CurveCurvatureByParam(theCurve,theParam)
11059             RaiseIfFailed("CurveCurvatureByParam", self.MeasuOp)
11060             return aCurv
11061
11062         ## Measure curvature of a curve at a point.
11063         #  @param theCurve a curve.
11064         #  @param thePoint given point.
11065         #  @return radius of curvature of \a theCurve.
11066         #
11067         #  @ref swig_todo "Example"
11068         @ManageTransactions("MeasuOp")
11069         def CurveCurvatureByPoint(self, theCurve, thePoint):
11070             """
11071             Measure curvature of a curve at a point.
11072
11073             Parameters:
11074                 theCurve a curve.
11075                 thePoint given point.
11076
11077             Returns:
11078                 radius of curvature of theCurve.
11079             """
11080             aCurv = self.MeasuOp.CurveCurvatureByPoint(theCurve,thePoint)
11081             RaiseIfFailed("CurveCurvatureByPoint", self.MeasuOp)
11082             return aCurv
11083         ## @}
11084
11085         ## @name Surface Curvature Measurement
11086         #  Methods for receiving max and min radius of curvature of surfaces
11087         #  in the given point
11088         ## @{
11089
11090         ## Measure max radius of curvature of surface.
11091         #  @param theSurf the given surface.
11092         #  @param theUParam Value of U-parameter on the referenced surface.
11093         #  @param theVParam Value of V-parameter on the referenced surface.
11094         #  @return max radius of curvature of theSurf.
11095         #
11096         ## @ref swig_todo "Example"
11097         @ManageTransactions("MeasuOp")
11098         def MaxSurfaceCurvatureByParam(self, theSurf, theUParam, theVParam):
11099             """
11100             Measure max radius of curvature of surface.
11101
11102             Parameters:
11103                 theSurf the given surface.
11104                 theUParam Value of U-parameter on the referenced surface.
11105                 theVParam Value of V-parameter on the referenced surface.
11106
11107             Returns:
11108                 max radius of curvature of theSurf.
11109             """
11110             # Example: see GEOM_TestMeasures.py
11111             aSurf = self.MeasuOp.MaxSurfaceCurvatureByParam(theSurf,theUParam,theVParam)
11112             RaiseIfFailed("MaxSurfaceCurvatureByParam", self.MeasuOp)
11113             return aSurf
11114
11115         ## Measure max radius of curvature of surface in the given point
11116         #  @param theSurf the given surface.
11117         #  @param thePoint given point.
11118         #  @return max radius of curvature of theSurf.
11119         #
11120         ## @ref swig_todo "Example"
11121         @ManageTransactions("MeasuOp")
11122         def MaxSurfaceCurvatureByPoint(self, theSurf, thePoint):
11123             """
11124             Measure max radius of curvature of surface in the given point.
11125
11126             Parameters:
11127                 theSurf the given surface.
11128                 thePoint given point.
11129
11130             Returns:
11131                 max radius of curvature of theSurf.
11132             """
11133             aSurf = self.MeasuOp.MaxSurfaceCurvatureByPoint(theSurf,thePoint)
11134             RaiseIfFailed("MaxSurfaceCurvatureByPoint", self.MeasuOp)
11135             return aSurf
11136
11137         ## Measure min radius of curvature of surface.
11138         #  @param theSurf the given surface.
11139         #  @param theUParam Value of U-parameter on the referenced surface.
11140         #  @param theVParam Value of V-parameter on the referenced surface.
11141         #  @return min radius of curvature of theSurf.
11142         #
11143         ## @ref swig_todo "Example"
11144         @ManageTransactions("MeasuOp")
11145         def MinSurfaceCurvatureByParam(self, theSurf, theUParam, theVParam):
11146             """
11147             Measure min radius of curvature of surface.
11148
11149             Parameters:
11150                 theSurf the given surface.
11151                 theUParam Value of U-parameter on the referenced surface.
11152                 theVParam Value of V-parameter on the referenced surface.
11153
11154             Returns:
11155                 Min radius of curvature of theSurf.
11156             """
11157             aSurf = self.MeasuOp.MinSurfaceCurvatureByParam(theSurf,theUParam,theVParam)
11158             RaiseIfFailed("MinSurfaceCurvatureByParam", self.MeasuOp)
11159             return aSurf
11160
11161         ## Measure min radius of curvature of surface in the given point
11162         #  @param theSurf the given surface.
11163         #  @param thePoint given point.
11164         #  @return min radius of curvature of theSurf.
11165         #
11166         ## @ref swig_todo "Example"
11167         @ManageTransactions("MeasuOp")
11168         def MinSurfaceCurvatureByPoint(self, theSurf, thePoint):
11169             """
11170             Measure min radius of curvature of surface in the given point.
11171
11172             Parameters:
11173                 theSurf the given surface.
11174                 thePoint given point.
11175
11176             Returns:
11177                 Min radius of curvature of theSurf.
11178             """
11179             aSurf = self.MeasuOp.MinSurfaceCurvatureByPoint(theSurf,thePoint)
11180             RaiseIfFailed("MinSurfaceCurvatureByPoint", self.MeasuOp)
11181             return aSurf
11182         ## @}
11183
11184         ## Measure curvature radius of surface in the given point along the given direction.
11185         #  @param theSurf the given face.
11186         #  @param thePoint given point.
11187         #  @param theDirection given direction.
11188         #  @param theName Object name; when specified, this parameter is used
11189         #         for result publication in the study. Otherwise, if automatic
11190         #         publication is switched on, default value is used for result name.
11191         #
11192         #  @return New GEOM.GEOM_Object, containing vector of curvature of theSurf.
11193         #          The returned vector is codirectional with the normal to the face
11194         #          in the given point in case of positive curvature value
11195         #          and opposite to the normal in case of negative curvature.
11196         #          The normal of the returned vector is equal to the
11197         #          absolute value of the curvature radius.
11198         #          Null shape is returned in case of infinite radius
11199         #          (zero curvature), for example, in case of flat face.
11200         #
11201         ## @ref swig_CurvatureOnFace "Example"
11202         @ManageTransactions("MeasuOp")
11203         def CurvatureOnFace(self, theSurf, thePoint, theDirection, theName=None):
11204             """
11205             Measure curvature radius of surface in the given point along the given direction.
11206
11207             Parameters:
11208                 theSurf the given face.
11209                 thePoint given point.
11210                 theDirection given direction.
11211                 theName Object name; when specified, this parameter is used
11212                         for result publication in the study. Otherwise, if automatic
11213                         publication is switched on, default value is used for result name.
11214
11215             Returns:
11216                 New GEOM.GEOM_Object, containing vector of curvature of theSurf.
11217                 The returned vector is codirectional with the normal to the face
11218                 in the given point in case of positive curvature value
11219                 and opposite to the normal in case of negative curvature.
11220                 The normal of the returned vector is equal to the
11221                 absolute value of the curvature radius.
11222                 Null shape is returned in case of infinite radius
11223                 (zero curvature), for example, in case of flat face.
11224
11225             Example of usage:
11226                 curvature_1 = geompy.CurvatureOnFace(Face_1, Vertex_1, OX)
11227             """
11228             aVec = self.MeasuOp.SurfaceCurvatureByPointAndDirection(theSurf,thePoint,theDirection)
11229             if self.MeasuOp.GetErrorCode() != "ZERO_CURVATURE":
11230                 RaiseIfFailed("CurvatureOnFace", self.MeasuOp)
11231                 self._autoPublish(aVec, theName, "curvature")
11232             return aVec
11233
11234         ## Get min and max tolerances of sub-shapes of theShape
11235         #  @param theShape Shape, to get tolerances of.
11236         #  @return [FaceMin,FaceMax, EdgeMin,EdgeMax, VertMin,VertMax]\n
11237         #  FaceMin,FaceMax: Min and max tolerances of the faces.\n
11238         #  EdgeMin,EdgeMax: Min and max tolerances of the edges.\n
11239         #  VertMin,VertMax: Min and max tolerances of the vertices.
11240         #
11241         #  @ref tui_tolerance_page "Example"
11242         @ManageTransactions("MeasuOp")
11243         def Tolerance(self,theShape):
11244             """
11245             Get min and max tolerances of sub-shapes of theShape
11246
11247             Parameters:
11248                 theShape Shape, to get tolerances of.
11249
11250             Returns:
11251                 [FaceMin,FaceMax, EdgeMin,EdgeMax, VertMin,VertMax]
11252                  FaceMin,FaceMax: Min and max tolerances of the faces.
11253                  EdgeMin,EdgeMax: Min and max tolerances of the edges.
11254                  VertMin,VertMax: Min and max tolerances of the vertices.
11255             """
11256             # Example: see GEOM_TestMeasures.py
11257             aTuple = self.MeasuOp.GetTolerance(theShape)
11258             RaiseIfFailed("GetTolerance", self.MeasuOp)
11259             return aTuple
11260
11261         ## Obtain description of the given shape (number of sub-shapes of each type)
11262         #  @param theShape Shape to be described.
11263         #  @return Description of the given shape.
11264         #
11265         #  @ref tui_whatis_page "Example"
11266         @ManageTransactions("MeasuOp")
11267         def WhatIs(self,theShape):
11268             """
11269             Obtain description of the given shape (number of sub-shapes of each type)
11270
11271             Parameters:
11272                 theShape Shape to be described.
11273
11274             Returns:
11275                 Description of the given shape.
11276             """
11277             # Example: see GEOM_TestMeasures.py
11278             aDescr = self.MeasuOp.WhatIs(theShape)
11279             RaiseIfFailed("WhatIs", self.MeasuOp)
11280             return aDescr
11281
11282         ## Obtain quantity of shapes of the given type in \a theShape.
11283         #  If \a theShape is of type \a theType, it is also counted.
11284         #  @param theShape Shape to be described.
11285         #  @param theType the given ShapeType().
11286         #  @return Quantity of shapes of type \a theType in \a theShape.
11287         #
11288         #  @ref tui_measurement_tools_page "Example"
11289         def NbShapes (self, theShape, theType):
11290             """
11291             Obtain quantity of shapes of the given type in theShape.
11292             If theShape is of type theType, it is also counted.
11293
11294             Parameters:
11295                 theShape Shape to be described.
11296                 theType the given geompy.ShapeType
11297
11298             Returns:
11299                 Quantity of shapes of type theType in theShape.
11300             """
11301             # Example: see GEOM_TestMeasures.py
11302             listSh = self.SubShapeAllIDs(theShape, theType)
11303             Nb = len(listSh)
11304             return Nb
11305
11306         ## Obtain quantity of shapes of each type in \a theShape.
11307         #  The \a theShape is also counted.
11308         #  @param theShape Shape to be described.
11309         #  @return Dictionary of ShapeType() with bound quantities of shapes.
11310         #
11311         #  @ref tui_measurement_tools_page "Example"
11312         def ShapeInfo (self, theShape):
11313             """
11314             Obtain quantity of shapes of each type in theShape.
11315             The theShape is also counted.
11316
11317             Parameters:
11318                 theShape Shape to be described.
11319
11320             Returns:
11321                 Dictionary of geompy.ShapeType with bound quantities of shapes.
11322             """
11323             # Example: see GEOM_TestMeasures.py
11324             aDict = {}
11325             for typeSh in self.ShapeType:
11326                 if typeSh in ( "AUTO", "SHAPE" ): continue
11327                 listSh = self.SubShapeAllIDs(theShape, self.ShapeType[typeSh])
11328                 Nb = len(listSh)
11329                 aDict[typeSh] = Nb
11330                 pass
11331             return aDict
11332
11333         def GetCreationInformation(self, theShape):
11334             res = ''
11335             infos = theShape.GetCreationInformation()
11336             for info in infos:
11337                 # operationName
11338                 opName = info.operationName
11339                 if not opName: opName = "no info available"
11340                 if res: res += "\n"
11341                 res += "Operation: " + opName
11342                 # parameters
11343                 for parVal in info.params:
11344                     res += "\n \t%s = %s" % ( parVal.name, parVal.value )
11345             return res
11346
11347         ## Get a point, situated at the centre of mass of theShape.
11348         #  @param theShape Shape to define centre of mass of.
11349         #  @param theName Object name; when specified, this parameter is used
11350         #         for result publication in the study. Otherwise, if automatic
11351         #         publication is switched on, default value is used for result name.
11352         #
11353         #  @return New GEOM.GEOM_Object, containing the created point.
11354         #
11355         #  @ref tui_center_of_mass_page "Example"
11356         @ManageTransactions("MeasuOp")
11357         def MakeCDG(self, theShape, theName=None):
11358             """
11359             Get a point, situated at the centre of mass of theShape.
11360
11361             Parameters:
11362                 theShape Shape to define centre of mass of.
11363                 theName Object name; when specified, this parameter is used
11364                         for result publication in the study. Otherwise, if automatic
11365                         publication is switched on, default value is used for result name.
11366
11367             Returns:
11368                 New GEOM.GEOM_Object, containing the created point.
11369             """
11370             # Example: see GEOM_TestMeasures.py
11371             anObj = self.MeasuOp.GetCentreOfMass(theShape)
11372             RaiseIfFailed("GetCentreOfMass", self.MeasuOp)
11373             self._autoPublish(anObj, theName, "centerOfMass")
11374             return anObj
11375
11376         ## Get a vertex sub-shape by index.
11377         #  @param theShape Shape to find sub-shape.
11378         #  @param theIndex Index to find vertex by this index (starting from zero)
11379         #  @param theUseOri To consider edge/wire orientation or not
11380         #  @param theName Object name; when specified, this parameter is used
11381         #         for result publication in the study. Otherwise, if automatic
11382         #         publication is switched on, default value is used for result name.
11383         #
11384         #  @return New GEOM.GEOM_Object, containing the created vertex.
11385         #
11386         #  @ref tui_measurement_tools_page "Example"
11387         @ManageTransactions("MeasuOp")
11388         def GetVertexByIndex(self, theShape, theIndex, theUseOri=True, theName=None):
11389             """
11390             Get a vertex sub-shape by index.
11391
11392             Parameters:
11393                 theShape Shape to find sub-shape.
11394                 theIndex Index to find vertex by this index (starting from zero)
11395                 theUseOri To consider edge/wire orientation or not
11396                 theName Object name; when specified, this parameter is used
11397                         for result publication in the study. Otherwise, if automatic
11398                         publication is switched on, default value is used for result name.
11399
11400             Returns:
11401                 New GEOM.GEOM_Object, containing the created vertex.
11402             """
11403             # Example: see GEOM_TestMeasures.py
11404             if isinstance( theUseOri, str ): # theUseOri was inserted before theName
11405                 theUseOri, theName = True, theUseOri
11406             anObj = self.MeasuOp.GetVertexByIndex(theShape, theIndex, theUseOri)
11407             RaiseIfFailed("GetVertexByIndex", self.MeasuOp)
11408             self._autoPublish(anObj, theName, "vertex")
11409             return anObj
11410
11411         ## Get the first vertex of wire/edge depended orientation.
11412         #  @param theShape Shape to find first vertex.
11413         #  @param theName Object name; when specified, this parameter is used
11414         #         for result publication in the study. Otherwise, if automatic
11415         #         publication is switched on, default value is used for result name.
11416         #
11417         #  @return New GEOM.GEOM_Object, containing the created vertex.
11418         #
11419         #  @ref tui_measurement_tools_page "Example"
11420         def GetFirstVertex(self, theShape, theName=None):
11421             """
11422             Get the first vertex of wire/edge depended orientation.
11423
11424             Parameters:
11425                 theShape Shape to find first vertex.
11426                 theName Object name; when specified, this parameter is used
11427                         for result publication in the study. Otherwise, if automatic
11428                         publication is switched on, default value is used for result name.
11429
11430             Returns:
11431                 New GEOM.GEOM_Object, containing the created vertex.
11432             """
11433             # Example: see GEOM_TestMeasures.py
11434             # note: auto-publishing is done in self.GetVertexByIndex()
11435             return self.GetVertexByIndex(theShape, 0, True, theName)
11436
11437         ## Get the last vertex of wire/edge depended orientation.
11438         #  @param theShape Shape to find last vertex.
11439         #  @param theName Object name; when specified, this parameter is used
11440         #         for result publication in the study. Otherwise, if automatic
11441         #         publication is switched on, default value is used for result name.
11442         #
11443         #  @return New GEOM.GEOM_Object, containing the created vertex.
11444         #
11445         #  @ref tui_measurement_tools_page "Example"
11446         def GetLastVertex(self, theShape, theName=None):
11447             """
11448             Get the last vertex of wire/edge depended orientation.
11449
11450             Parameters:
11451                 theShape Shape to find last vertex.
11452                 theName Object name; when specified, this parameter is used
11453                         for result publication in the study. Otherwise, if automatic
11454                         publication is switched on, default value is used for result name.
11455
11456             Returns:
11457                 New GEOM.GEOM_Object, containing the created vertex.
11458             """
11459             # Example: see GEOM_TestMeasures.py
11460             nb_vert =  self.NumberOfSubShapes(theShape, self.ShapeType["VERTEX"])
11461             # note: auto-publishing is done in self.GetVertexByIndex()
11462             return self.GetVertexByIndex(theShape, (nb_vert-1), True, theName)
11463
11464         ## Get a normale to the given face. If the point is not given,
11465         #  the normale is calculated at the center of mass.
11466         #  @param theFace Face to define normale of.
11467         #  @param theOptionalPoint Point to compute the normale at.
11468         #  @param theName Object name; when specified, this parameter is used
11469         #         for result publication in the study. Otherwise, if automatic
11470         #         publication is switched on, default value is used for result name.
11471         #
11472         #  @return New GEOM.GEOM_Object, containing the created vector.
11473         #
11474         #  @ref swig_todo "Example"
11475         @ManageTransactions("MeasuOp")
11476         def GetNormal(self, theFace, theOptionalPoint = None, theName=None):
11477             """
11478             Get a normale to the given face. If the point is not given,
11479             the normale is calculated at the center of mass.
11480
11481             Parameters:
11482                 theFace Face to define normale of.
11483                 theOptionalPoint Point to compute the normale at.
11484                 theName Object name; when specified, this parameter is used
11485                         for result publication in the study. Otherwise, if automatic
11486                         publication is switched on, default value is used for result name.
11487
11488             Returns:
11489                 New GEOM.GEOM_Object, containing the created vector.
11490             """
11491             # Example: see GEOM_TestMeasures.py
11492             anObj = self.MeasuOp.GetNormal(theFace, theOptionalPoint)
11493             RaiseIfFailed("GetNormal", self.MeasuOp)
11494             self._autoPublish(anObj, theName, "normal")
11495             return anObj
11496
11497         ## Print shape errors obtained from CheckShape.
11498         #  @param theShape Shape that was checked.
11499         #  @param theShapeErrors the shape errors obtained by CheckShape.
11500         #  @param theReturnStatus If 0 the description of problem is printed.
11501         #                         If 1 the description of problem is returned.
11502         #  @return If theReturnStatus is equal to 1 the description is returned.
11503         #          Otherwise doesn't return anything.
11504         #
11505         #  @ref tui_check_shape_page "Example"
11506         @ManageTransactions("MeasuOp")
11507         def PrintShapeErrors(self, theShape, theShapeErrors, theReturnStatus = 0):
11508             """
11509             Print shape errors obtained from CheckShape.
11510
11511             Parameters:
11512                 theShape Shape that was checked.
11513                 theShapeErrors the shape errors obtained by CheckShape.
11514                 theReturnStatus If 0 the description of problem is printed.
11515                                 If 1 the description of problem is returned.
11516
11517             Returns:
11518                 If theReturnStatus is equal to 1 the description is returned.
11519                   Otherwise doesn't return anything.
11520             """
11521             # Example: see GEOM_TestMeasures.py
11522             Descr = self.MeasuOp.PrintShapeErrors(theShape, theShapeErrors)
11523             if theReturnStatus == 1:
11524                 return Descr
11525             print(Descr)
11526             pass
11527
11528         ## Check a topology of the given shape.
11529         #  @param theShape Shape to check validity of.
11530         #  @param theIsCheckGeom If FALSE, only the shape's topology will be checked, \n
11531         #                        if TRUE, the shape's geometry will be checked also.
11532         #  @param theReturnStatus If 0 and if theShape is invalid, a description
11533         #                         of problem is printed.
11534         #                         If 1 isValid flag and the description of
11535         #                         problem is returned.
11536         #                         If 2 isValid flag and the list of error data
11537         #                         is returned.
11538         #  @return TRUE, if the shape "seems to be valid".
11539         #          If theShape is invalid, prints a description of problem.
11540         #          If theReturnStatus is equal to 1 the description is returned
11541         #          along with IsValid flag.
11542         #          If theReturnStatus is equal to 2 the list of error data is
11543         #          returned along with IsValid flag.
11544         #
11545         #  @ref tui_check_shape_page "Example"
11546         @ManageTransactions("MeasuOp")
11547         def CheckShape(self,theShape, theIsCheckGeom = 0, theReturnStatus = 0):
11548             """
11549             Check a topology of the given shape.
11550
11551             Parameters:
11552                 theShape Shape to check validity of.
11553                 theIsCheckGeom If FALSE, only the shape's topology will be checked,
11554                                if TRUE, the shape's geometry will be checked also.
11555                 theReturnStatus If 0 and if theShape is invalid, a description
11556                                 of problem is printed.
11557                                 If 1 IsValid flag and the description of
11558                                 problem is returned.
11559                                 If 2 IsValid flag and the list of error data
11560                                 is returned.
11561
11562             Returns:
11563                 TRUE, if the shape "seems to be valid".
11564                 If theShape is invalid, prints a description of problem.
11565                 If theReturnStatus is equal to 1 the description is returned
11566                 along with IsValid flag.
11567                 If theReturnStatus is equal to 2 the list of error data is
11568                 returned along with IsValid flag.
11569             """
11570             # Example: see GEOM_TestMeasures.py
11571             if theIsCheckGeom:
11572                 (IsValid, ShapeErrors) = self.MeasuOp.CheckShapeWithGeometry(theShape)
11573                 RaiseIfFailed("CheckShapeWithGeometry", self.MeasuOp)
11574             else:
11575                 (IsValid, ShapeErrors) = self.MeasuOp.CheckShape(theShape)
11576                 RaiseIfFailed("CheckShape", self.MeasuOp)
11577             if IsValid == 0:
11578                 if theReturnStatus == 0:
11579                     Descr = self.MeasuOp.PrintShapeErrors(theShape, ShapeErrors)
11580                     print(Descr)
11581             if theReturnStatus == 1:
11582               Descr = self.MeasuOp.PrintShapeErrors(theShape, ShapeErrors)
11583               return (IsValid, Descr)
11584             elif theReturnStatus == 2:
11585               return (IsValid, ShapeErrors)
11586             return IsValid
11587
11588         ## Detect self-intersections in the given shape.
11589         #  @param theShape Shape to check.
11590         #  @param theCheckLevel is the level of self-intersection check.
11591         #         Possible input values are:
11592         #         - GEOM.SI_V_V(0) - only V/V interferences
11593         #         - GEOM.SI_V_E(1) - V/V and V/E interferences
11594         #         - GEOM.SI_E_E(2) - V/V, V/E and E/E interferences
11595         #         - GEOM.SI_V_F(3) - V/V, V/E, E/E and V/F interferences
11596         #         - GEOM.SI_E_F(4) - V/V, V/E, E/E, V/F and E/F interferences
11597         #         - GEOM.SI_ALL(5) - all interferences.
11598         #  @return TRUE, if the shape contains no self-intersections.
11599         #
11600         #  @ref tui_check_self_intersections_page "Example"
11601         @ManageTransactions("MeasuOp")
11602         def CheckSelfIntersections(self, theShape, theCheckLevel = GEOM.SI_ALL):
11603             """
11604             Detect self-intersections in the given shape.
11605
11606             Parameters:
11607                 theShape Shape to check.
11608                 theCheckLevel is the level of self-intersection check.
11609                   Possible input values are:
11610                    - GEOM.SI_V_V(0) - only V/V interferences
11611                    - GEOM.SI_V_E(1) - V/V and V/E interferences
11612                    - GEOM.SI_E_E(2) - V/V, V/E and E/E interferences
11613                    - GEOM.SI_V_F(3) - V/V, V/E, E/E and V/F interferences
11614                    - GEOM.SI_E_F(4) - V/V, V/E, E/E, V/F and E/F interferences
11615                    - GEOM.SI_ALL(5) - all interferences.
11616  
11617             Returns:
11618                 TRUE, if the shape contains no self-intersections.
11619             """
11620             # Example: see GEOM_TestMeasures.py
11621             (IsValid, Pairs) = self.MeasuOp.CheckSelfIntersections(theShape, EnumToLong(theCheckLevel))
11622             RaiseIfFailed("CheckSelfIntersections", self.MeasuOp)
11623             return IsValid
11624
11625         ## Detect self-intersections of the given shape with algorithm based on mesh intersections.
11626         #  @param theShape Shape to check.
11627         #  @param theDeflection Linear deflection coefficient that specifies quality of tessellation:
11628         #         - if \a theDeflection <= 0, default deflection 0.001 is used
11629         #  @param theTolerance Specifies a distance between sub-shapes used for detecting gaps:
11630         #         - if \a theTolerance <= 0, algorithm detects intersections (default behavior)
11631         #         - if \a theTolerance > 0, algorithm detects gaps
11632         #  @return TRUE, if the shape contains no self-intersections.
11633         #
11634         #  @ref tui_check_self_intersections_fast_page "Example"
11635         @ManageTransactions("MeasuOp")
11636         def CheckSelfIntersectionsFast(self, theShape, theDeflection = 0.001, theTolerance = 0.0):
11637             """
11638             Detect self-intersections of the given shape with algorithm based on mesh intersections.
11639
11640             Parameters:
11641                 theShape Shape to check.
11642                 theDeflection Linear deflection coefficient that specifies quality of tessellation:
11643                     - if theDeflection <= 0, default deflection 0.001 is used
11644                 theTolerance Specifies a distance between shapes used for detecting gaps:
11645                     - if theTolerance <= 0, algorithm detects intersections (default behavior)
11646                     - if theTolerance > 0, algorithm detects gaps
11647  
11648             Returns:
11649                 TRUE, if the shape contains no self-intersections.
11650             """
11651             # Example: see GEOM_TestMeasures.py
11652             (IsValid, Pairs) = self.MeasuOp.CheckSelfIntersectionsFast(theShape, theDeflection, theTolerance)
11653             RaiseIfFailed("CheckSelfIntersectionsFast", self.MeasuOp)
11654             return IsValid
11655
11656         ## Check boolean and partition operations arguments.
11657         #  @param theShape the argument of an operation to be checked
11658         #  @return TRUE if the argument is valid for a boolean or partition
11659         #          operation; FALSE otherwise.
11660         @ManageTransactions("MeasuOp")
11661         def CheckBOPArguments(self, theShape):
11662             """
11663             Check boolean and partition operations arguments.
11664
11665             Parameters:
11666                 theShape the argument of an operation to be checked
11667
11668             Returns:
11669                 TRUE if the argument is valid for a boolean or partition
11670                 operation; FALSE otherwise.
11671             """
11672             return self.MeasuOp.CheckBOPArguments(theShape)
11673
11674         ## Detect intersections of the given shapes with algorithm based on mesh intersections.
11675         #  @param theShape1 First source object
11676         #  @param theShape2 Second source object
11677         #  @param theTolerance Specifies a distance between shapes used for detecting gaps:
11678         #         - if \a theTolerance <= 0, algorithm detects intersections (default behavior)
11679         #         - if \a theTolerance > 0, algorithm detects gaps
11680         #  @param theDeflection Linear deflection coefficient that specifies quality of tessellation:
11681         #         - if \a theDeflection <= 0, default deflection 0.001 is used
11682         #  @return TRUE, if there are intersections (gaps) between source shapes
11683         #  @return List of sub-shapes IDs from 1st shape that localize intersection.
11684         #  @return List of sub-shapes IDs from 2nd shape that localize intersection.
11685         #
11686         #  @ref tui_fast_intersection_page "Example"
11687         @ManageTransactions("MeasuOp")
11688         def FastIntersect(self, theShape1, theShape2, theTolerance = 0.0, theDeflection = 0.001):
11689             """
11690             Detect intersections of the given shapes with algorithm based on mesh intersections.
11691
11692             Parameters:
11693                 theShape1 First source object
11694                 theShape2 Second source object
11695                 theTolerance Specifies a distance between shapes used for detecting gaps:
11696                     - if theTolerance <= 0, algorithm detects intersections (default behavior)
11697                     - if theTolerance > 0, algorithm detects gaps
11698                 theDeflection Linear deflection coefficient that specifies quality of tessellation:
11699                     - if theDeflection <= 0, default deflection 0.001 is used
11700  
11701             Returns:
11702                 TRUE, if there are intersections (gaps) between source shapes
11703                 List of sub-shapes IDs from 1st shape that localize intersection.
11704                 List of sub-shapes IDs from 2nd shape that localize intersection.
11705             """
11706             # Example: see GEOM_TestMeasures.py
11707             IsOk, Res1, Res2 = self.MeasuOp.FastIntersect(theShape1, theShape2, theTolerance, theDeflection)
11708             RaiseIfFailed("FastIntersect", self.MeasuOp)
11709             return IsOk, Res1, Res2
11710
11711         ## Get position (LCS) of theShape.
11712         #
11713         #  Origin of the LCS is situated at the shape's center of mass.
11714         #  Axes of the LCS are obtained from shape's location or,
11715         #  if the shape is a planar face, from position of its plane.
11716         #
11717         #  @param theShape Shape to calculate position of.
11718         #  @return [Ox,Oy,Oz, Zx,Zy,Zz, Xx,Xy,Xz].
11719         #          Ox,Oy,Oz: Coordinates of shape's LCS origin.
11720         #          Zx,Zy,Zz: Coordinates of shape's LCS normal(main) direction.
11721         #          Xx,Xy,Xz: Coordinates of shape's LCS X direction.
11722         #
11723         #  @ref swig_todo "Example"
11724         @ManageTransactions("MeasuOp")
11725         def GetPosition(self,theShape):
11726             """
11727             Get position (LCS) of theShape.
11728             Origin of the LCS is situated at the shape's center of mass.
11729             Axes of the LCS are obtained from shape's location or,
11730             if the shape is a planar face, from position of its plane.
11731
11732             Parameters:
11733                 theShape Shape to calculate position of.
11734
11735             Returns:
11736                 [Ox,Oy,Oz, Zx,Zy,Zz, Xx,Xy,Xz].
11737                  Ox,Oy,Oz: Coordinates of shape's LCS origin.
11738                  Zx,Zy,Zz: Coordinates of shape's LCS normal(main) direction.
11739                  Xx,Xy,Xz: Coordinates of shape's LCS X direction.
11740             """
11741             # Example: see GEOM_TestMeasures.py
11742             aTuple = self.MeasuOp.GetPosition(theShape)
11743             RaiseIfFailed("GetPosition", self.MeasuOp)
11744             return aTuple
11745
11746         ## Get kind of theShape.
11747         #
11748         #  @param theShape Shape to get a kind of.
11749         #  @return Returns a kind of shape in terms of <VAR>GEOM.GEOM_IKindOfShape.shape_kind</VAR> enumeration
11750         #          and a list of parameters, describing the shape.
11751         #  @note  Concrete meaning of each value, returned via \a theIntegers
11752         #         or \a theDoubles list depends on the kind() of the shape.
11753         #
11754         #  @ref swig_todo "Example"
11755         @ManageTransactions("MeasuOp")
11756         def KindOfShape(self,theShape):
11757             """
11758             Get kind of theShape.
11759
11760             Parameters:
11761                 theShape Shape to get a kind of.
11762
11763             Returns:
11764                 a kind of shape in terms of GEOM_IKindOfShape.shape_kind enumeration
11765                     and a list of parameters, describing the shape.
11766             Note:
11767                 Concrete meaning of each value, returned via theIntegers
11768                 or theDoubles list depends on the geompy.kind of the shape
11769             """
11770             # Example: see GEOM_TestMeasures.py
11771             aRoughTuple = self.MeasuOp.KindOfShape(theShape)
11772             RaiseIfFailed("KindOfShape", self.MeasuOp)
11773
11774             aKind  = aRoughTuple[0]
11775             anInts = aRoughTuple[1]
11776             aDbls  = aRoughTuple[2]
11777
11778             # Now there is no exception from this rule:
11779             aKindTuple = [aKind] + aDbls + anInts
11780
11781             # If they are we will regroup parameters for such kind of shape.
11782             # For example:
11783             #if aKind == kind.SOME_KIND:
11784             #    #  SOME_KIND     int int double int double double
11785             #    aKindTuple = [aKind, anInts[0], anInts[1], aDbls[0], anInts[2], aDbls[1], aDbls[2]]
11786
11787             return aKindTuple
11788
11789         ## The function takes a single face with holes and returns a list of faces,
11790         #  first of them is the original face without holes, and the other faces are placed
11791         #  on the same surface as the original face but bounded by each hole wire.
11792         #  If the original face has no holes, it will be returned as an output
11793         #  @param theShape Face to perform operation on.
11794         #
11795         #  @return GEOM.ListOfGO, list created faces, where first of them is the original face without holes
11796         @ManageTransactions("MeasuOp")
11797         def PatchFace(self, theShape):
11798             """
11799             The function takes a single face with holes and returns a list of faces,
11800             first of them is the original face without holes, and the other faces are placed
11801             on the same surface as the original face but bounded by each hole wire.
11802             If the original face has no holes, it will be returned as an output
11803
11804             Parameters:
11805                 theShape  Face to perform operation on.
11806
11807             Returns:
11808                 GEOM.ListOfGO, list created faces, where first of them is the original face without holes
11809
11810             Example of usage:
11811                 Circle_1 = geompy.MakeCircle(None, None, 190)
11812                 Circle_2 = geompy.MakeCircle(None, None, 100)
11813                 Face_1 = geompy.MakeFaceWires([Circle_1], 1)
11814                 Face_2 = geompy.MakeFaceWires([Circle_2], 1)
11815                 Cut_1 = geompy.MakeCutList(Face_1, [Face_2], True)
11816                 faces = geompy.PatchFace(Cut_1)
11817             """
11818             aList = self.MeasuOp.PatchFace(theShape)
11819             RaiseIfFailed("PatchFace", self.MeasuOp)
11820             return aList
11821
11822         ## Returns the string that describes if the shell is good for solid.
11823         #  This is a support method for MakeSolid.
11824         #
11825         #  @param theShell the shell to be checked.
11826         #  @return Returns a string that describes the shell validity for
11827         #          solid construction.
11828         @ManageTransactions("MeasuOp")
11829         def _IsGoodForSolid(self, theShell):
11830             """
11831             Returns the string that describes if the shell is good for solid.
11832             This is a support method for MakeSolid.
11833
11834             Parameter:
11835                 theShell the shell to be checked.
11836
11837             Returns:
11838                 Returns a string that describes the shell validity for
11839                 solid construction.
11840             """
11841             aDescr = self.MeasuOp.IsGoodForSolid(theShell)
11842             return aDescr
11843
11844         ## Obtain a canonical recognition interface.
11845         #  @return An instance of
11846         #          @ref canonicalrecognition.CanonicalRecognition "CanonicalRecognition" interface
11847         #
11848         #  @ref tui_3dsketcher_page "Example"
11849         def CanonicalRecognition (self):
11850             """
11851             Obtain a canonical recognition interface.
11852
11853             Example of usage:
11854                 cr = geompy.CanonicalRecognition()
11855                 cr.isLine(aLine, tolerance)
11856             """
11857             cr = CanonicalRecognition (self)
11858             return cr
11859
11860         # end of l2_measure
11861         ## @}
11862
11863         ## @addtogroup l2_import_export
11864         ## @{
11865
11866         ## Import a shape from the BREP, IGES, STEP or other file
11867         #  (depends on given format) with given name.
11868         #
11869         #  Note: this function is deprecated, it is kept for backward compatibility only
11870         #  Use Import<FormatName> instead, where <FormatName> is a name of desirable format to import.
11871         #
11872         #  @param theFileName The file, containing the shape.
11873         #  @param theFormatName Specify format for the file reading.
11874         #         Available formats can be obtained with InsertOp.ImportTranslators() method.
11875         #         If format 'IGES_SCALE' is used instead of 'IGES' or
11876         #            format 'STEP_SCALE' is used instead of 'STEP',
11877         #            length unit will be set to 'meter' and result model will be scaled.
11878         #  @param theName Object name; when specified, this parameter is used
11879         #         for result publication in the study. Otherwise, if automatic
11880         #         publication is switched on, default value is used for result name.
11881         #
11882         #  @return New GEOM.GEOM_Object, containing the imported shape.
11883         #          If material names are imported it returns the list of
11884         #          objects. The first one is the imported object followed by
11885         #          material groups.
11886         #  @note Auto publishing is allowed for the shape itself. Imported
11887         #        material groups are not automatically published.
11888         #
11889         #  @ref swig_Import_Export "Example"
11890         @ManageTransactions("InsertOp")
11891         def ImportFile(self, theFileName, theFormatName, theName=None):
11892             """
11893             Import a shape from the BREP, IGES, STEP or other file
11894             (depends on given format) with given name.
11895
11896             Note: this function is deprecated, it is kept for backward compatibility only
11897             Use Import<FormatName> instead, where <FormatName> is a name of desirable format to import.
11898
11899             Parameters: 
11900                 theFileName The file, containing the shape.
11901                 theFormatName Specify format for the file reading.
11902                     Available formats can be obtained with geompy.InsertOp.ImportTranslators() method.
11903                     If format 'IGES_SCALE' is used instead of 'IGES' or
11904                        format 'STEP_SCALE' is used instead of 'STEP',
11905                        length unit will be set to 'meter' and result model will be scaled.
11906                 theName Object name; when specified, this parameter is used
11907                         for result publication in the study. Otherwise, if automatic
11908                         publication is switched on, default value is used for result name.
11909
11910             Returns:
11911                 New GEOM.GEOM_Object, containing the imported shape.
11912                 If material names are imported it returns the list of
11913                 objects. The first one is the imported object followed by
11914                 material groups.
11915             Note:
11916                 Auto publishing is allowed for the shape itself. Imported
11917                 material groups are not automatically published.
11918             """
11919             # Example: see GEOM_TestOthers.py
11920             print("""
11921             WARNING: Function ImportFile is deprecated, use Import<FormatName> instead,
11922             where <FormatName> is a name of desirable format for importing.
11923             """)
11924             aListObj = self.InsertOp.ImportFile(theFileName, theFormatName)
11925             RaiseIfFailed("ImportFile", self.InsertOp)
11926             aNbObj = len(aListObj)
11927             if aNbObj > 0:
11928                 self._autoPublish(aListObj[0], theName, "imported")
11929             if aNbObj == 1:
11930                 return aListObj[0]
11931             return aListObj
11932
11933         ## Deprecated analog of ImportFile()
11934         def Import(self, theFileName, theFormatName, theName=None):
11935             """
11936             Deprecated analog of geompy.ImportFile, kept for backward compatibility only.
11937             """
11938             # note: auto-publishing is done in self.ImportFile()
11939             return self.ImportFile(theFileName, theFormatName, theName)
11940
11941         ## Read a shape from the binary stream, containing its bounding representation (BRep).
11942         #
11943         #  @note As the byte-stream representing the shape data can be quite large, this method
11944         #  is not automatically dumped to the Python script with the DumpStudy functionality;
11945         #  so please use this method carefully, only for strong reasons.
11946         #  
11947         #  @note GEOM.GEOM_Object.GetShapeStream() method can be used to obtain the shape's
11948         #  data stream.
11949         #
11950         #  @param theStream The BRep binary stream.
11951         #  @param theName Object name; when specified, this parameter is used
11952         #         for result publication in the study. Otherwise, if automatic
11953         #         publication is switched on, default value is used for result name.
11954         #
11955         #  @return New GEOM_Object, containing the shape, read from theStream.
11956         #
11957         #  @ref swig_Import_Export "Example"
11958         @ManageTransactions("InsertOp")
11959         def RestoreShape (self, theStream, theName=None):
11960             """
11961             Read a shape from the binary stream, containing its bounding representation (BRep).
11962
11963             Note:
11964                 shape.GetShapeStream() method can be used to obtain the shape's BRep stream.
11965
11966             Parameters:
11967                 theStream The BRep binary stream.
11968                 theName Object name; when specified, this parameter is used
11969                         for result publication in the study. Otherwise, if automatic
11970                         publication is switched on, default value is used for result name.
11971
11972             Returns:
11973                 New GEOM_Object, containing the shape, read from theStream.
11974             """
11975             # Example: see GEOM_TestOthers.py
11976             if not theStream:
11977                 # this is the workaround to ignore invalid case when data stream is empty
11978                 if int(os.getenv("GEOM_IGNORE_RESTORE_SHAPE", "0")) > 0:
11979                     print("WARNING: Result of RestoreShape is a NULL shape!")
11980                     return None
11981             anObj = self.InsertOp.RestoreShape(theStream)
11982             RaiseIfFailed("RestoreShape", self.InsertOp)
11983             self._autoPublish(anObj, theName, "restored")
11984             return anObj
11985
11986         ## Export the given shape into a file with given name.
11987         #
11988         #  Note: this function is deprecated, it is kept for backward compatibility only
11989         #  Use Export<FormatName> instead, where <FormatName> is a name of desirable format to export.
11990         #
11991         #  @param theObject Shape to be stored in the file.
11992         #  @param theFileName Name of the file to store the given shape in.
11993         #  @param theFormatName Specify format for the shape storage.
11994         #         Available formats can be obtained with
11995         #         geompy.InsertOp.ExportTranslators()[0] method.
11996         #
11997         #  @ref swig_Import_Export "Example"
11998         @ManageTransactions("InsertOp")
11999         def Export(self, theObject, theFileName, theFormatName):
12000             """
12001             Export the given shape into a file with given name.
12002
12003             Note: this function is deprecated, it is kept for backward compatibility only
12004             Use Export<FormatName> instead, where <FormatName> is a name of desirable format to export.
12005             
12006             Parameters: 
12007                 theObject Shape to be stored in the file.
12008                 theFileName Name of the file to store the given shape in.
12009                 theFormatName Specify format for the shape storage.
12010                               Available formats can be obtained with
12011                               geompy.InsertOp.ExportTranslators()[0] method.
12012             """
12013             # Example: see GEOM_TestOthers.py
12014             print("""
12015             WARNING: Function Export is deprecated, use Export<FormatName> instead,
12016             where <FormatName> is a name of desirable format for exporting.
12017             """)
12018             self.InsertOp.Export(theObject, theFileName, theFormatName)
12019             if self.InsertOp.IsDone() == 0:
12020                 raise RuntimeError("Export : " + self.InsertOp.GetErrorCode())
12021                 pass
12022             pass
12023
12024         # end of l2_import_export
12025         ## @}
12026
12027         ## @addtogroup l3_blocks
12028         ## @{
12029
12030         ## Create a quadrangle face from four edges. Order of Edges is not
12031         #  important. It is not necessary that edges share the same vertex.
12032         #  @param E1,E2,E3,E4 Edges for the face bound.
12033         #  @param theName Object name; when specified, this parameter is used
12034         #         for result publication in the study. Otherwise, if automatic
12035         #         publication is switched on, default value is used for result name.
12036         #
12037         #  @return New GEOM.GEOM_Object, containing the created face.
12038         #
12039         #  @ref tui_building_by_blocks_page "Example"
12040         @ManageTransactions("BlocksOp")
12041         def MakeQuad(self, E1, E2, E3, E4, theName=None):
12042             """
12043             Create a quadrangle face from four edges. Order of Edges is not
12044             important. It is not necessary that edges share the same vertex.
12045
12046             Parameters:
12047                 E1,E2,E3,E4 Edges for the face bound.
12048                 theName Object name; when specified, this parameter is used
12049                         for result publication in the study. Otherwise, if automatic
12050                         publication is switched on, default value is used for result name.
12051
12052             Returns:
12053                 New GEOM.GEOM_Object, containing the created face.
12054
12055             Example of usage:
12056                 qface1 = geompy.MakeQuad(edge1, edge2, edge3, edge4)
12057             """
12058             # Example: see GEOM_Spanner.py
12059             anObj = self.BlocksOp.MakeQuad(E1, E2, E3, E4)
12060             RaiseIfFailed("MakeQuad", self.BlocksOp)
12061             self._autoPublish(anObj, theName, "quad")
12062             return anObj
12063
12064         ## Create a quadrangle face on two edges.
12065         #  The missing edges will be built by creating the shortest ones.
12066         #  @param E1,E2 Two opposite edges for the face.
12067         #  @param theName Object name; when specified, this parameter is used
12068         #         for result publication in the study. Otherwise, if automatic
12069         #         publication is switched on, default value is used for result name.
12070         #
12071         #  @return New GEOM.GEOM_Object, containing the created face.
12072         #
12073         #  @ref tui_building_by_blocks_page "Example"
12074         @ManageTransactions("BlocksOp")
12075         def MakeQuad2Edges(self, E1, E2, theName=None):
12076             """
12077             Create a quadrangle face on two edges.
12078             The missing edges will be built by creating the shortest ones.
12079
12080             Parameters:
12081                 E1,E2 Two opposite edges for the face.
12082                 theName Object name; when specified, this parameter is used
12083                         for result publication in the study. Otherwise, if automatic
12084                         publication is switched on, default value is used for result name.
12085
12086             Returns:
12087                 New GEOM.GEOM_Object, containing the created face.
12088
12089             Example of usage:
12090                 # create vertices
12091                 p1 = geompy.MakeVertex(  0.,   0.,   0.)
12092                 p2 = geompy.MakeVertex(150.,  30.,   0.)
12093                 p3 = geompy.MakeVertex(  0., 120.,  50.)
12094                 p4 = geompy.MakeVertex(  0.,  40.,  70.)
12095                 # create edges
12096                 edge1 = geompy.MakeEdge(p1, p2)
12097                 edge2 = geompy.MakeEdge(p3, p4)
12098                 # create a quadrangle face from two edges
12099                 qface2 = geompy.MakeQuad2Edges(edge1, edge2)
12100             """
12101             # Example: see GEOM_Spanner.py
12102             anObj = self.BlocksOp.MakeQuad2Edges(E1, E2)
12103             RaiseIfFailed("MakeQuad2Edges", self.BlocksOp)
12104             self._autoPublish(anObj, theName, "quad")
12105             return anObj
12106
12107         ## Create a quadrangle face with specified corners.
12108         #  The missing edges will be built by creating the shortest ones.
12109         #  @param V1,V2,V3,V4 Corner vertices for the face.
12110         #  @param theName Object name; when specified, this parameter is used
12111         #         for result publication in the study. Otherwise, if automatic
12112         #         publication is switched on, default value is used for result name.
12113         #
12114         #  @return New GEOM.GEOM_Object, containing the created face.
12115         #
12116         #  @ref tui_building_by_blocks_page "Example 1"
12117         #  \n @ref swig_MakeQuad4Vertices "Example 2"
12118         @ManageTransactions("BlocksOp")
12119         def MakeQuad4Vertices(self, V1, V2, V3, V4, theName=None):
12120             """
12121             Create a quadrangle face with specified corners.
12122             The missing edges will be built by creating the shortest ones.
12123
12124             Parameters:
12125                 V1,V2,V3,V4 Corner vertices for the face.
12126                 theName Object name; when specified, this parameter is used
12127                         for result publication in the study. Otherwise, if automatic
12128                         publication is switched on, default value is used for result name.
12129
12130             Returns:
12131                 New GEOM.GEOM_Object, containing the created face.
12132
12133             Example of usage:
12134                 # create vertices
12135                 p1 = geompy.MakeVertex(  0.,   0.,   0.)
12136                 p2 = geompy.MakeVertex(150.,  30.,   0.)
12137                 p3 = geompy.MakeVertex(  0., 120.,  50.)
12138                 p4 = geompy.MakeVertex(  0.,  40.,  70.)
12139                 # create a quadrangle from four points in its corners
12140                 qface3 = geompy.MakeQuad4Vertices(p1, p2, p3, p4)
12141             """
12142             # Example: see GEOM_Spanner.py
12143             anObj = self.BlocksOp.MakeQuad4Vertices(V1, V2, V3, V4)
12144             RaiseIfFailed("MakeQuad4Vertices", self.BlocksOp)
12145             self._autoPublish(anObj, theName, "quad")
12146             return anObj
12147
12148         ## Create a hexahedral solid, bounded by the six given faces. Order of
12149         #  faces is not important. It is not necessary that Faces share the same edge.
12150         #  @param F1,F2,F3,F4,F5,F6 Faces for the hexahedral solid.
12151         #  @param theName Object name; when specified, this parameter is used
12152         #         for result publication in the study. Otherwise, if automatic
12153         #         publication is switched on, default value is used for result name.
12154         #
12155         #  @return New GEOM.GEOM_Object, containing the created solid.
12156         #
12157         #  @ref tui_building_by_blocks_page "Example 1"
12158         #  \n @ref swig_MakeHexa "Example 2"
12159         @ManageTransactions("BlocksOp")
12160         def MakeHexa(self, F1, F2, F3, F4, F5, F6, theName=None):
12161             """
12162             Create a hexahedral solid, bounded by the six given faces. Order of
12163             faces is not important. It is not necessary that Faces share the same edge.
12164
12165             Parameters:
12166                 F1,F2,F3,F4,F5,F6 Faces for the hexahedral solid.
12167                 theName Object name; when specified, this parameter is used
12168                         for result publication in the study. Otherwise, if automatic
12169                         publication is switched on, default value is used for result name.
12170
12171             Returns:
12172                 New GEOM.GEOM_Object, containing the created solid.
12173
12174             Example of usage:
12175                 solid = geompy.MakeHexa(qface1, qface2, qface3, qface4, qface5, qface6)
12176             """
12177             # Example: see GEOM_Spanner.py
12178             anObj = self.BlocksOp.MakeHexa(F1, F2, F3, F4, F5, F6)
12179             RaiseIfFailed("MakeHexa", self.BlocksOp)
12180             self._autoPublish(anObj, theName, "hexa")
12181             return anObj
12182
12183         ## Create a hexahedral solid between two given faces.
12184         #  The missing faces will be built by creating the smallest ones.
12185         #  @param F1,F2 Two opposite faces for the hexahedral solid.
12186         #  @param theName Object name; when specified, this parameter is used
12187         #         for result publication in the study. Otherwise, if automatic
12188         #         publication is switched on, default value is used for result name.
12189         #
12190         #  @return New GEOM.GEOM_Object, containing the created solid.
12191         #
12192         #  @ref tui_building_by_blocks_page "Example 1"
12193         #  \n @ref swig_MakeHexa2Faces "Example 2"
12194         @ManageTransactions("BlocksOp")
12195         def MakeHexa2Faces(self, F1, F2, theName=None):
12196             """
12197             Create a hexahedral solid between two given faces.
12198             The missing faces will be built by creating the smallest ones.
12199
12200             Parameters:
12201                 F1,F2 Two opposite faces for the hexahedral solid.
12202                 theName Object name; when specified, this parameter is used
12203                         for result publication in the study. Otherwise, if automatic
12204                         publication is switched on, default value is used for result name.
12205
12206             Returns:
12207                 New GEOM.GEOM_Object, containing the created solid.
12208
12209             Example of usage:
12210                 solid1 = geompy.MakeHexa2Faces(qface1, qface2)
12211             """
12212             # Example: see GEOM_Spanner.py
12213             anObj = self.BlocksOp.MakeHexa2Faces(F1, F2)
12214             RaiseIfFailed("MakeHexa2Faces", self.BlocksOp)
12215             self._autoPublish(anObj, theName, "hexa")
12216             return anObj
12217
12218         # end of l3_blocks
12219         ## @}
12220
12221         ## @addtogroup l3_blocks_op
12222         ## @{
12223
12224         ## Get a vertex, found in the given shape by its coordinates.
12225         #  @param theShape Block or a compound of blocks.
12226         #  @param theX,theY,theZ Coordinates of the sought vertex.
12227         #  @param theEpsilon Maximum allowed distance between the resulting
12228         #                    vertex and point with the given coordinates.
12229         #  @param theName Object name; when specified, this parameter is used
12230         #         for result publication in the study. Otherwise, if automatic
12231         #         publication is switched on, default value is used for result name.
12232         #
12233         #  @return New GEOM.GEOM_Object, containing the found vertex.
12234         #
12235         #  @ref swig_GetPoint "Example"
12236         @ManageTransactions("BlocksOp")
12237         def GetPoint(self, theShape, theX, theY, theZ, theEpsilon, theName=None):
12238             """
12239             Get a vertex, found in the given shape by its coordinates.
12240
12241             Parameters:
12242                 theShape Block or a compound of blocks.
12243                 theX,theY,theZ Coordinates of the sought vertex.
12244                 theEpsilon Maximum allowed distance between the resulting
12245                            vertex and point with the given coordinates.
12246                 theName Object name; when specified, this parameter is used
12247                         for result publication in the study. Otherwise, if automatic
12248                         publication is switched on, default value is used for result name.
12249
12250             Returns:
12251                 New GEOM.GEOM_Object, containing the found vertex.
12252
12253             Example of usage:
12254                 pnt = geompy.GetPoint(shape, -50,  50,  50, 0.01)
12255             """
12256             # Example: see GEOM_TestOthers.py
12257             anObj = self.BlocksOp.GetPoint(theShape, theX, theY, theZ, theEpsilon)
12258             RaiseIfFailed("GetPoint", self.BlocksOp)
12259             self._autoPublish(anObj, theName, "vertex")
12260             return anObj
12261
12262         ## Find a vertex of the given shape, which has minimal distance to the given point.
12263         #  @param theShape Any shape.
12264         #  @param thePoint Point, close to the desired vertex.
12265         #  @param theName Object name; when specified, this parameter is used
12266         #         for result publication in the study. Otherwise, if automatic
12267         #         publication is switched on, default value is used for result name.
12268         #
12269         #  @return New GEOM.GEOM_Object, containing the found vertex.
12270         #
12271         #  @ref swig_GetVertexNearPoint "Example"
12272         @ManageTransactions("BlocksOp")
12273         def GetVertexNearPoint(self, theShape, thePoint, theName=None):
12274             """
12275             Find a vertex of the given shape, which has minimal distance to the given point.
12276
12277             Parameters:
12278                 theShape Any shape.
12279                 thePoint Point, close to the desired vertex.
12280                 theName Object name; when specified, this parameter is used
12281                         for result publication in the study. Otherwise, if automatic
12282                         publication is switched on, default value is used for result name.
12283
12284             Returns:
12285                 New GEOM.GEOM_Object, containing the found vertex.
12286
12287             Example of usage:
12288                 pmidle = geompy.MakeVertex(50, 0, 50)
12289                 edge1 = geompy.GetEdgeNearPoint(blocksComp, pmidle)
12290             """
12291             # Example: see GEOM_TestOthers.py
12292             anObj = self.BlocksOp.GetVertexNearPoint(theShape, thePoint)
12293             RaiseIfFailed("GetVertexNearPoint", self.BlocksOp)
12294             self._autoPublish(anObj, theName, "vertex")
12295             return anObj
12296
12297         ## Get an edge, found in the given shape by two given vertices.
12298         #  @param theShape Block or a compound of blocks.
12299         #  @param thePoint1,thePoint2 Points, close to the ends of the desired edge.
12300         #  @param theName Object name; when specified, this parameter is used
12301         #         for result publication in the study. Otherwise, if automatic
12302         #         publication is switched on, default value is used for result name.
12303         #
12304         #  @return New GEOM.GEOM_Object, containing the found edge.
12305         #
12306         #  @ref swig_GetEdge "Example"
12307         @ManageTransactions("BlocksOp")
12308         def GetEdge(self, theShape, thePoint1, thePoint2, theName=None):
12309             """
12310             Get an edge, found in the given shape by two given vertices.
12311
12312             Parameters:
12313                 theShape Block or a compound of blocks.
12314                 thePoint1,thePoint2 Points, close to the ends of the desired edge.
12315                 theName Object name; when specified, this parameter is used
12316                         for result publication in the study. Otherwise, if automatic
12317                         publication is switched on, default value is used for result name.
12318
12319             Returns:
12320                 New GEOM.GEOM_Object, containing the found edge.
12321             """
12322             # Example: see GEOM_Spanner.py
12323             anObj = self.BlocksOp.GetEdge(theShape, thePoint1, thePoint2)
12324             RaiseIfFailed("GetEdge", self.BlocksOp)
12325             self._autoPublish(anObj, theName, "edge")
12326             return anObj
12327
12328         ## Find an edge of the given shape, which has minimal distance to the given point.
12329         #  @param theShape Block or a compound of blocks.
12330         #  @param thePoint Point, close to the desired edge.
12331         #  @param theName Object name; when specified, this parameter is used
12332         #         for result publication in the study. Otherwise, if automatic
12333         #         publication is switched on, default value is used for result name.
12334         #
12335         #  @return New GEOM.GEOM_Object, containing the found edge.
12336         #
12337         #  @ref swig_GetEdgeNearPoint "Example"
12338         @ManageTransactions("BlocksOp")
12339         def GetEdgeNearPoint(self, theShape, thePoint, theName=None):
12340             """
12341             Find an edge of the given shape, which has minimal distance to the given point.
12342
12343             Parameters:
12344                 theShape Block or a compound of blocks.
12345                 thePoint Point, close to the desired edge.
12346                 theName Object name; when specified, this parameter is used
12347                         for result publication in the study. Otherwise, if automatic
12348                         publication is switched on, default value is used for result name.
12349
12350             Returns:
12351                 New GEOM.GEOM_Object, containing the found edge.
12352             """
12353             # Example: see GEOM_TestOthers.py
12354             anObj = self.BlocksOp.GetEdgeNearPoint(theShape, thePoint)
12355             RaiseIfFailed("GetEdgeNearPoint", self.BlocksOp)
12356             self._autoPublish(anObj, theName, "edge")
12357             return anObj
12358
12359         ## Returns a face, found in the given shape by four given corner vertices.
12360         #  @param theShape Block or a compound of blocks.
12361         #  @param thePoint1,thePoint2,thePoint3,thePoint4 Points, close to the corners of the desired face.
12362         #  @param theName Object name; when specified, this parameter is used
12363         #         for result publication in the study. Otherwise, if automatic
12364         #         publication is switched on, default value is used for result name.
12365         #
12366         #  @return New GEOM.GEOM_Object, containing the found face.
12367         #
12368         #  @ref swig_todo "Example"
12369         @ManageTransactions("BlocksOp")
12370         def GetFaceByPoints(self, theShape, thePoint1, thePoint2, thePoint3, thePoint4, theName=None):
12371             """
12372             Returns a face, found in the given shape by four given corner vertices.
12373
12374             Parameters:
12375                 theShape Block or a compound of blocks.
12376                 thePoint1,thePoint2,thePoint3,thePoint4 Points, close to the corners of the desired face.
12377                 theName Object name; when specified, this parameter is used
12378                         for result publication in the study. Otherwise, if automatic
12379                         publication is switched on, default value is used for result name.
12380
12381             Returns:
12382                 New GEOM.GEOM_Object, containing the found face.
12383             """
12384             # Example: see GEOM_Spanner.py
12385             anObj = self.BlocksOp.GetFaceByPoints(theShape, thePoint1, thePoint2, thePoint3, thePoint4)
12386             RaiseIfFailed("GetFaceByPoints", self.BlocksOp)
12387             self._autoPublish(anObj, theName, "face")
12388             return anObj
12389
12390         ## Get a face of block, found in the given shape by two given edges.
12391         #  @param theShape Block or a compound of blocks.
12392         #  @param theEdge1,theEdge2 Edges, close to the edges of the desired face.
12393         #  @param theName Object name; when specified, this parameter is used
12394         #         for result publication in the study. Otherwise, if automatic
12395         #         publication is switched on, default value is used for result name.
12396         #
12397         #  @return New GEOM.GEOM_Object, containing the found face.
12398         #
12399         #  @ref swig_todo "Example"
12400         @ManageTransactions("BlocksOp")
12401         def GetFaceByEdges(self, theShape, theEdge1, theEdge2, theName=None):
12402             """
12403             Get a face of block, found in the given shape by two given edges.
12404
12405             Parameters:
12406                 theShape Block or a compound of blocks.
12407                 theEdge1,theEdge2 Edges, close to the edges of the desired face.
12408                 theName Object name; when specified, this parameter is used
12409                         for result publication in the study. Otherwise, if automatic
12410                         publication is switched on, default value is used for result name.
12411
12412             Returns:
12413                 New GEOM.GEOM_Object, containing the found face.
12414             """
12415             # Example: see GEOM_Spanner.py
12416             anObj = self.BlocksOp.GetFaceByEdges(theShape, theEdge1, theEdge2)
12417             RaiseIfFailed("GetFaceByEdges", self.BlocksOp)
12418             self._autoPublish(anObj, theName, "face")
12419             return anObj
12420
12421         ## Find a face, opposite to the given one in the given block.
12422         #  @param theBlock Must be a hexahedral solid.
12423         #  @param theFace Face of \a theBlock, opposite to the desired face.
12424         #  @param theName Object name; when specified, this parameter is used
12425         #         for result publication in the study. Otherwise, if automatic
12426         #         publication is switched on, default value is used for result name.
12427         #
12428         #  @return New GEOM.GEOM_Object, containing the found face.
12429         #
12430         #  @ref swig_GetOppositeFace "Example"
12431         @ManageTransactions("BlocksOp")
12432         def GetOppositeFace(self, theBlock, theFace, theName=None):
12433             """
12434             Find a face, opposite to the given one in the given block.
12435
12436             Parameters:
12437                 theBlock Must be a hexahedral solid.
12438                 theFace Face of theBlock, opposite to the desired face.
12439                 theName Object name; when specified, this parameter is used
12440                         for result publication in the study. Otherwise, if automatic
12441                         publication is switched on, default value is used for result name.
12442
12443             Returns:
12444                 New GEOM.GEOM_Object, containing the found face.
12445             """
12446             # Example: see GEOM_Spanner.py
12447             anObj = self.BlocksOp.GetOppositeFace(theBlock, theFace)
12448             RaiseIfFailed("GetOppositeFace", self.BlocksOp)
12449             self._autoPublish(anObj, theName, "face")
12450             return anObj
12451
12452         ## Find a face of the given shape, which has minimal distance to the given point.
12453         #  @param theShape Block or a compound of blocks.
12454         #  @param thePoint Point, close to the desired face.
12455         #  @param theName Object name; when specified, this parameter is used
12456         #         for result publication in the study. Otherwise, if automatic
12457         #         publication is switched on, default value is used for result name.
12458         #
12459         #  @return New GEOM.GEOM_Object, containing the found face.
12460         #
12461         #  @ref swig_GetFaceNearPoint "Example"
12462         @ManageTransactions("BlocksOp")
12463         def GetFaceNearPoint(self, theShape, thePoint, theName=None):
12464             """
12465             Find a face of the given shape, which has minimal distance to the given point.
12466
12467             Parameters:
12468                 theShape Block or a compound of blocks.
12469                 thePoint Point, close to the desired face.
12470                 theName Object name; when specified, this parameter is used
12471                         for result publication in the study. Otherwise, if automatic
12472                         publication is switched on, default value is used for result name.
12473
12474             Returns:
12475                 New GEOM.GEOM_Object, containing the found face.
12476             """
12477             # Example: see GEOM_Spanner.py
12478             anObj = self.BlocksOp.GetFaceNearPoint(theShape, thePoint)
12479             RaiseIfFailed("GetFaceNearPoint", self.BlocksOp)
12480             self._autoPublish(anObj, theName, "face")
12481             return anObj
12482
12483         ## Find a face of block, whose outside normale has minimal angle with the given vector.
12484         #  @param theBlock Block or a compound of blocks.
12485         #  @param theVector Vector, close to the normale of the desired face.
12486         #  @param theName Object name; when specified, this parameter is used
12487         #         for result publication in the study. Otherwise, if automatic
12488         #         publication is switched on, default value is used for result name.
12489         #
12490         #  @return New GEOM.GEOM_Object, containing the found face.
12491         #
12492         #  @ref swig_todo "Example"
12493         @ManageTransactions("BlocksOp")
12494         def GetFaceByNormale(self, theBlock, theVector, theName=None):
12495             """
12496             Find a face of block, whose outside normale has minimal angle with the given vector.
12497
12498             Parameters:
12499                 theBlock Block or a compound of blocks.
12500                 theVector Vector, close to the normale of the desired face.
12501                 theName Object name; when specified, this parameter is used
12502                         for result publication in the study. Otherwise, if automatic
12503                         publication is switched on, default value is used for result name.
12504
12505             Returns:
12506                 New GEOM.GEOM_Object, containing the found face.
12507             """
12508             # Example: see GEOM_Spanner.py
12509             anObj = self.BlocksOp.GetFaceByNormale(theBlock, theVector)
12510             RaiseIfFailed("GetFaceByNormale", self.BlocksOp)
12511             self._autoPublish(anObj, theName, "face")
12512             return anObj
12513
12514         ## Find all sub-shapes of type \a theShapeType of the given shape,
12515         #  which have minimal distance to the given point.
12516         #  @param theShape Any shape.
12517         #  @param thePoint Point, close to the desired shape.
12518         #  @param theShapeType Defines what kind of sub-shapes is searched GEOM::shape_type
12519         #  @param theTolerance The tolerance for distances comparison. All shapes
12520         #                      with distances to the given point in interval
12521         #                      [minimal_distance, minimal_distance + theTolerance] will be gathered.
12522         #  @param theName Object name; when specified, this parameter is used
12523         #         for result publication in the study. Otherwise, if automatic
12524         #         publication is switched on, default value is used for result name.
12525         #
12526         #  @return New GEOM_Object, containing a group of all found shapes.
12527         #
12528         #  @ref swig_GetShapesNearPoint "Example"
12529         @ManageTransactions("BlocksOp")
12530         def GetShapesNearPoint(self, theShape, thePoint, theShapeType, theTolerance = 1e-07, theName=None):
12531             """
12532             Find all sub-shapes of type theShapeType of the given shape,
12533             which have minimal distance to the given point.
12534
12535             Parameters:
12536                 theShape Any shape.
12537                 thePoint Point, close to the desired shape.
12538                 theShapeType Defines what kind of sub-shapes is searched (see GEOM::shape_type)
12539                 theTolerance The tolerance for distances comparison. All shapes
12540                                 with distances to the given point in interval
12541                                 [minimal_distance, minimal_distance + theTolerance] will be gathered.
12542                 theName Object name; when specified, this parameter is used
12543                         for result publication in the study. Otherwise, if automatic
12544                         publication is switched on, default value is used for result name.
12545
12546             Returns:
12547                 New GEOM_Object, containing a group of all found shapes.
12548             """
12549             # Example: see GEOM_TestOthers.py
12550             anObj = self.BlocksOp.GetShapesNearPoint(theShape, thePoint, theShapeType, theTolerance)
12551             RaiseIfFailed("GetShapesNearPoint", self.BlocksOp)
12552             self._autoPublish(anObj, theName, "group")
12553             return anObj
12554
12555         # end of l3_blocks_op
12556         ## @}
12557
12558         ## @addtogroup l4_blocks_measure
12559         ## @{
12560
12561         ## Check, if the compound of blocks is given.
12562         #  To be considered as a compound of blocks, the
12563         #  given shape must satisfy the following conditions:
12564         #  - Each element of the compound should be a Block (6 faces).
12565         #  - Each face should be a quadrangle, i.e. it should have only 1 wire
12566         #       with 4 edges. If <VAR>theIsUseC1</VAR> is set to True and
12567         #       there are more than 4 edges in the only wire of a face,
12568         #       this face is considered to be quadrangle if it has 4 bounds
12569         #       (1 or more edge) of C1 continuity.
12570         #  - A connection between two Blocks should be an entire quadrangle face or an entire edge.
12571         #  - The compound should be connexe.
12572         #  - The glue between two quadrangle faces should be applied.
12573         #  @param theCompound The compound to check.
12574         #  @param theIsUseC1 Flag to check if there are 4 bounds on a face
12575         #         taking into account C1 continuity.
12576         #  @param theAngTolerance the angular tolerance to check if two neighbor
12577         #         edges are codirectional in the common vertex with this
12578         #         tolerance. This parameter is used only if
12579         #         <VAR>theIsUseC1</VAR> is set to True.
12580         #  @return TRUE, if the given shape is a compound of blocks.
12581         #  If theCompound is not valid, prints all discovered errors.
12582         #
12583         #  @ref tui_check_compound_of_blocks_page "Example 1"
12584         #  \n @ref swig_CheckCompoundOfBlocks "Example 2"
12585         @ManageTransactions("BlocksOp")
12586         def CheckCompoundOfBlocks(self,theCompound, theIsUseC1 = False,
12587                                   theAngTolerance = 1.e-12):
12588             """
12589             Check, if the compound of blocks is given.
12590             To be considered as a compound of blocks, the
12591             given shape must satisfy the following conditions:
12592             - Each element of the compound should be a Block (6 faces).
12593             - Each face should be a quadrangle, i.e. it should have only 1 wire
12594                  with 4 edges. If theIsUseC1 is set to True and
12595                  there are more than 4 edges in the only wire of a face,
12596                  this face is considered to be quadrangle if it has 4 bounds
12597                  (1 or more edge) of C1 continuity.
12598             - A connection between two Blocks should be an entire quadrangle face or an entire edge.
12599             - The compound should be connexe.
12600             - The glue between two quadrangle faces should be applied.
12601
12602             Parameters:
12603                 theCompound The compound to check.
12604                 theIsUseC1 Flag to check if there are 4 bounds on a face
12605                            taking into account C1 continuity.
12606                 theAngTolerance the angular tolerance to check if two neighbor
12607                            edges are codirectional in the common vertex with this
12608                            tolerance. This parameter is used only if
12609                            theIsUseC1 is set to True.
12610
12611             Returns:
12612                 TRUE, if the given shape is a compound of blocks.
12613                 If theCompound is not valid, prints all discovered errors.
12614             """
12615             # Example: see GEOM_Spanner.py
12616             aTolerance = -1.0
12617             if theIsUseC1:
12618                 aTolerance = theAngTolerance
12619             (IsValid, BCErrors) = self.BlocksOp.CheckCompoundOfBlocks(theCompound, aTolerance)
12620             RaiseIfFailed("CheckCompoundOfBlocks", self.BlocksOp)
12621             if IsValid == 0:
12622                 Descr = self.BlocksOp.PrintBCErrors(theCompound, BCErrors)
12623                 print(Descr)
12624             return IsValid
12625
12626         ## Retrieve all non blocks solids and faces from \a theShape.
12627         #  @param theShape The shape to explore.
12628         #  @param theIsUseC1 Flag to check if there are 4 bounds on a face
12629         #         taking into account C1 continuity.
12630         #  @param theAngTolerance the angular tolerance to check if two neighbor
12631         #         edges are codirectional in the common vertex with this
12632         #         tolerance. This parameter is used only if
12633         #         <VAR>theIsUseC1</VAR> is set to True.
12634         #  @param theName Object name; when specified, this parameter is used
12635         #         for result publication in the study. Otherwise, if automatic
12636         #         publication is switched on, default value is used for result name.
12637         #
12638         #  @return A tuple of two GEOM_Objects. The first object is a group of all
12639         #          non block solids (= not 6 faces, or with 6 faces, but with the
12640         #          presence of non-quadrangular faces). The second object is a
12641         #          group of all non quadrangular faces (= faces with more then
12642         #          1 wire or, if <VAR>theIsUseC1</VAR> is set to True, faces
12643         #          with 1 wire with not 4 edges that do not form 4 bounds of
12644         #          C1 continuity).
12645         #
12646         #  @ref tui_get_non_blocks_page "Example 1"
12647         #  \n @ref swig_GetNonBlocks "Example 2"
12648         @ManageTransactions("BlocksOp")
12649         def GetNonBlocks (self, theShape, theIsUseC1 = False,
12650                           theAngTolerance = 1.e-12, theName=None):
12651             """
12652             Retrieve all non blocks solids and faces from theShape.
12653
12654             Parameters:
12655                 theShape The shape to explore.
12656                 theIsUseC1 Flag to check if there are 4 bounds on a face
12657                            taking into account C1 continuity.
12658                 theAngTolerance the angular tolerance to check if two neighbor
12659                            edges are codirectional in the common vertex with this
12660                            tolerance. This parameter is used only if
12661                            theIsUseC1 is set to True.
12662                 theName Object name; when specified, this parameter is used
12663                         for result publication in the study. Otherwise, if automatic
12664                         publication is switched on, default value is used for result name.
12665
12666             Returns:
12667                 A tuple of two GEOM_Objects. The first object is a group of all
12668                 non block solids (= not 6 faces, or with 6 faces, but with the
12669                 presence of non-quadrangular faces). The second object is a
12670                 group of all non quadrangular faces (= faces with more then
12671                 1 wire or, if <VAR>theIsUseC1</VAR> is set to True, faces
12672                 with 1 wire with not 4 edges that do not form 4 bounds of
12673                 C1 continuity).
12674
12675             Usage:
12676                 (res_sols, res_faces) = geompy.GetNonBlocks(myShape1)
12677             """
12678             # Example: see GEOM_Spanner.py
12679             aTolerance = -1.0
12680             if theIsUseC1:
12681                 aTolerance = theAngTolerance
12682             aTuple = self.BlocksOp.GetNonBlocks(theShape, aTolerance)
12683             RaiseIfFailed("GetNonBlocks", self.BlocksOp)
12684             self._autoPublish(aTuple, theName, ("groupNonHexas", "groupNonQuads"))
12685             return aTuple
12686
12687         ## Remove all seam and degenerated edges from \a theShape.
12688         #  Unite faces and edges, sharing one surface. It means that
12689         #  this faces must have references to one C++ surface object (handle).
12690         #  @param theShape The compound or single solid to remove irregular edges from.
12691         #  @param doUnionFaces If True, then unite faces. If False (the default value),
12692         #         do not unite faces.
12693         #  @param theName Object name; when specified, this parameter is used
12694         #         for result publication in the study. Otherwise, if automatic
12695         #         publication is switched on, default value is used for result name.
12696         #
12697         #  @return Improved shape.
12698         #
12699         #  @ref swig_RemoveExtraEdges "Example"
12700         @ManageTransactions("BlocksOp")
12701         def RemoveExtraEdges(self, theShape, doUnionFaces=False, theName=None):
12702             """
12703             Remove all seam and degenerated edges from theShape.
12704             Unite faces and edges, sharing one surface. It means that
12705             this faces must have references to one C++ surface object (handle).
12706
12707             Parameters:
12708                 theShape The compound or single solid to remove irregular edges from.
12709                 doUnionFaces If True, then unite faces. If False (the default value),
12710                              do not unite faces.
12711                 theName Object name; when specified, this parameter is used
12712                         for result publication in the study. Otherwise, if automatic
12713                         publication is switched on, default value is used for result name.
12714
12715             Returns:
12716                 Improved shape.
12717             """
12718             # Example: see GEOM_TestOthers.py
12719             nbFacesOptimum = -1 # -1 means do not unite faces
12720             if doUnionFaces is True: nbFacesOptimum = 0 # 0 means unite faces
12721             anObj = self.BlocksOp.RemoveExtraEdges(theShape, nbFacesOptimum)
12722             RaiseIfFailed("RemoveExtraEdges", self.BlocksOp)
12723             self._autoPublish(anObj, theName, "removeExtraEdges")
12724             return anObj
12725
12726         ## Performs union faces of \a theShape
12727         #  Unite faces sharing one surface. It means that
12728         #  these faces must have references to one C++ surface object (handle).
12729         #  @param theShape The compound or single solid that contains faces
12730         #         to perform union.
12731         #  @param theName Object name; when specified, this parameter is used
12732         #         for result publication in the study. Otherwise, if automatic
12733         #         publication is switched on, default value is used for result name.
12734         #
12735         #  @return Improved shape.
12736         #
12737         #  @ref swig_UnionFaces "Example"
12738         @ManageTransactions("BlocksOp")
12739         def UnionFaces(self, theShape, theName=None):
12740             """
12741             Performs union faces of theShape.
12742             Unite faces sharing one surface. It means that
12743             these faces must have references to one C++ surface object (handle).
12744
12745             Parameters:
12746                 theShape The compound or single solid that contains faces
12747                          to perform union.
12748                 theName Object name; when specified, this parameter is used
12749                         for result publication in the study. Otherwise, if automatic
12750                         publication is switched on, default value is used for result name.
12751
12752             Returns:
12753                 Improved shape.
12754             """
12755             # Example: see GEOM_TestOthers.py
12756             anObj = self.BlocksOp.UnionFaces(theShape)
12757             RaiseIfFailed("UnionFaces", self.BlocksOp)
12758             self._autoPublish(anObj, theName, "unionFaces")
12759             return anObj
12760
12761         ## Check, if the given shape is a blocks compound.
12762         #  Fix all detected errors.
12763         #    \note Single block can be also fixed by this method.
12764         #  @param theShape The compound to check and improve.
12765         #  @param theName Object name; when specified, this parameter is used
12766         #         for result publication in the study. Otherwise, if automatic
12767         #         publication is switched on, default value is used for result name.
12768         #
12769         #  @return Improved compound.
12770         #
12771         #  @ref swig_CheckAndImprove "Example"
12772         @ManageTransactions("BlocksOp")
12773         def CheckAndImprove(self, theShape, theName=None):
12774             """
12775             Check, if the given shape is a blocks compound.
12776             Fix all detected errors.
12777
12778             Note:
12779                 Single block can be also fixed by this method.
12780
12781             Parameters:
12782                 theShape The compound to check and improve.
12783                 theName Object name; when specified, this parameter is used
12784                         for result publication in the study. Otherwise, if automatic
12785                         publication is switched on, default value is used for result name.
12786
12787             Returns:
12788                 Improved compound.
12789             """
12790             # Example: see GEOM_TestOthers.py
12791             anObj = self.BlocksOp.CheckAndImprove(theShape)
12792             RaiseIfFailed("CheckAndImprove", self.BlocksOp)
12793             self._autoPublish(anObj, theName, "improved")
12794             return anObj
12795
12796         # end of l4_blocks_measure
12797         ## @}
12798
12799         ## @addtogroup l3_blocks_op
12800         ## @{
12801
12802         ## Get all the blocks, contained in the given compound.
12803         #  @param theCompound The compound to explode.
12804         #  @param theMinNbFaces If solid has lower number of faces, it is not a block.
12805         #  @param theMaxNbFaces If solid has higher number of faces, it is not a block.
12806         #  @param theName Object name; when specified, this parameter is used
12807         #         for result publication in the study. Otherwise, if automatic
12808         #         publication is switched on, default value is used for result name.
12809         #
12810         #  @note If theMaxNbFaces = 0, the maximum number of faces is not restricted.
12811         #
12812         #  @return List of GEOM.GEOM_Object, containing the retrieved blocks.
12813         #
12814         #  @ref tui_explode_on_blocks "Example 1"
12815         #  \n @ref swig_MakeBlockExplode "Example 2"
12816         @ManageTransactions("BlocksOp")
12817         def MakeBlockExplode(self, theCompound, theMinNbFaces, theMaxNbFaces, theName=None):
12818             """
12819             Get all the blocks, contained in the given compound.
12820
12821             Parameters:
12822                 theCompound The compound to explode.
12823                 theMinNbFaces If solid has lower number of faces, it is not a block.
12824                 theMaxNbFaces If solid has higher number of faces, it is not a block.
12825                 theName Object name; when specified, this parameter is used
12826                         for result publication in the study. Otherwise, if automatic
12827                         publication is switched on, default value is used for result name.
12828
12829             Note:
12830                 If theMaxNbFaces = 0, the maximum number of faces is not restricted.
12831
12832             Returns:
12833                 List of GEOM.GEOM_Object, containing the retrieved blocks.
12834             """
12835             # Example: see GEOM_TestOthers.py
12836             theMinNbFaces,theMaxNbFaces,Parameters = ParseParameters(theMinNbFaces,theMaxNbFaces)
12837             aList = self.BlocksOp.ExplodeCompoundOfBlocks(theCompound, theMinNbFaces, theMaxNbFaces)
12838             RaiseIfFailed("ExplodeCompoundOfBlocks", self.BlocksOp)
12839             for anObj in aList:
12840                 anObj.SetParameters(Parameters)
12841                 pass
12842             self._autoPublish(aList, theName, "block")
12843             return aList
12844
12845         ## Find block, containing the given point inside its volume or on boundary.
12846         #  @param theCompound Compound, to find block in.
12847         #  @param thePoint Point, close to the desired block. If the point lays on
12848         #         boundary between some blocks, we return block with nearest center.
12849         #  @param theName Object name; when specified, this parameter is used
12850         #         for result publication in the study. Otherwise, if automatic
12851         #         publication is switched on, default value is used for result name.
12852         #
12853         #  @return New GEOM.GEOM_Object, containing the found block.
12854         #
12855         #  @ref swig_todo "Example"
12856         @ManageTransactions("BlocksOp")
12857         def GetBlockNearPoint(self, theCompound, thePoint, theName=None):
12858             """
12859             Find block, containing the given point inside its volume or on boundary.
12860
12861             Parameters:
12862                 theCompound Compound, to find block in.
12863                 thePoint Point, close to the desired block. If the point lays on
12864                          boundary between some blocks, we return block with nearest center.
12865                 theName Object name; when specified, this parameter is used
12866                         for result publication in the study. Otherwise, if automatic
12867                         publication is switched on, default value is used for result name.
12868
12869             Returns:
12870                 New GEOM.GEOM_Object, containing the found block.
12871             """
12872             # Example: see GEOM_Spanner.py
12873             anObj = self.BlocksOp.GetBlockNearPoint(theCompound, thePoint)
12874             RaiseIfFailed("GetBlockNearPoint", self.BlocksOp)
12875             self._autoPublish(anObj, theName, "block")
12876             return anObj
12877
12878         ## Find block, containing all the elements, passed as the parts, or maximum quantity of them.
12879         #  @param theCompound Compound, to find block in.
12880         #  @param theParts List of faces and/or edges and/or vertices to be parts of the found block.
12881         #  @param theName Object name; when specified, this parameter is used
12882         #         for result publication in the study. Otherwise, if automatic
12883         #         publication is switched on, default value is used for result name.
12884         #
12885         #  @return New GEOM.GEOM_Object, containing the found block.
12886         #
12887         #  @ref swig_GetBlockByParts "Example"
12888         @ManageTransactions("BlocksOp")
12889         def GetBlockByParts(self, theCompound, theParts, theName=None):
12890             """
12891              Find block, containing all the elements, passed as the parts, or maximum quantity of them.
12892
12893              Parameters:
12894                 theCompound Compound, to find block in.
12895                 theParts List of faces and/or edges and/or vertices to be parts of the found block.
12896                 theName Object name; when specified, this parameter is used
12897                         for result publication in the study. Otherwise, if automatic
12898                         publication is switched on, default value is used for result name.
12899
12900             Returns:
12901                 New GEOM_Object, containing the found block.
12902             """
12903             # Example: see GEOM_TestOthers.py
12904             anObj = self.BlocksOp.GetBlockByParts(theCompound, theParts)
12905             RaiseIfFailed("GetBlockByParts", self.BlocksOp)
12906             self._autoPublish(anObj, theName, "block")
12907             return anObj
12908
12909         ## Return all blocks, containing all the elements, passed as the parts.
12910         #  @param theCompound Compound, to find blocks in.
12911         #  @param theParts List of faces and/or edges and/or vertices to be parts of the found blocks.
12912         #  @param theName Object name; when specified, this parameter is used
12913         #         for result publication in the study. Otherwise, if automatic
12914         #         publication is switched on, default value is used for result name.
12915         #
12916         #  @return List of GEOM.GEOM_Object, containing the found blocks.
12917         #
12918         #  @ref swig_todo "Example"
12919         @ManageTransactions("BlocksOp")
12920         def GetBlocksByParts(self, theCompound, theParts, theName=None):
12921             """
12922             Return all blocks, containing all the elements, passed as the parts.
12923
12924             Parameters:
12925                 theCompound Compound, to find blocks in.
12926                 theParts List of faces and/or edges and/or vertices to be parts of the found blocks.
12927                 theName Object name; when specified, this parameter is used
12928                         for result publication in the study. Otherwise, if automatic
12929                         publication is switched on, default value is used for result name.
12930
12931             Returns:
12932                 List of GEOM.GEOM_Object, containing the found blocks.
12933             """
12934             # Example: see GEOM_Spanner.py
12935             aList = self.BlocksOp.GetBlocksByParts(theCompound, theParts)
12936             RaiseIfFailed("GetBlocksByParts", self.BlocksOp)
12937             self._autoPublish(aList, theName, "block")
12938             return aList
12939
12940         ## Multi-transformate block and glue the result.
12941         #  Transformation is defined so, as to superpose direction faces.
12942         #  @param Block Hexahedral solid to be multi-transformed.
12943         #  @param DirFace1 ID of First direction face.
12944         #  @param DirFace2 ID of Second direction face.
12945         #  @param NbTimes Quantity of transformations to be done.
12946         #  @param theName Object name; when specified, this parameter is used
12947         #         for result publication in the study. Otherwise, if automatic
12948         #         publication is switched on, default value is used for result name.
12949         #
12950         #  @note Unique ID of sub-shape can be obtained, using method GetSubShapeID().
12951         #
12952         #  @return New GEOM.GEOM_Object, containing the result shape.
12953         #
12954         #  @ref tui_multi_transformation "Example"
12955         @ManageTransactions("BlocksOp")
12956         def MakeMultiTransformation1D(self, Block, DirFace1, DirFace2, NbTimes, theName=None):
12957             """
12958             Multi-transformate block and glue the result.
12959             Transformation is defined so, as to superpose direction faces.
12960
12961             Parameters:
12962                 Block Hexahedral solid to be multi-transformed.
12963                 DirFace1 ID of First direction face.
12964                 DirFace2 ID of Second direction face.
12965                 NbTimes Quantity of transformations to be done.
12966                 theName Object name; when specified, this parameter is used
12967                         for result publication in the study. Otherwise, if automatic
12968                         publication is switched on, default value is used for result name.
12969
12970             Note:
12971                 Unique ID of sub-shape can be obtained, using method GetSubShapeID().
12972
12973             Returns:
12974                 New GEOM.GEOM_Object, containing the result shape.
12975             """
12976             # Example: see GEOM_Spanner.py
12977             DirFace1,DirFace2,NbTimes,Parameters = ParseParameters(DirFace1,DirFace2,NbTimes)
12978             anObj = self.BlocksOp.MakeMultiTransformation1D(Block, DirFace1, DirFace2, NbTimes)
12979             RaiseIfFailed("MakeMultiTransformation1D", self.BlocksOp)
12980             anObj.SetParameters(Parameters)
12981             self._autoPublish(anObj, theName, "transformed")
12982             return anObj
12983
12984         ## Multi-transformate block and glue the result.
12985         #  @param Block Hexahedral solid to be multi-transformed.
12986         #  @param DirFace1U,DirFace2U IDs of Direction faces for the first transformation.
12987         #  @param DirFace1V,DirFace2V IDs of Direction faces for the second transformation.
12988         #  @param NbTimesU,NbTimesV Quantity of transformations to be done.
12989         #  @param theName Object name; when specified, this parameter is used
12990         #         for result publication in the study. Otherwise, if automatic
12991         #         publication is switched on, default value is used for result name.
12992         #
12993         #  @return New GEOM.GEOM_Object, containing the result shape.
12994         #
12995         #  @ref tui_multi_transformation "Example"
12996         @ManageTransactions("BlocksOp")
12997         def MakeMultiTransformation2D(self, Block, DirFace1U, DirFace2U, NbTimesU,
12998                                       DirFace1V, DirFace2V, NbTimesV, theName=None):
12999             """
13000             Multi-transformate block and glue the result.
13001
13002             Parameters:
13003                 Block Hexahedral solid to be multi-transformed.
13004                 DirFace1U,DirFace2U IDs of Direction faces for the first transformation.
13005                 DirFace1V,DirFace2V IDs of Direction faces for the second transformation.
13006                 NbTimesU,NbTimesV Quantity of transformations to be done.
13007                 theName Object name; when specified, this parameter is used
13008                         for result publication in the study. Otherwise, if automatic
13009                         publication is switched on, default value is used for result name.
13010
13011             Returns:
13012                 New GEOM.GEOM_Object, containing the result shape.
13013             """
13014             # Example: see GEOM_Spanner.py
13015             DirFace1U,DirFace2U,NbTimesU,DirFace1V,DirFace2V,NbTimesV,Parameters = ParseParameters(
13016               DirFace1U,DirFace2U,NbTimesU,DirFace1V,DirFace2V,NbTimesV)
13017             anObj = self.BlocksOp.MakeMultiTransformation2D(Block, DirFace1U, DirFace2U, NbTimesU,
13018                                                             DirFace1V, DirFace2V, NbTimesV)
13019             RaiseIfFailed("MakeMultiTransformation2D", self.BlocksOp)
13020             anObj.SetParameters(Parameters)
13021             self._autoPublish(anObj, theName, "transformed")
13022             return anObj
13023
13024         ## Build all possible propagation groups.
13025         #  Propagation group is a set of all edges, opposite to one (main)
13026         #  edge of this group directly or through other opposite edges.
13027         #  Notion of Opposite Edge make sense only on quadrangle face.
13028         #  @param theShape Shape to build propagation groups on.
13029         #  @param theName Object name; when specified, this parameter is used
13030         #         for result publication in the study. Otherwise, if automatic
13031         #         publication is switched on, default value is used for result name.
13032         #
13033         #  @return List of GEOM.GEOM_Object, each of them is a propagation group.
13034         #
13035         #  @ref swig_Propagate "Example"
13036         @ManageTransactions("BlocksOp")
13037         def Propagate(self, theShape, theName=None):
13038             """
13039             Build all possible propagation groups.
13040             Propagation group is a set of all edges, opposite to one (main)
13041             edge of this group directly or through other opposite edges.
13042             Notion of Opposite Edge make sense only on quadrangle face.
13043
13044             Parameters:
13045                 theShape Shape to build propagation groups on.
13046                 theName Object name; when specified, this parameter is used
13047                         for result publication in the study. Otherwise, if automatic
13048                         publication is switched on, default value is used for result name.
13049
13050             Returns:
13051                 List of GEOM.GEOM_Object, each of them is a propagation group.
13052             """
13053             # Example: see GEOM_TestOthers.py
13054             listChains = self.BlocksOp.Propagate(theShape)
13055             RaiseIfFailed("Propagate", self.BlocksOp)
13056             self._autoPublish(listChains, theName, "propagate")
13057             return listChains
13058
13059         # end of l3_blocks_op
13060         ## @}
13061
13062         ## @addtogroup l3_groups
13063         ## @{
13064
13065         ## Creates a new group which will store sub-shapes of theMainShape
13066         #  @param theMainShape is a GEOM object on which the group is selected
13067         #  @param theShapeType defines a shape type of the group (see GEOM::shape_type)
13068         #  @param theName Object name; when specified, this parameter is used
13069         #         for result publication in the study. Otherwise, if automatic
13070         #         publication is switched on, default value is used for result name.
13071         #
13072         #  @return a newly created GEOM group (GEOM.GEOM_Object)
13073         #
13074         #  @ref tui_working_with_groups_page "Example 1"
13075         #  \n @ref swig_CreateGroup "Example 2"
13076         @ManageTransactions("GroupOp")
13077         def CreateGroup(self, theMainShape, theShapeType, theName=None):
13078             """
13079             Creates a new group which will store sub-shapes of theMainShape
13080
13081             Parameters:
13082                theMainShape is a GEOM object on which the group is selected
13083                theShapeType defines a shape type of the group:"COMPOUND", "COMPSOLID",
13084                             "SOLID", "SHELL", "FACE", "WIRE", "EDGE", "VERTEX", "SHAPE".
13085                 theName Object name; when specified, this parameter is used
13086                         for result publication in the study. Otherwise, if automatic
13087                         publication is switched on, default value is used for result name.
13088
13089             Returns:
13090                a newly created GEOM group
13091
13092             Example of usage:
13093                 group = geompy.CreateGroup(Box, geompy.ShapeType["FACE"])
13094
13095             """
13096             # Example: see GEOM_TestOthers.py
13097             anObj = self.GroupOp.CreateGroup(theMainShape, theShapeType)
13098             RaiseIfFailed("CreateGroup", self.GroupOp)
13099             self._autoPublish(anObj, theName, "group")
13100             return anObj
13101
13102         ## Adds a sub-object with ID theSubShapeId to the group
13103         #  @param theGroup is a GEOM group to which the new sub-shape is added
13104         #  @param theSubShapeID is a sub-shape ID in the main object.
13105         #  \note Use method GetSubShapeID() to get an unique ID of the sub-shape
13106         #
13107         #  @ref tui_working_with_groups_page "Example"
13108         @ManageTransactions("GroupOp")
13109         def AddObject(self,theGroup, theSubShapeID):
13110             """
13111             Adds a sub-object with ID theSubShapeId to the group
13112
13113             Parameters:
13114                 theGroup       is a GEOM group to which the new sub-shape is added
13115                 theSubShapeID  is a sub-shape ID in the main object.
13116
13117             Note:
13118                 Use method GetSubShapeID() to get an unique ID of the sub-shape
13119             """
13120             # Example: see GEOM_TestOthers.py
13121             self.GroupOp.AddObject(theGroup, theSubShapeID)
13122             if self.GroupOp.GetErrorCode() != "PAL_ELEMENT_ALREADY_PRESENT":
13123                 RaiseIfFailed("AddObject", self.GroupOp)
13124                 pass
13125             pass
13126
13127         ## Removes a sub-object with ID \a theSubShapeId from the group
13128         #  @param theGroup is a GEOM group from which the new sub-shape is removed
13129         #  @param theSubShapeID is a sub-shape ID in the main object.
13130         #  \note Use method GetSubShapeID() to get an unique ID of the sub-shape
13131         #
13132         #  @ref tui_working_with_groups_page "Example"
13133         @ManageTransactions("GroupOp")
13134         def RemoveObject(self,theGroup, theSubShapeID):
13135             """
13136             Removes a sub-object with ID theSubShapeId from the group
13137
13138             Parameters:
13139                 theGroup is a GEOM group from which the new sub-shape is removed
13140                 theSubShapeID is a sub-shape ID in the main object.
13141
13142             Note:
13143                 Use method GetSubShapeID() to get an unique ID of the sub-shape
13144             """
13145             # Example: see GEOM_TestOthers.py
13146             self.GroupOp.RemoveObject(theGroup, theSubShapeID)
13147             RaiseIfFailed("RemoveObject", self.GroupOp)
13148             pass
13149
13150         ## Adds to the group all the given shapes. No errors, if some shapes are already included.
13151         #  @param theGroup is a GEOM group to which the new sub-shapes are added.
13152         #  @param theSubShapes is a list of sub-shapes to be added.
13153         #
13154         #  @ref tui_working_with_groups_page "Example"
13155         @ManageTransactions("GroupOp")
13156         def UnionList (self,theGroup, theSubShapes):
13157             """
13158             Adds to the group all the given shapes. No errors, if some shapes are already included.
13159
13160             Parameters:
13161                 theGroup is a GEOM group to which the new sub-shapes are added.
13162                 theSubShapes is a list of sub-shapes to be added.
13163             """
13164             # Example: see GEOM_TestOthers.py
13165             self.GroupOp.UnionList(theGroup, theSubShapes)
13166             RaiseIfFailed("UnionList", self.GroupOp)
13167             pass
13168
13169         ## Adds to the group all the given shapes. No errors, if some shapes are already included.
13170         #  @param theGroup is a GEOM group to which the new sub-shapes are added.
13171         #  @param theSubShapes is a list of indices of sub-shapes to be added.
13172         #
13173         #  @ref swig_UnionIDs "Example"
13174         @ManageTransactions("GroupOp")
13175         def UnionIDs(self,theGroup, theSubShapes):
13176             """
13177             Adds to the group all the given shapes. No errors, if some shapes are already included.
13178
13179             Parameters:
13180                 theGroup is a GEOM group to which the new sub-shapes are added.
13181                 theSubShapes is a list of indices of sub-shapes to be added.
13182             """
13183             # Example: see GEOM_TestOthers.py
13184             self.GroupOp.UnionIDs(theGroup, theSubShapes)
13185             RaiseIfFailed("UnionIDs", self.GroupOp)
13186             pass
13187
13188         ## Removes from the group all the given shapes. No errors, if some shapes are not included.
13189         #  @param theGroup is a GEOM group from which the sub-shapes are removed.
13190         #  @param theSubShapes is a list of sub-shapes to be removed.
13191         #
13192         #  @ref tui_working_with_groups_page "Example"
13193         @ManageTransactions("GroupOp")
13194         def DifferenceList (self,theGroup, theSubShapes):
13195             """
13196             Removes from the group all the given shapes. No errors, if some shapes are not included.
13197
13198             Parameters:
13199                 theGroup is a GEOM group from which the sub-shapes are removed.
13200                 theSubShapes is a list of sub-shapes to be removed.
13201             """
13202             # Example: see GEOM_TestOthers.py
13203             self.GroupOp.DifferenceList(theGroup, theSubShapes)
13204             RaiseIfFailed("DifferenceList", self.GroupOp)
13205             pass
13206
13207         ## Removes from the group all the given shapes. No errors, if some shapes are not included.
13208         #  @param theGroup is a GEOM group from which the sub-shapes are removed.
13209         #  @param theSubShapes is a list of indices of sub-shapes to be removed.
13210         #
13211         #  @ref swig_DifferenceIDs "Example"
13212         @ManageTransactions("GroupOp")
13213         def DifferenceIDs(self,theGroup, theSubShapes):
13214             """
13215             Removes from the group all the given shapes. No errors, if some shapes are not included.
13216
13217             Parameters:
13218                 theGroup is a GEOM group from which the sub-shapes are removed.
13219                 theSubShapes is a list of indices of sub-shapes to be removed.
13220             """
13221             # Example: see GEOM_TestOthers.py
13222             self.GroupOp.DifferenceIDs(theGroup, theSubShapes)
13223             RaiseIfFailed("DifferenceIDs", self.GroupOp)
13224             pass
13225
13226         ## Union of two groups.
13227         #  New group is created. It will contain all entities
13228         #  which are present in groups theGroup1 and theGroup2.
13229         #  @param theGroup1, theGroup2 are the initial GEOM groups
13230         #                              to create the united group from.
13231         #  @param theName Object name; when specified, this parameter is used
13232         #         for result publication in the study. Otherwise, if automatic
13233         #         publication is switched on, default value is used for result name.
13234         #
13235         #  @return a newly created GEOM group.
13236         #
13237         #  @ref tui_union_groups_anchor "Example"
13238         @ManageTransactions("GroupOp")
13239         def UnionGroups (self, theGroup1, theGroup2, theName=None):
13240             """
13241             Union of two groups.
13242             New group is created. It will contain all entities
13243             which are present in groups theGroup1 and theGroup2.
13244
13245             Parameters:
13246                 theGroup1, theGroup2 are the initial GEOM groups
13247                                      to create the united group from.
13248                 theName Object name; when specified, this parameter is used
13249                         for result publication in the study. Otherwise, if automatic
13250                         publication is switched on, default value is used for result name.
13251
13252             Returns:
13253                 a newly created GEOM group.
13254             """
13255             # Example: see GEOM_TestOthers.py
13256             aGroup = self.GroupOp.UnionGroups(theGroup1, theGroup2)
13257             RaiseIfFailed("UnionGroups", self.GroupOp)
13258             self._autoPublish(aGroup, theName, "group")
13259             return aGroup
13260
13261         ## Intersection of two groups.
13262         #  New group is created. It will contain only those entities
13263         #  which are present in both groups theGroup1 and theGroup2.
13264         #  @param theGroup1, theGroup2 are the initial GEOM groups to get common part of.
13265         #  @param theName Object name; when specified, this parameter is used
13266         #         for result publication in the study. Otherwise, if automatic
13267         #         publication is switched on, default value is used for result name.
13268         #
13269         #  @return a newly created GEOM group.
13270         #
13271         #  @ref tui_intersect_groups_anchor "Example"
13272         @ManageTransactions("GroupOp")
13273         def IntersectGroups (self, theGroup1, theGroup2, theName=None):
13274             """
13275             Intersection of two groups.
13276             New group is created. It will contain only those entities
13277             which are present in both groups theGroup1 and theGroup2.
13278
13279             Parameters:
13280                 theGroup1, theGroup2 are the initial GEOM groups to get common part of.
13281                 theName Object name; when specified, this parameter is used
13282                         for result publication in the study. Otherwise, if automatic
13283                         publication is switched on, default value is used for result name.
13284
13285             Returns:
13286                 a newly created GEOM group.
13287             """
13288             # Example: see GEOM_TestOthers.py
13289             aGroup = self.GroupOp.IntersectGroups(theGroup1, theGroup2)
13290             RaiseIfFailed("IntersectGroups", self.GroupOp)
13291             self._autoPublish(aGroup, theName, "group")
13292             return aGroup
13293
13294         ## Cut of two groups.
13295         #  New group is created. It will contain entities which are
13296         #  present in group theGroup1 but are not present in group theGroup2.
13297         #  @param theGroup1 is a GEOM group to include elements of.
13298         #  @param theGroup2 is a GEOM group to exclude elements of.
13299         #  @param theName Object name; when specified, this parameter is used
13300         #         for result publication in the study. Otherwise, if automatic
13301         #         publication is switched on, default value is used for result name.
13302         #
13303         #  @return a newly created GEOM group.
13304         #
13305         #  @ref tui_cut_groups_anchor "Example"
13306         @ManageTransactions("GroupOp")
13307         def CutGroups (self, theGroup1, theGroup2, theName=None):
13308             """
13309             Cut of two groups.
13310             New group is created. It will contain entities which are
13311             present in group theGroup1 but are not present in group theGroup2.
13312
13313             Parameters:
13314                 theGroup1 is a GEOM group to include elements of.
13315                 theGroup2 is a GEOM group to exclude elements of.
13316                 theName Object name; when specified, this parameter is used
13317                         for result publication in the study. Otherwise, if automatic
13318                         publication is switched on, default value is used for result name.
13319
13320             Returns:
13321                 a newly created GEOM group.
13322             """
13323             # Example: see GEOM_TestOthers.py
13324             aGroup = self.GroupOp.CutGroups(theGroup1, theGroup2)
13325             RaiseIfFailed("CutGroups", self.GroupOp)
13326             self._autoPublish(aGroup, theName, "group")
13327             return aGroup
13328
13329         ## Union of list of groups.
13330         #  New group is created. It will contain all entities that are
13331         #  present in groups listed in theGList.
13332         #  @param theGList is a list of GEOM groups to create the united group from.
13333         #  @param theName Object name; when specified, this parameter is used
13334         #         for result publication in the study. Otherwise, if automatic
13335         #         publication is switched on, default value is used for result name.
13336         #
13337         #  @return a newly created GEOM group.
13338         #
13339         #  @ref tui_union_groups_anchor "Example"
13340         @ManageTransactions("GroupOp")
13341         def UnionListOfGroups (self, theGList, theName=None):
13342             """
13343             Union of list of groups.
13344             New group is created. It will contain all entities that are
13345             present in groups listed in theGList.
13346
13347             Parameters:
13348                 theGList is a list of GEOM groups to create the united group from.
13349                 theName Object name; when specified, this parameter is used
13350                         for result publication in the study. Otherwise, if automatic
13351                         publication is switched on, default value is used for result name.
13352
13353             Returns:
13354                 a newly created GEOM group.
13355             """
13356             # Example: see GEOM_TestOthers.py
13357             aGroup = self.GroupOp.UnionListOfGroups(theGList)
13358             RaiseIfFailed("UnionListOfGroups", self.GroupOp)
13359             self._autoPublish(aGroup, theName, "group")
13360             return aGroup
13361
13362         ## Cut of lists of groups.
13363         #  New group is created. It will contain only entities
13364         #  which are present in groups listed in theGList.
13365         #  @param theGList is a list of GEOM groups to include elements of.
13366         #  @param theName Object name; when specified, this parameter is used
13367         #         for result publication in the study. Otherwise, if automatic
13368         #         publication is switched on, default value is used for result name.
13369         #
13370         #  @return a newly created GEOM group.
13371         #
13372         #  @ref tui_intersect_groups_anchor "Example"
13373         @ManageTransactions("GroupOp")
13374         def IntersectListOfGroups (self, theGList, theName=None):
13375             """
13376             Cut of lists of groups.
13377             New group is created. It will contain only entities
13378             which are present in groups listed in theGList.
13379
13380             Parameters:
13381                 theGList is a list of GEOM groups to include elements of.
13382                 theName Object name; when specified, this parameter is used
13383                         for result publication in the study. Otherwise, if automatic
13384                         publication is switched on, default value is used for result name.
13385
13386             Returns:
13387                 a newly created GEOM group.
13388             """
13389             # Example: see GEOM_TestOthers.py
13390             aGroup = self.GroupOp.IntersectListOfGroups(theGList)
13391             RaiseIfFailed("IntersectListOfGroups", self.GroupOp)
13392             self._autoPublish(aGroup, theName, "group")
13393             return aGroup
13394
13395         ## Cut of lists of groups.
13396         #  New group is created. It will contain only entities
13397         #  which are present in groups listed in theGList1 but
13398         #  are not present in groups from theGList2.
13399         #  @param theGList1 is a list of GEOM groups to include elements of.
13400         #  @param theGList2 is a list of GEOM groups to exclude elements of.
13401         #  @param theName Object name; when specified, this parameter is used
13402         #         for result publication in the study. Otherwise, if automatic
13403         #         publication is switched on, default value is used for result name.
13404         #
13405         #  @return a newly created GEOM group.
13406         #
13407         #  @ref tui_cut_groups_anchor "Example"
13408         @ManageTransactions("GroupOp")
13409         def CutListOfGroups (self, theGList1, theGList2, theName=None):
13410             """
13411             Cut of lists of groups.
13412             New group is created. It will contain only entities
13413             which are present in groups listed in theGList1 but
13414             are not present in groups from theGList2.
13415
13416             Parameters:
13417                 theGList1 is a list of GEOM groups to include elements of.
13418                 theGList2 is a list of GEOM groups to exclude elements of.
13419                 theName Object name; when specified, this parameter is used
13420                         for result publication in the study. Otherwise, if automatic
13421                         publication is switched on, default value is used for result name.
13422
13423             Returns:
13424                 a newly created GEOM group.
13425             """
13426             # Example: see GEOM_TestOthers.py
13427             aGroup = self.GroupOp.CutListOfGroups(theGList1, theGList2)
13428             RaiseIfFailed("CutListOfGroups", self.GroupOp)
13429             self._autoPublish(aGroup, theName, "group")
13430             return aGroup
13431
13432         ## Returns a list of sub-objects ID stored in the group
13433         #  @param theGroup is a GEOM group for which a list of IDs is requested
13434         #
13435         #  @ref swig_GetObjectIDs "Example"
13436         @ManageTransactions("GroupOp")
13437         def GetObjectIDs(self,theGroup):
13438             """
13439             Returns a list of sub-objects ID stored in the group
13440
13441             Parameters:
13442                 theGroup is a GEOM group for which a list of IDs is requested
13443             """
13444             # Example: see GEOM_TestOthers.py
13445             ListIDs = self.GroupOp.GetObjects(theGroup)
13446             RaiseIfFailed("GetObjects", self.GroupOp)
13447             return ListIDs
13448
13449         ## Returns a type of sub-objects stored in the group
13450         #  @param theGroup is a GEOM group which type is returned.
13451         #
13452         #  @ref swig_GetType "Example"
13453         @ManageTransactions("GroupOp")
13454         def GetType(self,theGroup):
13455             """
13456             Returns a type of sub-objects stored in the group
13457
13458             Parameters:
13459                 theGroup is a GEOM group which type is returned.
13460             """
13461             # Example: see GEOM_TestOthers.py
13462             aType = self.GroupOp.GetType(theGroup)
13463             RaiseIfFailed("GetType", self.GroupOp)
13464             return aType
13465
13466         ## Convert a type of geom object from id to string value
13467         #  @param theId is a GEOM object type id.
13468         #  @return type of geom object (POINT, VECTOR, PLANE, LINE, TORUS, ... )
13469         #  @ref swig_GetType "Example"
13470         def ShapeIdToType(self, theId):
13471             """
13472             Convert a type of geom object from id to string value
13473
13474             Parameters:
13475                 theId is a GEOM object type id.
13476
13477             Returns:
13478                 type of geom object (POINT, VECTOR, PLANE, LINE, TORUS, ... )
13479             """
13480             if theId == 0:
13481                 return "COPY"
13482             if theId == 1:
13483                 return "IMPORT"
13484             if theId == 2:
13485                 return "POINT"
13486             if theId == 3:
13487                 return "VECTOR"
13488             if theId == 4:
13489                 return "PLANE"
13490             if theId == 5:
13491                 return "LINE"
13492             if theId == 6:
13493                 return "TORUS"
13494             if theId == 7:
13495                 return "BOX"
13496             if theId == 8:
13497                 return "CYLINDER"
13498             if theId == 9:
13499                 return "CONE"
13500             if theId == 10:
13501                 return "SPHERE"
13502             if theId == 11:
13503                 return "PRISM"
13504             if theId == 12:
13505                 return "REVOLUTION"
13506             if theId == 13:
13507                 return "BOOLEAN"
13508             if theId == 14:
13509                 return "PARTITION"
13510             if theId == 15:
13511                 return "POLYLINE"
13512             if theId == 16:
13513                 return "CIRCLE"
13514             if theId == 17:
13515                 return "SPLINE"
13516             if theId == 18:
13517                 return "ELLIPSE"
13518             if theId == 19:
13519                 return "CIRC_ARC"
13520             if theId == 20:
13521                 return "FILLET"
13522             if theId == 21:
13523                 return "CHAMFER"
13524             if theId == 22:
13525                 return "EDGE"
13526             if theId == 23:
13527                 return "WIRE"
13528             if theId == 24:
13529                 return "FACE"
13530             if theId == 25:
13531                 return "SHELL"
13532             if theId == 26:
13533                 return "SOLID"
13534             if theId == 27:
13535                 return "COMPOUND"
13536             if theId == 28:
13537                 return "SUBSHAPE"
13538             if theId == 29:
13539                 return "PIPE"
13540             if theId == 30:
13541                 return "ARCHIMEDE"
13542             if theId == 31:
13543                 return "FILLING"
13544             if theId == 32:
13545                 return "EXPLODE"
13546             if theId == 33:
13547                 return "GLUED"
13548             if theId == 34:
13549                 return "SKETCHER"
13550             if theId == 35:
13551                 return "CDG"
13552             if theId == 36:
13553                 return "FREE_BOUNDS"
13554             if theId == 37:
13555                 return "GROUP"
13556             if theId == 38:
13557                 return "BLOCK"
13558             if theId == 39:
13559                 return "MARKER"
13560             if theId == 40:
13561                 return "THRUSECTIONS"
13562             if theId == 41:
13563                 return "COMPOUNDFILTER"
13564             if theId == 42:
13565                 return "SHAPES_ON_SHAPE"
13566             if theId == 43:
13567                 return "ELLIPSE_ARC"
13568             if theId == 44:
13569                 return "3DSKETCHER"
13570             if theId == 45:
13571                 return "FILLET_2D"
13572             if theId == 46:
13573                 return "FILLET_1D"
13574             if theId == 201:
13575                 return "PIPETSHAPE"
13576             return "Shape Id not exist."
13577
13578         ## Returns a main shape associated with the group
13579         #  @param theGroup is a GEOM group for which a main shape object is requested
13580         #  @return a GEOM object which is a main shape for theGroup
13581         #
13582         #  @ref swig_GetMainShape "Example"
13583         @ManageTransactions("GroupOp")
13584         def GetMainShape(self,theGroup):
13585             """
13586             Returns a main shape associated with the group
13587
13588             Parameters:
13589                 theGroup is a GEOM group for which a main shape object is requested
13590
13591             Returns:
13592                 a GEOM object which is a main shape for theGroup
13593
13594             Example of usage: BoxCopy = geompy.GetMainShape(CreateGroup)
13595             """
13596             # Example: see GEOM_TestOthers.py
13597             anObj = self.GroupOp.GetMainShape(theGroup)
13598             RaiseIfFailed("GetMainShape", self.GroupOp)
13599             return anObj
13600
13601         ## Create group of edges of theShape, whose length is in range [min_length, max_length].
13602         #  If include_min/max == 0, edges with length == min/max_length will not be included in result.
13603         #  @param theShape given shape (see GEOM.GEOM_Object)
13604         #  @param min_length minimum length of edges of theShape
13605         #  @param max_length maximum length of edges of theShape
13606         #  @param include_max indicating if edges with length == max_length should be included in result, 1-yes, 0-no (default=1)
13607         #  @param include_min indicating if edges with length == min_length should be included in result, 1-yes, 0-no (default=1)
13608         #  @param theName Object name; when specified, this parameter is used
13609         #         for result publication in the study. Otherwise, if automatic
13610         #         publication is switched on, default value is used for result name.
13611         #
13612         #  @return a newly created GEOM group of edges
13613         #
13614         #  @@ref swig_todo "Example"
13615         def GetEdgesByLength (self, theShape, min_length, max_length, include_min = 1, include_max = 1, theName=None):
13616             """
13617             Create group of edges of theShape, whose length is in range [min_length, max_length].
13618             If include_min/max == 0, edges with length == min/max_length will not be included in result.
13619
13620             Parameters:
13621                 theShape given shape
13622                 min_length minimum length of edges of theShape
13623                 max_length maximum length of edges of theShape
13624                 include_max indicating if edges with length == max_length should be included in result, 1-yes, 0-no (default=1)
13625                 include_min indicating if edges with length == min_length should be included in result, 1-yes, 0-no (default=1)
13626                 theName Object name; when specified, this parameter is used
13627                         for result publication in the study. Otherwise, if automatic
13628                         publication is switched on, default value is used for result name.
13629
13630              Returns:
13631                 a newly created GEOM group of edges.
13632             """
13633             edges = self.SubShapeAll(theShape, self.ShapeType["EDGE"])
13634             edges_in_range = []
13635             for edge in edges:
13636                 Props = self.BasicProperties(edge)
13637                 if min_length <= Props[0] and Props[0] <= max_length:
13638                     if (not include_min) and (min_length == Props[0]):
13639                         skip = 1
13640                     else:
13641                         if (not include_max) and (Props[0] == max_length):
13642                             skip = 1
13643                         else:
13644                             edges_in_range.append(edge)
13645
13646             if len(edges_in_range) <= 0:
13647                 print("No edges found by given criteria")
13648                 return None
13649
13650             # note: auto-publishing is done in self.CreateGroup()
13651             group_edges = self.CreateGroup(theShape, self.ShapeType["EDGE"], theName)
13652             self.UnionList(group_edges, edges_in_range)
13653
13654             return group_edges
13655
13656         ## Create group of edges of selected shape, whose length is in range [min_length, max_length].
13657         #  If include_min/max == 0, edges with length == min/max_length will not be included in result.
13658         #  @param min_length minimum length of edges of selected shape
13659         #  @param max_length maximum length of edges of selected shape
13660         #  @param include_max indicating if edges with length == max_length should be included in result, 1-yes, 0-no (default=1)
13661         #  @param include_min indicating if edges with length == min_length should be included in result, 1-yes, 0-no (default=1)
13662         #  @return a newly created GEOM group of edges
13663         #  @ref swig_todo "Example"
13664         def SelectEdges (self, min_length, max_length, include_min = 1, include_max = 1):
13665             """
13666             Create group of edges of selected shape, whose length is in range [min_length, max_length].
13667             If include_min/max == 0, edges with length == min/max_length will not be included in result.
13668
13669             Parameters:
13670                 min_length minimum length of edges of selected shape
13671                 max_length maximum length of edges of selected shape
13672                 include_max indicating if edges with length == max_length should be included in result, 1-yes, 0-no (default=1)
13673                 include_min indicating if edges with length == min_length should be included in result, 1-yes, 0-no (default=1)
13674
13675              Returns:
13676                 a newly created GEOM group of edges.
13677             """
13678             nb_selected = sg.SelectedCount()
13679             if nb_selected < 1:
13680                 print("Select a shape before calling this function, please.")
13681                 return 0
13682             if nb_selected > 1:
13683                 print("Only one shape must be selected")
13684                 return 0
13685
13686             id_shape = sg.getSelected(0)
13687             shape = IDToObject( id_shape )
13688
13689             group_edges = self.GetEdgesByLength(shape, min_length, max_length, include_min, include_max)
13690
13691             left_str  = " < "
13692             right_str = " < "
13693             if include_min: left_str  = " <= "
13694             if include_max: right_str  = " <= "
13695
13696             self.addToStudyInFather(shape, group_edges, "Group of edges with " + repr(min_length)
13697                                     + left_str + "length" + right_str + repr(max_length))
13698
13699             sg.updateObjBrowser()
13700
13701             return group_edges
13702
13703         # end of l3_groups
13704         ## @}
13705
13706         #@@ insert new functions before this line @@ do not remove this line @@#
13707
13708         ## Create a copy of the given object
13709         #
13710         #  @param theOriginal geometry object for copy
13711         #  @param theName Object name; when specified, this parameter is used
13712         #         for result publication in the study. Otherwise, if automatic
13713         #         publication is switched on, default value is used for result name.
13714         #
13715         #  @return New GEOM_Object, containing the copied shape.
13716         #
13717         #  @ingroup l1_geomBuilder_auxiliary
13718         #  @ref swig_MakeCopy "Example"
13719         @ManageTransactions("InsertOp")
13720         def MakeCopy(self, theOriginal, theName=None):
13721             """
13722             Create a copy of the given object
13723
13724             Parameters:
13725                 theOriginal geometry object for copy
13726                 theName Object name; when specified, this parameter is used
13727                         for result publication in the study. Otherwise, if automatic
13728                         publication is switched on, default value is used for result name.
13729
13730             Returns:
13731                 New GEOM_Object, containing the copied shape.
13732
13733             Example of usage: Copy = geompy.MakeCopy(Box)
13734             """
13735             # Example: see GEOM_TestAll.py
13736             anObj = self.InsertOp.MakeCopy(theOriginal)
13737             RaiseIfFailed("MakeCopy", self.InsertOp)
13738             self._autoPublish(anObj, theName, "copy")
13739             return anObj
13740
13741         ## Add Path to load python scripts from
13742         #  @param Path a path to load python scripts from
13743         #  @ingroup l1_geomBuilder_auxiliary
13744         def addPath(self,Path):
13745             """
13746             Add Path to load python scripts from
13747
13748             Parameters:
13749                 Path a path to load python scripts from
13750             """
13751             if (sys.path.count(Path) < 1):
13752                 sys.path.append(Path)
13753                 pass
13754             pass
13755
13756         ## Load marker texture from the file
13757         #  @param Path a path to the texture file
13758         #  @return unique texture identifier
13759         #  @ingroup l1_geomBuilder_auxiliary
13760         @ManageTransactions("InsertOp")
13761         def LoadTexture(self, Path):
13762             """
13763             Load marker texture from the file
13764
13765             Parameters:
13766                 Path a path to the texture file
13767
13768             Returns:
13769                 unique texture identifier
13770             """
13771             # Example: see GEOM_TestAll.py
13772             ID = self.InsertOp.LoadTexture(Path)
13773             RaiseIfFailed("LoadTexture", self.InsertOp)
13774             return ID
13775
13776         ## Get internal name of the object based on its study entry
13777         #  @note This method does not provide an unique identifier of the geometry object.
13778         #  @note This is internal function of GEOM component, though it can be used outside it for
13779         #  appropriate reason (e.g. for identification of geometry object).
13780         #  @param obj geometry object
13781         #  @return unique object identifier
13782         #  @ingroup l1_geomBuilder_auxiliary
13783         def getObjectID(self, obj):
13784             """
13785             Get internal name of the object based on its study entry.
13786             Note: this method does not provide an unique identifier of the geometry object.
13787             It is an internal function of GEOM component, though it can be used outside GEOM for
13788             appropriate reason (e.g. for identification of geometry object).
13789
13790             Parameters:
13791                 obj geometry object
13792
13793             Returns:
13794                 unique object identifier
13795             """
13796             ID = ""
13797             entry = salome.ObjectToID(obj)
13798             if entry is not None:
13799                 lst = entry.split(":")
13800                 if len(lst) > 0:
13801                     ID = lst[-1] # -1 means last item in the list
13802                     return "GEOM_" + ID
13803             return ID
13804
13805
13806
13807         ## Add marker texture. @a Width and @a Height parameters
13808         #  specify width and height of the texture in pixels.
13809         #  If @a RowData is @c True, @a Texture parameter should represent texture data
13810         #  packed into the byte array. If @a RowData is @c False (default), @a Texture
13811         #  parameter should be unpacked string, in which '1' symbols represent opaque
13812         #  pixels and '0' represent transparent pixels of the texture bitmap.
13813         #
13814         #  @param Width texture width in pixels
13815         #  @param Height texture height in pixels
13816         #  @param Texture texture data
13817         #  @param RowData if @c True, @a Texture data are packed in the byte stream
13818         #  @return unique texture identifier
13819         #  @ingroup l1_geomBuilder_auxiliary
13820         @ManageTransactions("InsertOp")
13821         def AddTexture(self, Width, Height, Texture, RowData=False):
13822             """
13823             Add marker texture. Width and Height parameters
13824             specify width and height of the texture in pixels.
13825             If RowData is True, Texture parameter should represent texture data
13826             packed into the byte array. If RowData is False (default), Texture
13827             parameter should be unpacked string, in which '1' symbols represent opaque
13828             pixels and '0' represent transparent pixels of the texture bitmap.
13829
13830             Parameters:
13831                 Width texture width in pixels
13832                 Height texture height in pixels
13833                 Texture texture data
13834                 RowData if True, Texture data are packed in the byte stream
13835
13836             Returns:
13837                 return unique texture identifier
13838             """
13839             if not RowData: Texture = PackData(Texture)
13840             ID = self.InsertOp.AddTexture(Width, Height, Texture)
13841             RaiseIfFailed("AddTexture", self.InsertOp)
13842             return ID
13843
13844         ## Transfer not topological data from one GEOM object to another.
13845         #
13846         #  @param theObjectFrom the source object of non-topological data
13847         #  @param theObjectTo the destination object of non-topological data
13848         #  @param theFindMethod method to search sub-shapes of theObjectFrom
13849         #         in shape theObjectTo. Possible values are: GEOM.FSM_GetInPlace,
13850         #         GEOM.FSM_GetInPlaceByHistory and GEOM.FSM_GetInPlace_Old.
13851         #         Other values of GEOM.find_shape_method are not supported.
13852         #
13853         #  @return True in case of success; False otherwise.
13854         #
13855         #  @ingroup l1_geomBuilder_auxiliary
13856         #
13857         #  @ref swig_TransferData "Example"
13858         @ManageTransactions("InsertOp")
13859         def TransferData(self, theObjectFrom, theObjectTo,
13860                          theFindMethod=GEOM.FSM_GetInPlace):
13861             """
13862             Transfer not topological data from one GEOM object to another.
13863
13864             Parameters:
13865                 theObjectFrom the source object of non-topological data
13866                 theObjectTo the destination object of non-topological data
13867                 theFindMethod method to search sub-shapes of theObjectFrom
13868                               in shape theObjectTo. Possible values are:
13869                               GEOM.FSM_GetInPlace, GEOM.FSM_GetInPlaceByHistory
13870                               and GEOM.FSM_GetInPlace_Old. Other values of
13871                               GEOM.find_shape_method are not supported.
13872
13873             Returns:
13874                 True in case of success; False otherwise.
13875
13876             # Example: see GEOM_TestOthers.py
13877             """
13878             # Example: see GEOM_TestAll.py
13879             isOk = self.InsertOp.TransferData(theObjectFrom,
13880                                                theObjectTo, theFindMethod)
13881             RaiseIfFailed("TransferData", self.InsertOp)
13882             return isOk
13883
13884         ## Creates a new folder object. It is a container for any GEOM objects.
13885         #  @param Name name of the container
13886         #  @param Father parent object. If None,
13887         #         folder under 'Geometry' root object will be created.
13888         #  @return a new created folder
13889         #  @ingroup l1_publish_data
13890         def NewFolder(self, Name, Father=None):
13891             """
13892             Create a new folder object. It is an auxiliary container for any GEOM objects.
13893
13894             Parameters:
13895                 Name name of the container
13896                 Father parent object. If None,
13897                 folder under 'Geometry' root object will be created.
13898
13899             Returns:
13900                 a new created folder
13901             """
13902             return self.CreateFolder(Name, Father)
13903
13904         ## Move object to the specified folder
13905         #  @param Object object to move
13906         #  @param Folder target folder
13907         #  @ingroup l1_publish_data
13908         def PutToFolder(self, Object, Folder):
13909             """
13910             Move object to the specified folder
13911
13912             Parameters:
13913                 Object object to move
13914                 Folder target folder
13915             """
13916             self.MoveToFolder(Object, Folder)
13917             pass
13918
13919         ## Move list of objects to the specified folder
13920         #  @param ListOfSO list of objects to move
13921         #  @param Folder target folder
13922         #  @ingroup l1_publish_data
13923         def PutListToFolder(self, ListOfSO, Folder):
13924             """
13925             Move list of objects to the specified folder
13926
13927             Parameters:
13928                 ListOfSO list of objects to move
13929                 Folder target folder
13930             """
13931             self.MoveListToFolder(ListOfSO, Folder)
13932             pass
13933
13934         ## @addtogroup l2_field
13935         ## @{
13936
13937         ## Creates a field
13938         #  @param shape the shape the field lies on
13939         #  @param name the field name
13940         #  @param type type of field data: 0 - bool, 1 - int, 2 - double, 3 - string
13941         #  @param dimension dimension of the shape the field lies on
13942         #         0 - VERTEX, 1 - EDGE, 2 - FACE, 3 - SOLID, -1 - whole shape
13943         #  @param componentNames names of components
13944         #  @return a created field
13945         @ManageTransactions("FieldOp")
13946         def CreateField(self, shape, name, type, dimension, componentNames):
13947             """
13948             Creates a field
13949
13950             Parameters:
13951                 shape the shape the field lies on
13952                 name  the field name
13953                 type  type of field data
13954                 dimension dimension of the shape the field lies on
13955                           0 - VERTEX, 1 - EDGE, 2 - FACE, 3 - SOLID, -1 - whole shape
13956                 componentNames names of components
13957
13958             Returns:
13959                 a created field
13960             """
13961             if isinstance( type, int ):
13962                 if type < 0 or type > 3:
13963                     raise RuntimeError("CreateField : Error: data type must be within [0-3] range")
13964                 type = [GEOM.FDT_Bool,GEOM.FDT_Int,GEOM.FDT_Double,GEOM.FDT_String][type]
13965
13966             f = self.FieldOp.CreateField( shape, name, type, dimension, componentNames)
13967             RaiseIfFailed("CreateField", self.FieldOp)
13968             global geom
13969             geom._autoPublish( f, "", name)
13970             return f
13971
13972         ## Removes a field from the GEOM component
13973         #  @param field the field to remove
13974         def RemoveField(self, field):
13975             "Removes a field from the GEOM component"
13976             global geom
13977             if isinstance( field, GEOM._objref_GEOM_Field ):
13978                 geom.RemoveObject( field )
13979             elif isinstance( field, geomField ):
13980                 geom.RemoveObject( field.field )
13981             else:
13982                 raise RuntimeError("RemoveField() : the object is not a field")
13983             return
13984
13985         ## Returns number of fields on a shape
13986         @ManageTransactions("FieldOp")
13987         def CountFields(self, shape):
13988             "Returns number of fields on a shape"
13989             nb = self.FieldOp.CountFields( shape )
13990             RaiseIfFailed("CountFields", self.FieldOp)
13991             return nb
13992
13993         ## Returns all fields on a shape
13994         @ManageTransactions("FieldOp")
13995         def GetFields(self, shape):
13996             "Returns all fields on a shape"
13997             ff = self.FieldOp.GetFields( shape )
13998             RaiseIfFailed("GetFields", self.FieldOp)
13999             return ff
14000
14001         ## Returns a field on a shape by its name
14002         @ManageTransactions("FieldOp")
14003         def GetField(self, shape, name):
14004             "Returns a field on a shape by its name"
14005             f = self.FieldOp.GetField( shape, name )
14006             RaiseIfFailed("GetField", self.FieldOp)
14007             return f
14008
14009         # end of l2_field
14010         ## @}
14011
14012         ## @addtogroup l2_testing
14013         ## @{
14014
14015         ## Build a mesh on the given shape.
14016         # @param shape the source shape
14017         # @param linear_deflection linear deflection coefficient
14018         # @param is_relative says if given value of deflection is relative to shape's bounding box
14019         # @param angular_deflection angular deflection for edges in degrees
14020         # @return True in case of success; otherwise False.
14021         @ManageTransactions("TestOp")
14022         def Tesselate(self, shape, linear_deflection=0, is_relative=True, angular_deflection=0):
14023             """Build a mesh on the given shape.
14024
14025             Parameters:
14026                 shape the source shape
14027                 linear_deflection linear deflection coefficient
14028                 is_relative says if given value of deflection is relative to shape's bounding box
14029                 angular_deflection angular deflection for edges in degrees
14030
14031             Returns:
14032                 True in case of success; otherwise False.
14033             """
14034             if angular_deflection > 0:
14035                 angular_deflection = angular_deflection * math.pi / 180.
14036             r = self.TestOp.Tesselate(shape, linear_deflection, is_relative, angular_deflection)
14037             RaiseIfFailed("Tesselate", self.TestOp)
14038             return r
14039
14040         ## Obtain a shape checker
14041         #  @return An instance of @ref conformity.CheckConformity "CheckConformity" interface
14042         #
14043         #  @ref tui_conformity_page "Example"
14044         def CheckConformity (self, shape):
14045             """
14046             Obtain a shape checker.
14047
14048             Example of usage:
14049                 conf = geompy.CheckConformity(shape)
14050                 valid = conf.isValid()
14051                 si2d = conf.selfIntersected2D()
14052                 dist = conf.distantShapes()
14053                 small = conf.smallEdges()
14054                 interfer = cc.interferingSubshapes()
14055             """
14056             conf = CheckConformity (shape, self)
14057             return conf
14058
14059         # end of l2_testing
14060         ## @}
14061
14062
14063 # Register the new proxy for GEOM_Gen
14064 omniORB.registerObjref(GEOM._objref_GEOM_Gen._NP_RepositoryId, geomBuilder)
14065
14066
14067 ## Field on Geometry
14068 #  @ingroup l2_field
14069 class geomField( GEOM._objref_GEOM_Field ):
14070
14071     def __init__(self, *args):
14072         GEOM._objref_GEOM_Field.__init__(self, *args)
14073         self.field = GEOM._objref_GEOM_Field
14074         return
14075
14076     ## Returns the shape the field lies on
14077     def getShape(self):
14078         "Returns the shape the field lies on"
14079         return self.field.GetShape(self)
14080
14081     ## Returns the field name
14082     def getName(self):
14083         "Returns the field name"
14084         return self.field.GetName(self)
14085
14086     ## Returns type of field data as integer [0-3]
14087     def getType(self):
14088         "Returns type of field data"
14089         return EnumToLong(self.field.GetDataType(self))
14090
14091     ## Returns type of field data:
14092     #  one of GEOM.FDT_Bool, GEOM.FDT_Int, GEOM.FDT_Double, GEOM.FDT_String
14093     def getTypeEnum(self):
14094         "Returns type of field data"
14095         return self.field.GetDataType(self)
14096
14097     ## Returns dimension of the shape the field lies on:
14098     #  0 - VERTEX, 1 - EDGE, 2 - FACE, 3 - SOLID, -1 - whole shape
14099     def getDimension(self):
14100         """Returns dimension of the shape the field lies on:
14101         0 - VERTEX, 1 - EDGE, 2 - FACE, 3 - SOLID, -1 - whole shape"""
14102         return self.field.GetDimension(self)
14103
14104     ## Returns names of components
14105     def getComponents(self):
14106         "Returns names of components"
14107         return self.field.GetComponents(self)
14108
14109     ## Adds a time step to the field
14110     #  @param step the time step number further used as the step identifier
14111     #  @param stamp the time step time
14112     #  @param values the values of the time step
14113     def addStep(self, step, stamp, values):
14114         "Adds a time step to the field"
14115         stp = self.field.AddStep( self, step, stamp )
14116         if not stp:
14117             raise RuntimeError("Field.addStep() : Error: step %s already exists in this field"%step)
14118         global geom
14119         geom._autoPublish( stp, "", "Step %s, %s"%(step,stamp))
14120         self.setValues( step, values )
14121         return stp
14122
14123     ## Remove a time step from the field
14124     def removeStep(self,step):
14125         "Remove a time step from the field"
14126         stepSO = None
14127         try:
14128             stepObj = self.field.GetStep( self, step )
14129             if stepObj:
14130                 stepSO = geom.myStudy.FindObjectID( stepObj.GetStudyEntry() )
14131         except:
14132             #import traceback
14133             #traceback.print_exc()
14134             pass
14135         self.field.RemoveStep( self, step )
14136         if stepSO:
14137             geom.myBuilder.RemoveObjectWithChildren( stepSO )
14138         return
14139
14140     ## Returns number of time steps in the field
14141     def countSteps(self):
14142         "Returns number of time steps in the field"
14143         return self.field.CountSteps(self)
14144
14145     ## Returns a list of time step IDs in the field
14146     def getSteps(self):
14147         "Returns a list of time step IDs in the field"
14148         return self.field.GetSteps(self)
14149
14150     ## Returns a time step by its ID
14151     def getStep(self,step):
14152         "Returns a time step by its ID"
14153         stp = self.field.GetStep(self, step)
14154         if not stp:
14155             raise RuntimeError("Step %s is missing from this field"%step)
14156         return stp
14157
14158     ## Returns the time of the field step
14159     def getStamp(self,step):
14160         "Returns the time of the field step"
14161         return self.getStep(step).GetStamp()
14162
14163     ## Changes the time of the field step
14164     def setStamp(self, step, stamp):
14165         "Changes the time of the field step"
14166         return self.getStep(step).SetStamp(stamp)
14167
14168     ## Returns values of the field step
14169     def getValues(self, step):
14170         "Returns values of the field step"
14171         return self.getStep(step).GetValues()
14172
14173     ## Changes values of the field step
14174     def setValues(self, step, values):
14175         "Changes values of the field step"
14176         stp = self.getStep(step)
14177         errBeg = "Field.setValues(values) : Error: "
14178         try:
14179             ok = stp.SetValues( values )
14180         except Exception as e:
14181             excStr = str(e)
14182             if excStr.find("WrongPythonType") > 0:
14183                 raise RuntimeError(errBeg +\
14184                       "wrong type of values, %s values are expected"%str(self.getTypeEnum())[4:])
14185             raise RuntimeError(errBeg + str(e))
14186         if not ok:
14187             nbOK = self.field.GetArraySize(self)
14188             nbKO = len(values)
14189             if nbOK != nbKO:
14190                 raise RuntimeError(errBeg + "len(values) must be %s but not %s"%(nbOK,nbKO))
14191             else:
14192                 raise RuntimeError(errBeg + "failed")
14193         return
14194
14195     pass # end of class geomField
14196
14197 # Register the new proxy for GEOM_Field
14198 omniORB.registerObjref(GEOM._objref_GEOM_Field._NP_RepositoryId, geomField)
14199
14200
14201 ## Create a new geomBuilder instance.The geomBuilder class provides the Python
14202 #  interface to GEOM operations.
14203 #
14204 #  Typical use is:
14205 #  \code
14206 #    import salome
14207 #    salome.salome_init()
14208 #    from salome.geom import geomBuilder
14209 #    geompy = geomBuilder.New()
14210 #  \endcode
14211 #  @param  instance  CORBA proxy of GEOM Engine. If None, the default Engine is used.
14212 #  @return geomBuilder instance
14213 def New( instance=None):
14214     """
14215     Create a new geomBuilder instance.The geomBuilder class provides the Python
14216     interface to GEOM operations.
14217
14218     Typical use is:
14219         import salome
14220         salome.salome_init()
14221         from salome.geom import geomBuilder
14222         geompy = geomBuilder.New()
14223
14224     Parameters:
14225         instance  CORBA proxy of GEOM Engine. If None, the default Engine is used.
14226     Returns:
14227         geomBuilder instance
14228     """
14229     #print "New geomBuilder ", study, instance
14230     global engine
14231     global geom
14232     global doLcc
14233     if instance and isinstance( instance, SALOMEDS._objref_Study ):
14234         import sys
14235         sys.stderr.write("Warning: 'study' argument is no more needed in geomBuilder.New(). Consider updating your script!!!\n\n")
14236         instance = None
14237     engine = instance
14238     if engine is None:
14239       doLcc = True
14240     geom = geomBuilder()
14241     assert isinstance(geom,geomBuilder), "Geom engine class is %s but should be geomBuilder.geomBuilder. Import geomBuilder before creating the instance."%geom.__class__
14242     geom.init_geom()
14243     return geom
14244
14245
14246 # Register methods from the plug-ins in the geomBuilder class 
14247 plugins_var = os.environ.get( "GEOM_PluginsList" )
14248
14249 plugins = None
14250 if plugins_var is not None:
14251     plugins = plugins_var.split( ":" )
14252     plugins=[x for x in plugins if len(x)>0]
14253 if plugins is not None:
14254     for pluginName in plugins:
14255         pluginBuilderName = pluginName + "Builder"
14256         try:
14257             exec( "from salome.%s.%s import *" % (pluginName, pluginBuilderName))
14258         except Exception as e:
14259             from salome_utils import verbose
14260             print("Exception while loading %s: %s" % ( pluginBuilderName, e ))
14261             continue
14262         exec( "from salome.%s import %s" % (pluginName, pluginBuilderName))
14263         plugin = eval( pluginBuilderName )
14264         
14265         # add methods from plugin module to the geomBuilder class
14266         for k in dir( plugin ):
14267             if k[0] == '_': continue
14268             method = getattr( plugin, k )
14269             if type( method ).__name__ == 'function':
14270                 if not hasattr( geomBuilder, k ):
14271                     setattr( geomBuilder, k, method )
14272                 pass
14273             pass
14274         del pluginName
14275         pass
14276     pass