Salome HOME
INT PAL 0052642: Notebook variables are not dumped to script with Fillet1D, Fillet2D...
[modules/geom.git] / src / GEOM_SWIG / geomBuilder.py
1 #  -*- coding: iso-8859-1 -*-
2 # Copyright (C) 2007-2015  CEA/DEN, EDF R&D, OPEN CASCADE
3 #
4 # This library is free software; you can redistribute it and/or
5 # modify it under the terms of the GNU Lesser General Public
6 # License as published by the Free Software Foundation; either
7 # version 2.1 of the License, or (at your option) any later version.
8 #
9 # This library is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12 # Lesser General Public License for more details.
13 #
14 # You should have received a copy of the GNU Lesser General Public
15 # License along with this library; if not, write to the Free Software
16 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
17 #
18 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
19 #
20
21 #  GEOM GEOM_SWIG : binding of C++ implementation with Python
22 #  File   : geomBuilder.py
23 #  Author : Paul RASCLE, EDF
24 #  Module : GEOM
25
26 """
27     \namespace geomBuilder
28     \brief Module geomBuilder
29 """
30
31 ##
32 ## @defgroup geomBuilder geomBuilder Python module
33 ## @{
34 ##
35 ## @details
36 ##
37 ## By default, all functions of geomBuilder Python module do not publish
38 ## resulting geometrical objects. This can be done in the Python script
39 ## by means of \ref geomBuilder.geomBuilder.addToStudy() "addToStudy()"
40 ## or \ref geomBuilder.geomBuilder.addToStudyInFather() "addToStudyInFather()"
41 ## functions.
42 ##
43 ## However, it is possible to publish result data in the study
44 ## automatically. For this, almost each function of
45 ## \ref geomBuilder.geomBuilder "geomBuilder" class has
46 ## an additional @a theName parameter (@c None by default).
47 ## As soon as non-empty string value is passed to this parameter,
48 ## the result object is published in the study automatically.
49 ##
50 ## For example, consider the following Python script:
51 ##
52 ## @code
53 ## import salome
54 ## from salome.geom import geomBuilder
55 ## geompy = geomBuilder.New(salome.myStudy)
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(salome.myStudy)
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 containes 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(salome.myStudy)
161 ## box = geompy.MakeBoxDXDYDZ(100, 100, 100, "Box")
162 ## # the box was created and published in the study
163 ## folder = geompy.NewFolder("Primitives")
164 ## # an empty "Primitives" folder was created under default "Geometry" root object
165 ## geompy.PutToFolder(box, folder)
166 ## # the box was moved into "Primitives" folder
167 ## @endcode
168 ##
169 ## Subfolders are also can be created by specifying another folder as a parent:
170 ##
171 ## @code
172 ## subfolder = geompy.NewFolder("3D", folder)
173 ## # "3D" folder was created under "Primitives" folder
174 ## @endcode
175 ##
176 ## @note
177 ## - Folder container is just a representation layer object that
178 ## deals with already published objects only. So, any geometry object
179 ## should be published in the study (for example, with
180 ## \ref geomBuilder.geomBuilder.PutToFolder() "addToStudy()" function)
181 ## BEFORE moving it into any existing folder.
182 ## - \ref geomBuilder.geomBuilder.PutToFolder() "PutToFolder()" function
183 ## does not change physical position of geometry object in the study tree,
184 ## it only affects on the representation of the data tree.
185 ## - It is impossible to publish geometry object using any folder as father.
186 ##
187 ##  \defgroup l1_publish_data
188 ##  \defgroup l1_geomBuilder_auxiliary
189 ##  \defgroup l1_geomBuilder_purpose
190 ## @}
191
192 ## @defgroup l1_publish_data Publishing results in SALOME study
193
194 ## @defgroup l1_geomBuilder_auxiliary Auxiliary data structures and methods
195
196 ## @defgroup l1_geomBuilder_purpose   All package methods, grouped by their purpose
197 ## @{
198 ##   @defgroup l2_import_export Importing/exporting geometrical objects
199 ##   @defgroup l2_creating      Creating geometrical objects
200 ##   @{
201 ##     @defgroup l3_basic_go      Creating Basic Geometric Objects
202 ##     @{
203 ##       @defgroup l4_curves        Creating Curves
204
205 ##     @}
206 ##     @defgroup l3_3d_primitives Creating 3D Primitives
207 ##     @defgroup l3_complex       Creating Complex Objects
208 ##     @defgroup l3_groups        Working with groups
209 ##     @defgroup l3_blocks        Building by blocks
210 ##     @{
211 ##       @defgroup l4_blocks_measure Check and Improve
212
213 ##     @}
214 ##     @defgroup l3_sketcher      Sketcher
215 ##     @defgroup l3_advanced      Creating Advanced Geometrical Objects
216 ##     @{
217 ##       @defgroup l4_decompose     Decompose objects
218 ##       @defgroup l4_decompose_d   Decompose objects deprecated methods
219 ##       @defgroup l4_access        Access to sub-shapes by their unique IDs inside the main shape
220 ##       @defgroup l4_obtain        Access to sub-shapes by a criteria
221 ##       @defgroup l4_advanced      Advanced objects creation functions
222
223 ##     @}
224
225 ##   @}
226 ##   @defgroup l2_transforming  Transforming geometrical objects
227 ##   @{
228 ##     @defgroup l3_basic_op      Basic Operations
229 ##     @defgroup l3_boolean       Boolean Operations
230 ##     @defgroup l3_transform     Transformation Operations
231 ##     @defgroup l3_transform_d   Transformation Operations deprecated methods
232 ##     @defgroup l3_local         Local Operations (Fillet, Chamfer and other Features)
233 ##     @defgroup l3_blocks_op     Blocks Operations
234 ##     @defgroup l3_healing       Repairing Operations
235 ##     @defgroup l3_restore_ss    Restore presentation parameters and a tree of sub-shapes
236
237 ##   @}
238 ##   @defgroup l2_measure       Using measurement tools
239 ##   @defgroup l2_field         Field on Geometry
240
241 ## @}
242
243 # initialize SALOME session in try/except block
244 # to avoid problems in some cases, e.g. when generating documentation
245 try:
246     import salome
247     salome.salome_init()
248     from salome import *
249 except:
250     pass
251
252 from salome_notebook import *
253
254 import GEOM
255 import math
256 import os
257 import functools
258
259 from salome.geom.gsketcher import Sketcher3D, Sketcher2D, Polyline2D
260
261 # service function
262 def _toListOfNames(_names, _size=-1):
263     l = []
264     import types
265     if type(_names) in [types.ListType, types.TupleType]:
266         for i in _names: l.append(i)
267     elif _names:
268         l.append(_names)
269     if l and len(l) < _size:
270         for i in range(len(l), _size): l.append("%s_%d"%(l[0],i))
271     return l
272
273 # Decorator function to manage transactions for all geometric operations.
274 def ManageTransactions(theOpeName):
275     def MTDecorator(theFunction):
276         # To keep the original function name an documentation.
277         @functools.wraps(theFunction)
278         def OpenCallClose(self, *args, **kwargs):
279             # Open transaction
280             anOperation = getattr(self, theOpeName)
281             anOperation.StartOperation()
282             try:
283                 # Call the function
284                 res = theFunction(self, *args, **kwargs)
285                 # Commit transaction
286                 anOperation.FinishOperation()
287                 return res
288             except:
289                 # Abort transaction
290                 anOperation.AbortOperation()
291                 raise
292         return OpenCallClose
293     return MTDecorator
294
295 ## Raise an Error, containing the Method_name, if Operation is Failed
296 ## @ingroup l1_geomBuilder_auxiliary
297 def RaiseIfFailed (Method_name, Operation):
298     if Operation.IsDone() == 0 and Operation.GetErrorCode() != "NOT_FOUND_ANY":
299         raise RuntimeError, Method_name + " : " + Operation.GetErrorCode()
300
301 ## Return list of variables value from salome notebook
302 ## @ingroup l1_geomBuilder_auxiliary
303 def ParseParameters(*parameters):
304     Result = []
305     StringResult = []
306     for parameter in parameters:
307         if isinstance(parameter, list):
308             lResults = ParseParameters(*parameter)
309             if len(lResults) > 0:
310                 Result.append(lResults[:-1])
311                 StringResult += lResults[-1].split(":")
312                 pass
313             pass
314         else:
315             if isinstance(parameter,str):
316                 if notebook.isVariable(parameter):
317                     Result.append(notebook.get(parameter))
318                 else:
319                     raise RuntimeError, "Variable with name '" + parameter + "' doesn't exist!!!"
320                 pass
321             else:
322                 Result.append(parameter)
323                 pass
324             StringResult.append(str(parameter))
325             pass
326         pass
327     if Result:
328         Result.append(":".join(StringResult))
329     else:
330         Result = ":".join(StringResult)
331     return Result
332
333 ## Return list of variables value from salome notebook
334 ## @ingroup l1_geomBuilder_auxiliary
335 def ParseList(list):
336     Result = []
337     StringResult = ""
338     for parameter in list:
339         if isinstance(parameter,str) and notebook.isVariable(parameter):
340             Result.append(str(notebook.get(parameter)))
341             pass
342         else:
343             Result.append(str(parameter))
344             pass
345
346         StringResult = StringResult + str(parameter)
347         StringResult = StringResult + ":"
348         pass
349     StringResult = StringResult[:len(StringResult)-1]
350     return Result, StringResult
351
352 ## Return list of variables value from salome notebook
353 ## @ingroup l1_geomBuilder_auxiliary
354 def ParseSketcherCommand(command):
355     Result = ""
356     StringResult = ""
357     sections = command.split(":")
358     for section in sections:
359         parameters = section.split(" ")
360         paramIndex = 1
361         for parameter in parameters:
362             if paramIndex > 1 and parameter.find("'") != -1:
363                 parameter = parameter.replace("'","")
364                 if notebook.isVariable(parameter):
365                     Result = Result + str(notebook.get(parameter)) + " "
366                     pass
367                 else:
368                     raise RuntimeError, "Variable with name '" + parameter + "' doesn't exist!!!"
369                     pass
370                 pass
371             else:
372                 Result = Result + str(parameter) + " "
373                 pass
374             if paramIndex > 1:
375                 StringResult = StringResult + parameter
376                 StringResult = StringResult + ":"
377                 pass
378             paramIndex = paramIndex + 1
379             pass
380         Result = Result[:len(Result)-1] + ":"
381         pass
382     Result = Result[:len(Result)-1]
383     return Result, StringResult
384
385 ## Helper function which can be used to pack the passed string to the byte data.
386 ## Only '1' an '0' symbols are valid for the string. The missing bits are replaced by zeroes.
387 ## If the string contains invalid symbol (neither '1' nor '0'), the function raises an exception.
388 ## For example,
389 ## \code
390 ## val = PackData("10001110") # val = 0xAE
391 ## val = PackData("1")        # val = 0x80
392 ## \endcode
393 ## @param data unpacked data - a string containing '1' and '0' symbols
394 ## @return data packed to the byte stream
395 ## @ingroup l1_geomBuilder_auxiliary
396 def PackData(data):
397     """
398     Helper function which can be used to pack the passed string to the byte data.
399     Only '1' an '0' symbols are valid for the string. The missing bits are replaced by zeroes.
400     If the string contains invalid symbol (neither '1' nor '0'), the function raises an exception.
401
402     Parameters:
403         data unpacked data - a string containing '1' and '0' symbols
404
405     Returns:
406         data packed to the byte stream
407
408     Example of usage:
409         val = PackData("10001110") # val = 0xAE
410         val = PackData("1")        # val = 0x80
411     """
412     bytes = len(data)/8
413     if len(data)%8: bytes += 1
414     res = ""
415     for b in range(bytes):
416         d = data[b*8:(b+1)*8]
417         val = 0
418         for i in range(8):
419             val *= 2
420             if i < len(d):
421                 if d[i] == "1": val += 1
422                 elif d[i] != "0":
423                     raise "Invalid symbol %s" % d[i]
424                 pass
425             pass
426         res += chr(val)
427         pass
428     return res
429
430 ## Read bitmap texture from the text file.
431 ## In that file, any non-zero symbol represents '1' opaque pixel of the bitmap.
432 ## A zero symbol ('0') represents transparent pixel of the texture bitmap.
433 ## The function returns width and height of the pixmap in pixels and byte stream representing
434 ## texture bitmap itself.
435 ##
436 ## This function can be used to read the texture to the byte stream in order to pass it to
437 ## the AddTexture() function of geomBuilder class.
438 ## For example,
439 ## \code
440 ## from salome.geom import geomBuilder
441 ## geompy = geomBuilder.New(salome.myStudy)
442 ## texture = geompy.readtexture('mytexture.dat')
443 ## texture = geompy.AddTexture(*texture)
444 ## obj.SetMarkerTexture(texture)
445 ## \endcode
446 ## @param fname texture file name
447 ## @return sequence of tree values: texture's width, height in pixels and its byte stream
448 ## @ingroup l1_geomBuilder_auxiliary
449 def ReadTexture(fname):
450     """
451     Read bitmap texture from the text file.
452     In that file, any non-zero symbol represents '1' opaque pixel of the bitmap.
453     A zero symbol ('0') represents transparent pixel of the texture bitmap.
454     The function returns width and height of the pixmap in pixels and byte stream representing
455     texture bitmap itself.
456     This function can be used to read the texture to the byte stream in order to pass it to
457     the AddTexture() function of geomBuilder class.
458
459     Parameters:
460         fname texture file name
461
462     Returns:
463         sequence of tree values: texture's width, height in pixels and its byte stream
464
465     Example of usage:
466         from salome.geom import geomBuilder
467         geompy = geomBuilder.New(salome.myStudy)
468         texture = geompy.readtexture('mytexture.dat')
469         texture = geompy.AddTexture(*texture)
470         obj.SetMarkerTexture(texture)
471     """
472     try:
473         f = open(fname)
474         lines = [ l.strip() for l in f.readlines()]
475         f.close()
476         maxlen = 0
477         if lines: maxlen = max([len(x) for x in lines])
478         lenbytes = maxlen/8
479         if maxlen%8: lenbytes += 1
480         bytedata=""
481         for line in lines:
482             if len(line)%8:
483                 lenline = (len(line)/8+1)*8
484                 pass
485             else:
486                 lenline = (len(line)/8)*8
487                 pass
488             for i in range(lenline/8):
489                 byte=""
490                 for j in range(8):
491                     if i*8+j < len(line) and line[i*8+j] != "0": byte += "1"
492                     else: byte += "0"
493                     pass
494                 bytedata += PackData(byte)
495                 pass
496             for i in range(lenline/8, lenbytes):
497                 bytedata += PackData("0")
498             pass
499         return lenbytes*8, len(lines), bytedata
500     except:
501         pass
502     return 0, 0, ""
503
504 ## Returns a long value from enumeration type
505 #  Can be used for CORBA enumerator types like GEOM.shape_type
506 #  @param theItem enumeration type
507 #  @ingroup l1_geomBuilder_auxiliary
508 def EnumToLong(theItem):
509     """
510     Returns a long value from enumeration type
511     Can be used for CORBA enumerator types like geomBuilder.ShapeType
512
513     Parameters:
514         theItem enumeration type
515     """
516     ret = theItem
517     if hasattr(theItem, "_v"): ret = theItem._v
518     return ret
519
520 ## Pack an argument into a list
521 def ToList( arg ):
522     if isinstance( arg, list ):
523         return arg
524     if hasattr( arg, "__getitem__" ):
525         return list( arg )
526     return [ arg ]
527
528 ## Information about closed/unclosed state of shell or wire
529 #  @ingroup l1_geomBuilder_auxiliary
530 class info:
531     """
532     Information about closed/unclosed state of shell or wire
533     """
534     UNKNOWN  = 0
535     CLOSED   = 1
536     UNCLOSED = 2
537
538 ## Private class used to bind calls of plugin operations to geomBuilder
539 class PluginOperation:
540   def __init__(self, operation, function):
541     self.operation = operation
542     self.function = function
543     pass
544
545   @ManageTransactions("operation")
546   def __call__(self, *args):
547     res = self.function(self.operation, *args)
548     RaiseIfFailed(self.function.__name__, self.operation)
549     return res
550
551 # Warning: geom is a singleton
552 geom = None
553 engine = None
554 doLcc = False
555 created = False
556
557 class geomBuilder(object, GEOM._objref_GEOM_Gen):
558
559         ## Enumeration ShapeType as a dictionary. \n
560         ## Topological types of shapes (like Open Cascade types). See GEOM::shape_type for details.
561         #  @ingroup l1_geomBuilder_auxiliary
562         ShapeType = {"AUTO":-1, "COMPOUND":0, "COMPSOLID":1, "SOLID":2, "SHELL":3, "FACE":4, "WIRE":5, "EDGE":6, "VERTEX":7, "SHAPE":8, "FLAT":9}
563
564         ## Kinds of shape in terms of <VAR>GEOM.GEOM_IKindOfShape.shape_kind</VAR> enumeration
565         #  and a list of parameters, describing the shape.
566         #  List of parameters, describing the shape:
567         #  - COMPOUND:            [nb_solids  nb_faces  nb_edges  nb_vertices]
568         #  - COMPSOLID:           [nb_solids  nb_faces  nb_edges  nb_vertices]
569         #
570         #  - SHELL:       [info.CLOSED / info.UNCLOSED  nb_faces  nb_edges  nb_vertices]
571         #
572         #  - WIRE:        [info.CLOSED / info.UNCLOSED nb_edges  nb_vertices]
573         #
574         #  - SPHERE:       [xc yc zc            R]
575         #  - CYLINDER:     [xb yb zb  dx dy dz  R         H]
576         #  - BOX:          [xc yc zc                      ax ay az]
577         #  - ROTATED_BOX:  [xc yc zc  zx zy zz  xx xy xz  ax ay az]
578         #  - TORUS:        [xc yc zc  dx dy dz  R_1  R_2]
579         #  - CONE:         [xb yb zb  dx dy dz  R_1  R_2  H]
580         #  - POLYHEDRON:                       [nb_faces  nb_edges  nb_vertices]
581         #  - SOLID:                            [nb_faces  nb_edges  nb_vertices]
582         #
583         #  - SPHERE2D:     [xc yc zc            R]
584         #  - CYLINDER2D:   [xb yb zb  dx dy dz  R         H]
585         #  - TORUS2D:      [xc yc zc  dx dy dz  R_1  R_2]
586         #  - CONE2D:       [xc yc zc  dx dy dz  R_1  R_2  H]
587         #  - DISK_CIRCLE:  [xc yc zc  dx dy dz  R]
588         #  - DISK_ELLIPSE: [xc yc zc  dx dy dz  R_1  R_2]
589         #  - POLYGON:      [xo yo zo  dx dy dz            nb_edges  nb_vertices]
590         #  - PLANE:        [xo yo zo  dx dy dz]
591         #  - PLANAR:       [xo yo zo  dx dy dz            nb_edges  nb_vertices]
592         #  - FACE:                                       [nb_edges  nb_vertices]
593         #
594         #  - CIRCLE:       [xc yc zc  dx dy dz  R]
595         #  - ARC_CIRCLE:   [xc yc zc  dx dy dz  R         x1 y1 z1  x2 y2 z2]
596         #  - ELLIPSE:      [xc yc zc  dx dy dz  R_1  R_2]
597         #  - ARC_ELLIPSE:  [xc yc zc  dx dy dz  R_1  R_2  x1 y1 z1  x2 y2 z2]
598         #  - LINE:         [xo yo zo  dx dy dz]
599         #  - SEGMENT:      [x1 y1 z1  x2 y2 z2]
600         #  - EDGE:                                                 [nb_vertices]
601         #
602         #  - VERTEX:       [x  y  z]
603         #  @ingroup l1_geomBuilder_auxiliary
604         kind = GEOM.GEOM_IKindOfShape
605
606         def __new__(cls):
607             global engine
608             global geom
609             global doLcc
610             global created
611             #print "==== __new__ ", engine, geom, doLcc, created
612             if geom is None:
613                 # geom engine is either retrieved from engine, or created
614                 geom = engine
615                 # Following test avoids a recursive loop
616                 if doLcc:
617                     if geom is not None:
618                         # geom engine not created: existing engine found
619                         doLcc = False
620                     if doLcc and not created:
621                         doLcc = False
622                         # FindOrLoadComponent called:
623                         # 1. CORBA resolution of server
624                         # 2. the __new__ method is called again
625                         #print "==== FindOrLoadComponent ", engine, geom, doLcc, created
626                         geom = lcc.FindOrLoadComponent( "FactoryServer", "GEOM" )
627                         #print "====1 ",geom
628                 else:
629                     # FindOrLoadComponent not called
630                     if geom is None:
631                         # geomBuilder instance is created from lcc.FindOrLoadComponent
632                         #print "==== super ", engine, geom, doLcc, created
633                         geom = super(geomBuilder,cls).__new__(cls)
634                         #print "====2 ",geom
635                     else:
636                         # geom engine not created: existing engine found
637                         #print "==== existing ", engine, geom, doLcc, created
638                         pass
639                 #print "return geom 1 ", geom
640                 return geom
641
642             #print "return geom 2 ", geom
643             return geom
644
645         def __init__(self):
646             global created
647             #print "-------- geomBuilder __init__ --- ", created, self
648             if not created:
649               created = True
650               GEOM._objref_GEOM_Gen.__init__(self)
651               self.myMaxNbSubShapesAllowed = 0 # auto-publishing is disabled by default
652               self.myBuilder = None
653               self.myStudyId = 0
654               self.father    = None
655
656               self.BasicOp  = None
657               self.CurvesOp = None
658               self.PrimOp   = None
659               self.ShapesOp = None
660               self.HealOp   = None
661               self.InsertOp = None
662               self.BoolOp   = None
663               self.TrsfOp   = None
664               self.LocalOp  = None
665               self.MeasuOp  = None
666               self.BlocksOp = None
667               self.GroupOp  = None
668               self.FieldOp  = None
669             pass
670
671         ## Process object publication in the study, as follows:
672         #  - if @a theName is specified (not None), the object is published in the study
673         #    with this name, not taking into account "auto-publishing" option;
674         #  - if @a theName is NOT specified, the object is published in the study
675         #    (using default name, which can be customized using @a theDefaultName parameter)
676         #    only if auto-publishing is switched on.
677         #
678         #  @param theObj  object, a subject for publishing
679         #  @param theName object name for study
680         #  @param theDefaultName default name for the auto-publishing
681         #
682         #  @sa addToStudyAuto()
683         def _autoPublish(self, theObj, theName, theDefaultName="noname"):
684             # ---
685             def _item_name(_names, _defname, _idx=-1):
686                 if not _names: _names = _defname
687                 if type(_names) in [types.ListType, types.TupleType]:
688                     if _idx >= 0:
689                         if _idx >= len(_names) or not _names[_idx]:
690                             if type(_defname) not in [types.ListType, types.TupleType]:
691                                 _name = "%s_%d"%(_defname, _idx+1)
692                             elif len(_defname) > 0 and _idx >= 0 and _idx < len(_defname):
693                                 _name = _defname[_idx]
694                             else:
695                                 _name = "%noname_%d"%(dn, _idx+1)
696                             pass
697                         else:
698                             _name = _names[_idx]
699                         pass
700                     else:
701                         # must be wrong  usage
702                         _name = _names[0]
703                     pass
704                 else:
705                     if _idx >= 0:
706                         _name = "%s_%d"%(_names, _idx+1)
707                     else:
708                         _name = _names
709                     pass
710                 return _name
711             # ---
712             def _publish( _name, _obj ):
713                 fatherObj = None
714                 if isinstance( _obj, GEOM._objref_GEOM_Field ):
715                     fatherObj = _obj.GetShape()
716                 elif isinstance( _obj, GEOM._objref_GEOM_FieldStep ):
717                     fatherObj = _obj.GetField()
718                 elif not _obj.IsMainShape():
719                     fatherObj = _obj.GetMainShape()
720                     pass
721                 if fatherObj and fatherObj.GetStudyEntry():
722                     self.addToStudyInFather(fatherObj, _obj, _name)
723                 else:
724                     self.addToStudy(_obj, _name)
725                     pass
726                 return
727             # ---
728             if not theObj:
729                 return # null object
730             if not theName and not self.myMaxNbSubShapesAllowed:
731                 return # nothing to do: auto-publishing is disabled
732             if not theName and not theDefaultName:
733                 return # neither theName nor theDefaultName is given
734             import types
735             if type(theObj) in [types.ListType, types.TupleType]:
736                 # list of objects is being published
737                 idx = 0
738                 for obj in theObj:
739                     if not obj: continue # bad object
740                     name = _item_name(theName, theDefaultName, idx)
741                     _publish( name, obj )
742                     idx = idx+1
743                     if not theName and idx == self.myMaxNbSubShapesAllowed: break
744                     pass
745                 pass
746             else:
747                 # single object is published
748                 name = _item_name(theName, theDefaultName)
749                 _publish( name, theObj )
750             pass
751
752         ## @addtogroup l1_geomBuilder_auxiliary
753         ## @{
754         def init_geom(self,theStudy):
755             self.myStudy = theStudy
756             self.myStudyId = self.myStudy._get_StudyId()
757             self.myBuilder = self.myStudy.NewBuilder()
758             self.father = self.myStudy.FindComponent("GEOM")
759             notebook.myStudy = theStudy
760             if self.father is None:
761                 self.father = self.myBuilder.NewComponent("GEOM")
762                 A1 = self.myBuilder.FindOrCreateAttribute(self.father, "AttributeName")
763                 FName = A1._narrow(SALOMEDS.AttributeName)
764                 FName.SetValue("Geometry")
765                 A2 = self.myBuilder.FindOrCreateAttribute(self.father, "AttributePixMap")
766                 aPixmap = A2._narrow(SALOMEDS.AttributePixMap)
767                 aPixmap.SetPixMap("ICON_OBJBROWSER_Geometry")
768                 self.myBuilder.DefineComponentInstance(self.father,self)
769                 pass
770             self.BasicOp  = self.GetIBasicOperations    (self.myStudyId)
771             self.CurvesOp = self.GetICurvesOperations   (self.myStudyId)
772             self.PrimOp   = self.GetI3DPrimOperations   (self.myStudyId)
773             self.ShapesOp = self.GetIShapesOperations   (self.myStudyId)
774             self.HealOp   = self.GetIHealingOperations  (self.myStudyId)
775             self.InsertOp = self.GetIInsertOperations   (self.myStudyId)
776             self.BoolOp   = self.GetIBooleanOperations  (self.myStudyId)
777             self.TrsfOp   = self.GetITransformOperations(self.myStudyId)
778             self.LocalOp  = self.GetILocalOperations    (self.myStudyId)
779             self.MeasuOp  = self.GetIMeasureOperations  (self.myStudyId)
780             self.BlocksOp = self.GetIBlocksOperations   (self.myStudyId)
781             self.GroupOp  = self.GetIGroupOperations    (self.myStudyId)
782             self.FieldOp  = self.GetIFieldOperations    (self.myStudyId)
783
784             # set GEOM as root in the use case tree
785             self.myUseCaseBuilder = self.myStudy.GetUseCaseBuilder()
786             self.myUseCaseBuilder.SetRootCurrent()
787             self.myUseCaseBuilder.Append(self.father)
788
789             # load data from the study file, if necessary
790             self.myBuilder.LoadWith(self.father, self)
791             pass
792
793         def GetPluginOperations(self, studyID, libraryName):
794             op = GEOM._objref_GEOM_Gen.GetPluginOperations(self, studyID, libraryName)
795             return op
796
797         ## Enable / disable results auto-publishing
798         #
799         #  The automatic publishing is managed in the following way:
800         #  - if @a maxNbSubShapes = 0, automatic publishing is disabled.
801         #  - if @a maxNbSubShapes = -1 (default), automatic publishing is enabled and
802         #  maximum number of sub-shapes allowed for publishing is unlimited; any negative
803         #  value passed as parameter has the same effect.
804         #  - if @a maxNbSubShapes is any positive value, automatic publishing is enabled and
805         #  maximum number of sub-shapes allowed for publishing is set to specified value.
806         #
807         #  @param maxNbSubShapes maximum number of sub-shapes allowed for publishing.
808         #  @ingroup l1_publish_data
809         def addToStudyAuto(self, maxNbSubShapes=-1):
810             """
811             Enable / disable results auto-publishing
812
813             The automatic publishing is managed in the following way:
814             - if @a maxNbSubShapes = 0, automatic publishing is disabled;
815             - if @a maxNbSubShapes = -1 (default), automatic publishing is enabled and
816             maximum number of sub-shapes allowed for publishing is unlimited; any negative
817             value passed as parameter has the same effect.
818             - if @a maxNbSubShapes is any positive value, automatic publishing is enabled and
819             maximum number of sub-shapes allowed for publishing is set to this value.
820
821             Parameters:
822                 maxNbSubShapes maximum number of sub-shapes allowed for publishing.
823
824             Example of usage:
825                 geompy.addToStudyAuto()   # enable auto-publishing
826                 geompy.MakeBoxDXDYDZ(100) # box is created and published with default name
827                 geompy.addToStudyAuto(0)  # disable auto-publishing
828             """
829             self.myMaxNbSubShapesAllowed = max(-1, maxNbSubShapes)
830             pass
831
832         ## Dump component to the Python script
833         #  This method overrides IDL function to allow default values for the parameters.
834         def DumpPython(self, theStudy, theIsPublished=True, theIsMultiFile=True):
835             """
836             Dump component to the Python script
837             This method overrides IDL function to allow default values for the parameters.
838             """
839             return GEOM._objref_GEOM_Gen.DumpPython(self, theStudy, theIsPublished, theIsMultiFile)
840
841         ## Get name for sub-shape aSubObj of shape aMainObj
842         #
843         # @ref swig_SubShapeName "Example"
844         @ManageTransactions("ShapesOp")
845         def SubShapeName(self,aSubObj, aMainObj):
846             """
847             Get name for sub-shape aSubObj of shape aMainObj
848             """
849             # Example: see GEOM_TestAll.py
850
851             #aSubId  = orb.object_to_string(aSubObj)
852             #aMainId = orb.object_to_string(aMainObj)
853             #index = gg.getIndexTopology(aSubId, aMainId)
854             #name = gg.getShapeTypeString(aSubId) + "_%d"%(index)
855             index = self.ShapesOp.GetTopologyIndex(aMainObj, aSubObj)
856             name = self.ShapesOp.GetShapeTypeString(aSubObj) + "_%d"%(index)
857             return name
858
859         ## Publish in study aShape with name aName
860         #
861         #  \param aShape the shape to be published
862         #  \param aName  the name for the shape
863         #  \param doRestoreSubShapes if True, finds and publishes also
864         #         sub-shapes of <VAR>aShape</VAR>, corresponding to its arguments
865         #         and published sub-shapes of arguments
866         #  \param theArgs,theFindMethod,theInheritFirstArg see RestoreSubShapes() for
867         #                                                  these arguments description
868         #  \return study entry of the published shape in form of string
869         #
870         #  @ingroup l1_publish_data
871         #  @ref swig_all_addtostudy "Example"
872         def addToStudy(self, aShape, aName, doRestoreSubShapes=False,
873                        theArgs=[], theFindMethod=GEOM.FSM_GetInPlace, theInheritFirstArg=False):
874             """
875             Publish in study aShape with name aName
876
877             Parameters:
878                 aShape the shape to be published
879                 aName  the name for the shape
880                 doRestoreSubShapes if True, finds and publishes also
881                                    sub-shapes of aShape, corresponding to its arguments
882                                    and published sub-shapes of arguments
883                 theArgs,theFindMethod,theInheritFirstArg see geompy.RestoreSubShapes() for
884                                                          these arguments description
885
886             Returns:
887                 study entry of the published shape in form of string
888
889             Example of usage:
890                 id_block1 = geompy.addToStudy(Block1, "Block 1")
891             """
892             # Example: see GEOM_TestAll.py
893             try:
894                 aSObject = self.AddInStudy(self.myStudy, aShape, aName, None)
895                 if aSObject and aName: aSObject.SetAttrString("AttributeName", aName)
896                 if doRestoreSubShapes:
897                     self.RestoreSubShapesSO(self.myStudy, aSObject, theArgs,
898                                             theFindMethod, theInheritFirstArg, True )
899             except:
900                 print "addToStudy() failed"
901                 return ""
902             return aShape.GetStudyEntry()
903
904         ## Publish in study aShape with name aName as sub-object of previously published aFather
905         #  \param aFather previously published object
906         #  \param aShape the shape to be published as sub-object of <VAR>aFather</VAR>
907         #  \param aName  the name for the shape
908         #
909         #  \return study entry of the published shape in form of string
910         #
911         #  @ingroup l1_publish_data
912         #  @ref swig_all_addtostudyInFather "Example"
913         def addToStudyInFather(self, aFather, aShape, aName):
914             """
915             Publish in study aShape with name aName as sub-object of previously published aFather
916
917             Parameters:
918                 aFather previously published object
919                 aShape the shape to be published as sub-object of aFather
920                 aName  the name for the shape
921
922             Returns:
923                 study entry of the published shape in form of string
924             """
925             # Example: see GEOM_TestAll.py
926             try:
927                 aSObject = self.AddInStudy(self.myStudy, aShape, aName, aFather)
928                 if aSObject and aName: aSObject.SetAttrString("AttributeName", aName)
929             except:
930                 print "addToStudyInFather() failed"
931                 return ""
932             return aShape.GetStudyEntry()
933
934         ## Unpublish object in study
935         #
936         #  \param obj the object to be unpublished
937         def hideInStudy(self, obj):
938             """
939             Unpublish object in study
940
941             Parameters:
942                 obj the object to be unpublished
943             """
944             ior = salome.orb.object_to_string(obj)
945             aSObject = self.myStudy.FindObjectIOR(ior)
946             if aSObject is not None:
947                 genericAttribute = self.myBuilder.FindOrCreateAttribute(aSObject, "AttributeDrawable")
948                 drwAttribute = genericAttribute._narrow(SALOMEDS.AttributeDrawable)
949                 drwAttribute.SetDrawable(False)
950                 # hide references if any
951                 vso = self.myStudy.FindDependances(aSObject);
952                 for refObj in vso :
953                     genericAttribute = self.myBuilder.FindOrCreateAttribute(refObj, "AttributeDrawable")
954                     drwAttribute = genericAttribute._narrow(SALOMEDS.AttributeDrawable)
955                     drwAttribute.SetDrawable(False)
956                     pass
957                 pass
958
959         # end of l1_geomBuilder_auxiliary
960         ## @}
961
962         ## @addtogroup l3_restore_ss
963         ## @{
964
965         ## Publish sub-shapes, standing for arguments and sub-shapes of arguments
966         #  To be used from python scripts out of addToStudy() (non-default usage)
967         #  \param theObject published GEOM.GEOM_Object, arguments of which will be published
968         #  \param theArgs   list of GEOM.GEOM_Object, operation arguments to be published.
969         #                   If this list is empty, all operation arguments will be published
970         #  \param theFindMethod method to search sub-shapes, corresponding to arguments and
971         #                       their sub-shapes. Value from enumeration GEOM.find_shape_method.
972         #  \param theInheritFirstArg set properties of the first argument for <VAR>theObject</VAR>.
973         #                            Do not publish sub-shapes in place of arguments, but only
974         #                            in place of sub-shapes of the first argument,
975         #                            because the whole shape corresponds to the first argument.
976         #                            Mainly to be used after transformations, but it also can be
977         #                            usefull after partition with one object shape, and some other
978         #                            operations, where only the first argument has to be considered.
979         #                            If theObject has only one argument shape, this flag is automatically
980         #                            considered as True, not regarding really passed value.
981         #  \param theAddPrefix add prefix "from_" to names of restored sub-shapes,
982         #                      and prefix "from_subshapes_of_" to names of partially restored sub-shapes.
983         #  \return list of published sub-shapes
984         #
985         #  @ref tui_restore_prs_params "Example"
986         def RestoreSubShapes (self, theObject, theArgs=[], theFindMethod=GEOM.FSM_GetInPlace,
987                               theInheritFirstArg=False, theAddPrefix=True):
988             """
989             Publish sub-shapes, standing for arguments and sub-shapes of arguments
990             To be used from python scripts out of geompy.addToStudy (non-default usage)
991
992             Parameters:
993                 theObject published GEOM.GEOM_Object, arguments of which will be published
994                 theArgs   list of GEOM.GEOM_Object, operation arguments to be published.
995                           If this list is empty, all operation arguments will be published
996                 theFindMethod method to search sub-shapes, corresponding to arguments and
997                               their sub-shapes. Value from enumeration GEOM.find_shape_method.
998                 theInheritFirstArg set properties of the first argument for theObject.
999                                    Do not publish sub-shapes in place of arguments, but only
1000                                    in place of sub-shapes of the first argument,
1001                                    because the whole shape corresponds to the first argument.
1002                                    Mainly to be used after transformations, but it also can be
1003                                    usefull after partition with one object shape, and some other
1004                                    operations, where only the first argument has to be considered.
1005                                    If theObject has only one argument shape, this flag is automatically
1006                                    considered as True, not regarding really passed value.
1007                 theAddPrefix add prefix "from_" to names of restored sub-shapes,
1008                              and prefix "from_subshapes_of_" to names of partially restored sub-shapes.
1009             Returns:
1010                 list of published sub-shapes
1011             """
1012             # Example: see GEOM_TestAll.py
1013             return self.RestoreSubShapesO(self.myStudy, theObject, theArgs,
1014                                           theFindMethod, theInheritFirstArg, theAddPrefix)
1015
1016         ## Publish sub-shapes, standing for arguments and sub-shapes of arguments
1017         #  To be used from python scripts out of addToStudy() (non-default usage)
1018         #  \param theObject published GEOM.GEOM_Object, arguments of which will be published
1019         #  \param theArgs   list of GEOM.GEOM_Object, operation arguments to be published.
1020         #                   If this list is empty, all operation arguments will be published
1021         #  \param theFindMethod method to search sub-shapes, corresponding to arguments and
1022         #                       their sub-shapes. Value from enumeration GEOM::find_shape_method.
1023         #  \param theInheritFirstArg set properties of the first argument for <VAR>theObject</VAR>.
1024         #                            Do not publish sub-shapes in place of arguments, but only
1025         #                            in place of sub-shapes of the first argument,
1026         #                            because the whole shape corresponds to the first argument.
1027         #                            Mainly to be used after transformations, but it also can be
1028         #                            usefull after partition with one object shape, and some other
1029         #                            operations, where only the first argument has to be considered.
1030         #                            If theObject has only one argument shape, this flag is automatically
1031         #                            considered as True, not regarding really passed value.
1032         #  \param theAddPrefix add prefix "from_" to names of restored sub-shapes,
1033         #                      and prefix "from_subshapes_of_" to names of partially restored sub-shapes.
1034         #  \return list of published sub-shapes
1035         #
1036         #  @ref tui_restore_prs_params "Example"
1037         def RestoreGivenSubShapes (self, theObject, theArgs=[], theFindMethod=GEOM.FSM_GetInPlace,
1038                                    theInheritFirstArg=False, theAddPrefix=True):
1039             """
1040             Publish sub-shapes, standing for arguments and sub-shapes of arguments
1041             To be used from python scripts out of geompy.addToStudy() (non-default usage)
1042
1043             Parameters:
1044                 theObject published GEOM.GEOM_Object, arguments of which will be published
1045                 theArgs   list of GEOM.GEOM_Object, operation arguments to be published.
1046                           If this list is empty, all operation arguments will be published
1047                 theFindMethod method to search sub-shapes, corresponding to arguments and
1048                               their sub-shapes. Value from enumeration GEOM::find_shape_method.
1049                 theInheritFirstArg set properties of the first argument for theObject.
1050                                    Do not publish sub-shapes in place of arguments, but only
1051                                    in place of sub-shapes of the first argument,
1052                                    because the whole shape corresponds to the first argument.
1053                                    Mainly to be used after transformations, but it also can be
1054                                    usefull after partition with one object shape, and some other
1055                                    operations, where only the first argument has to be considered.
1056                                    If theObject has only one argument shape, this flag is automatically
1057                                    considered as True, not regarding really passed value.
1058                 theAddPrefix add prefix "from_" to names of restored sub-shapes,
1059                              and prefix "from_subshapes_of_" to names of partially restored sub-shapes.
1060
1061             Returns:
1062                 list of published sub-shapes
1063             """
1064             # Example: see GEOM_TestAll.py
1065             return self.RestoreGivenSubShapesO(self.myStudy, theObject, theArgs,
1066                                                theFindMethod, theInheritFirstArg, theAddPrefix)
1067
1068         # end of l3_restore_ss
1069         ## @}
1070
1071         ## @addtogroup l3_basic_go
1072         ## @{
1073
1074         ## Create point by three coordinates.
1075         #  @param theX The X coordinate of the point.
1076         #  @param theY The Y coordinate of the point.
1077         #  @param theZ The Z coordinate of the point.
1078         #  @param theName Object name; when specified, this parameter is used
1079         #         for result publication in the study. Otherwise, if automatic
1080         #         publication is switched on, default value is used for result name.
1081         #
1082         #  @return New GEOM.GEOM_Object, containing the created point.
1083         #
1084         #  @ref tui_creation_point "Example"
1085         @ManageTransactions("BasicOp")
1086         def MakeVertex(self, theX, theY, theZ, theName=None):
1087             """
1088             Create point by three coordinates.
1089
1090             Parameters:
1091                 theX The X coordinate of the point.
1092                 theY The Y coordinate of the point.
1093                 theZ The Z coordinate of the point.
1094                 theName Object name; when specified, this parameter is used
1095                         for result publication in the study. Otherwise, if automatic
1096                         publication is switched on, default value is used for result name.
1097
1098             Returns:
1099                 New GEOM.GEOM_Object, containing the created point.
1100             """
1101             # Example: see GEOM_TestAll.py
1102             theX,theY,theZ,Parameters = ParseParameters(theX, theY, theZ)
1103             anObj = self.BasicOp.MakePointXYZ(theX, theY, theZ)
1104             RaiseIfFailed("MakePointXYZ", self.BasicOp)
1105             anObj.SetParameters(Parameters)
1106             self._autoPublish(anObj, theName, "vertex")
1107             return anObj
1108
1109         ## Create a point, distant from the referenced point
1110         #  on the given distances along the coordinate axes.
1111         #  @param theReference The referenced point.
1112         #  @param theX Displacement from the referenced point along OX axis.
1113         #  @param theY Displacement from the referenced point along OY axis.
1114         #  @param theZ Displacement from the referenced point along OZ axis.
1115         #  @param theName Object name; when specified, this parameter is used
1116         #         for result publication in the study. Otherwise, if automatic
1117         #         publication is switched on, default value is used for result name.
1118         #
1119         #  @return New GEOM.GEOM_Object, containing the created point.
1120         #
1121         #  @ref tui_creation_point "Example"
1122         @ManageTransactions("BasicOp")
1123         def MakeVertexWithRef(self, theReference, theX, theY, theZ, theName=None):
1124             """
1125             Create a point, distant from the referenced point
1126             on the given distances along the coordinate axes.
1127
1128             Parameters:
1129                 theReference The referenced point.
1130                 theX Displacement from the referenced point along OX axis.
1131                 theY Displacement from the referenced point along OY axis.
1132                 theZ Displacement from the referenced point along OZ axis.
1133                 theName Object name; when specified, this parameter is used
1134                         for result publication in the study. Otherwise, if automatic
1135                         publication is switched on, default value is used for result name.
1136
1137             Returns:
1138                 New GEOM.GEOM_Object, containing the created point.
1139             """
1140             # Example: see GEOM_TestAll.py
1141             theX,theY,theZ,Parameters = ParseParameters(theX, theY, theZ)
1142             anObj = self.BasicOp.MakePointWithReference(theReference, theX, theY, theZ)
1143             RaiseIfFailed("MakePointWithReference", self.BasicOp)
1144             anObj.SetParameters(Parameters)
1145             self._autoPublish(anObj, theName, "vertex")
1146             return anObj
1147
1148         ## Create a point, corresponding to the given parameter on the given curve.
1149         #  @param theRefCurve The referenced curve.
1150         #  @param theParameter Value of parameter on the referenced curve.
1151         #  @param theName Object name; when specified, this parameter is used
1152         #         for result publication in the study. Otherwise, if automatic
1153         #         publication is switched on, default value is used for result name.
1154         #
1155         #  @return New GEOM.GEOM_Object, containing the created point.
1156         #
1157         #  @ref tui_creation_point "Example"
1158         @ManageTransactions("BasicOp")
1159         def MakeVertexOnCurve(self, theRefCurve, theParameter, theName=None):
1160             """
1161             Create a point, corresponding to the given parameter on the given curve.
1162
1163             Parameters:
1164                 theRefCurve The referenced curve.
1165                 theParameter Value of parameter on the referenced curve.
1166                 theName Object name; when specified, this parameter is used
1167                         for result publication in the study. Otherwise, if automatic
1168                         publication is switched on, default value is used for result name.
1169
1170             Returns:
1171                 New GEOM.GEOM_Object, containing the created point.
1172
1173             Example of usage:
1174                 p_on_arc = geompy.MakeVertexOnCurve(Arc, 0.25)
1175             """
1176             # Example: see GEOM_TestAll.py
1177             theParameter, Parameters = ParseParameters(theParameter)
1178             anObj = self.BasicOp.MakePointOnCurve(theRefCurve, theParameter)
1179             RaiseIfFailed("MakePointOnCurve", self.BasicOp)
1180             anObj.SetParameters(Parameters)
1181             self._autoPublish(anObj, theName, "vertex")
1182             return anObj
1183
1184         ## Create a point by projection give coordinates on the given curve
1185         #  @param theRefCurve The referenced curve.
1186         #  @param theX X-coordinate in 3D space
1187         #  @param theY Y-coordinate in 3D space
1188         #  @param theZ Z-coordinate in 3D space
1189         #  @param theName Object name; when specified, this parameter is used
1190         #         for result publication in the study. Otherwise, if automatic
1191         #         publication is switched on, default value is used for result name.
1192         #
1193         #  @return New GEOM.GEOM_Object, containing the created point.
1194         #
1195         #  @ref tui_creation_point "Example"
1196         @ManageTransactions("BasicOp")
1197         def MakeVertexOnCurveByCoord(self, theRefCurve, theX, theY, theZ, theName=None):
1198             """
1199             Create a point by projection give coordinates on the given curve
1200
1201             Parameters:
1202                 theRefCurve The referenced curve.
1203                 theX X-coordinate in 3D space
1204                 theY Y-coordinate in 3D space
1205                 theZ Z-coordinate in 3D space
1206                 theName Object name; when specified, this parameter is used
1207                         for result publication in the study. Otherwise, if automatic
1208                         publication is switched on, default value is used for result name.
1209
1210             Returns:
1211                 New GEOM.GEOM_Object, containing the created point.
1212
1213             Example of usage:
1214                 p_on_arc3 = geompy.MakeVertexOnCurveByCoord(Arc, 100, -10, 10)
1215             """
1216             # Example: see GEOM_TestAll.py
1217             theX, theY, theZ, Parameters = ParseParameters(theX, theY, theZ)
1218             anObj = self.BasicOp.MakePointOnCurveByCoord(theRefCurve, theX, theY, theZ)
1219             RaiseIfFailed("MakeVertexOnCurveByCoord", self.BasicOp)
1220             anObj.SetParameters(Parameters)
1221             self._autoPublish(anObj, theName, "vertex")
1222             return anObj
1223
1224         ## Create a point, corresponding to the given length on the given curve.
1225         #  @param theRefCurve The referenced curve.
1226         #  @param theLength Length on the referenced curve. It can be negative.
1227         #  @param theStartPoint Point allowing to choose the direction for the calculation
1228         #                       of the length. If None, start from the first point of theRefCurve.
1229         #  @param theName Object name; when specified, this parameter is used
1230         #         for result publication in the study. Otherwise, if automatic
1231         #         publication is switched on, default value is used for result name.
1232         #
1233         #  @return New GEOM.GEOM_Object, containing the created point.
1234         #
1235         #  @ref tui_creation_point "Example"
1236         @ManageTransactions("BasicOp")
1237         def MakeVertexOnCurveByLength(self, theRefCurve, theLength, theStartPoint = None, theName=None):
1238             """
1239             Create a point, corresponding to the given length on the given curve.
1240
1241             Parameters:
1242                 theRefCurve The referenced curve.
1243                 theLength Length on the referenced curve. It can be negative.
1244                 theStartPoint Point allowing to choose the direction for the calculation
1245                               of the length. If None, start from the first point of theRefCurve.
1246                 theName Object name; when specified, this parameter is used
1247                         for result publication in the study. Otherwise, if automatic
1248                         publication is switched on, default value is used for result name.
1249
1250             Returns:
1251                 New GEOM.GEOM_Object, containing the created point.
1252             """
1253             # Example: see GEOM_TestAll.py
1254             theLength, Parameters = ParseParameters(theLength)
1255             anObj = self.BasicOp.MakePointOnCurveByLength(theRefCurve, theLength, theStartPoint)
1256             RaiseIfFailed("MakePointOnCurveByLength", self.BasicOp)
1257             anObj.SetParameters(Parameters)
1258             self._autoPublish(anObj, theName, "vertex")
1259             return anObj
1260
1261         ## Create a point, corresponding to the given parameters on the
1262         #    given surface.
1263         #  @param theRefSurf The referenced surface.
1264         #  @param theUParameter Value of U-parameter on the referenced surface.
1265         #  @param theVParameter Value of V-parameter on the referenced surface.
1266         #  @param theName Object name; when specified, this parameter is used
1267         #         for result publication in the study. Otherwise, if automatic
1268         #         publication is switched on, default value is used for result name.
1269         #
1270         #  @return New GEOM.GEOM_Object, containing the created point.
1271         #
1272         #  @ref swig_MakeVertexOnSurface "Example"
1273         @ManageTransactions("BasicOp")
1274         def MakeVertexOnSurface(self, theRefSurf, theUParameter, theVParameter, theName=None):
1275             """
1276             Create a point, corresponding to the given parameters on the
1277             given surface.
1278
1279             Parameters:
1280                 theRefSurf The referenced surface.
1281                 theUParameter Value of U-parameter on the referenced surface.
1282                 theVParameter Value of V-parameter on the referenced surface.
1283                 theName Object name; when specified, this parameter is used
1284                         for result publication in the study. Otherwise, if automatic
1285                         publication is switched on, default value is used for result name.
1286
1287             Returns:
1288                 New GEOM.GEOM_Object, containing the created point.
1289
1290             Example of usage:
1291                 p_on_face = geompy.MakeVertexOnSurface(Face, 0.1, 0.8)
1292             """
1293             theUParameter, theVParameter, Parameters = ParseParameters(theUParameter, theVParameter)
1294             # Example: see GEOM_TestAll.py
1295             anObj = self.BasicOp.MakePointOnSurface(theRefSurf, theUParameter, theVParameter)
1296             RaiseIfFailed("MakePointOnSurface", self.BasicOp)
1297             anObj.SetParameters(Parameters);
1298             self._autoPublish(anObj, theName, "vertex")
1299             return anObj
1300
1301         ## Create a point by projection give coordinates on the given surface
1302         #  @param theRefSurf The referenced surface.
1303         #  @param theX X-coordinate in 3D space
1304         #  @param theY Y-coordinate in 3D space
1305         #  @param theZ Z-coordinate in 3D space
1306         #  @param theName Object name; when specified, this parameter is used
1307         #         for result publication in the study. Otherwise, if automatic
1308         #         publication is switched on, default value is used for result name.
1309         #
1310         #  @return New GEOM.GEOM_Object, containing the created point.
1311         #
1312         #  @ref swig_MakeVertexOnSurfaceByCoord "Example"
1313         @ManageTransactions("BasicOp")
1314         def MakeVertexOnSurfaceByCoord(self, theRefSurf, theX, theY, theZ, theName=None):
1315             """
1316             Create a point by projection give coordinates on the given surface
1317
1318             Parameters:
1319                 theRefSurf The referenced surface.
1320                 theX X-coordinate in 3D space
1321                 theY Y-coordinate in 3D space
1322                 theZ Z-coordinate in 3D space
1323                 theName Object name; when specified, this parameter is used
1324                         for result publication in the study. Otherwise, if automatic
1325                         publication is switched on, default value is used for result name.
1326
1327             Returns:
1328                 New GEOM.GEOM_Object, containing the created point.
1329
1330             Example of usage:
1331                 p_on_face2 = geompy.MakeVertexOnSurfaceByCoord(Face, 0., 0., 0.)
1332             """
1333             theX, theY, theZ, Parameters = ParseParameters(theX, theY, theZ)
1334             # Example: see GEOM_TestAll.py
1335             anObj = self.BasicOp.MakePointOnSurfaceByCoord(theRefSurf, theX, theY, theZ)
1336             RaiseIfFailed("MakeVertexOnSurfaceByCoord", self.BasicOp)
1337             anObj.SetParameters(Parameters);
1338             self._autoPublish(anObj, theName, "vertex")
1339             return anObj
1340
1341         ## Create a point, which lays on the given face.
1342         #  The point will lay in arbitrary place of the face.
1343         #  The only condition on it is a non-zero distance to the face boundary.
1344         #  Such point can be used to uniquely identify the face inside any
1345         #  shape in case, when the shape does not contain overlapped faces.
1346         #  @param theFace The referenced face.
1347         #  @param theName Object name; when specified, this parameter is used
1348         #         for result publication in the study. Otherwise, if automatic
1349         #         publication is switched on, default value is used for result name.
1350         #
1351         #  @return New GEOM.GEOM_Object, containing the created point.
1352         #
1353         #  @ref swig_MakeVertexInsideFace "Example"
1354         @ManageTransactions("BasicOp")
1355         def MakeVertexInsideFace (self, theFace, theName=None):
1356             """
1357             Create a point, which lays on the given face.
1358             The point will lay in arbitrary place of the face.
1359             The only condition on it is a non-zero distance to the face boundary.
1360             Such point can be used to uniquely identify the face inside any
1361             shape in case, when the shape does not contain overlapped faces.
1362
1363             Parameters:
1364                 theFace The referenced face.
1365                 theName Object name; when specified, this parameter is used
1366                         for result publication in the study. Otherwise, if automatic
1367                         publication is switched on, default value is used for result name.
1368
1369             Returns:
1370                 New GEOM.GEOM_Object, containing the created point.
1371
1372             Example of usage:
1373                 p_on_face = geompy.MakeVertexInsideFace(Face)
1374             """
1375             # Example: see GEOM_TestAll.py
1376             anObj = self.BasicOp.MakePointOnFace(theFace)
1377             RaiseIfFailed("MakeVertexInsideFace", self.BasicOp)
1378             self._autoPublish(anObj, theName, "vertex")
1379             return anObj
1380
1381         ## Create a point on intersection of two lines.
1382         #  @param theRefLine1, theRefLine2 The referenced lines.
1383         #  @param theName Object name; when specified, this parameter is used
1384         #         for result publication in the study. Otherwise, if automatic
1385         #         publication is switched on, default value is used for result name.
1386         #
1387         #  @return New GEOM.GEOM_Object, containing the created point.
1388         #
1389         #  @ref swig_MakeVertexOnLinesIntersection "Example"
1390         @ManageTransactions("BasicOp")
1391         def MakeVertexOnLinesIntersection(self, theRefLine1, theRefLine2, theName=None):
1392             """
1393             Create a point on intersection of two lines.
1394
1395             Parameters:
1396                 theRefLine1, theRefLine2 The referenced lines.
1397                 theName Object name; when specified, this parameter is used
1398                         for result publication in the study. Otherwise, if automatic
1399                         publication is switched on, default value is used for result name.
1400
1401             Returns:
1402                 New GEOM.GEOM_Object, containing the created point.
1403             """
1404             # Example: see GEOM_TestAll.py
1405             anObj = self.BasicOp.MakePointOnLinesIntersection(theRefLine1, theRefLine2)
1406             RaiseIfFailed("MakePointOnLinesIntersection", self.BasicOp)
1407             self._autoPublish(anObj, theName, "vertex")
1408             return anObj
1409
1410         ## Create a tangent, corresponding to the given parameter on the given curve.
1411         #  @param theRefCurve The referenced curve.
1412         #  @param theParameter Value of parameter on the referenced curve.
1413         #  @param theName Object name; when specified, this parameter is used
1414         #         for result publication in the study. Otherwise, if automatic
1415         #         publication is switched on, default value is used for result name.
1416         #
1417         #  @return New GEOM.GEOM_Object, containing the created tangent.
1418         #
1419         #  @ref swig_MakeTangentOnCurve "Example"
1420         @ManageTransactions("BasicOp")
1421         def MakeTangentOnCurve(self, theRefCurve, theParameter, theName=None):
1422             """
1423             Create a tangent, corresponding to the given parameter on the given curve.
1424
1425             Parameters:
1426                 theRefCurve The referenced curve.
1427                 theParameter Value of parameter on the referenced curve.
1428                 theName Object name; when specified, this parameter is used
1429                         for result publication in the study. Otherwise, if automatic
1430                         publication is switched on, default value is used for result name.
1431
1432             Returns:
1433                 New GEOM.GEOM_Object, containing the created tangent.
1434
1435             Example of usage:
1436                 tan_on_arc = geompy.MakeTangentOnCurve(Arc, 0.7)
1437             """
1438             anObj = self.BasicOp.MakeTangentOnCurve(theRefCurve, theParameter)
1439             RaiseIfFailed("MakeTangentOnCurve", self.BasicOp)
1440             self._autoPublish(anObj, theName, "tangent")
1441             return anObj
1442
1443         ## Create a tangent plane, corresponding to the given parameter on the given face.
1444         #  @param theFace The face for which tangent plane should be built.
1445         #  @param theParameterV vertical value of the center point (0.0 - 1.0).
1446         #  @param theParameterU horisontal value of the center point (0.0 - 1.0).
1447         #  @param theTrimSize the size of plane.
1448         #  @param theName Object name; when specified, this parameter is used
1449         #         for result publication in the study. Otherwise, if automatic
1450         #         publication is switched on, default value is used for result name.
1451         #
1452         #  @return New GEOM.GEOM_Object, containing the created tangent.
1453         #
1454         #  @ref swig_MakeTangentPlaneOnFace "Example"
1455         @ManageTransactions("BasicOp")
1456         def MakeTangentPlaneOnFace(self, theFace, theParameterU, theParameterV, theTrimSize, theName=None):
1457             """
1458             Create a tangent plane, corresponding to the given parameter on the given face.
1459
1460             Parameters:
1461                 theFace The face for which tangent plane should be built.
1462                 theParameterV vertical value of the center point (0.0 - 1.0).
1463                 theParameterU horisontal value of the center point (0.0 - 1.0).
1464                 theTrimSize the size of plane.
1465                 theName Object name; when specified, this parameter is used
1466                         for result publication in the study. Otherwise, if automatic
1467                         publication is switched on, default value is used for result name.
1468
1469            Returns:
1470                 New GEOM.GEOM_Object, containing the created tangent.
1471
1472            Example of usage:
1473                 an_on_face = geompy.MakeTangentPlaneOnFace(tan_extrusion, 0.7, 0.5, 150)
1474             """
1475             anObj = self.BasicOp.MakeTangentPlaneOnFace(theFace, theParameterU, theParameterV, theTrimSize)
1476             RaiseIfFailed("MakeTangentPlaneOnFace", self.BasicOp)
1477             self._autoPublish(anObj, theName, "tangent")
1478             return anObj
1479
1480         ## Create a vector with the given components.
1481         #  @param theDX X component of the vector.
1482         #  @param theDY Y component of the vector.
1483         #  @param theDZ Z component of the vector.
1484         #  @param theName Object name; when specified, this parameter is used
1485         #         for result publication in the study. Otherwise, if automatic
1486         #         publication is switched on, default value is used for result name.
1487         #
1488         #  @return New GEOM.GEOM_Object, containing the created vector.
1489         #
1490         #  @ref tui_creation_vector "Example"
1491         @ManageTransactions("BasicOp")
1492         def MakeVectorDXDYDZ(self, theDX, theDY, theDZ, theName=None):
1493             """
1494             Create a vector with the given components.
1495
1496             Parameters:
1497                 theDX X component of the vector.
1498                 theDY Y component of the vector.
1499                 theDZ Z component of the vector.
1500                 theName Object name; when specified, this parameter is used
1501                         for result publication in the study. Otherwise, if automatic
1502                         publication is switched on, default value is used for result name.
1503
1504             Returns:
1505                 New GEOM.GEOM_Object, containing the created vector.
1506             """
1507             # Example: see GEOM_TestAll.py
1508             theDX,theDY,theDZ,Parameters = ParseParameters(theDX, theDY, theDZ)
1509             anObj = self.BasicOp.MakeVectorDXDYDZ(theDX, theDY, theDZ)
1510             RaiseIfFailed("MakeVectorDXDYDZ", self.BasicOp)
1511             anObj.SetParameters(Parameters)
1512             self._autoPublish(anObj, theName, "vector")
1513             return anObj
1514
1515         ## Create a vector between two points.
1516         #  @param thePnt1 Start point for the vector.
1517         #  @param thePnt2 End point for the vector.
1518         #  @param theName Object name; when specified, this parameter is used
1519         #         for result publication in the study. Otherwise, if automatic
1520         #         publication is switched on, default value is used for result name.
1521         #
1522         #  @return New GEOM.GEOM_Object, containing the created vector.
1523         #
1524         #  @ref tui_creation_vector "Example"
1525         @ManageTransactions("BasicOp")
1526         def MakeVector(self, thePnt1, thePnt2, theName=None):
1527             """
1528             Create a vector between two points.
1529
1530             Parameters:
1531                 thePnt1 Start point for the vector.
1532                 thePnt2 End point for the vector.
1533                 theName Object name; when specified, this parameter is used
1534                         for result publication in the study. Otherwise, if automatic
1535                         publication is switched on, default value is used for result name.
1536
1537             Returns:
1538                 New GEOM.GEOM_Object, containing the created vector.
1539             """
1540             # Example: see GEOM_TestAll.py
1541             anObj = self.BasicOp.MakeVectorTwoPnt(thePnt1, thePnt2)
1542             RaiseIfFailed("MakeVectorTwoPnt", self.BasicOp)
1543             self._autoPublish(anObj, theName, "vector")
1544             return anObj
1545
1546         ## Create a line, passing through the given point
1547         #  and parrallel to the given direction
1548         #  @param thePnt Point. The resulting line will pass through it.
1549         #  @param theDir Direction. The resulting line will be parallel to it.
1550         #  @param theName Object name; when specified, this parameter is used
1551         #         for result publication in the study. Otherwise, if automatic
1552         #         publication is switched on, default value is used for result name.
1553         #
1554         #  @return New GEOM.GEOM_Object, containing the created line.
1555         #
1556         #  @ref tui_creation_line "Example"
1557         @ManageTransactions("BasicOp")
1558         def MakeLine(self, thePnt, theDir, theName=None):
1559             """
1560             Create a line, passing through the given point
1561             and parrallel to the given direction
1562
1563             Parameters:
1564                 thePnt Point. The resulting line will pass through it.
1565                 theDir Direction. The resulting line will be parallel to it.
1566                 theName Object name; when specified, this parameter is used
1567                         for result publication in the study. Otherwise, if automatic
1568                         publication is switched on, default value is used for result name.
1569
1570             Returns:
1571                 New GEOM.GEOM_Object, containing the created line.
1572             """
1573             # Example: see GEOM_TestAll.py
1574             anObj = self.BasicOp.MakeLine(thePnt, theDir)
1575             RaiseIfFailed("MakeLine", self.BasicOp)
1576             self._autoPublish(anObj, theName, "line")
1577             return anObj
1578
1579         ## Create a line, passing through the given points
1580         #  @param thePnt1 First of two points, defining the line.
1581         #  @param thePnt2 Second of two points, defining the line.
1582         #  @param theName Object name; when specified, this parameter is used
1583         #         for result publication in the study. Otherwise, if automatic
1584         #         publication is switched on, default value is used for result name.
1585         #
1586         #  @return New GEOM.GEOM_Object, containing the created line.
1587         #
1588         #  @ref tui_creation_line "Example"
1589         @ManageTransactions("BasicOp")
1590         def MakeLineTwoPnt(self, thePnt1, thePnt2, theName=None):
1591             """
1592             Create a line, passing through the given points
1593
1594             Parameters:
1595                 thePnt1 First of two points, defining the line.
1596                 thePnt2 Second of two points, defining the line.
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 line.
1603             """
1604             # Example: see GEOM_TestAll.py
1605             anObj = self.BasicOp.MakeLineTwoPnt(thePnt1, thePnt2)
1606             RaiseIfFailed("MakeLineTwoPnt", self.BasicOp)
1607             self._autoPublish(anObj, theName, "line")
1608             return anObj
1609
1610         ## Create a line on two faces intersection.
1611         #  @param theFace1 First of two faces, defining the line.
1612         #  @param theFace2 Second of two faces, defining the line.
1613         #  @param theName Object name; when specified, this parameter is used
1614         #         for result publication in the study. Otherwise, if automatic
1615         #         publication is switched on, default value is used for result name.
1616         #
1617         #  @return New GEOM.GEOM_Object, containing the created line.
1618         #
1619         #  @ref swig_MakeLineTwoFaces "Example"
1620         @ManageTransactions("BasicOp")
1621         def MakeLineTwoFaces(self, theFace1, theFace2, theName=None):
1622             """
1623             Create a line on two faces intersection.
1624
1625             Parameters:
1626                 theFace1 First of two faces, defining the line.
1627                 theFace2 Second of two faces, defining the line.
1628                 theName Object name; when specified, this parameter is used
1629                         for result publication in the study. Otherwise, if automatic
1630                         publication is switched on, default value is used for result name.
1631
1632             Returns:
1633                 New GEOM.GEOM_Object, containing the created line.
1634             """
1635             # Example: see GEOM_TestAll.py
1636             anObj = self.BasicOp.MakeLineTwoFaces(theFace1, theFace2)
1637             RaiseIfFailed("MakeLineTwoFaces", self.BasicOp)
1638             self._autoPublish(anObj, theName, "line")
1639             return anObj
1640
1641         ## Create a plane, passing through the given point
1642         #  and normal to the given vector.
1643         #  @param thePnt Point, the plane has to pass through.
1644         #  @param theVec Vector, defining the plane normal direction.
1645         #  @param theTrimSize Half size of a side of quadrangle face, representing the plane.
1646         #  @param theName Object name; when specified, this parameter is used
1647         #         for result publication in the study. Otherwise, if automatic
1648         #         publication is switched on, default value is used for result name.
1649         #
1650         #  @return New GEOM.GEOM_Object, containing the created plane.
1651         #
1652         #  @ref tui_creation_plane "Example"
1653         @ManageTransactions("BasicOp")
1654         def MakePlane(self, thePnt, theVec, theTrimSize, theName=None):
1655             """
1656             Create a plane, passing through the given point
1657             and normal to the given vector.
1658
1659             Parameters:
1660                 thePnt Point, the plane has to pass through.
1661                 theVec Vector, defining the plane normal direction.
1662                 theTrimSize Half size of a side of quadrangle face, representing the plane.
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 plane.
1669             """
1670             # Example: see GEOM_TestAll.py
1671             theTrimSize, Parameters = ParseParameters(theTrimSize);
1672             anObj = self.BasicOp.MakePlanePntVec(thePnt, theVec, theTrimSize)
1673             RaiseIfFailed("MakePlanePntVec", self.BasicOp)
1674             anObj.SetParameters(Parameters)
1675             self._autoPublish(anObj, theName, "plane")
1676             return anObj
1677
1678         ## Create a plane, passing through the three given points
1679         #  @param thePnt1 First of three points, defining the plane.
1680         #  @param thePnt2 Second of three points, defining the plane.
1681         #  @param thePnt3 Fird of three points, defining the plane.
1682         #  @param theTrimSize Half size of a side of quadrangle face, representing the plane.
1683         #  @param theName Object name; when specified, this parameter is used
1684         #         for result publication in the study. Otherwise, if automatic
1685         #         publication is switched on, default value is used for result name.
1686         #
1687         #  @return New GEOM.GEOM_Object, containing the created plane.
1688         #
1689         #  @ref tui_creation_plane "Example"
1690         @ManageTransactions("BasicOp")
1691         def MakePlaneThreePnt(self, thePnt1, thePnt2, thePnt3, theTrimSize, theName=None):
1692             """
1693             Create a plane, passing through the three given points
1694
1695             Parameters:
1696                 thePnt1 First of three points, defining the plane.
1697                 thePnt2 Second of three points, defining the plane.
1698                 thePnt3 Fird of three points, defining the plane.
1699                 theTrimSize Half size of a side of quadrangle face, representing the plane.
1700                 theName Object name; when specified, this parameter is used
1701                         for result publication in the study. Otherwise, if automatic
1702                         publication is switched on, default value is used for result name.
1703
1704             Returns:
1705                 New GEOM.GEOM_Object, containing the created plane.
1706             """
1707             # Example: see GEOM_TestAll.py
1708             theTrimSize, Parameters = ParseParameters(theTrimSize);
1709             anObj = self.BasicOp.MakePlaneThreePnt(thePnt1, thePnt2, thePnt3, theTrimSize)
1710             RaiseIfFailed("MakePlaneThreePnt", self.BasicOp)
1711             anObj.SetParameters(Parameters)
1712             self._autoPublish(anObj, theName, "plane")
1713             return anObj
1714
1715         ## Create a plane, similar to the existing one, but with another size of representing face.
1716         #  @param theFace Referenced plane or LCS(Marker).
1717         #  @param theTrimSize New half size of a side of quadrangle face, representing the plane.
1718         #  @param theName Object name; when specified, this parameter is used
1719         #         for result publication in the study. Otherwise, if automatic
1720         #         publication is switched on, default value is used for result name.
1721         #
1722         #  @return New GEOM.GEOM_Object, containing the created plane.
1723         #
1724         #  @ref tui_creation_plane "Example"
1725         @ManageTransactions("BasicOp")
1726         def MakePlaneFace(self, theFace, theTrimSize, theName=None):
1727             """
1728             Create a plane, similar to the existing one, but with another size of representing face.
1729
1730             Parameters:
1731                 theFace Referenced plane or LCS(Marker).
1732                 theTrimSize New half size of a side of quadrangle face, representing the plane.
1733                 theName Object name; when specified, this parameter is used
1734                         for result publication in the study. Otherwise, if automatic
1735                         publication is switched on, default value is used for result name.
1736
1737             Returns:
1738                 New GEOM.GEOM_Object, containing the created plane.
1739             """
1740             # Example: see GEOM_TestAll.py
1741             theTrimSize, Parameters = ParseParameters(theTrimSize);
1742             anObj = self.BasicOp.MakePlaneFace(theFace, theTrimSize)
1743             RaiseIfFailed("MakePlaneFace", self.BasicOp)
1744             anObj.SetParameters(Parameters)
1745             self._autoPublish(anObj, theName, "plane")
1746             return anObj
1747
1748         ## Create a plane, passing through the 2 vectors
1749         #  with center in a start point of the first vector.
1750         #  @param theVec1 Vector, defining center point and plane direction.
1751         #  @param theVec2 Vector, defining the plane normal direction.
1752         #  @param theTrimSize Half size of a side of quadrangle face, representing the plane.
1753         #  @param theName Object name; when specified, this parameter is used
1754         #         for result publication in the study. Otherwise, if automatic
1755         #         publication is switched on, default value is used for result name.
1756         #
1757         #  @return New GEOM.GEOM_Object, containing the created plane.
1758         #
1759         #  @ref tui_creation_plane "Example"
1760         @ManageTransactions("BasicOp")
1761         def MakePlane2Vec(self, theVec1, theVec2, theTrimSize, theName=None):
1762             """
1763             Create a plane, passing through the 2 vectors
1764             with center in a start point of the first vector.
1765
1766             Parameters:
1767                 theVec1 Vector, defining center point and plane direction.
1768                 theVec2 Vector, defining the plane normal direction.
1769                 theTrimSize Half size of a side of quadrangle face, representing the plane.
1770                 theName Object name; when specified, this parameter is used
1771                         for result publication in the study. Otherwise, if automatic
1772                         publication is switched on, default value is used for result name.
1773
1774             Returns:
1775                 New GEOM.GEOM_Object, containing the created plane.
1776             """
1777             # Example: see GEOM_TestAll.py
1778             theTrimSize, Parameters = ParseParameters(theTrimSize);
1779             anObj = self.BasicOp.MakePlane2Vec(theVec1, theVec2, theTrimSize)
1780             RaiseIfFailed("MakePlane2Vec", self.BasicOp)
1781             anObj.SetParameters(Parameters)
1782             self._autoPublish(anObj, theName, "plane")
1783             return anObj
1784
1785         ## Create a plane, based on a Local coordinate system.
1786         #  @param theLCS  coordinate system, defining plane.
1787         #  @param theTrimSize Half size of a side of quadrangle face, representing the plane.
1788         #  @param theOrientation OXY, OYZ or OZX orientation - (1, 2 or 3)
1789         #  @param theName Object name; when specified, this parameter is used
1790         #         for result publication in the study. Otherwise, if automatic
1791         #         publication is switched on, default value is used for result name.
1792         #
1793         #  @return New GEOM.GEOM_Object, containing the created plane.
1794         #
1795         #  @ref tui_creation_plane "Example"
1796         @ManageTransactions("BasicOp")
1797         def MakePlaneLCS(self, theLCS, theTrimSize, theOrientation, theName=None):
1798             """
1799             Create a plane, based on a Local coordinate system.
1800
1801            Parameters:
1802                 theLCS  coordinate system, defining plane.
1803                 theTrimSize Half size of a side of quadrangle face, representing the plane.
1804                 theOrientation OXY, OYZ or OZX orientation - (1, 2 or 3)
1805                 theName Object name; when specified, this parameter is used
1806                         for result publication in the study. Otherwise, if automatic
1807                         publication is switched on, default value is used for result name.
1808
1809             Returns:
1810                 New GEOM.GEOM_Object, containing the created plane.
1811             """
1812             # Example: see GEOM_TestAll.py
1813             theTrimSize, Parameters = ParseParameters(theTrimSize);
1814             anObj = self.BasicOp.MakePlaneLCS(theLCS, theTrimSize, theOrientation)
1815             RaiseIfFailed("MakePlaneLCS", self.BasicOp)
1816             anObj.SetParameters(Parameters)
1817             self._autoPublish(anObj, theName, "plane")
1818             return anObj
1819
1820         ## Create a local coordinate system.
1821         #  @param OX,OY,OZ Three coordinates of coordinate system origin.
1822         #  @param XDX,XDY,XDZ Three components of OX direction
1823         #  @param YDX,YDY,YDZ Three components of OY direction
1824         #  @param theName Object name; when specified, this parameter is used
1825         #         for result publication in the study. Otherwise, if automatic
1826         #         publication is switched on, default value is used for result name.
1827         #
1828         #  @return New GEOM.GEOM_Object, containing the created coordinate system.
1829         #
1830         #  @ref swig_MakeMarker "Example"
1831         @ManageTransactions("BasicOp")
1832         def MakeMarker(self, OX,OY,OZ, XDX,XDY,XDZ, YDX,YDY,YDZ, theName=None):
1833             """
1834             Create a local coordinate system.
1835
1836             Parameters:
1837                 OX,OY,OZ Three coordinates of coordinate system origin.
1838                 XDX,XDY,XDZ Three components of OX direction
1839                 YDX,YDY,YDZ Three components of OY direction
1840                 theName Object name; when specified, this parameter is used
1841                         for result publication in the study. Otherwise, if automatic
1842                         publication is switched on, default value is used for result name.
1843
1844             Returns:
1845                 New GEOM.GEOM_Object, containing the created coordinate system.
1846             """
1847             # Example: see GEOM_TestAll.py
1848             OX,OY,OZ, XDX,XDY,XDZ, YDX,YDY,YDZ, Parameters = ParseParameters(OX,OY,OZ, XDX,XDY,XDZ, YDX,YDY,YDZ);
1849             anObj = self.BasicOp.MakeMarker(OX,OY,OZ, XDX,XDY,XDZ, YDX,YDY,YDZ)
1850             RaiseIfFailed("MakeMarker", self.BasicOp)
1851             anObj.SetParameters(Parameters)
1852             self._autoPublish(anObj, theName, "lcs")
1853             return anObj
1854
1855         ## Create a local coordinate system from shape.
1856         #  @param theShape The initial shape to detect the coordinate system.
1857         #  @param theName Object name; when specified, this parameter is used
1858         #         for result publication in the study. Otherwise, if automatic
1859         #         publication is switched on, default value is used for result name.
1860         #
1861         #  @return New GEOM.GEOM_Object, containing the created coordinate system.
1862         #
1863         #  @ref tui_creation_lcs "Example"
1864         @ManageTransactions("BasicOp")
1865         def MakeMarkerFromShape(self, theShape, theName=None):
1866             """
1867             Create a local coordinate system from shape.
1868
1869             Parameters:
1870                 theShape The initial shape to detect the coordinate system.
1871                 theName Object name; when specified, this parameter is used
1872                         for result publication in the study. Otherwise, if automatic
1873                         publication is switched on, default value is used for result name.
1874
1875             Returns:
1876                 New GEOM.GEOM_Object, containing the created coordinate system.
1877             """
1878             anObj = self.BasicOp.MakeMarkerFromShape(theShape)
1879             RaiseIfFailed("MakeMarkerFromShape", self.BasicOp)
1880             self._autoPublish(anObj, theName, "lcs")
1881             return anObj
1882
1883         ## Create a local coordinate system from point and two vectors.
1884         #  @param theOrigin Point of coordinate system origin.
1885         #  @param theXVec Vector of X direction
1886         #  @param theYVec Vector of Y direction
1887         #  @param theName Object name; when specified, this parameter is used
1888         #         for result publication in the study. Otherwise, if automatic
1889         #         publication is switched on, default value is used for result name.
1890         #
1891         #  @return New GEOM.GEOM_Object, containing the created coordinate system.
1892         #
1893         #  @ref tui_creation_lcs "Example"
1894         @ManageTransactions("BasicOp")
1895         def MakeMarkerPntTwoVec(self, theOrigin, theXVec, theYVec, theName=None):
1896             """
1897             Create a local coordinate system from point and two vectors.
1898
1899             Parameters:
1900                 theOrigin Point of coordinate system origin.
1901                 theXVec Vector of X direction
1902                 theYVec Vector of Y direction
1903                 theName Object name; when specified, this parameter is used
1904                         for result publication in the study. Otherwise, if automatic
1905                         publication is switched on, default value is used for result name.
1906
1907             Returns:
1908                 New GEOM.GEOM_Object, containing the created coordinate system.
1909
1910             """
1911             anObj = self.BasicOp.MakeMarkerPntTwoVec(theOrigin, theXVec, theYVec)
1912             RaiseIfFailed("MakeMarkerPntTwoVec", self.BasicOp)
1913             self._autoPublish(anObj, theName, "lcs")
1914             return anObj
1915
1916         # end of l3_basic_go
1917         ## @}
1918
1919         ## @addtogroup l4_curves
1920         ## @{
1921
1922         ##  Create an arc of circle, passing through three given points.
1923         #  @param thePnt1 Start point of the arc.
1924         #  @param thePnt2 Middle point of the arc.
1925         #  @param thePnt3 End point of the arc.
1926         #  @param theName Object name; when specified, this parameter is used
1927         #         for result publication in the study. Otherwise, if automatic
1928         #         publication is switched on, default value is used for result name.
1929         #
1930         #  @return New GEOM.GEOM_Object, containing the created arc.
1931         #
1932         #  @ref swig_MakeArc "Example"
1933         @ManageTransactions("CurvesOp")
1934         def MakeArc(self, thePnt1, thePnt2, thePnt3, theName=None):
1935             """
1936             Create an arc of circle, passing through three given points.
1937
1938             Parameters:
1939                 thePnt1 Start point of the arc.
1940                 thePnt2 Middle point of the arc.
1941                 thePnt3 End point of the arc.
1942                 theName Object name; when specified, this parameter is used
1943                         for result publication in the study. Otherwise, if automatic
1944                         publication is switched on, default value is used for result name.
1945
1946             Returns:
1947                 New GEOM.GEOM_Object, containing the created arc.
1948             """
1949             # Example: see GEOM_TestAll.py
1950             anObj = self.CurvesOp.MakeArc(thePnt1, thePnt2, thePnt3)
1951             RaiseIfFailed("MakeArc", self.CurvesOp)
1952             self._autoPublish(anObj, theName, "arc")
1953             return anObj
1954
1955         ##  Create an arc of circle from a center and 2 points.
1956         #  @param thePnt1 Center of the arc
1957         #  @param thePnt2 Start point of the arc. (Gives also the radius of the arc)
1958         #  @param thePnt3 End point of the arc (Gives also a direction)
1959         #  @param theSense Orientation of the arc
1960         #  @param theName Object name; when specified, this parameter is used
1961         #         for result publication in the study. Otherwise, if automatic
1962         #         publication is switched on, default value is used for result name.
1963         #
1964         #  @return New GEOM.GEOM_Object, containing the created arc.
1965         #
1966         #  @ref swig_MakeArc "Example"
1967         @ManageTransactions("CurvesOp")
1968         def MakeArcCenter(self, thePnt1, thePnt2, thePnt3, theSense=False, theName=None):
1969             """
1970             Create an arc of circle from a center and 2 points.
1971
1972             Parameters:
1973                 thePnt1 Center of the arc
1974                 thePnt2 Start point of the arc. (Gives also the radius of the arc)
1975                 thePnt3 End point of the arc (Gives also a direction)
1976                 theSense Orientation of the arc
1977                 theName Object name; when specified, this parameter is used
1978                         for result publication in the study. Otherwise, if automatic
1979                         publication is switched on, default value is used for result name.
1980
1981             Returns:
1982                 New GEOM.GEOM_Object, containing the created arc.
1983             """
1984             # Example: see GEOM_TestAll.py
1985             anObj = self.CurvesOp.MakeArcCenter(thePnt1, thePnt2, thePnt3, theSense)
1986             RaiseIfFailed("MakeArcCenter", self.CurvesOp)
1987             self._autoPublish(anObj, theName, "arc")
1988             return anObj
1989
1990         ##  Create an arc of ellipse, of center and two points.
1991         #  @param theCenter Center of the arc.
1992         #  @param thePnt1 defines major radius of the arc by distance from Pnt1 to Pnt2.
1993         #  @param thePnt2 defines plane of ellipse and minor radius as distance from Pnt3 to line from Pnt1 to Pnt2.
1994         #  @param theName Object name; when specified, this parameter is used
1995         #         for result publication in the study. Otherwise, if automatic
1996         #         publication is switched on, default value is used for result name.
1997         #
1998         #  @return New GEOM.GEOM_Object, containing the created arc.
1999         #
2000         #  @ref swig_MakeArc "Example"
2001         @ManageTransactions("CurvesOp")
2002         def MakeArcOfEllipse(self, theCenter, thePnt1, thePnt2, theName=None):
2003             """
2004             Create an arc of ellipse, of center and two points.
2005
2006             Parameters:
2007                 theCenter Center of the arc.
2008                 thePnt1 defines major radius of the arc by distance from Pnt1 to Pnt2.
2009                 thePnt2 defines plane of ellipse and minor radius as distance from Pnt3 to line from Pnt1 to Pnt2.
2010                 theName Object name; when specified, this parameter is used
2011                         for result publication in the study. Otherwise, if automatic
2012                         publication is switched on, default value is used for result name.
2013
2014             Returns:
2015                 New GEOM.GEOM_Object, containing the created arc.
2016             """
2017             # Example: see GEOM_TestAll.py
2018             anObj = self.CurvesOp.MakeArcOfEllipse(theCenter, thePnt1, thePnt2)
2019             RaiseIfFailed("MakeArcOfEllipse", self.CurvesOp)
2020             self._autoPublish(anObj, theName, "arc")
2021             return anObj
2022
2023         ## Create a circle with given center, normal vector and radius.
2024         #  @param thePnt Circle center.
2025         #  @param theVec Vector, normal to the plane of the circle.
2026         #  @param theR Circle radius.
2027         #  @param theName Object name; when specified, this parameter is used
2028         #         for result publication in the study. Otherwise, if automatic
2029         #         publication is switched on, default value is used for result name.
2030         #
2031         #  @return New GEOM.GEOM_Object, containing the created circle.
2032         #
2033         #  @ref tui_creation_circle "Example"
2034         @ManageTransactions("CurvesOp")
2035         def MakeCircle(self, thePnt, theVec, theR, theName=None):
2036             """
2037             Create a circle with given center, normal vector and radius.
2038
2039             Parameters:
2040                 thePnt Circle center.
2041                 theVec Vector, normal to the plane of the circle.
2042                 theR Circle radius.
2043                 theName Object name; when specified, this parameter is used
2044                         for result publication in the study. Otherwise, if automatic
2045                         publication is switched on, default value is used for result name.
2046
2047             Returns:
2048                 New GEOM.GEOM_Object, containing the created circle.
2049             """
2050             # Example: see GEOM_TestAll.py
2051             theR, Parameters = ParseParameters(theR)
2052             anObj = self.CurvesOp.MakeCirclePntVecR(thePnt, theVec, theR)
2053             RaiseIfFailed("MakeCirclePntVecR", self.CurvesOp)
2054             anObj.SetParameters(Parameters)
2055             self._autoPublish(anObj, theName, "circle")
2056             return anObj
2057
2058         ## Create a circle with given radius.
2059         #  Center of the circle will be in the origin of global
2060         #  coordinate system and normal vector will be codirected with Z axis
2061         #  @param theR Circle radius.
2062         #  @param theName Object name; when specified, this parameter is used
2063         #         for result publication in the study. Otherwise, if automatic
2064         #         publication is switched on, default value is used for result name.
2065         #
2066         #  @return New GEOM.GEOM_Object, containing the created circle.
2067         @ManageTransactions("CurvesOp")
2068         def MakeCircleR(self, theR, theName=None):
2069             """
2070             Create a circle with given radius.
2071             Center of the circle will be in the origin of global
2072             coordinate system and normal vector will be codirected with Z axis
2073
2074             Parameters:
2075                 theR Circle radius.
2076                 theName Object name; when specified, this parameter is used
2077                         for result publication in the study. Otherwise, if automatic
2078                         publication is switched on, default value is used for result name.
2079
2080             Returns:
2081                 New GEOM.GEOM_Object, containing the created circle.
2082             """
2083             anObj = self.CurvesOp.MakeCirclePntVecR(None, None, theR)
2084             RaiseIfFailed("MakeCirclePntVecR", self.CurvesOp)
2085             self._autoPublish(anObj, theName, "circle")
2086             return anObj
2087
2088         ## Create a circle, passing through three given points
2089         #  @param thePnt1,thePnt2,thePnt3 Points, defining the circle.
2090         #  @param theName Object name; when specified, this parameter is used
2091         #         for result publication in the study. Otherwise, if automatic
2092         #         publication is switched on, default value is used for result name.
2093         #
2094         #  @return New GEOM.GEOM_Object, containing the created circle.
2095         #
2096         #  @ref tui_creation_circle "Example"
2097         @ManageTransactions("CurvesOp")
2098         def MakeCircleThreePnt(self, thePnt1, thePnt2, thePnt3, theName=None):
2099             """
2100             Create a circle, passing through three given points
2101
2102             Parameters:
2103                 thePnt1,thePnt2,thePnt3 Points, defining the circle.
2104                 theName Object name; when specified, this parameter is used
2105                         for result publication in the study. Otherwise, if automatic
2106                         publication is switched on, default value is used for result name.
2107
2108             Returns:
2109                 New GEOM.GEOM_Object, containing the created circle.
2110             """
2111             # Example: see GEOM_TestAll.py
2112             anObj = self.CurvesOp.MakeCircleThreePnt(thePnt1, thePnt2, thePnt3)
2113             RaiseIfFailed("MakeCircleThreePnt", self.CurvesOp)
2114             self._autoPublish(anObj, theName, "circle")
2115             return anObj
2116
2117         ## Create a circle, with given point1 as center,
2118         #  passing through the point2 as radius and laying in the plane,
2119         #  defined by all three given points.
2120         #  @param thePnt1,thePnt2,thePnt3 Points, defining the circle.
2121         #  @param theName Object name; when specified, this parameter is used
2122         #         for result publication in the study. Otherwise, if automatic
2123         #         publication is switched on, default value is used for result name.
2124         #
2125         #  @return New GEOM.GEOM_Object, containing the created circle.
2126         #
2127         #  @ref swig_MakeCircle "Example"
2128         @ManageTransactions("CurvesOp")
2129         def MakeCircleCenter2Pnt(self, thePnt1, thePnt2, thePnt3, theName=None):
2130             """
2131             Create a circle, with given point1 as center,
2132             passing through the point2 as radius and laying in the plane,
2133             defined by all three given points.
2134
2135             Parameters:
2136                 thePnt1,thePnt2,thePnt3 Points, defining the circle.
2137                 theName Object name; when specified, this parameter is used
2138                         for result publication in the study. Otherwise, if automatic
2139                         publication is switched on, default value is used for result name.
2140
2141             Returns:
2142                 New GEOM.GEOM_Object, containing the created circle.
2143             """
2144             # Example: see GEOM_example6.py
2145             anObj = self.CurvesOp.MakeCircleCenter2Pnt(thePnt1, thePnt2, thePnt3)
2146             RaiseIfFailed("MakeCircleCenter2Pnt", self.CurvesOp)
2147             self._autoPublish(anObj, theName, "circle")
2148             return anObj
2149
2150         ## Create an ellipse with given center, normal vector and radiuses.
2151         #  @param thePnt Ellipse center.
2152         #  @param theVec Vector, normal to the plane of the ellipse.
2153         #  @param theRMajor Major ellipse radius.
2154         #  @param theRMinor Minor ellipse radius.
2155         #  @param theVecMaj Vector, direction of the ellipse's main axis.
2156         #  @param theName Object name; when specified, this parameter is used
2157         #         for result publication in the study. Otherwise, if automatic
2158         #         publication is switched on, default value is used for result name.
2159         #
2160         #  @return New GEOM.GEOM_Object, containing the created ellipse.
2161         #
2162         #  @ref tui_creation_ellipse "Example"
2163         @ManageTransactions("CurvesOp")
2164         def MakeEllipse(self, thePnt, theVec, theRMajor, theRMinor, theVecMaj=None, theName=None):
2165             """
2166             Create an ellipse with given center, normal vector and radiuses.
2167
2168             Parameters:
2169                 thePnt Ellipse center.
2170                 theVec Vector, normal to the plane of the ellipse.
2171                 theRMajor Major ellipse radius.
2172                 theRMinor Minor ellipse radius.
2173                 theVecMaj Vector, direction of the ellipse's main axis.
2174                 theName Object name; when specified, this parameter is used
2175                         for result publication in the study. Otherwise, if automatic
2176                         publication is switched on, default value is used for result name.
2177
2178             Returns:
2179                 New GEOM.GEOM_Object, containing the created ellipse.
2180             """
2181             # Example: see GEOM_TestAll.py
2182             theRMajor, theRMinor, Parameters = ParseParameters(theRMajor, theRMinor)
2183             if theVecMaj is not None:
2184                 anObj = self.CurvesOp.MakeEllipseVec(thePnt, theVec, theRMajor, theRMinor, theVecMaj)
2185             else:
2186                 anObj = self.CurvesOp.MakeEllipse(thePnt, theVec, theRMajor, theRMinor)
2187                 pass
2188             RaiseIfFailed("MakeEllipse", self.CurvesOp)
2189             anObj.SetParameters(Parameters)
2190             self._autoPublish(anObj, theName, "ellipse")
2191             return anObj
2192
2193         ## Create an ellipse with given radiuses.
2194         #  Center of the ellipse will be in the origin of global
2195         #  coordinate system and normal vector will be codirected with Z axis
2196         #  @param theRMajor Major ellipse radius.
2197         #  @param theRMinor Minor ellipse radius.
2198         #  @param theName Object name; when specified, this parameter is used
2199         #         for result publication in the study. Otherwise, if automatic
2200         #         publication is switched on, default value is used for result name.
2201         #
2202         #  @return New GEOM.GEOM_Object, containing the created ellipse.
2203         @ManageTransactions("CurvesOp")
2204         def MakeEllipseRR(self, theRMajor, theRMinor, theName=None):
2205             """
2206             Create an ellipse with given radiuses.
2207             Center of the ellipse will be in the origin of global
2208             coordinate system and normal vector will be codirected with Z axis
2209
2210             Parameters:
2211                 theRMajor Major ellipse radius.
2212                 theRMinor Minor ellipse radius.
2213                 theName Object name; when specified, this parameter is used
2214                         for result publication in the study. Otherwise, if automatic
2215                         publication is switched on, default value is used for result name.
2216
2217             Returns:
2218             New GEOM.GEOM_Object, containing the created ellipse.
2219             """
2220             anObj = self.CurvesOp.MakeEllipse(None, None, theRMajor, theRMinor)
2221             RaiseIfFailed("MakeEllipse", self.CurvesOp)
2222             self._autoPublish(anObj, theName, "ellipse")
2223             return anObj
2224
2225         ## Create a polyline on the set of points.
2226         #  @param thePoints Sequence of points for the polyline.
2227         #  @param theIsClosed If True, build a closed wire.
2228         #  @param theName Object name; when specified, this parameter is used
2229         #         for result publication in the study. Otherwise, if automatic
2230         #         publication is switched on, default value is used for result name.
2231         #
2232         #  @return New GEOM.GEOM_Object, containing the created polyline.
2233         #
2234         #  @ref tui_creation_curve "Example"
2235         @ManageTransactions("CurvesOp")
2236         def MakePolyline(self, thePoints, theIsClosed=False, theName=None):
2237             """
2238             Create a polyline on the set of points.
2239
2240             Parameters:
2241                 thePoints Sequence of points for the polyline.
2242                 theIsClosed If True, build a closed wire.
2243                 theName Object name; when specified, this parameter is used
2244                         for result publication in the study. Otherwise, if automatic
2245                         publication is switched on, default value is used for result name.
2246
2247             Returns:
2248                 New GEOM.GEOM_Object, containing the created polyline.
2249             """
2250             # Example: see GEOM_TestAll.py
2251             anObj = self.CurvesOp.MakePolyline(thePoints, theIsClosed)
2252             RaiseIfFailed("MakePolyline", self.CurvesOp)
2253             self._autoPublish(anObj, theName, "polyline")
2254             return anObj
2255
2256         ## Create bezier curve on the set of points.
2257         #  @param thePoints Sequence of points for the bezier curve.
2258         #  @param theIsClosed If True, build a closed curve.
2259         #  @param theName Object name; when specified, this parameter is used
2260         #         for result publication in the study. Otherwise, if automatic
2261         #         publication is switched on, default value is used for result name.
2262         #
2263         #  @return New GEOM.GEOM_Object, containing the created bezier curve.
2264         #
2265         #  @ref tui_creation_curve "Example"
2266         @ManageTransactions("CurvesOp")
2267         def MakeBezier(self, thePoints, theIsClosed=False, theName=None):
2268             """
2269             Create bezier curve on the set of points.
2270
2271             Parameters:
2272                 thePoints Sequence of points for the bezier curve.
2273                 theIsClosed If True, build a closed curve.
2274                 theName Object name; when specified, this parameter is used
2275                         for result publication in the study. Otherwise, if automatic
2276                         publication is switched on, default value is used for result name.
2277
2278             Returns:
2279                 New GEOM.GEOM_Object, containing the created bezier curve.
2280             """
2281             # Example: see GEOM_TestAll.py
2282             anObj = self.CurvesOp.MakeSplineBezier(thePoints, theIsClosed)
2283             RaiseIfFailed("MakeSplineBezier", self.CurvesOp)
2284             self._autoPublish(anObj, theName, "bezier")
2285             return anObj
2286
2287         ## Create B-Spline curve on the set of points.
2288         #  @param thePoints Sequence of points for the B-Spline curve.
2289         #  @param theIsClosed If True, build a closed curve.
2290         #  @param theDoReordering If TRUE, the algo does not follow the order of
2291         #                         \a thePoints but searches for the closest vertex.
2292         #  @param theName Object name; when specified, this parameter is used
2293         #         for result publication in the study. Otherwise, if automatic
2294         #         publication is switched on, default value is used for result name.
2295         #
2296         #  @return New GEOM.GEOM_Object, containing the created B-Spline curve.
2297         #
2298         #  @ref tui_creation_curve "Example"
2299         @ManageTransactions("CurvesOp")
2300         def MakeInterpol(self, thePoints, theIsClosed=False, theDoReordering=False, theName=None):
2301             """
2302             Create B-Spline curve on the set of points.
2303
2304             Parameters:
2305                 thePoints Sequence of points for the B-Spline curve.
2306                 theIsClosed If True, build a closed curve.
2307                 theDoReordering If True, the algo does not follow the order of
2308                                 thePoints but searches for the closest vertex.
2309                 theName Object name; when specified, this parameter is used
2310                         for result publication in the study. Otherwise, if automatic
2311                         publication is switched on, default value is used for result name.
2312
2313             Returns:
2314                 New GEOM.GEOM_Object, containing the created B-Spline curve.
2315             """
2316             # Example: see GEOM_TestAll.py
2317             anObj = self.CurvesOp.MakeSplineInterpolation(thePoints, theIsClosed, theDoReordering)
2318             RaiseIfFailed("MakeInterpol", self.CurvesOp)
2319             self._autoPublish(anObj, theName, "bspline")
2320             return anObj
2321
2322         ## Create B-Spline curve on the set of points.
2323         #  @param thePoints Sequence of points for the B-Spline curve.
2324         #  @param theFirstVec Vector object, defining the curve direction at its first point.
2325         #  @param theLastVec Vector object, defining the curve direction at its last point.
2326         #  @param theName Object name; when specified, this parameter is used
2327         #         for result publication in the study. Otherwise, if automatic
2328         #         publication is switched on, default value is used for result name.
2329         #
2330         #  @return New GEOM.GEOM_Object, containing the created B-Spline curve.
2331         #
2332         #  @ref tui_creation_curve "Example"
2333         @ManageTransactions("CurvesOp")
2334         def MakeInterpolWithTangents(self, thePoints, theFirstVec, theLastVec, theName=None):
2335             """
2336             Create B-Spline curve on the set of points.
2337
2338             Parameters:
2339                 thePoints Sequence of points for the B-Spline curve.
2340                 theFirstVec Vector object, defining the curve direction at its first point.
2341                 theLastVec Vector object, defining the curve direction at its last point.
2342                 theName Object name; when specified, this parameter is used
2343                         for result publication in the study. Otherwise, if automatic
2344                         publication is switched on, default value is used for result name.
2345
2346             Returns:
2347                 New GEOM.GEOM_Object, containing the created B-Spline curve.
2348             """
2349             # Example: see GEOM_TestAll.py
2350             anObj = self.CurvesOp.MakeSplineInterpolWithTangents(thePoints, theFirstVec, theLastVec)
2351             RaiseIfFailed("MakeInterpolWithTangents", self.CurvesOp)
2352             self._autoPublish(anObj, theName, "bspline")
2353             return anObj
2354
2355         ## Creates a curve using the parametric definition of the basic points.
2356         #  @param thexExpr parametric equation of the coordinates X.
2357         #  @param theyExpr parametric equation of the coordinates Y.
2358         #  @param thezExpr parametric equation of the coordinates Z.
2359         #  @param theParamMin the minimal value of the parameter.
2360         #  @param theParamMax the maximum value of the parameter.
2361         #  @param theParamStep the number of steps if theNewMethod = True, else step value of the parameter.
2362         #  @param theCurveType the type of the curve,
2363         #         one of GEOM.Polyline, GEOM.Bezier, GEOM.Interpolation.
2364         #  @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.
2365         #  @param theName Object name; when specified, this parameter is used
2366         #         for result publication in the study. Otherwise, if automatic
2367         #         publication is switched on, default value is used for result name.
2368         #
2369         #  @return New GEOM.GEOM_Object, containing the created curve.
2370         #
2371         #  @ref tui_creation_curve "Example"
2372         @ManageTransactions("CurvesOp")
2373         def MakeCurveParametric(self, thexExpr, theyExpr, thezExpr,
2374                                 theParamMin, theParamMax, theParamStep, theCurveType, theNewMethod=False, theName=None ):
2375             """
2376             Creates a curve using the parametric definition of the basic points.
2377
2378             Parameters:
2379                 thexExpr parametric equation of the coordinates X.
2380                 theyExpr parametric equation of the coordinates Y.
2381                 thezExpr parametric equation of the coordinates Z.
2382                 theParamMin the minimal value of the parameter.
2383                 theParamMax the maximum value of the parameter.
2384                 theParamStep the number of steps if theNewMethod = True, else step value of the parameter.
2385                 theCurveType the type of the curve,
2386                              one of GEOM.Polyline, GEOM.Bezier, GEOM.Interpolation.
2387                 theNewMethod flag for switching to the new method if the flag is set to false a deprecated
2388                              method is used which can lead to a bug.
2389                 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             Returns:
2394                 New GEOM.GEOM_Object, containing the created curve.
2395             """
2396             theParamMin,theParamMax,theParamStep,Parameters = ParseParameters(theParamMin,theParamMax,theParamStep)
2397             if theNewMethod:
2398               anObj = self.CurvesOp.MakeCurveParametricNew(thexExpr,theyExpr,thezExpr,theParamMin,theParamMax,theParamStep,theCurveType)
2399             else:
2400               anObj = self.CurvesOp.MakeCurveParametric(thexExpr,theyExpr,thezExpr,theParamMin,theParamMax,theParamStep,theCurveType)
2401             RaiseIfFailed("MakeSplineInterpolation", self.CurvesOp)
2402             anObj.SetParameters(Parameters)
2403             self._autoPublish(anObj, theName, "curve")
2404             return anObj
2405
2406         ## Create an isoline curve on a face.
2407         #  @param theFace the face for which an isoline is created.
2408         #  @param IsUIsoline True for U-isoline creation; False for V-isoline
2409         #         creation.
2410         #  @param theParameter the U parameter for U-isoline or V parameter
2411         #         for V-isoline.
2412         #  @param theName Object name; when specified, this parameter is used
2413         #         for result publication in the study. Otherwise, if automatic
2414         #         publication is switched on, default value is used for result name.
2415         #
2416         #  @return New GEOM.GEOM_Object, containing the created isoline edge or
2417         #          a compound of edges.
2418         #
2419         #  @ref tui_creation_curve "Example"
2420         @ManageTransactions("CurvesOp")
2421         def MakeIsoline(self, theFace, IsUIsoline, theParameter, theName=None):
2422             """
2423             Create an isoline curve on a face.
2424
2425             Parameters:
2426                 theFace the face for which an isoline is created.
2427                 IsUIsoline True for U-isoline creation; False for V-isoline
2428                            creation.
2429                 theParameter the U parameter for U-isoline or V parameter
2430                              for V-isoline.
2431                 theName Object name; when specified, this parameter is used
2432                         for result publication in the study. Otherwise, if automatic
2433                         publication is switched on, default value is used for result name.
2434
2435             Returns:
2436                 New GEOM.GEOM_Object, containing the created isoline edge or a
2437                 compound of edges.
2438             """
2439             # Example: see GEOM_TestAll.py
2440             anObj = self.CurvesOp.MakeIsoline(theFace, IsUIsoline, theParameter)
2441             RaiseIfFailed("MakeIsoline", self.CurvesOp)
2442             if IsUIsoline:
2443                 self._autoPublish(anObj, theName, "U-Isoline")
2444             else:
2445                 self._autoPublish(anObj, theName, "V-Isoline")
2446             return anObj
2447
2448         # end of l4_curves
2449         ## @}
2450
2451         ## @addtogroup l3_sketcher
2452         ## @{
2453
2454         ## Create a sketcher (wire or face), following the textual description,
2455         #  passed through <VAR>theCommand</VAR> argument. \n
2456         #  Edges of the resulting wire or face will be arcs of circles and/or linear segments. \n
2457         #  Format of the description string have to be the following:
2458         #
2459         #  "Sketcher[:F x1 y1]:CMD[:CMD[:CMD...]]"
2460         #
2461         #  Where:
2462         #  - x1, y1 are coordinates of the first sketcher point (zero by default),
2463         #  - CMD is one of
2464         #     - "R angle" : Set the direction by angle
2465         #     - "D dx dy" : Set the direction by DX & DY
2466         #     .
2467         #       \n
2468         #     - "TT x y" : Create segment by point at X & Y
2469         #     - "T dx dy" : Create segment by point with DX & DY
2470         #     - "L length" : Create segment by direction & Length
2471         #     - "IX x" : Create segment by direction & Intersect. X
2472         #     - "IY y" : Create segment by direction & Intersect. Y
2473         #     .
2474         #       \n
2475         #     - "C radius length" : Create arc by direction, radius and length(in degree)
2476         #     - "AA x y": Create arc by point at X & Y
2477         #     - "A dx dy" : Create arc by point with DX & DY
2478         #     - "UU x y radius flag1": Create arc by point at X & Y with given radiUs
2479         #     - "U dx dy radius flag1" : Create arc by point with DX & DY with given radiUs
2480         #     - "EE x y xc yc flag1 flag2": Create arc by point at X & Y with given cEnter coordinates
2481         #     - "E dx dy dxc dyc radius flag1 flag2" : Create arc by point with DX & DY with given cEnter coordinates
2482         #     .
2483         #       \n
2484         #     - "WW" : Close Wire (to finish)
2485         #     - "WF" : Close Wire and build face (to finish)
2486         #     .
2487         #        \n
2488         #  - Flag1 (= reverse) is 0 or 2 ...
2489         #     - if 0 the drawn arc is the one of lower angle (< Pi)
2490         #     - if 2 the drawn arc ius the one of greater angle (> Pi)
2491         #     .
2492         #        \n
2493         #  - Flag2 (= control tolerance) is 0 or 1 ...
2494         #     - if 0 the specified end point can be at a distance of the arc greater than the tolerance (10^-7)
2495         #     - if 1 the wire is built only if the end point is on the arc
2496         #       with a tolerance of 10^-7 on the distance else the creation fails
2497         #
2498         #  @param theCommand String, defining the sketcher in local
2499         #                    coordinates of the working plane.
2500         #  @param theWorkingPlane Nine double values, defining origin,
2501         #                         OZ and OX directions of the working plane.
2502         #  @param theName Object name; when specified, this parameter is used
2503         #         for result publication in the study. Otherwise, if automatic
2504         #         publication is switched on, default value is used for result name.
2505         #
2506         #  @return New GEOM.GEOM_Object, containing the created wire.
2507         #
2508         #  @ref tui_sketcher_page "Example"
2509         @ManageTransactions("CurvesOp")
2510         def MakeSketcher(self, theCommand, theWorkingPlane = [0,0,0, 0,0,1, 1,0,0], theName=None):
2511             """
2512             Create a sketcher (wire or face), following the textual description, passed
2513             through theCommand argument.
2514             Edges of the resulting wire or face will be arcs of circles and/or linear segments.
2515             Format of the description string have to be the following:
2516                 "Sketcher[:F x1 y1]:CMD[:CMD[:CMD...]]"
2517             Where:
2518             - x1, y1 are coordinates of the first sketcher point (zero by default),
2519             - CMD is one of
2520                - "R angle" : Set the direction by angle
2521                - "D dx dy" : Set the direction by DX & DY
2522
2523                - "TT x y" : Create segment by point at X & Y
2524                - "T dx dy" : Create segment by point with DX & DY
2525                - "L length" : Create segment by direction & Length
2526                - "IX x" : Create segment by direction & Intersect. X
2527                - "IY y" : Create segment by direction & Intersect. Y
2528
2529                - "C radius length" : Create arc by direction, radius and length(in degree)
2530                - "AA x y": Create arc by point at X & Y
2531                - "A dx dy" : Create arc by point with DX & DY
2532                - "UU x y radius flag1": Create arc by point at X & Y with given radiUs
2533                - "U dx dy radius flag1" : Create arc by point with DX & DY with given radiUs
2534                - "EE x y xc yc flag1 flag2": Create arc by point at X & Y with given cEnter coordinates
2535                - "E dx dy dxc dyc radius flag1 flag2" : Create arc by point with DX & DY with given cEnter coordinates
2536
2537                - "WW" : Close Wire (to finish)
2538                - "WF" : Close Wire and build face (to finish)
2539
2540             - Flag1 (= reverse) is 0 or 2 ...
2541                - if 0 the drawn arc is the one of lower angle (< Pi)
2542                - if 2 the drawn arc ius the one of greater angle (> Pi)
2543
2544             - Flag2 (= control tolerance) is 0 or 1 ...
2545                - if 0 the specified end point can be at a distance of the arc greater than the tolerance (10^-7)
2546                - if 1 the wire is built only if the end point is on the arc
2547                  with a tolerance of 10^-7 on the distance else the creation fails
2548
2549             Parameters:
2550                 theCommand String, defining the sketcher in local
2551                            coordinates of the working plane.
2552                 theWorkingPlane Nine double values, defining origin,
2553                                 OZ and OX directions of the working plane.
2554                 theName Object name; when specified, this parameter is used
2555                         for result publication in the study. Otherwise, if automatic
2556                         publication is switched on, default value is used for result name.
2557
2558             Returns:
2559                 New GEOM.GEOM_Object, containing the created wire.
2560             """
2561             # Example: see GEOM_TestAll.py
2562             theCommand,Parameters = ParseSketcherCommand(theCommand)
2563             anObj = self.CurvesOp.MakeSketcher(theCommand, theWorkingPlane)
2564             RaiseIfFailed("MakeSketcher", self.CurvesOp)
2565             anObj.SetParameters(Parameters)
2566             self._autoPublish(anObj, theName, "wire")
2567             return anObj
2568
2569         ## Create a sketcher (wire or face), following the textual description,
2570         #  passed through <VAR>theCommand</VAR> argument. \n
2571         #  For format of the description string see MakeSketcher() method.\n
2572         #  @param theCommand String, defining the sketcher in local
2573         #                    coordinates of the working plane.
2574         #  @param theWorkingPlane Planar Face or LCS(Marker) of the working plane.
2575         #  @param theName Object name; when specified, this parameter is used
2576         #         for result publication in the study. Otherwise, if automatic
2577         #         publication is switched on, default value is used for result name.
2578         #
2579         #  @return New GEOM.GEOM_Object, containing the created wire.
2580         #
2581         #  @ref tui_sketcher_page "Example"
2582         @ManageTransactions("CurvesOp")
2583         def MakeSketcherOnPlane(self, theCommand, theWorkingPlane, theName=None):
2584             """
2585             Create a sketcher (wire or face), following the textual description,
2586             passed through theCommand argument.
2587             For format of the description string see geompy.MakeSketcher() method.
2588
2589             Parameters:
2590                 theCommand String, defining the sketcher in local
2591                            coordinates of the working plane.
2592                 theWorkingPlane Planar Face or LCS(Marker) of the working plane.
2593                 theName Object name; when specified, this parameter is used
2594                         for result publication in the study. Otherwise, if automatic
2595                         publication is switched on, default value is used for result name.
2596
2597             Returns:
2598                 New GEOM.GEOM_Object, containing the created wire.
2599             """
2600             theCommand,Parameters = ParseSketcherCommand(theCommand)
2601             anObj = self.CurvesOp.MakeSketcherOnPlane(theCommand, theWorkingPlane)
2602             RaiseIfFailed("MakeSketcherOnPlane", self.CurvesOp)
2603             anObj.SetParameters(Parameters)
2604             self._autoPublish(anObj, theName, "wire")
2605             return anObj
2606
2607         ## Obtain a 2D sketcher interface
2608         #  @return An instance of @ref gsketcher.Sketcher2D "Sketcher2D" interface
2609         def Sketcher2D (self):
2610             """
2611             Obtain a 2D sketcher interface.
2612
2613             Example of usage:
2614                sk = geompy.Sketcher2D()
2615                sk.addPoint(20, 20)
2616                sk.addSegmentRelative(15, 70)
2617                sk.addSegmentPerpY(50)
2618                sk.addArcRadiusRelative(25, 15, 14.5, 0)
2619                sk.addArcCenterAbsolute(1, 1, 50, 50, 0, 0)
2620                sk.addArcDirectionRadiusLength(20, 20, 101, 162.13)
2621                sk.close()
2622                Sketch_1 = sk.wire(geomObj_1)
2623             """
2624             sk = Sketcher2D (self)
2625             return sk
2626
2627         ## Create a sketcher wire, following the numerical description,
2628         #  passed through <VAR>theCoordinates</VAR> argument. \n
2629         #  @param theCoordinates double values, defining points to create a wire,
2630         #                                                      passing from it.
2631         #  @param theName Object name; when specified, this parameter is used
2632         #         for result publication in the study. Otherwise, if automatic
2633         #         publication is switched on, default value is used for result name.
2634         #
2635         #  @return New GEOM.GEOM_Object, containing the created wire.
2636         #
2637         #  @ref tui_3dsketcher_page "Example"
2638         @ManageTransactions("CurvesOp")
2639         def Make3DSketcher(self, theCoordinates, theName=None):
2640             """
2641             Create a sketcher wire, following the numerical description,
2642             passed through theCoordinates argument.
2643
2644             Parameters:
2645                 theCoordinates double values, defining points to create a wire,
2646                                passing from it.
2647                 theName Object name; when specified, this parameter is used
2648                         for result publication in the study. Otherwise, if automatic
2649                         publication is switched on, default value is used for result name.
2650
2651             Returns:
2652                 New GEOM_Object, containing the created wire.
2653             """
2654             theCoordinates,Parameters = ParseParameters(theCoordinates)
2655             anObj = self.CurvesOp.Make3DSketcher(theCoordinates)
2656             RaiseIfFailed("Make3DSketcher", self.CurvesOp)
2657             anObj.SetParameters(Parameters)
2658             self._autoPublish(anObj, theName, "wire")
2659             return anObj
2660
2661         ## Obtain a 3D sketcher interface
2662         #  @return An instance of @ref gsketcher.Sketcher3D "Sketcher3D" interface
2663         #
2664         #  @ref tui_3dsketcher_page "Example"
2665         def Sketcher3D (self):
2666             """
2667             Obtain a 3D sketcher interface.
2668
2669             Example of usage:
2670                 sk = geompy.Sketcher3D()
2671                 sk.addPointsAbsolute(0,0,0, 70,0,0)
2672                 sk.addPointsRelative(0, 0, 130)
2673                 sk.addPointAnglesLength("OXY", 50, 0, 100)
2674                 sk.addPointAnglesLength("OXZ", 30, 80, 130)
2675                 sk.close()
2676                 a3D_Sketcher_1 = sk.wire()
2677             """
2678             sk = Sketcher3D (self)
2679             return sk
2680
2681         ## Obtain a 2D polyline creation interface
2682         #  @return An instance of @ref gsketcher.Polyline2D "Polyline2D" interface
2683         #
2684         #  @ref tui_3dsketcher_page "Example"
2685         def Polyline2D (self):
2686             """
2687             Obtain a 2D polyline creation interface.
2688
2689             Example of usage:
2690                 pl = geompy.Polyline2D()
2691                 pl.addSection("section 1", GEOM.Polyline, True)
2692                 pl.addPoints(0, 0, 10, 0, 10, 10)
2693                 pl.addSection("section 2", GEOM.Interpolation, False)
2694                 pl.addPoints(20, 0, 30, 0, 30, 10)
2695                 resultObj = pl.result(WorkingPlane)
2696             """
2697             pl = Polyline2D (self)
2698             return pl
2699
2700         # end of l3_sketcher
2701         ## @}
2702
2703         ## @addtogroup l3_3d_primitives
2704         ## @{
2705
2706         ## Create a box by coordinates of two opposite vertices.
2707         #
2708         #  @param x1,y1,z1 double values, defining first point it.
2709         #  @param x2,y2,z2 double values, defining first point it.
2710         #  @param theName Object name; when specified, this parameter is used
2711         #         for result publication in the study. Otherwise, if automatic
2712         #         publication is switched on, default value is used for result name.
2713         #
2714         #  @return New GEOM.GEOM_Object, containing the created box.
2715         #
2716         #  @ref tui_creation_box "Example"
2717         def MakeBox(self, x1, y1, z1, x2, y2, z2, theName=None):
2718             """
2719             Create a box by coordinates of two opposite vertices.
2720
2721             Parameters:
2722                 x1,y1,z1 double values, defining first point.
2723                 x2,y2,z2 double values, defining second point.
2724                 theName Object name; when specified, this parameter is used
2725                         for result publication in the study. Otherwise, if automatic
2726                         publication is switched on, default value is used for result name.
2727
2728             Returns:
2729                 New GEOM.GEOM_Object, containing the created box.
2730             """
2731             # Example: see GEOM_TestAll.py
2732             pnt1 = self.MakeVertex(x1,y1,z1)
2733             pnt2 = self.MakeVertex(x2,y2,z2)
2734             # note: auto-publishing is done in self.MakeBoxTwoPnt()
2735             return self.MakeBoxTwoPnt(pnt1, pnt2, theName)
2736
2737         ## Create a box with specified dimensions along the coordinate axes
2738         #  and with edges, parallel to the coordinate axes.
2739         #  Center of the box will be at point (DX/2, DY/2, DZ/2).
2740         #  @param theDX Length of Box edges, parallel to OX axis.
2741         #  @param theDY Length of Box edges, parallel to OY axis.
2742         #  @param theDZ Length of Box edges, parallel to OZ axis.
2743         #  @param theName Object name; when specified, this parameter is used
2744         #         for result publication in the study. Otherwise, if automatic
2745         #         publication is switched on, default value is used for result name.
2746         #
2747         #  @return New GEOM.GEOM_Object, containing the created box.
2748         #
2749         #  @ref tui_creation_box "Example"
2750         @ManageTransactions("PrimOp")
2751         def MakeBoxDXDYDZ(self, theDX, theDY, theDZ, theName=None):
2752             """
2753             Create a box with specified dimensions along the coordinate axes
2754             and with edges, parallel to the coordinate axes.
2755             Center of the box will be at point (DX/2, DY/2, DZ/2).
2756
2757             Parameters:
2758                 theDX Length of Box edges, parallel to OX axis.
2759                 theDY Length of Box edges, parallel to OY axis.
2760                 theDZ Length of Box edges, parallel to OZ axis.
2761                 theName Object name; when specified, this parameter is used
2762                         for result publication in the study. Otherwise, if automatic
2763                         publication is switched on, default value is used for result name.
2764
2765             Returns:
2766                 New GEOM.GEOM_Object, containing the created box.
2767             """
2768             # Example: see GEOM_TestAll.py
2769             theDX,theDY,theDZ,Parameters = ParseParameters(theDX, theDY, theDZ)
2770             anObj = self.PrimOp.MakeBoxDXDYDZ(theDX, theDY, theDZ)
2771             RaiseIfFailed("MakeBoxDXDYDZ", self.PrimOp)
2772             anObj.SetParameters(Parameters)
2773             self._autoPublish(anObj, theName, "box")
2774             return anObj
2775
2776         ## Create a box with two specified opposite vertices,
2777         #  and with edges, parallel to the coordinate axes
2778         #  @param thePnt1 First of two opposite vertices.
2779         #  @param thePnt2 Second of two opposite vertices.
2780         #  @param theName Object name; when specified, this parameter is used
2781         #         for result publication in the study. Otherwise, if automatic
2782         #         publication is switched on, default value is used for result name.
2783         #
2784         #  @return New GEOM.GEOM_Object, containing the created box.
2785         #
2786         #  @ref tui_creation_box "Example"
2787         @ManageTransactions("PrimOp")
2788         def MakeBoxTwoPnt(self, thePnt1, thePnt2, theName=None):
2789             """
2790             Create a box with two specified opposite vertices,
2791             and with edges, parallel to the coordinate axes
2792
2793             Parameters:
2794                 thePnt1 First of two opposite vertices.
2795                 thePnt2 Second of two opposite vertices.
2796                 theName Object name; when specified, this parameter is used
2797                         for result publication in the study. Otherwise, if automatic
2798                         publication is switched on, default value is used for result name.
2799
2800             Returns:
2801                 New GEOM.GEOM_Object, containing the created box.
2802             """
2803             # Example: see GEOM_TestAll.py
2804             anObj = self.PrimOp.MakeBoxTwoPnt(thePnt1, thePnt2)
2805             RaiseIfFailed("MakeBoxTwoPnt", self.PrimOp)
2806             self._autoPublish(anObj, theName, "box")
2807             return anObj
2808
2809         ## Create a face with specified dimensions with edges parallel to coordinate axes.
2810         #  @param theH height of Face.
2811         #  @param theW width of Face.
2812         #  @param theOrientation face orientation: 1-OXY, 2-OYZ, 3-OZX
2813         #  @param theName Object name; when specified, this parameter is used
2814         #         for result publication in the study. Otherwise, if automatic
2815         #         publication is switched on, default value is used for result name.
2816         #
2817         #  @return New GEOM.GEOM_Object, containing the created face.
2818         #
2819         #  @ref tui_creation_face "Example"
2820         @ManageTransactions("PrimOp")
2821         def MakeFaceHW(self, theH, theW, theOrientation, theName=None):
2822             """
2823             Create a face with specified dimensions with edges parallel to coordinate axes.
2824
2825             Parameters:
2826                 theH height of Face.
2827                 theW width of Face.
2828                 theOrientation face orientation: 1-OXY, 2-OYZ, 3-OZX
2829                 theName Object name; when specified, this parameter is used
2830                         for result publication in the study. Otherwise, if automatic
2831                         publication is switched on, default value is used for result name.
2832
2833             Returns:
2834                 New GEOM.GEOM_Object, containing the created face.
2835             """
2836             # Example: see GEOM_TestAll.py
2837             theH,theW,Parameters = ParseParameters(theH, theW)
2838             anObj = self.PrimOp.MakeFaceHW(theH, theW, theOrientation)
2839             RaiseIfFailed("MakeFaceHW", self.PrimOp)
2840             anObj.SetParameters(Parameters)
2841             self._autoPublish(anObj, theName, "rectangle")
2842             return anObj
2843
2844         ## Create a face from another plane and two sizes,
2845         #  vertical size and horisontal size.
2846         #  @param theObj   Normale vector to the creating face or
2847         #  the face object.
2848         #  @param theH     Height (vertical size).
2849         #  @param theW     Width (horisontal size).
2850         #  @param theName Object name; when specified, this parameter is used
2851         #         for result publication in the study. Otherwise, if automatic
2852         #         publication is switched on, default value is used for result name.
2853         #
2854         #  @return New GEOM.GEOM_Object, containing the created face.
2855         #
2856         #  @ref tui_creation_face "Example"
2857         @ManageTransactions("PrimOp")
2858         def MakeFaceObjHW(self, theObj, theH, theW, theName=None):
2859             """
2860             Create a face from another plane and two sizes,
2861             vertical size and horisontal size.
2862
2863             Parameters:
2864                 theObj   Normale vector to the creating face or
2865                          the face object.
2866                 theH     Height (vertical size).
2867                 theW     Width (horisontal size).
2868                 theName Object name; when specified, this parameter is used
2869                         for result publication in the study. Otherwise, if automatic
2870                         publication is switched on, default value is used for result name.
2871
2872             Returns:
2873                 New GEOM_Object, containing the created face.
2874             """
2875             # Example: see GEOM_TestAll.py
2876             theH,theW,Parameters = ParseParameters(theH, theW)
2877             anObj = self.PrimOp.MakeFaceObjHW(theObj, theH, theW)
2878             RaiseIfFailed("MakeFaceObjHW", self.PrimOp)
2879             anObj.SetParameters(Parameters)
2880             self._autoPublish(anObj, theName, "rectangle")
2881             return anObj
2882
2883         ## Create a disk with given center, normal vector and radius.
2884         #  @param thePnt Disk center.
2885         #  @param theVec Vector, normal to the plane of the disk.
2886         #  @param theR Disk radius.
2887         #  @param theName Object name; when specified, this parameter is used
2888         #         for result publication in the study. Otherwise, if automatic
2889         #         publication is switched on, default value is used for result name.
2890         #
2891         #  @return New GEOM.GEOM_Object, containing the created disk.
2892         #
2893         #  @ref tui_creation_disk "Example"
2894         @ManageTransactions("PrimOp")
2895         def MakeDiskPntVecR(self, thePnt, theVec, theR, theName=None):
2896             """
2897             Create a disk with given center, normal vector and radius.
2898
2899             Parameters:
2900                 thePnt Disk center.
2901                 theVec Vector, normal to the plane of the disk.
2902                 theR Disk radius.
2903                 theName Object name; when specified, this parameter is used
2904                         for result publication in the study. Otherwise, if automatic
2905                         publication is switched on, default value is used for result name.
2906
2907             Returns:
2908                 New GEOM.GEOM_Object, containing the created disk.
2909             """
2910             # Example: see GEOM_TestAll.py
2911             theR,Parameters = ParseParameters(theR)
2912             anObj = self.PrimOp.MakeDiskPntVecR(thePnt, theVec, theR)
2913             RaiseIfFailed("MakeDiskPntVecR", self.PrimOp)
2914             anObj.SetParameters(Parameters)
2915             self._autoPublish(anObj, theName, "disk")
2916             return anObj
2917
2918         ## Create a disk, passing through three given points
2919         #  @param thePnt1,thePnt2,thePnt3 Points, defining the disk.
2920         #  @param theName Object name; when specified, this parameter is used
2921         #         for result publication in the study. Otherwise, if automatic
2922         #         publication is switched on, default value is used for result name.
2923         #
2924         #  @return New GEOM.GEOM_Object, containing the created disk.
2925         #
2926         #  @ref tui_creation_disk "Example"
2927         @ManageTransactions("PrimOp")
2928         def MakeDiskThreePnt(self, thePnt1, thePnt2, thePnt3, theName=None):
2929             """
2930             Create a disk, passing through three given points
2931
2932             Parameters:
2933                 thePnt1,thePnt2,thePnt3 Points, defining the disk.
2934                 theName Object name; when specified, this parameter is used
2935                         for result publication in the study. Otherwise, if automatic
2936                         publication is switched on, default value is used for result name.
2937
2938             Returns:
2939                 New GEOM.GEOM_Object, containing the created disk.
2940             """
2941             # Example: see GEOM_TestAll.py
2942             anObj = self.PrimOp.MakeDiskThreePnt(thePnt1, thePnt2, thePnt3)
2943             RaiseIfFailed("MakeDiskThreePnt", self.PrimOp)
2944             self._autoPublish(anObj, theName, "disk")
2945             return anObj
2946
2947         ## Create a disk with specified dimensions along OX-OY coordinate axes.
2948         #  @param theR Radius of Face.
2949         #  @param theOrientation set the orientation belong axis OXY or OYZ or OZX
2950         #  @param theName Object name; when specified, this parameter is used
2951         #         for result publication in the study. Otherwise, if automatic
2952         #         publication is switched on, default value is used for result name.
2953         #
2954         #  @return New GEOM.GEOM_Object, containing the created disk.
2955         #
2956         #  @ref tui_creation_face "Example"
2957         @ManageTransactions("PrimOp")
2958         def MakeDiskR(self, theR, theOrientation, theName=None):
2959             """
2960             Create a disk with specified dimensions along OX-OY coordinate axes.
2961
2962             Parameters:
2963                 theR Radius of Face.
2964                 theOrientation set the orientation belong axis OXY or OYZ or OZX
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.GEOM_Object, containing the created disk.
2971
2972             Example of usage:
2973                 Disk3 = geompy.MakeDiskR(100., 1)
2974             """
2975             # Example: see GEOM_TestAll.py
2976             theR,Parameters = ParseParameters(theR)
2977             anObj = self.PrimOp.MakeDiskR(theR, theOrientation)
2978             RaiseIfFailed("MakeDiskR", self.PrimOp)
2979             anObj.SetParameters(Parameters)
2980             self._autoPublish(anObj, theName, "disk")
2981             return anObj
2982
2983         ## Create a cylinder with given base point, axis, radius and height.
2984         #  @param thePnt Central point of cylinder base.
2985         #  @param theAxis Cylinder axis.
2986         #  @param theR Cylinder radius.
2987         #  @param theH Cylinder height.
2988         #  @param theName Object name; when specified, this parameter is used
2989         #         for result publication in the study. Otherwise, if automatic
2990         #         publication is switched on, default value is used for result name.
2991         #
2992         #  @return New GEOM.GEOM_Object, containing the created cylinder.
2993         #
2994         #  @ref tui_creation_cylinder "Example"
2995         @ManageTransactions("PrimOp")
2996         def MakeCylinder(self, thePnt, theAxis, theR, theH, theName=None):
2997             """
2998             Create a cylinder with given base point, axis, radius and height.
2999
3000             Parameters:
3001                 thePnt Central point of cylinder base.
3002                 theAxis Cylinder axis.
3003                 theR Cylinder radius.
3004                 theH Cylinder height.
3005                 theName Object name; when specified, this parameter is used
3006                         for result publication in the study. Otherwise, if automatic
3007                         publication is switched on, default value is used for result name.
3008
3009             Returns:
3010                 New GEOM.GEOM_Object, containing the created cylinder.
3011             """
3012             # Example: see GEOM_TestAll.py
3013             theR,theH,Parameters = ParseParameters(theR, theH)
3014             anObj = self.PrimOp.MakeCylinderPntVecRH(thePnt, theAxis, theR, theH)
3015             RaiseIfFailed("MakeCylinderPntVecRH", self.PrimOp)
3016             anObj.SetParameters(Parameters)
3017             self._autoPublish(anObj, theName, "cylinder")
3018             return anObj
3019             
3020         ## Create a portion of cylinder with given base point, axis, radius, height and angle.
3021         #  @param thePnt Central point of cylinder base.
3022         #  @param theAxis Cylinder axis.
3023         #  @param theR Cylinder radius.
3024         #  @param theH Cylinder height.
3025         #  @param theA Cylinder angle in radians.
3026         #  @param theName Object name; when specified, this parameter is used
3027         #         for result publication in the study. Otherwise, if automatic
3028         #         publication is switched on, default value is used for result name.
3029         #
3030         #  @return New GEOM.GEOM_Object, containing the created cylinder.
3031         #
3032         #  @ref tui_creation_cylinder "Example"
3033         @ManageTransactions("PrimOp")
3034         def MakeCylinderA(self, thePnt, theAxis, theR, theH, theA, theName=None):
3035             """
3036             Create a portion of cylinder with given base point, axis, radius, height and angle.
3037
3038             Parameters:
3039                 thePnt Central point of cylinder base.
3040                 theAxis Cylinder axis.
3041                 theR Cylinder radius.
3042                 theH Cylinder height.
3043                 theA Cylinder angle in radians.
3044                 theName Object name; when specified, this parameter is used
3045                         for result publication in the study. Otherwise, if automatic
3046                         publication is switched on, default value is used for result name.
3047
3048             Returns:
3049                 New GEOM.GEOM_Object, containing the created cylinder.
3050             """
3051             # Example: see GEOM_TestAll.py
3052             flag = False
3053             if isinstance(theA,str):
3054                 flag = True
3055             theR,theH,theA,Parameters = ParseParameters(theR, theH, theA)
3056             if flag:
3057                 theA = theA*math.pi/180.
3058             anObj = self.PrimOp.MakeCylinderPntVecRHA(thePnt, theAxis, theR, theH, theA)
3059             RaiseIfFailed("MakeCylinderPntVecRHA", self.PrimOp)
3060             anObj.SetParameters(Parameters)
3061             self._autoPublish(anObj, theName, "cylinder")
3062             return anObj
3063
3064         ## Create a cylinder with given radius and height at
3065         #  the origin of coordinate system. Axis of the cylinder
3066         #  will be collinear to the OZ axis of the coordinate system.
3067         #  @param theR Cylinder radius.
3068         #  @param theH Cylinder height.
3069         #  @param theName Object name; when specified, this parameter is used
3070         #         for result publication in the study. Otherwise, if automatic
3071         #         publication is switched on, default value is used for result name.
3072         #
3073         #  @return New GEOM.GEOM_Object, containing the created cylinder.
3074         #
3075         #  @ref tui_creation_cylinder "Example"
3076         @ManageTransactions("PrimOp")
3077         def MakeCylinderRH(self, theR, theH, theName=None):
3078             """
3079             Create a cylinder with given radius and height at
3080             the origin of coordinate system. Axis of the cylinder
3081             will be collinear to the OZ axis of the coordinate system.
3082
3083             Parameters:
3084                 theR Cylinder radius.
3085                 theH Cylinder height.
3086                 theName Object name; when specified, this parameter is used
3087                         for result publication in the study. Otherwise, if automatic
3088                         publication is switched on, default value is used for result name.
3089
3090             Returns:
3091                 New GEOM.GEOM_Object, containing the created cylinder.
3092             """
3093             # Example: see GEOM_TestAll.py
3094             theR,theH,Parameters = ParseParameters(theR, theH)
3095             anObj = self.PrimOp.MakeCylinderRH(theR, theH)
3096             RaiseIfFailed("MakeCylinderRH", self.PrimOp)
3097             anObj.SetParameters(Parameters)
3098             self._autoPublish(anObj, theName, "cylinder")
3099             return anObj
3100             
3101         ## Create a portion of cylinder with given radius, height and angle at
3102         #  the origin of coordinate system. Axis of the cylinder
3103         #  will be collinear to the OZ axis of the coordinate system.
3104         #  @param theR Cylinder radius.
3105         #  @param theH Cylinder height.
3106         #  @param theA Cylinder angle in radians.
3107         #  @param theName Object name; when specified, this parameter is used
3108         #         for result publication in the study. Otherwise, if automatic
3109         #         publication is switched on, default value is used for result name.
3110         #
3111         #  @return New GEOM.GEOM_Object, containing the created cylinder.
3112         #
3113         #  @ref tui_creation_cylinder "Example"
3114         @ManageTransactions("PrimOp")
3115         def MakeCylinderRHA(self, theR, theH, theA, theName=None):
3116             """
3117             Create a portion of cylinder with given radius, height and angle at
3118             the origin of coordinate system. Axis of the cylinder
3119             will be collinear to the OZ axis of the coordinate system.
3120
3121             Parameters:
3122                 theR Cylinder radius.
3123                 theH Cylinder height.
3124                 theA Cylinder angle in radians.
3125                 theName Object name; when specified, this parameter is used
3126                         for result publication in the study. Otherwise, if automatic
3127                         publication is switched on, default value is used for result name.
3128
3129             Returns:
3130                 New GEOM.GEOM_Object, containing the created cylinder.
3131             """
3132             # Example: see GEOM_TestAll.py
3133             flag = False
3134             if isinstance(theA,str):
3135                 flag = True
3136             theR,theH,theA,Parameters = ParseParameters(theR, theH, theA)
3137             if flag:
3138                 theA = theA*math.pi/180.
3139             anObj = self.PrimOp.MakeCylinderRHA(theR, theH, theA)
3140             RaiseIfFailed("MakeCylinderRHA", self.PrimOp)
3141             anObj.SetParameters(Parameters)
3142             self._autoPublish(anObj, theName, "cylinder")
3143             return anObj
3144
3145         ## Create a sphere with given center and radius.
3146         #  @param thePnt Sphere center.
3147         #  @param theR Sphere radius.
3148         #  @param theName Object name; when specified, this parameter is used
3149         #         for result publication in the study. Otherwise, if automatic
3150         #         publication is switched on, default value is used for result name.
3151         #
3152         #  @return New GEOM.GEOM_Object, containing the created sphere.
3153         #
3154         #  @ref tui_creation_sphere "Example"
3155         @ManageTransactions("PrimOp")
3156         def MakeSpherePntR(self, thePnt, theR, theName=None):
3157             """
3158             Create a sphere with given center and radius.
3159
3160             Parameters:
3161                 thePnt Sphere center.
3162                 theR Sphere radius.
3163                 theName Object name; when specified, this parameter is used
3164                         for result publication in the study. Otherwise, if automatic
3165                         publication is switched on, default value is used for result name.
3166
3167             Returns:
3168                 New GEOM.GEOM_Object, containing the created sphere.
3169             """
3170             # Example: see GEOM_TestAll.py
3171             theR,Parameters = ParseParameters(theR)
3172             anObj = self.PrimOp.MakeSpherePntR(thePnt, theR)
3173             RaiseIfFailed("MakeSpherePntR", self.PrimOp)
3174             anObj.SetParameters(Parameters)
3175             self._autoPublish(anObj, theName, "sphere")
3176             return anObj
3177
3178         ## Create a sphere with given center and radius.
3179         #  @param x,y,z Coordinates of sphere center.
3180         #  @param theR Sphere radius.
3181         #  @param theName Object name; when specified, this parameter is used
3182         #         for result publication in the study. Otherwise, if automatic
3183         #         publication is switched on, default value is used for result name.
3184         #
3185         #  @return New GEOM.GEOM_Object, containing the created sphere.
3186         #
3187         #  @ref tui_creation_sphere "Example"
3188         def MakeSphere(self, x, y, z, theR, theName=None):
3189             """
3190             Create a sphere with given center and radius.
3191
3192             Parameters:
3193                 x,y,z Coordinates of sphere center.
3194                 theR Sphere radius.
3195                 theName Object name; when specified, this parameter is used
3196                         for result publication in the study. Otherwise, if automatic
3197                         publication is switched on, default value is used for result name.
3198
3199             Returns:
3200                 New GEOM.GEOM_Object, containing the created sphere.
3201             """
3202             # Example: see GEOM_TestAll.py
3203             point = self.MakeVertex(x, y, z)
3204             # note: auto-publishing is done in self.MakeSpherePntR()
3205             anObj = self.MakeSpherePntR(point, theR, theName)
3206             return anObj
3207
3208         ## Create a sphere with given radius at the origin of coordinate system.
3209         #  @param theR Sphere radius.
3210         #  @param theName Object name; when specified, this parameter is used
3211         #         for result publication in the study. Otherwise, if automatic
3212         #         publication is switched on, default value is used for result name.
3213         #
3214         #  @return New GEOM.GEOM_Object, containing the created sphere.
3215         #
3216         #  @ref tui_creation_sphere "Example"
3217         @ManageTransactions("PrimOp")
3218         def MakeSphereR(self, theR, theName=None):
3219             """
3220             Create a sphere with given radius at the origin of coordinate system.
3221
3222             Parameters:
3223                 theR Sphere radius.
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 sphere.
3230             """
3231             # Example: see GEOM_TestAll.py
3232             theR,Parameters = ParseParameters(theR)
3233             anObj = self.PrimOp.MakeSphereR(theR)
3234             RaiseIfFailed("MakeSphereR", self.PrimOp)
3235             anObj.SetParameters(Parameters)
3236             self._autoPublish(anObj, theName, "sphere")
3237             return anObj
3238
3239         ## Create a cone with given base point, axis, height and radiuses.
3240         #  @param thePnt Central point of the first cone base.
3241         #  @param theAxis Cone axis.
3242         #  @param theR1 Radius of the first cone base.
3243         #  @param theR2 Radius of the second cone base.
3244         #    \note If both radiuses are non-zero, the cone will be truncated.
3245         #    \note If the radiuses are equal, a cylinder will be created instead.
3246         #  @param theH Cone height.
3247         #  @param theName Object name; when specified, this parameter is used
3248         #         for result publication in the study. Otherwise, if automatic
3249         #         publication is switched on, default value is used for result name.
3250         #
3251         #  @return New GEOM.GEOM_Object, containing the created cone.
3252         #
3253         #  @ref tui_creation_cone "Example"
3254         @ManageTransactions("PrimOp")
3255         def MakeCone(self, thePnt, theAxis, theR1, theR2, theH, theName=None):
3256             """
3257             Create a cone with given base point, axis, height and radiuses.
3258
3259             Parameters:
3260                 thePnt Central point of the first cone base.
3261                 theAxis Cone axis.
3262                 theR1 Radius of the first cone base.
3263                 theR2 Radius of the second cone base.
3264                 theH Cone height.
3265                 theName Object name; when specified, this parameter is used
3266                         for result publication in the study. Otherwise, if automatic
3267                         publication is switched on, default value is used for result name.
3268
3269             Note:
3270                 If both radiuses are non-zero, the cone will be truncated.
3271                 If the radiuses are equal, a cylinder will be created instead.
3272
3273             Returns:
3274                 New GEOM.GEOM_Object, containing the created cone.
3275             """
3276             # Example: see GEOM_TestAll.py
3277             theR1,theR2,theH,Parameters = ParseParameters(theR1,theR2,theH)
3278             anObj = self.PrimOp.MakeConePntVecR1R2H(thePnt, theAxis, theR1, theR2, theH)
3279             RaiseIfFailed("MakeConePntVecR1R2H", self.PrimOp)
3280             anObj.SetParameters(Parameters)
3281             self._autoPublish(anObj, theName, "cone")
3282             return anObj
3283
3284         ## Create a cone with given height and radiuses at
3285         #  the origin of coordinate system. Axis of the cone will
3286         #  be collinear to the OZ axis of the coordinate system.
3287         #  @param theR1 Radius of the first cone base.
3288         #  @param theR2 Radius of the second cone base.
3289         #    \note If both radiuses are non-zero, the cone will be truncated.
3290         #    \note If the radiuses are equal, a cylinder will be created instead.
3291         #  @param theH Cone height.
3292         #  @param theName Object name; when specified, this parameter is used
3293         #         for result publication in the study. Otherwise, if automatic
3294         #         publication is switched on, default value is used for result name.
3295         #
3296         #  @return New GEOM.GEOM_Object, containing the created cone.
3297         #
3298         #  @ref tui_creation_cone "Example"
3299         @ManageTransactions("PrimOp")
3300         def MakeConeR1R2H(self, theR1, theR2, theH, theName=None):
3301             """
3302             Create a cone with given height and radiuses at
3303             the origin of coordinate system. Axis of the cone will
3304             be collinear to the OZ axis of the coordinate system.
3305
3306             Parameters:
3307                 theR1 Radius of the first cone base.
3308                 theR2 Radius of the second cone base.
3309                 theH Cone height.
3310                 theName Object name; when specified, this parameter is used
3311                         for result publication in the study. Otherwise, if automatic
3312                         publication is switched on, default value is used for result name.
3313
3314             Note:
3315                 If both radiuses are non-zero, the cone will be truncated.
3316                 If the radiuses are equal, a cylinder will be created instead.
3317
3318             Returns:
3319                 New GEOM.GEOM_Object, containing the created cone.
3320             """
3321             # Example: see GEOM_TestAll.py
3322             theR1,theR2,theH,Parameters = ParseParameters(theR1,theR2,theH)
3323             anObj = self.PrimOp.MakeConeR1R2H(theR1, theR2, theH)
3324             RaiseIfFailed("MakeConeR1R2H", self.PrimOp)
3325             anObj.SetParameters(Parameters)
3326             self._autoPublish(anObj, theName, "cone")
3327             return anObj
3328
3329         ## Create a torus with given center, normal vector and radiuses.
3330         #  @param thePnt Torus central point.
3331         #  @param theVec Torus axis of symmetry.
3332         #  @param theRMajor Torus major radius.
3333         #  @param theRMinor Torus minor radius.
3334         #  @param theName Object name; when specified, this parameter is used
3335         #         for result publication in the study. Otherwise, if automatic
3336         #         publication is switched on, default value is used for result name.
3337         #
3338         #  @return New GEOM.GEOM_Object, containing the created torus.
3339         #
3340         #  @ref tui_creation_torus "Example"
3341         @ManageTransactions("PrimOp")
3342         def MakeTorus(self, thePnt, theVec, theRMajor, theRMinor, theName=None):
3343             """
3344             Create a torus with given center, normal vector and radiuses.
3345
3346             Parameters:
3347                 thePnt Torus central point.
3348                 theVec Torus axis of symmetry.
3349                 theRMajor Torus major radius.
3350                 theRMinor Torus minor radius.
3351                 theName Object name; when specified, this parameter is used
3352                         for result publication in the study. Otherwise, if automatic
3353                         publication is switched on, default value is used for result name.
3354
3355            Returns:
3356                 New GEOM.GEOM_Object, containing the created torus.
3357             """
3358             # Example: see GEOM_TestAll.py
3359             theRMajor,theRMinor,Parameters = ParseParameters(theRMajor,theRMinor)
3360             anObj = self.PrimOp.MakeTorusPntVecRR(thePnt, theVec, theRMajor, theRMinor)
3361             RaiseIfFailed("MakeTorusPntVecRR", self.PrimOp)
3362             anObj.SetParameters(Parameters)
3363             self._autoPublish(anObj, theName, "torus")
3364             return anObj
3365
3366         ## Create a torus with given radiuses at the origin of coordinate system.
3367         #  @param theRMajor Torus major radius.
3368         #  @param theRMinor Torus minor radius.
3369         #  @param theName Object name; when specified, this parameter is used
3370         #         for result publication in the study. Otherwise, if automatic
3371         #         publication is switched on, default value is used for result name.
3372         #
3373         #  @return New GEOM.GEOM_Object, containing the created torus.
3374         #
3375         #  @ref tui_creation_torus "Example"
3376         @ManageTransactions("PrimOp")
3377         def MakeTorusRR(self, theRMajor, theRMinor, theName=None):
3378             """
3379            Create a torus with given radiuses at the origin of coordinate system.
3380
3381            Parameters:
3382                 theRMajor Torus major radius.
3383                 theRMinor Torus minor radius.
3384                 theName Object name; when specified, this parameter is used
3385                         for result publication in the study. Otherwise, if automatic
3386                         publication is switched on, default value is used for result name.
3387
3388            Returns:
3389                 New GEOM.GEOM_Object, containing the created torus.
3390             """
3391             # Example: see GEOM_TestAll.py
3392             theRMajor,theRMinor,Parameters = ParseParameters(theRMajor,theRMinor)
3393             anObj = self.PrimOp.MakeTorusRR(theRMajor, theRMinor)
3394             RaiseIfFailed("MakeTorusRR", self.PrimOp)
3395             anObj.SetParameters(Parameters)
3396             self._autoPublish(anObj, theName, "torus")
3397             return anObj
3398
3399         # end of l3_3d_primitives
3400         ## @}
3401
3402         ## @addtogroup l3_complex
3403         ## @{
3404
3405         ## Create a shape by extrusion of the base shape along a vector, defined by two points.
3406         #  @param theBase Base shape to be extruded.
3407         #  @param thePoint1 First end of extrusion vector.
3408         #  @param thePoint2 Second end of extrusion vector.
3409         #  @param theScaleFactor Use it to make prism with scaled second base.
3410         #                        Nagative value means not scaled second base.
3411         #  @param 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         #  @return New GEOM.GEOM_Object, containing the created prism.
3416         #
3417         #  @ref tui_creation_prism "Example"
3418         @ManageTransactions("PrimOp")
3419         def MakePrism(self, theBase, thePoint1, thePoint2, theScaleFactor = -1.0, theName=None):
3420             """
3421             Create a shape by extrusion of the base shape along a vector, defined by two points.
3422
3423             Parameters:
3424                 theBase Base shape to be extruded.
3425                 thePoint1 First end of extrusion vector.
3426                 thePoint2 Second end of extrusion vector.
3427                 theScaleFactor Use it to make prism with scaled second base.
3428                                Nagative value means not scaled second base.
3429                 theName Object name; when specified, this parameter is used
3430                         for result publication in the study. Otherwise, if automatic
3431                         publication is switched on, default value is used for result name.
3432
3433             Returns:
3434                 New GEOM.GEOM_Object, containing the created prism.
3435             """
3436             # Example: see GEOM_TestAll.py
3437             anObj = None
3438             Parameters = ""
3439             if theScaleFactor > 0:
3440                 theScaleFactor,Parameters = ParseParameters(theScaleFactor)
3441                 anObj = self.PrimOp.MakePrismTwoPntWithScaling(theBase, thePoint1, thePoint2, theScaleFactor)
3442             else:
3443                 anObj = self.PrimOp.MakePrismTwoPnt(theBase, thePoint1, thePoint2)
3444             RaiseIfFailed("MakePrismTwoPnt", self.PrimOp)
3445             anObj.SetParameters(Parameters)
3446             self._autoPublish(anObj, theName, "prism")
3447             return anObj
3448
3449         ## Create a shape by extrusion of the base shape along a
3450         #  vector, defined by two points, in 2 Ways (forward/backward).
3451         #  @param theBase Base shape to be extruded.
3452         #  @param thePoint1 First end of extrusion vector.
3453         #  @param thePoint2 Second end of extrusion vector.
3454         #  @param theName Object name; when specified, this parameter is used
3455         #         for result publication in the study. Otherwise, if automatic
3456         #         publication is switched on, default value is used for result name.
3457         #
3458         #  @return New GEOM.GEOM_Object, containing the created prism.
3459         #
3460         #  @ref tui_creation_prism "Example"
3461         @ManageTransactions("PrimOp")
3462         def MakePrism2Ways(self, theBase, thePoint1, thePoint2, theName=None):
3463             """
3464             Create a shape by extrusion of the base shape along a
3465             vector, defined by two points, in 2 Ways (forward/backward).
3466
3467             Parameters:
3468                 theBase Base shape to be extruded.
3469                 thePoint1 First end of extrusion vector.
3470                 thePoint2 Second end of extrusion vector.
3471                 theName Object name; when specified, this parameter is used
3472                         for result publication in the study. Otherwise, if automatic
3473                         publication is switched on, default value is used for result name.
3474
3475             Returns:
3476                 New GEOM.GEOM_Object, containing the created prism.
3477             """
3478             # Example: see GEOM_TestAll.py
3479             anObj = self.PrimOp.MakePrismTwoPnt2Ways(theBase, thePoint1, thePoint2)
3480             RaiseIfFailed("MakePrismTwoPnt", self.PrimOp)
3481             self._autoPublish(anObj, theName, "prism")
3482             return anObj
3483
3484         ## Create a shape by extrusion of the base shape along the vector,
3485         #  i.e. all the space, transfixed by the base shape during its translation
3486         #  along the vector on the given distance.
3487         #  @param theBase Base shape to be extruded.
3488         #  @param theVec Direction of extrusion.
3489         #  @param theH Prism dimension along theVec.
3490         #  @param theScaleFactor Use it to make prism with scaled second base.
3491         #                        Negative value means not scaled second base.
3492         #  @param theName Object name; when specified, this parameter is used
3493         #         for result publication in the study. Otherwise, if automatic
3494         #         publication is switched on, default value is used for result name.
3495         #
3496         #  @return New GEOM.GEOM_Object, containing the created prism.
3497         #
3498         #  @ref tui_creation_prism "Example"
3499         @ManageTransactions("PrimOp")
3500         def MakePrismVecH(self, theBase, theVec, theH, theScaleFactor = -1.0, theName=None):
3501             """
3502             Create a shape by extrusion of the base shape along the vector,
3503             i.e. all the space, transfixed by the base shape during its translation
3504             along the vector on the given distance.
3505
3506             Parameters:
3507                 theBase Base shape to be extruded.
3508                 theVec Direction of extrusion.
3509                 theH Prism dimension along theVec.
3510                 theScaleFactor Use it to make prism with scaled second base.
3511                                Negative value means not scaled second base.
3512                 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             Returns:
3517                 New GEOM.GEOM_Object, containing the created prism.
3518             """
3519             # Example: see GEOM_TestAll.py
3520             anObj = None
3521             Parameters = ""
3522             if theScaleFactor > 0:
3523                 theH,theScaleFactor,Parameters = ParseParameters(theH,theScaleFactor)
3524                 anObj = self.PrimOp.MakePrismVecHWithScaling(theBase, theVec, theH, theScaleFactor)
3525             else:
3526                 theH,Parameters = ParseParameters(theH)
3527                 anObj = self.PrimOp.MakePrismVecH(theBase, theVec, theH)
3528             RaiseIfFailed("MakePrismVecH", self.PrimOp)
3529             anObj.SetParameters(Parameters)
3530             self._autoPublish(anObj, theName, "prism")
3531             return anObj
3532
3533         ## Create a shape by extrusion of the base shape along the vector,
3534         #  i.e. all the space, transfixed by the base shape during its translation
3535         #  along the vector on the given distance in 2 Ways (forward/backward).
3536         #  @param theBase Base shape to be extruded.
3537         #  @param theVec Direction of extrusion.
3538         #  @param theH Prism dimension along theVec in forward direction.
3539         #  @param theName Object name; when specified, this parameter is used
3540         #         for result publication in the study. Otherwise, if automatic
3541         #         publication is switched on, default value is used for result name.
3542         #
3543         #  @return New GEOM.GEOM_Object, containing the created prism.
3544         #
3545         #  @ref tui_creation_prism "Example"
3546         @ManageTransactions("PrimOp")
3547         def MakePrismVecH2Ways(self, theBase, theVec, theH, theName=None):
3548             """
3549             Create a shape by extrusion of the base shape along the vector,
3550             i.e. all the space, transfixed by the base shape during its translation
3551             along the vector on the given distance in 2 Ways (forward/backward).
3552
3553             Parameters:
3554                 theBase Base shape to be extruded.
3555                 theVec Direction of extrusion.
3556                 theH Prism dimension along theVec in forward direction.
3557                 theName Object name; when specified, this parameter is used
3558                         for result publication in the study. Otherwise, if automatic
3559                         publication is switched on, default value is used for result name.
3560
3561             Returns:
3562                 New GEOM.GEOM_Object, containing the created prism.
3563             """
3564             # Example: see GEOM_TestAll.py
3565             theH,Parameters = ParseParameters(theH)
3566             anObj = self.PrimOp.MakePrismVecH2Ways(theBase, theVec, theH)
3567             RaiseIfFailed("MakePrismVecH2Ways", self.PrimOp)
3568             anObj.SetParameters(Parameters)
3569             self._autoPublish(anObj, theName, "prism")
3570             return anObj
3571
3572         ## Create a shape by extrusion of the base shape along the dx, dy, dz direction
3573         #  @param theBase Base shape to be extruded.
3574         #  @param theDX, theDY, theDZ Directions of extrusion.
3575         #  @param theScaleFactor Use it to make prism with scaled second base.
3576         #                        Nagative value means not scaled second base.
3577         #  @param theName Object name; when specified, this parameter is used
3578         #         for result publication in the study. Otherwise, if automatic
3579         #         publication is switched on, default value is used for result name.
3580         #
3581         #  @return New GEOM.GEOM_Object, containing the created prism.
3582         #
3583         #  @ref tui_creation_prism "Example"
3584         @ManageTransactions("PrimOp")
3585         def MakePrismDXDYDZ(self, theBase, theDX, theDY, theDZ, theScaleFactor = -1.0, theName=None):
3586             """
3587             Create a shape by extrusion of the base shape along the dx, dy, dz direction
3588
3589             Parameters:
3590                 theBase Base shape to be extruded.
3591                 theDX, theDY, theDZ Directions of extrusion.
3592                 theScaleFactor Use it to make prism with scaled second base.
3593                                Nagative value means not scaled second base.
3594                 theName Object name; when specified, this parameter is used
3595                         for result publication in the study. Otherwise, if automatic
3596                         publication is switched on, default value is used for result name.
3597
3598             Returns:
3599                 New GEOM.GEOM_Object, containing the created prism.
3600             """
3601             # Example: see GEOM_TestAll.py
3602             anObj = None
3603             Parameters = ""
3604             if theScaleFactor > 0:
3605                 theDX,theDY,theDZ,theScaleFactor,Parameters = ParseParameters(theDX, theDY, theDZ, theScaleFactor)
3606                 anObj = self.PrimOp.MakePrismDXDYDZWithScaling(theBase, theDX, theDY, theDZ, theScaleFactor)
3607             else:
3608                 theDX,theDY,theDZ,Parameters = ParseParameters(theDX, theDY, theDZ)
3609                 anObj = self.PrimOp.MakePrismDXDYDZ(theBase, theDX, theDY, theDZ)
3610             RaiseIfFailed("MakePrismDXDYDZ", self.PrimOp)
3611             anObj.SetParameters(Parameters)
3612             self._autoPublish(anObj, theName, "prism")
3613             return anObj
3614
3615         ## Create a shape by extrusion of the base shape along the dx, dy, dz direction
3616         #  i.e. all the space, transfixed by the base shape during its translation
3617         #  along the vector on the given distance in 2 Ways (forward/backward).
3618         #  @param theBase Base shape to be extruded.
3619         #  @param theDX, theDY, theDZ Directions of extrusion.
3620         #  @param theName Object name; when specified, this parameter is used
3621         #         for result publication in the study. Otherwise, if automatic
3622         #         publication is switched on, default value is used for result name.
3623         #
3624         #  @return New GEOM.GEOM_Object, containing the created prism.
3625         #
3626         #  @ref tui_creation_prism "Example"
3627         @ManageTransactions("PrimOp")
3628         def MakePrismDXDYDZ2Ways(self, theBase, theDX, theDY, theDZ, theName=None):
3629             """
3630             Create a shape by extrusion of the base shape along the dx, dy, dz direction
3631             i.e. all the space, transfixed by the base shape during its translation
3632             along the vector on the given distance in 2 Ways (forward/backward).
3633
3634             Parameters:
3635                 theBase Base shape to be extruded.
3636                 theDX, theDY, theDZ Directions of extrusion.
3637                 theName Object name; when specified, this parameter is used
3638                         for result publication in the study. Otherwise, if automatic
3639                         publication is switched on, default value is used for result name.
3640
3641             Returns:
3642                 New GEOM.GEOM_Object, containing the created prism.
3643             """
3644             # Example: see GEOM_TestAll.py
3645             theDX,theDY,theDZ,Parameters = ParseParameters(theDX, theDY, theDZ)
3646             anObj = self.PrimOp.MakePrismDXDYDZ2Ways(theBase, theDX, theDY, theDZ)
3647             RaiseIfFailed("MakePrismDXDYDZ2Ways", self.PrimOp)
3648             anObj.SetParameters(Parameters)
3649             self._autoPublish(anObj, theName, "prism")
3650             return anObj
3651
3652         ## Create a shape by revolution of the base shape around the axis
3653         #  on the given angle, i.e. all the space, transfixed by the base
3654         #  shape during its rotation around the axis on the given angle.
3655         #  @param theBase Base shape to be rotated.
3656         #  @param theAxis Rotation axis.
3657         #  @param theAngle Rotation angle in radians.
3658         #  @param 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         #  @return New GEOM.GEOM_Object, containing the created revolution.
3663         #
3664         #  @ref tui_creation_revolution "Example"
3665         @ManageTransactions("PrimOp")
3666         def MakeRevolution(self, theBase, theAxis, theAngle, theName=None):
3667             """
3668             Create a shape by revolution of the base shape around the axis
3669             on the given angle, i.e. all the space, transfixed by the base
3670             shape during its rotation around the axis on the given angle.
3671
3672             Parameters:
3673                 theBase Base shape to be rotated.
3674                 theAxis Rotation axis.
3675                 theAngle Rotation angle in radians.
3676                 theName Object name; when specified, this parameter is used
3677                         for result publication in the study. Otherwise, if automatic
3678                         publication is switched on, default value is used for result name.
3679
3680             Returns:
3681                 New GEOM.GEOM_Object, containing the created revolution.
3682             """
3683             # Example: see GEOM_TestAll.py
3684             theAngle,Parameters = ParseParameters(theAngle)
3685             anObj = self.PrimOp.MakeRevolutionAxisAngle(theBase, theAxis, theAngle)
3686             RaiseIfFailed("MakeRevolutionAxisAngle", self.PrimOp)
3687             anObj.SetParameters(Parameters)
3688             self._autoPublish(anObj, theName, "revolution")
3689             return anObj
3690
3691         ## Create a shape by revolution of the base shape around the axis
3692         #  on the given angle, i.e. all the space, transfixed by the base
3693         #  shape during its rotation around the axis on the given angle in
3694         #  both directions (forward/backward)
3695         #  @param theBase Base shape to be rotated.
3696         #  @param theAxis Rotation axis.
3697         #  @param theAngle Rotation angle in radians.
3698         #  @param theName Object name; when specified, this parameter is used
3699         #         for result publication in the study. Otherwise, if automatic
3700         #         publication is switched on, default value is used for result name.
3701         #
3702         #  @return New GEOM.GEOM_Object, containing the created revolution.
3703         #
3704         #  @ref tui_creation_revolution "Example"
3705         @ManageTransactions("PrimOp")
3706         def MakeRevolution2Ways(self, theBase, theAxis, theAngle, theName=None):
3707             """
3708             Create a shape by revolution of the base shape around the axis
3709             on the given angle, i.e. all the space, transfixed by the base
3710             shape during its rotation around the axis on the given angle in
3711             both directions (forward/backward).
3712
3713             Parameters:
3714                 theBase Base shape to be rotated.
3715                 theAxis Rotation axis.
3716                 theAngle Rotation angle in radians.
3717                 theName Object name; when specified, this parameter is used
3718                         for result publication in the study. Otherwise, if automatic
3719                         publication is switched on, default value is used for result name.
3720
3721             Returns:
3722                 New GEOM.GEOM_Object, containing the created revolution.
3723             """
3724             theAngle,Parameters = ParseParameters(theAngle)
3725             anObj = self.PrimOp.MakeRevolutionAxisAngle2Ways(theBase, theAxis, theAngle)
3726             RaiseIfFailed("MakeRevolutionAxisAngle2Ways", self.PrimOp)
3727             anObj.SetParameters(Parameters)
3728             self._autoPublish(anObj, theName, "revolution")
3729             return anObj
3730
3731         ## Create a face from a given set of contours.
3732         #  @param theContours either a list or a compound of edges/wires.
3733         #  @param theMinDeg a minimal degree of BSpline surface to create.
3734         #  @param theMaxDeg a maximal degree of BSpline surface to create.
3735         #  @param theTol2D a 2d tolerance to be reached.
3736         #  @param theTol3D a 3d tolerance to be reached.
3737         #  @param theNbIter a number of iteration of approximation algorithm.
3738         #  @param theMethod Kind of method to perform filling operation
3739         #         (see GEOM.filling_oper_method enum).
3740         #  @param isApprox if True, BSpline curves are generated in the process
3741         #                  of surface construction. By default it is False, that means
3742         #                  the surface is created using given curves. The usage of
3743         #                  Approximation makes the algorithm work slower, but allows
3744         #                  building the surface for rather complex cases.
3745         #  @param theName Object name; when specified, this parameter is used
3746         #         for result publication in the study. Otherwise, if automatic
3747         #         publication is switched on, default value is used for result name.
3748         #
3749         #  @return New GEOM.GEOM_Object (face), containing the created filling surface.
3750         #
3751         #  @ref tui_creation_filling "Example"
3752         @ManageTransactions("PrimOp")
3753         def MakeFilling(self, theContours, theMinDeg=2, theMaxDeg=5, theTol2D=0.0001,
3754                         theTol3D=0.0001, theNbIter=0, theMethod=GEOM.FOM_Default, isApprox=0, theName=None):
3755             """
3756             Create a face from a given set of contours.
3757
3758             Parameters:
3759                 theContours either a list or a compound of edges/wires.
3760                 theMinDeg a minimal degree of BSpline surface to create.
3761                 theMaxDeg a maximal degree of BSpline surface to create.
3762                 theTol2D a 2d tolerance to be reached.
3763                 theTol3D a 3d tolerance to be reached.
3764                 theNbIter a number of iteration of approximation algorithm.
3765                 theMethod Kind of method to perform filling operation
3766                           (see GEOM.filling_oper_method enum).
3767                 isApprox if True, BSpline curves are generated in the process
3768                          of surface construction. By default it is False, that means
3769                          the surface is created using given curves. The usage of
3770                          Approximation makes the algorithm work slower, but allows
3771                          building the surface for rather complex cases.
3772                 theName Object name; when specified, this parameter is used
3773                         for result publication in the study. Otherwise, if automatic
3774                         publication is switched on, default value is used for result name.
3775
3776             Returns:
3777                 New GEOM.GEOM_Object (face), containing the created filling surface.
3778
3779             Example of usage:
3780                 filling = geompy.MakeFilling(compound, 2, 5, 0.0001, 0.0001, 5)
3781             """
3782             # Example: see GEOM_TestAll.py
3783             theMinDeg,theMaxDeg,theTol2D,theTol3D,theNbIter,Parameters = ParseParameters(theMinDeg, theMaxDeg, theTol2D, theTol3D, theNbIter)
3784             anObj = self.PrimOp.MakeFilling(ToList(theContours), theMinDeg, theMaxDeg,
3785                                             theTol2D, theTol3D, theNbIter,
3786                                             theMethod, isApprox)
3787             RaiseIfFailed("MakeFilling", self.PrimOp)
3788             anObj.SetParameters(Parameters)
3789             self._autoPublish(anObj, theName, "filling")
3790             return anObj
3791
3792
3793         ## Create a face from a given set of contours.
3794         #  This method corresponds to MakeFilling() with isApprox=True.
3795         #  @param theContours either a list or a compound of edges/wires.
3796         #  @param theMinDeg a minimal degree of BSpline surface to create.
3797         #  @param theMaxDeg a maximal degree of BSpline surface to create.
3798         #  @param theTol3D a 3d tolerance to be reached.
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 (face), containing the created filling surface.
3804         #
3805         #  @ref tui_creation_filling "Example"
3806         @ManageTransactions("PrimOp")
3807         def MakeFillingNew(self, theContours, theMinDeg=2, theMaxDeg=5, theTol3D=0.0001, theName=None):
3808             """
3809             Create a filling from the given compound of contours.
3810             This method corresponds to MakeFilling() with isApprox=True.
3811
3812             Parameters:
3813                 theContours either a list or a compound of edges/wires.
3814                 theMinDeg a minimal degree of BSpline surface to create.
3815                 theMaxDeg a maximal degree of BSpline surface to create.
3816                 theTol3D a 3d tolerance to be reached.
3817                 theName Object name; when specified, this parameter is used
3818                         for result publication in the study. Otherwise, if automatic
3819                         publication is switched on, default value is used for result name.
3820
3821             Returns:
3822                 New GEOM.GEOM_Object (face), containing the created filling surface.
3823
3824             Example of usage:
3825                 filling = geompy.MakeFillingNew(compound, 2, 5, 0.0001)
3826             """
3827             # Example: see GEOM_TestAll.py
3828             theMinDeg,theMaxDeg,theTol3D,Parameters = ParseParameters(theMinDeg, theMaxDeg, theTol3D)
3829             anObj = self.PrimOp.MakeFilling(ToList(theContours), theMinDeg, theMaxDeg,
3830                                             0, theTol3D, 0, GEOM.FOM_Default, True)
3831             RaiseIfFailed("MakeFillingNew", self.PrimOp)
3832             anObj.SetParameters(Parameters)
3833             self._autoPublish(anObj, theName, "filling")
3834             return anObj
3835
3836         ## Create a shell or solid passing through set of sections.Sections should be wires,edges or vertices.
3837         #  @param theSeqSections - set of specified sections.
3838         #  @param theModeSolid - mode defining building solid or shell
3839         #  @param thePreci - precision 3D used for smoothing
3840         #  @param theRuled - mode defining type of the result surfaces (ruled or smoothed).
3841         #  @param theName Object name; when specified, this parameter is used
3842         #         for result publication in the study. Otherwise, if automatic
3843         #         publication is switched on, default value is used for result name.
3844         #
3845         #  @return New GEOM.GEOM_Object, containing the created shell or solid.
3846         #
3847         #  @ref swig_todo "Example"
3848         @ManageTransactions("PrimOp")
3849         def MakeThruSections(self, theSeqSections, theModeSolid, thePreci, theRuled, theName=None):
3850             """
3851             Create a shell or solid passing through set of sections.Sections should be wires,edges or vertices.
3852
3853             Parameters:
3854                 theSeqSections - set of specified sections.
3855                 theModeSolid - mode defining building solid or shell
3856                 thePreci - precision 3D used for smoothing
3857                 theRuled - mode defining type of the result surfaces (ruled or smoothed).
3858                 theName Object name; when specified, this parameter is used
3859                         for result publication in the study. Otherwise, if automatic
3860                         publication is switched on, default value is used for result name.
3861
3862             Returns:
3863                 New GEOM.GEOM_Object, containing the created shell or solid.
3864             """
3865             # Example: see GEOM_TestAll.py
3866             anObj = self.PrimOp.MakeThruSections(theSeqSections,theModeSolid,thePreci,theRuled)
3867             RaiseIfFailed("MakeThruSections", self.PrimOp)
3868             self._autoPublish(anObj, theName, "filling")
3869             return anObj
3870
3871         ## Create a shape by extrusion of the base shape along
3872         #  the path shape. The path shape can be a wire or an edge.
3873         #  @param theBase Base shape to be extruded.
3874         #  @param thePath Path shape to extrude the base shape along it.
3875         #  @param theName Object name; when specified, this parameter is used
3876         #         for result publication in the study. Otherwise, if automatic
3877         #         publication is switched on, default value is used for result name.
3878         #
3879         #  @return New GEOM.GEOM_Object, containing the created pipe.
3880         #
3881         #  @ref tui_creation_pipe "Example"
3882         @ManageTransactions("PrimOp")
3883         def MakePipe(self, theBase, thePath, theName=None):
3884             """
3885             Create a shape by extrusion of the base shape along
3886             the path shape. The path shape can be a wire or an edge.
3887
3888             Parameters:
3889                 theBase Base shape to be extruded.
3890                 thePath Path shape to extrude the base shape along it.
3891                 theName Object name; when specified, this parameter is used
3892                         for result publication in the study. Otherwise, if automatic
3893                         publication is switched on, default value is used for result name.
3894
3895             Returns:
3896                 New GEOM.GEOM_Object, containing the created pipe.
3897             """
3898             # Example: see GEOM_TestAll.py
3899             anObj = self.PrimOp.MakePipe(theBase, thePath)
3900             RaiseIfFailed("MakePipe", self.PrimOp)
3901             self._autoPublish(anObj, theName, "pipe")
3902             return anObj
3903
3904         ## Create a shape by extrusion of the profile shape along
3905         #  the path shape. The path shape can be a wire or an edge.
3906         #  the several profiles can be specified in the several locations of path.
3907         #  @param theSeqBases - list of  Bases shape to be extruded.
3908         #  @param theLocations - list of locations on the path corresponding
3909         #                        specified list of the Bases shapes. Number of locations
3910         #                        should be equal to number of bases or list of locations can be empty.
3911         #  @param thePath - Path shape to extrude the base shape along it.
3912         #  @param theWithContact - the mode defining that the section is translated to be in
3913         #                          contact with the spine.
3914         #  @param theWithCorrection - defining that the section is rotated to be
3915         #                             orthogonal to the spine tangent in the correspondent point
3916         #  @param theName Object name; when specified, this parameter is used
3917         #         for result publication in the study. Otherwise, if automatic
3918         #         publication is switched on, default value is used for result name.
3919         #
3920         #  @return New GEOM.GEOM_Object, containing the created pipe.
3921         #
3922         #  @ref tui_creation_pipe_with_diff_sec "Example"
3923         @ManageTransactions("PrimOp")
3924         def MakePipeWithDifferentSections(self, theSeqBases,
3925                                           theLocations, thePath,
3926                                           theWithContact, theWithCorrection, theName=None):
3927             """
3928             Create a shape by extrusion of the profile shape along
3929             the path shape. The path shape can be a wire or an edge.
3930             the several profiles can be specified in the several locations of path.
3931
3932             Parameters:
3933                 theSeqBases - list of  Bases shape to be extruded.
3934                 theLocations - list of locations on the path corresponding
3935                                specified list of the Bases shapes. Number of locations
3936                                should be equal to number of bases or list of locations can be empty.
3937                 thePath - Path shape to extrude the base shape along it.
3938                 theWithContact - the mode defining that the section is translated to be in
3939                                  contact with the spine(0/1)
3940                 theWithCorrection - defining that the section is rotated to be
3941                                     orthogonal to the spine tangent in the correspondent point (0/1)
3942                 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             Returns:
3947                 New GEOM.GEOM_Object, containing the created pipe.
3948             """
3949             anObj = self.PrimOp.MakePipeWithDifferentSections(theSeqBases,
3950                                                               theLocations, thePath,
3951                                                               theWithContact, theWithCorrection)
3952             RaiseIfFailed("MakePipeWithDifferentSections", self.PrimOp)
3953             self._autoPublish(anObj, theName, "pipe")
3954             return anObj
3955
3956         ## Create a shape by extrusion of the profile shape along
3957         #  the path shape. The path shape can be a wire or a edge.
3958         #  the several profiles can be specified in the several locations of path.
3959         #  @param theSeqBases - list of  Bases shape to be extruded. Base shape must be
3960         #                       shell or face. If number of faces in neighbour sections
3961         #                       aren't coincided result solid between such sections will
3962         #                       be created using external boundaries of this shells.
3963         #  @param theSeqSubBases - list of corresponding sub-shapes of section shapes.
3964         #                          This list is used for searching correspondences between
3965         #                          faces in the sections. Size of this list must be equal
3966         #                          to size of list of base shapes.
3967         #  @param theLocations - list of locations on the path corresponding
3968         #                        specified list of the Bases shapes. Number of locations
3969         #                        should be equal to number of bases. First and last
3970         #                        locations must be coincided with first and last vertexes
3971         #                        of path correspondingly.
3972         #  @param thePath - Path shape to extrude the base shape along it.
3973         #  @param theWithContact - the mode defining that the section is translated to be in
3974         #                          contact with the spine.
3975         #  @param theWithCorrection - defining that the section is rotated to be
3976         #                             orthogonal to the spine tangent in the correspondent point
3977         #  @param theName Object name; when specified, this parameter is used
3978         #         for result publication in the study. Otherwise, if automatic
3979         #         publication is switched on, default value is used for result name.
3980         #
3981         #  @return New GEOM.GEOM_Object, containing the created solids.
3982         #
3983         #  @ref tui_creation_pipe_with_shell_sec "Example"
3984         @ManageTransactions("PrimOp")
3985         def MakePipeWithShellSections(self, theSeqBases, theSeqSubBases,
3986                                       theLocations, thePath,
3987                                       theWithContact, theWithCorrection, theName=None):
3988             """
3989             Create a shape by extrusion of the profile shape along
3990             the path shape. The path shape can be a wire or a edge.
3991             the several profiles can be specified in the several locations of path.
3992
3993             Parameters:
3994                 theSeqBases - list of  Bases shape to be extruded. Base shape must be
3995                               shell or face. If number of faces in neighbour sections
3996                               aren't coincided result solid between such sections will
3997                               be created using external boundaries of this shells.
3998                 theSeqSubBases - list of corresponding sub-shapes of section shapes.
3999                                  This list is used for searching correspondences between
4000                                  faces in the sections. Size of this list must be equal
4001                                  to size of list of base shapes.
4002                 theLocations - list of locations on the path corresponding
4003                                specified list of the Bases shapes. Number of locations
4004                                should be equal to number of bases. First and last
4005                                locations must be coincided with first and last vertexes
4006                                of path correspondingly.
4007                 thePath - Path shape to extrude the base shape along it.
4008                 theWithContact - the mode defining that the section is translated to be in
4009                                  contact with the spine (0/1)
4010                 theWithCorrection - defining that the section is rotated to be
4011                                     orthogonal to the spine tangent in the correspondent point (0/1)
4012                 theName Object name; when specified, this parameter is used
4013                         for result publication in the study. Otherwise, if automatic
4014                         publication is switched on, default value is used for result name.
4015
4016             Returns:
4017                 New GEOM.GEOM_Object, containing the created solids.
4018             """
4019             anObj = self.PrimOp.MakePipeWithShellSections(theSeqBases, theSeqSubBases,
4020                                                           theLocations, thePath,
4021                                                           theWithContact, theWithCorrection)
4022             RaiseIfFailed("MakePipeWithShellSections", self.PrimOp)
4023             self._autoPublish(anObj, theName, "pipe")
4024             return anObj
4025
4026         ## Create a shape by extrusion of the profile shape along
4027         #  the path shape. This function is used only for debug pipe
4028         #  functionality - it is a version of function MakePipeWithShellSections()
4029         #  which give a possibility to recieve information about
4030         #  creating pipe between each pair of sections step by step.
4031         @ManageTransactions("PrimOp")
4032         def MakePipeWithShellSectionsBySteps(self, theSeqBases, theSeqSubBases,
4033                                              theLocations, thePath,
4034                                              theWithContact, theWithCorrection, theName=None):
4035             """
4036             Create a shape by extrusion of the profile shape along
4037             the path shape. This function is used only for debug pipe
4038             functionality - it is a version of previous function
4039             geompy.MakePipeWithShellSections() which give a possibility to
4040             recieve information about creating pipe between each pair of
4041             sections step by step.
4042             """
4043             res = []
4044             nbsect = len(theSeqBases)
4045             nbsubsect = len(theSeqSubBases)
4046             #print "nbsect = ",nbsect
4047             for i in range(1,nbsect):
4048                 #print "  i = ",i
4049                 tmpSeqBases = [ theSeqBases[i-1], theSeqBases[i] ]
4050                 tmpLocations = [ theLocations[i-1], theLocations[i] ]
4051                 tmpSeqSubBases = []
4052                 if nbsubsect>0: tmpSeqSubBases = [ theSeqSubBases[i-1], theSeqSubBases[i] ]
4053                 anObj = self.PrimOp.MakePipeWithShellSections(tmpSeqBases, tmpSeqSubBases,
4054                                                               tmpLocations, thePath,
4055                                                               theWithContact, theWithCorrection)
4056                 if self.PrimOp.IsDone() == 0:
4057                     print "Problems with pipe creation between ",i," and ",i+1," sections"
4058                     RaiseIfFailed("MakePipeWithShellSections", self.PrimOp)
4059                     break
4060                 else:
4061                     print "Pipe between ",i," and ",i+1," sections is OK"
4062                     res.append(anObj)
4063                     pass
4064                 pass
4065
4066             resc = self.MakeCompound(res)
4067             #resc = self.MakeSewing(res, 0.001)
4068             #print "resc: ",resc
4069             self._autoPublish(resc, theName, "pipe")
4070             return resc
4071
4072         ## Create solids between given sections
4073         #  @param theSeqBases - list of sections (shell or face).
4074         #  @param theLocations - list of corresponding vertexes
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 solids.
4080         #
4081         #  @ref tui_creation_pipe_without_path "Example"
4082         @ManageTransactions("PrimOp")
4083         def MakePipeShellsWithoutPath(self, theSeqBases, theLocations, theName=None):
4084             """
4085             Create solids between given sections
4086
4087             Parameters:
4088                 theSeqBases - list of sections (shell or face).
4089                 theLocations - list of corresponding vertexes
4090                 theName Object name; when specified, this parameter is used
4091                         for result publication in the study. Otherwise, if automatic
4092                         publication is switched on, default value is used for result name.
4093
4094             Returns:
4095                 New GEOM.GEOM_Object, containing the created solids.
4096             """
4097             anObj = self.PrimOp.MakePipeShellsWithoutPath(theSeqBases, theLocations)
4098             RaiseIfFailed("MakePipeShellsWithoutPath", self.PrimOp)
4099             self._autoPublish(anObj, theName, "pipe")
4100             return anObj
4101
4102         ## Create a shape by extrusion of the base shape along
4103         #  the path shape with constant bi-normal direction along the given vector.
4104         #  The path shape can be a wire or an edge.
4105         #  @param theBase Base shape to be extruded.
4106         #  @param thePath Path shape to extrude the base shape along it.
4107         #  @param theVec Vector defines a constant binormal direction to keep the
4108         #                same angle beetween the direction and the sections
4109         #                along the sweep surface.
4110         #  @param 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         #  @return New GEOM.GEOM_Object, containing the created pipe.
4115         #
4116         #  @ref tui_creation_pipe "Example"
4117         @ManageTransactions("PrimOp")
4118         def MakePipeBiNormalAlongVector(self, theBase, thePath, theVec, theName=None):
4119             """
4120             Create a shape by extrusion of the base shape along
4121             the path shape with constant bi-normal direction along the given vector.
4122             The path shape can be a wire or an edge.
4123
4124             Parameters:
4125                 theBase Base shape to be extruded.
4126                 thePath Path shape to extrude the base shape along it.
4127                 theVec Vector defines a constant binormal direction to keep the
4128                        same angle beetween the direction and the sections
4129                        along the sweep surface.
4130                 theName Object name; when specified, this parameter is used
4131                         for result publication in the study. Otherwise, if automatic
4132                         publication is switched on, default value is used for result name.
4133
4134             Returns:
4135                 New GEOM.GEOM_Object, containing the created pipe.
4136             """
4137             # Example: see GEOM_TestAll.py
4138             anObj = self.PrimOp.MakePipeBiNormalAlongVector(theBase, thePath, theVec)
4139             RaiseIfFailed("MakePipeBiNormalAlongVector", self.PrimOp)
4140             self._autoPublish(anObj, theName, "pipe")
4141             return anObj
4142
4143         ## Makes a thick solid from a shape. If the input is a surface shape
4144         #  (face or shell) the result is a thick solid. If an input shape is
4145         #  a solid the result is a hollowed solid with removed faces.
4146         #  @param theShape Face or Shell to get thick solid or solid to get
4147         #         hollowed solid.
4148         #  @param theThickness Thickness of the resulting solid
4149         #  @param theFacesIDs the list of face IDs to be removed from the
4150         #         result. It is ignored if \a theShape is a face or a shell.
4151         #         It is empty by default. 
4152         #  @param theInside If true the thickness is applied towards inside
4153         #  @param theName Object name; when specified, this parameter is used
4154         #         for result publication in the study. Otherwise, if automatic
4155         #         publication is switched on, default value is used for result name.
4156         #
4157         #  @return New GEOM.GEOM_Object, containing the created solid
4158         #
4159         #  @ref tui_creation_thickness "Example"
4160         @ManageTransactions("PrimOp")
4161         def MakeThickSolid(self, theShape, theThickness,
4162                            theFacesIDs=[], theInside=False, theName=None):
4163             """
4164             Make a thick solid from a shape. If the input is a surface shape
4165             (face or shell) the result is a thick solid. If an input shape is
4166             a solid the result is a hollowed solid with removed faces.
4167
4168             Parameters:
4169                  theShape Face or Shell to get thick solid or solid to get
4170                           hollowed solid.
4171                  theThickness Thickness of the resulting solid
4172                  theFacesIDs the list of face IDs to be removed from the
4173                           result. It is ignored if theShape is a face or a
4174                           shell. It is empty by default. 
4175                  theInside If true the thickness is applied towards inside
4176                  theName Object name; when specified, this parameter is used
4177                          for result publication in the study. Otherwise, if automatic
4178                          publication is switched on, default value is used for result name.
4179
4180             Returns:
4181                 New GEOM.GEOM_Object, containing the created solid
4182             """
4183             # Example: see GEOM_TestAll.py
4184             theThickness,Parameters = ParseParameters(theThickness)
4185             anObj = self.PrimOp.MakeThickening(theShape, theFacesIDs,
4186                                                theThickness, True, theInside)
4187             RaiseIfFailed("MakeThickSolid", self.PrimOp)
4188             anObj.SetParameters(Parameters)
4189             self._autoPublish(anObj, theName, "thickSolid")
4190             return anObj
4191
4192
4193         ## Modifies a shape to make it a thick solid. If the input is a surface
4194         #  shape (face or shell) the result is a thick solid. If an input shape
4195         #  is a solid the result is a hollowed solid with removed faces.
4196         #  @param theShape Face or Shell to get thick solid or solid to get
4197         #         hollowed solid.
4198         #  @param theThickness Thickness of the resulting solid
4199         #  @param theFacesIDs the list of face IDs to be removed from the
4200         #         result. It is ignored if \a theShape is a face or a shell.
4201         #         It is empty by default. 
4202         #  @param theInside If true the thickness is applied towards inside
4203         #
4204         #  @return The modified shape
4205         #
4206         #  @ref tui_creation_thickness "Example"
4207         @ManageTransactions("PrimOp")
4208         def Thicken(self, theShape, theThickness, theFacesIDs=[], theInside=False):
4209             """
4210             Modifies a shape to make it a thick solid. If the input is a
4211             surface shape (face or shell) the result is a thick solid. If
4212             an input shape is a solid the result is a hollowed solid with
4213             removed faces.
4214
4215             Parameters:
4216                 theShape Face or Shell to get thick solid or solid to get
4217                          hollowed solid.
4218                 theThickness Thickness of the resulting solid
4219                 theFacesIDs the list of face IDs to be removed from the
4220                          result. It is ignored if \a theShape is a face or
4221                          a shell. It is empty by default. 
4222                 theInside If true the thickness is applied towards inside
4223
4224             Returns:
4225                 The modified shape
4226             """
4227             # Example: see GEOM_TestAll.py
4228             theThickness,Parameters = ParseParameters(theThickness)
4229             anObj = self.PrimOp.MakeThickening(theShape, theFacesIDs,
4230                                                theThickness, False, theInside)
4231             RaiseIfFailed("Thicken", self.PrimOp)
4232             anObj.SetParameters(Parameters)
4233             return anObj
4234
4235         ## Build a middle path of a pipe-like shape.
4236         #  The path shape can be a wire or an edge.
4237         #  @param theShape It can be closed or unclosed pipe-like shell
4238         #                  or a pipe-like solid.
4239         #  @param theBase1, theBase2 Two bases of the supposed pipe. This
4240         #                            should be wires or faces of theShape.
4241         #  @param theName Object name; when specified, this parameter is used
4242         #         for result publication in the study. Otherwise, if automatic
4243         #         publication is switched on, default value is used for result name.
4244         #
4245         #  @note It is not assumed that exact or approximate copy of theShape
4246         #        can be obtained by applying existing Pipe operation on the
4247         #        resulting "Path" wire taking theBase1 as the base - it is not
4248         #        always possible; though in some particular cases it might work
4249         #        it is not guaranteed. Thus, RestorePath function should not be
4250         #        considered as an exact reverse operation of the Pipe.
4251         #
4252         #  @return New GEOM.GEOM_Object, containing an edge or wire that represent
4253         #                                source pipe's "path".
4254         #
4255         #  @ref tui_creation_pipe_path "Example"
4256         @ManageTransactions("PrimOp")
4257         def RestorePath (self, theShape, theBase1, theBase2, theName=None):
4258             """
4259             Build a middle path of a pipe-like shape.
4260             The path shape can be a wire or an edge.
4261
4262             Parameters:
4263                 theShape It can be closed or unclosed pipe-like shell
4264                          or a pipe-like solid.
4265                 theBase1, theBase2 Two bases of the supposed pipe. This
4266                                    should be wires or faces of theShape.
4267                 theName Object name; when specified, this parameter is used
4268                         for result publication in the study. Otherwise, if automatic
4269                         publication is switched on, default value is used for result name.
4270
4271             Returns:
4272                 New GEOM_Object, containing an edge or wire that represent
4273                                  source pipe's path.
4274             """
4275             anObj = self.PrimOp.RestorePath(theShape, theBase1, theBase2)
4276             RaiseIfFailed("RestorePath", self.PrimOp)
4277             self._autoPublish(anObj, theName, "path")
4278             return anObj
4279
4280         ## Build a middle path of a pipe-like shape.
4281         #  The path shape can be a wire or an edge.
4282         #  @param theShape It can be closed or unclosed pipe-like shell
4283         #                  or a pipe-like solid.
4284         #  @param listEdges1, listEdges2 Two bases of the supposed pipe. This
4285         #                                should be lists of edges of theShape.
4286         #  @param theName Object name; when specified, this parameter is used
4287         #         for result publication in the study. Otherwise, if automatic
4288         #         publication is switched on, default value is used for result name.
4289         #
4290         #  @note It is not assumed that exact or approximate copy of theShape
4291         #        can be obtained by applying existing Pipe operation on the
4292         #        resulting "Path" wire taking theBase1 as the base - it is not
4293         #        always possible; though in some particular cases it might work
4294         #        it is not guaranteed. Thus, RestorePath function should not be
4295         #        considered as an exact reverse operation of the Pipe.
4296         #
4297         #  @return New GEOM.GEOM_Object, containing an edge or wire that represent
4298         #                                source pipe's "path".
4299         #
4300         #  @ref tui_creation_pipe_path "Example"
4301         @ManageTransactions("PrimOp")
4302         def RestorePathEdges (self, theShape, listEdges1, listEdges2, theName=None):
4303             """
4304             Build a middle path of a pipe-like shape.
4305             The path shape can be a wire or an edge.
4306
4307             Parameters:
4308                 theShape It can be closed or unclosed pipe-like shell
4309                          or a pipe-like solid.
4310                 listEdges1, listEdges2 Two bases of the supposed pipe. This
4311                                        should be lists of edges of theShape.
4312                 theName Object name; when specified, this parameter is used
4313                         for result publication in the study. Otherwise, if automatic
4314                         publication is switched on, default value is used for result name.
4315
4316             Returns:
4317                 New GEOM_Object, containing an edge or wire that represent
4318                                  source pipe's path.
4319             """
4320             anObj = self.PrimOp.RestorePathEdges(theShape, listEdges1, listEdges2)
4321             RaiseIfFailed("RestorePath", self.PrimOp)
4322             self._autoPublish(anObj, theName, "path")
4323             return anObj
4324
4325         # end of l3_complex
4326         ## @}
4327
4328         ## @addtogroup l3_advanced
4329         ## @{
4330
4331         ## Create a linear edge with specified ends.
4332         #  @param thePnt1 Point for the first end of edge.
4333         #  @param thePnt2 Point for the second end of edge.
4334         #  @param theName Object name; when specified, this parameter is used
4335         #         for result publication in the study. Otherwise, if automatic
4336         #         publication is switched on, default value is used for result name.
4337         #
4338         #  @return New GEOM.GEOM_Object, containing the created edge.
4339         #
4340         #  @ref tui_creation_edge "Example"
4341         @ManageTransactions("ShapesOp")
4342         def MakeEdge(self, thePnt1, thePnt2, theName=None):
4343             """
4344             Create a linear edge with specified ends.
4345
4346             Parameters:
4347                 thePnt1 Point for the first end of edge.
4348                 thePnt2 Point for the second end of edge.
4349                 theName Object name; when specified, this parameter is used
4350                         for result publication in the study. Otherwise, if automatic
4351                         publication is switched on, default value is used for result name.
4352
4353             Returns:
4354                 New GEOM.GEOM_Object, containing the created edge.
4355             """
4356             # Example: see GEOM_TestAll.py
4357             anObj = self.ShapesOp.MakeEdge(thePnt1, thePnt2)
4358             RaiseIfFailed("MakeEdge", self.ShapesOp)
4359             self._autoPublish(anObj, theName, "edge")
4360             return anObj
4361
4362         ## Create a new edge, corresponding to the given length on the given curve.
4363         #  @param theRefCurve The referenced curve (edge).
4364         #  @param theLength Length on the referenced curve. It can be negative.
4365         #  @param theStartPoint Any point can be selected for it, the new edge will begin
4366         #                       at the end of \a theRefCurve, close to the selected point.
4367         #                       If None, start from the first point of \a theRefCurve.
4368         #  @param theName Object name; when specified, this parameter is used
4369         #         for result publication in the study. Otherwise, if automatic
4370         #         publication is switched on, default value is used for result name.
4371         #
4372         #  @return New GEOM.GEOM_Object, containing the created edge.
4373         #
4374         #  @ref tui_creation_edge "Example"
4375         @ManageTransactions("ShapesOp")
4376         def MakeEdgeOnCurveByLength(self, theRefCurve, theLength, theStartPoint = None, theName=None):
4377             """
4378             Create a new edge, corresponding to the given length on the given curve.
4379
4380             Parameters:
4381                 theRefCurve The referenced curve (edge).
4382                 theLength Length on the referenced curve. It can be negative.
4383                 theStartPoint Any point can be selected for it, the new edge will begin
4384                               at the end of theRefCurve, close to the selected point.
4385                               If None, start from the first point of theRefCurve.
4386                 theName Object name; when specified, this parameter is used
4387                         for result publication in the study. Otherwise, if automatic
4388                         publication is switched on, default value is used for result name.
4389
4390             Returns:
4391                 New GEOM.GEOM_Object, containing the created edge.
4392             """
4393             # Example: see GEOM_TestAll.py
4394             theLength, Parameters = ParseParameters(theLength)
4395             anObj = self.ShapesOp.MakeEdgeOnCurveByLength(theRefCurve, theLength, theStartPoint)
4396             RaiseIfFailed("MakeEdgeOnCurveByLength", self.ShapesOp)
4397             anObj.SetParameters(Parameters)
4398             self._autoPublish(anObj, theName, "edge")
4399             return anObj
4400
4401         ## Create an edge from specified wire.
4402         #  @param theWire source Wire
4403         #  @param theLinearTolerance linear tolerance value (default = 1e-07)
4404         #  @param theAngularTolerance angular tolerance value (default = 1e-12)
4405         #  @param theName Object name; when specified, this parameter is used
4406         #         for result publication in the study. Otherwise, if automatic
4407         #         publication is switched on, default value is used for result name.
4408         #
4409         #  @return New GEOM.GEOM_Object, containing the created edge.
4410         #
4411         #  @ref tui_creation_edge "Example"
4412         @ManageTransactions("ShapesOp")
4413         def MakeEdgeWire(self, theWire, theLinearTolerance = 1e-07, theAngularTolerance = 1e-12, theName=None):
4414             """
4415             Create an edge from specified wire.
4416
4417             Parameters:
4418                 theWire source Wire
4419                 theLinearTolerance linear tolerance value (default = 1e-07)
4420                 theAngularTolerance angular tolerance value (default = 1e-12)
4421                 theName Object name; when specified, this parameter is used
4422                         for result publication in the study. Otherwise, if automatic
4423                         publication is switched on, default value is used for result name.
4424
4425             Returns:
4426                 New GEOM.GEOM_Object, containing the created edge.
4427             """
4428             # Example: see GEOM_TestAll.py
4429             anObj = self.ShapesOp.MakeEdgeWire(theWire, theLinearTolerance, theAngularTolerance)
4430             RaiseIfFailed("MakeEdgeWire", self.ShapesOp)
4431             self._autoPublish(anObj, theName, "edge")
4432             return anObj
4433
4434         ## Create a wire from the set of edges and wires.
4435         #  @param theEdgesAndWires List of edges and/or wires.
4436         #  @param theTolerance Maximum distance between vertices, that will be merged.
4437         #                      Values less than 1e-07 are equivalent to 1e-07 (Precision::Confusion())
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 wire.
4443         #
4444         #  @ref tui_creation_wire "Example"
4445         @ManageTransactions("ShapesOp")
4446         def MakeWire(self, theEdgesAndWires, theTolerance = 1e-07, theName=None):
4447             """
4448             Create a wire from the set of edges and wires.
4449
4450             Parameters:
4451                 theEdgesAndWires List of edges and/or wires.
4452                 theTolerance Maximum distance between vertices, that will be merged.
4453                              Values less than 1e-07 are equivalent to 1e-07 (Precision::Confusion()).
4454                 theName Object name; when specified, this parameter is used
4455                         for result publication in the study. Otherwise, if automatic
4456                         publication is switched on, default value is used for result name.
4457
4458             Returns:
4459                 New GEOM.GEOM_Object, containing the created wire.
4460             """
4461             # Example: see GEOM_TestAll.py
4462             anObj = self.ShapesOp.MakeWire(theEdgesAndWires, theTolerance)
4463             RaiseIfFailed("MakeWire", self.ShapesOp)
4464             self._autoPublish(anObj, theName, "wire")
4465             return anObj
4466
4467         ## Create a face on the given wire.
4468         #  @param theWire closed Wire or Edge to build the face on.
4469         #  @param isPlanarWanted If TRUE, the algorithm tries to build a planar face.
4470         #                        If the tolerance of the obtained planar face is less
4471         #                        than 1e-06, this face will be returned, otherwise the
4472         #                        algorithm tries to build any suitable face on the given
4473         #                        wire and prints a warning message.
4474         #  @param theName Object name; when specified, this parameter is used
4475         #         for result publication in the study. Otherwise, if automatic
4476         #         publication is switched on, default value is used for result name.
4477         #
4478         #  @return New GEOM.GEOM_Object, containing the created face.
4479         #
4480         #  @ref tui_creation_face "Example"
4481         @ManageTransactions("ShapesOp")
4482         def MakeFace(self, theWire, isPlanarWanted, theName=None):
4483             """
4484             Create a face on the given wire.
4485
4486             Parameters:
4487                 theWire closed Wire or Edge to build the face on.
4488                 isPlanarWanted If TRUE, the algorithm tries to build a planar face.
4489                                If the tolerance of the obtained planar face is less
4490                                than 1e-06, this face will be returned, otherwise the
4491                                algorithm tries to build any suitable face on the given
4492                                wire and prints a warning message.
4493                 theName Object name; when specified, this parameter is used
4494                         for result publication in the study. Otherwise, if automatic
4495                         publication is switched on, default value is used for result name.
4496
4497             Returns:
4498                 New GEOM.GEOM_Object, containing the created face.
4499             """
4500             # Example: see GEOM_TestAll.py
4501             anObj = self.ShapesOp.MakeFace(theWire, isPlanarWanted)
4502             if isPlanarWanted and anObj is not None and self.ShapesOp.GetErrorCode() == "MAKE_FACE_TOLERANCE_TOO_BIG":
4503                 print "WARNING: Cannot build a planar face: required tolerance is too big. Non-planar face is built."
4504             else:
4505                 RaiseIfFailed("MakeFace", self.ShapesOp)
4506             self._autoPublish(anObj, theName, "face")
4507             return anObj
4508
4509         ## Create a face on the given wires set.
4510         #  @param theWires List of closed wires or edges to build the face on.
4511         #  @param isPlanarWanted If TRUE, the algorithm tries to build a planar face.
4512         #                        If the tolerance of the obtained planar face is less
4513         #                        than 1e-06, this face will be returned, otherwise the
4514         #                        algorithm tries to build any suitable face on the given
4515         #                        wire and prints a warning message.
4516         #  @param theName Object name; when specified, this parameter is used
4517         #         for result publication in the study. Otherwise, if automatic
4518         #         publication is switched on, default value is used for result name.
4519         #
4520         #  @return New GEOM.GEOM_Object, containing the created face.
4521         #
4522         #  @ref tui_creation_face "Example"
4523         @ManageTransactions("ShapesOp")
4524         def MakeFaceWires(self, theWires, isPlanarWanted, theName=None):
4525             """
4526             Create a face on the given wires set.
4527
4528             Parameters:
4529                 theWires List of closed wires or edges to build the face on.
4530                 isPlanarWanted If TRUE, the algorithm tries to build a planar face.
4531                                If the tolerance of the obtained planar face is less
4532                                than 1e-06, this face will be returned, otherwise the
4533                                algorithm tries to build any suitable face on the given
4534                                wire and prints a warning message.
4535                 theName Object name; when specified, this parameter is used
4536                         for result publication in the study. Otherwise, if automatic
4537                         publication is switched on, default value is used for result name.
4538
4539             Returns:
4540                 New GEOM.GEOM_Object, containing the created face.
4541             """
4542             # Example: see GEOM_TestAll.py
4543             anObj = self.ShapesOp.MakeFaceWires(ToList(theWires), isPlanarWanted)
4544             if isPlanarWanted and anObj is not None and self.ShapesOp.GetErrorCode() == "MAKE_FACE_TOLERANCE_TOO_BIG":
4545                 print "WARNING: Cannot build a planar face: required tolerance is too big. Non-planar face is built."
4546             else:
4547                 RaiseIfFailed("MakeFaceWires", self.ShapesOp)
4548             self._autoPublish(anObj, theName, "face")
4549             return anObj
4550
4551         ## See MakeFaceWires() method for details.
4552         #
4553         #  @ref tui_creation_face "Example 1"
4554         #  \n @ref swig_MakeFaces  "Example 2"
4555         def MakeFaces(self, theWires, isPlanarWanted, theName=None):
4556             """
4557             See geompy.MakeFaceWires() method for details.
4558             """
4559             # Example: see GEOM_TestOthers.py
4560             # note: auto-publishing is done in self.MakeFaceWires()
4561             anObj = self.MakeFaceWires(theWires, isPlanarWanted, theName)
4562             return anObj
4563
4564         ## Create a face based on a surface from given face bounded
4565         #  by given wire.
4566         #  @param theFace the face whose surface is used to create a new face.
4567         #  @param theWire the wire that will bound a new face.
4568         #  @param theName Object name; when specified, this parameter is used
4569         #         for result publication in the study. Otherwise, if automatic
4570         #         publication is switched on, default value is used for result name.
4571         #
4572         #  @return New GEOM.GEOM_Object, containing the created face.
4573         #
4574         #  @ref tui_creation_face "Example"
4575         @ManageTransactions("ShapesOp")
4576         def MakeFaceFromSurface(self, theFace, theWire, theName=None):
4577             """
4578             Create a face based on a surface from given face bounded
4579             by given wire.
4580
4581             Parameters:
4582                 theFace the face whose surface is used to create a new face.
4583                 theWire the wire that will bound a new face.
4584                 theName Object name; when specified, this parameter is used
4585                         for result publication in the study. Otherwise, if automatic
4586                         publication is switched on, default value is used for result name.
4587
4588             Returns:
4589                 New GEOM.GEOM_Object, containing the created face.
4590             """
4591             # Example: see GEOM_TestAll.py
4592             anObj = self.ShapesOp.MakeFaceFromSurface(theFace, theWire)
4593             RaiseIfFailed("MakeFaceFromSurface", self.ShapesOp)
4594             self._autoPublish(anObj, theName, "face")
4595             return anObj
4596           
4597         ## Create a face from a set of edges with the given constraints.
4598         #  @param theConstraints List of edges and constraint faces (as a sequence of a Edge + Face couples):
4599         #         - edges should form a closed wire;
4600         #         - for each edge, constraint face is optional: if a constraint face is missing
4601         #           for some edge, this means that there no constraint associated with this edge.
4602         #  @param theName Object name; when specified, this parameter is used
4603         #         for result publication in the study. Otherwise, if automatic
4604         #         publication is switched on, default value is used for result name.
4605         # 
4606         # @return New GEOM.GEOM_Object, containing the created face.
4607         # 
4608         # @ref tui_creation_face "Example"
4609         @ManageTransactions("ShapesOp")
4610         def MakeFaceWithConstraints(self, theConstraints, theName=None):
4611             """
4612             Create a face from a set of edges with the given constraints.
4613
4614             Parameters:
4615                 theConstraints List of edges and constraint faces (as a sequence of a Edge + Face couples):
4616                         - edges should form a closed wire;
4617                         - for each edge, constraint face is optional: if a constraint face is missing
4618                           for some edge, this means that there no constraint associated with this edge.
4619                 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             Returns:
4624                 New GEOM.GEOM_Object, containing the created face.
4625             """
4626             # Example: see GEOM_TestAll.py
4627             anObj = self.ShapesOp.MakeFaceWithConstraints(theConstraints)
4628             if anObj is None:
4629                 RaiseIfFailed("MakeFaceWithConstraints", self.ShapesOp)
4630             self._autoPublish(anObj, theName, "face")
4631             return anObj
4632
4633         ## Create a shell from the set of faces and shells.
4634         #  @param theFacesAndShells List of faces and/or shells.
4635         #  @param theName Object name; when specified, this parameter is used
4636         #         for result publication in the study. Otherwise, if automatic
4637         #         publication is switched on, default value is used for result name.
4638         #
4639         #  @return New GEOM.GEOM_Object, containing the created shell.
4640         #
4641         #  @ref tui_creation_shell "Example"
4642         @ManageTransactions("ShapesOp")
4643         def MakeShell(self, theFacesAndShells, theName=None):
4644             """
4645             Create a shell from the set of faces and shells.
4646
4647             Parameters:
4648                 theFacesAndShells List of faces and/or shells.
4649                 theName Object name; when specified, this parameter is used
4650                         for result publication in the study. Otherwise, if automatic
4651                         publication is switched on, default value is used for result name.
4652
4653             Returns:
4654                 New GEOM.GEOM_Object, containing the created shell.
4655             """
4656             # Example: see GEOM_TestAll.py
4657             anObj = self.ShapesOp.MakeShell( ToList( theFacesAndShells ))
4658             RaiseIfFailed("MakeShell", self.ShapesOp)
4659             self._autoPublish(anObj, theName, "shell")
4660             return anObj
4661
4662         ## Create a solid, bounded by the given shells.
4663         #  @param theShells Sequence of bounding shells.
4664         #  @param theName Object name; when specified, this parameter is used
4665         #         for result publication in the study. Otherwise, if automatic
4666         #         publication is switched on, default value is used for result name.
4667         #
4668         #  @return New GEOM.GEOM_Object, containing the created solid.
4669         #
4670         #  @ref tui_creation_solid "Example"
4671         @ManageTransactions("ShapesOp")
4672         def MakeSolid(self, theShells, theName=None):
4673             """
4674             Create a solid, bounded by the given shells.
4675
4676             Parameters:
4677                 theShells Sequence of bounding shells.
4678                 theName Object name; when specified, this parameter is used
4679                         for result publication in the study. Otherwise, if automatic
4680                         publication is switched on, default value is used for result name.
4681
4682             Returns:
4683                 New GEOM.GEOM_Object, containing the created solid.
4684             """
4685             # Example: see GEOM_TestAll.py
4686             theShells = ToList(theShells)
4687             if len(theShells) == 1:
4688                 descr = self._IsGoodForSolid(theShells[0])
4689                 #if len(descr) > 0:
4690                 #    raise RuntimeError, "MakeSolidShells : " + descr
4691                 if descr == "WRN_SHAPE_UNCLOSED":
4692                     raise RuntimeError, "MakeSolidShells : Unable to create solid from unclosed shape"
4693             anObj = self.ShapesOp.MakeSolidShells(theShells)
4694             RaiseIfFailed("MakeSolidShells", self.ShapesOp)
4695             self._autoPublish(anObj, theName, "solid")
4696             return anObj
4697
4698         ## Create a compound of the given shapes.
4699         #  @param theShapes List of shapes to put in compound.
4700         #  @param theName Object name; when specified, this parameter is used
4701         #         for result publication in the study. Otherwise, if automatic
4702         #         publication is switched on, default value is used for result name.
4703         #
4704         #  @return New GEOM.GEOM_Object, containing the created compound.
4705         #
4706         #  @ref tui_creation_compound "Example"
4707         @ManageTransactions("ShapesOp")
4708         def MakeCompound(self, theShapes, theName=None):
4709             """
4710             Create a compound of the given shapes.
4711
4712             Parameters:
4713                 theShapes List of shapes to put in compound.
4714                 theName Object name; when specified, this parameter is used
4715                         for result publication in the study. Otherwise, if automatic
4716                         publication is switched on, default value is used for result name.
4717
4718             Returns:
4719                 New GEOM.GEOM_Object, containing the created compound.
4720             """
4721             # Example: see GEOM_TestAll.py
4722             anObj = self.ShapesOp.MakeCompound(ToList(theShapes))
4723             RaiseIfFailed("MakeCompound", self.ShapesOp)
4724             self._autoPublish(anObj, theName, "compound")
4725             return anObj
4726         
4727         ## Create a solid (or solids) from the set of faces and/or shells.
4728         #  @param theFacesOrShells List of faces and/or shells.
4729         #  @param isIntersect If TRUE, forces performing intersections
4730         #         between arguments; otherwise (default) intersection is not performed.
4731         #  @param theName Object name; when specified, this parameter is used
4732         #         for result publication in the study. Otherwise, if automatic
4733         #         publication is switched on, default value is used for result name.
4734         #
4735         #  @return New GEOM.GEOM_Object, containing the created solid (or compound of solids).
4736         #
4737         #  @ref tui_creation_solid_from_faces "Example"
4738         @ManageTransactions("ShapesOp")
4739         def MakeSolidFromConnectedFaces(self, theFacesOrShells, isIntersect = False, theName=None):
4740             """
4741             Create a solid (or solids) from the set of connected faces and/or shells.
4742
4743             Parameters:
4744                 theFacesOrShells List of faces and/or shells.
4745                 isIntersect If TRUE, forces performing intersections
4746                         between arguments; otherwise (default) intersection is not performed
4747                 theName Object name; when specified, this parameter is used.
4748                         for result publication in the study. Otherwise, if automatic
4749                         publication is switched on, default value is used for result name.
4750
4751             Returns:
4752                 New GEOM.GEOM_Object, containing the created solid (or compound of solids).
4753             """
4754             # Example: see GEOM_TestAll.py
4755             anObj = self.ShapesOp.MakeSolidFromConnectedFaces(theFacesOrShells, isIntersect)
4756             RaiseIfFailed("MakeSolidFromConnectedFaces", self.ShapesOp)
4757             self._autoPublish(anObj, theName, "solid")
4758             return anObj
4759
4760         # end of l3_advanced
4761         ## @}
4762
4763         ## @addtogroup l2_measure
4764         ## @{
4765
4766         ## Gives quantity of faces in the given shape.
4767         #  @param theShape Shape to count faces of.
4768         #  @return Quantity of faces.
4769         #
4770         #  @ref swig_NumberOf "Example"
4771         @ManageTransactions("ShapesOp")
4772         def NumberOfFaces(self, theShape):
4773             """
4774             Gives quantity of faces in the given shape.
4775
4776             Parameters:
4777                 theShape Shape to count faces of.
4778
4779             Returns:
4780                 Quantity of faces.
4781             """
4782             # Example: see GEOM_TestOthers.py
4783             nb_faces = self.ShapesOp.NumberOfFaces(theShape)
4784             RaiseIfFailed("NumberOfFaces", self.ShapesOp)
4785             return nb_faces
4786
4787         ## Gives quantity of edges in the given shape.
4788         #  @param theShape Shape to count edges of.
4789         #  @return Quantity of edges.
4790         #
4791         #  @ref swig_NumberOf "Example"
4792         @ManageTransactions("ShapesOp")
4793         def NumberOfEdges(self, theShape):
4794             """
4795             Gives quantity of edges in the given shape.
4796
4797             Parameters:
4798                 theShape Shape to count edges of.
4799
4800             Returns:
4801                 Quantity of edges.
4802             """
4803             # Example: see GEOM_TestOthers.py
4804             nb_edges = self.ShapesOp.NumberOfEdges(theShape)
4805             RaiseIfFailed("NumberOfEdges", self.ShapesOp)
4806             return nb_edges
4807
4808         ## Gives quantity of sub-shapes of type theShapeType in the given shape.
4809         #  @param theShape Shape to count sub-shapes of.
4810         #  @param theShapeType Type of sub-shapes to count (see ShapeType())
4811         #  @return Quantity of sub-shapes of given type.
4812         #
4813         #  @ref swig_NumberOf "Example"
4814         @ManageTransactions("ShapesOp")
4815         def NumberOfSubShapes(self, theShape, theShapeType):
4816             """
4817             Gives quantity of sub-shapes of type theShapeType in the given shape.
4818
4819             Parameters:
4820                 theShape Shape to count sub-shapes of.
4821                 theShapeType Type of sub-shapes to count (see geompy.ShapeType)
4822
4823             Returns:
4824                 Quantity of sub-shapes of given type.
4825             """
4826             # Example: see GEOM_TestOthers.py
4827             nb_ss = self.ShapesOp.NumberOfSubShapes(theShape, theShapeType)
4828             RaiseIfFailed("NumberOfSubShapes", self.ShapesOp)
4829             return nb_ss
4830
4831         ## Gives quantity of solids in the given shape.
4832         #  @param theShape Shape to count solids in.
4833         #  @return Quantity of solids.
4834         #
4835         #  @ref swig_NumberOf "Example"
4836         @ManageTransactions("ShapesOp")
4837         def NumberOfSolids(self, theShape):
4838             """
4839             Gives quantity of solids in the given shape.
4840
4841             Parameters:
4842                 theShape Shape to count solids in.
4843
4844             Returns:
4845                 Quantity of solids.
4846             """
4847             # Example: see GEOM_TestOthers.py
4848             nb_solids = self.ShapesOp.NumberOfSubShapes(theShape, self.ShapeType["SOLID"])
4849             RaiseIfFailed("NumberOfSolids", self.ShapesOp)
4850             return nb_solids
4851
4852         # end of l2_measure
4853         ## @}
4854
4855         ## @addtogroup l3_healing
4856         ## @{
4857
4858         ## Reverses an orientation the given shape.
4859         #  @param theShape Shape to be reversed.
4860         #  @param 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         #  @return The reversed copy of theShape.
4865         #
4866         #  @ref swig_ChangeOrientation "Example"
4867         @ManageTransactions("ShapesOp")
4868         def ChangeOrientation(self, theShape, theName=None):
4869             """
4870             Reverses an orientation the given shape.
4871
4872             Parameters:
4873                 theShape Shape to be reversed.
4874                 theName Object name; when specified, this parameter is used
4875                         for result publication in the study. Otherwise, if automatic
4876                         publication is switched on, default value is used for result name.
4877
4878             Returns:
4879                 The reversed copy of theShape.
4880             """
4881             # Example: see GEOM_TestAll.py
4882             anObj = self.ShapesOp.ChangeOrientation(theShape)
4883             RaiseIfFailed("ChangeOrientation", self.ShapesOp)
4884             self._autoPublish(anObj, theName, "reversed")
4885             return anObj
4886
4887         ## See ChangeOrientation() method for details.
4888         #
4889         #  @ref swig_OrientationChange "Example"
4890         def OrientationChange(self, theShape, theName=None):
4891             """
4892             See geompy.ChangeOrientation method for details.
4893             """
4894             # Example: see GEOM_TestOthers.py
4895             # note: auto-publishing is done in self.ChangeOrientation()
4896             anObj = self.ChangeOrientation(theShape, theName)
4897             return anObj
4898
4899         # end of l3_healing
4900         ## @}
4901
4902         ## @addtogroup l4_obtain
4903         ## @{
4904
4905         ## Retrieve all free faces from the given shape.
4906         #  Free face is a face, which is not shared between two shells of the shape.
4907         #  @param theShape Shape to find free faces in.
4908         #  @return List of IDs of all free faces, contained in theShape.
4909         #
4910         #  @ref tui_free_faces_page "Example"
4911         @ManageTransactions("ShapesOp")
4912         def GetFreeFacesIDs(self,theShape):
4913             """
4914             Retrieve all free faces from the given shape.
4915             Free face is a face, which is not shared between two shells of the shape.
4916
4917             Parameters:
4918                 theShape Shape to find free faces in.
4919
4920             Returns:
4921                 List of IDs of all free faces, contained in theShape.
4922             """
4923             # Example: see GEOM_TestOthers.py
4924             anIDs = self.ShapesOp.GetFreeFacesIDs(theShape)
4925             RaiseIfFailed("GetFreeFacesIDs", self.ShapesOp)
4926             return anIDs
4927
4928         ## Get all sub-shapes of theShape1 of the given type, shared with theShape2.
4929         #  @param theShape1 Shape to find sub-shapes in.
4930         #  @param theShape2 Shape to find shared sub-shapes with.
4931         #  @param theShapeType Type of sub-shapes to be retrieved.
4932         #  @param theName Object name; when specified, this parameter is used
4933         #         for result publication in the study. Otherwise, if automatic
4934         #         publication is switched on, default value is used for result name.
4935         #
4936         #  @return List of sub-shapes of theShape1, shared with theShape2.
4937         #
4938         #  @ref swig_GetSharedShapes "Example"
4939         @ManageTransactions("ShapesOp")
4940         def GetSharedShapes(self, theShape1, theShape2, theShapeType, theName=None):
4941             """
4942             Get all sub-shapes of theShape1 of the given type, shared with theShape2.
4943
4944             Parameters:
4945                 theShape1 Shape to find sub-shapes in.
4946                 theShape2 Shape to find shared sub-shapes with.
4947                 theShapeType Type of sub-shapes to be retrieved.
4948                 theName Object name; when specified, this parameter is used
4949                         for result publication in the study. Otherwise, if automatic
4950                         publication is switched on, default value is used for result name.
4951
4952             Returns:
4953                 List of sub-shapes of theShape1, shared with theShape2.
4954             """
4955             # Example: see GEOM_TestOthers.py
4956             aList = self.ShapesOp.GetSharedShapes(theShape1, theShape2, theShapeType)
4957             RaiseIfFailed("GetSharedShapes", self.ShapesOp)
4958             self._autoPublish(aList, theName, "shared")
4959             return aList
4960
4961         ## Get sub-shapes, shared by input shapes.
4962         #  @param theShapes Either a list or compound of shapes to find common sub-shapes of.
4963         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType()).
4964         #  @param theMultiShare Specifies what type of shares should be checked:
4965         #         - @c True (default): search sub-shapes from 1st input shape shared with all other input shapes;
4966         #         - @c False: causes to search sub-shapes shared between couples of input shapes.
4967         #  @param theName Object name; when specified, this parameter is used
4968         #         for result publication in the study. Otherwise, if automatic
4969         #         publication is switched on, default value is used for result name.
4970         #
4971         #  @note If @a theShapes contains single compound, the shares between all possible couples of 
4972         #        its top-level shapes are returned; otherwise, only shares between 1st input shape
4973         #        and all rest input shapes are returned.
4974         #
4975         #  @return List of all found sub-shapes.
4976         #
4977         #  Examples:
4978         #  - @ref tui_shared_shapes "Example 1"
4979         #  - @ref swig_GetSharedShapes "Example 2"
4980         @ManageTransactions("ShapesOp")
4981         def GetSharedShapesMulti(self, theShapes, theShapeType, theMultiShare=True, theName=None):
4982             """
4983             Get sub-shapes, shared by input shapes.
4984
4985             Parameters:
4986                 theShapes Either a list or compound of shapes to find common sub-shapes of.
4987                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType).
4988                 theMultiShare Specifies what type of shares should be checked:
4989                   - True (default): search sub-shapes from 1st input shape shared with all other input shapes;
4990                   - False: causes to search sub-shapes shared between couples of input shapes.
4991                 theName Object name; when specified, this parameter is used
4992                         for result publication in the study. Otherwise, if automatic
4993                         publication is switched on, default value is used for result name.
4994
4995             Note: if theShapes contains single compound, the shares between all possible couples of 
4996                   its top-level shapes are returned; otherwise, only shares between 1st input shape
4997                   and all rest input shapes are returned.
4998
4999             Returns:
5000                 List of all found sub-shapes.
5001             """
5002             # Example: see GEOM_TestOthers.py
5003             aList = self.ShapesOp.GetSharedShapesMulti(ToList(theShapes), theShapeType, theMultiShare)
5004             RaiseIfFailed("GetSharedShapesMulti", self.ShapesOp)
5005             self._autoPublish(aList, theName, "shared")
5006             return aList
5007
5008         ## Find in <VAR>theShape</VAR> all sub-shapes of type <VAR>theShapeType</VAR>,
5009         #  situated relatively the specified plane by the certain way,
5010         #  defined through <VAR>theState</VAR> parameter.
5011         #  @param theShape Shape to find sub-shapes of.
5012         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5013         #  @param theAx1 Vector (or line, or linear edge), specifying normal
5014         #                direction and location of the plane to find shapes on.
5015         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5016         #  @param theName Object name; when specified, this parameter is used
5017         #         for result publication in the study. Otherwise, if automatic
5018         #         publication is switched on, default value is used for result name.
5019         #
5020         #  @return List of all found sub-shapes.
5021         #
5022         #  @ref swig_GetShapesOnPlane "Example"
5023         @ManageTransactions("ShapesOp")
5024         def GetShapesOnPlane(self, theShape, theShapeType, theAx1, theState, theName=None):
5025             """
5026             Find in theShape all sub-shapes of type theShapeType,
5027             situated relatively the specified plane by the certain way,
5028             defined through theState parameter.
5029
5030             Parameters:
5031                 theShape Shape to find sub-shapes of.
5032                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5033                 theAx1 Vector (or line, or linear edge), specifying normal
5034                        direction and location of the plane to find shapes on.
5035                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5036                 theName Object name; when specified, this parameter is used
5037                         for result publication in the study. Otherwise, if automatic
5038                         publication is switched on, default value is used for result name.
5039
5040             Returns:
5041                 List of all found sub-shapes.
5042             """
5043             # Example: see GEOM_TestOthers.py
5044             aList = self.ShapesOp.GetShapesOnPlane(theShape, theShapeType, theAx1, theState)
5045             RaiseIfFailed("GetShapesOnPlane", self.ShapesOp)
5046             self._autoPublish(aList, theName, "shapeOnPlane")
5047             return aList
5048
5049         ## Find in <VAR>theShape</VAR> all sub-shapes of type <VAR>theShapeType</VAR>,
5050         #  situated relatively the specified plane by the certain way,
5051         #  defined through <VAR>theState</VAR> parameter.
5052         #  @param theShape Shape to find sub-shapes of.
5053         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5054         #  @param theAx1 Vector (or line, or linear edge), specifying normal
5055         #                direction and location of the plane to find shapes on.
5056         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5057         #
5058         #  @return List of all found sub-shapes indices.
5059         #
5060         #  @ref swig_GetShapesOnPlaneIDs "Example"
5061         @ManageTransactions("ShapesOp")
5062         def GetShapesOnPlaneIDs(self, theShape, theShapeType, theAx1, theState):
5063             """
5064             Find in theShape all sub-shapes of type theShapeType,
5065             situated relatively the specified plane by the certain way,
5066             defined through theState parameter.
5067
5068             Parameters:
5069                 theShape Shape to find sub-shapes of.
5070                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5071                 theAx1 Vector (or line, or linear edge), specifying normal
5072                        direction and location of the plane to find shapes on.
5073                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5074
5075             Returns:
5076                 List of all found sub-shapes indices.
5077             """
5078             # Example: see GEOM_TestOthers.py
5079             aList = self.ShapesOp.GetShapesOnPlaneIDs(theShape, theShapeType, theAx1, theState)
5080             RaiseIfFailed("GetShapesOnPlaneIDs", self.ShapesOp)
5081             return aList
5082
5083         ## Find in <VAR>theShape</VAR> all sub-shapes of type <VAR>theShapeType</VAR>,
5084         #  situated relatively the specified plane by the certain way,
5085         #  defined through <VAR>theState</VAR> parameter.
5086         #  @param theShape Shape to find sub-shapes of.
5087         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5088         #  @param theAx1 Vector (or line, or linear edge), specifying normal
5089         #                direction of the plane to find shapes on.
5090         #  @param thePnt Point specifying location of the plane to find shapes on.
5091         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5092         #  @param theName Object name; when specified, this parameter is used
5093         #         for result publication in the study. Otherwise, if automatic
5094         #         publication is switched on, default value is used for result name.
5095         #
5096         #  @return List of all found sub-shapes.
5097         #
5098         #  @ref swig_GetShapesOnPlaneWithLocation "Example"
5099         @ManageTransactions("ShapesOp")
5100         def GetShapesOnPlaneWithLocation(self, theShape, theShapeType, theAx1, thePnt, theState, theName=None):
5101             """
5102             Find in theShape all sub-shapes of type theShapeType,
5103             situated relatively the specified plane by the certain way,
5104             defined through theState parameter.
5105
5106             Parameters:
5107                 theShape Shape to find sub-shapes of.
5108                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5109                 theAx1 Vector (or line, or linear edge), specifying normal
5110                        direction and location of the plane to find shapes on.
5111                 thePnt Point specifying location of the plane to find shapes on.
5112                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5113                 theName Object name; when specified, this parameter is used
5114                         for result publication in the study. Otherwise, if automatic
5115                         publication is switched on, default value is used for result name.
5116
5117             Returns:
5118                 List of all found sub-shapes.
5119             """
5120             # Example: see GEOM_TestOthers.py
5121             aList = self.ShapesOp.GetShapesOnPlaneWithLocation(theShape, theShapeType,
5122                                                                theAx1, thePnt, theState)
5123             RaiseIfFailed("GetShapesOnPlaneWithLocation", self.ShapesOp)
5124             self._autoPublish(aList, theName, "shapeOnPlane")
5125             return aList
5126
5127         ## Find in <VAR>theShape</VAR> all sub-shapes of type <VAR>theShapeType</VAR>,
5128         #  situated relatively the specified plane by the certain way,
5129         #  defined through <VAR>theState</VAR> parameter.
5130         #  @param theShape Shape to find sub-shapes of.
5131         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5132         #  @param theAx1 Vector (or line, or linear edge), specifying normal
5133         #                direction of the plane to find shapes on.
5134         #  @param thePnt Point specifying location of the plane to find shapes on.
5135         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5136         #
5137         #  @return List of all found sub-shapes indices.
5138         #
5139         #  @ref swig_GetShapesOnPlaneWithLocationIDs "Example"
5140         @ManageTransactions("ShapesOp")
5141         def GetShapesOnPlaneWithLocationIDs(self, theShape, theShapeType, theAx1, thePnt, theState):
5142             """
5143             Find in theShape all sub-shapes of type theShapeType,
5144             situated relatively the specified plane by the certain way,
5145             defined through theState parameter.
5146
5147             Parameters:
5148                 theShape Shape to find sub-shapes of.
5149                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5150                 theAx1 Vector (or line, or linear edge), specifying normal
5151                        direction and location of the plane to find shapes on.
5152                 thePnt Point specifying location of the plane to find shapes on.
5153                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5154
5155             Returns:
5156                 List of all found sub-shapes indices.
5157             """
5158             # Example: see GEOM_TestOthers.py
5159             aList = self.ShapesOp.GetShapesOnPlaneWithLocationIDs(theShape, theShapeType,
5160                                                                   theAx1, thePnt, theState)
5161             RaiseIfFailed("GetShapesOnPlaneWithLocationIDs", self.ShapesOp)
5162             return aList
5163
5164         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
5165         #  the specified cylinder by the certain way, defined through \a theState parameter.
5166         #  @param theShape Shape to find sub-shapes of.
5167         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5168         #  @param theAxis Vector (or line, or linear edge), specifying
5169         #                 axis of the cylinder to find shapes on.
5170         #  @param theRadius Radius of the cylinder to find shapes on.
5171         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5172         #  @param theName Object name; when specified, this parameter is used
5173         #         for result publication in the study. Otherwise, if automatic
5174         #         publication is switched on, default value is used for result name.
5175         #
5176         #  @return List of all found sub-shapes.
5177         #
5178         #  @ref swig_GetShapesOnCylinder "Example"
5179         @ManageTransactions("ShapesOp")
5180         def GetShapesOnCylinder(self, theShape, theShapeType, theAxis, theRadius, theState, theName=None):
5181             """
5182             Find in theShape all sub-shapes of type theShapeType, situated relatively
5183             the specified cylinder by the certain way, defined through theState parameter.
5184
5185             Parameters:
5186                 theShape Shape to find sub-shapes of.
5187                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5188                 theAxis Vector (or line, or linear edge), specifying
5189                         axis of the cylinder to find shapes on.
5190                 theRadius Radius of the cylinder to find shapes on.
5191                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5192                 theName Object name; when specified, this parameter is used
5193                         for result publication in the study. Otherwise, if automatic
5194                         publication is switched on, default value is used for result name.
5195
5196             Returns:
5197                 List of all found sub-shapes.
5198             """
5199             # Example: see GEOM_TestOthers.py
5200             aList = self.ShapesOp.GetShapesOnCylinder(theShape, theShapeType, theAxis, theRadius, theState)
5201             RaiseIfFailed("GetShapesOnCylinder", self.ShapesOp)
5202             self._autoPublish(aList, theName, "shapeOnCylinder")
5203             return aList
5204
5205         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
5206         #  the specified cylinder by the certain way, defined through \a theState parameter.
5207         #  @param theShape Shape to find sub-shapes of.
5208         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5209         #  @param theAxis Vector (or line, or linear edge), specifying
5210         #                 axis of the cylinder to find shapes on.
5211         #  @param theRadius Radius of the cylinder to find shapes on.
5212         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5213         #
5214         #  @return List of all found sub-shapes indices.
5215         #
5216         #  @ref swig_GetShapesOnCylinderIDs "Example"
5217         @ManageTransactions("ShapesOp")
5218         def GetShapesOnCylinderIDs(self, theShape, theShapeType, theAxis, theRadius, theState):
5219             """
5220             Find in theShape all sub-shapes of type theShapeType, situated relatively
5221             the specified cylinder by the certain way, defined through theState parameter.
5222
5223             Parameters:
5224                 theShape Shape to find sub-shapes of.
5225                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5226                 theAxis Vector (or line, or linear edge), specifying
5227                         axis of the cylinder to find shapes on.
5228                 theRadius Radius of the cylinder to find shapes on.
5229                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5230
5231             Returns:
5232                 List of all found sub-shapes indices.
5233             """
5234             # Example: see GEOM_TestOthers.py
5235             aList = self.ShapesOp.GetShapesOnCylinderIDs(theShape, theShapeType, theAxis, theRadius, theState)
5236             RaiseIfFailed("GetShapesOnCylinderIDs", self.ShapesOp)
5237             return aList
5238
5239         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
5240         #  the specified cylinder by the certain way, defined through \a theState parameter.
5241         #  @param theShape Shape to find sub-shapes of.
5242         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5243         #  @param theAxis Vector (or line, or linear edge), specifying
5244         #                 axis of the cylinder to find shapes on.
5245         #  @param thePnt Point specifying location of the bottom of the cylinder.
5246         #  @param theRadius Radius of the cylinder to find shapes on.
5247         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5248         #  @param theName Object name; when specified, this parameter is used
5249         #         for result publication in the study. Otherwise, if automatic
5250         #         publication is switched on, default value is used for result name.
5251         #
5252         #  @return List of all found sub-shapes.
5253         #
5254         #  @ref swig_GetShapesOnCylinderWithLocation "Example"
5255         @ManageTransactions("ShapesOp")
5256         def GetShapesOnCylinderWithLocation(self, theShape, theShapeType, theAxis, thePnt, theRadius, theState, theName=None):
5257             """
5258             Find in theShape all sub-shapes of type theShapeType, situated relatively
5259             the specified cylinder by the certain way, defined through theState parameter.
5260
5261             Parameters:
5262                 theShape Shape to find sub-shapes of.
5263                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5264                 theAxis Vector (or line, or linear edge), specifying
5265                         axis of the cylinder to find shapes on.
5266                 theRadius Radius of the cylinder to find shapes on.
5267                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5268                 theName Object name; when specified, this parameter is used
5269                         for result publication in the study. Otherwise, if automatic
5270                         publication is switched on, default value is used for result name.
5271
5272             Returns:
5273                 List of all found sub-shapes.
5274             """
5275             # Example: see GEOM_TestOthers.py
5276             aList = self.ShapesOp.GetShapesOnCylinderWithLocation(theShape, theShapeType, theAxis, thePnt, theRadius, theState)
5277             RaiseIfFailed("GetShapesOnCylinderWithLocation", self.ShapesOp)
5278             self._autoPublish(aList, theName, "shapeOnCylinder")
5279             return aList
5280
5281         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
5282         #  the specified cylinder by the certain way, defined through \a theState parameter.
5283         #  @param theShape Shape to find sub-shapes of.
5284         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5285         #  @param theAxis Vector (or line, or linear edge), specifying
5286         #                 axis of the cylinder to find shapes on.
5287         #  @param thePnt Point specifying location of the bottom of the cylinder.
5288         #  @param theRadius Radius of the cylinder to find shapes on.
5289         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5290         #
5291         #  @return List of all found sub-shapes indices
5292         #
5293         #  @ref swig_GetShapesOnCylinderWithLocationIDs "Example"
5294         @ManageTransactions("ShapesOp")
5295         def GetShapesOnCylinderWithLocationIDs(self, theShape, theShapeType, theAxis, thePnt, theRadius, theState):
5296             """
5297             Find in theShape all sub-shapes of type theShapeType, situated relatively
5298             the specified cylinder by the certain way, defined through theState parameter.
5299
5300             Parameters:
5301                 theShape Shape to find sub-shapes of.
5302                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5303                 theAxis Vector (or line, or linear edge), specifying
5304                         axis of the cylinder to find shapes on.
5305                 theRadius Radius of the cylinder to find shapes on.
5306                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5307
5308             Returns:
5309                 List of all found sub-shapes indices.
5310             """
5311             # Example: see GEOM_TestOthers.py
5312             aList = self.ShapesOp.GetShapesOnCylinderWithLocationIDs(theShape, theShapeType, theAxis, thePnt, theRadius, theState)
5313             RaiseIfFailed("GetShapesOnCylinderWithLocationIDs", self.ShapesOp)
5314             return aList
5315
5316         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
5317         #  the specified sphere by the certain way, defined through \a theState parameter.
5318         #  @param theShape Shape to find sub-shapes of.
5319         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5320         #  @param theCenter Point, specifying center of the sphere to find shapes on.
5321         #  @param theRadius Radius of the sphere to find shapes on.
5322         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5323         #  @param theName Object name; when specified, this parameter is used
5324         #         for result publication in the study. Otherwise, if automatic
5325         #         publication is switched on, default value is used for result name.
5326         #
5327         #  @return List of all found sub-shapes.
5328         #
5329         #  @ref swig_GetShapesOnSphere "Example"
5330         @ManageTransactions("ShapesOp")
5331         def GetShapesOnSphere(self, theShape, theShapeType, theCenter, theRadius, theState, theName=None):
5332             """
5333             Find in theShape all sub-shapes of type theShapeType, situated relatively
5334             the specified sphere by the certain way, defined through theState parameter.
5335
5336             Parameters:
5337                 theShape Shape to find sub-shapes of.
5338                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5339                 theCenter Point, specifying center of the sphere to find shapes on.
5340                 theRadius Radius of the sphere to find shapes on.
5341                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5342                 theName Object name; when specified, this parameter is used
5343                         for result publication in the study. Otherwise, if automatic
5344                         publication is switched on, default value is used for result name.
5345
5346             Returns:
5347                 List of all found sub-shapes.
5348             """
5349             # Example: see GEOM_TestOthers.py
5350             aList = self.ShapesOp.GetShapesOnSphere(theShape, theShapeType, theCenter, theRadius, theState)
5351             RaiseIfFailed("GetShapesOnSphere", self.ShapesOp)
5352             self._autoPublish(aList, theName, "shapeOnSphere")
5353             return aList
5354
5355         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
5356         #  the specified sphere by the certain way, defined through \a theState parameter.
5357         #  @param theShape Shape to find sub-shapes of.
5358         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5359         #  @param theCenter Point, specifying center of the sphere to find shapes on.
5360         #  @param theRadius Radius of the sphere to find shapes on.
5361         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5362         #
5363         #  @return List of all found sub-shapes indices.
5364         #
5365         #  @ref swig_GetShapesOnSphereIDs "Example"
5366         @ManageTransactions("ShapesOp")
5367         def GetShapesOnSphereIDs(self, theShape, theShapeType, theCenter, theRadius, theState):
5368             """
5369             Find in theShape all sub-shapes of type theShapeType, situated relatively
5370             the specified sphere by the certain way, defined through theState parameter.
5371
5372             Parameters:
5373                 theShape Shape to find sub-shapes of.
5374                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5375                 theCenter Point, specifying center of the sphere to find shapes on.
5376                 theRadius Radius of the sphere to find shapes on.
5377                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5378
5379             Returns:
5380                 List of all found sub-shapes indices.
5381             """
5382             # Example: see GEOM_TestOthers.py
5383             aList = self.ShapesOp.GetShapesOnSphereIDs(theShape, theShapeType, theCenter, theRadius, theState)
5384             RaiseIfFailed("GetShapesOnSphereIDs", self.ShapesOp)
5385             return aList
5386
5387         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
5388         #  the specified quadrangle by the certain way, defined through \a theState parameter.
5389         #  @param theShape Shape to find sub-shapes of.
5390         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5391         #  @param theTopLeftPoint Point, specifying top left corner of a quadrangle
5392         #  @param theTopRigthPoint Point, specifying top right corner of a quadrangle
5393         #  @param theBottomLeftPoint Point, specifying bottom left corner of a quadrangle
5394         #  @param theBottomRigthPoint Point, specifying bottom right corner of a quadrangle
5395         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5396         #  @param theName Object name; when specified, this parameter is used
5397         #         for result publication in the study. Otherwise, if automatic
5398         #         publication is switched on, default value is used for result name.
5399         #
5400         #  @return List of all found sub-shapes.
5401         #
5402         #  @ref swig_GetShapesOnQuadrangle "Example"
5403         @ManageTransactions("ShapesOp")
5404         def GetShapesOnQuadrangle(self, theShape, theShapeType,
5405                                   theTopLeftPoint, theTopRigthPoint,
5406                                   theBottomLeftPoint, theBottomRigthPoint, theState, theName=None):
5407             """
5408             Find in theShape all sub-shapes of type theShapeType, situated relatively
5409             the specified quadrangle by the certain way, defined through theState parameter.
5410
5411             Parameters:
5412                 theShape Shape to find sub-shapes of.
5413                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5414                 theTopLeftPoint Point, specifying top left corner of a quadrangle
5415                 theTopRigthPoint Point, specifying top right corner of a quadrangle
5416                 theBottomLeftPoint Point, specifying bottom left corner of a quadrangle
5417                 theBottomRigthPoint Point, specifying bottom right corner of a quadrangle
5418                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5419                 theName Object name; when specified, this parameter is used
5420                         for result publication in the study. Otherwise, if automatic
5421                         publication is switched on, default value is used for result name.
5422
5423             Returns:
5424                 List of all found sub-shapes.
5425             """
5426             # Example: see GEOM_TestOthers.py
5427             aList = self.ShapesOp.GetShapesOnQuadrangle(theShape, theShapeType,
5428                                                         theTopLeftPoint, theTopRigthPoint,
5429                                                         theBottomLeftPoint, theBottomRigthPoint, theState)
5430             RaiseIfFailed("GetShapesOnQuadrangle", self.ShapesOp)
5431             self._autoPublish(aList, theName, "shapeOnQuadrangle")
5432             return aList
5433
5434         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
5435         #  the specified quadrangle by the certain way, defined through \a theState parameter.
5436         #  @param theShape Shape to find sub-shapes of.
5437         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5438         #  @param theTopLeftPoint Point, specifying top left corner of a quadrangle
5439         #  @param theTopRigthPoint Point, specifying top right corner of a quadrangle
5440         #  @param theBottomLeftPoint Point, specifying bottom left corner of a quadrangle
5441         #  @param theBottomRigthPoint Point, specifying bottom right corner of a quadrangle
5442         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5443         #
5444         #  @return List of all found sub-shapes indices.
5445         #
5446         #  @ref swig_GetShapesOnQuadrangleIDs "Example"
5447         @ManageTransactions("ShapesOp")
5448         def GetShapesOnQuadrangleIDs(self, theShape, theShapeType,
5449                                      theTopLeftPoint, theTopRigthPoint,
5450                                      theBottomLeftPoint, theBottomRigthPoint, theState):
5451             """
5452             Find in theShape all sub-shapes of type theShapeType, situated relatively
5453             the specified quadrangle by the certain way, defined through theState parameter.
5454
5455             Parameters:
5456                 theShape Shape to find sub-shapes of.
5457                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5458                 theTopLeftPoint Point, specifying top left corner of a quadrangle
5459                 theTopRigthPoint Point, specifying top right corner of a quadrangle
5460                 theBottomLeftPoint Point, specifying bottom left corner of a quadrangle
5461                 theBottomRigthPoint Point, specifying bottom right corner of a quadrangle
5462                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5463
5464             Returns:
5465                 List of all found sub-shapes indices.
5466             """
5467
5468             # Example: see GEOM_TestOthers.py
5469             aList = self.ShapesOp.GetShapesOnQuadrangleIDs(theShape, theShapeType,
5470                                                            theTopLeftPoint, theTopRigthPoint,
5471                                                            theBottomLeftPoint, theBottomRigthPoint, theState)
5472             RaiseIfFailed("GetShapesOnQuadrangleIDs", self.ShapesOp)
5473             return aList
5474
5475         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
5476         #  the specified \a theBox by the certain way, defined through \a theState parameter.
5477         #  @param theBox Shape for relative comparing.
5478         #  @param theShape Shape to find sub-shapes of.
5479         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5480         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5481         #  @param theName Object name; when specified, this parameter is used
5482         #         for result publication in the study. Otherwise, if automatic
5483         #         publication is switched on, default value is used for result name.
5484         #
5485         #  @return List of all found sub-shapes.
5486         #
5487         #  @ref swig_GetShapesOnBox "Example"
5488         @ManageTransactions("ShapesOp")
5489         def GetShapesOnBox(self, theBox, theShape, theShapeType, theState, theName=None):
5490             """
5491             Find in theShape all sub-shapes of type theShapeType, situated relatively
5492             the specified theBox by the certain way, defined through theState parameter.
5493
5494             Parameters:
5495                 theBox Shape for relative comparing.
5496                 theShape Shape to find sub-shapes of.
5497                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5498                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5499                 theName Object name; when specified, this parameter is used
5500                         for result publication in the study. Otherwise, if automatic
5501                         publication is switched on, default value is used for result name.
5502
5503             Returns:
5504                 List of all found sub-shapes.
5505             """
5506             # Example: see GEOM_TestOthers.py
5507             aList = self.ShapesOp.GetShapesOnBox(theBox, theShape, theShapeType, theState)
5508             RaiseIfFailed("GetShapesOnBox", self.ShapesOp)
5509             self._autoPublish(aList, theName, "shapeOnBox")
5510             return aList
5511
5512         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
5513         #  the specified \a theBox by the certain way, defined through \a theState parameter.
5514         #  @param theBox Shape for relative comparing.
5515         #  @param theShape Shape to find sub-shapes of.
5516         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5517         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5518         #
5519         #  @return List of all found sub-shapes indices.
5520         #
5521         #  @ref swig_GetShapesOnBoxIDs "Example"
5522         @ManageTransactions("ShapesOp")
5523         def GetShapesOnBoxIDs(self, theBox, theShape, theShapeType, theState):
5524             """
5525             Find in theShape all sub-shapes of type theShapeType, situated relatively
5526             the specified theBox by the certain way, defined through theState parameter.
5527
5528             Parameters:
5529                 theBox Shape for relative comparing.
5530                 theShape Shape to find sub-shapes of.
5531                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5532                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5533
5534             Returns:
5535                 List of all found sub-shapes indices.
5536             """
5537             # Example: see GEOM_TestOthers.py
5538             aList = self.ShapesOp.GetShapesOnBoxIDs(theBox, theShape, theShapeType, theState)
5539             RaiseIfFailed("GetShapesOnBoxIDs", self.ShapesOp)
5540             return aList
5541
5542         ## Find in \a theShape all sub-shapes of type \a theShapeType,
5543         #  situated relatively the specified \a theCheckShape by the
5544         #  certain way, defined through \a theState parameter.
5545         #  @param theCheckShape Shape for relative comparing. It must be a solid.
5546         #  @param theShape Shape to find sub-shapes of.
5547         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5548         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5549         #  @param theName Object name; when specified, this parameter is used
5550         #         for result publication in the study. Otherwise, if automatic
5551         #         publication is switched on, default value is used for result name.
5552         #
5553         #  @return List of all found sub-shapes.
5554         #
5555         #  @ref swig_GetShapesOnShape "Example"
5556         @ManageTransactions("ShapesOp")
5557         def GetShapesOnShape(self, theCheckShape, theShape, theShapeType, theState, theName=None):
5558             """
5559             Find in theShape all sub-shapes of type theShapeType,
5560             situated relatively the specified theCheckShape by the
5561             certain way, defined through theState parameter.
5562
5563             Parameters:
5564                 theCheckShape Shape for relative comparing. It must be a solid.
5565                 theShape Shape to find sub-shapes of.
5566                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5567                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5568                 theName Object name; when specified, this parameter is used
5569                         for result publication in the study. Otherwise, if automatic
5570                         publication is switched on, default value is used for result name.
5571
5572             Returns:
5573                 List of all found sub-shapes.
5574             """
5575             # Example: see GEOM_TestOthers.py
5576             aList = self.ShapesOp.GetShapesOnShape(theCheckShape, theShape,
5577                                                    theShapeType, theState)
5578             RaiseIfFailed("GetShapesOnShape", self.ShapesOp)
5579             self._autoPublish(aList, theName, "shapeOnShape")
5580             return aList
5581
5582         ## Find in \a theShape all sub-shapes of type \a theShapeType,
5583         #  situated relatively the specified \a theCheckShape by the
5584         #  certain way, defined through \a theState parameter.
5585         #  @param theCheckShape Shape for relative comparing. It must be a solid.
5586         #  @param theShape Shape to find sub-shapes of.
5587         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5588         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5589         #  @param theName Object name; when specified, this parameter is used
5590         #         for result publication in the study. Otherwise, if automatic
5591         #         publication is switched on, default value is used for result name.
5592         #
5593         #  @return All found sub-shapes as compound.
5594         #
5595         #  @ref swig_GetShapesOnShapeAsCompound "Example"
5596         @ManageTransactions("ShapesOp")
5597         def GetShapesOnShapeAsCompound(self, theCheckShape, theShape, theShapeType, theState, theName=None):
5598             """
5599             Find in theShape all sub-shapes of type theShapeType,
5600             situated relatively the specified theCheckShape by the
5601             certain way, defined through theState parameter.
5602
5603             Parameters:
5604                 theCheckShape Shape for relative comparing. It must be a solid.
5605                 theShape Shape to find sub-shapes of.
5606                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5607                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5608                 theName Object name; when specified, this parameter is used
5609                         for result publication in the study. Otherwise, if automatic
5610                         publication is switched on, default value is used for result name.
5611
5612             Returns:
5613                 All found sub-shapes as compound.
5614             """
5615             # Example: see GEOM_TestOthers.py
5616             anObj = self.ShapesOp.GetShapesOnShapeAsCompound(theCheckShape, theShape,
5617                                                              theShapeType, theState)
5618             RaiseIfFailed("GetShapesOnShapeAsCompound", self.ShapesOp)
5619             self._autoPublish(anObj, theName, "shapeOnShape")
5620             return anObj
5621
5622         ## Find in \a theShape all sub-shapes of type \a theShapeType,
5623         #  situated relatively the specified \a theCheckShape by the
5624         #  certain way, defined through \a theState parameter.
5625         #  @param theCheckShape Shape for relative comparing. It must be a solid.
5626         #  @param theShape Shape to find sub-shapes of.
5627         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5628         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5629         #
5630         #  @return List of all found sub-shapes indices.
5631         #
5632         #  @ref swig_GetShapesOnShapeIDs "Example"
5633         @ManageTransactions("ShapesOp")
5634         def GetShapesOnShapeIDs(self, theCheckShape, theShape, theShapeType, theState):
5635             """
5636             Find in theShape all sub-shapes of type theShapeType,
5637             situated relatively the specified theCheckShape by the
5638             certain way, defined through theState parameter.
5639
5640             Parameters:
5641                 theCheckShape Shape for relative comparing. It must be a solid.
5642                 theShape Shape to find sub-shapes of.
5643                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5644                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5645
5646             Returns:
5647                 List of all found sub-shapes indices.
5648             """
5649             # Example: see GEOM_TestOthers.py
5650             aList = self.ShapesOp.GetShapesOnShapeIDs(theCheckShape, theShape,
5651                                                       theShapeType, theState)
5652             RaiseIfFailed("GetShapesOnShapeIDs", self.ShapesOp)
5653             return aList
5654
5655         ## Get sub-shape(s) of theShapeWhere, which are
5656         #  coincident with \a theShapeWhat or could be a part of it.
5657         #  @param theShapeWhere Shape to find sub-shapes of.
5658         #  @param theShapeWhat Shape, specifying what to find.
5659         #  @param isNewImplementation implementation of GetInPlace functionality
5660         #             (default = False, old alghorithm based on shape properties)
5661         #  @param theName Object name; when specified, this parameter is used
5662         #         for result publication in the study. Otherwise, if automatic
5663         #         publication is switched on, default value is used for result name.
5664         #
5665         #  @return Group of all found sub-shapes or a single found sub-shape.
5666         #
5667         #  @note This function has a restriction on argument shapes.
5668         #        If \a theShapeWhere has curved parts with significantly
5669         #        outstanding centres (i.e. the mass centre of a part is closer to
5670         #        \a theShapeWhat than to the part), such parts will not be found.
5671         #        @image html get_in_place_lost_part.png
5672         #
5673         #  @ref swig_GetInPlace "Example"
5674         @ManageTransactions("ShapesOp")
5675         def GetInPlace(self, theShapeWhere, theShapeWhat, isNewImplementation = False, theName=None):
5676             """
5677             Get sub-shape(s) of theShapeWhere, which are
5678             coincident with  theShapeWhat or could be a part of it.
5679
5680             Parameters:
5681                 theShapeWhere Shape to find sub-shapes of.
5682                 theShapeWhat Shape, specifying what to find.
5683                 isNewImplementation Implementation of GetInPlace functionality
5684                                     (default = False, old alghorithm based on shape properties)
5685                 theName Object name; when specified, this parameter is used
5686                         for result publication in the study. Otherwise, if automatic
5687                         publication is switched on, default value is used for result name.
5688
5689             Returns:
5690                 Group of all found sub-shapes or a single found sub-shape.
5691
5692
5693             Note:
5694                 This function has a restriction on argument shapes.
5695                 If theShapeWhere has curved parts with significantly
5696                 outstanding centres (i.e. the mass centre of a part is closer to
5697                 theShapeWhat than to the part), such parts will not be found.
5698             """
5699             # Example: see GEOM_TestOthers.py
5700             anObj = None
5701             if isNewImplementation:
5702                 anObj = self.ShapesOp.GetInPlace(theShapeWhere, theShapeWhat)
5703             else:
5704                 anObj = self.ShapesOp.GetInPlaceOld(theShapeWhere, theShapeWhat)
5705                 pass
5706             RaiseIfFailed("GetInPlace", self.ShapesOp)
5707             self._autoPublish(anObj, theName, "inplace")
5708             return anObj
5709
5710         ## Get sub-shape(s) of \a theShapeWhere, which are
5711         #  coincident with \a theShapeWhat or could be a part of it.
5712         #
5713         #  Implementation of this method is based on a saved history of an operation,
5714         #  produced \a theShapeWhere. The \a theShapeWhat must be among this operation's
5715         #  arguments (an argument shape or a sub-shape of an argument shape).
5716         #  The operation could be the Partition or one of boolean operations,
5717         #  performed on simple shapes (not on compounds).
5718         #
5719         #  @param theShapeWhere Shape to find sub-shapes of.
5720         #  @param theShapeWhat Shape, specifying what to find (must be in the
5721         #                      building history of the ShapeWhere).
5722         #  @param theName Object name; when specified, this parameter is used
5723         #         for result publication in the study. Otherwise, if automatic
5724         #         publication is switched on, default value is used for result name.
5725         #
5726         #  @return Group of all found sub-shapes or a single found sub-shape.
5727         #
5728         #  @ref swig_GetInPlace "Example"
5729         @ManageTransactions("ShapesOp")
5730         def GetInPlaceByHistory(self, theShapeWhere, theShapeWhat, theName=None):
5731             """
5732             Implementation of this method is based on a saved history of an operation,
5733             produced theShapeWhere. The theShapeWhat must be among this operation's
5734             arguments (an argument shape or a sub-shape of an argument shape).
5735             The operation could be the Partition or one of boolean operations,
5736             performed on simple shapes (not on compounds).
5737
5738             Parameters:
5739                 theShapeWhere Shape to find sub-shapes of.
5740                 theShapeWhat Shape, specifying what to find (must be in the
5741                                 building history of the ShapeWhere).
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                 Group of all found sub-shapes or a single found sub-shape.
5748             """
5749             # Example: see GEOM_TestOthers.py
5750             anObj = self.ShapesOp.GetInPlaceByHistory(theShapeWhere, theShapeWhat)
5751             RaiseIfFailed("GetInPlaceByHistory", self.ShapesOp)
5752             self._autoPublish(anObj, theName, "inplace")
5753             return anObj
5754
5755         ## Get sub-shape of theShapeWhere, which is
5756         #  equal to \a theShapeWhat.
5757         #  @param theShapeWhere Shape to find sub-shape of.
5758         #  @param theShapeWhat Shape, specifying what to find.
5759         #  @param theName Object name; when specified, this parameter is used
5760         #         for result publication in the study. Otherwise, if automatic
5761         #         publication is switched on, default value is used for result name.
5762         #
5763         #  @return New GEOM.GEOM_Object for found sub-shape.
5764         #
5765         #  @ref swig_GetSame "Example"
5766         @ManageTransactions("ShapesOp")
5767         def GetSame(self, theShapeWhere, theShapeWhat, theName=None):
5768             """
5769             Get sub-shape of theShapeWhere, which is
5770             equal to theShapeWhat.
5771
5772             Parameters:
5773                 theShapeWhere Shape to find sub-shape of.
5774                 theShapeWhat Shape, specifying what to find.
5775                 theName Object name; when specified, this parameter is used
5776                         for result publication in the study. Otherwise, if automatic
5777                         publication is switched on, default value is used for result name.
5778
5779             Returns:
5780                 New GEOM.GEOM_Object for found sub-shape.
5781             """
5782             anObj = self.ShapesOp.GetSame(theShapeWhere, theShapeWhat)
5783             RaiseIfFailed("GetSame", self.ShapesOp)
5784             self._autoPublish(anObj, theName, "sameShape")
5785             return anObj
5786
5787
5788         ## Get sub-shape indices of theShapeWhere, which is
5789         #  equal to \a theShapeWhat.
5790         #  @param theShapeWhere Shape to find sub-shape of.
5791         #  @param theShapeWhat Shape, specifying what to find.
5792         #  @return List of all found sub-shapes indices.
5793         #
5794         #  @ref swig_GetSame "Example"
5795         @ManageTransactions("ShapesOp")
5796         def GetSameIDs(self, theShapeWhere, theShapeWhat):
5797             """
5798             Get sub-shape indices of theShapeWhere, which is
5799             equal to theShapeWhat.
5800
5801             Parameters:
5802                 theShapeWhere Shape to find sub-shape of.
5803                 theShapeWhat Shape, specifying what to find.
5804
5805             Returns:
5806                 List of all found sub-shapes indices.
5807             """
5808             anObj = self.ShapesOp.GetSameIDs(theShapeWhere, theShapeWhat)
5809             RaiseIfFailed("GetSameIDs", self.ShapesOp)
5810             return anObj
5811
5812         ## Resize the input edge with the new Min and Max parameters.
5813         #  The input edge parameters range is [0, 1]. If theMin parameter is
5814         #  negative, the input edge is extended, otherwise it is shrinked by
5815         #  theMin parameter. If theMax is greater than 1, the edge is extended,
5816         #  otherwise it is shrinked by theMax parameter.
5817         #  @param theEdge the input edge to be resized.
5818         #  @param theMin the minimal parameter value.
5819         #  @param theMax the maximal parameter value.
5820         #  @param theName Object name; when specified, this parameter is used
5821         #         for result publication in the study. Otherwise, if automatic
5822         #         publication is switched on, default value is used for result name.
5823         #  @return New GEOM.GEOM_Object, containing the created edge.
5824         #
5825         #  @ref tui_extend "Example"
5826         @ManageTransactions("ShapesOp")
5827         def ExtendEdge(self, theEdge, theMin, theMax, theName=None):
5828             """
5829             Resize the input edge with the new Min and Max parameters.
5830             The input edge parameters range is [0, 1]. If theMin parameter is
5831             negative, the input edge is extended, otherwise it is shrinked by
5832             theMin parameter. If theMax is greater than 1, the edge is extended,
5833             otherwise it is shrinked by theMax parameter.
5834
5835             Parameters:
5836                 theEdge the input edge to be resized.
5837                 theMin the minimal parameter value.
5838                 theMax the maximal parameter value.
5839                 theName Object name; when specified, this parameter is used
5840                         for result publication in the study. Otherwise, if automatic
5841                         publication is switched on, default value is used for result name.
5842
5843             Returns:
5844                 New GEOM.GEOM_Object, containing the created edge.
5845             """
5846             theMin, theMax, Parameters = ParseParameters(theMin, theMax)
5847             anObj = self.ShapesOp.ExtendEdge(theEdge, theMin, theMax)
5848             RaiseIfFailed("ExtendEdge", self.ShapesOp)
5849             anObj.SetParameters(Parameters)
5850             self._autoPublish(anObj, theName, "edge")
5851             return anObj
5852
5853         ## Resize the input face with the new UMin, UMax, VMin and VMax
5854         #  parameters. The input face U and V parameters range is [0, 1]. If
5855         #  theUMin parameter is negative, the input face is extended, otherwise
5856         #  it is shrinked along U direction by theUMin parameter. If theUMax is
5857         #  greater than 1, the face is extended, otherwise it is shrinked along
5858         #  U direction by theUMax parameter. So as for theVMin, theVMax and
5859         #  V direction of the input face.
5860         #  @param theFace the input face to be resized.
5861         #  @param theUMin the minimal U parameter value.
5862         #  @param theUMax the maximal U parameter value.
5863         #  @param theVMin the minimal V parameter value.
5864         #  @param theVMax the maximal V parameter value.
5865         #  @param theName Object name; when specified, this parameter is used
5866         #         for result publication in the study. Otherwise, if automatic
5867         #         publication is switched on, default value is used for result name.
5868         #  @return New GEOM.GEOM_Object, containing the created face.
5869         #
5870         #  @ref tui_extend "Example"
5871         @ManageTransactions("ShapesOp")
5872         def ExtendFace(self, theFace, theUMin, theUMax,
5873                        theVMin, theVMax, theName=None):
5874             """
5875             Resize the input face with the new UMin, UMax, VMin and VMax
5876             parameters. The input face U and V parameters range is [0, 1]. If
5877             theUMin parameter is negative, the input face is extended, otherwise
5878             it is shrinked along U direction by theUMin parameter. If theUMax is
5879             greater than 1, the face is extended, otherwise it is shrinked along
5880             U direction by theUMax parameter. So as for theVMin, theVMax and
5881             V direction of the input face.
5882
5883             Parameters:
5884                 theFace the input face to be resized.
5885                 theUMin the minimal U parameter value.
5886                 theUMax the maximal U parameter value.
5887                 theVMin the minimal V parameter value.
5888                 theVMax the maximal V parameter value.
5889                 theName Object name; when specified, this parameter is used
5890                         for result publication in the study. Otherwise, if automatic
5891                         publication is switched on, default value is used for result name.
5892
5893             Returns:
5894                 New GEOM.GEOM_Object, containing the created face.
5895             """
5896             theUMin, theUMax, theVMin, theVMax, Parameters = ParseParameters(theUMin, theUMax, theVMin, theVMax)
5897             anObj = self.ShapesOp.ExtendFace(theFace, theUMin, theUMax,
5898                                              theVMin, theVMax)
5899             RaiseIfFailed("ExtendFace", self.ShapesOp)
5900             anObj.SetParameters(Parameters)
5901             self._autoPublish(anObj, theName, "face")
5902             return anObj
5903
5904         ## This function takes some face as input parameter and creates new
5905         #  GEOM_Object, i.e. topological shape by extracting underlying surface
5906         #  of the source face and limiting it by the Umin, Umax, Vmin, Vmax
5907         #  parameters of the source face (in the parametrical space).
5908         #  @param theFace the input face.
5909         #  @param theName Object name; when specified, this parameter is used
5910         #         for result publication in the study. Otherwise, if automatic
5911         #         publication is switched on, default value is used for result name.
5912         #  @return New GEOM.GEOM_Object, containing the created face.
5913         #
5914         #  @ref tui_creation_surface "Example"
5915         @ManageTransactions("ShapesOp")
5916         def MakeSurfaceFromFace(self, theFace, theName=None):
5917             """
5918             This function takes some face as input parameter and creates new
5919             GEOM_Object, i.e. topological shape by extracting underlying surface
5920             of the source face and limiting it by the Umin, Umax, Vmin, Vmax
5921             parameters of the source face (in the parametrical space).
5922
5923             Parameters:
5924                 theFace the input face.
5925                 theName Object name; when specified, this parameter is used
5926                         for result publication in the study. Otherwise, if automatic
5927                         publication is switched on, default value is used for result name.
5928
5929             Returns:
5930                 New GEOM.GEOM_Object, containing the created face.
5931             """
5932             anObj = self.ShapesOp.MakeSurfaceFromFace(theFace)
5933             RaiseIfFailed("MakeSurfaceFromFace", self.ShapesOp)
5934             self._autoPublish(anObj, theName, "surface")
5935             return anObj
5936
5937         # end of l4_obtain
5938         ## @}
5939
5940         ## @addtogroup l4_access
5941         ## @{
5942
5943         ## Obtain a composite sub-shape of <VAR>aShape</VAR>, composed from sub-shapes
5944         #  of aShape, selected by their unique IDs inside <VAR>aShape</VAR>
5945         #  @param aShape Shape to get sub-shape of.
5946         #  @param ListOfID List of sub-shapes indices.
5947         #  @param theName Object name; when specified, this parameter is used
5948         #         for result publication in the study. Otherwise, if automatic
5949         #         publication is switched on, default value is used for result name.
5950         #
5951         #  @return Found sub-shape.
5952         #
5953         #  @ref swig_all_decompose "Example"
5954         def GetSubShape(self, aShape, ListOfID, theName=None):
5955             """
5956             Obtain a composite sub-shape of aShape, composed from sub-shapes
5957             of aShape, selected by their unique IDs inside aShape
5958
5959             Parameters:
5960                 aShape Shape to get sub-shape of.
5961                 ListOfID List of sub-shapes indices.
5962                 theName Object name; when specified, this parameter is used
5963                         for result publication in the study. Otherwise, if automatic
5964                         publication is switched on, default value is used for result name.
5965
5966             Returns:
5967                 Found sub-shape.
5968             """
5969             # Example: see GEOM_TestAll.py
5970             anObj = self.AddSubShape(aShape,ListOfID)
5971             self._autoPublish(anObj, theName, "subshape")
5972             return anObj
5973
5974         ## Obtain unique ID of sub-shape <VAR>aSubShape</VAR> inside <VAR>aShape</VAR>
5975         #  of aShape, selected by their unique IDs inside <VAR>aShape</VAR>
5976         #  @param aShape Shape to get sub-shape of.
5977         #  @param aSubShape Sub-shapes of aShape.
5978         #  @return ID of found sub-shape.
5979         #
5980         #  @ref swig_all_decompose "Example"
5981         @ManageTransactions("LocalOp")
5982         def GetSubShapeID(self, aShape, aSubShape):
5983             """
5984             Obtain unique ID of sub-shape aSubShape inside aShape
5985             of aShape, selected by their unique IDs inside aShape
5986
5987             Parameters:
5988                aShape Shape to get sub-shape of.
5989                aSubShape Sub-shapes of aShape.
5990
5991             Returns:
5992                ID of found sub-shape.
5993             """
5994             # Example: see GEOM_TestAll.py
5995             anID = self.LocalOp.GetSubShapeIndex(aShape, aSubShape)
5996             RaiseIfFailed("GetSubShapeIndex", self.LocalOp)
5997             return anID
5998
5999         ## Obtain unique IDs of sub-shapes <VAR>aSubShapes</VAR> inside <VAR>aShape</VAR>
6000         #  This function is provided for performance purpose. The complexity is O(n) with n
6001         #  the number of subobjects of aShape
6002         #  @param aShape Shape to get sub-shape of.
6003         #  @param aSubShapes Sub-shapes of aShape.
6004         #  @return list of IDs of found sub-shapes.
6005         #
6006         #  @ref swig_all_decompose "Example"
6007         @ManageTransactions("ShapesOp")
6008         def GetSubShapesIDs(self, aShape, aSubShapes):
6009             """
6010             Obtain a list of IDs of sub-shapes aSubShapes inside aShape
6011             This function is provided for performance purpose. The complexity is O(n) with n
6012             the number of subobjects of aShape
6013
6014             Parameters:
6015                aShape Shape to get sub-shape of.
6016                aSubShapes Sub-shapes of aShape.
6017
6018             Returns:
6019                List of IDs of found sub-shape.
6020             """
6021             # Example: see GEOM_TestAll.py
6022             anIDs = self.ShapesOp.GetSubShapesIndices(aShape, aSubShapes)
6023             RaiseIfFailed("GetSubShapesIndices", self.ShapesOp)
6024             return anIDs
6025
6026         # end of l4_access
6027         ## @}
6028
6029         ## @addtogroup l4_decompose
6030         ## @{
6031
6032         ## Get all sub-shapes and groups of \a theShape,
6033         #  that were created already by any other methods.
6034         #  @param theShape Any shape.
6035         #  @param theGroupsOnly If this parameter is TRUE, only groups will be
6036         #                       returned, else all found sub-shapes and groups.
6037         #  @return List of existing sub-objects of \a theShape.
6038         #
6039         #  @ref swig_all_decompose "Example"
6040         @ManageTransactions("ShapesOp")
6041         def GetExistingSubObjects(self, theShape, theGroupsOnly = False):
6042             """
6043             Get all sub-shapes and groups of theShape,
6044             that were created already by any other methods.
6045
6046             Parameters:
6047                 theShape Any shape.
6048                 theGroupsOnly If this parameter is TRUE, only groups will be
6049                                  returned, else all found sub-shapes and groups.
6050
6051             Returns:
6052                 List of existing sub-objects of theShape.
6053             """
6054             # Example: see GEOM_TestAll.py
6055             ListObj = self.ShapesOp.GetExistingSubObjects(theShape, theGroupsOnly)
6056             RaiseIfFailed("GetExistingSubObjects", self.ShapesOp)
6057             return ListObj
6058
6059         ## Get all groups of \a theShape,
6060         #  that were created already by any other methods.
6061         #  @param theShape Any shape.
6062         #  @return List of existing groups of \a theShape.
6063         #
6064         #  @ref swig_all_decompose "Example"
6065         @ManageTransactions("ShapesOp")
6066         def GetGroups(self, theShape):
6067             """
6068             Get all groups of theShape,
6069             that were created already by any other methods.
6070
6071             Parameters:
6072                 theShape Any shape.
6073
6074             Returns:
6075                 List of existing groups of theShape.
6076             """
6077             # Example: see GEOM_TestAll.py
6078             ListObj = self.ShapesOp.GetExistingSubObjects(theShape, True)
6079             RaiseIfFailed("GetExistingSubObjects", self.ShapesOp)
6080             return ListObj
6081
6082         ## Explode a shape on sub-shapes of a given type.
6083         #  If the shape itself matches the type, it is also returned.
6084         #  @param aShape Shape to be exploded.
6085         #  @param aType Type of sub-shapes to be retrieved (see ShapeType())
6086         #  @param 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         #  @return List of sub-shapes of type theShapeType, contained in theShape.
6091         #
6092         #  @ref swig_all_decompose "Example"
6093         @ManageTransactions("ShapesOp")
6094         def SubShapeAll(self, aShape, aType, theName=None):
6095             """
6096             Explode a shape on sub-shapes of a given type.
6097             If the shape itself matches the type, it is also returned.
6098
6099             Parameters:
6100                 aShape Shape to be exploded.
6101                 aType Type of sub-shapes to be retrieved (see geompy.ShapeType)
6102                 theName Object name; when specified, this parameter is used
6103                         for result publication in the study. Otherwise, if automatic
6104                         publication is switched on, default value is used for result name.
6105
6106             Returns:
6107                 List of sub-shapes of type theShapeType, contained in theShape.
6108             """
6109             # Example: see GEOM_TestAll.py
6110             ListObj = self.ShapesOp.MakeAllSubShapes(aShape, EnumToLong( aType ), False)
6111             RaiseIfFailed("SubShapeAll", self.ShapesOp)
6112             self._autoPublish(ListObj, theName, "subshape")
6113             return ListObj
6114
6115         ## Explode a shape on sub-shapes of a given type.
6116         #  @param aShape Shape to be exploded.
6117         #  @param aType Type of sub-shapes to be retrieved (see ShapeType())
6118         #  @return List of IDs of sub-shapes.
6119         #
6120         #  @ref swig_all_decompose "Example"
6121         @ManageTransactions("ShapesOp")
6122         def SubShapeAllIDs(self, aShape, aType):
6123             """
6124             Explode a shape on sub-shapes of a given type.
6125
6126             Parameters:
6127                 aShape Shape to be exploded (see geompy.ShapeType)
6128                 aType Type of sub-shapes to be retrieved (see geompy.ShapeType)
6129
6130             Returns:
6131                 List of IDs of sub-shapes.
6132             """
6133             ListObj = self.ShapesOp.GetAllSubShapesIDs(aShape, EnumToLong( aType ), False)
6134             RaiseIfFailed("SubShapeAllIDs", self.ShapesOp)
6135             return ListObj
6136
6137         ## Obtain a compound of sub-shapes of <VAR>aShape</VAR>,
6138         #  selected by their indices in list of all sub-shapes of type <VAR>aType</VAR>.
6139         #  Each index is in range [1, Nb_Sub-Shapes_Of_Given_Type]
6140         #  @param aShape Shape to get sub-shape of.
6141         #  @param ListOfInd List of sub-shapes indices.
6142         #  @param aType Type of sub-shapes to be retrieved (see ShapeType())
6143         #  @param theName Object name; when specified, this parameter is used
6144         #         for result publication in the study. Otherwise, if automatic
6145         #         publication is switched on, default value is used for result name.
6146         #
6147         #  @return A compound of sub-shapes of aShape.
6148         #
6149         #  @ref swig_all_decompose "Example"
6150         def SubShape(self, aShape, aType, ListOfInd, theName=None):
6151             """
6152             Obtain a compound of sub-shapes of aShape,
6153             selected by their indices in list of all sub-shapes of type aType.
6154             Each index is in range [1, Nb_Sub-Shapes_Of_Given_Type]
6155
6156             Parameters:
6157                 aShape Shape to get sub-shape of.
6158                 ListOfID List of sub-shapes indices.
6159                 aType Type of sub-shapes to be retrieved (see geompy.ShapeType)
6160                 theName Object name; when specified, this parameter is used
6161                         for result publication in the study. Otherwise, if automatic
6162                         publication is switched on, default value is used for result name.
6163
6164             Returns:
6165                 A compound of sub-shapes of aShape.
6166             """
6167             # Example: see GEOM_TestAll.py
6168             ListOfIDs = []
6169             AllShapeIDsList = self.SubShapeAllIDs(aShape, EnumToLong( aType ))
6170             for ind in ListOfInd:
6171                 ListOfIDs.append(AllShapeIDsList[ind - 1])
6172             # note: auto-publishing is done in self.GetSubShape()
6173             anObj = self.GetSubShape(aShape, ListOfIDs, theName)
6174             return anObj
6175
6176         ## Explode a shape on sub-shapes of a given type.
6177         #  Sub-shapes will be sorted taking into account their gravity centers,
6178         #  to provide stable order of sub-shapes.
6179         #  If the shape itself matches the type, it is also returned.
6180         #  @param aShape Shape to be exploded.
6181         #  @param aType Type of sub-shapes to be retrieved (see ShapeType())
6182         #  @param theName Object name; when specified, this parameter is used
6183         #         for result publication in the study. Otherwise, if automatic
6184         #         publication is switched on, default value is used for result name.
6185         #
6186         #  @return List of sub-shapes of type theShapeType, contained in theShape.
6187         #
6188         #  @ref swig_SubShapeAllSorted "Example"
6189         @ManageTransactions("ShapesOp")
6190         def SubShapeAllSortedCentres(self, aShape, aType, theName=None):
6191             """
6192             Explode a shape on sub-shapes of a given type.
6193             Sub-shapes will be sorted taking into account their gravity centers,
6194             to provide stable order of sub-shapes.
6195             If the shape itself matches the type, it is also returned.
6196
6197             Parameters:
6198                 aShape Shape to be exploded.
6199                 aType Type of sub-shapes to be retrieved (see geompy.ShapeType)
6200                 theName Object name; when specified, this parameter is used
6201                         for result publication in the study. Otherwise, if automatic
6202                         publication is switched on, default value is used for result name.
6203
6204             Returns:
6205                 List of sub-shapes of type theShapeType, contained in theShape.
6206             """
6207             # Example: see GEOM_TestAll.py
6208             ListObj = self.ShapesOp.MakeAllSubShapes(aShape, EnumToLong( aType ), True)
6209             RaiseIfFailed("SubShapeAllSortedCentres", self.ShapesOp)
6210             self._autoPublish(ListObj, theName, "subshape")
6211             return ListObj
6212
6213         ## Explode a shape on sub-shapes of a given type.
6214         #  Sub-shapes will be sorted taking into account their gravity centers,
6215         #  to provide stable order of sub-shapes.
6216         #  @param aShape Shape to be exploded.
6217         #  @param aType Type of sub-shapes to be retrieved (see ShapeType())
6218         #  @return List of IDs of sub-shapes.
6219         #
6220         #  @ref swig_all_decompose "Example"
6221         @ManageTransactions("ShapesOp")
6222         def SubShapeAllSortedCentresIDs(self, aShape, aType):
6223             """
6224             Explode a shape on sub-shapes of a given type.
6225             Sub-shapes will be sorted taking into account their gravity centers,
6226             to provide stable order of sub-shapes.
6227
6228             Parameters:
6229                 aShape Shape to be exploded.
6230                 aType Type of sub-shapes to be retrieved (see geompy.ShapeType)
6231
6232             Returns:
6233                 List of IDs of sub-shapes.
6234             """
6235             ListIDs = self.ShapesOp.GetAllSubShapesIDs(aShape, EnumToLong( aType ), True)
6236             RaiseIfFailed("SubShapeAllIDs", self.ShapesOp)
6237             return ListIDs
6238
6239         ## Obtain a compound of sub-shapes of <VAR>aShape</VAR>,
6240         #  selected by they indices in sorted list of all sub-shapes of type <VAR>aType</VAR>.
6241         #  Each index is in range [1, Nb_Sub-Shapes_Of_Given_Type]
6242         #  @param aShape Shape to get sub-shape of.
6243         #  @param ListOfInd List of sub-shapes indices.
6244         #  @param aType Type of sub-shapes to be retrieved (see ShapeType())
6245         #  @param theName Object name; when specified, this parameter is used
6246         #         for result publication in the study. Otherwise, if automatic
6247         #         publication is switched on, default value is used for result name.
6248         #
6249         #  @return A compound of sub-shapes of aShape.
6250         #
6251         #  @ref swig_all_decompose "Example"
6252         def SubShapeSortedCentres(self, aShape, aType, ListOfInd, theName=None):
6253             """
6254             Obtain a compound of sub-shapes of aShape,
6255             selected by they indices in sorted list of all sub-shapes of type aType.
6256             Each index is in range [1, Nb_Sub-Shapes_Of_Given_Type]
6257
6258             Parameters:
6259                 aShape Shape to get sub-shape of.
6260                 ListOfID List of sub-shapes indices.
6261                 aType Type of sub-shapes to be retrieved (see geompy.ShapeType)
6262                 theName Object name; when specified, this parameter is used
6263                         for result publication in the study. Otherwise, if automatic
6264                         publication is switched on, default value is used for result name.
6265
6266             Returns:
6267                 A compound of sub-shapes of aShape.
6268             """
6269             # Example: see GEOM_TestAll.py
6270             ListOfIDs = []
6271             AllShapeIDsList = self.SubShapeAllSortedCentresIDs(aShape, EnumToLong( aType ))
6272             for ind in ListOfInd:
6273                 ListOfIDs.append(AllShapeIDsList[ind - 1])
6274             # note: auto-publishing is done in self.GetSubShape()
6275             anObj = self.GetSubShape(aShape, ListOfIDs, theName)
6276             return anObj
6277
6278         ## Extract shapes (excluding the main shape) of given type.
6279         #  @param aShape The shape.
6280         #  @param aType  The shape type (see ShapeType())
6281         #  @param isSorted Boolean flag to switch sorting on/off.
6282         #  @param theName Object name; when specified, this parameter is used
6283         #         for result publication in the study. Otherwise, if automatic
6284         #         publication is switched on, default value is used for result name.
6285         #
6286         #  @return List of sub-shapes of type aType, contained in aShape.
6287         #
6288         #  @ref swig_FilletChamfer "Example"
6289         @ManageTransactions("ShapesOp")
6290         def ExtractShapes(self, aShape, aType, isSorted = False, theName=None):
6291             """
6292             Extract shapes (excluding the main shape) of given type.
6293
6294             Parameters:
6295                 aShape The shape.
6296                 aType  The shape type (see geompy.ShapeType)
6297                 isSorted Boolean flag to switch sorting on/off.
6298                 theName Object name; when specified, this parameter is used
6299                         for result publication in the study. Otherwise, if automatic
6300                         publication is switched on, default value is used for result name.
6301
6302             Returns:
6303                 List of sub-shapes of type aType, contained in aShape.
6304             """
6305             # Example: see GEOM_TestAll.py
6306             ListObj = self.ShapesOp.ExtractSubShapes(aShape, EnumToLong( aType ), isSorted)
6307             RaiseIfFailed("ExtractSubShapes", self.ShapesOp)
6308             self._autoPublish(ListObj, theName, "subshape")
6309             return ListObj
6310
6311         ## Get a set of sub-shapes defined by their unique IDs inside <VAR>aShape</VAR>
6312         #  @param aShape Main shape.
6313         #  @param anIDs List of unique IDs of sub-shapes inside <VAR>aShape</VAR>.
6314         #  @param theName Object name; when specified, this parameter is used
6315         #         for result publication in the study. Otherwise, if automatic
6316         #         publication is switched on, default value is used for result name.
6317         #  @return List of GEOM.GEOM_Object, corresponding to found sub-shapes.
6318         #
6319         #  @ref swig_all_decompose "Example"
6320         @ManageTransactions("ShapesOp")
6321         def SubShapes(self, aShape, anIDs, theName=None):
6322             """
6323             Get a set of sub-shapes defined by their unique IDs inside theMainShape
6324
6325             Parameters:
6326                 aShape Main shape.
6327                 anIDs List of unique IDs of sub-shapes inside theMainShape.
6328                 theName Object name; when specified, this parameter is used
6329                         for result publication in the study. Otherwise, if automatic
6330                         publication is switched on, default value is used for result name.
6331
6332             Returns:
6333                 List of GEOM.GEOM_Object, corresponding to found sub-shapes.
6334             """
6335             # Example: see GEOM_TestAll.py
6336             ListObj = self.ShapesOp.MakeSubShapes(aShape, anIDs)
6337             RaiseIfFailed("SubShapes", self.ShapesOp)
6338             self._autoPublish(ListObj, theName, "subshape")
6339             return ListObj
6340
6341         ## Explode a shape into edges sorted in a row from a starting point.
6342         #  @param theShape the shape to be exploded on edges.
6343         #  @param theStartPoint the starting point.
6344         #  @param theName Object name; when specified, this parameter is used
6345         #         for result publication in the study. Otherwise, if automatic
6346         #         publication is switched on, default value is used for result name.
6347         #  @return List of GEOM.GEOM_Object that is actually an ordered list
6348         #          of edges sorted in a row from a starting point.
6349         #
6350         #  @ref swig_GetSubShapeEdgeSorted "Example"
6351         @ManageTransactions("ShapesOp")
6352         def GetSubShapeEdgeSorted(self, theShape, theStartPoint, theName=None):
6353             """
6354             Explode a shape into edges sorted in a row from a starting point.
6355
6356             Parameters:
6357                 theShape the shape to be exploded on edges.
6358                 theStartPoint the starting point.
6359                 theName Object name; when specified, this parameter is used
6360                         for result publication in the study. Otherwise, if automatic
6361                         publication is switched on, default value is used for result name.
6362
6363             Returns:
6364                 List of GEOM.GEOM_Object that is actually an ordered list
6365                 of edges sorted in a row from a starting point.
6366             """
6367             # Example: see GEOM_TestAll.py
6368             ListObj = self.ShapesOp.GetSubShapeEdgeSorted(theShape, theStartPoint)
6369             RaiseIfFailed("GetSubShapeEdgeSorted", self.ShapesOp)
6370             self._autoPublish(ListObj, theName, "SortedEdges")
6371             return ListObj
6372
6373         ## Check if the object is a sub-object of another GEOM object.
6374         #  @param aSubObject Checked sub-object (or its parent object, in case if
6375         #         \a theSubObjectIndex is non-zero).
6376         #  @param anObject An object that is checked for ownership (or its parent object,
6377         #         in case if \a theObjectIndex is non-zero).
6378         #  @param aSubObjectIndex When non-zero, specifies a sub-shape index that
6379         #         identifies a sub-object within its parent specified via \a theSubObject.
6380         #  @param anObjectIndex When non-zero, specifies a sub-shape index that
6381         #         identifies an object within its parent specified via \a theObject.
6382         #  @return TRUE, if the given object contains sub-object.
6383         @ManageTransactions("ShapesOp")
6384         def IsSubShapeBelongsTo(self, aSubObject, anObject, aSubObjectIndex = 0, anObjectIndex = 0):
6385             """
6386             Check if the object is a sub-object of another GEOM object.
6387             
6388             Parameters:
6389                 aSubObject Checked sub-object (or its parent object, in case if
6390                     \a theSubObjectIndex is non-zero).
6391                 anObject An object that is checked for ownership (or its parent object,
6392                     in case if \a theObjectIndex is non-zero).
6393                 aSubObjectIndex When non-zero, specifies a sub-shape index that
6394                     identifies a sub-object within its parent specified via \a theSubObject.
6395                 anObjectIndex When non-zero, specifies a sub-shape index that
6396                     identifies an object within its parent specified via \a theObject.
6397
6398             Returns
6399                 TRUE, if the given object contains sub-object.
6400             """
6401             IsOk = self.ShapesOp.IsSubShapeBelongsTo(aSubObject, aSubObjectIndex, anObject, anObjectIndex)
6402             RaiseIfFailed("IsSubShapeBelongsTo", self.ShapesOp)
6403             return IsOk
6404
6405         # end of l4_decompose
6406         ## @}
6407
6408         ## @addtogroup l4_decompose_d
6409         ## @{
6410
6411         ## Deprecated method
6412         #  It works like SubShapeAllSortedCentres(), but wrongly
6413         #  defines centres of faces, shells and solids.
6414         @ManageTransactions("ShapesOp")
6415         def SubShapeAllSorted(self, aShape, aType, theName=None):
6416             """
6417             Deprecated method
6418             It works like geompy.SubShapeAllSortedCentres, but wrongly
6419             defines centres of faces, shells and solids.
6420             """
6421             ListObj = self.ShapesOp.MakeExplode(aShape, EnumToLong( aType ), True)
6422             RaiseIfFailed("MakeExplode", self.ShapesOp)
6423             self._autoPublish(ListObj, theName, "subshape")
6424             return ListObj
6425
6426         ## Deprecated method
6427         #  It works like SubShapeAllSortedCentresIDs(), but wrongly
6428         #  defines centres of faces, shells and solids.
6429         @ManageTransactions("ShapesOp")
6430         def SubShapeAllSortedIDs(self, aShape, aType):
6431             """
6432             Deprecated method
6433             It works like geompy.SubShapeAllSortedCentresIDs, but wrongly
6434             defines centres of faces, shells and solids.
6435             """
6436             ListIDs = self.ShapesOp.SubShapeAllIDs(aShape, EnumToLong( aType ), True)
6437             RaiseIfFailed("SubShapeAllIDs", self.ShapesOp)
6438             return ListIDs
6439
6440         ## Deprecated method
6441         #  It works like SubShapeSortedCentres(), but has a bug
6442         #  (wrongly defines centres of faces, shells and solids).
6443         def SubShapeSorted(self, aShape, aType, ListOfInd, theName=None):
6444             """
6445             Deprecated method
6446             It works like geompy.SubShapeSortedCentres, but has a bug
6447             (wrongly defines centres of faces, shells and solids).
6448             """
6449             ListOfIDs = []
6450             AllShapeIDsList = self.SubShapeAllSortedIDs(aShape, EnumToLong( aType ))
6451             for ind in ListOfInd:
6452                 ListOfIDs.append(AllShapeIDsList[ind - 1])
6453             # note: auto-publishing is done in self.GetSubShape()
6454             anObj = self.GetSubShape(aShape, ListOfIDs, theName)
6455             return anObj
6456
6457         # end of l4_decompose_d
6458         ## @}
6459
6460         ## @addtogroup l3_healing
6461         ## @{
6462
6463         ## Apply a sequence of Shape Healing operators to the given object.
6464         #  @param theShape Shape to be processed.
6465         #  @param theOperators List of names of operators ("FixShape", "SplitClosedFaces", etc.).
6466         #  @param theParameters List of names of parameters
6467         #                    ("FixShape.Tolerance3d", "SplitClosedFaces.NbSplitPoints", etc.).
6468         #  @param theValues List of values of parameters, in the same order
6469         #                    as parameters are listed in <VAR>theParameters</VAR> list.
6470         #  @param theName Object name; when specified, this parameter is used
6471         #         for result publication in the study. Otherwise, if automatic
6472         #         publication is switched on, default value is used for result name.
6473         #
6474         #  <b> Operators and Parameters: </b> \n
6475         #
6476         #  * \b FixShape - corrects invalid shapes. \n
6477         #  - \b FixShape.Tolerance3d - work tolerance for detection of the problems and correction of them. \n
6478         #  - \b FixShape.MaxTolerance3d - maximal possible tolerance of the shape after correction. \n
6479         #
6480         #  * \b FixFaceSize - removes small faces, such as spots and strips.\n
6481         #  - \b FixFaceSize.Tolerance - defines minimum possible face size. \n
6482         #  - \b DropSmallEdges - removes edges, which merge with neighbouring edges. \n
6483         #  - \b DropSmallEdges.Tolerance3d - defines minimum possible distance between two parallel edges.\n
6484         #  - \b DropSmallSolids - either removes small solids or merges them with neighboring ones. \n
6485         #  - \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
6486         #  - \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
6487         #  - \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
6488         #
6489         #  * \b SplitAngle - splits faces based on conical surfaces, surfaces of revolution and cylindrical
6490         #    surfaces in segments using a certain angle. \n
6491         #  - \b SplitAngle.Angle - the central angle of the resulting segments (i.e. we obtain two segments
6492         #    if Angle=180, four if Angle=90, etc). \n
6493         #  - \b SplitAngle.MaxTolerance - maximum possible tolerance among the resulting segments.\n
6494         #
6495         #  * \b SplitClosedFaces - splits closed faces in segments.
6496         #    The number of segments depends on the number of splitting points.\n
6497         #  - \b SplitClosedFaces.NbSplitPoints - the number of splitting points.\n
6498         #
6499         #  * \b SplitContinuity - splits shapes to reduce continuities of curves and surfaces.\n
6500         #  - \b SplitContinuity.Tolerance3d - 3D tolerance for correction of geometry.\n
6501         #  - \b SplitContinuity.SurfaceContinuity - required continuity for surfaces.\n
6502         #  - \b SplitContinuity.CurveContinuity - required continuity for curves.\n
6503         #   This and the previous parameters can take the following values:\n
6504         #   \b Parametric \b Continuity \n
6505         #   \b C0 (Positional Continuity): curves are joined (the end positions of curves or surfaces
6506         #   are coincidental. The curves or surfaces may still meet at an angle, giving rise to a sharp corner or edge).\n
6507         #   \b C1 (Tangential Continuity): first derivatives are equal (the end vectors of curves or surfaces are parallel,
6508         #    ruling out sharp edges).\n
6509         #   \b C2 (Curvature Continuity): first and second derivatives are equal (the end vectors of curves or surfaces
6510         #       are of the same magnitude).\n
6511         #   \b CN N-th derivatives are equal (both the direction and the magnitude of the Nth derivatives of curves
6512         #    or surfaces (d/du C(u)) are the same at junction. \n
6513         #   \b Geometric \b Continuity \n
6514         #   \b G1: first derivatives are proportional at junction.\n
6515         #   The curve tangents thus have the same direction, but not necessarily the same magnitude.
6516         #      i.e., C1'(1) = (a,b,c) and C2'(0) = (k*a, k*b, k*c).\n
6517         #   \b G2: first and second derivatives are proportional at junction.
6518         #   As the names imply, geometric continuity requires the geometry to be continuous, while parametric
6519         #    continuity requires that the underlying parameterization was continuous as well.
6520         #   Parametric continuity of order n implies geometric continuity of order n, but not vice-versa.\n
6521         #
6522         #  * \b BsplineRestriction - converts curves and surfaces to Bsplines and processes them with the following parameters:\n
6523         #  - \b BSplineRestriction.SurfaceMode - approximation of surfaces if restriction is necessary.\n
6524         #  - \b BSplineRestriction.Curve3dMode - conversion of any 3D curve to BSpline and approximation.\n
6525         #  - \b BSplineRestriction.Curve2dMode - conversion of any 2D curve to BSpline and approximation.\n
6526         #  - \b BSplineRestriction.Tolerance3d - defines the possibility of surfaces and 3D curves approximation
6527         #       with the specified parameters.\n
6528         #  - \b BSplineRestriction.Tolerance2d - defines the possibility of surfaces and 2D curves approximation
6529         #       with the specified parameters.\n
6530         #  - \b BSplineRestriction.RequiredDegree - required degree of the resulting BSplines.\n
6531         #  - \b BSplineRestriction.RequiredNbSegments - required maximum number of segments of resultant BSplines.\n
6532         #  - \b BSplineRestriction.Continuity3d - continuity of the resulting surfaces and 3D curves.\n
6533         #  - \b BSplineRestriction.Continuity2d - continuity of the resulting 2D curves.\n
6534         #
6535         #  * \b ToBezier - converts curves and surfaces of any type to Bezier curves and surfaces.\n
6536         #  - \b ToBezier.SurfaceMode - if checked in, allows conversion of surfaces.\n
6537         #  - \b ToBezier.Curve3dMode - if checked in, allows conversion of 3D curves.\n
6538         #  - \b ToBezier.Curve2dMode - if checked in, allows conversion of 2D curves.\n
6539         #  - \b ToBezier.MaxTolerance - defines tolerance for detection and correction of problems.\n
6540         #
6541         #  * \b SameParameter - fixes edges of 2D and 3D curves not having the same parameter.\n
6542         #  - \b SameParameter.Tolerance3d - defines tolerance for fixing of edges.\n
6543         #
6544         #
6545         #  @return New GEOM.GEOM_Object, containing processed shape.
6546         #
6547         #  \n @ref tui_shape_processing "Example"
6548         @ManageTransactions("HealOp")
6549         def ProcessShape(self, theShape, theOperators, theParameters, theValues, theName=None):
6550             """
6551             Apply a sequence of Shape Healing operators to the given object.
6552
6553             Parameters:
6554                 theShape Shape to be processed.
6555                 theValues List of values of parameters, in the same order
6556                           as parameters are listed in theParameters list.
6557                 theOperators List of names of operators ('FixShape', 'SplitClosedFaces', etc.).
6558                 theParameters List of names of parameters
6559                               ('FixShape.Tolerance3d', 'SplitClosedFaces.NbSplitPoints', etc.).
6560                 theName Object name; when specified, this parameter is used
6561                         for result publication in the study. Otherwise, if automatic
6562                         publication is switched on, default value is used for result name.
6563
6564                 Operators and Parameters:
6565
6566                  * FixShape - corrects invalid shapes.
6567                      * FixShape.Tolerance3d - work tolerance for detection of the problems and correction of them.
6568                      * FixShape.MaxTolerance3d - maximal possible tolerance of the shape after correction.
6569                  * FixFaceSize - removes small faces, such as spots and strips.
6570                      * FixFaceSize.Tolerance - defines minimum possible face size.
6571                  * DropSmallEdges - removes edges, which merge with neighbouring edges.
6572                      * DropSmallEdges.Tolerance3d - defines minimum possible distance between two parallel edges.
6573                  * DropSmallSolids - either removes small solids or merges them with neighboring ones.
6574                      * 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.
6575                      * 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.
6576                      * 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.
6577
6578                  * SplitAngle - splits faces based on conical surfaces, surfaces of revolution and cylindrical surfaces
6579                                 in segments using a certain angle.
6580                      * SplitAngle.Angle - the central angle of the resulting segments (i.e. we obtain two segments
6581                                           if Angle=180, four if Angle=90, etc).
6582                      * SplitAngle.MaxTolerance - maximum possible tolerance among the resulting segments.
6583                  * SplitClosedFaces - splits closed faces in segments. The number of segments depends on the number of
6584                                       splitting points.
6585                      * SplitClosedFaces.NbSplitPoints - the number of splitting points.
6586                  * SplitContinuity - splits shapes to reduce continuities of curves and surfaces.
6587                      * SplitContinuity.Tolerance3d - 3D tolerance for correction of geometry.
6588                      * SplitContinuity.SurfaceContinuity - required continuity for surfaces.
6589                      * SplitContinuity.CurveContinuity - required continuity for curves.
6590                        This and the previous parameters can take the following values:
6591
6592                        Parametric Continuity:
6593                        C0 (Positional Continuity): curves are joined (the end positions of curves or surfaces are
6594                                                    coincidental. The curves or surfaces may still meet at an angle,
6595                                                    giving rise to a sharp corner or edge).
6596                        C1 (Tangential Continuity): first derivatives are equal (the end vectors of curves or surfaces
6597                                                    are parallel, ruling out sharp edges).
6598                        C2 (Curvature Continuity): first and second derivatives are equal (the end vectors of curves
6599                                                   or surfaces are of the same magnitude).
6600                        CN N-th derivatives are equal (both the direction and the magnitude of the Nth derivatives of
6601                           curves or surfaces (d/du C(u)) are the same at junction.
6602
6603                        Geometric Continuity:
6604                        G1: first derivatives are proportional at junction.
6605                            The curve tangents thus have the same direction, but not necessarily the same magnitude.
6606                            i.e., C1'(1) = (a,b,c) and C2'(0) = (k*a, k*b, k*c).
6607                        G2: first and second derivatives are proportional at junction. As the names imply,
6608                            geometric continuity requires the geometry to be continuous, while parametric continuity requires
6609                            that the underlying parameterization was continuous as well. Parametric continuity of order n implies
6610                            geometric continuity of order n, but not vice-versa.
6611                  * BsplineRestriction - converts curves and surfaces to Bsplines and processes them with the following parameters:
6612                      * BSplineRestriction.SurfaceMode - approximation of surfaces if restriction is necessary.
6613                      * BSplineRestriction.Curve3dMode - conversion of any 3D curve to BSpline and approximation.
6614                      * BSplineRestriction.Curve2dMode - conversion of any 2D curve to BSpline and approximation.
6615                      * BSplineRestriction.Tolerance3d - defines the possibility of surfaces and 3D curves approximation with
6616                                                         the specified parameters.
6617                      * BSplineRestriction.Tolerance2d - defines the possibility of surfaces and 2D curves approximation with
6618                                                         the specified parameters.
6619                      * BSplineRestriction.RequiredDegree - required degree of the resulting BSplines.
6620                      * BSplineRestriction.RequiredNbSegments - required maximum number of segments of resultant BSplines.
6621                      * BSplineRestriction.Continuity3d - continuity of the resulting surfaces and 3D curves.
6622                      * BSplineRestriction.Continuity2d - continuity of the resulting 2D curves.
6623                  * ToBezier - converts curves and surfaces of any type to Bezier curves and surfaces.
6624                      * ToBezier.SurfaceMode - if checked in, allows conversion of surfaces.
6625                      * ToBezier.Curve3dMode - if checked in, allows conversion of 3D curves.
6626                      * ToBezier.Curve2dMode - if checked in, allows conversion of 2D curves.
6627                      * ToBezier.MaxTolerance - defines tolerance for detection and correction of problems.
6628                  * SameParameter - fixes edges of 2D and 3D curves not having the same parameter.
6629                      * SameParameter.Tolerance3d - defines tolerance for fixing of edges.
6630
6631             Returns:
6632                 New GEOM.GEOM_Object, containing processed shape.
6633
6634             Note: For more information look through SALOME Geometry User's Guide->
6635                   -> Introduction to Geometry-> Repairing Operations-> Shape Processing
6636             """
6637             # Example: see GEOM_TestHealing.py
6638             theValues,Parameters = ParseList(theValues)
6639             anObj = self.HealOp.ProcessShape(theShape, theOperators, theParameters, theValues)
6640             # To avoid script failure in case of good argument shape
6641             if self.HealOp.GetErrorCode() == "ShHealOper_NotError_msg":
6642                 return theShape
6643             RaiseIfFailed("ProcessShape", self.HealOp)
6644             for string in (theOperators + theParameters):
6645                 Parameters = ":" + Parameters
6646                 pass
6647             anObj.SetParameters(Parameters)
6648             self._autoPublish(anObj, theName, "healed")
6649             return anObj
6650
6651         ## Remove faces from the given object (shape).
6652         #  @param theObject Shape to be processed.
6653         #  @param theFaces Indices of faces to be removed, if EMPTY then the method
6654         #                  removes ALL faces of the given object.
6655         #  @param theName Object name; when specified, this parameter is used
6656         #         for result publication in the study. Otherwise, if automatic
6657         #         publication is switched on, default value is used for result name.
6658         #
6659         #  @return New GEOM.GEOM_Object, containing processed shape.
6660         #
6661         #  @ref tui_suppress_faces "Example"
6662         @ManageTransactions("HealOp")
6663         def SuppressFaces(self, theObject, theFaces, theName=None):
6664             """
6665             Remove faces from the given object (shape).
6666
6667             Parameters:
6668                 theObject Shape to be processed.
6669                 theFaces Indices of faces to be removed, if EMPTY then the method
6670                          removes ALL faces of the given object.
6671                 theName Object name; when specified, this parameter is used
6672                         for result publication in the study. Otherwise, if automatic
6673                         publication is switched on, default value is used for result name.
6674
6675             Returns:
6676                 New GEOM.GEOM_Object, containing processed shape.
6677             """
6678             # Example: see GEOM_TestHealing.py
6679             anObj = self.HealOp.SuppressFaces(theObject, theFaces)
6680             RaiseIfFailed("SuppressFaces", self.HealOp)
6681             self._autoPublish(anObj, theName, "suppressFaces")
6682             return anObj
6683
6684         ## Sewing of faces into a single shell.
6685         #  @param ListShape Shapes to be processed.
6686         #  @param theTolerance Required tolerance value.
6687         #  @param AllowNonManifold Flag that allows non-manifold sewing.
6688         #  @param theName Object name; when specified, this parameter is used
6689         #         for result publication in the study. Otherwise, if automatic
6690         #         publication is switched on, default value is used for result name.
6691         #
6692         #  @return New GEOM.GEOM_Object, containing a result shell.
6693         #
6694         #  @ref tui_sewing "Example"
6695         def MakeSewing(self, ListShape, theTolerance, AllowNonManifold=False, theName=None):
6696             """
6697             Sewing of faces into a single shell.
6698
6699             Parameters:
6700                 ListShape Shapes to be processed.
6701                 theTolerance Required tolerance value.
6702                 AllowNonManifold Flag that allows non-manifold sewing.
6703                 theName Object name; when specified, this parameter is used
6704                         for result publication in the study. Otherwise, if automatic
6705                         publication is switched on, default value is used for result name.
6706
6707             Returns:
6708                 New GEOM.GEOM_Object, containing containing a result shell.
6709             """
6710             # Example: see GEOM_TestHealing.py
6711             # note: auto-publishing is done in self.Sew()
6712             anObj = self.Sew(ListShape, theTolerance, AllowNonManifold, theName)
6713             return anObj
6714
6715         ## Sewing of faces into a single shell.
6716         #  @param ListShape Shapes to be processed.
6717         #  @param theTolerance Required tolerance value.
6718         #  @param AllowNonManifold Flag that allows non-manifold sewing.
6719         #  @param theName Object name; when specified, this parameter is used
6720         #         for result publication in the study. Otherwise, if automatic
6721         #         publication is switched on, default value is used for result name.
6722         #
6723         #  @return New GEOM.GEOM_Object, containing a result shell.
6724         @ManageTransactions("HealOp")
6725         def Sew(self, ListShape, theTolerance, AllowNonManifold=False, theName=None):
6726             """
6727             Sewing of faces into a single shell.
6728
6729             Parameters:
6730                 ListShape Shapes to be processed.
6731                 theTolerance Required tolerance value.
6732                 AllowNonManifold Flag that allows non-manifold sewing.
6733                 theName Object name; when specified, this parameter is used
6734                         for result publication in the study. Otherwise, if automatic
6735                         publication is switched on, default value is used for result name.
6736
6737             Returns:
6738                 New GEOM.GEOM_Object, containing a result shell.
6739             """
6740             # Example: see MakeSewing() above
6741             theTolerance,Parameters = ParseParameters(theTolerance)
6742             if AllowNonManifold:
6743                 anObj = self.HealOp.SewAllowNonManifold( ToList( ListShape ), theTolerance)
6744             else:
6745                 anObj = self.HealOp.Sew( ToList( ListShape ), theTolerance)
6746             # To avoid script failure in case of good argument shape
6747             # (Fix of test cases geom/bugs11/L7,L8)
6748             if self.HealOp.GetErrorCode() == "ShHealOper_NotError_msg":
6749                 return anObj
6750             RaiseIfFailed("Sew", self.HealOp)
6751             anObj.SetParameters(Parameters)
6752             self._autoPublish(anObj, theName, "sewed")
6753             return anObj
6754
6755         ## Rebuild the topology of theSolids by removing
6756         #  the faces that are shared by several solids.
6757         #  @param theSolids A compound or a list of solids to be processed.
6758         #  @param theName Object name; when specified, this parameter is used
6759         #         for result publication in the study. Otherwise, if automatic
6760         #         publication is switched on, default value is used for result name.
6761         #
6762         #  @return New GEOM.GEOM_Object, containing processed shape.
6763         #
6764         #  @ref tui_remove_webs "Example"
6765         @ManageTransactions("HealOp")
6766         def RemoveInternalFaces (self, theSolids, theName=None):
6767             """
6768             Rebuild the topology of theSolids by removing
6769             the faces that are shared by several solids.
6770
6771             Parameters:
6772                 theSolids A compound or a list of solids to be processed.
6773                 theName Object name; when specified, this parameter is used
6774                         for result publication in the study. Otherwise, if automatic
6775                         publication is switched on, default value is used for result name.
6776
6777             Returns:
6778                 New GEOM.GEOM_Object, containing processed shape.
6779             """
6780             # Example: see GEOM_TestHealing.py
6781             anObj = self.HealOp.RemoveInternalFaces(ToList(theSolids))
6782             RaiseIfFailed("RemoveInternalFaces", self.HealOp)
6783             self._autoPublish(anObj, theName, "removeWebs")
6784             return anObj
6785
6786         ## Remove internal wires and edges from the given object (face).
6787         #  @param theObject Shape to be processed.
6788         #  @param theWires Indices of wires to be removed, if EMPTY then the method
6789         #                  removes ALL internal wires of the given object.
6790         #  @param theName Object name; when specified, this parameter is used
6791         #         for result publication in the study. Otherwise, if automatic
6792         #         publication is switched on, default value is used for result name.
6793         #
6794         #  @return New GEOM.GEOM_Object, containing processed shape.
6795         #
6796         #  @ref tui_suppress_internal_wires "Example"
6797         @ManageTransactions("HealOp")
6798         def SuppressInternalWires(self, theObject, theWires, theName=None):
6799             """
6800             Remove internal wires and edges from the given object (face).
6801
6802             Parameters:
6803                 theObject Shape to be processed.
6804                 theWires Indices of wires to be removed, if EMPTY then the method
6805                          removes ALL internal wires of the given object.
6806                 theName Object name; when specified, this parameter is used
6807                         for result publication in the study. Otherwise, if automatic
6808                         publication is switched on, default value is used for result name.
6809
6810             Returns:
6811                 New GEOM.GEOM_Object, containing processed shape.
6812             """
6813             # Example: see GEOM_TestHealing.py
6814             anObj = self.HealOp.RemoveIntWires(theObject, theWires)
6815             RaiseIfFailed("RemoveIntWires", self.HealOp)
6816             self._autoPublish(anObj, theName, "suppressWires")
6817             return anObj
6818
6819         ## Remove internal closed contours (holes) from the given object.
6820         #  @param theObject Shape to be processed.
6821         #  @param theWires Indices of wires to be removed, if EMPTY then the method
6822         #                  removes ALL internal holes of the given object
6823         #  @param theName Object name; when specified, this parameter is used
6824         #         for result publication in the study. Otherwise, if automatic
6825         #         publication is switched on, default value is used for result name.
6826         #
6827         #  @return New GEOM.GEOM_Object, containing processed shape.
6828         #
6829         #  @ref tui_suppress_holes "Example"
6830         @ManageTransactions("HealOp")
6831         def SuppressHoles(self, theObject, theWires, theName=None):
6832             """
6833             Remove internal closed contours (holes) from the given object.
6834
6835             Parameters:
6836                 theObject Shape to be processed.
6837                 theWires Indices of wires to be removed, if EMPTY then the method
6838                          removes ALL internal holes of the given object
6839                 theName Object name; when specified, this parameter is used
6840                         for result publication in the study. Otherwise, if automatic
6841                         publication is switched on, default value is used for result name.
6842
6843             Returns:
6844                 New GEOM.GEOM_Object, containing processed shape.
6845             """
6846             # Example: see GEOM_TestHealing.py
6847             anObj = self.HealOp.FillHoles(theObject, theWires)
6848             RaiseIfFailed("FillHoles", self.HealOp)
6849             self._autoPublish(anObj, theName, "suppressHoles")
6850             return anObj
6851
6852         ## Close an open wire.
6853         #  @param theObject Shape to be processed.
6854         #  @param theWires Indexes of edge(s) and wire(s) to be closed within <VAR>theObject</VAR>'s shape,
6855         #                  if [ ], then <VAR>theObject</VAR> itself is a wire.
6856         #  @param isCommonVertex If True  : closure by creation of a common vertex,
6857         #                        If False : closure by creation of an edge between ends.
6858         #  @param theName Object name; when specified, this parameter is used
6859         #         for result publication in the study. Otherwise, if automatic
6860         #         publication is switched on, default value is used for result name.
6861         #
6862         #  @return New GEOM.GEOM_Object, containing processed shape.
6863         #
6864         #  @ref tui_close_contour "Example"
6865         @ManageTransactions("HealOp")
6866         def CloseContour(self,theObject, theWires, isCommonVertex, theName=None):
6867             """
6868             Close an open wire.
6869
6870             Parameters:
6871                 theObject Shape to be processed.
6872                 theWires Indexes of edge(s) and wire(s) to be closed within theObject's shape,
6873                          if [ ], then theObject itself is a wire.
6874                 isCommonVertex If True  : closure by creation of a common vertex,
6875                                If False : closure by creation of an edge between ends.
6876                 theName Object name; when specified, this parameter is used
6877                         for result publication in the study. Otherwise, if automatic
6878                         publication is switched on, default value is used for result name.
6879
6880             Returns:
6881                 New GEOM.GEOM_Object, containing processed shape.
6882             """
6883             # Example: see GEOM_TestHealing.py
6884             anObj = self.HealOp.CloseContour(theObject, theWires, isCommonVertex)
6885             RaiseIfFailed("CloseContour", self.HealOp)
6886             self._autoPublish(anObj, theName, "closeContour")
6887             return anObj
6888
6889         ## Addition of a point to a given edge object.
6890         #  @param theObject Shape to be processed.
6891         #  @param theEdgeIndex Index of edge to be divided within theObject's shape,
6892         #                      if -1, then theObject itself is the edge.
6893         #  @param theValue Value of parameter on edge or length parameter,
6894         #                  depending on \a isByParameter.
6895         #  @param isByParameter If TRUE : \a theValue is treated as a curve parameter [0..1], \n
6896         #                       if FALSE : \a theValue is treated as a length parameter [0..1]
6897         #  @param theName Object name; when specified, this parameter is used
6898         #         for result publication in the study. Otherwise, if automatic
6899         #         publication is switched on, default value is used for result name.
6900         #
6901         #  @return New GEOM.GEOM_Object, containing processed shape.
6902         #
6903         #  @ref tui_add_point_on_edge "Example"
6904         @ManageTransactions("HealOp")
6905         def DivideEdge(self, theObject, theEdgeIndex, theValue, isByParameter, theName=None):
6906             """
6907             Addition of a point to a given edge object.
6908
6909             Parameters:
6910                 theObject Shape to be processed.
6911                 theEdgeIndex Index of edge to be divided within theObject's shape,
6912                              if -1, then theObject itself is the edge.
6913                 theValue Value of parameter on edge or length parameter,
6914                          depending on isByParameter.
6915                 isByParameter If TRUE :  theValue is treated as a curve parameter [0..1],
6916                               if FALSE : theValue is treated as a length parameter [0..1]
6917                 theName Object name; when specified, this parameter is used
6918                         for result publication in the study. Otherwise, if automatic
6919                         publication is switched on, default value is used for result name.
6920
6921             Returns:
6922                 New GEOM.GEOM_Object, containing processed shape.
6923             """
6924             # Example: see GEOM_TestHealing.py
6925             theEdgeIndex,theValue,isByParameter,Parameters = ParseParameters(theEdgeIndex,theValue,isByParameter)
6926             anObj = self.HealOp.DivideEdge(theObject, theEdgeIndex, theValue, isByParameter)
6927             RaiseIfFailed("DivideEdge", self.HealOp)
6928             anObj.SetParameters(Parameters)
6929             self._autoPublish(anObj, theName, "divideEdge")
6930             return anObj
6931
6932         ## Addition of points to a given edge of \a theObject by projecting
6933         #  other points to the given edge.
6934         #  @param theObject Shape to be processed.
6935         #  @param theEdgeIndex Index of edge to be divided within theObject's shape,
6936         #                      if -1, then theObject itself is the edge.
6937         #  @param thePoints List of points to project to theEdgeIndex-th edge.
6938         #  @param theName Object name; when specified, this parameter is used
6939         #         for result publication in the study. Otherwise, if automatic
6940         #         publication is switched on, default value is used for result name.
6941         #
6942         #  @return New GEOM.GEOM_Object, containing processed shape.
6943         #
6944         #  @ref tui_add_point_on_edge "Example"
6945         @ManageTransactions("HealOp")
6946         def DivideEdgeByPoint(self, theObject, theEdgeIndex, thePoints, theName=None):
6947             """
6948             Addition of points to a given edge of \a theObject by projecting
6949             other points to the given edge.
6950
6951             Parameters:
6952                 theObject Shape to be processed.
6953                 theEdgeIndex The edge or its index to be divided within theObject's shape,
6954                              if -1, then theObject itself is the edge.
6955                 thePoints List of points to project to theEdgeIndex-th edge.
6956                 theName Object name; when specified, this parameter is used
6957                         for result publication in the study. Otherwise, if automatic
6958                         publication is switched on, default value is used for result name.
6959
6960             Returns:
6961                 New GEOM.GEOM_Object, containing processed shape.
6962             """
6963             # Example: see GEOM_TestHealing.py
6964             if isinstance( theEdgeIndex, GEOM._objref_GEOM_Object ):
6965                 theEdgeIndex = self.GetSubShapeID( theObject, theEdgeIndex )
6966             anObj = self.HealOp.DivideEdgeByPoint(theObject, theEdgeIndex, ToList( thePoints ))
6967             RaiseIfFailed("DivideEdgeByPoint", self.HealOp)
6968             self._autoPublish(anObj, theName, "divideEdge")
6969             return anObj
6970
6971         ## Suppress the vertices in the wire in case if adjacent edges are C1 continuous.
6972         #  @param theWire Wire to minimize the number of C1 continuous edges in.
6973         #  @param theVertices A list of vertices to suppress. If the list
6974         #                     is empty, all vertices in a wire will be assumed.
6975         #  @param theName Object name; when specified, this parameter is used
6976         #         for result publication in the study. Otherwise, if automatic
6977         #         publication is switched on, default value is used for result name.
6978         #
6979         #  @return New GEOM.GEOM_Object with modified wire.
6980         #
6981         #  @ref tui_fuse_collinear_edges "Example"
6982         @ManageTransactions("HealOp")
6983         def FuseCollinearEdgesWithinWire(self, theWire, theVertices = [], theName=None):
6984             """
6985             Suppress the vertices in the wire in case if adjacent edges are C1 continuous.
6986
6987             Parameters:
6988                 theWire Wire to minimize the number of C1 continuous edges in.
6989                 theVertices A list of vertices to suppress. If the list
6990                             is empty, all vertices in a wire will be assumed.
6991                 theName Object name; when specified, this parameter is used
6992                         for result publication in the study. Otherwise, if automatic
6993                         publication is switched on, default value is used for result name.
6994
6995             Returns:
6996                 New GEOM.GEOM_Object with modified wire.
6997             """
6998             anObj = self.HealOp.FuseCollinearEdgesWithinWire(theWire, theVertices)
6999             RaiseIfFailed("FuseCollinearEdgesWithinWire", self.HealOp)
7000             self._autoPublish(anObj, theName, "fuseEdges")
7001             return anObj
7002
7003         ## Change orientation of the given object. Updates given shape.
7004         #  @param theObject Shape to be processed.
7005         #  @return Updated <var>theObject</var>
7006         #
7007         #  @ref swig_todo "Example"
7008         @ManageTransactions("HealOp")
7009         def ChangeOrientationShell(self,theObject):
7010             """
7011             Change orientation of the given object. Updates given shape.
7012
7013             Parameters:
7014                 theObject Shape to be processed.
7015
7016             Returns:
7017                 Updated theObject
7018             """
7019             theObject = self.HealOp.ChangeOrientation(theObject)
7020             RaiseIfFailed("ChangeOrientation", self.HealOp)
7021             pass
7022
7023         ## Change orientation of the given object.
7024         #  @param theObject Shape to be processed.
7025         #  @param theName Object name; when specified, this parameter is used
7026         #         for result publication in the study. Otherwise, if automatic
7027         #         publication is switched on, default value is used for result name.
7028         #
7029         #  @return New GEOM.GEOM_Object, containing processed shape.
7030         #
7031         #  @ref swig_todo "Example"
7032         @ManageTransactions("HealOp")
7033         def ChangeOrientationShellCopy(self, theObject, theName=None):
7034             """
7035             Change orientation of the given object.
7036
7037             Parameters:
7038                 theObject Shape to be processed.
7039                 theName Object name; when specified, this parameter is used
7040                         for result publication in the study. Otherwise, if automatic
7041                         publication is switched on, default value is used for result name.
7042
7043             Returns:
7044                 New GEOM.GEOM_Object, containing processed shape.
7045             """
7046             anObj = self.HealOp.ChangeOrientationCopy(theObject)
7047             RaiseIfFailed("ChangeOrientationCopy", self.HealOp)
7048             self._autoPublish(anObj, theName, "reversed")
7049             return anObj
7050
7051         ## Try to limit tolerance of the given object by value \a theTolerance.
7052         #  @param theObject Shape to be processed.
7053         #  @param theTolerance Required tolerance value.
7054         #  @param theName Object name; when specified, this parameter is used
7055         #         for result publication in the study. Otherwise, if automatic
7056         #         publication is switched on, default value is used for result name.
7057         #
7058         #  @return New GEOM.GEOM_Object, containing processed shape.
7059         #
7060         #  @ref tui_limit_tolerance "Example"
7061         @ManageTransactions("HealOp")
7062         def LimitTolerance(self, theObject, theTolerance = 1e-07, theName=None):
7063             """
7064             Try to limit tolerance of the given object by value theTolerance.
7065
7066             Parameters:
7067                 theObject Shape to be processed.
7068                 theTolerance Required tolerance value.
7069                 theName Object name; when specified, this parameter is used
7070                         for result publication in the study. Otherwise, if automatic
7071                         publication is switched on, default value is used for result name.
7072
7073             Returns:
7074                 New GEOM.GEOM_Object, containing processed shape.
7075             """
7076             anObj = self.HealOp.LimitTolerance(theObject, theTolerance)
7077             RaiseIfFailed("LimitTolerance", self.HealOp)
7078             self._autoPublish(anObj, theName, "limitTolerance")
7079             return anObj
7080
7081         ## Get a list of wires (wrapped in GEOM.GEOM_Object-s),
7082         #  that constitute a free boundary of the given shape.
7083         #  @param theObject Shape to get free boundary of.
7084         #  @param theName Object name; when specified, this parameter is used
7085         #         for result publication in the study. Otherwise, if automatic
7086         #         publication is switched on, default value is used for result name.
7087         #
7088         #  @return [\a status, \a theClosedWires, \a theOpenWires]
7089         #  \n \a status: FALSE, if an error(s) occured during the method execution.
7090         #  \n \a theClosedWires: Closed wires on the free boundary of the given shape.
7091         #  \n \a theOpenWires: Open wires on the free boundary of the given shape.
7092         #
7093         #  @ref tui_free_boundaries_page "Example"
7094         @ManageTransactions("HealOp")
7095         def GetFreeBoundary(self, theObject, theName=None):
7096             """
7097             Get a list of wires (wrapped in GEOM.GEOM_Object-s),
7098             that constitute a free boundary of the given shape.
7099
7100             Parameters:
7101                 theObject Shape to get free boundary of.
7102                 theName Object name; when specified, this parameter is used
7103                         for result publication in the study. Otherwise, if automatic
7104                         publication is switched on, default value is used for result name.
7105
7106             Returns:
7107                 [status, theClosedWires, theOpenWires]
7108                  status: FALSE, if an error(s) occured during the method execution.
7109                  theClosedWires: Closed wires on the free boundary of the given shape.
7110                  theOpenWires: Open wires on the free boundary of the given shape.
7111             """
7112             # Example: see GEOM_TestHealing.py
7113             anObj = self.HealOp.GetFreeBoundary( ToList( theObject ))
7114             RaiseIfFailed("GetFreeBoundary", self.HealOp)
7115             self._autoPublish(anObj[1], theName, "closedWire")
7116             self._autoPublish(anObj[2], theName, "openWire")
7117             return anObj
7118
7119         ## Replace coincident faces in \a theShapes by one face.
7120         #  @param theShapes Initial shapes, either a list or compound of shapes.
7121         #  @param theTolerance Maximum distance between faces, which can be considered as coincident.
7122         #  @param doKeepNonSolids If FALSE, only solids will present in the result,
7123         #                         otherwise all initial shapes.
7124         #  @param theName Object name; when specified, this parameter is used
7125         #         for result publication in the study. Otherwise, if automatic
7126         #         publication is switched on, default value is used for result name.
7127         #
7128         #  @return New GEOM.GEOM_Object, containing copies of theShapes without coincident faces.
7129         #
7130         #  @ref tui_glue_faces "Example"
7131         @ManageTransactions("ShapesOp")
7132         def MakeGlueFaces(self, theShapes, theTolerance, doKeepNonSolids=True, theName=None):
7133             """
7134             Replace coincident faces in theShapes by one face.
7135
7136             Parameters:
7137                 theShapes Initial shapes, either a list or compound of shapes.
7138                 theTolerance Maximum distance between faces, which can be considered as coincident.
7139                 doKeepNonSolids If FALSE, only solids will present in the result,
7140                                 otherwise all initial shapes.
7141                 theName Object name; when specified, this parameter is used
7142                         for result publication in the study. Otherwise, if automatic
7143                         publication is switched on, default value is used for result name.
7144
7145             Returns:
7146                 New GEOM.GEOM_Object, containing copies of theShapes without coincident faces.
7147             """
7148             # Example: see GEOM_Spanner.py
7149             theTolerance,Parameters = ParseParameters(theTolerance)
7150             anObj = self.ShapesOp.MakeGlueFaces(ToList(theShapes), theTolerance, doKeepNonSolids)
7151             if anObj is None:
7152                 raise RuntimeError, "MakeGlueFaces : " + self.ShapesOp.GetErrorCode()
7153             anObj.SetParameters(Parameters)
7154             self._autoPublish(anObj, theName, "glueFaces")
7155             return anObj
7156
7157         ## Find coincident faces in \a theShapes for possible gluing.
7158         #  @param theShapes Initial shapes, either a list or compound of shapes.
7159         #  @param theTolerance Maximum distance between faces,
7160         #                      which can be considered as coincident.
7161         #  @param theName Object name; when specified, this parameter is used
7162         #         for result publication in the study. Otherwise, if automatic
7163         #         publication is switched on, default value is used for result name.
7164         #
7165         #  @return GEOM.ListOfGO
7166         #
7167         #  @ref tui_glue_faces "Example"
7168         @ManageTransactions("ShapesOp")
7169         def GetGlueFaces(self, theShapes, theTolerance, theName=None):
7170             """
7171             Find coincident faces in theShapes for possible gluing.
7172
7173             Parameters:
7174                 theShapes Initial shapes, either a list or compound of shapes.
7175                 theTolerance Maximum distance between faces,
7176                              which can be considered as coincident.
7177                 theName Object name; when specified, this parameter is used
7178                         for result publication in the study. Otherwise, if automatic
7179                         publication is switched on, default value is used for result name.
7180
7181             Returns:
7182                 GEOM.ListOfGO
7183             """
7184             anObj = self.ShapesOp.GetGlueFaces(ToList(theShapes), theTolerance)
7185             RaiseIfFailed("GetGlueFaces", self.ShapesOp)
7186             self._autoPublish(anObj, theName, "facesToGlue")
7187             return anObj
7188
7189         ## Replace coincident faces in \a theShapes by one face
7190         #  in compliance with given list of faces
7191         #  @param theShapes Initial shapes, either a list or compound of shapes.
7192         #  @param theTolerance Maximum distance between faces,
7193         #                      which can be considered as coincident.
7194         #  @param theFaces List of faces for gluing.
7195         #  @param doKeepNonSolids If FALSE, only solids will present in the result,
7196         #                         otherwise all initial shapes.
7197         #  @param doGlueAllEdges If TRUE, all coincident edges of <VAR>theShape</VAR>
7198         #                        will be glued, otherwise only the edges,
7199         #                        belonging to <VAR>theFaces</VAR>.
7200         #  @param theName Object name; when specified, this parameter is used
7201         #         for result publication in the study. Otherwise, if automatic
7202         #         publication is switched on, default value is used for result name.
7203         #
7204         #  @return New GEOM.GEOM_Object, containing copies of theShapes without coincident faces.
7205         #
7206         #  @ref tui_glue_faces "Example"
7207         @ManageTransactions("ShapesOp")
7208         def MakeGlueFacesByList(self, theShapes, theTolerance, theFaces,
7209                                 doKeepNonSolids=True, doGlueAllEdges=True, theName=None):
7210             """
7211             Replace coincident faces in theShapes by one face
7212             in compliance with given list of faces
7213
7214             Parameters:
7215                 theShapes theShapes Initial shapes, either a list or compound of shapes.
7216                 theTolerance Maximum distance between faces,
7217                              which can be considered as coincident.
7218                 theFaces List of faces for gluing.
7219                 doKeepNonSolids If FALSE, only solids will present in the result,
7220                                 otherwise all initial shapes.
7221                 doGlueAllEdges If TRUE, all coincident edges of theShape
7222                                will be glued, otherwise only the edges,
7223                                belonging to theFaces.
7224                 theName Object name; when specified, this parameter is used
7225                         for result publication in the study. Otherwise, if automatic
7226                         publication is switched on, default value is used for result name.
7227
7228             Returns:
7229                 New GEOM.GEOM_Object, containing copies of theShapes without coincident faces.
7230             """
7231             anObj = self.ShapesOp.MakeGlueFacesByList(ToList(theShapes), theTolerance, theFaces,
7232                                                       doKeepNonSolids, doGlueAllEdges)
7233             if anObj is None:
7234                 raise RuntimeError, "MakeGlueFacesByList : " + self.ShapesOp.GetErrorCode()
7235             self._autoPublish(anObj, theName, "glueFaces")
7236             return anObj
7237
7238         ## Replace coincident edges in \a theShapes by one edge.
7239         #  @param theShapes Initial shapes, either a list or compound of shapes.
7240         #  @param theTolerance Maximum distance between edges, which can be considered as coincident.
7241         #  @param theName Object name; when specified, this parameter is used
7242         #         for result publication in the study. Otherwise, if automatic
7243         #         publication is switched on, default value is used for result name.
7244         #
7245         #  @return New GEOM.GEOM_Object, containing copies of theShapes without coincident edges.
7246         #
7247         #  @ref tui_glue_edges "Example"
7248         @ManageTransactions("ShapesOp")
7249         def MakeGlueEdges(self, theShapes, theTolerance, theName=None):
7250             """
7251             Replace coincident edges in theShapes by one edge.
7252
7253             Parameters:
7254                 theShapes Initial shapes, either a list or compound of shapes.
7255                 theTolerance Maximum distance between edges, which can be considered as coincident.
7256                 theName Object name; when specified, this parameter is used
7257                         for result publication in the study. Otherwise, if automatic
7258                         publication is switched on, default value is used for result name.
7259
7260             Returns:
7261                 New GEOM.GEOM_Object, containing copies of theShapes without coincident edges.
7262             """
7263             theTolerance,Parameters = ParseParameters(theTolerance)
7264             anObj = self.ShapesOp.MakeGlueEdges(ToList(theShapes), theTolerance)
7265             if anObj is None:
7266                 raise RuntimeError, "MakeGlueEdges : " + self.ShapesOp.GetErrorCode()
7267             anObj.SetParameters(Parameters)
7268             self._autoPublish(anObj, theName, "glueEdges")
7269             return anObj
7270
7271         ## Find coincident edges in \a theShapes for possible gluing.
7272         #  @param theShapes Initial shapes, either a list or compound of shapes.
7273         #  @param theTolerance Maximum distance between edges,
7274         #                      which can be considered as coincident.
7275         #  @param theName Object name; when specified, this parameter is used
7276         #         for result publication in the study. Otherwise, if automatic
7277         #         publication is switched on, default value is used for result name.
7278         #
7279         #  @return GEOM.ListOfGO
7280         #
7281         #  @ref tui_glue_edges "Example"
7282         @ManageTransactions("ShapesOp")
7283         def GetGlueEdges(self, theShapes, theTolerance, theName=None):
7284             """
7285             Find coincident edges in theShapes for possible gluing.
7286
7287             Parameters:
7288                 theShapes Initial shapes, either a list or compound of shapes.
7289                 theTolerance Maximum distance between edges,
7290                              which can be considered as coincident.
7291                 theName Object name; when specified, this parameter is used
7292                         for result publication in the study. Otherwise, if automatic
7293                         publication is switched on, default value is used for result name.
7294
7295             Returns:
7296                 GEOM.ListOfGO
7297             """
7298             anObj = self.ShapesOp.GetGlueEdges(ToList(theShapes), theTolerance)
7299             RaiseIfFailed("GetGlueEdges", self.ShapesOp)
7300             self._autoPublish(anObj, theName, "edgesToGlue")
7301             return anObj
7302
7303         ## Replace coincident edges in theShapes by one edge
7304         #  in compliance with given list of edges.
7305         #  @param theShapes Initial shapes, either a list or compound of shapes.
7306         #  @param theTolerance Maximum distance between edges,
7307         #                      which can be considered as coincident.
7308         #  @param theEdges List of edges for gluing.
7309         #  @param theName Object name; when specified, this parameter is used
7310         #         for result publication in the study. Otherwise, if automatic
7311         #         publication is switched on, default value is used for result name.
7312         #
7313         #  @return New GEOM.GEOM_Object, containing copies of theShapes without coincident edges.
7314         #
7315         #  @ref tui_glue_edges "Example"
7316         @ManageTransactions("ShapesOp")
7317         def MakeGlueEdgesByList(self, theShapes, theTolerance, theEdges, theName=None):
7318             """
7319             Replace coincident edges in theShapes by one edge
7320             in compliance with given list of edges.
7321
7322             Parameters:
7323                 theShapes Initial shapes, either a list or compound of shapes.
7324                 theTolerance Maximum distance between edges,
7325                              which can be considered as coincident.
7326                 theEdges List of edges for gluing.
7327                 theName Object name; when specified, this parameter is used
7328                         for result publication in the study. Otherwise, if automatic
7329                         publication is switched on, default value is used for result name.
7330
7331             Returns:
7332                 New GEOM.GEOM_Object, containing copies of theShapes without coincident edges.
7333             """
7334             anObj = self.ShapesOp.MakeGlueEdgesByList(ToList(theShapes), theTolerance, theEdges)
7335             if anObj is None:
7336                 raise RuntimeError, "MakeGlueEdgesByList : " + self.ShapesOp.GetErrorCode()
7337             self._autoPublish(anObj, theName, "glueEdges")
7338             return anObj
7339
7340         # end of l3_healing
7341         ## @}
7342
7343         ## @addtogroup l3_boolean Boolean Operations
7344         ## @{
7345
7346         # -----------------------------------------------------------------------------
7347         # Boolean (Common, Cut, Fuse, Section)
7348         # -----------------------------------------------------------------------------
7349
7350         ## Perform one of boolean operations on two given shapes.
7351         #  @param theShape1 First argument for boolean operation.
7352         #  @param theShape2 Second argument for boolean operation.
7353         #  @param theOperation Indicates the operation to be done:\n
7354         #                      1 - Common, 2 - Cut, 3 - Fuse, 4 - Section.
7355         #  @param checkSelfInte The flag that tells if the arguments should
7356         #         be checked for self-intersection prior to the operation.
7357         #  @param theName Object name; when specified, this parameter is used
7358         #         for result publication in the study. Otherwise, if automatic
7359         #         publication is switched on, default value is used for result name.
7360         #
7361         #  @note This algorithm doesn't find all types of self-intersections.
7362         #        It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7363         #        vertex/face and edge/face intersections. Face/face
7364         #        intersections detection is switched off as it is a
7365         #        time-consuming operation that gives an impact on performance.
7366         #        To find all self-intersections please use
7367         #        CheckSelfIntersections() method.
7368         #
7369         #  @return New GEOM.GEOM_Object, containing the result shape.
7370         #
7371         #  @ref tui_fuse "Example"
7372         @ManageTransactions("BoolOp")
7373         def MakeBoolean(self, theShape1, theShape2, theOperation, checkSelfInte=False, theName=None):
7374             """
7375             Perform one of boolean operations on two given shapes.
7376
7377             Parameters:
7378                 theShape1 First argument for boolean operation.
7379                 theShape2 Second argument for boolean operation.
7380                 theOperation Indicates the operation to be done:
7381                              1 - Common, 2 - Cut, 3 - Fuse, 4 - Section.
7382                 checkSelfInte The flag that tells if the arguments should
7383                               be checked for self-intersection prior to
7384                               the operation.
7385                 theName Object name; when specified, this parameter is used
7386                         for result publication in the study. Otherwise, if automatic
7387                         publication is switched on, default value is used for result name.
7388
7389             Note:
7390                     This algorithm doesn't find all types of self-intersections.
7391                     It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7392                     vertex/face and edge/face intersections. Face/face
7393                     intersections detection is switched off as it is a
7394                     time-consuming operation that gives an impact on performance.
7395                     To find all self-intersections please use
7396                     CheckSelfIntersections() method.
7397
7398             Returns:
7399                 New GEOM.GEOM_Object, containing the result shape.
7400             """
7401             # Example: see GEOM_TestAll.py
7402             anObj = self.BoolOp.MakeBoolean(theShape1, theShape2, theOperation, checkSelfInte)
7403             RaiseIfFailed("MakeBoolean", self.BoolOp)
7404             def_names = { 1: "common", 2: "cut", 3: "fuse", 4: "section" }
7405             self._autoPublish(anObj, theName, def_names[theOperation])
7406             return anObj
7407
7408         ## Perform Common boolean operation on two given shapes.
7409         #  @param theShape1 First argument for boolean operation.
7410         #  @param theShape2 Second argument for boolean operation.
7411         #  @param checkSelfInte The flag that tells if the arguments should
7412         #         be checked for self-intersection prior to the operation.
7413         #  @param theName Object name; when specified, this parameter is used
7414         #         for result publication in the study. Otherwise, if automatic
7415         #         publication is switched on, default value is used for result name.
7416         #
7417         #  @note This algorithm doesn't find all types of self-intersections.
7418         #        It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7419         #        vertex/face and edge/face intersections. Face/face
7420         #        intersections detection is switched off as it is a
7421         #        time-consuming operation that gives an impact on performance.
7422         #        To find all self-intersections please use
7423         #        CheckSelfIntersections() method.
7424         #
7425         #  @return New GEOM.GEOM_Object, containing the result shape.
7426         #
7427         #  @ref tui_common "Example 1"
7428         #  \n @ref swig_MakeCommon "Example 2"
7429         def MakeCommon(self, theShape1, theShape2, checkSelfInte=False, theName=None):
7430             """
7431             Perform Common boolean operation on two given shapes.
7432
7433             Parameters:
7434                 theShape1 First argument for boolean operation.
7435                 theShape2 Second argument for boolean operation.
7436                 checkSelfInte The flag that tells if the arguments should
7437                               be checked for self-intersection prior to
7438                               the operation.
7439                 theName Object name; when specified, this parameter is used
7440                         for result publication in the study. Otherwise, if automatic
7441                         publication is switched on, default value is used for result name.
7442
7443             Note:
7444                     This algorithm doesn't find all types of self-intersections.
7445                     It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7446                     vertex/face and edge/face intersections. Face/face
7447                     intersections detection is switched off as it is a
7448                     time-consuming operation that gives an impact on performance.
7449                     To find all self-intersections please use
7450                     CheckSelfIntersections() method.
7451
7452             Returns:
7453                 New GEOM.GEOM_Object, containing the result shape.
7454             """
7455             # Example: see GEOM_TestOthers.py
7456             # note: auto-publishing is done in self.MakeBoolean()
7457             return self.MakeBoolean(theShape1, theShape2, 1, checkSelfInte, theName)
7458
7459         ## Perform Cut boolean operation on two given shapes.
7460         #  @param theShape1 First argument for boolean operation.
7461         #  @param theShape2 Second argument for boolean operation.
7462         #  @param checkSelfInte The flag that tells if the arguments should
7463         #         be checked for self-intersection prior to the operation.
7464         #  @param theName Object name; when specified, this parameter is used
7465         #         for result publication in the study. Otherwise, if automatic
7466         #         publication is switched on, default value is used for result name.
7467         #
7468         #  @note This algorithm doesn't find all types of self-intersections.
7469         #        It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7470         #        vertex/face and edge/face intersections. Face/face
7471         #        intersections detection is switched off as it is a
7472         #        time-consuming operation that gives an impact on performance.
7473         #        To find all self-intersections please use
7474         #        CheckSelfIntersections() method.
7475         #
7476         #  @return New GEOM.GEOM_Object, containing the result shape.
7477         #
7478         #  @ref tui_cut "Example 1"
7479         #  \n @ref swig_MakeCommon "Example 2"
7480         def MakeCut(self, theShape1, theShape2, checkSelfInte=False, theName=None):
7481             """
7482             Perform Cut boolean operation on two given shapes.
7483
7484             Parameters:
7485                 theShape1 First argument for boolean operation.
7486                 theShape2 Second argument for boolean operation.
7487                 checkSelfInte The flag that tells if the arguments should
7488                               be checked for self-intersection prior to
7489                               the operation.
7490                 theName Object name; when specified, this parameter is used
7491                         for result publication in the study. Otherwise, if automatic
7492                         publication is switched on, default value is used for result name.
7493
7494             Note:
7495                     This algorithm doesn't find all types of self-intersections.
7496                     It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7497                     vertex/face and edge/face intersections. Face/face
7498                     intersections detection is switched off as it is a
7499                     time-consuming operation that gives an impact on performance.
7500                     To find all self-intersections please use
7501                     CheckSelfIntersections() method.
7502
7503             Returns:
7504                 New GEOM.GEOM_Object, containing the result shape.
7505
7506             """
7507             # Example: see GEOM_TestOthers.py
7508             # note: auto-publishing is done in self.MakeBoolean()
7509             return self.MakeBoolean(theShape1, theShape2, 2, checkSelfInte, theName)
7510
7511         ## Perform Fuse boolean operation on two given shapes.
7512         #  @param theShape1 First argument for boolean operation.
7513         #  @param theShape2 Second argument for boolean operation.
7514         #  @param checkSelfInte The flag that tells if the arguments should
7515         #         be checked for self-intersection prior to the operation.
7516         #  @param rmExtraEdges The flag that tells if Remove Extra Edges
7517         #         operation should be performed during the operation.
7518         #  @param theName Object name; when specified, this parameter is used
7519         #         for result publication in the study. Otherwise, if automatic
7520         #         publication is switched on, default value is used for result name.
7521         #
7522         #  @note This algorithm doesn't find all types of self-intersections.
7523         #        It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7524         #        vertex/face and edge/face intersections. Face/face
7525         #        intersections detection is switched off as it is a
7526         #        time-consuming operation that gives an impact on performance.
7527         #        To find all self-intersections please use
7528         #        CheckSelfIntersections() method.
7529         #
7530         #  @return New GEOM.GEOM_Object, containing the result shape.
7531         #
7532         #  @ref tui_fuse "Example 1"
7533         #  \n @ref swig_MakeCommon "Example 2"
7534         @ManageTransactions("BoolOp")
7535         def MakeFuse(self, theShape1, theShape2, checkSelfInte=False,
7536                      rmExtraEdges=False, theName=None):
7537             """
7538             Perform Fuse boolean operation on two given shapes.
7539
7540             Parameters:
7541                 theShape1 First argument for boolean operation.
7542                 theShape2 Second argument for boolean operation.
7543                 checkSelfInte The flag that tells if the arguments should
7544                               be checked for self-intersection prior to
7545                               the operation.
7546                 rmExtraEdges The flag that tells if Remove Extra Edges
7547                              operation should be performed during the operation.
7548                 theName Object name; when specified, this parameter is used
7549                         for result publication in the study. Otherwise, if automatic
7550                         publication is switched on, default value is used for result name.
7551
7552             Note:
7553                     This algorithm doesn't find all types of self-intersections.
7554                     It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7555                     vertex/face and edge/face intersections. Face/face
7556                     intersections detection is switched off as it is a
7557                     time-consuming operation that gives an impact on performance.
7558                     To find all self-intersections please use
7559                     CheckSelfIntersections() method.
7560
7561             Returns:
7562                 New GEOM.GEOM_Object, containing the result shape.
7563
7564             """
7565             # Example: see GEOM_TestOthers.py
7566             anObj = self.BoolOp.MakeFuse(theShape1, theShape2,
7567                                          checkSelfInte, rmExtraEdges)
7568             RaiseIfFailed("MakeFuse", self.BoolOp)
7569             self._autoPublish(anObj, theName, "fuse")
7570             return anObj
7571
7572         ## Perform Section boolean operation on two given shapes.
7573         #  @param theShape1 First argument for boolean operation.
7574         #  @param theShape2 Second argument for boolean operation.
7575         #  @param checkSelfInte The flag that tells if the arguments should
7576         #         be checked for self-intersection prior to the operation.
7577         #         If a self-intersection detected the operation fails.
7578         #  @param theName Object name; when specified, this parameter is used
7579         #         for result publication in the study. Otherwise, if automatic
7580         #         publication is switched on, default value is used for result name.
7581         #  @return New GEOM.GEOM_Object, containing the result shape.
7582         #
7583         #  @ref tui_section "Example 1"
7584         #  \n @ref swig_MakeCommon "Example 2"
7585         def MakeSection(self, theShape1, theShape2, checkSelfInte=False, theName=None):
7586             """
7587             Perform Section boolean operation on two given shapes.
7588
7589             Parameters:
7590                 theShape1 First argument for boolean operation.
7591                 theShape2 Second argument for boolean operation.
7592                 checkSelfInte The flag that tells if the arguments should
7593                               be checked for self-intersection prior to the operation.
7594                               If a self-intersection detected the operation fails.
7595                 theName Object name; when specified, this parameter is used
7596                         for result publication in the study. Otherwise, if automatic
7597                         publication is switched on, default value is used for result name.
7598             Returns:
7599                 New GEOM.GEOM_Object, containing the result shape.
7600
7601             """
7602             # Example: see GEOM_TestOthers.py
7603             # note: auto-publishing is done in self.MakeBoolean()
7604             return self.MakeBoolean(theShape1, theShape2, 4, checkSelfInte, theName)
7605
7606         ## Perform Fuse boolean operation on the list of shapes.
7607         #  @param theShapesList Shapes to be fused.
7608         #  @param checkSelfInte The flag that tells if the arguments should
7609         #         be checked for self-intersection prior to the operation.
7610         #  @param rmExtraEdges The flag that tells if Remove Extra Edges
7611         #         operation should be performed during the operation.
7612         #  @param theName Object name; when specified, this parameter is used
7613         #         for result publication in the study. Otherwise, if automatic
7614         #         publication is switched on, default value is used for result name.
7615         #
7616         #  @note This algorithm doesn't find all types of self-intersections.
7617         #        It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7618         #        vertex/face and edge/face intersections. Face/face
7619         #        intersections detection is switched off as it is a
7620         #        time-consuming operation that gives an impact on performance.
7621         #        To find all self-intersections please use
7622         #        CheckSelfIntersections() method.
7623         #
7624         #  @return New GEOM.GEOM_Object, containing the result shape.
7625         #
7626         #  @ref tui_fuse "Example 1"
7627         #  \n @ref swig_MakeCommon "Example 2"
7628         @ManageTransactions("BoolOp")
7629         def MakeFuseList(self, theShapesList, checkSelfInte=False,
7630                          rmExtraEdges=False, theName=None):
7631             """
7632             Perform Fuse boolean operation on the list of shapes.
7633
7634             Parameters:
7635                 theShapesList Shapes to be fused.
7636                 checkSelfInte The flag that tells if the arguments should
7637                               be checked for self-intersection prior to
7638                               the operation.
7639                 rmExtraEdges The flag that tells if Remove Extra Edges
7640                              operation should be performed during the operation.
7641                 theName Object name; when specified, this parameter is used
7642                         for result publication in the study. Otherwise, if automatic
7643                         publication is switched on, default value is used for result name.
7644
7645             Note:
7646                     This algorithm doesn't find all types of self-intersections.
7647                     It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7648                     vertex/face and edge/face intersections. Face/face
7649                     intersections detection is switched off as it is a
7650                     time-consuming operation that gives an impact on performance.
7651                     To find all self-intersections please use
7652                     CheckSelfIntersections() method.
7653
7654             Returns:
7655                 New GEOM.GEOM_Object, containing the result shape.
7656
7657             """
7658             # Example: see GEOM_TestOthers.py
7659             anObj = self.BoolOp.MakeFuseList(theShapesList, checkSelfInte,
7660                                              rmExtraEdges)
7661             RaiseIfFailed("MakeFuseList", self.BoolOp)
7662             self._autoPublish(anObj, theName, "fuse")
7663             return anObj
7664
7665         ## Perform Common boolean operation on the list of shapes.
7666         #  @param theShapesList Shapes for Common operation.
7667         #  @param checkSelfInte The flag that tells if the arguments should
7668         #         be checked for self-intersection prior to the operation.
7669         #  @param theName Object name; when specified, this parameter is used
7670         #         for result publication in the study. Otherwise, if automatic
7671         #         publication is switched on, default value is used for result name.
7672         #
7673         #  @note This algorithm doesn't find all types of self-intersections.
7674         #        It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7675         #        vertex/face and edge/face intersections. Face/face
7676         #        intersections detection is switched off as it is a
7677         #        time-consuming operation that gives an impact on performance.
7678         #        To find all self-intersections please use
7679         #        CheckSelfIntersections() method.
7680         #
7681         #  @return New GEOM.GEOM_Object, containing the result shape.
7682         #
7683         #  @ref tui_common "Example 1"
7684         #  \n @ref swig_MakeCommon "Example 2"
7685         @ManageTransactions("BoolOp")
7686         def MakeCommonList(self, theShapesList, checkSelfInte=False, theName=None):
7687             """
7688             Perform Common boolean operation on the list of shapes.
7689
7690             Parameters:
7691                 theShapesList Shapes for Common operation.
7692                 checkSelfInte The flag that tells if the arguments should
7693                               be checked for self-intersection prior to
7694                               the operation.
7695                 theName Object name; when specified, this parameter is used
7696                         for result publication in the study. Otherwise, if automatic
7697                         publication is switched on, default value is used for result name.
7698
7699             Note:
7700                     This algorithm doesn't find all types of self-intersections.
7701                     It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7702                     vertex/face and edge/face intersections. Face/face
7703                     intersections detection is switched off as it is a
7704                     time-consuming operation that gives an impact on performance.
7705                     To find all self-intersections please use
7706                     CheckSelfIntersections() method.
7707
7708             Returns:
7709                 New GEOM.GEOM_Object, containing the result shape.
7710
7711             """
7712             # Example: see GEOM_TestOthers.py
7713             anObj = self.BoolOp.MakeCommonList(theShapesList, checkSelfInte)
7714             RaiseIfFailed("MakeCommonList", self.BoolOp)
7715             self._autoPublish(anObj, theName, "common")
7716             return anObj
7717
7718         ## Perform Cut boolean operation on one object and the list of tools.
7719         #  @param theMainShape The object of the operation.
7720         #  @param theShapesList The list of tools of the operation.
7721         #  @param checkSelfInte The flag that tells if the arguments should
7722         #         be checked for self-intersection prior to the operation.
7723         #  @param theName Object name; when specified, this parameter is used
7724         #         for result publication in the study. Otherwise, if automatic
7725         #         publication is switched on, default value is used for result name.
7726         #
7727         #  @note This algorithm doesn't find all types of self-intersections.
7728         #        It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7729         #        vertex/face and edge/face intersections. Face/face
7730         #        intersections detection is switched off as it is a
7731         #        time-consuming operation that gives an impact on performance.
7732         #        To find all self-intersections please use
7733         #        CheckSelfIntersections() method.
7734         #
7735         #  @return New GEOM.GEOM_Object, containing the result shape.
7736         #
7737         #  @ref tui_cut "Example 1"
7738         #  \n @ref swig_MakeCommon "Example 2"
7739         @ManageTransactions("BoolOp")
7740         def MakeCutList(self, theMainShape, theShapesList, checkSelfInte=False, theName=None):
7741             """
7742             Perform Cut boolean operation on one object and the list of tools.
7743
7744             Parameters:
7745                 theMainShape The object of the operation.
7746                 theShapesList The list of tools of the operation.
7747                 checkSelfInte The flag that tells if the arguments should
7748                               be checked for self-intersection prior to
7749                               the operation.
7750                 theName Object name; when specified, this parameter is used
7751                         for result publication in the study. Otherwise, if automatic
7752                         publication is switched on, default value is used for result name.
7753
7754             Note:
7755                     This algorithm doesn't find all types of self-intersections.
7756                     It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7757                     vertex/face and edge/face intersections. Face/face
7758                     intersections detection is switched off as it is a
7759                     time-consuming operation that gives an impact on performance.
7760                     To find all self-intersections please use
7761                     CheckSelfIntersections() method.
7762
7763             Returns:
7764                 New GEOM.GEOM_Object, containing the result shape.
7765
7766             """
7767             # Example: see GEOM_TestOthers.py
7768             anObj = self.BoolOp.MakeCutList(theMainShape, theShapesList, checkSelfInte)
7769             RaiseIfFailed("MakeCutList", self.BoolOp)
7770             self._autoPublish(anObj, theName, "cut")
7771             return anObj
7772
7773         # end of l3_boolean
7774         ## @}
7775
7776         ## @addtogroup l3_basic_op
7777         ## @{
7778
7779         ## Perform partition operation.
7780         #  @param ListShapes Shapes to be intersected.
7781         #  @param ListTools Shapes to intersect theShapes.
7782         #  @param Limit Type of resulting shapes (see ShapeType()).\n
7783         #         If this parameter is set to -1 ("Auto"), most appropriate shape limit
7784         #         type will be detected automatically.
7785         #  @param KeepNonlimitShapes if this parameter == 0, then only shapes of
7786         #                             target type (equal to Limit) are kept in the result,
7787         #                             else standalone shapes of lower dimension
7788         #                             are kept also (if they exist).
7789         #
7790         #  @param theName Object name; when specified, this parameter is used
7791         #         for result publication in the study. Otherwise, if automatic
7792         #         publication is switched on, default value is used for result name.
7793         #
7794         #  @note Each compound from ListShapes and ListTools will be exploded
7795         #        in order to avoid possible intersection between shapes from this compound.
7796         #
7797         #  After implementation new version of PartitionAlgo (October 2006)
7798         #  other parameters are ignored by current functionality. They are kept
7799         #  in this function only for support old versions.
7800         #      @param ListKeepInside Shapes, outside which the results will be deleted.
7801         #         Each shape from theKeepInside must belong to theShapes also.
7802         #      @param ListRemoveInside Shapes, inside which the results will be deleted.
7803         #         Each shape from theRemoveInside must belong to theShapes also.
7804         #      @param RemoveWebs If TRUE, perform Glue 3D algorithm.
7805         #      @param ListMaterials Material indices for each shape. Make sence,
7806         #         only if theRemoveWebs is TRUE.
7807         #
7808         #  @return New GEOM.GEOM_Object, containing the result shapes.
7809         #
7810         #  @ref tui_partition "Example"
7811         @ManageTransactions("BoolOp")
7812         def MakePartition(self, ListShapes, ListTools=[], ListKeepInside=[], ListRemoveInside=[],
7813                           Limit=ShapeType["AUTO"], RemoveWebs=0, ListMaterials=[],
7814                           KeepNonlimitShapes=0, theName=None):
7815             """
7816             Perform partition operation.
7817
7818             Parameters:
7819                 ListShapes Shapes to be intersected.
7820                 ListTools Shapes to intersect theShapes.
7821                 Limit Type of resulting shapes (see geompy.ShapeType)
7822                       If this parameter is set to -1 ("Auto"), most appropriate shape limit
7823                       type will be detected automatically.
7824                 KeepNonlimitShapes if this parameter == 0, then only shapes of
7825                                     target type (equal to Limit) are kept in the result,
7826                                     else standalone shapes of lower dimension
7827                                     are kept also (if they exist).
7828
7829                 theName Object name; when specified, this parameter is used
7830                         for result publication in the study. Otherwise, if automatic
7831                         publication is switched on, default value is used for result name.
7832             Note:
7833                     Each compound from ListShapes and ListTools will be exploded
7834                     in order to avoid possible intersection between shapes from
7835                     this compound.
7836
7837             After implementation new version of PartitionAlgo (October 2006) other
7838             parameters are ignored by current functionality. They are kept in this
7839             function only for support old versions.
7840
7841             Ignored parameters:
7842                 ListKeepInside Shapes, outside which the results will be deleted.
7843                                Each shape from theKeepInside must belong to theShapes also.
7844                 ListRemoveInside Shapes, inside which the results will be deleted.
7845                                  Each shape from theRemoveInside must belong to theShapes also.
7846                 RemoveWebs If TRUE, perform Glue 3D algorithm.
7847                 ListMaterials Material indices for each shape. Make sence, only if theRemoveWebs is TRUE.
7848
7849             Returns:
7850                 New GEOM.GEOM_Object, containing the result shapes.
7851             """
7852             # Example: see GEOM_TestAll.py
7853             if Limit == self.ShapeType["AUTO"]:
7854                 # automatic detection of the most appropriate shape limit type
7855                 lim = GEOM.SHAPE
7856                 for s in ListShapes: lim = min( lim, s.GetMaxShapeType() )
7857                 Limit = EnumToLong(lim)
7858                 pass
7859             anObj = self.BoolOp.MakePartition(ListShapes, ListTools,
7860                                               ListKeepInside, ListRemoveInside,
7861                                               Limit, RemoveWebs, ListMaterials,
7862                                               KeepNonlimitShapes);
7863             RaiseIfFailed("MakePartition", self.BoolOp)
7864             self._autoPublish(anObj, theName, "partition")
7865             return anObj
7866
7867         ## Perform partition operation.
7868         #  This method may be useful if it is needed to make a partition for
7869         #  compound contains nonintersected shapes. Performance will be better
7870         #  since intersection between shapes from compound is not performed.
7871         #
7872         #  Description of all parameters as in previous method MakePartition().
7873         #  One additional parameter is provided:
7874         #  @param checkSelfInte The flag that tells if the arguments should
7875         #         be checked for self-intersection prior to the operation.
7876         #
7877         #  @note This algorithm doesn't find all types of self-intersections.
7878         #        It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7879         #        vertex/face and edge/face intersections. Face/face
7880         #        intersections detection is switched off as it is a
7881         #        time-consuming operation that gives an impact on performance.
7882         #        To find all self-intersections please use
7883         #        CheckSelfIntersections() method.
7884         #
7885         #  @note Passed compounds (via ListShapes or via ListTools)
7886         #           have to consist of nonintersecting shapes.
7887         #
7888         #  @return New GEOM.GEOM_Object, containing the result shapes.
7889         #
7890         #  @ref swig_todo "Example"
7891         @ManageTransactions("BoolOp")
7892         def MakePartitionNonSelfIntersectedShape(self, ListShapes, ListTools=[],
7893                                                  ListKeepInside=[], ListRemoveInside=[],
7894                                                  Limit=ShapeType["AUTO"], RemoveWebs=0,
7895                                                  ListMaterials=[], KeepNonlimitShapes=0,
7896                                                  checkSelfInte=False, theName=None):
7897             """
7898             Perform partition operation.
7899             This method may be useful if it is needed to make a partition for
7900             compound contains nonintersected shapes. Performance will be better
7901             since intersection between shapes from compound is not performed.
7902
7903             Parameters:
7904                 Description of all parameters as in method geompy.MakePartition.
7905                 One additional parameter is provided:
7906                 checkSelfInte The flag that tells if the arguments should
7907                               be checked for self-intersection prior to
7908                               the operation.
7909
7910             Note:
7911                     This algorithm doesn't find all types of self-intersections.
7912                     It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7913                     vertex/face and edge/face intersections. Face/face
7914                     intersections detection is switched off as it is a
7915                     time-consuming operation that gives an impact on performance.
7916                     To find all self-intersections please use
7917                     CheckSelfIntersections() method.
7918
7919             NOTE:
7920                 Passed compounds (via ListShapes or via ListTools)
7921                 have to consist of nonintersecting shapes.
7922
7923             Returns:
7924                 New GEOM.GEOM_Object, containing the result shapes.
7925             """
7926             if Limit == self.ShapeType["AUTO"]:
7927                 # automatic detection of the most appropriate shape limit type
7928                 lim = GEOM.SHAPE
7929                 for s in ListShapes: lim = min( lim, s.GetMaxShapeType() )
7930                 Limit = EnumToLong(lim)
7931                 pass
7932             anObj = self.BoolOp.MakePartitionNonSelfIntersectedShape(ListShapes, ListTools,
7933                                                                      ListKeepInside, ListRemoveInside,
7934                                                                      Limit, RemoveWebs, ListMaterials,
7935                                                                      KeepNonlimitShapes, checkSelfInte);
7936             RaiseIfFailed("MakePartitionNonSelfIntersectedShape", self.BoolOp)
7937             self._autoPublish(anObj, theName, "partition")
7938             return anObj
7939
7940         ## See method MakePartition() for more information.
7941         #
7942         #  @ref tui_partition "Example 1"
7943         #  \n @ref swig_Partition "Example 2"
7944         def Partition(self, ListShapes, ListTools=[], ListKeepInside=[], ListRemoveInside=[],
7945                       Limit=ShapeType["AUTO"], RemoveWebs=0, ListMaterials=[],
7946                       KeepNonlimitShapes=0, theName=None):
7947             """
7948             See method geompy.MakePartition for more information.
7949             """
7950             # Example: see GEOM_TestOthers.py
7951             # note: auto-publishing is done in self.MakePartition()
7952             anObj = self.MakePartition(ListShapes, ListTools,
7953                                        ListKeepInside, ListRemoveInside,
7954                                        Limit, RemoveWebs, ListMaterials,
7955                                        KeepNonlimitShapes, theName);
7956             return anObj
7957
7958         ## Perform partition of the Shape with the Plane
7959         #  @param theShape Shape to be intersected.
7960         #  @param thePlane Tool shape, to intersect theShape.
7961         #  @param theName Object name; when specified, this parameter is used
7962         #         for result publication in the study. Otherwise, if automatic
7963         #         publication is switched on, default value is used for result name.
7964         #
7965         #  @return New GEOM.GEOM_Object, containing the result shape.
7966         #
7967         #  @note This operation is a shortcut to the more general @ref MakePartition
7968         #  operation, where @a theShape specifies single "object" (shape being partitioned)
7969         #  and @a thePlane specifies single "tool" (intersector shape). Other parameters of
7970         #  @ref MakePartition operation have default values:
7971         #  - @a Limit: GEOM::SHAPE (shape limit corresponds to the type of @a theShape)
7972         #  - @a KeepNonlimitShapes: 0
7973         #  - @a KeepInside, @a RemoveInside, @a RemoveWebs,
7974         #    @a Materials (obsolete parameters): empty
7975         #
7976         #  @note I.e. the following two operations are equivalent:
7977         #  @code
7978         #  Result = geompy.MakeHalfPartition(Object, Plane)
7979         #  Result = geompy.MakePartition([Object], [Plane])
7980         #  @endcode
7981         #
7982         #  @sa MakePartition, MakePartitionNonSelfIntersectedShape
7983         #
7984         #  @ref tui_partition "Example"
7985         @ManageTransactions("BoolOp")
7986         def MakeHalfPartition(self, theShape, thePlane, theName=None):
7987             """
7988             Perform partition of the Shape with the Plane
7989
7990             Parameters:
7991                 theShape Shape to be intersected.
7992                 thePlane Tool shape, to intersect theShape.
7993                 theName Object name; when specified, this parameter is used
7994                         for result publication in the study. Otherwise, if automatic
7995                         publication is switched on, default value is used for result name.
7996
7997             Returns:
7998                 New GEOM.GEOM_Object, containing the result shape.
7999          
8000             Note: This operation is a shortcut to the more general MakePartition
8001             operation, where theShape specifies single "object" (shape being partitioned)
8002             and thePlane specifies single "tool" (intersector shape). Other parameters of
8003             MakePartition operation have default values:
8004             - Limit: GEOM::SHAPE (shape limit corresponds to the type of theShape)
8005             - KeepNonlimitShapes: 0
8006             - KeepInside, RemoveInside, RemoveWebs, Materials (obsolete parameters): empty
8007          
8008             I.e. the following two operations are equivalent:
8009               Result = geompy.MakeHalfPartition(Object, Plane)
8010               Result = geompy.MakePartition([Object], [Plane])
8011             """
8012             # Example: see GEOM_TestAll.py
8013             anObj = self.BoolOp.MakeHalfPartition(theShape, thePlane)
8014             RaiseIfFailed("MakeHalfPartition", self.BoolOp)
8015             self._autoPublish(anObj, theName, "partition")
8016             return anObj
8017
8018         # end of l3_basic_op
8019         ## @}
8020
8021         ## @addtogroup l3_transform
8022         ## @{
8023
8024         ## Translate the given object along the vector, specified
8025         #  by its end points.
8026         #  @param theObject The object to be translated.
8027         #  @param thePoint1 Start point of translation vector.
8028         #  @param thePoint2 End point of translation vector.
8029         #  @param theCopy Flag used to translate object itself or create a copy.
8030         #  @return Translated @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
8031         #  new GEOM.GEOM_Object, containing the translated object if @a theCopy flag is @c True.
8032         @ManageTransactions("TrsfOp")
8033         def TranslateTwoPoints(self, theObject, thePoint1, thePoint2, theCopy=False):
8034             """
8035             Translate the given object along the vector, specified by its end points.
8036
8037             Parameters:
8038                 theObject The object to be translated.
8039                 thePoint1 Start point of translation vector.
8040                 thePoint2 End point of translation vector.
8041                 theCopy Flag used to translate object itself or create a copy.
8042
8043             Returns:
8044                 Translated theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
8045                 new GEOM.GEOM_Object, containing the translated object if theCopy flag is True.
8046             """
8047             if theCopy:
8048                 anObj = self.TrsfOp.TranslateTwoPointsCopy(theObject, thePoint1, thePoint2)
8049             else:
8050                 anObj = self.TrsfOp.TranslateTwoPoints(theObject, thePoint1, thePoint2)
8051             RaiseIfFailed("TranslateTwoPoints", self.TrsfOp)
8052             return anObj
8053
8054         ## Translate the given object along the vector, specified
8055         #  by its end points, creating its copy before the translation.
8056         #  @param theObject The object to be translated.
8057         #  @param thePoint1 Start point of translation vector.
8058         #  @param thePoint2 End point of translation vector.
8059         #  @param theName Object name; when specified, this parameter is used
8060         #         for result publication in the study. Otherwise, if automatic
8061         #         publication is switched on, default value is used for result name.
8062         #
8063         #  @return New GEOM.GEOM_Object, containing the translated object.
8064         #
8065         #  @ref tui_translation "Example 1"
8066         #  \n @ref swig_MakeTranslationTwoPoints "Example 2"
8067         @ManageTransactions("TrsfOp")
8068         def MakeTranslationTwoPoints(self, theObject, thePoint1, thePoint2, theName=None):
8069             """
8070             Translate the given object along the vector, specified
8071             by its end points, creating its copy before the translation.
8072
8073             Parameters:
8074                 theObject The object to be translated.
8075                 thePoint1 Start point of translation vector.
8076                 thePoint2 End point of translation vector.
8077                 theName Object name; when specified, this parameter is used
8078                         for result publication in the study. Otherwise, if automatic
8079                         publication is switched on, default value is used for result name.
8080
8081             Returns:
8082                 New GEOM.GEOM_Object, containing the translated object.
8083             """
8084             # Example: see GEOM_TestAll.py
8085             anObj = self.TrsfOp.TranslateTwoPointsCopy(theObject, thePoint1, thePoint2)
8086             RaiseIfFailed("TranslateTwoPointsCopy", self.TrsfOp)
8087             self._autoPublish(anObj, theName, "translated")
8088             return anObj
8089
8090         ## Translate the given object along the vector, specified by its components.
8091         #  @param theObject The object to be translated.
8092         #  @param theDX,theDY,theDZ Components of translation vector.
8093         #  @param theCopy Flag used to translate object itself or create a copy.
8094         #  @return Translated @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
8095         #  new GEOM.GEOM_Object, containing the translated object if @a theCopy flag is @c True.
8096         #
8097         #  @ref tui_translation "Example"
8098         @ManageTransactions("TrsfOp")
8099         def TranslateDXDYDZ(self, theObject, theDX, theDY, theDZ, theCopy=False):
8100             """
8101             Translate the given object along the vector, specified by its components.
8102
8103             Parameters:
8104                 theObject The object to be translated.
8105                 theDX,theDY,theDZ Components of translation vector.
8106                 theCopy Flag used to translate object itself or create a copy.
8107
8108             Returns:
8109                 Translated theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
8110                 new GEOM.GEOM_Object, containing the translated object if theCopy flag is True.
8111             """
8112             # Example: see GEOM_TestAll.py
8113             theDX, theDY, theDZ, Parameters = ParseParameters(theDX, theDY, theDZ)
8114             if theCopy:
8115                 anObj = self.TrsfOp.TranslateDXDYDZCopy(theObject, theDX, theDY, theDZ)
8116             else:
8117                 anObj = self.TrsfOp.TranslateDXDYDZ(theObject, theDX, theDY, theDZ)
8118             anObj.SetParameters(Parameters)
8119             RaiseIfFailed("TranslateDXDYDZ", self.TrsfOp)
8120             return anObj
8121
8122         ## Translate the given object along the vector, specified
8123         #  by its components, creating its copy before the translation.
8124         #  @param theObject The object to be translated.
8125         #  @param theDX,theDY,theDZ Components of translation vector.
8126         #  @param theName Object name; when specified, this parameter is used
8127         #         for result publication in the study. Otherwise, if automatic
8128         #         publication is switched on, default value is used for result name.
8129         #
8130         #  @return New GEOM.GEOM_Object, containing the translated object.
8131         #
8132         #  @ref tui_translation "Example"
8133         @ManageTransactions("TrsfOp")
8134         def MakeTranslation(self,theObject, theDX, theDY, theDZ, theName=None):
8135             """
8136             Translate the given object along the vector, specified
8137             by its components, creating its copy before the translation.
8138
8139             Parameters:
8140                 theObject The object to be translated.
8141                 theDX,theDY,theDZ Components of translation vector.
8142                 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
8146             Returns:
8147                 New GEOM.GEOM_Object, containing the translated object.
8148             """
8149             # Example: see GEOM_TestAll.py
8150             theDX, theDY, theDZ, Parameters = ParseParameters(theDX, theDY, theDZ)
8151             anObj = self.TrsfOp.TranslateDXDYDZCopy(theObject, theDX, theDY, theDZ)
8152             anObj.SetParameters(Parameters)
8153             RaiseIfFailed("TranslateDXDYDZ", self.TrsfOp)
8154             self._autoPublish(anObj, theName, "translated")
8155             return anObj
8156
8157         ## Translate the given object along the given vector.
8158         #  @param theObject The object to be translated.
8159         #  @param theVector The translation vector.
8160         #  @param theCopy Flag used to translate object itself or create a copy.
8161         #  @return Translated @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
8162         #  new GEOM.GEOM_Object, containing the translated object if @a theCopy flag is @c True.
8163         @ManageTransactions("TrsfOp")
8164         def TranslateVector(self, theObject, theVector, theCopy=False):
8165             """
8166             Translate the given object along the given vector.
8167
8168             Parameters:
8169                 theObject The object to be translated.
8170                 theVector The translation vector.
8171                 theCopy Flag used to translate object itself or create a copy.
8172
8173             Returns:
8174                 Translated theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
8175                 new GEOM.GEOM_Object, containing the translated object if theCopy flag is True.
8176             """
8177             if theCopy:
8178                 anObj = self.TrsfOp.TranslateVectorCopy(theObject, theVector)
8179             else:
8180                 anObj = self.TrsfOp.TranslateVector(theObject, theVector)
8181             RaiseIfFailed("TranslateVector", self.TrsfOp)
8182             return anObj
8183
8184         ## Translate the given object along the given vector,
8185         #  creating its copy before the translation.
8186         #  @param theObject The object to be translated.
8187         #  @param theVector The translation vector.
8188         #  @param theName Object name; when specified, this parameter is used
8189         #         for result publication in the study. Otherwise, if automatic
8190         #         publication is switched on, default value is used for result name.
8191         #
8192         #  @return New GEOM.GEOM_Object, containing the translated object.
8193         #
8194         #  @ref tui_translation "Example"
8195         @ManageTransactions("TrsfOp")
8196         def MakeTranslationVector(self, theObject, theVector, theName=None):
8197             """
8198             Translate the given object along the given vector,
8199             creating its copy before the translation.
8200
8201             Parameters:
8202                 theObject The object to be translated.
8203                 theVector The translation vector.
8204                 theName Object name; when specified, this parameter is used
8205                         for result publication in the study. Otherwise, if automatic
8206                         publication is switched on, default value is used for result name.
8207
8208             Returns:
8209                 New GEOM.GEOM_Object, containing the translated object.
8210             """
8211             # Example: see GEOM_TestAll.py
8212             anObj = self.TrsfOp.TranslateVectorCopy(theObject, theVector)
8213             RaiseIfFailed("TranslateVectorCopy", self.TrsfOp)
8214             self._autoPublish(anObj, theName, "translated")
8215             return anObj
8216
8217         ## Translate the given object along the given vector on given distance.
8218         #  @param theObject The object to be translated.
8219         #  @param theVector The translation vector.
8220         #  @param theDistance The translation distance.
8221         #  @param theCopy Flag used to translate object itself or create a copy.
8222         #  @return Translated @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
8223         #  new GEOM.GEOM_Object, containing the translated object if @a theCopy flag is @c True.
8224         #
8225         #  @ref tui_translation "Example"
8226         @ManageTransactions("TrsfOp")
8227         def TranslateVectorDistance(self, theObject, theVector, theDistance, theCopy=False):
8228             """
8229             Translate the given object along the given vector on given distance.
8230
8231             Parameters:
8232                 theObject The object to be translated.
8233                 theVector The translation vector.
8234                 theDistance The translation distance.
8235                 theCopy Flag used to translate object itself or create a copy.
8236
8237             Returns:
8238                 Translated theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
8239                 new GEOM.GEOM_Object, containing the translated object if theCopy flag is True.
8240             """
8241             # Example: see GEOM_TestAll.py
8242             theDistance,Parameters = ParseParameters(theDistance)
8243             anObj = self.TrsfOp.TranslateVectorDistance(theObject, theVector, theDistance, theCopy)
8244             RaiseIfFailed("TranslateVectorDistance", self.TrsfOp)
8245             anObj.SetParameters(Parameters)
8246             return anObj
8247
8248         ## Translate the given object along the given vector on given distance,
8249         #  creating its copy before the translation.
8250         #  @param theObject The object to be translated.
8251         #  @param theVector The translation vector.
8252         #  @param theDistance The translation distance.
8253         #  @param theName Object name; when specified, this parameter is used
8254         #         for result publication in the study. Otherwise, if automatic
8255         #         publication is switched on, default value is used for result name.
8256         #
8257         #  @return New GEOM.GEOM_Object, containing the translated object.
8258         #
8259         #  @ref tui_translation "Example"
8260         @ManageTransactions("TrsfOp")
8261         def MakeTranslationVectorDistance(self, theObject, theVector, theDistance, theName=None):
8262             """
8263             Translate the given object along the given vector on given distance,
8264             creating its copy before the translation.
8265
8266             Parameters:
8267                 theObject The object to be translated.
8268                 theVector The translation vector.
8269                 theDistance The translation distance.
8270                 theName Object name; when specified, this parameter is used
8271                         for result publication in the study. Otherwise, if automatic
8272                         publication is switched on, default value is used for result name.
8273
8274             Returns:
8275                 New GEOM.GEOM_Object, containing the translated object.
8276             """
8277             # Example: see GEOM_TestAll.py
8278             theDistance,Parameters = ParseParameters(theDistance)
8279             anObj = self.TrsfOp.TranslateVectorDistance(theObject, theVector, theDistance, 1)
8280             RaiseIfFailed("TranslateVectorDistance", self.TrsfOp)
8281             anObj.SetParameters(Parameters)
8282             self._autoPublish(anObj, theName, "translated")
8283             return anObj
8284
8285         ## Rotate the given object around the given axis on the given angle.
8286         #  @param theObject The object to be rotated.
8287         #  @param theAxis Rotation axis.
8288         #  @param theAngle Rotation angle in radians.
8289         #  @param theCopy Flag used to rotate object itself or create a copy.
8290         #
8291         #  @return Rotated @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
8292         #  new GEOM.GEOM_Object, containing the rotated object if @a theCopy flag is @c True.
8293         #
8294         #  @ref tui_rotation "Example"
8295         @ManageTransactions("TrsfOp")
8296         def Rotate(self, theObject, theAxis, theAngle, theCopy=False):
8297             """
8298             Rotate the given object around the given axis on the given angle.
8299
8300             Parameters:
8301                 theObject The object to be rotated.
8302                 theAxis Rotation axis.
8303                 theAngle Rotation angle in radians.
8304                 theCopy Flag used to rotate object itself or create a copy.
8305
8306             Returns:
8307                 Rotated theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
8308                 new GEOM.GEOM_Object, containing the rotated object if theCopy flag is True.
8309             """
8310             # Example: see GEOM_TestAll.py
8311             flag = False
8312             if isinstance(theAngle,str):
8313                 flag = True
8314             theAngle, Parameters = ParseParameters(theAngle)
8315             if flag:
8316                 theAngle = theAngle*math.pi/180.0
8317             if theCopy:
8318                 anObj = self.TrsfOp.RotateCopy(theObject, theAxis, theAngle)
8319             else:
8320                 anObj = self.TrsfOp.Rotate(theObject, theAxis, theAngle)
8321             RaiseIfFailed("Rotate", self.TrsfOp)
8322             anObj.SetParameters(Parameters)
8323             return anObj
8324
8325         ## Rotate the given object around the given axis
8326         #  on the given angle, creating its copy before the rotation.
8327         #  @param theObject The object to be rotated.
8328         #  @param theAxis Rotation axis.
8329         #  @param theAngle Rotation angle in radians.
8330         #  @param theName Object name; when specified, this parameter is used
8331         #         for result publication in the study. Otherwise, if automatic
8332         #         publication is switched on, default value is used for result name.
8333         #
8334         #  @return New GEOM.GEOM_Object, containing the rotated object.
8335         #
8336         #  @ref tui_rotation "Example"
8337         @ManageTransactions("TrsfOp")
8338         def MakeRotation(self, theObject, theAxis, theAngle, theName=None):
8339             """
8340             Rotate the given object around the given axis
8341             on the given angle, creating its copy before the rotatation.
8342
8343             Parameters:
8344                 theObject The object to be rotated.
8345                 theAxis Rotation axis.
8346                 theAngle Rotation angle in radians.
8347                 theName Object name; when specified, this parameter is used
8348                         for result publication in the study. Otherwise, if automatic
8349                         publication is switched on, default value is used for result name.
8350
8351             Returns:
8352                 New GEOM.GEOM_Object, containing the rotated object.
8353             """
8354             # Example: see GEOM_TestAll.py
8355             flag = False
8356             if isinstance(theAngle,str):
8357                 flag = True
8358             theAngle, Parameters = ParseParameters(theAngle)
8359             if flag:
8360                 theAngle = theAngle*math.pi/180.0
8361             anObj = self.TrsfOp.RotateCopy(theObject, theAxis, theAngle)
8362             RaiseIfFailed("RotateCopy", self.TrsfOp)
8363             anObj.SetParameters(Parameters)
8364             self._autoPublish(anObj, theName, "rotated")
8365             return anObj
8366
8367         ## Rotate given object around vector perpendicular to plane
8368         #  containing three points.
8369         #  @param theObject The object to be rotated.
8370         #  @param theCentPoint central point the axis is the vector perpendicular to the plane
8371         #  containing the three points.
8372         #  @param thePoint1,thePoint2 points in a perpendicular plane of the axis.
8373         #  @param theCopy Flag used to rotate object itself or create a copy.
8374         #  @return Rotated @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
8375         #  new GEOM.GEOM_Object, containing the rotated object if @a theCopy flag is @c True.
8376         @ManageTransactions("TrsfOp")
8377         def RotateThreePoints(self, theObject, theCentPoint, thePoint1, thePoint2, theCopy=False):
8378             """
8379             Rotate given object around vector perpendicular to plane
8380             containing three points.
8381
8382             Parameters:
8383                 theObject The object to be rotated.
8384                 theCentPoint central point  the axis is the vector perpendicular to the plane
8385                              containing the three points.
8386                 thePoint1,thePoint2 points in a perpendicular plane of the axis.
8387                 theCopy Flag used to rotate object itself or create a copy.
8388
8389             Returns:
8390                 Rotated theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
8391                 new GEOM.GEOM_Object, containing the rotated object if theCopy flag is True.
8392             """
8393             if theCopy:
8394                 anObj = self.TrsfOp.RotateThreePointsCopy(theObject, theCentPoint, thePoint1, thePoint2)
8395             else:
8396                 anObj = self.TrsfOp.RotateThreePoints(theObject, theCentPoint, thePoint1, thePoint2)
8397             RaiseIfFailed("RotateThreePoints", self.TrsfOp)
8398             return anObj
8399
8400         ## Rotate given object around vector perpendicular to plane
8401         #  containing three points, creating its copy before the rotatation.
8402         #  @param theObject The object to be rotated.
8403         #  @param theCentPoint central point the axis is the vector perpendicular to the plane
8404         #  containing the three points.
8405         #  @param thePoint1,thePoint2 in a perpendicular plane of the axis.
8406         #  @param theName Object name; when specified, this parameter is used
8407         #         for result publication in the study. Otherwise, if automatic
8408         #         publication is switched on, default value is used for result name.
8409         #
8410         #  @return New GEOM.GEOM_Object, containing the rotated object.
8411         #
8412         #  @ref tui_rotation "Example"
8413         @ManageTransactions("TrsfOp")
8414         def MakeRotationThreePoints(self, theObject, theCentPoint, thePoint1, thePoint2, theName=None):
8415             """
8416             Rotate given object around vector perpendicular to plane
8417             containing three points, creating its copy before the rotatation.
8418
8419             Parameters:
8420                 theObject The object to be rotated.
8421                 theCentPoint central point  the axis is the vector perpendicular to the plane
8422                              containing the three points.
8423                 thePoint1,thePoint2  in a perpendicular plane of the axis.
8424                 theName Object name; when specified, this parameter is used
8425                         for result publication in the study. Otherwise, if automatic
8426                         publication is switched on, default value is used for result name.
8427
8428             Returns:
8429                 New GEOM.GEOM_Object, containing the rotated object.
8430             """
8431             # Example: see GEOM_TestAll.py
8432             anObj = self.TrsfOp.RotateThreePointsCopy(theObject, theCentPoint, thePoint1, thePoint2)
8433             RaiseIfFailed("RotateThreePointsCopy", self.TrsfOp)
8434             self._autoPublish(anObj, theName, "rotated")
8435             return anObj
8436
8437         ## Scale the given object by the specified factor.
8438         #  @param theObject The object to be scaled.
8439         #  @param thePoint Center point for scaling.
8440         #                  Passing None for it means scaling relatively the origin of global CS.
8441         #  @param theFactor Scaling factor value.
8442         #  @param theCopy Flag used to scale object itself or create a copy.
8443         #  @return Scaled @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
8444         #  new GEOM.GEOM_Object, containing the scaled object if @a theCopy flag is @c True.
8445         @ManageTransactions("TrsfOp")
8446         def Scale(self, theObject, thePoint, theFactor, theCopy=False):
8447             """
8448             Scale the given object by the specified factor.
8449
8450             Parameters:
8451                 theObject The object to be scaled.
8452                 thePoint Center point for scaling.
8453                          Passing None for it means scaling relatively the origin of global CS.
8454                 theFactor Scaling factor value.
8455                 theCopy Flag used to scale object itself or create a copy.
8456
8457             Returns:
8458                 Scaled theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
8459                 new GEOM.GEOM_Object, containing the scaled object if theCopy flag is True.
8460             """
8461             # Example: see GEOM_TestAll.py
8462             theFactor, Parameters = ParseParameters(theFactor)
8463             if theCopy:
8464                 anObj = self.TrsfOp.ScaleShapeCopy(theObject, thePoint, theFactor)
8465             else:
8466                 anObj = self.TrsfOp.ScaleShape(theObject, thePoint, theFactor)
8467             RaiseIfFailed("Scale", self.TrsfOp)
8468             anObj.SetParameters(Parameters)
8469             return anObj
8470
8471         ## Scale the given object by the factor, creating its copy before the scaling.
8472         #  @param theObject The object to be scaled.
8473         #  @param thePoint Center point for scaling.
8474         #                  Passing None for it means scaling relatively the origin of global CS.
8475         #  @param theFactor Scaling factor value.
8476         #  @param theName Object name; when specified, this parameter is used
8477         #         for result publication in the study. Otherwise, if automatic
8478         #         publication is switched on, default value is used for result name.
8479         #
8480         #  @return New GEOM.GEOM_Object, containing the scaled shape.
8481         #
8482         #  @ref tui_scale "Example"
8483         @ManageTransactions("TrsfOp")
8484         def MakeScaleTransform(self, theObject, thePoint, theFactor, theName=None):
8485             """
8486             Scale the given object by the factor, creating its copy before the scaling.
8487
8488             Parameters:
8489                 theObject The object to be scaled.
8490                 thePoint Center point for scaling.
8491                          Passing None for it means scaling relatively the origin of global CS.
8492                 theFactor Scaling factor value.
8493                 theName Object name; when specified, this parameter is used
8494                         for result publication in the study. Otherwise, if automatic
8495                         publication is switched on, default value is used for result name.
8496
8497             Returns:
8498                 New GEOM.GEOM_Object, containing the scaled shape.
8499             """
8500             # Example: see GEOM_TestAll.py
8501             theFactor, Parameters = ParseParameters(theFactor)
8502             anObj = self.TrsfOp.ScaleShapeCopy(theObject, thePoint, theFactor)
8503             RaiseIfFailed("ScaleShapeCopy", self.TrsfOp)
8504             anObj.SetParameters(Parameters)
8505             self._autoPublish(anObj, theName, "scaled")
8506             return anObj
8507
8508         ## Scale the given object by different factors along coordinate axes.
8509         #  @param theObject The object to be scaled.
8510         #  @param thePoint Center point for scaling.
8511         #                  Passing None for it means scaling relatively the origin of global CS.
8512         #  @param theFactorX,theFactorY,theFactorZ Scaling factors along each axis.
8513         #  @param theCopy Flag used to scale object itself or create a copy.
8514         #  @return Scaled @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
8515         #  new GEOM.GEOM_Object, containing the scaled object if @a theCopy flag is @c True.
8516         @ManageTransactions("TrsfOp")
8517         def ScaleAlongAxes(self, theObject, thePoint, theFactorX, theFactorY, theFactorZ, theCopy=False):
8518             """
8519             Scale the given object by different factors along coordinate axes.
8520
8521             Parameters:
8522                 theObject The object to be scaled.
8523                 thePoint Center point for scaling.
8524                             Passing None for it means scaling relatively the origin of global CS.
8525                 theFactorX,theFactorY,theFactorZ Scaling factors along each axis.
8526                 theCopy Flag used to scale object itself or create a copy.
8527
8528             Returns:
8529                 Scaled theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
8530                 new GEOM.GEOM_Object, containing the scaled object if theCopy flag is True.
8531             """
8532             # Example: see GEOM_TestAll.py
8533             theFactorX, theFactorY, theFactorZ, Parameters = ParseParameters(theFactorX, theFactorY, theFactorZ)
8534             if theCopy:
8535                 anObj = self.TrsfOp.ScaleShapeAlongAxesCopy(theObject, thePoint,
8536                                                             theFactorX, theFactorY, theFactorZ)
8537             else:
8538                 anObj = self.TrsfOp.ScaleShapeAlongAxes(theObject, thePoint,
8539                                                         theFactorX, theFactorY, theFactorZ)
8540             RaiseIfFailed("ScaleAlongAxes", self.TrsfOp)
8541             anObj.SetParameters(Parameters)
8542             return anObj
8543
8544         ## Scale the given object by different factors along coordinate axes,
8545         #  creating its copy before the scaling.
8546         #  @param theObject The object to be scaled.
8547         #  @param thePoint Center point for scaling.
8548         #                  Passing None for it means scaling relatively the origin of global CS.
8549         #  @param theFactorX,theFactorY,theFactorZ Scaling factors along each axis.
8550         #  @param theName Object name; when specified, this parameter is used
8551         #         for result publication in the study. Otherwise, if automatic
8552         #         publication is switched on, default value is used for result name.
8553         #
8554         #  @return New GEOM.GEOM_Object, containing the scaled shape.
8555         #
8556         #  @ref swig_scale "Example"
8557         @ManageTransactions("TrsfOp")
8558         def MakeScaleAlongAxes(self, theObject, thePoint, theFactorX, theFactorY, theFactorZ, theName=None):
8559             """
8560             Scale the given object by different factors along coordinate axes,
8561             creating its copy before the scaling.
8562
8563             Parameters:
8564                 theObject The object to be scaled.
8565                 thePoint Center point for scaling.
8566                             Passing None for it means scaling relatively the origin of global CS.
8567                 theFactorX,theFactorY,theFactorZ Scaling factors along each axis.
8568                 theName Object name; when specified, this parameter is used
8569                         for result publication in the study. Otherwise, if automatic
8570                         publication is switched on, default value is used for result name.
8571
8572             Returns:
8573                 New GEOM.GEOM_Object, containing the scaled shape.
8574             """
8575             # Example: see GEOM_TestAll.py
8576             theFactorX, theFactorY, theFactorZ, Parameters = ParseParameters(theFactorX, theFactorY, theFactorZ)
8577             anObj = self.TrsfOp.ScaleShapeAlongAxesCopy(theObject, thePoint,
8578                                                         theFactorX, theFactorY, theFactorZ)
8579             RaiseIfFailed("MakeScaleAlongAxes", self.TrsfOp)
8580             anObj.SetParameters(Parameters)
8581             self._autoPublish(anObj, theName, "scaled")
8582             return anObj
8583
8584         ## Mirror an object relatively the given plane.
8585         #  @param theObject The object to be mirrored.
8586         #  @param thePlane Plane of symmetry.
8587         #  @param theCopy Flag used to mirror object itself or create a copy.
8588         #  @return Mirrored @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
8589         #  new GEOM.GEOM_Object, containing the mirrored object if @a theCopy flag is @c True.
8590         @ManageTransactions("TrsfOp")
8591         def MirrorByPlane(self, theObject, thePlane, theCopy=False):
8592             """
8593             Mirror an object relatively the given plane.
8594
8595             Parameters:
8596                 theObject The object to be mirrored.
8597                 thePlane Plane of symmetry.
8598                 theCopy Flag used to mirror object itself or create a copy.
8599
8600             Returns:
8601                 Mirrored theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
8602                 new GEOM.GEOM_Object, containing the mirrored object if theCopy flag is True.
8603             """
8604             if theCopy:
8605                 anObj = self.TrsfOp.MirrorPlaneCopy(theObject, thePlane)
8606             else:
8607                 anObj = self.TrsfOp.MirrorPlane(theObject, thePlane)
8608             RaiseIfFailed("MirrorByPlane", self.TrsfOp)
8609             return anObj
8610
8611         ## Create an object, symmetrical
8612         #  to the given one relatively the given plane.
8613         #  @param theObject The object to be mirrored.
8614         #  @param thePlane Plane of symmetry.
8615         #  @param theName Object name; when specified, this parameter is used
8616         #         for result publication in the study. Otherwise, if automatic
8617         #         publication is switched on, default value is used for result name.
8618         #
8619         #  @return New GEOM.GEOM_Object, containing the mirrored shape.
8620         #
8621         #  @ref tui_mirror "Example"
8622         @ManageTransactions("TrsfOp")
8623         def MakeMirrorByPlane(self, theObject, thePlane, theName=None):
8624             """
8625             Create an object, symmetrical to the given one relatively the given plane.
8626
8627             Parameters:
8628                 theObject The object to be mirrored.
8629                 thePlane Plane of symmetry.
8630                 theName Object name; when specified, this parameter is used
8631                         for result publication in the study. Otherwise, if automatic
8632                         publication is switched on, default value is used for result name.
8633
8634             Returns:
8635                 New GEOM.GEOM_Object, containing the mirrored shape.
8636             """
8637             # Example: see GEOM_TestAll.py
8638             anObj = self.TrsfOp.MirrorPlaneCopy(theObject, thePlane)
8639             RaiseIfFailed("MirrorPlaneCopy", self.TrsfOp)
8640             self._autoPublish(anObj, theName, "mirrored")
8641             return anObj
8642
8643         ## Mirror an object relatively the given axis.
8644         #  @param theObject The object to be mirrored.
8645         #  @param theAxis Axis of symmetry.
8646         #  @param theCopy Flag used to mirror object itself or create a copy.
8647         #  @return Mirrored @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
8648         #  new GEOM.GEOM_Object, containing the mirrored object if @a theCopy flag is @c True.
8649         @ManageTransactions("TrsfOp")
8650         def MirrorByAxis(self, theObject, theAxis, theCopy=False):
8651             """
8652             Mirror an object relatively the given axis.
8653
8654             Parameters:
8655                 theObject The object to be mirrored.
8656                 theAxis Axis of symmetry.
8657                 theCopy Flag used to mirror object itself or create a copy.
8658
8659             Returns:
8660                 Mirrored theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
8661                 new GEOM.GEOM_Object, containing the mirrored object if theCopy flag is True.
8662             """
8663             if theCopy:
8664                 anObj = self.TrsfOp.MirrorAxisCopy(theObject, theAxis)
8665             else:
8666                 anObj = self.TrsfOp.MirrorAxis(theObject, theAxis)
8667             RaiseIfFailed("MirrorByAxis", self.TrsfOp)
8668             return anObj
8669
8670         ## Create an object, symmetrical
8671         #  to the given one relatively the given axis.
8672         #  @param theObject The object to be mirrored.
8673         #  @param theAxis Axis of symmetry.
8674         #  @param theName Object name; when specified, this parameter is used
8675         #         for result publication in the study. Otherwise, if automatic
8676         #         publication is switched on, default value is used for result name.
8677         #
8678         #  @return New GEOM.GEOM_Object, containing the mirrored shape.
8679         #
8680         #  @ref tui_mirror "Example"
8681         @ManageTransactions("TrsfOp")
8682         def MakeMirrorByAxis(self, theObject, theAxis, theName=None):
8683             """
8684             Create an object, symmetrical to the given one relatively the given axis.
8685
8686             Parameters:
8687                 theObject The object to be mirrored.
8688                 theAxis Axis of symmetry.
8689                 theName Object name; when specified, this parameter is used
8690                         for result publication in the study. Otherwise, if automatic
8691                         publication is switched on, default value is used for result name.
8692
8693             Returns:
8694                 New GEOM.GEOM_Object, containing the mirrored shape.
8695             """
8696             # Example: see GEOM_TestAll.py
8697             anObj = self.TrsfOp.MirrorAxisCopy(theObject, theAxis)
8698             RaiseIfFailed("MirrorAxisCopy", self.TrsfOp)
8699             self._autoPublish(anObj, theName, "mirrored")
8700             return anObj
8701
8702         ## Mirror an object relatively the given point.
8703         #  @param theObject The object to be mirrored.
8704         #  @param thePoint Point of symmetry.
8705         #  @param theCopy Flag used to mirror object itself or create a copy.
8706         #  @return Mirrored @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
8707         #  new GEOM.GEOM_Object, containing the mirrored object if @a theCopy flag is @c True.
8708         @ManageTransactions("TrsfOp")
8709         def MirrorByPoint(self, theObject, thePoint, theCopy=False):
8710             """
8711             Mirror an object relatively the given point.
8712
8713             Parameters:
8714                 theObject The object to be mirrored.
8715                 thePoint Point of symmetry.
8716                 theCopy Flag used to mirror object itself or create a copy.
8717
8718             Returns:
8719                 Mirrored theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
8720                 new GEOM.GEOM_Object, containing the mirrored object if theCopy flag is True.
8721             """
8722             # Example: see GEOM_TestAll.py
8723             if theCopy:
8724                 anObj = self.TrsfOp.MirrorPointCopy(theObject, thePoint)
8725             else:
8726                 anObj = self.TrsfOp.MirrorPoint(theObject, thePoint)
8727             RaiseIfFailed("MirrorByPoint", self.TrsfOp)
8728             return anObj
8729
8730         ## Create an object, symmetrical
8731         #  to the given one relatively the given point.
8732         #  @param theObject The object to be mirrored.
8733         #  @param thePoint Point of symmetry.
8734         #  @param theName Object name; when specified, this parameter is used
8735         #         for result publication in the study. Otherwise, if automatic
8736         #         publication is switched on, default value is used for result name.
8737         #
8738         #  @return New GEOM.GEOM_Object, containing the mirrored shape.
8739         #
8740         #  @ref tui_mirror "Example"
8741         @ManageTransactions("TrsfOp")
8742         def MakeMirrorByPoint(self, theObject, thePoint, theName=None):
8743             """
8744             Create an object, symmetrical
8745             to the given one relatively the given point.
8746
8747             Parameters:
8748                 theObject The object to be mirrored.
8749                 thePoint Point of symmetry.
8750                 theName Object name; when specified, this parameter is used
8751                         for result publication in the study. Otherwise, if automatic
8752                         publication is switched on, default value is used for result name.
8753
8754             Returns:
8755                 New GEOM.GEOM_Object, containing the mirrored shape.
8756             """
8757             # Example: see GEOM_TestAll.py
8758             anObj = self.TrsfOp.MirrorPointCopy(theObject, thePoint)
8759             RaiseIfFailed("MirrorPointCopy", self.TrsfOp)
8760             self._autoPublish(anObj, theName, "mirrored")
8761             return anObj
8762
8763         ## Modify the location of the given object.
8764         #  @param theObject The object to be displaced.
8765         #  @param theStartLCS Coordinate system to perform displacement from it.\n
8766         #                     If \a theStartLCS is NULL, displacement
8767         #                     will be performed from global CS.\n
8768         #                     If \a theObject itself is used as \a theStartLCS,
8769         #                     its location will be changed to \a theEndLCS.
8770         #  @param theEndLCS Coordinate system to perform displacement to it.
8771         #  @param theCopy Flag used to displace object itself or create a copy.
8772         #  @return Displaced @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
8773         #  new GEOM.GEOM_Object, containing the displaced object if @a theCopy flag is @c True.
8774         @ManageTransactions("TrsfOp")
8775         def Position(self, theObject, theStartLCS, theEndLCS, theCopy=False):
8776             """
8777             Modify the Location of the given object by LCS, creating its copy before the setting.
8778
8779             Parameters:
8780                 theObject The object to be displaced.
8781                 theStartLCS Coordinate system to perform displacement from it.
8782                             If theStartLCS is NULL, displacement
8783                             will be performed from global CS.
8784                             If theObject itself is used as theStartLCS,
8785                             its location will be changed to theEndLCS.
8786                 theEndLCS Coordinate system to perform displacement to it.
8787                 theCopy Flag used to displace object itself or create a copy.
8788
8789             Returns:
8790                 Displaced theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
8791                 new GEOM.GEOM_Object, containing the displaced object if theCopy flag is True.
8792             """
8793             # Example: see GEOM_TestAll.py
8794             if theCopy:
8795                 anObj = self.TrsfOp.PositionShapeCopy(theObject, theStartLCS, theEndLCS)
8796             else:
8797                 anObj = self.TrsfOp.PositionShape(theObject, theStartLCS, theEndLCS)
8798             RaiseIfFailed("Displace", self.TrsfOp)
8799             return anObj
8800
8801         ## Modify the Location of the given object by LCS,
8802         #  creating its copy before the setting.
8803         #  @param theObject The object to be displaced.
8804         #  @param theStartLCS Coordinate system to perform displacement from it.\n
8805         #                     If \a theStartLCS is NULL, displacement
8806         #                     will be performed from global CS.\n
8807         #                     If \a theObject itself is used as \a theStartLCS,
8808         #                     its location will be changed to \a theEndLCS.
8809         #  @param theEndLCS Coordinate system to perform displacement to it.
8810         #  @param theName Object name; when specified, this parameter is used
8811         #         for result publication in the study. Otherwise, if automatic
8812         #         publication is switched on, default value is used for result name.
8813         #
8814         #  @return New GEOM.GEOM_Object, containing the displaced shape.
8815         #
8816         #  @ref tui_modify_location "Example"
8817         @ManageTransactions("TrsfOp")
8818         def MakePosition(self, theObject, theStartLCS, theEndLCS, theName=None):
8819             """
8820             Modify the Location of the given object by LCS, creating its copy before the setting.
8821
8822             Parameters:
8823                 theObject The object to be displaced.
8824                 theStartLCS Coordinate system to perform displacement from it.
8825                             If theStartLCS is NULL, displacement
8826                             will be performed from global CS.
8827                             If theObject itself is used as theStartLCS,
8828                             its location will be changed to theEndLCS.
8829                 theEndLCS Coordinate system to perform displacement to it.
8830                 theName Object name; when specified, this parameter is used
8831                         for result publication in the study. Otherwise, if automatic
8832                         publication is switched on, default value is used for result name.
8833
8834             Returns:
8835                 New GEOM.GEOM_Object, containing the displaced shape.
8836
8837             Example of usage:
8838                 # create local coordinate systems
8839                 cs1 = geompy.MakeMarker( 0, 0, 0, 1,0,0, 0,1,0)
8840                 cs2 = geompy.MakeMarker(30,40,40, 1,0,0, 0,1,0)
8841                 # modify the location of the given object
8842                 position = geompy.MakePosition(cylinder, cs1, cs2)
8843             """
8844             # Example: see GEOM_TestAll.py
8845             anObj = self.TrsfOp.PositionShapeCopy(theObject, theStartLCS, theEndLCS)
8846             RaiseIfFailed("PositionShapeCopy", self.TrsfOp)
8847             self._autoPublish(anObj, theName, "displaced")
8848             return anObj
8849
8850         ## Modify the Location of the given object by Path.
8851         #  @param  theObject The object to be displaced.
8852         #  @param  thePath Wire or Edge along that the object will be translated.
8853         #  @param  theDistance progress of Path (0 = start location, 1 = end of path location).
8854         #  @param  theCopy is to create a copy objects if true.
8855         #  @param  theReverse  0 - for usual direction, 1 - to reverse path direction.
8856         #  @return Displaced @a theObject (GEOM.GEOM_Object) if @a theCopy is @c False or
8857         #          new GEOM.GEOM_Object, containing the displaced shape if @a theCopy is @c True.
8858         #
8859         #  @ref tui_modify_location "Example"
8860         @ManageTransactions("TrsfOp")
8861         def PositionAlongPath(self,theObject, thePath, theDistance, theCopy, theReverse):
8862             """
8863             Modify the Location of the given object by Path.
8864
8865             Parameters:
8866                  theObject The object to be displaced.
8867                  thePath Wire or Edge along that the object will be translated.
8868                  theDistance progress of Path (0 = start location, 1 = end of path location).
8869                  theCopy is to create a copy objects if true.
8870                  theReverse  0 - for usual direction, 1 - to reverse path direction.
8871
8872             Returns:
8873                  Displaced theObject (GEOM.GEOM_Object) if theCopy is False or
8874                  new GEOM.GEOM_Object, containing the displaced shape if theCopy is True.
8875
8876             Example of usage:
8877                 position = geompy.PositionAlongPath(cylinder, circle, 0.75, 1, 1)
8878             """
8879             # Example: see GEOM_TestAll.py
8880             anObj = self.TrsfOp.PositionAlongPath(theObject, thePath, theDistance, theCopy, theReverse)
8881             RaiseIfFailed("PositionAlongPath", self.TrsfOp)
8882             return anObj
8883
8884         ## Modify the Location of the given object by Path, creating its copy before the operation.
8885         #  @param theObject The object to be displaced.
8886         #  @param thePath Wire or Edge along that the object will be translated.
8887         #  @param theDistance progress of Path (0 = start location, 1 = end of path location).
8888         #  @param theReverse  0 - for usual direction, 1 - to reverse path direction.
8889         #  @param theName Object name; when specified, this parameter is used
8890         #         for result publication in the study. Otherwise, if automatic
8891         #         publication is switched on, default value is used for result name.
8892         #
8893         #  @return New GEOM.GEOM_Object, containing the displaced shape.
8894         @ManageTransactions("TrsfOp")
8895         def MakePositionAlongPath(self, theObject, thePath, theDistance, theReverse, theName=None):
8896             """
8897             Modify the Location of the given object by Path, creating its copy before the operation.
8898
8899             Parameters:
8900                  theObject The object to be displaced.
8901                  thePath Wire or Edge along that the object will be translated.
8902                  theDistance progress of Path (0 = start location, 1 = end of path location).
8903                  theReverse  0 - for usual direction, 1 - to reverse path direction.
8904                  theName Object name; when specified, this parameter is used
8905                          for result publication in the study. Otherwise, if automatic
8906                          publication is switched on, default value is used for result name.
8907
8908             Returns:
8909                 New GEOM.GEOM_Object, containing the displaced shape.
8910             """
8911             # Example: see GEOM_TestAll.py
8912             anObj = self.TrsfOp.PositionAlongPath(theObject, thePath, theDistance, 1, theReverse)
8913             RaiseIfFailed("PositionAlongPath", self.TrsfOp)
8914             self._autoPublish(anObj, theName, "displaced")
8915             return anObj
8916
8917         ## Offset given shape.
8918         #  @param theObject The base object for the offset.
8919         #  @param theOffset Offset value.
8920         #  @param theCopy Flag used to offset object itself or create a copy.
8921         #  @return Modified @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
8922         #  new GEOM.GEOM_Object, containing the result of offset operation if @a theCopy flag is @c True.
8923         @ManageTransactions("TrsfOp")
8924         def Offset(self, theObject, theOffset, theCopy=False):
8925             """
8926             Offset given shape.
8927
8928             Parameters:
8929                 theObject The base object for the offset.
8930                 theOffset Offset value.
8931                 theCopy Flag used to offset object itself or create a copy.
8932
8933             Returns:
8934                 Modified theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
8935                 new GEOM.GEOM_Object, containing the result of offset operation if theCopy flag is True.
8936             """
8937             theOffset, Parameters = ParseParameters(theOffset)
8938             if theCopy:
8939                 anObj = self.TrsfOp.OffsetShapeCopy(theObject, theOffset)
8940             else:
8941                 anObj = self.TrsfOp.OffsetShape(theObject, theOffset)
8942             RaiseIfFailed("Offset", self.TrsfOp)
8943             anObj.SetParameters(Parameters)
8944             return anObj
8945
8946         ## Create new object as offset of the given one.
8947         #  @param theObject The base object for the offset.
8948         #  @param theOffset Offset value.
8949         #  @param theName Object name; when specified, this parameter is used
8950         #         for result publication in the study. Otherwise, if automatic
8951         #         publication is switched on, default value is used for result name.
8952         #
8953         #  @return New GEOM.GEOM_Object, containing the offset object.
8954         #
8955         #  @ref tui_offset "Example"
8956         @ManageTransactions("TrsfOp")
8957         def MakeOffset(self, theObject, theOffset, theName=None):
8958             """
8959             Create new object as offset of the given one.
8960
8961             Parameters:
8962                 theObject The base object for the offset.
8963                 theOffset Offset value.
8964                 theName Object name; when specified, this parameter is used
8965                         for result publication in the study. Otherwise, if automatic
8966                         publication is switched on, default value is used for result name.
8967
8968             Returns:
8969                 New GEOM.GEOM_Object, containing the offset object.
8970
8971             Example of usage:
8972                  box = geompy.MakeBox(20, 20, 20, 200, 200, 200)
8973                  # create a new object as offset of the given object
8974                  offset = geompy.MakeOffset(box, 70.)
8975             """
8976             # Example: see GEOM_TestAll.py
8977             theOffset, Parameters = ParseParameters(theOffset)
8978             anObj = self.TrsfOp.OffsetShapeCopy(theObject, theOffset)
8979             RaiseIfFailed("OffsetShapeCopy", self.TrsfOp)
8980             anObj.SetParameters(Parameters)
8981             self._autoPublish(anObj, theName, "offset")
8982             return anObj
8983
8984         ## Create new object as projection of the given one on another.
8985         #  @param theSource The source object for the projection. It can be a point, edge or wire.
8986         #         Edge and wire are acceptable if @a theTarget is a face.
8987         #  @param theTarget The target object. It can be planar or cylindrical face, edge or wire.
8988         #  @param theName Object name; when specified, this parameter is used
8989         #         for result publication in the study. Otherwise, if automatic
8990         #         publication is switched on, default value is used for result name.
8991         #
8992         #  @return New GEOM.GEOM_Object, containing the projection.
8993         #
8994         #  @ref tui_projection "Example"
8995         @ManageTransactions("TrsfOp")
8996         def MakeProjection(self, theSource, theTarget, theName=None):
8997             """
8998             Create new object as projection of the given one on another.
8999
9000             Parameters:
9001                 theSource The source object for the projection. It can be a point, edge or wire.
9002                           Edge and wire are acceptable if theTarget is a face.
9003                 theTarget The target object. It can be planar or cylindrical face, edge or wire.
9004                 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             Returns:
9009                 New GEOM.GEOM_Object, containing the projection.
9010             """
9011             # Example: see GEOM_TestAll.py
9012             anObj = self.TrsfOp.ProjectShapeCopy(theSource, theTarget)
9013             RaiseIfFailed("ProjectShapeCopy", self.TrsfOp)
9014             self._autoPublish(anObj, theName, "projection")
9015             return anObj
9016
9017         ## Create a projection projection of the given point on a wire or an edge.
9018         #  If there are no solutions or there are 2 or more solutions It throws an
9019         #  exception.
9020         #  @param thePoint the point to be projected.
9021         #  @param theWire the wire. The edge is accepted as well.
9022         #  @param 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         #  @return [\a u, \a PointOnEdge, \a EdgeInWireIndex]
9027         #  \n \a u: The parameter of projection point on edge.
9028         #  \n \a PointOnEdge: The projection point.
9029         #  \n \a EdgeInWireIndex: The index of an edge in a wire.
9030         #
9031         #  @ref tui_projection "Example"
9032         @ManageTransactions("TrsfOp")
9033         def MakeProjectionOnWire(self, thePoint, theWire, theName=None):
9034             """
9035             Create a projection projection of the given point on a wire or an edge.
9036             If there are no solutions or there are 2 or more solutions It throws an
9037             exception.
9038
9039             Parameters:
9040                 thePoint the point to be projected.
9041                 theWire the wire. The edge is accepted as well.
9042                 theName Object name; when specified, this parameter is used
9043                         for result publication in the study. Otherwise, if automatic
9044                         publication is switched on, default value is used for result name.
9045
9046             Returns:
9047                 [u, PointOnEdge, EdgeInWireIndex]
9048                  u: The parameter of projection point on edge.
9049                  PointOnEdge: The projection point.
9050                  EdgeInWireIndex: The index of an edge in a wire.
9051             """
9052             # Example: see GEOM_TestAll.py
9053             anObj = self.TrsfOp.ProjectPointOnWire(thePoint, theWire)
9054             RaiseIfFailed("ProjectPointOnWire", self.TrsfOp)
9055             self._autoPublish(anObj[1], theName, "projection")
9056             return anObj
9057
9058         # -----------------------------------------------------------------------------
9059         # Patterns
9060         # -----------------------------------------------------------------------------
9061
9062         ## Translate the given object along the given vector a given number times
9063         #  @param theObject The object to be translated.
9064         #  @param theVector Direction of the translation. DX if None.
9065         #  @param theStep Distance to translate on.
9066         #  @param theNbTimes Quantity of translations to be done.
9067         #  @param theName Object name; when specified, this parameter is used
9068         #         for result publication in the study. Otherwise, if automatic
9069         #         publication is switched on, default value is used for result name.
9070         #
9071         #  @return New GEOM.GEOM_Object, containing compound of all
9072         #          the shapes, obtained after each translation.
9073         #
9074         #  @ref tui_multi_translation "Example"
9075         @ManageTransactions("TrsfOp")
9076         def MakeMultiTranslation1D(self, theObject, theVector, theStep, theNbTimes, theName=None):
9077             """
9078             Translate the given object along the given vector a given number times
9079
9080             Parameters:
9081                 theObject The object to be translated.
9082                 theVector Direction of the translation. DX if None.
9083                 theStep Distance to translate on.
9084                 theNbTimes Quantity of translations to be done.
9085                 theName Object name; when specified, this parameter is used
9086                         for result publication in the study. Otherwise, if automatic
9087                         publication is switched on, default value is used for result name.
9088
9089             Returns:
9090                 New GEOM.GEOM_Object, containing compound of all
9091                 the shapes, obtained after each translation.
9092
9093             Example of usage:
9094                 r1d = geompy.MakeMultiTranslation1D(prism, vect, 20, 4)
9095             """
9096             # Example: see GEOM_TestAll.py
9097             theStep, theNbTimes, Parameters = ParseParameters(theStep, theNbTimes)
9098             anObj = self.TrsfOp.MultiTranslate1D(theObject, theVector, theStep, theNbTimes)
9099             RaiseIfFailed("MultiTranslate1D", self.TrsfOp)
9100             anObj.SetParameters(Parameters)
9101             self._autoPublish(anObj, theName, "multitranslation")
9102             return anObj
9103
9104         ## Conseqently apply two specified translations to theObject specified number of times.
9105         #  @param theObject The object to be translated.
9106         #  @param theVector1 Direction of the first translation. DX if None.
9107         #  @param theStep1 Step of the first translation.
9108         #  @param theNbTimes1 Quantity of translations to be done along theVector1.
9109         #  @param theVector2 Direction of the second translation. DY if None.
9110         #  @param theStep2 Step of the second translation.
9111         #  @param theNbTimes2 Quantity of translations to be done along theVector2.
9112         #  @param theName Object name; when specified, this parameter is used
9113         #         for result publication in the study. Otherwise, if automatic
9114         #         publication is switched on, default value is used for result name.
9115         #
9116         #  @return New GEOM.GEOM_Object, containing compound of all
9117         #          the shapes, obtained after each translation.
9118         #
9119         #  @ref tui_multi_translation "Example"
9120         @ManageTransactions("TrsfOp")
9121         def MakeMultiTranslation2D(self, theObject, theVector1, theStep1, theNbTimes1,
9122                                    theVector2, theStep2, theNbTimes2, theName=None):
9123             """
9124             Conseqently apply two specified translations to theObject specified number of times.
9125
9126             Parameters:
9127                 theObject The object to be translated.
9128                 theVector1 Direction of the first translation. DX if None.
9129                 theStep1 Step of the first translation.
9130                 theNbTimes1 Quantity of translations to be done along theVector1.
9131                 theVector2 Direction of the second translation. DY if None.
9132                 theStep2 Step of the second translation.
9133                 theNbTimes2 Quantity of translations to be done along theVector2.
9134                 theName Object name; when specified, this parameter is used
9135                         for result publication in the study. Otherwise, if automatic
9136                         publication is switched on, default value is used for result name.
9137
9138             Returns:
9139                 New GEOM.GEOM_Object, containing compound of all
9140                 the shapes, obtained after each translation.
9141
9142             Example of usage:
9143                 tr2d = geompy.MakeMultiTranslation2D(prism, vect1, 20, 4, vect2, 80, 3)
9144             """
9145             # Example: see GEOM_TestAll.py
9146             theStep1,theNbTimes1,theStep2,theNbTimes2, Parameters = ParseParameters(theStep1,theNbTimes1,theStep2,theNbTimes2)
9147             anObj = self.TrsfOp.MultiTranslate2D(theObject, theVector1, theStep1, theNbTimes1,
9148                                                  theVector2, theStep2, theNbTimes2)
9149             RaiseIfFailed("MultiTranslate2D", self.TrsfOp)
9150             anObj.SetParameters(Parameters)
9151             self._autoPublish(anObj, theName, "multitranslation")
9152             return anObj
9153
9154         ## Rotate the given object around the given axis a given number times.
9155         #  Rotation angle will be 2*PI/theNbTimes.
9156         #  @param theObject The object to be rotated.
9157         #  @param theAxis The rotation axis. DZ if None.
9158         #  @param theNbTimes Quantity of rotations to be done.
9159         #  @param theName Object name; when specified, this parameter is used
9160         #         for result publication in the study. Otherwise, if automatic
9161         #         publication is switched on, default value is used for result name.
9162         #
9163         #  @return New GEOM.GEOM_Object, containing compound of all the
9164         #          shapes, obtained after each rotation.
9165         #
9166         #  @ref tui_multi_rotation "Example"
9167         @ManageTransactions("TrsfOp")
9168         def MultiRotate1DNbTimes (self, theObject, theAxis, theNbTimes, theName=None):
9169             """
9170             Rotate the given object around the given axis a given number times.
9171             Rotation angle will be 2*PI/theNbTimes.
9172
9173             Parameters:
9174                 theObject The object to be rotated.
9175                 theAxis The rotation axis. DZ if None.
9176                 theNbTimes Quantity of rotations to be done.
9177                 theName Object name; when specified, this parameter is used
9178                         for result publication in the study. Otherwise, if automatic
9179                         publication is switched on, default value is used for result name.
9180
9181             Returns:
9182                 New GEOM.GEOM_Object, containing compound of all the
9183                 shapes, obtained after each rotation.
9184
9185             Example of usage:
9186                 rot1d = geompy.MultiRotate1DNbTimes(prism, vect, 4)
9187             """
9188             # Example: see GEOM_TestAll.py
9189             theNbTimes, Parameters = ParseParameters(theNbTimes)
9190             anObj = self.TrsfOp.MultiRotate1D(theObject, theAxis, theNbTimes)
9191             RaiseIfFailed("MultiRotate1DNbTimes", self.TrsfOp)
9192             anObj.SetParameters(Parameters)
9193             self._autoPublish(anObj, theName, "multirotation")
9194             return anObj
9195
9196         ## Rotate the given object around the given axis
9197         #  a given number times on the given angle.
9198         #  @param theObject The object to be rotated.
9199         #  @param theAxis The rotation axis. DZ if None.
9200         #  @param theAngleStep Rotation angle in radians.
9201         #  @param theNbTimes Quantity of rotations to be done.
9202         #  @param theName Object name; when specified, this parameter is used
9203         #         for result publication in the study. Otherwise, if automatic
9204         #         publication is switched on, default value is used for result name.
9205         #
9206         #  @return New GEOM.GEOM_Object, containing compound of all the
9207         #          shapes, obtained after each rotation.
9208         #
9209         #  @ref tui_multi_rotation "Example"
9210         @ManageTransactions("TrsfOp")
9211         def MultiRotate1DByStep(self, theObject, theAxis, theAngleStep, theNbTimes, theName=None):
9212             """
9213             Rotate the given object around the given axis
9214             a given number times on the given angle.
9215
9216             Parameters:
9217                 theObject The object to be rotated.
9218                 theAxis The rotation axis. DZ if None.
9219                 theAngleStep Rotation angle in radians.
9220                 theNbTimes Quantity of rotations to be done.
9221                 theName Object name; when specified, this parameter is used
9222                         for result publication in the study. Otherwise, if automatic
9223                         publication is switched on, default value is used for result name.
9224
9225             Returns:
9226                 New GEOM.GEOM_Object, containing compound of all the
9227                 shapes, obtained after each rotation.
9228
9229             Example of usage:
9230                 rot1d = geompy.MultiRotate1DByStep(prism, vect, math.pi/4, 4)
9231             """
9232             # Example: see GEOM_TestAll.py
9233             theAngleStep, theNbTimes, Parameters = ParseParameters(theAngleStep, theNbTimes)
9234             anObj = self.TrsfOp.MultiRotate1DByStep(theObject, theAxis, theAngleStep, theNbTimes)
9235             RaiseIfFailed("MultiRotate1DByStep", self.TrsfOp)
9236             anObj.SetParameters(Parameters)
9237             self._autoPublish(anObj, theName, "multirotation")
9238             return anObj
9239
9240         ## Rotate the given object around the given axis a given
9241         #  number times and multi-translate each rotation result.
9242         #  Rotation angle will be 2*PI/theNbTimes1.
9243         #  Translation direction passes through center of gravity
9244         #  of rotated shape and its projection on the rotation axis.
9245         #  @param theObject The object to be rotated.
9246         #  @param theAxis Rotation axis. DZ if None.
9247         #  @param theNbTimes1 Quantity of rotations to be done.
9248         #  @param theRadialStep Translation distance.
9249         #  @param theNbTimes2 Quantity of translations to be done.
9250         #  @param theName Object name; when specified, this parameter is used
9251         #         for result publication in the study. Otherwise, if automatic
9252         #         publication is switched on, default value is used for result name.
9253         #
9254         #  @return New GEOM.GEOM_Object, containing compound of all the
9255         #          shapes, obtained after each transformation.
9256         #
9257         #  @ref tui_multi_rotation "Example"
9258         @ManageTransactions("TrsfOp")
9259         def MultiRotate2DNbTimes(self, theObject, theAxis, theNbTimes1, theRadialStep, theNbTimes2, theName=None):
9260             """
9261             Rotate the given object around the
9262             given axis on the given angle a given number
9263             times and multi-translate each rotation result.
9264             Translation direction passes through center of gravity
9265             of rotated shape and its projection on the rotation axis.
9266
9267             Parameters:
9268                 theObject The object to be rotated.
9269                 theAxis Rotation axis. DZ if None.
9270                 theNbTimes1 Quantity of rotations to be done.
9271                 theRadialStep Translation distance.
9272                 theNbTimes2 Quantity of translations to be done.
9273                 theName Object name; when specified, this parameter is used
9274                         for result publication in the study. Otherwise, if automatic
9275                         publication is switched on, default value is used for result name.
9276
9277             Returns:
9278                 New GEOM.GEOM_Object, containing compound of all the
9279                 shapes, obtained after each transformation.
9280
9281             Example of usage:
9282                 rot2d = geompy.MultiRotate2D(prism, vect, 60, 4, 50, 5)
9283             """
9284             # Example: see GEOM_TestAll.py
9285             theNbTimes1, theRadialStep, theNbTimes2, Parameters = ParseParameters(theNbTimes1, theRadialStep, theNbTimes2)
9286             anObj = self.TrsfOp.MultiRotate2DNbTimes(theObject, theAxis, theNbTimes1, theRadialStep, theNbTimes2)
9287             RaiseIfFailed("MultiRotate2DNbTimes", self.TrsfOp)
9288             anObj.SetParameters(Parameters)
9289             self._autoPublish(anObj, theName, "multirotation")
9290             return anObj
9291
9292         ## Rotate the given object around the
9293         #  given axis on the given angle a given number
9294         #  times and multi-translate each rotation result.
9295         #  Translation direction passes through center of gravity
9296         #  of rotated shape and its projection on the rotation axis.
9297         #  @param theObject The object to be rotated.
9298         #  @param theAxis Rotation axis. DZ if None.
9299         #  @param theAngleStep Rotation angle in radians.
9300         #  @param theNbTimes1 Quantity of rotations to be done.
9301         #  @param theRadialStep Translation distance.
9302         #  @param theNbTimes2 Quantity of translations to be done.
9303         #  @param theName Object name; when specified, this parameter is used
9304         #         for result publication in the study. Otherwise, if automatic
9305         #         publication is switched on, default value is used for result name.
9306         #
9307         #  @return New GEOM.GEOM_Object, containing compound of all the
9308         #          shapes, obtained after each transformation.
9309         #
9310         #  @ref tui_multi_rotation "Example"
9311         @ManageTransactions("TrsfOp")
9312         def MultiRotate2DByStep (self, theObject, theAxis, theAngleStep, theNbTimes1, theRadialStep, theNbTimes2, theName=None):
9313             """
9314             Rotate the given object around the
9315             given axis on the given angle a given number
9316             times and multi-translate each rotation result.
9317             Translation direction passes through center of gravity
9318             of rotated shape and its projection on the rotation axis.
9319
9320             Parameters:
9321                 theObject The object to be rotated.
9322                 theAxis Rotation axis. DZ if None.
9323                 theAngleStep Rotation angle in radians.
9324                 theNbTimes1 Quantity of rotations to be done.
9325                 theRadialStep Translation distance.
9326                 theNbTimes2 Quantity of translations to be done.
9327                 theName Object name; when specified, this parameter is used
9328                         for result publication in the study. Otherwise, if automatic
9329                         publication is switched on, default value is used for result name.
9330
9331             Returns:
9332                 New GEOM.GEOM_Object, containing compound of all the
9333                 shapes, obtained after each transformation.
9334
9335             Example of usage:
9336                 rot2d = geompy.MultiRotate2D(prism, vect, math.pi/3, 4, 50, 5)
9337             """
9338             # Example: see GEOM_TestAll.py
9339             theAngleStep, theNbTimes1, theRadialStep, theNbTimes2, Parameters = ParseParameters(theAngleStep, theNbTimes1, theRadialStep, theNbTimes2)
9340             anObj = self.TrsfOp.MultiRotate2DByStep(theObject, theAxis, theAngleStep, theNbTimes1, theRadialStep, theNbTimes2)
9341             RaiseIfFailed("MultiRotate2DByStep", self.TrsfOp)
9342             anObj.SetParameters(Parameters)
9343             self._autoPublish(anObj, theName, "multirotation")
9344             return anObj
9345
9346         ## The same, as MultiRotate1DNbTimes(), but axis is given by direction and point
9347         #
9348         #  @ref swig_MakeMultiRotation "Example"
9349         def MakeMultiRotation1DNbTimes(self, aShape, aDir, aPoint, aNbTimes, theName=None):
9350             """
9351             The same, as geompy.MultiRotate1DNbTimes, but axis is given by direction and point
9352
9353             Example of usage:
9354                 pz = geompy.MakeVertex(0, 0, 100)
9355                 vy = geompy.MakeVectorDXDYDZ(0, 100, 0)
9356                 MultiRot1D = geompy.MakeMultiRotation1DNbTimes(prism, vy, pz, 6)
9357             """
9358             # Example: see GEOM_TestOthers.py
9359             aVec = self.MakeLine(aPoint,aDir)
9360             # note: auto-publishing is done in self.MultiRotate1D()
9361             anObj = self.MultiRotate1DNbTimes(aShape, aVec, aNbTimes, theName)
9362             return anObj
9363
9364         ## The same, as MultiRotate1DByStep(), but axis is given by direction and point
9365         #
9366         #  @ref swig_MakeMultiRotation "Example"
9367         def MakeMultiRotation1DByStep(self, aShape, aDir, aPoint, anAngle, aNbTimes, theName=None):
9368             """
9369             The same, as geompy.MultiRotate1D, but axis is given by direction and point
9370
9371             Example of usage:
9372                 pz = geompy.MakeVertex(0, 0, 100)
9373                 vy = geompy.MakeVectorDXDYDZ(0, 100, 0)
9374                 MultiRot1D = geompy.MakeMultiRotation1DByStep(prism, vy, pz, math.pi/3, 6)
9375             """
9376             # Example: see GEOM_TestOthers.py
9377             aVec = self.MakeLine(aPoint,aDir)
9378             # note: auto-publishing is done in self.MultiRotate1D()
9379             anObj = self.MultiRotate1DByStep(aShape, aVec, anAngle, aNbTimes, theName)
9380             return anObj
9381
9382         ## The same, as MultiRotate2DNbTimes(), but axis is given by direction and point
9383         #
9384         #  @ref swig_MakeMultiRotation "Example"
9385         def MakeMultiRotation2DNbTimes(self, aShape, aDir, aPoint, nbtimes1, aStep, nbtimes2, theName=None):
9386             """
9387             The same, as MultiRotate2DNbTimes(), but axis is given by direction and point
9388
9389             Example of usage:
9390                 pz = geompy.MakeVertex(0, 0, 100)
9391                 vy = geompy.MakeVectorDXDYDZ(0, 100, 0)
9392                 MultiRot2D = geompy.MakeMultiRotation2DNbTimes(f12, vy, pz, 6, 30, 3)
9393             """
9394             # Example: see GEOM_TestOthers.py
9395             aVec = self.MakeLine(aPoint,aDir)
9396             # note: auto-publishing is done in self.MultiRotate2DNbTimes()
9397             anObj = self.MultiRotate2DNbTimes(aShape, aVec, nbtimes1, aStep, nbtimes2, theName)
9398             return anObj
9399
9400         ## The same, as MultiRotate2DByStep(), but axis is given by direction and point
9401         #
9402         #  @ref swig_MakeMultiRotation "Example"
9403         def MakeMultiRotation2DByStep(self, aShape, aDir, aPoint, anAngle, nbtimes1, aStep, nbtimes2, theName=None):
9404             """
9405             The same, as MultiRotate2DByStep(), but axis is given by direction and point
9406
9407             Example of usage:
9408                 pz = geompy.MakeVertex(0, 0, 100)
9409                 vy = geompy.MakeVectorDXDYDZ(0, 100, 0)
9410                 MultiRot2D = geompy.MakeMultiRotation2DByStep(f12, vy, pz, math.pi/4, 6, 30, 3)
9411             """
9412             # Example: see GEOM_TestOthers.py
9413             aVec = self.MakeLine(aPoint,aDir)
9414             # note: auto-publishing is done in self.MultiRotate2D()
9415             anObj = self.MultiRotate2DByStep(aShape, aVec, anAngle, nbtimes1, aStep, nbtimes2, theName)
9416             return anObj
9417
9418         ##
9419         #  Compute a wire or a face that represents a projection of the source
9420         #  shape onto cylinder. The cylinder's coordinate system is the same
9421         #  as the global coordinate system.
9422         #
9423         #  @param theObject The object to be projected. It can be either
9424         #         a planar wire or a face.
9425         #  @param theRadius The radius of the cylinder.
9426         #  @param theStartAngle The starting angle in radians from
9427         #         the cylinder's X axis around Z axis. The angle from which
9428         #         the projection is started.
9429         #  @param theAngleLength The projection length angle in radians.
9430         #         The angle in which to project the total length of the wire.
9431         #         If it is negative the projection is not scaled and natural
9432         #         wire length is kept for the projection.
9433         #  @param theName Object name; when specified, this parameter is used
9434         #         for result publication in the study. Otherwise, if automatic
9435         #         publication is switched on, default value is used for result name.
9436         #
9437         #  @return New GEOM.GEOM_Object, containing the result shape. The result
9438         #         represents a wire or a face that represents a projection of
9439         #         the source shape onto a cylinder.
9440         #
9441         #  @ref tui_projection "Example"
9442         def MakeProjectionOnCylinder (self, theObject, theRadius,
9443                                       theStartAngle=0.0, theAngleLength=-1.0,
9444                                       theName=None):
9445             """
9446             Compute a wire or a face that represents a projection of the source
9447             shape onto cylinder. The cylinder's coordinate system is the same
9448             as the global coordinate system.
9449
9450             Parameters:
9451                 theObject The object to be projected. It can be either
9452                         a planar wire or a face.
9453                 theRadius The radius of the cylinder.
9454                 theStartAngle The starting angle in radians from the cylinder's X axis
9455                         around Z axis. The angle from which the projection is started.
9456                 theAngleLength The projection length angle in radians. The angle in which
9457                         to project the total length of the wire. If it is negative the
9458                         projection is not scaled and natural wire length is kept for
9459                         the projection.
9460                 theName Object name; when specified, this parameter is used
9461                         for result publication in the study. Otherwise, if automatic
9462                         publication is switched on, default value is used for result name.
9463
9464             Returns:
9465                 New GEOM.GEOM_Object, containing the result shape. The result
9466                 represents a wire or a face that represents a projection of
9467                 the source shape onto a cylinder.
9468             """
9469             # Example: see GEOM_TestAll.py
9470             flagStartAngle = False
9471             if isinstance(theStartAngle,str):
9472                 flagStartAngle = True
9473             flagAngleLength = False
9474             if isinstance(theAngleLength,str):
9475                 flagAngleLength = True
9476             theRadius, theStartAngle, theAngleLength, Parameters = ParseParameters(
9477               theRadius, theStartAngle, theAngleLength)
9478             if flagStartAngle:
9479                 theStartAngle = theStartAngle*math.pi/180.
9480             if flagAngleLength:
9481                 theAngleLength = theAngleLength*math.pi/180.
9482             anObj = self.TrsfOp.MakeProjectionOnCylinder(theObject, theRadius,
9483                 theStartAngle, theAngleLength)
9484             RaiseIfFailed("MakeProjectionOnCylinder", self.TrsfOp)
9485             anObj.SetParameters(Parameters)
9486             self._autoPublish(anObj, theName, "projection")
9487             return anObj
9488
9489         # end of l3_transform
9490         ## @}
9491
9492         ## @addtogroup l3_transform_d
9493         ## @{
9494
9495         ## Deprecated method. Use MultiRotate1DNbTimes instead.
9496         def MultiRotate1D(self, theObject, theAxis, theNbTimes, theName=None):
9497             """
9498             Deprecated method. Use MultiRotate1DNbTimes instead.
9499             """
9500             print "The method MultiRotate1D is DEPRECATED. Use MultiRotate1DNbTimes instead."
9501             return self.MultiRotate1DNbTimes(theObject, theAxis, theNbTimes, theName)
9502
9503         ## The same, as MultiRotate2DByStep(), but theAngle is in degrees.
9504         #  This method is DEPRECATED. Use MultiRotate2DByStep() instead.
9505         @ManageTransactions("TrsfOp")
9506         def MultiRotate2D(self, theObject, theAxis, theAngle, theNbTimes1, theStep, theNbTimes2, theName=None):
9507             """
9508             The same, as MultiRotate2DByStep(), but theAngle is in degrees.
9509             This method is DEPRECATED. Use MultiRotate2DByStep() instead.
9510
9511             Example of usage:
9512                 rot2d = geompy.MultiRotate2D(prism, vect, 60, 4, 50, 5)
9513             """
9514             print "The method MultiRotate2D is DEPRECATED. Use MultiRotate2DByStep instead."
9515             theAngle, theNbTimes1, theStep, theNbTimes2, Parameters = ParseParameters(theAngle, theNbTimes1, theStep, theNbTimes2)
9516             anObj = self.TrsfOp.MultiRotate2D(theObject, theAxis, theAngle, theNbTimes1, theStep, theNbTimes2)
9517             RaiseIfFailed("MultiRotate2D", self.TrsfOp)
9518             anObj.SetParameters(Parameters)
9519             self._autoPublish(anObj, theName, "multirotation")
9520             return anObj
9521
9522         ## The same, as MultiRotate1D(), but axis is given by direction and point
9523         #  This method is DEPRECATED. Use MakeMultiRotation1DNbTimes instead.
9524         def MakeMultiRotation1D(self, aShape, aDir, aPoint, aNbTimes, theName=None):
9525             """
9526             The same, as geompy.MultiRotate1D, but axis is given by direction and point.
9527             This method is DEPRECATED. Use MakeMultiRotation1DNbTimes instead.
9528
9529             Example of usage:
9530                 pz = geompy.MakeVertex(0, 0, 100)
9531                 vy = geompy.MakeVectorDXDYDZ(0, 100, 0)
9532                 MultiRot1D = geompy.MakeMultiRotation1D(prism, vy, pz, 6)
9533             """
9534             print "The method MakeMultiRotation1D is DEPRECATED. Use MakeMultiRotation1DNbTimes instead."
9535             aVec = self.MakeLine(aPoint,aDir)
9536             # note: auto-publishing is done in self.MultiRotate1D()
9537             anObj = self.MultiRotate1D(aShape, aVec, aNbTimes, theName)
9538             return anObj
9539
9540         ## The same, as MultiRotate2D(), but axis is given by direction and point
9541         #  This method is DEPRECATED. Use MakeMultiRotation2DByStep instead.
9542         def MakeMultiRotation2D(self, aShape, aDir, aPoint, anAngle, nbtimes1, aStep, nbtimes2, theName=None):
9543             """
9544             The same, as MultiRotate2D(), but axis is given by direction and point
9545             This method is DEPRECATED. Use MakeMultiRotation2DByStep instead.
9546
9547             Example of usage:
9548                 pz = geompy.MakeVertex(0, 0, 100)
9549                 vy = geompy.MakeVectorDXDYDZ(0, 100, 0)
9550                 MultiRot2D = geompy.MakeMultiRotation2D(f12, vy, pz, 45, 6, 30, 3)
9551             """
9552             print "The method MakeMultiRotation2D is DEPRECATED. Use MakeMultiRotation2DByStep instead."
9553             aVec = self.MakeLine(aPoint,aDir)
9554             # note: auto-publishing is done in self.MultiRotate2D()
9555             anObj = self.MultiRotate2D(aShape, aVec, anAngle, nbtimes1, aStep, nbtimes2, theName)
9556             return anObj
9557
9558         # end of l3_transform_d
9559         ## @}
9560
9561         ## @addtogroup l3_local
9562         ## @{
9563
9564         ## Perform a fillet on all edges of the given shape.
9565         #  @param theShape Shape, to perform fillet on.
9566         #  @param theR Fillet radius.
9567         #  @param theName Object name; when specified, this parameter is used
9568         #         for result publication in the study. Otherwise, if automatic
9569         #         publication is switched on, default value is used for result name.
9570         #
9571         #  @return New GEOM.GEOM_Object, containing the result shape.
9572         #
9573         #  @ref tui_fillet "Example 1"
9574         #  \n @ref swig_MakeFilletAll "Example 2"
9575         @ManageTransactions("LocalOp")
9576         def MakeFilletAll(self, theShape, theR, theName=None):
9577             """
9578             Perform a fillet on all edges of the given shape.
9579
9580             Parameters:
9581                 theShape Shape, to perform fillet on.
9582                 theR Fillet radius.
9583                 theName Object name; when specified, this parameter is used
9584                         for result publication in the study. Otherwise, if automatic
9585                         publication is switched on, default value is used for result name.
9586
9587             Returns:
9588                 New GEOM.GEOM_Object, containing the result shape.
9589
9590             Example of usage:
9591                filletall = geompy.MakeFilletAll(prism, 10.)
9592             """
9593             # Example: see GEOM_TestOthers.py
9594             theR,Parameters = ParseParameters(theR)
9595             anObj = self.LocalOp.MakeFilletAll(theShape, theR)
9596             RaiseIfFailed("MakeFilletAll", self.LocalOp)
9597             anObj.SetParameters(Parameters)
9598             self._autoPublish(anObj, theName, "fillet")
9599             return anObj
9600
9601         ## Perform a fillet on the specified edges/faces of the given shape
9602         #  @param theShape Shape, to perform fillet on.
9603         #  @param theR Fillet radius.
9604         #  @param theShapeType Type of shapes in <VAR>theListShapes</VAR> (see ShapeType())
9605         #  @param theListShapes Global indices of edges/faces to perform fillet on.
9606         #  @param 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         #  @note Global index of sub-shape can be obtained, using method GetSubShapeID().
9611         #
9612         #  @return New GEOM.GEOM_Object, containing the result shape.
9613         #
9614         #  @ref tui_fillet "Example"
9615         @ManageTransactions("LocalOp")
9616         def MakeFillet(self, theShape, theR, theShapeType, theListShapes, theName=None):
9617             """
9618             Perform a fillet on the specified edges/faces of the given shape
9619
9620             Parameters:
9621                 theShape Shape, to perform fillet on.
9622                 theR Fillet radius.
9623                 theShapeType Type of shapes in theListShapes (see geompy.ShapeTypes)
9624                 theListShapes Global indices of edges/faces to perform fillet on.
9625                 theName Object name; when specified, this parameter is used
9626                         for result publication in the study. Otherwise, if automatic
9627                         publication is switched on, default value is used for result name.
9628
9629             Note:
9630                 Global index of sub-shape can be obtained, using method geompy.GetSubShapeID
9631
9632             Returns:
9633                 New GEOM.GEOM_Object, containing the result shape.
9634
9635             Example of usage:
9636                 # get the list of IDs (IDList) for the fillet
9637                 prism_edges = geompy.SubShapeAllSortedCentres(prism, geompy.ShapeType["EDGE"])
9638                 IDlist_e = []
9639                 IDlist_e.append(geompy.GetSubShapeID(prism, prism_edges[0]))
9640                 IDlist_e.append(geompy.GetSubShapeID(prism, prism_edges[1]))
9641                 IDlist_e.append(geompy.GetSubShapeID(prism, prism_edges[2]))
9642                 # make a fillet on the specified edges of the given shape
9643                 fillet = geompy.MakeFillet(prism, 10., geompy.ShapeType["EDGE"], IDlist_e)
9644             """
9645             # Example: see GEOM_TestAll.py
9646             theR,Parameters = ParseParameters(theR)
9647             anObj = None
9648             if theShapeType == self.ShapeType["EDGE"]:
9649                 anObj = self.LocalOp.MakeFilletEdges(theShape, theR, theListShapes)
9650                 RaiseIfFailed("MakeFilletEdges", self.LocalOp)
9651             else:
9652                 anObj = self.LocalOp.MakeFilletFaces(theShape, theR, theListShapes)
9653                 RaiseIfFailed("MakeFilletFaces", self.LocalOp)
9654             anObj.SetParameters(Parameters)
9655             self._autoPublish(anObj, theName, "fillet")
9656             return anObj
9657
9658         ## The same that MakeFillet() but with two Fillet Radius R1 and R2
9659         @ManageTransactions("LocalOp")
9660         def MakeFilletR1R2(self, theShape, theR1, theR2, theShapeType, theListShapes, theName=None):
9661             """
9662             The same that geompy.MakeFillet but with two Fillet Radius R1 and R2
9663
9664             Example of usage:
9665                 # get the list of IDs (IDList) for the fillet
9666                 prism_edges = geompy.SubShapeAllSortedCentres(prism, geompy.ShapeType["EDGE"])
9667                 IDlist_e = []
9668                 IDlist_e.append(geompy.GetSubShapeID(prism, prism_edges[0]))
9669                 IDlist_e.append(geompy.GetSubShapeID(prism, prism_edges[1]))
9670                 IDlist_e.append(geompy.GetSubShapeID(prism, prism_edges[2]))
9671                 # make a fillet on the specified edges of the given shape
9672                 fillet = geompy.MakeFillet(prism, 10., 15., geompy.ShapeType["EDGE"], IDlist_e)
9673             """
9674             theR1,theR2,Parameters = ParseParameters(theR1,theR2)
9675             anObj = None
9676             if theShapeType == self.ShapeType["EDGE"]:
9677                 anObj = self.LocalOp.MakeFilletEdgesR1R2(theShape, theR1, theR2, theListShapes)
9678                 RaiseIfFailed("MakeFilletEdgesR1R2", self.LocalOp)
9679             else:
9680                 anObj = self.LocalOp.MakeFilletFacesR1R2(theShape, theR1, theR2, theListShapes)
9681                 RaiseIfFailed("MakeFilletFacesR1R2", self.LocalOp)
9682             anObj.SetParameters(Parameters)
9683             self._autoPublish(anObj, theName, "fillet")
9684             return anObj
9685
9686         ## Perform a fillet on the specified edges of the given shape
9687         #  @param theShape  Wire Shape to perform fillet on.
9688         #  @param theR  Fillet radius.
9689         #  @param theListOfVertexes Global indices of vertexes to perform fillet on.
9690         #    \note Global index of sub-shape can be obtained, using method GetSubShapeID()
9691         #    \note The list of vertices could be empty,
9692         #          in this case fillet will done done at all vertices in wire
9693         #  @param doIgnoreSecantVertices If FALSE, fillet radius is always limited
9694         #         by the length of the edges, nearest to the fillet vertex.
9695         #         But sometimes the next edge is C1 continuous with the one, nearest to
9696         #         the fillet point, and such two (or more) edges can be united to allow
9697         #         bigger radius. Set this flag to TRUE to allow collinear edges union,
9698         #         thus ignoring the secant vertex (vertices).
9699         #  @param theName Object name; when specified, this parameter is used
9700         #         for result publication in the study. Otherwise, if automatic
9701         #         publication is switched on, default value is used for result name.
9702         #
9703         #  @return New GEOM.GEOM_Object, containing the result shape.
9704         #
9705         #  @ref tui_fillet2d "Example"
9706         @ManageTransactions("LocalOp")
9707         def MakeFillet1D(self, theShape, theR, theListOfVertexes, doIgnoreSecantVertices = True, theName=None):
9708             """
9709             Perform a fillet on the specified edges of the given shape
9710
9711             Parameters:
9712                 theShape  Wire Shape to perform fillet on.
9713                 theR  Fillet radius.
9714                 theListOfVertexes Global indices of vertexes to perform fillet on.
9715                 doIgnoreSecantVertices If FALSE, fillet radius is always limited
9716                     by the length of the edges, nearest to the fillet vertex.
9717                     But sometimes the next edge is C1 continuous with the one, nearest to
9718                     the fillet point, and such two (or more) edges can be united to allow
9719                     bigger radius. Set this flag to TRUE to allow collinear edges union,
9720                     thus ignoring the secant vertex (vertices).
9721                 theName Object name; when specified, this parameter is used
9722                         for result publication in the study. Otherwise, if automatic
9723                         publication is switched on, default value is used for result name.
9724             Note:
9725                 Global index of sub-shape can be obtained, using method geompy.GetSubShapeID
9726
9727                 The list of vertices could be empty,in this case fillet will done done at all vertices in wire
9728
9729             Returns:
9730                 New GEOM.GEOM_Object, containing the result shape.
9731
9732             Example of usage:
9733                 # create wire
9734                 Wire_1 = geompy.MakeWire([Edge_12, Edge_7, Edge_11, Edge_6, Edge_1,Edge_4])
9735                 # make fillet at given wire vertices with giver radius
9736                 Fillet_1D_1 = geompy.MakeFillet1D(Wire_1, 55, [3, 4, 6, 8, 10])
9737             """
9738             # Example: see GEOM_TestAll.py
9739             theR,doIgnoreSecantVertices,Parameters = ParseParameters(theR,doIgnoreSecantVertices)
9740             anObj = self.LocalOp.MakeFillet1D(theShape, theR, theListOfVertexes, doIgnoreSecantVertices)
9741             RaiseIfFailed("MakeFillet1D", self.LocalOp)
9742             anObj.SetParameters(Parameters)
9743             self._autoPublish(anObj, theName, "fillet")
9744             return anObj
9745
9746         ## Perform a fillet at the specified vertices of the given face/shell.
9747         #  @param theShape Face or Shell shape to perform fillet on.
9748         #  @param theR Fillet radius.
9749         #  @param theListOfVertexes Global indices of vertexes to perform fillet on.
9750         #  @param theName Object name; when specified, this parameter is used
9751         #         for result publication in the study. Otherwise, if automatic
9752         #         publication is switched on, default value is used for result name.
9753         #
9754         #  @note Global index of sub-shape can be obtained, using method GetSubShapeID().
9755         #
9756         #  @return New GEOM.GEOM_Object, containing the result shape.
9757         #
9758         #  @ref tui_fillet2d "Example"
9759         @ManageTransactions("LocalOp")
9760         def MakeFillet2D(self, theShape, theR, theListOfVertexes, theName=None):
9761             """
9762             Perform a fillet at the specified vertices of the given face/shell.
9763
9764             Parameters:
9765                 theShape  Face or Shell shape to perform fillet on.
9766                 theR  Fillet radius.
9767                 theListOfVertexes Global indices of vertexes to perform fillet on.
9768                 theName Object name; when specified, this parameter is used
9769                         for result publication in the study. Otherwise, if automatic
9770                         publication is switched on, default value is used for result name.
9771             Note:
9772                 Global index of sub-shape can be obtained, using method geompy.GetSubShapeID
9773
9774             Returns:
9775                 New GEOM.GEOM_Object, containing the result shape.
9776
9777             Example of usage:
9778                 face = geompy.MakeFaceHW(100, 100, 1)
9779                 fillet2d = geompy.MakeFillet2D(face, 30, [7, 9])
9780             """
9781             # Example: see GEOM_TestAll.py
9782             theR,Parameters = ParseParameters(theR)
9783             anObj = self.LocalOp.MakeFillet2D(theShape, theR, theListOfVertexes)
9784             RaiseIfFailed("MakeFillet2D", self.LocalOp)
9785             anObj.SetParameters(Parameters)
9786             self._autoPublish(anObj, theName, "fillet")
9787             return anObj
9788
9789         ## Perform a symmetric chamfer on all edges of the given shape.
9790         #  @param theShape Shape, to perform chamfer on.
9791         #  @param theD Chamfer size along each face.
9792         #  @param theName Object name; when specified, this parameter is used
9793         #         for result publication in the study. Otherwise, if automatic
9794         #         publication is switched on, default value is used for result name.
9795         #
9796         #  @return New GEOM.GEOM_Object, containing the result shape.
9797         #
9798         #  @ref tui_chamfer "Example 1"
9799         #  \n @ref swig_MakeChamferAll "Example 2"
9800         @ManageTransactions("LocalOp")
9801         def MakeChamferAll(self, theShape, theD, theName=None):
9802             """
9803             Perform a symmetric chamfer on all edges of the given shape.
9804
9805             Parameters:
9806                 theShape Shape, to perform chamfer on.
9807                 theD Chamfer size along each face.
9808                 theName Object name; when specified, this parameter is used
9809                         for result publication in the study. Otherwise, if automatic
9810                         publication is switched on, default value is used for result name.
9811
9812             Returns:
9813                 New GEOM.GEOM_Object, containing the result shape.
9814
9815             Example of usage:
9816                 chamfer_all = geompy.MakeChamferAll(prism, 10.)
9817             """
9818             # Example: see GEOM_TestOthers.py
9819             theD,Parameters = ParseParameters(theD)
9820             anObj = self.LocalOp.MakeChamferAll(theShape, theD)
9821             RaiseIfFailed("MakeChamferAll", self.LocalOp)
9822             anObj.SetParameters(Parameters)
9823             self._autoPublish(anObj, theName, "chamfer")
9824             return anObj
9825
9826         ## Perform a chamfer on edges, common to the specified faces,
9827         #  with distance D1 on the Face1
9828         #  @param theShape Shape, to perform chamfer on.
9829         #  @param theD1 Chamfer size along \a theFace1.
9830         #  @param theD2 Chamfer size along \a theFace2.
9831         #  @param theFace1,theFace2 Global indices of two faces of \a theShape.
9832         #  @param theName Object name; when specified, this parameter is used
9833         #         for result publication in the study. Otherwise, if automatic
9834         #         publication is switched on, default value is used for result name.
9835         #
9836         #  @note Global index of sub-shape can be obtained, using method GetSubShapeID().
9837         #
9838         #  @return New GEOM.GEOM_Object, containing the result shape.
9839         #
9840         #  @ref tui_chamfer "Example"
9841         @ManageTransactions("LocalOp")
9842         def MakeChamferEdge(self, theShape, theD1, theD2, theFace1, theFace2, theName=None):
9843             """
9844             Perform a chamfer on edges, common to the specified faces,
9845             with distance D1 on the Face1
9846
9847             Parameters:
9848                 theShape Shape, to perform chamfer on.
9849                 theD1 Chamfer size along theFace1.
9850                 theD2 Chamfer size along theFace2.
9851                 theFace1,theFace2 Global indices of two faces of theShape.
9852                 theName Object name; when specified, this parameter is used
9853                         for result publication in the study. Otherwise, if automatic
9854                         publication is switched on, default value is used for result name.
9855
9856             Note:
9857                 Global index of sub-shape can be obtained, using method geompy.GetSubShapeID
9858
9859             Returns:
9860                 New GEOM.GEOM_Object, containing the result shape.
9861
9862             Example of usage:
9863                 prism_faces = geompy.SubShapeAllSortedCentres(prism, geompy.ShapeType["FACE"])
9864                 f_ind_1 = geompy.GetSubShapeID(prism, prism_faces[0])
9865                 f_ind_2 = geompy.GetSubShapeID(prism, prism_faces[1])
9866                 chamfer_e = geompy.MakeChamferEdge(prism, 10., 10., f_ind_1, f_ind_2)
9867             """
9868             # Example: see GEOM_TestAll.py
9869             theD1,theD2,Parameters = ParseParameters(theD1,theD2)
9870             anObj = self.LocalOp.MakeChamferEdge(theShape, theD1, theD2, theFace1, theFace2)
9871             RaiseIfFailed("MakeChamferEdge", self.LocalOp)
9872             anObj.SetParameters(Parameters)
9873             self._autoPublish(anObj, theName, "chamfer")
9874             return anObj
9875
9876         ## Perform a chamfer on edges
9877         #  @param theShape Shape, to perform chamfer on.
9878         #  @param theD Chamfer length
9879         #  @param theAngle Angle of chamfer (angle in radians or a name of variable which defines angle in degrees)
9880         #  @param theFace1,theFace2 Global indices of two faces of \a theShape.
9881         #  @param theName Object name; when specified, this parameter is used
9882         #         for result publication in the study. Otherwise, if automatic
9883         #         publication is switched on, default value is used for result name.
9884         #
9885         #  @note Global index of sub-shape can be obtained, using method GetSubShapeID().
9886         #
9887         #  @return New GEOM.GEOM_Object, containing the result shape.
9888         @ManageTransactions("LocalOp")
9889         def MakeChamferEdgeAD(self, theShape, theD, theAngle, theFace1, theFace2, theName=None):
9890             """
9891             Perform a chamfer on edges
9892
9893             Parameters:
9894                 theShape Shape, to perform chamfer on.
9895                 theD1 Chamfer size along theFace1.
9896                 theAngle Angle of chamfer (angle in radians or a name of variable which defines angle in degrees).
9897                 theFace1,theFace2 Global indices of two faces of theShape.
9898                 theName Object name; when specified, this parameter is used
9899                         for result publication in the study. Otherwise, if automatic
9900                         publication is switched on, default value is used for result name.
9901
9902             Note:
9903                 Global index of sub-shape can be obtained, using method geompy.GetSubShapeID
9904
9905             Returns:
9906                 New GEOM.GEOM_Object, containing the result shape.
9907
9908             Example of usage:
9909                 prism_faces = geompy.SubShapeAllSortedCentres(prism, geompy.ShapeType["FACE"])
9910                 f_ind_1 = geompy.GetSubShapeID(prism, prism_faces[0])
9911                 f_ind_2 = geompy.GetSubShapeID(prism, prism_faces[1])
9912                 ang = 30
9913                 chamfer_e = geompy.MakeChamferEdge(prism, 10., ang, f_ind_1, f_ind_2)
9914             """
9915             flag = False
9916             if isinstance(theAngle,str):
9917                 flag = True
9918             theD,theAngle,Parameters = ParseParameters(theD,theAngle)
9919             if flag:
9920                 theAngle = theAngle*math.pi/180.0
9921             anObj = self.LocalOp.MakeChamferEdgeAD(theShape, theD, theAngle, theFace1, theFace2)
9922             RaiseIfFailed("MakeChamferEdgeAD", self.LocalOp)
9923             anObj.SetParameters(Parameters)
9924             self._autoPublish(anObj, theName, "chamfer")
9925             return anObj
9926
9927         ## Perform a chamfer on all edges of the specified faces,
9928         #  with distance D1 on the first specified face (if several for one edge)
9929         #  @param theShape Shape, to perform chamfer on.
9930         #  @param theD1 Chamfer size along face from \a theFaces. If both faces,
9931         #               connected to the edge, are in \a theFaces, \a theD1
9932         #               will be get along face, which is nearer to \a theFaces beginning.
9933         #  @param theD2 Chamfer size along another of two faces, connected to the edge.
9934         #  @param theFaces Sequence of global indices of faces of \a theShape.
9935         #  @param theName Object name; when specified, this parameter is used
9936         #         for result publication in the study. Otherwise, if automatic
9937         #         publication is switched on, default value is used for result name.
9938         #
9939         #  @note Global index of sub-shape can be obtained, using method GetSubShapeID().
9940         #
9941         #  @return New GEOM.GEOM_Object, containing the result shape.
9942         #
9943         #  @ref tui_chamfer "Example"
9944         @ManageTransactions("LocalOp")
9945         def MakeChamferFaces(self, theShape, theD1, theD2, theFaces, theName=None):
9946             """
9947             Perform a chamfer on all edges of the specified faces,
9948             with distance D1 on the first specified face (if several for one edge)
9949
9950             Parameters:
9951                 theShape Shape, to perform chamfer on.
9952                 theD1 Chamfer size along face from  theFaces. If both faces,
9953                       connected to the edge, are in theFaces, theD1
9954                       will be get along face, which is nearer to theFaces beginning.
9955                 theD2 Chamfer size along another of two faces, connected to the edge.
9956                 theFaces Sequence of global indices of faces of theShape.
9957                 theName Object name; when specified, this parameter is used
9958                         for result publication in the study. Otherwise, if automatic
9959                         publication is switched on, default value is used for result name.
9960
9961             Note: Global index of sub-shape can be obtained, using method geompy.GetSubShapeID().
9962
9963             Returns:
9964                 New GEOM.GEOM_Object, containing the result shape.
9965             """
9966             # Example: see GEOM_TestAll.py
9967             theD1,theD2,Parameters = ParseParameters(theD1,theD2)
9968             anObj = self.LocalOp.MakeChamferFaces(theShape, theD1, theD2, theFaces)
9969             RaiseIfFailed("MakeChamferFaces", self.LocalOp)
9970             anObj.SetParameters(Parameters)
9971             self._autoPublish(anObj, theName, "chamfer")
9972             return anObj
9973
9974         ## The Same that MakeChamferFaces() but with params theD is chamfer lenght and
9975         #  theAngle is Angle of chamfer (angle in radians or a name of variable which defines angle in degrees)
9976         #
9977         #  @ref swig_FilletChamfer "Example"
9978         @ManageTransactions("LocalOp")
9979         def MakeChamferFacesAD(self, theShape, theD, theAngle, theFaces, theName=None):
9980             """
9981             The Same that geompy.MakeChamferFaces but with params theD is chamfer lenght and
9982             theAngle is Angle of chamfer (angle in radians or a name of variable which defines angle in degrees)
9983             """
9984             flag = False
9985             if isinstance(theAngle,str):
9986                 flag = True
9987             theD,theAngle,Parameters = ParseParameters(theD,theAngle)
9988             if flag:
9989                 theAngle = theAngle*math.pi/180.0
9990             anObj = self.LocalOp.MakeChamferFacesAD(theShape, theD, theAngle, theFaces)
9991             RaiseIfFailed("MakeChamferFacesAD", self.LocalOp)
9992             anObj.SetParameters(Parameters)
9993             self._autoPublish(anObj, theName, "chamfer")
9994             return anObj
9995
9996         ## Perform a chamfer on edges,
9997         #  with distance D1 on the first specified face (if several for one edge)
9998         #  @param theShape Shape, to perform chamfer on.
9999         #  @param theD1,theD2 Chamfer size
10000         #  @param theEdges Sequence of edges of \a theShape.
10001         #  @param theName Object name; when specified, this parameter is used
10002         #         for result publication in the study. Otherwise, if automatic
10003         #         publication is switched on, default value is used for result name.
10004         #
10005         #  @return New GEOM.GEOM_Object, containing the result shape.
10006         #
10007         #  @ref swig_FilletChamfer "Example"
10008         @ManageTransactions("LocalOp")
10009         def MakeChamferEdges(self, theShape, theD1, theD2, theEdges, theName=None):
10010             """
10011             Perform a chamfer on edges,
10012             with distance D1 on the first specified face (if several for one edge)
10013
10014             Parameters:
10015                 theShape Shape, to perform chamfer on.
10016                 theD1,theD2 Chamfer size
10017                 theEdges Sequence of edges of theShape.
10018                 theName Object name; when specified, this parameter is used
10019                         for result publication in the study. Otherwise, if automatic
10020                         publication is switched on, default value is used for result name.
10021
10022             Returns:
10023                 New GEOM.GEOM_Object, containing the result shape.
10024             """
10025             theD1,theD2,Parameters = ParseParameters(theD1,theD2)
10026             anObj = self.LocalOp.MakeChamferEdges(theShape, theD1, theD2, theEdges)
10027             RaiseIfFailed("MakeChamferEdges", self.LocalOp)
10028             anObj.SetParameters(Parameters)
10029             self._autoPublish(anObj, theName, "chamfer")
10030             return anObj
10031
10032         ## The Same that MakeChamferEdges() but with params theD is chamfer lenght and
10033         #  theAngle is Angle of chamfer (angle in radians or a name of variable which defines angle in degrees)
10034         @ManageTransactions("LocalOp")
10035         def MakeChamferEdgesAD(self, theShape, theD, theAngle, theEdges, theName=None):
10036             """
10037             The Same that geompy.MakeChamferEdges but with params theD is chamfer lenght and
10038             theAngle is Angle of chamfer (angle in radians or a name of variable which defines angle in degrees)
10039             """
10040             flag = False
10041             if isinstance(theAngle,str):
10042                 flag = True
10043             theD,theAngle,Parameters = ParseParameters(theD,theAngle)
10044             if flag:
10045                 theAngle = theAngle*math.pi/180.0
10046             anObj = self.LocalOp.MakeChamferEdgesAD(theShape, theD, theAngle, theEdges)
10047             RaiseIfFailed("MakeChamferEdgesAD", self.LocalOp)
10048             anObj.SetParameters(Parameters)
10049             self._autoPublish(anObj, theName, "chamfer")
10050             return anObj
10051
10052         ## @sa MakeChamferEdge(), MakeChamferFaces()
10053         #
10054         #  @ref swig_MakeChamfer "Example"
10055         def MakeChamfer(self, aShape, d1, d2, aShapeType, ListShape, theName=None):
10056             """
10057             See geompy.MakeChamferEdge() and geompy.MakeChamferFaces() functions for more information.
10058             """
10059             # Example: see GEOM_TestOthers.py
10060             anObj = None
10061             # note: auto-publishing is done in self.MakeChamferEdge() or self.MakeChamferFaces()
10062             if aShapeType == self.ShapeType["EDGE"]:
10063                 anObj = self.MakeChamferEdge(aShape,d1,d2,ListShape[0],ListShape[1],theName)
10064             else:
10065                 anObj = self.MakeChamferFaces(aShape,d1,d2,ListShape,theName)
10066             return anObj
10067
10068         ## Remove material from a solid by extrusion of the base shape on the given distance.
10069         #  @param theInit Shape to remove material from. It must be a solid or
10070         #  a compound made of a single solid.
10071         #  @param theBase Closed edge or wire defining the base shape to be extruded.
10072         #  @param theH Prism dimension along the normal to theBase
10073         #  @param theAngle Draft angle in degrees.
10074         #  @param theInvert If true material changes the direction
10075         #  @param theName Object name; when specified, this parameter is used
10076         #         for result publication in the study. Otherwise, if automatic
10077         #         publication is switched on, default value is used for result name.
10078         #
10079         #  @return New GEOM.GEOM_Object, containing the initial shape with removed material
10080         #
10081         #  @ref tui_creation_prism "Example"
10082         @ManageTransactions("PrimOp")
10083         def MakeExtrudedCut(self, theInit, theBase, theH, theAngle, theInvert=False, theName=None):
10084             """
10085             Add material to a solid by extrusion of the base shape on the given distance.
10086
10087             Parameters:
10088                 theInit Shape to remove material from. It must be a solid or a compound made of a single solid.
10089                 theBase Closed edge or wire defining the base shape to be extruded.
10090                 theH Prism dimension along the normal  to theBase
10091                 theAngle Draft angle in degrees.
10092                 theInvert If true material changes the direction.
10093                 theName Object name; when specified, this parameter is used
10094                         for result publication in the study. Otherwise, if automatic
10095                         publication is switched on, default value is used for result name.
10096
10097             Returns:
10098                 New GEOM.GEOM_Object,  containing the initial shape with removed material.
10099             """
10100             # Example: see GEOM_TestAll.py
10101             theH,theAngle,Parameters = ParseParameters(theH,theAngle)
10102             anObj = self.PrimOp.MakeDraftPrism(theInit, theBase, theH, theAngle, False, theInvert)
10103             RaiseIfFailed("MakeExtrudedBoss", self.PrimOp)
10104             anObj.SetParameters(Parameters)
10105             self._autoPublish(anObj, theName, "extrudedCut")
10106             return anObj
10107
10108         ## Add material to a solid by extrusion of the base shape on the given distance.
10109         #  @param theInit Shape to add material to. It must be a solid or
10110         #  a compound made of a single solid.
10111         #  @param theBase Closed edge or wire defining the base shape to be extruded.
10112         #  @param theH Prism dimension along the normal to theBase
10113         #  @param theAngle Draft angle in degrees.
10114         #  @param theInvert If true material changes the direction
10115         #  @param theName Object name; when specified, this parameter is used
10116         #         for result publication in the study. Otherwise, if automatic
10117         #         publication is switched on, default value is used for result name.
10118         #
10119         #  @return New GEOM.GEOM_Object, containing the initial shape with added material
10120         #
10121         #  @ref tui_creation_prism "Example"
10122         @ManageTransactions("PrimOp")
10123         def MakeExtrudedBoss(self, theInit, theBase, theH, theAngle, theInvert=False, theName=None):
10124             """
10125             Add material to a solid by extrusion of the base shape on the given distance.
10126
10127             Parameters:
10128                 theInit Shape to add material to. It must be a solid or a compound made of a single solid.
10129                 theBase Closed edge or wire defining the base shape to be extruded.
10130                 theH Prism dimension along the normal  to theBase
10131                 theAngle Draft angle in degrees.
10132                 theInvert If true material changes the direction.
10133                 theName Object name; when specified, this parameter is used
10134                         for result publication in the study. Otherwise, if automatic
10135                         publication is switched on, default value is used for result name.
10136
10137             Returns:
10138                 New GEOM.GEOM_Object,  containing the initial shape with added material.
10139             """
10140             # Example: see GEOM_TestAll.py
10141             theH,theAngle,Parameters = ParseParameters(theH,theAngle)
10142             anObj = self.PrimOp.MakeDraftPrism(theInit, theBase, theH, theAngle, True, theInvert)
10143             RaiseIfFailed("MakeExtrudedBoss", self.PrimOp)
10144             anObj.SetParameters(Parameters)
10145             self._autoPublish(anObj, theName, "extrudedBoss")
10146             return anObj
10147
10148         # end of l3_local
10149         ## @}
10150
10151         ## @addtogroup l3_basic_op
10152         ## @{
10153
10154         ## Perform an Archimde operation on the given shape with given parameters.
10155         #  The object presenting the resulting face is returned.
10156         #  @param theShape Shape to be put in water.
10157         #  @param theWeight Weight of the shape.
10158         #  @param theWaterDensity Density of the water.
10159         #  @param theMeshDeflection Deflection of the mesh, using to compute the section.
10160         #  @param theName Object name; when specified, this parameter is used
10161         #         for result publication in the study. Otherwise, if automatic
10162         #         publication is switched on, default value is used for result name.
10163         #
10164         #  @return New GEOM.GEOM_Object, containing a section of \a theShape
10165         #          by a plane, corresponding to water level.
10166         #
10167         #  @ref tui_archimede "Example"
10168         @ManageTransactions("LocalOp")
10169         def Archimede(self, theShape, theWeight, theWaterDensity, theMeshDeflection, theName=None):
10170             """
10171             Perform an Archimde operation on the given shape with given parameters.
10172             The object presenting the resulting face is returned.
10173
10174             Parameters:
10175                 theShape Shape to be put in water.
10176                 theWeight Weight of the shape.
10177                 theWaterDensity Density of the water.
10178                 theMeshDeflection Deflection of the mesh, using to compute the section.
10179                 theName Object name; when specified, this parameter is used
10180                         for result publication in the study. Otherwise, if automatic
10181                         publication is switched on, default value is used for result name.
10182
10183             Returns:
10184                 New GEOM.GEOM_Object, containing a section of theShape
10185                 by a plane, corresponding to water level.
10186             """
10187             # Example: see GEOM_TestAll.py
10188             theWeight,theWaterDensity,theMeshDeflection,Parameters = ParseParameters(
10189               theWeight,theWaterDensity,theMeshDeflection)
10190             anObj = self.LocalOp.MakeArchimede(theShape, theWeight, theWaterDensity, theMeshDeflection)
10191             RaiseIfFailed("MakeArchimede", self.LocalOp)
10192             anObj.SetParameters(Parameters)
10193             self._autoPublish(anObj, theName, "archimede")
10194             return anObj
10195
10196         # end of l3_basic_op
10197         ## @}
10198
10199         ## @addtogroup l2_measure
10200         ## @{
10201
10202         ## Get point coordinates
10203         #  @return [x, y, z]
10204         #
10205         #  @ref tui_point_coordinates_page "Example"
10206         @ManageTransactions("MeasuOp")
10207         def PointCoordinates(self,Point):
10208             """
10209             Get point coordinates
10210
10211             Returns:
10212                 [x, y, z]
10213             """
10214             # Example: see GEOM_TestMeasures.py
10215             aTuple = self.MeasuOp.PointCoordinates(Point)
10216             RaiseIfFailed("PointCoordinates", self.MeasuOp)
10217             return aTuple
10218
10219         ## Get vector coordinates
10220         #  @return [x, y, z]
10221         #
10222         #  @ref tui_measurement_tools_page "Example"
10223         def VectorCoordinates(self,Vector):
10224             """
10225             Get vector coordinates
10226
10227             Returns:
10228                 [x, y, z]
10229             """
10230
10231             p1=self.GetFirstVertex(Vector)
10232             p2=self.GetLastVertex(Vector)
10233
10234             X1=self.PointCoordinates(p1)
10235             X2=self.PointCoordinates(p2)
10236
10237             return (X2[0]-X1[0],X2[1]-X1[1],X2[2]-X1[2])
10238
10239
10240         ## Compute cross product
10241         #  @return vector w=u^v
10242         #
10243         #  @ref tui_measurement_tools_page "Example"
10244         def CrossProduct(self, Vector1, Vector2):
10245             """
10246             Compute cross product
10247
10248             Returns: vector w=u^v
10249             """
10250             u=self.VectorCoordinates(Vector1)
10251             v=self.VectorCoordinates(Vector2)
10252             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])
10253
10254             return w
10255
10256         ## Compute cross product
10257         #  @return dot product  p=u.v
10258         #
10259         #  @ref tui_measurement_tools_page "Example"
10260         def DotProduct(self, Vector1, Vector2):
10261             """
10262             Compute cross product
10263
10264             Returns: dot product  p=u.v
10265             """
10266             u=self.VectorCoordinates(Vector1)
10267             v=self.VectorCoordinates(Vector2)
10268             p=u[0]*v[0]+u[1]*v[1]+u[2]*v[2]
10269
10270             return p
10271
10272
10273         ## Get summarized length of all wires,
10274         #  area of surface and volume of the given shape.
10275         #  @param theShape Shape to define properties of.
10276         #  @return [theLength, theSurfArea, theVolume]\n
10277         #  theLength:   Summarized length of all wires of the given shape.\n
10278         #  theSurfArea: Area of surface of the given shape.\n
10279         #  theVolume:   Volume of the given shape.
10280         #
10281         #  @ref tui_basic_properties_page "Example"
10282         @ManageTransactions("MeasuOp")
10283         def BasicProperties(self,theShape):
10284             """
10285             Get summarized length of all wires,
10286             area of surface and volume of the given shape.
10287
10288             Parameters:
10289                 theShape Shape to define properties of.
10290
10291             Returns:
10292                 [theLength, theSurfArea, theVolume]
10293                  theLength:   Summarized length of all wires of the given shape.
10294                  theSurfArea: Area of surface of the given shape.
10295                  theVolume:   Volume of the given shape.
10296             """
10297             # Example: see GEOM_TestMeasures.py
10298             aTuple = self.MeasuOp.GetBasicProperties(theShape)
10299             RaiseIfFailed("GetBasicProperties", self.MeasuOp)
10300             return aTuple
10301
10302         ## Get parameters of bounding box of the given shape
10303         #  @param theShape Shape to obtain bounding box of.
10304         #  @param precise TRUE for precise computation; FALSE for fast one.
10305         #  @return [Xmin,Xmax, Ymin,Ymax, Zmin,Zmax]
10306         #  Xmin,Xmax: Limits of shape along OX axis.
10307         #  Ymin,Ymax: Limits of shape along OY axis.
10308         #  Zmin,Zmax: Limits of shape along OZ axis.
10309         #
10310         #  @ref tui_bounding_box_page "Example"
10311         @ManageTransactions("MeasuOp")
10312         def BoundingBox (self, theShape, precise=False):
10313             """
10314             Get parameters of bounding box of the given shape
10315
10316             Parameters:
10317                 theShape Shape to obtain bounding box of.
10318                 precise TRUE for precise computation; FALSE for fast one.
10319
10320             Returns:
10321                 [Xmin,Xmax, Ymin,Ymax, Zmin,Zmax]
10322                  Xmin,Xmax: Limits of shape along OX axis.
10323                  Ymin,Ymax: Limits of shape along OY axis.
10324                  Zmin,Zmax: Limits of shape along OZ axis.
10325             """
10326             # Example: see GEOM_TestMeasures.py
10327             aTuple = self.MeasuOp.GetBoundingBox(theShape, precise)
10328             RaiseIfFailed("GetBoundingBox", self.MeasuOp)
10329             return aTuple
10330
10331         ## Get bounding box of the given shape
10332         #  @param theShape Shape to obtain bounding box of.
10333         #  @param precise TRUE for precise computation; FALSE for fast one.
10334         #  @param theName Object name; when specified, this parameter is used
10335         #         for result publication in the study. Otherwise, if automatic
10336         #         publication is switched on, default value is used for result name.
10337         #
10338         #  @return New GEOM.GEOM_Object, containing the created box.
10339         #
10340         #  @ref tui_bounding_box_page "Example"
10341         @ManageTransactions("MeasuOp")
10342         def MakeBoundingBox (self, theShape, precise=False, theName=None):
10343             """
10344             Get bounding box of the given shape
10345
10346             Parameters:
10347                 theShape Shape to obtain bounding box of.
10348                 precise TRUE for precise computation; FALSE for fast one.
10349                 theName Object name; when specified, this parameter is used
10350                         for result publication in the study. Otherwise, if automatic
10351                         publication is switched on, default value is used for result name.
10352
10353             Returns:
10354                 New GEOM.GEOM_Object, containing the created box.
10355             """
10356             # Example: see GEOM_TestMeasures.py
10357             anObj = self.MeasuOp.MakeBoundingBox(theShape, precise)
10358             RaiseIfFailed("MakeBoundingBox", self.MeasuOp)
10359             self._autoPublish(anObj, theName, "bndbox")
10360             return anObj
10361
10362         ## Get inertia matrix and moments of inertia of theShape.
10363         #  @param theShape Shape to calculate inertia of.
10364         #  @return [I11,I12,I13, I21,I22,I23, I31,I32,I33, Ix,Iy,Iz]
10365         #  I(1-3)(1-3): Components of the inertia matrix of the given shape.
10366         #  Ix,Iy,Iz:    Moments of inertia of the given shape.
10367         #
10368         #  @ref tui_inertia_page "Example"
10369         @ManageTransactions("MeasuOp")
10370         def Inertia(self,theShape):
10371             """
10372             Get inertia matrix and moments of inertia of theShape.
10373
10374             Parameters:
10375                 theShape Shape to calculate inertia of.
10376
10377             Returns:
10378                 [I11,I12,I13, I21,I22,I23, I31,I32,I33, Ix,Iy,Iz]
10379                  I(1-3)(1-3): Components of the inertia matrix of the given shape.
10380                  Ix,Iy,Iz:    Moments of inertia of the given shape.
10381             """
10382             # Example: see GEOM_TestMeasures.py
10383             aTuple = self.MeasuOp.GetInertia(theShape)
10384             RaiseIfFailed("GetInertia", self.MeasuOp)
10385             return aTuple
10386
10387         ## Get if coords are included in the shape (ST_IN or ST_ON)
10388         #  @param theShape Shape
10389         #  @param coords list of points coordinates [x1, y1, z1, x2, y2, z2, ...]
10390         #  @param tolerance to be used (default is 1.0e-7)
10391         #  @return list_of_boolean = [res1, res2, ...]
10392         @ManageTransactions("MeasuOp")
10393         def AreCoordsInside(self, theShape, coords, tolerance=1.e-7):
10394             """
10395             Get if coords are included in the shape (ST_IN or ST_ON)
10396
10397             Parameters:
10398                 theShape Shape
10399                 coords list of points coordinates [x1, y1, z1, x2, y2, z2, ...]
10400                 tolerance to be used (default is 1.0e-7)
10401
10402             Returns:
10403                 list_of_boolean = [res1, res2, ...]
10404             """
10405             return self.MeasuOp.AreCoordsInside(theShape, coords, tolerance)
10406
10407         ## Get minimal distance between the given shapes.
10408         #  @param theShape1,theShape2 Shapes to find minimal distance between.
10409         #  @return Value of the minimal distance between the given shapes.
10410         #
10411         #  @ref tui_min_distance_page "Example"
10412         @ManageTransactions("MeasuOp")
10413         def MinDistance(self, theShape1, theShape2):
10414             """
10415             Get minimal distance between the given shapes.
10416
10417             Parameters:
10418                 theShape1,theShape2 Shapes to find minimal distance between.
10419
10420             Returns:
10421                 Value of the minimal distance between the given shapes.
10422             """
10423             # Example: see GEOM_TestMeasures.py
10424             aTuple = self.MeasuOp.GetMinDistance(theShape1, theShape2)
10425             RaiseIfFailed("GetMinDistance", self.MeasuOp)
10426             return aTuple[0]
10427
10428         ## Get minimal distance between the given shapes.
10429         #  @param theShape1,theShape2 Shapes to find minimal distance between.
10430         #  @return Value of the minimal distance between the given shapes, in form of list
10431         #          [Distance, DX, DY, DZ].
10432         #
10433         #  @ref tui_min_distance_page "Example"
10434         @ManageTransactions("MeasuOp")
10435         def MinDistanceComponents(self, theShape1, theShape2):
10436             """
10437             Get minimal distance between the given shapes.
10438
10439             Parameters:
10440                 theShape1,theShape2 Shapes to find minimal distance between.
10441
10442             Returns:
10443                 Value of the minimal distance between the given shapes, in form of list
10444                 [Distance, DX, DY, DZ]
10445             """
10446             # Example: see GEOM_TestMeasures.py
10447             aTuple = self.MeasuOp.GetMinDistance(theShape1, theShape2)
10448             RaiseIfFailed("GetMinDistance", self.MeasuOp)
10449             aRes = [aTuple[0], aTuple[4] - aTuple[1], aTuple[5] - aTuple[2], aTuple[6] - aTuple[3]]
10450             return aRes
10451
10452         ## Get closest points of the given shapes.
10453         #  @param theShape1,theShape2 Shapes to find closest points of.
10454         #  @return The number of found solutions (-1 in case of infinite number of
10455         #          solutions) and a list of (X, Y, Z) coordinates for all couples of points.
10456         #
10457         #  @ref tui_min_distance_page "Example"
10458         @ManageTransactions("MeasuOp")
10459         def ClosestPoints (self, theShape1, theShape2):
10460             """
10461             Get closest points of the given shapes.
10462
10463             Parameters:
10464                 theShape1,theShape2 Shapes to find closest points of.
10465
10466             Returns:
10467                 The number of found solutions (-1 in case of infinite number of
10468                 solutions) and a list of (X, Y, Z) coordinates for all couples of points.
10469             """
10470             # Example: see GEOM_TestMeasures.py
10471             aTuple = self.MeasuOp.ClosestPoints(theShape1, theShape2)
10472             RaiseIfFailed("ClosestPoints", self.MeasuOp)
10473             return aTuple
10474
10475         ## Get angle between the given shapes in degrees.
10476         #  @param theShape1,theShape2 Lines or linear edges to find angle between.
10477         #  @note If both arguments are vectors, the angle is computed in accordance
10478         #        with their orientations, otherwise the minimum angle is computed.
10479         #  @return Value of the angle between the given shapes in degrees.
10480         #
10481         #  @ref tui_angle_page "Example"
10482         @ManageTransactions("MeasuOp")
10483         def GetAngle(self, theShape1, theShape2):
10484             """
10485             Get angle between the given shapes in degrees.
10486
10487             Parameters:
10488                 theShape1,theShape2 Lines or linear edges to find angle between.
10489
10490             Note:
10491                 If both arguments are vectors, the angle is computed in accordance
10492                 with their orientations, otherwise the minimum angle is computed.
10493
10494             Returns:
10495                 Value of the angle between the given shapes in degrees.
10496             """
10497             # Example: see GEOM_TestMeasures.py
10498             anAngle = self.MeasuOp.GetAngle(theShape1, theShape2)
10499             RaiseIfFailed("GetAngle", self.MeasuOp)
10500             return anAngle
10501
10502         ## Get angle between the given shapes in radians.
10503         #  @param theShape1,theShape2 Lines or linear edges to find angle between.
10504         #  @note If both arguments are vectors, the angle is computed in accordance
10505         #        with their orientations, otherwise the minimum angle is computed.
10506         #  @return Value of the angle between the given shapes in radians.
10507         #
10508         #  @ref tui_angle_page "Example"
10509         @ManageTransactions("MeasuOp")
10510         def GetAngleRadians(self, theShape1, theShape2):
10511             """
10512             Get angle between the given shapes in radians.
10513
10514             Parameters:
10515                 theShape1,theShape2 Lines or linear edges to find angle between.
10516
10517
10518             Note:
10519                 If both arguments are vectors, the angle is computed in accordance
10520                 with their orientations, otherwise the minimum angle is computed.
10521
10522             Returns:
10523                 Value of the angle between the given shapes in radians.
10524             """
10525             # Example: see GEOM_TestMeasures.py
10526             anAngle = self.MeasuOp.GetAngle(theShape1, theShape2)*math.pi/180.
10527             RaiseIfFailed("GetAngle", self.MeasuOp)
10528             return anAngle
10529
10530         ## Get angle between the given vectors in degrees.
10531         #  @param theShape1,theShape2 Vectors to find angle between.
10532         #  @param theFlag If True, the normal vector is defined by the two vectors cross,
10533         #                 if False, the opposite vector to the normal vector is used.
10534         #  @return Value of the angle between the given vectors in degrees.
10535         #
10536         #  @ref tui_angle_page "Example"
10537         @ManageTransactions("MeasuOp")
10538         def GetAngleVectors(self, theShape1, theShape2, theFlag = True):
10539             """
10540             Get angle between the given vectors in degrees.
10541
10542             Parameters:
10543                 theShape1,theShape2 Vectors to find angle between.
10544                 theFlag If True, the normal vector is defined by the two vectors cross,
10545                         if False, the opposite vector to the normal vector is used.
10546
10547             Returns:
10548                 Value of the angle between the given vectors in degrees.
10549             """
10550             anAngle = self.MeasuOp.GetAngleBtwVectors(theShape1, theShape2)
10551             if not theFlag:
10552                 anAngle = 360. - anAngle
10553             RaiseIfFailed("GetAngleVectors", self.MeasuOp)
10554             return anAngle
10555
10556         ## The same as GetAngleVectors, but the result is in radians.
10557         def GetAngleRadiansVectors(self, theShape1, theShape2, theFlag = True):
10558             """
10559             Get angle between the given vectors in radians.
10560
10561             Parameters:
10562                 theShape1,theShape2 Vectors to find angle between.
10563                 theFlag If True, the normal vector is defined by the two vectors cross,
10564                         if False, the opposite vector to the normal vector is used.
10565
10566             Returns:
10567                 Value of the angle between the given vectors in radians.
10568             """
10569             anAngle = self.GetAngleVectors(theShape1, theShape2, theFlag)*math.pi/180.
10570             return anAngle
10571
10572         ## @name Curve Curvature Measurement
10573         #  Methods for receiving radius of curvature of curves
10574         #  in the given point
10575         ## @{
10576
10577         ## Measure curvature of a curve at a point, set by parameter.
10578         #  @param theCurve a curve.
10579         #  @param theParam parameter.
10580         #  @return radius of curvature of \a theCurve.
10581         #
10582         #  @ref swig_todo "Example"
10583         @ManageTransactions("MeasuOp")
10584         def CurveCurvatureByParam(self, theCurve, theParam):
10585             """
10586             Measure curvature of a curve at a point, set by parameter.
10587
10588             Parameters:
10589                 theCurve a curve.
10590                 theParam parameter.
10591
10592             Returns:
10593                 radius of curvature of theCurve.
10594             """
10595             # Example: see GEOM_TestMeasures.py
10596             aCurv = self.MeasuOp.CurveCurvatureByParam(theCurve,theParam)
10597             RaiseIfFailed("CurveCurvatureByParam", self.MeasuOp)
10598             return aCurv
10599
10600         ## Measure curvature of a curve at a point.
10601         #  @param theCurve a curve.
10602         #  @param thePoint given point.
10603         #  @return radius of curvature of \a theCurve.
10604         #
10605         #  @ref swig_todo "Example"
10606         @ManageTransactions("MeasuOp")
10607         def CurveCurvatureByPoint(self, theCurve, thePoint):
10608             """
10609             Measure curvature of a curve at a point.
10610
10611             Parameters:
10612                 theCurve a curve.
10613                 thePoint given point.
10614
10615             Returns:
10616                 radius of curvature of theCurve.
10617             """
10618             aCurv = self.MeasuOp.CurveCurvatureByPoint(theCurve,thePoint)
10619             RaiseIfFailed("CurveCurvatureByPoint", self.MeasuOp)
10620             return aCurv
10621         ## @}
10622
10623         ## @name Surface Curvature Measurement
10624         #  Methods for receiving max and min radius of curvature of surfaces
10625         #  in the given point
10626         ## @{
10627
10628         ## Measure max radius of curvature of surface.
10629         #  @param theSurf the given surface.
10630         #  @param theUParam Value of U-parameter on the referenced surface.
10631         #  @param theVParam Value of V-parameter on the referenced surface.
10632         #  @return max radius of curvature of theSurf.
10633         #
10634         ## @ref swig_todo "Example"
10635         @ManageTransactions("MeasuOp")
10636         def MaxSurfaceCurvatureByParam(self, theSurf, theUParam, theVParam):
10637             """
10638             Measure max radius of curvature of surface.
10639
10640             Parameters:
10641                 theSurf the given surface.
10642                 theUParam Value of U-parameter on the referenced surface.
10643                 theVParam Value of V-parameter on the referenced surface.
10644
10645             Returns:
10646                 max radius of curvature of theSurf.
10647             """
10648             # Example: see GEOM_TestMeasures.py
10649             aSurf = self.MeasuOp.MaxSurfaceCurvatureByParam(theSurf,theUParam,theVParam)
10650             RaiseIfFailed("MaxSurfaceCurvatureByParam", self.MeasuOp)
10651             return aSurf
10652
10653         ## Measure max radius of curvature of surface in the given point
10654         #  @param theSurf the given surface.
10655         #  @param thePoint given point.
10656         #  @return max radius of curvature of theSurf.
10657         #
10658         ## @ref swig_todo "Example"
10659         @ManageTransactions("MeasuOp")
10660         def MaxSurfaceCurvatureByPoint(self, theSurf, thePoint):
10661             """
10662             Measure max radius of curvature of surface in the given point.
10663
10664             Parameters:
10665                 theSurf the given surface.
10666                 thePoint given point.
10667
10668             Returns:
10669                 max radius of curvature of theSurf.
10670             """
10671             aSurf = self.MeasuOp.MaxSurfaceCurvatureByPoint(theSurf,thePoint)
10672             RaiseIfFailed("MaxSurfaceCurvatureByPoint", self.MeasuOp)
10673             return aSurf
10674
10675         ## Measure min radius of curvature of surface.
10676         #  @param theSurf the given surface.
10677         #  @param theUParam Value of U-parameter on the referenced surface.
10678         #  @param theVParam Value of V-parameter on the referenced surface.
10679         #  @return min radius of curvature of theSurf.
10680         #
10681         ## @ref swig_todo "Example"
10682         @ManageTransactions("MeasuOp")
10683         def MinSurfaceCurvatureByParam(self, theSurf, theUParam, theVParam):
10684             """
10685             Measure min radius of curvature of surface.
10686
10687             Parameters:
10688                 theSurf the given surface.
10689                 theUParam Value of U-parameter on the referenced surface.
10690                 theVParam Value of V-parameter on the referenced surface.
10691
10692             Returns:
10693                 Min radius of curvature of theSurf.
10694             """
10695             aSurf = self.MeasuOp.MinSurfaceCurvatureByParam(theSurf,theUParam,theVParam)
10696             RaiseIfFailed("MinSurfaceCurvatureByParam", self.MeasuOp)
10697             return aSurf
10698
10699         ## Measure min radius of curvature of surface in the given point
10700         #  @param theSurf the given surface.
10701         #  @param thePoint given point.
10702         #  @return min radius of curvature of theSurf.
10703         #
10704         ## @ref swig_todo "Example"
10705         @ManageTransactions("MeasuOp")
10706         def MinSurfaceCurvatureByPoint(self, theSurf, thePoint):
10707             """
10708             Measure min radius of curvature of surface in the given point.
10709
10710             Parameters:
10711                 theSurf the given surface.
10712                 thePoint given point.
10713
10714             Returns:
10715                 Min radius of curvature of theSurf.
10716             """
10717             aSurf = self.MeasuOp.MinSurfaceCurvatureByPoint(theSurf,thePoint)
10718             RaiseIfFailed("MinSurfaceCurvatureByPoint", self.MeasuOp)
10719             return aSurf
10720         ## @}
10721
10722         ## Get min and max tolerances of sub-shapes of theShape
10723         #  @param theShape Shape, to get tolerances of.
10724         #  @return [FaceMin,FaceMax, EdgeMin,EdgeMax, VertMin,VertMax]\n
10725         #  FaceMin,FaceMax: Min and max tolerances of the faces.\n
10726         #  EdgeMin,EdgeMax: Min and max tolerances of the edges.\n
10727         #  VertMin,VertMax: Min and max tolerances of the vertices.
10728         #
10729         #  @ref tui_tolerance_page "Example"
10730         @ManageTransactions("MeasuOp")
10731         def Tolerance(self,theShape):
10732             """
10733             Get min and max tolerances of sub-shapes of theShape
10734
10735             Parameters:
10736                 theShape Shape, to get tolerances of.
10737
10738             Returns:
10739                 [FaceMin,FaceMax, EdgeMin,EdgeMax, VertMin,VertMax]
10740                  FaceMin,FaceMax: Min and max tolerances of the faces.
10741                  EdgeMin,EdgeMax: Min and max tolerances of the edges.
10742                  VertMin,VertMax: Min and max tolerances of the vertices.
10743             """
10744             # Example: see GEOM_TestMeasures.py
10745             aTuple = self.MeasuOp.GetTolerance(theShape)
10746             RaiseIfFailed("GetTolerance", self.MeasuOp)
10747             return aTuple
10748
10749         ## Obtain description of the given shape (number of sub-shapes of each type)
10750         #  @param theShape Shape to be described.
10751         #  @return Description of the given shape.
10752         #
10753         #  @ref tui_whatis_page "Example"
10754         @ManageTransactions("MeasuOp")
10755         def WhatIs(self,theShape):
10756             """
10757             Obtain description of the given shape (number of sub-shapes of each type)
10758
10759             Parameters:
10760                 theShape Shape to be described.
10761
10762             Returns:
10763                 Description of the given shape.
10764             """
10765             # Example: see GEOM_TestMeasures.py
10766             aDescr = self.MeasuOp.WhatIs(theShape)
10767             RaiseIfFailed("WhatIs", self.MeasuOp)
10768             return aDescr
10769
10770         ## Obtain quantity of shapes of the given type in \a theShape.
10771         #  If \a theShape is of type \a theType, it is also counted.
10772         #  @param theShape Shape to be described.
10773         #  @param theType the given ShapeType().
10774         #  @return Quantity of shapes of type \a theType in \a theShape.
10775         #
10776         #  @ref tui_measurement_tools_page "Example"
10777         def NbShapes (self, theShape, theType):
10778             """
10779             Obtain quantity of shapes of the given type in theShape.
10780             If theShape is of type theType, it is also counted.
10781
10782             Parameters:
10783                 theShape Shape to be described.
10784                 theType the given geompy.ShapeType
10785
10786             Returns:
10787                 Quantity of shapes of type theType in theShape.
10788             """
10789             # Example: see GEOM_TestMeasures.py
10790             listSh = self.SubShapeAllIDs(theShape, theType)
10791             Nb = len(listSh)
10792             return Nb
10793
10794         ## Obtain quantity of shapes of each type in \a theShape.
10795         #  The \a theShape is also counted.
10796         #  @param theShape Shape to be described.
10797         #  @return Dictionary of ShapeType() with bound quantities of shapes.
10798         #
10799         #  @ref tui_measurement_tools_page "Example"
10800         def ShapeInfo (self, theShape):
10801             """
10802             Obtain quantity of shapes of each type in theShape.
10803             The theShape is also counted.
10804
10805             Parameters:
10806                 theShape Shape to be described.
10807
10808             Returns:
10809                 Dictionary of geompy.ShapeType with bound quantities of shapes.
10810             """
10811             # Example: see GEOM_TestMeasures.py
10812             aDict = {}
10813             for typeSh in self.ShapeType:
10814                 if typeSh in ( "AUTO", "SHAPE" ): continue
10815                 listSh = self.SubShapeAllIDs(theShape, self.ShapeType[typeSh])
10816                 Nb = len(listSh)
10817                 aDict[typeSh] = Nb
10818                 pass
10819             return aDict
10820
10821         def GetCreationInformation(self, theShape):
10822             info = theShape.GetCreationInformation()
10823             # operationName
10824             opName = info.operationName
10825             if not opName: opName = "no info available"
10826             res = "Operation: " + opName
10827             # parameters
10828             for parVal in info.params:
10829                 res += " \n %s = %s" % ( parVal.name, parVal.value )
10830             return res
10831
10832         ## Get a point, situated at the centre of mass of theShape.
10833         #  @param theShape Shape to define centre of mass of.
10834         #  @param theName Object name; when specified, this parameter is used
10835         #         for result publication in the study. Otherwise, if automatic
10836         #         publication is switched on, default value is used for result name.
10837         #
10838         #  @return New GEOM.GEOM_Object, containing the created point.
10839         #
10840         #  @ref tui_center_of_mass_page "Example"
10841         @ManageTransactions("MeasuOp")
10842         def MakeCDG(self, theShape, theName=None):
10843             """
10844             Get a point, situated at the centre of mass of theShape.
10845
10846             Parameters:
10847                 theShape Shape to define centre of mass of.
10848                 theName Object name; when specified, this parameter is used
10849                         for result publication in the study. Otherwise, if automatic
10850                         publication is switched on, default value is used for result name.
10851
10852             Returns:
10853                 New GEOM.GEOM_Object, containing the created point.
10854             """
10855             # Example: see GEOM_TestMeasures.py
10856             anObj = self.MeasuOp.GetCentreOfMass(theShape)
10857             RaiseIfFailed("GetCentreOfMass", self.MeasuOp)
10858             self._autoPublish(anObj, theName, "centerOfMass")
10859             return anObj
10860
10861         ## Get a vertex sub-shape by index depended with orientation.
10862         #  @param theShape Shape to find sub-shape.
10863         #  @param theIndex Index to find vertex by this index (starting from zero)
10864         #  @param theName Object name; when specified, this parameter is used
10865         #         for result publication in the study. Otherwise, if automatic
10866         #         publication is switched on, default value is used for result name.
10867         #
10868         #  @return New GEOM.GEOM_Object, containing the created vertex.
10869         #
10870         #  @ref tui_measurement_tools_page "Example"
10871         @ManageTransactions("MeasuOp")
10872         def GetVertexByIndex(self, theShape, theIndex, theName=None):
10873             """
10874             Get a vertex sub-shape by index depended with orientation.
10875
10876             Parameters:
10877                 theShape Shape to find sub-shape.
10878                 theIndex Index to find vertex by this index (starting from zero)
10879                 theName Object name; when specified, this parameter is used
10880                         for result publication in the study. Otherwise, if automatic
10881                         publication is switched on, default value is used for result name.
10882
10883             Returns:
10884                 New GEOM.GEOM_Object, containing the created vertex.
10885             """
10886             # Example: see GEOM_TestMeasures.py
10887             anObj = self.MeasuOp.GetVertexByIndex(theShape, theIndex)
10888             RaiseIfFailed("GetVertexByIndex", self.MeasuOp)
10889             self._autoPublish(anObj, theName, "vertex")
10890             return anObj
10891
10892         ## Get the first vertex of wire/edge depended orientation.
10893         #  @param theShape Shape to find first vertex.
10894         #  @param theName Object name; when specified, this parameter is used
10895         #         for result publication in the study. Otherwise, if automatic
10896         #         publication is switched on, default value is used for result name.
10897         #
10898         #  @return New GEOM.GEOM_Object, containing the created vertex.
10899         #
10900         #  @ref tui_measurement_tools_page "Example"
10901         def GetFirstVertex(self, theShape, theName=None):
10902             """
10903             Get the first vertex of wire/edge depended orientation.
10904
10905             Parameters:
10906                 theShape Shape to find first vertex.
10907                 theName Object name; when specified, this parameter is used
10908                         for result publication in the study. Otherwise, if automatic
10909                         publication is switched on, default value is used for result name.
10910
10911             Returns:
10912                 New GEOM.GEOM_Object, containing the created vertex.
10913             """
10914             # Example: see GEOM_TestMeasures.py
10915             # note: auto-publishing is done in self.GetVertexByIndex()
10916             return self.GetVertexByIndex(theShape, 0, theName)
10917
10918         ## Get the last vertex of wire/edge depended orientation.
10919         #  @param theShape Shape to find last vertex.
10920         #  @param theName Object name; when specified, this parameter is used
10921         #         for result publication in the study. Otherwise, if automatic
10922         #         publication is switched on, default value is used for result name.
10923         #
10924         #  @return New GEOM.GEOM_Object, containing the created vertex.
10925         #
10926         #  @ref tui_measurement_tools_page "Example"
10927         def GetLastVertex(self, theShape, theName=None):
10928             """
10929             Get the last vertex of wire/edge depended orientation.
10930
10931             Parameters:
10932                 theShape Shape to find last vertex.
10933                 theName Object name; when specified, this parameter is used
10934                         for result publication in the study. Otherwise, if automatic
10935                         publication is switched on, default value is used for result name.
10936
10937             Returns:
10938                 New GEOM.GEOM_Object, containing the created vertex.
10939             """
10940             # Example: see GEOM_TestMeasures.py
10941             nb_vert =  self.NumberOfSubShapes(theShape, self.ShapeType["VERTEX"])
10942             # note: auto-publishing is done in self.GetVertexByIndex()
10943             return self.GetVertexByIndex(theShape, (nb_vert-1), theName)
10944
10945         ## Get a normale to the given face. If the point is not given,
10946         #  the normale is calculated at the center of mass.
10947         #  @param theFace Face to define normale of.
10948         #  @param theOptionalPoint Point to compute the normale at.
10949         #  @param theName Object name; when specified, this parameter is used
10950         #         for result publication in the study. Otherwise, if automatic
10951         #         publication is switched on, default value is used for result name.
10952         #
10953         #  @return New GEOM.GEOM_Object, containing the created vector.
10954         #
10955         #  @ref swig_todo "Example"
10956         @ManageTransactions("MeasuOp")
10957         def GetNormal(self, theFace, theOptionalPoint = None, theName=None):
10958             """
10959             Get a normale to the given face. If the point is not given,
10960             the normale is calculated at the center of mass.
10961
10962             Parameters:
10963                 theFace Face to define normale of.
10964                 theOptionalPoint Point to compute the normale at.
10965                 theName Object name; when specified, this parameter is used
10966                         for result publication in the study. Otherwise, if automatic
10967                         publication is switched on, default value is used for result name.
10968
10969             Returns:
10970                 New GEOM.GEOM_Object, containing the created vector.
10971             """
10972             # Example: see GEOM_TestMeasures.py
10973             anObj = self.MeasuOp.GetNormal(theFace, theOptionalPoint)
10974             RaiseIfFailed("GetNormal", self.MeasuOp)
10975             self._autoPublish(anObj, theName, "normal")
10976             return anObj
10977
10978         ## Print shape errors obtained from CheckShape.
10979         #  @param theShape Shape that was checked.
10980         #  @param theShapeErrors the shape errors obtained by CheckShape.
10981         #  @param theReturnStatus If 0 the description of problem is printed.
10982         #                         If 1 the description of problem is returned.
10983         #  @return If theReturnStatus is equal to 1 the description is returned.
10984         #          Otherwise doesn't return anything.
10985         #
10986         #  @ref tui_check_shape_page "Example"
10987         @ManageTransactions("MeasuOp")
10988         def PrintShapeErrors(self, theShape, theShapeErrors, theReturnStatus = 0):
10989             """
10990             Print shape errors obtained from CheckShape.
10991
10992             Parameters:
10993                 theShape Shape that was checked.
10994                 theShapeErrors the shape errors obtained by CheckShape.
10995                 theReturnStatus If 0 the description of problem is printed.
10996                                 If 1 the description of problem is returned.
10997
10998             Returns:
10999                 If theReturnStatus is equal to 1 the description is returned.
11000                   Otherwise doesn't return anything.
11001             """
11002             # Example: see GEOM_TestMeasures.py
11003             Descr = self.MeasuOp.PrintShapeErrors(theShape, theShapeErrors)
11004             if theReturnStatus == 1:
11005                 return Descr
11006             print Descr
11007             pass
11008
11009         ## Check a topology of the given shape.
11010         #  @param theShape Shape to check validity of.
11011         #  @param theIsCheckGeom If FALSE, only the shape's topology will be checked, \n
11012         #                        if TRUE, the shape's geometry will be checked also.
11013         #  @param theReturnStatus If 0 and if theShape is invalid, a description
11014         #                         of problem is printed.
11015         #                         If 1 isValid flag and the description of
11016         #                         problem is returned.
11017         #                         If 2 isValid flag and the list of error data
11018         #                         is returned.
11019         #  @return TRUE, if the shape "seems to be valid".
11020         #          If theShape is invalid, prints a description of problem.
11021         #          If theReturnStatus is equal to 1 the description is returned
11022         #          along with IsValid flag.
11023         #          If theReturnStatus is equal to 2 the list of error data is
11024         #          returned along with IsValid flag.
11025         #
11026         #  @ref tui_check_shape_page "Example"
11027         @ManageTransactions("MeasuOp")
11028         def CheckShape(self,theShape, theIsCheckGeom = 0, theReturnStatus = 0):
11029             """
11030             Check a topology of the given shape.
11031
11032             Parameters:
11033                 theShape Shape to check validity of.
11034                 theIsCheckGeom If FALSE, only the shape's topology will be checked,
11035                                if TRUE, the shape's geometry will be checked also.
11036                 theReturnStatus If 0 and if theShape is invalid, a description
11037                                 of problem is printed.
11038                                 If 1 IsValid flag and the description of
11039                                 problem is returned.
11040                                 If 2 IsValid flag and the list of error data
11041                                 is returned.
11042
11043             Returns:
11044                 TRUE, if the shape "seems to be valid".
11045                 If theShape is invalid, prints a description of problem.
11046                 If theReturnStatus is equal to 1 the description is returned
11047                 along with IsValid flag.
11048                 If theReturnStatus is equal to 2 the list of error data is
11049                 returned along with IsValid flag.
11050             """
11051             # Example: see GEOM_TestMeasures.py
11052             if theIsCheckGeom:
11053                 (IsValid, ShapeErrors) = self.MeasuOp.CheckShapeWithGeometry(theShape)
11054                 RaiseIfFailed("CheckShapeWithGeometry", self.MeasuOp)
11055             else:
11056                 (IsValid, ShapeErrors) = self.MeasuOp.CheckShape(theShape)
11057                 RaiseIfFailed("CheckShape", self.MeasuOp)
11058             if IsValid == 0:
11059                 if theReturnStatus == 0:
11060                     Descr = self.MeasuOp.PrintShapeErrors(theShape, ShapeErrors)
11061                     print Descr
11062             if theReturnStatus == 1:
11063               Descr = self.MeasuOp.PrintShapeErrors(theShape, ShapeErrors)
11064               return (IsValid, Descr)
11065             elif theReturnStatus == 2:
11066               return (IsValid, ShapeErrors)
11067             return IsValid
11068
11069         ## Detect self-intersections in the given shape.
11070         #  @param theShape Shape to check.
11071         #  @param theCheckLevel is the level of self-intersection check.
11072         #         Possible input values are:
11073         #         - GEOM.SI_V_V(0) - only V/V interferences
11074         #         - GEOM.SI_V_E(1) - V/V and V/E interferences
11075         #         - GEOM.SI_E_E(2) - V/V, V/E and E/E interferences
11076         #         - GEOM.SI_V_F(3) - V/V, V/E, E/E and V/F interferences
11077         #         - GEOM.SI_E_F(4) - V/V, V/E, E/E, V/F and E/F interferences
11078         #         - GEOM.SI_ALL(5) - all interferences.
11079         #  @return TRUE, if the shape contains no self-intersections.
11080         #
11081         #  @ref tui_check_self_intersections_page "Example"
11082         @ManageTransactions("MeasuOp")
11083         def CheckSelfIntersections(self, theShape, theCheckLevel = GEOM.SI_ALL):
11084             """
11085             Detect self-intersections in the given shape.
11086
11087             Parameters:
11088                 theShape Shape to check.
11089                 theCheckLevel is the level of self-intersection check.
11090                   Possible input values are:
11091                    - GEOM.SI_V_V(0) - only V/V interferences
11092                    - GEOM.SI_V_E(1) - V/V and V/E interferences
11093                    - GEOM.SI_E_E(2) - V/V, V/E and E/E interferences
11094                    - GEOM.SI_V_F(3) - V/V, V/E, E/E and V/F interferences
11095                    - GEOM.SI_E_F(4) - V/V, V/E, E/E, V/F and E/F interferences
11096                    - GEOM.SI_ALL(5) - all interferences.
11097  
11098             Returns:
11099                 TRUE, if the shape contains no self-intersections.
11100             """
11101             # Example: see GEOM_TestMeasures.py
11102             (IsValid, Pairs) = self.MeasuOp.CheckSelfIntersections(theShape, EnumToLong(theCheckLevel))
11103             RaiseIfFailed("CheckSelfIntersections", self.MeasuOp)
11104             return IsValid
11105
11106         ## Detect intersections of the given shapes with algorithm based on mesh intersections.
11107         #  @param theShape1 First source object
11108         #  @param theShape2 Second source object
11109         #  @param theTolerance Specifies a distance between shapes used for detecting gaps:
11110         #         - if \a theTolerance <= 0, algorithm detects intersections (default behavior)
11111         #         - if \a theTolerance > 0, algorithm detects gaps
11112         #  @param theDeflection Linear deflection coefficient that specifies quality of tesselation:
11113         #         - if \a theDeflection <= 0, default deflection 0.001 is used
11114         #  @return TRUE, if there are intersections (gaps) between source shapes
11115         #  @return List of sub-shapes IDs from 1st shape that localize intersection.
11116         #  @return List of sub-shapes IDs from 2nd shape that localize intersection.
11117         #
11118         #  @ref tui_fast_intersection_page "Example"
11119         @ManageTransactions("MeasuOp")
11120         def FastIntersect(self, theShape1, theShape2, theTolerance = 0.0, theDeflection = 0.001):
11121             """
11122             Detect intersections of the given shapes with algorithm based on mesh intersections.
11123
11124             Parameters:
11125                 theShape1 First source object
11126                 theShape2 Second source object
11127                 theTolerance Specifies a distance between shapes used for detecting gaps:
11128                     - if theTolerance <= 0, algorithm detects intersections (default behavior)
11129                     - if theTolerance > 0, algorithm detects gaps
11130                 theDeflection Linear deflection coefficient that specifies quality of tesselation:
11131                     - if theDeflection <= 0, default deflection 0.001 is used
11132  
11133             Returns:
11134                 TRUE, if there are intersections (gaps) between source shapes
11135                 List of sub-shapes IDs from 1st shape that localize intersection.
11136                 List of sub-shapes IDs from 2nd shape that localize intersection.
11137             """
11138             # Example: see GEOM_TestMeasures.py
11139             IsOk, Res1, Res2 = self.MeasuOp.FastIntersect(theShape1, theShape2, theTolerance, theDeflection)
11140             RaiseIfFailed("FastIntersect", self.MeasuOp)
11141             return IsOk, Res1, Res2
11142
11143         ## Get position (LCS) of theShape.
11144         #
11145         #  Origin of the LCS is situated at the shape's center of mass.
11146         #  Axes of the LCS are obtained from shape's location or,
11147         #  if the shape is a planar face, from position of its plane.
11148         #
11149         #  @param theShape Shape to calculate position of.
11150         #  @return [Ox,Oy,Oz, Zx,Zy,Zz, Xx,Xy,Xz].
11151         #          Ox,Oy,Oz: Coordinates of shape's LCS origin.
11152         #          Zx,Zy,Zz: Coordinates of shape's LCS normal(main) direction.
11153         #          Xx,Xy,Xz: Coordinates of shape's LCS X direction.
11154         #
11155         #  @ref swig_todo "Example"
11156         @ManageTransactions("MeasuOp")
11157         def GetPosition(self,theShape):
11158             """
11159             Get position (LCS) of theShape.
11160             Origin of the LCS is situated at the shape's center of mass.
11161             Axes of the LCS are obtained from shape's location or,
11162             if the shape is a planar face, from position of its plane.
11163
11164             Parameters:
11165                 theShape Shape to calculate position of.
11166
11167             Returns:
11168                 [Ox,Oy,Oz, Zx,Zy,Zz, Xx,Xy,Xz].
11169                  Ox,Oy,Oz: Coordinates of shape's LCS origin.
11170                  Zx,Zy,Zz: Coordinates of shape's LCS normal(main) direction.
11171                  Xx,Xy,Xz: Coordinates of shape's LCS X direction.
11172             """
11173             # Example: see GEOM_TestMeasures.py
11174             aTuple = self.MeasuOp.GetPosition(theShape)
11175             RaiseIfFailed("GetPosition", self.MeasuOp)
11176             return aTuple
11177
11178         ## Get kind of theShape.
11179         #
11180         #  @param theShape Shape to get a kind of.
11181         #  @return Returns a kind of shape in terms of <VAR>GEOM.GEOM_IKindOfShape.shape_kind</VAR> enumeration
11182         #          and a list of parameters, describing the shape.
11183         #  @note  Concrete meaning of each value, returned via \a theIntegers
11184         #         or \a theDoubles list depends on the kind() of the shape.
11185         #
11186         #  @ref swig_todo "Example"
11187         @ManageTransactions("MeasuOp")
11188         def KindOfShape(self,theShape):
11189             """
11190             Get kind of theShape.
11191
11192             Parameters:
11193                 theShape Shape to get a kind of.
11194
11195             Returns:
11196                 a kind of shape in terms of GEOM_IKindOfShape.shape_kind enumeration
11197                     and a list of parameters, describing the shape.
11198             Note:
11199                 Concrete meaning of each value, returned via theIntegers
11200                 or theDoubles list depends on the geompy.kind of the shape
11201             """
11202             # Example: see GEOM_TestMeasures.py
11203             aRoughTuple = self.MeasuOp.KindOfShape(theShape)
11204             RaiseIfFailed("KindOfShape", self.MeasuOp)
11205
11206             aKind  = aRoughTuple[0]
11207             anInts = aRoughTuple[1]
11208             aDbls  = aRoughTuple[2]
11209
11210             # Now there is no exception from this rule:
11211             aKindTuple = [aKind] + aDbls + anInts
11212
11213             # If they are we will regroup parameters for such kind of shape.
11214             # For example:
11215             #if aKind == kind.SOME_KIND:
11216             #    #  SOME_KIND     int int double int double double
11217             #    aKindTuple = [aKind, anInts[0], anInts[1], aDbls[0], anInts[2], aDbls[1], aDbls[2]]
11218
11219             return aKindTuple
11220
11221         ## Returns the string that describes if the shell is good for solid.
11222         #  This is a support method for MakeSolid.
11223         #
11224         #  @param theShell the shell to be checked.
11225         #  @return Returns a string that describes the shell validity for
11226         #          solid construction.
11227         @ManageTransactions("MeasuOp")
11228         def _IsGoodForSolid(self, theShell):
11229             """
11230             Returns the string that describes if the shell is good for solid.
11231             This is a support method for MakeSolid.
11232
11233             Parameter:
11234                 theShell the shell to be checked.
11235
11236             Returns:
11237                 Returns a string that describes the shell validity for
11238                 solid construction.
11239             """
11240             aDescr = self.MeasuOp.IsGoodForSolid(theShell)
11241             return aDescr
11242
11243         # end of l2_measure
11244         ## @}
11245
11246         ## @addtogroup l2_import_export
11247         ## @{
11248
11249         ## Import a shape from the BREP, IGES, STEP or other file
11250         #  (depends on given format) with given name.
11251         #
11252         #  Note: this function is deprecated, it is kept for backward compatibility only
11253         #  Use Import<FormatName> instead, where <FormatName> is a name of desirable format to import.
11254         #
11255         #  @param theFileName The file, containing the shape.
11256         #  @param theFormatName Specify format for the file reading.
11257         #         Available formats can be obtained with InsertOp.ImportTranslators() method.
11258         #         If format 'IGES_SCALE' is used instead of 'IGES' or
11259         #            format 'STEP_SCALE' is used instead of 'STEP',
11260         #            length unit will be set to 'meter' and result model will be scaled.
11261         #  @param theName Object name; when specified, this parameter is used
11262         #         for result publication in the study. Otherwise, if automatic
11263         #         publication is switched on, default value is used for result name.
11264         #
11265         #  @return New GEOM.GEOM_Object, containing the imported shape.
11266         #          If material names are imported it returns the list of
11267         #          objects. The first one is the imported object followed by
11268         #          material groups.
11269         #  @note Auto publishing is allowed for the shape itself. Imported
11270         #        material groups are not automatically published.
11271         #
11272         #  @ref swig_Import_Export "Example"
11273         @ManageTransactions("InsertOp")
11274         def ImportFile(self, theFileName, theFormatName, theName=None):
11275             """
11276             Import a shape from the BREP, IGES, STEP or other file
11277             (depends on given format) with given name.
11278
11279             Note: this function is deprecated, it is kept for backward compatibility only
11280             Use Import<FormatName> instead, where <FormatName> is a name of desirable format to import.
11281
11282             Parameters: 
11283                 theFileName The file, containing the shape.
11284                 theFormatName Specify format for the file reading.
11285                     Available formats can be obtained with geompy.InsertOp.ImportTranslators() method.
11286                     If format 'IGES_SCALE' is used instead of 'IGES' or
11287                        format 'STEP_SCALE' is used instead of 'STEP',
11288                        length unit will be set to 'meter' and result model will be scaled.
11289                 theName Object name; when specified, this parameter is used
11290                         for result publication in the study. Otherwise, if automatic
11291                         publication is switched on, default value is used for result name.
11292
11293             Returns:
11294                 New GEOM.GEOM_Object, containing the imported shape.
11295                 If material names are imported it returns the list of
11296                 objects. The first one is the imported object followed by
11297                 material groups.
11298             Note:
11299                 Auto publishing is allowed for the shape itself. Imported
11300                 material groups are not automatically published.
11301             """
11302             # Example: see GEOM_TestOthers.py
11303             print """
11304             WARNING: Function ImportFile is deprecated, use Import<FormatName> instead,
11305             where <FormatName> is a name of desirable format for importing.
11306             """
11307             aListObj = self.InsertOp.ImportFile(theFileName, theFormatName)
11308             RaiseIfFailed("ImportFile", self.InsertOp)
11309             aNbObj = len(aListObj)
11310             if aNbObj > 0:
11311                 self._autoPublish(aListObj[0], theName, "imported")
11312             if aNbObj == 1:
11313                 return aListObj[0]
11314             return aListObj
11315
11316         ## Deprecated analog of ImportFile()
11317         def Import(self, theFileName, theFormatName, theName=None):
11318             """
11319             Deprecated analog of geompy.ImportFile, kept for backward compatibility only.
11320             """
11321             # note: auto-publishing is done in self.ImportFile()
11322             return self.ImportFile(theFileName, theFormatName, theName)
11323
11324         ## Read a shape from the binary stream, containing its bounding representation (BRep).
11325         #  @note This method will not be dumped to the python script by DumpStudy functionality.
11326         #  @note GEOM.GEOM_Object.GetShapeStream() method can be used to obtain the shape's BRep stream.
11327         #  @param theStream The BRep binary stream.
11328         #  @param theName Object name; when specified, this parameter is used
11329         #         for result publication in the study. Otherwise, if automatic
11330         #         publication is switched on, default value is used for result name.
11331         #
11332         #  @return New GEOM_Object, containing the shape, read from theStream.
11333         #
11334         #  @ref swig_Import_Export "Example"
11335         @ManageTransactions("InsertOp")
11336         def RestoreShape (self, theStream, theName=None):
11337             """
11338             Read a shape from the binary stream, containing its bounding representation (BRep).
11339
11340             Note:
11341                 shape.GetShapeStream() method can be used to obtain the shape's BRep stream.
11342
11343             Parameters:
11344                 theStream The BRep binary stream.
11345                 theName Object name; when specified, this parameter is used
11346                         for result publication in the study. Otherwise, if automatic
11347                         publication is switched on, default value is used for result name.
11348
11349             Returns:
11350                 New GEOM_Object, containing the shape, read from theStream.
11351             """
11352             # Example: see GEOM_TestOthers.py
11353             anObj = self.InsertOp.RestoreShape(theStream)
11354             RaiseIfFailed("RestoreShape", self.InsertOp)
11355             self._autoPublish(anObj, theName, "restored")
11356             return anObj
11357
11358         ## Export the given shape into a file with given name.
11359         #
11360         #  Note: this function is deprecated, it is kept for backward compatibility only
11361         #  Use Export<FormatName> instead, where <FormatName> is a name of desirable format to export.
11362         #
11363         #  @param theObject Shape to be stored in the file.
11364         #  @param theFileName Name of the file to store the given shape in.
11365         #  @param theFormatName Specify format for the shape storage.
11366         #         Available formats can be obtained with
11367         #         geompy.InsertOp.ExportTranslators()[0] method.
11368         #
11369         #  @ref swig_Import_Export "Example"
11370         @ManageTransactions("InsertOp")
11371         def Export(self, theObject, theFileName, theFormatName):
11372             """
11373             Export the given shape into a file with given name.
11374
11375             Note: this function is deprecated, it is kept for backward compatibility only
11376             Use Export<FormatName> instead, where <FormatName> is a name of desirable format to export.
11377             
11378             Parameters: 
11379                 theObject Shape to be stored in the file.
11380                 theFileName Name of the file to store the given shape in.
11381                 theFormatName Specify format for the shape storage.
11382                               Available formats can be obtained with
11383                               geompy.InsertOp.ExportTranslators()[0] method.
11384             """
11385             # Example: see GEOM_TestOthers.py
11386             print """
11387             WARNING: Function Export is deprecated, use Export<FormatName> instead,
11388             where <FormatName> is a name of desirable format for exporting.
11389             """
11390             self.InsertOp.Export(theObject, theFileName, theFormatName)
11391             if self.InsertOp.IsDone() == 0:
11392                 raise RuntimeError,  "Export : " + self.InsertOp.GetErrorCode()
11393                 pass
11394             pass
11395
11396         # end of l2_import_export
11397         ## @}
11398
11399         ## @addtogroup l3_blocks
11400         ## @{
11401
11402         ## Create a quadrangle face from four edges. Order of Edges is not
11403         #  important. It is  not necessary that edges share the same vertex.
11404         #  @param E1,E2,E3,E4 Edges for the face bound.
11405         #  @param theName Object name; when specified, this parameter is used
11406         #         for result publication in the study. Otherwise, if automatic
11407         #         publication is switched on, default value is used for result name.
11408         #
11409         #  @return New GEOM.GEOM_Object, containing the created face.
11410         #
11411         #  @ref tui_building_by_blocks_page "Example"
11412         @ManageTransactions("BlocksOp")
11413         def MakeQuad(self, E1, E2, E3, E4, theName=None):
11414             """
11415             Create a quadrangle face from four edges. Order of Edges is not
11416             important. It is  not necessary that edges share the same vertex.
11417
11418             Parameters:
11419                 E1,E2,E3,E4 Edges for the face bound.
11420                 theName Object name; when specified, this parameter is used
11421                         for result publication in the study. Otherwise, if automatic
11422                         publication is switched on, default value is used for result name.
11423
11424             Returns:
11425                 New GEOM.GEOM_Object, containing the created face.
11426
11427             Example of usage:
11428                 qface1 = geompy.MakeQuad(edge1, edge2, edge3, edge4)
11429             """
11430             # Example: see GEOM_Spanner.py
11431             anObj = self.BlocksOp.MakeQuad(E1, E2, E3, E4)
11432             RaiseIfFailed("MakeQuad", self.BlocksOp)
11433             self._autoPublish(anObj, theName, "quad")
11434             return anObj
11435
11436         ## Create a quadrangle face on two edges.
11437         #  The missing edges will be built by creating the shortest ones.
11438         #  @param E1,E2 Two opposite edges for the face.
11439         #  @param theName Object name; when specified, this parameter is used
11440         #         for result publication in the study. Otherwise, if automatic
11441         #         publication is switched on, default value is used for result name.
11442         #
11443         #  @return New GEOM.GEOM_Object, containing the created face.
11444         #
11445         #  @ref tui_building_by_blocks_page "Example"
11446         @ManageTransactions("BlocksOp")
11447         def MakeQuad2Edges(self, E1, E2, theName=None):
11448             """
11449             Create a quadrangle face on two edges.
11450             The missing edges will be built by creating the shortest ones.
11451
11452             Parameters:
11453                 E1,E2 Two opposite edges for the face.
11454                 theName Object name; when specified, this parameter is used
11455                         for result publication in the study. Otherwise, if automatic
11456                         publication is switched on, default value is used for result name.
11457
11458             Returns:
11459                 New GEOM.GEOM_Object, containing the created face.
11460
11461             Example of usage:
11462                 # create vertices
11463                 p1 = geompy.MakeVertex(  0.,   0.,   0.)
11464                 p2 = geompy.MakeVertex(150.,  30.,   0.)
11465                 p3 = geompy.MakeVertex(  0., 120.,  50.)
11466                 p4 = geompy.MakeVertex(  0.,  40.,  70.)
11467                 # create edges
11468                 edge1 = geompy.MakeEdge(p1, p2)
11469                 edge2 = geompy.MakeEdge(p3, p4)
11470                 # create a quadrangle face from two edges
11471                 qface2 = geompy.MakeQuad2Edges(edge1, edge2)
11472             """
11473             # Example: see GEOM_Spanner.py
11474             anObj = self.BlocksOp.MakeQuad2Edges(E1, E2)
11475             RaiseIfFailed("MakeQuad2Edges", self.BlocksOp)
11476             self._autoPublish(anObj, theName, "quad")
11477             return anObj
11478
11479         ## Create a quadrangle face with specified corners.
11480         #  The missing edges will be built by creating the shortest ones.
11481         #  @param V1,V2,V3,V4 Corner vertices for the face.
11482         #  @param theName Object name; when specified, this parameter is used
11483         #         for result publication in the study. Otherwise, if automatic
11484         #         publication is switched on, default value is used for result name.
11485         #
11486         #  @return New GEOM.GEOM_Object, containing the created face.
11487         #
11488         #  @ref tui_building_by_blocks_page "Example 1"
11489         #  \n @ref swig_MakeQuad4Vertices "Example 2"
11490         @ManageTransactions("BlocksOp")
11491         def MakeQuad4Vertices(self, V1, V2, V3, V4, theName=None):
11492             """
11493             Create a quadrangle face with specified corners.
11494             The missing edges will be built by creating the shortest ones.
11495
11496             Parameters:
11497                 V1,V2,V3,V4 Corner vertices for the face.
11498                 theName Object name; when specified, this parameter is used
11499                         for result publication in the study. Otherwise, if automatic
11500                         publication is switched on, default value is used for result name.
11501
11502             Returns:
11503                 New GEOM.GEOM_Object, containing the created face.
11504
11505             Example of usage:
11506                 # create vertices
11507                 p1 = geompy.MakeVertex(  0.,   0.,   0.)
11508                 p2 = geompy.MakeVertex(150.,  30.,   0.)
11509                 p3 = geompy.MakeVertex(  0., 120.,  50.)
11510                 p4 = geompy.MakeVertex(  0.,  40.,  70.)
11511                 # create a quadrangle from four points in its corners
11512                 qface3 = geompy.MakeQuad4Vertices(p1, p2, p3, p4)
11513             """
11514             # Example: see GEOM_Spanner.py
11515             anObj = self.BlocksOp.MakeQuad4Vertices(V1, V2, V3, V4)
11516             RaiseIfFailed("MakeQuad4Vertices", self.BlocksOp)
11517             self._autoPublish(anObj, theName, "quad")
11518             return anObj
11519
11520         ## Create a hexahedral solid, bounded by the six given faces. Order of
11521         #  faces is not important. It is  not necessary that Faces share the same edge.
11522         #  @param F1,F2,F3,F4,F5,F6 Faces for the hexahedral solid.
11523         #  @param theName Object name; when specified, this parameter is used
11524         #         for result publication in the study. Otherwise, if automatic
11525         #         publication is switched on, default value is used for result name.
11526         #
11527         #  @return New GEOM.GEOM_Object, containing the created solid.
11528         #
11529         #  @ref tui_building_by_blocks_page "Example 1"
11530         #  \n @ref swig_MakeHexa "Example 2"
11531         @ManageTransactions("BlocksOp")
11532         def MakeHexa(self, F1, F2, F3, F4, F5, F6, theName=None):
11533             """
11534             Create a hexahedral solid, bounded by the six given faces. Order of
11535             faces is not important. It is  not necessary that Faces share the same edge.
11536
11537             Parameters:
11538                 F1,F2,F3,F4,F5,F6 Faces for the hexahedral solid.
11539                 theName Object name; when specified, this parameter is used
11540                         for result publication in the study. Otherwise, if automatic
11541                         publication is switched on, default value is used for result name.
11542
11543             Returns:
11544                 New GEOM.GEOM_Object, containing the created solid.
11545
11546             Example of usage:
11547                 solid = geompy.MakeHexa(qface1, qface2, qface3, qface4, qface5, qface6)
11548             """
11549             # Example: see GEOM_Spanner.py
11550             anObj = self.BlocksOp.MakeHexa(F1, F2, F3, F4, F5, F6)
11551             RaiseIfFailed("MakeHexa", self.BlocksOp)
11552             self._autoPublish(anObj, theName, "hexa")
11553             return anObj
11554
11555         ## Create a hexahedral solid between two given faces.
11556         #  The missing faces will be built by creating the smallest ones.
11557         #  @param F1,F2 Two opposite faces for the hexahedral solid.
11558         #  @param theName Object name; when specified, this parameter is used
11559         #         for result publication in the study. Otherwise, if automatic
11560         #         publication is switched on, default value is used for result name.
11561         #
11562         #  @return New GEOM.GEOM_Object, containing the created solid.
11563         #
11564         #  @ref tui_building_by_blocks_page "Example 1"
11565         #  \n @ref swig_MakeHexa2Faces "Example 2"
11566         @ManageTransactions("BlocksOp")
11567         def MakeHexa2Faces(self, F1, F2, theName=None):
11568             """
11569             Create a hexahedral solid between two given faces.
11570             The missing faces will be built by creating the smallest ones.
11571
11572             Parameters:
11573                 F1,F2 Two opposite faces for the hexahedral solid.
11574                 theName Object name; when specified, this parameter is used
11575                         for result publication in the study. Otherwise, if automatic
11576                         publication is switched on, default value is used for result name.
11577
11578             Returns:
11579                 New GEOM.GEOM_Object, containing the created solid.
11580
11581             Example of usage:
11582                 solid1 = geompy.MakeHexa2Faces(qface1, qface2)
11583             """
11584             # Example: see GEOM_Spanner.py
11585             anObj = self.BlocksOp.MakeHexa2Faces(F1, F2)
11586             RaiseIfFailed("MakeHexa2Faces", self.BlocksOp)
11587             self._autoPublish(anObj, theName, "hexa")
11588             return anObj
11589
11590         # end of l3_blocks
11591         ## @}
11592
11593         ## @addtogroup l3_blocks_op
11594         ## @{
11595
11596         ## Get a vertex, found in the given shape by its coordinates.
11597         #  @param theShape Block or a compound of blocks.
11598         #  @param theX,theY,theZ Coordinates of the sought vertex.
11599         #  @param theEpsilon Maximum allowed distance between the resulting
11600         #                    vertex and point with the given coordinates.
11601         #  @param theName Object name; when specified, this parameter is used
11602         #         for result publication in the study. Otherwise, if automatic
11603         #         publication is switched on, default value is used for result name.
11604         #
11605         #  @return New GEOM.GEOM_Object, containing the found vertex.
11606         #
11607         #  @ref swig_GetPoint "Example"
11608         @ManageTransactions("BlocksOp")
11609         def GetPoint(self, theShape, theX, theY, theZ, theEpsilon, theName=None):
11610             """
11611             Get a vertex, found in the given shape by its coordinates.
11612
11613             Parameters:
11614                 theShape Block or a compound of blocks.
11615                 theX,theY,theZ Coordinates of the sought vertex.
11616                 theEpsilon Maximum allowed distance between the resulting
11617                            vertex and point with the given coordinates.
11618                 theName Object name; when specified, this parameter is used
11619                         for result publication in the study. Otherwise, if automatic
11620                         publication is switched on, default value is used for result name.
11621
11622             Returns:
11623                 New GEOM.GEOM_Object, containing the found vertex.
11624
11625             Example of usage:
11626                 pnt = geompy.GetPoint(shape, -50,  50,  50, 0.01)
11627             """
11628             # Example: see GEOM_TestOthers.py
11629             anObj = self.BlocksOp.GetPoint(theShape, theX, theY, theZ, theEpsilon)
11630             RaiseIfFailed("GetPoint", self.BlocksOp)
11631             self._autoPublish(anObj, theName, "vertex")
11632             return anObj
11633
11634         ## Find a vertex of the given shape, which has minimal distance to the given point.
11635         #  @param theShape Any shape.
11636         #  @param thePoint Point, close to the desired vertex.
11637         #  @param theName Object name; when specified, this parameter is used
11638         #         for result publication in the study. Otherwise, if automatic
11639         #         publication is switched on, default value is used for result name.
11640         #
11641         #  @return New GEOM.GEOM_Object, containing the found vertex.
11642         #
11643         #  @ref swig_GetVertexNearPoint "Example"
11644         @ManageTransactions("BlocksOp")
11645         def GetVertexNearPoint(self, theShape, thePoint, theName=None):
11646             """
11647             Find a vertex of the given shape, which has minimal distance to the given point.
11648
11649             Parameters:
11650                 theShape Any shape.
11651                 thePoint Point, close to the desired vertex.
11652                 theName Object name; when specified, this parameter is used
11653                         for result publication in the study. Otherwise, if automatic
11654                         publication is switched on, default value is used for result name.
11655
11656             Returns:
11657                 New GEOM.GEOM_Object, containing the found vertex.
11658
11659             Example of usage:
11660                 pmidle = geompy.MakeVertex(50, 0, 50)
11661                 edge1 = geompy.GetEdgeNearPoint(blocksComp, pmidle)
11662             """
11663             # Example: see GEOM_TestOthers.py
11664             anObj = self.BlocksOp.GetVertexNearPoint(theShape, thePoint)
11665             RaiseIfFailed("GetVertexNearPoint", self.BlocksOp)
11666             self._autoPublish(anObj, theName, "vertex")
11667             return anObj
11668
11669         ## Get an edge, found in the given shape by two given vertices.
11670         #  @param theShape Block or a compound of blocks.
11671         #  @param thePoint1,thePoint2 Points, close to the ends of the desired edge.
11672         #  @param theName Object name; when specified, this parameter is used
11673         #         for result publication in the study. Otherwise, if automatic
11674         #         publication is switched on, default value is used for result name.
11675         #
11676         #  @return New GEOM.GEOM_Object, containing the found edge.
11677         #
11678         #  @ref swig_GetEdge "Example"
11679         @ManageTransactions("BlocksOp")
11680         def GetEdge(self, theShape, thePoint1, thePoint2, theName=None):
11681             """
11682             Get an edge, found in the given shape by two given vertices.
11683
11684             Parameters:
11685                 theShape Block or a compound of blocks.
11686                 thePoint1,thePoint2 Points, close to the ends of the desired edge.
11687                 theName Object name; when specified, this parameter is used
11688                         for result publication in the study. Otherwise, if automatic
11689                         publication is switched on, default value is used for result name.
11690
11691             Returns:
11692                 New GEOM.GEOM_Object, containing the found edge.
11693             """
11694             # Example: see GEOM_Spanner.py
11695             anObj = self.BlocksOp.GetEdge(theShape, thePoint1, thePoint2)
11696             RaiseIfFailed("GetEdge", self.BlocksOp)
11697             self._autoPublish(anObj, theName, "edge")
11698             return anObj
11699
11700         ## Find an edge of the given shape, which has minimal distance to the given point.
11701         #  @param theShape Block or a compound of blocks.
11702         #  @param thePoint Point, close to the desired edge.
11703         #  @param theName Object name; when specified, this parameter is used
11704         #         for result publication in the study. Otherwise, if automatic
11705         #         publication is switched on, default value is used for result name.
11706         #
11707         #  @return New GEOM.GEOM_Object, containing the found edge.
11708         #
11709         #  @ref swig_GetEdgeNearPoint "Example"
11710         @ManageTransactions("BlocksOp")
11711         def GetEdgeNearPoint(self, theShape, thePoint, theName=None):
11712             """
11713             Find an edge of the given shape, which has minimal distance to the given point.
11714
11715             Parameters:
11716                 theShape Block or a compound of blocks.
11717                 thePoint Point, close to the desired edge.
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 found edge.
11724             """
11725             # Example: see GEOM_TestOthers.py
11726             anObj = self.BlocksOp.GetEdgeNearPoint(theShape, thePoint)
11727             RaiseIfFailed("GetEdgeNearPoint", self.BlocksOp)
11728             self._autoPublish(anObj, theName, "edge")
11729             return anObj
11730
11731         ## Returns a face, found in the given shape by four given corner vertices.
11732         #  @param theShape Block or a compound of blocks.
11733         #  @param thePoint1,thePoint2,thePoint3,thePoint4 Points, close to the corners of the desired face.
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 found face.
11739         #
11740         #  @ref swig_todo "Example"
11741         @ManageTransactions("BlocksOp")
11742         def GetFaceByPoints(self, theShape, thePoint1, thePoint2, thePoint3, thePoint4, theName=None):
11743             """
11744             Returns a face, found in the given shape by four given corner vertices.
11745
11746             Parameters:
11747                 theShape Block or a compound of blocks.
11748                 thePoint1,thePoint2,thePoint3,thePoint4 Points, close to the corners of the desired face.
11749                 theName Object name; when specified, this parameter is used
11750                         for result publication in the study. Otherwise, if automatic
11751                         publication is switched on, default value is used for result name.
11752
11753             Returns:
11754                 New GEOM.GEOM_Object, containing the found face.
11755             """
11756             # Example: see GEOM_Spanner.py
11757             anObj = self.BlocksOp.GetFaceByPoints(theShape, thePoint1, thePoint2, thePoint3, thePoint4)
11758             RaiseIfFailed("GetFaceByPoints", self.BlocksOp)
11759             self._autoPublish(anObj, theName, "face")
11760             return anObj
11761
11762         ## Get a face of block, found in the given shape by two given edges.
11763         #  @param theShape Block or a compound of blocks.
11764         #  @param theEdge1,theEdge2 Edges, close to the edges of the desired face.
11765         #  @param theName Object name; when specified, this parameter is used
11766         #         for result publication in the study. Otherwise, if automatic
11767         #         publication is switched on, default value is used for result name.
11768         #
11769         #  @return New GEOM.GEOM_Object, containing the found face.
11770         #
11771         #  @ref swig_todo "Example"
11772         @ManageTransactions("BlocksOp")
11773         def GetFaceByEdges(self, theShape, theEdge1, theEdge2, theName=None):
11774             """
11775             Get a face of block, found in the given shape by two given edges.
11776
11777             Parameters:
11778                 theShape Block or a compound of blocks.
11779                 theEdge1,theEdge2 Edges, close to the edges of the desired face.
11780                 theName Object name; when specified, this parameter is used
11781                         for result publication in the study. Otherwise, if automatic
11782                         publication is switched on, default value is used for result name.
11783
11784             Returns:
11785                 New GEOM.GEOM_Object, containing the found face.
11786             """
11787             # Example: see GEOM_Spanner.py
11788             anObj = self.BlocksOp.GetFaceByEdges(theShape, theEdge1, theEdge2)
11789             RaiseIfFailed("GetFaceByEdges", self.BlocksOp)
11790             self._autoPublish(anObj, theName, "face")
11791             return anObj
11792
11793         ## Find a face, opposite to the given one in the given block.
11794         #  @param theBlock Must be a hexahedral solid.
11795         #  @param theFace Face of \a theBlock, opposite to the desired face.
11796         #  @param theName Object name; when specified, this parameter is used
11797         #         for result publication in the study. Otherwise, if automatic
11798         #         publication is switched on, default value is used for result name.
11799         #
11800         #  @return New GEOM.GEOM_Object, containing the found face.
11801         #
11802         #  @ref swig_GetOppositeFace "Example"
11803         @ManageTransactions("BlocksOp")
11804         def GetOppositeFace(self, theBlock, theFace, theName=None):
11805             """
11806             Find a face, opposite to the given one in the given block.
11807
11808             Parameters:
11809                 theBlock Must be a hexahedral solid.
11810                 theFace Face of theBlock, opposite to the desired face.
11811                 theName Object name; when specified, this parameter is used
11812                         for result publication in the study. Otherwise, if automatic
11813                         publication is switched on, default value is used for result name.
11814
11815             Returns:
11816                 New GEOM.GEOM_Object, containing the found face.
11817             """
11818             # Example: see GEOM_Spanner.py
11819             anObj = self.BlocksOp.GetOppositeFace(theBlock, theFace)
11820             RaiseIfFailed("GetOppositeFace", self.BlocksOp)
11821             self._autoPublish(anObj, theName, "face")
11822             return anObj
11823
11824         ## Find a face of the given shape, which has minimal distance to the given point.
11825         #  @param theShape Block or a compound of blocks.
11826         #  @param thePoint Point, close to the desired face.
11827         #  @param theName Object name; when specified, this parameter is used
11828         #         for result publication in the study. Otherwise, if automatic
11829         #         publication is switched on, default value is used for result name.
11830         #
11831         #  @return New GEOM.GEOM_Object, containing the found face.
11832         #
11833         #  @ref swig_GetFaceNearPoint "Example"
11834         @ManageTransactions("BlocksOp")
11835         def GetFaceNearPoint(self, theShape, thePoint, theName=None):
11836             """
11837             Find a face of the given shape, which has minimal distance to the given point.
11838
11839             Parameters:
11840                 theShape Block or a compound of blocks.
11841                 thePoint Point, close to the desired face.
11842                 theName Object name; when specified, this parameter is used
11843                         for result publication in the study. Otherwise, if automatic
11844                         publication is switched on, default value is used for result name.
11845
11846             Returns:
11847                 New GEOM.GEOM_Object, containing the found face.
11848             """
11849             # Example: see GEOM_Spanner.py
11850             anObj = self.BlocksOp.GetFaceNearPoint(theShape, thePoint)
11851             RaiseIfFailed("GetFaceNearPoint", self.BlocksOp)
11852             self._autoPublish(anObj, theName, "face")
11853             return anObj
11854
11855         ## Find a face of block, whose outside normale has minimal angle with the given vector.
11856         #  @param theBlock Block or a compound of blocks.
11857         #  @param theVector Vector, close to the normale of the desired face.
11858         #  @param theName Object name; when specified, this parameter is used
11859         #         for result publication in the study. Otherwise, if automatic
11860         #         publication is switched on, default value is used for result name.
11861         #
11862         #  @return New GEOM.GEOM_Object, containing the found face.
11863         #
11864         #  @ref swig_todo "Example"
11865         @ManageTransactions("BlocksOp")
11866         def GetFaceByNormale(self, theBlock, theVector, theName=None):
11867             """
11868             Find a face of block, whose outside normale has minimal angle with the given vector.
11869
11870             Parameters:
11871                 theBlock Block or a compound of blocks.
11872                 theVector Vector, close to the normale of the desired face.
11873                 theName Object name; when specified, this parameter is used
11874                         for result publication in the study. Otherwise, if automatic
11875                         publication is switched on, default value is used for result name.
11876
11877             Returns:
11878                 New GEOM.GEOM_Object, containing the found face.
11879             """
11880             # Example: see GEOM_Spanner.py
11881             anObj = self.BlocksOp.GetFaceByNormale(theBlock, theVector)
11882             RaiseIfFailed("GetFaceByNormale", self.BlocksOp)
11883             self._autoPublish(anObj, theName, "face")
11884             return anObj
11885
11886         ## Find all sub-shapes of type \a theShapeType of the given shape,
11887         #  which have minimal distance to the given point.
11888         #  @param theShape Any shape.
11889         #  @param thePoint Point, close to the desired shape.
11890         #  @param theShapeType Defines what kind of sub-shapes is searched GEOM::shape_type
11891         #  @param theTolerance The tolerance for distances comparison. All shapes
11892         #                      with distances to the given point in interval
11893         #                      [minimal_distance, minimal_distance + theTolerance] will be gathered.
11894         #  @param theName Object name; when specified, this parameter is used
11895         #         for result publication in the study. Otherwise, if automatic
11896         #         publication is switched on, default value is used for result name.
11897         #
11898         #  @return New GEOM_Object, containing a group of all found shapes.
11899         #
11900         #  @ref swig_GetShapesNearPoint "Example"
11901         @ManageTransactions("BlocksOp")
11902         def GetShapesNearPoint(self, theShape, thePoint, theShapeType, theTolerance = 1e-07, theName=None):
11903             """
11904             Find all sub-shapes of type theShapeType of the given shape,
11905             which have minimal distance to the given point.
11906
11907             Parameters:
11908                 theShape Any shape.
11909                 thePoint Point, close to the desired shape.
11910                 theShapeType Defines what kind of sub-shapes is searched (see GEOM::shape_type)
11911                 theTolerance The tolerance for distances comparison. All shapes
11912                                 with distances to the given point in interval
11913                                 [minimal_distance, minimal_distance + theTolerance] will be gathered.
11914                 theName Object name; when specified, this parameter is used
11915                         for result publication in the study. Otherwise, if automatic
11916                         publication is switched on, default value is used for result name.
11917
11918             Returns:
11919                 New GEOM_Object, containing a group of all found shapes.
11920             """
11921             # Example: see GEOM_TestOthers.py
11922             anObj = self.BlocksOp.GetShapesNearPoint(theShape, thePoint, theShapeType, theTolerance)
11923             RaiseIfFailed("GetShapesNearPoint", self.BlocksOp)
11924             self._autoPublish(anObj, theName, "group")
11925             return anObj
11926
11927         # end of l3_blocks_op
11928         ## @}
11929
11930         ## @addtogroup l4_blocks_measure
11931         ## @{
11932
11933         ## Check, if the compound of blocks is given.
11934         #  To be considered as a compound of blocks, the
11935         #  given shape must satisfy the following conditions:
11936         #  - Each element of the compound should be a Block (6 faces).
11937         #  - Each face should be a quadrangle, i.e. it should have only 1 wire
11938         #       with 4 edges. If <VAR>theIsUseC1</VAR> is set to True and
11939         #       there are more than 4 edges in the only wire of a face,
11940         #       this face is considered to be quadrangle if it has 4 bounds
11941         #       (1 or more edge) of C1 continuity.
11942         #  - A connection between two Blocks should be an entire quadrangle face or an entire edge.
11943         #  - The compound should be connexe.
11944         #  - The glue between two quadrangle faces should be applied.
11945         #  @param theCompound The compound to check.
11946         #  @param theIsUseC1 Flag to check if there are 4 bounds on a face
11947         #         taking into account C1 continuity.
11948         #  @param theAngTolerance the angular tolerance to check if two neighbor
11949         #         edges are codirectional in the common vertex with this
11950         #         tolerance. This parameter is used only if
11951         #         <VAR>theIsUseC1</VAR> is set to True.
11952         #  @return TRUE, if the given shape is a compound of blocks.
11953         #  If theCompound is not valid, prints all discovered errors.
11954         #
11955         #  @ref tui_check_compound_of_blocks_page "Example 1"
11956         #  \n @ref swig_CheckCompoundOfBlocks "Example 2"
11957         @ManageTransactions("BlocksOp")
11958         def CheckCompoundOfBlocks(self,theCompound, theIsUseC1 = False,
11959                                   theAngTolerance = 1.e-12):
11960             """
11961             Check, if the compound of blocks is given.
11962             To be considered as a compound of blocks, the
11963             given shape must satisfy the following conditions:
11964             - Each element of the compound should be a Block (6 faces).
11965             - Each face should be a quadrangle, i.e. it should have only 1 wire
11966                  with 4 edges. If theIsUseC1 is set to True and
11967                  there are more than 4 edges in the only wire of a face,
11968                  this face is considered to be quadrangle if it has 4 bounds
11969                  (1 or more edge) of C1 continuity.
11970             - A connection between two Blocks should be an entire quadrangle face or an entire edge.
11971             - The compound should be connexe.
11972             - The glue between two quadrangle faces should be applied.
11973
11974             Parameters:
11975                 theCompound The compound to check.
11976                 theIsUseC1 Flag to check if there are 4 bounds on a face
11977                            taking into account C1 continuity.
11978                 theAngTolerance the angular tolerance to check if two neighbor
11979                            edges are codirectional in the common vertex with this
11980                            tolerance. This parameter is used only if
11981                            theIsUseC1 is set to True.
11982
11983             Returns:
11984                 TRUE, if the given shape is a compound of blocks.
11985                 If theCompound is not valid, prints all discovered errors.
11986             """
11987             # Example: see GEOM_Spanner.py
11988             aTolerance = -1.0
11989             if theIsUseC1:
11990                 aTolerance = theAngTolerance
11991             (IsValid, BCErrors) = self.BlocksOp.CheckCompoundOfBlocks(theCompound, aTolerance)
11992             RaiseIfFailed("CheckCompoundOfBlocks", self.BlocksOp)
11993             if IsValid == 0:
11994                 Descr = self.BlocksOp.PrintBCErrors(theCompound, BCErrors)
11995                 print Descr
11996             return IsValid
11997
11998         ## Retrieve all non blocks solids and faces from \a theShape.
11999         #  @param theShape The shape to explore.
12000         #  @param theIsUseC1 Flag to check if there are 4 bounds on a face
12001         #         taking into account C1 continuity.
12002         #  @param theAngTolerance the angular tolerance to check if two neighbor
12003         #         edges are codirectional in the common vertex with this
12004         #         tolerance. This parameter is used only if
12005         #         <VAR>theIsUseC1</VAR> is set to True.
12006         #  @param theName Object name; when specified, this parameter is used
12007         #         for result publication in the study. Otherwise, if automatic
12008         #         publication is switched on, default value is used for result name.
12009         #
12010         #  @return A tuple of two GEOM_Objects. The first object is a group of all
12011         #          non block solids (= not 6 faces, or with 6 faces, but with the
12012         #          presence of non-quadrangular faces). The second object is a
12013         #          group of all non quadrangular faces (= faces with more then
12014         #          1 wire or, if <VAR>theIsUseC1</VAR> is set to True, faces
12015         #          with 1 wire with not 4 edges that do not form 4 bounds of
12016         #          C1 continuity).
12017         #
12018         #  @ref tui_get_non_blocks_page "Example 1"
12019         #  \n @ref swig_GetNonBlocks "Example 2"
12020         @ManageTransactions("BlocksOp")
12021         def GetNonBlocks (self, theShape, theIsUseC1 = False,
12022                           theAngTolerance = 1.e-12, theName=None):
12023             """
12024             Retrieve all non blocks solids and faces from theShape.
12025
12026             Parameters:
12027                 theShape The shape to explore.
12028                 theIsUseC1 Flag to check if there are 4 bounds on a face
12029                            taking into account C1 continuity.
12030                 theAngTolerance the angular tolerance to check if two neighbor
12031                            edges are codirectional in the common vertex with this
12032                            tolerance. This parameter is used only if
12033                            theIsUseC1 is set to True.
12034                 theName Object name; when specified, this parameter is used
12035                         for result publication in the study. Otherwise, if automatic
12036                         publication is switched on, default value is used for result name.
12037
12038             Returns:
12039                 A tuple of two GEOM_Objects. The first object is a group of all
12040                 non block solids (= not 6 faces, or with 6 faces, but with the
12041                 presence of non-quadrangular faces). The second object is a
12042                 group of all non quadrangular faces (= faces with more then
12043                 1 wire or, if <VAR>theIsUseC1</VAR> is set to True, faces
12044                 with 1 wire with not 4 edges that do not form 4 bounds of
12045                 C1 continuity).
12046
12047             Usage:
12048                 (res_sols, res_faces) = geompy.GetNonBlocks(myShape1)
12049             """
12050             # Example: see GEOM_Spanner.py
12051             aTolerance = -1.0
12052             if theIsUseC1:
12053                 aTolerance = theAngTolerance
12054             aTuple = self.BlocksOp.GetNonBlocks(theShape, aTolerance)
12055             RaiseIfFailed("GetNonBlocks", self.BlocksOp)
12056             self._autoPublish(aTuple, theName, ("groupNonHexas", "groupNonQuads"))
12057             return aTuple
12058
12059         ## Remove all seam and degenerated edges from \a theShape.
12060         #  Unite faces and edges, sharing one surface. It means that
12061         #  this faces must have references to one C++ surface object (handle).
12062         #  @param theShape The compound or single solid to remove irregular edges from.
12063         #  @param doUnionFaces If True, then unite faces. If False (the default value),
12064         #         do not unite faces.
12065         #  @param theName Object name; when specified, this parameter is used
12066         #         for result publication in the study. Otherwise, if automatic
12067         #         publication is switched on, default value is used for result name.
12068         #
12069         #  @return Improved shape.
12070         #
12071         #  @ref swig_RemoveExtraEdges "Example"
12072         @ManageTransactions("BlocksOp")
12073         def RemoveExtraEdges(self, theShape, doUnionFaces=False, theName=None):
12074             """
12075             Remove all seam and degenerated edges from theShape.
12076             Unite faces and edges, sharing one surface. It means that
12077             this faces must have references to one C++ surface object (handle).
12078
12079             Parameters:
12080                 theShape The compound or single solid to remove irregular edges from.
12081                 doUnionFaces If True, then unite faces. If False (the default value),
12082                              do not unite faces.
12083                 theName Object name; when specified, this parameter is used
12084                         for result publication in the study. Otherwise, if automatic
12085                         publication is switched on, default value is used for result name.
12086
12087             Returns:
12088                 Improved shape.
12089             """
12090             # Example: see GEOM_TestOthers.py
12091             nbFacesOptimum = -1 # -1 means do not unite faces
12092             if doUnionFaces is True: nbFacesOptimum = 0 # 0 means unite faces
12093             anObj = self.BlocksOp.RemoveExtraEdges(theShape, nbFacesOptimum)
12094             RaiseIfFailed("RemoveExtraEdges", self.BlocksOp)
12095             self._autoPublish(anObj, theName, "removeExtraEdges")
12096             return anObj
12097
12098         ## Performs union faces of \a theShape
12099         #  Unite faces sharing one surface. It means that
12100         #  these faces must have references to one C++ surface object (handle).
12101         #  @param theShape The compound or single solid that contains faces
12102         #         to perform union.
12103         #  @param theName Object name; when specified, this parameter is used
12104         #         for result publication in the study. Otherwise, if automatic
12105         #         publication is switched on, default value is used for result name.
12106         #
12107         #  @return Improved shape.
12108         #
12109         #  @ref swig_UnionFaces "Example"
12110         @ManageTransactions("BlocksOp")
12111         def UnionFaces(self, theShape, theName=None):
12112             """
12113             Performs union faces of theShape.
12114             Unite faces sharing one surface. It means that
12115             these faces must have references to one C++ surface object (handle).
12116
12117             Parameters:
12118                 theShape The compound or single solid that contains faces
12119                          to perform union.
12120                 theName Object name; when specified, this parameter is used
12121                         for result publication in the study. Otherwise, if automatic
12122                         publication is switched on, default value is used for result name.
12123
12124             Returns:
12125                 Improved shape.
12126             """
12127             # Example: see GEOM_TestOthers.py
12128             anObj = self.BlocksOp.UnionFaces(theShape)
12129             RaiseIfFailed("UnionFaces", self.BlocksOp)
12130             self._autoPublish(anObj, theName, "unionFaces")
12131             return anObj
12132
12133         ## Check, if the given shape is a blocks compound.
12134         #  Fix all detected errors.
12135         #    \note Single block can be also fixed by this method.
12136         #  @param theShape The compound to check and improve.
12137         #  @param theName Object name; when specified, this parameter is used
12138         #         for result publication in the study. Otherwise, if automatic
12139         #         publication is switched on, default value is used for result name.
12140         #
12141         #  @return Improved compound.
12142         #
12143         #  @ref swig_CheckAndImprove "Example"
12144         @ManageTransactions("BlocksOp")
12145         def CheckAndImprove(self, theShape, theName=None):
12146             """
12147             Check, if the given shape is a blocks compound.
12148             Fix all detected errors.
12149
12150             Note:
12151                 Single block can be also fixed by this method.
12152
12153             Parameters:
12154                 theShape The compound to check and improve.
12155                 theName Object name; when specified, this parameter is used
12156                         for result publication in the study. Otherwise, if automatic
12157                         publication is switched on, default value is used for result name.
12158
12159             Returns:
12160                 Improved compound.
12161             """
12162             # Example: see GEOM_TestOthers.py
12163             anObj = self.BlocksOp.CheckAndImprove(theShape)
12164             RaiseIfFailed("CheckAndImprove", self.BlocksOp)
12165             self._autoPublish(anObj, theName, "improved")
12166             return anObj
12167
12168         # end of l4_blocks_measure
12169         ## @}
12170
12171         ## @addtogroup l3_blocks_op
12172         ## @{
12173
12174         ## Get all the blocks, contained in the given compound.
12175         #  @param theCompound The compound to explode.
12176         #  @param theMinNbFaces If solid has lower number of faces, it is not a block.
12177         #  @param theMaxNbFaces If solid has higher number of faces, it is not a block.
12178         #  @param theName Object name; when specified, this parameter is used
12179         #         for result publication in the study. Otherwise, if automatic
12180         #         publication is switched on, default value is used for result name.
12181         #
12182         #  @note If theMaxNbFaces = 0, the maximum number of faces is not restricted.
12183         #
12184         #  @return List of GEOM.GEOM_Object, containing the retrieved blocks.
12185         #
12186         #  @ref tui_explode_on_blocks "Example 1"
12187         #  \n @ref swig_MakeBlockExplode "Example 2"
12188         @ManageTransactions("BlocksOp")
12189         def MakeBlockExplode(self, theCompound, theMinNbFaces, theMaxNbFaces, theName=None):
12190             """
12191             Get all the blocks, contained in the given compound.
12192
12193             Parameters:
12194                 theCompound The compound to explode.
12195                 theMinNbFaces If solid has lower number of faces, it is not a block.
12196                 theMaxNbFaces If solid has higher number of faces, it is not a block.
12197                 theName Object name; when specified, this parameter is used
12198                         for result publication in the study. Otherwise, if automatic
12199                         publication is switched on, default value is used for result name.
12200
12201             Note:
12202                 If theMaxNbFaces = 0, the maximum number of faces is not restricted.
12203
12204             Returns:
12205                 List of GEOM.GEOM_Object, containing the retrieved blocks.
12206             """
12207             # Example: see GEOM_TestOthers.py
12208             theMinNbFaces,theMaxNbFaces,Parameters = ParseParameters(theMinNbFaces,theMaxNbFaces)
12209             aList = self.BlocksOp.ExplodeCompoundOfBlocks(theCompound, theMinNbFaces, theMaxNbFaces)
12210             RaiseIfFailed("ExplodeCompoundOfBlocks", self.BlocksOp)
12211             for anObj in aList:
12212                 anObj.SetParameters(Parameters)
12213                 pass
12214             self._autoPublish(aList, theName, "block")
12215             return aList
12216
12217         ## Find block, containing the given point inside its volume or on boundary.
12218         #  @param theCompound Compound, to find block in.
12219         #  @param thePoint Point, close to the desired block. If the point lays on
12220         #         boundary between some blocks, we return block with nearest center.
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.GEOM_Object, containing the found block.
12226         #
12227         #  @ref swig_todo "Example"
12228         @ManageTransactions("BlocksOp")
12229         def GetBlockNearPoint(self, theCompound, thePoint, theName=None):
12230             """
12231             Find block, containing the given point inside its volume or on boundary.
12232
12233             Parameters:
12234                 theCompound Compound, to find block in.
12235                 thePoint Point, close to the desired block. If the point lays on
12236                          boundary between some blocks, we return block with nearest center.
12237                 theName Object name; when specified, this parameter is used
12238                         for result publication in the study. Otherwise, if automatic
12239                         publication is switched on, default value is used for result name.
12240
12241             Returns:
12242                 New GEOM.GEOM_Object, containing the found block.
12243             """
12244             # Example: see GEOM_Spanner.py
12245             anObj = self.BlocksOp.GetBlockNearPoint(theCompound, thePoint)
12246             RaiseIfFailed("GetBlockNearPoint", self.BlocksOp)
12247             self._autoPublish(anObj, theName, "block")
12248             return anObj
12249
12250         ## Find block, containing all the elements, passed as the parts, or maximum quantity of them.
12251         #  @param theCompound Compound, to find block in.
12252         #  @param theParts List of faces and/or edges and/or vertices to be parts of the found block.
12253         #  @param theName Object name; when specified, this parameter is used
12254         #         for result publication in the study. Otherwise, if automatic
12255         #         publication is switched on, default value is used for result name.
12256         #
12257         #  @return New GEOM.GEOM_Object, containing the found block.
12258         #
12259         #  @ref swig_GetBlockByParts "Example"
12260         @ManageTransactions("BlocksOp")
12261         def GetBlockByParts(self, theCompound, theParts, theName=None):
12262             """
12263              Find block, containing all the elements, passed as the parts, or maximum quantity of them.
12264
12265              Parameters:
12266                 theCompound Compound, to find block in.
12267                 theParts List of faces and/or edges and/or vertices to be parts of the found block.
12268                 theName Object name; when specified, this parameter is used
12269                         for result publication in the study. Otherwise, if automatic
12270                         publication is switched on, default value is used for result name.
12271
12272             Returns:
12273                 New GEOM_Object, containing the found block.
12274             """
12275             # Example: see GEOM_TestOthers.py
12276             anObj = self.BlocksOp.GetBlockByParts(theCompound, theParts)
12277             RaiseIfFailed("GetBlockByParts", self.BlocksOp)
12278             self._autoPublish(anObj, theName, "block")
12279             return anObj
12280
12281         ## Return all blocks, containing all the elements, passed as the parts.
12282         #  @param theCompound Compound, to find blocks in.
12283         #  @param theParts List of faces and/or edges and/or vertices to be parts of the found blocks.
12284         #  @param theName Object name; when specified, this parameter is used
12285         #         for result publication in the study. Otherwise, if automatic
12286         #         publication is switched on, default value is used for result name.
12287         #
12288         #  @return List of GEOM.GEOM_Object, containing the found blocks.
12289         #
12290         #  @ref swig_todo "Example"
12291         @ManageTransactions("BlocksOp")
12292         def GetBlocksByParts(self, theCompound, theParts, theName=None):
12293             """
12294             Return all blocks, containing all the elements, passed as the parts.
12295
12296             Parameters:
12297                 theCompound Compound, to find blocks in.
12298                 theParts List of faces and/or edges and/or vertices to be parts of the found blocks.
12299                 theName Object name; when specified, this parameter is used
12300                         for result publication in the study. Otherwise, if automatic
12301                         publication is switched on, default value is used for result name.
12302
12303             Returns:
12304                 List of GEOM.GEOM_Object, containing the found blocks.
12305             """
12306             # Example: see GEOM_Spanner.py
12307             aList = self.BlocksOp.GetBlocksByParts(theCompound, theParts)
12308             RaiseIfFailed("GetBlocksByParts", self.BlocksOp)
12309             self._autoPublish(aList, theName, "block")
12310             return aList
12311
12312         ## Multi-transformate block and glue the result.
12313         #  Transformation is defined so, as to superpose direction faces.
12314         #  @param Block Hexahedral solid to be multi-transformed.
12315         #  @param DirFace1 ID of First direction face.
12316         #  @param DirFace2 ID of Second direction face.
12317         #  @param NbTimes Quantity of transformations to be done.
12318         #  @param 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         #  @note Unique ID of sub-shape can be obtained, using method GetSubShapeID().
12323         #
12324         #  @return New GEOM.GEOM_Object, containing the result shape.
12325         #
12326         #  @ref tui_multi_transformation "Example"
12327         @ManageTransactions("BlocksOp")
12328         def MakeMultiTransformation1D(self, Block, DirFace1, DirFace2, NbTimes, theName=None):
12329             """
12330             Multi-transformate block and glue the result.
12331             Transformation is defined so, as to superpose direction faces.
12332
12333             Parameters:
12334                 Block Hexahedral solid to be multi-transformed.
12335                 DirFace1 ID of First direction face.
12336                 DirFace2 ID of Second direction face.
12337                 NbTimes Quantity of transformations to be done.
12338                 theName Object name; when specified, this parameter is used
12339                         for result publication in the study. Otherwise, if automatic
12340                         publication is switched on, default value is used for result name.
12341
12342             Note:
12343                 Unique ID of sub-shape can be obtained, using method GetSubShapeID().
12344
12345             Returns:
12346                 New GEOM.GEOM_Object, containing the result shape.
12347             """
12348             # Example: see GEOM_Spanner.py
12349             DirFace1,DirFace2,NbTimes,Parameters = ParseParameters(DirFace1,DirFace2,NbTimes)
12350             anObj = self.BlocksOp.MakeMultiTransformation1D(Block, DirFace1, DirFace2, NbTimes)
12351             RaiseIfFailed("MakeMultiTransformation1D", self.BlocksOp)
12352             anObj.SetParameters(Parameters)
12353             self._autoPublish(anObj, theName, "transformed")
12354             return anObj
12355
12356         ## Multi-transformate block and glue the result.
12357         #  @param Block Hexahedral solid to be multi-transformed.
12358         #  @param DirFace1U,DirFace2U IDs of Direction faces for the first transformation.
12359         #  @param DirFace1V,DirFace2V IDs of Direction faces for the second transformation.
12360         #  @param NbTimesU,NbTimesV Quantity of transformations to be done.
12361         #  @param theName Object name; when specified, this parameter is used
12362         #         for result publication in the study. Otherwise, if automatic
12363         #         publication is switched on, default value is used for result name.
12364         #
12365         #  @return New GEOM.GEOM_Object, containing the result shape.
12366         #
12367         #  @ref tui_multi_transformation "Example"
12368         @ManageTransactions("BlocksOp")
12369         def MakeMultiTransformation2D(self, Block, DirFace1U, DirFace2U, NbTimesU,
12370                                       DirFace1V, DirFace2V, NbTimesV, theName=None):
12371             """
12372             Multi-transformate block and glue the result.
12373
12374             Parameters:
12375                 Block Hexahedral solid to be multi-transformed.
12376                 DirFace1U,DirFace2U IDs of Direction faces for the first transformation.
12377                 DirFace1V,DirFace2V IDs of Direction faces for the second transformation.
12378                 NbTimesU,NbTimesV Quantity of transformations to be done.
12379                 theName Object name; when specified, this parameter is used
12380                         for result publication in the study. Otherwise, if automatic
12381                         publication is switched on, default value is used for result name.
12382
12383             Returns:
12384                 New GEOM.GEOM_Object, containing the result shape.
12385             """
12386             # Example: see GEOM_Spanner.py
12387             DirFace1U,DirFace2U,NbTimesU,DirFace1V,DirFace2V,NbTimesV,Parameters = ParseParameters(
12388               DirFace1U,DirFace2U,NbTimesU,DirFace1V,DirFace2V,NbTimesV)
12389             anObj = self.BlocksOp.MakeMultiTransformation2D(Block, DirFace1U, DirFace2U, NbTimesU,
12390                                                             DirFace1V, DirFace2V, NbTimesV)
12391             RaiseIfFailed("MakeMultiTransformation2D", self.BlocksOp)
12392             anObj.SetParameters(Parameters)
12393             self._autoPublish(anObj, theName, "transformed")
12394             return anObj
12395
12396         ## Build all possible propagation groups.
12397         #  Propagation group is a set of all edges, opposite to one (main)
12398         #  edge of this group directly or through other opposite edges.
12399         #  Notion of Opposite Edge make sence only on quadrangle face.
12400         #  @param theShape Shape to build propagation groups on.
12401         #  @param theName Object name; when specified, this parameter is used
12402         #         for result publication in the study. Otherwise, if automatic
12403         #         publication is switched on, default value is used for result name.
12404         #
12405         #  @return List of GEOM.GEOM_Object, each of them is a propagation group.
12406         #
12407         #  @ref swig_Propagate "Example"
12408         @ManageTransactions("BlocksOp")
12409         def Propagate(self, theShape, theName=None):
12410             """
12411             Build all possible propagation groups.
12412             Propagation group is a set of all edges, opposite to one (main)
12413             edge of this group directly or through other opposite edges.
12414             Notion of Opposite Edge make sence only on quadrangle face.
12415
12416             Parameters:
12417                 theShape Shape to build propagation groups on.
12418                 theName Object name; when specified, this parameter is used
12419                         for result publication in the study. Otherwise, if automatic
12420                         publication is switched on, default value is used for result name.
12421
12422             Returns:
12423                 List of GEOM.GEOM_Object, each of them is a propagation group.
12424             """
12425             # Example: see GEOM_TestOthers.py
12426             listChains = self.BlocksOp.Propagate(theShape)
12427             RaiseIfFailed("Propagate", self.BlocksOp)
12428             self._autoPublish(listChains, theName, "propagate")
12429             return listChains
12430
12431         # end of l3_blocks_op
12432         ## @}
12433
12434         ## @addtogroup l3_groups
12435         ## @{
12436
12437         ## Creates a new group which will store sub-shapes of theMainShape
12438         #  @param theMainShape is a GEOM object on which the group is selected
12439         #  @param theShapeType defines a shape type of the group (see GEOM::shape_type)
12440         #  @param theName Object name; when specified, this parameter is used
12441         #         for result publication in the study. Otherwise, if automatic
12442         #         publication is switched on, default value is used for result name.
12443         #
12444         #  @return a newly created GEOM group (GEOM.GEOM_Object)
12445         #
12446         #  @ref tui_working_with_groups_page "Example 1"
12447         #  \n @ref swig_CreateGroup "Example 2"
12448         @ManageTransactions("GroupOp")
12449         def CreateGroup(self, theMainShape, theShapeType, theName=None):
12450             """
12451             Creates a new group which will store sub-shapes of theMainShape
12452
12453             Parameters:
12454                theMainShape is a GEOM object on which the group is selected
12455                theShapeType defines a shape type of the group:"COMPOUND", "COMPSOLID",
12456                             "SOLID", "SHELL", "FACE", "WIRE", "EDGE", "VERTEX", "SHAPE".
12457                 theName Object name; when specified, this parameter is used
12458                         for result publication in the study. Otherwise, if automatic
12459                         publication is switched on, default value is used for result name.
12460
12461             Returns:
12462                a newly created GEOM group
12463
12464             Example of usage:
12465                 group = geompy.CreateGroup(Box, geompy.ShapeType["FACE"])
12466
12467             """
12468             # Example: see GEOM_TestOthers.py
12469             anObj = self.GroupOp.CreateGroup(theMainShape, theShapeType)
12470             RaiseIfFailed("CreateGroup", self.GroupOp)
12471             self._autoPublish(anObj, theName, "group")
12472             return anObj
12473
12474         ## Adds a sub-object with ID theSubShapeId to the group
12475         #  @param theGroup is a GEOM group to which the new sub-shape is added
12476         #  @param theSubShapeID is a sub-shape ID in the main object.
12477         #  \note Use method GetSubShapeID() to get an unique ID of the sub-shape
12478         #
12479         #  @ref tui_working_with_groups_page "Example"
12480         @ManageTransactions("GroupOp")
12481         def AddObject(self,theGroup, theSubShapeID):
12482             """
12483             Adds a sub-object with ID theSubShapeId to the group
12484
12485             Parameters:
12486                 theGroup       is a GEOM group to which the new sub-shape is added
12487                 theSubShapeID  is a sub-shape ID in the main object.
12488
12489             Note:
12490                 Use method GetSubShapeID() to get an unique ID of the sub-shape
12491             """
12492             # Example: see GEOM_TestOthers.py
12493             self.GroupOp.AddObject(theGroup, theSubShapeID)
12494             if self.GroupOp.GetErrorCode() != "PAL_ELEMENT_ALREADY_PRESENT":
12495                 RaiseIfFailed("AddObject", self.GroupOp)
12496                 pass
12497             pass
12498
12499         ## Removes a sub-object with ID \a theSubShapeId from the group
12500         #  @param theGroup is a GEOM group from which the new sub-shape is removed
12501         #  @param theSubShapeID is a sub-shape ID in the main object.
12502         #  \note Use method GetSubShapeID() to get an unique ID of the sub-shape
12503         #
12504         #  @ref tui_working_with_groups_page "Example"
12505         @ManageTransactions("GroupOp")
12506         def RemoveObject(self,theGroup, theSubShapeID):
12507             """
12508             Removes a sub-object with ID theSubShapeId from the group
12509
12510             Parameters:
12511                 theGroup is a GEOM group from which the new sub-shape is removed
12512                 theSubShapeID is a sub-shape ID in the main object.
12513
12514             Note:
12515                 Use method GetSubShapeID() to get an unique ID of the sub-shape
12516             """
12517             # Example: see GEOM_TestOthers.py
12518             self.GroupOp.RemoveObject(theGroup, theSubShapeID)
12519             RaiseIfFailed("RemoveObject", self.GroupOp)
12520             pass
12521
12522         ## Adds to the group all the given shapes. No errors, if some shapes are alredy included.
12523         #  @param theGroup is a GEOM group to which the new sub-shapes are added.
12524         #  @param theSubShapes is a list of sub-shapes to be added.
12525         #
12526         #  @ref tui_working_with_groups_page "Example"
12527         @ManageTransactions("GroupOp")
12528         def UnionList (self,theGroup, theSubShapes):
12529             """
12530             Adds to the group all the given shapes. No errors, if some shapes are alredy included.
12531
12532             Parameters:
12533                 theGroup is a GEOM group to which the new sub-shapes are added.
12534                 theSubShapes is a list of sub-shapes to be added.
12535             """
12536             # Example: see GEOM_TestOthers.py
12537             self.GroupOp.UnionList(theGroup, theSubShapes)
12538             RaiseIfFailed("UnionList", self.GroupOp)
12539             pass
12540
12541         ## Adds to the group all the given shapes. No errors, if some shapes are alredy included.
12542         #  @param theGroup is a GEOM group to which the new sub-shapes are added.
12543         #  @param theSubShapes is a list of indices of sub-shapes to be added.
12544         #
12545         #  @ref swig_UnionIDs "Example"
12546         @ManageTransactions("GroupOp")
12547         def UnionIDs(self,theGroup, theSubShapes):
12548             """
12549             Adds to the group all the given shapes. No errors, if some shapes are alredy included.
12550
12551             Parameters:
12552                 theGroup is a GEOM group to which the new sub-shapes are added.
12553                 theSubShapes is a list of indices of sub-shapes to be added.
12554             """
12555             # Example: see GEOM_TestOthers.py
12556             self.GroupOp.UnionIDs(theGroup, theSubShapes)
12557             RaiseIfFailed("UnionIDs", self.GroupOp)
12558             pass
12559
12560         ## Removes from the group all the given shapes. No errors, if some shapes are not included.
12561         #  @param theGroup is a GEOM group from which the sub-shapes are removed.
12562         #  @param theSubShapes is a list of sub-shapes to be removed.
12563         #
12564         #  @ref tui_working_with_groups_page "Example"
12565         @ManageTransactions("GroupOp")
12566         def DifferenceList (self,theGroup, theSubShapes):
12567             """
12568             Removes from the group all the given shapes. No errors, if some shapes are not included.
12569
12570             Parameters:
12571                 theGroup is a GEOM group from which the sub-shapes are removed.
12572                 theSubShapes is a list of sub-shapes to be removed.
12573             """
12574             # Example: see GEOM_TestOthers.py
12575             self.GroupOp.DifferenceList(theGroup, theSubShapes)
12576             RaiseIfFailed("DifferenceList", self.GroupOp)
12577             pass
12578
12579         ## Removes from the group all the given shapes. No errors, if some shapes are not included.
12580         #  @param theGroup is a GEOM group from which the sub-shapes are removed.
12581         #  @param theSubShapes is a list of indices of sub-shapes to be removed.
12582         #
12583         #  @ref swig_DifferenceIDs "Example"
12584         @ManageTransactions("GroupOp")
12585         def DifferenceIDs(self,theGroup, theSubShapes):
12586             """
12587             Removes from the group all the given shapes. No errors, if some shapes are not included.
12588
12589             Parameters:
12590                 theGroup is a GEOM group from which the sub-shapes are removed.
12591                 theSubShapes is a list of indices of sub-shapes to be removed.
12592             """
12593             # Example: see GEOM_TestOthers.py
12594             self.GroupOp.DifferenceIDs(theGroup, theSubShapes)
12595             RaiseIfFailed("DifferenceIDs", self.GroupOp)
12596             pass
12597
12598         ## Union of two groups.
12599         #  New group is created. It will contain all entities
12600         #  which are present in groups theGroup1 and theGroup2.
12601         #  @param theGroup1, theGroup2 are the initial GEOM groups
12602         #                              to create the united group from.
12603         #  @param theName Object name; when specified, this parameter is used
12604         #         for result publication in the study. Otherwise, if automatic
12605         #         publication is switched on, default value is used for result name.
12606         #
12607         #  @return a newly created GEOM group.
12608         #
12609         #  @ref tui_union_groups_anchor "Example"
12610         @ManageTransactions("GroupOp")
12611         def UnionGroups (self, theGroup1, theGroup2, theName=None):
12612             """
12613             Union of two groups.
12614             New group is created. It will contain all entities
12615             which are present in groups theGroup1 and theGroup2.
12616
12617             Parameters:
12618                 theGroup1, theGroup2 are the initial GEOM groups
12619                                      to create the united group from.
12620                 theName Object name; when specified, this parameter is used
12621                         for result publication in the study. Otherwise, if automatic
12622                         publication is switched on, default value is used for result name.
12623
12624             Returns:
12625                 a newly created GEOM group.
12626             """
12627             # Example: see GEOM_TestOthers.py
12628             aGroup = self.GroupOp.UnionGroups(theGroup1, theGroup2)
12629             RaiseIfFailed("UnionGroups", self.GroupOp)
12630             self._autoPublish(aGroup, theName, "group")
12631             return aGroup
12632
12633         ## Intersection of two groups.
12634         #  New group is created. It will contain only those entities
12635         #  which are present in both groups theGroup1 and theGroup2.
12636         #  @param theGroup1, theGroup2 are the initial GEOM groups to get common part of.
12637         #  @param theName Object name; when specified, this parameter is used
12638         #         for result publication in the study. Otherwise, if automatic
12639         #         publication is switched on, default value is used for result name.
12640         #
12641         #  @return a newly created GEOM group.
12642         #
12643         #  @ref tui_intersect_groups_anchor "Example"
12644         @ManageTransactions("GroupOp")
12645         def IntersectGroups (self, theGroup1, theGroup2, theName=None):
12646             """
12647             Intersection of two groups.
12648             New group is created. It will contain only those entities
12649             which are present in both groups theGroup1 and theGroup2.
12650
12651             Parameters:
12652                 theGroup1, theGroup2 are the initial GEOM groups to get common part of.
12653                 theName Object name; when specified, this parameter is used
12654                         for result publication in the study. Otherwise, if automatic
12655                         publication is switched on, default value is used for result name.
12656
12657             Returns:
12658                 a newly created GEOM group.
12659             """
12660             # Example: see GEOM_TestOthers.py
12661             aGroup = self.GroupOp.IntersectGroups(theGroup1, theGroup2)
12662             RaiseIfFailed("IntersectGroups", self.GroupOp)
12663             self._autoPublish(aGroup, theName, "group")
12664             return aGroup
12665
12666         ## Cut of two groups.
12667         #  New group is created. It will contain entities which are
12668         #  present in group theGroup1 but are not present in group theGroup2.
12669         #  @param theGroup1 is a GEOM group to include elements of.
12670         #  @param theGroup2 is a GEOM group to exclude elements of.
12671         #  @param theName Object name; when specified, this parameter is used
12672         #         for result publication in the study. Otherwise, if automatic
12673         #         publication is switched on, default value is used for result name.
12674         #
12675         #  @return a newly created GEOM group.
12676         #
12677         #  @ref tui_cut_groups_anchor "Example"
12678         @ManageTransactions("GroupOp")
12679         def CutGroups (self, theGroup1, theGroup2, theName=None):
12680             """
12681             Cut of two groups.
12682             New group is created. It will contain entities which are
12683             present in group theGroup1 but are not present in group theGroup2.
12684
12685             Parameters:
12686                 theGroup1 is a GEOM group to include elements of.
12687                 theGroup2 is a GEOM group to exclude elements of.
12688                 theName Object name; when specified, this parameter is used
12689                         for result publication in the study. Otherwise, if automatic
12690                         publication is switched on, default value is used for result name.
12691
12692             Returns:
12693                 a newly created GEOM group.
12694             """
12695             # Example: see GEOM_TestOthers.py
12696             aGroup = self.GroupOp.CutGroups(theGroup1, theGroup2)
12697             RaiseIfFailed("CutGroups", self.GroupOp)
12698             self._autoPublish(aGroup, theName, "group")
12699             return aGroup
12700
12701         ## Union of list of groups.
12702         #  New group is created. It will contain all entities that are
12703         #  present in groups listed in theGList.
12704         #  @param theGList is a list of GEOM groups to create the united group from.
12705         #  @param theName Object name; when specified, this parameter is used
12706         #         for result publication in the study. Otherwise, if automatic
12707         #         publication is switched on, default value is used for result name.
12708         #
12709         #  @return a newly created GEOM group.
12710         #
12711         #  @ref tui_union_groups_anchor "Example"
12712         @ManageTransactions("GroupOp")
12713         def UnionListOfGroups (self, theGList, theName=None):
12714             """
12715             Union of list of groups.
12716             New group is created. It will contain all entities that are
12717             present in groups listed in theGList.
12718
12719             Parameters:
12720                 theGList is a list of GEOM groups to create the united group from.
12721                 theName Object name; when specified, this parameter is used
12722                         for result publication in the study. Otherwise, if automatic
12723                         publication is switched on, default value is used for result name.
12724
12725             Returns:
12726                 a newly created GEOM group.
12727             """
12728             # Example: see GEOM_TestOthers.py
12729             aGroup = self.GroupOp.UnionListOfGroups(theGList)
12730             RaiseIfFailed("UnionListOfGroups", self.GroupOp)
12731             self._autoPublish(aGroup, theName, "group")
12732             return aGroup
12733
12734         ## Cut of lists of groups.
12735         #  New group is created. It will contain only entities
12736         #  which are present in groups listed in theGList.
12737         #  @param theGList is a list of GEOM groups to include elements of.
12738         #  @param theName Object name; when specified, this parameter is used
12739         #         for result publication in the study. Otherwise, if automatic
12740         #         publication is switched on, default value is used for result name.
12741         #
12742         #  @return a newly created GEOM group.
12743         #
12744         #  @ref tui_intersect_groups_anchor "Example"
12745         @ManageTransactions("GroupOp")
12746         def IntersectListOfGroups (self, theGList, theName=None):
12747             """
12748             Cut of lists of groups.
12749             New group is created. It will contain only entities
12750             which are present in groups listed in theGList.
12751
12752             Parameters:
12753                 theGList is a list of GEOM groups to include elements of.
12754                 theName Object name; when specified, this parameter is used
12755                         for result publication in the study. Otherwise, if automatic
12756                         publication is switched on, default value is used for result name.
12757
12758             Returns:
12759                 a newly created GEOM group.
12760             """
12761             # Example: see GEOM_TestOthers.py
12762             aGroup = self.GroupOp.IntersectListOfGroups(theGList)
12763             RaiseIfFailed("IntersectListOfGroups", self.GroupOp)
12764             self._autoPublish(aGroup, theName, "group")
12765             return aGroup
12766
12767         ## Cut of lists of groups.
12768         #  New group is created. It will contain only entities
12769         #  which are present in groups listed in theGList1 but
12770         #  are not present in groups from theGList2.
12771         #  @param theGList1 is a list of GEOM groups to include elements of.
12772         #  @param theGList2 is a list of GEOM groups to exclude elements of.
12773         #  @param theName Object name; when specified, this parameter is used
12774         #         for result publication in the study. Otherwise, if automatic
12775         #         publication is switched on, default value is used for result name.
12776         #
12777         #  @return a newly created GEOM group.
12778         #
12779         #  @ref tui_cut_groups_anchor "Example"
12780         @ManageTransactions("GroupOp")
12781         def CutListOfGroups (self, theGList1, theGList2, theName=None):
12782             """
12783             Cut of lists of groups.
12784             New group is created. It will contain only entities
12785             which are present in groups listed in theGList1 but
12786             are not present in groups from theGList2.
12787
12788             Parameters:
12789                 theGList1 is a list of GEOM groups to include elements of.
12790                 theGList2 is a list of GEOM groups to exclude elements of.
12791                 theName Object name; when specified, this parameter is used
12792                         for result publication in the study. Otherwise, if automatic
12793                         publication is switched on, default value is used for result name.
12794
12795             Returns:
12796                 a newly created GEOM group.
12797             """
12798             # Example: see GEOM_TestOthers.py
12799             aGroup = self.GroupOp.CutListOfGroups(theGList1, theGList2)
12800             RaiseIfFailed("CutListOfGroups", self.GroupOp)
12801             self._autoPublish(aGroup, theName, "group")
12802             return aGroup
12803
12804         ## Returns a list of sub-objects ID stored in the group
12805         #  @param theGroup is a GEOM group for which a list of IDs is requested
12806         #
12807         #  @ref swig_GetObjectIDs "Example"
12808         @ManageTransactions("GroupOp")
12809         def GetObjectIDs(self,theGroup):
12810             """
12811             Returns a list of sub-objects ID stored in the group
12812
12813             Parameters:
12814                 theGroup is a GEOM group for which a list of IDs is requested
12815             """
12816             # Example: see GEOM_TestOthers.py
12817             ListIDs = self.GroupOp.GetObjects(theGroup)
12818             RaiseIfFailed("GetObjects", self.GroupOp)
12819             return ListIDs
12820
12821         ## Returns a type of sub-objects stored in the group
12822         #  @param theGroup is a GEOM group which type is returned.
12823         #
12824         #  @ref swig_GetType "Example"
12825         @ManageTransactions("GroupOp")
12826         def GetType(self,theGroup):
12827             """
12828             Returns a type of sub-objects stored in the group
12829
12830             Parameters:
12831                 theGroup is a GEOM group which type is returned.
12832             """
12833             # Example: see GEOM_TestOthers.py
12834             aType = self.GroupOp.GetType(theGroup)
12835             RaiseIfFailed("GetType", self.GroupOp)
12836             return aType
12837
12838         ## Convert a type of geom object from id to string value
12839         #  @param theId is a GEOM obect type id.
12840         #  @return type of geom object (POINT, VECTOR, PLANE, LINE, TORUS, ... )
12841         #  @ref swig_GetType "Example"
12842         def ShapeIdToType(self, theId):
12843             """
12844             Convert a type of geom object from id to string value
12845
12846             Parameters:
12847                 theId is a GEOM obect type id.
12848
12849             Returns:
12850                 type of geom object (POINT, VECTOR, PLANE, LINE, TORUS, ... )
12851             """
12852             if theId == 0:
12853                 return "COPY"
12854             if theId == 1:
12855                 return "IMPORT"
12856             if theId == 2:
12857                 return "POINT"
12858             if theId == 3:
12859                 return "VECTOR"
12860             if theId == 4:
12861                 return "PLANE"
12862             if theId == 5:
12863                 return "LINE"
12864             if theId == 6:
12865                 return "TORUS"
12866             if theId == 7:
12867                 return "BOX"
12868             if theId == 8:
12869                 return "CYLINDER"
12870             if theId == 9:
12871                 return "CONE"
12872             if theId == 10:
12873                 return "SPHERE"
12874             if theId == 11:
12875                 return "PRISM"
12876             if theId == 12:
12877                 return "REVOLUTION"
12878             if theId == 13:
12879                 return "BOOLEAN"
12880             if theId == 14:
12881                 return "PARTITION"
12882             if theId == 15:
12883                 return "POLYLINE"
12884             if theId == 16:
12885                 return "CIRCLE"
12886             if theId == 17:
12887                 return "SPLINE"
12888             if theId == 18:
12889                 return "ELLIPSE"
12890             if theId == 19:
12891                 return "CIRC_ARC"
12892             if theId == 20:
12893                 return "FILLET"
12894             if theId == 21:
12895                 return "CHAMFER"
12896             if theId == 22:
12897                 return "EDGE"
12898             if theId == 23:
12899                 return "WIRE"
12900             if theId == 24:
12901                 return "FACE"
12902             if theId == 25:
12903                 return "SHELL"
12904             if theId == 26:
12905                 return "SOLID"
12906             if theId == 27:
12907                 return "COMPOUND"
12908             if theId == 28:
12909                 return "SUBSHAPE"
12910             if theId == 29:
12911                 return "PIPE"
12912             if theId == 30:
12913                 return "ARCHIMEDE"
12914             if theId == 31:
12915                 return "FILLING"
12916             if theId == 32:
12917                 return "EXPLODE"
12918             if theId == 33:
12919                 return "GLUED"
12920             if theId == 34:
12921                 return "SKETCHER"
12922             if theId == 35:
12923                 return "CDG"
12924             if theId == 36:
12925                 return "FREE_BOUNDS"
12926             if theId == 37:
12927                 return "GROUP"
12928             if theId == 38:
12929                 return "BLOCK"
12930             if theId == 39:
12931                 return "MARKER"
12932             if theId == 40:
12933                 return "THRUSECTIONS"
12934             if theId == 41:
12935                 return "COMPOUNDFILTER"
12936             if theId == 42:
12937                 return "SHAPES_ON_SHAPE"
12938             if theId == 43:
12939                 return "ELLIPSE_ARC"
12940             if theId == 44:
12941                 return "3DSKETCHER"
12942             if theId == 45:
12943                 return "FILLET_2D"
12944             if theId == 46:
12945                 return "FILLET_1D"
12946             if theId == 201:
12947                 return "PIPETSHAPE"
12948             return "Shape Id not exist."
12949
12950         ## Returns a main shape associated with the group
12951         #  @param theGroup is a GEOM group for which a main shape object is requested
12952         #  @return a GEOM object which is a main shape for theGroup
12953         #
12954         #  @ref swig_GetMainShape "Example"
12955         @ManageTransactions("GroupOp")
12956         def GetMainShape(self,theGroup):
12957             """
12958             Returns a main shape associated with the group
12959
12960             Parameters:
12961                 theGroup is a GEOM group for which a main shape object is requested
12962
12963             Returns:
12964                 a GEOM object which is a main shape for theGroup
12965
12966             Example of usage: BoxCopy = geompy.GetMainShape(CreateGroup)
12967             """
12968             # Example: see GEOM_TestOthers.py
12969             anObj = self.GroupOp.GetMainShape(theGroup)
12970             RaiseIfFailed("GetMainShape", self.GroupOp)
12971             return anObj
12972
12973         ## Create group of edges of theShape, whose length is in range [min_length, max_length].
12974         #  If include_min/max == 0, edges with length == min/max_length will not be included in result.
12975         #  @param theShape given shape (see GEOM.GEOM_Object)
12976         #  @param min_length minimum length of edges of theShape
12977         #  @param max_length maximum length of edges of theShape
12978         #  @param include_max indicating if edges with length == max_length should be included in result, 1-yes, 0-no (default=1)
12979         #  @param include_min indicating if edges with length == min_length should be included in result, 1-yes, 0-no (default=1)
12980         #  @param theName Object name; when specified, this parameter is used
12981         #         for result publication in the study. Otherwise, if automatic
12982         #         publication is switched on, default value is used for result name.
12983         #
12984         #  @return a newly created GEOM group of edges
12985         #
12986         #  @@ref swig_todo "Example"
12987         def GetEdgesByLength (self, theShape, min_length, max_length, include_min = 1, include_max = 1, theName=None):
12988             """
12989             Create group of edges of theShape, whose length is in range [min_length, max_length].
12990             If include_min/max == 0, edges with length == min/max_length will not be included in result.
12991
12992             Parameters:
12993                 theShape given shape
12994                 min_length minimum length of edges of theShape
12995                 max_length maximum length of edges of theShape
12996                 include_max indicating if edges with length == max_length should be included in result, 1-yes, 0-no (default=1)
12997                 include_min indicating if edges with length == min_length should be included in result, 1-yes, 0-no (default=1)
12998                 theName Object name; when specified, this parameter is used
12999                         for result publication in the study. Otherwise, if automatic
13000                         publication is switched on, default value is used for result name.
13001
13002              Returns:
13003                 a newly created GEOM group of edges.
13004             """
13005             edges = self.SubShapeAll(theShape, self.ShapeType["EDGE"])
13006             edges_in_range = []
13007             for edge in edges:
13008                 Props = self.BasicProperties(edge)
13009                 if min_length <= Props[0] and Props[0] <= max_length:
13010                     if (not include_min) and (min_length == Props[0]):
13011                         skip = 1
13012                     else:
13013                         if (not include_max) and (Props[0] == max_length):
13014                             skip = 1
13015                         else:
13016                             edges_in_range.append(edge)
13017
13018             if len(edges_in_range) <= 0:
13019                 print "No edges found by given criteria"
13020                 return None
13021
13022             # note: auto-publishing is done in self.CreateGroup()
13023             group_edges = self.CreateGroup(theShape, self.ShapeType["EDGE"], theName)
13024             self.UnionList(group_edges, edges_in_range)
13025
13026             return group_edges
13027
13028         ## Create group of edges of selected shape, whose length is in range [min_length, max_length].
13029         #  If include_min/max == 0, edges with length == min/max_length will not be included in result.
13030         #  @param min_length minimum length of edges of selected shape
13031         #  @param max_length maximum length of edges of selected shape
13032         #  @param include_max indicating if edges with length == max_length should be included in result, 1-yes, 0-no (default=1)
13033         #  @param include_min indicating if edges with length == min_length should be included in result, 1-yes, 0-no (default=1)
13034         #  @return a newly created GEOM group of edges
13035         #  @ref swig_todo "Example"
13036         def SelectEdges (self, min_length, max_length, include_min = 1, include_max = 1):
13037             """
13038             Create group of edges of selected shape, whose length is in range [min_length, max_length].
13039             If include_min/max == 0, edges with length == min/max_length will not be included in result.
13040
13041             Parameters:
13042                 min_length minimum length of edges of selected shape
13043                 max_length maximum length of edges of selected shape
13044                 include_max indicating if edges with length == max_length should be included in result, 1-yes, 0-no (default=1)
13045                 include_min indicating if edges with length == min_length should be included in result, 1-yes, 0-no (default=1)
13046
13047              Returns:
13048                 a newly created GEOM group of edges.
13049             """
13050             nb_selected = sg.SelectedCount()
13051             if nb_selected < 1:
13052                 print "Select a shape before calling this function, please."
13053                 return 0
13054             if nb_selected > 1:
13055                 print "Only one shape must be selected"
13056                 return 0
13057
13058             id_shape = sg.getSelected(0)
13059             shape = IDToObject( id_shape )
13060
13061             group_edges = self.GetEdgesByLength(shape, min_length, max_length, include_min, include_max)
13062
13063             left_str  = " < "
13064             right_str = " < "
13065             if include_min: left_str  = " <= "
13066             if include_max: right_str  = " <= "
13067
13068             self.addToStudyInFather(shape, group_edges, "Group of edges with " + `min_length`
13069                                     + left_str + "length" + right_str + `max_length`)
13070
13071             sg.updateObjBrowser(1)
13072
13073             return group_edges
13074
13075         # end of l3_groups
13076         ## @}
13077
13078         #@@ insert new functions before this line @@ do not remove this line @@#
13079
13080         ## Create a copy of the given object
13081         #
13082         #  @param theOriginal geometry object for copy
13083         #  @param theName Object name; when specified, this parameter is used
13084         #         for result publication in the study. Otherwise, if automatic
13085         #         publication is switched on, default value is used for result name.
13086         #
13087         #  @return New GEOM_Object, containing the copied shape.
13088         #
13089         #  @ingroup l1_geomBuilder_auxiliary
13090         #  @ref swig_MakeCopy "Example"
13091         @ManageTransactions("InsertOp")
13092         def MakeCopy(self, theOriginal, theName=None):
13093             """
13094             Create a copy of the given object
13095
13096             Parameters:
13097                 theOriginal geometry object for copy
13098                 theName Object name; when specified, this parameter is used
13099                         for result publication in the study. Otherwise, if automatic
13100                         publication is switched on, default value is used for result name.
13101
13102             Returns:
13103                 New GEOM_Object, containing the copied shape.
13104
13105             Example of usage: Copy = geompy.MakeCopy(Box)
13106             """
13107             # Example: see GEOM_TestAll.py
13108             anObj = self.InsertOp.MakeCopy(theOriginal)
13109             RaiseIfFailed("MakeCopy", self.InsertOp)
13110             self._autoPublish(anObj, theName, "copy")
13111             return anObj
13112
13113         ## Add Path to load python scripts from
13114         #  @param Path a path to load python scripts from
13115         #  @ingroup l1_geomBuilder_auxiliary
13116         def addPath(self,Path):
13117             """
13118             Add Path to load python scripts from
13119
13120             Parameters:
13121                 Path a path to load python scripts from
13122             """
13123             if (sys.path.count(Path) < 1):
13124                 sys.path.append(Path)
13125                 pass
13126             pass
13127
13128         ## Load marker texture from the file
13129         #  @param Path a path to the texture file
13130         #  @return unique texture identifier
13131         #  @ingroup l1_geomBuilder_auxiliary
13132         @ManageTransactions("InsertOp")
13133         def LoadTexture(self, Path):
13134             """
13135             Load marker texture from the file
13136
13137             Parameters:
13138                 Path a path to the texture file
13139
13140             Returns:
13141                 unique texture identifier
13142             """
13143             # Example: see GEOM_TestAll.py
13144             ID = self.InsertOp.LoadTexture(Path)
13145             RaiseIfFailed("LoadTexture", self.InsertOp)
13146             return ID
13147
13148         ## Get internal name of the object based on its study entry
13149         #  @note This method does not provide an unique identifier of the geometry object.
13150         #  @note This is internal function of GEOM component, though it can be used outside it for
13151         #  appropriate reason (e.g. for identification of geometry object).
13152         #  @param obj geometry object
13153         #  @return unique object identifier
13154         #  @ingroup l1_geomBuilder_auxiliary
13155         def getObjectID(self, obj):
13156             """
13157             Get internal name of the object based on its study entry.
13158             Note: this method does not provide an unique identifier of the geometry object.
13159             It is an internal function of GEOM component, though it can be used outside GEOM for
13160             appropriate reason (e.g. for identification of geometry object).
13161
13162             Parameters:
13163                 obj geometry object
13164
13165             Returns:
13166                 unique object identifier
13167             """
13168             ID = ""
13169             entry = salome.ObjectToID(obj)
13170             if entry is not None:
13171                 lst = entry.split(":")
13172                 if len(lst) > 0:
13173                     ID = lst[-1] # -1 means last item in the list
13174                     return "GEOM_" + ID
13175             return ID
13176
13177
13178
13179         ## Add marker texture. @a Width and @a Height parameters
13180         #  specify width and height of the texture in pixels.
13181         #  If @a RowData is @c True, @a Texture parameter should represent texture data
13182         #  packed into the byte array. If @a RowData is @c False (default), @a Texture
13183         #  parameter should be unpacked string, in which '1' symbols represent opaque
13184         #  pixels and '0' represent transparent pixels of the texture bitmap.
13185         #
13186         #  @param Width texture width in pixels
13187         #  @param Height texture height in pixels
13188         #  @param Texture texture data
13189         #  @param RowData if @c True, @a Texture data are packed in the byte stream
13190         #  @return unique texture identifier
13191         #  @ingroup l1_geomBuilder_auxiliary
13192         @ManageTransactions("InsertOp")
13193         def AddTexture(self, Width, Height, Texture, RowData=False):
13194             """
13195             Add marker texture. Width and Height parameters
13196             specify width and height of the texture in pixels.
13197             If RowData is True, Texture parameter should represent texture data
13198             packed into the byte array. If RowData is False (default), Texture
13199             parameter should be unpacked string, in which '1' symbols represent opaque
13200             pixels and '0' represent transparent pixels of the texture bitmap.
13201
13202             Parameters:
13203                 Width texture width in pixels
13204                 Height texture height in pixels
13205                 Texture texture data
13206                 RowData if True, Texture data are packed in the byte stream
13207
13208             Returns:
13209                 return unique texture identifier
13210             """
13211             if not RowData: Texture = PackData(Texture)
13212             ID = self.InsertOp.AddTexture(Width, Height, Texture)
13213             RaiseIfFailed("AddTexture", self.InsertOp)
13214             return ID
13215
13216         ## Transfer not topological data from one GEOM object to another.
13217         #
13218         #  @param theObjectFrom the source object of non-topological data
13219         #  @param theObjectTo the destination object of non-topological data
13220         #  @param theFindMethod method to search sub-shapes of theObjectFrom
13221         #         in shape theObjectTo. Possible values are: GEOM.FSM_GetInPlace,
13222         #         GEOM.FSM_GetInPlaceByHistory and GEOM.FSM_GetInPlace_Old.
13223         #         Other values of GEOM.find_shape_method are not supported.
13224         #
13225         #  @return True in case of success; False otherwise.
13226         #
13227         #  @ingroup l1_geomBuilder_auxiliary
13228         #
13229         #  @ref swig_TransferData "Example"
13230         @ManageTransactions("InsertOp")
13231         def TransferData(self, theObjectFrom, theObjectTo,
13232                          theFindMethod=GEOM.FSM_GetInPlace):
13233             """
13234             Transfer not topological data from one GEOM object to another.
13235
13236             Parameters:
13237                 theObjectFrom the source object of non-topological data
13238                 theObjectTo the destination object of non-topological data
13239                 theFindMethod method to search sub-shapes of theObjectFrom
13240                               in shape theObjectTo. Possible values are:
13241                               GEOM.FSM_GetInPlace, GEOM.FSM_GetInPlaceByHistory
13242                               and GEOM.FSM_GetInPlace_Old. Other values of
13243                               GEOM.find_shape_method are not supported.
13244
13245             Returns:
13246                 True in case of success; False otherwise.
13247
13248             # Example: see GEOM_TestOthers.py
13249             """
13250             # Example: see GEOM_TestAll.py
13251             isOk = self.InsertOp.TransferData(theObjectFrom,
13252                                                theObjectTo, theFindMethod)
13253             RaiseIfFailed("TransferData", self.InsertOp)
13254             return isOk
13255
13256         ## Creates a new folder object. It is a container for any GEOM objects.
13257         #  @param Name name of the container
13258         #  @param Father parent object. If None,
13259         #         folder under 'Geometry' root object will be created.
13260         #  @return a new created folder
13261         #  @ingroup l1_publish_data
13262         def NewFolder(self, Name, Father=None):
13263             """
13264             Create a new folder object. It is an auxiliary container for any GEOM objects.
13265
13266             Parameters:
13267                 Name name of the container
13268                 Father parent object. If None,
13269                 folder under 'Geometry' root object will be created.
13270
13271             Returns:
13272                 a new created folder
13273             """
13274             if not Father: Father = self.father
13275             return self.CreateFolder(Name, Father)
13276
13277         ## Move object to the specified folder
13278         #  @param Object object to move
13279         #  @param Folder target folder
13280         #  @ingroup l1_publish_data
13281         def PutToFolder(self, Object, Folder):
13282             """
13283             Move object to the specified folder
13284
13285             Parameters:
13286                 Object object to move
13287                 Folder target folder
13288             """
13289             self.MoveToFolder(Object, Folder)
13290             pass
13291
13292         ## Move list of objects to the specified folder
13293         #  @param ListOfSO list of objects to move
13294         #  @param Folder target folder
13295         #  @ingroup l1_publish_data
13296         def PutListToFolder(self, ListOfSO, Folder):
13297             """
13298             Move list of objects to the specified folder
13299
13300             Parameters:
13301                 ListOfSO list of objects to move
13302                 Folder target folder
13303             """
13304             self.MoveListToFolder(ListOfSO, Folder)
13305             pass
13306
13307         ## @addtogroup l2_field
13308         ## @{
13309
13310         ## Creates a field
13311         #  @param shape the shape the field lies on
13312         #  @param name the field name
13313         #  @param type type of field data: 0 - bool, 1 - int, 2 - double, 3 - string
13314         #  @param dimension dimension of the shape the field lies on
13315         #         0 - VERTEX, 1 - EDGE, 2 - FACE, 3 - SOLID, -1 - whole shape
13316         #  @param componentNames names of components
13317         #  @return a created field
13318         @ManageTransactions("FieldOp")
13319         def CreateField(self, shape, name, type, dimension, componentNames):
13320             """
13321             Creates a field
13322
13323             Parameters:
13324                 shape the shape the field lies on
13325                 name  the field name
13326                 type  type of field data
13327                 dimension dimension of the shape the field lies on
13328                           0 - VERTEX, 1 - EDGE, 2 - FACE, 3 - SOLID, -1 - whole shape
13329                 componentNames names of components
13330
13331             Returns:
13332                 a created field
13333             """
13334             if isinstance( type, int ):
13335                 if type < 0 or type > 3:
13336                     raise RuntimeError, "CreateField : Error: data type must be within [0-3] range"
13337                 type = [GEOM.FDT_Bool,GEOM.FDT_Int,GEOM.FDT_Double,GEOM.FDT_String][type]
13338
13339             f = self.FieldOp.CreateField( shape, name, type, dimension, componentNames)
13340             RaiseIfFailed("CreateField", self.FieldOp)
13341             global geom
13342             geom._autoPublish( f, "", name)
13343             return f
13344
13345         ## Removes a field from the GEOM component
13346         #  @param field the field to remove
13347         def RemoveField(self, field):
13348             "Removes a field from the GEOM component"
13349             global geom
13350             if isinstance( field, GEOM._objref_GEOM_Field ):
13351                 geom.RemoveObject( field )
13352             elif isinstance( field, geomField ):
13353                 geom.RemoveObject( field.field )
13354             else:
13355                 raise RuntimeError, "RemoveField() : the object is not a field"
13356             return
13357
13358         ## Returns number of fields on a shape
13359         @ManageTransactions("FieldOp")
13360         def CountFields(self, shape):
13361             "Returns number of fields on a shape"
13362             nb = self.FieldOp.CountFields( shape )
13363             RaiseIfFailed("CountFields", self.FieldOp)
13364             return nb
13365
13366         ## Returns all fields on a shape
13367         @ManageTransactions("FieldOp")
13368         def GetFields(self, shape):
13369             "Returns all fields on a shape"
13370             ff = self.FieldOp.GetFields( shape )
13371             RaiseIfFailed("GetFields", self.FieldOp)
13372             return ff
13373
13374         ## Returns a field on a shape by its name
13375         @ManageTransactions("FieldOp")
13376         def GetField(self, shape, name):
13377             "Returns a field on a shape by its name"
13378             f = self.FieldOp.GetField( shape, name )
13379             RaiseIfFailed("GetField", self.FieldOp)
13380             return f
13381
13382         # end of l2_field
13383         ## @}
13384
13385
13386 import omniORB
13387 # Register the new proxy for GEOM_Gen
13388 omniORB.registerObjref(GEOM._objref_GEOM_Gen._NP_RepositoryId, geomBuilder)
13389
13390
13391 ## Field on Geometry
13392 #  @ingroup l2_field
13393 class geomField( GEOM._objref_GEOM_Field ):
13394
13395     def __init__(self):
13396         GEOM._objref_GEOM_Field.__init__(self)
13397         self.field = GEOM._objref_GEOM_Field
13398         return
13399
13400     ## Returns the shape the field lies on
13401     def getShape(self):
13402         "Returns the shape the field lies on"
13403         return self.field.GetShape(self)
13404
13405     ## Returns the field name
13406     def getName(self):
13407         "Returns the field name"
13408         return self.field.GetName(self)
13409
13410     ## Returns type of field data as integer [0-3]
13411     def getType(self):
13412         "Returns type of field data"
13413         return self.field.GetDataType(self)._v
13414
13415     ## Returns type of field data:
13416     #  one of GEOM.FDT_Bool, GEOM.FDT_Int, GEOM.FDT_Double, GEOM.FDT_String
13417     def getTypeEnum(self):
13418         "Returns type of field data"
13419         return self.field.GetDataType(self)
13420
13421     ## Returns dimension of the shape the field lies on:
13422     #  0 - VERTEX, 1 - EDGE, 2 - FACE, 3 - SOLID, -1 - whole shape
13423     def getDimension(self):
13424         """Returns dimension of the shape the field lies on:
13425         0 - VERTEX, 1 - EDGE, 2 - FACE, 3 - SOLID, -1 - whole shape"""
13426         return self.field.GetDimension(self)
13427
13428     ## Returns names of components
13429     def getComponents(self):
13430         "Returns names of components"
13431         return self.field.GetComponents(self)
13432
13433     ## Adds a time step to the field
13434     #  @param step the time step number further used as the step identifier
13435     #  @param stamp the time step time
13436     #  @param values the values of the time step
13437     def addStep(self, step, stamp, values):
13438         "Adds a time step to the field"
13439         stp = self.field.AddStep( self, step, stamp )
13440         if not stp:
13441             raise RuntimeError, \
13442                   "Field.addStep() : Error: step %s already exists in this field"%step
13443         global geom
13444         geom._autoPublish( stp, "", "Step %s, %s"%(step,stamp))
13445         self.setValues( step, values )
13446         return stp
13447
13448     ## Remove a time step from the field
13449     def removeStep(self,step):
13450         "Remove a time step from the field"
13451         stepSO = None
13452         try:
13453             stepObj = self.field.GetStep( self, step )
13454             if stepObj:
13455                 stepSO = geom.myStudy.FindObjectID( stepObj.GetStudyEntry() )
13456         except:
13457             #import traceback
13458             #traceback.print_exc()
13459             pass
13460         self.field.RemoveStep( self, step )
13461         if stepSO:
13462             geom.myBuilder.RemoveObjectWithChildren( stepSO )
13463         return
13464
13465     ## Returns number of time steps in the field
13466     def countSteps(self):
13467         "Returns number of time steps in the field"
13468         return self.field.CountSteps(self)
13469
13470     ## Returns a list of time step IDs in the field
13471     def getSteps(self):
13472         "Returns a list of time step IDs in the field"
13473         return self.field.GetSteps(self)
13474
13475     ## Returns a time step by its ID
13476     def getStep(self,step):
13477         "Returns a time step by its ID"
13478         stp = self.field.GetStep(self, step)
13479         if not stp:
13480             raise RuntimeError, "Step %s is missing from this field"%step
13481         return stp
13482
13483     ## Returns the time of the field step
13484     def getStamp(self,step):
13485         "Returns the time of the field step"
13486         return self.getStep(step).GetStamp()
13487
13488     ## Changes the time of the field step
13489     def setStamp(self, step, stamp):
13490         "Changes the time of the field step"
13491         return self.getStep(step).SetStamp(stamp)
13492
13493     ## Returns values of the field step
13494     def getValues(self, step):
13495         "Returns values of the field step"
13496         return self.getStep(step).GetValues()
13497
13498     ## Changes values of the field step
13499     def setValues(self, step, values):
13500         "Changes values of the field step"
13501         stp = self.getStep(step)
13502         errBeg = "Field.setValues(values) : Error: "
13503         try:
13504             ok = stp.SetValues( values )
13505         except Exception, e:
13506             excStr = str(e)
13507             if excStr.find("WrongPythonType") > 0:
13508                 raise RuntimeError, errBeg +\
13509                       "wrong type of values, %s values are expected"%str(self.getTypeEnum())[4:]
13510             raise RuntimeError, errBeg + str(e)
13511         if not ok:
13512             nbOK = self.field.GetArraySize(self)
13513             nbKO = len(values)
13514             if nbOK != nbKO:
13515                 raise RuntimeError, errBeg + "len(values) must be %s but not %s"%(nbOK,nbKO)
13516             else:
13517                 raise RuntimeError, errBeg + "failed"
13518         return
13519
13520     pass # end of class geomField
13521
13522 # Register the new proxy for GEOM_Field
13523 omniORB.registerObjref(GEOM._objref_GEOM_Field._NP_RepositoryId, geomField)
13524
13525
13526 ## Create a new geomBuilder instance.The geomBuilder class provides the Python
13527 #  interface to GEOM operations.
13528 #
13529 #  Typical use is:
13530 #  \code
13531 #    import salome
13532 #    salome.salome_init()
13533 #    from salome.geom import geomBuilder
13534 #    geompy = geomBuilder.New(salome.myStudy)
13535 #  \endcode
13536 #  @param  study     SALOME study, generally obtained by salome.myStudy.
13537 #  @param  instance  CORBA proxy of GEOM Engine. If None, the default Engine is used.
13538 #  @return geomBuilder instance
13539 def New( study, instance=None):
13540     """
13541     Create a new geomBuilder instance.The geomBuilder class provides the Python
13542     interface to GEOM operations.
13543
13544     Typical use is:
13545         import salome
13546         salome.salome_init()
13547         from salome.geom import geomBuilder
13548         geompy = geomBuilder.New(salome.myStudy)
13549
13550     Parameters:
13551         study     SALOME study, generally obtained by salome.myStudy.
13552         instance  CORBA proxy of GEOM Engine. If None, the default Engine is used.
13553     Returns:
13554         geomBuilder instance
13555     """
13556     #print "New geomBuilder ", study, instance
13557     global engine
13558     global geom
13559     global doLcc
13560     engine = instance
13561     if engine is None:
13562       doLcc = True
13563     geom = geomBuilder()
13564     assert isinstance(geom,geomBuilder), "Geom engine class is %s but should be geomBuilder.geomBuilder. Import geomBuilder before creating the instance."%geom.__class__
13565     geom.init_geom(study)
13566     return geom
13567
13568
13569 # Register methods from the plug-ins in the geomBuilder class 
13570 plugins_var = os.environ.get( "GEOM_PluginsList" )
13571
13572 plugins = None
13573 if plugins_var is not None:
13574     plugins = plugins_var.split( ":" )
13575     plugins=filter(lambda x: len(x)>0, plugins)
13576 if plugins is not None:
13577     for pluginName in plugins:
13578         pluginBuilderName = pluginName + "Builder"
13579         try:
13580             exec( "from salome.%s.%s import *" % (pluginName, pluginBuilderName))
13581         except Exception, e:
13582             from salome_utils import verbose
13583             print "Exception while loading %s: %s" % ( pluginBuilderName, e )
13584             continue
13585         exec( "from salome.%s import %s" % (pluginName, pluginBuilderName))
13586         plugin = eval( pluginBuilderName )
13587         
13588         # add methods from plugin module to the geomBuilder class
13589         for k in dir( plugin ):
13590             if k[0] == '_': continue
13591             method = getattr( plugin, k )
13592             if type( method ).__name__ == 'function':
13593                 if not hasattr( geomBuilder, k ):
13594                     setattr( geomBuilder, k, method )
13595                 pass
13596             pass
13597         del pluginName
13598         pass
13599     pass