Salome HOME
Merge C++ part of kleontev/38044_auto_repair
[modules/geom.git] / src / GEOM_SWIG / geomBuilder.py
1 #  -*- coding: iso-8859-1 -*-
2 # Copyright (C) 2007-2024  CEA, EDF, OPEN CASCADE
3 #
4 # This library is free software; you can redistribute it and/or
5 # modify it under the terms of the GNU Lesser General Public
6 # License as published by the Free Software Foundation; either
7 # version 2.1 of the License, or (at your option) any later version.
8 #
9 # This library is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12 # Lesser General Public License for more details.
13 #
14 # You should have received a copy of the GNU Lesser General Public
15 # License along with this library; if not, write to the Free Software
16 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
17 #
18 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
19 #
20
21 #  GEOM GEOM_SWIG : binding of C++ implementation with Python
22 #  File   : geomBuilder.py
23 #  Author : Paul RASCLE, EDF
24 #  Module : GEOM
25
26 """
27     \namespace geomBuilder
28     \brief Module geomBuilder
29 """
30
31 ##
32 ## @defgroup geomBuilder geomBuilder Python module
33 ## @{
34 ##
35 ## @details
36 ##
37 ## By default, all functions of geomBuilder Python module do not publish
38 ## resulting geometrical objects. This can be done in the Python script
39 ## by means of \ref geomBuilder.geomBuilder.addToStudy() "addToStudy()"
40 ## or \ref geomBuilder.geomBuilder.addToStudyInFather() "addToStudyInFather()"
41 ## functions.
42 ##
43 ## However, it is possible to publish result data in the study
44 ## automatically. For this, almost each function of
45 ## \ref geomBuilder.geomBuilder "geomBuilder" class has
46 ## an additional @a theName parameter (@c None by default).
47 ## As soon as non-empty string value is passed to this parameter,
48 ## the result object is published in the study automatically.
49 ##
50 ## For example, consider the following Python script:
51 ##
52 ## @code
53 ## import salome
54 ## from salome.geom import geomBuilder
55 ## geompy = geomBuilder.New()
56 ## box = geompy.MakeBoxDXDYDZ(100, 100, 100) # box is not published in the study yet
57 ## geompy.addToStudy(box, "box")             # explicit publishing
58 ## @endcode
59 ##
60 ## Last two lines can be replaced by one-line instruction:
61 ##
62 ## @code
63 ## box = geompy.MakeBoxDXDYDZ(100, 100, 100, theName="box") # box is published in the study with "box" name
64 ## @endcode
65 ##
66 ## ... or simply
67 ##
68 ## @code
69 ## box = geompy.MakeBoxDXDYDZ(100, 100, 100, "box") # box is published in the study with "box" name
70 ## @endcode
71 ##
72 ## Note, that some functions produce more than one geometrical objects. For example,
73 ## \ref geomBuilder.geomBuilder.GetNonBlocks() "GetNonBlocks()" function returns two objects:
74 ## group of all non-hexa solids and group of all non-quad faces.
75 ## For such functions it is possible to specify separate names for results.
76 ##
77 ## For example
78 ##
79 ## @code
80 ## # create and publish cylinder
81 ## cyl = geompy.MakeCylinderRH(100, 100, "cylinder")
82 ## # get non blocks from cylinder
83 ## g1, g2 = geompy.GetNonBlocks(cyl, theName="nonblock")
84 ## @endcode
85 ##
86 ## Above example will publish both result compounds (first with non-hexa solids and
87 ## second with non-quad faces) as two items, both named "nonblock".
88 ## However, if second command is invoked as
89 ##
90 ## @code
91 ## g1, g2 = geompy.GetNonBlocks(cyl, theName=("nonhexa", "nonquad"))
92 ## @endcode
93 ##
94 ## ... the first compound will be published with "nonhexa" name, and second will be named "nonquad".
95 ##
96 ## Automatic publication of all results can be also enabled/disabled by means of the function
97 ## \ref geomBuilder.geomBuilder.addToStudyAuto() "addToStudyAuto()". The automatic publishing
98 ## is managed by the numeric parameter passed to this function:
99 ## - if @a maxNbSubShapes = 0, automatic publishing is disabled.
100 ## - if @a maxNbSubShapes = -1 (default), automatic publishing is enabled and
101 ##   maximum number of sub-shapes allowed for publishing is unlimited; any negative
102 ##   value passed as parameter has the same effect.
103 ## - if @a maxNbSubShapes is any positive value, automatic publishing is enabled and
104 ##   maximum number of sub-shapes allowed for publishing is set to specified value.
105 ##
106 ## When automatic publishing is enabled, you even do not need to pass @a theName parameter
107 ## to the functions creating objects, instead default names will be used. However, you
108 ## can always change the behavior, by passing explicit name to the @a theName parameter
109 ## and it will be used instead default one.
110 ## The publishing of the collections of objects will be done according to the above
111 ## mentioned rules (maximum allowed number of sub-shapes).
112 ##
113 ## For example:
114 ##
115 ## @code
116 ## import salome
117 ## from salome.geom import geomBuilder
118 ## geompy = geomBuilder.New()
119 ## geompy.addToStudyAuto() # enable automatic publication
120 ## box = geompy.MakeBoxDXDYDZ(100, 100, 100)
121 ## # the box is created and published in the study with default name
122 ## geompy.addToStudyAuto(5) # set max allowed number of sub-shapes to 5
123 ## vertices = geompy.SubShapeAll(box, geomBuilder.ShapeType['VERTEX'])
124 ## # only 5 first vertices will be published, with default names
125 ## print len(vertices)
126 ## # note, that result value still contains all 8 vertices
127 ## geompy.addToStudyAuto(-1) # disable automatic publication
128 ## @endcode
129 ##
130 ## This feature can be used, for example, for debugging purposes.
131 ##
132 ## @note
133 ## - Use automatic publication feature with caution. When it is enabled, any function of
134 ##   \ref geomBuilder.geomBuilder "geomBuilder" class publishes the results in the study,
135 ##   that can lead to the huge size of the study data tree.
136 ##   For example, repeating call of \ref geomBuilder.geomBuilder.SubShapeAll() "SubShapeAll()"
137 ##   command on the same main shape each time will publish all child objects, that will lead
138 ##   to a lot of duplicated items in the study.
139 ## - Sub-shapes are automatically published as child items of the parent main shape in the study if main
140 ##   shape was also published before. Otherwise, sub-shapes are published as top-level objects.
141 ## - Some functions of \ref geomBuilder.geomBuilder "geomBuilder" class do not have
142 ##   \a theName parameter (and, thus, do not support automatic publication).
143 ##   For example, some transformation operations like
144 ##   \ref geomBuilder.geomBuilder.TranslateDXDYDZ() "TranslateDXDYDZ()".
145 ##   Refer to the documentation to check if some function has such possibility.
146 ##
147 ## It is possible to customize the representation of the geometrical
148 ## data in the data tree; this can be done by using folders. A folder can
149 ## be created in the study tree using function
150 ## \ref geomBuilder.geomBuilder.NewFolder() "NewFolder()"
151 ## (by default it is created under the "Geometry" root object).
152 ## As soon as folder is created, any published geometry object
153 ## can be moved into it.
154 ##
155 ## For example:
156 ##
157 ## @code
158 ## import salome
159 ## from salome.geom import geomBuilder
160 ## geompy = geomBuilder.New()
161 ## box = geompy.MakeBoxDXDYDZ(100, 100, 100, "Box")
162 ## # the box was created and published in the study
163 ## folder = geompy.NewFolder("Primitives")
164 ## # an empty "Primitives" folder was created under default "Geometry" root object
165 ## geompy.PutToFolder(box, folder)
166 ## # the box was moved into "Primitives" folder
167 ## @endcode
168 ##
169 ## Subfolders are also can be created by specifying another folder as a parent:
170 ##
171 ## @code
172 ## subfolder = geompy.NewFolder("3D", folder)
173 ## # "3D" folder was created under "Primitives" folder
174 ## @endcode
175 ##
176 ## @note
177 ## - Folder container is just a representation layer object that
178 ## deals with already published objects only. So, any geometry object
179 ## should be published in the study (for example, with
180 ## \ref geomBuilder.geomBuilder.PutToFolder() "addToStudy()" function)
181 ## BEFORE moving it into any existing folder.
182 ## - \ref geomBuilder.geomBuilder.PutToFolder() "PutToFolder()" function
183 ## does not change physical position of geometry object in the study tree,
184 ## it only affects on the representation of the data tree.
185 ## - It is impossible to publish geometry object using any folder as father.
186 ##
187 ##  \defgroup l1_publish_data
188 ##  \defgroup l1_geomBuilder_auxiliary
189 ##  \defgroup l1_geomBuilder_purpose
190 ## @}
191
192 ## @defgroup l1_publish_data Publishing results in SALOME study
193
194 ## @defgroup l1_geomBuilder_auxiliary Auxiliary data structures and methods
195
196 ## @defgroup l1_geomBuilder_purpose   All package methods, grouped by their purpose
197 ## @{
198 ##   @defgroup l2_import_export Importing/exporting geometrical objects
199 ##   @defgroup l2_creating      Creating geometrical objects
200 ##   @{
201 ##     @defgroup l3_basic_go      Creating Basic Geometric Objects
202 ##     @{
203 ##       @defgroup l4_curves        Creating Curves
204
205 ##     @}
206 ##     @defgroup l3_3d_primitives Creating 3D Primitives
207 ##     @defgroup l3_complex       Creating Complex Objects
208 ##     @defgroup l3_groups        Working with groups
209 ##     @defgroup l3_blocks        Building by blocks
210 ##     @{
211 ##       @defgroup l4_blocks_measure Check and Improve
212
213 ##     @}
214 ##     @defgroup l3_sketcher      Sketcher
215 ##     @defgroup l3_advanced      Creating Advanced Geometrical Objects
216 ##     @{
217 ##       @defgroup l4_decompose     Decompose objects
218 ##       @defgroup l4_decompose_d   Decompose objects deprecated methods
219 ##       @defgroup l4_access        Access to sub-shapes by their unique IDs inside the main shape
220 ##       @defgroup l4_obtain        Access to sub-shapes by a criteria
221 ##       @defgroup l4_advanced      Advanced objects creation functions
222
223 ##     @}
224
225 ##   @}
226 ##   @defgroup l2_transforming  Transforming geometrical objects
227 ##   @{
228 ##     @defgroup l3_basic_op      Basic Operations
229 ##     @defgroup l3_boolean       Boolean Operations
230 ##     @defgroup l3_transform     Transformation Operations
231 ##     @defgroup l3_transform_d   Transformation Operations deprecated methods
232 ##     @defgroup l3_local         Local Operations (Fillet, Chamfer and other Features)
233 ##     @defgroup l3_blocks_op     Blocks Operations
234 ##     @defgroup l3_healing       Repairing Operations
235 ##     @defgroup l3_restore_ss    Restore presentation parameters and a tree of sub-shapes
236
237 ##   @}
238 ##   @defgroup l2_measure       Using measurement tools
239 ##   @defgroup l2_field         Field on Geometry
240 ##   @defgroup l2_testing       Testing
241
242 ## @}
243
244 import omniORB
245
246 # initialize SALOME session in try/except block
247 # to avoid problems in some cases, e.g. when generating documentation
248 try:
249     import salome
250     salome.salome_init()
251     from salome import *
252 except:
253     pass
254
255 from salome_notebook import *
256
257 import GEOM
258 import math
259 import os
260 import functools
261
262 from salome.geom.gsketcher import Sketcher3D, Sketcher2D, Polyline2D
263 from salome.geom.canonicalrecognition import CanonicalRecognition
264 from salome.geom.conformity import CheckConformity
265 from salome.geom.proximity import ShapeProximity
266
267 # In case the omniORBpy EnumItem class does not fully support Python 3
268 # (for instance in version 4.2.1-2), the comparison ordering methods must be
269 # defined
270 #
271 try:
272     GEOM.COMPOUND < GEOM.SOLID
273 except TypeError:
274     def enumitem_eq(self, other):
275         try:
276             if isinstance(other, omniORB.EnumItem):
277                 if other._parent_id == self._parent_id:
278                     return self._v == other._v
279                 else:
280                     return self._parent_id == other._parent_id
281             else:
282                 return id(self) == id(other)
283         except:
284             return id(self) == id(other)
285
286     def enumitem_lt(self, other):
287         try:
288             if isinstance(other, omniORB.EnumItem):
289                 if other._parent_id == self._parent_id:
290                     return self._v < other._v
291                 else:
292                     return self._parent_id < other._parent_id
293             else:
294                 return id(self) < id(other)
295         except:
296             return id(self) < id(other)
297
298     def enumitem_le(self, other):
299         try:
300             if isinstance(other, omniORB.EnumItem):
301                 if other._parent_id == self._parent_id:
302                     return self._v <= other._v
303                 else:
304                     return self._parent_id <= other._parent_id
305             else:
306                 return id(self) <= id(other)
307         except:
308             return id(self) <= id(other)
309
310     def enumitem_gt(self, other):
311         try:
312             if isinstance(other, omniORB.EnumItem):
313                 if other._parent_id == self._parent_id:
314                     return self._v > other._v
315                 else:
316                     return self._parent_id > other._parent_id
317             else:
318                 return id(self) > id(other)
319         except:
320             return id(self) > id(other)
321
322     def enumitem_ge(self, other):
323         try:
324             if isinstance(other, omniORB.EnumItem):
325                 if other._parent_id == self._parent_id:
326                     return self._v >= other._v
327                 else:
328                     return self._parent_id >= other._parent_id
329             else:
330                 return id(self) >= id(other)
331         except:
332             return id(self) >= id(other)
333
334     GEOM.omniORB.EnumItem.__eq__ = enumitem_eq
335     GEOM.omniORB.EnumItem.__lt__ = enumitem_lt
336     GEOM.omniORB.EnumItem.__le__ = enumitem_le
337     GEOM.omniORB.EnumItem.__gt__ = enumitem_gt
338     GEOM.omniORB.EnumItem.__ge__ = enumitem_ge
339     omniORB.EnumItem.__eq__ = enumitem_eq
340     omniORB.EnumItem.__lt__ = enumitem_lt
341     omniORB.EnumItem.__le__ = enumitem_le
342     omniORB.EnumItem.__gt__ = enumitem_gt
343     omniORB.EnumItem.__ge__ = enumitem_ge
344
345 # service function
346 def _toListOfNames(_names, _size=-1):
347     l = []
348     import types
349     if type(_names) in [list, tuple]:
350         for i in _names: l.append(i)
351     elif _names:
352         l.append(_names)
353     if l and len(l) < _size:
354         for i in range(len(l), _size): l.append("%s_%d"%(l[0],i))
355     return l
356
357 # Decorator function to manage transactions for all geometric operations.
358 def ManageTransactions(theOpeName):
359     def MTDecorator(theFunction):
360         # To keep the original function name an documentation.
361         @functools.wraps(theFunction)
362         def OpenCallClose(self, *args, **kwargs):
363             # Open transaction
364             anOperation = getattr(self, theOpeName)
365             anOperation.StartOperation()
366             try:
367                 # Call the function
368                 res = theFunction(self, *args, **kwargs)
369                 # Commit transaction
370                 anOperation.FinishOperation()
371                 return res
372             except:
373                 # Abort transaction
374                 anOperation.AbortOperation()
375                 raise
376         return OpenCallClose
377     return MTDecorator
378
379 ## Raise an Error, containing the Method_name, if Operation is Failed
380 ## @ingroup l1_geomBuilder_auxiliary
381 def RaiseIfFailed (Method_name, Operation):
382     if not Operation.IsDone() and Operation.GetErrorCode() != "NOT_FOUND_ANY":
383         raise RuntimeError(Method_name + " : " + Operation.GetErrorCode())
384
385 def PrintOrRaise(message, raiseException=False):
386     if raiseException:
387         raise RuntimeError(message)
388     else:
389         print(message)
390
391 ## Return list of variables value from salome notebook
392 ## @ingroup l1_geomBuilder_auxiliary
393 def ParseParameters(*parameters):
394     Result = []
395     StringResult = []
396     for parameter in parameters:
397         if isinstance(parameter, list):
398             lResults = ParseParameters(*parameter)
399             if len(lResults) > 0:
400                 Result.append(lResults[:-1])
401                 StringResult += lResults[-1].split(":")
402                 pass
403             pass
404         else:
405             if isinstance(parameter,str):
406                 if notebook.isVariable(parameter):
407                     Result.append(notebook.get(parameter))
408                 else:
409                     raise RuntimeError("Variable with name '" + parameter + "' doesn't exist!!!")
410                 pass
411             else:
412                 Result.append(parameter)
413                 pass
414             StringResult.append(str(parameter))
415             pass
416         pass
417     if Result:
418         Result.append(":".join(StringResult))
419     else:
420         Result = ":".join(StringResult)
421     return Result
422
423 ## Return list of variables value from salome notebook
424 ## @ingroup l1_geomBuilder_auxiliary
425 def ParseList(list):
426     Result = []
427     StringResult = ""
428     for parameter in list:
429         if isinstance(parameter,str) and notebook.isVariable(parameter):
430             Result.append(str(notebook.get(parameter)))
431             pass
432         else:
433             Result.append(str(parameter))
434             pass
435
436         StringResult = StringResult + str(parameter)
437         StringResult = StringResult + ":"
438         pass
439     StringResult = StringResult[:len(StringResult)-1]
440     return Result, StringResult
441
442 ## Return list of variables value from salome notebook
443 ## @ingroup l1_geomBuilder_auxiliary
444 def ParseSketcherCommand(command):
445     Result = ""
446     StringResult = ""
447     sections = command.split(":")
448     for section in sections:
449         parameters = section.split(" ")
450         paramIndex = 1
451         for parameter in parameters:
452             if paramIndex > 1 and parameter.find("'") != -1:
453                 parameter = parameter.replace("'","")
454                 if notebook.isVariable(parameter):
455                     Result = Result + str(notebook.get(parameter)) + " "
456                     pass
457                 else:
458                     raise RuntimeError("Variable with name '" + parameter + "' doesn't exist!!!")
459                     pass
460                 pass
461             else:
462                 Result = Result + str(parameter) + " "
463                 pass
464             if paramIndex > 1:
465                 StringResult = StringResult + parameter
466                 StringResult = StringResult + ":"
467                 pass
468             paramIndex = paramIndex + 1
469             pass
470         Result = Result[:len(Result)-1] + ":"
471         pass
472     Result = Result[:len(Result)-1]
473     return Result, StringResult
474
475 ## Helper function which can be used to pack the passed string to the byte data.
476 ## Only '1' an '0' symbols are valid for the string. The missing bits are replaced by zeroes.
477 ## If the string contains invalid symbol (neither '1' nor '0'), the function raises an exception.
478 ## For example,
479 ## \code
480 ## val = PackData("10001110") # val = 0xAE
481 ## val = PackData("1")        # val = 0x80
482 ## \endcode
483 ## @param data unpacked data - a string containing '1' and '0' symbols
484 ## @return data packed to the byte stream
485 ## @ingroup l1_geomBuilder_auxiliary
486 def PackData(data):
487     """
488     Helper function which can be used to pack the passed string to the byte data.
489     Only '1' an '0' symbols are valid for the string. The missing bits are replaced by zeroes.
490     If the string contains invalid symbol (neither '1' nor '0'), the function raises an exception.
491
492     Parameters:
493         data unpacked data - a string containing '1' and '0' symbols
494
495     Returns:
496         data packed to the byte stream
497
498     Example of usage:
499         val = PackData("10001110") # val = 0xAE
500         val = PackData("1")        # val = 0x80
501     """
502     bytes = len(data)/8
503     if len(data)%8: bytes += 1
504     res = ""
505     for b in range(bytes):
506         d = data[b*8:(b+1)*8]
507         val = 0
508         for i in range(8):
509             val *= 2
510             if i < len(d):
511                 if d[i] == "1": val += 1
512                 elif d[i] != "0":
513                     raise "Invalid symbol %s" % d[i]
514                 pass
515             pass
516         res += chr(val)
517         pass
518     return res
519
520 ## Read bitmap texture from the text file.
521 ## In that file, any non-zero symbol represents '1' opaque pixel of the bitmap.
522 ## A zero symbol ('0') represents transparent pixel of the texture bitmap.
523 ## The function returns width and height of the pixmap in pixels and byte stream representing
524 ## texture bitmap itself.
525 ##
526 ## This function can be used to read the texture to the byte stream in order to pass it to
527 ## the AddTexture() function of geomBuilder class.
528 ## For example,
529 ## \code
530 ## from salome.geom import geomBuilder
531 ## geompy = geomBuilder.New()
532 ## texture = geompy.readtexture('mytexture.dat')
533 ## texture = geompy.AddTexture(*texture)
534 ## obj.SetMarkerTexture(texture)
535 ## \endcode
536 ## @param fname texture file name
537 ## @return sequence of tree values: texture's width, height in pixels and its byte stream
538 ## @ingroup l1_geomBuilder_auxiliary
539 def ReadTexture(fname):
540     """
541     Read bitmap texture from the text file.
542     In that file, any non-zero symbol represents '1' opaque pixel of the bitmap.
543     A zero symbol ('0') represents transparent pixel of the texture bitmap.
544     The function returns width and height of the pixmap in pixels and byte stream representing
545     texture bitmap itself.
546     This function can be used to read the texture to the byte stream in order to pass it to
547     the AddTexture() function of geomBuilder class.
548
549     Parameters:
550         fname texture file name
551
552     Returns:
553         sequence of tree values: texture's width, height in pixels and its byte stream
554
555     Example of usage:
556         from salome.geom import geomBuilder
557         geompy = geomBuilder.New()
558         texture = geompy.readtexture('mytexture.dat')
559         texture = geompy.AddTexture(*texture)
560         obj.SetMarkerTexture(texture)
561     """
562     try:
563         f = open(fname)
564         lines = [ l.strip() for l in f.readlines()]
565         f.close()
566         maxlen = 0
567         if lines: maxlen = max([len(x) for x in lines])
568         lenbytes = maxlen/8
569         if maxlen%8: lenbytes += 1
570         bytedata=""
571         for line in lines:
572             if len(line)%8:
573                 lenline = (len(line)/8+1)*8
574                 pass
575             else:
576                 lenline = (len(line)/8)*8
577                 pass
578             for i in range(lenline/8):
579                 byte=""
580                 for j in range(8):
581                     if i*8+j < len(line) and line[i*8+j] != "0": byte += "1"
582                     else: byte += "0"
583                     pass
584                 bytedata += PackData(byte)
585                 pass
586             for i in range(lenline/8, lenbytes):
587                 bytedata += PackData("0")
588             pass
589         return lenbytes*8, len(lines), bytedata
590     except:
591         pass
592     return 0, 0, ""
593
594 ## Returns a long value from enumeration type
595 #  Can be used for CORBA enumerator types like GEOM.shape_type
596 #  @param theItem enumeration type
597 #  @ingroup l1_geomBuilder_auxiliary
598 def EnumToLong(theItem):
599     """
600     Returns a long value from enumeration type
601     Can be used for CORBA enumerator types like geomBuilder.ShapeType
602
603     Parameters:
604         theItem enumeration type
605     """
606     ret = theItem
607     if hasattr(theItem, "_v"): ret = theItem._v
608     return ret
609
610 ## Pack an argument into a list
611 def ToList( arg ):
612     if isinstance( arg, list ):
613         return arg
614     if hasattr( arg, "__getitem__" ):
615         return list( arg )
616     return [ arg ]
617
618 ## Information about closed/unclosed state of shell or wire
619 #  @ingroup l1_geomBuilder_auxiliary
620 class info:
621     """
622     Information about closed/unclosed state of shell or wire
623     """
624     UNKNOWN  = 0
625     CLOSED   = 1
626     UNCLOSED = 2
627
628 ## Private class used to bind calls of plugin operations to geomBuilder
629 class PluginOperation:
630   def __init__(self, operation, function):
631     self.operation = operation
632     self.function = function
633     pass
634
635   @ManageTransactions("operation")
636   def __call__(self, *args):
637     res = self.function(self.operation, *args)
638     RaiseIfFailed(self.function.__name__, self.operation)
639     return res
640
641 # Warning: geom is a singleton
642 geom = None
643 engine = None
644 doLcc = False
645 created = False
646
647 class geomBuilder(GEOM._objref_GEOM_Gen):
648
649         ## Enumeration ShapeType as a dictionary. \n
650         ## Topological types of shapes (like Open Cascade types). See GEOM::shape_type for details.
651         #  @ingroup l1_geomBuilder_auxiliary
652         ShapeType = {"AUTO":-1, "COMPOUND":0, "COMPSOLID":1, "SOLID":2, "SHELL":3, "FACE":4, "WIRE":5, "EDGE":6, "VERTEX":7, "SHAPE":8, "FLAT":9}
653
654         ## Kinds of shape in terms of <VAR>GEOM.GEOM_IKindOfShape.shape_kind</VAR> enumeration
655         #  and a list of parameters, describing the shape.
656         #  List of parameters, describing the shape:
657         #  - COMPOUND:            [nb_solids  nb_faces  nb_edges  nb_vertices]
658         #  - COMPSOLID:           [nb_solids  nb_faces  nb_edges  nb_vertices]
659         #
660         #  - SHELL:       [info.CLOSED / info.UNCLOSED  nb_faces  nb_edges  nb_vertices]
661         #
662         #  - WIRE:        [info.CLOSED / info.UNCLOSED nb_edges  nb_vertices]
663         #
664         #  - SPHERE:       [xc yc zc            R]
665         #  - CYLINDER:     [xb yb zb  dx dy dz  R         H]
666         #  - BOX:          [xc yc zc                      ax ay az]
667         #  - ROTATED_BOX:  [xc yc zc  zx zy zz  xx xy xz  ax ay az]
668         #  - TORUS:        [xc yc zc  dx dy dz  R_1  R_2]
669         #  - CONE:         [xb yb zb  dx dy dz  R_1  R_2  H]
670         #  - POLYHEDRON:                       [nb_faces  nb_edges  nb_vertices]
671         #  - SOLID:                            [nb_faces  nb_edges  nb_vertices]
672         #
673         #  - SPHERE2D:     [xc yc zc            R]
674         #  - CYLINDER2D:   [xb yb zb  dx dy dz  R         H]
675         #  - TORUS2D:      [xc yc zc  dx dy dz  R_1  R_2]
676         #  - CONE2D:       [xc yc zc  dx dy dz  R_1  R_2  H]
677         #  - DISK_CIRCLE:  [xc yc zc  dx dy dz  R]
678         #  - DISK_ELLIPSE: [xc yc zc  dx dy dz  R_1  R_2]
679         #  - POLYGON:      [xo yo zo  dx dy dz            nb_edges  nb_vertices]
680         #  - PLANE:        [xo yo zo  dx dy dz]
681         #  - PLANAR:       [xo yo zo  dx dy dz            nb_edges  nb_vertices]
682         #  - FACE:                                       [nb_edges  nb_vertices]
683         #
684         #  - CIRCLE:       [xc yc zc  dx dy dz  R]
685         #  - ARC_CIRCLE:   [xc yc zc  dx dy dz  R         x1 y1 z1  x2 y2 z2]
686         #  - ELLIPSE:      [xc yc zc  dx dy dz  R_1  R_2  v1x v1y v1z  v2x v2y v2z]
687         #  - ARC_ELLIPSE:  [xc yc zc  dx dy dz  R_1  R_2  x1 y1 z1  x2 y2 z2  v1x v1y v1z  v2x v2y v2z]
688         #  - LINE:         [xo yo zo  dx dy dz]
689         #  - SEGMENT:      [x1 y1 z1  x2 y2 z2]
690         #  - CRV_BSPLINE:  [periodicity degree nb_poles nb_knots nb_weights nb_multiplicities  xi yi zi  ki  wi  mi]
691         #  - CRV_BEZIER:   [nb_poles nb_weights  xi yi zi  wi]
692         #  - HYPERBOLA:    [xc yc zc  dx dy dz  R_1  R_2  v1x v1y v1z  v2x v2y v2z]
693         #  - PARABOLA:     [xc yc zc  dx dy dz  F  v1x v1y v1z  v2x v2y v2z]
694         #  - EDGE:                                                 [nb_vertices]
695         #
696         #  - VERTEX:       [x  y  z]
697         #
698         #  - LCS:          [x y z  xx xy xz  yx yy yz  zx zy zz]
699         #  @ingroup l1_geomBuilder_auxiliary
700         kind = GEOM.GEOM_IKindOfShape
701
702         def __new__(cls, *args):
703             global engine
704             global geom
705             global doLcc
706             global created
707             #print "==== __new__ ", engine, geom, doLcc, created
708             if geom is None:
709                 # geom engine is either retrieved from engine, or created
710                 geom = engine
711                 # Following test avoids a recursive loop
712                 if doLcc:
713                     if geom is not None:
714                         # geom engine not created: existing engine found
715                         doLcc = False
716                     if doLcc and not created:
717                         doLcc = False
718                         # FindOrLoadComponent called:
719                         # 1. CORBA resolution of server
720                         # 2. the __new__ method is called again
721                         #print "==== FindOrLoadComponent ", engine, geom, doLcc, created
722                         geom = lcc.FindOrLoadComponent( "FactoryServer", "GEOM" )
723                         #print "====1 ",geom
724                 else:
725                     # FindOrLoadComponent not called
726                     if geom is None:
727                         # geomBuilder instance is created from lcc.FindOrLoadComponent
728                         #print "==== super ", engine, geom, doLcc, created
729                         geom = super(geomBuilder,cls).__new__(cls)
730                         #print "====2 ",geom
731                     else:
732                         # geom engine not created: existing engine found
733                         #print "==== existing ", engine, geom, doLcc, created
734                         pass
735                 #print "return geom 1 ", geom
736                 return geom
737
738             #print "return geom 2 ", geom
739             return geom
740
741         def __init__(self, *args):
742             global created
743             #print "-------- geomBuilder __init__ --- ", created, self
744             if not created:
745               created = True
746               GEOM._objref_GEOM_Gen.__init__(self, *args)
747               self.myMaxNbSubShapesAllowed = 0 # auto-publishing is disabled by default
748               self.myBuilder = None
749               self.BasicOp  = None
750               self.CurvesOp = None
751               self.PrimOp   = None
752               self.ShapesOp = None
753               self.HealOp   = None
754               self.InsertOp = None
755               self.BoolOp   = None
756               self.TrsfOp   = None
757               self.LocalOp  = None
758               self.MeasuOp  = None
759               self.BlocksOp = None
760               self.GroupOp  = None
761               self.FieldOp  = None
762               self.TestOp   = None
763             pass
764
765         ## Process object publication in the study, as follows:
766         #  - if @a theName is specified (not None), the object is published in the study
767         #    with this name, not taking into account "auto-publishing" option;
768         #  - if @a theName is NOT specified, the object is published in the study
769         #    (using default name, which can be customized using @a theDefaultName parameter)
770         #    only if auto-publishing is switched on.
771         #
772         #  @param theObj  object, a subject for publishing
773         #  @param theName object name for study
774         #  @param theDefaultName default name for the auto-publishing
775         #
776         #  @sa addToStudyAuto()
777         def _autoPublish(self, theObj, theName, theDefaultName="noname"):
778             # ---
779             def _item_name(_names, _defname, _idx=-1):
780                 if not _names: _names = _defname
781                 if type(_names) in [list, tuple]:
782                     if _idx >= 0:
783                         if _idx >= len(_names) or not _names[_idx]:
784                             if type(_defname) not in [list, tuple]:
785                                 _name = "%s_%d"%(_defname, _idx+1)
786                             elif len(_defname) > 0 and _idx >= 0 and _idx < len(_defname):
787                                 _name = _defname[_idx]
788                             else:
789                                 _name = "%noname_%d"%(dn, _idx+1)
790                             pass
791                         else:
792                             _name = _names[_idx]
793                         pass
794                     else:
795                         # must be wrong  usage
796                         _name = _names[0]
797                     pass
798                 else:
799                     if _idx >= 0:
800                         _name = "%s_%d"%(_names, _idx+1)
801                     else:
802                         _name = _names
803                     pass
804                 return _name
805             # ---
806             def _publish( _name, _obj ):
807                 fatherObj = None
808                 if isinstance( _obj, GEOM._objref_GEOM_Field ):
809                     fatherObj = _obj.GetShape()
810                 elif isinstance( _obj, GEOM._objref_GEOM_FieldStep ):
811                     fatherObj = _obj.GetField()
812                 elif not _obj.IsMainShape():
813                     fatherObj = _obj.GetMainShape()
814                     pass
815                 if fatherObj and fatherObj.GetStudyEntry():
816                     self.addToStudyInFather(fatherObj, _obj, _name)
817                 else:
818                     self.addToStudy(_obj, _name)
819                     pass
820                 return
821             # ---
822             if not theObj:
823                 return # null object
824             if not theName and not self.myMaxNbSubShapesAllowed:
825                 return # nothing to do: auto-publishing is disabled
826             if not theName and not theDefaultName:
827                 return # neither theName nor theDefaultName is given
828             import types
829             if type(theObj) in [list, tuple]:
830                 # list of objects is being published
831                 idx = 0
832                 for obj in theObj:
833                     if not obj: continue # bad object
834                     name = _item_name(theName, theDefaultName, idx)
835                     _publish( name, obj )
836                     idx = idx+1
837                     if not theName and idx == self.myMaxNbSubShapesAllowed: break
838                     pass
839                 pass
840             else:
841                 # single object is published
842                 name = _item_name(theName, theDefaultName)
843                 _publish( name, theObj )
844             pass
845
846         ## @addtogroup l1_geomBuilder_auxiliary
847         ## @{
848         def init_geom(self):
849             self.myStudy = salome.myStudy
850             self.myBuilder = self.myStudy.NewBuilder()
851
852             # load data from the study file, if necessary
853             component = self.myStudy.FindComponent("GEOM")
854             if component:
855                 self.myBuilder.LoadWith(component, self)
856
857             self.BasicOp  = self.GetIBasicOperations    ()
858             self.CurvesOp = self.GetICurvesOperations   ()
859             self.PrimOp   = self.GetI3DPrimOperations   ()
860             self.ShapesOp = self.GetIShapesOperations   ()
861             self.HealOp   = self.GetIHealingOperations  ()
862             self.InsertOp = self.GetIInsertOperations   ()
863             self.BoolOp   = self.GetIBooleanOperations  ()
864             self.TrsfOp   = self.GetITransformOperations()
865             self.LocalOp  = self.GetILocalOperations    ()
866             self.MeasuOp  = self.GetIMeasureOperations  ()
867             self.BlocksOp = self.GetIBlocksOperations   ()
868             self.GroupOp  = self.GetIGroupOperations    ()
869             self.FieldOp  = self.GetIFieldOperations    ()
870             self.TestOp   = self.GetITestOperations     ()
871
872             notebook.myStudy = self.myStudy
873             pass
874
875         def GetPluginOperations(self, libraryName):
876             op = GEOM._objref_GEOM_Gen.GetPluginOperations(self, libraryName)
877             return op
878
879         ## Enable / disable results auto-publishing
880         #
881         #  The automatic publishing is managed in the following way:
882         #  - if @a maxNbSubShapes = 0, automatic publishing is disabled.
883         #  - if @a maxNbSubShapes = -1 (default), automatic publishing is enabled and
884         #  maximum number of sub-shapes allowed for publishing is unlimited; any negative
885         #  value passed as parameter has the same effect.
886         #  - if @a maxNbSubShapes is any positive value, automatic publishing is enabled and
887         #  maximum number of sub-shapes allowed for publishing is set to specified value.
888         #
889         #  @param maxNbSubShapes maximum number of sub-shapes allowed for publishing.
890         #  @ingroup l1_publish_data
891         def addToStudyAuto(self, maxNbSubShapes=-1):
892             """
893             Enable / disable results auto-publishing
894
895             The automatic publishing is managed in the following way:
896             - if @a maxNbSubShapes = 0, automatic publishing is disabled;
897             - if @a maxNbSubShapes = -1 (default), automatic publishing is enabled and
898             maximum number of sub-shapes allowed for publishing is unlimited; any negative
899             value passed as parameter has the same effect.
900             - if @a maxNbSubShapes is any positive value, automatic publishing is enabled and
901             maximum number of sub-shapes allowed for publishing is set to this value.
902
903             Parameters:
904                 maxNbSubShapes maximum number of sub-shapes allowed for publishing.
905
906             Example of usage:
907                 geompy.addToStudyAuto()   # enable auto-publishing
908                 geompy.MakeBoxDXDYDZ(100) # box is created and published with default name
909                 geompy.addToStudyAuto(0)  # disable auto-publishing
910             """
911             self.myMaxNbSubShapesAllowed = max(-1, maxNbSubShapes)
912             pass
913
914         ## Dump component to the Python script
915         #  This method overrides IDL function to allow default values for the parameters.
916         def DumpPython(self, theIsPublished=True, theIsMultiFile=True):
917             """
918             Dump component to the Python script
919             This method overrides IDL function to allow default values for the parameters.
920             """
921             return GEOM._objref_GEOM_Gen.DumpPython(self, theIsPublished, theIsMultiFile)
922
923         ## Get name for sub-shape aSubObj of shape aMainObj
924         #
925         # @ref swig_SubShapeName "Example"
926         @ManageTransactions("ShapesOp")
927         def SubShapeName(self,aSubObj, aMainObj):
928             """
929             Get name for sub-shape aSubObj of shape aMainObj
930             """
931             # Example: see GEOM_TestAll.py
932
933             #aSubId  = orb.object_to_string(aSubObj)
934             #aMainId = orb.object_to_string(aMainObj)
935             #index = gg.getIndexTopology(aSubId, aMainId)
936             #name = gg.getShapeTypeString(aSubId) + "_%d"%(index)
937             index = self.ShapesOp.GetTopologyIndex(aMainObj, aSubObj)
938             name = self.ShapesOp.GetShapeTypeString(aSubObj) + "_%d"%(index)
939             return name
940
941         ## Publish in study aShape with name aName
942         #
943         #  \param aShape the shape to be published
944         #  \param aName  the name for the shape
945         #  \param doRestoreSubShapes if True, finds and publishes also
946         #         sub-shapes of <VAR>aShape</VAR>, corresponding to its arguments
947         #         and published sub-shapes of arguments
948         #  \param theArgs,theFindMethod,theInheritFirstArg see RestoreSubShapes() for
949         #                                                  these arguments description
950         #  \return study entry of the published shape in form of string
951         #
952         #  @ingroup l1_publish_data
953         #  @ref swig_all_addtostudy "Example"
954         def addToStudy(self, aShape, aName, doRestoreSubShapes=False,
955                        theArgs=[], theFindMethod=GEOM.FSM_GetInPlace, theInheritFirstArg=False):
956             """
957             Publish in study aShape with name aName
958
959             Parameters:
960                 aShape the shape to be published
961                 aName  the name for the shape
962                 doRestoreSubShapes if True, finds and publishes also
963                                    sub-shapes of aShape, corresponding to its arguments
964                                    and published sub-shapes of arguments
965                 theArgs,theFindMethod,theInheritFirstArg see geompy.RestoreSubShapes() for
966                                                          these arguments description
967
968             Returns:
969                 study entry of the published shape in form of string
970
971             Example of usage:
972                 id_block1 = geompy.addToStudy(Block1, "Block 1")
973             """
974             # Example: see GEOM_TestAll.py
975             try:
976                 aSObject = self.AddInStudy(aShape, aName, None)
977                 if aSObject and aName: aSObject.SetAttrString("AttributeName", aName)
978                 if doRestoreSubShapes:
979                     self.RestoreSubShapesSO(aSObject, theArgs,
980                                             theFindMethod, theInheritFirstArg, True )
981             except:
982                 print("addToStudy() failed")
983                 return ""
984             return aShape.GetStudyEntry()
985
986         ## Publish in study aShape with name aName as sub-object of previously published aFather
987         #  \param aFather previously published object
988         #  \param aShape the shape to be published as sub-object of <VAR>aFather</VAR>
989         #  \param aName  the name for the shape
990         #
991         #  \return study entry of the published shape in form of string
992         #
993         #  @ingroup l1_publish_data
994         #  @ref swig_all_addtostudyInFather "Example"
995         def addToStudyInFather(self, aFather, aShape, aName):
996             """
997             Publish in study aShape with name aName as sub-object of previously published aFather
998
999             Parameters:
1000                 aFather previously published object
1001                 aShape the shape to be published as sub-object of aFather
1002                 aName  the name for the shape
1003
1004             Returns:
1005                 study entry of the published shape in form of string
1006             """
1007             # Example: see GEOM_TestAll.py
1008             try:
1009                 aSObject = self.AddInStudy(aShape, aName, aFather)
1010                 if aSObject and aName: aSObject.SetAttrString("AttributeName", aName)
1011             except:
1012                 print("addToStudyInFather() failed")
1013                 return ""
1014             return aShape.GetStudyEntry()
1015
1016         ## Unpublish object in study
1017         #
1018         #  \param obj the object to be unpublished
1019         def hideInStudy(self, obj):
1020             """
1021             Unpublish object in study
1022
1023             Parameters:
1024                 obj the object to be unpublished
1025             """
1026             ior = salome.orb.object_to_string(obj)
1027             aSObject = self.myStudy.FindObjectIOR(ior)
1028             if aSObject is not None:
1029                 genericAttribute = self.myBuilder.FindOrCreateAttribute(aSObject, "AttributeDrawable")
1030                 drwAttribute = genericAttribute._narrow(SALOMEDS.AttributeDrawable)
1031                 drwAttribute.SetDrawable(False)
1032                 # hide references if any
1033                 vso = self.myStudy.FindDependances(aSObject);
1034                 for refObj in vso :
1035                     genericAttribute = self.myBuilder.FindOrCreateAttribute(refObj, "AttributeDrawable")
1036                     drwAttribute = genericAttribute._narrow(SALOMEDS.AttributeDrawable)
1037                     drwAttribute.SetDrawable(False)
1038                     pass
1039                 pass
1040
1041         # end of l1_geomBuilder_auxiliary
1042         ## @}
1043
1044         ## @addtogroup l3_restore_ss
1045         ## @{
1046
1047         ## Publish sub-shapes, standing for arguments and sub-shapes of arguments
1048         #  To be used from python scripts out of addToStudy() (non-default usage)
1049         #  \param theObject published GEOM.GEOM_Object, arguments of which will be published
1050         #  \param theArgs   list of GEOM.GEOM_Object, operation arguments to be published.
1051         #                   If this list is empty, all operation arguments will be published
1052         #  \param theFindMethod method to search sub-shapes, corresponding to arguments and
1053         #                       their sub-shapes. Value from enumeration GEOM.find_shape_method.
1054         #  \param theInheritFirstArg set properties of the first argument for <VAR>theObject</VAR>.
1055         #                            Do not publish sub-shapes in place of arguments, but only
1056         #                            in place of sub-shapes of the first argument,
1057         #                            because the whole shape corresponds to the first argument.
1058         #                            Mainly to be used after transformations, but it also can be
1059         #                            useful after partition with one object shape, and some other
1060         #                            operations, where only the first argument has to be considered.
1061         #                            If theObject has only one argument shape, this flag is automatically
1062         #                            considered as True, not regarding really passed value.
1063         #  \param theAddPrefix add prefix "from_" to names of restored sub-shapes,
1064         #                      and prefix "from_subshapes_of_" to names of partially restored sub-shapes.
1065         #  \return list of published sub-shapes
1066         #
1067         #  @ref tui_restore_prs_params "Example"
1068         def RestoreSubShapes (self, theObject, theArgs=[], theFindMethod=GEOM.FSM_GetInPlace,
1069                               theInheritFirstArg=False, theAddPrefix=True):
1070             """
1071             Publish sub-shapes, standing for arguments and sub-shapes of arguments
1072             To be used from python scripts out of geompy.addToStudy (non-default usage)
1073
1074             Parameters:
1075                 theObject published GEOM.GEOM_Object, arguments of which will be published
1076                 theArgs   list of GEOM.GEOM_Object, operation arguments to be published.
1077                           If this list is empty, all operation arguments will be published
1078                 theFindMethod method to search sub-shapes, corresponding to arguments and
1079                               their sub-shapes. Value from enumeration GEOM.find_shape_method.
1080                 theInheritFirstArg set properties of the first argument for theObject.
1081                                    Do not publish sub-shapes in place of arguments, but only
1082                                    in place of sub-shapes of the first argument,
1083                                    because the whole shape corresponds to the first argument.
1084                                    Mainly to be used after transformations, but it also can be
1085                                    useful after partition with one object shape, and some other
1086                                    operations, where only the first argument has to be considered.
1087                                    If theObject has only one argument shape, this flag is automatically
1088                                    considered as True, not regarding really passed value.
1089                 theAddPrefix add prefix "from_" to names of restored sub-shapes,
1090                              and prefix "from_subshapes_of_" to names of partially restored sub-shapes.
1091             Returns:
1092                 list of published sub-shapes
1093             """
1094             # Example: see GEOM_TestAll.py
1095             return self.RestoreSubShapesO(theObject, theArgs,
1096                                           theFindMethod, theInheritFirstArg, theAddPrefix)
1097
1098         ## Publish sub-shapes, standing for arguments and sub-shapes of arguments
1099         #  To be used from python scripts out of addToStudy() (non-default usage)
1100         #  \param theObject published GEOM.GEOM_Object, arguments of which will be published
1101         #  \param theArgs   list of GEOM.GEOM_Object, operation arguments to be published.
1102         #                   If this list is empty, all operation arguments will be published
1103         #  \param theFindMethod method to search sub-shapes, corresponding to arguments and
1104         #                       their sub-shapes. Value from enumeration GEOM::find_shape_method.
1105         #  \param theInheritFirstArg set properties of the first argument for <VAR>theObject</VAR>.
1106         #                            Do not publish sub-shapes in place of arguments, but only
1107         #                            in place of sub-shapes of the first argument,
1108         #                            because the whole shape corresponds to the first argument.
1109         #                            Mainly to be used after transformations, but it also can be
1110         #                            useful after partition with one object shape, and some other
1111         #                            operations, where only the first argument has to be considered.
1112         #                            If theObject has only one argument shape, this flag is automatically
1113         #                            considered as True, not regarding really passed value.
1114         #  \param theAddPrefix add prefix "from_" to names of restored sub-shapes,
1115         #                      and prefix "from_subshapes_of_" to names of partially restored sub-shapes.
1116         #  \return list of published sub-shapes
1117         #
1118         #  @ref tui_restore_prs_params "Example"
1119         def RestoreGivenSubShapes (self, theObject, theArgs=[], theFindMethod=GEOM.FSM_GetInPlace,
1120                                    theInheritFirstArg=False, theAddPrefix=True):
1121             """
1122             Publish sub-shapes, standing for arguments and sub-shapes of arguments
1123             To be used from python scripts out of geompy.addToStudy() (non-default usage)
1124
1125             Parameters:
1126                 theObject published GEOM.GEOM_Object, arguments of which will be published
1127                 theArgs   list of GEOM.GEOM_Object, operation arguments to be published.
1128                           If this list is empty, all operation arguments will be published
1129                 theFindMethod method to search sub-shapes, corresponding to arguments and
1130                               their sub-shapes. Value from enumeration GEOM::find_shape_method.
1131                 theInheritFirstArg set properties of the first argument for theObject.
1132                                    Do not publish sub-shapes in place of arguments, but only
1133                                    in place of sub-shapes of the first argument,
1134                                    because the whole shape corresponds to the first argument.
1135                                    Mainly to be used after transformations, but it also can be
1136                                    useful after partition with one object shape, and some other
1137                                    operations, where only the first argument has to be considered.
1138                                    If theObject has only one argument shape, this flag is automatically
1139                                    considered as True, not regarding really passed value.
1140                 theAddPrefix add prefix "from_" to names of restored sub-shapes,
1141                              and prefix "from_subshapes_of_" to names of partially restored sub-shapes.
1142
1143             Returns:
1144                 list of published sub-shapes
1145             """
1146             # Example: see GEOM_TestAll.py
1147             return self.RestoreGivenSubShapesO(theObject, theArgs,
1148                                                theFindMethod, theInheritFirstArg, theAddPrefix)
1149
1150         # end of l3_restore_ss
1151         ## @}
1152
1153         ## @addtogroup l3_basic_go
1154         ## @{
1155
1156         ## Create point by three coordinates.
1157         #  @param theX The X coordinate of the point.
1158         #  @param theY The Y coordinate of the point.
1159         #  @param theZ The Z coordinate of the point.
1160         #  @param theName Object name; when specified, this parameter is used
1161         #         for result publication in the study. Otherwise, if automatic
1162         #         publication is switched on, default value is used for result name.
1163         #
1164         #  @return New GEOM.GEOM_Object, containing the created point.
1165         #
1166         #  @ref tui_creation_point "Example"
1167         @ManageTransactions("BasicOp")
1168         def MakeVertex(self, theX, theY, theZ, theName=None):
1169             """
1170             Create point by three coordinates.
1171
1172             Parameters:
1173                 theX The X coordinate of the point.
1174                 theY The Y coordinate of the point.
1175                 theZ The Z coordinate of the point.
1176                 theName Object name; when specified, this parameter is used
1177                         for result publication in the study. Otherwise, if automatic
1178                         publication is switched on, default value is used for result name.
1179
1180             Returns:
1181                 New GEOM.GEOM_Object, containing the created point.
1182             """
1183             # Example: see GEOM_TestAll.py
1184             theX,theY,theZ,Parameters = ParseParameters(theX, theY, theZ)
1185             anObj = self.BasicOp.MakePointXYZ(theX, theY, theZ)
1186             RaiseIfFailed("MakePointXYZ", self.BasicOp)
1187             anObj.SetParameters(Parameters)
1188             self._autoPublish(anObj, theName, "vertex")
1189             return anObj
1190
1191         ## Create a point, distant from the referenced point
1192         #  on the given distances along the coordinate axes.
1193         #  @param theReference The referenced point.
1194         #  @param theX Displacement from the referenced point along OX axis.
1195         #  @param theY Displacement from the referenced point along OY axis.
1196         #  @param theZ Displacement from the referenced point along OZ axis.
1197         #  @param theName Object name; when specified, this parameter is used
1198         #         for result publication in the study. Otherwise, if automatic
1199         #         publication is switched on, default value is used for result name.
1200         #
1201         #  @return New GEOM.GEOM_Object, containing the created point.
1202         #
1203         #  @ref tui_creation_point "Example"
1204         @ManageTransactions("BasicOp")
1205         def MakeVertexWithRef(self, theReference, theX, theY, theZ, theName=None):
1206             """
1207             Create a point, distant from the referenced point
1208             on the given distances along the coordinate axes.
1209
1210             Parameters:
1211                 theReference The referenced point.
1212                 theX Displacement from the referenced point along OX axis.
1213                 theY Displacement from the referenced point along OY axis.
1214                 theZ Displacement from the referenced point along OZ axis.
1215                 theName Object name; when specified, this parameter is used
1216                         for result publication in the study. Otherwise, if automatic
1217                         publication is switched on, default value is used for result name.
1218
1219             Returns:
1220                 New GEOM.GEOM_Object, containing the created point.
1221             """
1222             # Example: see GEOM_TestAll.py
1223             theX,theY,theZ,Parameters = ParseParameters(theX, theY, theZ)
1224             anObj = self.BasicOp.MakePointWithReference(theReference, theX, theY, theZ)
1225             RaiseIfFailed("MakePointWithReference", self.BasicOp)
1226             anObj.SetParameters(Parameters)
1227             self._autoPublish(anObj, theName, "vertex")
1228             return anObj
1229
1230         ## Create a point, corresponding to the given parameter on the given curve.
1231         #  @param theRefCurve The referenced curve.
1232         #  @param theParameter Value of parameter on the referenced curve.
1233         #  @param takeOrientationIntoAccount flag that tells if it is necessary
1234         #         to take the curve's orientation into account for the
1235         #         operation. I.e. if this flag is set, the results for the same
1236         #         parameters (except the value 0.5) is different for forward
1237         #         and reversed curves. If it is not set the result is the same.
1238         #  @param theName Object name; when specified, this parameter is used
1239         #         for result publication in the study. Otherwise, if automatic
1240         #         publication is switched on, default value is used for result name.
1241         #
1242         #  @return New GEOM.GEOM_Object, containing the created point.
1243         #
1244         #  @ref tui_creation_point "Example"
1245         @ManageTransactions("BasicOp")
1246         def MakeVertexOnCurve(self, theRefCurve, theParameter,
1247                               takeOrientationIntoAccount=False, theName=None):
1248             """
1249             Create a point, corresponding to the given parameter on the given curve.
1250
1251             Parameters:
1252                 theRefCurve The referenced curve.
1253                 theParameter Value of parameter on the referenced curve.
1254                 takeOrientationIntoAccount flag that tells if it is necessary
1255                         to take the curve's orientation into account for the
1256                         operation. I.e. if this flag is set, the results for
1257                         the same parameters (except the value 0.5) is different
1258                         for forward and reversed curves. If it is not set
1259                         the result is the same.
1260                 theName Object name; when specified, this parameter is used
1261                         for result publication in the study. Otherwise, if automatic
1262                         publication is switched on, default value is used for result name.
1263
1264             Returns:
1265                 New GEOM.GEOM_Object, containing the created point.
1266
1267             Example of usage:
1268                 p_on_arc = geompy.MakeVertexOnCurve(Arc, 0.25)
1269             """
1270             # Example: see GEOM_TestAll.py
1271             theParameter, takeOrientationIntoAccount, Parameters = ParseParameters(
1272                 theParameter, takeOrientationIntoAccount)
1273             anObj = self.BasicOp.MakePointOnCurve(theRefCurve, theParameter,
1274                                                   takeOrientationIntoAccount)
1275             RaiseIfFailed("MakePointOnCurve", self.BasicOp)
1276             anObj.SetParameters(Parameters)
1277             self._autoPublish(anObj, theName, "vertex")
1278             return anObj
1279
1280         ## Create a point by projection give coordinates on the given curve
1281         #  @param theRefCurve The referenced curve.
1282         #  @param theX X-coordinate in 3D space
1283         #  @param theY Y-coordinate in 3D space
1284         #  @param theZ Z-coordinate in 3D space
1285         #  @param theName Object name; when specified, this parameter is used
1286         #         for result publication in the study. Otherwise, if automatic
1287         #         publication is switched on, default value is used for result name.
1288         #
1289         #  @return New GEOM.GEOM_Object, containing the created point.
1290         #
1291         #  @ref tui_creation_point "Example"
1292         @ManageTransactions("BasicOp")
1293         def MakeVertexOnCurveByCoord(self, theRefCurve, theX, theY, theZ, theName=None):
1294             """
1295             Create a point by projection give coordinates on the given curve
1296
1297             Parameters:
1298                 theRefCurve The referenced curve.
1299                 theX X-coordinate in 3D space
1300                 theY Y-coordinate in 3D space
1301                 theZ Z-coordinate in 3D space
1302                 theName Object name; when specified, this parameter is used
1303                         for result publication in the study. Otherwise, if automatic
1304                         publication is switched on, default value is used for result name.
1305
1306             Returns:
1307                 New GEOM.GEOM_Object, containing the created point.
1308
1309             Example of usage:
1310                 p_on_arc3 = geompy.MakeVertexOnCurveByCoord(Arc, 100, -10, 10)
1311             """
1312             # Example: see GEOM_TestAll.py
1313             theX, theY, theZ, Parameters = ParseParameters(theX, theY, theZ)
1314             anObj = self.BasicOp.MakePointOnCurveByCoord(theRefCurve, theX, theY, theZ)
1315             RaiseIfFailed("MakeVertexOnCurveByCoord", self.BasicOp)
1316             anObj.SetParameters(Parameters)
1317             self._autoPublish(anObj, theName, "vertex")
1318             return anObj
1319
1320         ## Create a point, corresponding to the given length on the given curve.
1321         #  @param theRefCurve The referenced curve.
1322         #  @param theLength Length on the referenced curve. It can be negative.
1323         #  @param theStartPoint Point allowing to choose the direction for the calculation
1324         #                       of the length. If None, start from the first point of theRefCurve.
1325         #  @param theName Object name; when specified, this parameter is used
1326         #         for result publication in the study. Otherwise, if automatic
1327         #         publication is switched on, default value is used for result name.
1328         #
1329         #  @return New GEOM.GEOM_Object, containing the created point.
1330         #
1331         #  @ref tui_creation_point "Example"
1332         @ManageTransactions("BasicOp")
1333         def MakeVertexOnCurveByLength(self, theRefCurve, theLength, theStartPoint = None, theName=None):
1334             """
1335             Create a point, corresponding to the given length on the given curve.
1336
1337             Parameters:
1338                 theRefCurve The referenced curve.
1339                 theLength Length on the referenced curve. It can be negative.
1340                 theStartPoint Point allowing to choose the direction for the calculation
1341                               of the length. If None, start from the first point of theRefCurve.
1342                 theName Object name; when specified, this parameter is used
1343                         for result publication in the study. Otherwise, if automatic
1344                         publication is switched on, default value is used for result name.
1345
1346             Returns:
1347                 New GEOM.GEOM_Object, containing the created point.
1348             """
1349             # Example: see GEOM_TestAll.py
1350             theLength, Parameters = ParseParameters(theLength)
1351             anObj = self.BasicOp.MakePointOnCurveByLength(theRefCurve, theLength, theStartPoint)
1352             RaiseIfFailed("MakePointOnCurveByLength", self.BasicOp)
1353             anObj.SetParameters(Parameters)
1354             self._autoPublish(anObj, theName, "vertex")
1355             return anObj
1356
1357         ## Create a point, corresponding to the given parameters on the
1358         #    given surface.
1359         #  @param theRefSurf The referenced surface.
1360         #  @param theUParameter Value of U-parameter on the referenced surface.
1361         #  @param theVParameter Value of V-parameter on the referenced surface.
1362         #  @param theName Object name; when specified, this parameter is used
1363         #         for result publication in the study. Otherwise, if automatic
1364         #         publication is switched on, default value is used for result name.
1365         #
1366         #  @return New GEOM.GEOM_Object, containing the created point.
1367         #
1368         #  @ref swig_MakeVertexOnSurface "Example"
1369         @ManageTransactions("BasicOp")
1370         def MakeVertexOnSurface(self, theRefSurf, theUParameter, theVParameter, theName=None):
1371             """
1372             Create a point, corresponding to the given parameters on the
1373             given surface.
1374
1375             Parameters:
1376                 theRefSurf The referenced surface.
1377                 theUParameter Value of U-parameter on the referenced surface.
1378                 theVParameter Value of V-parameter on the referenced surface.
1379                 theName Object name; when specified, this parameter is used
1380                         for result publication in the study. Otherwise, if automatic
1381                         publication is switched on, default value is used for result name.
1382
1383             Returns:
1384                 New GEOM.GEOM_Object, containing the created point.
1385
1386             Example of usage:
1387                 p_on_face = geompy.MakeVertexOnSurface(Face, 0.1, 0.8)
1388             """
1389             theUParameter, theVParameter, Parameters = ParseParameters(theUParameter, theVParameter)
1390             # Example: see GEOM_TestAll.py
1391             anObj = self.BasicOp.MakePointOnSurface(theRefSurf, theUParameter, theVParameter)
1392             RaiseIfFailed("MakePointOnSurface", self.BasicOp)
1393             anObj.SetParameters(Parameters);
1394             self._autoPublish(anObj, theName, "vertex")
1395             return anObj
1396
1397         ## Create a point by projection give coordinates on the given surface
1398         #  @param theRefSurf The referenced surface.
1399         #  @param theX X-coordinate in 3D space
1400         #  @param theY Y-coordinate in 3D space
1401         #  @param theZ Z-coordinate in 3D space
1402         #  @param theName Object name; when specified, this parameter is used
1403         #         for result publication in the study. Otherwise, if automatic
1404         #         publication is switched on, default value is used for result name.
1405         #
1406         #  @return New GEOM.GEOM_Object, containing the created point.
1407         #
1408         #  @ref swig_MakeVertexOnSurfaceByCoord "Example"
1409         @ManageTransactions("BasicOp")
1410         def MakeVertexOnSurfaceByCoord(self, theRefSurf, theX, theY, theZ, theName=None):
1411             """
1412             Create a point by projection give coordinates on the given surface
1413
1414             Parameters:
1415                 theRefSurf The referenced surface.
1416                 theX X-coordinate in 3D space
1417                 theY Y-coordinate in 3D space
1418                 theZ Z-coordinate in 3D space
1419                 theName Object name; when specified, this parameter is used
1420                         for result publication in the study. Otherwise, if automatic
1421                         publication is switched on, default value is used for result name.
1422
1423             Returns:
1424                 New GEOM.GEOM_Object, containing the created point.
1425
1426             Example of usage:
1427                 p_on_face2 = geompy.MakeVertexOnSurfaceByCoord(Face, 0., 0., 0.)
1428             """
1429             theX, theY, theZ, Parameters = ParseParameters(theX, theY, theZ)
1430             # Example: see GEOM_TestAll.py
1431             anObj = self.BasicOp.MakePointOnSurfaceByCoord(theRefSurf, theX, theY, theZ)
1432             RaiseIfFailed("MakeVertexOnSurfaceByCoord", self.BasicOp)
1433             anObj.SetParameters(Parameters);
1434             self._autoPublish(anObj, theName, "vertex")
1435             return anObj
1436
1437         ## Create a point, which lays on the given face.
1438         #  The point will lay in arbitrary place of the face.
1439         #  The only condition on it is a non-zero distance to the face boundary.
1440         #  Such point can be used to uniquely identify the face inside any
1441         #  shape in case, when the shape does not contain overlapped faces.
1442         #  @param theFace The referenced face.
1443         #  @param theName Object name; when specified, this parameter is used
1444         #         for result publication in the study. Otherwise, if automatic
1445         #         publication is switched on, default value is used for result name.
1446         #
1447         #  @return New GEOM.GEOM_Object, containing the created point.
1448         #
1449         #  @ref swig_MakeVertexInsideFace "Example"
1450         @ManageTransactions("BasicOp")
1451         def MakeVertexInsideFace (self, theFace, theNumberOfPnts=1, theName=None):
1452             """
1453             Create a point, which lays on the given face.
1454             The point will lay in arbitrary place of the face.
1455             The only condition on it is a non-zero distance to the face boundary.
1456             Such point can be used to uniquely identify the face inside any
1457             shape in case, when the shape does not contain overlapped faces.
1458
1459             Parameters:
1460                 theFace The referenced face.
1461                 theNumberOfPnts The number of points we want to get, 1 by default.
1462                 theName Object name; when specified, this parameter is used
1463                         for result publication in the study. Otherwise, if automatic
1464                         publication is switched on, default value is used for result name.
1465
1466             Returns:
1467                 New GEOM.GEOM_Object, containing the created point.
1468
1469             Example of usage:
1470                 p_on_face = geompy.MakeVertexInsideFace(Face)
1471             """
1472             # Example: see GEOM_TestAll.py
1473             anObj = self.BasicOp.MakePointOnFace(theFace, theNumberOfPnts)
1474             RaiseIfFailed("MakeVertexInsideFace", self.BasicOp)
1475             self._autoPublish(anObj, theName, "vertex")
1476             return anObj
1477
1478         ## Create a point on intersection of two lines.
1479         #  @param theRefLine1, theRefLine2 The referenced lines.
1480         #  @param theName Object name; when specified, this parameter is used
1481         #         for result publication in the study. Otherwise, if automatic
1482         #         publication is switched on, default value is used for result name.
1483         #
1484         #  @return New GEOM.GEOM_Object, containing the created point.
1485         #
1486         #  @ref swig_MakeVertexOnLinesIntersection "Example"
1487         @ManageTransactions("BasicOp")
1488         def MakeVertexOnLinesIntersection(self, theRefLine1, theRefLine2, theName=None):
1489             """
1490             Create a point on intersection of two lines.
1491
1492             Parameters:
1493                 theRefLine1, theRefLine2 The referenced lines.
1494                 theName Object name; when specified, this parameter is used
1495                         for result publication in the study. Otherwise, if automatic
1496                         publication is switched on, default value is used for result name.
1497
1498             Returns:
1499                 New GEOM.GEOM_Object, containing the created point.
1500             """
1501             # Example: see GEOM_TestAll.py
1502             anObj = self.BasicOp.MakePointOnLinesIntersection(theRefLine1, theRefLine2)
1503             RaiseIfFailed("MakePointOnLinesIntersection", self.BasicOp)
1504             self._autoPublish(anObj, theName, "vertex")
1505             return anObj
1506
1507         ## Create a tangent, corresponding to the given parameter on the given curve.
1508         #  @param theRefCurve The referenced curve.
1509         #  @param theParameter Value of parameter on the referenced curve.
1510         #  @param theName Object name; when specified, this parameter is used
1511         #         for result publication in the study. Otherwise, if automatic
1512         #         publication is switched on, default value is used for result name.
1513         #
1514         #  @return New GEOM.GEOM_Object, containing the created tangent.
1515         #
1516         #  @ref swig_MakeTangentOnCurve "Example"
1517         @ManageTransactions("BasicOp")
1518         def MakeTangentOnCurve(self, theRefCurve, theParameter, theName=None):
1519             """
1520             Create a tangent, corresponding to the given parameter on the given curve.
1521
1522             Parameters:
1523                 theRefCurve The referenced curve.
1524                 theParameter Value of parameter on the referenced curve.
1525                 theName Object name; when specified, this parameter is used
1526                         for result publication in the study. Otherwise, if automatic
1527                         publication is switched on, default value is used for result name.
1528
1529             Returns:
1530                 New GEOM.GEOM_Object, containing the created tangent.
1531
1532             Example of usage:
1533                 tan_on_arc = geompy.MakeTangentOnCurve(Arc, 0.7)
1534             """
1535             anObj = self.BasicOp.MakeTangentOnCurve(theRefCurve, theParameter)
1536             RaiseIfFailed("MakeTangentOnCurve", self.BasicOp)
1537             self._autoPublish(anObj, theName, "tangent")
1538             return anObj
1539
1540         ## Create a tangent plane, corresponding to the given parameter on the given face.
1541         #  @param theFace The face for which tangent plane should be built.
1542         #  @param theParameterV vertical value of the center point (0.0 - 1.0).
1543         #  @param theParameterU horisontal value of the center point (0.0 - 1.0).
1544         #  @param theTrimSize the size of plane.
1545         #  @param theName Object name; when specified, this parameter is used
1546         #         for result publication in the study. Otherwise, if automatic
1547         #         publication is switched on, default value is used for result name.
1548         #
1549         #  @return New GEOM.GEOM_Object, containing the created tangent.
1550         #
1551         #  @ref swig_MakeTangentPlaneOnFace "Example"
1552         @ManageTransactions("BasicOp")
1553         def MakeTangentPlaneOnFace(self, theFace, theParameterU, theParameterV, theTrimSize, theName=None):
1554             """
1555             Create a tangent plane, corresponding to the given parameter on the given face.
1556
1557             Parameters:
1558                 theFace The face for which tangent plane should be built.
1559                 theParameterV vertical value of the center point (0.0 - 1.0).
1560                 theParameterU horisontal value of the center point (0.0 - 1.0).
1561                 theTrimSize the size of plane.
1562                 theName Object name; when specified, this parameter is used
1563                         for result publication in the study. Otherwise, if automatic
1564                         publication is switched on, default value is used for result name.
1565
1566            Returns:
1567                 New GEOM.GEOM_Object, containing the created tangent.
1568
1569            Example of usage:
1570                 an_on_face = geompy.MakeTangentPlaneOnFace(tan_extrusion, 0.7, 0.5, 150)
1571             """
1572             anObj = self.BasicOp.MakeTangentPlaneOnFace(theFace, theParameterU, theParameterV, theTrimSize)
1573             RaiseIfFailed("MakeTangentPlaneOnFace", self.BasicOp)
1574             self._autoPublish(anObj, theName, "tangent")
1575             return anObj
1576
1577         ## Create a vector with the given components.
1578         #  @param theDX X component of the vector.
1579         #  @param theDY Y component of the vector.
1580         #  @param theDZ Z component of the vector.
1581         #  @param theName Object name; when specified, this parameter is used
1582         #         for result publication in the study. Otherwise, if automatic
1583         #         publication is switched on, default value is used for result name.
1584         #
1585         #  @return New GEOM.GEOM_Object, containing the created vector.
1586         #
1587         #  @ref tui_creation_vector "Example"
1588         @ManageTransactions("BasicOp")
1589         def MakeVectorDXDYDZ(self, theDX, theDY, theDZ, theName=None):
1590             """
1591             Create a vector with the given components.
1592
1593             Parameters:
1594                 theDX X component of the vector.
1595                 theDY Y component of the vector.
1596                 theDZ Z component of the vector.
1597                 theName Object name; when specified, this parameter is used
1598                         for result publication in the study. Otherwise, if automatic
1599                         publication is switched on, default value is used for result name.
1600
1601             Returns:
1602                 New GEOM.GEOM_Object, containing the created vector.
1603             """
1604             # Example: see GEOM_TestAll.py
1605             theDX,theDY,theDZ,Parameters = ParseParameters(theDX, theDY, theDZ)
1606             anObj = self.BasicOp.MakeVectorDXDYDZ(theDX, theDY, theDZ)
1607             RaiseIfFailed("MakeVectorDXDYDZ", self.BasicOp)
1608             anObj.SetParameters(Parameters)
1609             self._autoPublish(anObj, theName, "vector")
1610             return anObj
1611
1612         ## Create a vector between two points.
1613         #  @param thePnt1 Start point for the vector.
1614         #  @param thePnt2 End point for the vector.
1615         #  @param theName Object name; when specified, this parameter is used
1616         #         for result publication in the study. Otherwise, if automatic
1617         #         publication is switched on, default value is used for result name.
1618         #
1619         #  @return New GEOM.GEOM_Object, containing the created vector.
1620         #
1621         #  @ref tui_creation_vector "Example"
1622         @ManageTransactions("BasicOp")
1623         def MakeVector(self, thePnt1, thePnt2, theName=None):
1624             """
1625             Create a vector between two points.
1626
1627             Parameters:
1628                 thePnt1 Start point for the vector.
1629                 thePnt2 End point for the vector.
1630                 theName Object name; when specified, this parameter is used
1631                         for result publication in the study. Otherwise, if automatic
1632                         publication is switched on, default value is used for result name.
1633
1634             Returns:
1635                 New GEOM.GEOM_Object, containing the created vector.
1636             """
1637             # Example: see GEOM_TestAll.py
1638             anObj = self.BasicOp.MakeVectorTwoPnt(thePnt1, thePnt2)
1639             RaiseIfFailed("MakeVectorTwoPnt", self.BasicOp)
1640             self._autoPublish(anObj, theName, "vector")
1641             return anObj
1642
1643         ## Create a line, passing through the given point
1644         #  and parallel to the given direction
1645         #  @param thePnt Point. The resulting line will pass through it.
1646         #  @param theDir Direction. The resulting line will be parallel to it.
1647         #  @param theName Object name; when specified, this parameter is used
1648         #         for result publication in the study. Otherwise, if automatic
1649         #         publication is switched on, default value is used for result name.
1650         #
1651         #  @return New GEOM.GEOM_Object, containing the created line.
1652         #
1653         #  @ref tui_creation_line "Example"
1654         @ManageTransactions("BasicOp")
1655         def MakeLine(self, thePnt, theDir, theName=None):
1656             """
1657             Create a line, passing through the given point
1658             and parallel to the given direction
1659
1660             Parameters:
1661                 thePnt Point. The resulting line will pass through it.
1662                 theDir Direction. The resulting line will be parallel to it.
1663                 theName Object name; when specified, this parameter is used
1664                         for result publication in the study. Otherwise, if automatic
1665                         publication is switched on, default value is used for result name.
1666
1667             Returns:
1668                 New GEOM.GEOM_Object, containing the created line.
1669             """
1670             # Example: see GEOM_TestAll.py
1671             anObj = self.BasicOp.MakeLine(thePnt, theDir)
1672             RaiseIfFailed("MakeLine", self.BasicOp)
1673             self._autoPublish(anObj, theName, "line")
1674             return anObj
1675
1676         ## Create a line, passing through the given points
1677         #  @param thePnt1 First of two points, defining the line.
1678         #  @param thePnt2 Second of two points, defining the line.
1679         #  @param theName Object name; when specified, this parameter is used
1680         #         for result publication in the study. Otherwise, if automatic
1681         #         publication is switched on, default value is used for result name.
1682         #
1683         #  @return New GEOM.GEOM_Object, containing the created line.
1684         #
1685         #  @ref tui_creation_line "Example"
1686         @ManageTransactions("BasicOp")
1687         def MakeLineTwoPnt(self, thePnt1, thePnt2, theName=None):
1688             """
1689             Create a line, passing through the given points
1690
1691             Parameters:
1692                 thePnt1 First of two points, defining the line.
1693                 thePnt2 Second of two points, defining the line.
1694                 theName Object name; when specified, this parameter is used
1695                         for result publication in the study. Otherwise, if automatic
1696                         publication is switched on, default value is used for result name.
1697
1698             Returns:
1699                 New GEOM.GEOM_Object, containing the created line.
1700             """
1701             # Example: see GEOM_TestAll.py
1702             anObj = self.BasicOp.MakeLineTwoPnt(thePnt1, thePnt2)
1703             RaiseIfFailed("MakeLineTwoPnt", self.BasicOp)
1704             self._autoPublish(anObj, theName, "line")
1705             return anObj
1706
1707         ## Create a line on two faces intersection.
1708         #  @param theFace1 First of two faces, defining the line.
1709         #  @param theFace2 Second of two faces, defining the line.
1710         #  @param theName Object name; when specified, this parameter is used
1711         #         for result publication in the study. Otherwise, if automatic
1712         #         publication is switched on, default value is used for result name.
1713         #
1714         #  @return New GEOM.GEOM_Object, containing the created line.
1715         #
1716         #  @ref swig_MakeLineTwoFaces "Example"
1717         @ManageTransactions("BasicOp")
1718         def MakeLineTwoFaces(self, theFace1, theFace2, theName=None):
1719             """
1720             Create a line on two faces intersection.
1721
1722             Parameters:
1723                 theFace1 First of two faces, defining the line.
1724                 theFace2 Second of two faces, defining the line.
1725                 theName Object name; when specified, this parameter is used
1726                         for result publication in the study. Otherwise, if automatic
1727                         publication is switched on, default value is used for result name.
1728
1729             Returns:
1730                 New GEOM.GEOM_Object, containing the created line.
1731             """
1732             # Example: see GEOM_TestAll.py
1733             anObj = self.BasicOp.MakeLineTwoFaces(theFace1, theFace2)
1734             RaiseIfFailed("MakeLineTwoFaces", self.BasicOp)
1735             self._autoPublish(anObj, theName, "line")
1736             return anObj
1737
1738         ## Create a plane, passing through the given point
1739         #  and normal to the given vector.
1740         #  @param thePnt Point, the plane has to pass through.
1741         #  @param theVec Vector, defining the plane normal direction.
1742         #  @param theTrimSize Half size of a side of quadrangle face, representing the plane.
1743         #  @param theName Object name; when specified, this parameter is used
1744         #         for result publication in the study. Otherwise, if automatic
1745         #         publication is switched on, default value is used for result name.
1746         #
1747         #  @return New GEOM.GEOM_Object, containing the created plane.
1748         #
1749         #  @ref tui_creation_plane "Example"
1750         @ManageTransactions("BasicOp")
1751         def MakePlane(self, thePnt, theVec, theTrimSize, theName=None):
1752             """
1753             Create a plane, passing through the given point
1754             and normal to the given vector.
1755
1756             Parameters:
1757                 thePnt Point, the plane has to pass through.
1758                 theVec Vector, defining the plane normal direction.
1759                 theTrimSize Half size of a side of quadrangle face, representing the plane.
1760                 theName Object name; when specified, this parameter is used
1761                         for result publication in the study. Otherwise, if automatic
1762                         publication is switched on, default value is used for result name.
1763
1764             Returns:
1765                 New GEOM.GEOM_Object, containing the created plane.
1766             """
1767             # Example: see GEOM_TestAll.py
1768             theTrimSize, Parameters = ParseParameters(theTrimSize);
1769             anObj = self.BasicOp.MakePlanePntVec(thePnt, theVec, theTrimSize)
1770             RaiseIfFailed("MakePlanePntVec", self.BasicOp)
1771             anObj.SetParameters(Parameters)
1772             self._autoPublish(anObj, theName, "plane")
1773             return anObj
1774
1775         ## Create a plane, passing through the three given points
1776         #  @param thePnt1 First of three points, defining the plane.
1777         #  @param thePnt2 Second of three points, defining the plane.
1778         #  @param thePnt3 Third of three points, defining the plane.
1779         #  @param theTrimSize Half size of a side of quadrangle face, representing the plane.
1780         #  @param theName Object name; when specified, this parameter is used
1781         #         for result publication in the study. Otherwise, if automatic
1782         #         publication is switched on, default value is used for result name.
1783         #
1784         #  @return New GEOM.GEOM_Object, containing the created plane.
1785         #
1786         #  @ref tui_creation_plane "Example"
1787         @ManageTransactions("BasicOp")
1788         def MakePlaneThreePnt(self, thePnt1, thePnt2, thePnt3, theTrimSize, theName=None):
1789             """
1790             Create a plane, passing through the three given points
1791
1792             Parameters:
1793                 thePnt1 First of three points, defining the plane.
1794                 thePnt2 Second of three points, defining the plane.
1795                 thePnt3 Third of three points, defining the plane.
1796                 theTrimSize Half size of a side of quadrangle face, representing the plane.
1797                 theName Object name; when specified, this parameter is used
1798                         for result publication in the study. Otherwise, if automatic
1799                         publication is switched on, default value is used for result name.
1800
1801             Returns:
1802                 New GEOM.GEOM_Object, containing the created plane.
1803             """
1804             # Example: see GEOM_TestAll.py
1805             theTrimSize, Parameters = ParseParameters(theTrimSize);
1806             anObj = self.BasicOp.MakePlaneThreePnt(thePnt1, thePnt2, thePnt3, theTrimSize)
1807             RaiseIfFailed("MakePlaneThreePnt", self.BasicOp)
1808             anObj.SetParameters(Parameters)
1809             self._autoPublish(anObj, theName, "plane")
1810             return anObj
1811
1812         ## Create a plane, similar to the existing one, but with another size of representing face.
1813         #  @param theFace Referenced plane or LCS(Marker).
1814         #  @param theTrimSize New half size of a side of quadrangle face, representing the plane.
1815         #  @param theName Object name; when specified, this parameter is used
1816         #         for result publication in the study. Otherwise, if automatic
1817         #         publication is switched on, default value is used for result name.
1818         #
1819         #  @return New GEOM.GEOM_Object, containing the created plane.
1820         #
1821         #  @ref tui_creation_plane "Example"
1822         @ManageTransactions("BasicOp")
1823         def MakePlaneFace(self, theFace, theTrimSize, theName=None):
1824             """
1825             Create a plane, similar to the existing one, but with another size of representing face.
1826
1827             Parameters:
1828                 theFace Referenced plane or LCS(Marker).
1829                 theTrimSize New half size of a side of quadrangle face, representing the plane.
1830                 theName Object name; when specified, this parameter is used
1831                         for result publication in the study. Otherwise, if automatic
1832                         publication is switched on, default value is used for result name.
1833
1834             Returns:
1835                 New GEOM.GEOM_Object, containing the created plane.
1836             """
1837             # Example: see GEOM_TestAll.py
1838             theTrimSize, Parameters = ParseParameters(theTrimSize);
1839             anObj = self.BasicOp.MakePlaneFace(theFace, theTrimSize)
1840             RaiseIfFailed("MakePlaneFace", self.BasicOp)
1841             anObj.SetParameters(Parameters)
1842             self._autoPublish(anObj, theName, "plane")
1843             return anObj
1844
1845         ## Create a plane, passing through the 2 vectors
1846         #  with center in a start point of the first vector.
1847         #  @param theVec1 Vector, defining center point and plane direction.
1848         #  @param theVec2 Vector, defining the plane normal direction.
1849         #  @param theTrimSize Half size of a side of quadrangle face, representing the plane.
1850         #  @param theName Object name; when specified, this parameter is used
1851         #         for result publication in the study. Otherwise, if automatic
1852         #         publication is switched on, default value is used for result name.
1853         #
1854         #  @return New GEOM.GEOM_Object, containing the created plane.
1855         #
1856         #  @ref tui_creation_plane "Example"
1857         @ManageTransactions("BasicOp")
1858         def MakePlane2Vec(self, theVec1, theVec2, theTrimSize, theName=None):
1859             """
1860             Create a plane, passing through the 2 vectors
1861             with center in a start point of the first vector.
1862
1863             Parameters:
1864                 theVec1 Vector, defining center point and plane direction.
1865                 theVec2 Vector, defining the plane normal direction.
1866                 theTrimSize Half size of a side of quadrangle face, representing the plane.
1867                 theName Object name; when specified, this parameter is used
1868                         for result publication in the study. Otherwise, if automatic
1869                         publication is switched on, default value is used for result name.
1870
1871             Returns:
1872                 New GEOM.GEOM_Object, containing the created plane.
1873             """
1874             # Example: see GEOM_TestAll.py
1875             theTrimSize, Parameters = ParseParameters(theTrimSize);
1876             anObj = self.BasicOp.MakePlane2Vec(theVec1, theVec2, theTrimSize)
1877             RaiseIfFailed("MakePlane2Vec", self.BasicOp)
1878             anObj.SetParameters(Parameters)
1879             self._autoPublish(anObj, theName, "plane")
1880             return anObj
1881
1882         ## Create a plane, based on a Local coordinate system.
1883         #  @param theLCS  coordinate system, defining plane.
1884         #  @param theTrimSize Half size of a side of quadrangle face, representing the plane.
1885         #  @param theOrientation OXY, OYZ or OZX orientation - (1, 2 or 3)
1886         #  @param theName Object name; when specified, this parameter is used
1887         #         for result publication in the study. Otherwise, if automatic
1888         #         publication is switched on, default value is used for result name.
1889         #
1890         #  @return New GEOM.GEOM_Object, containing the created plane.
1891         #
1892         #  @ref tui_creation_plane "Example"
1893         @ManageTransactions("BasicOp")
1894         def MakePlaneLCS(self, theLCS, theTrimSize, theOrientation, theName=None):
1895             """
1896             Create a plane, based on a Local coordinate system.
1897
1898            Parameters:
1899                 theLCS  coordinate system, defining plane.
1900                 theTrimSize Half size of a side of quadrangle face, representing the plane.
1901                 theOrientation OXY, OYZ or OZX orientation - (1, 2 or 3)
1902                 theName Object name; when specified, this parameter is used
1903                         for result publication in the study. Otherwise, if automatic
1904                         publication is switched on, default value is used for result name.
1905
1906             Returns:
1907                 New GEOM.GEOM_Object, containing the created plane.
1908             """
1909             # Example: see GEOM_TestAll.py
1910             theTrimSize, Parameters = ParseParameters(theTrimSize);
1911             anObj = self.BasicOp.MakePlaneLCS(theLCS, theTrimSize, theOrientation)
1912             RaiseIfFailed("MakePlaneLCS", self.BasicOp)
1913             anObj.SetParameters(Parameters)
1914             self._autoPublish(anObj, theName, "plane")
1915             return anObj
1916
1917         ## Create a local coordinate system.
1918         #  @param OX,OY,OZ Three coordinates of coordinate system origin.
1919         #  @param XDX,XDY,XDZ Three components of OX direction
1920         #  @param YDX,YDY,YDZ Three components of OY direction
1921         #  @param theName Object name; when specified, this parameter is used
1922         #         for result publication in the study. Otherwise, if automatic
1923         #         publication is switched on, default value is used for result name.
1924         #
1925         #  @return New GEOM.GEOM_Object, containing the created coordinate system.
1926         #
1927         #  @ref swig_MakeMarker "Example"
1928         @ManageTransactions("BasicOp")
1929         def MakeMarker(self, OX,OY,OZ, XDX,XDY,XDZ, YDX,YDY,YDZ, theName=None):
1930             """
1931             Create a local coordinate system.
1932
1933             Parameters:
1934                 OX,OY,OZ Three coordinates of coordinate system origin.
1935                 XDX,XDY,XDZ Three components of OX direction
1936                 YDX,YDY,YDZ Three components of OY direction
1937                 theName Object name; when specified, this parameter is used
1938                         for result publication in the study. Otherwise, if automatic
1939                         publication is switched on, default value is used for result name.
1940
1941             Returns:
1942                 New GEOM.GEOM_Object, containing the created coordinate system.
1943             """
1944             # Example: see GEOM_TestAll.py
1945             OX,OY,OZ, XDX,XDY,XDZ, YDX,YDY,YDZ, Parameters = ParseParameters(OX,OY,OZ, XDX,XDY,XDZ, YDX,YDY,YDZ);
1946             anObj = self.BasicOp.MakeMarker(OX,OY,OZ, XDX,XDY,XDZ, YDX,YDY,YDZ)
1947             RaiseIfFailed("MakeMarker", self.BasicOp)
1948             anObj.SetParameters(Parameters)
1949             self._autoPublish(anObj, theName, "lcs")
1950             return anObj
1951
1952         ## Create a local coordinate system from shape.
1953         #  @param theShape The initial shape to detect the coordinate system.
1954         #  @param theName Object name; when specified, this parameter is used
1955         #         for result publication in the study. Otherwise, if automatic
1956         #         publication is switched on, default value is used for result name.
1957         #
1958         #  @return New GEOM.GEOM_Object, containing the created coordinate system.
1959         #
1960         #  @ref tui_creation_lcs "Example"
1961         @ManageTransactions("BasicOp")
1962         def MakeMarkerFromShape(self, theShape, theName=None):
1963             """
1964             Create a local coordinate system from shape.
1965
1966             Parameters:
1967                 theShape The initial shape to detect the coordinate system.
1968                 theName Object name; when specified, this parameter is used
1969                         for result publication in the study. Otherwise, if automatic
1970                         publication is switched on, default value is used for result name.
1971
1972             Returns:
1973                 New GEOM.GEOM_Object, containing the created coordinate system.
1974             """
1975             anObj = self.BasicOp.MakeMarkerFromShape(theShape)
1976             RaiseIfFailed("MakeMarkerFromShape", self.BasicOp)
1977             self._autoPublish(anObj, theName, "lcs")
1978             return anObj
1979
1980         ## Create a local coordinate system from point and two vectors.
1981         #  @param theOrigin Point of coordinate system origin.
1982         #  @param theXVec Vector of X direction
1983         #  @param theYVec Vector of Y direction
1984         #  @param theName Object name; when specified, this parameter is used
1985         #         for result publication in the study. Otherwise, if automatic
1986         #         publication is switched on, default value is used for result name.
1987         #
1988         #  @return New GEOM.GEOM_Object, containing the created coordinate system.
1989         #
1990         #  @ref tui_creation_lcs "Example"
1991         @ManageTransactions("BasicOp")
1992         def MakeMarkerPntTwoVec(self, theOrigin, theXVec, theYVec, theName=None):
1993             """
1994             Create a local coordinate system from point and two vectors.
1995
1996             Parameters:
1997                 theOrigin Point of coordinate system origin.
1998                 theXVec Vector of X direction
1999                 theYVec Vector of Y direction
2000                 theName Object name; when specified, this parameter is used
2001                         for result publication in the study. Otherwise, if automatic
2002                         publication is switched on, default value is used for result name.
2003
2004             Returns:
2005                 New GEOM.GEOM_Object, containing the created coordinate system.
2006
2007             """
2008             anObj = self.BasicOp.MakeMarkerPntTwoVec(theOrigin, theXVec, theYVec)
2009             RaiseIfFailed("MakeMarkerPntTwoVec", self.BasicOp)
2010             self._autoPublish(anObj, theName, "lcs")
2011             return anObj
2012
2013         # end of l3_basic_go
2014         ## @}
2015
2016         ## @addtogroup l4_curves
2017         ## @{
2018
2019         ##  Create an arc of circle, passing through three given points.
2020         #  @param thePnt1 Start point of the arc.
2021         #  @param thePnt2 Middle point of the arc.
2022         #  @param thePnt3 End point of the arc.
2023         #  @param theName Object name; when specified, this parameter is used
2024         #         for result publication in the study. Otherwise, if automatic
2025         #         publication is switched on, default value is used for result name.
2026         #
2027         #  @return New GEOM.GEOM_Object, containing the created arc.
2028         #
2029         #  @ref swig_MakeArc "Example"
2030         @ManageTransactions("CurvesOp")
2031         def MakeArc(self, thePnt1, thePnt2, thePnt3, theName=None):
2032             """
2033             Create an arc of circle, passing through three given points.
2034
2035             Parameters:
2036                 thePnt1 Start point of the arc.
2037                 thePnt2 Middle point of the arc.
2038                 thePnt3 End point of the arc.
2039                 theName Object name; when specified, this parameter is used
2040                         for result publication in the study. Otherwise, if automatic
2041                         publication is switched on, default value is used for result name.
2042
2043             Returns:
2044                 New GEOM.GEOM_Object, containing the created arc.
2045             """
2046             # Example: see GEOM_TestAll.py
2047             anObj = self.CurvesOp.MakeArc(thePnt1, thePnt2, thePnt3)
2048             RaiseIfFailed("MakeArc", self.CurvesOp)
2049             self._autoPublish(anObj, theName, "arc")
2050             return anObj
2051
2052         ##  Create an arc of circle from a center and 2 points.
2053         #  @param thePnt1 Center of the arc
2054         #  @param thePnt2 Start point of the arc. (Gives also the radius of the arc)
2055         #  @param thePnt3 End point of the arc (Gives also a direction)
2056         #  @param theSense Orientation of the arc
2057         #  @param theName Object name; when specified, this parameter is used
2058         #         for result publication in the study. Otherwise, if automatic
2059         #         publication is switched on, default value is used for result name.
2060         #
2061         #  @return New GEOM.GEOM_Object, containing the created arc.
2062         #
2063         #  @ref swig_MakeArc "Example"
2064         @ManageTransactions("CurvesOp")
2065         def MakeArcCenter(self, thePnt1, thePnt2, thePnt3, theSense=False, theName=None):
2066             """
2067             Create an arc of circle from a center and 2 points.
2068
2069             Parameters:
2070                 thePnt1 Center of the arc
2071                 thePnt2 Start point of the arc. (Gives also the radius of the arc)
2072                 thePnt3 End point of the arc (Gives also a direction)
2073                 theSense Orientation of the arc
2074                 theName Object name; when specified, this parameter is used
2075                         for result publication in the study. Otherwise, if automatic
2076                         publication is switched on, default value is used for result name.
2077
2078             Returns:
2079                 New GEOM.GEOM_Object, containing the created arc.
2080             """
2081             # Example: see GEOM_TestAll.py
2082             anObj = self.CurvesOp.MakeArcCenter(thePnt1, thePnt2, thePnt3, theSense)
2083             RaiseIfFailed("MakeArcCenter", self.CurvesOp)
2084             self._autoPublish(anObj, theName, "arc")
2085             return anObj
2086
2087         ##  Create an arc of ellipse, of center and two points.
2088         #  @param theCenter Center of the arc.
2089         #  @param thePnt1 defines major radius of the arc by distance from Pnt1 to Pnt2.
2090         #  @param thePnt2 defines plane of ellipse and minor radius as distance from Pnt3 to line from Pnt1 to Pnt2.
2091         #  @param theName Object name; when specified, this parameter is used
2092         #         for result publication in the study. Otherwise, if automatic
2093         #         publication is switched on, default value is used for result name.
2094         #
2095         #  @return New GEOM.GEOM_Object, containing the created arc.
2096         #
2097         #  @ref swig_MakeArc "Example"
2098         @ManageTransactions("CurvesOp")
2099         def MakeArcOfEllipse(self, theCenter, thePnt1, thePnt2, theName=None):
2100             """
2101             Create an arc of ellipse, of center and two points.
2102
2103             Parameters:
2104                 theCenter Center of the arc.
2105                 thePnt1 defines major radius of the arc by distance from Pnt1 to Pnt2.
2106                 thePnt2 defines plane of ellipse and minor radius as distance from Pnt3 to line from Pnt1 to Pnt2.
2107                 theName Object name; when specified, this parameter is used
2108                         for result publication in the study. Otherwise, if automatic
2109                         publication is switched on, default value is used for result name.
2110
2111             Returns:
2112                 New GEOM.GEOM_Object, containing the created arc.
2113             """
2114             # Example: see GEOM_TestAll.py
2115             anObj = self.CurvesOp.MakeArcOfEllipse(theCenter, thePnt1, thePnt2)
2116             RaiseIfFailed("MakeArcOfEllipse", self.CurvesOp)
2117             self._autoPublish(anObj, theName, "arc")
2118             return anObj
2119
2120         ## Create a circle with given center, normal vector and radius.
2121         #  @param thePnt Circle center.
2122         #  @param theVec Vector, normal to the plane of the circle.
2123         #  @param theR Circle radius.
2124         #  @param theName Object name; when specified, this parameter is used
2125         #         for result publication in the study. Otherwise, if automatic
2126         #         publication is switched on, default value is used for result name.
2127         #
2128         #  @return New GEOM.GEOM_Object, containing the created circle.
2129         #
2130         #  @ref tui_creation_circle "Example"
2131         @ManageTransactions("CurvesOp")
2132         def MakeCircle(self, thePnt, theVec, theR, theName=None):
2133             """
2134             Create a circle with given center, normal vector and radius.
2135
2136             Parameters:
2137                 thePnt Circle center.
2138                 theVec Vector, normal to the plane of the circle.
2139                 theR Circle radius.
2140                 theName Object name; when specified, this parameter is used
2141                         for result publication in the study. Otherwise, if automatic
2142                         publication is switched on, default value is used for result name.
2143
2144             Returns:
2145                 New GEOM.GEOM_Object, containing the created circle.
2146             """
2147             # Example: see GEOM_TestAll.py
2148             theR, Parameters = ParseParameters(theR)
2149             anObj = self.CurvesOp.MakeCirclePntVecR(thePnt, theVec, theR)
2150             RaiseIfFailed("MakeCirclePntVecR", self.CurvesOp)
2151             anObj.SetParameters(Parameters)
2152             self._autoPublish(anObj, theName, "circle")
2153             return anObj
2154
2155         ## Create a circle with given radius.
2156         #  Center of the circle will be in the origin of global
2157         #  coordinate system and normal vector will be codirected with Z axis
2158         #  @param theR Circle radius.
2159         #  @param theName Object name; when specified, this parameter is used
2160         #         for result publication in the study. Otherwise, if automatic
2161         #         publication is switched on, default value is used for result name.
2162         #
2163         #  @return New GEOM.GEOM_Object, containing the created circle.
2164         @ManageTransactions("CurvesOp")
2165         def MakeCircleR(self, theR, theName=None):
2166             """
2167             Create a circle with given radius.
2168             Center of the circle will be in the origin of global
2169             coordinate system and normal vector will be codirected with Z axis
2170
2171             Parameters:
2172                 theR Circle radius.
2173                 theName Object name; when specified, this parameter is used
2174                         for result publication in the study. Otherwise, if automatic
2175                         publication is switched on, default value is used for result name.
2176
2177             Returns:
2178                 New GEOM.GEOM_Object, containing the created circle.
2179             """
2180             anObj = self.CurvesOp.MakeCirclePntVecR(None, None, theR)
2181             RaiseIfFailed("MakeCirclePntVecR", self.CurvesOp)
2182             self._autoPublish(anObj, theName, "circle")
2183             return anObj
2184
2185         ## Create a circle, passing through three given points
2186         #  @param thePnt1,thePnt2,thePnt3 Points, defining the circle.
2187         #  @param theName Object name; when specified, this parameter is used
2188         #         for result publication in the study. Otherwise, if automatic
2189         #         publication is switched on, default value is used for result name.
2190         #
2191         #  @return New GEOM.GEOM_Object, containing the created circle.
2192         #
2193         #  @ref tui_creation_circle "Example"
2194         @ManageTransactions("CurvesOp")
2195         def MakeCircleThreePnt(self, thePnt1, thePnt2, thePnt3, theName=None):
2196             """
2197             Create a circle, passing through three given points
2198
2199             Parameters:
2200                 thePnt1,thePnt2,thePnt3 Points, defining the circle.
2201                 theName Object name; when specified, this parameter is used
2202                         for result publication in the study. Otherwise, if automatic
2203                         publication is switched on, default value is used for result name.
2204
2205             Returns:
2206                 New GEOM.GEOM_Object, containing the created circle.
2207             """
2208             # Example: see GEOM_TestAll.py
2209             anObj = self.CurvesOp.MakeCircleThreePnt(thePnt1, thePnt2, thePnt3)
2210             RaiseIfFailed("MakeCircleThreePnt", self.CurvesOp)
2211             self._autoPublish(anObj, theName, "circle")
2212             return anObj
2213
2214         ## Create a circle, with given point1 as center,
2215         #  passing through the point2 as radius and laying in the plane,
2216         #  defined by all three given points.
2217         #  @param thePnt1,thePnt2,thePnt3 Points, defining the circle.
2218         #  @param theName Object name; when specified, this parameter is used
2219         #         for result publication in the study. Otherwise, if automatic
2220         #         publication is switched on, default value is used for result name.
2221         #
2222         #  @return New GEOM.GEOM_Object, containing the created circle.
2223         #
2224         #  @ref swig_MakeCircle "Example"
2225         @ManageTransactions("CurvesOp")
2226         def MakeCircleCenter2Pnt(self, thePnt1, thePnt2, thePnt3, theName=None):
2227             """
2228             Create a circle, with given point1 as center,
2229             passing through the point2 as radius and laying in the plane,
2230             defined by all three given points.
2231
2232             Parameters:
2233                 thePnt1,thePnt2,thePnt3 Points, defining the circle.
2234                 theName Object name; when specified, this parameter is used
2235                         for result publication in the study. Otherwise, if automatic
2236                         publication is switched on, default value is used for result name.
2237
2238             Returns:
2239                 New GEOM.GEOM_Object, containing the created circle.
2240             """
2241             # Example: see GEOM_example6.py
2242             anObj = self.CurvesOp.MakeCircleCenter2Pnt(thePnt1, thePnt2, thePnt3)
2243             RaiseIfFailed("MakeCircleCenter2Pnt", self.CurvesOp)
2244             self._autoPublish(anObj, theName, "circle")
2245             return anObj
2246
2247         ## Create an ellipse with given center, normal vector and radiuses.
2248         #  @param thePnt Ellipse center.
2249         #  @param theVec Vector, normal to the plane of the ellipse.
2250         #  @param theRMajor Major ellipse radius.
2251         #  @param theRMinor Minor ellipse radius.
2252         #  @param theVecMaj Vector, direction of the ellipse's main axis.
2253         #  @param theName Object name; when specified, this parameter is used
2254         #         for result publication in the study. Otherwise, if automatic
2255         #         publication is switched on, default value is used for result name.
2256         #
2257         #  @return New GEOM.GEOM_Object, containing the created ellipse.
2258         #
2259         #  @ref tui_creation_ellipse "Example"
2260         @ManageTransactions("CurvesOp")
2261         def MakeEllipse(self, thePnt, theVec, theRMajor, theRMinor, theVecMaj=None, theName=None):
2262             """
2263             Create an ellipse with given center, normal vector and radiuses.
2264
2265             Parameters:
2266                 thePnt Ellipse center.
2267                 theVec Vector, normal to the plane of the ellipse.
2268                 theRMajor Major ellipse radius.
2269                 theRMinor Minor ellipse radius.
2270                 theVecMaj Vector, direction of the ellipse's main axis.
2271                 theName Object name; when specified, this parameter is used
2272                         for result publication in the study. Otherwise, if automatic
2273                         publication is switched on, default value is used for result name.
2274
2275             Returns:
2276                 New GEOM.GEOM_Object, containing the created ellipse.
2277             """
2278             # Example: see GEOM_TestAll.py
2279             theRMajor, theRMinor, Parameters = ParseParameters(theRMajor, theRMinor)
2280             if theVecMaj is not None:
2281                 anObj = self.CurvesOp.MakeEllipseVec(thePnt, theVec, theRMajor, theRMinor, theVecMaj)
2282             else:
2283                 anObj = self.CurvesOp.MakeEllipse(thePnt, theVec, theRMajor, theRMinor)
2284                 pass
2285             RaiseIfFailed("MakeEllipse", self.CurvesOp)
2286             anObj.SetParameters(Parameters)
2287             self._autoPublish(anObj, theName, "ellipse")
2288             return anObj
2289
2290         ## Create an ellipse with given radiuses.
2291         #  Center of the ellipse will be in the origin of global
2292         #  coordinate system and normal vector will be codirected with Z axis
2293         #  @param theRMajor Major ellipse radius.
2294         #  @param theRMinor Minor ellipse radius.
2295         #  @param theName Object name; when specified, this parameter is used
2296         #         for result publication in the study. Otherwise, if automatic
2297         #         publication is switched on, default value is used for result name.
2298         #
2299         #  @return New GEOM.GEOM_Object, containing the created ellipse.
2300         @ManageTransactions("CurvesOp")
2301         def MakeEllipseRR(self, theRMajor, theRMinor, theName=None):
2302             """
2303             Create an ellipse with given radiuses.
2304             Center of the ellipse will be in the origin of global
2305             coordinate system and normal vector will be codirected with Z axis
2306
2307             Parameters:
2308                 theRMajor Major ellipse radius.
2309                 theRMinor Minor ellipse radius.
2310                 theName Object name; when specified, this parameter is used
2311                         for result publication in the study. Otherwise, if automatic
2312                         publication is switched on, default value is used for result name.
2313
2314             Returns:
2315             New GEOM.GEOM_Object, containing the created ellipse.
2316             """
2317             anObj = self.CurvesOp.MakeEllipse(None, None, theRMajor, theRMinor)
2318             RaiseIfFailed("MakeEllipse", self.CurvesOp)
2319             self._autoPublish(anObj, theName, "ellipse")
2320             return anObj
2321
2322         ## Create a polyline on the set of points.
2323         #  @param thePoints Sequence of points for the polyline.
2324         #  @param theIsClosed If True, build a closed wire.
2325         #  @param theName Object name; when specified, this parameter is used
2326         #         for result publication in the study. Otherwise, if automatic
2327         #         publication is switched on, default value is used for result name.
2328         #
2329         #  @return New GEOM.GEOM_Object, containing the created polyline.
2330         #
2331         #  @ref tui_creation_curve "Example"
2332         @ManageTransactions("CurvesOp")
2333         def MakePolyline(self, thePoints, theIsClosed=False, theName=None):
2334             """
2335             Create a polyline on the set of points.
2336
2337             Parameters:
2338                 thePoints Sequence of points for the polyline.
2339                 theIsClosed If True, build a closed wire.
2340                 theName Object name; when specified, this parameter is used
2341                         for result publication in the study. Otherwise, if automatic
2342                         publication is switched on, default value is used for result name.
2343
2344             Returns:
2345                 New GEOM.GEOM_Object, containing the created polyline.
2346             """
2347             # Example: see GEOM_TestAll.py
2348             anObj = self.CurvesOp.MakePolyline(thePoints, theIsClosed)
2349             RaiseIfFailed("MakePolyline", self.CurvesOp)
2350             self._autoPublish(anObj, theName, "polyline")
2351             return anObj
2352
2353         ## Create bezier curve on the set of points.
2354         #  @param thePoints Sequence of points for the bezier curve.
2355         #  @param theIsClosed If True, build a closed curve.
2356         #  @param theName Object name; when specified, this parameter is used
2357         #         for result publication in the study. Otherwise, if automatic
2358         #         publication is switched on, default value is used for result name.
2359         #
2360         #  @return New GEOM.GEOM_Object, containing the created bezier curve.
2361         #
2362         #  @ref tui_creation_curve "Example"
2363         @ManageTransactions("CurvesOp")
2364         def MakeBezier(self, thePoints, theIsClosed=False, theName=None):
2365             """
2366             Create bezier curve on the set of points.
2367
2368             Parameters:
2369                 thePoints Sequence of points for the bezier curve.
2370                 theIsClosed If True, build a closed curve.
2371                 theName Object name; when specified, this parameter is used
2372                         for result publication in the study. Otherwise, if automatic
2373                         publication is switched on, default value is used for result name.
2374
2375             Returns:
2376                 New GEOM.GEOM_Object, containing the created bezier curve.
2377             """
2378             # Example: see GEOM_TestAll.py
2379             anObj = self.CurvesOp.MakeSplineBezier(thePoints, theIsClosed)
2380             RaiseIfFailed("MakeSplineBezier", self.CurvesOp)
2381             self._autoPublish(anObj, theName, "bezier")
2382             return anObj
2383
2384         ## Create B-Spline curve on the set of points.
2385         #  @param thePoints Sequence of points for the B-Spline curve.
2386         #  @param theIsClosed If True, build a closed curve.
2387         #  @param theDoReordering If TRUE, the algo does not follow the order of
2388         #                         \a thePoints but searches for the closest vertex.
2389         #  @param theName Object name; when specified, this parameter is used
2390         #         for result publication in the study. Otherwise, if automatic
2391         #         publication is switched on, default value is used for result name.
2392         #
2393         #  @return New GEOM.GEOM_Object, containing the created B-Spline curve.
2394         #
2395         #  @ref tui_creation_curve "Example"
2396         @ManageTransactions("CurvesOp")
2397         def MakeInterpol(self, thePoints, theIsClosed=False, theDoReordering=False, theName=None):
2398             """
2399             Create B-Spline curve on the set of points.
2400
2401             Parameters:
2402                 thePoints Sequence of points for the B-Spline curve.
2403                 theIsClosed If True, build a closed curve.
2404                 theDoReordering If True, the algo does not follow the order of
2405                                 thePoints but searches for the closest vertex.
2406                 theName Object name; when specified, this parameter is used
2407                         for result publication in the study. Otherwise, if automatic
2408                         publication is switched on, default value is used for result name.
2409
2410             Returns:
2411                 New GEOM.GEOM_Object, containing the created B-Spline curve.
2412             """
2413             # Example: see GEOM_TestAll.py
2414             anObj = self.CurvesOp.MakeSplineInterpolation(thePoints, theIsClosed, theDoReordering)
2415             RaiseIfFailed("MakeInterpol", self.CurvesOp)
2416             self._autoPublish(anObj, theName, "bspline")
2417             return anObj
2418
2419         ## Create B-Spline curve on the set of points.
2420         #  @param thePoints Sequence of points for the B-Spline curve.
2421         #  @param theFirstVec Vector object, defining the curve direction at its first point.
2422         #  @param theLastVec Vector object, defining the curve direction at its last point.
2423         #  @param theName Object name; when specified, this parameter is used
2424         #         for result publication in the study. Otherwise, if automatic
2425         #         publication is switched on, default value is used for result name.
2426         #
2427         #  @return New GEOM.GEOM_Object, containing the created B-Spline curve.
2428         #
2429         #  @ref tui_creation_curve "Example"
2430         @ManageTransactions("CurvesOp")
2431         def MakeInterpolWithTangents(self, thePoints, theFirstVec, theLastVec, theName=None):
2432             """
2433             Create B-Spline curve on the set of points.
2434
2435             Parameters:
2436                 thePoints Sequence of points for the B-Spline curve.
2437                 theFirstVec Vector object, defining the curve direction at its first point.
2438                 theLastVec Vector object, defining the curve direction at its last point.
2439                 theName Object name; when specified, this parameter is used
2440                         for result publication in the study. Otherwise, if automatic
2441                         publication is switched on, default value is used for result name.
2442
2443             Returns:
2444                 New GEOM.GEOM_Object, containing the created B-Spline curve.
2445             """
2446             # Example: see GEOM_TestAll.py
2447             anObj = self.CurvesOp.MakeSplineInterpolWithTangents(thePoints, theFirstVec, theLastVec)
2448             RaiseIfFailed("MakeInterpolWithTangents", self.CurvesOp)
2449             self._autoPublish(anObj, theName, "bspline")
2450             return anObj
2451
2452         ## Creates a curve using the parametric definition of the basic points.
2453         #  @param thexExpr parametric equation of the coordinates X.
2454         #  @param theyExpr parametric equation of the coordinates Y.
2455         #  @param thezExpr parametric equation of the coordinates Z.
2456         #  @param theParamMin the minimal value of the parameter.
2457         #  @param theParamMax the maximum value of the parameter.
2458         #  @param theParamStep the number of steps if theNewMethod = True, else step value of the parameter.
2459         #  @param theCurveType the type of the curve,
2460         #         one of GEOM.Polyline, GEOM.Bezier, GEOM.Interpolation.
2461         #  @param theNewMethod flag for switching to the new method if the flag is set to false a deprecated method is used which can lead to a bug.
2462         #  @param theName Object name; when specified, this parameter is used
2463         #         for result publication in the study. Otherwise, if automatic
2464         #         publication is switched on, default value is used for result name.
2465         #
2466         #  @return New GEOM.GEOM_Object, containing the created curve.
2467         #
2468         #  @ref tui_creation_curve "Example"
2469         @ManageTransactions("CurvesOp")
2470         def MakeCurveParametric(self, thexExpr, theyExpr, thezExpr,
2471                                 theParamMin, theParamMax, theParamStep, theCurveType, theNewMethod=False, theName=None ):
2472             """
2473             Creates a curve using the parametric definition of the basic points.
2474
2475             Parameters:
2476                 thexExpr parametric equation of the coordinates X.
2477                 theyExpr parametric equation of the coordinates Y.
2478                 thezExpr parametric equation of the coordinates Z.
2479                 theParamMin the minimal value of the parameter.
2480                 theParamMax the maximum value of the parameter.
2481                 theParamStep the number of steps if theNewMethod = True, else step value of the parameter.
2482                 theCurveType the type of the curve,
2483                              one of GEOM.Polyline, GEOM.Bezier, GEOM.Interpolation.
2484                 theNewMethod flag for switching to the new method if the flag is set to false a deprecated
2485                              method is used which can lead to a bug.
2486                 theName Object name; when specified, this parameter is used
2487                         for result publication in the study. Otherwise, if automatic
2488                         publication is switched on, default value is used for result name.
2489
2490             Returns:
2491                 New GEOM.GEOM_Object, containing the created curve.
2492             """
2493             theParamMin,theParamMax,theParamStep,Parameters = ParseParameters(theParamMin,theParamMax,theParamStep)
2494             if theNewMethod:
2495               anObj = self.CurvesOp.MakeCurveParametricNew(thexExpr,theyExpr,thezExpr,theParamMin,theParamMax,theParamStep,theCurveType)
2496             else:
2497               anObj = self.CurvesOp.MakeCurveParametric(thexExpr,theyExpr,thezExpr,theParamMin,theParamMax,theParamStep,theCurveType)
2498             RaiseIfFailed("MakeCurveParametric", self.CurvesOp)
2499             anObj.SetParameters(Parameters)
2500             self._autoPublish(anObj, theName, "curve")
2501             return anObj
2502
2503         ## Create an isoline curve on a face.
2504         #  @param theFace the face for which an isoline is created.
2505         #  @param IsUIsoline True for U-isoline creation; False for V-isoline
2506         #         creation.
2507         #  @param theParameter the U parameter for U-isoline or V parameter
2508         #         for V-isoline.
2509         #  @param theName Object name; when specified, this parameter is used
2510         #         for result publication in the study. Otherwise, if automatic
2511         #         publication is switched on, default value is used for result name.
2512         #
2513         #  @return New GEOM.GEOM_Object, containing the created isoline edge or
2514         #          a compound of edges.
2515         #
2516         #  @ref tui_creation_curve "Example"
2517         @ManageTransactions("CurvesOp")
2518         def MakeIsoline(self, theFace, IsUIsoline, theParameter, theName=None):
2519             """
2520             Create an isoline curve on a face.
2521
2522             Parameters:
2523                 theFace the face for which an isoline is created.
2524                 IsUIsoline True for U-isoline creation; False for V-isoline
2525                            creation.
2526                 theParameter the U parameter for U-isoline or V parameter
2527                              for V-isoline.
2528                 theName Object name; when specified, this parameter is used
2529                         for result publication in the study. Otherwise, if automatic
2530                         publication is switched on, default value is used for result name.
2531
2532             Returns:
2533                 New GEOM.GEOM_Object, containing the created isoline edge or a
2534                 compound of edges.
2535             """
2536             # Example: see GEOM_TestAll.py
2537             anObj = self.CurvesOp.MakeIsoline(theFace, IsUIsoline, theParameter)
2538             RaiseIfFailed("MakeIsoline", self.CurvesOp)
2539             if IsUIsoline:
2540                 self._autoPublish(anObj, theName, "U-Isoline")
2541             else:
2542                 self._autoPublish(anObj, theName, "V-Isoline")
2543             return anObj
2544
2545         # end of l4_curves
2546         ## @}
2547
2548         ## @addtogroup l3_sketcher
2549         ## @{
2550
2551         ## Create a sketcher (wire or face), following the textual description,
2552         #  passed through <VAR>theCommand</VAR> argument. \n
2553         #  Edges of the resulting wire or face will be arcs of circles and/or linear segments. \n
2554         #  Format of the description string have to be the following:
2555         #
2556         #  "Sketcher[:F x1 y1]:CMD[:CMD[:CMD...]]"
2557         #
2558         #  Where:
2559         #  - x1, y1 are coordinates of the first sketcher point (zero by default),
2560         #  - CMD is one of
2561         #     - "R angle" : Set the direction by angle
2562         #     - "D dx dy" : Set the direction by DX & DY
2563         #     .
2564         #       \n
2565         #     - "TT x y" : Create segment by point at X & Y
2566         #     - "T dx dy" : Create segment by point with DX & DY
2567         #     - "L length" : Create segment by direction & Length
2568         #     - "IX x" : Create segment by direction & Intersect. X
2569         #     - "IY y" : Create segment by direction & Intersect. Y
2570         #     .
2571         #       \n
2572         #     - "C radius length" : Create arc by direction, radius and length(in degree)
2573         #     - "AA x y": Create arc by point at X & Y
2574         #     - "A dx dy" : Create arc by point with DX & DY
2575         #     - "UU x y radius flag1": Create arc by point at X & Y with given radiUs
2576         #     - "U dx dy radius flag1" : Create arc by point with DX & DY with given radiUs
2577         #     - "EE x y xc yc flag1 flag2": Create arc by point at X & Y with given cEnter coordinates
2578         #     - "E dx dy dxc dyc radius flag1 flag2" : Create arc by point with DX & DY with given cEnter coordinates
2579         #     .
2580         #       \n
2581         #     - "WW" : Close Wire (to finish)
2582         #     - "WF" : Close Wire and build face (to finish)
2583         #     .
2584         #        \n
2585         #  - Flag1 (= reverse) is 0 or 2 ...
2586         #     - if 0 the drawn arc is the one of lower angle (< Pi)
2587         #     - if 2 the drawn arc ius the one of greater angle (> Pi)
2588         #     .
2589         #        \n
2590         #  - Flag2 (= control tolerance) is 0 or 1 ...
2591         #     - if 0 the specified end point can be at a distance of the arc greater than the tolerance (10^-7)
2592         #     - if 1 the wire is built only if the end point is on the arc
2593         #       with a tolerance of 10^-7 on the distance else the creation fails
2594         #
2595         #  @param theCommand String, defining the sketcher in local
2596         #                    coordinates of the working plane.
2597         #  @param theWorkingPlane Nine double values, defining origin,
2598         #                         OZ and OX directions of the working plane.
2599         #  @param theName Object name; when specified, this parameter is used
2600         #         for result publication in the study. Otherwise, if automatic
2601         #         publication is switched on, default value is used for result name.
2602         #
2603         #  @return New GEOM.GEOM_Object, containing the created wire.
2604         #
2605         #  @ref tui_sketcher_page "Example"
2606         @ManageTransactions("CurvesOp")
2607         def MakeSketcher(self, theCommand, theWorkingPlane = [0,0,0, 0,0,1, 1,0,0], theName=None):
2608             """
2609             Create a sketcher (wire or face), following the textual description, passed
2610             through theCommand argument.
2611             Edges of the resulting wire or face will be arcs of circles and/or linear segments.
2612             Format of the description string have to be the following:
2613                 "Sketcher[:F x1 y1]:CMD[:CMD[:CMD...]]"
2614             Where:
2615             - x1, y1 are coordinates of the first sketcher point (zero by default),
2616             - CMD is one of
2617                - "R angle" : Set the direction by angle
2618                - "D dx dy" : Set the direction by DX & DY
2619
2620                - "TT x y" : Create segment by point at X & Y
2621                - "T dx dy" : Create segment by point with DX & DY
2622                - "L length" : Create segment by direction & Length
2623                - "IX x" : Create segment by direction & Intersect. X
2624                - "IY y" : Create segment by direction & Intersect. Y
2625
2626                - "C radius length" : Create arc by direction, radius and length(in degree)
2627                - "AA x y": Create arc by point at X & Y
2628                - "A dx dy" : Create arc by point with DX & DY
2629                - "UU x y radius flag1": Create arc by point at X & Y with given radiUs
2630                - "U dx dy radius flag1" : Create arc by point with DX & DY with given radiUs
2631                - "EE x y xc yc flag1 flag2": Create arc by point at X & Y with given cEnter coordinates
2632                - "E dx dy dxc dyc radius flag1 flag2" : Create arc by point with DX & DY with given cEnter coordinates
2633
2634                - "WW" : Close Wire (to finish)
2635                - "WF" : Close Wire and build face (to finish)
2636
2637             - Flag1 (= reverse) is 0 or 2 ...
2638                - if 0 the drawn arc is the one of lower angle (< Pi)
2639                - if 2 the drawn arc ius the one of greater angle (> Pi)
2640
2641             - Flag2 (= control tolerance) is 0 or 1 ...
2642                - if 0 the specified end point can be at a distance of the arc greater than the tolerance (10^-7)
2643                - if 1 the wire is built only if the end point is on the arc
2644                  with a tolerance of 10^-7 on the distance else the creation fails
2645
2646             Parameters:
2647                 theCommand String, defining the sketcher in local
2648                            coordinates of the working plane.
2649                 theWorkingPlane Nine double values, defining origin,
2650                                 OZ and OX directions of the working plane.
2651                 theName Object name; when specified, this parameter is used
2652                         for result publication in the study. Otherwise, if automatic
2653                         publication is switched on, default value is used for result name.
2654
2655             Returns:
2656                 New GEOM.GEOM_Object, containing the created wire.
2657             """
2658             # Example: see GEOM_TestAll.py
2659             theCommand,Parameters = ParseSketcherCommand(theCommand)
2660             anObj = self.CurvesOp.MakeSketcher(theCommand, theWorkingPlane)
2661             RaiseIfFailed("MakeSketcher", self.CurvesOp)
2662             anObj.SetParameters(Parameters)
2663             self._autoPublish(anObj, theName, "wire")
2664             return anObj
2665
2666         ## Create a sketcher (wire or face), following the textual description,
2667         #  passed through <VAR>theCommand</VAR> argument. \n
2668         #  For format of the description string see MakeSketcher() method.\n
2669         #  @param theCommand String, defining the sketcher in local
2670         #                    coordinates of the working plane.
2671         #  @param theWorkingPlane Planar Face or LCS(Marker) of the working plane.
2672         #  @param theName Object name; when specified, this parameter is used
2673         #         for result publication in the study. Otherwise, if automatic
2674         #         publication is switched on, default value is used for result name.
2675         #
2676         #  @return New GEOM.GEOM_Object, containing the created wire.
2677         #
2678         #  @ref tui_sketcher_page "Example"
2679         @ManageTransactions("CurvesOp")
2680         def MakeSketcherOnPlane(self, theCommand, theWorkingPlane, theName=None):
2681             """
2682             Create a sketcher (wire or face), following the textual description,
2683             passed through theCommand argument.
2684             For format of the description string see geompy.MakeSketcher() method.
2685
2686             Parameters:
2687                 theCommand String, defining the sketcher in local
2688                            coordinates of the working plane.
2689                 theWorkingPlane Planar Face or LCS(Marker) of the working plane.
2690                 theName Object name; when specified, this parameter is used
2691                         for result publication in the study. Otherwise, if automatic
2692                         publication is switched on, default value is used for result name.
2693
2694             Returns:
2695                 New GEOM.GEOM_Object, containing the created wire.
2696             """
2697             theCommand,Parameters = ParseSketcherCommand(theCommand)
2698             anObj = self.CurvesOp.MakeSketcherOnPlane(theCommand, theWorkingPlane)
2699             RaiseIfFailed("MakeSketcherOnPlane", self.CurvesOp)
2700             anObj.SetParameters(Parameters)
2701             self._autoPublish(anObj, theName, "wire")
2702             return anObj
2703
2704         ## Obtain a 2D sketcher interface
2705         #  @return An instance of @ref gsketcher.Sketcher2D "Sketcher2D" interface
2706         def Sketcher2D (self):
2707             """
2708             Obtain a 2D sketcher interface.
2709
2710             Example of usage:
2711                sk = geompy.Sketcher2D()
2712                sk.addPoint(20, 20)
2713                sk.addSegmentRelative(15, 70)
2714                sk.addSegmentPerpY(50)
2715                sk.addArcRadiusRelative(25, 15, 14.5, 0)
2716                sk.addArcCenterAbsolute(1, 1, 50, 50, 0, 0)
2717                sk.addArcDirectionRadiusLength(20, 20, 101, 162.13)
2718                sk.close()
2719                Sketch_1 = sk.wire(geomObj_1)
2720             """
2721             sk = Sketcher2D (self)
2722             return sk
2723
2724         ## Create a sketcher wire, following the numerical description,
2725         #  passed through <VAR>theCoordinates</VAR> argument. \n
2726         #  @param theCoordinates double values, defining points to create a wire,
2727         #                                                      passing from it.
2728         #  @param theName Object name; when specified, this parameter is used
2729         #         for result publication in the study. Otherwise, if automatic
2730         #         publication is switched on, default value is used for result name.
2731         #
2732         #  @return New GEOM.GEOM_Object, containing the created wire.
2733         #
2734         #  @ref tui_3dsketcher_page "Example"
2735         @ManageTransactions("CurvesOp")
2736         def Make3DSketcher(self, theCoordinates, theName=None):
2737             """
2738             Create a sketcher wire, following the numerical description,
2739             passed through theCoordinates argument.
2740
2741             Parameters:
2742                 theCoordinates double values, defining points to create a wire,
2743                                passing from it.
2744                 theName Object name; when specified, this parameter is used
2745                         for result publication in the study. Otherwise, if automatic
2746                         publication is switched on, default value is used for result name.
2747
2748             Returns:
2749                 New GEOM_Object, containing the created wire.
2750             """
2751             theCoordinates,Parameters = ParseParameters(theCoordinates)
2752             anObj = self.CurvesOp.Make3DSketcher(theCoordinates)
2753             RaiseIfFailed("Make3DSketcher", self.CurvesOp)
2754             anObj.SetParameters(Parameters)
2755             self._autoPublish(anObj, theName, "wire")
2756             return anObj
2757
2758         ## Obtain a 3D sketcher interface
2759         #  @return An instance of @ref gsketcher.Sketcher3D "Sketcher3D" interface
2760         #
2761         #  @ref tui_3dsketcher_page "Example"
2762         def Sketcher3D (self):
2763             """
2764             Obtain a 3D sketcher interface.
2765
2766             Example of usage:
2767                 sk = geompy.Sketcher3D()
2768                 sk.addPointsAbsolute(0,0,0, 70,0,0)
2769                 sk.addPointsRelative(0, 0, 130)
2770                 sk.addPointAnglesLength("OXY", 50, 0, 100)
2771                 sk.addPointAnglesLength("OXZ", 30, 80, 130)
2772                 sk.close()
2773                 a3D_Sketcher_1 = sk.wire()
2774             """
2775             sk = Sketcher3D (self)
2776             return sk
2777
2778         ## Obtain a 2D polyline creation interface
2779         #  @return An instance of @ref gsketcher.Polyline2D "Polyline2D" interface
2780         #
2781         #  @ref tui_3dsketcher_page "Example"
2782         def Polyline2D (self):
2783             """
2784             Obtain a 2D polyline creation interface.
2785
2786             Example of usage:
2787                 pl = geompy.Polyline2D()
2788                 pl.addSection("section 1", GEOM.Polyline, True)
2789                 pl.addPoints(0, 0, 10, 0, 10, 10)
2790                 pl.addSection("section 2", GEOM.Interpolation, False)
2791                 pl.addPoints(20, 0, 30, 0, 30, 10)
2792                 resultObj = pl.result(WorkingPlane)
2793             """
2794             pl = Polyline2D (self)
2795             return pl
2796
2797         # end of l3_sketcher
2798         ## @}
2799
2800         ## @addtogroup l3_3d_primitives
2801         ## @{
2802
2803         ## Create a box by coordinates of two opposite vertices.
2804         #
2805         #  @param x1,y1,z1 double values, defining first point it.
2806         #  @param x2,y2,z2 double values, defining first point it.
2807         #  @param theName Object name; when specified, this parameter is used
2808         #         for result publication in the study. Otherwise, if automatic
2809         #         publication is switched on, default value is used for result name.
2810         #
2811         #  @return New GEOM.GEOM_Object, containing the created box.
2812         #
2813         #  @ref tui_creation_box "Example"
2814         def MakeBox(self, x1, y1, z1, x2, y2, z2, theName=None):
2815             """
2816             Create a box by coordinates of two opposite vertices.
2817
2818             Parameters:
2819                 x1,y1,z1 double values, defining first point.
2820                 x2,y2,z2 double values, defining second point.
2821                 theName Object name; when specified, this parameter is used
2822                         for result publication in the study. Otherwise, if automatic
2823                         publication is switched on, default value is used for result name.
2824
2825             Returns:
2826                 New GEOM.GEOM_Object, containing the created box.
2827             """
2828             # Example: see GEOM_TestAll.py
2829             pnt1 = self.MakeVertex(x1,y1,z1)
2830             pnt2 = self.MakeVertex(x2,y2,z2)
2831             # note: auto-publishing is done in self.MakeBoxTwoPnt()
2832             return self.MakeBoxTwoPnt(pnt1, pnt2, theName)
2833
2834         ## Create a box with specified dimensions along the coordinate axes
2835         #  and with edges, parallel to the coordinate axes.
2836         #  Center of the box will be at point (DX/2, DY/2, DZ/2).
2837         #  @param theDX Length of Box edges, parallel to OX axis.
2838         #  @param theDY Length of Box edges, parallel to OY axis.
2839         #  @param theDZ Length of Box edges, parallel to OZ axis.
2840         #  @param theName Object name; when specified, this parameter is used
2841         #         for result publication in the study. Otherwise, if automatic
2842         #         publication is switched on, default value is used for result name.
2843         #
2844         #  @return New GEOM.GEOM_Object, containing the created box.
2845         #
2846         #  @ref tui_creation_box "Example"
2847         @ManageTransactions("PrimOp")
2848         def MakeBoxDXDYDZ(self, theDX, theDY, theDZ, theName=None):
2849             """
2850             Create a box with specified dimensions along the coordinate axes
2851             and with edges, parallel to the coordinate axes.
2852             Center of the box will be at point (DX/2, DY/2, DZ/2).
2853
2854             Parameters:
2855                 theDX Length of Box edges, parallel to OX axis.
2856                 theDY Length of Box edges, parallel to OY axis.
2857                 theDZ Length of Box edges, parallel to OZ axis.
2858                 theName Object name; when specified, this parameter is used
2859                         for result publication in the study. Otherwise, if automatic
2860                         publication is switched on, default value is used for result name.
2861
2862             Returns:
2863                 New GEOM.GEOM_Object, containing the created box.
2864             """
2865             # Example: see GEOM_TestAll.py
2866             theDX,theDY,theDZ,Parameters = ParseParameters(theDX, theDY, theDZ)
2867             anObj = self.PrimOp.MakeBoxDXDYDZ(theDX, theDY, theDZ)
2868             RaiseIfFailed("MakeBoxDXDYDZ", self.PrimOp)
2869             anObj.SetParameters(Parameters)
2870             self._autoPublish(anObj, theName, "box")
2871             return anObj
2872
2873         ## Create a box with two specified opposite vertices,
2874         #  and with edges, parallel to the coordinate axes
2875         #  @param thePnt1 First of two opposite vertices.
2876         #  @param thePnt2 Second of two opposite vertices.
2877         #  @param theName Object name; when specified, this parameter is used
2878         #         for result publication in the study. Otherwise, if automatic
2879         #         publication is switched on, default value is used for result name.
2880         #
2881         #  @return New GEOM.GEOM_Object, containing the created box.
2882         #
2883         #  @ref tui_creation_box "Example"
2884         @ManageTransactions("PrimOp")
2885         def MakeBoxTwoPnt(self, thePnt1, thePnt2, theName=None):
2886             """
2887             Create a box with two specified opposite vertices,
2888             and with edges, parallel to the coordinate axes
2889
2890             Parameters:
2891                 thePnt1 First of two opposite vertices.
2892                 thePnt2 Second of two opposite vertices.
2893                 theName Object name; when specified, this parameter is used
2894                         for result publication in the study. Otherwise, if automatic
2895                         publication is switched on, default value is used for result name.
2896
2897             Returns:
2898                 New GEOM.GEOM_Object, containing the created box.
2899             """
2900             # Example: see GEOM_TestAll.py
2901             anObj = self.PrimOp.MakeBoxTwoPnt(thePnt1, thePnt2)
2902             RaiseIfFailed("MakeBoxTwoPnt", self.PrimOp)
2903             self._autoPublish(anObj, theName, "box")
2904             return anObj
2905
2906         ## Create a face with specified dimensions with edges parallel to coordinate axes.
2907         #  @param theH height of Face.
2908         #  @param theW width of Face.
2909         #  @param theOrientation face orientation: 1-OXY, 2-OYZ, 3-OZX
2910         #  @param theName Object name; when specified, this parameter is used
2911         #         for result publication in the study. Otherwise, if automatic
2912         #         publication is switched on, default value is used for result name.
2913         #
2914         #  @return New GEOM.GEOM_Object, containing the created face.
2915         #
2916         #  @ref tui_creation_face "Example"
2917         @ManageTransactions("PrimOp")
2918         def MakeFaceHW(self, theH, theW, theOrientation, theName=None):
2919             """
2920             Create a face with specified dimensions with edges parallel to coordinate axes.
2921
2922             Parameters:
2923                 theH height of Face.
2924                 theW width of Face.
2925                 theOrientation face orientation: 1-OXY, 2-OYZ, 3-OZX
2926                 theName Object name; when specified, this parameter is used
2927                         for result publication in the study. Otherwise, if automatic
2928                         publication is switched on, default value is used for result name.
2929
2930             Returns:
2931                 New GEOM.GEOM_Object, containing the created face.
2932             """
2933             # Example: see GEOM_TestAll.py
2934             theH,theW,Parameters = ParseParameters(theH, theW)
2935             anObj = self.PrimOp.MakeFaceHW(theH, theW, theOrientation)
2936             RaiseIfFailed("MakeFaceHW", self.PrimOp)
2937             anObj.SetParameters(Parameters)
2938             self._autoPublish(anObj, theName, "rectangle")
2939             return anObj
2940
2941         ## Create a face from another plane and two sizes,
2942         #  vertical size and horisontal size.
2943         #  @param theObj   Normale vector to the creating face or
2944         #  the face object.
2945         #  @param theH     Height (vertical size).
2946         #  @param theW     Width (horisontal size).
2947         #  @param theName Object name; when specified, this parameter is used
2948         #         for result publication in the study. Otherwise, if automatic
2949         #         publication is switched on, default value is used for result name.
2950         #
2951         #  @return New GEOM.GEOM_Object, containing the created face.
2952         #
2953         #  @ref tui_creation_face "Example"
2954         @ManageTransactions("PrimOp")
2955         def MakeFaceObjHW(self, theObj, theH, theW, theName=None):
2956             """
2957             Create a face from another plane and two sizes,
2958             vertical size and horisontal size.
2959
2960             Parameters:
2961                 theObj   Normale vector to the creating face or
2962                          the face object.
2963                 theH     Height (vertical size).
2964                 theW     Width (horisontal size).
2965                 theName Object name; when specified, this parameter is used
2966                         for result publication in the study. Otherwise, if automatic
2967                         publication is switched on, default value is used for result name.
2968
2969             Returns:
2970                 New GEOM_Object, containing the created face.
2971             """
2972             # Example: see GEOM_TestAll.py
2973             theH,theW,Parameters = ParseParameters(theH, theW)
2974             anObj = self.PrimOp.MakeFaceObjHW(theObj, theH, theW)
2975             RaiseIfFailed("MakeFaceObjHW", self.PrimOp)
2976             anObj.SetParameters(Parameters)
2977             self._autoPublish(anObj, theName, "rectangle")
2978             return anObj
2979
2980         ## Create a disk with given center, normal vector and radius.
2981         #  @param thePnt Disk center.
2982         #  @param theVec Vector, normal to the plane of the disk.
2983         #  @param theR Disk radius.
2984         #  @param theName Object name; when specified, this parameter is used
2985         #         for result publication in the study. Otherwise, if automatic
2986         #         publication is switched on, default value is used for result name.
2987         #
2988         #  @return New GEOM.GEOM_Object, containing the created disk.
2989         #
2990         #  @ref tui_creation_disk "Example"
2991         @ManageTransactions("PrimOp")
2992         def MakeDiskPntVecR(self, thePnt, theVec, theR, theName=None):
2993             """
2994             Create a disk with given center, normal vector and radius.
2995
2996             Parameters:
2997                 thePnt Disk center.
2998                 theVec Vector, normal to the plane of the disk.
2999                 theR Disk radius.
3000                 theName Object name; when specified, this parameter is used
3001                         for result publication in the study. Otherwise, if automatic
3002                         publication is switched on, default value is used for result name.
3003
3004             Returns:
3005                 New GEOM.GEOM_Object, containing the created disk.
3006             """
3007             # Example: see GEOM_TestAll.py
3008             theR,Parameters = ParseParameters(theR)
3009             anObj = self.PrimOp.MakeDiskPntVecR(thePnt, theVec, theR)
3010             RaiseIfFailed("MakeDiskPntVecR", self.PrimOp)
3011             anObj.SetParameters(Parameters)
3012             self._autoPublish(anObj, theName, "disk")
3013             return anObj
3014
3015         ## Create a disk, passing through three given points
3016         #  @param thePnt1,thePnt2,thePnt3 Points, defining the disk.
3017         #  @param theName Object name; when specified, this parameter is used
3018         #         for result publication in the study. Otherwise, if automatic
3019         #         publication is switched on, default value is used for result name.
3020         #
3021         #  @return New GEOM.GEOM_Object, containing the created disk.
3022         #
3023         #  @ref tui_creation_disk "Example"
3024         @ManageTransactions("PrimOp")
3025         def MakeDiskThreePnt(self, thePnt1, thePnt2, thePnt3, theName=None):
3026             """
3027             Create a disk, passing through three given points
3028
3029             Parameters:
3030                 thePnt1,thePnt2,thePnt3 Points, defining the disk.
3031                 theName Object name; when specified, this parameter is used
3032                         for result publication in the study. Otherwise, if automatic
3033                         publication is switched on, default value is used for result name.
3034
3035             Returns:
3036                 New GEOM.GEOM_Object, containing the created disk.
3037             """
3038             # Example: see GEOM_TestAll.py
3039             anObj = self.PrimOp.MakeDiskThreePnt(thePnt1, thePnt2, thePnt3)
3040             RaiseIfFailed("MakeDiskThreePnt", self.PrimOp)
3041             self._autoPublish(anObj, theName, "disk")
3042             return anObj
3043
3044         ## Create a disk with specified dimensions along OX-OY coordinate axes.
3045         #  @param theR Radius of Face.
3046         #  @param theOrientation set the orientation belong axis OXY or OYZ or OZX
3047         #  @param theName Object name; when specified, this parameter is used
3048         #         for result publication in the study. Otherwise, if automatic
3049         #         publication is switched on, default value is used for result name.
3050         #
3051         #  @return New GEOM.GEOM_Object, containing the created disk.
3052         #
3053         #  @ref tui_creation_face "Example"
3054         @ManageTransactions("PrimOp")
3055         def MakeDiskR(self, theR, theOrientation, theName=None):
3056             """
3057             Create a disk with specified dimensions along OX-OY coordinate axes.
3058
3059             Parameters:
3060                 theR Radius of Face.
3061                 theOrientation set the orientation belong axis OXY or OYZ or OZX
3062                 theName Object name; when specified, this parameter is used
3063                         for result publication in the study. Otherwise, if automatic
3064                         publication is switched on, default value is used for result name.
3065
3066             Returns:
3067                 New GEOM.GEOM_Object, containing the created disk.
3068
3069             Example of usage:
3070                 Disk3 = geompy.MakeDiskR(100., 1)
3071             """
3072             # Example: see GEOM_TestAll.py
3073             theR,Parameters = ParseParameters(theR)
3074             anObj = self.PrimOp.MakeDiskR(theR, theOrientation)
3075             RaiseIfFailed("MakeDiskR", self.PrimOp)
3076             anObj.SetParameters(Parameters)
3077             self._autoPublish(anObj, theName, "disk")
3078             return anObj
3079
3080         ## Create a cylinder with given base point, axis, radius and height.
3081         #  @param thePnt Central point of cylinder base.
3082         #  @param theAxis Cylinder axis.
3083         #  @param theR Cylinder radius.
3084         #  @param theH Cylinder height.
3085         #  @param theName Object name; when specified, this parameter is used
3086         #         for result publication in the study. Otherwise, if automatic
3087         #         publication is switched on, default value is used for result name.
3088         #
3089         #  @return New GEOM.GEOM_Object, containing the created cylinder.
3090         #
3091         #  @ref tui_creation_cylinder "Example"
3092         @ManageTransactions("PrimOp")
3093         def MakeCylinder(self, thePnt, theAxis, theR, theH, theName=None):
3094             """
3095             Create a cylinder with given base point, axis, radius and height.
3096
3097             Parameters:
3098                 thePnt Central point of cylinder base.
3099                 theAxis Cylinder axis.
3100                 theR Cylinder radius.
3101                 theH Cylinder height.
3102                 theName Object name; when specified, this parameter is used
3103                         for result publication in the study. Otherwise, if automatic
3104                         publication is switched on, default value is used for result name.
3105
3106             Returns:
3107                 New GEOM.GEOM_Object, containing the created cylinder.
3108             """
3109             # Example: see GEOM_TestAll.py
3110             theR,theH,Parameters = ParseParameters(theR, theH)
3111             anObj = self.PrimOp.MakeCylinderPntVecRH(thePnt, theAxis, theR, theH)
3112             RaiseIfFailed("MakeCylinderPntVecRH", self.PrimOp)
3113             anObj.SetParameters(Parameters)
3114             self._autoPublish(anObj, theName, "cylinder")
3115             return anObj
3116             
3117         ## Create a portion of cylinder with given base point, axis, radius, height and angle.
3118         #  @param thePnt Central point of cylinder base.
3119         #  @param theAxis Cylinder axis.
3120         #  @param theR Cylinder radius.
3121         #  @param theH Cylinder height.
3122         #  @param theA Cylinder angle in radians.
3123         #  @param theName Object name; when specified, this parameter is used
3124         #         for result publication in the study. Otherwise, if automatic
3125         #         publication is switched on, default value is used for result name.
3126         #
3127         #  @return New GEOM.GEOM_Object, containing the created cylinder.
3128         #
3129         #  @ref tui_creation_cylinder "Example"
3130         @ManageTransactions("PrimOp")
3131         def MakeCylinderA(self, thePnt, theAxis, theR, theH, theA, theName=None):
3132             """
3133             Create a portion of cylinder with given base point, axis, radius, height and angle.
3134
3135             Parameters:
3136                 thePnt Central point of cylinder base.
3137                 theAxis Cylinder axis.
3138                 theR Cylinder radius.
3139                 theH Cylinder height.
3140                 theA Cylinder angle in radians.
3141                 theName Object name; when specified, this parameter is used
3142                         for result publication in the study. Otherwise, if automatic
3143                         publication is switched on, default value is used for result name.
3144
3145             Returns:
3146                 New GEOM.GEOM_Object, containing the created cylinder.
3147             """
3148             # Example: see GEOM_TestAll.py
3149             flag = False
3150             if isinstance(theA,str):
3151                 flag = True
3152             theR,theH,theA,Parameters = ParseParameters(theR, theH, theA)
3153             if flag:
3154                 theA = theA*math.pi/180.
3155             if theA<=0. or theA>=2*math.pi:
3156                 raise ValueError("The angle parameter should be strictly between 0 and 2*pi.")
3157             anObj = self.PrimOp.MakeCylinderPntVecRHA(thePnt, theAxis, theR, theH, theA)
3158             RaiseIfFailed("MakeCylinderPntVecRHA", self.PrimOp)
3159             anObj.SetParameters(Parameters)
3160             self._autoPublish(anObj, theName, "cylinder")
3161             return anObj
3162
3163         ## Create a cylinder with given radius and height at
3164         #  the origin of coordinate system. Axis of the cylinder
3165         #  will be collinear to the OZ axis of the coordinate system.
3166         #  @param theR Cylinder radius.
3167         #  @param theH Cylinder height.
3168         #  @param theName Object name; when specified, this parameter is used
3169         #         for result publication in the study. Otherwise, if automatic
3170         #         publication is switched on, default value is used for result name.
3171         #
3172         #  @return New GEOM.GEOM_Object, containing the created cylinder.
3173         #
3174         #  @ref tui_creation_cylinder "Example"
3175         @ManageTransactions("PrimOp")
3176         def MakeCylinderRH(self, theR, theH, theName=None):
3177             """
3178             Create a cylinder with given radius and height at
3179             the origin of coordinate system. Axis of the cylinder
3180             will be collinear to the OZ axis of the coordinate system.
3181
3182             Parameters:
3183                 theR Cylinder radius.
3184                 theH Cylinder height.
3185                 theName Object name; when specified, this parameter is used
3186                         for result publication in the study. Otherwise, if automatic
3187                         publication is switched on, default value is used for result name.
3188
3189             Returns:
3190                 New GEOM.GEOM_Object, containing the created cylinder.
3191             """
3192             # Example: see GEOM_TestAll.py
3193             theR,theH,Parameters = ParseParameters(theR, theH)
3194             anObj = self.PrimOp.MakeCylinderRH(theR, theH)
3195             RaiseIfFailed("MakeCylinderRH", self.PrimOp)
3196             anObj.SetParameters(Parameters)
3197             self._autoPublish(anObj, theName, "cylinder")
3198             return anObj
3199             
3200         ## Create a portion of cylinder with given radius, height and angle at
3201         #  the origin of coordinate system. Axis of the cylinder
3202         #  will be collinear to the OZ axis of the coordinate system.
3203         #  @param theR Cylinder radius.
3204         #  @param theH Cylinder height.
3205         #  @param theA Cylinder angle in radians.
3206         #  @param theName Object name; when specified, this parameter is used
3207         #         for result publication in the study. Otherwise, if automatic
3208         #         publication is switched on, default value is used for result name.
3209         #
3210         #  @return New GEOM.GEOM_Object, containing the created cylinder.
3211         #
3212         #  @ref tui_creation_cylinder "Example"
3213         @ManageTransactions("PrimOp")
3214         def MakeCylinderRHA(self, theR, theH, theA, theName=None):
3215             """
3216             Create a portion of cylinder with given radius, height and angle at
3217             the origin of coordinate system. Axis of the cylinder
3218             will be collinear to the OZ axis of the coordinate system.
3219
3220             Parameters:
3221                 theR Cylinder radius.
3222                 theH Cylinder height.
3223                 theA Cylinder angle in radians.
3224                 theName Object name; when specified, this parameter is used
3225                         for result publication in the study. Otherwise, if automatic
3226                         publication is switched on, default value is used for result name.
3227
3228             Returns:
3229                 New GEOM.GEOM_Object, containing the created cylinder.
3230             """
3231             # Example: see GEOM_TestAll.py
3232             flag = False
3233             if isinstance(theA,str):
3234                 flag = True
3235             theR,theH,theA,Parameters = ParseParameters(theR, theH, theA)
3236             if flag:
3237                 theA = theA*math.pi/180.
3238             if theA<=0. or theA>=2*math.pi:
3239                 raise ValueError("The angle parameter should be strictly between 0 and 2*pi.")
3240             anObj = self.PrimOp.MakeCylinderRHA(theR, theH, theA)
3241             RaiseIfFailed("MakeCylinderRHA", self.PrimOp)
3242             anObj.SetParameters(Parameters)
3243             self._autoPublish(anObj, theName, "cylinder")
3244             return anObj
3245
3246         ## Create a sphere with given center and radius.
3247         #  @param thePnt Sphere center.
3248         #  @param theR Sphere radius.
3249         #  @param theName Object name; when specified, this parameter is used
3250         #         for result publication in the study. Otherwise, if automatic
3251         #         publication is switched on, default value is used for result name.
3252         #
3253         #  @return New GEOM.GEOM_Object, containing the created sphere.
3254         #
3255         #  @ref tui_creation_sphere "Example"
3256         @ManageTransactions("PrimOp")
3257         def MakeSpherePntR(self, thePnt, theR, theName=None):
3258             """
3259             Create a sphere with given center and radius.
3260
3261             Parameters:
3262                 thePnt Sphere center.
3263                 theR Sphere radius.
3264                 theName Object name; when specified, this parameter is used
3265                         for result publication in the study. Otherwise, if automatic
3266                         publication is switched on, default value is used for result name.
3267
3268             Returns:
3269                 New GEOM.GEOM_Object, containing the created sphere.
3270             """
3271             # Example: see GEOM_TestAll.py
3272             theR,Parameters = ParseParameters(theR)
3273             anObj = self.PrimOp.MakeSpherePntR(thePnt, theR)
3274             RaiseIfFailed("MakeSpherePntR", self.PrimOp)
3275             anObj.SetParameters(Parameters)
3276             self._autoPublish(anObj, theName, "sphere")
3277             return anObj
3278
3279         ## Create a sphere with given center and radius.
3280         #  @param x,y,z Coordinates of sphere center.
3281         #  @param theR Sphere radius.
3282         #  @param theName Object name; when specified, this parameter is used
3283         #         for result publication in the study. Otherwise, if automatic
3284         #         publication is switched on, default value is used for result name.
3285         #
3286         #  @return New GEOM.GEOM_Object, containing the created sphere.
3287         #
3288         #  @ref tui_creation_sphere "Example"
3289         def MakeSphere(self, x, y, z, theR, theName=None):
3290             """
3291             Create a sphere with given center and radius.
3292
3293             Parameters:
3294                 x,y,z Coordinates of sphere center.
3295                 theR Sphere radius.
3296                 theName Object name; when specified, this parameter is used
3297                         for result publication in the study. Otherwise, if automatic
3298                         publication is switched on, default value is used for result name.
3299
3300             Returns:
3301                 New GEOM.GEOM_Object, containing the created sphere.
3302             """
3303             # Example: see GEOM_TestAll.py
3304             point = self.MakeVertex(x, y, z)
3305             # note: auto-publishing is done in self.MakeSpherePntR()
3306             anObj = self.MakeSpherePntR(point, theR, theName)
3307             return anObj
3308
3309         ## Create a sphere with given radius at the origin of coordinate system.
3310         #  @param theR Sphere radius.
3311         #  @param theName Object name; when specified, this parameter is used
3312         #         for result publication in the study. Otherwise, if automatic
3313         #         publication is switched on, default value is used for result name.
3314         #
3315         #  @return New GEOM.GEOM_Object, containing the created sphere.
3316         #
3317         #  @ref tui_creation_sphere "Example"
3318         @ManageTransactions("PrimOp")
3319         def MakeSphereR(self, theR, theName=None):
3320             """
3321             Create a sphere with given radius at the origin of coordinate system.
3322
3323             Parameters:
3324                 theR Sphere radius.
3325                 theName Object name; when specified, this parameter is used
3326                         for result publication in the study. Otherwise, if automatic
3327                         publication is switched on, default value is used for result name.
3328
3329             Returns:
3330                 New GEOM.GEOM_Object, containing the created sphere.
3331             """
3332             # Example: see GEOM_TestAll.py
3333             theR,Parameters = ParseParameters(theR)
3334             anObj = self.PrimOp.MakeSphereR(theR)
3335             RaiseIfFailed("MakeSphereR", self.PrimOp)
3336             anObj.SetParameters(Parameters)
3337             self._autoPublish(anObj, theName, "sphere")
3338             return anObj
3339
3340         ## Create a cone with given base point, axis, height and radiuses.
3341         #  @param thePnt Central point of the first cone base.
3342         #  @param theAxis Cone axis.
3343         #  @param theR1 Radius of the first cone base.
3344         #  @param theR2 Radius of the second cone base.
3345         #    \note If both radiuses are non-zero, the cone will be truncated.
3346         #    \note If the radiuses are equal, a cylinder will be created instead.
3347         #  @param theH Cone height.
3348         #  @param theName Object name; when specified, this parameter is used
3349         #         for result publication in the study. Otherwise, if automatic
3350         #         publication is switched on, default value is used for result name.
3351         #
3352         #  @return New GEOM.GEOM_Object, containing the created cone.
3353         #
3354         #  @ref tui_creation_cone "Example"
3355         @ManageTransactions("PrimOp")
3356         def MakeCone(self, thePnt, theAxis, theR1, theR2, theH, theName=None):
3357             """
3358             Create a cone with given base point, axis, height and radiuses.
3359
3360             Parameters:
3361                 thePnt Central point of the first cone base.
3362                 theAxis Cone axis.
3363                 theR1 Radius of the first cone base.
3364                 theR2 Radius of the second cone base.
3365                 theH Cone height.
3366                 theName Object name; when specified, this parameter is used
3367                         for result publication in the study. Otherwise, if automatic
3368                         publication is switched on, default value is used for result name.
3369
3370             Note:
3371                 If both radiuses are non-zero, the cone will be truncated.
3372                 If the radiuses are equal, a cylinder will be created instead.
3373
3374             Returns:
3375                 New GEOM.GEOM_Object, containing the created cone.
3376             """
3377             # Example: see GEOM_TestAll.py
3378             theR1,theR2,theH,Parameters = ParseParameters(theR1,theR2,theH)
3379             anObj = self.PrimOp.MakeConePntVecR1R2H(thePnt, theAxis, theR1, theR2, theH)
3380             RaiseIfFailed("MakeConePntVecR1R2H", self.PrimOp)
3381             anObj.SetParameters(Parameters)
3382             self._autoPublish(anObj, theName, "cone")
3383             return anObj
3384
3385         ## Create a cone with given height and radiuses at
3386         #  the origin of coordinate system. Axis of the cone will
3387         #  be collinear to the OZ axis of the coordinate system.
3388         #  @param theR1 Radius of the first cone base.
3389         #  @param theR2 Radius of the second cone base.
3390         #    \note If both radiuses are non-zero, the cone will be truncated.
3391         #    \note If the radiuses are equal, a cylinder will be created instead.
3392         #  @param theH Cone height.
3393         #  @param theName Object name; when specified, this parameter is used
3394         #         for result publication in the study. Otherwise, if automatic
3395         #         publication is switched on, default value is used for result name.
3396         #
3397         #  @return New GEOM.GEOM_Object, containing the created cone.
3398         #
3399         #  @ref tui_creation_cone "Example"
3400         @ManageTransactions("PrimOp")
3401         def MakeConeR1R2H(self, theR1, theR2, theH, theName=None):
3402             """
3403             Create a cone with given height and radiuses at
3404             the origin of coordinate system. Axis of the cone will
3405             be collinear to the OZ axis of the coordinate system.
3406
3407             Parameters:
3408                 theR1 Radius of the first cone base.
3409                 theR2 Radius of the second cone base.
3410                 theH Cone height.
3411                 theName Object name; when specified, this parameter is used
3412                         for result publication in the study. Otherwise, if automatic
3413                         publication is switched on, default value is used for result name.
3414
3415             Note:
3416                 If both radiuses are non-zero, the cone will be truncated.
3417                 If the radiuses are equal, a cylinder will be created instead.
3418
3419             Returns:
3420                 New GEOM.GEOM_Object, containing the created cone.
3421             """
3422             # Example: see GEOM_TestAll.py
3423             theR1,theR2,theH,Parameters = ParseParameters(theR1,theR2,theH)
3424             anObj = self.PrimOp.MakeConeR1R2H(theR1, theR2, theH)
3425             RaiseIfFailed("MakeConeR1R2H", self.PrimOp)
3426             anObj.SetParameters(Parameters)
3427             self._autoPublish(anObj, theName, "cone")
3428             return anObj
3429
3430         ## Create a torus with given center, normal vector and radiuses.
3431         #  @param thePnt Torus central point.
3432         #  @param theVec Torus axis of symmetry.
3433         #  @param theRMajor Torus major radius.
3434         #  @param theRMinor Torus minor radius.
3435         #  @param theName Object name; when specified, this parameter is used
3436         #         for result publication in the study. Otherwise, if automatic
3437         #         publication is switched on, default value is used for result name.
3438         #
3439         #  @return New GEOM.GEOM_Object, containing the created torus.
3440         #
3441         #  @ref tui_creation_torus "Example"
3442         @ManageTransactions("PrimOp")
3443         def MakeTorus(self, thePnt, theVec, theRMajor, theRMinor, theName=None):
3444             """
3445             Create a torus with given center, normal vector and radiuses.
3446
3447             Parameters:
3448                 thePnt Torus central point.
3449                 theVec Torus axis of symmetry.
3450                 theRMajor Torus major radius.
3451                 theRMinor Torus minor radius.
3452                 theName Object name; when specified, this parameter is used
3453                         for result publication in the study. Otherwise, if automatic
3454                         publication is switched on, default value is used for result name.
3455
3456            Returns:
3457                 New GEOM.GEOM_Object, containing the created torus.
3458             """
3459             # Example: see GEOM_TestAll.py
3460             theRMajor,theRMinor,Parameters = ParseParameters(theRMajor,theRMinor)
3461             anObj = self.PrimOp.MakeTorusPntVecRR(thePnt, theVec, theRMajor, theRMinor)
3462             RaiseIfFailed("MakeTorusPntVecRR", self.PrimOp)
3463             anObj.SetParameters(Parameters)
3464             self._autoPublish(anObj, theName, "torus")
3465             return anObj
3466
3467         ## Create a torus with given radiuses at the origin of coordinate system.
3468         #  @param theRMajor Torus major radius.
3469         #  @param theRMinor Torus minor radius.
3470         #  @param theName Object name; when specified, this parameter is used
3471         #         for result publication in the study. Otherwise, if automatic
3472         #         publication is switched on, default value is used for result name.
3473         #
3474         #  @return New GEOM.GEOM_Object, containing the created torus.
3475         #
3476         #  @ref tui_creation_torus "Example"
3477         @ManageTransactions("PrimOp")
3478         def MakeTorusRR(self, theRMajor, theRMinor, theName=None):
3479             """
3480            Create a torus with given radiuses at the origin of coordinate system.
3481
3482            Parameters:
3483                 theRMajor Torus major radius.
3484                 theRMinor Torus minor radius.
3485                 theName Object name; when specified, this parameter is used
3486                         for result publication in the study. Otherwise, if automatic
3487                         publication is switched on, default value is used for result name.
3488
3489            Returns:
3490                 New GEOM.GEOM_Object, containing the created torus.
3491             """
3492             # Example: see GEOM_TestAll.py
3493             theRMajor,theRMinor,Parameters = ParseParameters(theRMajor,theRMinor)
3494             anObj = self.PrimOp.MakeTorusRR(theRMajor, theRMinor)
3495             RaiseIfFailed("MakeTorusRR", self.PrimOp)
3496             anObj.SetParameters(Parameters)
3497             self._autoPublish(anObj, theName, "torus")
3498             return anObj
3499
3500         # end of l3_3d_primitives
3501         ## @}
3502
3503         ## @addtogroup l3_complex
3504         ## @{
3505
3506         ## Create a shape by extrusion of the base shape along a vector, defined by two points.
3507         #  @param theBase Base shape to be extruded.
3508         #  @param thePoint1 First end of extrusion vector.
3509         #  @param thePoint2 Second end of extrusion vector.
3510         #  @param theScaleFactor Use it to make prism with scaled second base.
3511         #                        Nagative value means not scaled second base.
3512         #  @param theName Object name; when specified, this parameter is used
3513         #         for result publication in the study. Otherwise, if automatic
3514         #         publication is switched on, default value is used for result name.
3515         #
3516         #  @return New GEOM.GEOM_Object, containing the created prism.
3517         #
3518         #  @ref tui_creation_prism "Example"
3519         @ManageTransactions("PrimOp")
3520         def MakePrism(self, theBase, thePoint1, thePoint2, theScaleFactor = -1.0, theName=None):
3521             """
3522             Create a shape by extrusion of the base shape along a vector, defined by two points.
3523
3524             Parameters:
3525                 theBase Base shape to be extruded.
3526                 thePoint1 First end of extrusion vector.
3527                 thePoint2 Second end of extrusion vector.
3528                 theScaleFactor Use it to make prism with scaled second base.
3529                                Nagative value means not scaled second base.
3530                 theName Object name; when specified, this parameter is used
3531                         for result publication in the study. Otherwise, if automatic
3532                         publication is switched on, default value is used for result name.
3533
3534             Returns:
3535                 New GEOM.GEOM_Object, containing the created prism.
3536             """
3537             # Example: see GEOM_TestAll.py
3538             anObj = None
3539             Parameters = ""
3540             if theScaleFactor > 0:
3541                 theScaleFactor,Parameters = ParseParameters(theScaleFactor)
3542                 anObj = self.PrimOp.MakePrismTwoPntWithScaling(theBase, thePoint1, thePoint2, theScaleFactor)
3543             else:
3544                 anObj = self.PrimOp.MakePrismTwoPnt(theBase, thePoint1, thePoint2)
3545             RaiseIfFailed("MakePrismTwoPnt", self.PrimOp)
3546             anObj.SetParameters(Parameters)
3547             self._autoPublish(anObj, theName, "prism")
3548             return anObj
3549
3550         ## Create a shape by extrusion of the base shape along a
3551         #  vector, defined by two points, in 2 Ways (forward/backward).
3552         #  @param theBase Base shape to be extruded.
3553         #  @param thePoint1 First end of extrusion vector.
3554         #  @param thePoint2 Second end of extrusion vector.
3555         #  @param theName Object name; when specified, this parameter is used
3556         #         for result publication in the study. Otherwise, if automatic
3557         #         publication is switched on, default value is used for result name.
3558         #
3559         #  @return New GEOM.GEOM_Object, containing the created prism.
3560         #
3561         #  @ref tui_creation_prism "Example"
3562         @ManageTransactions("PrimOp")
3563         def MakePrism2Ways(self, theBase, thePoint1, thePoint2, theName=None):
3564             """
3565             Create a shape by extrusion of the base shape along a
3566             vector, defined by two points, in 2 Ways (forward/backward).
3567
3568             Parameters:
3569                 theBase Base shape to be extruded.
3570                 thePoint1 First end of extrusion vector.
3571                 thePoint2 Second end of extrusion vector.
3572                 theName Object name; when specified, this parameter is used
3573                         for result publication in the study. Otherwise, if automatic
3574                         publication is switched on, default value is used for result name.
3575
3576             Returns:
3577                 New GEOM.GEOM_Object, containing the created prism.
3578             """
3579             # Example: see GEOM_TestAll.py
3580             anObj = self.PrimOp.MakePrismTwoPnt2Ways(theBase, thePoint1, thePoint2)
3581             RaiseIfFailed("MakePrismTwoPnt", self.PrimOp)
3582             self._autoPublish(anObj, theName, "prism")
3583             return anObj
3584
3585         ## Create a shape by extrusion of the base shape along the vector,
3586         #  i.e. all the space, transfixed by the base shape during its translation
3587         #  along the vector on the given distance.
3588         #  @param theBase Base shape to be extruded.
3589         #  @param theVec Direction of extrusion.
3590         #  @param theH Prism dimension along theVec.
3591         #  @param theScaleFactor Use it to make prism with scaled second base.
3592         #                        Negative value means not scaled second base.
3593         #  @param theName Object name; when specified, this parameter is used
3594         #         for result publication in the study. Otherwise, if automatic
3595         #         publication is switched on, default value is used for result name.
3596         #
3597         #  @return New GEOM.GEOM_Object, containing the created prism.
3598         #
3599         #  @ref tui_creation_prism "Example"
3600         @ManageTransactions("PrimOp")
3601         def MakePrismVecH(self, theBase, theVec, theH, theScaleFactor = -1.0, theName=None):
3602             """
3603             Create a shape by extrusion of the base shape along the vector,
3604             i.e. all the space, transfixed by the base shape during its translation
3605             along the vector on the given distance.
3606
3607             Parameters:
3608                 theBase Base shape to be extruded.
3609                 theVec Direction of extrusion.
3610                 theH Prism dimension along theVec.
3611                 theScaleFactor Use it to make prism with scaled second base.
3612                                Negative value means not scaled second base.
3613                 theName Object name; when specified, this parameter is used
3614                         for result publication in the study. Otherwise, if automatic
3615                         publication is switched on, default value is used for result name.
3616
3617             Returns:
3618                 New GEOM.GEOM_Object, containing the created prism.
3619             """
3620             # Example: see GEOM_TestAll.py
3621             anObj = None
3622             Parameters = ""
3623             if theScaleFactor > 0:
3624                 theH,theScaleFactor,Parameters = ParseParameters(theH,theScaleFactor)
3625                 anObj = self.PrimOp.MakePrismVecHWithScaling(theBase, theVec, theH, theScaleFactor)
3626             else:
3627                 theH,Parameters = ParseParameters(theH)
3628                 anObj = self.PrimOp.MakePrismVecH(theBase, theVec, theH)
3629             RaiseIfFailed("MakePrismVecH", self.PrimOp)
3630             anObj.SetParameters(Parameters)
3631             self._autoPublish(anObj, theName, "prism")
3632             return anObj
3633
3634         ## Create a shape by extrusion of the base shape along the vector,
3635         #  i.e. all the space, transfixed by the base shape during its translation
3636         #  along the vector on the given distance in 2 Ways (forward/backward).
3637         #  @param theBase Base shape to be extruded.
3638         #  @param theVec Direction of extrusion.
3639         #  @param theH Prism dimension along theVec in forward direction.
3640         #  @param theName Object name; when specified, this parameter is used
3641         #         for result publication in the study. Otherwise, if automatic
3642         #         publication is switched on, default value is used for result name.
3643         #
3644         #  @return New GEOM.GEOM_Object, containing the created prism.
3645         #
3646         #  @ref tui_creation_prism "Example"
3647         @ManageTransactions("PrimOp")
3648         def MakePrismVecH2Ways(self, theBase, theVec, theH, theName=None):
3649             """
3650             Create a shape by extrusion of the base shape along the vector,
3651             i.e. all the space, transfixed by the base shape during its translation
3652             along the vector on the given distance in 2 Ways (forward/backward).
3653
3654             Parameters:
3655                 theBase Base shape to be extruded.
3656                 theVec Direction of extrusion.
3657                 theH Prism dimension along theVec in forward direction.
3658                 theName Object name; when specified, this parameter is used
3659                         for result publication in the study. Otherwise, if automatic
3660                         publication is switched on, default value is used for result name.
3661
3662             Returns:
3663                 New GEOM.GEOM_Object, containing the created prism.
3664             """
3665             # Example: see GEOM_TestAll.py
3666             theH,Parameters = ParseParameters(theH)
3667             anObj = self.PrimOp.MakePrismVecH2Ways(theBase, theVec, theH)
3668             RaiseIfFailed("MakePrismVecH2Ways", self.PrimOp)
3669             anObj.SetParameters(Parameters)
3670             self._autoPublish(anObj, theName, "prism")
3671             return anObj
3672
3673         ## Create a shape by extrusion of the base shape along the dx, dy, dz direction
3674         #  @param theBase Base shape to be extruded.
3675         #  @param theDX, theDY, theDZ Directions of extrusion.
3676         #  @param theScaleFactor Use it to make prism with scaled second base.
3677         #                        Nagative value means not scaled second base.
3678         #  @param theName Object name; when specified, this parameter is used
3679         #         for result publication in the study. Otherwise, if automatic
3680         #         publication is switched on, default value is used for result name.
3681         #
3682         #  @return New GEOM.GEOM_Object, containing the created prism.
3683         #
3684         #  @ref tui_creation_prism "Example"
3685         @ManageTransactions("PrimOp")
3686         def MakePrismDXDYDZ(self, theBase, theDX, theDY, theDZ, theScaleFactor = -1.0, theName=None):
3687             """
3688             Create a shape by extrusion of the base shape along the dx, dy, dz direction
3689
3690             Parameters:
3691                 theBase Base shape to be extruded.
3692                 theDX, theDY, theDZ Directions of extrusion.
3693                 theScaleFactor Use it to make prism with scaled second base.
3694                                Nagative value means not scaled second base.
3695                 theName Object name; when specified, this parameter is used
3696                         for result publication in the study. Otherwise, if automatic
3697                         publication is switched on, default value is used for result name.
3698
3699             Returns:
3700                 New GEOM.GEOM_Object, containing the created prism.
3701             """
3702             # Example: see GEOM_TestAll.py
3703             anObj = None
3704             Parameters = ""
3705             if theScaleFactor > 0:
3706                 theDX,theDY,theDZ,theScaleFactor,Parameters = ParseParameters(theDX, theDY, theDZ, theScaleFactor)
3707                 anObj = self.PrimOp.MakePrismDXDYDZWithScaling(theBase, theDX, theDY, theDZ, theScaleFactor)
3708             else:
3709                 theDX,theDY,theDZ,Parameters = ParseParameters(theDX, theDY, theDZ)
3710                 anObj = self.PrimOp.MakePrismDXDYDZ(theBase, theDX, theDY, theDZ)
3711             RaiseIfFailed("MakePrismDXDYDZ", self.PrimOp)
3712             anObj.SetParameters(Parameters)
3713             self._autoPublish(anObj, theName, "prism")
3714             return anObj
3715
3716         ## Create a shape by extrusion of the base shape along the dx, dy, dz direction
3717         #  i.e. all the space, transfixed by the base shape during its translation
3718         #  along the vector on the given distance in 2 Ways (forward/backward).
3719         #  @param theBase Base shape to be extruded.
3720         #  @param theDX, theDY, theDZ Directions of extrusion.
3721         #  @param theName Object name; when specified, this parameter is used
3722         #         for result publication in the study. Otherwise, if automatic
3723         #         publication is switched on, default value is used for result name.
3724         #
3725         #  @return New GEOM.GEOM_Object, containing the created prism.
3726         #
3727         #  @ref tui_creation_prism "Example"
3728         @ManageTransactions("PrimOp")
3729         def MakePrismDXDYDZ2Ways(self, theBase, theDX, theDY, theDZ, theName=None):
3730             """
3731             Create a shape by extrusion of the base shape along the dx, dy, dz direction
3732             i.e. all the space, transfixed by the base shape during its translation
3733             along the vector on the given distance in 2 Ways (forward/backward).
3734
3735             Parameters:
3736                 theBase Base shape to be extruded.
3737                 theDX, theDY, theDZ Directions of extrusion.
3738                 theName Object name; when specified, this parameter is used
3739                         for result publication in the study. Otherwise, if automatic
3740                         publication is switched on, default value is used for result name.
3741
3742             Returns:
3743                 New GEOM.GEOM_Object, containing the created prism.
3744             """
3745             # Example: see GEOM_TestAll.py
3746             theDX,theDY,theDZ,Parameters = ParseParameters(theDX, theDY, theDZ)
3747             anObj = self.PrimOp.MakePrismDXDYDZ2Ways(theBase, theDX, theDY, theDZ)
3748             RaiseIfFailed("MakePrismDXDYDZ2Ways", self.PrimOp)
3749             anObj.SetParameters(Parameters)
3750             self._autoPublish(anObj, theName, "prism")
3751             return anObj
3752
3753         ## Create a shape by revolution of the base shape around the axis
3754         #  on the given angle, i.e. all the space, transfixed by the base
3755         #  shape during its rotation around the axis on the given angle.
3756         #  @param theBase Base shape to be rotated.
3757         #  @param theAxis Rotation axis.
3758         #  @param theAngle Rotation angle in radians.
3759         #  @param theName Object name; when specified, this parameter is used
3760         #         for result publication in the study. Otherwise, if automatic
3761         #         publication is switched on, default value is used for result name.
3762         #
3763         #  @return New GEOM.GEOM_Object, containing the created revolution.
3764         #
3765         #  @ref tui_creation_revolution "Example"
3766         @ManageTransactions("PrimOp")
3767         def MakeRevolution(self, theBase, theAxis, theAngle, theName=None):
3768             """
3769             Create a shape by revolution of the base shape around the axis
3770             on the given angle, i.e. all the space, transfixed by the base
3771             shape during its rotation around the axis on the given angle.
3772
3773             Parameters:
3774                 theBase Base shape to be rotated.
3775                 theAxis Rotation axis.
3776                 theAngle Rotation angle in radians.
3777                 theName Object name; when specified, this parameter is used
3778                         for result publication in the study. Otherwise, if automatic
3779                         publication is switched on, default value is used for result name.
3780
3781             Returns:
3782                 New GEOM.GEOM_Object, containing the created revolution.
3783             """
3784             # Example: see GEOM_TestAll.py
3785             theAngle,Parameters = ParseParameters(theAngle)
3786             anObj = self.PrimOp.MakeRevolutionAxisAngle(theBase, theAxis, theAngle)
3787             RaiseIfFailed("MakeRevolutionAxisAngle", self.PrimOp)
3788             anObj.SetParameters(Parameters)
3789             self._autoPublish(anObj, theName, "revolution")
3790             return anObj
3791
3792         ## Create a shape by revolution of the base shape around the axis
3793         #  on the given angle, i.e. all the space, transfixed by the base
3794         #  shape during its rotation around the axis on the given angle in
3795         #  both directions (forward/backward)
3796         #  @param theBase Base shape to be rotated.
3797         #  @param theAxis Rotation axis.
3798         #  @param theAngle Rotation angle in radians.
3799         #  @param theName Object name; when specified, this parameter is used
3800         #         for result publication in the study. Otherwise, if automatic
3801         #         publication is switched on, default value is used for result name.
3802         #
3803         #  @return New GEOM.GEOM_Object, containing the created revolution.
3804         #
3805         #  @ref tui_creation_revolution "Example"
3806         @ManageTransactions("PrimOp")
3807         def MakeRevolution2Ways(self, theBase, theAxis, theAngle, theName=None):
3808             """
3809             Create a shape by revolution of the base shape around the axis
3810             on the given angle, i.e. all the space, transfixed by the base
3811             shape during its rotation around the axis on the given angle in
3812             both directions (forward/backward).
3813
3814             Parameters:
3815                 theBase Base shape to be rotated.
3816                 theAxis Rotation axis.
3817                 theAngle Rotation angle in radians.
3818                 theName Object name; when specified, this parameter is used
3819                         for result publication in the study. Otherwise, if automatic
3820                         publication is switched on, default value is used for result name.
3821
3822             Returns:
3823                 New GEOM.GEOM_Object, containing the created revolution.
3824             """
3825             theAngle,Parameters = ParseParameters(theAngle)
3826             anObj = self.PrimOp.MakeRevolutionAxisAngle2Ways(theBase, theAxis, theAngle)
3827             RaiseIfFailed("MakeRevolutionAxisAngle2Ways", self.PrimOp)
3828             anObj.SetParameters(Parameters)
3829             self._autoPublish(anObj, theName, "revolution")
3830             return anObj
3831
3832         ## Create a face from a given set of contours.
3833         #  @param theContours either a list or a compound of edges/wires.
3834         #  @param theMinDeg a minimal degree of BSpline surface to create.
3835         #  @param theMaxDeg a maximal degree of BSpline surface to create.
3836         #  @param theTol2D a 2d tolerance to be reached.
3837         #  @param theTol3D a 3d tolerance to be reached.
3838         #  @param theNbIter a number of iteration of approximation algorithm.
3839         #  @param theMethod Kind of method to perform filling operation
3840         #         (see GEOM.filling_oper_method enum).
3841         #  @param isApprox if True, BSpline curves are generated in the process
3842         #                  of surface construction. By default it is False, that means
3843         #                  the surface is created using given curves. The usage of
3844         #                  Approximation makes the algorithm work slower, but allows
3845         #                  building the surface for rather complex cases.
3846         #  @param theName Object name; when specified, this parameter is used
3847         #         for result publication in the study. Otherwise, if automatic
3848         #         publication is switched on, default value is used for result name.
3849         #
3850         #  @return New GEOM.GEOM_Object (face), containing the created filling surface.
3851         #
3852         #  @ref tui_creation_filling "Example"
3853         @ManageTransactions("PrimOp")
3854         def MakeFilling(self, theContours, theMinDeg=2, theMaxDeg=5, theTol2D=0.0001,
3855                         theTol3D=0.0001, theNbIter=0, theMethod=GEOM.FOM_Default, isApprox=0, theName=None):
3856             """
3857             Create a face from a given set of contours.
3858
3859             Parameters:
3860                 theContours either a list or a compound of edges/wires.
3861                 theMinDeg a minimal degree of BSpline surface to create.
3862                 theMaxDeg a maximal degree of BSpline surface to create.
3863                 theTol2D a 2d tolerance to be reached.
3864                 theTol3D a 3d tolerance to be reached.
3865                 theNbIter a number of iteration of approximation algorithm.
3866                 theMethod Kind of method to perform filling operation
3867                           (see GEOM.filling_oper_method enum).
3868                 isApprox if True, BSpline curves are generated in the process
3869                          of surface construction. By default it is False, that means
3870                          the surface is created using given curves. The usage of
3871                          Approximation makes the algorithm work slower, but allows
3872                          building the surface for rather complex cases.
3873                 theName Object name; when specified, this parameter is used
3874                         for result publication in the study. Otherwise, if automatic
3875                         publication is switched on, default value is used for result name.
3876
3877             Returns:
3878                 New GEOM.GEOM_Object (face), containing the created filling surface.
3879
3880             Example of usage:
3881                 filling = geompy.MakeFilling(compound, 2, 5, 0.0001, 0.0001, 5)
3882             """
3883             # Example: see GEOM_TestAll.py
3884             theMinDeg,theMaxDeg,theTol2D,theTol3D,theNbIter,Parameters = ParseParameters(theMinDeg, theMaxDeg, theTol2D, theTol3D, theNbIter)
3885             anObj = self.PrimOp.MakeFilling(ToList(theContours), theMinDeg, theMaxDeg,
3886                                             theTol2D, theTol3D, theNbIter,
3887                                             theMethod, isApprox)
3888             RaiseIfFailed("MakeFilling", self.PrimOp)
3889             anObj.SetParameters(Parameters)
3890             self._autoPublish(anObj, theName, "filling")
3891             return anObj
3892
3893
3894         ## Create a face from a given set of contours.
3895         #  This method corresponds to MakeFilling() with isApprox=True.
3896         #  @param theContours either a list or a compound of edges/wires.
3897         #  @param theMinDeg a minimal degree of BSpline surface to create.
3898         #  @param theMaxDeg a maximal degree of BSpline surface to create.
3899         #  @param theTol3D a 3d tolerance to be reached.
3900         #  @param theName Object name; when specified, this parameter is used
3901         #         for result publication in the study. Otherwise, if automatic
3902         #         publication is switched on, default value is used for result name.
3903         #
3904         #  @return New GEOM.GEOM_Object (face), containing the created filling surface.
3905         #
3906         #  @ref tui_creation_filling "Example"
3907         @ManageTransactions("PrimOp")
3908         def MakeFillingNew(self, theContours, theMinDeg=2, theMaxDeg=5, theTol3D=0.0001, theName=None):
3909             """
3910             Create a filling from the given compound of contours.
3911             This method corresponds to MakeFilling() with isApprox=True.
3912
3913             Parameters:
3914                 theContours either a list or a compound of edges/wires.
3915                 theMinDeg a minimal degree of BSpline surface to create.
3916                 theMaxDeg a maximal degree of BSpline surface to create.
3917                 theTol3D a 3d tolerance to be reached.
3918                 theName Object name; when specified, this parameter is used
3919                         for result publication in the study. Otherwise, if automatic
3920                         publication is switched on, default value is used for result name.
3921
3922             Returns:
3923                 New GEOM.GEOM_Object (face), containing the created filling surface.
3924
3925             Example of usage:
3926                 filling = geompy.MakeFillingNew(compound, 2, 5, 0.0001)
3927             """
3928             # Example: see GEOM_TestAll.py
3929             theMinDeg,theMaxDeg,theTol3D,Parameters = ParseParameters(theMinDeg, theMaxDeg, theTol3D)
3930             anObj = self.PrimOp.MakeFilling(ToList(theContours), theMinDeg, theMaxDeg,
3931                                             0, theTol3D, 0, GEOM.FOM_Default, True)
3932             RaiseIfFailed("MakeFillingNew", self.PrimOp)
3933             anObj.SetParameters(Parameters)
3934             self._autoPublish(anObj, theName, "filling")
3935             return anObj
3936
3937         ## Create a shell or solid passing through set of sections.Sections should be wires,edges or vertices.
3938         #  @param theSeqSections - set of specified sections.
3939         #  @param theModeSolid - mode defining building solid or shell
3940         #  @param thePreci - precision 3D used for smoothing
3941         #  @param theRuled - mode defining type of the result surfaces (ruled or smoothed).
3942         #  @param theName Object name; when specified, this parameter is used
3943         #         for result publication in the study. Otherwise, if automatic
3944         #         publication is switched on, default value is used for result name.
3945         #
3946         #  @return New GEOM.GEOM_Object, containing the created shell or solid.
3947         #
3948         #  @ref swig_todo "Example"
3949         @ManageTransactions("PrimOp")
3950         def MakeThruSections(self, theSeqSections, theModeSolid, thePreci, theRuled, theName=None):
3951             """
3952             Create a shell or solid passing through set of sections.Sections should be wires,edges or vertices.
3953
3954             Parameters:
3955                 theSeqSections - set of specified sections.
3956                 theModeSolid - mode defining building solid or shell
3957                 thePreci - precision 3D used for smoothing
3958                 theRuled - mode defining type of the result surfaces (ruled or smoothed).
3959                 theName Object name; when specified, this parameter is used
3960                         for result publication in the study. Otherwise, if automatic
3961                         publication is switched on, default value is used for result name.
3962
3963             Returns:
3964                 New GEOM.GEOM_Object, containing the created shell or solid.
3965             """
3966             # Example: see GEOM_TestAll.py
3967             anObj = self.PrimOp.MakeThruSections(theSeqSections,theModeSolid,thePreci,theRuled)
3968             RaiseIfFailed("MakeThruSections", self.PrimOp)
3969             self._autoPublish(anObj, theName, "filling")
3970             return anObj
3971
3972         ## Create a shape by extrusion of the base shape along
3973         #  the path shape. The path shape can be a wire or an edge. It is
3974         #  possible to generate groups along with the result by means of
3975         #  setting the flag \a IsGenerateGroups.<BR>
3976         #  If \a thePath is a closed edge or wire and \a IsGenerateGroups is
3977         #  set, an error is occurred. If \a thePath is not closed edge/wire,
3978         #  the following groups are returned:
3979         #  - If \a theBase is unclosed edge or wire: "Down", "Up", "Side1",
3980         #    "Side2";
3981         #  - If \a theBase is closed edge or wire, face or shell: "Down", "Up",
3982         #    "Other".
3983         #  .
3984         #  "Down" and "Up" groups contain:
3985         #  - Edges if \a theBase is edge or wire;
3986         #  - Faces if \a theBase is face or shell.<BR>
3987         #  .
3988         #  "Side1" and "Side2" groups contain edges generated from the first
3989         #  and last vertices of \a theBase. The first and last vertices are
3990         #  determined taking into account edge/wire orientation.<BR>
3991         #  "Other" group represents faces generated from the bounding edges of
3992         #  \a theBase.
3993         #
3994         #  @param theBase Base shape to be extruded.
3995         #  @param thePath Path shape to extrude the base shape along it.
3996         #  @param IsGenerateGroups flag that tells if it is necessary to
3997         #         create groups. It is equal to False by default.
3998         #  @param theName Object name; when specified, this parameter is used
3999         #         for result publication in the study. Otherwise, if automatic
4000         #         publication is switched on, default value is used for result name.
4001         #
4002         #  @return New GEOM.GEOM_Object, containing the created pipe if 
4003         #          \a IsGenerateGroups is not set. Otherwise it returns a
4004         #          list of GEOM.GEOM_Object. Its first element is the created pipe, the
4005         #          remaining ones are created groups.
4006         #
4007         #  @ref tui_creation_pipe "Example"
4008         @ManageTransactions("PrimOp")
4009         def MakePipe(self, theBase, thePath,
4010                      IsGenerateGroups=False, theName=None):
4011             """
4012             Create a shape by extrusion of the base shape along
4013             the path shape. The path shape can be a wire or an edge. It is
4014             possible to generate groups along with the result by means of
4015             setting the flag IsGenerateGroups.
4016             If thePath is a closed edge or wire and IsGenerateGroups is
4017             set, an error is occurred. If thePath is not closed edge/wire,
4018             the following groups are returned:
4019             - If theBase is unclosed edge or wire: "Down", "Up", "Side1",
4020               "Side2";
4021             - If theBase is closed edge or wire, face or shell: "Down", "Up",
4022               "Other".
4023             "Down" and "Up" groups contain:
4024             - Edges if theBase is edge or wire;
4025             - Faces if theBase is face or shell.
4026             "Side1" and "Side2" groups contain edges generated from the first
4027             and last vertices of theBase. The first and last vertices are
4028             determined taking into account edge/wire orientation.
4029             "Other" group represents faces generated from the bounding edges of
4030             theBase.
4031
4032             Parameters:
4033                 theBase Base shape to be extruded.
4034                 thePath Path shape to extrude the base shape along it.
4035                 IsGenerateGroups flag that tells if it is necessary to
4036                         create groups. It is equal to False by default.
4037                 theName Object name; when specified, this parameter is used
4038                         for result publication in the study. Otherwise, if automatic
4039                         publication is switched on, default value is used for result name.
4040
4041             Returns:
4042                 New GEOM.GEOM_Object, containing the created pipe if 
4043                 IsGenerateGroups is not set. Otherwise it returns a
4044                 list of GEOM.GEOM_Object. Its first element is the created pipe, the
4045                 remaining ones are created groups.
4046             """
4047             # Example: see GEOM_TestAll.py
4048             aList = self.PrimOp.MakePipe(theBase, thePath, IsGenerateGroups)
4049             RaiseIfFailed("MakePipe", self.PrimOp)
4050
4051             if IsGenerateGroups:
4052               self._autoPublish(aList, theName, "pipe")
4053               return aList
4054
4055             self._autoPublish(aList[0], theName, "pipe")
4056             return aList[0]
4057
4058         ## Create a shape by extrusion of the profile shape along
4059         #  the path shape. The path shape can be a wire or an edge.
4060         #  the several profiles can be specified in the several locations of path.
4061         #  It is possible to generate groups along with the result by means of
4062         #  setting the flag \a IsGenerateGroups. For detailed information on
4063         #  groups that can be created please see the method MakePipe().
4064         #  @param theSeqBases - list of  Bases shape to be extruded.
4065         #  @param theLocations - list of locations on the path corresponding
4066         #                        specified list of the Bases shapes. Number of locations
4067         #                        should be equal to number of bases or list of locations can be empty.
4068         #  @param thePath - Path shape to extrude the base shape along it.
4069         #  @param theWithContact - the mode defining that the section is translated to be in
4070         #                          contact with the spine.
4071         #  @param theWithCorrection - defining that the section is rotated to be
4072         #                             orthogonal to the spine tangent in the correspondent point
4073         #  @param IsGenerateGroups - flag that tells if it is necessary to
4074         #                          create groups. It is equal to False by default.
4075         #  @param theName Object name; when specified, this parameter is used
4076         #         for result publication in the study. Otherwise, if automatic
4077         #         publication is switched on, default value is used for result name.
4078         #
4079         #  @return New GEOM.GEOM_Object, containing the created pipe if 
4080         #          \a IsGenerateGroups is not set. Otherwise it returns new
4081         #          GEOM.ListOfGO. Its first element is the created pipe, the
4082         #          remaining ones are created groups.
4083         #
4084         #  @ref tui_creation_pipe_with_diff_sec "Example"
4085         @ManageTransactions("PrimOp")
4086         def MakePipeWithDifferentSections(self, theSeqBases,
4087                                           theLocations, thePath,
4088                                           theWithContact, theWithCorrection,
4089                                           IsGenerateGroups=False, theName=None):
4090             """
4091             Create a shape by extrusion of the profile shape along
4092             the path shape. The path shape can be a wire or an edge.
4093             the several profiles can be specified in the several locations of path.
4094             It is possible to generate groups along with the result by means of
4095             setting the flag IsGenerateGroups. For detailed information on
4096             groups that can be created please see the method geompy.MakePipe().
4097
4098             Parameters:
4099                 theSeqBases - list of  Bases shape to be extruded.
4100                 theLocations - list of locations on the path corresponding
4101                                specified list of the Bases shapes. Number of locations
4102                                should be equal to number of bases or list of locations can be empty.
4103                 thePath - Path shape to extrude the base shape along it.
4104                 theWithContact - the mode defining that the section is translated to be in
4105                                  contact with the spine(0/1)
4106                 theWithCorrection - defining that the section is rotated to be
4107                                     orthogonal to the spine tangent in the correspondent point (0/1)
4108                 IsGenerateGroups - flag that tells if it is necessary to
4109                                  create groups. It is equal to False by default.
4110                 theName Object name; when specified, this parameter is used
4111                         for result publication in the study. Otherwise, if automatic
4112                         publication is switched on, default value is used for result name.
4113
4114             Returns:
4115                 New GEOM.GEOM_Object, containing the created pipe if 
4116                 IsGenerateGroups is not set. Otherwise it returns new
4117                 GEOM.ListOfGO. Its first element is the created pipe, the
4118                 remaining ones are created groups.
4119             """
4120             aList = self.PrimOp.MakePipeWithDifferentSections(theSeqBases,
4121                                                               theLocations, thePath,
4122                                                               theWithContact, theWithCorrection,
4123                                                               False, IsGenerateGroups)
4124             RaiseIfFailed("MakePipeWithDifferentSections", self.PrimOp)
4125
4126             if IsGenerateGroups:
4127               self._autoPublish(aList, theName, "pipe")
4128               return aList
4129
4130             self._autoPublish(aList[0], theName, "pipe")
4131             return aList[0]
4132
4133         ## Create a shape by extrusion of the profile shape along
4134         #  the path shape. This function is a version of
4135         #  MakePipeWithDifferentSections() with the same parameters, except
4136         #  eliminated theWithContact and theWithCorrection. So it is
4137         #  possible to find the description of all parameters is in this
4138         #  method. The difference is that this method performs the operation
4139         #  step by step, i.e. it creates pipes between each pair of neighbor
4140         #  sections and fuses them into a single shape.
4141         #
4142         #  @ref tui_creation_pipe_with_diff_sec "Example"
4143         @ManageTransactions("PrimOp")
4144         def MakePipeWithDifferentSectionsBySteps(self, theSeqBases,
4145                                                  theLocations, thePath,
4146                                                  IsGenerateGroups=False, theName=None):
4147             """
4148             Create a shape by extrusion of the profile shape along
4149             the path shape. This function is a version of
4150             MakePipeWithDifferentSections() with the same parameters, except
4151             eliminated theWithContact and theWithCorrection. So it is
4152             possible to find the description of all parameters is in this
4153             method. The difference is that this method performs the operation
4154             step by step, i.e. it creates pipes between each pair of neighbor
4155             sections and fuses them into a single shape.
4156             """
4157             aList = self.PrimOp.MakePipeWithDifferentSections(theSeqBases,
4158                                                               theLocations, thePath,
4159                                                               False, False,
4160                                                               True, IsGenerateGroups)
4161             RaiseIfFailed("MakePipeWithDifferentSectionsBySteps", self.PrimOp)
4162
4163             if IsGenerateGroups:
4164               self._autoPublish(aList, theName, "pipe")
4165               return aList
4166
4167             self._autoPublish(aList[0], theName, "pipe")
4168             return aList[0]
4169
4170         ## Create a shape by extrusion of the profile shape along
4171         #  the path shape. The path shape can be a wire or an edge.
4172         #  the several profiles can be specified in the several locations of path.
4173         #  It is possible to generate groups along with the result by means of
4174         #  setting the flag \a IsGenerateGroups. For detailed information on
4175         #  groups that can be created please see the method MakePipe().
4176         #  @param theSeqBases - list of  Bases shape to be extruded. Base shape must be
4177         #                       shell or face. If number of faces in neighbour sections
4178         #                       aren't coincided result solid between such sections will
4179         #                       be created using external boundaries of this shells.
4180         #  @param theSeqSubBases - list of corresponding sub-shapes of section shapes.
4181         #                          This list is used for searching correspondences between
4182         #                          faces in the sections. Size of this list must be equal
4183         #                          to size of list of base shapes.
4184         #  @param theLocations - list of locations on the path corresponding
4185         #                        specified list of the Bases shapes. Number of locations
4186         #                        should be equal to number of bases. First and last
4187         #                        locations must be coincided with first and last vertexes
4188         #                        of path correspondingly.
4189         #  @param thePath - Path shape to extrude the base shape along it.
4190         #  @param theWithContact - the mode defining that the section is translated to be in
4191         #                          contact with the spine.
4192         #  @param theWithCorrection - defining that the section is rotated to be
4193         #                             orthogonal to the spine tangent in the correspondent point
4194         #  @param IsGenerateGroups - flag that tells if it is necessary to
4195         #                          create groups. It is equal to False by default.
4196         #  @param theName Object name; when specified, this parameter is used
4197         #         for result publication in the study. Otherwise, if automatic
4198         #         publication is switched on, default value is used for result name.
4199         #
4200         #  @return New GEOM.GEOM_Object, containing the created solids if 
4201         #          \a IsGenerateGroups is not set. Otherwise it returns new
4202         #          GEOM.ListOfGO. Its first element is the created solids, the
4203         #          remaining ones are created groups.
4204         #
4205         #  @ref tui_creation_pipe_with_shell_sec "Example"
4206         @ManageTransactions("PrimOp")
4207         def MakePipeWithShellSections(self, theSeqBases, theSeqSubBases,
4208                                       theLocations, thePath,
4209                                       theWithContact, theWithCorrection,
4210                                       IsGenerateGroups=False, theName=None):
4211             """
4212             Create a shape by extrusion of the profile shape along
4213             the path shape. The path shape can be a wire or an edge.
4214             the several profiles can be specified in the several locations of path.
4215             It is possible to generate groups along with the result by means of
4216             setting the flag IsGenerateGroups. For detailed information on
4217             groups that can be created please see the method geompy.MakePipe().
4218
4219             Parameters:
4220                 theSeqBases - list of  Bases shape to be extruded. Base shape must be
4221                               shell or face. If number of faces in neighbour sections
4222                               aren't coincided result solid between such sections will
4223                               be created using external boundaries of this shells.
4224                 theSeqSubBases - list of corresponding sub-shapes of section shapes.
4225                                  This list is used for searching correspondences between
4226                                  faces in the sections. Size of this list must be equal
4227                                  to size of list of base shapes.
4228                 theLocations - list of locations on the path corresponding
4229                                specified list of the Bases shapes. Number of locations
4230                                should be equal to number of bases. First and last
4231                                locations must be coincided with first and last vertexes
4232                                of path correspondingly.
4233                 thePath - Path shape to extrude the base shape along it.
4234                 theWithContact - the mode defining that the section is translated to be in
4235                                  contact with the spine (0/1)
4236                 theWithCorrection - defining that the section is rotated to be
4237                                     orthogonal to the spine tangent in the correspondent point (0/1)
4238                 IsGenerateGroups - flag that tells if it is necessary to
4239                                  create groups. It is equal to False by default.
4240                 theName Object name; when specified, this parameter is used
4241                         for result publication in the study. Otherwise, if automatic
4242                         publication is switched on, default value is used for result name.
4243
4244             Returns:
4245                 New GEOM.GEOM_Object, containing the created solids if 
4246                 IsGenerateGroups is not set. Otherwise it returns new
4247                 GEOM.ListOfGO. Its first element is the created solids, the
4248                 remaining ones are created groups.
4249             """
4250             aList = self.PrimOp.MakePipeWithShellSections(theSeqBases, theSeqSubBases,
4251                                                           theLocations, thePath,
4252                                                           theWithContact, theWithCorrection,
4253                                                           IsGenerateGroups)
4254             RaiseIfFailed("MakePipeWithShellSections", self.PrimOp)
4255
4256             if IsGenerateGroups:
4257               self._autoPublish(aList, theName, "pipe")
4258               return aList
4259
4260             self._autoPublish(aList[0], theName, "pipe")
4261             return aList[0]
4262
4263         ## Create a shape by extrusion of the profile shape along
4264         #  the path shape. This function is used only for debug pipe
4265         #  functionality - it is a version of function MakePipeWithShellSections()
4266         #  which give a possibility to receive information about
4267         #  creating pipe between each pair of sections step by step.
4268         @ManageTransactions("PrimOp")
4269         def MakePipeWithShellSectionsBySteps(self, theSeqBases, theSeqSubBases,
4270                                              theLocations, thePath,
4271                                              theWithContact, theWithCorrection,
4272                                              IsGenerateGroups=False, theName=None):
4273             """
4274             Create a shape by extrusion of the profile shape along
4275             the path shape. This function is used only for debug pipe
4276             functionality - it is a version of previous function
4277             geompy.MakePipeWithShellSections() which give a possibility to
4278             receive information about creating pipe between each pair of
4279             sections step by step.
4280             """
4281             res = []
4282             nbsect = len(theSeqBases)
4283             nbsubsect = len(theSeqSubBases)
4284             #print "nbsect = ",nbsect
4285             for i in range(1,nbsect):
4286                 #print "  i = ",i
4287                 tmpSeqBases = [ theSeqBases[i-1], theSeqBases[i] ]
4288                 tmpLocations = [ theLocations[i-1], theLocations[i] ]
4289                 tmpSeqSubBases = []
4290                 if nbsubsect>0: tmpSeqSubBases = [ theSeqSubBases[i-1], theSeqSubBases[i] ]
4291                 aList = self.PrimOp.MakePipeWithShellSections(tmpSeqBases, tmpSeqSubBases,
4292                                                               tmpLocations, thePath,
4293                                                               theWithContact, theWithCorrection,
4294                                                               IsGenerateGroups)
4295                 if self.PrimOp.IsDone() == 0:
4296                     print("Problems with pipe creation between ",i," and ",i+1," sections")
4297                     RaiseIfFailed("MakePipeWithShellSections", self.PrimOp)
4298                     break
4299                 else:
4300                     print("Pipe between ",i," and ",i+1," sections is OK")
4301                     res.append(aList[0])
4302                     pass
4303                 pass
4304
4305             resc = self.MakeCompound(res)
4306             #resc = self.MakeSewing(res, 0.001)
4307             #print "resc: ",resc
4308             self._autoPublish(resc, theName, "pipe")
4309             return resc
4310
4311         ## Create solids between given sections.
4312         #  It is possible to generate groups along with the result by means of
4313         #  setting the flag \a IsGenerateGroups. For detailed information on
4314         #  groups that can be created please see the method MakePipe().
4315         #  @param theSeqBases - list of sections (shell or face).
4316         #  @param theLocations - list of corresponding vertexes
4317         #  @param IsGenerateGroups - flag that tells if it is necessary to
4318         #         create groups. It is equal to False by default.
4319         #  @param theName Object name; when specified, this parameter is used
4320         #         for result publication in the study. Otherwise, if automatic
4321         #         publication is switched on, default value is used for result name.
4322         #
4323         #  @return New GEOM.GEOM_Object, containing the created solids if 
4324         #          \a IsGenerateGroups is not set. Otherwise it returns new
4325         #          GEOM.ListOfGO. Its first element is the created solids, the
4326         #          remaining ones are created groups.
4327         #
4328         #  @ref tui_creation_pipe_without_path "Example"
4329         @ManageTransactions("PrimOp")
4330         def MakePipeShellsWithoutPath(self, theSeqBases, theLocations,
4331                                       IsGenerateGroups=False, theName=None):
4332             """
4333             Create solids between given sections.
4334             It is possible to generate groups along with the result by means of
4335             setting the flag IsGenerateGroups. For detailed information on
4336             groups that can be created please see the method geompy.MakePipe().
4337
4338             Parameters:
4339                 theSeqBases - list of sections (shell or face).
4340                 theLocations - list of corresponding vertexes
4341                 IsGenerateGroups - flag that tells if it is necessary to
4342                                  create groups. It is equal to False by default.
4343                 theName Object name; when specified, this parameter is used
4344                         for result publication in the study. Otherwise, if automatic
4345                         publication is switched on, default value is used for result name.
4346
4347             Returns:
4348                 New GEOM.GEOM_Object, containing the created solids if 
4349                 IsGenerateGroups is not set. Otherwise it returns new
4350                 GEOM.ListOfGO. Its first element is the created solids, the
4351                 remaining ones are created groups.
4352             """
4353             aList = self.PrimOp.MakePipeShellsWithoutPath(theSeqBases, theLocations,
4354                                                           IsGenerateGroups)
4355             RaiseIfFailed("MakePipeShellsWithoutPath", self.PrimOp)
4356
4357             if IsGenerateGroups:
4358               self._autoPublish(aList, theName, "pipe")
4359               return aList
4360
4361             self._autoPublish(aList[0], theName, "pipe")
4362             return aList[0]
4363
4364         ## Create a shape by extrusion of the base shape along
4365         #  the path shape with constant bi-normal direction along the given vector.
4366         #  The path shape can be a wire or an edge.
4367         #  It is possible to generate groups along with the result by means of
4368         #  setting the flag \a IsGenerateGroups. For detailed information on
4369         #  groups that can be created please see the method MakePipe().
4370         #  @param theBase Base shape to be extruded.
4371         #  @param thePath Path shape to extrude the base shape along it.
4372         #  @param theVec Vector defines a constant binormal direction to keep the
4373         #                same angle between the direction and the sections
4374         #                along the sweep surface.
4375         #  @param IsGenerateGroups flag that tells if it is necessary to
4376         #         create groups. It is equal to False by default.
4377         #  @param theName Object name; when specified, this parameter is used
4378         #         for result publication in the study. Otherwise, if automatic
4379         #         publication is switched on, default value is used for result name.
4380         #
4381         #  @return New GEOM.GEOM_Object, containing the created pipe if 
4382         #          \a IsGenerateGroups is not set. Otherwise it returns new
4383         #          GEOM.ListOfGO. Its first element is the created pipe, the
4384         #          remaining ones are created groups.
4385         #
4386         #  @ref tui_creation_pipe "Example"
4387         @ManageTransactions("PrimOp")
4388         def MakePipeBiNormalAlongVector(self, theBase, thePath, theVec,
4389                                         IsGenerateGroups=False, theName=None):
4390             """
4391             Create a shape by extrusion of the base shape along
4392             the path shape with constant bi-normal direction along the given vector.
4393             The path shape can be a wire or an edge.
4394             It is possible to generate groups along with the result by means of
4395             setting the flag IsGenerateGroups. For detailed information on
4396             groups that can be created please see the method geompy.MakePipe().
4397
4398             Parameters:
4399                 theBase Base shape to be extruded.
4400                 thePath Path shape to extrude the base shape along it.
4401                 theVec Vector defines a constant binormal direction to keep the
4402                        same angle between the direction and the sections
4403                        along the sweep surface.
4404                 IsGenerateGroups flag that tells if it is necessary to
4405                                  create groups. It is equal to False by default.
4406                 theName Object name; when specified, this parameter is used
4407                         for result publication in the study. Otherwise, if automatic
4408                         publication is switched on, default value is used for result name.
4409
4410             Returns:
4411                 New GEOM.GEOM_Object, containing the created pipe if 
4412                 IsGenerateGroups is not set. Otherwise it returns new
4413                 GEOM.ListOfGO. Its first element is the created pipe, the
4414                 remaining ones are created groups.
4415             """
4416             # Example: see GEOM_TestAll.py
4417             aList = self.PrimOp.MakePipeBiNormalAlongVector(theBase, thePath,
4418                           theVec, IsGenerateGroups)
4419             RaiseIfFailed("MakePipeBiNormalAlongVector", self.PrimOp)
4420
4421             if IsGenerateGroups:
4422               self._autoPublish(aList, theName, "pipe")
4423               return aList
4424
4425             self._autoPublish(aList[0], theName, "pipe")
4426             return aList[0]
4427
4428         ## Makes a thick solid from a shape. If the input is a surface shape
4429         #  (face or shell) the result is a thick solid. If an input shape is
4430         #  a solid the result is a hollowed solid with removed faces.
4431         #  @param theShape Face or Shell to get thick solid or solid to get
4432         #         hollowed solid.
4433         #  @param theThickness Thickness of the resulting solid
4434         #  @param theFacesIDs the list of face IDs to be removed from the
4435         #         result. It is ignored if \a theShape is a face or a shell.
4436         #         It is empty by default. 
4437         #  @param theInside If true the thickness is applied towards inside
4438         #  @param theName Object name; when specified, this parameter is used
4439         #         for result publication in the study. Otherwise, if automatic
4440         #         publication is switched on, default value is used for result name.
4441         #
4442         #  @return New GEOM.GEOM_Object, containing the created solid
4443         #
4444         #  @ref tui_creation_thickness "Example"
4445         @ManageTransactions("PrimOp")
4446         def MakeThickSolid(self, theShape, theThickness,
4447                            theFacesIDs=[], theInside=False, theName=None):
4448             """
4449             Make a thick solid from a shape. If the input is a surface shape
4450             (face or shell) the result is a thick solid. If an input shape is
4451             a solid the result is a hollowed solid with removed faces.
4452
4453             Parameters:
4454                  theShape Face or Shell to get thick solid or solid to get
4455                           hollowed solid.
4456                  theThickness Thickness of the resulting solid
4457                  theFacesIDs the list of face IDs to be removed from the
4458                           result. It is ignored if theShape is a face or a
4459                           shell. It is empty by default. 
4460                  theInside If true the thickness is applied towards inside
4461                  theName Object name; when specified, this parameter is used
4462                          for result publication in the study. Otherwise, if automatic
4463                          publication is switched on, default value is used for result name.
4464
4465             Returns:
4466                 New GEOM.GEOM_Object, containing the created solid
4467             """
4468             # Example: see GEOM_TestAll.py
4469             theThickness,Parameters = ParseParameters(theThickness)
4470             anObj = self.PrimOp.MakeThickening(theShape, theFacesIDs,
4471                                                theThickness, True, theInside)
4472             RaiseIfFailed("MakeThickSolid", self.PrimOp)
4473             anObj.SetParameters(Parameters)
4474             self._autoPublish(anObj, theName, "thickSolid")
4475             return anObj
4476
4477
4478         ## Modifies a shape to make it a thick solid. If the input is a surface
4479         #  shape (face or shell) the result is a thick solid. If an input shape
4480         #  is a solid the result is a hollowed solid with removed faces.
4481         #  @param theShape Face or Shell to get thick solid or solid to get
4482         #         hollowed solid.
4483         #  @param theThickness Thickness of the resulting solid
4484         #  @param theFacesIDs the list of face IDs to be removed from the
4485         #         result. It is ignored if \a theShape is a face or a shell.
4486         #         It is empty by default. 
4487         #  @param theInside If true the thickness is applied towards inside
4488         #
4489         #  @return The modified shape
4490         #
4491         #  @ref tui_creation_thickness "Example"
4492         @ManageTransactions("PrimOp")
4493         def Thicken(self, theShape, theThickness, theFacesIDs=[], theInside=False):
4494             """
4495             Modifies a shape to make it a thick solid. If the input is a
4496             surface shape (face or shell) the result is a thick solid. If
4497             an input shape is a solid the result is a hollowed solid with
4498             removed faces.
4499
4500             Parameters:
4501                 theShape Face or Shell to get thick solid or solid to get
4502                          hollowed solid.
4503                 theThickness Thickness of the resulting solid
4504                 theFacesIDs the list of face IDs to be removed from the
4505                          result. It is ignored if \a theShape is a face or
4506                          a shell. It is empty by default. 
4507                 theInside If true the thickness is applied towards inside
4508
4509             Returns:
4510                 The modified shape
4511             """
4512             # Example: see GEOM_TestAll.py
4513             theThickness,Parameters = ParseParameters(theThickness)
4514             anObj = self.PrimOp.MakeThickening(theShape, theFacesIDs,
4515                                                theThickness, False, theInside)
4516             RaiseIfFailed("Thicken", self.PrimOp)
4517             anObj.SetParameters(Parameters)
4518             return anObj
4519
4520         ## Build a middle path of a pipe-like shape.
4521         #  The path shape can be a wire or an edge.
4522         #  @param theShape It can be closed or unclosed pipe-like shell
4523         #                  or a pipe-like solid.
4524         #  @param theBase1, theBase2 Two bases of the supposed pipe. This
4525         #                            should be wires or faces of theShape.
4526         #  @param theName Object name; when specified, this parameter is used
4527         #         for result publication in the study. Otherwise, if automatic
4528         #         publication is switched on, default value is used for result name.
4529         #
4530         #  @note It is not assumed that exact or approximate copy of theShape
4531         #        can be obtained by applying existing Pipe operation on the
4532         #        resulting "Path" wire taking theBase1 as the base - it is not
4533         #        always possible; though in some particular cases it might work
4534         #        it is not guaranteed. Thus, RestorePath function should not be
4535         #        considered as an exact reverse operation of the Pipe.
4536         #
4537         #  @return New GEOM.GEOM_Object, containing an edge or wire that represent
4538         #                                source pipe's "path".
4539         #
4540         #  @ref tui_creation_pipe_path "Example"
4541         @ManageTransactions("PrimOp")
4542         def RestorePath (self, theShape, theBase1, theBase2, theName=None):
4543             """
4544             Build a middle path of a pipe-like shape.
4545             The path shape can be a wire or an edge.
4546
4547             Parameters:
4548                 theShape It can be closed or unclosed pipe-like shell
4549                          or a pipe-like solid.
4550                 theBase1, theBase2 Two bases of the supposed pipe. This
4551                                    should be wires or faces of theShape.
4552                 theName Object name; when specified, this parameter is used
4553                         for result publication in the study. Otherwise, if automatic
4554                         publication is switched on, default value is used for result name.
4555
4556             Returns:
4557                 New GEOM_Object, containing an edge or wire that represent
4558                                  source pipe's path.
4559             """
4560             anObj = self.PrimOp.RestorePath(theShape, theBase1, theBase2)
4561             RaiseIfFailed("RestorePath", self.PrimOp)
4562             self._autoPublish(anObj, theName, "path")
4563             return anObj
4564
4565         ## Build a middle path of a pipe-like shape.
4566         #  The path shape can be a wire or an edge.
4567         #  @param theShape It can be closed or unclosed pipe-like shell
4568         #                  or a pipe-like solid.
4569         #  @param listEdges1, listEdges2 Two bases of the supposed pipe. This
4570         #                                should be lists of edges of theShape.
4571         #  @param theName Object name; when specified, this parameter is used
4572         #         for result publication in the study. Otherwise, if automatic
4573         #         publication is switched on, default value is used for result name.
4574         #
4575         #  @note It is not assumed that exact or approximate copy of theShape
4576         #        can be obtained by applying existing Pipe operation on the
4577         #        resulting "Path" wire taking theBase1 as the base - it is not
4578         #        always possible; though in some particular cases it might work
4579         #        it is not guaranteed. Thus, RestorePath function should not be
4580         #        considered as an exact reverse operation of the Pipe.
4581         #
4582         #  @return New GEOM.GEOM_Object, containing an edge or wire that represent
4583         #                                source pipe's "path".
4584         #
4585         #  @ref tui_creation_pipe_path "Example"
4586         @ManageTransactions("PrimOp")
4587         def RestorePathEdges (self, theShape, listEdges1, listEdges2, theName=None):
4588             """
4589             Build a middle path of a pipe-like shape.
4590             The path shape can be a wire or an edge.
4591
4592             Parameters:
4593                 theShape It can be closed or unclosed pipe-like shell
4594                          or a pipe-like solid.
4595                 listEdges1, listEdges2 Two bases of the supposed pipe. This
4596                                        should be lists of edges of theShape.
4597                 theName Object name; when specified, this parameter is used
4598                         for result publication in the study. Otherwise, if automatic
4599                         publication is switched on, default value is used for result name.
4600
4601             Returns:
4602                 New GEOM_Object, containing an edge or wire that represent
4603                                  source pipe's path.
4604             """
4605             anObj = self.PrimOp.RestorePathEdges(theShape, listEdges1, listEdges2)
4606             RaiseIfFailed("RestorePath", self.PrimOp)
4607             self._autoPublish(anObj, theName, "path")
4608             return anObj
4609
4610         # end of l3_complex
4611         ## @}
4612
4613         ## @addtogroup l3_basic_go
4614         ## @{
4615
4616         ## Create a linear edge with specified ends.
4617         #  @param thePnt1 Point for the first end of edge.
4618         #  @param thePnt2 Point for the second end of edge.
4619         #  @param theName Object name; when specified, this parameter is used
4620         #         for result publication in the study. Otherwise, if automatic
4621         #         publication is switched on, default value is used for result name.
4622         #
4623         #  @return New GEOM.GEOM_Object, containing the created edge.
4624         #
4625         #  @ref tui_creation_edge "Example"
4626         @ManageTransactions("ShapesOp")
4627         def MakeEdge(self, thePnt1, thePnt2, theName=None):
4628             """
4629             Create a linear edge with specified ends.
4630
4631             Parameters:
4632                 thePnt1 Point for the first end of edge.
4633                 thePnt2 Point for the second end of edge.
4634                 theName Object name; when specified, this parameter is used
4635                         for result publication in the study. Otherwise, if automatic
4636                         publication is switched on, default value is used for result name.
4637
4638             Returns:
4639                 New GEOM.GEOM_Object, containing the created edge.
4640             """
4641             # Example: see GEOM_TestAll.py
4642             anObj = self.ShapesOp.MakeEdge(thePnt1, thePnt2)
4643             RaiseIfFailed("MakeEdge", self.ShapesOp)
4644             self._autoPublish(anObj, theName, "edge")
4645             return anObj
4646
4647         ## Create a new edge, corresponding to the given length on the given curve.
4648         #  @param theRefCurve The referenced curve (edge).
4649         #  @param theLength Length on the referenced curve. It can be negative.
4650         #  @param theStartPoint Any point can be selected for it, the new edge will begin
4651         #                       at the end of \a theRefCurve, close to the selected point.
4652         #                       If None, start from the first point of \a theRefCurve.
4653         #  @param theName Object name; when specified, this parameter is used
4654         #         for result publication in the study. Otherwise, if automatic
4655         #         publication is switched on, default value is used for result name.
4656         #
4657         #  @return New GEOM.GEOM_Object, containing the created edge.
4658         #
4659         #  @ref tui_creation_edge "Example"
4660         @ManageTransactions("ShapesOp")
4661         def MakeEdgeOnCurveByLength(self, theRefCurve, theLength, theStartPoint = None, theName=None):
4662             """
4663             Create a new edge, corresponding to the given length on the given curve.
4664
4665             Parameters:
4666                 theRefCurve The referenced curve (edge).
4667                 theLength Length on the referenced curve. It can be negative.
4668                 theStartPoint Any point can be selected for it, the new edge will begin
4669                               at the end of theRefCurve, close to the selected point.
4670                               If None, start from the first point of theRefCurve.
4671                 theName Object name; when specified, this parameter is used
4672                         for result publication in the study. Otherwise, if automatic
4673                         publication is switched on, default value is used for result name.
4674
4675             Returns:
4676                 New GEOM.GEOM_Object, containing the created edge.
4677             """
4678             # Example: see GEOM_TestAll.py
4679             theLength, Parameters = ParseParameters(theLength)
4680             anObj = self.ShapesOp.MakeEdgeOnCurveByLength(theRefCurve, theLength, theStartPoint)
4681             RaiseIfFailed("MakeEdgeOnCurveByLength", self.ShapesOp)
4682             anObj.SetParameters(Parameters)
4683             self._autoPublish(anObj, theName, "edge")
4684             return anObj
4685
4686         ## Create an edge from specified wire.
4687         #  @param theWire source Wire
4688         #  @param theLinearTolerance linear tolerance value (default = 1e-07)
4689         #  @param theAngularTolerance angular tolerance value (default = 1e-12)
4690         #  @param theName Object name; when specified, this parameter is used
4691         #         for result publication in the study. Otherwise, if automatic
4692         #         publication is switched on, default value is used for result name.
4693         #
4694         #  @return New GEOM.GEOM_Object, containing the created edge.
4695         #
4696         #  @ref tui_creation_edge "Example"
4697         @ManageTransactions("ShapesOp")
4698         def MakeEdgeWire(self, theWire, theLinearTolerance = 1e-07, theAngularTolerance = 1e-12, theName=None):
4699             """
4700             Create an edge from specified wire.
4701
4702             Parameters:
4703                 theWire source Wire
4704                 theLinearTolerance linear tolerance value (default = 1e-07)
4705                 theAngularTolerance angular tolerance value (default = 1e-12)
4706                 theName Object name; when specified, this parameter is used
4707                         for result publication in the study. Otherwise, if automatic
4708                         publication is switched on, default value is used for result name.
4709
4710             Returns:
4711                 New GEOM.GEOM_Object, containing the created edge.
4712             """
4713             # Example: see GEOM_TestAll.py
4714             anObj = self.ShapesOp.MakeEdgeWire(theWire, theLinearTolerance, theAngularTolerance)
4715             RaiseIfFailed("MakeEdgeWire", self.ShapesOp)
4716             self._autoPublish(anObj, theName, "edge")
4717             return anObj
4718
4719         ## Create a wire from the set of edges and wires.
4720         #  @param theEdgesAndWires List of edges and/or wires.
4721         #  @param theTolerance Maximum distance between vertices, that will be merged.
4722         #                      Values less than 1e-07 are equivalent to 1e-07 (Precision::Confusion())
4723         #  @param theName Object name; when specified, this parameter is used
4724         #         for result publication in the study. Otherwise, if automatic
4725         #         publication is switched on, default value is used for result name.
4726         #
4727         #  @return New GEOM.GEOM_Object, containing the created wire.
4728         #
4729         #  @ref tui_creation_wire "Example"
4730         @ManageTransactions("ShapesOp")
4731         def MakeWire(self, theEdgesAndWires, theTolerance = 1e-07, theName=None):
4732             """
4733             Create a wire from the set of edges and wires.
4734
4735             Parameters:
4736                 theEdgesAndWires List of edges and/or wires.
4737                 theTolerance Maximum distance between vertices, that will be merged.
4738                              Values less than 1e-07 are equivalent to 1e-07 (Precision::Confusion()).
4739                 theName Object name; when specified, this parameter is used
4740                         for result publication in the study. Otherwise, if automatic
4741                         publication is switched on, default value is used for result name.
4742
4743             Returns:
4744                 New GEOM.GEOM_Object, containing the created wire.
4745             """
4746             # Example: see GEOM_TestAll.py
4747             anObj = self.ShapesOp.MakeWire(theEdgesAndWires, theTolerance)
4748             RaiseIfFailed("MakeWire", self.ShapesOp)
4749             self._autoPublish(anObj, theName, "wire")
4750             return anObj
4751
4752         ## Create a face on the given wire.
4753         #  @param theWire closed Wire or Edge to build the face on.
4754         #  @param isPlanarWanted If TRUE, the algorithm tries to build a planar face.
4755         #                        If the tolerance of the obtained planar face is less
4756         #                        than 1e-06, this face will be returned, otherwise the
4757         #                        algorithm tries to build any suitable face on the given
4758         #                        wire and prints a warning message.
4759         #  @param theName Object name; when specified, this parameter is used
4760         #         for result publication in the study. Otherwise, if automatic
4761         #         publication is switched on, default value is used for result name.
4762         #
4763         #  @return New GEOM.GEOM_Object, containing the created face (compound of faces).
4764         #
4765         #  @ref tui_creation_face "Example"
4766         @ManageTransactions("ShapesOp")
4767         def MakeFace(self, theWire, isPlanarWanted, theName=None, raiseException=False):
4768             """
4769             Create a face on the given wire.
4770
4771             Parameters:
4772                 theWire closed Wire or Edge to build the face on.
4773                 isPlanarWanted If TRUE, the algorithm tries to build a planar face.
4774                                If the tolerance of the obtained planar face is less
4775                                than 1e-06, this face will be returned, otherwise the
4776                                algorithm tries to build any suitable face on the given
4777                                wire and prints a warning message.
4778                 theName Object name; when specified, this parameter is used
4779                         for result publication in the study. Otherwise, if automatic
4780                         publication is switched on, default value is used for result name.
4781
4782             Returns:
4783                 New GEOM.GEOM_Object, containing the created face (compound of faces).
4784             """
4785             # Example: see GEOM_TestAll.py
4786             anObj = self.ShapesOp.MakeFace(theWire, isPlanarWanted)
4787             if isPlanarWanted and anObj is not None and self.ShapesOp.GetErrorCode() == "MAKE_FACE_TOLERANCE_TOO_BIG":
4788                 PrintOrRaise("WARNING: Cannot build a planar face: required tolerance is too big. Non-planar face is built.",raiseException)
4789             else:
4790                 RaiseIfFailed("MakeFace", self.ShapesOp)
4791             self._autoPublish(anObj, theName, "face")
4792             return anObj
4793
4794         ## Create a face on the given wires set.
4795         #  @param theWires List of closed wires or edges to build the face on.
4796         #  @param isPlanarWanted If TRUE, the algorithm tries to build a planar face.
4797         #                        If the tolerance of the obtained planar face is less
4798         #                        than 1e-06, this face will be returned, otherwise the
4799         #                        algorithm tries to build any suitable face on the given
4800         #                        wire and prints a warning message.
4801         #  @param theName Object name; when specified, this parameter is used
4802         #         for result publication in the study. Otherwise, if automatic
4803         #         publication is switched on, default value is used for result name.
4804         #
4805         #  @return New GEOM.GEOM_Object, containing the created face (compound of faces).
4806         #
4807         #  @ref tui_creation_face "Example"
4808         @ManageTransactions("ShapesOp")
4809         def MakeFaceWires(self, theWires, isPlanarWanted, theName=None, raiseException=False):
4810             """
4811             Create a face on the given wires set.
4812
4813             Parameters:
4814                 theWires List of closed wires or edges to build the face on.
4815                 isPlanarWanted If TRUE, the algorithm tries to build a planar face.
4816                                If the tolerance of the obtained planar face is less
4817                                than 1e-06, this face will be returned, otherwise the
4818                                algorithm tries to build any suitable face on the given
4819                                wire and prints a warning message.
4820                 theName Object name; when specified, this parameter is used
4821                         for result publication in the study. Otherwise, if automatic
4822                         publication is switched on, default value is used for result name.
4823
4824             Returns:
4825                 New GEOM.GEOM_Object, containing the created face (compound of faces).
4826             """
4827             # Example: see GEOM_TestAll.py
4828             anObj = self.ShapesOp.MakeFaceWires(ToList(theWires), isPlanarWanted)
4829             if isPlanarWanted and anObj is not None and self.ShapesOp.GetErrorCode() == "MAKE_FACE_TOLERANCE_TOO_BIG":
4830                 PrintOrRaise("WARNING: Cannot build a planar face: required tolerance is too big. Non-planar face is built.",raiseException)
4831             else:
4832                 RaiseIfFailed("MakeFaceWires", self.ShapesOp)
4833             self._autoPublish(anObj, theName, "face")
4834             return anObj
4835
4836         ## See MakeFaceWires() method for details.
4837         #
4838         #  @ref tui_creation_face "Example 1"
4839         #  \n @ref swig_MakeFaces  "Example 2"
4840         def MakeFaces(self, theWires, isPlanarWanted, theName=None):
4841             """
4842             See geompy.MakeFaceWires() method for details.
4843             """
4844             # Example: see GEOM_TestOthers.py
4845             # note: auto-publishing is done in self.MakeFaceWires()
4846             anObj = self.MakeFaceWires(theWires, isPlanarWanted, theName)
4847             return anObj
4848
4849         ## Create a face based on a surface from given face bounded
4850         #  by given wire.
4851         #  @param theFace the face whose surface is used to create a new face.
4852         #  @param theWire the wire that will bound a new face.
4853         #  @param theName Object name; when specified, this parameter is used
4854         #         for result publication in the study. Otherwise, if automatic
4855         #         publication is switched on, default value is used for result name.
4856         #
4857         #  @return New GEOM.GEOM_Object, containing the created face.
4858         #
4859         #  @ref tui_creation_face "Example"
4860         @ManageTransactions("ShapesOp")
4861         def MakeFaceFromSurface(self, theFace, theWire, theName=None):
4862             """
4863             Create a face based on a surface from given face bounded
4864             by given wire.
4865
4866             Parameters:
4867                 theFace the face whose surface is used to create a new face.
4868                 theWire the wire that will bound a new face.
4869                 theName Object name; when specified, this parameter is used
4870                         for result publication in the study. Otherwise, if automatic
4871                         publication is switched on, default value is used for result name.
4872
4873             Returns:
4874                 New GEOM.GEOM_Object, containing the created face.
4875             """
4876             # Example: see GEOM_TestAll.py
4877             anObj = self.ShapesOp.MakeFaceFromSurface(theFace, theWire)
4878             RaiseIfFailed("MakeFaceFromSurface", self.ShapesOp)
4879             self._autoPublish(anObj, theName, "face")
4880             return anObj
4881           
4882         ## Create a face from a set of edges with the given constraints.
4883         #  @param theConstraints List of edges and constraint faces (as a sequence of a Edge + Face couples):
4884         #         - edges should form a closed wire;
4885         #         - for each edge, constraint face is optional: if a constraint face is missing
4886         #           for some edge, this means that there no constraint associated with this edge.
4887         #  @param theName Object name; when specified, this parameter is used
4888         #         for result publication in the study. Otherwise, if automatic
4889         #         publication is switched on, default value is used for result name.
4890         # 
4891         # @return New GEOM.GEOM_Object, containing the created face.
4892         # 
4893         # @ref tui_creation_face "Example"
4894         @ManageTransactions("ShapesOp")
4895         def MakeFaceWithConstraints(self, theConstraints, theName=None):
4896             """
4897             Create a face from a set of edges with the given constraints.
4898
4899             Parameters:
4900                 theConstraints List of edges and constraint faces (as a sequence of a Edge + Face couples):
4901                         - edges should form a closed wire;
4902                         - for each edge, constraint face is optional: if a constraint face is missing
4903                           for some edge, this means that there no constraint associated with this edge.
4904                 theName Object name; when specified, this parameter is used
4905                         for result publication in the study. Otherwise, if automatic
4906                         publication is switched on, default value is used for result name.
4907
4908             Returns:
4909                 New GEOM.GEOM_Object, containing the created face.
4910             """
4911             # Example: see GEOM_TestAll.py
4912             anObj = self.ShapesOp.MakeFaceWithConstraints(theConstraints)
4913             if anObj is None:
4914                 RaiseIfFailed("MakeFaceWithConstraints", self.ShapesOp)
4915             self._autoPublish(anObj, theName, "face")
4916             return anObj
4917
4918         ## Create a shell from the set of faces, shells and/or compounds of faces.
4919         #  @param theFacesAndShells List of faces, shells and/or compounds of faces.
4920         #  @param theName Object name; when specified, this parameter is used
4921         #         for result publication in the study. Otherwise, if automatic
4922         #         publication is switched on, default value is used for result name.
4923         #
4924         #  @return New GEOM.GEOM_Object, containing the created shell (compound of shells).
4925         #
4926         #  @ref tui_creation_shell "Example"
4927         @ManageTransactions("ShapesOp")
4928         def MakeShell(self, theFacesAndShells, theName=None):
4929             """
4930             Create a shell from the set of faces and shells.
4931
4932             Parameters:
4933                 theFacesAndShells List of faces and/or shells.
4934                 theName Object name; when specified, this parameter is used
4935                         for result publication in the study. Otherwise, if automatic
4936                         publication is switched on, default value is used for result name.
4937
4938             Returns:
4939                 New GEOM.GEOM_Object, containing the created shell (compound of shells).
4940             """
4941             # Example: see GEOM_TestAll.py
4942             anObj = self.ShapesOp.MakeShell( ToList( theFacesAndShells ))
4943             RaiseIfFailed("MakeShell", self.ShapesOp)
4944             self._autoPublish(anObj, theName, "shell")
4945             return anObj
4946
4947         ## Create a solid, bounded by the given shells.
4948         #  @param theShells Sequence of bounding shells.
4949         #  @param theName Object name; when specified, this parameter is used
4950         #         for result publication in the study. Otherwise, if automatic
4951         #         publication is switched on, default value is used for result name.
4952         #
4953         #  @return New GEOM.GEOM_Object, containing the created solid.
4954         #
4955         #  @ref tui_creation_solid "Example"
4956         @ManageTransactions("ShapesOp")
4957         def MakeSolid(self, theShells, theName=None):
4958             """
4959             Create a solid, bounded by the given shells.
4960
4961             Parameters:
4962                 theShells Sequence of bounding shells.
4963                 theName Object name; when specified, this parameter is used
4964                         for result publication in the study. Otherwise, if automatic
4965                         publication is switched on, default value is used for result name.
4966
4967             Returns:
4968                 New GEOM.GEOM_Object, containing the created solid.
4969             """
4970             # Example: see GEOM_TestAll.py
4971             theShells = ToList(theShells)
4972             if len(theShells) == 1:
4973                 descr = self._IsGoodForSolid(theShells[0])
4974                 #if len(descr) > 0:
4975                 #    raise RuntimeError, "MakeSolidShells : " + descr
4976                 if descr == "WRN_SHAPE_UNCLOSED":
4977                     raise RuntimeError("MakeSolidShells : Unable to create solid from unclosed shape")
4978             anObj = self.ShapesOp.MakeSolidShells(theShells)
4979             RaiseIfFailed("MakeSolidShells", self.ShapesOp)
4980             self._autoPublish(anObj, theName, "solid")
4981             return anObj
4982
4983         ## Create a compound of the given shapes.
4984         #  @param theShapes List of shapes to put in compound.
4985         #  @param theName Object name; when specified, this parameter is used
4986         #         for result publication in the study. Otherwise, if automatic
4987         #         publication is switched on, default value is used for result name.
4988         #
4989         #  @return New GEOM.GEOM_Object, containing the created compound.
4990         #
4991         #  @ref tui_creation_compound "Example"
4992         @ManageTransactions("ShapesOp")
4993         def MakeCompound(self, theShapes, theName=None):
4994             """
4995             Create a compound of the given shapes.
4996
4997             Parameters:
4998                 theShapes List of shapes to put in compound.
4999                 theName Object name; when specified, this parameter is used
5000                         for result publication in the study. Otherwise, if automatic
5001                         publication is switched on, default value is used for result name.
5002
5003             Returns:
5004                 New GEOM.GEOM_Object, containing the created compound.
5005             """
5006             # Example: see GEOM_TestAll.py
5007             anObj = self.ShapesOp.MakeCompound(ToList(theShapes))
5008             RaiseIfFailed("MakeCompound", self.ShapesOp)
5009             self._autoPublish(anObj, theName, "compound")
5010             return anObj
5011         
5012         ## Create a solid (or solids) from the set of faces and/or shells.
5013         #  @param theFacesOrShells List of faces and/or shells.
5014         #  @param isIntersect If TRUE, forces performing intersections
5015         #         between arguments; otherwise (default) intersection is not performed.
5016         #  @param theName Object name; when specified, this parameter is used
5017         #         for result publication in the study. Otherwise, if automatic
5018         #         publication is switched on, default value is used for result name.
5019         #
5020         #  @return New GEOM.GEOM_Object, containing the created solid (or compound of solids).
5021         #
5022         #  @ref tui_creation_solid_from_faces "Example"
5023         @ManageTransactions("ShapesOp")
5024         def MakeSolidFromConnectedFaces(self, theFacesOrShells, isIntersect = False, theName=None):
5025             """
5026             Create a solid (or solids) from the set of connected faces and/or shells.
5027
5028             Parameters:
5029                 theFacesOrShells List of faces and/or shells.
5030                 isIntersect If TRUE, forces performing intersections
5031                         between arguments; otherwise (default) intersection is not performed
5032                 theName Object name; when specified, this parameter is used.
5033                         for result publication in the study. Otherwise, if automatic
5034                         publication is switched on, default value is used for result name.
5035
5036             Returns:
5037                 New GEOM.GEOM_Object, containing the created solid (or compound of solids).
5038             """
5039             # Example: see GEOM_TestAll.py
5040             anObj = self.ShapesOp.MakeSolidFromConnectedFaces(theFacesOrShells, isIntersect)
5041             RaiseIfFailed("MakeSolidFromConnectedFaces", self.ShapesOp)
5042             self._autoPublish(anObj, theName, "solid")
5043             return anObj
5044
5045         # end of l3_basic_go
5046         ## @}
5047
5048         ## @addtogroup l2_measure
5049         ## @{
5050
5051         ## Gives quantity of faces in the given shape.
5052         #  @param theShape Shape to count faces of.
5053         #  @return Quantity of faces.
5054         #
5055         #  @ref swig_NumberOf "Example"
5056         @ManageTransactions("ShapesOp")
5057         def NumberOfFaces(self, theShape):
5058             """
5059             Gives quantity of faces in the given shape.
5060
5061             Parameters:
5062                 theShape Shape to count faces of.
5063
5064             Returns:
5065                 Quantity of faces.
5066             """
5067             # Example: see GEOM_TestOthers.py
5068             nb_faces = self.ShapesOp.NumberOfFaces(theShape)
5069             RaiseIfFailed("NumberOfFaces", self.ShapesOp)
5070             return nb_faces
5071
5072         ## Gives quantity of edges in the given shape.
5073         #  @param theShape Shape to count edges of.
5074         #  @return Quantity of edges.
5075         #
5076         #  @ref swig_NumberOf "Example"
5077         @ManageTransactions("ShapesOp")
5078         def NumberOfEdges(self, theShape):
5079             """
5080             Gives quantity of edges in the given shape.
5081
5082             Parameters:
5083                 theShape Shape to count edges of.
5084
5085             Returns:
5086                 Quantity of edges.
5087             """
5088             # Example: see GEOM_TestOthers.py
5089             nb_edges = self.ShapesOp.NumberOfEdges(theShape)
5090             RaiseIfFailed("NumberOfEdges", self.ShapesOp)
5091             return nb_edges
5092
5093         ## Gives quantity of sub-shapes of type theShapeType in the given shape.
5094         #  @param theShape Shape to count sub-shapes of.
5095         #  @param theShapeType Type of sub-shapes to count (see ShapeType())
5096         #  @return Quantity of sub-shapes of given type.
5097         #
5098         #  @ref swig_NumberOf "Example"
5099         @ManageTransactions("ShapesOp")
5100         def NumberOfSubShapes(self, theShape, theShapeType):
5101             """
5102             Gives quantity of sub-shapes of type theShapeType in the given shape.
5103
5104             Parameters:
5105                 theShape Shape to count sub-shapes of.
5106                 theShapeType Type of sub-shapes to count (see geompy.ShapeType)
5107
5108             Returns:
5109                 Quantity of sub-shapes of given type.
5110             """
5111             # Example: see GEOM_TestOthers.py
5112             nb_ss = self.ShapesOp.NumberOfSubShapes(theShape, theShapeType)
5113             RaiseIfFailed("NumberOfSubShapes", self.ShapesOp)
5114             return nb_ss
5115
5116         ## Gives quantity of solids in the given shape.
5117         #  @param theShape Shape to count solids in.
5118         #  @return Quantity of solids.
5119         #
5120         #  @ref swig_NumberOf "Example"
5121         @ManageTransactions("ShapesOp")
5122         def NumberOfSolids(self, theShape):
5123             """
5124             Gives quantity of solids in the given shape.
5125
5126             Parameters:
5127                 theShape Shape to count solids in.
5128
5129             Returns:
5130                 Quantity of solids.
5131             """
5132             # Example: see GEOM_TestOthers.py
5133             nb_solids = self.ShapesOp.NumberOfSubShapes(theShape, self.ShapeType["SOLID"])
5134             RaiseIfFailed("NumberOfSolids", self.ShapesOp)
5135             return nb_solids
5136
5137         # end of l2_measure
5138         ## @}
5139
5140         ## @addtogroup l3_healing
5141         ## @{
5142
5143         ## Reverses an orientation the given shape.
5144         #  @param theShape Shape to be reversed.
5145         #  @param theName Object name; when specified, this parameter is used
5146         #         for result publication in the study. Otherwise, if automatic
5147         #         publication is switched on, default value is used for result name.
5148         #
5149         #  @return The reversed copy of theShape.
5150         #
5151         #  @ref swig_ChangeOrientation "Example"
5152         @ManageTransactions("ShapesOp")
5153         def ChangeOrientation(self, theShape, theName=None):
5154             """
5155             Reverses an orientation the given shape.
5156
5157             Parameters:
5158                 theShape Shape to be reversed.
5159                 theName Object name; when specified, this parameter is used
5160                         for result publication in the study. Otherwise, if automatic
5161                         publication is switched on, default value is used for result name.
5162
5163             Returns:
5164                 The reversed copy of theShape.
5165             """
5166             # Example: see GEOM_TestAll.py
5167             anObj = self.ShapesOp.ChangeOrientation(theShape)
5168             RaiseIfFailed("ChangeOrientation", self.ShapesOp)
5169             self._autoPublish(anObj, theName, "reversed")
5170             return anObj
5171
5172         ## See ChangeOrientation() method for details.
5173         #
5174         #  @ref swig_OrientationChange "Example"
5175         def OrientationChange(self, theShape, theName=None):
5176             """
5177             See geompy.ChangeOrientation method for details.
5178             """
5179             # Example: see GEOM_TestOthers.py
5180             # note: auto-publishing is done in self.ChangeOrientation()
5181             anObj = self.ChangeOrientation(theShape, theName)
5182             return anObj
5183
5184         # end of l3_healing
5185         ## @}
5186
5187         ## @addtogroup l4_obtain
5188         ## @{
5189
5190         ## Retrieve all free faces from the given shape.
5191         #  Free face is a face, which is not shared between two shells of the shape.
5192         #  @param theShape Shape to find free faces in.
5193         #  @return List of IDs of all free faces, contained in theShape.
5194         #
5195         #  @ref tui_free_faces_page "Example"
5196         @ManageTransactions("ShapesOp")
5197         def GetFreeFacesIDs(self,theShape):
5198             """
5199             Retrieve all free faces from the given shape.
5200             Free face is a face, which is not shared between two shells of the shape.
5201
5202             Parameters:
5203                 theShape Shape to find free faces in.
5204
5205             Returns:
5206                 List of IDs of all free faces, contained in theShape.
5207             """
5208             # Example: see GEOM_TestOthers.py
5209             anIDs = self.ShapesOp.GetFreeFacesIDs(theShape)
5210             RaiseIfFailed("GetFreeFacesIDs", self.ShapesOp)
5211             return anIDs
5212
5213         ## Get all sub-shapes of theShape1 of the given type, shared with theShape2.
5214         #  @param theShape1 Shape to find sub-shapes in.
5215         #  @param theShape2 Shape to find shared sub-shapes with.
5216         #  @param theShapeType Type of sub-shapes to be retrieved.
5217         #  @param theName Object name; when specified, this parameter is used
5218         #         for result publication in the study. Otherwise, if automatic
5219         #         publication is switched on, default value is used for result name.
5220         #
5221         #  @return List of sub-shapes of theShape1, shared with theShape2.
5222         #
5223         #  @ref swig_GetSharedShapes "Example"
5224         @ManageTransactions("ShapesOp")
5225         def GetSharedShapes(self, theShape1, theShape2, theShapeType, theName=None):
5226             """
5227             Get all sub-shapes of theShape1 of the given type, shared with theShape2.
5228
5229             Parameters:
5230                 theShape1 Shape to find sub-shapes in.
5231                 theShape2 Shape to find shared sub-shapes with.
5232                 theShapeType Type of sub-shapes to be retrieved.
5233                 theName Object name; when specified, this parameter is used
5234                         for result publication in the study. Otherwise, if automatic
5235                         publication is switched on, default value is used for result name.
5236
5237             Returns:
5238                 List of sub-shapes of theShape1, shared with theShape2.
5239             """
5240             # Example: see GEOM_TestOthers.py
5241             aList = self.ShapesOp.GetSharedShapes(theShape1, theShape2, theShapeType)
5242             RaiseIfFailed("GetSharedShapes", self.ShapesOp)
5243             self._autoPublish(aList, theName, "shared")
5244             return aList
5245
5246         ## Get sub-shapes, shared by input shapes.
5247         #  @param theShapes Either a list or compound of shapes to find common sub-shapes of.
5248         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType()).
5249         #  @param theMultiShare Specifies what type of shares should be checked:
5250         #         - @c True (default): search sub-shapes from 1st input shape shared with all other input shapes;
5251         #         - @c False: causes to search sub-shapes shared between couples of input shapes.
5252         #  @param theName Object name; when specified, this parameter is used
5253         #         for result publication in the study. Otherwise, if automatic
5254         #         publication is switched on, default value is used for result name.
5255         #
5256         #  @note If @a theShapes contains single compound, the shares between all possible couples of 
5257         #        its top-level shapes are returned; otherwise, only shares between 1st input shape
5258         #        and all rest input shapes are returned.
5259         #
5260         #  @return List of all found sub-shapes.
5261         #
5262         #  Examples:
5263         #  - @ref tui_shared_shapes "Example 1"
5264         #  - @ref swig_GetSharedShapes "Example 2"
5265         @ManageTransactions("ShapesOp")
5266         def GetSharedShapesMulti(self, theShapes, theShapeType, theMultiShare=True, theName=None):
5267             """
5268             Get sub-shapes, shared by input shapes.
5269
5270             Parameters:
5271                 theShapes Either a list or compound of shapes to find common sub-shapes of.
5272                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType).
5273                 theMultiShare Specifies what type of shares should be checked:
5274                   - True (default): search sub-shapes from 1st input shape shared with all other input shapes;
5275                   - False: causes to search sub-shapes shared between couples of input shapes.
5276                 theName Object name; when specified, this parameter is used
5277                         for result publication in the study. Otherwise, if automatic
5278                         publication is switched on, default value is used for result name.
5279
5280             Note: if theShapes contains single compound, the shares between all possible couples of 
5281                   its top-level shapes are returned; otherwise, only shares between 1st input shape
5282                   and all rest input shapes are returned.
5283
5284             Returns:
5285                 List of all found sub-shapes.
5286             """
5287             # Example: see GEOM_TestOthers.py
5288             aList = self.ShapesOp.GetSharedShapesMulti(ToList(theShapes), theShapeType, theMultiShare)
5289             RaiseIfFailed("GetSharedShapesMulti", self.ShapesOp)
5290             self._autoPublish(aList, theName, "shared")
5291             return aList
5292
5293         ## Find in <VAR>theShape</VAR> all sub-shapes of type <VAR>theShapeType</VAR>,
5294         #  situated relatively the specified plane by the certain way,
5295         #  defined through <VAR>theState</VAR> parameter.
5296         #  @param theShape Shape to find sub-shapes of.
5297         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5298         #  @param theAx1 Vector (or line, or linear edge), specifying normal
5299         #                direction and location of the plane to find shapes on.
5300         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5301         #  @param theName Object name; when specified, this parameter is used
5302         #         for result publication in the study. Otherwise, if automatic
5303         #         publication is switched on, default value is used for result name.
5304         #
5305         #  @return List of all found sub-shapes.
5306         #
5307         #  @ref swig_GetShapesOnPlane "Example"
5308         @ManageTransactions("ShapesOp")
5309         def GetShapesOnPlane(self, theShape, theShapeType, theAx1, theState, theName=None):
5310             """
5311             Find in theShape all sub-shapes of type theShapeType,
5312             situated relatively the specified plane by the certain way,
5313             defined through theState parameter.
5314
5315             Parameters:
5316                 theShape Shape to find sub-shapes of.
5317                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5318                 theAx1 Vector (or line, or linear edge), specifying normal
5319                        direction and location of the plane to find shapes on.
5320                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5321                 theName Object name; when specified, this parameter is used
5322                         for result publication in the study. Otherwise, if automatic
5323                         publication is switched on, default value is used for result name.
5324
5325             Returns:
5326                 List of all found sub-shapes.
5327             """
5328             # Example: see GEOM_TestOthers.py
5329             aList = self.ShapesOp.GetShapesOnPlane(theShape, theShapeType, theAx1, theState)
5330             RaiseIfFailed("GetShapesOnPlane", self.ShapesOp)
5331             self._autoPublish(aList, theName, "shapeOnPlane")
5332             return aList
5333
5334         ## Find in <VAR>theShape</VAR> all sub-shapes of type <VAR>theShapeType</VAR>,
5335         #  situated relatively the specified plane by the certain way,
5336         #  defined through <VAR>theState</VAR> parameter.
5337         #  @param theShape Shape to find sub-shapes of.
5338         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5339         #  @param theAx1 Vector (or line, or linear edge), specifying normal
5340         #                direction and location of the plane to find shapes on.
5341         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5342         #
5343         #  @return List of all found sub-shapes indices.
5344         #
5345         #  @ref swig_GetShapesOnPlaneIDs "Example"
5346         @ManageTransactions("ShapesOp")
5347         def GetShapesOnPlaneIDs(self, theShape, theShapeType, theAx1, theState):
5348             """
5349             Find in theShape all sub-shapes of type theShapeType,
5350             situated relatively the specified plane by the certain way,
5351             defined through theState parameter.
5352
5353             Parameters:
5354                 theShape Shape to find sub-shapes of.
5355                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5356                 theAx1 Vector (or line, or linear edge), specifying normal
5357                        direction and location of the plane to find shapes on.
5358                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5359
5360             Returns:
5361                 List of all found sub-shapes indices.
5362             """
5363             # Example: see GEOM_TestOthers.py
5364             aList = self.ShapesOp.GetShapesOnPlaneIDs(theShape, theShapeType, theAx1, theState)
5365             RaiseIfFailed("GetShapesOnPlaneIDs", self.ShapesOp)
5366             return aList
5367
5368         ## Find in <VAR>theShape</VAR> all sub-shapes of type <VAR>theShapeType</VAR>,
5369         #  situated relatively the specified plane by the certain way,
5370         #  defined through <VAR>theState</VAR> parameter.
5371         #  @param theShape Shape to find sub-shapes of.
5372         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5373         #  @param theAx1 Vector (or line, or linear edge), specifying normal
5374         #                direction of the plane to find shapes on.
5375         #  @param thePnt Point specifying location of the plane to find shapes on.
5376         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5377         #  @param theName Object name; when specified, this parameter is used
5378         #         for result publication in the study. Otherwise, if automatic
5379         #         publication is switched on, default value is used for result name.
5380         #
5381         #  @return List of all found sub-shapes.
5382         #
5383         #  @ref swig_GetShapesOnPlaneWithLocation "Example"
5384         @ManageTransactions("ShapesOp")
5385         def GetShapesOnPlaneWithLocation(self, theShape, theShapeType, theAx1, thePnt, theState, theName=None):
5386             """
5387             Find in theShape all sub-shapes of type theShapeType,
5388             situated relatively the specified plane by the certain way,
5389             defined through theState parameter.
5390
5391             Parameters:
5392                 theShape Shape to find sub-shapes of.
5393                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5394                 theAx1 Vector (or line, or linear edge), specifying normal
5395                        direction and location of the plane to find shapes on.
5396                 thePnt Point specifying location of the plane to find shapes on.
5397                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5398                 theName Object name; when specified, this parameter is used
5399                         for result publication in the study. Otherwise, if automatic
5400                         publication is switched on, default value is used for result name.
5401
5402             Returns:
5403                 List of all found sub-shapes.
5404             """
5405             # Example: see GEOM_TestOthers.py
5406             aList = self.ShapesOp.GetShapesOnPlaneWithLocation(theShape, theShapeType,
5407                                                                theAx1, thePnt, theState)
5408             RaiseIfFailed("GetShapesOnPlaneWithLocation", self.ShapesOp)
5409             self._autoPublish(aList, theName, "shapeOnPlane")
5410             return aList
5411
5412         ## Find in <VAR>theShape</VAR> all sub-shapes of type <VAR>theShapeType</VAR>,
5413         #  situated relatively the specified plane by the certain way,
5414         #  defined through <VAR>theState</VAR> parameter.
5415         #  @param theShape Shape to find sub-shapes of.
5416         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5417         #  @param theAx1 Vector (or line, or linear edge), specifying normal
5418         #                direction of the plane to find shapes on.
5419         #  @param thePnt Point specifying location of the plane to find shapes on.
5420         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5421         #
5422         #  @return List of all found sub-shapes indices.
5423         #
5424         #  @ref swig_GetShapesOnPlaneWithLocationIDs "Example"
5425         @ManageTransactions("ShapesOp")
5426         def GetShapesOnPlaneWithLocationIDs(self, theShape, theShapeType, theAx1, thePnt, theState):
5427             """
5428             Find in theShape all sub-shapes of type theShapeType,
5429             situated relatively the specified plane by the certain way,
5430             defined through theState parameter.
5431
5432             Parameters:
5433                 theShape Shape to find sub-shapes of.
5434                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5435                 theAx1 Vector (or line, or linear edge), specifying normal
5436                        direction and location of the plane to find shapes on.
5437                 thePnt Point specifying location of the plane to find shapes on.
5438                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5439
5440             Returns:
5441                 List of all found sub-shapes indices.
5442             """
5443             # Example: see GEOM_TestOthers.py
5444             aList = self.ShapesOp.GetShapesOnPlaneWithLocationIDs(theShape, theShapeType,
5445                                                                   theAx1, thePnt, theState)
5446             RaiseIfFailed("GetShapesOnPlaneWithLocationIDs", self.ShapesOp)
5447             return aList
5448
5449         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
5450         #  the specified cylinder by the certain way, defined through \a theState parameter.
5451         #  @param theShape Shape to find sub-shapes of.
5452         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5453         #  @param theAxis Vector (or line, or linear edge), specifying
5454         #                 axis of the cylinder to find shapes on.
5455         #  @param theRadius Radius of the cylinder to find shapes on.
5456         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5457         #  @param theName Object name; when specified, this parameter is used
5458         #         for result publication in the study. Otherwise, if automatic
5459         #         publication is switched on, default value is used for result name.
5460         #
5461         #  @return List of all found sub-shapes.
5462         #
5463         #  @ref swig_GetShapesOnCylinder "Example"
5464         @ManageTransactions("ShapesOp")
5465         def GetShapesOnCylinder(self, theShape, theShapeType, theAxis, theRadius, theState, theName=None):
5466             """
5467             Find in theShape all sub-shapes of type theShapeType, situated relatively
5468             the specified cylinder by the certain way, defined through theState parameter.
5469
5470             Parameters:
5471                 theShape Shape to find sub-shapes of.
5472                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5473                 theAxis Vector (or line, or linear edge), specifying
5474                         axis of the cylinder to find shapes on.
5475                 theRadius Radius of the cylinder to find shapes on.
5476                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5477                 theName Object name; when specified, this parameter is used
5478                         for result publication in the study. Otherwise, if automatic
5479                         publication is switched on, default value is used for result name.
5480
5481             Returns:
5482                 List of all found sub-shapes.
5483             """
5484             # Example: see GEOM_TestOthers.py
5485             aList = self.ShapesOp.GetShapesOnCylinder(theShape, theShapeType, theAxis, theRadius, theState)
5486             RaiseIfFailed("GetShapesOnCylinder", self.ShapesOp)
5487             self._autoPublish(aList, theName, "shapeOnCylinder")
5488             return aList
5489
5490         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
5491         #  the specified cylinder by the certain way, defined through \a theState parameter.
5492         #  @param theShape Shape to find sub-shapes of.
5493         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5494         #  @param theAxis Vector (or line, or linear edge), specifying
5495         #                 axis of the cylinder to find shapes on.
5496         #  @param theRadius Radius of the cylinder to find shapes on.
5497         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5498         #
5499         #  @return List of all found sub-shapes indices.
5500         #
5501         #  @ref swig_GetShapesOnCylinderIDs "Example"
5502         @ManageTransactions("ShapesOp")
5503         def GetShapesOnCylinderIDs(self, theShape, theShapeType, theAxis, theRadius, theState):
5504             """
5505             Find in theShape all sub-shapes of type theShapeType, situated relatively
5506             the specified cylinder by the certain way, defined through theState parameter.
5507
5508             Parameters:
5509                 theShape Shape to find sub-shapes of.
5510                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5511                 theAxis Vector (or line, or linear edge), specifying
5512                         axis of the cylinder to find shapes on.
5513                 theRadius Radius of the cylinder to find shapes on.
5514                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5515
5516             Returns:
5517                 List of all found sub-shapes indices.
5518             """
5519             # Example: see GEOM_TestOthers.py
5520             aList = self.ShapesOp.GetShapesOnCylinderIDs(theShape, theShapeType, theAxis, theRadius, theState)
5521             RaiseIfFailed("GetShapesOnCylinderIDs", self.ShapesOp)
5522             return aList
5523
5524         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
5525         #  the specified cylinder by the certain way, defined through \a theState parameter.
5526         #  @param theShape Shape to find sub-shapes of.
5527         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5528         #  @param theAxis Vector (or line, or linear edge), specifying
5529         #                 axis of the cylinder to find shapes on.
5530         #  @param thePnt Point specifying location of the bottom of the cylinder.
5531         #  @param theRadius Radius of the cylinder to find shapes on.
5532         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5533         #  @param theName Object name; when specified, this parameter is used
5534         #         for result publication in the study. Otherwise, if automatic
5535         #         publication is switched on, default value is used for result name.
5536         #
5537         #  @return List of all found sub-shapes.
5538         #
5539         #  @ref swig_GetShapesOnCylinderWithLocation "Example"
5540         @ManageTransactions("ShapesOp")
5541         def GetShapesOnCylinderWithLocation(self, theShape, theShapeType, theAxis, thePnt, theRadius, theState, theName=None):
5542             """
5543             Find in theShape all sub-shapes of type theShapeType, situated relatively
5544             the specified cylinder by the certain way, defined through theState parameter.
5545
5546             Parameters:
5547                 theShape Shape to find sub-shapes of.
5548                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5549                 theAxis Vector (or line, or linear edge), specifying
5550                         axis of the cylinder to find shapes on.
5551                 theRadius Radius of the cylinder to find shapes on.
5552                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5553                 theName Object name; when specified, this parameter is used
5554                         for result publication in the study. Otherwise, if automatic
5555                         publication is switched on, default value is used for result name.
5556
5557             Returns:
5558                 List of all found sub-shapes.
5559             """
5560             # Example: see GEOM_TestOthers.py
5561             aList = self.ShapesOp.GetShapesOnCylinderWithLocation(theShape, theShapeType, theAxis, thePnt, theRadius, theState)
5562             RaiseIfFailed("GetShapesOnCylinderWithLocation", self.ShapesOp)
5563             self._autoPublish(aList, theName, "shapeOnCylinder")
5564             return aList
5565
5566         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
5567         #  the specified cylinder by the certain way, defined through \a theState parameter.
5568         #  @param theShape Shape to find sub-shapes of.
5569         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5570         #  @param theAxis Vector (or line, or linear edge), specifying
5571         #                 axis of the cylinder to find shapes on.
5572         #  @param thePnt Point specifying location of the bottom of the cylinder.
5573         #  @param theRadius Radius of the cylinder to find shapes on.
5574         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5575         #
5576         #  @return List of all found sub-shapes indices
5577         #
5578         #  @ref swig_GetShapesOnCylinderWithLocationIDs "Example"
5579         @ManageTransactions("ShapesOp")
5580         def GetShapesOnCylinderWithLocationIDs(self, theShape, theShapeType, theAxis, thePnt, theRadius, theState):
5581             """
5582             Find in theShape all sub-shapes of type theShapeType, situated relatively
5583             the specified cylinder by the certain way, defined through theState parameter.
5584
5585             Parameters:
5586                 theShape Shape to find sub-shapes of.
5587                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5588                 theAxis Vector (or line, or linear edge), specifying
5589                         axis of the cylinder to find shapes on.
5590                 theRadius Radius of the cylinder to find shapes on.
5591                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5592
5593             Returns:
5594                 List of all found sub-shapes indices.
5595             """
5596             # Example: see GEOM_TestOthers.py
5597             aList = self.ShapesOp.GetShapesOnCylinderWithLocationIDs(theShape, theShapeType, theAxis, thePnt, theRadius, theState)
5598             RaiseIfFailed("GetShapesOnCylinderWithLocationIDs", self.ShapesOp)
5599             return aList
5600
5601         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
5602         #  the specified sphere by the certain way, defined through \a theState parameter.
5603         #  @param theShape Shape to find sub-shapes of.
5604         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5605         #  @param theCenter Point, specifying center of the sphere to find shapes on.
5606         #  @param theRadius Radius of the sphere to find shapes on.
5607         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5608         #  @param theName Object name; when specified, this parameter is used
5609         #         for result publication in the study. Otherwise, if automatic
5610         #         publication is switched on, default value is used for result name.
5611         #
5612         #  @return List of all found sub-shapes.
5613         #
5614         #  @ref swig_GetShapesOnSphere "Example"
5615         @ManageTransactions("ShapesOp")
5616         def GetShapesOnSphere(self, theShape, theShapeType, theCenter, theRadius, theState, theName=None):
5617             """
5618             Find in theShape all sub-shapes of type theShapeType, situated relatively
5619             the specified sphere by the certain way, defined through theState parameter.
5620
5621             Parameters:
5622                 theShape Shape to find sub-shapes of.
5623                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5624                 theCenter Point, specifying center of the sphere to find shapes on.
5625                 theRadius Radius of the sphere to find shapes on.
5626                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5627                 theName Object name; when specified, this parameter is used
5628                         for result publication in the study. Otherwise, if automatic
5629                         publication is switched on, default value is used for result name.
5630
5631             Returns:
5632                 List of all found sub-shapes.
5633             """
5634             # Example: see GEOM_TestOthers.py
5635             aList = self.ShapesOp.GetShapesOnSphere(theShape, theShapeType, theCenter, theRadius, theState)
5636             RaiseIfFailed("GetShapesOnSphere", self.ShapesOp)
5637             self._autoPublish(aList, theName, "shapeOnSphere")
5638             return aList
5639
5640         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
5641         #  the specified sphere by the certain way, defined through \a theState parameter.
5642         #  @param theShape Shape to find sub-shapes of.
5643         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5644         #  @param theCenter Point, specifying center of the sphere to find shapes on.
5645         #  @param theRadius Radius of the sphere to find shapes on.
5646         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5647         #
5648         #  @return List of all found sub-shapes indices.
5649         #
5650         #  @ref swig_GetShapesOnSphereIDs "Example"
5651         @ManageTransactions("ShapesOp")
5652         def GetShapesOnSphereIDs(self, theShape, theShapeType, theCenter, theRadius, theState):
5653             """
5654             Find in theShape all sub-shapes of type theShapeType, situated relatively
5655             the specified sphere by the certain way, defined through theState parameter.
5656
5657             Parameters:
5658                 theShape Shape to find sub-shapes of.
5659                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5660                 theCenter Point, specifying center of the sphere to find shapes on.
5661                 theRadius Radius of the sphere to find shapes on.
5662                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5663
5664             Returns:
5665                 List of all found sub-shapes indices.
5666             """
5667             # Example: see GEOM_TestOthers.py
5668             aList = self.ShapesOp.GetShapesOnSphereIDs(theShape, theShapeType, theCenter, theRadius, theState)
5669             RaiseIfFailed("GetShapesOnSphereIDs", self.ShapesOp)
5670             return aList
5671
5672         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
5673         #  the specified quadrangle by the certain way, defined through \a theState parameter.
5674         #  @param theShape Shape to find sub-shapes of.
5675         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5676         #  @param theTopLeftPoint Point, specifying top left corner of a quadrangle
5677         #  @param theTopRightPoint Point, specifying top right corner of a quadrangle
5678         #  @param theBottomLeftPoint Point, specifying bottom left corner of a quadrangle
5679         #  @param theBottomRightPoint Point, specifying bottom right corner of a quadrangle
5680         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5681         #  @param theName Object name; when specified, this parameter is used
5682         #         for result publication in the study. Otherwise, if automatic
5683         #         publication is switched on, default value is used for result name.
5684         #
5685         #  @return List of all found sub-shapes.
5686         #
5687         #  @ref swig_GetShapesOnQuadrangle "Example"
5688         @ManageTransactions("ShapesOp")
5689         def GetShapesOnQuadrangle(self, theShape, theShapeType,
5690                                   theTopLeftPoint, theTopRightPoint,
5691                                   theBottomLeftPoint, theBottomRightPoint, theState, theName=None):
5692             """
5693             Find in theShape all sub-shapes of type theShapeType, situated relatively
5694             the specified quadrangle by the certain way, defined through theState parameter.
5695
5696             Parameters:
5697                 theShape Shape to find sub-shapes of.
5698                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5699                 theTopLeftPoint Point, specifying top left corner of a quadrangle
5700                 theTopRightPoint Point, specifying top right corner of a quadrangle
5701                 theBottomLeftPoint Point, specifying bottom left corner of a quadrangle
5702                 theBottomRightPoint Point, specifying bottom right corner of a quadrangle
5703                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5704                 theName Object name; when specified, this parameter is used
5705                         for result publication in the study. Otherwise, if automatic
5706                         publication is switched on, default value is used for result name.
5707
5708             Returns:
5709                 List of all found sub-shapes.
5710             """
5711             # Example: see GEOM_TestOthers.py
5712             aList = self.ShapesOp.GetShapesOnQuadrangle(theShape, theShapeType,
5713                                                         theTopLeftPoint, theTopRightPoint,
5714                                                         theBottomLeftPoint, theBottomRightPoint, theState)
5715             RaiseIfFailed("GetShapesOnQuadrangle", self.ShapesOp)
5716             self._autoPublish(aList, theName, "shapeOnQuadrangle")
5717             return aList
5718
5719         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
5720         #  the specified quadrangle by the certain way, defined through \a theState parameter.
5721         #  @param theShape Shape to find sub-shapes of.
5722         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5723         #  @param theTopLeftPoint Point, specifying top left corner of a quadrangle
5724         #  @param theTopRightPoint Point, specifying top right corner of a quadrangle
5725         #  @param theBottomLeftPoint Point, specifying bottom left corner of a quadrangle
5726         #  @param theBottomRightPoint Point, specifying bottom right corner of a quadrangle
5727         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5728         #
5729         #  @return List of all found sub-shapes indices.
5730         #
5731         #  @ref swig_GetShapesOnQuadrangleIDs "Example"
5732         @ManageTransactions("ShapesOp")
5733         def GetShapesOnQuadrangleIDs(self, theShape, theShapeType,
5734                                      theTopLeftPoint, theTopRightPoint,
5735                                      theBottomLeftPoint, theBottomRightPoint, theState):
5736             """
5737             Find in theShape all sub-shapes of type theShapeType, situated relatively
5738             the specified quadrangle by the certain way, defined through theState parameter.
5739
5740             Parameters:
5741                 theShape Shape to find sub-shapes of.
5742                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5743                 theTopLeftPoint Point, specifying top left corner of a quadrangle
5744                 theTopRightPoint Point, specifying top right corner of a quadrangle
5745                 theBottomLeftPoint Point, specifying bottom left corner of a quadrangle
5746                 theBottomRightPoint Point, specifying bottom right corner of a quadrangle
5747                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5748
5749             Returns:
5750                 List of all found sub-shapes indices.
5751             """
5752
5753             # Example: see GEOM_TestOthers.py
5754             aList = self.ShapesOp.GetShapesOnQuadrangleIDs(theShape, theShapeType,
5755                                                            theTopLeftPoint, theTopRightPoint,
5756                                                            theBottomLeftPoint, theBottomRightPoint, theState)
5757             RaiseIfFailed("GetShapesOnQuadrangleIDs", self.ShapesOp)
5758             return aList
5759
5760         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
5761         #  the specified \a theBox by the certain way, defined through \a theState parameter.
5762         #  @param theBox Shape for relative comparing.
5763         #  @param theShape Shape to find sub-shapes of.
5764         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5765         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5766         #  @param theName Object name; when specified, this parameter is used
5767         #         for result publication in the study. Otherwise, if automatic
5768         #         publication is switched on, default value is used for result name.
5769         #
5770         #  @return List of all found sub-shapes.
5771         #
5772         #  @ref swig_GetShapesOnBox "Example"
5773         @ManageTransactions("ShapesOp")
5774         def GetShapesOnBox(self, theBox, theShape, theShapeType, theState, theName=None):
5775             """
5776             Find in theShape all sub-shapes of type theShapeType, situated relatively
5777             the specified theBox by the certain way, defined through theState parameter.
5778
5779             Parameters:
5780                 theBox Shape for relative comparing.
5781                 theShape Shape to find sub-shapes of.
5782                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5783                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5784                 theName Object name; when specified, this parameter is used
5785                         for result publication in the study. Otherwise, if automatic
5786                         publication is switched on, default value is used for result name.
5787
5788             Returns:
5789                 List of all found sub-shapes.
5790             """
5791             # Example: see GEOM_TestOthers.py
5792             aList = self.ShapesOp.GetShapesOnBox(theBox, theShape, theShapeType, theState)
5793             RaiseIfFailed("GetShapesOnBox", self.ShapesOp)
5794             self._autoPublish(aList, theName, "shapeOnBox")
5795             return aList
5796
5797         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
5798         #  the specified \a theBox by the certain way, defined through \a theState parameter.
5799         #  @param theBox Shape for relative comparing.
5800         #  @param theShape Shape to find sub-shapes of.
5801         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5802         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5803         #
5804         #  @return List of all found sub-shapes indices.
5805         #
5806         #  @ref swig_GetShapesOnBoxIDs "Example"
5807         @ManageTransactions("ShapesOp")
5808         def GetShapesOnBoxIDs(self, theBox, theShape, theShapeType, theState):
5809             """
5810             Find in theShape all sub-shapes of type theShapeType, situated relatively
5811             the specified theBox by the certain way, defined through theState parameter.
5812
5813             Parameters:
5814                 theBox Shape for relative comparing.
5815                 theShape Shape to find sub-shapes of.
5816                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5817                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5818
5819             Returns:
5820                 List of all found sub-shapes indices.
5821             """
5822             # Example: see GEOM_TestOthers.py
5823             aList = self.ShapesOp.GetShapesOnBoxIDs(theBox, theShape, theShapeType, theState)
5824             RaiseIfFailed("GetShapesOnBoxIDs", self.ShapesOp)
5825             return aList
5826
5827         ## Find in \a theShape all sub-shapes of type \a theShapeType,
5828         #  situated relatively the specified \a theCheckShape by the
5829         #  certain way, defined through \a theState parameter.
5830         #  @param theCheckShape Shape for relative comparing. It must be a solid.
5831         #  @param theShape Shape to find sub-shapes of.
5832         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5833         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5834         #  @param theName Object name; when specified, this parameter is used
5835         #         for result publication in the study. Otherwise, if automatic
5836         #         publication is switched on, default value is used for result name.
5837         #
5838         #  @return List of all found sub-shapes.
5839         #
5840         #  @ref swig_GetShapesOnShape "Example"
5841         @ManageTransactions("ShapesOp")
5842         def GetShapesOnShape(self, theCheckShape, theShape, theShapeType, theState, theName=None):
5843             """
5844             Find in theShape all sub-shapes of type theShapeType,
5845             situated relatively the specified theCheckShape by the
5846             certain way, defined through theState parameter.
5847
5848             Parameters:
5849                 theCheckShape Shape for relative comparing. It must be a solid.
5850                 theShape Shape to find sub-shapes of.
5851                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5852                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5853                 theName Object name; when specified, this parameter is used
5854                         for result publication in the study. Otherwise, if automatic
5855                         publication is switched on, default value is used for result name.
5856
5857             Returns:
5858                 List of all found sub-shapes.
5859             """
5860             # Example: see GEOM_TestOthers.py
5861             aList = self.ShapesOp.GetShapesOnShape(theCheckShape, theShape,
5862                                                    theShapeType, theState)
5863             RaiseIfFailed("GetShapesOnShape", self.ShapesOp)
5864             self._autoPublish(aList, theName, "shapeOnShape")
5865             return aList
5866
5867         ## Find in \a theShape all sub-shapes of type \a theShapeType,
5868         #  situated relatively the specified \a theCheckShape by the
5869         #  certain way, defined through \a theState parameter.
5870         #  @param theCheckShape Shape for relative comparing. It must be a solid.
5871         #  @param theShape Shape to find sub-shapes of.
5872         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5873         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5874         #  @param theName Object name; when specified, this parameter is used
5875         #         for result publication in the study. Otherwise, if automatic
5876         #         publication is switched on, default value is used for result name.
5877         #
5878         #  @return All found sub-shapes as compound.
5879         #
5880         #  @ref swig_GetShapesOnShapeAsCompound "Example"
5881         @ManageTransactions("ShapesOp")
5882         def GetShapesOnShapeAsCompound(self, theCheckShape, theShape, theShapeType, theState, theName=None):
5883             """
5884             Find in theShape all sub-shapes of type theShapeType,
5885             situated relatively the specified theCheckShape by the
5886             certain way, defined through theState parameter.
5887
5888             Parameters:
5889                 theCheckShape Shape for relative comparing. It must be a solid.
5890                 theShape Shape to find sub-shapes of.
5891                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5892                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5893                 theName Object name; when specified, this parameter is used
5894                         for result publication in the study. Otherwise, if automatic
5895                         publication is switched on, default value is used for result name.
5896
5897             Returns:
5898                 All found sub-shapes as compound.
5899             """
5900             # Example: see GEOM_TestOthers.py
5901             anObj = self.ShapesOp.GetShapesOnShapeAsCompound(theCheckShape, theShape,
5902                                                              theShapeType, theState)
5903             RaiseIfFailed("GetShapesOnShapeAsCompound", self.ShapesOp)
5904             self._autoPublish(anObj, theName, "shapeOnShape")
5905             return anObj
5906
5907         ## Find in \a theShape all sub-shapes of type \a theShapeType,
5908         #  situated relatively the specified \a theCheckShape by the
5909         #  certain way, defined through \a theState parameter.
5910         #  @param theCheckShape Shape for relative comparing. It must be a solid.
5911         #  @param theShape Shape to find sub-shapes of.
5912         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5913         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5914         #
5915         #  @return List of all found sub-shapes indices.
5916         #
5917         #  @ref swig_GetShapesOnShapeIDs "Example"
5918         @ManageTransactions("ShapesOp")
5919         def GetShapesOnShapeIDs(self, theCheckShape, theShape, theShapeType, theState):
5920             """
5921             Find in theShape all sub-shapes of type theShapeType,
5922             situated relatively the specified theCheckShape by the
5923             certain way, defined through theState parameter.
5924
5925             Parameters:
5926                 theCheckShape Shape for relative comparing. It must be a solid.
5927                 theShape Shape to find sub-shapes of.
5928                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5929                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5930
5931             Returns:
5932                 List of all found sub-shapes indices.
5933             """
5934             # Example: see GEOM_TestOthers.py
5935             aList = self.ShapesOp.GetShapesOnShapeIDs(theCheckShape, theShape,
5936                                                       theShapeType, theState)
5937             RaiseIfFailed("GetShapesOnShapeIDs", self.ShapesOp)
5938             return aList
5939
5940         ## Get sub-shape(s) of theShapeWhere, which are
5941         #  coincident with \a theShapeWhat or could be a part of it.
5942         #  @param theShapeWhere Shape to find sub-shapes of.
5943         #  @param theShapeWhat Shape, specifying what to find.
5944         #  @param isNewImplementation implementation of GetInPlace functionality
5945         #             (default = False, old alghorithm based on shape properties)
5946         #  @param theName Object name; when specified, this parameter is used
5947         #         for result publication in the study. Otherwise, if automatic
5948         #         publication is switched on, default value is used for result name.
5949         #
5950         #  @return Compound which includes all found sub-shapes if they have different types; 
5951         #          or group of all found shapes of the equal type; or a single found sub-shape.
5952         #
5953         #  @note This function has a restriction on argument shapes.
5954         #        If \a theShapeWhere has curved parts with significantly
5955         #        outstanding centres (i.e. the mass centre of a part is closer to
5956         #        \a theShapeWhat than to the part), such parts will not be found.
5957         #        @image html get_in_place_lost_part.png
5958         #
5959         #  @ref swig_GetInPlace "Example"
5960         @ManageTransactions("ShapesOp")
5961         def GetInPlace(self, theShapeWhere, theShapeWhat, isNewImplementation = False, theName=None):
5962             """
5963             Get sub-shape(s) of theShapeWhere, which are
5964             coincident with  theShapeWhat or could be a part of it.
5965
5966             Parameters:
5967                 theShapeWhere Shape to find sub-shapes of.
5968                 theShapeWhat Shape, specifying what to find.
5969                 isNewImplementation Implementation of GetInPlace functionality
5970                                     (default = False, old alghorithm based on shape properties)
5971                 theName Object name; when specified, this parameter is used
5972                         for result publication in the study. Otherwise, if automatic
5973                         publication is switched on, default value is used for result name.
5974
5975             Returns:
5976                 Compound which includes all found sub-shapes if they have different types; 
5977                 or group of all found shapes of the equal type; or a single found sub-shape.
5978
5979
5980             Note:
5981                 This function has a restriction on argument shapes.
5982                 If theShapeWhere has curved parts with significantly
5983                 outstanding centres (i.e. the mass centre of a part is closer to
5984                 theShapeWhat than to the part), such parts will not be found.
5985             """
5986             # Example: see GEOM_TestOthers.py
5987             anObj = None
5988             if isNewImplementation:
5989                 anObj = self.ShapesOp.GetInPlace(theShapeWhere, theShapeWhat)
5990             else:
5991                 anObj = self.ShapesOp.GetInPlaceOld(theShapeWhere, theShapeWhat)
5992                 pass
5993             RaiseIfFailed("GetInPlace", self.ShapesOp)
5994             self._autoPublish(anObj, theName, "inplace")
5995             return anObj
5996
5997         ## Get sub-shape(s) of \a theShapeWhere, which are
5998         #  coincident with \a theShapeWhat or could be a part of it.
5999         #
6000         #  Implementation of this method is based on a saved history of an operation,
6001         #  produced \a theShapeWhere. The \a theShapeWhat must be among this operation's
6002         #  arguments (an argument shape or a sub-shape of an argument shape).
6003         #  The operation could be the Partition or one of boolean operations,
6004         #  performed on simple shapes (not on compounds).
6005         #
6006         #  @param theShapeWhere Shape to find sub-shapes of.
6007         #  @param theShapeWhat Shape, specifying what to find (must be in the
6008         #                      building history of the ShapeWhere).
6009         #  @param theName Object name; when specified, this parameter is used
6010         #         for result publication in the study. Otherwise, if automatic
6011         #         publication is switched on, default value is used for result name.
6012         #
6013         #  @return Compound which includes all found sub-shapes if they have different types; 
6014         #          or group of all found shapes of the equal type; or a single found sub-shape.
6015         #
6016         #  @ref swig_GetInPlace "Example"
6017         @ManageTransactions("ShapesOp")
6018         def GetInPlaceByHistory(self, theShapeWhere, theShapeWhat, theName=None):
6019             """
6020             Implementation of this method is based on a saved history of an operation,
6021             produced theShapeWhere. The theShapeWhat must be among this operation's
6022             arguments (an argument shape or a sub-shape of an argument shape).
6023             The operation could be the Partition or one of boolean operations,
6024             performed on simple shapes (not on compounds).
6025
6026             Parameters:
6027                 theShapeWhere Shape to find sub-shapes of.
6028                 theShapeWhat Shape, specifying what to find (must be in the
6029                                 building history of the ShapeWhere).
6030                 theName Object name; when specified, this parameter is used
6031                         for result publication in the study. Otherwise, if automatic
6032                         publication is switched on, default value is used for result name.
6033
6034             Returns:
6035                 Compound which includes all found sub-shapes if they have different types; 
6036                 or group of all found shapes of the equal type; or a single found sub-shape.
6037             """
6038             # Example: see GEOM_TestOthers.py
6039             anObj = self.ShapesOp.GetInPlaceByHistory(theShapeWhere, theShapeWhat)
6040             RaiseIfFailed("GetInPlaceByHistory", self.ShapesOp)
6041             self._autoPublish(anObj, theName, "inplace")
6042             return anObj
6043
6044         ## A sort of GetInPlace functionality, returning IDs of sub-shapes.
6045         #  For each sub-shape ID of @a theShapeWhat return a list of corresponding sub-shape
6046         #  IDs of @a theShapeWhere.
6047         #  For example, if theShapeWhat is a box and theShapeWhere is this box cut into 
6048         #  two parts by a plane, then the result can be as this: 
6049         #    len( result_list ) = 35,
6050         #    result_list[ 1 ] = [ 2, 36 ], which means that the box  (ID 1) turned into two
6051         #  solids with IDs 2 and 36 within theShapeWhere
6052         #
6053         #  @param theShapeWhere Shape to find sub-shapes of.
6054         #  @param theShapeWhat Shape, specifying what to find.
6055         #  @return List of lists of sub-shape IDS of theShapeWhere.
6056         def GetInPlaceMap(self, theShapeWhere, theShapeWhat):
6057             """
6058             A sort of GetInPlace functionality, returning IDs of sub-shapes.
6059             For each sub-shape ID of @a theShapeWhat return a list of corresponding sub-shape
6060             IDs of @a theShapeWhere.
6061             For example, if theShapeWhat is a box and theShapeWhere is this box cut into 
6062             two parts by a plane, then the result can be as this: 
6063               len( result_list ) = 35,
6064               result_list[ 1 ] = [ 2, 36 ], which means that the box (ID 1) turned into two
6065             solids with IDs 2 and 36 within theShapeWhere
6066
6067             Parameters:
6068                 theShapeWhere Shape to find sub-shapes of.
6069                 theShapeWhat Shape, specifying what to find.
6070
6071             Returns:
6072                 List of lists of sub-shape IDS of theShapeWhere.
6073             """
6074             return self.ShapesOp.GetInPlaceMap(theShapeWhere, theShapeWhat)
6075
6076         ## Get sub-shape of theShapeWhere, which is
6077         #  equal to \a theShapeWhat.
6078         #  @param theShapeWhere Shape to find sub-shape of.
6079         #  @param theShapeWhat Shape, specifying what to find.
6080         #  @param theName Object name; when specified, this parameter is used
6081         #         for result publication in the study. Otherwise, if automatic
6082         #         publication is switched on, default value is used for result name.
6083         #
6084         #  @return New GEOM.GEOM_Object for found sub-shape.
6085         #
6086         #  @ref swig_GetSame "Example"
6087         @ManageTransactions("ShapesOp")
6088         def GetSame(self, theShapeWhere, theShapeWhat, theName=None):
6089             """
6090             Get sub-shape of theShapeWhere, which is
6091             equal to theShapeWhat.
6092
6093             Parameters:
6094                 theShapeWhere Shape to find sub-shape of.
6095                 theShapeWhat Shape, specifying what to find.
6096                 theName Object name; when specified, this parameter is used
6097                         for result publication in the study. Otherwise, if automatic
6098                         publication is switched on, default value is used for result name.
6099
6100             Returns:
6101                 New GEOM.GEOM_Object for found sub-shape.
6102             """
6103             anObj = self.ShapesOp.GetSame(theShapeWhere, theShapeWhat)
6104             RaiseIfFailed("GetSame", self.ShapesOp)
6105             self._autoPublish(anObj, theName, "sameShape")
6106             return anObj
6107
6108
6109         ## Get sub-shape indices of theShapeWhere, which is
6110         #  equal to \a theShapeWhat.
6111         #  @param theShapeWhere Shape to find sub-shape of.
6112         #  @param theShapeWhat Shape, specifying what to find.
6113         #  @return List of all found sub-shapes indices.
6114         #
6115         #  @ref swig_GetSame "Example"
6116         @ManageTransactions("ShapesOp")
6117         def GetSameIDs(self, theShapeWhere, theShapeWhat):
6118             """
6119             Get sub-shape indices of theShapeWhere, which is
6120             equal to theShapeWhat.
6121
6122             Parameters:
6123                 theShapeWhere Shape to find sub-shape of.
6124                 theShapeWhat Shape, specifying what to find.
6125
6126             Returns:
6127                 List of all found sub-shapes indices.
6128             """
6129             anObj = self.ShapesOp.GetSameIDs(theShapeWhere, theShapeWhat)
6130             RaiseIfFailed("GetSameIDs", self.ShapesOp)
6131             return anObj
6132
6133         ## Resize the input edge with the new Min and Max parameters.
6134         #  The input edge parameters range is [0, 1]. If theMin parameter is
6135         #  negative, the input edge is extended, otherwise it is shrinked by
6136         #  theMin parameter. If theMax is greater than 1, the edge is extended,
6137         #  otherwise it is shrinked by theMax parameter.
6138         #  @param theEdge the input edge to be resized.
6139         #  @param theMin the minimal parameter value.
6140         #  @param theMax the maximal parameter value.
6141         #  @param theName Object name; when specified, this parameter is used
6142         #         for result publication in the study. Otherwise, if automatic
6143         #         publication is switched on, default value is used for result name.
6144         #  @return New GEOM.GEOM_Object, containing the created edge.
6145         #
6146         #  @ref tui_extend "Example"
6147         @ManageTransactions("ShapesOp")
6148         def ExtendEdge(self, theEdge, theMin, theMax, theName=None):
6149             """
6150             Resize the input edge with the new Min and Max parameters.
6151             The input edge parameters range is [0, 1]. If theMin parameter is
6152             negative, the input edge is extended, otherwise it is shrinked by
6153             theMin parameter. If theMax is greater than 1, the edge is extended,
6154             otherwise it is shrinked by theMax parameter.
6155
6156             Parameters:
6157                 theEdge the input edge to be resized.
6158                 theMin the minimal parameter value.
6159                 theMax the maximal parameter value.
6160                 theName Object name; when specified, this parameter is used
6161                         for result publication in the study. Otherwise, if automatic
6162                         publication is switched on, default value is used for result name.
6163
6164             Returns:
6165                 New GEOM.GEOM_Object, containing the created edge.
6166             """
6167             theMin, theMax, Parameters = ParseParameters(theMin, theMax)
6168             anObj = self.ShapesOp.ExtendEdge(theEdge, theMin, theMax)
6169             RaiseIfFailed("ExtendEdge", self.ShapesOp)
6170             anObj.SetParameters(Parameters)
6171             self._autoPublish(anObj, theName, "edge")
6172             return anObj
6173
6174         ## Resize the input face with the new UMin, UMax, VMin and VMax
6175         #  parameters. The input face U and V parameters range is [0, 1]. If
6176         #  theUMin parameter is negative, the input face is extended, otherwise
6177         #  it is shrinked along U direction by theUMin parameter. If theUMax is
6178         #  greater than 1, the face is extended, otherwise it is shrinked along
6179         #  U direction by theUMax parameter. So as for theVMin, theVMax and
6180         #  V direction of the input face.
6181         #  @param theFace the input face to be resized.
6182         #  @param theUMin the minimal U parameter value.
6183         #  @param theUMax the maximal U parameter value.
6184         #  @param theVMin the minimal V parameter value.
6185         #  @param theVMax the maximal V parameter value.
6186         #  @param theName Object name; when specified, this parameter is used
6187         #         for result publication in the study. Otherwise, if automatic
6188         #         publication is switched on, default value is used for result name.
6189         #  @return New GEOM.GEOM_Object, containing the created face.
6190         #
6191         #  @ref tui_extend "Example"
6192         @ManageTransactions("ShapesOp")
6193         def ExtendFace(self, theFace, theUMin, theUMax,
6194                        theVMin, theVMax, theName=None):
6195             """
6196             Resize the input face with the new UMin, UMax, VMin and VMax
6197             parameters. The input face U and V parameters range is [0, 1]. If
6198             theUMin parameter is negative, the input face is extended, otherwise
6199             it is shrinked along U direction by theUMin parameter. If theUMax is
6200             greater than 1, the face is extended, otherwise it is shrinked along
6201             U direction by theUMax parameter. So as for theVMin, theVMax and
6202             V direction of the input face.
6203
6204             Parameters:
6205                 theFace the input face to be resized.
6206                 theUMin the minimal U parameter value.
6207                 theUMax the maximal U parameter value.
6208                 theVMin the minimal V parameter value.
6209                 theVMax the maximal V parameter value.
6210                 theName Object name; when specified, this parameter is used
6211                         for result publication in the study. Otherwise, if automatic
6212                         publication is switched on, default value is used for result name.
6213
6214             Returns:
6215                 New GEOM.GEOM_Object, containing the created face.
6216             """
6217             theUMin, theUMax, theVMin, theVMax, Parameters = ParseParameters(theUMin, theUMax, theVMin, theVMax)
6218             anObj = self.ShapesOp.ExtendFace(theFace, theUMin, theUMax,
6219                                              theVMin, theVMax)
6220             RaiseIfFailed("ExtendFace", self.ShapesOp)
6221             anObj.SetParameters(Parameters)
6222             self._autoPublish(anObj, theName, "face")
6223             return anObj
6224
6225         ## This function takes some face as input parameter and creates new
6226         #  GEOM_Object, i.e. topological shape by extracting underlying surface
6227         #  of the source face and limiting it by the Umin, Umax, Vmin, Vmax
6228         #  parameters of the source face (in the parametrical space).
6229         #  @param theFace the input face.
6230         #  @param theName Object name; when specified, this parameter is used
6231         #         for result publication in the study. Otherwise, if automatic
6232         #         publication is switched on, default value is used for result name.
6233         #  @return New GEOM.GEOM_Object, containing the created face.
6234         #
6235         #  @ref tui_creation_surface "Example"
6236         @ManageTransactions("ShapesOp")
6237         def MakeSurfaceFromFace(self, theFace, theName=None):
6238             """
6239             This function takes some face as input parameter and creates new
6240             GEOM_Object, i.e. topological shape by extracting underlying surface
6241             of the source face and limiting it by the Umin, Umax, Vmin, Vmax
6242             parameters of the source face (in the parametrical space).
6243
6244             Parameters:
6245                 theFace the input face.
6246                 theName Object name; when specified, this parameter is used
6247                         for result publication in the study. Otherwise, if automatic
6248                         publication is switched on, default value is used for result name.
6249
6250             Returns:
6251                 New GEOM.GEOM_Object, containing the created face.
6252             """
6253             anObj = self.ShapesOp.MakeSurfaceFromFace(theFace)
6254             RaiseIfFailed("MakeSurfaceFromFace", self.ShapesOp)
6255             self._autoPublish(anObj, theName, "surface")
6256             return anObj
6257
6258         # end of l4_obtain
6259         ## @}
6260
6261         ## @addtogroup l4_access
6262         ## @{
6263
6264         ## Obtain a composite sub-shape of <VAR>aShape</VAR>, composed from sub-shapes
6265         #  of aShape, selected by their unique IDs inside <VAR>aShape</VAR>
6266         #  @param aShape Shape to get sub-shape of.
6267         #  @param ListOfID List of sub-shapes indices.
6268         #  @param theName Object name; when specified, this parameter is used
6269         #         for result publication in the study. Otherwise, if automatic
6270         #         publication is switched on, default value is used for result name.
6271         #
6272         #  @return Found sub-shape.
6273         #
6274         #  @ref swig_all_decompose "Example"
6275         def GetSubShape(self, aShape, ListOfID, theName=None):
6276             """
6277             Obtain a composite sub-shape of aShape, composed from sub-shapes
6278             of aShape, selected by their unique IDs inside aShape
6279
6280             Parameters:
6281                 aShape Shape to get sub-shape of.
6282                 ListOfID List of sub-shapes indices.
6283                 theName Object name; when specified, this parameter is used
6284                         for result publication in the study. Otherwise, if automatic
6285                         publication is switched on, default value is used for result name.
6286
6287             Returns:
6288                 Found sub-shape.
6289             """
6290             # Example: see GEOM_TestAll.py
6291             anObj = self.AddSubShape(aShape,ListOfID)
6292             self._autoPublish(anObj, theName, "subshape")
6293             return anObj
6294
6295         ## Obtain unique ID of sub-shape <VAR>aSubShape</VAR> inside <VAR>aShape</VAR>
6296         #  of aShape, selected by their unique IDs inside <VAR>aShape</VAR>
6297         #  @param aShape Shape to get sub-shape of.
6298         #  @param aSubShape Sub-shapes of aShape.
6299         #  @return ID of found sub-shape.
6300         #
6301         #  @ref swig_all_decompose "Example"
6302         @ManageTransactions("LocalOp")
6303         def GetSubShapeID(self, aShape, aSubShape):
6304             """
6305             Obtain unique ID of sub-shape aSubShape inside aShape
6306             of aShape, selected by their unique IDs inside aShape
6307
6308             Parameters:
6309                aShape Shape to get sub-shape of.
6310                aSubShape Sub-shapes of aShape.
6311
6312             Returns:
6313                ID of found sub-shape.
6314             """
6315             # Example: see GEOM_TestAll.py
6316             anID = self.LocalOp.GetSubShapeIndex(aShape, aSubShape)
6317             RaiseIfFailed("GetSubShapeIndex", self.LocalOp)
6318             return anID
6319
6320         ## Obtain unique IDs of sub-shapes <VAR>aSubShapes</VAR> inside <VAR>aShape</VAR>
6321         #  This function is provided for performance purpose. The complexity is O(n) with n
6322         #  the number of subobjects of aShape
6323         #  @param aShape Shape to get sub-shape of.
6324         #  @param aSubShapes Sub-shapes of aShape.
6325         #  @return list of IDs of found sub-shapes.
6326         #
6327         #  @ref swig_all_decompose "Example"
6328         @ManageTransactions("ShapesOp")
6329         def GetSubShapesIDs(self, aShape, aSubShapes):
6330             """
6331             Obtain a list of IDs of sub-shapes aSubShapes inside aShape
6332             This function is provided for performance purpose. The complexity is O(n) with n
6333             the number of subobjects of aShape
6334
6335             Parameters:
6336                aShape Shape to get sub-shape of.
6337                aSubShapes Sub-shapes of aShape.
6338
6339             Returns:
6340                List of IDs of found sub-shape.
6341             """
6342             # Example: see GEOM_TestAll.py
6343             anIDs = self.ShapesOp.GetSubShapesIndices(aShape, aSubShapes)
6344             RaiseIfFailed("GetSubShapesIndices", self.ShapesOp)
6345             return anIDs
6346
6347         # end of l4_access
6348         ## @}
6349
6350         ## @addtogroup l4_decompose
6351         ## @{
6352
6353         ## Get all sub-shapes and groups of \a theShape,
6354         #  that were created already by any other methods.
6355         #  @param theShape Any shape.
6356         #  @param theGroupsOnly If this parameter is TRUE, only groups will be
6357         #                       returned, else all found sub-shapes and groups.
6358         #  @return List of existing sub-objects of \a theShape.
6359         #
6360         #  @ref swig_all_decompose "Example"
6361         @ManageTransactions("ShapesOp")
6362         def GetExistingSubObjects(self, theShape, theGroupsOnly = False):
6363             """
6364             Get all sub-shapes and groups of theShape,
6365             that were created already by any other methods.
6366
6367             Parameters:
6368                 theShape Any shape.
6369                 theGroupsOnly If this parameter is TRUE, only groups will be
6370                                  returned, else all found sub-shapes and groups.
6371
6372             Returns:
6373                 List of existing sub-objects of theShape.
6374             """
6375             # Example: see GEOM_TestAll.py
6376             ListObj = self.ShapesOp.GetExistingSubObjects(theShape, theGroupsOnly)
6377             RaiseIfFailed("GetExistingSubObjects", self.ShapesOp)
6378             return ListObj
6379
6380         ## Get all groups of \a theShape,
6381         #  that were created already by any other methods.
6382         #  @param theShape Any shape.
6383         #  @return List of existing groups of \a theShape.
6384         #
6385         #  @ref swig_all_decompose "Example"
6386         @ManageTransactions("ShapesOp")
6387         def GetGroups(self, theShape):
6388             """
6389             Get all groups of theShape,
6390             that were created already by any other methods.
6391
6392             Parameters:
6393                 theShape Any shape.
6394
6395             Returns:
6396                 List of existing groups of theShape.
6397             """
6398             # Example: see GEOM_TestAll.py
6399             ListObj = self.ShapesOp.GetExistingSubObjects(theShape, True)
6400             RaiseIfFailed("GetExistingSubObjects", self.ShapesOp)
6401             return ListObj
6402
6403         ## Explode a shape on sub-shapes of a given type.
6404         #  If the shape itself matches the type, it is also returned.
6405         #  @param aShape Shape to be exploded.
6406         #  @param aType Type of sub-shapes to be retrieved (see ShapeType())
6407         #  @param theName Object name; when specified, this parameter is used
6408         #         for result publication in the study. Otherwise, if automatic
6409         #         publication is switched on, default value is used for result name.
6410         #
6411         #  @return List of sub-shapes of type theShapeType, contained in theShape.
6412         #
6413         #  @ref swig_all_decompose "Example"
6414         @ManageTransactions("ShapesOp")
6415         def SubShapeAll(self, aShape, aType, theName=None):
6416             """
6417             Explode a shape on sub-shapes of a given type.
6418             If the shape itself matches the type, it is also returned.
6419
6420             Parameters:
6421                 aShape Shape to be exploded.
6422                 aType Type of sub-shapes to be retrieved (see geompy.ShapeType)
6423                 theName Object name; when specified, this parameter is used
6424                         for result publication in the study. Otherwise, if automatic
6425                         publication is switched on, default value is used for result name.
6426
6427             Returns:
6428                 List of sub-shapes of type theShapeType, contained in theShape.
6429             """
6430             # Example: see GEOM_TestAll.py
6431             ListObj = self.ShapesOp.MakeAllSubShapes(aShape, EnumToLong( aType ), False)
6432             RaiseIfFailed("SubShapeAll", self.ShapesOp)
6433             self._autoPublish(ListObj, theName, "subshape")
6434             return ListObj
6435
6436         ## Explode a shape on sub-shapes of a given type.
6437         #  @param aShape Shape to be exploded.
6438         #  @param aType Type of sub-shapes to be retrieved (see ShapeType())
6439         #  @return List of IDs of sub-shapes.
6440         #
6441         #  @ref swig_all_decompose "Example"
6442         @ManageTransactions("ShapesOp")
6443         def SubShapeAllIDs(self, aShape, aType):
6444             """
6445             Explode a shape on sub-shapes of a given type.
6446
6447             Parameters:
6448                 aShape Shape to be exploded (see geompy.ShapeType)
6449                 aType Type of sub-shapes to be retrieved (see geompy.ShapeType)
6450
6451             Returns:
6452                 List of IDs of sub-shapes.
6453             """
6454             ListObj = self.ShapesOp.GetAllSubShapesIDs(aShape, EnumToLong( aType ), False)
6455             RaiseIfFailed("SubShapeAllIDs", self.ShapesOp)
6456             return ListObj
6457
6458         ## Obtain a compound of sub-shapes of <VAR>aShape</VAR>,
6459         #  selected by their indices in list of all sub-shapes of type <VAR>aType</VAR>.
6460         #  Each index is in range [1, Nb_Sub-Shapes_Of_Given_Type]
6461         #  @param aShape Shape to get sub-shape of.
6462         #  @param ListOfInd List of sub-shapes indices.
6463         #  @param aType Type of sub-shapes to be retrieved (see ShapeType())
6464         #  @param theName Object name; when specified, this parameter is used
6465         #         for result publication in the study. Otherwise, if automatic
6466         #         publication is switched on, default value is used for result name.
6467         #
6468         #  @return A compound of sub-shapes of aShape.
6469         #
6470         #  @ref swig_all_decompose "Example"
6471         def SubShape(self, aShape, aType, ListOfInd, theName=None):
6472             """
6473             Obtain a compound of sub-shapes of aShape,
6474             selected by their indices in list of all sub-shapes of type aType.
6475             Each index is in range [1, Nb_Sub-Shapes_Of_Given_Type]
6476
6477             Parameters:
6478                 aShape Shape to get sub-shape of.
6479                 ListOfID List of sub-shapes indices.
6480                 aType Type of sub-shapes to be retrieved (see geompy.ShapeType)
6481                 theName Object name; when specified, this parameter is used
6482                         for result publication in the study. Otherwise, if automatic
6483                         publication is switched on, default value is used for result name.
6484
6485             Returns:
6486                 A compound of sub-shapes of aShape.
6487             """
6488             # Example: see GEOM_TestAll.py
6489             ListOfIDs = []
6490             AllShapeIDsList = self.SubShapeAllIDs(aShape, EnumToLong( aType ))
6491             for ind in ListOfInd:
6492                 ListOfIDs.append(AllShapeIDsList[ind - 1])
6493             # note: auto-publishing is done in self.GetSubShape()
6494             anObj = self.GetSubShape(aShape, ListOfIDs, theName)
6495             return anObj
6496
6497         ## Explode a shape on sub-shapes of a given type.
6498         #  Sub-shapes will be sorted taking into account their gravity centers,
6499         #  to provide stable order of sub-shapes. Please see
6500         #  @ref sorting_shapes_page "Description of Sorting Shapes Algorithm".
6501         #  If the shape itself matches the type, it is also returned.
6502         #  @param aShape Shape to be exploded.
6503         #  @param aType Type of sub-shapes to be retrieved (see ShapeType())
6504         #  @param theName Object name; when specified, this parameter is used
6505         #         for result publication in the study. Otherwise, if automatic
6506         #         publication is switched on, default value is used for result name.
6507         #
6508         #  @return List of sub-shapes of type theShapeType, contained in theShape.
6509         #
6510         #  @ref swig_SubShapeAllSorted "Example"
6511         @ManageTransactions("ShapesOp")
6512         def SubShapeAllSortedCentres(self, aShape, aType, theName=None):
6513             """
6514             Explode a shape on sub-shapes of a given type.
6515             Sub-shapes will be sorted taking into account their gravity centers,
6516             to provide stable order of sub-shapes.
6517             If the shape itself matches the type, it is also returned.
6518
6519             Parameters:
6520                 aShape Shape to be exploded.
6521                 aType Type of sub-shapes to be retrieved (see geompy.ShapeType)
6522                 theName Object name; when specified, this parameter is used
6523                         for result publication in the study. Otherwise, if automatic
6524                         publication is switched on, default value is used for result name.
6525
6526             Returns:
6527                 List of sub-shapes of type theShapeType, contained in theShape.
6528             """
6529             # Example: see GEOM_TestAll.py
6530             ListObj = self.ShapesOp.MakeAllSubShapes(aShape, EnumToLong( aType ), True)
6531             RaiseIfFailed("SubShapeAllSortedCentres", self.ShapesOp)
6532             self._autoPublish(ListObj, theName, "subshape")
6533             return ListObj
6534
6535         ## Explode a shape on sub-shapes of a given type.
6536         #  Sub-shapes will be sorted taking into account their gravity centers,
6537         #  to provide stable order of sub-shapes. Please see
6538         #  @ref sorting_shapes_page "Description of Sorting Shapes Algorithm".
6539         #  @param aShape Shape to be exploded.
6540         #  @param aType Type of sub-shapes to be retrieved (see ShapeType())
6541         #  @return List of IDs of sub-shapes.
6542         #
6543         #  @ref swig_all_decompose "Example"
6544         @ManageTransactions("ShapesOp")
6545         def SubShapeAllSortedCentresIDs(self, aShape, aType):
6546             """
6547             Explode a shape on sub-shapes of a given type.
6548             Sub-shapes will be sorted taking into account their gravity centers,
6549             to provide stable order of sub-shapes.
6550
6551             Parameters:
6552                 aShape Shape to be exploded.
6553                 aType Type of sub-shapes to be retrieved (see geompy.ShapeType)
6554
6555             Returns:
6556                 List of IDs of sub-shapes.
6557             """
6558             ListIDs = self.ShapesOp.GetAllSubShapesIDs(aShape, EnumToLong( aType ), True)
6559             RaiseIfFailed("SubShapeAllIDs", self.ShapesOp)
6560             return ListIDs
6561
6562         ## Obtain a compound of sub-shapes of <VAR>aShape</VAR>,
6563         #  selected by they indices in sorted list of all sub-shapes of type <VAR>aType</VAR>.
6564         #  Please see @ref sorting_shapes_page "Description of Sorting Shapes Algorithm".
6565         #  Each index is in range [1, Nb_Sub-Shapes_Of_Given_Type]
6566         #  @param aShape Shape to get sub-shape of.
6567         #  @param ListOfInd List of sub-shapes indices.
6568         #  @param aType Type of sub-shapes to be retrieved (see ShapeType())
6569         #  @param theName Object name; when specified, this parameter is used
6570         #         for result publication in the study. Otherwise, if automatic
6571         #         publication is switched on, default value is used for result name.
6572         #
6573         #  @return A compound of sub-shapes of aShape.
6574         #
6575         #  @ref swig_all_decompose "Example"
6576         def SubShapeSortedCentres(self, aShape, aType, ListOfInd, theName=None):
6577             """
6578             Obtain a compound of sub-shapes of aShape,
6579             selected by they indices in sorted list of all sub-shapes of type aType.
6580             Each index is in range [1, Nb_Sub-Shapes_Of_Given_Type]
6581
6582             Parameters:
6583                 aShape Shape to get sub-shape of.
6584                 ListOfID List of sub-shapes indices.
6585                 aType Type of sub-shapes to be retrieved (see geompy.ShapeType)
6586                 theName Object name; when specified, this parameter is used
6587                         for result publication in the study. Otherwise, if automatic
6588                         publication is switched on, default value is used for result name.
6589
6590             Returns:
6591                 A compound of sub-shapes of aShape.
6592             """
6593             # Example: see GEOM_TestAll.py
6594             ListOfIDs = []
6595             AllShapeIDsList = self.SubShapeAllSortedCentresIDs(aShape, EnumToLong( aType ))
6596             for ind in ListOfInd:
6597                 ListOfIDs.append(AllShapeIDsList[ind - 1])
6598             # note: auto-publishing is done in self.GetSubShape()
6599             anObj = self.GetSubShape(aShape, ListOfIDs, theName)
6600             return anObj
6601
6602         ## Extract shapes (excluding the main shape) of given type.
6603         #  @param aShape The shape.
6604         #  @param aType  The shape type (see ShapeType())
6605         #  @param isSorted Boolean flag to switch sorting on/off. Please see
6606         #         @ref sorting_shapes_page "Description of Sorting Shapes Algorithm".
6607         #  @param theName Object name; when specified, this parameter is used
6608         #         for result publication in the study. Otherwise, if automatic
6609         #         publication is switched on, default value is used for result name.
6610         #
6611         #  @return List of sub-shapes of type aType, contained in aShape.
6612         #
6613         #  @ref swig_FilletChamfer "Example"
6614         @ManageTransactions("ShapesOp")
6615         def ExtractShapes(self, aShape, aType, isSorted = False, theName=None):
6616             """
6617             Extract shapes (excluding the main shape) of given type.
6618
6619             Parameters:
6620                 aShape The shape.
6621                 aType  The shape type (see geompy.ShapeType)
6622                 isSorted Boolean flag to switch sorting on/off.
6623                 theName Object name; when specified, this parameter is used
6624                         for result publication in the study. Otherwise, if automatic
6625                         publication is switched on, default value is used for result name.
6626
6627             Returns:
6628                 List of sub-shapes of type aType, contained in aShape.
6629             """
6630             # Example: see GEOM_TestAll.py
6631             ListObj = self.ShapesOp.ExtractSubShapes(aShape, EnumToLong( aType ), isSorted)
6632             RaiseIfFailed("ExtractSubShapes", self.ShapesOp)
6633             self._autoPublish(ListObj, theName, "subshape")
6634             return ListObj
6635
6636         ## Get a set of sub-shapes defined by their unique IDs inside <VAR>aShape</VAR>
6637         #  @param aShape Main shape.
6638         #  @param anIDs List of unique IDs of sub-shapes inside <VAR>aShape</VAR>.
6639         #  @param theName Object name; when specified, this parameter is used
6640         #         for result publication in the study. Otherwise, if automatic
6641         #         publication is switched on, default value is used for result name.
6642         #  @return List of GEOM.GEOM_Object, corresponding to found sub-shapes.
6643         #
6644         #  @ref swig_all_decompose "Example"
6645         @ManageTransactions("ShapesOp")
6646         def SubShapes(self, aShape, anIDs, theName=None):
6647             """
6648             Get a set of sub-shapes defined by their unique IDs inside theMainShape
6649
6650             Parameters:
6651                 aShape Main shape.
6652                 anIDs List of unique IDs of sub-shapes inside theMainShape.
6653                 theName Object name; when specified, this parameter is used
6654                         for result publication in the study. Otherwise, if automatic
6655                         publication is switched on, default value is used for result name.
6656
6657             Returns:
6658                 List of GEOM.GEOM_Object, corresponding to found sub-shapes.
6659             """
6660             # Example: see GEOM_TestAll.py
6661             ListObj = self.ShapesOp.MakeSubShapes(aShape, anIDs)
6662             RaiseIfFailed("SubShapes", self.ShapesOp)
6663             self._autoPublish(ListObj, theName, "subshape")
6664             return ListObj
6665
6666         ## Explode a shape into edges sorted in a row from a starting point.
6667         #  @param theShape the shape to be exploded on edges.
6668         #  @param theStartPoint the starting point.
6669         #  @param theName Object name; when specified, this parameter is used
6670         #         for result publication in the study. Otherwise, if automatic
6671         #         publication is switched on, default value is used for result name.
6672         #  @return List of GEOM.GEOM_Object that is actually an ordered list
6673         #          of edges sorted in a row from a starting point.
6674         #
6675         #  @ref swig_GetSubShapeEdgeSorted "Example"
6676         @ManageTransactions("ShapesOp")
6677         def GetSubShapeEdgeSorted(self, theShape, theStartPoint, theName=None):
6678             """
6679             Explode a shape into edges sorted in a row from a starting point.
6680
6681             Parameters:
6682                 theShape the shape to be exploded on edges.
6683                 theStartPoint the starting point.
6684                 theName Object name; when specified, this parameter is used
6685                         for result publication in the study. Otherwise, if automatic
6686                         publication is switched on, default value is used for result name.
6687
6688             Returns:
6689                 List of GEOM.GEOM_Object that is actually an ordered list
6690                 of edges sorted in a row from a starting point.
6691             """
6692             # Example: see GEOM_TestAll.py
6693             ListObj = self.ShapesOp.GetSubShapeEdgeSorted(theShape, theStartPoint)
6694             RaiseIfFailed("GetSubShapeEdgeSorted", self.ShapesOp)
6695             self._autoPublish(ListObj, theName, "SortedEdges")
6696             return ListObj
6697
6698         ##
6699         # Return the list of subshapes that satisfies a certain tolerance
6700         # criterion. The user defines the type of shapes to be returned, the
6701         # condition and the tolerance value. The operation is defined for
6702         # faces, edges and vertices only. E.g. for theShapeType FACE,
6703         # theCondition GEOM::CC_GT and theTolerance 1.e-7 this method returns
6704         # all faces of theShape that have tolerances greater then 1.e7.
6705         #
6706         #  @param theShape the shape to be exploded
6707         #  @param theShapeType the type of sub-shapes to be returned (see
6708         #         ShapeType()). Can have the values FACE, EDGE and VERTEX only.
6709         #  @param theCondition the condition type (see GEOM::comparison_condition).
6710         #  @param theTolerance the tolerance filter.
6711         #  @param theName Object name; when specified, this parameter is used
6712         #         for result publication in the study. Otherwise, if automatic
6713         #         publication is switched on, default value is used for result name.
6714         #  @return the list of shapes that satisfy the conditions.
6715         #
6716         #  @ref swig_GetSubShapesWithTolerance "Example"
6717         @ManageTransactions("ShapesOp")
6718         def GetSubShapesWithTolerance(self, theShape, theShapeType,
6719                                       theCondition, theTolerance, theName=None):
6720             """
6721             Return the list of subshapes that satisfies a certain tolerance
6722             criterion. The user defines the type of shapes to be returned, the
6723             condition and the tolerance value. The operation is defined for
6724             faces, edges and vertices only. E.g. for theShapeType FACE,
6725             theCondition GEOM::CC_GT and theTolerance 1.e-7 this method returns
6726             all faces of theShape that have tolerances greater then 1.e7.
6727             
6728             Parameters:
6729                 theShape the shape to be exploded
6730                 theShapeType the type of sub-shapes to be returned (see
6731                              ShapeType()). Can have the values FACE,
6732                              EDGE and VERTEX only.
6733                 theCondition the condition type (see GEOM::comparison_condition).
6734                 theTolerance the tolerance filter.
6735                 theName Object name; when specified, this parameter is used
6736                         for result publication in the study. Otherwise, if automatic
6737                         publication is switched on, default value is used for result name.
6738
6739             Returns:
6740                 The list of shapes that satisfy the conditions.
6741             """
6742             # Example: see GEOM_TestAll.py
6743             ListObj = self.ShapesOp.GetSubShapesWithTolerance(theShape, EnumToLong(theShapeType),
6744                                                               theCondition, theTolerance)
6745             RaiseIfFailed("GetSubShapesWithTolerance", self.ShapesOp)
6746             self._autoPublish(ListObj, theName, "SubShapeWithTolerance")
6747             return ListObj
6748
6749         ## Check if the object is a sub-object of another GEOM object.
6750         #  @param aSubObject Checked sub-object (or its parent object, in case if
6751         #         \a theSubObjectIndex is non-zero).
6752         #  @param anObject An object that is checked for ownership (or its parent object,
6753         #         in case if \a theObjectIndex is non-zero).
6754         #  @param aSubObjectIndex When non-zero, specifies a sub-shape index that
6755         #         identifies a sub-object within its parent specified via \a theSubObject.
6756         #  @param anObjectIndex When non-zero, specifies a sub-shape index that
6757         #         identifies an object within its parent specified via \a theObject.
6758         #  @return TRUE, if the given object contains sub-object.
6759         @ManageTransactions("ShapesOp")
6760         def IsSubShapeBelongsTo(self, aSubObject, anObject, aSubObjectIndex = 0, anObjectIndex = 0):
6761             """
6762             Check if the object is a sub-object of another GEOM object.
6763             
6764             Parameters:
6765                 aSubObject Checked sub-object (or its parent object, in case if
6766                     \a theSubObjectIndex is non-zero).
6767                 anObject An object that is checked for ownership (or its parent object,
6768                     in case if \a theObjectIndex is non-zero).
6769                 aSubObjectIndex When non-zero, specifies a sub-shape index that
6770                     identifies a sub-object within its parent specified via \a theSubObject.
6771                 anObjectIndex When non-zero, specifies a sub-shape index that
6772                     identifies an object within its parent specified via \a theObject.
6773
6774             Returns
6775                 TRUE, if the given object contains sub-object.
6776             """
6777             IsOk = self.ShapesOp.IsSubShapeBelongsTo(aSubObject, aSubObjectIndex, anObject, anObjectIndex)
6778             RaiseIfFailed("IsSubShapeBelongsTo", self.ShapesOp)
6779             return IsOk
6780
6781         ## Perform extraction of sub-shapes from the main shape.
6782         #
6783         #  @param theShape the main shape
6784         #  @param theListOfID the list of sub-shape IDs to be extracted from
6785         #         the main shape.
6786         #  @return New GEOM.GEOM_Object, containing the shape without
6787         #          extracted sub-shapes.
6788         #
6789         #  @ref swig_MakeExtraction "Example"
6790         @ManageTransactions("ShapesOp")
6791         def MakeExtraction(self, theShape, theListOfID, theName=None):
6792             """
6793             Perform extraction of sub-shapes from the main shape.
6794
6795             Parameters:
6796                 theShape the main shape
6797                 theListOfID the list of sub-shape IDs to be extracted from
6798                             the main shape.
6799
6800             Returns
6801                 New GEOM.GEOM_Object, containing the shape without
6802                 extracted sub-shapes.
6803             """
6804             # Example: see GEOM_TestAll.py
6805             (anObj, aStat) = self.ShapesOp.MakeExtraction(theShape, theListOfID)
6806             RaiseIfFailed("MakeExtraction", self.ShapesOp)
6807             self._autoPublish(anObj, theName, "Extraction")
6808             return anObj
6809
6810         # end of l4_decompose
6811         ## @}
6812
6813         ## @addtogroup l4_decompose_d
6814         ## @{
6815
6816         ## Deprecated method
6817         #  It works like SubShapeAllSortedCentres(), but wrongly
6818         #  defines centres of faces, shells and solids.
6819         @ManageTransactions("ShapesOp")
6820         def SubShapeAllSorted(self, aShape, aType, theName=None):
6821             """
6822             Deprecated method
6823             It works like geompy.SubShapeAllSortedCentres, but wrongly
6824             defines centres of faces, shells and solids.
6825             """
6826             ListObj = self.ShapesOp.MakeExplode(aShape, EnumToLong( aType ), True)
6827             RaiseIfFailed("MakeExplode", self.ShapesOp)
6828             self._autoPublish(ListObj, theName, "subshape")
6829             return ListObj
6830
6831         ## Deprecated method
6832         #  It works like SubShapeAllSortedCentresIDs(), but wrongly
6833         #  defines centres of faces, shells and solids.
6834         @ManageTransactions("ShapesOp")
6835         def SubShapeAllSortedIDs(self, aShape, aType):
6836             """
6837             Deprecated method
6838             It works like geompy.SubShapeAllSortedCentresIDs, but wrongly
6839             defines centres of faces, shells and solids.
6840             """
6841             ListIDs = self.ShapesOp.SubShapeAllIDs(aShape, EnumToLong( aType ), True)
6842             RaiseIfFailed("SubShapeAllIDs", self.ShapesOp)
6843             return ListIDs
6844
6845         ## Deprecated method
6846         #  It works like SubShapeSortedCentres(), but has a bug
6847         #  (wrongly defines centres of faces, shells and solids).
6848         def SubShapeSorted(self, aShape, aType, ListOfInd, theName=None):
6849             """
6850             Deprecated method
6851             It works like geompy.SubShapeSortedCentres, but has a bug
6852             (wrongly defines centres of faces, shells and solids).
6853             """
6854             ListOfIDs = []
6855             AllShapeIDsList = self.SubShapeAllSortedIDs(aShape, EnumToLong( aType ))
6856             for ind in ListOfInd:
6857                 ListOfIDs.append(AllShapeIDsList[ind - 1])
6858             # note: auto-publishing is done in self.GetSubShape()
6859             anObj = self.GetSubShape(aShape, ListOfIDs, theName)
6860             return anObj
6861
6862         # end of l4_decompose_d
6863         ## @}
6864
6865         ## @addtogroup l3_healing
6866         ## @{
6867
6868         ## Apply a sequence of Shape Healing operators to the given object.
6869         #  @param theShape Shape to be processed.
6870         #  @param theOperators List of names of operators ("FixShape", "SplitClosedFaces", etc.).
6871         #  @param theParameters List of names of parameters
6872         #                    ("FixShape.Tolerance3d", "SplitClosedFaces.NbSplitPoints", etc.).
6873         #  @param theValues List of values of parameters, in the same order
6874         #                    as parameters are listed in <VAR>theParameters</VAR> list.
6875         #  @param theName Object name; when specified, this parameter is used
6876         #         for result publication in the study. Otherwise, if automatic
6877         #         publication is switched on, default value is used for result name.
6878         #
6879         #  <b> Operators and Parameters: </b> \n
6880         #
6881         #  * \b FixShape - corrects invalid shapes. \n
6882         #  - \b FixShape.Tolerance3d - work tolerance for detection of the problems and correction of them. \n
6883         #  - \b FixShape.MaxTolerance3d - maximal possible tolerance of the shape after correction. \n
6884         #
6885         #  * \b FixFaceSize - removes small faces, such as spots and strips.\n
6886         #  - \b FixFaceSize.Tolerance - defines minimum possible face size. \n
6887         #  - \b DropSmallEdges - removes edges, which merge with neighbouring edges. \n
6888         #  - \b DropSmallEdges.Tolerance3d - defines minimum possible distance between two parallel edges.\n
6889         #  - \b DropSmallSolids - either removes small solids or merges them with neighboring ones. \n
6890         #  - \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
6891         #  - \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
6892         #  - \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
6893         #
6894         #  * \b SplitAngle - splits faces based on conical surfaces, surfaces of revolution and cylindrical
6895         #    surfaces in segments using a certain angle. \n
6896         #  - \b SplitAngle.Angle - the central angle of the resulting segments (i.e. we obtain two segments
6897         #    if Angle=180, four if Angle=90, etc). \n
6898         #  - \b SplitAngle.MaxTolerance - maximum possible tolerance among the resulting segments.\n
6899         #
6900         #  * \b SplitClosedFaces - splits closed faces in segments.
6901         #    The number of segments depends on the number of splitting points.\n
6902         #  - \b SplitClosedFaces.NbSplitPoints - the number of splitting points.\n
6903         #
6904         #  * \b SplitContinuity - splits shapes to reduce continuities of curves and surfaces.\n
6905         #  - \b SplitContinuity.Tolerance3d - 3D tolerance for correction of geometry.\n
6906         #  - \b SplitContinuity.SurfaceContinuity - required continuity for surfaces.\n
6907         #  - \b SplitContinuity.CurveContinuity - required continuity for curves.\n
6908         #   This and the previous parameters can take the following values:\n
6909         #   \b Parametric \b Continuity \n
6910         #   \b C0 (Positional Continuity): curves are joined (the end positions of curves or surfaces
6911         #   are coincidental. The curves or surfaces may still meet at an angle, giving rise to a sharp corner or edge).\n
6912         #   \b C1 (Tangential Continuity): first derivatives are equal (the end vectors of curves or surfaces are parallel,
6913         #    ruling out sharp edges).\n
6914         #   \b C2 (Curvature Continuity): first and second derivatives are equal (the end vectors of curves or surfaces
6915         #       are of the same magnitude).\n
6916         #   \b CN N-th derivatives are equal (both the direction and the magnitude of the Nth derivatives of curves
6917         #    or surfaces (d/du C(u)) are the same at junction. \n
6918         #   \b Geometric \b Continuity \n
6919         #   \b G1: first derivatives are proportional at junction.\n
6920         #   The curve tangents thus have the same direction, but not necessarily the same magnitude.
6921         #      i.e., C1'(1) = (a,b,c) and C2'(0) = (k*a, k*b, k*c).\n
6922         #   \b G2: first and second derivatives are proportional at junction.
6923         #   As the names imply, geometric continuity requires the geometry to be continuous, while parametric
6924         #    continuity requires that the underlying parameterization was continuous as well.
6925         #   Parametric continuity of order n implies geometric continuity of order n, but not vice-versa.\n
6926         #
6927         #  * \b BsplineRestriction - converts curves and surfaces to Bsplines and processes them with the following parameters:\n
6928         #  - \b BSplineRestriction.SurfaceMode - approximation of surfaces if restriction is necessary.\n
6929         #  - \b BSplineRestriction.Curve3dMode - conversion of any 3D curve to BSpline and approximation.\n
6930         #  - \b BSplineRestriction.Curve2dMode - conversion of any 2D curve to BSpline and approximation.\n
6931         #  - \b BSplineRestriction.Tolerance3d - defines the possibility of surfaces and 3D curves approximation
6932         #       with the specified parameters.\n
6933         #  - \b BSplineRestriction.Tolerance2d - defines the possibility of surfaces and 2D curves approximation
6934         #       with the specified parameters.\n
6935         #  - \b BSplineRestriction.RequiredDegree - required degree of the resulting BSplines.\n
6936         #  - \b BSplineRestriction.RequiredNbSegments - required maximum number of segments of resultant BSplines.\n
6937         #  - \b BSplineRestriction.Continuity3d - continuity of the resulting surfaces and 3D curves.\n
6938         #  - \b BSplineRestriction.Continuity2d - continuity of the resulting 2D curves.\n
6939         #
6940         #  * \b ToBezier - converts curves and surfaces of any type to Bezier curves and surfaces.\n
6941         #  - \b ToBezier.SurfaceMode - if checked in, allows conversion of surfaces.\n
6942         #  - \b ToBezier.Curve3dMode - if checked in, allows conversion of 3D curves.\n
6943         #  - \b ToBezier.Curve2dMode - if checked in, allows conversion of 2D curves.\n
6944         #  - \b ToBezier.MaxTolerance - defines tolerance for detection and correction of problems.\n
6945         #
6946         #  * \b SameParameter - fixes edges of 2D and 3D curves not having the same parameter.\n
6947         #  - \b SameParameter.Tolerance3d - defines tolerance for fixing of edges.\n
6948         #
6949         #
6950         #  @return New GEOM.GEOM_Object, containing processed shape.
6951         #
6952         #  \n @ref tui_shape_processing "Example"
6953         @ManageTransactions("HealOp")
6954         def ProcessShape(self, theShape, theOperators, theParameters, theValues, theName=None):
6955             """
6956             Apply a sequence of Shape Healing operators to the given object.
6957
6958             Parameters:
6959                 theShape Shape to be processed.
6960                 theValues List of values of parameters, in the same order
6961                           as parameters are listed in theParameters list.
6962                 theOperators List of names of operators ('FixShape', 'SplitClosedFaces', etc.).
6963                 theParameters List of names of parameters
6964                               ('FixShape.Tolerance3d', 'SplitClosedFaces.NbSplitPoints', etc.).
6965                 theName Object name; when specified, this parameter is used
6966                         for result publication in the study. Otherwise, if automatic
6967                         publication is switched on, default value is used for result name.
6968
6969                 Operators and Parameters:
6970
6971                  * FixShape - corrects invalid shapes.
6972                      * FixShape.Tolerance3d - work tolerance for detection of the problems and correction of them.
6973                      * FixShape.MaxTolerance3d - maximal possible tolerance of the shape after correction.
6974                  * FixFaceSize - removes small faces, such as spots and strips.
6975                      * FixFaceSize.Tolerance - defines minimum possible face size.
6976                  * DropSmallEdges - removes edges, which merge with neighbouring edges.
6977                      * DropSmallEdges.Tolerance3d - defines minimum possible distance between two parallel edges.
6978                  * DropSmallSolids - either removes small solids or merges them with neighboring ones.
6979                      * 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.
6980                      * 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.
6981                      * 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.
6982
6983                  * SplitAngle - splits faces based on conical surfaces, surfaces of revolution and cylindrical surfaces
6984                                 in segments using a certain angle.
6985                      * SplitAngle.Angle - the central angle of the resulting segments (i.e. we obtain two segments
6986                                           if Angle=180, four if Angle=90, etc).
6987                      * SplitAngle.MaxTolerance - maximum possible tolerance among the resulting segments.
6988                  * SplitClosedFaces - splits closed faces in segments. The number of segments depends on the number of
6989                                       splitting points.
6990                      * SplitClosedFaces.NbSplitPoints - the number of splitting points.
6991                  * SplitContinuity - splits shapes to reduce continuities of curves and surfaces.
6992                      * SplitContinuity.Tolerance3d - 3D tolerance for correction of geometry.
6993                      * SplitContinuity.SurfaceContinuity - required continuity for surfaces.
6994                      * SplitContinuity.CurveContinuity - required continuity for curves.
6995                        This and the previous parameters can take the following values:
6996
6997                        Parametric Continuity:
6998                        C0 (Positional Continuity): curves are joined (the end positions of curves or surfaces are
6999                                                    coincidental. The curves or surfaces may still meet at an angle,
7000                                                    giving rise to a sharp corner or edge).
7001                        C1 (Tangential Continuity): first derivatives are equal (the end vectors of curves or surfaces
7002                                                    are parallel, ruling out sharp edges).
7003                        C2 (Curvature Continuity): first and second derivatives are equal (the end vectors of curves
7004                                                   or surfaces are of the same magnitude).
7005                        CN N-th derivatives are equal (both the direction and the magnitude of the Nth derivatives of
7006                           curves or surfaces (d/du C(u)) are the same at junction.
7007
7008                        Geometric Continuity:
7009                        G1: first derivatives are proportional at junction.
7010                            The curve tangents thus have the same direction, but not necessarily the same magnitude.
7011                            i.e., C1'(1) = (a,b,c) and C2'(0) = (k*a, k*b, k*c).
7012                        G2: first and second derivatives are proportional at junction. As the names imply,
7013                            geometric continuity requires the geometry to be continuous, while parametric continuity requires
7014                            that the underlying parameterization was continuous as well. Parametric continuity of order n implies
7015                            geometric continuity of order n, but not vice-versa.
7016                  * BsplineRestriction - converts curves and surfaces to Bsplines and processes them with the following parameters:
7017                      * BSplineRestriction.SurfaceMode - approximation of surfaces if restriction is necessary.
7018                      * BSplineRestriction.Curve3dMode - conversion of any 3D curve to BSpline and approximation.
7019                      * BSplineRestriction.Curve2dMode - conversion of any 2D curve to BSpline and approximation.
7020                      * BSplineRestriction.Tolerance3d - defines the possibility of surfaces and 3D curves approximation with
7021                                                         the specified parameters.
7022                      * BSplineRestriction.Tolerance2d - defines the possibility of surfaces and 2D curves approximation with
7023                                                         the specified parameters.
7024                      * BSplineRestriction.RequiredDegree - required degree of the resulting BSplines.
7025                      * BSplineRestriction.RequiredNbSegments - required maximum number of segments of resultant BSplines.
7026                      * BSplineRestriction.Continuity3d - continuity of the resulting surfaces and 3D curves.
7027                      * BSplineRestriction.Continuity2d - continuity of the resulting 2D curves.
7028                  * ToBezier - converts curves and surfaces of any type to Bezier curves and surfaces.
7029                      * ToBezier.SurfaceMode - if checked in, allows conversion of surfaces.
7030                      * ToBezier.Curve3dMode - if checked in, allows conversion of 3D curves.
7031                      * ToBezier.Curve2dMode - if checked in, allows conversion of 2D curves.
7032                      * ToBezier.MaxTolerance - defines tolerance for detection and correction of problems.
7033                  * SameParameter - fixes edges of 2D and 3D curves not having the same parameter.
7034                      * SameParameter.Tolerance3d - defines tolerance for fixing of edges.
7035
7036             Returns:
7037                 New GEOM.GEOM_Object, containing processed shape.
7038
7039             Note: For more information look through SALOME Geometry User's Guide->
7040                   -> Introduction to Geometry-> Repairing Operations-> Shape Processing
7041             """
7042             # Example: see GEOM_TestHealing.py
7043             theValues,Parameters = ParseList(theValues)
7044             anObj = self.HealOp.ProcessShape(theShape, theOperators, theParameters, theValues)
7045             # To avoid script failure in case of good argument shape
7046             if self.HealOp.GetErrorCode() == "ShHealOper_NotError_msg":
7047                 return theShape
7048             RaiseIfFailed("ProcessShape", self.HealOp)
7049             for string in (theOperators + theParameters):
7050                 Parameters = ":" + Parameters
7051                 pass
7052             anObj.SetParameters(Parameters)
7053             self._autoPublish(anObj, theName, "healed")
7054             return anObj
7055
7056         ## Remove faces from the given object (shape).
7057         #  @param theObject Shape to be processed.
7058         #  @param theFaces Indices of faces to be removed, if EMPTY then the method
7059         #                  removes ALL faces of the given object.
7060         #  @param theName Object name; when specified, this parameter is used
7061         #         for result publication in the study. Otherwise, if automatic
7062         #         publication is switched on, default value is used for result name.
7063         #
7064         #  @return New GEOM.GEOM_Object, containing processed shape.
7065         #
7066         #  @ref tui_suppress_faces "Example"
7067         @ManageTransactions("HealOp")
7068         def SuppressFaces(self, theObject, theFaces, theName=None):
7069             """
7070             Remove faces from the given object (shape).
7071
7072             Parameters:
7073                 theObject Shape to be processed.
7074                 theFaces Indices of faces to be removed, if EMPTY then the method
7075                          removes ALL faces of the given object.
7076                 theName Object name; when specified, this parameter is used
7077                         for result publication in the study. Otherwise, if automatic
7078                         publication is switched on, default value is used for result name.
7079
7080             Returns:
7081                 New GEOM.GEOM_Object, containing processed shape.
7082             """
7083             # Example: see GEOM_TestHealing.py
7084             anObj = self.HealOp.SuppressFaces(theObject, theFaces)
7085             RaiseIfFailed("SuppressFaces", self.HealOp)
7086             self._autoPublish(anObj, theName, "suppressFaces")
7087             return anObj
7088
7089         ## Sewing of faces into a single shell.
7090         #  @param ListShape Shapes to be processed.
7091         #  @param theTolerance Required tolerance value.
7092         #  @param AllowNonManifold Flag that allows non-manifold sewing.
7093         #  @param theName Object name; when specified, this parameter is used
7094         #         for result publication in the study. Otherwise, if automatic
7095         #         publication is switched on, default value is used for result name.
7096         #
7097         #  @return New GEOM.GEOM_Object, containing a result shell.
7098         #
7099         #  @ref tui_sewing "Example"
7100         def MakeSewing(self, ListShape, theTolerance, AllowNonManifold=False, theName=None):
7101             """
7102             Sewing of faces into a single shell.
7103
7104             Parameters:
7105                 ListShape Shapes to be processed.
7106                 theTolerance Required tolerance value.
7107                 AllowNonManifold Flag that allows non-manifold sewing.
7108                 theName Object name; when specified, this parameter is used
7109                         for result publication in the study. Otherwise, if automatic
7110                         publication is switched on, default value is used for result name.
7111
7112             Returns:
7113                 New GEOM.GEOM_Object, containing containing a result shell.
7114             """
7115             # Example: see GEOM_TestHealing.py
7116             # note: auto-publishing is done in self.Sew()
7117             anObj = self.Sew(ListShape, theTolerance, AllowNonManifold, theName)
7118             return anObj
7119
7120         ## Sewing of faces into a single shell.
7121         #  @param ListShape Shapes to be processed.
7122         #  @param theTolerance Required tolerance value.
7123         #  @param AllowNonManifold Flag that allows non-manifold sewing.
7124         #  @param theName Object name; when specified, this parameter is used
7125         #         for result publication in the study. Otherwise, if automatic
7126         #         publication is switched on, default value is used for result name.
7127         #
7128         #  @return New GEOM.GEOM_Object, containing a result shell.
7129         @ManageTransactions("HealOp")
7130         def Sew(self, ListShape, theTolerance, AllowNonManifold=False, theName=None):
7131             """
7132             Sewing of faces into a single shell.
7133
7134             Parameters:
7135                 ListShape Shapes to be processed.
7136                 theTolerance Required tolerance value.
7137                 AllowNonManifold Flag that allows non-manifold sewing.
7138                 theName Object name; when specified, this parameter is used
7139                         for result publication in the study. Otherwise, if automatic
7140                         publication is switched on, default value is used for result name.
7141
7142             Returns:
7143                 New GEOM.GEOM_Object, containing a result shell.
7144             """
7145             # Example: see MakeSewing() above
7146             theTolerance,Parameters = ParseParameters(theTolerance)
7147             if AllowNonManifold:
7148                 anObj = self.HealOp.SewAllowNonManifold( ToList( ListShape ), theTolerance)
7149             else:
7150                 anObj = self.HealOp.Sew( ToList( ListShape ), theTolerance)
7151             # To avoid script failure in case of good argument shape
7152             # (Fix of test cases geom/bugs11/L7,L8)
7153             if self.HealOp.GetErrorCode() == "ShHealOper_NotError_msg":
7154                 return anObj
7155             RaiseIfFailed("Sew", self.HealOp)
7156             anObj.SetParameters(Parameters)
7157             self._autoPublish(anObj, theName, "sewed")
7158             return anObj
7159
7160         ## Rebuild the topology of theSolids by removing
7161         #  the faces that are shared by several solids.
7162         #  @param theSolids A compound or a list of solids to be processed.
7163         #  @param theName Object name; when specified, this parameter is used
7164         #         for result publication in the study. Otherwise, if automatic
7165         #         publication is switched on, default value is used for result name.
7166         #
7167         #  @return New GEOM.GEOM_Object, containing processed shape.
7168         #
7169         #  @ref tui_remove_webs "Example"
7170         @ManageTransactions("HealOp")
7171         def RemoveInternalFaces (self, theSolids, theName=None):
7172             """
7173             Rebuild the topology of theSolids by removing
7174             the faces that are shared by several solids.
7175
7176             Parameters:
7177                 theSolids A compound or a list of solids to be processed.
7178                 theName Object name; when specified, this parameter is used
7179                         for result publication in the study. Otherwise, if automatic
7180                         publication is switched on, default value is used for result name.
7181
7182             Returns:
7183                 New GEOM.GEOM_Object, containing processed shape.
7184             """
7185             # Example: see GEOM_TestHealing.py
7186             anObj = self.HealOp.RemoveInternalFaces(ToList(theSolids))
7187             RaiseIfFailed("RemoveInternalFaces", self.HealOp)
7188             self._autoPublish(anObj, theName, "removeWebs")
7189             return anObj
7190
7191         ## Remove internal wires and edges from the given object (face).
7192         #  @param theObject Shape to be processed.
7193         #  @param theWires Indices of wires to be removed, if EMPTY then the method
7194         #                  removes ALL internal wires of the given object.
7195         #  @param theName Object name; when specified, this parameter is used
7196         #         for result publication in the study. Otherwise, if automatic
7197         #         publication is switched on, default value is used for result name.
7198         #
7199         #  @return New GEOM.GEOM_Object, containing processed shape.
7200         #
7201         #  @ref tui_suppress_internal_wires "Example"
7202         @ManageTransactions("HealOp")
7203         def SuppressInternalWires(self, theObject, theWires, theName=None):
7204             """
7205             Remove internal wires and edges from the given object (face).
7206
7207             Parameters:
7208                 theObject Shape to be processed.
7209                 theWires Indices of wires to be removed, if EMPTY then the method
7210                          removes ALL internal wires of the given object.
7211                 theName Object name; when specified, this parameter is used
7212                         for result publication in the study. Otherwise, if automatic
7213                         publication is switched on, default value is used for result name.
7214
7215             Returns:
7216                 New GEOM.GEOM_Object, containing processed shape.
7217             """
7218             # Example: see GEOM_TestHealing.py
7219             anObj = self.HealOp.RemoveIntWires(theObject, theWires)
7220             RaiseIfFailed("RemoveIntWires", self.HealOp)
7221             self._autoPublish(anObj, theName, "suppressWires")
7222             return anObj
7223
7224         ## Remove internal closed contours (holes) from the given object.
7225         #  @param theObject Shape to be processed.
7226         #  @param theWires Indices of wires to be removed, if EMPTY then the method
7227         #                  removes ALL internal holes of the given object
7228         #  @param theName Object name; when specified, this parameter is used
7229         #         for result publication in the study. Otherwise, if automatic
7230         #         publication is switched on, default value is used for result name.
7231         #
7232         #  @return New GEOM.GEOM_Object, containing processed shape.
7233         #
7234         #  @ref tui_suppress_holes "Example"
7235         @ManageTransactions("HealOp")
7236         def SuppressHoles(self, theObject, theWires, theName=None):
7237             """
7238             Remove internal closed contours (holes) from the given object.
7239
7240             Parameters:
7241                 theObject Shape to be processed.
7242                 theWires Indices of wires to be removed, if EMPTY then the method
7243                          removes ALL internal holes of the given object
7244                 theName Object name; when specified, this parameter is used
7245                         for result publication in the study. Otherwise, if automatic
7246                         publication is switched on, default value is used for result name.
7247
7248             Returns:
7249                 New GEOM.GEOM_Object, containing processed shape.
7250             """
7251             # Example: see GEOM_TestHealing.py
7252             anObj = self.HealOp.FillHoles(theObject, theWires)
7253             RaiseIfFailed("FillHoles", self.HealOp)
7254             self._autoPublish(anObj, theName, "suppressHoles")
7255             return anObj
7256
7257         ## Close an open wire.
7258         #  @param theObject Shape to be processed.
7259         #  @param theWires Indexes of edge(s) and wire(s) to be closed within <VAR>theObject</VAR>'s shape,
7260         #                  if [ ], then <VAR>theObject</VAR> itself is a wire.
7261         #  @param isCommonVertex If True  : closure by creation of a common vertex,
7262         #                        If False : closure by creation of an edge between ends.
7263         #  @param theName Object name; when specified, this parameter is used
7264         #         for result publication in the study. Otherwise, if automatic
7265         #         publication is switched on, default value is used for result name.
7266         #
7267         #  @return New GEOM.GEOM_Object, containing processed shape.
7268         #
7269         #  @ref tui_close_contour "Example"
7270         @ManageTransactions("HealOp")
7271         def CloseContour(self,theObject, theWires, isCommonVertex, theName=None):
7272             """
7273             Close an open wire.
7274
7275             Parameters:
7276                 theObject Shape to be processed.
7277                 theWires Indexes of edge(s) and wire(s) to be closed within theObject's shape,
7278                          if [ ], then theObject itself is a wire.
7279                 isCommonVertex If True  : closure by creation of a common vertex,
7280                                If False : closure by creation of an edge between ends.
7281                 theName Object name; when specified, this parameter is used
7282                         for result publication in the study. Otherwise, if automatic
7283                         publication is switched on, default value is used for result name.
7284
7285             Returns:
7286                 New GEOM.GEOM_Object, containing processed shape.
7287             """
7288             # Example: see GEOM_TestHealing.py
7289             anObj = self.HealOp.CloseContour(theObject, theWires, isCommonVertex)
7290             RaiseIfFailed("CloseContour", self.HealOp)
7291             self._autoPublish(anObj, theName, "closeContour")
7292             return anObj
7293
7294         ## Addition of a point to a given edge object.
7295         #  @param theObject Shape to be processed.
7296         #  @param theEdgeIndex Index of edge to be divided within theObject's shape,
7297         #                      if -1, then theObject itself is the edge.
7298         #  @param theValue Value of parameter on edge or length parameter,
7299         #                  depending on \a isByParameter.
7300         #  @param isByParameter If TRUE : \a theValue is treated as a curve parameter [0..1], \n
7301         #                       if FALSE : \a theValue is treated as a length parameter [0..1]
7302         #  @param theName Object name; when specified, this parameter is used
7303         #         for result publication in the study. Otherwise, if automatic
7304         #         publication is switched on, default value is used for result name.
7305         #
7306         #  @return New GEOM.GEOM_Object, containing processed shape.
7307         #
7308         #  @ref tui_add_point_on_edge "Example"
7309         @ManageTransactions("HealOp")
7310         def DivideEdge(self, theObject, theEdgeIndex, theValue, isByParameter, theName=None):
7311             """
7312             Addition of a point to a given edge object.
7313
7314             Parameters:
7315                 theObject Shape to be processed.
7316                 theEdgeIndex Index of edge to be divided within theObject's shape,
7317                              if -1, then theObject itself is the edge.
7318                 theValue Value of parameter on edge or length parameter,
7319                          depending on isByParameter.
7320                 isByParameter If TRUE :  theValue is treated as a curve parameter [0..1],
7321                               if FALSE : theValue is treated as a length parameter [0..1]
7322                 theName Object name; when specified, this parameter is used
7323                         for result publication in the study. Otherwise, if automatic
7324                         publication is switched on, default value is used for result name.
7325
7326             Returns:
7327                 New GEOM.GEOM_Object, containing processed shape.
7328             """
7329             # Example: see GEOM_TestHealing.py
7330             theEdgeIndex,theValue,isByParameter,Parameters = ParseParameters(theEdgeIndex,theValue,isByParameter)
7331             anObj = self.HealOp.DivideEdge(theObject, theEdgeIndex, theValue, isByParameter)
7332             RaiseIfFailed("DivideEdge", self.HealOp)
7333             anObj.SetParameters(Parameters)
7334             self._autoPublish(anObj, theName, "divideEdge")
7335             return anObj
7336
7337         ## Addition of points to a given edge of \a theObject by projecting
7338         #  other points to the given edge.
7339         #  @param theObject Shape to be processed.
7340         #  @param theEdgeIndex Index of edge to be divided within theObject's shape,
7341         #                      if -1, then theObject itself is the edge.
7342         #  @param thePoints List of points to project to theEdgeIndex-th edge.
7343         #  @param theName Object name; when specified, this parameter is used
7344         #         for result publication in the study. Otherwise, if automatic
7345         #         publication is switched on, default value is used for result name.
7346         #
7347         #  @return New GEOM.GEOM_Object, containing processed shape.
7348         #
7349         #  @ref tui_add_point_on_edge "Example"
7350         @ManageTransactions("HealOp")
7351         def DivideEdgeByPoint(self, theObject, theEdgeIndex, thePoints, theName=None):
7352             """
7353             Addition of points to a given edge of \a theObject by projecting
7354             other points to the given edge.
7355
7356             Parameters:
7357                 theObject Shape to be processed.
7358                 theEdgeIndex The edge or its index to be divided within theObject's shape,
7359                              if -1, then theObject itself is the edge.
7360                 thePoints List of points to project to theEdgeIndex-th edge.
7361                 theName Object name; when specified, this parameter is used
7362                         for result publication in the study. Otherwise, if automatic
7363                         publication is switched on, default value is used for result name.
7364
7365             Returns:
7366                 New GEOM.GEOM_Object, containing processed shape.
7367             """
7368             # Example: see GEOM_TestHealing.py
7369             if isinstance( theEdgeIndex, GEOM._objref_GEOM_Object ):
7370                 theEdgeIndex = self.GetSubShapeID( theObject, theEdgeIndex )
7371             anObj = self.HealOp.DivideEdgeByPoint(theObject, theEdgeIndex, ToList( thePoints ))
7372             RaiseIfFailed("DivideEdgeByPoint", self.HealOp)
7373             self._autoPublish(anObj, theName, "divideEdge")
7374             return anObj
7375
7376         ## Suppress the vertices in the wire in case if adjacent edges are C1 continuous.
7377         #  @param theWire Wire to minimize the number of C1 continuous edges in.
7378         #  @param theVertices A list of vertices to suppress. If the list
7379         #                     is empty, all vertices in a wire will be assumed.
7380         #  @param theName Object name; when specified, this parameter is used
7381         #         for result publication in the study. Otherwise, if automatic
7382         #         publication is switched on, default value is used for result name.
7383         #
7384         #  @return New GEOM.GEOM_Object with modified wire.
7385         #
7386         #  @ref tui_fuse_collinear_edges "Example"
7387         @ManageTransactions("HealOp")
7388         def FuseCollinearEdgesWithinWire(self, theWire, theVertices = [], theName=None):
7389             """
7390             Suppress the vertices in the wire in case if adjacent edges are C1 continuous.
7391
7392             Parameters:
7393                 theWire Wire to minimize the number of C1 continuous edges in.
7394                 theVertices A list of vertices to suppress. If the list
7395                             is empty, all vertices in a wire will be assumed.
7396                 theName Object name; when specified, this parameter is used
7397                         for result publication in the study. Otherwise, if automatic
7398                         publication is switched on, default value is used for result name.
7399
7400             Returns:
7401                 New GEOM.GEOM_Object with modified wire.
7402             """
7403             anObj = self.HealOp.FuseCollinearEdgesWithinWire(theWire, theVertices)
7404             RaiseIfFailed("FuseCollinearEdgesWithinWire", self.HealOp)
7405             self._autoPublish(anObj, theName, "fuseEdges")
7406             return anObj
7407
7408         ## Change orientation of the given object. Updates given shape.
7409         #  @param theObject Shape to be processed.
7410         #  @return Updated <var>theObject</var>
7411         #
7412         #  @ref swig_todo "Example"
7413         @ManageTransactions("HealOp")
7414         def ChangeOrientationShell(self,theObject):
7415             """
7416             Change orientation of the given object. Updates given shape.
7417
7418             Parameters:
7419                 theObject Shape to be processed.
7420
7421             Returns:
7422                 Updated theObject
7423             """
7424             theObject = self.HealOp.ChangeOrientation(theObject)
7425             RaiseIfFailed("ChangeOrientation", self.HealOp)
7426             pass
7427
7428         ## Change orientation of the given object.
7429         #  @param theObject Shape to be processed.
7430         #  @param theName Object name; when specified, this parameter is used
7431         #         for result publication in the study. Otherwise, if automatic
7432         #         publication is switched on, default value is used for result name.
7433         #
7434         #  @return New GEOM.GEOM_Object, containing processed shape.
7435         #
7436         #  @ref swig_todo "Example"
7437         @ManageTransactions("HealOp")
7438         def ChangeOrientationShellCopy(self, theObject, theName=None):
7439             """
7440             Change orientation of the given object.
7441
7442             Parameters:
7443                 theObject Shape to be processed.
7444                 theName Object name; when specified, this parameter is used
7445                         for result publication in the study. Otherwise, if automatic
7446                         publication is switched on, default value is used for result name.
7447
7448             Returns:
7449                 New GEOM.GEOM_Object, containing processed shape.
7450             """
7451             anObj = self.HealOp.ChangeOrientationCopy(theObject)
7452             RaiseIfFailed("ChangeOrientationCopy", self.HealOp)
7453             self._autoPublish(anObj, theName, "reversed")
7454             return anObj
7455
7456         ## Try to limit tolerance of the given object by value \a theTolerance.
7457         #  @param theObject Shape to be processed.
7458         #  @param theTolerance Required tolerance value.
7459         #  @param theName Object name; when specified, this parameter is used
7460         #         for result publication in the study. Otherwise, if automatic
7461         #         publication is switched on, default value is used for result name.
7462         #
7463         #  @return New GEOM.GEOM_Object, containing processed shape.
7464         #
7465         #  @ref tui_limit_tolerance "Example"
7466         @ManageTransactions("HealOp")
7467         def LimitTolerance(self, theObject, theTolerance = 1e-07, theName=None):
7468             """
7469             Try to limit tolerance of the given object by value theTolerance.
7470
7471             Parameters:
7472                 theObject Shape to be processed.
7473                 theTolerance Required tolerance value.
7474                 theName Object name; when specified, this parameter is used
7475                         for result publication in the study. Otherwise, if automatic
7476                         publication is switched on, default value is used for result name.
7477
7478             Returns:
7479                 New GEOM.GEOM_Object, containing processed shape.
7480             """
7481             anObj = self.HealOp.LimitTolerance(theObject, theTolerance)
7482             RaiseIfFailed("LimitTolerance", self.HealOp)
7483             self._autoPublish(anObj, theName, "limitTolerance")
7484             return anObj
7485
7486         ## Provides Python dump functionality for algorithms entirely implemented in Python.
7487         #  @param theObject Shape to be processed.
7488         #  @param result Shape of the algorithm execution.
7489         #  @param imports module import for current functon..
7490         #  @param funcName name of a Python function that we need to put into dump.
7491         #  @param args arguments of the Python function.
7492         #
7493         def FuncToPythonDump(self, theObject, result, imports, funcName, args):
7494             """
7495             Provides Python dump functionality for algorithms entirely implemented in Python.
7496
7497             Parameters:
7498                 theObject Shape to be processed.
7499                 result Shape of the algorithm execution.
7500                 imports module import for current functon.
7501                 funcName name of a Python function that we need to put into dump.
7502                 args arguments of the Python function.
7503             """
7504             self.HealOp.FuncToPythonDump(theObject, result, imports, funcName, args)
7505
7506         ## Get a list of wires (wrapped in GEOM.GEOM_Object-s),
7507         #  that constitute a free boundary of the given shape.
7508         #  @param theObject Shape to get free boundary of.
7509         #  @param theName Object name; when specified, this parameter is used
7510         #         for result publication in the study. Otherwise, if automatic
7511         #         publication is switched on, default value is used for result name.
7512         #
7513         #  @return [\a status, \a theClosedWires, \a theOpenWires]
7514         #  \n \a status: FALSE, if an error(s) occurred during the method execution.
7515         #  \n \a theClosedWires: Closed wires on the free boundary of the given shape.
7516         #  \n \a theOpenWires: Open wires on the free boundary of the given shape.
7517         #
7518         #  @ref tui_free_boundaries_page "Example"
7519         @ManageTransactions("HealOp")
7520         def GetFreeBoundary(self, theObject, theName=None):
7521             """
7522             Get a list of wires (wrapped in GEOM.GEOM_Object-s),
7523             that constitute a free boundary of the given shape.
7524
7525             Parameters:
7526                 theObject Shape to get free boundary of.
7527                 theName Object name; when specified, this parameter is used
7528                         for result publication in the study. Otherwise, if automatic
7529                         publication is switched on, default value is used for result name.
7530
7531             Returns:
7532                 [status, theClosedWires, theOpenWires]
7533                  status: FALSE, if an error(s) occurred during the method execution.
7534                  theClosedWires: Closed wires on the free boundary of the given shape.
7535                  theOpenWires: Open wires on the free boundary of the given shape.
7536             """
7537             # Example: see GEOM_TestHealing.py
7538             anObj = self.HealOp.GetFreeBoundary( ToList( theObject ))
7539             RaiseIfFailed("GetFreeBoundary", self.HealOp)
7540             self._autoPublish(anObj[1], theName, "closedWire")
7541             self._autoPublish(anObj[2], theName, "openWire")
7542             return anObj
7543
7544         ## Replace coincident faces in \a theShapes by one face.
7545         #  @param theShapes Initial shapes, either a list or compound of shapes.
7546         #  @param theTolerance Maximum distance between faces, which can be considered as coincident.
7547         #  @param doKeepNonSolids If FALSE, only solids will present in the result,
7548         #                         otherwise all initial shapes.
7549         #  @param theName Object name; when specified, this parameter is used
7550         #         for result publication in the study. Otherwise, if automatic
7551         #         publication is switched on, default value is used for result name.
7552         #
7553         #  @return New GEOM.GEOM_Object, containing copies of theShapes without coincident faces.
7554         #
7555         #  @ref tui_glue_faces "Example"
7556         @ManageTransactions("ShapesOp")
7557         def MakeGlueFaces(self, theShapes, theTolerance, doKeepNonSolids=True, theName=None):
7558             """
7559             Replace coincident faces in theShapes by one face.
7560
7561             Parameters:
7562                 theShapes Initial shapes, either a list or compound of shapes.
7563                 theTolerance Maximum distance between faces, which can be considered as coincident.
7564                 doKeepNonSolids If FALSE, only solids will present in the result,
7565                                 otherwise all initial shapes.
7566                 theName Object name; when specified, this parameter is used
7567                         for result publication in the study. Otherwise, if automatic
7568                         publication is switched on, default value is used for result name.
7569
7570             Returns:
7571                 New GEOM.GEOM_Object, containing copies of theShapes without coincident faces.
7572             """
7573             # Example: see GEOM_Spanner.py
7574             theTolerance,Parameters = ParseParameters(theTolerance)
7575             anObj = self.ShapesOp.MakeGlueFaces(ToList(theShapes), theTolerance, doKeepNonSolids)
7576             if anObj is None:
7577                 raise RuntimeError("MakeGlueFaces : " + self.ShapesOp.GetErrorCode())
7578             anObj.SetParameters(Parameters)
7579             self._autoPublish(anObj, theName, "glueFaces")
7580             return anObj
7581
7582         ## Find coincident faces in \a theShapes for possible gluing.
7583         #  @param theShapes Initial shapes, either a list or compound of shapes.
7584         #  @param theTolerance Maximum distance between faces,
7585         #                      which can be considered as coincident.
7586         #  @param theName Object name; when specified, this parameter is used
7587         #         for result publication in the study. Otherwise, if automatic
7588         #         publication is switched on, default value is used for result name.
7589         #
7590         #  @return GEOM.ListOfGO
7591         #
7592         #  @ref tui_glue_faces "Example"
7593         @ManageTransactions("ShapesOp")
7594         def GetGlueFaces(self, theShapes, theTolerance, theName=None):
7595             """
7596             Find coincident faces in theShapes for possible gluing.
7597
7598             Parameters:
7599                 theShapes Initial shapes, either a list or compound of shapes.
7600                 theTolerance Maximum distance between faces,
7601                              which can be considered as coincident.
7602                 theName Object name; when specified, this parameter is used
7603                         for result publication in the study. Otherwise, if automatic
7604                         publication is switched on, default value is used for result name.
7605
7606             Returns:
7607                 GEOM.ListOfGO
7608             """
7609             anObj = self.ShapesOp.GetGlueFaces(ToList(theShapes), theTolerance)
7610             RaiseIfFailed("GetGlueFaces", self.ShapesOp)
7611             self._autoPublish(anObj, theName, "facesToGlue")
7612             return anObj
7613
7614         ## Replace coincident faces in \a theShapes by one face
7615         #  in compliance with given list of faces
7616         #  @param theShapes Initial shapes, either a list or compound of shapes.
7617         #  @param theTolerance Maximum distance between faces,
7618         #                      which can be considered as coincident.
7619         #  @param theFaces List of faces for gluing.
7620         #  @param doKeepNonSolids If FALSE, only solids will present in the result,
7621         #                         otherwise all initial shapes.
7622         #  @param doGlueAllEdges If TRUE, all coincident edges of <VAR>theShape</VAR>
7623         #                        will be glued, otherwise only the edges,
7624         #                        belonging to <VAR>theFaces</VAR>.
7625         #  @param theName Object name; when specified, this parameter is used
7626         #         for result publication in the study. Otherwise, if automatic
7627         #         publication is switched on, default value is used for result name.
7628         #
7629         #  @return New GEOM.GEOM_Object, containing copies of theShapes without coincident faces.
7630         #
7631         #  @ref tui_glue_faces "Example"
7632         @ManageTransactions("ShapesOp")
7633         def MakeGlueFacesByList(self, theShapes, theTolerance, theFaces,
7634                                 doKeepNonSolids=True, doGlueAllEdges=True, theName=None):
7635             """
7636             Replace coincident faces in theShapes by one face
7637             in compliance with given list of faces
7638
7639             Parameters:
7640                 theShapes theShapes Initial shapes, either a list or compound of shapes.
7641                 theTolerance Maximum distance between faces,
7642                              which can be considered as coincident.
7643                 theFaces List of faces for gluing.
7644                 doKeepNonSolids If FALSE, only solids will present in the result,
7645                                 otherwise all initial shapes.
7646                 doGlueAllEdges If TRUE, all coincident edges of theShape
7647                                will be glued, otherwise only the edges,
7648                                belonging to theFaces.
7649                 theName Object name; when specified, this parameter is used
7650                         for result publication in the study. Otherwise, if automatic
7651                         publication is switched on, default value is used for result name.
7652
7653             Returns:
7654                 New GEOM.GEOM_Object, containing copies of theShapes without coincident faces.
7655             """
7656             anObj = self.ShapesOp.MakeGlueFacesByList(ToList(theShapes), theTolerance, ToList(theFaces),
7657                                                       doKeepNonSolids, doGlueAllEdges)
7658             if anObj is None:
7659                 raise RuntimeError("MakeGlueFacesByList : " + self.ShapesOp.GetErrorCode())
7660             self._autoPublish(anObj, theName, "glueFaces")
7661             return anObj
7662
7663         ## Replace coincident edges in \a theShapes by one edge.
7664         #  @param theShapes Initial shapes, either a list or compound of shapes.
7665         #  @param theTolerance Maximum distance between edges, which can be considered as coincident.
7666         #  @param theName Object name; when specified, this parameter is used
7667         #         for result publication in the study. Otherwise, if automatic
7668         #         publication is switched on, default value is used for result name.
7669         #
7670         #  @return New GEOM.GEOM_Object, containing copies of theShapes without coincident edges.
7671         #
7672         #  @ref tui_glue_edges "Example"
7673         @ManageTransactions("ShapesOp")
7674         def MakeGlueEdges(self, theShapes, theTolerance, theName=None):
7675             """
7676             Replace coincident edges in theShapes by one edge.
7677
7678             Parameters:
7679                 theShapes Initial shapes, either a list or compound of shapes.
7680                 theTolerance Maximum distance between edges, which can be considered as coincident.
7681                 theName Object name; when specified, this parameter is used
7682                         for result publication in the study. Otherwise, if automatic
7683                         publication is switched on, default value is used for result name.
7684
7685             Returns:
7686                 New GEOM.GEOM_Object, containing copies of theShapes without coincident edges.
7687             """
7688             theTolerance,Parameters = ParseParameters(theTolerance)
7689             anObj = self.ShapesOp.MakeGlueEdges(ToList(theShapes), theTolerance)
7690             if anObj is None:
7691                 raise RuntimeError("MakeGlueEdges : " + self.ShapesOp.GetErrorCode())
7692             anObj.SetParameters(Parameters)
7693             self._autoPublish(anObj, theName, "glueEdges")
7694             return anObj
7695
7696         ## Find coincident edges in \a theShapes for possible gluing.
7697         #  @param theShapes Initial shapes, either a list or compound of shapes.
7698         #  @param theTolerance Maximum distance between edges,
7699         #                      which can be considered as coincident.
7700         #  @param theName Object name; when specified, this parameter is used
7701         #         for result publication in the study. Otherwise, if automatic
7702         #         publication is switched on, default value is used for result name.
7703         #
7704         #  @return GEOM.ListOfGO
7705         #
7706         #  @ref tui_glue_edges "Example"
7707         @ManageTransactions("ShapesOp")
7708         def GetGlueEdges(self, theShapes, theTolerance, theName=None):
7709             """
7710             Find coincident edges in theShapes for possible gluing.
7711
7712             Parameters:
7713                 theShapes Initial shapes, either a list or compound of shapes.
7714                 theTolerance Maximum distance between edges,
7715                              which can be considered as coincident.
7716                 theName Object name; when specified, this parameter is used
7717                         for result publication in the study. Otherwise, if automatic
7718                         publication is switched on, default value is used for result name.
7719
7720             Returns:
7721                 GEOM.ListOfGO
7722             """
7723             anObj = self.ShapesOp.GetGlueEdges(ToList(theShapes), theTolerance)
7724             RaiseIfFailed("GetGlueEdges", self.ShapesOp)
7725             self._autoPublish(anObj, theName, "edgesToGlue")
7726             return anObj
7727
7728         ## Replace coincident edges in theShapes by one edge
7729         #  in compliance with given list of edges.
7730         #  @param theShapes Initial shapes, either a list or compound of shapes.
7731         #  @param theTolerance Maximum distance between edges,
7732         #                      which can be considered as coincident.
7733         #  @param theEdges List of edges for gluing.
7734         #  @param theName Object name; when specified, this parameter is used
7735         #         for result publication in the study. Otherwise, if automatic
7736         #         publication is switched on, default value is used for result name.
7737         #
7738         #  @return New GEOM.GEOM_Object, containing copies of theShapes without coincident edges.
7739         #
7740         #  @ref tui_glue_edges "Example"
7741         @ManageTransactions("ShapesOp")
7742         def MakeGlueEdgesByList(self, theShapes, theTolerance, theEdges, theName=None):
7743             """
7744             Replace coincident edges in theShapes by one edge
7745             in compliance with given list of edges.
7746
7747             Parameters:
7748                 theShapes Initial shapes, either a list or compound of shapes.
7749                 theTolerance Maximum distance between edges,
7750                              which can be considered as coincident.
7751                 theEdges List of edges for gluing.
7752                 theName Object name; when specified, this parameter is used
7753                         for result publication in the study. Otherwise, if automatic
7754                         publication is switched on, default value is used for result name.
7755
7756             Returns:
7757                 New GEOM.GEOM_Object, containing copies of theShapes without coincident edges.
7758             """
7759             anObj = self.ShapesOp.MakeGlueEdgesByList(ToList(theShapes), theTolerance, theEdges)
7760             if anObj is None:
7761                 raise RuntimeError("MakeGlueEdgesByList : " + self.ShapesOp.GetErrorCode())
7762             self._autoPublish(anObj, theName, "glueEdges")
7763             return anObj
7764
7765         # end of l3_healing
7766         ## @}
7767
7768         ## @addtogroup l3_boolean Boolean Operations
7769         ## @{
7770
7771         # -----------------------------------------------------------------------------
7772         # Boolean (Common, Cut, Fuse, Section)
7773         # -----------------------------------------------------------------------------
7774
7775         ## Perform one of boolean operations on two given shapes.
7776         #  @param theShape1 First argument for boolean operation.
7777         #  @param theShape2 Second argument for boolean operation.
7778         #  @param theOperation Indicates the operation to be done:\n
7779         #                      1 - Common, 2 - Cut, 3 - Fuse, 4 - Section.
7780         #  @param checkSelfInte The flag that tells if the arguments should
7781         #         be checked for self-intersection prior to the operation.
7782         #  @param theName Object name; when specified, this parameter is used
7783         #         for result publication in the study. Otherwise, if automatic
7784         #         publication is switched on, default value is used for result name.
7785         #  @param theFuzzyParam The fuzzy parameter to be used for the boolean
7786         #         operation. If the value is not positive, no fuzzy tolerance will
7787         #         be considered for the boolean operation.
7788         #
7789         #  @note This algorithm doesn't find all types of self-intersections.
7790         #        It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7791         #        vertex/face and edge/face intersections. Face/face
7792         #        intersections detection is switched off as it is a
7793         #        time-consuming operation that gives an impact on performance.
7794         #        To find all self-intersections please use
7795         #        CheckSelfIntersections() method.
7796         #
7797         #  @return New GEOM.GEOM_Object, containing the result shape.
7798         #
7799         #  @ref tui_fuse "Example"
7800         @ManageTransactions("BoolOp")
7801         def MakeBoolean(self, theShape1, theShape2, theOperation, checkSelfInte=False, theName=None, theFuzzyParam=-1):
7802             """
7803             Perform one of boolean operations on two given shapes.
7804
7805             Parameters:
7806                 theShape1 First argument for boolean operation.
7807                 theShape2 Second argument for boolean operation.
7808                 theOperation Indicates the operation to be done:
7809                              1 - Common, 2 - Cut, 3 - Fuse, 4 - Section.
7810                 checkSelfInte The flag that tells if the arguments should
7811                               be checked for self-intersection prior to
7812                               the operation.
7813                 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                 theFuzzyParam The fuzzy parameter to be used for the boolean operation.
7817                               If the value is not positive, no fuzzy tolerance will be
7818                               considered for the boolean operation.
7819
7820             Note:
7821                     This algorithm doesn't find all types of self-intersections.
7822                     It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7823                     vertex/face and edge/face intersections. Face/face
7824                     intersections detection is switched off as it is a
7825                     time-consuming operation that gives an impact on performance.
7826                     To find all self-intersections please use
7827                     CheckSelfIntersections() method.
7828
7829             Returns:
7830                 New GEOM.GEOM_Object, containing the result shape.
7831             """
7832             # Example: see GEOM_TestAll.py
7833             anObj = self.BoolOp.MakeBooleanWithFuzzy(theShape1, theShape2, theOperation, checkSelfInte, theFuzzyParam)
7834             RaiseIfFailed("MakeBoolean", self.BoolOp)
7835             def_names = { 1: "common", 2: "cut", 3: "fuse", 4: "section" }
7836             self._autoPublish(anObj, theName, def_names[theOperation])
7837             return anObj
7838
7839         ## Perform Common boolean operation on two given shapes.
7840         #  @param theShape1 First argument for boolean operation.
7841         #  @param theShape2 Second argument for boolean operation.
7842         #  @param checkSelfInte The flag that tells if the arguments should
7843         #         be checked for self-intersection prior to the operation.
7844         #  @param theName Object name; when specified, this parameter is used
7845         #         for result publication in the study. Otherwise, if automatic
7846         #         publication is switched on, default value is used for result name.
7847         #  @param theFuzzyParam The fuzzy parameter to be used for the boolean
7848         #         operation. If the value is not positive, no fuzzy tolerance will
7849         #         be considered for the boolean operation.
7850         #
7851         #  @note This algorithm doesn't find all types of self-intersections.
7852         #        It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7853         #        vertex/face and edge/face intersections. Face/face
7854         #        intersections detection is switched off as it is a
7855         #        time-consuming operation that gives an impact on performance.
7856         #        To find all self-intersections please use
7857         #        CheckSelfIntersections() method.
7858         #
7859         #  @return New GEOM.GEOM_Object, containing the result shape.
7860         #
7861         #  @ref tui_common "Example 1"
7862         #  \n @ref swig_MakeCommon "Example 2"
7863         def MakeCommon(self, theShape1, theShape2, checkSelfInte=False, theName=None, theFuzzyParam=-1):
7864             """
7865             Perform Common boolean operation on two given shapes.
7866
7867             Parameters:
7868                 theShape1 First argument for boolean operation.
7869                 theShape2 Second argument for boolean operation.
7870                 checkSelfInte The flag that tells if the arguments should
7871                               be checked for self-intersection prior to
7872                               the operation.
7873                 theName Object name; when specified, this parameter is used
7874                         for result publication in the study. Otherwise, if automatic
7875                         publication is switched on, default value is used for result name.
7876                 theFuzzyParam The fuzzy parameter to be used for the boolean operation.
7877                               If the value is not positive, no fuzzy tolerance will be
7878                               considered for the boolean operation.
7879
7880             Note:
7881                     This algorithm doesn't find all types of self-intersections.
7882                     It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7883                     vertex/face and edge/face intersections. Face/face
7884                     intersections detection is switched off as it is a
7885                     time-consuming operation that gives an impact on performance.
7886                     To find all self-intersections please use
7887                     CheckSelfIntersections() method.
7888
7889             Returns:
7890                 New GEOM.GEOM_Object, containing the result shape.
7891             """
7892             # Example: see GEOM_TestOthers.py
7893             # note: auto-publishing is done in self.MakeBoolean()
7894             return self.MakeBoolean(theShape1, theShape2, 1, checkSelfInte, theName, theFuzzyParam)
7895
7896         ## Perform Cut boolean operation on two given shapes.
7897         #  @param theShape1 First argument for boolean operation.
7898         #  @param theShape2 Second argument for boolean operation.
7899         #  @param checkSelfInte The flag that tells if the arguments should
7900         #         be checked for self-intersection prior to the operation.
7901         #  @param theName Object name; when specified, this parameter is used
7902         #         for result publication in the study. Otherwise, if automatic
7903         #         publication is switched on, default value is used for result name.
7904         #  @param theFuzzyParam The fuzzy parameter to be used for the boolean
7905         #         operation. If the value is not positive, no fuzzy tolerance will
7906         #         be considered for the boolean operation.
7907         #
7908         #  @note This algorithm doesn't find all types of self-intersections.
7909         #        It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7910         #        vertex/face and edge/face intersections. Face/face
7911         #        intersections detection is switched off as it is a
7912         #        time-consuming operation that gives an impact on performance.
7913         #        To find all self-intersections please use
7914         #        CheckSelfIntersections() method.
7915         #
7916         #  @return New GEOM.GEOM_Object, containing the result shape.
7917         #
7918         #  @ref tui_cut "Example 1"
7919         #  \n @ref swig_MakeCommon "Example 2"
7920         def MakeCut(self, theShape1, theShape2, checkSelfInte=False, theName=None, theFuzzyParam=-1):
7921             """
7922             Perform Cut boolean operation on two given shapes.
7923
7924             Parameters:
7925                 theShape1 First argument for boolean operation.
7926                 theShape2 Second argument for boolean operation.
7927                 checkSelfInte The flag that tells if the arguments should
7928                               be checked for self-intersection prior to
7929                               the operation.
7930                 theName Object name; when specified, this parameter is used
7931                         for result publication in the study. Otherwise, if automatic
7932                         publication is switched on, default value is used for result name.
7933                 theFuzzyParam The fuzzy parameter to be used for the boolean operation.
7934                               If the value is not positive, no fuzzy tolerance will be
7935                               considered for the boolean operation.
7936
7937             Note:
7938                     This algorithm doesn't find all types of self-intersections.
7939                     It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7940                     vertex/face and edge/face intersections. Face/face
7941                     intersections detection is switched off as it is a
7942                     time-consuming operation that gives an impact on performance.
7943                     To find all self-intersections please use
7944                     CheckSelfIntersections() method.
7945
7946             Returns:
7947                 New GEOM.GEOM_Object, containing the result shape.
7948
7949             """
7950             # Example: see GEOM_TestOthers.py
7951             # note: auto-publishing is done in self.MakeBoolean()
7952             return self.MakeBoolean(theShape1, theShape2, 2, checkSelfInte, theName, theFuzzyParam)
7953
7954         ## Perform Fuse boolean operation on two given shapes.
7955         #  @param theShape1 First argument for boolean operation.
7956         #  @param theShape2 Second argument for boolean operation.
7957         #  @param checkSelfInte The flag that tells if the arguments should
7958         #         be checked for self-intersection prior to the operation.
7959         #  @param rmExtraEdges The flag that tells if Remove Extra Edges
7960         #         operation should be performed during the operation.
7961         #  @param theName Object name; when specified, this parameter is used
7962         #         for result publication in the study. Otherwise, if automatic
7963         #         publication is switched on, default value is used for result name.
7964         #  @param theFuzzyParam The fuzzy parameter to be used for the boolean
7965         #         operation. If the value is not positive, no fuzzy tolerance will
7966         #         be considered for the boolean operation.
7967         #
7968         #  @note This algorithm doesn't find all types of self-intersections.
7969         #        It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7970         #        vertex/face and edge/face intersections. Face/face
7971         #        intersections detection is switched off as it is a
7972         #        time-consuming operation that gives an impact on performance.
7973         #        To find all self-intersections please use
7974         #        CheckSelfIntersections() method.
7975         #
7976         #  @return New GEOM.GEOM_Object, containing the result shape.
7977         #
7978         #  @ref tui_fuse "Example 1"
7979         #  \n @ref swig_MakeCommon "Example 2"
7980         @ManageTransactions("BoolOp")
7981         def MakeFuse(self, theShape1, theShape2, checkSelfInte=False,
7982                      rmExtraEdges=False, theName=None, theFuzzyParam=-1):
7983             """
7984             Perform Fuse boolean operation on two given shapes.
7985
7986             Parameters:
7987                 theShape1 First argument for boolean operation.
7988                 theShape2 Second argument for boolean operation.
7989                 checkSelfInte The flag that tells if the arguments should
7990                               be checked for self-intersection prior to
7991                               the operation.
7992                 rmExtraEdges The flag that tells if Remove Extra Edges
7993                              operation should be performed during the operation.
7994                 theName Object name; when specified, this parameter is used
7995                         for result publication in the study. Otherwise, if automatic
7996                         publication is switched on, default value is used for result name.
7997                 theFuzzyParam The fuzzy parameter to be used for the boolean operation.
7998                               If the value is not positive, no fuzzy tolerance will be
7999                               considered for the boolean operation.
8000
8001             Note:
8002                     This algorithm doesn't find all types of self-intersections.
8003                     It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
8004                     vertex/face and edge/face intersections. Face/face
8005                     intersections detection is switched off as it is a
8006                     time-consuming operation that gives an impact on performance.
8007                     To find all self-intersections please use
8008                     CheckSelfIntersections() method.
8009
8010             Returns:
8011                 New GEOM.GEOM_Object, containing the result shape.
8012
8013             """
8014             # Example: see GEOM_TestOthers.py
8015             anObj = self.BoolOp.MakeFuseWithFuzzy(theShape1, theShape2, checkSelfInte,
8016                                                   rmExtraEdges, theFuzzyParam)
8017             RaiseIfFailed("MakeFuse", self.BoolOp)
8018             self._autoPublish(anObj, theName, "fuse")
8019             return anObj
8020
8021         ## Perform Section boolean operation on two given shapes.
8022         #  @param theShape1 First argument for boolean operation.
8023         #  @param theShape2 Second argument for boolean operation.
8024         #  @param checkSelfInte The flag that tells if the arguments should
8025         #         be checked for self-intersection prior to the operation.
8026         #         If a self-intersection detected the operation fails.
8027         #  @param theName Object name; when specified, this parameter is used
8028         #         for result publication in the study. Otherwise, if automatic
8029         #         publication is switched on, default value is used for result name.
8030         #  @param theFuzzyParam The fuzzy parameter to be used for the boolean
8031         #         operation. If the value is not positive, no fuzzy tolerance will
8032         #         be considered for the boolean operation.
8033         #  @return New GEOM.GEOM_Object, containing the result shape.
8034         #
8035         #  @ref tui_section "Example 1"
8036         #  \n @ref swig_MakeCommon "Example 2"
8037         def MakeSection(self, theShape1, theShape2, checkSelfInte=False, theName=None, theFuzzyParam=-1):
8038             """
8039             Perform Section boolean operation on two given shapes.
8040
8041             Parameters:
8042                 theShape1 First argument for boolean operation.
8043                 theShape2 Second argument for boolean operation.
8044                 checkSelfInte The flag that tells if the arguments should
8045                               be checked for self-intersection prior to the operation.
8046                               If a self-intersection detected the operation fails.
8047                 theName Object name; when specified, this parameter is used
8048                         for result publication in the study. Otherwise, if automatic
8049                         publication is switched on, default value is used for result name.
8050                 theFuzzyParam The fuzzy parameter to be used for the boolean operation.
8051                               If the value is not positive, no fuzzy tolerance will be
8052                               considered for the boolean operation.
8053             Returns:
8054                 New GEOM.GEOM_Object, containing the result shape.
8055
8056             """
8057             # Example: see GEOM_TestOthers.py
8058             # note: auto-publishing is done in self.MakeBoolean()
8059             return self.MakeBoolean(theShape1, theShape2, 4, checkSelfInte, theName, theFuzzyParam)
8060
8061         ## Perform Fuse boolean operation on the list of shapes.
8062         #  @param theShapesList Shapes to be fused.
8063         #  @param checkSelfInte The flag that tells if the arguments should
8064         #         be checked for self-intersection prior to the operation.
8065         #  @param rmExtraEdges The flag that tells if Remove Extra Edges
8066         #         operation should be performed during the operation.
8067         #  @param theName Object name; when specified, this parameter is used
8068         #         for result publication in the study. Otherwise, if automatic
8069         #         publication is switched on, default value is used for result name.
8070         #  @param theFuzzyParam The fuzzy parameter to be used for the boolean
8071         #         operation. If the value is not positive, no fuzzy tolerance will
8072         #         be considered for the boolean operation.
8073         #
8074         #  @note This algorithm doesn't find all types of self-intersections.
8075         #        It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
8076         #        vertex/face and edge/face intersections. Face/face
8077         #        intersections detection is switched off as it is a
8078         #        time-consuming operation that gives an impact on performance.
8079         #        To find all self-intersections please use
8080         #        CheckSelfIntersections() method.
8081         #
8082         #  @return New GEOM.GEOM_Object, containing the result shape.
8083         #
8084         #  @ref tui_fuse "Example 1"
8085         #  \n @ref swig_MakeCommon "Example 2"
8086         @ManageTransactions("BoolOp")
8087         def MakeFuseList(self, theShapesList, checkSelfInte=False,
8088                          rmExtraEdges=False, theName=None, theFuzzyParam=-1):
8089             """
8090             Perform Fuse boolean operation on the list of shapes.
8091
8092             Parameters:
8093                 theShapesList Shapes to be fused.
8094                 checkSelfInte The flag that tells if the arguments should
8095                               be checked for self-intersection prior to
8096                               the operation.
8097                 rmExtraEdges The flag that tells if Remove Extra Edges
8098                              operation should be performed during the operation.
8099                 theName Object name; when specified, this parameter is used
8100                         for result publication in the study. Otherwise, if automatic
8101                         publication is switched on, default value is used for result name.
8102                 theFuzzyParam The fuzzy parameter to be used for the boolean operation.
8103                               If the value is not positive, no fuzzy tolerance will be
8104                               considered for the boolean operation.
8105
8106             Note:
8107                     This algorithm doesn't find all types of self-intersections.
8108                     It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
8109                     vertex/face and edge/face intersections. Face/face
8110                     intersections detection is switched off as it is a
8111                     time-consuming operation that gives an impact on performance.
8112                     To find all self-intersections please use
8113                     CheckSelfIntersections() method.
8114
8115             Returns:
8116                 New GEOM.GEOM_Object, containing the result shape.
8117
8118             """
8119             # Example: see GEOM_TestOthers.py
8120             anObj = self.BoolOp.MakeFuseListWithFuzzy(theShapesList, checkSelfInte,
8121                                                       rmExtraEdges, theFuzzyParam)
8122             RaiseIfFailed("MakeFuseList", self.BoolOp)
8123             self._autoPublish(anObj, theName, "fuse")
8124             return anObj
8125
8126         ## Perform Common boolean operation on the list of shapes.
8127         #  @param theShapesList Shapes for Common operation.
8128         #  @param checkSelfInte The flag that tells if the arguments should
8129         #         be checked for self-intersection prior to the operation.
8130         #  @param theName Object name; when specified, this parameter is used
8131         #         for result publication in the study. Otherwise, if automatic
8132         #         publication is switched on, default value is used for result name.
8133         #  @param theFuzzyParam The fuzzy parameter to be used for the boolean
8134         #         operation. If the value is not positive, no fuzzy tolerance will
8135         #         be considered for the boolean operation.
8136         #
8137         #  @note This algorithm doesn't find all types of self-intersections.
8138         #        It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
8139         #        vertex/face and edge/face intersections. Face/face
8140         #        intersections detection is switched off as it is a
8141         #        time-consuming operation that gives an impact on performance.
8142         #        To find all self-intersections please use
8143         #        CheckSelfIntersections() method.
8144         #
8145         #  @return New GEOM.GEOM_Object, containing the result shape.
8146         #
8147         #  @ref tui_common "Example 1"
8148         #  \n @ref swig_MakeCommon "Example 2"
8149         @ManageTransactions("BoolOp")
8150         def MakeCommonList(self, theShapesList, checkSelfInte=False, theName=None, theFuzzyParam=-1):
8151             """
8152             Perform Common boolean operation on the list of shapes.
8153
8154             Parameters:
8155                 theShapesList Shapes for Common operation.
8156                 checkSelfInte The flag that tells if the arguments should
8157                               be checked for self-intersection prior to
8158                               the operation.
8159                 theName Object name; when specified, this parameter is used
8160                         for result publication in the study. Otherwise, if automatic
8161                         publication is switched on, default value is used for result name.
8162                 theFuzzyParam The fuzzy parameter to be used for the boolean operation.
8163                               If the value is not positive, no fuzzy tolerance will be
8164                               considered for the boolean operation.
8165
8166             Note:
8167                     This algorithm doesn't find all types of self-intersections.
8168                     It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
8169                     vertex/face and edge/face intersections. Face/face
8170                     intersections detection is switched off as it is a
8171                     time-consuming operation that gives an impact on performance.
8172                     To find all self-intersections please use
8173                     CheckSelfIntersections() method.
8174
8175             Returns:
8176                 New GEOM.GEOM_Object, containing the result shape.
8177
8178             """
8179             # Example: see GEOM_TestOthers.py
8180             anObj = self.BoolOp.MakeCommonListWithFuzzy(theShapesList, checkSelfInte, theFuzzyParam)
8181             RaiseIfFailed("MakeCommonList", self.BoolOp)
8182             self._autoPublish(anObj, theName, "common")
8183             return anObj
8184
8185         ## Perform Cut boolean operation on one object and the list of tools.
8186         #  @param theMainShape The object of the operation.
8187         #  @param theShapesList The list of tools of the operation.
8188         #  @param checkSelfInte The flag that tells if the arguments should
8189         #         be checked for self-intersection prior to the operation.
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         #  @param theFuzzyParam The fuzzy parameter to be used for the boolean
8194         #         operation. If the value is not positive, no fuzzy tolerance will
8195         #         be considered for the boolean operation.
8196         #
8197         #  @note This algorithm doesn't find all types of self-intersections.
8198         #        It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
8199         #        vertex/face and edge/face intersections. Face/face
8200         #        intersections detection is switched off as it is a
8201         #        time-consuming operation that gives an impact on performance.
8202         #        To find all self-intersections please use
8203         #        CheckSelfIntersections() method.
8204         #
8205         #  @return New GEOM.GEOM_Object, containing the result shape.
8206         #
8207         #  @ref tui_cut "Example 1"
8208         #  \n @ref swig_MakeCommon "Example 2"
8209         @ManageTransactions("BoolOp")
8210         def MakeCutList(self, theMainShape, theShapesList, checkSelfInte=False, theName=None, theFuzzyParam=-1):
8211             """
8212             Perform Cut boolean operation on one object and the list of tools.
8213
8214             Parameters:
8215                 theMainShape The object of the operation.
8216                 theShapesList The list of tools of the operation.
8217                 checkSelfInte The flag that tells if the arguments should
8218                               be checked for self-intersection prior to
8219                               the operation.
8220                 theName Object name; when specified, this parameter is used
8221                         for result publication in the study. Otherwise, if automatic
8222                         publication is switched on, default value is used for result name.
8223                 theFuzzyParam The fuzzy parameter to be used for the boolean operation.
8224                               If the value is not positive, no fuzzy tolerance will be
8225                               considered for the boolean operation.
8226
8227             Note:
8228                     This algorithm doesn't find all types of self-intersections.
8229                     It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
8230                     vertex/face and edge/face intersections. Face/face
8231                     intersections detection is switched off as it is a
8232                     time-consuming operation that gives an impact on performance.
8233                     To find all self-intersections please use
8234                     CheckSelfIntersections() method.
8235
8236             Returns:
8237                 New GEOM.GEOM_Object, containing the result shape.
8238
8239             """
8240             # Example: see GEOM_TestOthers.py
8241             anObj = self.BoolOp.MakeCutListWithFuzzy(theMainShape, theShapesList, checkSelfInte, theFuzzyParam)
8242             RaiseIfFailed("MakeCutList", self.BoolOp)
8243             self._autoPublish(anObj, theName, "cut")
8244             return anObj
8245
8246         # end of l3_boolean
8247         ## @}
8248
8249         ## @addtogroup l3_basic_op
8250         ## @{
8251
8252         ## Perform partition operation.
8253         #  @param ListShapes Shapes to be intersected.
8254         #  @param ListTools Shapes to intersect theShapes.
8255         #  @param Limit Type of resulting shapes (see ShapeType()).\n
8256         #         If this parameter is set to -1 ("Auto"), most appropriate shape limit
8257         #         type will be detected automatically.
8258         #  @param KeepNonlimitShapes if this parameter == 0, then only shapes of
8259         #                             target type (equal to Limit) are kept in the result,
8260         #                             else standalone shapes of lower dimension
8261         #                             are kept also (if they exist).
8262         #  @param theName Object name; when specified, this parameter is used
8263         #         for result publication in the study. Otherwise, if automatic
8264         #         publication is switched on, default value is used for result name.
8265         #  @param theFuzzyParam The fuzzy parameter to be used for the partition
8266         #         operation. If the value is not positive, no fuzzy tolerance will
8267         #         be considered for the partition operation.
8268         #
8269         #  @note Each compound from ListShapes and ListTools will be exploded
8270         #        in order to avoid possible intersection between shapes from this compound.
8271         #
8272         #  After implementation new version of PartitionAlgo (October 2006)
8273         #  other parameters are ignored by current functionality. They are kept
8274         #  in this function only for support old versions.
8275         #      @param ListKeepInside Shapes, outside which the results will be deleted.
8276         #         Each shape from theKeepInside must belong to theShapes also.
8277         #      @param ListRemoveInside Shapes, inside which the results will be deleted.
8278         #         Each shape from theRemoveInside must belong to theShapes also.
8279         #      @param RemoveWebs If TRUE, perform Glue 3D algorithm.
8280         #      @param ListMaterials Material indices for each shape. Make sense,
8281         #         only if theRemoveWebs is TRUE.
8282         #
8283         #  @return New GEOM.GEOM_Object, containing the result shapes.
8284         #
8285         #  @ref tui_partition "Example"
8286         @ManageTransactions("BoolOp")
8287         def MakePartition(self, ListShapes, ListTools=[], ListKeepInside=[], ListRemoveInside=[],
8288                           Limit=ShapeType["AUTO"], RemoveWebs=0, ListMaterials=[],
8289                           KeepNonlimitShapes=0, theName=None, theFuzzyParam=-1):
8290             """
8291             Perform partition operation.
8292
8293             Parameters:
8294                 ListShapes Shapes to be intersected.
8295                 ListTools Shapes to intersect theShapes.
8296                 Limit Type of resulting shapes (see geompy.ShapeType)
8297                       If this parameter is set to -1 ("Auto"), most appropriate shape limit
8298                       type will be detected automatically.
8299                 KeepNonlimitShapes if this parameter == 0, then only shapes of
8300                                     target type (equal to Limit) are kept in the result,
8301                                     else standalone shapes of lower dimension
8302                                     are kept also (if they exist).
8303
8304                 theName Object name; when specified, this parameter is used
8305                         for result publication in the study. Otherwise, if automatic
8306                         publication is switched on, default value is used for result name.
8307             Note:
8308                     Each compound from ListShapes and ListTools will be exploded
8309                     in order to avoid possible intersection between shapes from
8310                     this compound.
8311
8312             After implementation new version of PartitionAlgo (October 2006) other
8313             parameters are ignored by current functionality. They are kept in this
8314             function only for support old versions.
8315
8316             Ignored parameters:
8317                 ListKeepInside Shapes, outside which the results will be deleted.
8318                                Each shape from theKeepInside must belong to theShapes also.
8319                 ListRemoveInside Shapes, inside which the results will be deleted.
8320                                  Each shape from theRemoveInside must belong to theShapes also.
8321                 RemoveWebs If TRUE, perform Glue 3D algorithm.
8322                 ListMaterials Material indices for each shape. Make sense, only if theRemoveWebs is TRUE.
8323
8324             Returns:
8325                 New GEOM.GEOM_Object, containing the result shapes.
8326             """
8327             # Example: see GEOM_TestAll.py
8328             if Limit == self.ShapeType["AUTO"]:
8329                 # automatic detection of the most appropriate shape limit type
8330                 lim = GEOM.SHAPE
8331                 for s in ListShapes: lim = min(lim, s.GetMaxShapeType())
8332                 Limit = EnumToLong(lim)
8333                 pass
8334             anObj = self.BoolOp.MakePartitionWithFuzzy(ListShapes, ListTools,
8335                                                        ListKeepInside, ListRemoveInside,
8336                                                        Limit, RemoveWebs, ListMaterials,
8337                                                        KeepNonlimitShapes, theFuzzyParam)
8338             RaiseIfFailed("MakePartition", self.BoolOp)
8339             self._autoPublish(anObj, theName, "partition")
8340             return anObj
8341
8342         ## Perform partition operation.
8343         #  This method may be useful if it is needed to make a partition for
8344         #  compound contains nonintersected shapes. Performance will be better
8345         #  since intersection between shapes from compound is not performed.
8346         #
8347         #  Description of all parameters as in previous method MakePartition().
8348         #  One additional parameter is provided:
8349         #  @param checkSelfInte The flag that tells if the arguments should
8350         #         be checked for self-intersection prior to the operation.
8351         #  @param theFuzzyParam The fuzzy parameter to be used for the partition
8352         #         operation. If the value is not positive, no fuzzy tolerance will
8353         #         be considered for the partition operation.
8354         #
8355         #  @note This algorithm doesn't find all types of self-intersections.
8356         #        It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
8357         #        vertex/face and edge/face intersections. Face/face
8358         #        intersections detection is switched off as it is a
8359         #        time-consuming operation that gives an impact on performance.
8360         #        To find all self-intersections please use
8361         #        CheckSelfIntersections() method.
8362         #
8363         #  @note Passed compounds (via ListShapes or via ListTools)
8364         #           have to consist of nonintersecting shapes.
8365         #
8366         #  @return New GEOM.GEOM_Object, containing the result shapes.
8367         #
8368         #  @ref swig_todo "Example"
8369         @ManageTransactions("BoolOp")
8370         def MakePartitionNonSelfIntersectedShape(self, ListShapes, ListTools=[],
8371                                                  ListKeepInside=[], ListRemoveInside=[],
8372                                                  Limit=ShapeType["AUTO"], RemoveWebs=0,
8373                                                  ListMaterials=[], KeepNonlimitShapes=0,
8374                                                  checkSelfInte=False, theName=None,
8375                                                  theFuzzyParam=-1):
8376             """
8377             Perform partition operation.
8378             This method may be useful if it is needed to make a partition for
8379             compound contains nonintersected shapes. Performance will be better
8380             since intersection between shapes from compound is not performed.
8381
8382             Parameters:
8383                 Description of all parameters as in method geompy.MakePartition.
8384                 One additional parameter is provided:
8385                 checkSelfInte The flag that tells if the arguments should
8386                               be checked for self-intersection prior to
8387                               the operation.
8388
8389             Note:
8390                     This algorithm doesn't find all types of self-intersections.
8391                     It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
8392                     vertex/face and edge/face intersections. Face/face
8393                     intersections detection is switched off as it is a
8394                     time-consuming operation that gives an impact on performance.
8395                     To find all self-intersections please use
8396                     CheckSelfIntersections() method.
8397
8398             NOTE:
8399                 Passed compounds (via ListShapes or via ListTools)
8400                 have to consist of nonintersecting shapes.
8401
8402             Returns:
8403                 New GEOM.GEOM_Object, containing the result shapes.
8404             """
8405             if Limit == self.ShapeType["AUTO"]:
8406                 # automatic detection of the most appropriate shape limit type
8407                 lim = GEOM.SHAPE
8408                 for s in ListShapes: lim = min(lim, s.GetMaxShapeType())
8409                 Limit = EnumToLong(lim)
8410                 pass
8411             anObj = self.BoolOp.MakePartitionNonSelfIntersectedShapeWithFuzzy(ListShapes, ListTools,
8412                                                                               ListKeepInside, ListRemoveInside,
8413                                                                               Limit, RemoveWebs, ListMaterials,
8414                                                                               KeepNonlimitShapes, checkSelfInte,
8415                                                                               theFuzzyParam)
8416             RaiseIfFailed("MakePartitionNonSelfIntersectedShape", self.BoolOp)
8417             self._autoPublish(anObj, theName, "partition")
8418             return anObj
8419
8420         ## See method MakePartition() for more information.
8421         #
8422         #  @ref tui_partition "Example 1"
8423         #  \n @ref swig_Partition "Example 2"
8424         def Partition(self, ListShapes, ListTools=[], ListKeepInside=[], ListRemoveInside=[],
8425                       Limit=ShapeType["AUTO"], RemoveWebs=0, ListMaterials=[],
8426                       KeepNonlimitShapes=0, theName=None, theFuzzyParam=-1):
8427             """
8428             See method geompy.MakePartition for more information.
8429             """
8430             # Example: see GEOM_TestOthers.py
8431             # note: auto-publishing is done in self.MakePartition()
8432             anObj = self.MakePartition(ListShapes, ListTools,
8433                                        ListKeepInside, ListRemoveInside,
8434                                        Limit, RemoveWebs, ListMaterials,
8435                                        KeepNonlimitShapes, theName, theFuzzyParam)
8436             return anObj
8437
8438         ## Perform partition of the Shape with the Plane
8439         #  @param theShape Shape to be intersected.
8440         #  @param thePlane Tool shape, to intersect theShape.
8441         #  @param theName Object name; when specified, this parameter is used
8442         #         for result publication in the study. Otherwise, if automatic
8443         #         publication is switched on, default value is used for result name.
8444         #  @param theFuzzyParam The fuzzy parameter to be used for the partition
8445         #         operation. If the value is not positive, no fuzzy tolerance will
8446         #         be considered for the partition operation.
8447         #
8448         #  @return New GEOM.GEOM_Object, containing the result shape.
8449         #
8450         #  @note This operation is a shortcut to the more general @ref MakePartition
8451         #  operation, where @a theShape specifies single "object" (shape being partitioned)
8452         #  and @a thePlane specifies single "tool" (intersector shape). Other parameters of
8453         #  @ref MakePartition operation have default values:
8454         #  - @a Limit: GEOM::SHAPE (shape limit corresponds to the type of @a theShape)
8455         #  - @a KeepNonlimitShapes: 0
8456         #  - @a KeepInside, @a RemoveInside, @a RemoveWebs,
8457         #    @a Materials (obsolete parameters): empty
8458         #
8459         #  @note I.e. the following two operations are equivalent:
8460         #  @code
8461         #  Result = geompy.MakeHalfPartition(Object, Plane)
8462         #  Result = geompy.MakePartition([Object], [Plane])
8463         #  @endcode
8464         #
8465         #  @sa MakePartition, MakePartitionNonSelfIntersectedShape
8466         #
8467         #  @ref tui_partition "Example"
8468         @ManageTransactions("BoolOp")
8469         def MakeHalfPartition(self, theShape, thePlane, theName=None, theFuzzyParam=-1):
8470             """
8471             Perform partition of the Shape with the Plane
8472
8473             Parameters:
8474                 theShape Shape to be intersected.
8475                 thePlane Tool shape, to intersect theShape.
8476                 theName Object name; when specified, this parameter is used
8477                         for result publication in the study. Otherwise, if automatic
8478                         publication is switched on, default value is used for result name.
8479
8480             Returns:
8481                 New GEOM.GEOM_Object, containing the result shape.
8482          
8483             Note: This operation is a shortcut to the more general MakePartition
8484             operation, where theShape specifies single "object" (shape being partitioned)
8485             and thePlane specifies single "tool" (intersector shape). Other parameters of
8486             MakePartition operation have default values:
8487             - Limit: GEOM::SHAPE (shape limit corresponds to the type of theShape)
8488             - KeepNonlimitShapes: 0
8489             - KeepInside, RemoveInside, RemoveWebs, Materials (obsolete parameters): empty
8490          
8491             I.e. the following two operations are equivalent:
8492               Result = geompy.MakeHalfPartition(Object, Plane)
8493               Result = geompy.MakePartition([Object], [Plane])
8494             """
8495             # Example: see GEOM_TestAll.py
8496             anObj = self.BoolOp.MakeHalfPartitionWithFuzzy(theShape, thePlane, theFuzzyParam)
8497             RaiseIfFailed("MakeHalfPartition", self.BoolOp)
8498             self._autoPublish(anObj, theName, "partition")
8499             return anObj
8500
8501         # end of l3_basic_op
8502         ## @}
8503
8504         ## @addtogroup l3_transform
8505         ## @{
8506
8507         ## Translate the given object along the vector, specified
8508         #  by its end points.
8509         #  @param theObject The object to be translated.
8510         #  @param thePoint1 Start point of translation vector.
8511         #  @param thePoint2 End point of translation vector.
8512         #  @param theCopy Flag used to translate object itself or create a copy.
8513         #  @return Translated @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
8514         #  new GEOM.GEOM_Object, containing the translated object if @a theCopy flag is @c True.
8515         @ManageTransactions("TrsfOp")
8516         def TranslateTwoPoints(self, theObject, thePoint1, thePoint2, theCopy=False):
8517             """
8518             Translate the given object along the vector, specified by its end points.
8519
8520             Parameters:
8521                 theObject The object to be translated.
8522                 thePoint1 Start point of translation vector.
8523                 thePoint2 End point of translation vector.
8524                 theCopy Flag used to translate object itself or create a copy.
8525
8526             Returns:
8527                 Translated theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
8528                 new GEOM.GEOM_Object, containing the translated object if theCopy flag is True.
8529             """
8530             if theCopy:
8531                 anObj = self.TrsfOp.TranslateTwoPointsCopy(theObject, thePoint1, thePoint2)
8532             else:
8533                 anObj = self.TrsfOp.TranslateTwoPoints(theObject, thePoint1, thePoint2)
8534             RaiseIfFailed("TranslateTwoPoints", self.TrsfOp)
8535             return anObj
8536
8537         ## Translate the given object along the vector, specified
8538         #  by its end points, creating its copy before the translation.
8539         #  @param theObject The object to be translated.
8540         #  @param thePoint1 Start point of translation vector.
8541         #  @param thePoint2 End point of translation vector.
8542         #  @param 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         #  @return New GEOM.GEOM_Object, containing the translated object.
8547         #
8548         #  @ref tui_translation "Example 1"
8549         #  \n @ref swig_MakeTranslationTwoPoints "Example 2"
8550         @ManageTransactions("TrsfOp")
8551         def MakeTranslationTwoPoints(self, theObject, thePoint1, thePoint2, theName=None):
8552             """
8553             Translate the given object along the vector, specified
8554             by its end points, creating its copy before the translation.
8555
8556             Parameters:
8557                 theObject The object to be translated.
8558                 thePoint1 Start point of translation vector.
8559                 thePoint2 End point of translation vector.
8560                 theName Object name; when specified, this parameter is used
8561                         for result publication in the study. Otherwise, if automatic
8562                         publication is switched on, default value is used for result name.
8563
8564             Returns:
8565                 New GEOM.GEOM_Object, containing the translated object.
8566             """
8567             # Example: see GEOM_TestAll.py
8568             anObj = self.TrsfOp.TranslateTwoPointsCopy(theObject, thePoint1, thePoint2)
8569             RaiseIfFailed("TranslateTwoPointsCopy", self.TrsfOp)
8570             self._autoPublish(anObj, theName, "translated")
8571             return anObj
8572
8573         ## Translate the given object along the vector, specified by its components.
8574         #  @param theObject The object to be translated.
8575         #  @param theDX,theDY,theDZ Components of translation vector.
8576         #  @param theCopy Flag used to translate object itself or create a copy.
8577         #  @return Translated @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
8578         #  new GEOM.GEOM_Object, containing the translated object if @a theCopy flag is @c True.
8579         #
8580         #  @ref tui_translation "Example"
8581         @ManageTransactions("TrsfOp")
8582         def TranslateDXDYDZ(self, theObject, theDX, theDY, theDZ, theCopy=False):
8583             """
8584             Translate the given object along the vector, specified by its components.
8585
8586             Parameters:
8587                 theObject The object to be translated.
8588                 theDX,theDY,theDZ Components of translation vector.
8589                 theCopy Flag used to translate object itself or create a copy.
8590
8591             Returns:
8592                 Translated theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
8593                 new GEOM.GEOM_Object, containing the translated object if theCopy flag is True.
8594             """
8595             # Example: see GEOM_TestAll.py
8596             theDX, theDY, theDZ, Parameters = ParseParameters(theDX, theDY, theDZ)
8597             if theCopy:
8598                 anObj = self.TrsfOp.TranslateDXDYDZCopy(theObject, theDX, theDY, theDZ)
8599             else:
8600                 anObj = self.TrsfOp.TranslateDXDYDZ(theObject, theDX, theDY, theDZ)
8601             anObj.SetParameters(Parameters)
8602             RaiseIfFailed("TranslateDXDYDZ", self.TrsfOp)
8603             return anObj
8604
8605         ## Translate the given object along the vector, specified
8606         #  by its components, creating its copy before the translation.
8607         #  @param theObject The object to be translated.
8608         #  @param theDX,theDY,theDZ Components of translation vector.
8609         #  @param theName Object name; when specified, this parameter is used
8610         #         for result publication in the study. Otherwise, if automatic
8611         #         publication is switched on, default value is used for result name.
8612         #
8613         #  @return New GEOM.GEOM_Object, containing the translated object.
8614         #
8615         #  @ref tui_translation "Example"
8616         @ManageTransactions("TrsfOp")
8617         def MakeTranslation(self,theObject, theDX, theDY, theDZ, theName=None):
8618             """
8619             Translate the given object along the vector, specified
8620             by its components, creating its copy before the translation.
8621
8622             Parameters:
8623                 theObject The object to be translated.
8624                 theDX,theDY,theDZ Components of translation vector.
8625                 theName Object name; when specified, this parameter is used
8626                         for result publication in the study. Otherwise, if automatic
8627                         publication is switched on, default value is used for result name.
8628
8629             Returns:
8630                 New GEOM.GEOM_Object, containing the translated object.
8631             """
8632             # Example: see GEOM_TestAll.py
8633             theDX, theDY, theDZ, Parameters = ParseParameters(theDX, theDY, theDZ)
8634             anObj = self.TrsfOp.TranslateDXDYDZCopy(theObject, theDX, theDY, theDZ)
8635             anObj.SetParameters(Parameters)
8636             RaiseIfFailed("TranslateDXDYDZ", self.TrsfOp)
8637             self._autoPublish(anObj, theName, "translated")
8638             return anObj
8639
8640         ## Translate the given object along the given vector.
8641         #  @param theObject The object to be translated.
8642         #  @param theVector The translation vector.
8643         #  @param theCopy Flag used to translate object itself or create a copy.
8644         #  @return Translated @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
8645         #  new GEOM.GEOM_Object, containing the translated object if @a theCopy flag is @c True.
8646         @ManageTransactions("TrsfOp")
8647         def TranslateVector(self, theObject, theVector, theCopy=False):
8648             """
8649             Translate the given object along the given vector.
8650
8651             Parameters:
8652                 theObject The object to be translated.
8653                 theVector The translation vector.
8654                 theCopy Flag used to translate object itself or create a copy.
8655
8656             Returns:
8657                 Translated theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
8658                 new GEOM.GEOM_Object, containing the translated object if theCopy flag is True.
8659             """
8660             if theCopy:
8661                 anObj = self.TrsfOp.TranslateVectorCopy(theObject, theVector)
8662             else:
8663                 anObj = self.TrsfOp.TranslateVector(theObject, theVector)
8664             RaiseIfFailed("TranslateVector", self.TrsfOp)
8665             return anObj
8666
8667         ## Translate the given object along the given vector,
8668         #  creating its copy before the translation.
8669         #  @param theObject The object to be translated.
8670         #  @param theVector The translation vector.
8671         #  @param theName Object name; when specified, this parameter is used
8672         #         for result publication in the study. Otherwise, if automatic
8673         #         publication is switched on, default value is used for result name.
8674         #
8675         #  @return New GEOM.GEOM_Object, containing the translated object.
8676         #
8677         #  @ref tui_translation "Example"
8678         @ManageTransactions("TrsfOp")
8679         def MakeTranslationVector(self, theObject, theVector, theName=None):
8680             """
8681             Translate the given object along the given vector,
8682             creating its copy before the translation.
8683
8684             Parameters:
8685                 theObject The object to be translated.
8686                 theVector The translation vector.
8687                 theName Object name; when specified, this parameter is used
8688                         for result publication in the study. Otherwise, if automatic
8689                         publication is switched on, default value is used for result name.
8690
8691             Returns:
8692                 New GEOM.GEOM_Object, containing the translated object.
8693             """
8694             # Example: see GEOM_TestAll.py
8695             anObj = self.TrsfOp.TranslateVectorCopy(theObject, theVector)
8696             RaiseIfFailed("TranslateVectorCopy", self.TrsfOp)
8697             self._autoPublish(anObj, theName, "translated")
8698             return anObj
8699
8700         ## Translate the given object along the given vector on given distance.
8701         #  @param theObject The object to be translated.
8702         #  @param theVector The translation vector.
8703         #  @param theDistance The translation distance.
8704         #  @param theCopy Flag used to translate object itself or create a copy.
8705         #  @return Translated @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
8706         #  new GEOM.GEOM_Object, containing the translated object if @a theCopy flag is @c True.
8707         #
8708         #  @ref tui_translation "Example"
8709         @ManageTransactions("TrsfOp")
8710         def TranslateVectorDistance(self, theObject, theVector, theDistance, theCopy=False):
8711             """
8712             Translate the given object along the given vector on given distance.
8713
8714             Parameters:
8715                 theObject The object to be translated.
8716                 theVector The translation vector.
8717                 theDistance The translation distance.
8718                 theCopy Flag used to translate object itself or create a copy.
8719
8720             Returns:
8721                 Translated theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
8722                 new GEOM.GEOM_Object, containing the translated object if theCopy flag is True.
8723             """
8724             # Example: see GEOM_TestAll.py
8725             theDistance,Parameters = ParseParameters(theDistance)
8726             anObj = self.TrsfOp.TranslateVectorDistance(theObject, theVector, theDistance, theCopy)
8727             RaiseIfFailed("TranslateVectorDistance", self.TrsfOp)
8728             anObj.SetParameters(Parameters)
8729             return anObj
8730
8731         ## Translate the given object along the given vector on given distance,
8732         #  creating its copy before the translation.
8733         #  @param theObject The object to be translated.
8734         #  @param theVector The translation vector.
8735         #  @param theDistance The translation distance.
8736         #  @param theName Object name; when specified, this parameter is used
8737         #         for result publication in the study. Otherwise, if automatic
8738         #         publication is switched on, default value is used for result name.
8739         #
8740         #  @return New GEOM.GEOM_Object, containing the translated object.
8741         #
8742         #  @ref tui_translation "Example"
8743         @ManageTransactions("TrsfOp")
8744         def MakeTranslationVectorDistance(self, theObject, theVector, theDistance, theName=None):
8745             """
8746             Translate the given object along the given vector on given distance,
8747             creating its copy before the translation.
8748
8749             Parameters:
8750                 theObject The object to be translated.
8751                 theVector The translation vector.
8752                 theDistance The translation distance.
8753                 theName Object name; when specified, this parameter is used
8754                         for result publication in the study. Otherwise, if automatic
8755                         publication is switched on, default value is used for result name.
8756
8757             Returns:
8758                 New GEOM.GEOM_Object, containing the translated object.
8759             """
8760             # Example: see GEOM_TestAll.py
8761             theDistance,Parameters = ParseParameters(theDistance)
8762             anObj = self.TrsfOp.TranslateVectorDistance(theObject, theVector, theDistance, 1)
8763             RaiseIfFailed("TranslateVectorDistance", self.TrsfOp)
8764             anObj.SetParameters(Parameters)
8765             self._autoPublish(anObj, theName, "translated")
8766             return anObj
8767
8768         ## Rotate the given object around the given axis on the given angle.
8769         #  @param theObject The object to be rotated.
8770         #  @param theAxis Rotation axis.
8771         #  @param theAngle Rotation angle in radians.
8772         #  @param theCopy Flag used to rotate object itself or create a copy.
8773         #
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         #
8777         #  @ref tui_rotation "Example"
8778         @ManageTransactions("TrsfOp")
8779         def Rotate(self, theObject, theAxis, theAngle, theCopy=False):
8780             """
8781             Rotate the given object around the given axis on the given angle.
8782
8783             Parameters:
8784                 theObject The object to be rotated.
8785                 theAxis Rotation axis.
8786                 theAngle Rotation angle in radians.
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             # Example: see GEOM_TestAll.py
8794             flag = False
8795             if isinstance(theAngle,str):
8796                 flag = True
8797             theAngle, Parameters = ParseParameters(theAngle)
8798             if flag:
8799                 theAngle = theAngle*math.pi/180.0
8800             if theCopy:
8801                 anObj = self.TrsfOp.RotateCopy(theObject, theAxis, theAngle)
8802             else:
8803                 anObj = self.TrsfOp.Rotate(theObject, theAxis, theAngle)
8804             RaiseIfFailed("Rotate", self.TrsfOp)
8805             anObj.SetParameters(Parameters)
8806             return anObj
8807
8808         ## Rotate the given object around the given axis
8809         #  on the given angle, creating its copy before the rotation.
8810         #  @param theObject The object to be rotated.
8811         #  @param theAxis Rotation axis.
8812         #  @param theAngle Rotation angle in radians.
8813         #  @param theName Object name; when specified, this parameter is used
8814         #         for result publication in the study. Otherwise, if automatic
8815         #         publication is switched on, default value is used for result name.
8816         #
8817         #  @return New GEOM.GEOM_Object, containing the rotated object.
8818         #
8819         #  @ref tui_rotation "Example"
8820         @ManageTransactions("TrsfOp")
8821         def MakeRotation(self, theObject, theAxis, theAngle, theName=None):
8822             """
8823             Rotate the given object around the given axis
8824             on the given angle, creating its copy before the rotatation.
8825
8826             Parameters:
8827                 theObject The object to be rotated.
8828                 theAxis Rotation axis.
8829                 theAngle Rotation angle in radians.
8830                 theName Object name; when specified, this parameter is used
8831                         for result publication in the study. Otherwise, if automatic
8832                         publication is switched on, default value is used for result name.
8833
8834             Returns:
8835                 New GEOM.GEOM_Object, containing the rotated object.
8836             """
8837             # Example: see GEOM_TestAll.py
8838             flag = False
8839             if isinstance(theAngle,str):
8840                 flag = True
8841             theAngle, Parameters = ParseParameters(theAngle)
8842             if flag:
8843                 theAngle = theAngle*math.pi/180.0
8844             anObj = self.TrsfOp.RotateCopy(theObject, theAxis, theAngle)
8845             RaiseIfFailed("RotateCopy", self.TrsfOp)
8846             anObj.SetParameters(Parameters)
8847             self._autoPublish(anObj, theName, "rotated")
8848             return anObj
8849
8850         ## Rotate given object around vector perpendicular to plane
8851         #  containing three points.
8852         #  @param theObject The object to be rotated.
8853         #  @param theCentPoint central point the axis is the vector perpendicular to the plane
8854         #  containing the three points.
8855         #  @param thePoint1,thePoint2 points in a perpendicular plane of the axis.
8856         #  @param theCopy Flag used to rotate object itself or create a copy.
8857         #  @return Rotated @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
8858         #  new GEOM.GEOM_Object, containing the rotated object if @a theCopy flag is @c True.
8859         @ManageTransactions("TrsfOp")
8860         def RotateThreePoints(self, theObject, theCentPoint, thePoint1, thePoint2, theCopy=False):
8861             """
8862             Rotate given object around vector perpendicular to plane
8863             containing three points.
8864
8865             Parameters:
8866                 theObject The object to be rotated.
8867                 theCentPoint central point  the axis is the vector perpendicular to the plane
8868                              containing the three points.
8869                 thePoint1,thePoint2 points in a perpendicular plane of the axis.
8870                 theCopy Flag used to rotate object itself or create a copy.
8871
8872             Returns:
8873                 Rotated theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
8874                 new GEOM.GEOM_Object, containing the rotated object if theCopy flag is True.
8875             """
8876             if theCopy:
8877                 anObj = self.TrsfOp.RotateThreePointsCopy(theObject, theCentPoint, thePoint1, thePoint2)
8878             else:
8879                 anObj = self.TrsfOp.RotateThreePoints(theObject, theCentPoint, thePoint1, thePoint2)
8880             RaiseIfFailed("RotateThreePoints", self.TrsfOp)
8881             return anObj
8882
8883         ## Rotate given object around vector perpendicular to plane
8884         #  containing three points, creating its copy before the rotatation.
8885         #  @param theObject The object to be rotated.
8886         #  @param theCentPoint central point the axis is the vector perpendicular to the plane
8887         #  containing the three points.
8888         #  @param thePoint1,thePoint2 in a perpendicular plane of the axis.
8889         #  @param theName Object name; when specified, this parameter is used
8890         #         for result publication in the study. Otherwise, if automatic
8891         #         publication is switched on, default value is used for result name.
8892         #
8893         #  @return New GEOM.GEOM_Object, containing the rotated object.
8894         #
8895         #  @ref tui_rotation "Example"
8896         @ManageTransactions("TrsfOp")
8897         def MakeRotationThreePoints(self, theObject, theCentPoint, thePoint1, thePoint2, theName=None):
8898             """
8899             Rotate given object around vector perpendicular to plane
8900             containing three points, creating its copy before the rotatation.
8901
8902             Parameters:
8903                 theObject The object to be rotated.
8904                 theCentPoint central point  the axis is the vector perpendicular to the plane
8905                              containing the three points.
8906                 thePoint1,thePoint2  in a perpendicular plane of the axis.
8907                 theName Object name; when specified, this parameter is used
8908                         for result publication in the study. Otherwise, if automatic
8909                         publication is switched on, default value is used for result name.
8910
8911             Returns:
8912                 New GEOM.GEOM_Object, containing the rotated object.
8913             """
8914             # Example: see GEOM_TestAll.py
8915             anObj = self.TrsfOp.RotateThreePointsCopy(theObject, theCentPoint, thePoint1, thePoint2)
8916             RaiseIfFailed("RotateThreePointsCopy", self.TrsfOp)
8917             self._autoPublish(anObj, theName, "rotated")
8918             return anObj
8919
8920         ## Scale the given object by the specified factor.
8921         #  @param theObject The object to be scaled.
8922         #  @param thePoint Center point for scaling.
8923         #                  Passing None for it means scaling relatively the origin of global CS.
8924         #  @param theFactor Scaling factor value.
8925         #  @param theCopy Flag used to scale object itself or create a copy.
8926         #  @return Scaled @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
8927         #  new GEOM.GEOM_Object, containing the scaled object if @a theCopy flag is @c True.
8928         @ManageTransactions("TrsfOp")
8929         def Scale(self, theObject, thePoint, theFactor, theCopy=False):
8930             """
8931             Scale the given object by the specified factor.
8932
8933             Parameters:
8934                 theObject The object to be scaled.
8935                 thePoint Center point for scaling.
8936                          Passing None for it means scaling relatively the origin of global CS.
8937                 theFactor Scaling factor value.
8938                 theCopy Flag used to scale object itself or create a copy.
8939
8940             Returns:
8941                 Scaled theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
8942                 new GEOM.GEOM_Object, containing the scaled object if theCopy flag is True.
8943             """
8944             # Example: see GEOM_TestAll.py
8945             theFactor, Parameters = ParseParameters(theFactor)
8946             if theCopy:
8947                 anObj = self.TrsfOp.ScaleShapeCopy(theObject, thePoint, theFactor)
8948             else:
8949                 anObj = self.TrsfOp.ScaleShape(theObject, thePoint, theFactor)
8950             RaiseIfFailed("Scale", self.TrsfOp)
8951             anObj.SetParameters(Parameters)
8952             return anObj
8953
8954         ## Scale the given object by the factor, creating its copy before the scaling.
8955         #  @param theObject The object to be scaled.
8956         #  @param thePoint Center point for scaling.
8957         #                  Passing None for it means scaling relatively the origin of global CS.
8958         #  @param theFactor Scaling factor value.
8959         #  @param theName Object name; when specified, this parameter is used
8960         #         for result publication in the study. Otherwise, if automatic
8961         #         publication is switched on, default value is used for result name.
8962         #
8963         #  @return New GEOM.GEOM_Object, containing the scaled shape.
8964         #
8965         #  @ref tui_scale "Example"
8966         @ManageTransactions("TrsfOp")
8967         def MakeScaleTransform(self, theObject, thePoint, theFactor, theName=None):
8968             """
8969             Scale the given object by the factor, creating its copy before the scaling.
8970
8971             Parameters:
8972                 theObject The object to be scaled.
8973                 thePoint Center point for scaling.
8974                          Passing None for it means scaling relatively the origin of global CS.
8975                 theFactor Scaling factor value.
8976                 theName Object name; when specified, this parameter is used
8977                         for result publication in the study. Otherwise, if automatic
8978                         publication is switched on, default value is used for result name.
8979
8980             Returns:
8981                 New GEOM.GEOM_Object, containing the scaled shape.
8982             """
8983             # Example: see GEOM_TestAll.py
8984             theFactor, Parameters = ParseParameters(theFactor)
8985             anObj = self.TrsfOp.ScaleShapeCopy(theObject, thePoint, theFactor)
8986             RaiseIfFailed("ScaleShapeCopy", self.TrsfOp)
8987             anObj.SetParameters(Parameters)
8988             self._autoPublish(anObj, theName, "scaled")
8989             return anObj
8990
8991         ## Scale the given object by different factors along coordinate axes.
8992         #  @param theObject The object to be scaled.
8993         #  @param thePoint Center point for scaling.
8994         #                  Passing None for it means scaling relatively the origin of global CS.
8995         #  @param theFactorX,theFactorY,theFactorZ Scaling factors along each axis.
8996         #  @param theCopy Flag used to scale object itself or create a copy.
8997         #  @return Scaled @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
8998         #  new GEOM.GEOM_Object, containing the scaled object if @a theCopy flag is @c True.
8999         @ManageTransactions("TrsfOp")
9000         def ScaleAlongAxes(self, theObject, thePoint, theFactorX, theFactorY, theFactorZ, theCopy=False):
9001             """
9002             Scale the given object by different factors along coordinate axes.
9003
9004             Parameters:
9005                 theObject The object to be scaled.
9006                 thePoint Center point for scaling.
9007                             Passing None for it means scaling relatively the origin of global CS.
9008                 theFactorX,theFactorY,theFactorZ Scaling factors along each axis.
9009                 theCopy Flag used to scale object itself or create a copy.
9010
9011             Returns:
9012                 Scaled theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
9013                 new GEOM.GEOM_Object, containing the scaled object if theCopy flag is True.
9014             """
9015             # Example: see GEOM_TestAll.py
9016             theFactorX, theFactorY, theFactorZ, Parameters = ParseParameters(theFactorX, theFactorY, theFactorZ)
9017             if theCopy:
9018                 anObj = self.TrsfOp.ScaleShapeAlongAxesCopy(theObject, thePoint,
9019                                                             theFactorX, theFactorY, theFactorZ)
9020             else:
9021                 anObj = self.TrsfOp.ScaleShapeAlongAxes(theObject, thePoint,
9022                                                         theFactorX, theFactorY, theFactorZ)
9023             RaiseIfFailed("ScaleAlongAxes", self.TrsfOp)
9024             anObj.SetParameters(Parameters)
9025             return anObj
9026
9027         ## Scale the given object by different factors along coordinate axes,
9028         #  creating its copy before the scaling.
9029         #  @param theObject The object to be scaled.
9030         #  @param thePoint Center point for scaling.
9031         #                  Passing None for it means scaling relatively the origin of global CS.
9032         #  @param theFactorX,theFactorY,theFactorZ Scaling factors along each axis.
9033         #  @param theName Object name; when specified, this parameter is used
9034         #         for result publication in the study. Otherwise, if automatic
9035         #         publication is switched on, default value is used for result name.
9036         #
9037         #  @return New GEOM.GEOM_Object, containing the scaled shape.
9038         #
9039         #  @ref swig_scale "Example"
9040         @ManageTransactions("TrsfOp")
9041         def MakeScaleAlongAxes(self, theObject, thePoint, theFactorX, theFactorY, theFactorZ, theName=None):
9042             """
9043             Scale the given object by different factors along coordinate axes,
9044             creating its copy before the scaling.
9045
9046             Parameters:
9047                 theObject The object to be scaled.
9048                 thePoint Center point for scaling.
9049                             Passing None for it means scaling relatively the origin of global CS.
9050                 theFactorX,theFactorY,theFactorZ Scaling factors along each axis.
9051                 theName Object name; when specified, this parameter is used
9052                         for result publication in the study. Otherwise, if automatic
9053                         publication is switched on, default value is used for result name.
9054
9055             Returns:
9056                 New GEOM.GEOM_Object, containing the scaled shape.
9057             """
9058             # Example: see GEOM_TestAll.py
9059             theFactorX, theFactorY, theFactorZ, Parameters = ParseParameters(theFactorX, theFactorY, theFactorZ)
9060             anObj = self.TrsfOp.ScaleShapeAlongAxesCopy(theObject, thePoint,
9061                                                         theFactorX, theFactorY, theFactorZ)
9062             RaiseIfFailed("MakeScaleAlongAxes", self.TrsfOp)
9063             anObj.SetParameters(Parameters)
9064             self._autoPublish(anObj, theName, "scaled")
9065             return anObj
9066
9067         ## Mirror an object relatively the given plane.
9068         #  @param theObject The object to be mirrored.
9069         #  @param thePlane Plane of symmetry.
9070         #  @param theCopy Flag used to mirror object itself or create a copy.
9071         #  @return Mirrored @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
9072         #  new GEOM.GEOM_Object, containing the mirrored object if @a theCopy flag is @c True.
9073         @ManageTransactions("TrsfOp")
9074         def MirrorByPlane(self, theObject, thePlane, theCopy=False):
9075             """
9076             Mirror an object relatively the given plane.
9077
9078             Parameters:
9079                 theObject The object to be mirrored.
9080                 thePlane Plane of symmetry.
9081                 theCopy Flag used to mirror object itself or create a copy.
9082
9083             Returns:
9084                 Mirrored theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
9085                 new GEOM.GEOM_Object, containing the mirrored object if theCopy flag is True.
9086             """
9087             if theCopy:
9088                 anObj = self.TrsfOp.MirrorPlaneCopy(theObject, thePlane)
9089             else:
9090                 anObj = self.TrsfOp.MirrorPlane(theObject, thePlane)
9091             RaiseIfFailed("MirrorByPlane", self.TrsfOp)
9092             return anObj
9093
9094         ## Create an object, symmetrical
9095         #  to the given one relatively the given plane.
9096         #  @param theObject The object to be mirrored.
9097         #  @param thePlane Plane of symmetry.
9098         #  @param theName Object name; when specified, this parameter is used
9099         #         for result publication in the study. Otherwise, if automatic
9100         #         publication is switched on, default value is used for result name.
9101         #
9102         #  @return New GEOM.GEOM_Object, containing the mirrored shape.
9103         #
9104         #  @ref tui_mirror "Example"
9105         @ManageTransactions("TrsfOp")
9106         def MakeMirrorByPlane(self, theObject, thePlane, theName=None):
9107             """
9108             Create an object, symmetrical to the given one relatively the given plane.
9109
9110             Parameters:
9111                 theObject The object to be mirrored.
9112                 thePlane Plane of symmetry.
9113                 theName Object name; when specified, this parameter is used
9114                         for result publication in the study. Otherwise, if automatic
9115                         publication is switched on, default value is used for result name.
9116
9117             Returns:
9118                 New GEOM.GEOM_Object, containing the mirrored shape.
9119             """
9120             # Example: see GEOM_TestAll.py
9121             anObj = self.TrsfOp.MirrorPlaneCopy(theObject, thePlane)
9122             RaiseIfFailed("MirrorPlaneCopy", self.TrsfOp)
9123             self._autoPublish(anObj, theName, "mirrored")
9124             return anObj
9125
9126         ## Mirror an object relatively the given axis.
9127         #  @param theObject The object to be mirrored.
9128         #  @param theAxis Axis of symmetry.
9129         #  @param theCopy Flag used to mirror object itself or create a copy.
9130         #  @return Mirrored @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
9131         #  new GEOM.GEOM_Object, containing the mirrored object if @a theCopy flag is @c True.
9132         @ManageTransactions("TrsfOp")
9133         def MirrorByAxis(self, theObject, theAxis, theCopy=False):
9134             """
9135             Mirror an object relatively the given axis.
9136
9137             Parameters:
9138                 theObject The object to be mirrored.
9139                 theAxis Axis of symmetry.
9140                 theCopy Flag used to mirror object itself or create a copy.
9141
9142             Returns:
9143                 Mirrored theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
9144                 new GEOM.GEOM_Object, containing the mirrored object if theCopy flag is True.
9145             """
9146             if theCopy:
9147                 anObj = self.TrsfOp.MirrorAxisCopy(theObject, theAxis)
9148             else:
9149                 anObj = self.TrsfOp.MirrorAxis(theObject, theAxis)
9150             RaiseIfFailed("MirrorByAxis", self.TrsfOp)
9151             return anObj
9152
9153         ## Create an object, symmetrical
9154         #  to the given one relatively the given axis.
9155         #  @param theObject The object to be mirrored.
9156         #  @param theAxis Axis of symmetry.
9157         #  @param theName Object name; when specified, this parameter is used
9158         #         for result publication in the study. Otherwise, if automatic
9159         #         publication is switched on, default value is used for result name.
9160         #
9161         #  @return New GEOM.GEOM_Object, containing the mirrored shape.
9162         #
9163         #  @ref tui_mirror "Example"
9164         @ManageTransactions("TrsfOp")
9165         def MakeMirrorByAxis(self, theObject, theAxis, theName=None):
9166             """
9167             Create an object, symmetrical to the given one relatively the given axis.
9168
9169             Parameters:
9170                 theObject The object to be mirrored.
9171                 theAxis Axis of symmetry.
9172                 theName Object name; when specified, this parameter is used
9173                         for result publication in the study. Otherwise, if automatic
9174                         publication is switched on, default value is used for result name.
9175
9176             Returns:
9177                 New GEOM.GEOM_Object, containing the mirrored shape.
9178             """
9179             # Example: see GEOM_TestAll.py
9180             anObj = self.TrsfOp.MirrorAxisCopy(theObject, theAxis)
9181             RaiseIfFailed("MirrorAxisCopy", self.TrsfOp)
9182             self._autoPublish(anObj, theName, "mirrored")
9183             return anObj
9184
9185         ## Mirror an object relatively the given point.
9186         #  @param theObject The object to be mirrored.
9187         #  @param thePoint Point of symmetry.
9188         #  @param theCopy Flag used to mirror object itself or create a copy.
9189         #  @return Mirrored @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
9190         #  new GEOM.GEOM_Object, containing the mirrored object if @a theCopy flag is @c True.
9191         @ManageTransactions("TrsfOp")
9192         def MirrorByPoint(self, theObject, thePoint, theCopy=False):
9193             """
9194             Mirror an object relatively the given point.
9195
9196             Parameters:
9197                 theObject The object to be mirrored.
9198                 thePoint Point of symmetry.
9199                 theCopy Flag used to mirror object itself or create a copy.
9200
9201             Returns:
9202                 Mirrored theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
9203                 new GEOM.GEOM_Object, containing the mirrored object if theCopy flag is True.
9204             """
9205             # Example: see GEOM_TestAll.py
9206             if theCopy:
9207                 anObj = self.TrsfOp.MirrorPointCopy(theObject, thePoint)
9208             else:
9209                 anObj = self.TrsfOp.MirrorPoint(theObject, thePoint)
9210             RaiseIfFailed("MirrorByPoint", self.TrsfOp)
9211             return anObj
9212
9213         ## Create an object, symmetrical
9214         #  to the given one relatively the given point.
9215         #  @param theObject The object to be mirrored.
9216         #  @param thePoint Point of symmetry.
9217         #  @param theName Object name; when specified, this parameter is used
9218         #         for result publication in the study. Otherwise, if automatic
9219         #         publication is switched on, default value is used for result name.
9220         #
9221         #  @return New GEOM.GEOM_Object, containing the mirrored shape.
9222         #
9223         #  @ref tui_mirror "Example"
9224         @ManageTransactions("TrsfOp")
9225         def MakeMirrorByPoint(self, theObject, thePoint, theName=None):
9226             """
9227             Create an object, symmetrical
9228             to the given one relatively the given point.
9229
9230             Parameters:
9231                 theObject The object to be mirrored.
9232                 thePoint Point of symmetry.
9233                 theName Object name; when specified, this parameter is used
9234                         for result publication in the study. Otherwise, if automatic
9235                         publication is switched on, default value is used for result name.
9236
9237             Returns:
9238                 New GEOM.GEOM_Object, containing the mirrored shape.
9239             """
9240             # Example: see GEOM_TestAll.py
9241             anObj = self.TrsfOp.MirrorPointCopy(theObject, thePoint)
9242             RaiseIfFailed("MirrorPointCopy", self.TrsfOp)
9243             self._autoPublish(anObj, theName, "mirrored")
9244             return anObj
9245
9246         ## Modify the location of the given object.
9247         #  @param theObject The object to be displaced.
9248         #  @param theStartLCS Coordinate system to perform displacement from it.\n
9249         #                     If \a theStartLCS is NULL, displacement
9250         #                     will be performed from global CS.\n
9251         #                     If \a theObject itself is used as \a theStartLCS,
9252         #                     its location will be changed to \a theEndLCS.
9253         #  @param theEndLCS Coordinate system to perform displacement to it.
9254         #  @param theCopy Flag used to displace object itself or create a copy.
9255         #  @return Displaced @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
9256         #  new GEOM.GEOM_Object, containing the displaced object if @a theCopy flag is @c True.
9257         @ManageTransactions("TrsfOp")
9258         def Position(self, theObject, theStartLCS, theEndLCS, theCopy=False):
9259             """
9260             Modify the Location of the given object by LCS, creating its copy before the setting.
9261
9262             Parameters:
9263                 theObject The object to be displaced.
9264                 theStartLCS Coordinate system to perform displacement from it.
9265                             If theStartLCS is NULL, displacement
9266                             will be performed from global CS.
9267                             If theObject itself is used as theStartLCS,
9268                             its location will be changed to theEndLCS.
9269                 theEndLCS Coordinate system to perform displacement to it.
9270                 theCopy Flag used to displace object itself or create a copy.
9271
9272             Returns:
9273                 Displaced theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
9274                 new GEOM.GEOM_Object, containing the displaced object if theCopy flag is True.
9275             """
9276             # Example: see GEOM_TestAll.py
9277             if theCopy:
9278                 anObj = self.TrsfOp.PositionShapeCopy(theObject, theStartLCS, theEndLCS)
9279             else:
9280                 anObj = self.TrsfOp.PositionShape(theObject, theStartLCS, theEndLCS)
9281             RaiseIfFailed("Displace", self.TrsfOp)
9282             return anObj
9283
9284         ## Modify the Location of the given object by LCS,
9285         #  creating its copy before the setting.
9286         #  @param theObject The object to be displaced.
9287         #  @param theStartLCS Coordinate system to perform displacement from it.\n
9288         #                     If \a theStartLCS is NULL, displacement
9289         #                     will be performed from global CS.\n
9290         #                     If \a theObject itself is used as \a theStartLCS,
9291         #                     its location will be changed to \a theEndLCS.
9292         #  @param theEndLCS Coordinate system to perform displacement to it.
9293         #  @param theName Object name; when specified, this parameter is used
9294         #         for result publication in the study. Otherwise, if automatic
9295         #         publication is switched on, default value is used for result name.
9296         #
9297         #  @return New GEOM.GEOM_Object, containing the displaced shape.
9298         #
9299         #  @ref tui_modify_location "Example"
9300         @ManageTransactions("TrsfOp")
9301         def MakePosition(self, theObject, theStartLCS, theEndLCS, theName=None):
9302             """
9303             Modify the Location of the given object by LCS, creating its copy before the setting.
9304
9305             Parameters:
9306                 theObject The object to be displaced.
9307                 theStartLCS Coordinate system to perform displacement from it.
9308                             If theStartLCS is NULL, displacement
9309                             will be performed from global CS.
9310                             If theObject itself is used as theStartLCS,
9311                             its location will be changed to theEndLCS.
9312                 theEndLCS Coordinate system to perform displacement to it.
9313                 theName Object name; when specified, this parameter is used
9314                         for result publication in the study. Otherwise, if automatic
9315                         publication is switched on, default value is used for result name.
9316
9317             Returns:
9318                 New GEOM.GEOM_Object, containing the displaced shape.
9319
9320             Example of usage:
9321                 # create local coordinate systems
9322                 cs1 = geompy.MakeMarker( 0, 0, 0, 1,0,0, 0,1,0)
9323                 cs2 = geompy.MakeMarker(30,40,40, 1,0,0, 0,1,0)
9324                 # modify the location of the given object
9325                 position = geompy.MakePosition(cylinder, cs1, cs2)
9326             """
9327             # Example: see GEOM_TestAll.py
9328             anObj = self.TrsfOp.PositionShapeCopy(theObject, theStartLCS, theEndLCS)
9329             RaiseIfFailed("PositionShapeCopy", self.TrsfOp)
9330             self._autoPublish(anObj, theName, "displaced")
9331             return anObj
9332
9333         ## Modify the Location of the given object by Path.
9334         #  @param  theObject The object to be displaced.
9335         #  @param  thePath Wire or Edge along that the object will be translated.
9336         #  @param  theDistance progress of Path (0 = start location, 1 = end of path location).
9337         #  @param  theCopy is to create a copy objects if true.
9338         #  @param  theReverse  0 - for usual direction, 1 - to reverse path direction.
9339         #  @return Displaced @a theObject (GEOM.GEOM_Object) if @a theCopy is @c False or
9340         #          new GEOM.GEOM_Object, containing the displaced shape if @a theCopy is @c True.
9341         #
9342         #  @ref tui_modify_location "Example"
9343         @ManageTransactions("TrsfOp")
9344         def PositionAlongPath(self,theObject, thePath, theDistance, theCopy, theReverse):
9345             """
9346             Modify the Location of the given object by Path.
9347
9348             Parameters:
9349                  theObject The object to be displaced.
9350                  thePath Wire or Edge along that the object will be translated.
9351                  theDistance progress of Path (0 = start location, 1 = end of path location).
9352                  theCopy is to create a copy objects if true.
9353                  theReverse  0 - for usual direction, 1 - to reverse path direction.
9354
9355             Returns:
9356                  Displaced theObject (GEOM.GEOM_Object) if theCopy is False or
9357                  new GEOM.GEOM_Object, containing the displaced shape if theCopy is True.
9358
9359             Example of usage:
9360                 position = geompy.PositionAlongPath(cylinder, circle, 0.75, 1, 1)
9361             """
9362             # Example: see GEOM_TestAll.py
9363             anObj = self.TrsfOp.PositionAlongPath(theObject, thePath, theDistance, theCopy, theReverse)
9364             RaiseIfFailed("PositionAlongPath", self.TrsfOp)
9365             return anObj
9366
9367         ## Modify the Location of the given object by Path, creating its copy before the operation.
9368         #  @param theObject The object to be displaced.
9369         #  @param thePath Wire or Edge along that the object will be translated.
9370         #  @param theDistance progress of Path (0 = start location, 1 = end of path location).
9371         #  @param theReverse  0 - for usual direction, 1 - to reverse path direction.
9372         #  @param theName Object name; when specified, this parameter is used
9373         #         for result publication in the study. Otherwise, if automatic
9374         #         publication is switched on, default value is used for result name.
9375         #
9376         #  @return New GEOM.GEOM_Object, containing the displaced shape.
9377         @ManageTransactions("TrsfOp")
9378         def MakePositionAlongPath(self, theObject, thePath, theDistance, theReverse, theName=None):
9379             """
9380             Modify the Location of the given object by Path, creating its copy before the operation.
9381
9382             Parameters:
9383                  theObject The object to be displaced.
9384                  thePath Wire or Edge along that the object will be translated.
9385                  theDistance progress of Path (0 = start location, 1 = end of path location).
9386                  theReverse  0 - for usual direction, 1 - to reverse path direction.
9387                  theName Object name; when specified, this parameter is used
9388                          for result publication in the study. Otherwise, if automatic
9389                          publication is switched on, default value is used for result name.
9390
9391             Returns:
9392                 New GEOM.GEOM_Object, containing the displaced shape.
9393             """
9394             # Example: see GEOM_TestAll.py
9395             anObj = self.TrsfOp.PositionAlongPath(theObject, thePath, theDistance, 1, theReverse)
9396             RaiseIfFailed("PositionAlongPath", self.TrsfOp)
9397             self._autoPublish(anObj, theName, "displaced")
9398             return anObj
9399
9400         ## Offset given shape.
9401         #  @param theObject The base object for the offset.
9402         #  @param theOffset Offset value.
9403         #  @param theCopy Flag used to offset object itself or create a copy.
9404         #  @return Modified @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
9405         #  new GEOM.GEOM_Object, containing the result of offset operation if @a theCopy flag is @c True.
9406         @ManageTransactions("TrsfOp")
9407         def Offset(self, theObject, theOffset, theCopy=False):
9408             """
9409             Offset given shape.
9410
9411             Parameters:
9412                 theObject The base object for the offset.
9413                 theOffset Offset value.
9414                 theCopy Flag used to offset object itself or create a copy.
9415
9416             Returns:
9417                 Modified theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
9418                 new GEOM.GEOM_Object, containing the result of offset operation if theCopy flag is True.
9419             """
9420             theOffset, Parameters = ParseParameters(theOffset)
9421             if theCopy:
9422                 anObj = self.TrsfOp.OffsetShapeCopy(theObject, theOffset, True)
9423             else:
9424                 anObj = self.TrsfOp.OffsetShape(theObject, theOffset, True)
9425             RaiseIfFailed("Offset", self.TrsfOp)
9426             anObj.SetParameters(Parameters)
9427             return anObj
9428
9429         ## Create new object as offset of the given one. Gap between two adjacent
9430         #  offset surfaces is filled by a pipe.
9431         #  @param theObject The base object for the offset.
9432         #  @param theOffset Offset value.
9433         #  @param theName Object name; when specified, this parameter is used
9434         #         for result publication in the study. Otherwise, if automatic
9435         #         publication is switched on, default value is used for result name.
9436         #
9437         #  @return New GEOM.GEOM_Object, containing the offset object.
9438         #
9439         #  @sa MakeOffsetIntersectionJoin
9440         #  @ref tui_offset "Example"
9441         @ManageTransactions("TrsfOp")
9442         def MakeOffset(self, theObject, theOffset, theName=None):
9443             """
9444             Create new object as offset of the given one. Gap between adjacent
9445             offset surfaces is filled by a pipe.
9446
9447             Parameters:
9448                 theObject The base object for the offset.
9449                 theOffset Offset value.
9450                 theName Object name; when specified, this parameter is used
9451                         for result publication in the study. Otherwise, if automatic
9452                         publication is switched on, default value is used for result name.
9453
9454             Returns:
9455                 New GEOM.GEOM_Object, containing the offset object.
9456
9457             Example of usage:
9458                  box = geompy.MakeBox(20, 20, 20, 200, 200, 200)
9459                  # create a new object as offset of the given object
9460                  offset = geompy.MakeOffset(box, 70.)
9461             """
9462             # Example: see GEOM_TestAll.py
9463             theOffset, Parameters = ParseParameters(theOffset)
9464             anObj = self.TrsfOp.OffsetShapeCopy( theObject, theOffset, True )
9465             RaiseIfFailed("OffsetShapeCopy", self.TrsfOp)
9466             anObj.SetParameters(Parameters)
9467             self._autoPublish(anObj, theName, "offset")
9468             return anObj
9469
9470         ## Create new object as offset of the given one. Gap between adjacent
9471         #  offset surfaces is filled by extending and intersecting them.
9472         #  @param theObject The base object for the offset.
9473         #  @param theOffset Offset value.
9474         #  @param theName Object name; when specified, this parameter is used
9475         #         for result publication in the study. Otherwise, if automatic
9476         #         publication is switched on, default value is used for result name.
9477         #
9478         #  @return New GEOM.GEOM_Object, containing the offset object.
9479         #
9480         #  @sa MakeOffset
9481         #  @ref tui_offset "Example"
9482         @ManageTransactions("TrsfOp")
9483         def MakeOffsetIntersectionJoin(self, theObject, theOffset, theName=None):
9484             """
9485             Create new object as offset of the given one. Gap between adjacent
9486             offset surfaces is filled by extending and intersecting them.
9487
9488             Parameters:
9489                 theObject The base object for the offset.
9490                 theOffset Offset value.
9491                 theName Object name; when specified, this parameter is used
9492                         for result publication in the study. Otherwise, if automatic
9493                         publication is switched on, default value is used for result name.
9494
9495             Returns:
9496                 New GEOM.GEOM_Object, containing the offset object.
9497
9498             Example of usage:
9499                  box = geompy.MakeBox(20, 20, 20, 200, 200, 200)
9500                  # create a new box extended by 70
9501                  offset = geompy.MakeOffsetIntersectionJoin(box, 70.)
9502             """
9503             # Example: see GEOM_TestAll.py
9504             theOffset, Parameters = ParseParameters( theOffset )
9505             anObj = self.TrsfOp.OffsetShapeCopy( theObject, theOffset, False )
9506             RaiseIfFailed("OffsetShapeCopy", self.TrsfOp)
9507             anObj.SetParameters(Parameters)
9508             self._autoPublish(anObj, theName, "offset")
9509             return anObj
9510
9511         ## Create new object as projection of the given one on another.
9512         #  @param theSource The source object for the projection. It can be a point, edge or wire.
9513         #         Edge and wire are acceptable if @a theTarget is a face.
9514         #  @param theTarget The target object. It can be planar or cylindrical face, edge or wire.
9515         #  @param theName Object name; when specified, this parameter is used
9516         #         for result publication in the study. Otherwise, if automatic
9517         #         publication is switched on, default value is used for result name.
9518         #
9519         #  @return New GEOM.GEOM_Object, containing the projection.
9520         #
9521         #  @ref tui_projection "Example"
9522         @ManageTransactions("TrsfOp")
9523         def MakeProjection(self, theSource, theTarget, theName=None):
9524             """
9525             Create new object as projection of the given one on another.
9526
9527             Parameters:
9528                 theSource The source object for the projection. It can be a point, edge or wire.
9529                           Edge and wire are acceptable if theTarget is a face.
9530                 theTarget The target object. It can be planar or cylindrical face, edge or wire.
9531                 theName Object name; when specified, this parameter is used
9532                         for result publication in the study. Otherwise, if automatic
9533                         publication is switched on, default value is used for result name.
9534
9535             Returns:
9536                 New GEOM.GEOM_Object, containing the projection.
9537             """
9538             # Example: see GEOM_TestAll.py
9539             anObj = self.TrsfOp.ProjectShapeCopy(theSource, theTarget)
9540             RaiseIfFailed("ProjectShapeCopy", self.TrsfOp)
9541             self._autoPublish(anObj, theName, "projection")
9542             return anObj
9543
9544         ## Create a projection of the given point on a wire or an edge.
9545         #  If there are no solutions or there are 2 or more solutions It throws an
9546         #  exception.
9547         #  @param thePoint the point to be projected.
9548         #  @param theWire the wire. The edge is accepted as well.
9549         #  @param theName Object name; when specified, this parameter is used
9550         #         for result publication in the study. Otherwise, if automatic
9551         #         publication is switched on, default value is used for result name.
9552         #
9553         #  @return [\a u, \a PointOnEdge, \a EdgeInWireIndex]
9554         #  \n \a u: The parameter of projection point on edge.
9555         #  \n \a PointOnEdge: The projection point.
9556         #  \n \a EdgeInWireIndex: The index of an edge in a wire.
9557         #
9558         #  @ref tui_projection "Example"
9559         @ManageTransactions("TrsfOp")
9560         def MakeProjectionOnWire(self, thePoint, theWire, theName=None):
9561             """
9562             Create a projection of the given point on a wire or an edge.
9563             If there are no solutions or there are 2 or more solutions It throws an
9564             exception.
9565
9566             Parameters:
9567                 thePoint the point to be projected.
9568                 theWire the wire. The edge is accepted as well.
9569                 theName Object name; when specified, this parameter is used
9570                         for result publication in the study. Otherwise, if automatic
9571                         publication is switched on, default value is used for result name.
9572
9573             Returns:
9574                 [u, PointOnEdge, EdgeInWireIndex]
9575                  u: The parameter of projection point on edge.
9576                  PointOnEdge: The projection point.
9577                  EdgeInWireIndex: The index of an edge in a wire.
9578             """
9579             # Example: see GEOM_TestAll.py
9580             anObj = self.TrsfOp.ProjectPointOnWire(thePoint, theWire)
9581             RaiseIfFailed("ProjectPointOnWire", self.TrsfOp)
9582             self._autoPublish(anObj[1], theName, "projection")
9583             return anObj
9584
9585         # -----------------------------------------------------------------------------
9586         # Patterns
9587         # -----------------------------------------------------------------------------
9588
9589         ## Translate the given object along the given vector a given number times
9590         #  @param theObject The object to be translated.
9591         #  @param theVector Direction of the translation. DX if None.
9592         #  @param theStep Distance to translate on.
9593         #  @param theNbTimes Quantity of translations to be done.
9594         #  @param theName Object name; when specified, this parameter is used
9595         #         for result publication in the study. Otherwise, if automatic
9596         #         publication is switched on, default value is used for result name.
9597         #
9598         #  @return New GEOM.GEOM_Object, containing compound of all
9599         #          the shapes, obtained after each translation.
9600         #
9601         #  @ref tui_multi_translation "Example"
9602         @ManageTransactions("TrsfOp")
9603         def MakeMultiTranslation1D(self, theObject, theVector, theStep, theNbTimes, theName=None):
9604             """
9605             Translate the given object along the given vector a given number times
9606
9607             Parameters:
9608                 theObject The object to be translated.
9609                 theVector Direction of the translation. DX if None.
9610                 theStep Distance to translate on.
9611                 theNbTimes Quantity of translations to be done.
9612                 theName Object name; when specified, this parameter is used
9613                         for result publication in the study. Otherwise, if automatic
9614                         publication is switched on, default value is used for result name.
9615
9616             Returns:
9617                 New GEOM.GEOM_Object, containing compound of all
9618                 the shapes, obtained after each translation.
9619
9620             Example of usage:
9621                 r1d = geompy.MakeMultiTranslation1D(prism, vect, 20, 4)
9622             """
9623             # Example: see GEOM_TestAll.py
9624             theStep, theNbTimes, Parameters = ParseParameters(theStep, theNbTimes)
9625             anObj = self.TrsfOp.MultiTranslate1D(theObject, theVector, theStep, theNbTimes)
9626             RaiseIfFailed("MultiTranslate1D", self.TrsfOp)
9627             anObj.SetParameters(Parameters)
9628             self._autoPublish(anObj, theName, "multitranslation")
9629             return anObj
9630
9631         ## Conseqently apply two specified translations to theObject specified number of times.
9632         #  @param theObject The object to be translated.
9633         #  @param theVector1 Direction of the first translation. DX if None.
9634         #  @param theStep1 Step of the first translation.
9635         #  @param theNbTimes1 Quantity of translations to be done along theVector1.
9636         #  @param theVector2 Direction of the second translation. DY if None.
9637         #  @param theStep2 Step of the second translation.
9638         #  @param theNbTimes2 Quantity of translations to be done along theVector2.
9639         #  @param theName Object name; when specified, this parameter is used
9640         #         for result publication in the study. Otherwise, if automatic
9641         #         publication is switched on, default value is used for result name.
9642         #
9643         #  @return New GEOM.GEOM_Object, containing compound of all
9644         #          the shapes, obtained after each translation.
9645         #
9646         #  @ref tui_multi_translation "Example"
9647         @ManageTransactions("TrsfOp")
9648         def MakeMultiTranslation2D(self, theObject, theVector1, theStep1, theNbTimes1,
9649                                    theVector2, theStep2, theNbTimes2, theName=None):
9650             """
9651             Conseqently apply two specified translations to theObject specified number of times.
9652
9653             Parameters:
9654                 theObject The object to be translated.
9655                 theVector1 Direction of the first translation. DX if None.
9656                 theStep1 Step of the first translation.
9657                 theNbTimes1 Quantity of translations to be done along theVector1.
9658                 theVector2 Direction of the second translation. DY if None.
9659                 theStep2 Step of the second translation.
9660                 theNbTimes2 Quantity of translations to be done along theVector2.
9661                 theName Object name; when specified, this parameter is used
9662                         for result publication in the study. Otherwise, if automatic
9663                         publication is switched on, default value is used for result name.
9664
9665             Returns:
9666                 New GEOM.GEOM_Object, containing compound of all
9667                 the shapes, obtained after each translation.
9668
9669             Example of usage:
9670                 tr2d = geompy.MakeMultiTranslation2D(prism, vect1, 20, 4, vect2, 80, 3)
9671             """
9672             # Example: see GEOM_TestAll.py
9673             theStep1,theNbTimes1,theStep2,theNbTimes2, Parameters = ParseParameters(theStep1,theNbTimes1,theStep2,theNbTimes2)
9674             anObj = self.TrsfOp.MultiTranslate2D(theObject, theVector1, theStep1, theNbTimes1,
9675                                                  theVector2, theStep2, theNbTimes2)
9676             RaiseIfFailed("MultiTranslate2D", self.TrsfOp)
9677             anObj.SetParameters(Parameters)
9678             self._autoPublish(anObj, theName, "multitranslation")
9679             return anObj
9680
9681         ## Rotate the given object around the given axis a given number times.
9682         #  Rotation angle will be 2*PI/theNbTimes.
9683         #  @param theObject The object to be rotated.
9684         #  @param theAxis The rotation axis. DZ if None.
9685         #  @param theNbTimes Quantity of rotations to be done.
9686         #  @param theName Object name; when specified, this parameter is used
9687         #         for result publication in the study. Otherwise, if automatic
9688         #         publication is switched on, default value is used for result name.
9689         #
9690         #  @return New GEOM.GEOM_Object, containing compound of all the
9691         #          shapes, obtained after each rotation.
9692         #
9693         #  @ref tui_multi_rotation "Example"
9694         @ManageTransactions("TrsfOp")
9695         def MultiRotate1DNbTimes (self, theObject, theAxis, theNbTimes, theName=None):
9696             """
9697             Rotate the given object around the given axis a given number times.
9698             Rotation angle will be 2*PI/theNbTimes.
9699
9700             Parameters:
9701                 theObject The object to be rotated.
9702                 theAxis The rotation axis. DZ if None.
9703                 theNbTimes Quantity of rotations to be done.
9704                 theName Object name; when specified, this parameter is used
9705                         for result publication in the study. Otherwise, if automatic
9706                         publication is switched on, default value is used for result name.
9707
9708             Returns:
9709                 New GEOM.GEOM_Object, containing compound of all the
9710                 shapes, obtained after each rotation.
9711
9712             Example of usage:
9713                 rot1d = geompy.MultiRotate1DNbTimes(prism, vect, 4)
9714             """
9715             # Example: see GEOM_TestAll.py
9716             theNbTimes, Parameters = ParseParameters(theNbTimes)
9717             anObj = self.TrsfOp.MultiRotate1D(theObject, theAxis, theNbTimes)
9718             RaiseIfFailed("MultiRotate1DNbTimes", self.TrsfOp)
9719             anObj.SetParameters(Parameters)
9720             self._autoPublish(anObj, theName, "multirotation")
9721             return anObj
9722
9723         ## Rotate the given object around the given axis
9724         #  a given number times on the given angle.
9725         #  @param theObject The object to be rotated.
9726         #  @param theAxis The rotation axis. DZ if None.
9727         #  @param theAngleStep Rotation angle in radians.
9728         #  @param theNbTimes Quantity of rotations to be done.
9729         #  @param theName Object name; when specified, this parameter is used
9730         #         for result publication in the study. Otherwise, if automatic
9731         #         publication is switched on, default value is used for result name.
9732         #
9733         #  @return New GEOM.GEOM_Object, containing compound of all the
9734         #          shapes, obtained after each rotation.
9735         #
9736         #  @ref tui_multi_rotation "Example"
9737         @ManageTransactions("TrsfOp")
9738         def MultiRotate1DByStep(self, theObject, theAxis, theAngleStep, theNbTimes, theName=None):
9739             """
9740             Rotate the given object around the given axis
9741             a given number times on the given angle.
9742
9743             Parameters:
9744                 theObject The object to be rotated.
9745                 theAxis The rotation axis. DZ if None.
9746                 theAngleStep Rotation angle in radians.
9747                 theNbTimes Quantity of rotations to be done.
9748                 theName Object name; when specified, this parameter is used
9749                         for result publication in the study. Otherwise, if automatic
9750                         publication is switched on, default value is used for result name.
9751
9752             Returns:
9753                 New GEOM.GEOM_Object, containing compound of all the
9754                 shapes, obtained after each rotation.
9755
9756             Example of usage:
9757                 rot1d = geompy.MultiRotate1DByStep(prism, vect, math.pi/4, 4)
9758             """
9759             # Example: see GEOM_TestAll.py
9760             theAngleStep, theNbTimes, Parameters = ParseParameters(theAngleStep, theNbTimes)
9761             anObj = self.TrsfOp.MultiRotate1DByStep(theObject, theAxis, theAngleStep, theNbTimes)
9762             RaiseIfFailed("MultiRotate1DByStep", self.TrsfOp)
9763             anObj.SetParameters(Parameters)
9764             self._autoPublish(anObj, theName, "multirotation")
9765             return anObj
9766
9767         ## Rotate the given object around the given axis a given
9768         #  number times and multi-translate each rotation result.
9769         #  Rotation angle will be 2*PI/theNbTimes1.
9770         #  Translation direction passes through center of gravity
9771         #  of rotated shape and its projection on the rotation axis.
9772         #  @param theObject The object to be rotated.
9773         #  @param theAxis Rotation axis. DZ if None.
9774         #  @param theNbTimes1 Quantity of rotations to be done.
9775         #  @param theRadialStep Translation distance.
9776         #  @param theNbTimes2 Quantity of translations to be done.
9777         #  @param theName Object name; when specified, this parameter is used
9778         #         for result publication in the study. Otherwise, if automatic
9779         #         publication is switched on, default value is used for result name.
9780         #
9781         #  @return New GEOM.GEOM_Object, containing compound of all the
9782         #          shapes, obtained after each transformation.
9783         #
9784         #  @ref tui_multi_rotation "Example"
9785         @ManageTransactions("TrsfOp")
9786         def MultiRotate2DNbTimes(self, theObject, theAxis, theNbTimes1, theRadialStep, theNbTimes2, theName=None):
9787             """
9788             Rotate the given object around the
9789             given axis on the given angle a given number
9790             times and multi-translate each rotation result.
9791             Translation direction passes through center of gravity
9792             of rotated shape and its projection on the rotation axis.
9793
9794             Parameters:
9795                 theObject The object to be rotated.
9796                 theAxis Rotation axis. DZ if None.
9797                 theNbTimes1 Quantity of rotations to be done.
9798                 theRadialStep Translation distance.
9799                 theNbTimes2 Quantity of translations to be done.
9800                 theName Object name; when specified, this parameter is used
9801                         for result publication in the study. Otherwise, if automatic
9802                         publication is switched on, default value is used for result name.
9803
9804             Returns:
9805                 New GEOM.GEOM_Object, containing compound of all the
9806                 shapes, obtained after each transformation.
9807
9808             Example of usage:
9809                 rot2d = geompy.MultiRotate2D(prism, vect, 60, 4, 50, 5)
9810             """
9811             # Example: see GEOM_TestAll.py
9812             theNbTimes1, theRadialStep, theNbTimes2, Parameters = ParseParameters(theNbTimes1, theRadialStep, theNbTimes2)
9813             anObj = self.TrsfOp.MultiRotate2DNbTimes(theObject, theAxis, theNbTimes1, theRadialStep, theNbTimes2)
9814             RaiseIfFailed("MultiRotate2DNbTimes", self.TrsfOp)
9815             anObj.SetParameters(Parameters)
9816             self._autoPublish(anObj, theName, "multirotation")
9817             return anObj
9818
9819         ## Rotate the given object around the
9820         #  given axis on the given angle a given number
9821         #  times and multi-translate each rotation result.
9822         #  Translation direction passes through center of gravity
9823         #  of rotated shape and its projection on the rotation axis.
9824         #  @param theObject The object to be rotated.
9825         #  @param theAxis Rotation axis. DZ if None.
9826         #  @param theAngleStep Rotation angle in radians.
9827         #  @param theNbTimes1 Quantity of rotations to be done.
9828         #  @param theRadialStep Translation distance.
9829         #  @param theNbTimes2 Quantity of translations to be done.
9830         #  @param theName Object name; when specified, this parameter is used
9831         #         for result publication in the study. Otherwise, if automatic
9832         #         publication is switched on, default value is used for result name.
9833         #
9834         #  @return New GEOM.GEOM_Object, containing compound of all the
9835         #          shapes, obtained after each transformation.
9836         #
9837         #  @ref tui_multi_rotation "Example"
9838         @ManageTransactions("TrsfOp")
9839         def MultiRotate2DByStep (self, theObject, theAxis, theAngleStep, theNbTimes1, theRadialStep, theNbTimes2, theName=None):
9840             """
9841             Rotate the given object around the
9842             given axis on the given angle a given number
9843             times and multi-translate each rotation result.
9844             Translation direction passes through center of gravity
9845             of rotated shape and its projection on the rotation axis.
9846
9847             Parameters:
9848                 theObject The object to be rotated.
9849                 theAxis Rotation axis. DZ if None.
9850                 theAngleStep Rotation angle in radians.
9851                 theNbTimes1 Quantity of rotations to be done.
9852                 theRadialStep Translation distance.
9853                 theNbTimes2 Quantity of translations to be done.
9854                 theName Object name; when specified, this parameter is used
9855                         for result publication in the study. Otherwise, if automatic
9856                         publication is switched on, default value is used for result name.
9857
9858             Returns:
9859                 New GEOM.GEOM_Object, containing compound of all the
9860                 shapes, obtained after each transformation.
9861
9862             Example of usage:
9863                 rot2d = geompy.MultiRotate2D(prism, vect, math.pi/3, 4, 50, 5)
9864             """
9865             # Example: see GEOM_TestAll.py
9866             theAngleStep, theNbTimes1, theRadialStep, theNbTimes2, Parameters = ParseParameters(theAngleStep, theNbTimes1, theRadialStep, theNbTimes2)
9867             anObj = self.TrsfOp.MultiRotate2DByStep(theObject, theAxis, theAngleStep, theNbTimes1, theRadialStep, theNbTimes2)
9868             RaiseIfFailed("MultiRotate2DByStep", self.TrsfOp)
9869             anObj.SetParameters(Parameters)
9870             self._autoPublish(anObj, theName, "multirotation")
9871             return anObj
9872
9873         ## The same, as MultiRotate1DNbTimes(), but axis is given by direction and point
9874         #
9875         #  @ref swig_MakeMultiRotation "Example"
9876         def MakeMultiRotation1DNbTimes(self, aShape, aDir, aPoint, aNbTimes, theName=None):
9877             """
9878             The same, as geompy.MultiRotate1DNbTimes, but axis is given by direction and point
9879
9880             Example of usage:
9881                 pz = geompy.MakeVertex(0, 0, 100)
9882                 vy = geompy.MakeVectorDXDYDZ(0, 100, 0)
9883                 MultiRot1D = geompy.MakeMultiRotation1DNbTimes(prism, vy, pz, 6)
9884             """
9885             # Example: see GEOM_TestOthers.py
9886             aVec = self.MakeLine(aPoint,aDir)
9887             # note: auto-publishing is done in self.MultiRotate1D()
9888             anObj = self.MultiRotate1DNbTimes(aShape, aVec, aNbTimes, theName)
9889             return anObj
9890
9891         ## The same, as MultiRotate1DByStep(), but axis is given by direction and point
9892         #
9893         #  @ref swig_MakeMultiRotation "Example"
9894         def MakeMultiRotation1DByStep(self, aShape, aDir, aPoint, anAngle, aNbTimes, theName=None):
9895             """
9896             The same, as geompy.MultiRotate1D, but axis is given by direction and point
9897
9898             Example of usage:
9899                 pz = geompy.MakeVertex(0, 0, 100)
9900                 vy = geompy.MakeVectorDXDYDZ(0, 100, 0)
9901                 MultiRot1D = geompy.MakeMultiRotation1DByStep(prism, vy, pz, math.pi/3, 6)
9902             """
9903             # Example: see GEOM_TestOthers.py
9904             aVec = self.MakeLine(aPoint,aDir)
9905             # note: auto-publishing is done in self.MultiRotate1D()
9906             anObj = self.MultiRotate1DByStep(aShape, aVec, anAngle, aNbTimes, theName)
9907             return anObj
9908
9909         ## The same, as MultiRotate2DNbTimes(), but axis is given by direction and point
9910         #
9911         #  @ref swig_MakeMultiRotation "Example"
9912         def MakeMultiRotation2DNbTimes(self, aShape, aDir, aPoint, nbtimes1, aStep, nbtimes2, theName=None):
9913             """
9914             The same, as MultiRotate2DNbTimes(), but axis is given by direction and point
9915
9916             Example of usage:
9917                 pz = geompy.MakeVertex(0, 0, 100)
9918                 vy = geompy.MakeVectorDXDYDZ(0, 100, 0)
9919                 MultiRot2D = geompy.MakeMultiRotation2DNbTimes(f12, vy, pz, 6, 30, 3)
9920             """
9921             # Example: see GEOM_TestOthers.py
9922             aVec = self.MakeLine(aPoint,aDir)
9923             # note: auto-publishing is done in self.MultiRotate2DNbTimes()
9924             anObj = self.MultiRotate2DNbTimes(aShape, aVec, nbtimes1, aStep, nbtimes2, theName)
9925             return anObj
9926
9927         ## The same, as MultiRotate2DByStep(), but axis is given by direction and point
9928         #
9929         #  @ref swig_MakeMultiRotation "Example"
9930         def MakeMultiRotation2DByStep(self, aShape, aDir, aPoint, anAngle, nbtimes1, aStep, nbtimes2, theName=None):
9931             """
9932             The same, as MultiRotate2DByStep(), but axis is given by direction and point
9933
9934             Example of usage:
9935                 pz = geompy.MakeVertex(0, 0, 100)
9936                 vy = geompy.MakeVectorDXDYDZ(0, 100, 0)
9937                 MultiRot2D = geompy.MakeMultiRotation2DByStep(f12, vy, pz, math.pi/4, 6, 30, 3)
9938             """
9939             # Example: see GEOM_TestOthers.py
9940             aVec = self.MakeLine(aPoint,aDir)
9941             # note: auto-publishing is done in self.MultiRotate2D()
9942             anObj = self.MultiRotate2DByStep(aShape, aVec, anAngle, nbtimes1, aStep, nbtimes2, theName)
9943             return anObj
9944
9945         ##
9946         #  Compute a wire or a face that represents a projection of the source
9947         #  shape onto cylinder. The cylinder's coordinate system is the same
9948         #  as the global coordinate system.
9949         #
9950         #  @param theObject The object to be projected. It can be either
9951         #         a planar wire or a face.
9952         #  @param theRadius The radius of the cylinder.
9953         #  @param theStartAngle The starting angle in radians from
9954         #         the cylinder's X axis around Z axis. The angle from which
9955         #         the projection is started.
9956         #  @param theAngleLength The projection length angle in radians.
9957         #         The angle in which to project the total length of the wire.
9958         #         If it is negative the projection is not scaled and natural
9959         #         wire length is kept for the projection.
9960         #  @param theAngleRotation The desired angle in radians between
9961         #         the tangent vector to the first curve at the first point of
9962         #         the theObject's projection in 2D space and U-direction of
9963         #         cylinder's 2D space.
9964         #  @param theName Object name; when specified, this parameter is used
9965         #         for result publication in the study. Otherwise, if automatic
9966         #         publication is switched on, default value is used for result name.
9967         #
9968         #  @return New GEOM.GEOM_Object, containing the result shape. The result
9969         #         represents a wire or a face that represents a projection of
9970         #         the source shape onto a cylinder.
9971         #
9972         #  @ref tui_projection "Example"
9973         def MakeProjectionOnCylinder (self, theObject, theRadius,
9974                                       theStartAngle=0.0, theAngleLength=-1.0,
9975                                       theAngleRotation=0.0,
9976                                       theName=None):
9977             """
9978             Compute a wire or a face that represents a projection of the source
9979             shape onto cylinder. The cylinder's coordinate system is the same
9980             as the global coordinate system.
9981
9982             Parameters:
9983                 theObject The object to be projected. It can be either
9984                         a planar wire or a face.
9985                 theRadius The radius of the cylinder.
9986                 theStartAngle The starting angle in radians from the cylinder's X axis
9987                         around Z axis. The angle from which the projection is started.
9988                 theAngleLength The projection length angle in radians. The angle in which
9989                         to project the total length of the wire. If it is negative the
9990                         projection is not scaled and natural wire length is kept for
9991                         the projection.
9992                 theAngleRotation The desired angle in radians between
9993                         the tangent vector to the first curve at the first
9994                         point of the theObject's projection in 2D space and
9995                         U-direction of cylinder's 2D space.
9996                 theName Object name; when specified, this parameter is used
9997                         for result publication in the study. Otherwise, if automatic
9998                         publication is switched on, default value is used for result name.
9999
10000             Returns:
10001                 New GEOM.GEOM_Object, containing the result shape. The result
10002                 represents a wire or a face that represents a projection of
10003                 the source shape onto a cylinder.
10004             """
10005             # Example: see GEOM_TestAll.py
10006             flagStartAngle = False
10007             if isinstance(theStartAngle,str):
10008                 flagStartAngle = True
10009             flagAngleLength = False
10010             if isinstance(theAngleLength,str):
10011                 flagAngleLength = True
10012             flagAngleRotation = False
10013             if isinstance(theAngleRotation,str):
10014                 flagAngleRotation = True
10015             theRadius, theStartAngle, theAngleLength, theAngleRotation, Parameters = ParseParameters(
10016               theRadius, theStartAngle, theAngleLength, theAngleRotation)
10017             if flagStartAngle:
10018                 theStartAngle = theStartAngle*math.pi/180.
10019             if flagAngleLength:
10020                 theAngleLength = theAngleLength*math.pi/180.
10021             if flagAngleRotation:
10022                 theAngleRotation = theAngleRotation*math.pi/180.
10023             anObj = self.TrsfOp.MakeProjectionOnCylinder(theObject, theRadius,
10024                 theStartAngle, theAngleLength, theAngleRotation)
10025             RaiseIfFailed("MakeProjectionOnCylinder", self.TrsfOp)
10026             anObj.SetParameters(Parameters)
10027             self._autoPublish(anObj, theName, "projection")
10028             return anObj
10029
10030         # end of l3_transform
10031         ## @}
10032
10033         ## @addtogroup l3_transform_d
10034         ## @{
10035
10036         ## Deprecated method. Use MultiRotate1DNbTimes instead.
10037         def MultiRotate1D(self, theObject, theAxis, theNbTimes, theName=None):
10038             """
10039             Deprecated method. Use MultiRotate1DNbTimes instead.
10040             """
10041             print("The method MultiRotate1D is DEPRECATED. Use MultiRotate1DNbTimes instead.")
10042             return self.MultiRotate1DNbTimes(theObject, theAxis, theNbTimes, theName)
10043
10044         ## The same, as MultiRotate2DByStep(), but theAngle is in degrees.
10045         #  This method is DEPRECATED. Use MultiRotate2DByStep() instead.
10046         @ManageTransactions("TrsfOp")
10047         def MultiRotate2D(self, theObject, theAxis, theAngle, theNbTimes1, theStep, theNbTimes2, theName=None):
10048             """
10049             The same, as MultiRotate2DByStep(), but theAngle is in degrees.
10050             This method is DEPRECATED. Use MultiRotate2DByStep() instead.
10051
10052             Example of usage:
10053                 rot2d = geompy.MultiRotate2D(prism, vect, 60, 4, 50, 5)
10054             """
10055             print("The method MultiRotate2D is DEPRECATED. Use MultiRotate2DByStep instead.")
10056             theAngle, theNbTimes1, theStep, theNbTimes2, Parameters = ParseParameters(theAngle, theNbTimes1, theStep, theNbTimes2)
10057             anObj = self.TrsfOp.MultiRotate2D(theObject, theAxis, theAngle, theNbTimes1, theStep, theNbTimes2)
10058             RaiseIfFailed("MultiRotate2D", self.TrsfOp)
10059             anObj.SetParameters(Parameters)
10060             self._autoPublish(anObj, theName, "multirotation")
10061             return anObj
10062
10063         ## The same, as MultiRotate1D(), but axis is given by direction and point
10064         #  This method is DEPRECATED. Use MakeMultiRotation1DNbTimes instead.
10065         def MakeMultiRotation1D(self, aShape, aDir, aPoint, aNbTimes, theName=None):
10066             """
10067             The same, as geompy.MultiRotate1D, but axis is given by direction and point.
10068             This method is DEPRECATED. Use MakeMultiRotation1DNbTimes instead.
10069
10070             Example of usage:
10071                 pz = geompy.MakeVertex(0, 0, 100)
10072                 vy = geompy.MakeVectorDXDYDZ(0, 100, 0)
10073                 MultiRot1D = geompy.MakeMultiRotation1D(prism, vy, pz, 6)
10074             """
10075             print("The method MakeMultiRotation1D is DEPRECATED. Use MakeMultiRotation1DNbTimes instead.")
10076             aVec = self.MakeLine(aPoint,aDir)
10077             # note: auto-publishing is done in self.MultiRotate1D()
10078             anObj = self.MultiRotate1D(aShape, aVec, aNbTimes, theName)
10079             return anObj
10080
10081         ## The same, as MultiRotate2D(), but axis is given by direction and point
10082         #  This method is DEPRECATED. Use MakeMultiRotation2DByStep instead.
10083         def MakeMultiRotation2D(self, aShape, aDir, aPoint, anAngle, nbtimes1, aStep, nbtimes2, theName=None):
10084             """
10085             The same, as MultiRotate2D(), but axis is given by direction and point
10086             This method is DEPRECATED. Use MakeMultiRotation2DByStep instead.
10087
10088             Example of usage:
10089                 pz = geompy.MakeVertex(0, 0, 100)
10090                 vy = geompy.MakeVectorDXDYDZ(0, 100, 0)
10091                 MultiRot2D = geompy.MakeMultiRotation2D(f12, vy, pz, 45, 6, 30, 3)
10092             """
10093             print("The method MakeMultiRotation2D is DEPRECATED. Use MakeMultiRotation2DByStep instead.")
10094             aVec = self.MakeLine(aPoint,aDir)
10095             # note: auto-publishing is done in self.MultiRotate2D()
10096             anObj = self.MultiRotate2D(aShape, aVec, anAngle, nbtimes1, aStep, nbtimes2, theName)
10097             return anObj
10098
10099         # end of l3_transform_d
10100         ## @}
10101
10102         ## @addtogroup l3_local
10103         ## @{
10104
10105         ## Perform a fillet on all edges of the given shape.
10106         #  @param theShape Shape, to perform fillet on.
10107         #  @param theR Fillet radius.
10108         #  @param theName Object name; when specified, this parameter is used
10109         #         for result publication in the study. Otherwise, if automatic
10110         #         publication is switched on, default value is used for result name.
10111         #
10112         #  @return New GEOM.GEOM_Object, containing the result shape.
10113         #
10114         #  @ref tui_fillet "Example 1"
10115         #  \n @ref swig_MakeFilletAll "Example 2"
10116         @ManageTransactions("LocalOp")
10117         def MakeFilletAll(self, theShape, theR, theName=None):
10118             """
10119             Perform a fillet on all edges of the given shape.
10120
10121             Parameters:
10122                 theShape Shape, to perform fillet on.
10123                 theR Fillet radius.
10124                 theName Object name; when specified, this parameter is used
10125                         for result publication in the study. Otherwise, if automatic
10126                         publication is switched on, default value is used for result name.
10127
10128             Returns:
10129                 New GEOM.GEOM_Object, containing the result shape.
10130
10131             Example of usage:
10132                filletall = geompy.MakeFilletAll(prism, 10.)
10133             """
10134             # Example: see GEOM_TestOthers.py
10135             theR,Parameters = ParseParameters(theR)
10136             anObj = self.LocalOp.MakeFilletAll(theShape, theR)
10137             RaiseIfFailed("MakeFilletAll", self.LocalOp)
10138             anObj.SetParameters(Parameters)
10139             self._autoPublish(anObj, theName, "fillet")
10140             return anObj
10141
10142         ## Perform a fillet on the specified edges/faces of the given shape
10143         #  @param theShape Shape, to perform fillet on.
10144         #  @param theR Fillet radius.
10145         #  @param theShapeType Type of shapes in <VAR>theListShapes</VAR> (see ShapeType())
10146         #  @param theListShapes Global indices of edges/faces to perform fillet on.
10147         #  @param theName Object name; when specified, this parameter is used
10148         #         for result publication in the study. Otherwise, if automatic
10149         #         publication is switched on, default value is used for result name.
10150         #
10151         #  @note Global index of sub-shape can be obtained, using method GetSubShapeID().
10152         #
10153         #  @return New GEOM.GEOM_Object, containing the result shape.
10154         #
10155         #  @ref tui_fillet "Example"
10156         @ManageTransactions("LocalOp")
10157         def MakeFillet(self, theShape, theR, theShapeType, theListShapes, theName=None):
10158             """
10159             Perform a fillet on the specified edges/faces of the given shape
10160
10161             Parameters:
10162                 theShape Shape, to perform fillet on.
10163                 theR Fillet radius.
10164                 theShapeType Type of shapes in theListShapes (see geompy.ShapeTypes)
10165                 theListShapes Global indices of edges/faces to perform fillet on.
10166                 theName Object name; when specified, this parameter is used
10167                         for result publication in the study. Otherwise, if automatic
10168                         publication is switched on, default value is used for result name.
10169
10170             Note:
10171                 Global index of sub-shape can be obtained, using method geompy.GetSubShapeID
10172
10173             Returns:
10174                 New GEOM.GEOM_Object, containing the result shape.
10175
10176             Example of usage:
10177                 # get the list of IDs (IDList) for the fillet
10178                 prism_edges = geompy.SubShapeAllSortedCentres(prism, geompy.ShapeType["EDGE"])
10179                 IDlist_e = []
10180                 IDlist_e.append(geompy.GetSubShapeID(prism, prism_edges[0]))
10181                 IDlist_e.append(geompy.GetSubShapeID(prism, prism_edges[1]))
10182                 IDlist_e.append(geompy.GetSubShapeID(prism, prism_edges[2]))
10183                 # make a fillet on the specified edges of the given shape
10184                 fillet = geompy.MakeFillet(prism, 10., geompy.ShapeType["EDGE"], IDlist_e)
10185             """
10186             # Example: see GEOM_TestAll.py
10187             theR,Parameters = ParseParameters(theR)
10188             anObj = None
10189             if theShapeType == self.ShapeType["EDGE"]:
10190                 anObj = self.LocalOp.MakeFilletEdges(theShape, theR, theListShapes)
10191                 RaiseIfFailed("MakeFilletEdges", self.LocalOp)
10192             else:
10193                 anObj = self.LocalOp.MakeFilletFaces(theShape, theR, theListShapes)
10194                 RaiseIfFailed("MakeFilletFaces", self.LocalOp)
10195             anObj.SetParameters(Parameters)
10196             self._autoPublish(anObj, theName, "fillet")
10197             return anObj
10198
10199         ## The same that MakeFillet() but with two Fillet Radius R1 and R2
10200         @ManageTransactions("LocalOp")
10201         def MakeFilletR1R2(self, theShape, theR1, theR2, theShapeType, theListShapes, theName=None):
10202             """
10203             The same that geompy.MakeFillet but with two Fillet Radius R1 and R2
10204
10205             Example of usage:
10206                 # get the list of IDs (IDList) for the fillet
10207                 prism_edges = geompy.SubShapeAllSortedCentres(prism, geompy.ShapeType["EDGE"])
10208                 IDlist_e = []
10209                 IDlist_e.append(geompy.GetSubShapeID(prism, prism_edges[0]))
10210                 IDlist_e.append(geompy.GetSubShapeID(prism, prism_edges[1]))
10211                 IDlist_e.append(geompy.GetSubShapeID(prism, prism_edges[2]))
10212                 # make a fillet on the specified edges of the given shape
10213                 fillet = geompy.MakeFillet(prism, 10., 15., geompy.ShapeType["EDGE"], IDlist_e)
10214             """
10215             theR1,theR2,Parameters = ParseParameters(theR1,theR2)
10216             anObj = None
10217             if theShapeType == self.ShapeType["EDGE"]:
10218                 anObj = self.LocalOp.MakeFilletEdgesR1R2(theShape, theR1, theR2, theListShapes)
10219                 RaiseIfFailed("MakeFilletEdgesR1R2", self.LocalOp)
10220             else:
10221                 anObj = self.LocalOp.MakeFilletFacesR1R2(theShape, theR1, theR2, theListShapes)
10222                 RaiseIfFailed("MakeFilletFacesR1R2", self.LocalOp)
10223             anObj.SetParameters(Parameters)
10224             self._autoPublish(anObj, theName, "fillet")
10225             return anObj
10226
10227         ## Perform a fillet on the specified edges of the given shape
10228         #  @param theShape  Wire Shape to perform fillet on.
10229         #  @param theR  Fillet radius.
10230         #  @param theListOfVertexes Global indices of vertexes to perform fillet on.
10231         #    \note Global index of sub-shape can be obtained, using method GetSubShapeID()
10232         #    \note The list of vertices could be empty,
10233         #          in this case fillet will done done at all vertices in wire
10234         #  @param doIgnoreSecantVertices If FALSE, fillet radius is always limited
10235         #         by the length of the edges, nearest to the fillet vertex.
10236         #         But sometimes the next edge is C1 continuous with the one, nearest to
10237         #         the fillet point, and such two (or more) edges can be united to allow
10238         #         bigger radius. Set this flag to TRUE to allow collinear edges union,
10239         #         thus ignoring the secant vertex (vertices).
10240         #  @param theName Object name; when specified, this parameter is used
10241         #         for result publication in the study. Otherwise, if automatic
10242         #         publication is switched on, default value is used for result name.
10243         #
10244         #  @return New GEOM.GEOM_Object, containing the result shape.
10245         #
10246         #  @ref tui_fillet2d "Example"
10247         @ManageTransactions("LocalOp")
10248         def MakeFillet1D(self, theShape, theR, theListOfVertexes, doIgnoreSecantVertices = True, theName=None):
10249             """
10250             Perform a fillet on the specified edges of the given shape
10251
10252             Parameters:
10253                 theShape  Wire Shape to perform fillet on.
10254                 theR  Fillet radius.
10255                 theListOfVertexes Global indices of vertexes to perform fillet on.
10256                 doIgnoreSecantVertices If FALSE, fillet radius is always limited
10257                     by the length of the edges, nearest to the fillet vertex.
10258                     But sometimes the next edge is C1 continuous with the one, nearest to
10259                     the fillet point, and such two (or more) edges can be united to allow
10260                     bigger radius. Set this flag to TRUE to allow collinear edges union,
10261                     thus ignoring the secant vertex (vertices).
10262                 theName Object name; when specified, this parameter is used
10263                         for result publication in the study. Otherwise, if automatic
10264                         publication is switched on, default value is used for result name.
10265             Note:
10266                 Global index of sub-shape can be obtained, using method geompy.GetSubShapeID
10267
10268                 The list of vertices could be empty,in this case fillet will done done at all vertices in wire
10269
10270             Returns:
10271                 New GEOM.GEOM_Object, containing the result shape.
10272
10273             Example of usage:
10274                 # create wire
10275                 Wire_1 = geompy.MakeWire([Edge_12, Edge_7, Edge_11, Edge_6, Edge_1,Edge_4])
10276                 # make fillet at given wire vertices with giver radius
10277                 Fillet_1D_1 = geompy.MakeFillet1D(Wire_1, 55, [3, 4, 6, 8, 10])
10278             """
10279             # Example: see GEOM_TestAll.py
10280             theR,doIgnoreSecantVertices,Parameters = ParseParameters(theR,doIgnoreSecantVertices)
10281             anObj = self.LocalOp.MakeFillet1D(theShape, theR, theListOfVertexes, doIgnoreSecantVertices)
10282             RaiseIfFailed("MakeFillet1D", self.LocalOp)
10283             anObj.SetParameters(Parameters)
10284             self._autoPublish(anObj, theName, "fillet")
10285             return anObj
10286
10287         ## Perform a fillet at the specified vertices of the given face/shell.
10288         #  @param theShape Face or Shell shape to perform fillet on.
10289         #  @param theR Fillet radius.
10290         #  @param theListOfVertexes Global indices of vertexes to perform fillet on.
10291         #  @param theName Object name; when specified, this parameter is used
10292         #         for result publication in the study. Otherwise, if automatic
10293         #         publication is switched on, default value is used for result name.
10294         #
10295         #  @note Global index of sub-shape can be obtained, using method GetSubShapeID().
10296         #
10297         #  @return New GEOM.GEOM_Object, containing the result shape.
10298         #
10299         #  @ref tui_fillet2d "Example"
10300         @ManageTransactions("LocalOp")
10301         def MakeFillet2D(self, theShape, theR, theListOfVertexes, theName=None):
10302             """
10303             Perform a fillet at the specified vertices of the given face/shell.
10304
10305             Parameters:
10306                 theShape  Face or Shell shape to perform fillet on.
10307                 theR  Fillet radius.
10308                 theListOfVertexes Global indices of vertexes to perform fillet on.
10309                 theName Object name; when specified, this parameter is used
10310                         for result publication in the study. Otherwise, if automatic
10311                         publication is switched on, default value is used for result name.
10312             Note:
10313                 Global index of sub-shape can be obtained, using method geompy.GetSubShapeID
10314
10315             Returns:
10316                 New GEOM.GEOM_Object, containing the result shape.
10317
10318             Example of usage:
10319                 face = geompy.MakeFaceHW(100, 100, 1)
10320                 fillet2d = geompy.MakeFillet2D(face, 30, [7, 9])
10321             """
10322             # Example: see GEOM_TestAll.py
10323             theR,Parameters = ParseParameters(theR)
10324             anObj = self.LocalOp.MakeFillet2D(theShape, theR, theListOfVertexes)
10325             RaiseIfFailed("MakeFillet2D", self.LocalOp)
10326             anObj.SetParameters(Parameters)
10327             self._autoPublish(anObj, theName, "fillet")
10328             return anObj
10329
10330         ## Perform a symmetric chamfer on all edges of the given shape.
10331         #  @param theShape Shape, to perform chamfer on.
10332         #  @param theD Chamfer size along each face.
10333         #  @param theName Object name; when specified, this parameter is used
10334         #         for result publication in the study. Otherwise, if automatic
10335         #         publication is switched on, default value is used for result name.
10336         #
10337         #  @return New GEOM.GEOM_Object, containing the result shape.
10338         #
10339         #  @ref tui_chamfer "Example 1"
10340         #  \n @ref swig_MakeChamferAll "Example 2"
10341         @ManageTransactions("LocalOp")
10342         def MakeChamferAll(self, theShape, theD, theName=None):
10343             """
10344             Perform a symmetric chamfer on all edges of the given shape.
10345
10346             Parameters:
10347                 theShape Shape, to perform chamfer on.
10348                 theD Chamfer size along each face.
10349                 theName Object name; when specified, this parameter is used
10350                         for result publication in the study. Otherwise, if automatic
10351                         publication is switched on, default value is used for result name.
10352
10353             Returns:
10354                 New GEOM.GEOM_Object, containing the result shape.
10355
10356             Example of usage:
10357                 chamfer_all = geompy.MakeChamferAll(prism, 10.)
10358             """
10359             # Example: see GEOM_TestOthers.py
10360             theD,Parameters = ParseParameters(theD)
10361             anObj = self.LocalOp.MakeChamferAll(theShape, theD)
10362             RaiseIfFailed("MakeChamferAll", self.LocalOp)
10363             anObj.SetParameters(Parameters)
10364             self._autoPublish(anObj, theName, "chamfer")
10365             return anObj
10366
10367         ## Perform a chamfer on edges, common to the specified faces,
10368         #  with distance D1 on the Face1
10369         #  @param theShape Shape, to perform chamfer on.
10370         #  @param theD1 Chamfer size along \a theFace1.
10371         #  @param theD2 Chamfer size along \a theFace2.
10372         #  @param theFace1,theFace2 Global indices of two faces of \a theShape.
10373         #  @param theName Object name; when specified, this parameter is used
10374         #         for result publication in the study. Otherwise, if automatic
10375         #         publication is switched on, default value is used for result name.
10376         #
10377         #  @note Global index of sub-shape can be obtained, using method GetSubShapeID().
10378         #
10379         #  @return New GEOM.GEOM_Object, containing the result shape.
10380         #
10381         #  @ref tui_chamfer "Example"
10382         @ManageTransactions("LocalOp")
10383         def MakeChamferEdge(self, theShape, theD1, theD2, theFace1, theFace2, theName=None):
10384             """
10385             Perform a chamfer on edges, common to the specified faces,
10386             with distance D1 on the Face1
10387
10388             Parameters:
10389                 theShape Shape, to perform chamfer on.
10390                 theD1 Chamfer size along theFace1.
10391                 theD2 Chamfer size along theFace2.
10392                 theFace1,theFace2 Global indices of two faces of theShape.
10393                 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:
10398                 Global index of sub-shape can be obtained, using method geompy.GetSubShapeID
10399
10400             Returns:
10401                 New GEOM.GEOM_Object, containing the result shape.
10402
10403             Example of usage:
10404                 prism_faces = geompy.SubShapeAllSortedCentres(prism, geompy.ShapeType["FACE"])
10405                 f_ind_1 = geompy.GetSubShapeID(prism, prism_faces[0])
10406                 f_ind_2 = geompy.GetSubShapeID(prism, prism_faces[1])
10407                 chamfer_e = geompy.MakeChamferEdge(prism, 10., 10., f_ind_1, f_ind_2)
10408             """
10409             # Example: see GEOM_TestAll.py
10410             theD1,theD2,Parameters = ParseParameters(theD1,theD2)
10411             anObj = self.LocalOp.MakeChamferEdge(theShape, theD1, theD2, theFace1, theFace2)
10412             RaiseIfFailed("MakeChamferEdge", self.LocalOp)
10413             anObj.SetParameters(Parameters)
10414             self._autoPublish(anObj, theName, "chamfer")
10415             return anObj
10416
10417         ## Perform a chamfer on edges
10418         #  @param theShape Shape, to perform chamfer on.
10419         #  @param theD Chamfer length
10420         #  @param theAngle Angle of chamfer (angle in radians or a name of variable which defines angle in degrees)
10421         #  @param theFace1,theFace2 Global indices of two faces of \a theShape.
10422         #  @param theName Object name; when specified, this parameter is used
10423         #         for result publication in the study. Otherwise, if automatic
10424         #         publication is switched on, default value is used for result name.
10425         #
10426         #  @note Global index of sub-shape can be obtained, using method GetSubShapeID().
10427         #
10428         #  @return New GEOM.GEOM_Object, containing the result shape.
10429         @ManageTransactions("LocalOp")
10430         def MakeChamferEdgeAD(self, theShape, theD, theAngle, theFace1, theFace2, theName=None):
10431             """
10432             Perform a chamfer on edges
10433
10434             Parameters:
10435                 theShape Shape, to perform chamfer on.
10436                 theD1 Chamfer size along theFace1.
10437                 theAngle Angle of chamfer (angle in radians or a name of variable which defines angle in degrees).
10438                 theFace1,theFace2 Global indices of two faces of theShape.
10439                 theName Object name; when specified, this parameter is used
10440                         for result publication in the study. Otherwise, if automatic
10441                         publication is switched on, default value is used for result name.
10442
10443             Note:
10444                 Global index of sub-shape can be obtained, using method geompy.GetSubShapeID
10445
10446             Returns:
10447                 New GEOM.GEOM_Object, containing the result shape.
10448
10449             Example of usage:
10450                 prism_faces = geompy.SubShapeAllSortedCentres(prism, geompy.ShapeType["FACE"])
10451                 f_ind_1 = geompy.GetSubShapeID(prism, prism_faces[0])
10452                 f_ind_2 = geompy.GetSubShapeID(prism, prism_faces[1])
10453                 ang = 30
10454                 chamfer_e = geompy.MakeChamferEdge(prism, 10., ang, f_ind_1, f_ind_2)
10455             """
10456             flag = False
10457             if isinstance(theAngle,str):
10458                 flag = True
10459             theD,theAngle,Parameters = ParseParameters(theD,theAngle)
10460             if flag:
10461                 theAngle = theAngle*math.pi/180.0
10462             anObj = self.LocalOp.MakeChamferEdgeAD(theShape, theD, theAngle, theFace1, theFace2)
10463             RaiseIfFailed("MakeChamferEdgeAD", self.LocalOp)
10464             anObj.SetParameters(Parameters)
10465             self._autoPublish(anObj, theName, "chamfer")
10466             return anObj
10467
10468         ## Perform a chamfer on all edges of the specified faces,
10469         #  with distance D1 on the first specified face (if several for one edge)
10470         #  @param theShape Shape, to perform chamfer on.
10471         #  @param theD1 Chamfer size along face from \a theFaces. If both faces,
10472         #               connected to the edge, are in \a theFaces, \a theD1
10473         #               will be get along face, which is nearer to \a theFaces beginning.
10474         #  @param theD2 Chamfer size along another of two faces, connected to the edge.
10475         #  @param theFaces Sequence of global indices of faces of \a theShape.
10476         #  @param 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         #  @note Global index of sub-shape can be obtained, using method GetSubShapeID().
10481         #
10482         #  @return New GEOM.GEOM_Object, containing the result shape.
10483         #
10484         #  @ref tui_chamfer "Example"
10485         @ManageTransactions("LocalOp")
10486         def MakeChamferFaces(self, theShape, theD1, theD2, theFaces, theName=None):
10487             """
10488             Perform a chamfer on all edges of the specified faces,
10489             with distance D1 on the first specified face (if several for one edge)
10490
10491             Parameters:
10492                 theShape Shape, to perform chamfer on.
10493                 theD1 Chamfer size along face from  theFaces. If both faces,
10494                       connected to the edge, are in theFaces, theD1
10495                       will be get along face, which is nearer to theFaces beginning.
10496                 theD2 Chamfer size along another of two faces, connected to the edge.
10497                 theFaces Sequence of global indices of faces of theShape.
10498                 theName Object name; when specified, this parameter is used
10499                         for result publication in the study. Otherwise, if automatic
10500                         publication is switched on, default value is used for result name.
10501
10502             Note: Global index of sub-shape can be obtained, using method geompy.GetSubShapeID().
10503
10504             Returns:
10505                 New GEOM.GEOM_Object, containing the result shape.
10506             """
10507             # Example: see GEOM_TestAll.py
10508             theD1,theD2,Parameters = ParseParameters(theD1,theD2)
10509             anObj = self.LocalOp.MakeChamferFaces(theShape, theD1, theD2, theFaces)
10510             RaiseIfFailed("MakeChamferFaces", self.LocalOp)
10511             anObj.SetParameters(Parameters)
10512             self._autoPublish(anObj, theName, "chamfer")
10513             return anObj
10514
10515         ## The Same that MakeChamferFaces() but with params theD is chamfer length and
10516         #  theAngle is Angle of chamfer (angle in radians or a name of variable which defines angle in degrees)
10517         #
10518         #  @ref swig_FilletChamfer "Example"
10519         @ManageTransactions("LocalOp")
10520         def MakeChamferFacesAD(self, theShape, theD, theAngle, theFaces, theName=None):
10521             """
10522             The Same that geompy.MakeChamferFaces but with params theD is chamfer length and
10523             theAngle is Angle of chamfer (angle in radians or a name of variable which defines angle in degrees)
10524             """
10525             flag = False
10526             if isinstance(theAngle,str):
10527                 flag = True
10528             theD,theAngle,Parameters = ParseParameters(theD,theAngle)
10529             if flag:
10530                 theAngle = theAngle*math.pi/180.0
10531             anObj = self.LocalOp.MakeChamferFacesAD(theShape, theD, theAngle, theFaces)
10532             RaiseIfFailed("MakeChamferFacesAD", self.LocalOp)
10533             anObj.SetParameters(Parameters)
10534             self._autoPublish(anObj, theName, "chamfer")
10535             return anObj
10536
10537         ## Perform a chamfer on edges,
10538         #  with distance D1 on the first specified face (if several for one edge)
10539         #  @param theShape Shape, to perform chamfer on.
10540         #  @param theD1,theD2 Chamfer size
10541         #  @param theEdges Sequence of edges of \a theShape.
10542         #  @param theName Object name; when specified, this parameter is used
10543         #         for result publication in the study. Otherwise, if automatic
10544         #         publication is switched on, default value is used for result name.
10545         #
10546         #  @return New GEOM.GEOM_Object, containing the result shape.
10547         #
10548         #  @ref swig_FilletChamfer "Example"
10549         @ManageTransactions("LocalOp")
10550         def MakeChamferEdges(self, theShape, theD1, theD2, theEdges, theName=None):
10551             """
10552             Perform a chamfer on edges,
10553             with distance D1 on the first specified face (if several for one edge)
10554
10555             Parameters:
10556                 theShape Shape, to perform chamfer on.
10557                 theD1,theD2 Chamfer size
10558                 theEdges Sequence of edges of theShape.
10559                 theName Object name; when specified, this parameter is used
10560                         for result publication in the study. Otherwise, if automatic
10561                         publication is switched on, default value is used for result name.
10562
10563             Returns:
10564                 New GEOM.GEOM_Object, containing the result shape.
10565             """
10566             theD1,theD2,Parameters = ParseParameters(theD1,theD2)
10567             anObj = self.LocalOp.MakeChamferEdges(theShape, theD1, theD2, theEdges)
10568             RaiseIfFailed("MakeChamferEdges", self.LocalOp)
10569             anObj.SetParameters(Parameters)
10570             self._autoPublish(anObj, theName, "chamfer")
10571             return anObj
10572
10573         ## The Same that MakeChamferEdges() but with params theD is chamfer length and
10574         #  theAngle is Angle of chamfer (angle in radians or a name of variable which defines angle in degrees)
10575         @ManageTransactions("LocalOp")
10576         def MakeChamferEdgesAD(self, theShape, theD, theAngle, theEdges, theName=None):
10577             """
10578             The Same that geompy.MakeChamferEdges but with params theD is chamfer length and
10579             theAngle is Angle of chamfer (angle in radians or a name of variable which defines angle in degrees)
10580             """
10581             flag = False
10582             if isinstance(theAngle,str):
10583                 flag = True
10584             theD,theAngle,Parameters = ParseParameters(theD,theAngle)
10585             if flag:
10586                 theAngle = theAngle*math.pi/180.0
10587             anObj = self.LocalOp.MakeChamferEdgesAD(theShape, theD, theAngle, theEdges)
10588             RaiseIfFailed("MakeChamferEdgesAD", self.LocalOp)
10589             anObj.SetParameters(Parameters)
10590             self._autoPublish(anObj, theName, "chamfer")
10591             return anObj
10592
10593         ## @sa MakeChamferEdge(), MakeChamferFaces()
10594         #
10595         #  @ref swig_MakeChamfer "Example"
10596         def MakeChamfer(self, aShape, d1, d2, aShapeType, ListShape, theName=None):
10597             """
10598             See geompy.MakeChamferEdge() and geompy.MakeChamferFaces() functions for more information.
10599             """
10600             # Example: see GEOM_TestOthers.py
10601             anObj = None
10602             # note: auto-publishing is done in self.MakeChamferEdge() or self.MakeChamferFaces()
10603             if aShapeType == self.ShapeType["EDGE"]:
10604                 anObj = self.MakeChamferEdge(aShape,d1,d2,ListShape[0],ListShape[1],theName)
10605             else:
10606                 anObj = self.MakeChamferFaces(aShape,d1,d2,ListShape,theName)
10607             return anObj
10608
10609         ## Remove material from a solid by extrusion of the base shape on the given distance.
10610         #  @param theInit Shape to remove material from. It must be a solid or
10611         #  a compound made of a single solid.
10612         #  @param theBase Closed edge or wire defining the base shape to be extruded.
10613         #  @param theH Prism dimension along the normal to theBase
10614         #  @param theAngle Draft angle in degrees.
10615         #  @param theInvert If true material changes the direction
10616         #  @param theName Object name; when specified, this parameter is used
10617         #         for result publication in the study. Otherwise, if automatic
10618         #         publication is switched on, default value is used for result name.
10619         #
10620         #  @return New GEOM.GEOM_Object, containing the initial shape with removed material
10621         #
10622         #  @ref tui_creation_prism "Example"
10623         @ManageTransactions("PrimOp")
10624         def MakeExtrudedCut(self, theInit, theBase, theH, theAngle, theInvert=False, theName=None):
10625             """
10626             Add material to a solid by extrusion of the base shape on the given distance.
10627
10628             Parameters:
10629                 theInit Shape to remove material from. It must be a solid or a compound made of a single solid.
10630                 theBase Closed edge or wire defining the base shape to be extruded.
10631                 theH Prism dimension along the normal to theBase
10632                 theAngle Draft angle in degrees.
10633                 theInvert If true material changes the direction.
10634                 theName Object name; when specified, this parameter is used
10635                         for result publication in the study. Otherwise, if automatic
10636                         publication is switched on, default value is used for result name.
10637
10638             Returns:
10639                 New GEOM.GEOM_Object,  containing the initial shape with removed material.
10640             """
10641             # Example: see GEOM_TestAll.py
10642             theH,theAngle,Parameters = ParseParameters(theH,theAngle)
10643             anObj = self.PrimOp.MakeDraftPrism(theInit, theBase, theH, theAngle, False, theInvert)
10644             RaiseIfFailed("MakeExtrudedBoss", self.PrimOp)
10645             anObj.SetParameters(Parameters)
10646             self._autoPublish(anObj, theName, "extrudedCut")
10647             return anObj
10648
10649         ## Add material to a solid by extrusion of the base shape on the given distance.
10650         #  @param theInit Shape to add material to. It must be a solid or
10651         #  a compound made of a single solid.
10652         #  @param theBase Closed edge or wire defining the base shape to be extruded.
10653         #  @param theH Prism dimension along the normal to theBase
10654         #  @param theAngle Draft angle in degrees.
10655         #  @param theInvert If true material changes the direction
10656         #  @param theName Object name; when specified, this parameter is used
10657         #         for result publication in the study. Otherwise, if automatic
10658         #         publication is switched on, default value is used for result name.
10659         #
10660         #  @return New GEOM.GEOM_Object, containing the initial shape with added material
10661         #
10662         #  @ref tui_creation_prism "Example"
10663         @ManageTransactions("PrimOp")
10664         def MakeExtrudedBoss(self, theInit, theBase, theH, theAngle, theInvert=False, theName=None):
10665             """
10666             Add material to a solid by extrusion of the base shape on the given distance.
10667
10668             Parameters:
10669                 theInit Shape to add material to. It must be a solid or a compound made of a single solid.
10670                 theBase Closed edge or wire defining the base shape to be extruded.
10671                 theH Prism dimension along the normal to theBase
10672                 theAngle Draft angle in degrees.
10673                 theInvert If true material changes the direction.
10674                 theName Object name; when specified, this parameter is used
10675                         for result publication in the study. Otherwise, if automatic
10676                         publication is switched on, default value is used for result name.
10677
10678             Returns:
10679                 New GEOM.GEOM_Object,  containing the initial shape with added material.
10680             """
10681             # Example: see GEOM_TestAll.py
10682             theH,theAngle,Parameters = ParseParameters(theH,theAngle)
10683             anObj = self.PrimOp.MakeDraftPrism(theInit, theBase, theH, theAngle, True, theInvert)
10684             RaiseIfFailed("MakeExtrudedBoss", self.PrimOp)
10685             anObj.SetParameters(Parameters)
10686             self._autoPublish(anObj, theName, "extrudedBoss")
10687             return anObj
10688
10689         # end of l3_local
10690         ## @}
10691
10692         ## @addtogroup l3_basic_op
10693         ## @{
10694
10695         ## Perform an Archimde operation on the given shape with given parameters.
10696         #  The object presenting the resulting face is returned.
10697         #  @param theShape Shape to be put in water.
10698         #  @param theWeight Weight of the shape.
10699         #  @param theWaterDensity Density of the water.
10700         #  @param theMeshDeflection Deflection of the mesh, using to compute the section.
10701         #  @param theName Object name; when specified, this parameter is used
10702         #         for result publication in the study. Otherwise, if automatic
10703         #         publication is switched on, default value is used for result name.
10704         #
10705         #  @return New GEOM.GEOM_Object, containing a section of \a theShape
10706         #          by a plane, corresponding to water level.
10707         #
10708         #  @ref tui_archimede "Example"
10709         @ManageTransactions("LocalOp")
10710         def Archimede(self, theShape, theWeight, theWaterDensity, theMeshDeflection, theName=None):
10711             """
10712             Perform an Archimde operation on the given shape with given parameters.
10713             The object presenting the resulting face is returned.
10714
10715             Parameters:
10716                 theShape Shape to be put in water.
10717                 theWeight Weight of the shape.
10718                 theWaterDensity Density of the water.
10719                 theMeshDeflection Deflection of the mesh, using to compute the section.
10720                 theName Object name; when specified, this parameter is used
10721                         for result publication in the study. Otherwise, if automatic
10722                         publication is switched on, default value is used for result name.
10723
10724             Returns:
10725                 New GEOM.GEOM_Object, containing a section of theShape
10726                 by a plane, corresponding to water level.
10727             """
10728             # Example: see GEOM_TestAll.py
10729             theWeight,theWaterDensity,theMeshDeflection,Parameters = ParseParameters(
10730               theWeight,theWaterDensity,theMeshDeflection)
10731             anObj = self.LocalOp.MakeArchimede(theShape, theWeight, theWaterDensity, theMeshDeflection)
10732             RaiseIfFailed("MakeArchimede", self.LocalOp)
10733             anObj.SetParameters(Parameters)
10734             self._autoPublish(anObj, theName, "archimede")
10735             return anObj
10736
10737         # end of l3_basic_op
10738         ## @}
10739
10740         ## @addtogroup l2_measure
10741         ## @{
10742
10743         ## Get point coordinates
10744         #  @return [x, y, z]
10745         #
10746         #  @ref tui_point_coordinates_page "Example"
10747         @ManageTransactions("MeasuOp")
10748         def PointCoordinates(self,Point):
10749             """
10750             Get point coordinates
10751
10752             Returns:
10753                 [x, y, z]
10754             """
10755             # Example: see GEOM_TestMeasures.py
10756             aTuple = self.MeasuOp.PointCoordinates(Point)
10757             RaiseIfFailed("PointCoordinates", self.MeasuOp)
10758             return aTuple
10759
10760         ## Get vector coordinates
10761         #  @return [x, y, z]
10762         #
10763         #  @ref tui_measurement_tools_page "Example"
10764         def VectorCoordinates(self,Vector):
10765             """
10766             Get vector coordinates
10767
10768             Returns:
10769                 [x, y, z]
10770             """
10771
10772             p1=self.GetFirstVertex(Vector)
10773             p2=self.GetLastVertex(Vector)
10774
10775             X1=self.PointCoordinates(p1)
10776             X2=self.PointCoordinates(p2)
10777
10778             return (X2[0]-X1[0],X2[1]-X1[1],X2[2]-X1[2])
10779
10780
10781         ## Compute cross product
10782         #  @return vector w=u^v
10783         #
10784         #  @ref tui_measurement_tools_page "Example"
10785         def CrossProduct(self, Vector1, Vector2):
10786             """
10787             Compute cross product
10788
10789             Returns: vector w=u^v
10790             """
10791             u=self.VectorCoordinates(Vector1)
10792             v=self.VectorCoordinates(Vector2)
10793             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])
10794
10795             return w
10796
10797         ## Compute cross product
10798         #  @return dot product  p=u.v
10799         #
10800         #  @ref tui_measurement_tools_page "Example"
10801         def DotProduct(self, Vector1, Vector2):
10802             """
10803             Compute cross product
10804
10805             Returns: dot product  p=u.v
10806             """
10807             u=self.VectorCoordinates(Vector1)
10808             v=self.VectorCoordinates(Vector2)
10809             p=u[0]*v[0]+u[1]*v[1]+u[2]*v[2]
10810
10811             return p
10812
10813
10814         ## Get summarized length of all wires,
10815         #  area of surface and volume of the given shape.
10816         #  @param theShape Shape to define properties of.
10817         #  @param theTolerance maximal relative error of area
10818         #         and volume computation.
10819         #  @return [theLength, theSurfArea, theVolume]\n
10820         #  theLength:   Summarized length of all wires of the given shape.\n
10821         #  theSurfArea: Area of surface of the given shape.\n
10822         #  theVolume:   Volume of the given shape.
10823         #
10824         #  @ref tui_basic_properties_page "Example"
10825         @ManageTransactions("MeasuOp")
10826         def BasicProperties(self,theShape, theTolerance=1.e-6):
10827             """
10828             Get summarized length of all wires,
10829             area of surface and volume of the given shape.
10830
10831             Parameters:
10832                 theShape Shape to define properties of.
10833                 theTolerance maximal relative error of area
10834                              and volume computation.
10835
10836             Returns:
10837                 [theLength, theSurfArea, theVolume]
10838                  theLength:   Summarized length of all wires of the given shape.
10839                  theSurfArea: Area of surface of the given shape.
10840                  theVolume:   Volume of the given shape.
10841             """
10842             # Example: see GEOM_TestMeasures.py
10843             aTuple = self.MeasuOp.GetBasicProperties(theShape, theTolerance)
10844             RaiseIfFailed("GetBasicProperties", self.MeasuOp)
10845             return aTuple
10846
10847         ## Get parameters of bounding box of the given shape
10848         #  @param theShape Shape to obtain bounding box of.
10849         #  @param precise TRUE for precise computation; FALSE for fast one.
10850         #  @return [Xmin,Xmax, Ymin,Ymax, Zmin,Zmax]
10851         #  Xmin,Xmax: Limits of shape along OX axis.
10852         #  Ymin,Ymax: Limits of shape along OY axis.
10853         #  Zmin,Zmax: Limits of shape along OZ axis.
10854         #
10855         #  @ref tui_bounding_box_page "Example"
10856         @ManageTransactions("MeasuOp")
10857         def BoundingBox (self, theShape, precise=False):
10858             """
10859             Get parameters of bounding box of the given shape
10860
10861             Parameters:
10862                 theShape Shape to obtain bounding box of.
10863                 precise TRUE for precise computation; FALSE for fast one.
10864
10865             Returns:
10866                 [Xmin,Xmax, Ymin,Ymax, Zmin,Zmax]
10867                  Xmin,Xmax: Limits of shape along OX axis.
10868                  Ymin,Ymax: Limits of shape along OY axis.
10869                  Zmin,Zmax: Limits of shape along OZ axis.
10870             """
10871             # Example: see GEOM_TestMeasures.py
10872             aTuple = self.MeasuOp.GetBoundingBox(theShape, precise)
10873             RaiseIfFailed("GetBoundingBox", self.MeasuOp)
10874             return aTuple
10875
10876         ## Get bounding box of the given shape
10877         #  @param theShape Shape to obtain bounding box of.
10878         #  @param precise TRUE for precise computation; FALSE for fast one.
10879         #  @param theName Object name; when specified, this parameter is used
10880         #         for result publication in the study. Otherwise, if automatic
10881         #         publication is switched on, default value is used for result name.
10882         #
10883         #  @return New GEOM.GEOM_Object, containing the created box.
10884         #
10885         #  @ref tui_bounding_box_page "Example"
10886         @ManageTransactions("MeasuOp")
10887         def MakeBoundingBox (self, theShape, precise=False, theName=None):
10888             """
10889             Get bounding box of the given shape
10890
10891             Parameters:
10892                 theShape Shape to obtain bounding box of.
10893                 precise TRUE for precise computation; FALSE for fast one.
10894                 theName Object name; when specified, this parameter is used
10895                         for result publication in the study. Otherwise, if automatic
10896                         publication is switched on, default value is used for result name.
10897
10898             Returns:
10899                 New GEOM.GEOM_Object, containing the created box.
10900             """
10901             # Example: see GEOM_TestMeasures.py
10902             anObj = self.MeasuOp.MakeBoundingBox(theShape, precise)
10903             RaiseIfFailed("MakeBoundingBox", self.MeasuOp)
10904             self._autoPublish(anObj, theName, "bndbox")
10905             return anObj
10906
10907         ## Get inertia matrix and moments of inertia of theShape.
10908         #  @param theShape Shape to calculate inertia of.
10909         #  @return [I11,I12,I13, I21,I22,I23, I31,I32,I33, Ix,Iy,Iz]
10910         #  I(1-3)(1-3): Components of the inertia matrix of the given shape.
10911         #  Ix,Iy,Iz:    Moments of inertia of the given shape.
10912         #
10913         #  @ref tui_inertia_page "Example"
10914         @ManageTransactions("MeasuOp")
10915         def Inertia(self,theShape):
10916             """
10917             Get inertia matrix and moments of inertia of theShape.
10918
10919             Parameters:
10920                 theShape Shape to calculate inertia of.
10921
10922             Returns:
10923                 [I11,I12,I13, I21,I22,I23, I31,I32,I33, Ix,Iy,Iz]
10924                  I(1-3)(1-3): Components of the inertia matrix of the given shape.
10925                  Ix,Iy,Iz:    Moments of inertia of the given shape.
10926             """
10927             # Example: see GEOM_TestMeasures.py
10928             aTuple = self.MeasuOp.GetInertia(theShape)
10929             RaiseIfFailed("GetInertia", self.MeasuOp)
10930             return aTuple
10931
10932         ## Get if coords are included in the shape (ST_IN or ST_ON)
10933         #  @param theShape Shape
10934         #  @param coords list of points coordinates [x1, y1, z1, x2, y2, z2, ...]
10935         #  @param tolerance to be used (default is 1.0e-7)
10936         #  @return list_of_boolean = [res1, res2, ...]
10937         @ManageTransactions("MeasuOp")
10938         def AreCoordsInside(self, theShape, coords, tolerance=1.e-7):
10939             """
10940             Get if coords are included in the shape (ST_IN or ST_ON)
10941
10942             Parameters:
10943                 theShape Shape
10944                 coords list of points coordinates [x1, y1, z1, x2, y2, z2, ...]
10945                 tolerance to be used (default is 1.0e-7)
10946
10947             Returns:
10948                 list_of_boolean = [res1, res2, ...]
10949             """
10950             return self.MeasuOp.AreCoordsInside(theShape, coords, tolerance)
10951
10952         ## Get minimal distance between the given shapes.
10953         #  @param theShape1,theShape2 Shapes to find minimal distance between.
10954         #  @return Value of the minimal distance between the given shapes.
10955         #
10956         #  @ref tui_min_distance_page "Example"
10957         @ManageTransactions("MeasuOp")
10958         def MinDistance(self, theShape1, theShape2):
10959             """
10960             Get minimal distance between the given shapes.
10961
10962             Parameters:
10963                 theShape1,theShape2 Shapes to find minimal distance between.
10964
10965             Returns:
10966                 Value of the minimal distance between the given shapes.
10967             """
10968             # Example: see GEOM_TestMeasures.py
10969             aTuple = self.MeasuOp.GetMinDistance(theShape1, theShape2)
10970             RaiseIfFailed("GetMinDistance", self.MeasuOp)
10971             return aTuple[0]
10972
10973         ## Get minimal distance between the given shapes.
10974         #  @param theShape1,theShape2 Shapes to find minimal distance between.
10975         #  @return Value of the minimal distance between the given shapes, in form of list
10976         #          [Distance, DX, DY, DZ].
10977         #
10978         #  @ref tui_min_distance_page "Example"
10979         @ManageTransactions("MeasuOp")
10980         def MinDistanceComponents(self, theShape1, theShape2):
10981             """
10982             Get minimal distance between the given shapes.
10983
10984             Parameters:
10985                 theShape1,theShape2 Shapes to find minimal distance between.
10986
10987             Returns:
10988                 Value of the minimal distance between the given shapes, in form of list
10989                 [Distance, DX, DY, DZ]
10990             """
10991             # Example: see GEOM_TestMeasures.py
10992             aTuple = self.MeasuOp.GetMinDistance(theShape1, theShape2)
10993             RaiseIfFailed("GetMinDistance", self.MeasuOp)
10994             aRes = [aTuple[0], aTuple[4] - aTuple[1], aTuple[5] - aTuple[2], aTuple[6] - aTuple[3]]
10995             return aRes
10996
10997         ## Get closest points of the given shapes.
10998         #  @param theShape1,theShape2 Shapes to find closest points of.
10999         #  @return The number of found solutions (-1 in case of infinite number of
11000         #          solutions) and a list of (X, Y, Z) coordinates for all couples of points.
11001         #
11002         #  @ref tui_min_distance_page "Example"
11003         @ManageTransactions("MeasuOp")
11004         def ClosestPoints (self, theShape1, theShape2):
11005             """
11006             Get closest points of the given shapes.
11007
11008             Parameters:
11009                 theShape1,theShape2 Shapes to find closest points of.
11010
11011             Returns:
11012                 The number of found solutions (-1 in case of infinite number of
11013                 solutions) and a list of (X, Y, Z) coordinates for all couples of points.
11014             """
11015             # Example: see GEOM_TestMeasures.py
11016             aTuple = self.MeasuOp.ClosestPoints(theShape1, theShape2)
11017             RaiseIfFailed("ClosestPoints", self.MeasuOp)
11018             return aTuple
11019
11020         ## Get angle between the given shapes in degrees.
11021         #  @param theShape1,theShape2 Lines or linear edges to find angle between.
11022         #  @note If both arguments are vectors, the angle is computed in accordance
11023         #        with their orientations, otherwise the minimum angle is computed.
11024         #  @return Value of the angle between the given shapes in degrees.
11025         #
11026         #  @ref tui_angle_page "Example"
11027         @ManageTransactions("MeasuOp")
11028         def GetAngle(self, theShape1, theShape2):
11029             """
11030             Get angle between the given shapes in degrees.
11031
11032             Parameters:
11033                 theShape1,theShape2 Lines or linear edges to find angle between.
11034
11035             Note:
11036                 If both arguments are vectors, the angle is computed in accordance
11037                 with their orientations, otherwise the minimum angle is computed.
11038
11039             Returns:
11040                 Value of the angle between the given shapes in degrees.
11041             """
11042             # Example: see GEOM_TestMeasures.py
11043             anAngle = self.MeasuOp.GetAngle(theShape1, theShape2)
11044             RaiseIfFailed("GetAngle", self.MeasuOp)
11045             return anAngle
11046
11047         ## Get angle between the given shapes in radians.
11048         #  @param theShape1,theShape2 Lines or linear edges to find angle between.
11049         #  @note If both arguments are vectors, the angle is computed in accordance
11050         #        with their orientations, otherwise the minimum angle is computed.
11051         #  @return Value of the angle between the given shapes in radians.
11052         #
11053         #  @ref tui_angle_page "Example"
11054         @ManageTransactions("MeasuOp")
11055         def GetAngleRadians(self, theShape1, theShape2):
11056             """
11057             Get angle between the given shapes in radians.
11058
11059             Parameters:
11060                 theShape1,theShape2 Lines or linear edges to find angle between.
11061
11062
11063             Note:
11064                 If both arguments are vectors, the angle is computed in accordance
11065                 with their orientations, otherwise the minimum angle is computed.
11066
11067             Returns:
11068                 Value of the angle between the given shapes in radians.
11069             """
11070             # Example: see GEOM_TestMeasures.py
11071             anAngle = self.MeasuOp.GetAngle(theShape1, theShape2)*math.pi/180.
11072             RaiseIfFailed("GetAngle", self.MeasuOp)
11073             return anAngle
11074
11075         ## Get angle between the given vectors in degrees.
11076         #  @param theShape1,theShape2 Vectors to find angle between.
11077         #  @param theFlag If True, the normal vector is defined by the two vectors cross,
11078         #                 if False, the opposite vector to the normal vector is used.
11079         #  @return Value of the angle between the given vectors in degrees.
11080         #
11081         #  @ref tui_angle_page "Example"
11082         @ManageTransactions("MeasuOp")
11083         def GetAngleVectors(self, theShape1, theShape2, theFlag = True):
11084             """
11085             Get angle between the given vectors in degrees.
11086
11087             Parameters:
11088                 theShape1,theShape2 Vectors to find angle between.
11089                 theFlag If True, the normal vector is defined by the two vectors cross,
11090                         if False, the opposite vector to the normal vector is used.
11091
11092             Returns:
11093                 Value of the angle between the given vectors in degrees.
11094             """
11095             anAngle = self.MeasuOp.GetAngleBtwVectors(theShape1, theShape2)
11096             if not theFlag:
11097                 anAngle = 360. - anAngle
11098             RaiseIfFailed("GetAngleVectors", self.MeasuOp)
11099             return anAngle
11100
11101         ## The same as GetAngleVectors, but the result is in radians.
11102         def GetAngleRadiansVectors(self, theShape1, theShape2, theFlag = True):
11103             """
11104             Get angle between the given vectors in radians.
11105
11106             Parameters:
11107                 theShape1,theShape2 Vectors to find angle between.
11108                 theFlag If True, the normal vector is defined by the two vectors cross,
11109                         if False, the opposite vector to the normal vector is used.
11110
11111             Returns:
11112                 Value of the angle between the given vectors in radians.
11113             """
11114             anAngle = self.GetAngleVectors(theShape1, theShape2, theFlag)*math.pi/180.
11115             return anAngle
11116
11117         ## @name Curve Curvature Measurement
11118         #  Methods for receiving radius of curvature of curves
11119         #  in the given point
11120         ## @{
11121
11122         ## Measure curvature of a curve at a point, set by parameter.
11123         #  @param theCurve a curve.
11124         #  @param theParam parameter.
11125         #  @return radius of curvature of \a theCurve.
11126         #
11127         #  @ref swig_todo "Example"
11128         @ManageTransactions("MeasuOp")
11129         def CurveCurvatureByParam(self, theCurve, theParam):
11130             """
11131             Measure curvature of a curve at a point, set by parameter.
11132
11133             Parameters:
11134                 theCurve a curve.
11135                 theParam parameter.
11136
11137             Returns:
11138                 radius of curvature of theCurve.
11139             """
11140             # Example: see GEOM_TestMeasures.py
11141             aCurv = self.MeasuOp.CurveCurvatureByParam(theCurve,theParam)
11142             RaiseIfFailed("CurveCurvatureByParam", self.MeasuOp)
11143             return aCurv
11144
11145         ## Measure curvature of a curve at a point.
11146         #  @param theCurve a curve.
11147         #  @param thePoint given point.
11148         #  @return radius of curvature of \a theCurve.
11149         #
11150         #  @ref swig_todo "Example"
11151         @ManageTransactions("MeasuOp")
11152         def CurveCurvatureByPoint(self, theCurve, thePoint):
11153             """
11154             Measure curvature of a curve at a point.
11155
11156             Parameters:
11157                 theCurve a curve.
11158                 thePoint given point.
11159
11160             Returns:
11161                 radius of curvature of theCurve.
11162             """
11163             aCurv = self.MeasuOp.CurveCurvatureByPoint(theCurve,thePoint)
11164             RaiseIfFailed("CurveCurvatureByPoint", self.MeasuOp)
11165             return aCurv
11166         ## @}
11167
11168         ## @name Surface Curvature Measurement
11169         #  Methods for receiving max and min radius of curvature of surfaces
11170         #  in the given point
11171         ## @{
11172
11173         ## Measure max radius of curvature of surface.
11174         #  @param theSurf the given surface.
11175         #  @param theUParam Value of U-parameter on the referenced surface.
11176         #  @param theVParam Value of V-parameter on the referenced surface.
11177         #  @return max radius of curvature of theSurf.
11178         #
11179         ## @ref swig_todo "Example"
11180         @ManageTransactions("MeasuOp")
11181         def MaxSurfaceCurvatureByParam(self, theSurf, theUParam, theVParam):
11182             """
11183             Measure max radius of curvature of surface.
11184
11185             Parameters:
11186                 theSurf the given surface.
11187                 theUParam Value of U-parameter on the referenced surface.
11188                 theVParam Value of V-parameter on the referenced surface.
11189
11190             Returns:
11191                 max radius of curvature of theSurf.
11192             """
11193             # Example: see GEOM_TestMeasures.py
11194             aSurf = self.MeasuOp.MaxSurfaceCurvatureByParam(theSurf,theUParam,theVParam)
11195             RaiseIfFailed("MaxSurfaceCurvatureByParam", self.MeasuOp)
11196             return aSurf
11197
11198         ## Measure max radius of curvature of surface in the given point
11199         #  @param theSurf the given surface.
11200         #  @param thePoint given point.
11201         #  @return max radius of curvature of theSurf.
11202         #
11203         ## @ref swig_todo "Example"
11204         @ManageTransactions("MeasuOp")
11205         def MaxSurfaceCurvatureByPoint(self, theSurf, thePoint):
11206             """
11207             Measure max radius of curvature of surface in the given point.
11208
11209             Parameters:
11210                 theSurf the given surface.
11211                 thePoint given point.
11212
11213             Returns:
11214                 max radius of curvature of theSurf.
11215             """
11216             aSurf = self.MeasuOp.MaxSurfaceCurvatureByPoint(theSurf,thePoint)
11217             RaiseIfFailed("MaxSurfaceCurvatureByPoint", self.MeasuOp)
11218             return aSurf
11219
11220         ## Measure min radius of curvature of surface.
11221         #  @param theSurf the given surface.
11222         #  @param theUParam Value of U-parameter on the referenced surface.
11223         #  @param theVParam Value of V-parameter on the referenced surface.
11224         #  @return min radius of curvature of theSurf.
11225         #
11226         ## @ref swig_todo "Example"
11227         @ManageTransactions("MeasuOp")
11228         def MinSurfaceCurvatureByParam(self, theSurf, theUParam, theVParam):
11229             """
11230             Measure min radius of curvature of surface.
11231
11232             Parameters:
11233                 theSurf the given surface.
11234                 theUParam Value of U-parameter on the referenced surface.
11235                 theVParam Value of V-parameter on the referenced surface.
11236
11237             Returns:
11238                 Min radius of curvature of theSurf.
11239             """
11240             aSurf = self.MeasuOp.MinSurfaceCurvatureByParam(theSurf,theUParam,theVParam)
11241             RaiseIfFailed("MinSurfaceCurvatureByParam", self.MeasuOp)
11242             return aSurf
11243
11244         ## Measure min radius of curvature of surface in the given point
11245         #  @param theSurf the given surface.
11246         #  @param thePoint given point.
11247         #  @return min radius of curvature of theSurf.
11248         #
11249         ## @ref swig_todo "Example"
11250         @ManageTransactions("MeasuOp")
11251         def MinSurfaceCurvatureByPoint(self, theSurf, thePoint):
11252             """
11253             Measure min radius of curvature of surface in the given point.
11254
11255             Parameters:
11256                 theSurf the given surface.
11257                 thePoint given point.
11258
11259             Returns:
11260                 Min radius of curvature of theSurf.
11261             """
11262             aSurf = self.MeasuOp.MinSurfaceCurvatureByPoint(theSurf,thePoint)
11263             RaiseIfFailed("MinSurfaceCurvatureByPoint", self.MeasuOp)
11264             return aSurf
11265         ## @}
11266
11267         ## Measure curvature radius of surface in the given point along the given direction.
11268         #  @param theSurf the given face.
11269         #  @param thePoint given point.
11270         #  @param theDirection given direction.
11271         #  @param theName Object name; when specified, this parameter is used
11272         #         for result publication in the study. Otherwise, if automatic
11273         #         publication is switched on, default value is used for result name.
11274         #
11275         #  @return New GEOM.GEOM_Object, containing vector of curvature of theSurf.
11276         #          The returned vector is codirectional with the normal to the face
11277         #          in the given point in case of positive curvature value
11278         #          and opposite to the normal in case of negative curvature.
11279         #          The normal of the returned vector is equal to the
11280         #          absolute value of the curvature radius.
11281         #          Null shape is returned in case of infinite radius
11282         #          (zero curvature), for example, in case of flat face.
11283         #
11284         ## @ref swig_CurvatureOnFace "Example"
11285         @ManageTransactions("MeasuOp")
11286         def CurvatureOnFace(self, theSurf, thePoint, theDirection, theName=None):
11287             """
11288             Measure curvature radius of surface in the given point along the given direction.
11289
11290             Parameters:
11291                 theSurf the given face.
11292                 thePoint given point.
11293                 theDirection given direction.
11294                 theName Object name; when specified, this parameter is used
11295                         for result publication in the study. Otherwise, if automatic
11296                         publication is switched on, default value is used for result name.
11297
11298             Returns:
11299                 New GEOM.GEOM_Object, containing vector of curvature of theSurf.
11300                 The returned vector is codirectional with the normal to the face
11301                 in the given point in case of positive curvature value
11302                 and opposite to the normal in case of negative curvature.
11303                 The normal of the returned vector is equal to the
11304                 absolute value of the curvature radius.
11305                 Null shape is returned in case of infinite radius
11306                 (zero curvature), for example, in case of flat face.
11307
11308             Example of usage:
11309                 curvature_1 = geompy.CurvatureOnFace(Face_1, Vertex_1, OX)
11310             """
11311             aVec = self.MeasuOp.SurfaceCurvatureByPointAndDirection(theSurf,thePoint,theDirection)
11312             if self.MeasuOp.GetErrorCode() != "ZERO_CURVATURE":
11313                 RaiseIfFailed("CurvatureOnFace", self.MeasuOp)
11314                 self._autoPublish(aVec, theName, "curvature")
11315             return aVec
11316
11317         ## Convert X,Y,Z points coordinates to UV parameters on the given surface.
11318         #  @param theSurf the given face. It can be also a shell or a compound with one face.
11319         #  @param theXYZlist float list of size 3*N where N is the number of points
11320         #                    for which we want their U,V coordinates.
11321         #                    If the user enters a list of size not divisible by 3
11322         #                    an exception will be thrown.
11323         #  @param theIsNormalized if True, the returned parameters will be in range [0, 1].
11324         #
11325         #  @return list of float of size 2*N.
11326         #
11327         #  @ref tui_xyz_to_uv_page "Example"
11328         @ManageTransactions("MeasuOp")
11329         def XYZtoUV(self, theSurf, theXYZlist, theIsNormalized = True):
11330             """
11331             Convert X,Y,Z points coordinates to UV parameters on the given surface.
11332
11333             Parameters:
11334                 theSurf the given face. It can be also a shell or a compound with one face.
11335                 theXYZlist float list of size 3*N where N is the number of points
11336                            for which we want their U,V coordinates.
11337                            If the user enters a list of size not divisible by 3
11338                            an exception will be thrown.
11339                 theIsNormalized if True, the returned parameters will be in range [0, 1].
11340
11341             Returns:
11342                 list of float of size 2*N.
11343
11344             Example of usage:
11345                 [u1,v1, u2,v2] = geompy.XYZtoUV(Face_1, [0,0,0, 0,10,10])
11346             """
11347             aUVlist = self.MeasuOp.XYZtoUV(theSurf, theXYZlist, theIsNormalized)
11348             RaiseIfFailed("XYZtoUV", self.MeasuOp)
11349             return aUVlist
11350
11351         ## Convert UV parameters on the given surface to 3D points coordinates.
11352         #  @param theSurf the given face. It can be also a shell or a compound with one face.
11353         #  @param theUVlist float list of size 2*N where N is the number of points
11354         #                   for which we want their X,Y,Z coordinates.
11355         #                   If the user enters a list of non-even size
11356         #                   an exception will be thrown.
11357         #  @param theIsNormalized if True, the input parameters are expected to be in range [0, 1].
11358         #
11359         #  @return list of float of size 3*N.
11360         #
11361         #  @ref tui_xyz_to_uv_page "Example"
11362         @ManageTransactions("MeasuOp")
11363         def UVtoXYZ(self, theSurf, theUVlist, theIsNormalized = True):
11364             """
11365             Convert UV parameters on the given surface to 3D points coordinates.
11366
11367             Parameters:
11368                 theSurf the given face. It can be also a shell or a compound with one face.
11369                 theUVlist float list of size 2*N where N is the number of points
11370                           for which we want their X,Y,Z coordinates.
11371                           If the user enters a list of non-even size
11372                           an exception will be thrown.
11373                 theIsNormalized if True, the input parameters are expected to be in range [0, 1].
11374
11375             Returns:
11376                 list of float of size 3*N.
11377
11378             Example of usage:
11379                 [x1,y1,z1, x2,y2,z2] = geompy.UVtoXYZ(Face_1, [0,0, 10,10])
11380             """
11381             aXYZlist = self.MeasuOp.UVtoXYZ(theSurf, theUVlist, theIsNormalized)
11382             RaiseIfFailed("UVtoXYZ", self.MeasuOp)
11383             return aXYZlist
11384
11385         ## Get min and max tolerances of sub-shapes of theShape
11386         #  @param theShape Shape, to get tolerances of.
11387         #  @return [FaceMin,FaceMax, EdgeMin,EdgeMax, VertMin,VertMax]\n
11388         #  FaceMin,FaceMax: Min and max tolerances of the faces.\n
11389         #  EdgeMin,EdgeMax: Min and max tolerances of the edges.\n
11390         #  VertMin,VertMax: Min and max tolerances of the vertices.
11391         #
11392         #  @ref tui_tolerance_page "Example"
11393         @ManageTransactions("MeasuOp")
11394         def Tolerance(self,theShape):
11395             """
11396             Get min and max tolerances of sub-shapes of theShape
11397
11398             Parameters:
11399                 theShape Shape, to get tolerances of.
11400
11401             Returns:
11402                 [FaceMin,FaceMax, EdgeMin,EdgeMax, VertMin,VertMax]
11403                  FaceMin,FaceMax: Min and max tolerances of the faces.
11404                  EdgeMin,EdgeMax: Min and max tolerances of the edges.
11405                  VertMin,VertMax: Min and max tolerances of the vertices.
11406             """
11407             # Example: see GEOM_TestMeasures.py
11408             aTuple = self.MeasuOp.GetTolerance(theShape)
11409             RaiseIfFailed("GetTolerance", self.MeasuOp)
11410             return aTuple
11411
11412         ## Obtain description of the given shape (number of sub-shapes of each type)
11413         #  @param theShape Shape to be described.
11414         #  @return Description of the given shape.
11415         #
11416         #  @ref tui_whatis_page "Example"
11417         @ManageTransactions("MeasuOp")
11418         def WhatIs(self,theShape):
11419             """
11420             Obtain description of the given shape (number of sub-shapes of each type)
11421
11422             Parameters:
11423                 theShape Shape to be described.
11424
11425             Returns:
11426                 Description of the given shape.
11427             """
11428             # Example: see GEOM_TestMeasures.py
11429             aDescr = self.MeasuOp.WhatIs(theShape)
11430             RaiseIfFailed("WhatIs", self.MeasuOp)
11431             return aDescr
11432
11433         ## Obtain quantity of shapes of the given type in \a theShape.
11434         #  If \a theShape is of type \a theType, it is also counted.
11435         #  @param theShape Shape to be described.
11436         #  @param theType the given ShapeType().
11437         #  @return Quantity of shapes of type \a theType in \a theShape.
11438         #
11439         #  @ref tui_measurement_tools_page "Example"
11440         def NbShapes (self, theShape, theType):
11441             """
11442             Obtain quantity of shapes of the given type in theShape.
11443             If theShape is of type theType, it is also counted.
11444
11445             Parameters:
11446                 theShape Shape to be described.
11447                 theType the given geompy.ShapeType
11448
11449             Returns:
11450                 Quantity of shapes of type theType in theShape.
11451             """
11452             # Example: see GEOM_TestMeasures.py
11453             listSh = self.SubShapeAllIDs(theShape, theType)
11454             Nb = len(listSh)
11455             return Nb
11456
11457         ## Obtain quantity of shapes of each type in \a theShape.
11458         #  The \a theShape is also counted.
11459         #  @param theShape Shape to be described.
11460         #  @return Dictionary of ShapeType() with bound quantities of shapes.
11461         #
11462         #  @ref tui_measurement_tools_page "Example"
11463         def ShapeInfo (self, theShape):
11464             """
11465             Obtain quantity of shapes of each type in theShape.
11466             The theShape is also counted.
11467
11468             Parameters:
11469                 theShape Shape to be described.
11470
11471             Returns:
11472                 Dictionary of geompy.ShapeType with bound quantities of shapes.
11473             """
11474             # Example: see GEOM_TestMeasures.py
11475             aDict = {}
11476             for typeSh in self.ShapeType:
11477                 if typeSh in ( "AUTO", "SHAPE" ): continue
11478                 listSh = self.SubShapeAllIDs(theShape, self.ShapeType[typeSh])
11479                 Nb = len(listSh)
11480                 aDict[typeSh] = Nb
11481                 pass
11482             return aDict
11483
11484         def GetCreationInformation(self, theShape):
11485             res = ''
11486             infos = theShape.GetCreationInformation()
11487             for info in infos:
11488                 # operationName
11489                 opName = info.operationName
11490                 if not opName: opName = "no info available"
11491                 if res: res += "\n"
11492                 res += "Operation: " + opName
11493                 # parameters
11494                 for parVal in info.params:
11495                     res += "\n \t%s = %s" % ( parVal.name, parVal.value )
11496             return res
11497
11498         ## Get a point, situated at the centre of mass of theShape.
11499         #  @param theShape Shape to define centre of mass of.
11500         #  @param theName Object name; when specified, this parameter is used
11501         #         for result publication in the study. Otherwise, if automatic
11502         #         publication is switched on, default value is used for result name.
11503         #
11504         #  @return New GEOM.GEOM_Object, containing the created point.
11505         #
11506         #  @ref tui_center_of_mass_page "Example"
11507         @ManageTransactions("MeasuOp")
11508         def MakeCDG(self, theShape, theName=None):
11509             """
11510             Get a point, situated at the centre of mass of theShape.
11511
11512             Parameters:
11513                 theShape Shape to define centre of mass of.
11514                 theName Object name; when specified, this parameter is used
11515                         for result publication in the study. Otherwise, if automatic
11516                         publication is switched on, default value is used for result name.
11517
11518             Returns:
11519                 New GEOM.GEOM_Object, containing the created point.
11520             """
11521             # Example: see GEOM_TestMeasures.py
11522             anObj = self.MeasuOp.GetCentreOfMass(theShape)
11523             RaiseIfFailed("GetCentreOfMass", self.MeasuOp)
11524             self._autoPublish(anObj, theName, "centerOfMass")
11525             return anObj
11526
11527         ## Get a vertex sub-shape by index.
11528         #  @param theShape Shape to find sub-shape.
11529         #  @param theIndex Index to find vertex by this index (starting from zero)
11530         #  @param theUseOri To consider edge/wire orientation or not
11531         #  @param theName Object name; when specified, this parameter is used
11532         #         for result publication in the study. Otherwise, if automatic
11533         #         publication is switched on, default value is used for result name.
11534         #
11535         #  @return New GEOM.GEOM_Object, containing the created vertex.
11536         #
11537         #  @ref tui_measurement_tools_page "Example"
11538         @ManageTransactions("MeasuOp")
11539         def GetVertexByIndex(self, theShape, theIndex, theUseOri=True, theName=None):
11540             """
11541             Get a vertex sub-shape by index.
11542
11543             Parameters:
11544                 theShape Shape to find sub-shape.
11545                 theIndex Index to find vertex by this index (starting from zero)
11546                 theUseOri To consider edge/wire orientation or not
11547                 theName Object name; when specified, this parameter is used
11548                         for result publication in the study. Otherwise, if automatic
11549                         publication is switched on, default value is used for result name.
11550
11551             Returns:
11552                 New GEOM.GEOM_Object, containing the created vertex.
11553             """
11554             # Example: see GEOM_TestMeasures.py
11555             if isinstance( theUseOri, str ): # theUseOri was inserted before theName
11556                 theUseOri, theName = True, theUseOri
11557             anObj = self.MeasuOp.GetVertexByIndex(theShape, theIndex, theUseOri)
11558             RaiseIfFailed("GetVertexByIndex", self.MeasuOp)
11559             self._autoPublish(anObj, theName, "vertex")
11560             return anObj
11561
11562         ## Get the first vertex of wire/edge depended orientation.
11563         #  @param theShape Shape to find first vertex.
11564         #  @param theName Object name; when specified, this parameter is used
11565         #         for result publication in the study. Otherwise, if automatic
11566         #         publication is switched on, default value is used for result name.
11567         #
11568         #  @return New GEOM.GEOM_Object, containing the created vertex.
11569         #
11570         #  @ref tui_measurement_tools_page "Example"
11571         def GetFirstVertex(self, theShape, theName=None):
11572             """
11573             Get the first vertex of wire/edge depended orientation.
11574
11575             Parameters:
11576                 theShape Shape to find first vertex.
11577                 theName Object name; when specified, this parameter is used
11578                         for result publication in the study. Otherwise, if automatic
11579                         publication is switched on, default value is used for result name.
11580
11581             Returns:
11582                 New GEOM.GEOM_Object, containing the created vertex.
11583             """
11584             # Example: see GEOM_TestMeasures.py
11585             # note: auto-publishing is done in self.GetVertexByIndex()
11586             return self.GetVertexByIndex(theShape, 0, True, theName)
11587
11588         ## Get the last vertex of wire/edge depended orientation.
11589         #  @param theShape Shape to find last vertex.
11590         #  @param theName Object name; when specified, this parameter is used
11591         #         for result publication in the study. Otherwise, if automatic
11592         #         publication is switched on, default value is used for result name.
11593         #
11594         #  @return New GEOM.GEOM_Object, containing the created vertex.
11595         #
11596         #  @ref tui_measurement_tools_page "Example"
11597         def GetLastVertex(self, theShape, theName=None):
11598             """
11599             Get the last vertex of wire/edge depended orientation.
11600
11601             Parameters:
11602                 theShape Shape to find last vertex.
11603                 theName Object name; when specified, this parameter is used
11604                         for result publication in the study. Otherwise, if automatic
11605                         publication is switched on, default value is used for result name.
11606
11607             Returns:
11608                 New GEOM.GEOM_Object, containing the created vertex.
11609             """
11610             # Example: see GEOM_TestMeasures.py
11611             nb_vert =  self.NumberOfSubShapes(theShape, self.ShapeType["VERTEX"])
11612             # note: auto-publishing is done in self.GetVertexByIndex()
11613             return self.GetVertexByIndex(theShape, (nb_vert-1), True, theName)
11614
11615         ## Get a normale to the given face. If the point is not given,
11616         #  the normale is calculated at the center of mass.
11617         #  @param theFace Face to define normale of.
11618         #  @param theOptionalPoint Point to compute the normale at.
11619         #  @param theName Object name; when specified, this parameter is used
11620         #         for result publication in the study. Otherwise, if automatic
11621         #         publication is switched on, default value is used for result name.
11622         #
11623         #  @return New GEOM.GEOM_Object, containing the created vector.
11624         #
11625         #  @ref swig_todo "Example"
11626         @ManageTransactions("MeasuOp")
11627         def GetNormal(self, theFace, theOptionalPoint = None, theName=None):
11628             """
11629             Get a normale to the given face. If the point is not given,
11630             the normale is calculated at the center of mass.
11631
11632             Parameters:
11633                 theFace Face to define normale of.
11634                 theOptionalPoint Point to compute the normale at.
11635                 theName Object name; when specified, this parameter is used
11636                         for result publication in the study. Otherwise, if automatic
11637                         publication is switched on, default value is used for result name.
11638
11639             Returns:
11640                 New GEOM.GEOM_Object, containing the created vector.
11641             """
11642             # Example: see GEOM_TestMeasures.py
11643             anObj = self.MeasuOp.GetNormal(theFace, theOptionalPoint)
11644             RaiseIfFailed("GetNormal", self.MeasuOp)
11645             self._autoPublish(anObj, theName, "normal")
11646             return anObj
11647
11648         ## Print shape errors obtained from CheckShape.
11649         #  @param theShape Shape that was checked.
11650         #  @param theShapeErrors the shape errors obtained by CheckShape.
11651         #  @param theReturnStatus If 0 the description of problem is printed.
11652         #                         If 1 the description of problem is returned.
11653         #  @return If theReturnStatus is equal to 1 the description is returned.
11654         #          Otherwise doesn't return anything.
11655         #
11656         #  @ref tui_check_shape_page "Example"
11657         @ManageTransactions("MeasuOp")
11658         def PrintShapeErrors(self, theShape, theShapeErrors, theReturnStatus = 0):
11659             """
11660             Print shape errors obtained from CheckShape.
11661
11662             Parameters:
11663                 theShape Shape that was checked.
11664                 theShapeErrors the shape errors obtained by CheckShape.
11665                 theReturnStatus If 0 the description of problem is printed.
11666                                 If 1 the description of problem is returned.
11667
11668             Returns:
11669                 If theReturnStatus is equal to 1 the description is returned.
11670                   Otherwise doesn't return anything.
11671             """
11672             # Example: see GEOM_TestMeasures.py
11673             Descr = self.MeasuOp.PrintShapeErrors(theShape, theShapeErrors)
11674             if theReturnStatus == 1:
11675                 return Descr
11676             print(Descr)
11677             pass
11678
11679         ## Check a topology of the given shape.
11680         #  @param theShape Shape to check validity of.
11681         #  @param theIsCheckGeom If FALSE, only the shape's topology will be checked, \n
11682         #                        if TRUE, the shape's geometry will be checked also.
11683         #  @param theReturnStatus If 0 and if theShape is invalid, a description
11684         #                         of problem is printed.
11685         #                         If 1 isValid flag and the description of
11686         #                         problem is returned.
11687         #                         If 2 isValid flag and the list of error data
11688         #                         is returned.
11689         #  @return TRUE, if the shape "seems to be valid".
11690         #          If theShape is invalid, prints a description of problem.
11691         #          If theReturnStatus is equal to 1 the description is returned
11692         #          along with IsValid flag.
11693         #          If theReturnStatus is equal to 2 the list of error data is
11694         #          returned along with IsValid flag.
11695         #
11696         #  @ref tui_check_shape_page "Example"
11697         @ManageTransactions("MeasuOp")
11698         def CheckShape(self,theShape, theIsCheckGeom = 0, theReturnStatus = 0):
11699             """
11700             Check a topology of the given shape.
11701
11702             Parameters:
11703                 theShape Shape to check validity of.
11704                 theIsCheckGeom If FALSE, only the shape's topology will be checked,
11705                                if TRUE, the shape's geometry will be checked also.
11706                 theReturnStatus If 0 and if theShape is invalid, a description
11707                                 of problem is printed.
11708                                 If 1 IsValid flag and the description of
11709                                 problem is returned.
11710                                 If 2 IsValid flag and the list of error data
11711                                 is returned.
11712
11713             Returns:
11714                 TRUE, if the shape "seems to be valid".
11715                 If theShape is invalid, prints a description of problem.
11716                 If theReturnStatus is equal to 1 the description is returned
11717                 along with IsValid flag.
11718                 If theReturnStatus is equal to 2 the list of error data is
11719                 returned along with IsValid flag.
11720             """
11721             # Example: see GEOM_TestMeasures.py
11722             if theIsCheckGeom:
11723                 (IsValid, ShapeErrors) = self.MeasuOp.CheckShapeWithGeometry(theShape)
11724                 RaiseIfFailed("CheckShapeWithGeometry", self.MeasuOp)
11725             else:
11726                 (IsValid, ShapeErrors) = self.MeasuOp.CheckShape(theShape)
11727                 RaiseIfFailed("CheckShape", self.MeasuOp)
11728             if IsValid == 0:
11729                 if theReturnStatus == 0:
11730                     Descr = self.MeasuOp.PrintShapeErrors(theShape, ShapeErrors)
11731                     print(Descr)
11732             if theReturnStatus == 1:
11733               Descr = self.MeasuOp.PrintShapeErrors(theShape, ShapeErrors)
11734               return (IsValid, Descr)
11735             elif theReturnStatus == 2:
11736               return (IsValid, ShapeErrors)
11737             return IsValid
11738
11739         ## Detect self-intersections in the given shape.
11740         #  @param theShape Shape to check.
11741         #  @param theCheckLevel is the level of self-intersection check.
11742         #         Possible input values are:
11743         #         - GEOM.SI_V_V(0) - only V/V interferences
11744         #         - GEOM.SI_V_E(1) - V/V and V/E interferences
11745         #         - GEOM.SI_E_E(2) - V/V, V/E and E/E interferences
11746         #         - GEOM.SI_V_F(3) - V/V, V/E, E/E and V/F interferences
11747         #         - GEOM.SI_E_F(4) - V/V, V/E, E/E, V/F and E/F interferences
11748         #         - GEOM.SI_ALL(5) - all interferences.
11749         #  @return TRUE, if the shape contains no self-intersections.
11750         #
11751         #  @ref tui_check_self_intersections_page "Example"
11752         @ManageTransactions("MeasuOp")
11753         def CheckSelfIntersections(self, theShape, theCheckLevel = GEOM.SI_ALL):
11754             """
11755             Detect self-intersections in the given shape.
11756
11757             Parameters:
11758                 theShape Shape to check.
11759                 theCheckLevel is the level of self-intersection check.
11760                   Possible input values are:
11761                    - GEOM.SI_V_V(0) - only V/V interferences
11762                    - GEOM.SI_V_E(1) - V/V and V/E interferences
11763                    - GEOM.SI_E_E(2) - V/V, V/E and E/E interferences
11764                    - GEOM.SI_V_F(3) - V/V, V/E, E/E and V/F interferences
11765                    - GEOM.SI_E_F(4) - V/V, V/E, E/E, V/F and E/F interferences
11766                    - GEOM.SI_ALL(5) - all interferences.
11767  
11768             Returns:
11769                 TRUE, if the shape contains no self-intersections.
11770             """
11771             # Example: see GEOM_TestMeasures.py
11772             (IsValid, Pairs) = self.MeasuOp.CheckSelfIntersections(theShape, EnumToLong(theCheckLevel))
11773             RaiseIfFailed("CheckSelfIntersections", self.MeasuOp)
11774             return IsValid
11775
11776         ## Detect self-intersections of the given shape with algorithm based on mesh intersections.
11777         #  @param theShape Shape to check.
11778         #  @param theDeflection Linear deflection coefficient that specifies quality of tessellation:
11779         #         - if \a theDeflection <= 0, default deflection 0.001 is used
11780         #  @param theTolerance Specifies a distance between sub-shapes used for detecting gaps:
11781         #         - if \a theTolerance <= 0, algorithm detects intersections (default behavior)
11782         #         - if \a theTolerance > 0, algorithm detects gaps
11783         #  @return TRUE, if the shape contains no self-intersections.
11784         #
11785         #  @ref tui_check_self_intersections_fast_page "Example"
11786         @ManageTransactions("MeasuOp")
11787         def CheckSelfIntersectionsFast(self, theShape, theDeflection = 0.001, theTolerance = 0.0):
11788             """
11789             Detect self-intersections of the given shape with algorithm based on mesh intersections.
11790
11791             Parameters:
11792                 theShape Shape to check.
11793                 theDeflection Linear deflection coefficient that specifies quality of tessellation:
11794                     - if theDeflection <= 0, default deflection 0.001 is used
11795                 theTolerance Specifies a distance between shapes used for detecting gaps:
11796                     - if theTolerance <= 0, algorithm detects intersections (default behavior)
11797                     - if theTolerance > 0, algorithm detects gaps
11798  
11799             Returns:
11800                 TRUE, if the shape contains no self-intersections.
11801             """
11802             # Example: see GEOM_TestMeasures.py
11803             (IsValid, Pairs) = self.MeasuOp.CheckSelfIntersectionsFast(theShape, theDeflection, theTolerance)
11804             RaiseIfFailed("CheckSelfIntersectionsFast", self.MeasuOp)
11805             return IsValid
11806
11807         ## Check boolean and partition operations arguments.
11808         #  @param theShape the argument of an operation to be checked
11809         #  @return TRUE if the argument is valid for a boolean or partition
11810         #          operation; FALSE otherwise.
11811         @ManageTransactions("MeasuOp")
11812         def CheckBOPArguments(self, theShape):
11813             """
11814             Check boolean and partition operations arguments.
11815
11816             Parameters:
11817                 theShape the argument of an operation to be checked
11818
11819             Returns:
11820                 TRUE if the argument is valid for a boolean or partition
11821                 operation; FALSE otherwise.
11822             """
11823             return self.MeasuOp.CheckBOPArguments(theShape)
11824
11825         ## Detect intersections of the given shapes with algorithm based on mesh intersections.
11826         #  @param theShape1 First source object
11827         #  @param theShape2 Second source object
11828         #  @param theTolerance Specifies a distance between shapes used for detecting gaps:
11829         #         - if \a theTolerance <= 0, algorithm detects intersections (default behavior)
11830         #         - if \a theTolerance > 0, algorithm detects gaps
11831         #  @param theDeflection Linear deflection coefficient that specifies quality of tessellation:
11832         #         - if \a theDeflection <= 0, default deflection 0.001 is used
11833         #  @return TRUE, if there are intersections (gaps) between source shapes
11834         #  @return List of sub-shapes IDs from 1st shape that localize intersection.
11835         #  @return List of sub-shapes IDs from 2nd shape that localize intersection.
11836         #
11837         #  @ref tui_fast_intersection_page "Example"
11838         @ManageTransactions("MeasuOp")
11839         def FastIntersect(self, theShape1, theShape2, theTolerance = 0.0, theDeflection = 0.001):
11840             """
11841             Detect intersections of the given shapes with algorithm based on mesh intersections.
11842
11843             Parameters:
11844                 theShape1 First source object
11845                 theShape2 Second source object
11846                 theTolerance Specifies a distance between shapes used for detecting gaps:
11847                     - if theTolerance <= 0, algorithm detects intersections (default behavior)
11848                     - if theTolerance > 0, algorithm detects gaps
11849                 theDeflection Linear deflection coefficient that specifies quality of tessellation:
11850                     - if theDeflection <= 0, default deflection 0.001 is used
11851  
11852             Returns:
11853                 TRUE, if there are intersections (gaps) between source shapes
11854                 List of sub-shapes IDs from 1st shape that localize intersection.
11855                 List of sub-shapes IDs from 2nd shape that localize intersection.
11856             """
11857             # Example: see GEOM_TestMeasures.py
11858             IsOk, Res1, Res2 = self.MeasuOp.FastIntersect(theShape1, theShape2, theTolerance, theDeflection)
11859             RaiseIfFailed("FastIntersect", self.MeasuOp)
11860             return IsOk, Res1, Res2
11861
11862         ## Get position (LCS) of theShape.
11863         #
11864         #  Origin of the LCS is situated at the shape's center of mass.
11865         #  Axes of the LCS are obtained from shape's location or,
11866         #  if the shape is a planar face, from position of its plane.
11867         #
11868         #  @param theShape Shape to calculate position of.
11869         #  @return [Ox,Oy,Oz, Zx,Zy,Zz, Xx,Xy,Xz].
11870         #          Ox,Oy,Oz: Coordinates of shape's LCS origin.
11871         #          Zx,Zy,Zz: Coordinates of shape's LCS normal(main) direction.
11872         #          Xx,Xy,Xz: Coordinates of shape's LCS X direction.
11873         #
11874         #  @ref swig_todo "Example"
11875         @ManageTransactions("MeasuOp")
11876         def GetPosition(self,theShape):
11877             """
11878             Get position (LCS) of theShape.
11879             Origin of the LCS is situated at the shape's center of mass.
11880             Axes of the LCS are obtained from shape's location or,
11881             if the shape is a planar face, from position of its plane.
11882
11883             Parameters:
11884                 theShape Shape to calculate position of.
11885
11886             Returns:
11887                 [Ox,Oy,Oz, Zx,Zy,Zz, Xx,Xy,Xz].
11888                  Ox,Oy,Oz: Coordinates of shape's LCS origin.
11889                  Zx,Zy,Zz: Coordinates of shape's LCS normal(main) direction.
11890                  Xx,Xy,Xz: Coordinates of shape's LCS X direction.
11891             """
11892             # Example: see GEOM_TestMeasures.py
11893             aTuple = self.MeasuOp.GetPosition(theShape)
11894             RaiseIfFailed("GetPosition", self.MeasuOp)
11895             return aTuple
11896
11897         ## Get kind of theShape.
11898         #
11899         #  @param theShape Shape to get a kind of.
11900         #  @return Returns a kind of shape in terms of <VAR>GEOM.GEOM_IKindOfShape.shape_kind</VAR> enumeration
11901         #          and a list of parameters, describing the shape.
11902         #  @note  Concrete meaning of each value, returned via \a theIntegers
11903         #         or \a theDoubles list depends on the kind() of the shape.
11904         #
11905         #  @ref swig_todo "Example"
11906         @ManageTransactions("MeasuOp")
11907         def KindOfShape(self,theShape):
11908             """
11909             Get kind of theShape.
11910
11911             Parameters:
11912                 theShape Shape to get a kind of.
11913
11914             Returns:
11915                 a kind of shape in terms of GEOM_IKindOfShape.shape_kind enumeration
11916                     and a list of parameters, describing the shape.
11917             Note:
11918                 Concrete meaning of each value, returned via theIntegers
11919                 or theDoubles list depends on the geompy.kind of the shape
11920             """
11921             # Example: see GEOM_TestMeasures.py
11922             aRoughTuple = self.MeasuOp.KindOfShape(theShape)
11923             RaiseIfFailed("KindOfShape", self.MeasuOp)
11924
11925             aKind  = aRoughTuple[0]
11926             anInts = aRoughTuple[1]
11927             aDbls  = aRoughTuple[2]
11928
11929             # Now there is no exception from this rule:
11930             aKindTuple = [aKind] + aDbls + anInts
11931
11932             # If they are we will regroup parameters for such kind of shape.
11933             # For example:
11934             #if aKind == kind.SOME_KIND:
11935             #    #  SOME_KIND     int int double int double double
11936             #    aKindTuple = [aKind, anInts[0], anInts[1], aDbls[0], anInts[2], aDbls[1], aDbls[2]]
11937             if aKind == self.kind.CRV_BSPLINE:
11938                aKindTuple = [aKind] + anInts[:6] + aDbls + anInts[6:]
11939             elif aKind == self.kind.CRV_BEZIER:
11940                aKindTuple = [aKind] + anInts[:2] + aDbls + anInts[2:]
11941
11942             return aKindTuple
11943
11944         ## The function takes a single face with holes and returns a list of faces,
11945         #  first of them is the original face without holes, and the other faces are placed
11946         #  on the same surface as the original face but bounded by each hole wire.
11947         #  If the original face has no holes, it will be returned as an output
11948         #  @param theShape Face to perform operation on.
11949         #
11950         #  @return GEOM.ListOfGO, list created faces, where first of them is the original face without holes
11951         @ManageTransactions("MeasuOp")
11952         def PatchFace(self, theShape):
11953             """
11954             The function takes a single face with holes and returns a list of faces,
11955             first of them is the original face without holes, and the other faces are placed
11956             on the same surface as the original face but bounded by each hole wire.
11957             If the original face has no holes, it will be returned as an output
11958
11959             Parameters:
11960                 theShape  Face to perform operation on.
11961
11962             Returns:
11963                 GEOM.ListOfGO, list created faces, where first of them is the original face without holes
11964
11965             Example of usage:
11966                 Circle_1 = geompy.MakeCircle(None, None, 190)
11967                 Circle_2 = geompy.MakeCircle(None, None, 100)
11968                 Face_1 = geompy.MakeFaceWires([Circle_1], 1)
11969                 Face_2 = geompy.MakeFaceWires([Circle_2], 1)
11970                 Cut_1 = geompy.MakeCutList(Face_1, [Face_2], True)
11971                 faces = geompy.PatchFace(Cut_1)
11972             """
11973             aList = self.MeasuOp.PatchFace(theShape)
11974             RaiseIfFailed("PatchFace", self.MeasuOp)
11975             return aList
11976
11977         ## Returns the string that describes if the shell is good for solid.
11978         #  This is a support method for MakeSolid.
11979         #
11980         #  @param theShell the shell to be checked.
11981         #  @return Returns a string that describes the shell validity for
11982         #          solid construction.
11983         @ManageTransactions("MeasuOp")
11984         def _IsGoodForSolid(self, theShell):
11985             """
11986             Returns the string that describes if the shell is good for solid.
11987             This is a support method for MakeSolid.
11988
11989             Parameter:
11990                 theShell the shell to be checked.
11991
11992             Returns:
11993                 Returns a string that describes the shell validity for
11994                 solid construction.
11995             """
11996             aDescr = self.MeasuOp.IsGoodForSolid(theShell)
11997             return aDescr
11998
11999         ## Obtain a canonical recognition interface.
12000         #  @return An instance of
12001         #          @ref canonicalrecognition.CanonicalRecognition "CanonicalRecognition" interface
12002         #
12003         #  @ref tui_3dsketcher_page "Example"
12004         def CanonicalRecognition (self):
12005             """
12006             Obtain a canonical recognition interface.
12007
12008             Example of usage:
12009                 cr = geompy.CanonicalRecognition()
12010                 cr.isLine(aLine, tolerance)
12011             """
12012             cr = CanonicalRecognition (self)
12013             return cr
12014
12015         # end of l2_measure
12016         ## @}
12017
12018         ## @addtogroup l2_import_export
12019         ## @{
12020
12021         ## Import a shape from the BREP, IGES, STEP or other file
12022         #  (depends on given format) with given name.
12023         #
12024         #  Note: this function is deprecated, it is kept for backward compatibility only
12025         #  Use Import<FormatName> instead, where <FormatName> is a name of desirable format to import.
12026         #
12027         #  @param theFileName The file, containing the shape.
12028         #  @param theFormatName Specify format for the file reading.
12029         #         Available formats can be obtained with InsertOp.ImportTranslators() method.
12030         #         If format 'IGES_SCALE' is used instead of 'IGES' or
12031         #            format 'STEP_SCALE' is used instead of 'STEP',
12032         #            length unit will be set to 'meter' and result model will be scaled.
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 imported shape.
12038         #          If material names are imported it returns the list of
12039         #          objects. The first one is the imported object followed by
12040         #          material groups.
12041         #  @note Auto publishing is allowed for the shape itself. Imported
12042         #        material groups are not automatically published.
12043         #
12044         #  @ref swig_Import_Export "Example"
12045         @ManageTransactions("InsertOp")
12046         def ImportFile(self, theFileName, theFormatName, theName=None):
12047             """
12048             Import a shape from the BREP, IGES, STEP or other file
12049             (depends on given format) with given name.
12050
12051             Note: this function is deprecated, it is kept for backward compatibility only
12052             Use Import<FormatName> instead, where <FormatName> is a name of desirable format to import.
12053
12054             Parameters: 
12055                 theFileName The file, containing the shape.
12056                 theFormatName Specify format for the file reading.
12057                     Available formats can be obtained with geompy.InsertOp.ImportTranslators() method.
12058                     If format 'IGES_SCALE' is used instead of 'IGES' or
12059                        format 'STEP_SCALE' is used instead of 'STEP',
12060                        length unit will be set to 'meter' and result model will be scaled.
12061                 theName Object name; when specified, this parameter is used
12062                         for result publication in the study. Otherwise, if automatic
12063                         publication is switched on, default value is used for result name.
12064
12065             Returns:
12066                 New GEOM.GEOM_Object, containing the imported shape.
12067                 If material names are imported it returns the list of
12068                 objects. The first one is the imported object followed by
12069                 material groups.
12070             Note:
12071                 Auto publishing is allowed for the shape itself. Imported
12072                 material groups are not automatically published.
12073             """
12074             # Example: see GEOM_TestOthers.py
12075             print("""
12076             WARNING: Function ImportFile is deprecated, use Import<FormatName> instead,
12077             where <FormatName> is a name of desirable format for importing.
12078             """)
12079             aListObj = self.InsertOp.ImportFile(theFileName, theFormatName)
12080             RaiseIfFailed("ImportFile", self.InsertOp)
12081             aNbObj = len(aListObj)
12082             if aNbObj > 0:
12083                 self._autoPublish(aListObj[0], theName, "imported")
12084             if aNbObj == 1:
12085                 return aListObj[0]
12086             return aListObj
12087
12088         ## Deprecated analog of ImportFile()
12089         def Import(self, theFileName, theFormatName, theName=None):
12090             """
12091             Deprecated analog of geompy.ImportFile, kept for backward compatibility only.
12092             """
12093             # note: auto-publishing is done in self.ImportFile()
12094             return self.ImportFile(theFileName, theFormatName, theName)
12095
12096         ## Read a shape from the binary stream, containing its bounding representation (BRep).
12097         #
12098         #  @note As the byte-stream representing the shape data can be quite large, this method
12099         #  is not automatically dumped to the Python script with the DumpStudy functionality;
12100         #  so please use this method carefully, only for strong reasons.
12101         #  
12102         #  @note GEOM.GEOM_Object.GetShapeStream() method can be used to obtain the shape's
12103         #  data stream.
12104         #
12105         #  @param theStream The BRep binary stream.
12106         #  @param theName Object name; when specified, this parameter is used
12107         #         for result publication in the study. Otherwise, if automatic
12108         #         publication is switched on, default value is used for result name.
12109         #
12110         #  @return New GEOM_Object, containing the shape, read from theStream.
12111         #
12112         #  @ref swig_Import_Export "Example"
12113         @ManageTransactions("InsertOp")
12114         def RestoreShape (self, theStream, theName=None):
12115             """
12116             Read a shape from the binary stream, containing its bounding representation (BRep).
12117
12118             Note:
12119                 shape.GetShapeStream() method can be used to obtain the shape's BRep stream.
12120
12121             Parameters:
12122                 theStream The BRep binary stream.
12123                 theName Object name; when specified, this parameter is used
12124                         for result publication in the study. Otherwise, if automatic
12125                         publication is switched on, default value is used for result name.
12126
12127             Returns:
12128                 New GEOM_Object, containing the shape, read from theStream.
12129             """
12130             # Example: see GEOM_TestOthers.py
12131             if not theStream:
12132                 # this is the workaround to ignore invalid case when data stream is empty
12133                 if int(os.getenv("GEOM_IGNORE_RESTORE_SHAPE", "0")) > 0:
12134                     print("WARNING: Result of RestoreShape is a NULL shape!")
12135                     return None
12136             anObj = self.InsertOp.RestoreShape(theStream)
12137             RaiseIfFailed("RestoreShape", self.InsertOp)
12138             self._autoPublish(anObj, theName, "restored")
12139             return anObj
12140
12141         ## Export the given shape into a file with given name.
12142         #
12143         #  Note: this function is deprecated, it is kept for backward compatibility only
12144         #  Use Export<FormatName> instead, where <FormatName> is a name of desirable format to export.
12145         #
12146         #  @param theObject Shape to be stored in the file.
12147         #  @param theFileName Name of the file to store the given shape in.
12148         #  @param theFormatName Specify format for the shape storage.
12149         #         Available formats can be obtained with
12150         #         geompy.InsertOp.ExportTranslators()[0] method.
12151         #
12152         #  @ref swig_Import_Export "Example"
12153         @ManageTransactions("InsertOp")
12154         def Export(self, theObject, theFileName, theFormatName):
12155             """
12156             Export the given shape into a file with given name.
12157
12158             Note: this function is deprecated, it is kept for backward compatibility only
12159             Use Export<FormatName> instead, where <FormatName> is a name of desirable format to export.
12160             
12161             Parameters: 
12162                 theObject Shape to be stored in the file.
12163                 theFileName Name of the file to store the given shape in.
12164                 theFormatName Specify format for the shape storage.
12165                               Available formats can be obtained with
12166                               geompy.InsertOp.ExportTranslators()[0] method.
12167             """
12168             # Example: see GEOM_TestOthers.py
12169             print("""
12170             WARNING: Function Export is deprecated, use Export<FormatName> instead,
12171             where <FormatName> is a name of desirable format for exporting.
12172             """)
12173             self.InsertOp.Export(theObject, theFileName, theFormatName)
12174             if self.InsertOp.IsDone() == 0:
12175                 raise RuntimeError("Export : " + self.InsertOp.GetErrorCode())
12176                 pass
12177             pass
12178
12179         # end of l2_import_export
12180         ## @}
12181
12182         ## @addtogroup l3_blocks
12183         ## @{
12184
12185         ## Create a quadrangle face from four edges. Order of Edges is not
12186         #  important. It is not necessary that edges share the same vertex.
12187         #  @param E1,E2,E3,E4 Edges for the face bound.
12188         #  @param theName Object name; when specified, this parameter is used
12189         #         for result publication in the study. Otherwise, if automatic
12190         #         publication is switched on, default value is used for result name.
12191         #
12192         #  @return New GEOM.GEOM_Object, containing the created face.
12193         #
12194         #  @ref tui_building_by_blocks_page "Example"
12195         @ManageTransactions("BlocksOp")
12196         def MakeQuad(self, E1, E2, E3, E4, theName=None):
12197             """
12198             Create a quadrangle face from four edges. Order of Edges is not
12199             important. It is not necessary that edges share the same vertex.
12200
12201             Parameters:
12202                 E1,E2,E3,E4 Edges for the face bound.
12203                 theName Object name; when specified, this parameter is used
12204                         for result publication in the study. Otherwise, if automatic
12205                         publication is switched on, default value is used for result name.
12206
12207             Returns:
12208                 New GEOM.GEOM_Object, containing the created face.
12209
12210             Example of usage:
12211                 qface1 = geompy.MakeQuad(edge1, edge2, edge3, edge4)
12212             """
12213             # Example: see GEOM_Spanner.py
12214             anObj = self.BlocksOp.MakeQuad(E1, E2, E3, E4)
12215             RaiseIfFailed("MakeQuad", self.BlocksOp)
12216             self._autoPublish(anObj, theName, "quad")
12217             return anObj
12218
12219         ## Create a quadrangle face on two edges.
12220         #  The missing edges will be built by creating the shortest ones.
12221         #  @param E1,E2 Two opposite edges for the face.
12222         #  @param theName Object name; when specified, this parameter is used
12223         #         for result publication in the study. Otherwise, if automatic
12224         #         publication is switched on, default value is used for result name.
12225         #
12226         #  @return New GEOM.GEOM_Object, containing the created face.
12227         #
12228         #  @ref tui_building_by_blocks_page "Example"
12229         @ManageTransactions("BlocksOp")
12230         def MakeQuad2Edges(self, E1, E2, theName=None):
12231             """
12232             Create a quadrangle face on two edges.
12233             The missing edges will be built by creating the shortest ones.
12234
12235             Parameters:
12236                 E1,E2 Two opposite edges for the face.
12237                 theName Object name; when specified, this parameter is used
12238                         for result publication in the study. Otherwise, if automatic
12239                         publication is switched on, default value is used for result name.
12240
12241             Returns:
12242                 New GEOM.GEOM_Object, containing the created face.
12243
12244             Example of usage:
12245                 # create vertices
12246                 p1 = geompy.MakeVertex(  0.,   0.,   0.)
12247                 p2 = geompy.MakeVertex(150.,  30.,   0.)
12248                 p3 = geompy.MakeVertex(  0., 120.,  50.)
12249                 p4 = geompy.MakeVertex(  0.,  40.,  70.)
12250                 # create edges
12251                 edge1 = geompy.MakeEdge(p1, p2)
12252                 edge2 = geompy.MakeEdge(p3, p4)
12253                 # create a quadrangle face from two edges
12254                 qface2 = geompy.MakeQuad2Edges(edge1, edge2)
12255             """
12256             # Example: see GEOM_Spanner.py
12257             anObj = self.BlocksOp.MakeQuad2Edges(E1, E2)
12258             RaiseIfFailed("MakeQuad2Edges", self.BlocksOp)
12259             self._autoPublish(anObj, theName, "quad")
12260             return anObj
12261
12262         ## Create a quadrangle face with specified corners.
12263         #  The missing edges will be built by creating the shortest ones.
12264         #  @param V1,V2,V3,V4 Corner vertices for the face.
12265         #  @param theName Object name; when specified, this parameter is used
12266         #         for result publication in the study. Otherwise, if automatic
12267         #         publication is switched on, default value is used for result name.
12268         #
12269         #  @return New GEOM.GEOM_Object, containing the created face.
12270         #
12271         #  @ref tui_building_by_blocks_page "Example 1"
12272         #  \n @ref swig_MakeQuad4Vertices "Example 2"
12273         @ManageTransactions("BlocksOp")
12274         def MakeQuad4Vertices(self, V1, V2, V3, V4, theName=None):
12275             """
12276             Create a quadrangle face with specified corners.
12277             The missing edges will be built by creating the shortest ones.
12278
12279             Parameters:
12280                 V1,V2,V3,V4 Corner vertices for the face.
12281                 theName Object name; when specified, this parameter is used
12282                         for result publication in the study. Otherwise, if automatic
12283                         publication is switched on, default value is used for result name.
12284
12285             Returns:
12286                 New GEOM.GEOM_Object, containing the created face.
12287
12288             Example of usage:
12289                 # create vertices
12290                 p1 = geompy.MakeVertex(  0.,   0.,   0.)
12291                 p2 = geompy.MakeVertex(150.,  30.,   0.)
12292                 p3 = geompy.MakeVertex(  0., 120.,  50.)
12293                 p4 = geompy.MakeVertex(  0.,  40.,  70.)
12294                 # create a quadrangle from four points in its corners
12295                 qface3 = geompy.MakeQuad4Vertices(p1, p2, p3, p4)
12296             """
12297             # Example: see GEOM_Spanner.py
12298             anObj = self.BlocksOp.MakeQuad4Vertices(V1, V2, V3, V4)
12299             RaiseIfFailed("MakeQuad4Vertices", self.BlocksOp)
12300             self._autoPublish(anObj, theName, "quad")
12301             return anObj
12302
12303         ## Create a hexahedral solid, bounded by the six given faces. Order of
12304         #  faces is not important. It is not necessary that Faces share the same edge.
12305         #  @param F1,F2,F3,F4,F5,F6 Faces for the hexahedral solid.
12306         #  @param theName Object name; when specified, this parameter is used
12307         #         for result publication in the study. Otherwise, if automatic
12308         #         publication is switched on, default value is used for result name.
12309         #
12310         #  @return New GEOM.GEOM_Object, containing the created solid.
12311         #
12312         #  @ref tui_building_by_blocks_page "Example 1"
12313         #  \n @ref swig_MakeHexa "Example 2"
12314         @ManageTransactions("BlocksOp")
12315         def MakeHexa(self, F1, F2, F3, F4, F5, F6, theName=None):
12316             """
12317             Create a hexahedral solid, bounded by the six given faces. Order of
12318             faces is not important. It is not necessary that Faces share the same edge.
12319
12320             Parameters:
12321                 F1,F2,F3,F4,F5,F6 Faces for the hexahedral solid.
12322                 theName Object name; when specified, this parameter is used
12323                         for result publication in the study. Otherwise, if automatic
12324                         publication is switched on, default value is used for result name.
12325
12326             Returns:
12327                 New GEOM.GEOM_Object, containing the created solid.
12328
12329             Example of usage:
12330                 solid = geompy.MakeHexa(qface1, qface2, qface3, qface4, qface5, qface6)
12331             """
12332             # Example: see GEOM_Spanner.py
12333             anObj = self.BlocksOp.MakeHexa(F1, F2, F3, F4, F5, F6)
12334             RaiseIfFailed("MakeHexa", self.BlocksOp)
12335             self._autoPublish(anObj, theName, "hexa")
12336             return anObj
12337
12338         ## Create a hexahedral solid between two given faces.
12339         #  The missing faces will be built by creating the smallest ones.
12340         #  @param F1,F2 Two opposite faces for the hexahedral solid.
12341         #  @param theName Object name; when specified, this parameter is used
12342         #         for result publication in the study. Otherwise, if automatic
12343         #         publication is switched on, default value is used for result name.
12344         #
12345         #  @return New GEOM.GEOM_Object, containing the created solid.
12346         #
12347         #  @ref tui_building_by_blocks_page "Example 1"
12348         #  \n @ref swig_MakeHexa2Faces "Example 2"
12349         @ManageTransactions("BlocksOp")
12350         def MakeHexa2Faces(self, F1, F2, theName=None):
12351             """
12352             Create a hexahedral solid between two given faces.
12353             The missing faces will be built by creating the smallest ones.
12354
12355             Parameters:
12356                 F1,F2 Two opposite faces for the hexahedral solid.
12357                 theName Object name; when specified, this parameter is used
12358                         for result publication in the study. Otherwise, if automatic
12359                         publication is switched on, default value is used for result name.
12360
12361             Returns:
12362                 New GEOM.GEOM_Object, containing the created solid.
12363
12364             Example of usage:
12365                 solid1 = geompy.MakeHexa2Faces(qface1, qface2)
12366             """
12367             # Example: see GEOM_Spanner.py
12368             anObj = self.BlocksOp.MakeHexa2Faces(F1, F2)
12369             RaiseIfFailed("MakeHexa2Faces", self.BlocksOp)
12370             self._autoPublish(anObj, theName, "hexa")
12371             return anObj
12372
12373         # end of l3_blocks
12374         ## @}
12375
12376         ## @addtogroup l3_blocks_op
12377         ## @{
12378
12379         ## Get a vertex, found in the given shape by its coordinates.
12380         #  @param theShape Block or a compound of blocks.
12381         #  @param theX,theY,theZ Coordinates of the sought vertex.
12382         #  @param theEpsilon Maximum allowed distance between the resulting
12383         #                    vertex and point with the given coordinates.
12384         #  @param theName Object name; when specified, this parameter is used
12385         #         for result publication in the study. Otherwise, if automatic
12386         #         publication is switched on, default value is used for result name.
12387         #
12388         #  @return New GEOM.GEOM_Object, containing the found vertex.
12389         #
12390         #  @ref swig_GetPoint "Example"
12391         @ManageTransactions("BlocksOp")
12392         def GetPoint(self, theShape, theX, theY, theZ, theEpsilon, theName=None):
12393             """
12394             Get a vertex, found in the given shape by its coordinates.
12395
12396             Parameters:
12397                 theShape Block or a compound of blocks.
12398                 theX,theY,theZ Coordinates of the sought vertex.
12399                 theEpsilon Maximum allowed distance between the resulting
12400                            vertex and point with the given coordinates.
12401                 theName Object name; when specified, this parameter is used
12402                         for result publication in the study. Otherwise, if automatic
12403                         publication is switched on, default value is used for result name.
12404
12405             Returns:
12406                 New GEOM.GEOM_Object, containing the found vertex.
12407
12408             Example of usage:
12409                 pnt = geompy.GetPoint(shape, -50,  50,  50, 0.01)
12410             """
12411             # Example: see GEOM_TestOthers.py
12412             anObj = self.BlocksOp.GetPoint(theShape, theX, theY, theZ, theEpsilon)
12413             RaiseIfFailed("GetPoint", self.BlocksOp)
12414             self._autoPublish(anObj, theName, "vertex")
12415             return anObj
12416
12417         ## Find a vertex of the given shape, which has minimal distance to the given point.
12418         #  @param theShape Any shape.
12419         #  @param thePoint Point, close to the desired vertex.
12420         #  @param theName Object name; when specified, this parameter is used
12421         #         for result publication in the study. Otherwise, if automatic
12422         #         publication is switched on, default value is used for result name.
12423         #
12424         #  @return New GEOM.GEOM_Object, containing the found vertex.
12425         #
12426         #  @ref swig_GetVertexNearPoint "Example"
12427         @ManageTransactions("BlocksOp")
12428         def GetVertexNearPoint(self, theShape, thePoint, theName=None):
12429             """
12430             Find a vertex of the given shape, which has minimal distance to the given point.
12431
12432             Parameters:
12433                 theShape Any shape.
12434                 thePoint Point, close to the desired vertex.
12435                 theName Object name; when specified, this parameter is used
12436                         for result publication in the study. Otherwise, if automatic
12437                         publication is switched on, default value is used for result name.
12438
12439             Returns:
12440                 New GEOM.GEOM_Object, containing the found vertex.
12441
12442             Example of usage:
12443                 pmidle = geompy.MakeVertex(50, 0, 50)
12444                 edge1 = geompy.GetEdgeNearPoint(blocksComp, pmidle)
12445             """
12446             # Example: see GEOM_TestOthers.py
12447             anObj = self.BlocksOp.GetVertexNearPoint(theShape, thePoint)
12448             RaiseIfFailed("GetVertexNearPoint", self.BlocksOp)
12449             self._autoPublish(anObj, theName, "vertex")
12450             return anObj
12451
12452         ## Get an edge, found in the given shape by two given vertices.
12453         #  @param theShape Block or a compound of blocks.
12454         #  @param thePoint1,thePoint2 Points, close to the ends of the desired edge.
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 edge.
12460         #
12461         #  @ref swig_GetEdge "Example"
12462         @ManageTransactions("BlocksOp")
12463         def GetEdge(self, theShape, thePoint1, thePoint2, theName=None):
12464             """
12465             Get an edge, found in the given shape by two given vertices.
12466
12467             Parameters:
12468                 theShape Block or a compound of blocks.
12469                 thePoint1,thePoint2 Points, close to the ends of the desired edge.
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 edge.
12476             """
12477             # Example: see GEOM_Spanner.py
12478             anObj = self.BlocksOp.GetEdge(theShape, thePoint1, thePoint2)
12479             RaiseIfFailed("GetEdge", self.BlocksOp)
12480             self._autoPublish(anObj, theName, "edge")
12481             return anObj
12482
12483         ## Find an edge of the given shape, which has minimal distance to the given point.
12484         #  @param theShape Block or a compound of blocks.
12485         #  @param thePoint Point, close to the desired edge.
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 edge.
12491         #
12492         #  @ref swig_GetEdgeNearPoint "Example"
12493         @ManageTransactions("BlocksOp")
12494         def GetEdgeNearPoint(self, theShape, thePoint, theName=None):
12495             """
12496             Find an edge of the given shape, which has minimal distance to the given point.
12497
12498             Parameters:
12499                 theShape Block or a compound of blocks.
12500                 thePoint Point, close to the desired edge.
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 edge.
12507             """
12508             # Example: see GEOM_TestOthers.py
12509             anObj = self.BlocksOp.GetEdgeNearPoint(theShape, thePoint)
12510             RaiseIfFailed("GetEdgeNearPoint", self.BlocksOp)
12511             self._autoPublish(anObj, theName, "edge")
12512             return anObj
12513
12514         ## Returns a face, found in the given shape by four given corner vertices.
12515         #  @param theShape Block or a compound of blocks.
12516         #  @param thePoint1,thePoint2,thePoint3,thePoint4 Points, close to the corners of the desired face.
12517         #  @param theName Object name; when specified, this parameter is used
12518         #         for result publication in the study. Otherwise, if automatic
12519         #         publication is switched on, default value is used for result name.
12520         #
12521         #  @return New GEOM.GEOM_Object, containing the found face.
12522         #
12523         #  @ref swig_todo "Example"
12524         @ManageTransactions("BlocksOp")
12525         def GetFaceByPoints(self, theShape, thePoint1, thePoint2, thePoint3, thePoint4, theName=None):
12526             """
12527             Returns a face, found in the given shape by four given corner vertices.
12528
12529             Parameters:
12530                 theShape Block or a compound of blocks.
12531                 thePoint1,thePoint2,thePoint3,thePoint4 Points, close to the corners of the desired face.
12532                 theName Object name; when specified, this parameter is used
12533                         for result publication in the study. Otherwise, if automatic
12534                         publication is switched on, default value is used for result name.
12535
12536             Returns:
12537                 New GEOM.GEOM_Object, containing the found face.
12538             """
12539             # Example: see GEOM_Spanner.py
12540             anObj = self.BlocksOp.GetFaceByPoints(theShape, thePoint1, thePoint2, thePoint3, thePoint4)
12541             RaiseIfFailed("GetFaceByPoints", self.BlocksOp)
12542             self._autoPublish(anObj, theName, "face")
12543             return anObj
12544
12545         ## Get a face of block, found in the given shape by two given edges.
12546         #  @param theShape Block or a compound of blocks.
12547         #  @param theEdge1,theEdge2 Edges, close to the edges of the desired face.
12548         #  @param theName Object name; when specified, this parameter is used
12549         #         for result publication in the study. Otherwise, if automatic
12550         #         publication is switched on, default value is used for result name.
12551         #
12552         #  @return New GEOM.GEOM_Object, containing the found face.
12553         #
12554         #  @ref swig_todo "Example"
12555         @ManageTransactions("BlocksOp")
12556         def GetFaceByEdges(self, theShape, theEdge1, theEdge2, theName=None):
12557             """
12558             Get a face of block, found in the given shape by two given edges.
12559
12560             Parameters:
12561                 theShape Block or a compound of blocks.
12562                 theEdge1,theEdge2 Edges, close to the edges of the desired face.
12563                 theName Object name; when specified, this parameter is used
12564                         for result publication in the study. Otherwise, if automatic
12565                         publication is switched on, default value is used for result name.
12566
12567             Returns:
12568                 New GEOM.GEOM_Object, containing the found face.
12569             """
12570             # Example: see GEOM_Spanner.py
12571             anObj = self.BlocksOp.GetFaceByEdges(theShape, theEdge1, theEdge2)
12572             RaiseIfFailed("GetFaceByEdges", self.BlocksOp)
12573             self._autoPublish(anObj, theName, "face")
12574             return anObj
12575
12576         ## Find a face, opposite to the given one in the given block.
12577         #  @param theBlock Must be a hexahedral solid.
12578         #  @param theFace Face of \a theBlock, opposite to the desired face.
12579         #  @param theName Object name; when specified, this parameter is used
12580         #         for result publication in the study. Otherwise, if automatic
12581         #         publication is switched on, default value is used for result name.
12582         #
12583         #  @return New GEOM.GEOM_Object, containing the found face.
12584         #
12585         #  @ref swig_GetOppositeFace "Example"
12586         @ManageTransactions("BlocksOp")
12587         def GetOppositeFace(self, theBlock, theFace, theName=None):
12588             """
12589             Find a face, opposite to the given one in the given block.
12590
12591             Parameters:
12592                 theBlock Must be a hexahedral solid.
12593                 theFace Face of theBlock, opposite to the desired face.
12594                 theName Object name; when specified, this parameter is used
12595                         for result publication in the study. Otherwise, if automatic
12596                         publication is switched on, default value is used for result name.
12597
12598             Returns:
12599                 New GEOM.GEOM_Object, containing the found face.
12600             """
12601             # Example: see GEOM_Spanner.py
12602             anObj = self.BlocksOp.GetOppositeFace(theBlock, theFace)
12603             RaiseIfFailed("GetOppositeFace", self.BlocksOp)
12604             self._autoPublish(anObj, theName, "face")
12605             return anObj
12606
12607         ## Find a face of the given shape, which has minimal distance to the given point.
12608         #  @param theShape Block or a compound of blocks.
12609         #  @param thePoint Point, close to the desired face.
12610         #  @param theName Object name; when specified, this parameter is used
12611         #         for result publication in the study. Otherwise, if automatic
12612         #         publication is switched on, default value is used for result name.
12613         #
12614         #  @return New GEOM.GEOM_Object, containing the found face.
12615         #
12616         #  @ref swig_GetFaceNearPoint "Example"
12617         @ManageTransactions("BlocksOp")
12618         def GetFaceNearPoint(self, theShape, thePoint, theName=None):
12619             """
12620             Find a face of the given shape, which has minimal distance to the given point.
12621
12622             Parameters:
12623                 theShape Block or a compound of blocks.
12624                 thePoint Point, close to the desired face.
12625                 theName Object name; when specified, this parameter is used
12626                         for result publication in the study. Otherwise, if automatic
12627                         publication is switched on, default value is used for result name.
12628
12629             Returns:
12630                 New GEOM.GEOM_Object, containing the found face.
12631             """
12632             # Example: see GEOM_Spanner.py
12633             anObj = self.BlocksOp.GetFaceNearPoint(theShape, thePoint)
12634             RaiseIfFailed("GetFaceNearPoint", self.BlocksOp)
12635             self._autoPublish(anObj, theName, "face")
12636             return anObj
12637
12638         ## Find a face of block, whose outside normale has minimal angle with the given vector.
12639         #  @param theBlock Block or a compound of blocks.
12640         #  @param theVector Vector, close to the normale of the desired face.
12641         #  @param theName Object name; when specified, this parameter is used
12642         #         for result publication in the study. Otherwise, if automatic
12643         #         publication is switched on, default value is used for result name.
12644         #
12645         #  @return New GEOM.GEOM_Object, containing the found face.
12646         #
12647         #  @ref swig_todo "Example"
12648         @ManageTransactions("BlocksOp")
12649         def GetFaceByNormale(self, theBlock, theVector, theName=None):
12650             """
12651             Find a face of block, whose outside normale has minimal angle with the given vector.
12652
12653             Parameters:
12654                 theBlock Block or a compound of blocks.
12655                 theVector Vector, close to the normale of the desired face.
12656                 theName Object name; when specified, this parameter is used
12657                         for result publication in the study. Otherwise, if automatic
12658                         publication is switched on, default value is used for result name.
12659
12660             Returns:
12661                 New GEOM.GEOM_Object, containing the found face.
12662             """
12663             # Example: see GEOM_Spanner.py
12664             anObj = self.BlocksOp.GetFaceByNormale(theBlock, theVector)
12665             RaiseIfFailed("GetFaceByNormale", self.BlocksOp)
12666             self._autoPublish(anObj, theName, "face")
12667             return anObj
12668
12669         ## Find all sub-shapes of type \a theShapeType of the given shape,
12670         #  which have minimal distance to the given point.
12671         #  @param theShape Any shape.
12672         #  @param thePoint Point, close to the desired shape.
12673         #  @param theShapeType Defines what kind of sub-shapes is searched GEOM::shape_type
12674         #  @param theTolerance The tolerance for distances comparison. All shapes
12675         #                      with distances to the given point in interval
12676         #                      [minimal_distance, minimal_distance + theTolerance] will be gathered.
12677         #  @param theName Object name; when specified, this parameter is used
12678         #         for result publication in the study. Otherwise, if automatic
12679         #         publication is switched on, default value is used for result name.
12680         #
12681         #  @return New GEOM_Object, containing a group of all found shapes.
12682         #
12683         #  @ref swig_GetShapesNearPoint "Example"
12684         @ManageTransactions("BlocksOp")
12685         def GetShapesNearPoint(self, theShape, thePoint, theShapeType, theTolerance = 1e-07, theName=None):
12686             """
12687             Find all sub-shapes of type theShapeType of the given shape,
12688             which have minimal distance to the given point.
12689
12690             Parameters:
12691                 theShape Any shape.
12692                 thePoint Point, close to the desired shape.
12693                 theShapeType Defines what kind of sub-shapes is searched (see GEOM::shape_type)
12694                 theTolerance The tolerance for distances comparison. All shapes
12695                                 with distances to the given point in interval
12696                                 [minimal_distance, minimal_distance + theTolerance] will be gathered.
12697                 theName Object name; when specified, this parameter is used
12698                         for result publication in the study. Otherwise, if automatic
12699                         publication is switched on, default value is used for result name.
12700
12701             Returns:
12702                 New GEOM_Object, containing a group of all found shapes.
12703             """
12704             # Example: see GEOM_TestOthers.py
12705             anObj = self.BlocksOp.GetShapesNearPoint(theShape, thePoint, theShapeType, theTolerance)
12706             RaiseIfFailed("GetShapesNearPoint", self.BlocksOp)
12707             self._autoPublish(anObj, theName, "group")
12708             return anObj
12709
12710         # end of l3_blocks_op
12711         ## @}
12712
12713         ## @addtogroup l4_blocks_measure
12714         ## @{
12715
12716         ## Check, if the compound of blocks is given.
12717         #  To be considered as a compound of blocks, the
12718         #  given shape must satisfy the following conditions:
12719         #  - Each element of the compound should be a Block (6 faces).
12720         #  - Each face should be a quadrangle, i.e. it should have only 1 wire
12721         #       with 4 edges. If <VAR>theIsUseC1</VAR> is set to True and
12722         #       there are more than 4 edges in the only wire of a face,
12723         #       this face is considered to be quadrangle if it has 4 bounds
12724         #       (1 or more edge) of C1 continuity.
12725         #  - A connection between two Blocks should be an entire quadrangle face or an entire edge.
12726         #  - The compound should be connexe.
12727         #  - The glue between two quadrangle faces should be applied.
12728         #  @param theCompound The compound to check.
12729         #  @param theIsUseC1 Flag to check if there are 4 bounds on a face
12730         #         taking into account C1 continuity.
12731         #  @param theAngTolerance the angular tolerance to check if two neighbor
12732         #         edges are codirectional in the common vertex with this
12733         #         tolerance. This parameter is used only if
12734         #         <VAR>theIsUseC1</VAR> is set to True.
12735         #  @return TRUE, if the given shape is a compound of blocks.
12736         #  If theCompound is not valid, prints all discovered errors.
12737         #
12738         #  @ref tui_check_compound_of_blocks_page "Example 1"
12739         #  \n @ref swig_CheckCompoundOfBlocks "Example 2"
12740         @ManageTransactions("BlocksOp")
12741         def CheckCompoundOfBlocks(self,theCompound, theIsUseC1 = False,
12742                                   theAngTolerance = 1.e-12):
12743             """
12744             Check, if the compound of blocks is given.
12745             To be considered as a compound of blocks, the
12746             given shape must satisfy the following conditions:
12747             - Each element of the compound should be a Block (6 faces).
12748             - Each face should be a quadrangle, i.e. it should have only 1 wire
12749                  with 4 edges. If theIsUseC1 is set to True and
12750                  there are more than 4 edges in the only wire of a face,
12751                  this face is considered to be quadrangle if it has 4 bounds
12752                  (1 or more edge) of C1 continuity.
12753             - A connection between two Blocks should be an entire quadrangle face or an entire edge.
12754             - The compound should be connexe.
12755             - The glue between two quadrangle faces should be applied.
12756
12757             Parameters:
12758                 theCompound The compound to check.
12759                 theIsUseC1 Flag to check if there are 4 bounds on a face
12760                            taking into account C1 continuity.
12761                 theAngTolerance the angular tolerance to check if two neighbor
12762                            edges are codirectional in the common vertex with this
12763                            tolerance. This parameter is used only if
12764                            theIsUseC1 is set to True.
12765
12766             Returns:
12767                 TRUE, if the given shape is a compound of blocks.
12768                 If theCompound is not valid, prints all discovered errors.
12769             """
12770             # Example: see GEOM_Spanner.py
12771             aTolerance = -1.0
12772             if theIsUseC1:
12773                 aTolerance = theAngTolerance
12774             (IsValid, BCErrors) = self.BlocksOp.CheckCompoundOfBlocks(theCompound, aTolerance)
12775             RaiseIfFailed("CheckCompoundOfBlocks", self.BlocksOp)
12776             if IsValid == 0:
12777                 Descr = self.BlocksOp.PrintBCErrors(theCompound, BCErrors)
12778                 print(Descr)
12779             return IsValid
12780
12781         ## Retrieve all non blocks solids and faces from \a theShape.
12782         #  @param theShape The shape to explore.
12783         #  @param theIsUseC1 Flag to check if there are 4 bounds on a face
12784         #         taking into account C1 continuity.
12785         #  @param theAngTolerance the angular tolerance to check if two neighbor
12786         #         edges are codirectional in the common vertex with this
12787         #         tolerance. This parameter is used only if
12788         #         <VAR>theIsUseC1</VAR> is set to True.
12789         #  @param theName Object name; when specified, this parameter is used
12790         #         for result publication in the study. Otherwise, if automatic
12791         #         publication is switched on, default value is used for result name.
12792         #
12793         #  @return A tuple of two GEOM_Objects. The first object is a group of all
12794         #          non block solids (= not 6 faces, or with 6 faces, but with the
12795         #          presence of non-quadrangular faces). The second object is a
12796         #          group of all non quadrangular faces (= faces with more then
12797         #          1 wire or, if <VAR>theIsUseC1</VAR> is set to True, faces
12798         #          with 1 wire with not 4 edges that do not form 4 bounds of
12799         #          C1 continuity).
12800         #
12801         #  @ref tui_get_non_blocks_page "Example 1"
12802         #  \n @ref swig_GetNonBlocks "Example 2"
12803         @ManageTransactions("BlocksOp")
12804         def GetNonBlocks (self, theShape, theIsUseC1 = False,
12805                           theAngTolerance = 1.e-12, theName=None):
12806             """
12807             Retrieve all non blocks solids and faces from theShape.
12808
12809             Parameters:
12810                 theShape The shape to explore.
12811                 theIsUseC1 Flag to check if there are 4 bounds on a face
12812                            taking into account C1 continuity.
12813                 theAngTolerance the angular tolerance to check if two neighbor
12814                            edges are codirectional in the common vertex with this
12815                            tolerance. This parameter is used only if
12816                            theIsUseC1 is set to True.
12817                 theName Object name; when specified, this parameter is used
12818                         for result publication in the study. Otherwise, if automatic
12819                         publication is switched on, default value is used for result name.
12820
12821             Returns:
12822                 A tuple of two GEOM_Objects. The first object is a group of all
12823                 non block solids (= not 6 faces, or with 6 faces, but with the
12824                 presence of non-quadrangular faces). The second object is a
12825                 group of all non quadrangular faces (= faces with more then
12826                 1 wire or, if <VAR>theIsUseC1</VAR> is set to True, faces
12827                 with 1 wire with not 4 edges that do not form 4 bounds of
12828                 C1 continuity).
12829
12830             Usage:
12831                 (res_sols, res_faces) = geompy.GetNonBlocks(myShape1)
12832             """
12833             # Example: see GEOM_Spanner.py
12834             aTolerance = -1.0
12835             if theIsUseC1:
12836                 aTolerance = theAngTolerance
12837             aTuple = self.BlocksOp.GetNonBlocks(theShape, aTolerance)
12838             RaiseIfFailed("GetNonBlocks", self.BlocksOp)
12839             self._autoPublish(aTuple, theName, ("groupNonHexas", "groupNonQuads"))
12840             return aTuple
12841
12842         ## Remove all seam and degenerated edges from \a theShape.
12843         #  Unite faces and edges, sharing one surface. It means that
12844         #  this faces must have references to one C++ surface object (handle).
12845         #  @param theShape The compound or single solid to remove irregular edges from.
12846         #  @param doUnionFaces If True, then unite faces. If False (the default value),
12847         #         do not unite faces.
12848         #  @param theName Object name; when specified, this parameter is used
12849         #         for result publication in the study. Otherwise, if automatic
12850         #         publication is switched on, default value is used for result name.
12851         #
12852         #  @return Improved shape.
12853         #
12854         #  @ref swig_RemoveExtraEdges "Example"
12855         @ManageTransactions("BlocksOp")
12856         def RemoveExtraEdges(self, theShape, doUnionFaces=False, theName=None):
12857             """
12858             Remove all seam and degenerated edges from theShape.
12859             Unite faces and edges, sharing one surface. It means that
12860             this faces must have references to one C++ surface object (handle).
12861
12862             Parameters:
12863                 theShape The compound or single solid to remove irregular edges from.
12864                 doUnionFaces If True, then unite faces. If False (the default value),
12865                              do not unite faces.
12866                 theName Object name; when specified, this parameter is used
12867                         for result publication in the study. Otherwise, if automatic
12868                         publication is switched on, default value is used for result name.
12869
12870             Returns:
12871                 Improved shape.
12872             """
12873             # Example: see GEOM_TestOthers.py
12874             nbFacesOptimum = -1 # -1 means do not unite faces
12875             if doUnionFaces is True: nbFacesOptimum = 0 # 0 means unite faces
12876             anObj = self.BlocksOp.RemoveExtraEdges(theShape, nbFacesOptimum)
12877             RaiseIfFailed("RemoveExtraEdges", self.BlocksOp)
12878             self._autoPublish(anObj, theName, "removeExtraEdges")
12879             return anObj
12880
12881         ## Performs union faces of \a theShape
12882         #  Unite faces sharing one surface. It means that
12883         #  these faces must have references to one C++ surface object (handle).
12884         #  @param theShape The compound or single solid that contains faces
12885         #         to perform union.
12886         #  @param theName Object name; when specified, this parameter is used
12887         #         for result publication in the study. Otherwise, if automatic
12888         #         publication is switched on, default value is used for result name.
12889         #
12890         #  @return Improved shape.
12891         #
12892         #  @ref swig_UnionFaces "Example"
12893         @ManageTransactions("BlocksOp")
12894         def UnionFaces(self, theShape, theName=None):
12895             """
12896             Performs union faces of theShape.
12897             Unite faces sharing one surface. It means that
12898             these faces must have references to one C++ surface object (handle).
12899
12900             Parameters:
12901                 theShape The compound or single solid that contains faces
12902                          to perform union.
12903                 theName Object name; when specified, this parameter is used
12904                         for result publication in the study. Otherwise, if automatic
12905                         publication is switched on, default value is used for result name.
12906
12907             Returns:
12908                 Improved shape.
12909             """
12910             # Example: see GEOM_TestOthers.py
12911             anObj = self.BlocksOp.UnionFaces(theShape)
12912             RaiseIfFailed("UnionFaces", self.BlocksOp)
12913             self._autoPublish(anObj, theName, "unionFaces")
12914             return anObj
12915
12916         ## Check, if the given shape is a blocks compound.
12917         #  Fix all detected errors.
12918         #    \note Single block can be also fixed by this method.
12919         #  @param theShape The compound to check and improve.
12920         #  @param theName Object name; when specified, this parameter is used
12921         #         for result publication in the study. Otherwise, if automatic
12922         #         publication is switched on, default value is used for result name.
12923         #
12924         #  @return Improved compound.
12925         #
12926         #  @ref swig_CheckAndImprove "Example"
12927         @ManageTransactions("BlocksOp")
12928         def CheckAndImprove(self, theShape, theName=None):
12929             """
12930             Check, if the given shape is a blocks compound.
12931             Fix all detected errors.
12932
12933             Note:
12934                 Single block can be also fixed by this method.
12935
12936             Parameters:
12937                 theShape The compound to check and improve.
12938                 theName Object name; when specified, this parameter is used
12939                         for result publication in the study. Otherwise, if automatic
12940                         publication is switched on, default value is used for result name.
12941
12942             Returns:
12943                 Improved compound.
12944             """
12945             # Example: see GEOM_TestOthers.py
12946             anObj = self.BlocksOp.CheckAndImprove(theShape)
12947             RaiseIfFailed("CheckAndImprove", self.BlocksOp)
12948             self._autoPublish(anObj, theName, "improved")
12949             return anObj
12950
12951         # end of l4_blocks_measure
12952         ## @}
12953
12954         ## @addtogroup l3_blocks_op
12955         ## @{
12956
12957         ## Get all the blocks, contained in the given compound.
12958         #  @param theCompound The compound to explode.
12959         #  @param theMinNbFaces If solid has lower number of faces, it is not a block.
12960         #  @param theMaxNbFaces If solid has higher number of faces, it is not a block.
12961         #  @param theName Object name; when specified, this parameter is used
12962         #         for result publication in the study. Otherwise, if automatic
12963         #         publication is switched on, default value is used for result name.
12964         #
12965         #  @note If theMaxNbFaces = 0, the maximum number of faces is not restricted.
12966         #
12967         #  @return List of GEOM.GEOM_Object, containing the retrieved blocks.
12968         #
12969         #  @ref tui_explode_on_blocks "Example 1"
12970         #  \n @ref swig_MakeBlockExplode "Example 2"
12971         @ManageTransactions("BlocksOp")
12972         def MakeBlockExplode(self, theCompound, theMinNbFaces, theMaxNbFaces, theName=None):
12973             """
12974             Get all the blocks, contained in the given compound.
12975
12976             Parameters:
12977                 theCompound The compound to explode.
12978                 theMinNbFaces If solid has lower number of faces, it is not a block.
12979                 theMaxNbFaces If solid has higher number of faces, it is not a block.
12980                 theName Object name; when specified, this parameter is used
12981                         for result publication in the study. Otherwise, if automatic
12982                         publication is switched on, default value is used for result name.
12983
12984             Note:
12985                 If theMaxNbFaces = 0, the maximum number of faces is not restricted.
12986
12987             Returns:
12988                 List of GEOM.GEOM_Object, containing the retrieved blocks.
12989             """
12990             # Example: see GEOM_TestOthers.py
12991             theMinNbFaces,theMaxNbFaces,Parameters = ParseParameters(theMinNbFaces,theMaxNbFaces)
12992             aList = self.BlocksOp.ExplodeCompoundOfBlocks(theCompound, theMinNbFaces, theMaxNbFaces)
12993             RaiseIfFailed("ExplodeCompoundOfBlocks", self.BlocksOp)
12994             for anObj in aList:
12995                 anObj.SetParameters(Parameters)
12996                 pass
12997             self._autoPublish(aList, theName, "block")
12998             return aList
12999
13000         ## Find block, containing the given point inside its volume or on boundary.
13001         #  @param theCompound Compound, to find block in.
13002         #  @param thePoint Point, close to the desired block. If the point lays on
13003         #         boundary between some blocks, we return block with nearest center.
13004         #  @param theName Object name; when specified, this parameter is used
13005         #         for result publication in the study. Otherwise, if automatic
13006         #         publication is switched on, default value is used for result name.
13007         #
13008         #  @return New GEOM.GEOM_Object, containing the found block.
13009         #
13010         #  @ref swig_todo "Example"
13011         @ManageTransactions("BlocksOp")
13012         def GetBlockNearPoint(self, theCompound, thePoint, theName=None):
13013             """
13014             Find block, containing the given point inside its volume or on boundary.
13015
13016             Parameters:
13017                 theCompound Compound, to find block in.
13018                 thePoint Point, close to the desired block. If the point lays on
13019                          boundary between some blocks, we return block with nearest center.
13020                 theName Object name; when specified, this parameter is used
13021                         for result publication in the study. Otherwise, if automatic
13022                         publication is switched on, default value is used for result name.
13023
13024             Returns:
13025                 New GEOM.GEOM_Object, containing the found block.
13026             """
13027             # Example: see GEOM_Spanner.py
13028             anObj = self.BlocksOp.GetBlockNearPoint(theCompound, thePoint)
13029             RaiseIfFailed("GetBlockNearPoint", self.BlocksOp)
13030             self._autoPublish(anObj, theName, "block")
13031             return anObj
13032
13033         ## Find block, containing all the elements, passed as the parts, or maximum quantity of them.
13034         #  @param theCompound Compound, to find block in.
13035         #  @param theParts List of faces and/or edges and/or vertices to be parts of the found block.
13036         #  @param theName Object name; when specified, this parameter is used
13037         #         for result publication in the study. Otherwise, if automatic
13038         #         publication is switched on, default value is used for result name.
13039         #
13040         #  @return New GEOM.GEOM_Object, containing the found block.
13041         #
13042         #  @ref swig_GetBlockByParts "Example"
13043         @ManageTransactions("BlocksOp")
13044         def GetBlockByParts(self, theCompound, theParts, theName=None):
13045             """
13046              Find block, containing all the elements, passed as the parts, or maximum quantity of them.
13047
13048              Parameters:
13049                 theCompound Compound, to find block in.
13050                 theParts List of faces and/or edges and/or vertices to be parts of the found block.
13051                 theName Object name; when specified, this parameter is used
13052                         for result publication in the study. Otherwise, if automatic
13053                         publication is switched on, default value is used for result name.
13054
13055             Returns:
13056                 New GEOM_Object, containing the found block.
13057             """
13058             # Example: see GEOM_TestOthers.py
13059             anObj = self.BlocksOp.GetBlockByParts(theCompound, theParts)
13060             RaiseIfFailed("GetBlockByParts", self.BlocksOp)
13061             self._autoPublish(anObj, theName, "block")
13062             return anObj
13063
13064         ## Return all blocks, containing all the elements, passed as the parts.
13065         #  @param theCompound Compound, to find blocks in.
13066         #  @param theParts List of faces and/or edges and/or vertices to be parts of the found blocks.
13067         #  @param theName Object name; when specified, this parameter is used
13068         #         for result publication in the study. Otherwise, if automatic
13069         #         publication is switched on, default value is used for result name.
13070         #
13071         #  @return List of GEOM.GEOM_Object, containing the found blocks.
13072         #
13073         #  @ref swig_todo "Example"
13074         @ManageTransactions("BlocksOp")
13075         def GetBlocksByParts(self, theCompound, theParts, theName=None):
13076             """
13077             Return all blocks, containing all the elements, passed as the parts.
13078
13079             Parameters:
13080                 theCompound Compound, to find blocks in.
13081                 theParts List of faces and/or edges and/or vertices to be parts of the found blocks.
13082                 theName Object name; when specified, this parameter is used
13083                         for result publication in the study. Otherwise, if automatic
13084                         publication is switched on, default value is used for result name.
13085
13086             Returns:
13087                 List of GEOM.GEOM_Object, containing the found blocks.
13088             """
13089             # Example: see GEOM_Spanner.py
13090             aList = self.BlocksOp.GetBlocksByParts(theCompound, theParts)
13091             RaiseIfFailed("GetBlocksByParts", self.BlocksOp)
13092             self._autoPublish(aList, theName, "block")
13093             return aList
13094
13095         ## Multi-transformate block and glue the result.
13096         #  Transformation is defined so, as to superpose direction faces.
13097         #  @param Block Hexahedral solid to be multi-transformed.
13098         #  @param DirFace1 ID of First direction face.
13099         #  @param DirFace2 ID of Second direction face.
13100         #  @param NbTimes Quantity of transformations to be done.
13101         #  @param theName Object name; when specified, this parameter is used
13102         #         for result publication in the study. Otherwise, if automatic
13103         #         publication is switched on, default value is used for result name.
13104         #
13105         #  @note Unique ID of sub-shape can be obtained, using method GetSubShapeID().
13106         #
13107         #  @return New GEOM.GEOM_Object, containing the result shape.
13108         #
13109         #  @ref tui_multi_transformation "Example"
13110         @ManageTransactions("BlocksOp")
13111         def MakeMultiTransformation1D(self, Block, DirFace1, DirFace2, NbTimes, theName=None):
13112             """
13113             Multi-transformate block and glue the result.
13114             Transformation is defined so, as to superpose direction faces.
13115
13116             Parameters:
13117                 Block Hexahedral solid to be multi-transformed.
13118                 DirFace1 ID of First direction face.
13119                 DirFace2 ID of Second direction face.
13120                 NbTimes Quantity of transformations to be done.
13121                 theName Object name; when specified, this parameter is used
13122                         for result publication in the study. Otherwise, if automatic
13123                         publication is switched on, default value is used for result name.
13124
13125             Note:
13126                 Unique ID of sub-shape can be obtained, using method GetSubShapeID().
13127
13128             Returns:
13129                 New GEOM.GEOM_Object, containing the result shape.
13130             """
13131             # Example: see GEOM_Spanner.py
13132             DirFace1,DirFace2,NbTimes,Parameters = ParseParameters(DirFace1,DirFace2,NbTimes)
13133             anObj = self.BlocksOp.MakeMultiTransformation1D(Block, DirFace1, DirFace2, NbTimes)
13134             RaiseIfFailed("MakeMultiTransformation1D", self.BlocksOp)
13135             anObj.SetParameters(Parameters)
13136             self._autoPublish(anObj, theName, "transformed")
13137             return anObj
13138
13139         ## Multi-transformate block and glue the result.
13140         #  @param Block Hexahedral solid to be multi-transformed.
13141         #  @param DirFace1U,DirFace2U IDs of Direction faces for the first transformation.
13142         #  @param DirFace1V,DirFace2V IDs of Direction faces for the second transformation.
13143         #  @param NbTimesU,NbTimesV Quantity of transformations to be done.
13144         #  @param theName Object name; when specified, this parameter is used
13145         #         for result publication in the study. Otherwise, if automatic
13146         #         publication is switched on, default value is used for result name.
13147         #
13148         #  @return New GEOM.GEOM_Object, containing the result shape.
13149         #
13150         #  @ref tui_multi_transformation "Example"
13151         @ManageTransactions("BlocksOp")
13152         def MakeMultiTransformation2D(self, Block, DirFace1U, DirFace2U, NbTimesU,
13153                                       DirFace1V, DirFace2V, NbTimesV, theName=None):
13154             """
13155             Multi-transformate block and glue the result.
13156
13157             Parameters:
13158                 Block Hexahedral solid to be multi-transformed.
13159                 DirFace1U,DirFace2U IDs of Direction faces for the first transformation.
13160                 DirFace1V,DirFace2V IDs of Direction faces for the second transformation.
13161                 NbTimesU,NbTimesV Quantity of transformations to be done.
13162                 theName Object name; when specified, this parameter is used
13163                         for result publication in the study. Otherwise, if automatic
13164                         publication is switched on, default value is used for result name.
13165
13166             Returns:
13167                 New GEOM.GEOM_Object, containing the result shape.
13168             """
13169             # Example: see GEOM_Spanner.py
13170             DirFace1U,DirFace2U,NbTimesU,DirFace1V,DirFace2V,NbTimesV,Parameters = ParseParameters(
13171               DirFace1U,DirFace2U,NbTimesU,DirFace1V,DirFace2V,NbTimesV)
13172             anObj = self.BlocksOp.MakeMultiTransformation2D(Block, DirFace1U, DirFace2U, NbTimesU,
13173                                                             DirFace1V, DirFace2V, NbTimesV)
13174             RaiseIfFailed("MakeMultiTransformation2D", self.BlocksOp)
13175             anObj.SetParameters(Parameters)
13176             self._autoPublish(anObj, theName, "transformed")
13177             return anObj
13178
13179         ## Build all possible propagation groups.
13180         #  Propagation group is a set of all edges, opposite to one (main)
13181         #  edge of this group directly or through other opposite edges.
13182         #  Notion of Opposite Edge make sense only on quadrangle face.
13183         #  @param theShape Shape to build propagation groups on.
13184         #  @param theName Object name; when specified, this parameter is used
13185         #         for result publication in the study. Otherwise, if automatic
13186         #         publication is switched on, default value is used for result name.
13187         #
13188         #  @return List of GEOM.GEOM_Object, each of them is a propagation group.
13189         #
13190         #  @ref swig_Propagate "Example"
13191         @ManageTransactions("BlocksOp")
13192         def Propagate(self, theShape, theName=None):
13193             """
13194             Build all possible propagation groups.
13195             Propagation group is a set of all edges, opposite to one (main)
13196             edge of this group directly or through other opposite edges.
13197             Notion of Opposite Edge make sense only on quadrangle face.
13198
13199             Parameters:
13200                 theShape Shape to build propagation groups on.
13201                 theName Object name; when specified, this parameter is used
13202                         for result publication in the study. Otherwise, if automatic
13203                         publication is switched on, default value is used for result name.
13204
13205             Returns:
13206                 List of GEOM.GEOM_Object, each of them is a propagation group.
13207             """
13208             # Example: see GEOM_TestOthers.py
13209             listChains = self.BlocksOp.Propagate(theShape)
13210             RaiseIfFailed("Propagate", self.BlocksOp)
13211             self._autoPublish(listChains, theName, "propagate")
13212             return listChains
13213
13214         # end of l3_blocks_op
13215         ## @}
13216
13217         ## @addtogroup l3_groups
13218         ## @{
13219
13220         ## Creates a new group which will store sub-shapes of theMainShape
13221         #  @param theMainShape is a GEOM object on which the group is selected
13222         #  @param theShapeType defines a shape type of the group (see GEOM::shape_type)
13223         #  @param theName Object name; when specified, this parameter is used
13224         #         for result publication in the study. Otherwise, if automatic
13225         #         publication is switched on, default value is used for result name.
13226         #
13227         #  @return a newly created GEOM group (GEOM.GEOM_Object)
13228         #
13229         #  @ref tui_working_with_groups_page "Example 1"
13230         #  \n @ref swig_CreateGroup "Example 2"
13231         @ManageTransactions("GroupOp")
13232         def CreateGroup(self, theMainShape, theShapeType, theName=None):
13233             """
13234             Creates a new group which will store sub-shapes of theMainShape
13235
13236             Parameters:
13237                theMainShape is a GEOM object on which the group is selected
13238                theShapeType defines a shape type of the group:"COMPOUND", "COMPSOLID",
13239                             "SOLID", "SHELL", "FACE", "WIRE", "EDGE", "VERTEX", "SHAPE".
13240                 theName Object name; when specified, this parameter is used
13241                         for result publication in the study. Otherwise, if automatic
13242                         publication is switched on, default value is used for result name.
13243
13244             Returns:
13245                a newly created GEOM group
13246
13247             Example of usage:
13248                 group = geompy.CreateGroup(Box, geompy.ShapeType["FACE"])
13249
13250             """
13251             # Example: see GEOM_TestOthers.py
13252             anObj = self.GroupOp.CreateGroup(theMainShape, theShapeType)
13253             RaiseIfFailed("CreateGroup", self.GroupOp)
13254             self._autoPublish(anObj, theName, "group")
13255             return anObj
13256
13257         ## Adds a sub-object with ID theSubShapeId to the group
13258         #  @param theGroup is a GEOM group to which the new sub-shape is added
13259         #  @param theSubShapeID is a sub-shape ID in the main object.
13260         #  \note Use method GetSubShapeID() to get an unique ID of the sub-shape
13261         #
13262         #  @ref tui_working_with_groups_page "Example"
13263         @ManageTransactions("GroupOp")
13264         def AddObject(self,theGroup, theSubShapeID):
13265             """
13266             Adds a sub-object with ID theSubShapeId to the group
13267
13268             Parameters:
13269                 theGroup       is a GEOM group to which the new sub-shape is added
13270                 theSubShapeID  is a sub-shape ID in the main object.
13271
13272             Note:
13273                 Use method GetSubShapeID() to get an unique ID of the sub-shape
13274             """
13275             # Example: see GEOM_TestOthers.py
13276             self.GroupOp.AddObject(theGroup, theSubShapeID)
13277             if self.GroupOp.GetErrorCode() != "PAL_ELEMENT_ALREADY_PRESENT":
13278                 RaiseIfFailed("AddObject", self.GroupOp)
13279                 pass
13280             pass
13281
13282         ## Removes a sub-object with ID \a theSubShapeId from the group
13283         #  @param theGroup is a GEOM group from which the new sub-shape is removed
13284         #  @param theSubShapeID is a sub-shape ID in the main object.
13285         #  \note Use method GetSubShapeID() to get an unique ID of the sub-shape
13286         #
13287         #  @ref tui_working_with_groups_page "Example"
13288         @ManageTransactions("GroupOp")
13289         def RemoveObject(self,theGroup, theSubShapeID):
13290             """
13291             Removes a sub-object with ID theSubShapeId from the group
13292
13293             Parameters:
13294                 theGroup is a GEOM group from which the new sub-shape is removed
13295                 theSubShapeID is a sub-shape ID in the main object.
13296
13297             Note:
13298                 Use method GetSubShapeID() to get an unique ID of the sub-shape
13299             """
13300             # Example: see GEOM_TestOthers.py
13301             self.GroupOp.RemoveObject(theGroup, theSubShapeID)
13302             RaiseIfFailed("RemoveObject", self.GroupOp)
13303             pass
13304
13305         ## Adds to the group all the given shapes. No errors, if some shapes are already included.
13306         #  @param theGroup is a GEOM group to which the new sub-shapes are added.
13307         #  @param theSubShapes is a list of sub-shapes to be added.
13308         #
13309         #  @ref tui_working_with_groups_page "Example"
13310         @ManageTransactions("GroupOp")
13311         def UnionList (self,theGroup, theSubShapes):
13312             """
13313             Adds to the group all the given shapes. No errors, if some shapes are already included.
13314
13315             Parameters:
13316                 theGroup is a GEOM group to which the new sub-shapes are added.
13317                 theSubShapes is a list of sub-shapes to be added.
13318             """
13319             # Example: see GEOM_TestOthers.py
13320             self.GroupOp.UnionList(theGroup, theSubShapes)
13321             RaiseIfFailed("UnionList", self.GroupOp)
13322             pass
13323
13324         ## Adds to the group all the given shapes. No errors, if some shapes are already included.
13325         #  @param theGroup is a GEOM group to which the new sub-shapes are added.
13326         #  @param theSubShapes is a list of indices of sub-shapes to be added.
13327         #
13328         #  @ref swig_UnionIDs "Example"
13329         @ManageTransactions("GroupOp")
13330         def UnionIDs(self,theGroup, theSubShapes):
13331             """
13332             Adds to the group all the given shapes. No errors, if some shapes are already included.
13333
13334             Parameters:
13335                 theGroup is a GEOM group to which the new sub-shapes are added.
13336                 theSubShapes is a list of indices of sub-shapes to be added.
13337             """
13338             # Example: see GEOM_TestOthers.py
13339             self.GroupOp.UnionIDs(theGroup, theSubShapes)
13340             RaiseIfFailed("UnionIDs", self.GroupOp)
13341             pass
13342
13343         ## Removes from the group all the given shapes. No errors, if some shapes are not included.
13344         #  @param theGroup is a GEOM group from which the sub-shapes are removed.
13345         #  @param theSubShapes is a list of sub-shapes to be removed.
13346         #
13347         #  @ref tui_working_with_groups_page "Example"
13348         @ManageTransactions("GroupOp")
13349         def DifferenceList (self,theGroup, theSubShapes):
13350             """
13351             Removes from the group all the given shapes. No errors, if some shapes are not included.
13352
13353             Parameters:
13354                 theGroup is a GEOM group from which the sub-shapes are removed.
13355                 theSubShapes is a list of sub-shapes to be removed.
13356             """
13357             # Example: see GEOM_TestOthers.py
13358             self.GroupOp.DifferenceList(theGroup, theSubShapes)
13359             RaiseIfFailed("DifferenceList", self.GroupOp)
13360             pass
13361
13362         ## Removes from the group all the given shapes. No errors, if some shapes are not included.
13363         #  @param theGroup is a GEOM group from which the sub-shapes are removed.
13364         #  @param theSubShapes is a list of indices of sub-shapes to be removed.
13365         #
13366         #  @ref swig_DifferenceIDs "Example"
13367         @ManageTransactions("GroupOp")
13368         def DifferenceIDs(self,theGroup, theSubShapes):
13369             """
13370             Removes from the group all the given shapes. No errors, if some shapes are not included.
13371
13372             Parameters:
13373                 theGroup is a GEOM group from which the sub-shapes are removed.
13374                 theSubShapes is a list of indices of sub-shapes to be removed.
13375             """
13376             # Example: see GEOM_TestOthers.py
13377             self.GroupOp.DifferenceIDs(theGroup, theSubShapes)
13378             RaiseIfFailed("DifferenceIDs", self.GroupOp)
13379             pass
13380
13381         ## Union of two groups.
13382         #  New group is created. It will contain all entities
13383         #  which are present in groups theGroup1 and theGroup2.
13384         #  @param theGroup1, theGroup2 are the initial GEOM groups
13385         #                              to create the united group from.
13386         #  @param theName Object name; when specified, this parameter is used
13387         #         for result publication in the study. Otherwise, if automatic
13388         #         publication is switched on, default value is used for result name.
13389         #
13390         #  @return a newly created GEOM group.
13391         #
13392         #  @ref tui_union_groups_anchor "Example"
13393         @ManageTransactions("GroupOp")
13394         def UnionGroups (self, theGroup1, theGroup2, theName=None):
13395             """
13396             Union of two groups.
13397             New group is created. It will contain all entities
13398             which are present in groups theGroup1 and theGroup2.
13399
13400             Parameters:
13401                 theGroup1, theGroup2 are the initial GEOM groups
13402                                      to create the united group from.
13403                 theName Object name; when specified, this parameter is used
13404                         for result publication in the study. Otherwise, if automatic
13405                         publication is switched on, default value is used for result name.
13406
13407             Returns:
13408                 a newly created GEOM group.
13409             """
13410             # Example: see GEOM_TestOthers.py
13411             aGroup = self.GroupOp.UnionGroups(theGroup1, theGroup2)
13412             RaiseIfFailed("UnionGroups", self.GroupOp)
13413             self._autoPublish(aGroup, theName, "group")
13414             return aGroup
13415
13416         ## Intersection of two groups.
13417         #  New group is created. It will contain only those entities
13418         #  which are present in both groups theGroup1 and theGroup2.
13419         #  @param theGroup1, theGroup2 are the initial GEOM groups to get common part of.
13420         #  @param theName Object name; when specified, this parameter is used
13421         #         for result publication in the study. Otherwise, if automatic
13422         #         publication is switched on, default value is used for result name.
13423         #
13424         #  @return a newly created GEOM group.
13425         #
13426         #  @ref tui_intersect_groups_anchor "Example"
13427         @ManageTransactions("GroupOp")
13428         def IntersectGroups (self, theGroup1, theGroup2, theName=None):
13429             """
13430             Intersection of two groups.
13431             New group is created. It will contain only those entities
13432             which are present in both groups theGroup1 and theGroup2.
13433
13434             Parameters:
13435                 theGroup1, theGroup2 are the initial GEOM groups to get common part of.
13436                 theName Object name; when specified, this parameter is used
13437                         for result publication in the study. Otherwise, if automatic
13438                         publication is switched on, default value is used for result name.
13439
13440             Returns:
13441                 a newly created GEOM group.
13442             """
13443             # Example: see GEOM_TestOthers.py
13444             aGroup = self.GroupOp.IntersectGroups(theGroup1, theGroup2)
13445             RaiseIfFailed("IntersectGroups", self.GroupOp)
13446             self._autoPublish(aGroup, theName, "group")
13447             return aGroup
13448
13449         ## Cut of two groups.
13450         #  New group is created. It will contain entities which are
13451         #  present in group theGroup1 but are not present in group theGroup2.
13452         #  @param theGroup1 is a GEOM group to include elements of.
13453         #  @param theGroup2 is a GEOM group to exclude elements of.
13454         #  @param theName Object name; when specified, this parameter is used
13455         #         for result publication in the study. Otherwise, if automatic
13456         #         publication is switched on, default value is used for result name.
13457         #
13458         #  @return a newly created GEOM group.
13459         #
13460         #  @ref tui_cut_groups_anchor "Example"
13461         @ManageTransactions("GroupOp")
13462         def CutGroups (self, theGroup1, theGroup2, theName=None):
13463             """
13464             Cut of two groups.
13465             New group is created. It will contain entities which are
13466             present in group theGroup1 but are not present in group theGroup2.
13467
13468             Parameters:
13469                 theGroup1 is a GEOM group to include elements of.
13470                 theGroup2 is a GEOM group to exclude elements of.
13471                 theName Object name; when specified, this parameter is used
13472                         for result publication in the study. Otherwise, if automatic
13473                         publication is switched on, default value is used for result name.
13474
13475             Returns:
13476                 a newly created GEOM group.
13477             """
13478             # Example: see GEOM_TestOthers.py
13479             aGroup = self.GroupOp.CutGroups(theGroup1, theGroup2)
13480             RaiseIfFailed("CutGroups", self.GroupOp)
13481             self._autoPublish(aGroup, theName, "group")
13482             return aGroup
13483
13484         ## Union of list of groups.
13485         #  New group is created. It will contain all entities that are
13486         #  present in groups listed in theGList.
13487         #  @param theGList is a list of GEOM groups to create the united group from.
13488         #  @param theName Object name; when specified, this parameter is used
13489         #         for result publication in the study. Otherwise, if automatic
13490         #         publication is switched on, default value is used for result name.
13491         #
13492         #  @return a newly created GEOM group.
13493         #
13494         #  @ref tui_union_groups_anchor "Example"
13495         @ManageTransactions("GroupOp")
13496         def UnionListOfGroups (self, theGList, theName=None):
13497             """
13498             Union of list of groups.
13499             New group is created. It will contain all entities that are
13500             present in groups listed in theGList.
13501
13502             Parameters:
13503                 theGList is a list of GEOM groups to create the united group from.
13504                 theName Object name; when specified, this parameter is used
13505                         for result publication in the study. Otherwise, if automatic
13506                         publication is switched on, default value is used for result name.
13507
13508             Returns:
13509                 a newly created GEOM group.
13510             """
13511             # Example: see GEOM_TestOthers.py
13512             aGroup = self.GroupOp.UnionListOfGroups(theGList)
13513             RaiseIfFailed("UnionListOfGroups", self.GroupOp)
13514             self._autoPublish(aGroup, theName, "group")
13515             return aGroup
13516
13517         ## Cut of lists of groups.
13518         #  New group is created. It will contain only entities
13519         #  which are present in groups listed in theGList.
13520         #  @param theGList is a list of GEOM groups to include elements of.
13521         #  @param theName Object name; when specified, this parameter is used
13522         #         for result publication in the study. Otherwise, if automatic
13523         #         publication is switched on, default value is used for result name.
13524         #
13525         #  @return a newly created GEOM group.
13526         #
13527         #  @ref tui_intersect_groups_anchor "Example"
13528         @ManageTransactions("GroupOp")
13529         def IntersectListOfGroups (self, theGList, theName=None):
13530             """
13531             Cut of lists of groups.
13532             New group is created. It will contain only entities
13533             which are present in groups listed in theGList.
13534
13535             Parameters:
13536                 theGList is a list of GEOM groups to include elements of.
13537                 theName Object name; when specified, this parameter is used
13538                         for result publication in the study. Otherwise, if automatic
13539                         publication is switched on, default value is used for result name.
13540
13541             Returns:
13542                 a newly created GEOM group.
13543             """
13544             # Example: see GEOM_TestOthers.py
13545             aGroup = self.GroupOp.IntersectListOfGroups(theGList)
13546             RaiseIfFailed("IntersectListOfGroups", self.GroupOp)
13547             self._autoPublish(aGroup, theName, "group")
13548             return aGroup
13549
13550         ## Cut of lists of groups.
13551         #  New group is created. It will contain only entities
13552         #  which are present in groups listed in theGList1 but
13553         #  are not present in groups from theGList2.
13554         #  @param theGList1 is a list of GEOM groups to include elements of.
13555         #  @param theGList2 is a list of GEOM groups to exclude elements of.
13556         #  @param theName Object name; when specified, this parameter is used
13557         #         for result publication in the study. Otherwise, if automatic
13558         #         publication is switched on, default value is used for result name.
13559         #
13560         #  @return a newly created GEOM group.
13561         #
13562         #  @ref tui_cut_groups_anchor "Example"
13563         @ManageTransactions("GroupOp")
13564         def CutListOfGroups (self, theGList1, theGList2, theName=None):
13565             """
13566             Cut of lists of groups.
13567             New group is created. It will contain only entities
13568             which are present in groups listed in theGList1 but
13569             are not present in groups from theGList2.
13570
13571             Parameters:
13572                 theGList1 is a list of GEOM groups to include elements of.
13573                 theGList2 is a list of GEOM groups to exclude elements of.
13574                 theName Object name; when specified, this parameter is used
13575                         for result publication in the study. Otherwise, if automatic
13576                         publication is switched on, default value is used for result name.
13577
13578             Returns:
13579                 a newly created GEOM group.
13580             """
13581             # Example: see GEOM_TestOthers.py
13582             aGroup = self.GroupOp.CutListOfGroups(theGList1, theGList2)
13583             RaiseIfFailed("CutListOfGroups", self.GroupOp)
13584             self._autoPublish(aGroup, theName, "group")
13585             return aGroup
13586
13587         ## Returns a list of sub-objects ID stored in the group
13588         #  @param theGroup is a GEOM group for which a list of IDs is requested
13589         #
13590         #  @ref swig_GetObjectIDs "Example"
13591         @ManageTransactions("GroupOp")
13592         def GetObjectIDs(self,theGroup):
13593             """
13594             Returns a list of sub-objects ID stored in the group
13595
13596             Parameters:
13597                 theGroup is a GEOM group for which a list of IDs is requested
13598             """
13599             # Example: see GEOM_TestOthers.py
13600             ListIDs = self.GroupOp.GetObjects(theGroup)
13601             RaiseIfFailed("GetObjects", self.GroupOp)
13602             return ListIDs
13603
13604         ## Returns a type of sub-objects stored in the group
13605         #  @param theGroup is a GEOM group which type is returned.
13606         #
13607         #  @ref swig_GetType "Example"
13608         @ManageTransactions("GroupOp")
13609         def GetType(self,theGroup):
13610             """
13611             Returns a type of sub-objects stored in the group
13612
13613             Parameters:
13614                 theGroup is a GEOM group which type is returned.
13615             """
13616             # Example: see GEOM_TestOthers.py
13617             aType = self.GroupOp.GetType(theGroup)
13618             RaiseIfFailed("GetType", self.GroupOp)
13619             return aType
13620
13621         ## Convert a type of geom object from id to string value
13622         #  @param theId is a GEOM object type id.
13623         #  @return type of geom object (POINT, VECTOR, PLANE, LINE, TORUS, ... )
13624         #  @ref swig_GetType "Example"
13625         def ShapeIdToType(self, theId):
13626             """
13627             Convert a type of geom object from id to string value
13628
13629             Parameters:
13630                 theId is a GEOM object type id.
13631
13632             Returns:
13633                 type of geom object (POINT, VECTOR, PLANE, LINE, TORUS, ... )
13634             """
13635             if theId == 0:
13636                 return "COPY"
13637             if theId == 1:
13638                 return "IMPORT"
13639             if theId == 2:
13640                 return "POINT"
13641             if theId == 3:
13642                 return "VECTOR"
13643             if theId == 4:
13644                 return "PLANE"
13645             if theId == 5:
13646                 return "LINE"
13647             if theId == 6:
13648                 return "TORUS"
13649             if theId == 7:
13650                 return "BOX"
13651             if theId == 8:
13652                 return "CYLINDER"
13653             if theId == 9:
13654                 return "CONE"
13655             if theId == 10:
13656                 return "SPHERE"
13657             if theId == 11:
13658                 return "PRISM"
13659             if theId == 12:
13660                 return "REVOLUTION"
13661             if theId == 13:
13662                 return "BOOLEAN"
13663             if theId == 14:
13664                 return "PARTITION"
13665             if theId == 15:
13666                 return "POLYLINE"
13667             if theId == 16:
13668                 return "CIRCLE"
13669             if theId == 17:
13670                 return "SPLINE"
13671             if theId == 18:
13672                 return "ELLIPSE"
13673             if theId == 19:
13674                 return "CIRC_ARC"
13675             if theId == 20:
13676                 return "FILLET"
13677             if theId == 21:
13678                 return "CHAMFER"
13679             if theId == 22:
13680                 return "EDGE"
13681             if theId == 23:
13682                 return "WIRE"
13683             if theId == 24:
13684                 return "FACE"
13685             if theId == 25:
13686                 return "SHELL"
13687             if theId == 26:
13688                 return "SOLID"
13689             if theId == 27:
13690                 return "COMPOUND"
13691             if theId == 28:
13692                 return "SUBSHAPE"
13693             if theId == 29:
13694                 return "PIPE"
13695             if theId == 30:
13696                 return "ARCHIMEDE"
13697             if theId == 31:
13698                 return "FILLING"
13699             if theId == 32:
13700                 return "EXPLODE"
13701             if theId == 33:
13702                 return "GLUED"
13703             if theId == 34:
13704                 return "SKETCHER"
13705             if theId == 35:
13706                 return "CDG"
13707             if theId == 36:
13708                 return "FREE_BOUNDS"
13709             if theId == 37:
13710                 return "GROUP"
13711             if theId == 38:
13712                 return "BLOCK"
13713             if theId == 39:
13714                 return "MARKER"
13715             if theId == 40:
13716                 return "THRUSECTIONS"
13717             if theId == 41:
13718                 return "COMPOUNDFILTER"
13719             if theId == 42:
13720                 return "SHAPES_ON_SHAPE"
13721             if theId == 43:
13722                 return "ELLIPSE_ARC"
13723             if theId == 44:
13724                 return "3DSKETCHER"
13725             if theId == 45:
13726                 return "FILLET_2D"
13727             if theId == 46:
13728                 return "FILLET_1D"
13729             if theId == 201:
13730                 return "PIPETSHAPE"
13731             return "Shape Id not exist."
13732
13733         ## Returns a main shape associated with the group
13734         #  @param theGroup is a GEOM group for which a main shape object is requested
13735         #  @return a GEOM object which is a main shape for theGroup
13736         #
13737         #  @ref swig_GetMainShape "Example"
13738         @ManageTransactions("GroupOp")
13739         def GetMainShape(self,theGroup):
13740             """
13741             Returns a main shape associated with the group
13742
13743             Parameters:
13744                 theGroup is a GEOM group for which a main shape object is requested
13745
13746             Returns:
13747                 a GEOM object which is a main shape for theGroup
13748
13749             Example of usage: BoxCopy = geompy.GetMainShape(CreateGroup)
13750             """
13751             # Example: see GEOM_TestOthers.py
13752             anObj = self.GroupOp.GetMainShape(theGroup)
13753             RaiseIfFailed("GetMainShape", self.GroupOp)
13754             return anObj
13755
13756         ## Create group of edges of theShape, whose length is in range [min_length, max_length].
13757         #  If include_min/max == 0, edges with length == min/max_length will not be included in result.
13758         #  @param theShape given shape (see GEOM.GEOM_Object)
13759         #  @param min_length minimum length of edges of theShape
13760         #  @param max_length maximum length of edges of theShape
13761         #  @param include_max indicating if edges with length == max_length should be included in result, 1-yes, 0-no (default=1)
13762         #  @param include_min indicating if edges with length == min_length should be included in result, 1-yes, 0-no (default=1)
13763         #  @param theName Object name; when specified, this parameter is used
13764         #         for result publication in the study. Otherwise, if automatic
13765         #         publication is switched on, default value is used for result name.
13766         #
13767         #  @return a newly created GEOM group of edges
13768         #
13769         #  @@ref swig_todo "Example"
13770         def GetEdgesByLength (self, theShape, min_length, max_length, include_min = 1, include_max = 1, theName=None):
13771             """
13772             Create group of edges of theShape, whose length is in range [min_length, max_length].
13773             If include_min/max == 0, edges with length == min/max_length will not be included in result.
13774
13775             Parameters:
13776                 theShape given shape
13777                 min_length minimum length of edges of theShape
13778                 max_length maximum length of edges of theShape
13779                 include_max indicating if edges with length == max_length should be included in result, 1-yes, 0-no (default=1)
13780                 include_min indicating if edges with length == min_length should be included in result, 1-yes, 0-no (default=1)
13781                 theName Object name; when specified, this parameter is used
13782                         for result publication in the study. Otherwise, if automatic
13783                         publication is switched on, default value is used for result name.
13784
13785              Returns:
13786                 a newly created GEOM group of edges.
13787             """
13788             edges = self.SubShapeAll(theShape, self.ShapeType["EDGE"])
13789             edges_in_range = []
13790             for edge in edges:
13791                 Props = self.BasicProperties(edge)
13792                 if min_length <= Props[0] and Props[0] <= max_length:
13793                     if (not include_min) and (min_length == Props[0]):
13794                         skip = 1
13795                     else:
13796                         if (not include_max) and (Props[0] == max_length):
13797                             skip = 1
13798                         else:
13799                             edges_in_range.append(edge)
13800
13801             if len(edges_in_range) <= 0:
13802                 print("No edges found by given criteria")
13803                 return None
13804
13805             # note: auto-publishing is done in self.CreateGroup()
13806             group_edges = self.CreateGroup(theShape, self.ShapeType["EDGE"], theName)
13807             self.UnionList(group_edges, edges_in_range)
13808
13809             return group_edges
13810
13811         ## Create group of edges of selected shape, whose length is in range [min_length, max_length].
13812         #  If include_min/max == 0, edges with length == min/max_length will not be included in result.
13813         #  @param min_length minimum length of edges of selected shape
13814         #  @param max_length maximum length of edges of selected shape
13815         #  @param include_max indicating if edges with length == max_length should be included in result, 1-yes, 0-no (default=1)
13816         #  @param include_min indicating if edges with length == min_length should be included in result, 1-yes, 0-no (default=1)
13817         #  @return a newly created GEOM group of edges
13818         #  @ref swig_todo "Example"
13819         def SelectEdges (self, min_length, max_length, include_min = 1, include_max = 1):
13820             """
13821             Create group of edges of selected shape, whose length is in range [min_length, max_length].
13822             If include_min/max == 0, edges with length == min/max_length will not be included in result.
13823
13824             Parameters:
13825                 min_length minimum length of edges of selected shape
13826                 max_length maximum length of edges of selected shape
13827                 include_max indicating if edges with length == max_length should be included in result, 1-yes, 0-no (default=1)
13828                 include_min indicating if edges with length == min_length should be included in result, 1-yes, 0-no (default=1)
13829
13830              Returns:
13831                 a newly created GEOM group of edges.
13832             """
13833             nb_selected = sg.SelectedCount()
13834             if nb_selected < 1:
13835                 print("Select a shape before calling this function, please.")
13836                 return 0
13837             if nb_selected > 1:
13838                 print("Only one shape must be selected")
13839                 return 0
13840
13841             id_shape = sg.getSelected(0)
13842             shape = IDToObject( id_shape )
13843
13844             group_edges = self.GetEdgesByLength(shape, min_length, max_length, include_min, include_max)
13845
13846             left_str  = " < "
13847             right_str = " < "
13848             if include_min: left_str  = " <= "
13849             if include_max: right_str  = " <= "
13850
13851             self.addToStudyInFather(shape, group_edges, "Group of edges with " + repr(min_length)
13852                                     + left_str + "length" + right_str + repr(max_length))
13853
13854             sg.updateObjBrowser()
13855
13856             return group_edges
13857
13858         # end of l3_groups
13859         ## @}
13860
13861         #@@ insert new functions before this line @@ do not remove this line @@#
13862
13863         ## Create a copy of the given object
13864         #
13865         #  @param theOriginal geometry object for copy
13866         #  @param theName Object name; when specified, this parameter is used
13867         #         for result publication in the study. Otherwise, if automatic
13868         #         publication is switched on, default value is used for result name.
13869         #
13870         #  @return New GEOM_Object, containing the copied shape.
13871         #
13872         #  @ingroup l1_geomBuilder_auxiliary
13873         #  @ref swig_MakeCopy "Example"
13874         @ManageTransactions("InsertOp")
13875         def MakeCopy(self, theOriginal, theName=None):
13876             """
13877             Create a copy of the given object
13878
13879             Parameters:
13880                 theOriginal geometry object for copy
13881                 theName Object name; when specified, this parameter is used
13882                         for result publication in the study. Otherwise, if automatic
13883                         publication is switched on, default value is used for result name.
13884
13885             Returns:
13886                 New GEOM_Object, containing the copied shape.
13887
13888             Example of usage: Copy = geompy.MakeCopy(Box)
13889             """
13890             # Example: see GEOM_TestAll.py
13891             anObj = self.InsertOp.MakeCopy(theOriginal)
13892             RaiseIfFailed("MakeCopy", self.InsertOp)
13893             self._autoPublish(anObj, theName, "copy")
13894             return anObj
13895
13896         ## Add Path to load python scripts from
13897         #  @param Path a path to load python scripts from
13898         #  @ingroup l1_geomBuilder_auxiliary
13899         def addPath(self,Path):
13900             """
13901             Add Path to load python scripts from
13902
13903             Parameters:
13904                 Path a path to load python scripts from
13905             """
13906             if (sys.path.count(Path) < 1):
13907                 sys.path.append(Path)
13908                 pass
13909             pass
13910
13911         ## Load marker texture from the file
13912         #  @param Path a path to the texture file
13913         #  @return unique texture identifier
13914         #  @ingroup l1_geomBuilder_auxiliary
13915         @ManageTransactions("InsertOp")
13916         def LoadTexture(self, Path):
13917             """
13918             Load marker texture from the file
13919
13920             Parameters:
13921                 Path a path to the texture file
13922
13923             Returns:
13924                 unique texture identifier
13925             """
13926             # Example: see GEOM_TestAll.py
13927             ID = self.InsertOp.LoadTexture(Path)
13928             RaiseIfFailed("LoadTexture", self.InsertOp)
13929             return ID
13930
13931         ## Get internal name of the object based on its study entry
13932         #  @note This method does not provide an unique identifier of the geometry object.
13933         #  @note This is internal function of GEOM component, though it can be used outside it for
13934         #  appropriate reason (e.g. for identification of geometry object).
13935         #  @param obj geometry object
13936         #  @return unique object identifier
13937         #  @ingroup l1_geomBuilder_auxiliary
13938         def getObjectID(self, obj):
13939             """
13940             Get internal name of the object based on its study entry.
13941             Note: this method does not provide an unique identifier of the geometry object.
13942             It is an internal function of GEOM component, though it can be used outside GEOM for
13943             appropriate reason (e.g. for identification of geometry object).
13944
13945             Parameters:
13946                 obj geometry object
13947
13948             Returns:
13949                 unique object identifier
13950             """
13951             ID = ""
13952             entry = salome.ObjectToID(obj)
13953             if entry is not None:
13954                 lst = entry.split(":")
13955                 if len(lst) > 0:
13956                     ID = lst[-1] # -1 means last item in the list
13957                     return "GEOM_" + ID
13958             return ID
13959
13960
13961
13962         ## Add marker texture. @a Width and @a Height parameters
13963         #  specify width and height of the texture in pixels.
13964         #  If @a RowData is @c True, @a Texture parameter should represent texture data
13965         #  packed into the byte array. If @a RowData is @c False (default), @a Texture
13966         #  parameter should be unpacked string, in which '1' symbols represent opaque
13967         #  pixels and '0' represent transparent pixels of the texture bitmap.
13968         #
13969         #  @param Width texture width in pixels
13970         #  @param Height texture height in pixels
13971         #  @param Texture texture data
13972         #  @param RowData if @c True, @a Texture data are packed in the byte stream
13973         #  @return unique texture identifier
13974         #  @ingroup l1_geomBuilder_auxiliary
13975         @ManageTransactions("InsertOp")
13976         def AddTexture(self, Width, Height, Texture, RowData=False):
13977             """
13978             Add marker texture. Width and Height parameters
13979             specify width and height of the texture in pixels.
13980             If RowData is True, Texture parameter should represent texture data
13981             packed into the byte array. If RowData is False (default), Texture
13982             parameter should be unpacked string, in which '1' symbols represent opaque
13983             pixels and '0' represent transparent pixels of the texture bitmap.
13984
13985             Parameters:
13986                 Width texture width in pixels
13987                 Height texture height in pixels
13988                 Texture texture data
13989                 RowData if True, Texture data are packed in the byte stream
13990
13991             Returns:
13992                 return unique texture identifier
13993             """
13994             if not RowData: Texture = PackData(Texture)
13995             ID = self.InsertOp.AddTexture(Width, Height, Texture)
13996             RaiseIfFailed("AddTexture", self.InsertOp)
13997             return ID
13998
13999         ## Transfer not topological data from one GEOM object to another.
14000         #
14001         #  @param theObjectFrom the source object of non-topological data
14002         #  @param theObjectTo the destination object of non-topological data
14003         #  @param theFindMethod method to search sub-shapes of theObjectFrom
14004         #         in shape theObjectTo. Possible values are: GEOM.FSM_GetInPlace,
14005         #         GEOM.FSM_GetInPlaceByHistory and GEOM.FSM_GetInPlace_Old.
14006         #         Other values of GEOM.find_shape_method are not supported.
14007         #
14008         #  @return True in case of success; False otherwise.
14009         #
14010         #  @ingroup l1_geomBuilder_auxiliary
14011         #
14012         #  @ref swig_TransferData "Example"
14013         @ManageTransactions("InsertOp")
14014         def TransferData(self, theObjectFrom, theObjectTo,
14015                          theFindMethod=GEOM.FSM_GetInPlace):
14016             """
14017             Transfer not topological data from one GEOM object to another.
14018
14019             Parameters:
14020                 theObjectFrom the source object of non-topological data
14021                 theObjectTo the destination object of non-topological data
14022                 theFindMethod method to search sub-shapes of theObjectFrom
14023                               in shape theObjectTo. Possible values are:
14024                               GEOM.FSM_GetInPlace, GEOM.FSM_GetInPlaceByHistory
14025                               and GEOM.FSM_GetInPlace_Old. Other values of
14026                               GEOM.find_shape_method are not supported.
14027
14028             Returns:
14029                 True in case of success; False otherwise.
14030
14031             # Example: see GEOM_TestOthers.py
14032             """
14033             # Example: see GEOM_TestAll.py
14034             isOk = self.InsertOp.TransferData(theObjectFrom,
14035                                                theObjectTo, theFindMethod)
14036             RaiseIfFailed("TransferData", self.InsertOp)
14037             return isOk
14038
14039         ## Creates a new folder object. It is a container for any GEOM objects.
14040         #  @param Name name of the container
14041         #  @param Father parent object. If None,
14042         #         folder under 'Geometry' root object will be created.
14043         #  @return a new created folder
14044         #  @ingroup l1_publish_data
14045         def NewFolder(self, Name, Father=None):
14046             """
14047             Create a new folder object. It is an auxiliary container for any GEOM objects.
14048
14049             Parameters:
14050                 Name name of the container
14051                 Father parent object. If None,
14052                 folder under 'Geometry' root object will be created.
14053
14054             Returns:
14055                 a new created folder
14056             """
14057             return self.CreateFolder(Name, Father)
14058
14059         ## Move object to the specified folder
14060         #  @param Object object to move
14061         #  @param Folder target folder
14062         #  @ingroup l1_publish_data
14063         def PutToFolder(self, Object, Folder):
14064             """
14065             Move object to the specified folder
14066
14067             Parameters:
14068                 Object object to move
14069                 Folder target folder
14070             """
14071             self.MoveToFolder(Object, Folder)
14072             pass
14073
14074         ## Move list of objects to the specified folder
14075         #  @param ListOfSO list of objects to move
14076         #  @param Folder target folder
14077         #  @ingroup l1_publish_data
14078         def PutListToFolder(self, ListOfSO, Folder):
14079             """
14080             Move list of objects to the specified folder
14081
14082             Parameters:
14083                 ListOfSO list of objects to move
14084                 Folder target folder
14085             """
14086             self.MoveListToFolder(ListOfSO, Folder)
14087             pass
14088
14089         ## @addtogroup l2_field
14090         ## @{
14091
14092         ## Creates a field
14093         #  @param shape the shape the field lies on
14094         #  @param name the field name
14095         #  @param type type of field data: 0 - bool, 1 - int, 2 - double, 3 - string
14096         #  @param dimension dimension of the shape the field lies on
14097         #         0 - VERTEX, 1 - EDGE, 2 - FACE, 3 - SOLID, -1 - whole shape
14098         #  @param componentNames names of components
14099         #  @return a created field
14100         @ManageTransactions("FieldOp")
14101         def CreateField(self, shape, name, type, dimension, componentNames):
14102             """
14103             Creates a field
14104
14105             Parameters:
14106                 shape the shape the field lies on
14107                 name  the field name
14108                 type  type of field data
14109                 dimension dimension of the shape the field lies on
14110                           0 - VERTEX, 1 - EDGE, 2 - FACE, 3 - SOLID, -1 - whole shape
14111                 componentNames names of components
14112
14113             Returns:
14114                 a created field
14115             """
14116             if isinstance( type, int ):
14117                 if type < 0 or type > 3:
14118                     raise RuntimeError("CreateField : Error: data type must be within [0-3] range")
14119                 type = [GEOM.FDT_Bool,GEOM.FDT_Int,GEOM.FDT_Double,GEOM.FDT_String][type]
14120
14121             f = self.FieldOp.CreateField( shape, name, type, dimension, componentNames)
14122             RaiseIfFailed("CreateField", self.FieldOp)
14123             global geom
14124             geom._autoPublish( f, "", name)
14125             return f
14126
14127         ## Removes a field from the GEOM component
14128         #  @param field the field to remove
14129         def RemoveField(self, field):
14130             "Removes a field from the GEOM component"
14131             global geom
14132             if isinstance( field, GEOM._objref_GEOM_Field ):
14133                 geom.RemoveObject( field )
14134             elif isinstance( field, geomField ):
14135                 geom.RemoveObject( field.field )
14136             else:
14137                 raise RuntimeError("RemoveField() : the object is not a field")
14138             return
14139
14140         ## Returns number of fields on a shape
14141         @ManageTransactions("FieldOp")
14142         def CountFields(self, shape):
14143             "Returns number of fields on a shape"
14144             nb = self.FieldOp.CountFields( shape )
14145             RaiseIfFailed("CountFields", self.FieldOp)
14146             return nb
14147
14148         ## Returns all fields on a shape
14149         @ManageTransactions("FieldOp")
14150         def GetFields(self, shape):
14151             "Returns all fields on a shape"
14152             ff = self.FieldOp.GetFields( shape )
14153             RaiseIfFailed("GetFields", self.FieldOp)
14154             return ff
14155
14156         ## Returns a field on a shape by its name
14157         @ManageTransactions("FieldOp")
14158         def GetField(self, shape, name):
14159             "Returns a field on a shape by its name"
14160             f = self.FieldOp.GetField( shape, name )
14161             RaiseIfFailed("GetField", self.FieldOp)
14162             return f
14163
14164         # end of l2_field
14165         ## @}
14166
14167         ## @addtogroup l2_testing
14168         ## @{
14169
14170         ## Build a mesh on the given shape.
14171         # @param shape the source shape
14172         # @param linear_deflection linear deflection coefficient
14173         # @param is_relative says if given value of deflection is relative to shape's bounding box
14174         # @param angular_deflection angular deflection for edges in degrees
14175         # @return True in case of success; otherwise False.
14176         @ManageTransactions("TestOp")
14177         def Tesselate(self, shape, linear_deflection=0, is_relative=True, angular_deflection=0):
14178             """Build a mesh on the given shape.
14179
14180             Parameters:
14181                 shape the source shape
14182                 linear_deflection linear deflection coefficient
14183                 is_relative says if given value of deflection is relative to shape's bounding box
14184                 angular_deflection angular deflection for edges in degrees
14185
14186             Returns:
14187                 True in case of success; otherwise False.
14188             """
14189             if angular_deflection > 0:
14190                 angular_deflection = angular_deflection * math.pi / 180.
14191             r = self.TestOp.Tesselate(shape, linear_deflection, is_relative, angular_deflection)
14192             RaiseIfFailed("Tesselate", self.TestOp)
14193             return r
14194
14195         ## Obtain a shape checker
14196         #  @return An instance of @ref conformity.CheckConformity "CheckConformity" interface
14197         #
14198         #  @ref tui_conformity_page "Example"
14199         def CheckConformity (self, shape):
14200             """
14201             Obtain a shape checker.
14202
14203             Example of usage:
14204                 conf = geompy.CheckConformity(shape)
14205                 valid = conf.isValid()
14206                 si2d = conf.selfIntersected2D()
14207                 dist = conf.distantShapes()
14208                 small = conf.smallEdges()
14209                 interfer = cc.interferingSubshapes()
14210             """
14211             conf = CheckConformity (shape, self)
14212             return conf
14213
14214         ## Obtain a shape proximity calculator
14215         #  @return An instance of @ref proximity.ShapeProximity "ShapeProximity" interface
14216         #
14217         #  @ref tui_proximity_page "Example"
14218         def ShapeProximity (self):
14219             """
14220             Obtain a shape proximity calculator.
14221
14222             Example of usage:
14223                 prox = geompy.ShapeProximity()
14224                 value = prox.proximity(shape1, shape2)
14225             """
14226             prox = ShapeProximity (self)
14227             return prox
14228
14229         # end of l2_testing
14230         ## @}
14231
14232
14233 # Register the new proxy for GEOM_Gen
14234 omniORB.registerObjref(GEOM._objref_GEOM_Gen._NP_RepositoryId, geomBuilder)
14235
14236
14237 ## Field on Geometry
14238 #  @ingroup l2_field
14239 class geomField( GEOM._objref_GEOM_Field ):
14240
14241     def __init__(self, *args):
14242         GEOM._objref_GEOM_Field.__init__(self, *args)
14243         self.field = GEOM._objref_GEOM_Field
14244         return
14245
14246     ## Returns the shape the field lies on
14247     def getShape(self):
14248         "Returns the shape the field lies on"
14249         return self.field.GetShape(self)
14250
14251     ## Returns the field name
14252     def getName(self):
14253         "Returns the field name"
14254         return self.field.GetName(self)
14255
14256     ## Returns type of field data as integer [0-3]
14257     def getType(self):
14258         "Returns type of field data"
14259         return EnumToLong(self.field.GetDataType(self))
14260
14261     ## Returns type of field data:
14262     #  one of GEOM.FDT_Bool, GEOM.FDT_Int, GEOM.FDT_Double, GEOM.FDT_String
14263     def getTypeEnum(self):
14264         "Returns type of field data"
14265         return self.field.GetDataType(self)
14266
14267     ## Returns dimension of the shape the field lies on:
14268     #  0 - VERTEX, 1 - EDGE, 2 - FACE, 3 - SOLID, -1 - whole shape
14269     def getDimension(self):
14270         """Returns dimension of the shape the field lies on:
14271         0 - VERTEX, 1 - EDGE, 2 - FACE, 3 - SOLID, -1 - whole shape"""
14272         return self.field.GetDimension(self)
14273
14274     ## Returns names of components
14275     def getComponents(self):
14276         "Returns names of components"
14277         return self.field.GetComponents(self)
14278
14279     ## Adds a time step to the field
14280     #  @param step the time step number further used as the step identifier
14281     #  @param stamp the time step time
14282     #  @param values the values of the time step
14283     def addStep(self, step, stamp, values):
14284         "Adds a time step to the field"
14285         stp = self.field.AddStep( self, step, stamp )
14286         if not stp:
14287             raise RuntimeError("Field.addStep() : Error: step %s already exists in this field"%step)
14288         global geom
14289         geom._autoPublish( stp, "", "Step %s, %s"%(step,stamp))
14290         self.setValues( step, values )
14291         return stp
14292
14293     ## Remove a time step from the field
14294     def removeStep(self,step):
14295         "Remove a time step from the field"
14296         stepSO = None
14297         try:
14298             stepObj = self.field.GetStep( self, step )
14299             if stepObj:
14300                 stepSO = geom.myStudy.FindObjectID( stepObj.GetStudyEntry() )
14301         except:
14302             #import traceback
14303             #traceback.print_exc()
14304             pass
14305         self.field.RemoveStep( self, step )
14306         if stepSO:
14307             geom.myBuilder.RemoveObjectWithChildren( stepSO )
14308         return
14309
14310     ## Returns number of time steps in the field
14311     def countSteps(self):
14312         "Returns number of time steps in the field"
14313         return self.field.CountSteps(self)
14314
14315     ## Returns a list of time step IDs in the field
14316     def getSteps(self):
14317         "Returns a list of time step IDs in the field"
14318         return self.field.GetSteps(self)
14319
14320     ## Returns a time step by its ID
14321     def getStep(self,step):
14322         "Returns a time step by its ID"
14323         stp = self.field.GetStep(self, step)
14324         if not stp:
14325             raise RuntimeError("Step %s is missing from this field"%step)
14326         return stp
14327
14328     ## Returns the time of the field step
14329     def getStamp(self,step):
14330         "Returns the time of the field step"
14331         return self.getStep(step).GetStamp()
14332
14333     ## Changes the time of the field step
14334     def setStamp(self, step, stamp):
14335         "Changes the time of the field step"
14336         return self.getStep(step).SetStamp(stamp)
14337
14338     ## Returns values of the field step
14339     def getValues(self, step):
14340         "Returns values of the field step"
14341         return self.getStep(step).GetValues()
14342
14343     ## Changes values of the field step
14344     def setValues(self, step, values):
14345         "Changes values of the field step"
14346         stp = self.getStep(step)
14347         errBeg = "Field.setValues(values) : Error: "
14348         try:
14349             ok = stp.SetValues( values )
14350         except Exception as e:
14351             excStr = str(e)
14352             if excStr.find("WrongPythonType") > 0:
14353                 raise RuntimeError(errBeg +\
14354                       "wrong type of values, %s values are expected"%str(self.getTypeEnum())[4:])
14355             raise RuntimeError(errBeg + str(e))
14356         if not ok:
14357             nbOK = self.field.GetArraySize(self)
14358             nbKO = len(values)
14359             if nbOK != nbKO:
14360                 raise RuntimeError(errBeg + "len(values) must be %s but not %s"%(nbOK,nbKO))
14361             else:
14362                 raise RuntimeError(errBeg + "failed")
14363         return
14364
14365     pass # end of class geomField
14366
14367 # Register the new proxy for GEOM_Field
14368 omniORB.registerObjref(GEOM._objref_GEOM_Field._NP_RepositoryId, geomField)
14369
14370
14371 ## Create a new geomBuilder instance.The geomBuilder class provides the Python
14372 #  interface to GEOM operations.
14373 #
14374 #  Typical use is:
14375 #  \code
14376 #    import salome
14377 #    salome.salome_init()
14378 #    from salome.geom import geomBuilder
14379 #    geompy = geomBuilder.New()
14380 #  \endcode
14381 #  @param  instance  CORBA proxy of GEOM Engine. If None, the default Engine is used.
14382 #  @return geomBuilder instance
14383 def New( instance=None):
14384     """
14385     Create a new geomBuilder instance.The geomBuilder class provides the Python
14386     interface to GEOM operations.
14387
14388     Typical use is:
14389         import salome
14390         salome.salome_init()
14391         from salome.geom import geomBuilder
14392         geompy = geomBuilder.New()
14393
14394     Parameters:
14395         instance  CORBA proxy of GEOM Engine. If None, the default Engine is used.
14396     Returns:
14397         geomBuilder instance
14398     """
14399     #print "New geomBuilder ", study, instance
14400     global engine
14401     global geom
14402     global doLcc
14403     if instance and isinstance( instance, SALOMEDS._objref_Study ):
14404         import sys
14405         sys.stderr.write("Warning: 'study' argument is no more needed in geomBuilder.New(). Consider updating your script!!!\n\n")
14406         instance = None
14407     engine = instance
14408     if engine is None:
14409       doLcc = True
14410     geom = geomBuilder()
14411     assert isinstance(geom,geomBuilder), "Geom engine class is %s but should be geomBuilder.geomBuilder. Import geomBuilder before creating the instance."%geom.__class__
14412     geom.init_geom()
14413     return geom
14414
14415
14416 # Register methods from the plug-ins in the geomBuilder class 
14417 plugins_var = os.environ.get( "GEOM_PluginsList" )
14418
14419 plugins = None
14420 if plugins_var is not None:
14421     plugins = plugins_var.split( ":" )
14422     plugins=[x for x in plugins if len(x)>0]
14423 if plugins is not None:
14424     for pluginName in plugins:
14425         pluginBuilderName = pluginName + "Builder"
14426         try:
14427             exec( "from salome.%s.%s import *" % (pluginName, pluginBuilderName))
14428         except Exception as e:
14429             from salome_utils import verbose
14430             print("Exception while loading %s: %s" % ( pluginBuilderName, e ))
14431             continue
14432         exec( "from salome.%s import %s" % (pluginName, pluginBuilderName))
14433         plugin = eval( pluginBuilderName )
14434         
14435         # add methods from plugin module to the geomBuilder class
14436         for k in dir( plugin ):
14437             if k[0] == '_': continue
14438             method = getattr( plugin, k )
14439             if type( method ).__name__ == 'function':
14440                 if not hasattr( geomBuilder, k ):
14441                     setattr( geomBuilder, k, method )
14442                 pass
14443             pass
14444         del pluginName
14445         pass
14446     pass