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