Salome HOME
f932a632a2147d3fdb7c85af77f1f971c30c5b88
[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             if theA<=0. or theA>=2*math.pi:
3059               raise ValueError("The angle parameter should be strictly between 0 and 2*pi.")
3060             anObj = self.PrimOp.MakeCylinderPntVecRHA(thePnt, theAxis, theR, theH, theA)
3061             RaiseIfFailed("MakeCylinderPntVecRHA", self.PrimOp)
3062             anObj.SetParameters(Parameters)
3063             self._autoPublish(anObj, theName, "cylinder")
3064             return anObj
3065
3066         ## Create a cylinder with given radius and height at
3067         #  the origin of coordinate system. Axis of the cylinder
3068         #  will be collinear to the OZ axis of the coordinate system.
3069         #  @param theR Cylinder radius.
3070         #  @param theH Cylinder height.
3071         #  @param theName Object name; when specified, this parameter is used
3072         #         for result publication in the study. Otherwise, if automatic
3073         #         publication is switched on, default value is used for result name.
3074         #
3075         #  @return New GEOM.GEOM_Object, containing the created cylinder.
3076         #
3077         #  @ref tui_creation_cylinder "Example"
3078         @ManageTransactions("PrimOp")
3079         def MakeCylinderRH(self, theR, theH, theName=None):
3080             """
3081             Create a cylinder with given radius and height at
3082             the origin of coordinate system. Axis of the cylinder
3083             will be collinear to the OZ axis of the coordinate system.
3084
3085             Parameters:
3086                 theR Cylinder radius.
3087                 theH Cylinder height.
3088                 theName Object name; when specified, this parameter is used
3089                         for result publication in the study. Otherwise, if automatic
3090                         publication is switched on, default value is used for result name.
3091
3092             Returns:
3093                 New GEOM.GEOM_Object, containing the created cylinder.
3094             """
3095             # Example: see GEOM_TestAll.py
3096             theR,theH,Parameters = ParseParameters(theR, theH)
3097             anObj = self.PrimOp.MakeCylinderRH(theR, theH)
3098             RaiseIfFailed("MakeCylinderRH", self.PrimOp)
3099             anObj.SetParameters(Parameters)
3100             self._autoPublish(anObj, theName, "cylinder")
3101             return anObj
3102             
3103         ## Create a portion of cylinder with given radius, height and angle at
3104         #  the origin of coordinate system. Axis of the cylinder
3105         #  will be collinear to the OZ axis of the coordinate system.
3106         #  @param theR Cylinder radius.
3107         #  @param theH Cylinder height.
3108         #  @param theA Cylinder angle in radians.
3109         #  @param theName Object name; when specified, this parameter is used
3110         #         for result publication in the study. Otherwise, if automatic
3111         #         publication is switched on, default value is used for result name.
3112         #
3113         #  @return New GEOM.GEOM_Object, containing the created cylinder.
3114         #
3115         #  @ref tui_creation_cylinder "Example"
3116         @ManageTransactions("PrimOp")
3117         def MakeCylinderRHA(self, theR, theH, theA, theName=None):
3118             """
3119             Create a portion of cylinder with given radius, height and angle at
3120             the origin of coordinate system. Axis of the cylinder
3121             will be collinear to the OZ axis of the coordinate system.
3122
3123             Parameters:
3124                 theR Cylinder radius.
3125                 theH Cylinder height.
3126                 theA Cylinder angle in radians.
3127                 theName Object name; when specified, this parameter is used
3128                         for result publication in the study. Otherwise, if automatic
3129                         publication is switched on, default value is used for result name.
3130
3131             Returns:
3132                 New GEOM.GEOM_Object, containing the created cylinder.
3133             """
3134             # Example: see GEOM_TestAll.py
3135             flag = False
3136             if isinstance(theA,str):
3137                 flag = True
3138             theR,theH,theA,Parameters = ParseParameters(theR, theH, theA)
3139             if flag:
3140                 theA = theA*math.pi/180.
3141             if theA<=0. or theA>=2*math.pi:
3142               raise ValueError("The angle parameter should be strictly between 0 and 2*pi.")
3143             anObj = self.PrimOp.MakeCylinderRHA(theR, theH, theA)
3144             RaiseIfFailed("MakeCylinderRHA", self.PrimOp)
3145             anObj.SetParameters(Parameters)
3146             self._autoPublish(anObj, theName, "cylinder")
3147             return anObj
3148
3149         ## Create a sphere with given center and radius.
3150         #  @param thePnt Sphere center.
3151         #  @param theR Sphere radius.
3152         #  @param theName Object name; when specified, this parameter is used
3153         #         for result publication in the study. Otherwise, if automatic
3154         #         publication is switched on, default value is used for result name.
3155         #
3156         #  @return New GEOM.GEOM_Object, containing the created sphere.
3157         #
3158         #  @ref tui_creation_sphere "Example"
3159         @ManageTransactions("PrimOp")
3160         def MakeSpherePntR(self, thePnt, theR, theName=None):
3161             """
3162             Create a sphere with given center and radius.
3163
3164             Parameters:
3165                 thePnt Sphere center.
3166                 theR Sphere radius.
3167                 theName Object name; when specified, this parameter is used
3168                         for result publication in the study. Otherwise, if automatic
3169                         publication is switched on, default value is used for result name.
3170
3171             Returns:
3172                 New GEOM.GEOM_Object, containing the created sphere.
3173             """
3174             # Example: see GEOM_TestAll.py
3175             theR,Parameters = ParseParameters(theR)
3176             anObj = self.PrimOp.MakeSpherePntR(thePnt, theR)
3177             RaiseIfFailed("MakeSpherePntR", self.PrimOp)
3178             anObj.SetParameters(Parameters)
3179             self._autoPublish(anObj, theName, "sphere")
3180             return anObj
3181
3182         ## Create a sphere with given center and radius.
3183         #  @param x,y,z Coordinates of sphere center.
3184         #  @param theR Sphere radius.
3185         #  @param theName Object name; when specified, this parameter is used
3186         #         for result publication in the study. Otherwise, if automatic
3187         #         publication is switched on, default value is used for result name.
3188         #
3189         #  @return New GEOM.GEOM_Object, containing the created sphere.
3190         #
3191         #  @ref tui_creation_sphere "Example"
3192         def MakeSphere(self, x, y, z, theR, theName=None):
3193             """
3194             Create a sphere with given center and radius.
3195
3196             Parameters:
3197                 x,y,z Coordinates of sphere center.
3198                 theR Sphere radius.
3199                 theName Object name; when specified, this parameter is used
3200                         for result publication in the study. Otherwise, if automatic
3201                         publication is switched on, default value is used for result name.
3202
3203             Returns:
3204                 New GEOM.GEOM_Object, containing the created sphere.
3205             """
3206             # Example: see GEOM_TestAll.py
3207             point = self.MakeVertex(x, y, z)
3208             # note: auto-publishing is done in self.MakeSpherePntR()
3209             anObj = self.MakeSpherePntR(point, theR, theName)
3210             return anObj
3211
3212         ## Create a sphere with given radius at the origin of coordinate system.
3213         #  @param theR Sphere radius.
3214         #  @param theName Object name; when specified, this parameter is used
3215         #         for result publication in the study. Otherwise, if automatic
3216         #         publication is switched on, default value is used for result name.
3217         #
3218         #  @return New GEOM.GEOM_Object, containing the created sphere.
3219         #
3220         #  @ref tui_creation_sphere "Example"
3221         @ManageTransactions("PrimOp")
3222         def MakeSphereR(self, theR, theName=None):
3223             """
3224             Create a sphere with given radius at the origin of coordinate system.
3225
3226             Parameters:
3227                 theR Sphere radius.
3228                 theName Object name; when specified, this parameter is used
3229                         for result publication in the study. Otherwise, if automatic
3230                         publication is switched on, default value is used for result name.
3231
3232             Returns:
3233                 New GEOM.GEOM_Object, containing the created sphere.
3234             """
3235             # Example: see GEOM_TestAll.py
3236             theR,Parameters = ParseParameters(theR)
3237             anObj = self.PrimOp.MakeSphereR(theR)
3238             RaiseIfFailed("MakeSphereR", self.PrimOp)
3239             anObj.SetParameters(Parameters)
3240             self._autoPublish(anObj, theName, "sphere")
3241             return anObj
3242
3243         ## Create a cone with given base point, axis, height and radiuses.
3244         #  @param thePnt Central point of the first cone base.
3245         #  @param theAxis Cone axis.
3246         #  @param theR1 Radius of the first cone base.
3247         #  @param theR2 Radius of the second cone base.
3248         #    \note If both radiuses are non-zero, the cone will be truncated.
3249         #    \note If the radiuses are equal, a cylinder will be created instead.
3250         #  @param theH Cone height.
3251         #  @param theName Object name; when specified, this parameter is used
3252         #         for result publication in the study. Otherwise, if automatic
3253         #         publication is switched on, default value is used for result name.
3254         #
3255         #  @return New GEOM.GEOM_Object, containing the created cone.
3256         #
3257         #  @ref tui_creation_cone "Example"
3258         @ManageTransactions("PrimOp")
3259         def MakeCone(self, thePnt, theAxis, theR1, theR2, theH, theName=None):
3260             """
3261             Create a cone with given base point, axis, height and radiuses.
3262
3263             Parameters:
3264                 thePnt Central point of the first cone base.
3265                 theAxis Cone axis.
3266                 theR1 Radius of the first cone base.
3267                 theR2 Radius of the second cone base.
3268                 theH Cone height.
3269                 theName Object name; when specified, this parameter is used
3270                         for result publication in the study. Otherwise, if automatic
3271                         publication is switched on, default value is used for result name.
3272
3273             Note:
3274                 If both radiuses are non-zero, the cone will be truncated.
3275                 If the radiuses are equal, a cylinder will be created instead.
3276
3277             Returns:
3278                 New GEOM.GEOM_Object, containing the created cone.
3279             """
3280             # Example: see GEOM_TestAll.py
3281             theR1,theR2,theH,Parameters = ParseParameters(theR1,theR2,theH)
3282             anObj = self.PrimOp.MakeConePntVecR1R2H(thePnt, theAxis, theR1, theR2, theH)
3283             RaiseIfFailed("MakeConePntVecR1R2H", self.PrimOp)
3284             anObj.SetParameters(Parameters)
3285             self._autoPublish(anObj, theName, "cone")
3286             return anObj
3287
3288         ## Create a cone with given height and radiuses at
3289         #  the origin of coordinate system. Axis of the cone will
3290         #  be collinear to the OZ axis of the coordinate system.
3291         #  @param theR1 Radius of the first cone base.
3292         #  @param theR2 Radius of the second cone base.
3293         #    \note If both radiuses are non-zero, the cone will be truncated.
3294         #    \note If the radiuses are equal, a cylinder will be created instead.
3295         #  @param theH Cone height.
3296         #  @param theName Object name; when specified, this parameter is used
3297         #         for result publication in the study. Otherwise, if automatic
3298         #         publication is switched on, default value is used for result name.
3299         #
3300         #  @return New GEOM.GEOM_Object, containing the created cone.
3301         #
3302         #  @ref tui_creation_cone "Example"
3303         @ManageTransactions("PrimOp")
3304         def MakeConeR1R2H(self, theR1, theR2, theH, theName=None):
3305             """
3306             Create a cone with given height and radiuses at
3307             the origin of coordinate system. Axis of the cone will
3308             be collinear to the OZ axis of the coordinate system.
3309
3310             Parameters:
3311                 theR1 Radius of the first cone base.
3312                 theR2 Radius of the second cone base.
3313                 theH Cone height.
3314                 theName Object name; when specified, this parameter is used
3315                         for result publication in the study. Otherwise, if automatic
3316                         publication is switched on, default value is used for result name.
3317
3318             Note:
3319                 If both radiuses are non-zero, the cone will be truncated.
3320                 If the radiuses are equal, a cylinder will be created instead.
3321
3322             Returns:
3323                 New GEOM.GEOM_Object, containing the created cone.
3324             """
3325             # Example: see GEOM_TestAll.py
3326             theR1,theR2,theH,Parameters = ParseParameters(theR1,theR2,theH)
3327             anObj = self.PrimOp.MakeConeR1R2H(theR1, theR2, theH)
3328             RaiseIfFailed("MakeConeR1R2H", self.PrimOp)
3329             anObj.SetParameters(Parameters)
3330             self._autoPublish(anObj, theName, "cone")
3331             return anObj
3332
3333         ## Create a torus with given center, normal vector and radiuses.
3334         #  @param thePnt Torus central point.
3335         #  @param theVec Torus axis of symmetry.
3336         #  @param theRMajor Torus major radius.
3337         #  @param theRMinor Torus minor radius.
3338         #  @param theName Object name; when specified, this parameter is used
3339         #         for result publication in the study. Otherwise, if automatic
3340         #         publication is switched on, default value is used for result name.
3341         #
3342         #  @return New GEOM.GEOM_Object, containing the created torus.
3343         #
3344         #  @ref tui_creation_torus "Example"
3345         @ManageTransactions("PrimOp")
3346         def MakeTorus(self, thePnt, theVec, theRMajor, theRMinor, theName=None):
3347             """
3348             Create a torus with given center, normal vector and radiuses.
3349
3350             Parameters:
3351                 thePnt Torus central point.
3352                 theVec Torus axis of symmetry.
3353                 theRMajor Torus major radius.
3354                 theRMinor Torus minor radius.
3355                 theName Object name; when specified, this parameter is used
3356                         for result publication in the study. Otherwise, if automatic
3357                         publication is switched on, default value is used for result name.
3358
3359            Returns:
3360                 New GEOM.GEOM_Object, containing the created torus.
3361             """
3362             # Example: see GEOM_TestAll.py
3363             theRMajor,theRMinor,Parameters = ParseParameters(theRMajor,theRMinor)
3364             anObj = self.PrimOp.MakeTorusPntVecRR(thePnt, theVec, theRMajor, theRMinor)
3365             RaiseIfFailed("MakeTorusPntVecRR", self.PrimOp)
3366             anObj.SetParameters(Parameters)
3367             self._autoPublish(anObj, theName, "torus")
3368             return anObj
3369
3370         ## Create a torus with given radiuses at the origin of coordinate system.
3371         #  @param theRMajor Torus major radius.
3372         #  @param theRMinor Torus minor radius.
3373         #  @param theName Object name; when specified, this parameter is used
3374         #         for result publication in the study. Otherwise, if automatic
3375         #         publication is switched on, default value is used for result name.
3376         #
3377         #  @return New GEOM.GEOM_Object, containing the created torus.
3378         #
3379         #  @ref tui_creation_torus "Example"
3380         @ManageTransactions("PrimOp")
3381         def MakeTorusRR(self, theRMajor, theRMinor, theName=None):
3382             """
3383            Create a torus with given radiuses at the origin of coordinate system.
3384
3385            Parameters:
3386                 theRMajor Torus major radius.
3387                 theRMinor Torus minor radius.
3388                 theName Object name; when specified, this parameter is used
3389                         for result publication in the study. Otherwise, if automatic
3390                         publication is switched on, default value is used for result name.
3391
3392            Returns:
3393                 New GEOM.GEOM_Object, containing the created torus.
3394             """
3395             # Example: see GEOM_TestAll.py
3396             theRMajor,theRMinor,Parameters = ParseParameters(theRMajor,theRMinor)
3397             anObj = self.PrimOp.MakeTorusRR(theRMajor, theRMinor)
3398             RaiseIfFailed("MakeTorusRR", self.PrimOp)
3399             anObj.SetParameters(Parameters)
3400             self._autoPublish(anObj, theName, "torus")
3401             return anObj
3402
3403         # end of l3_3d_primitives
3404         ## @}
3405
3406         ## @addtogroup l3_complex
3407         ## @{
3408
3409         ## Create a shape by extrusion of the base shape along a vector, defined by two points.
3410         #  @param theBase Base shape to be extruded.
3411         #  @param thePoint1 First end of extrusion vector.
3412         #  @param thePoint2 Second end of extrusion vector.
3413         #  @param theScaleFactor Use it to make prism with scaled second base.
3414         #                        Nagative value means not scaled second base.
3415         #  @param theName Object name; when specified, this parameter is used
3416         #         for result publication in the study. Otherwise, if automatic
3417         #         publication is switched on, default value is used for result name.
3418         #
3419         #  @return New GEOM.GEOM_Object, containing the created prism.
3420         #
3421         #  @ref tui_creation_prism "Example"
3422         @ManageTransactions("PrimOp")
3423         def MakePrism(self, theBase, thePoint1, thePoint2, theScaleFactor = -1.0, theName=None):
3424             """
3425             Create a shape by extrusion of the base shape along a vector, defined by two points.
3426
3427             Parameters:
3428                 theBase Base shape to be extruded.
3429                 thePoint1 First end of extrusion vector.
3430                 thePoint2 Second end of extrusion vector.
3431                 theScaleFactor Use it to make prism with scaled second base.
3432                                Nagative value means not scaled second base.
3433                 theName Object name; when specified, this parameter is used
3434                         for result publication in the study. Otherwise, if automatic
3435                         publication is switched on, default value is used for result name.
3436
3437             Returns:
3438                 New GEOM.GEOM_Object, containing the created prism.
3439             """
3440             # Example: see GEOM_TestAll.py
3441             anObj = None
3442             Parameters = ""
3443             if theScaleFactor > 0:
3444                 theScaleFactor,Parameters = ParseParameters(theScaleFactor)
3445                 anObj = self.PrimOp.MakePrismTwoPntWithScaling(theBase, thePoint1, thePoint2, theScaleFactor)
3446             else:
3447                 anObj = self.PrimOp.MakePrismTwoPnt(theBase, thePoint1, thePoint2)
3448             RaiseIfFailed("MakePrismTwoPnt", self.PrimOp)
3449             anObj.SetParameters(Parameters)
3450             self._autoPublish(anObj, theName, "prism")
3451             return anObj
3452
3453         ## Create a shape by extrusion of the base shape along a
3454         #  vector, defined by two points, in 2 Ways (forward/backward).
3455         #  @param theBase Base shape to be extruded.
3456         #  @param thePoint1 First end of extrusion vector.
3457         #  @param thePoint2 Second end of extrusion vector.
3458         #  @param theName Object name; when specified, this parameter is used
3459         #         for result publication in the study. Otherwise, if automatic
3460         #         publication is switched on, default value is used for result name.
3461         #
3462         #  @return New GEOM.GEOM_Object, containing the created prism.
3463         #
3464         #  @ref tui_creation_prism "Example"
3465         @ManageTransactions("PrimOp")
3466         def MakePrism2Ways(self, theBase, thePoint1, thePoint2, theName=None):
3467             """
3468             Create a shape by extrusion of the base shape along a
3469             vector, defined by two points, in 2 Ways (forward/backward).
3470
3471             Parameters:
3472                 theBase Base shape to be extruded.
3473                 thePoint1 First end of extrusion vector.
3474                 thePoint2 Second end of extrusion vector.
3475                 theName Object name; when specified, this parameter is used
3476                         for result publication in the study. Otherwise, if automatic
3477                         publication is switched on, default value is used for result name.
3478
3479             Returns:
3480                 New GEOM.GEOM_Object, containing the created prism.
3481             """
3482             # Example: see GEOM_TestAll.py
3483             anObj = self.PrimOp.MakePrismTwoPnt2Ways(theBase, thePoint1, thePoint2)
3484             RaiseIfFailed("MakePrismTwoPnt", self.PrimOp)
3485             self._autoPublish(anObj, theName, "prism")
3486             return anObj
3487
3488         ## Create a shape by extrusion of the base shape along the vector,
3489         #  i.e. all the space, transfixed by the base shape during its translation
3490         #  along the vector on the given distance.
3491         #  @param theBase Base shape to be extruded.
3492         #  @param theVec Direction of extrusion.
3493         #  @param theH Prism dimension along theVec.
3494         #  @param theScaleFactor Use it to make prism with scaled second base.
3495         #                        Negative value means not scaled second base.
3496         #  @param theName Object name; when specified, this parameter is used
3497         #         for result publication in the study. Otherwise, if automatic
3498         #         publication is switched on, default value is used for result name.
3499         #
3500         #  @return New GEOM.GEOM_Object, containing the created prism.
3501         #
3502         #  @ref tui_creation_prism "Example"
3503         @ManageTransactions("PrimOp")
3504         def MakePrismVecH(self, theBase, theVec, theH, theScaleFactor = -1.0, theName=None):
3505             """
3506             Create a shape by extrusion of the base shape along the vector,
3507             i.e. all the space, transfixed by the base shape during its translation
3508             along the vector on the given distance.
3509
3510             Parameters:
3511                 theBase Base shape to be extruded.
3512                 theVec Direction of extrusion.
3513                 theH Prism dimension along theVec.
3514                 theScaleFactor Use it to make prism with scaled second base.
3515                                Negative value means not scaled second base.
3516                 theName Object name; when specified, this parameter is used
3517                         for result publication in the study. Otherwise, if automatic
3518                         publication is switched on, default value is used for result name.
3519
3520             Returns:
3521                 New GEOM.GEOM_Object, containing the created prism.
3522             """
3523             # Example: see GEOM_TestAll.py
3524             anObj = None
3525             Parameters = ""
3526             if theScaleFactor > 0:
3527                 theH,theScaleFactor,Parameters = ParseParameters(theH,theScaleFactor)
3528                 anObj = self.PrimOp.MakePrismVecHWithScaling(theBase, theVec, theH, theScaleFactor)
3529             else:
3530                 theH,Parameters = ParseParameters(theH)
3531                 anObj = self.PrimOp.MakePrismVecH(theBase, theVec, theH)
3532             RaiseIfFailed("MakePrismVecH", self.PrimOp)
3533             anObj.SetParameters(Parameters)
3534             self._autoPublish(anObj, theName, "prism")
3535             return anObj
3536
3537         ## Create a shape by extrusion of the base shape along the vector,
3538         #  i.e. all the space, transfixed by the base shape during its translation
3539         #  along the vector on the given distance in 2 Ways (forward/backward).
3540         #  @param theBase Base shape to be extruded.
3541         #  @param theVec Direction of extrusion.
3542         #  @param theH Prism dimension along theVec in forward direction.
3543         #  @param theName Object name; when specified, this parameter is used
3544         #         for result publication in the study. Otherwise, if automatic
3545         #         publication is switched on, default value is used for result name.
3546         #
3547         #  @return New GEOM.GEOM_Object, containing the created prism.
3548         #
3549         #  @ref tui_creation_prism "Example"
3550         @ManageTransactions("PrimOp")
3551         def MakePrismVecH2Ways(self, theBase, theVec, theH, theName=None):
3552             """
3553             Create a shape by extrusion of the base shape along the vector,
3554             i.e. all the space, transfixed by the base shape during its translation
3555             along the vector on the given distance in 2 Ways (forward/backward).
3556
3557             Parameters:
3558                 theBase Base shape to be extruded.
3559                 theVec Direction of extrusion.
3560                 theH Prism dimension along theVec in forward direction.
3561                 theName Object name; when specified, this parameter is used
3562                         for result publication in the study. Otherwise, if automatic
3563                         publication is switched on, default value is used for result name.
3564
3565             Returns:
3566                 New GEOM.GEOM_Object, containing the created prism.
3567             """
3568             # Example: see GEOM_TestAll.py
3569             theH,Parameters = ParseParameters(theH)
3570             anObj = self.PrimOp.MakePrismVecH2Ways(theBase, theVec, theH)
3571             RaiseIfFailed("MakePrismVecH2Ways", self.PrimOp)
3572             anObj.SetParameters(Parameters)
3573             self._autoPublish(anObj, theName, "prism")
3574             return anObj
3575
3576         ## Create a shape by extrusion of the base shape along the dx, dy, dz direction
3577         #  @param theBase Base shape to be extruded.
3578         #  @param theDX, theDY, theDZ Directions of extrusion.
3579         #  @param theScaleFactor Use it to make prism with scaled second base.
3580         #                        Nagative value means not scaled second base.
3581         #  @param theName Object name; when specified, this parameter is used
3582         #         for result publication in the study. Otherwise, if automatic
3583         #         publication is switched on, default value is used for result name.
3584         #
3585         #  @return New GEOM.GEOM_Object, containing the created prism.
3586         #
3587         #  @ref tui_creation_prism "Example"
3588         @ManageTransactions("PrimOp")
3589         def MakePrismDXDYDZ(self, theBase, theDX, theDY, theDZ, theScaleFactor = -1.0, theName=None):
3590             """
3591             Create a shape by extrusion of the base shape along the dx, dy, dz direction
3592
3593             Parameters:
3594                 theBase Base shape to be extruded.
3595                 theDX, theDY, theDZ Directions of extrusion.
3596                 theScaleFactor Use it to make prism with scaled second base.
3597                                Nagative value means not scaled second base.
3598                 theName Object name; when specified, this parameter is used
3599                         for result publication in the study. Otherwise, if automatic
3600                         publication is switched on, default value is used for result name.
3601
3602             Returns:
3603                 New GEOM.GEOM_Object, containing the created prism.
3604             """
3605             # Example: see GEOM_TestAll.py
3606             anObj = None
3607             Parameters = ""
3608             if theScaleFactor > 0:
3609                 theDX,theDY,theDZ,theScaleFactor,Parameters = ParseParameters(theDX, theDY, theDZ, theScaleFactor)
3610                 anObj = self.PrimOp.MakePrismDXDYDZWithScaling(theBase, theDX, theDY, theDZ, theScaleFactor)
3611             else:
3612                 theDX,theDY,theDZ,Parameters = ParseParameters(theDX, theDY, theDZ)
3613                 anObj = self.PrimOp.MakePrismDXDYDZ(theBase, theDX, theDY, theDZ)
3614             RaiseIfFailed("MakePrismDXDYDZ", self.PrimOp)
3615             anObj.SetParameters(Parameters)
3616             self._autoPublish(anObj, theName, "prism")
3617             return anObj
3618
3619         ## Create a shape by extrusion of the base shape along the dx, dy, dz direction
3620         #  i.e. all the space, transfixed by the base shape during its translation
3621         #  along the vector on the given distance in 2 Ways (forward/backward).
3622         #  @param theBase Base shape to be extruded.
3623         #  @param theDX, theDY, theDZ Directions of extrusion.
3624         #  @param theName Object name; when specified, this parameter is used
3625         #         for result publication in the study. Otherwise, if automatic
3626         #         publication is switched on, default value is used for result name.
3627         #
3628         #  @return New GEOM.GEOM_Object, containing the created prism.
3629         #
3630         #  @ref tui_creation_prism "Example"
3631         @ManageTransactions("PrimOp")
3632         def MakePrismDXDYDZ2Ways(self, theBase, theDX, theDY, theDZ, theName=None):
3633             """
3634             Create a shape by extrusion of the base shape along the dx, dy, dz direction
3635             i.e. all the space, transfixed by the base shape during its translation
3636             along the vector on the given distance in 2 Ways (forward/backward).
3637
3638             Parameters:
3639                 theBase Base shape to be extruded.
3640                 theDX, theDY, theDZ Directions of extrusion.
3641                 theName Object name; when specified, this parameter is used
3642                         for result publication in the study. Otherwise, if automatic
3643                         publication is switched on, default value is used for result name.
3644
3645             Returns:
3646                 New GEOM.GEOM_Object, containing the created prism.
3647             """
3648             # Example: see GEOM_TestAll.py
3649             theDX,theDY,theDZ,Parameters = ParseParameters(theDX, theDY, theDZ)
3650             anObj = self.PrimOp.MakePrismDXDYDZ2Ways(theBase, theDX, theDY, theDZ)
3651             RaiseIfFailed("MakePrismDXDYDZ2Ways", self.PrimOp)
3652             anObj.SetParameters(Parameters)
3653             self._autoPublish(anObj, theName, "prism")
3654             return anObj
3655
3656         ## Create a shape by revolution of the base shape around the axis
3657         #  on the given angle, i.e. all the space, transfixed by the base
3658         #  shape during its rotation around the axis on the given angle.
3659         #  @param theBase Base shape to be rotated.
3660         #  @param theAxis Rotation axis.
3661         #  @param theAngle Rotation angle in radians.
3662         #  @param theName Object name; when specified, this parameter is used
3663         #         for result publication in the study. Otherwise, if automatic
3664         #         publication is switched on, default value is used for result name.
3665         #
3666         #  @return New GEOM.GEOM_Object, containing the created revolution.
3667         #
3668         #  @ref tui_creation_revolution "Example"
3669         @ManageTransactions("PrimOp")
3670         def MakeRevolution(self, theBase, theAxis, theAngle, theName=None):
3671             """
3672             Create a shape by revolution of the base shape around the axis
3673             on the given angle, i.e. all the space, transfixed by the base
3674             shape during its rotation around the axis on the given angle.
3675
3676             Parameters:
3677                 theBase Base shape to be rotated.
3678                 theAxis Rotation axis.
3679                 theAngle Rotation angle in radians.
3680                 theName Object name; when specified, this parameter is used
3681                         for result publication in the study. Otherwise, if automatic
3682                         publication is switched on, default value is used for result name.
3683
3684             Returns:
3685                 New GEOM.GEOM_Object, containing the created revolution.
3686             """
3687             # Example: see GEOM_TestAll.py
3688             theAngle,Parameters = ParseParameters(theAngle)
3689             anObj = self.PrimOp.MakeRevolutionAxisAngle(theBase, theAxis, theAngle)
3690             RaiseIfFailed("MakeRevolutionAxisAngle", self.PrimOp)
3691             anObj.SetParameters(Parameters)
3692             self._autoPublish(anObj, theName, "revolution")
3693             return anObj
3694
3695         ## Create a shape by revolution of the base shape around the axis
3696         #  on the given angle, i.e. all the space, transfixed by the base
3697         #  shape during its rotation around the axis on the given angle in
3698         #  both directions (forward/backward)
3699         #  @param theBase Base shape to be rotated.
3700         #  @param theAxis Rotation axis.
3701         #  @param theAngle Rotation angle in radians.
3702         #  @param theName Object name; when specified, this parameter is used
3703         #         for result publication in the study. Otherwise, if automatic
3704         #         publication is switched on, default value is used for result name.
3705         #
3706         #  @return New GEOM.GEOM_Object, containing the created revolution.
3707         #
3708         #  @ref tui_creation_revolution "Example"
3709         @ManageTransactions("PrimOp")
3710         def MakeRevolution2Ways(self, theBase, theAxis, theAngle, theName=None):
3711             """
3712             Create a shape by revolution of the base shape around the axis
3713             on the given angle, i.e. all the space, transfixed by the base
3714             shape during its rotation around the axis on the given angle in
3715             both directions (forward/backward).
3716
3717             Parameters:
3718                 theBase Base shape to be rotated.
3719                 theAxis Rotation axis.
3720                 theAngle Rotation angle in radians.
3721                 theName Object name; when specified, this parameter is used
3722                         for result publication in the study. Otherwise, if automatic
3723                         publication is switched on, default value is used for result name.
3724
3725             Returns:
3726                 New GEOM.GEOM_Object, containing the created revolution.
3727             """
3728             theAngle,Parameters = ParseParameters(theAngle)
3729             anObj = self.PrimOp.MakeRevolutionAxisAngle2Ways(theBase, theAxis, theAngle)
3730             RaiseIfFailed("MakeRevolutionAxisAngle2Ways", self.PrimOp)
3731             anObj.SetParameters(Parameters)
3732             self._autoPublish(anObj, theName, "revolution")
3733             return anObj
3734
3735         ## Create a face from a given set of contours.
3736         #  @param theContours either a list or a compound of edges/wires.
3737         #  @param theMinDeg a minimal degree of BSpline surface to create.
3738         #  @param theMaxDeg a maximal degree of BSpline surface to create.
3739         #  @param theTol2D a 2d tolerance to be reached.
3740         #  @param theTol3D a 3d tolerance to be reached.
3741         #  @param theNbIter a number of iteration of approximation algorithm.
3742         #  @param theMethod Kind of method to perform filling operation
3743         #         (see GEOM.filling_oper_method enum).
3744         #  @param isApprox if True, BSpline curves are generated in the process
3745         #                  of surface construction. By default it is False, that means
3746         #                  the surface is created using given curves. The usage of
3747         #                  Approximation makes the algorithm work slower, but allows
3748         #                  building the surface for rather complex cases.
3749         #  @param theName Object name; when specified, this parameter is used
3750         #         for result publication in the study. Otherwise, if automatic
3751         #         publication is switched on, default value is used for result name.
3752         #
3753         #  @return New GEOM.GEOM_Object (face), containing the created filling surface.
3754         #
3755         #  @ref tui_creation_filling "Example"
3756         @ManageTransactions("PrimOp")
3757         def MakeFilling(self, theContours, theMinDeg=2, theMaxDeg=5, theTol2D=0.0001,
3758                         theTol3D=0.0001, theNbIter=0, theMethod=GEOM.FOM_Default, isApprox=0, theName=None):
3759             """
3760             Create a face from a given set of contours.
3761
3762             Parameters:
3763                 theContours either a list or a compound of edges/wires.
3764                 theMinDeg a minimal degree of BSpline surface to create.
3765                 theMaxDeg a maximal degree of BSpline surface to create.
3766                 theTol2D a 2d tolerance to be reached.
3767                 theTol3D a 3d tolerance to be reached.
3768                 theNbIter a number of iteration of approximation algorithm.
3769                 theMethod Kind of method to perform filling operation
3770                           (see GEOM.filling_oper_method enum).
3771                 isApprox if True, BSpline curves are generated in the process
3772                          of surface construction. By default it is False, that means
3773                          the surface is created using given curves. The usage of
3774                          Approximation makes the algorithm work slower, but allows
3775                          building the surface for rather complex cases.
3776                 theName Object name; when specified, this parameter is used
3777                         for result publication in the study. Otherwise, if automatic
3778                         publication is switched on, default value is used for result name.
3779
3780             Returns:
3781                 New GEOM.GEOM_Object (face), containing the created filling surface.
3782
3783             Example of usage:
3784                 filling = geompy.MakeFilling(compound, 2, 5, 0.0001, 0.0001, 5)
3785             """
3786             # Example: see GEOM_TestAll.py
3787             theMinDeg,theMaxDeg,theTol2D,theTol3D,theNbIter,Parameters = ParseParameters(theMinDeg, theMaxDeg, theTol2D, theTol3D, theNbIter)
3788             anObj = self.PrimOp.MakeFilling(ToList(theContours), theMinDeg, theMaxDeg,
3789                                             theTol2D, theTol3D, theNbIter,
3790                                             theMethod, isApprox)
3791             RaiseIfFailed("MakeFilling", self.PrimOp)
3792             anObj.SetParameters(Parameters)
3793             self._autoPublish(anObj, theName, "filling")
3794             return anObj
3795
3796
3797         ## Create a face from a given set of contours.
3798         #  This method corresponds to MakeFilling() with isApprox=True.
3799         #  @param theContours either a list or a compound of edges/wires.
3800         #  @param theMinDeg a minimal degree of BSpline surface to create.
3801         #  @param theMaxDeg a maximal degree of BSpline surface to create.
3802         #  @param theTol3D a 3d tolerance to be reached.
3803         #  @param theName Object name; when specified, this parameter is used
3804         #         for result publication in the study. Otherwise, if automatic
3805         #         publication is switched on, default value is used for result name.
3806         #
3807         #  @return New GEOM.GEOM_Object (face), containing the created filling surface.
3808         #
3809         #  @ref tui_creation_filling "Example"
3810         @ManageTransactions("PrimOp")
3811         def MakeFillingNew(self, theContours, theMinDeg=2, theMaxDeg=5, theTol3D=0.0001, theName=None):
3812             """
3813             Create a filling from the given compound of contours.
3814             This method corresponds to MakeFilling() with isApprox=True.
3815
3816             Parameters:
3817                 theContours either a list or a compound of edges/wires.
3818                 theMinDeg a minimal degree of BSpline surface to create.
3819                 theMaxDeg a maximal degree of BSpline surface to create.
3820                 theTol3D a 3d tolerance to be reached.
3821                 theName Object name; when specified, this parameter is used
3822                         for result publication in the study. Otherwise, if automatic
3823                         publication is switched on, default value is used for result name.
3824
3825             Returns:
3826                 New GEOM.GEOM_Object (face), containing the created filling surface.
3827
3828             Example of usage:
3829                 filling = geompy.MakeFillingNew(compound, 2, 5, 0.0001)
3830             """
3831             # Example: see GEOM_TestAll.py
3832             theMinDeg,theMaxDeg,theTol3D,Parameters = ParseParameters(theMinDeg, theMaxDeg, theTol3D)
3833             anObj = self.PrimOp.MakeFilling(ToList(theContours), theMinDeg, theMaxDeg,
3834                                             0, theTol3D, 0, GEOM.FOM_Default, True)
3835             RaiseIfFailed("MakeFillingNew", self.PrimOp)
3836             anObj.SetParameters(Parameters)
3837             self._autoPublish(anObj, theName, "filling")
3838             return anObj
3839
3840         ## Create a shell or solid passing through set of sections.Sections should be wires,edges or vertices.
3841         #  @param theSeqSections - set of specified sections.
3842         #  @param theModeSolid - mode defining building solid or shell
3843         #  @param thePreci - precision 3D used for smoothing
3844         #  @param theRuled - mode defining type of the result surfaces (ruled or smoothed).
3845         #  @param theName Object name; when specified, this parameter is used
3846         #         for result publication in the study. Otherwise, if automatic
3847         #         publication is switched on, default value is used for result name.
3848         #
3849         #  @return New GEOM.GEOM_Object, containing the created shell or solid.
3850         #
3851         #  @ref swig_todo "Example"
3852         @ManageTransactions("PrimOp")
3853         def MakeThruSections(self, theSeqSections, theModeSolid, thePreci, theRuled, theName=None):
3854             """
3855             Create a shell or solid passing through set of sections.Sections should be wires,edges or vertices.
3856
3857             Parameters:
3858                 theSeqSections - set of specified sections.
3859                 theModeSolid - mode defining building solid or shell
3860                 thePreci - precision 3D used for smoothing
3861                 theRuled - mode defining type of the result surfaces (ruled or smoothed).
3862                 theName Object name; when specified, this parameter is used
3863                         for result publication in the study. Otherwise, if automatic
3864                         publication is switched on, default value is used for result name.
3865
3866             Returns:
3867                 New GEOM.GEOM_Object, containing the created shell or solid.
3868             """
3869             # Example: see GEOM_TestAll.py
3870             anObj = self.PrimOp.MakeThruSections(theSeqSections,theModeSolid,thePreci,theRuled)
3871             RaiseIfFailed("MakeThruSections", self.PrimOp)
3872             self._autoPublish(anObj, theName, "filling")
3873             return anObj
3874
3875         ## Create a shape by extrusion of the base shape along
3876         #  the path shape. The path shape can be a wire or an edge. It is
3877         #  possible to generate groups along with the result by means of
3878         #  setting the flag \a IsGenerateGroups.<BR>
3879         #  If \a thePath is a closed edge or wire and \a IsGenerateGroups is
3880         #  set, an error is occured. If \a thePath is not closed edge/wire,
3881         #  the following groups are returned:
3882         #  - If \a theBase is unclosed edge or wire: "Down", "Up", "Side1",
3883         #    "Side2";
3884         #  - If \a theBase is closed edge or wire, face or shell: "Down", "Up",
3885         #    "Other".
3886         #  .
3887         #  "Down" and "Up" groups contain:
3888         #  - Edges if \a theBase is edge or wire;
3889         #  - Faces if \a theBase is face or shell.<BR>
3890         #  .
3891         #  "Side1" and "Side2" groups contain edges generated from the first
3892         #  and last vertices of \a theBase. The first and last vertices are
3893         #  determined taking into account edge/wire orientation.<BR>
3894         #  "Other" group represents faces generated from the bounding edges of
3895         #  \a theBase.
3896         #
3897         #  @param theBase Base shape to be extruded.
3898         #  @param thePath Path shape to extrude the base shape along it.
3899         #  @param IsGenerateGroups flag that tells if it is necessary to
3900         #         create groups. It is equal to False by default.
3901         #  @param theName Object name; when specified, this parameter is used
3902         #         for result publication in the study. Otherwise, if automatic
3903         #         publication is switched on, default value is used for result name.
3904         #
3905         #  @return New GEOM.GEOM_Object, containing the created pipe if 
3906         #          \a IsGenerateGroups is not set. Otherwise it returns new
3907         #          GEOM.ListOfGO. Its first element is the created pipe, the
3908         #          remaining ones are created groups.
3909         #
3910         #  @ref tui_creation_pipe "Example"
3911         @ManageTransactions("PrimOp")
3912         def MakePipe(self, theBase, thePath,
3913                      IsGenerateGroups=False, theName=None):
3914             """
3915             Create a shape by extrusion of the base shape along
3916             the path shape. The path shape can be a wire or an edge. It is
3917             possible to generate groups along with the result by means of
3918             setting the flag IsGenerateGroups.
3919             If thePath is a closed edge or wire and IsGenerateGroups is
3920             set, an error is occured. If thePath is not closed edge/wire,
3921             the following groups are returned:
3922             - If theBase is unclosed edge or wire: "Down", "Up", "Side1",
3923               "Side2";
3924             - If theBase is closed edge or wire, face or shell: "Down", "Up",
3925               "Other".
3926             "Down" and "Up" groups contain:
3927             - Edges if theBase is edge or wire;
3928             - Faces if theBase is face or shell.
3929             "Side1" and "Side2" groups contain edges generated from the first
3930             and last vertices of theBase. The first and last vertices are
3931             determined taking into account edge/wire orientation.
3932             "Other" group represents faces generated from the bounding edges of
3933             theBase.
3934
3935             Parameters:
3936                 theBase Base shape to be extruded.
3937                 thePath Path shape to extrude the base shape along it.
3938                 IsGenerateGroups flag that tells if it is necessary to
3939                         create groups. It is equal to False by default.
3940                 theName Object name; when specified, this parameter is used
3941                         for result publication in the study. Otherwise, if automatic
3942                         publication is switched on, default value is used for result name.
3943
3944             Returns:
3945                 New GEOM.GEOM_Object, containing the created pipe if 
3946                 IsGenerateGroups is not set. Otherwise it returns new
3947                 GEOM.ListOfGO. Its first element is the created pipe, the
3948                 remaining ones are created groups.
3949             """
3950             # Example: see GEOM_TestAll.py
3951             aList = self.PrimOp.MakePipe(theBase, thePath, IsGenerateGroups)
3952             RaiseIfFailed("MakePipe", self.PrimOp)
3953
3954             if IsGenerateGroups:
3955               self._autoPublish(aList, theName, "pipe")
3956               return aList
3957
3958             self._autoPublish(aList[0], theName, "pipe")
3959             return aList[0]
3960
3961         ## Create a shape by extrusion of the profile shape along
3962         #  the path shape. The path shape can be a wire or an edge.
3963         #  the several profiles can be specified in the several locations of path.
3964         #  It is possible to generate groups along with the result by means of
3965         #  setting the flag \a IsGenerateGroups. For detailed information on
3966         #  groups that can be created please see the method MakePipe().
3967         #  @param theSeqBases - list of  Bases shape to be extruded.
3968         #  @param theLocations - list of locations on the path corresponding
3969         #                        specified list of the Bases shapes. Number of locations
3970         #                        should be equal to number of bases or list of locations can be empty.
3971         #  @param thePath - Path shape to extrude the base shape along it.
3972         #  @param theWithContact - the mode defining that the section is translated to be in
3973         #                          contact with the spine.
3974         #  @param theWithCorrection - defining that the section is rotated to be
3975         #                             orthogonal to the spine tangent in the correspondent point
3976         #  @param IsGenerateGroups - flag that tells if it is necessary to
3977         #                          create groups. It is equal to False by default.
3978         #  @param theName Object name; when specified, this parameter is used
3979         #         for result publication in the study. Otherwise, if automatic
3980         #         publication is switched on, default value is used for result name.
3981         #
3982         #  @return New GEOM.GEOM_Object, containing the created pipe if 
3983         #          \a IsGenerateGroups is not set. Otherwise it returns new
3984         #          GEOM.ListOfGO. Its first element is the created pipe, the
3985         #          remaining ones are created groups.
3986         #
3987         #  @ref tui_creation_pipe_with_diff_sec "Example"
3988         @ManageTransactions("PrimOp")
3989         def MakePipeWithDifferentSections(self, theSeqBases,
3990                                           theLocations, thePath,
3991                                           theWithContact, theWithCorrection,
3992                                           IsGenerateGroups=False, theName=None):
3993             """
3994             Create a shape by extrusion of the profile shape along
3995             the path shape. The path shape can be a wire or an edge.
3996             the several profiles can be specified in the several locations of path.
3997             It is possible to generate groups along with the result by means of
3998             setting the flag IsGenerateGroups. For detailed information on
3999             groups that can be created please see the method geompy.MakePipe().
4000
4001             Parameters:
4002                 theSeqBases - list of  Bases shape to be extruded.
4003                 theLocations - list of locations on the path corresponding
4004                                specified list of the Bases shapes. Number of locations
4005                                should be equal to number of bases or list of locations can be empty.
4006                 thePath - Path shape to extrude the base shape along it.
4007                 theWithContact - the mode defining that the section is translated to be in
4008                                  contact with the spine(0/1)
4009                 theWithCorrection - defining that the section is rotated to be
4010                                     orthogonal to the spine tangent in the correspondent point (0/1)
4011                 IsGenerateGroups - flag that tells if it is necessary to
4012                                  create groups. It is equal to False by default.
4013                 theName Object name; when specified, this parameter is used
4014                         for result publication in the study. Otherwise, if automatic
4015                         publication is switched on, default value is used for result name.
4016
4017             Returns:
4018                 New GEOM.GEOM_Object, containing the created pipe if 
4019                 IsGenerateGroups is not set. Otherwise it returns new
4020                 GEOM.ListOfGO. Its first element is the created pipe, the
4021                 remaining ones are created groups.
4022             """
4023             aList = self.PrimOp.MakePipeWithDifferentSections(theSeqBases,
4024                                                               theLocations, thePath,
4025                                                               theWithContact, theWithCorrection,
4026                                                               IsGenerateGroups)
4027             RaiseIfFailed("MakePipeWithDifferentSections", self.PrimOp)
4028
4029             if IsGenerateGroups:
4030               self._autoPublish(aList, theName, "pipe")
4031               return aList
4032
4033             self._autoPublish(aList[0], theName, "pipe")
4034             return aList[0]
4035
4036         ## Create a shape by extrusion of the profile shape along
4037         #  the path shape. The path shape can be a wire or an edge.
4038         #  the several profiles can be specified in the several locations of path.
4039         #  It is possible to generate groups along with the result by means of
4040         #  setting the flag \a IsGenerateGroups. For detailed information on
4041         #  groups that can be created please see the method MakePipe().
4042         #  @param theSeqBases - list of  Bases shape to be extruded. Base shape must be
4043         #                       shell or face. If number of faces in neighbour sections
4044         #                       aren't coincided result solid between such sections will
4045         #                       be created using external boundaries of this shells.
4046         #  @param theSeqSubBases - list of corresponding sub-shapes of section shapes.
4047         #                          This list is used for searching correspondences between
4048         #                          faces in the sections. Size of this list must be equal
4049         #                          to size of list of base shapes.
4050         #  @param theLocations - list of locations on the path corresponding
4051         #                        specified list of the Bases shapes. Number of locations
4052         #                        should be equal to number of bases. First and last
4053         #                        locations must be coincided with first and last vertexes
4054         #                        of path correspondingly.
4055         #  @param thePath - Path shape to extrude the base shape along it.
4056         #  @param theWithContact - the mode defining that the section is translated to be in
4057         #                          contact with the spine.
4058         #  @param theWithCorrection - defining that the section is rotated to be
4059         #                             orthogonal to the spine tangent in the correspondent point
4060         #  @param IsGenerateGroups - flag that tells if it is necessary to
4061         #                          create groups. It is equal to False by default.
4062         #  @param theName Object name; when specified, this parameter is used
4063         #         for result publication in the study. Otherwise, if automatic
4064         #         publication is switched on, default value is used for result name.
4065         #
4066         #  @return New GEOM.GEOM_Object, containing the created solids if 
4067         #          \a IsGenerateGroups is not set. Otherwise it returns new
4068         #          GEOM.ListOfGO. Its first element is the created solids, the
4069         #          remaining ones are created groups.
4070         #
4071         #  @ref tui_creation_pipe_with_shell_sec "Example"
4072         @ManageTransactions("PrimOp")
4073         def MakePipeWithShellSections(self, theSeqBases, theSeqSubBases,
4074                                       theLocations, thePath,
4075                                       theWithContact, theWithCorrection,
4076                                       IsGenerateGroups=False, theName=None):
4077             """
4078             Create a shape by extrusion of the profile shape along
4079             the path shape. The path shape can be a wire or an edge.
4080             the several profiles can be specified in the several locations of path.
4081             It is possible to generate groups along with the result by means of
4082             setting the flag IsGenerateGroups. For detailed information on
4083             groups that can be created please see the method geompy.MakePipe().
4084
4085             Parameters:
4086                 theSeqBases - list of  Bases shape to be extruded. Base shape must be
4087                               shell or face. If number of faces in neighbour sections
4088                               aren't coincided result solid between such sections will
4089                               be created using external boundaries of this shells.
4090                 theSeqSubBases - list of corresponding sub-shapes of section shapes.
4091                                  This list is used for searching correspondences between
4092                                  faces in the sections. Size of this list must be equal
4093                                  to size of list of base shapes.
4094                 theLocations - list of locations on the path corresponding
4095                                specified list of the Bases shapes. Number of locations
4096                                should be equal to number of bases. First and last
4097                                locations must be coincided with first and last vertexes
4098                                of path correspondingly.
4099                 thePath - Path shape to extrude the base shape along it.
4100                 theWithContact - the mode defining that the section is translated to be in
4101                                  contact with the spine (0/1)
4102                 theWithCorrection - defining that the section is rotated to be
4103                                     orthogonal to the spine tangent in the correspondent point (0/1)
4104                 IsGenerateGroups - flag that tells if it is necessary to
4105                                  create groups. It is equal to False by default.
4106                 theName Object name; when specified, this parameter is used
4107                         for result publication in the study. Otherwise, if automatic
4108                         publication is switched on, default value is used for result name.
4109
4110             Returns:
4111                 New GEOM.GEOM_Object, containing the created solids if 
4112                 IsGenerateGroups is not set. Otherwise it returns new
4113                 GEOM.ListOfGO. Its first element is the created solids, the
4114                 remaining ones are created groups.
4115             """
4116             aList = self.PrimOp.MakePipeWithShellSections(theSeqBases, theSeqSubBases,
4117                                                           theLocations, thePath,
4118                                                           theWithContact, theWithCorrection,
4119                                                           IsGenerateGroups)
4120             RaiseIfFailed("MakePipeWithShellSections", self.PrimOp)
4121
4122             if IsGenerateGroups:
4123               self._autoPublish(aList, theName, "pipe")
4124               return aList
4125
4126             self._autoPublish(aList[0], theName, "pipe")
4127             return aList[0]
4128
4129         ## Create a shape by extrusion of the profile shape along
4130         #  the path shape. This function is used only for debug pipe
4131         #  functionality - it is a version of function MakePipeWithShellSections()
4132         #  which give a possibility to recieve information about
4133         #  creating pipe between each pair of sections step by step.
4134         @ManageTransactions("PrimOp")
4135         def MakePipeWithShellSectionsBySteps(self, theSeqBases, theSeqSubBases,
4136                                              theLocations, thePath,
4137                                              theWithContact, theWithCorrection,
4138                                              IsGenerateGroups=False, theName=None):
4139             """
4140             Create a shape by extrusion of the profile shape along
4141             the path shape. This function is used only for debug pipe
4142             functionality - it is a version of previous function
4143             geompy.MakePipeWithShellSections() which give a possibility to
4144             recieve information about creating pipe between each pair of
4145             sections step by step.
4146             """
4147             res = []
4148             nbsect = len(theSeqBases)
4149             nbsubsect = len(theSeqSubBases)
4150             #print "nbsect = ",nbsect
4151             for i in range(1,nbsect):
4152                 #print "  i = ",i
4153                 tmpSeqBases = [ theSeqBases[i-1], theSeqBases[i] ]
4154                 tmpLocations = [ theLocations[i-1], theLocations[i] ]
4155                 tmpSeqSubBases = []
4156                 if nbsubsect>0: tmpSeqSubBases = [ theSeqSubBases[i-1], theSeqSubBases[i] ]
4157                 aList = self.PrimOp.MakePipeWithShellSections(tmpSeqBases, tmpSeqSubBases,
4158                                                               tmpLocations, thePath,
4159                                                               theWithContact, theWithCorrection,
4160                                                               IsGenerateGroups)
4161                 if self.PrimOp.IsDone() == 0:
4162                     print "Problems with pipe creation between ",i," and ",i+1," sections"
4163                     RaiseIfFailed("MakePipeWithShellSections", self.PrimOp)
4164                     break
4165                 else:
4166                     print "Pipe between ",i," and ",i+1," sections is OK"
4167                     res.append(aList[0])
4168                     pass
4169                 pass
4170
4171             resc = self.MakeCompound(res)
4172             #resc = self.MakeSewing(res, 0.001)
4173             #print "resc: ",resc
4174             self._autoPublish(resc, theName, "pipe")
4175             return resc
4176
4177         ## Create solids between given sections.
4178         #  It is possible to generate groups along with the result by means of
4179         #  setting the flag \a IsGenerateGroups. For detailed information on
4180         #  groups that can be created please see the method MakePipe().
4181         #  @param theSeqBases - list of sections (shell or face).
4182         #  @param theLocations - list of corresponding vertexes
4183         #  @param IsGenerateGroups - flag that tells if it is necessary to
4184         #         create groups. It is equal to False by default.
4185         #  @param theName Object name; when specified, this parameter is used
4186         #         for result publication in the study. Otherwise, if automatic
4187         #         publication is switched on, default value is used for result name.
4188         #
4189         #  @return New GEOM.GEOM_Object, containing the created solids if 
4190         #          \a IsGenerateGroups is not set. Otherwise it returns new
4191         #          GEOM.ListOfGO. Its first element is the created solids, the
4192         #          remaining ones are created groups.
4193         #
4194         #  @ref tui_creation_pipe_without_path "Example"
4195         @ManageTransactions("PrimOp")
4196         def MakePipeShellsWithoutPath(self, theSeqBases, theLocations,
4197                                       IsGenerateGroups=False, theName=None):
4198             """
4199             Create solids between given sections.
4200             It is possible to generate groups along with the result by means of
4201             setting the flag IsGenerateGroups. For detailed information on
4202             groups that can be created please see the method geompy.MakePipe().
4203
4204             Parameters:
4205                 theSeqBases - list of sections (shell or face).
4206                 theLocations - list of corresponding vertexes
4207                 IsGenerateGroups - flag that tells if it is necessary to
4208                                  create groups. It is equal to False by default.
4209                 theName Object name; when specified, this parameter is used
4210                         for result publication in the study. Otherwise, if automatic
4211                         publication is switched on, default value is used for result name.
4212
4213             Returns:
4214                 New GEOM.GEOM_Object, containing the created solids if 
4215                 IsGenerateGroups is not set. Otherwise it returns new
4216                 GEOM.ListOfGO. Its first element is the created solids, the
4217                 remaining ones are created groups.
4218             """
4219             aList = self.PrimOp.MakePipeShellsWithoutPath(theSeqBases, theLocations,
4220                                                           IsGenerateGroups)
4221             RaiseIfFailed("MakePipeShellsWithoutPath", self.PrimOp)
4222
4223             if IsGenerateGroups:
4224               self._autoPublish(aList, theName, "pipe")
4225               return aList
4226
4227             self._autoPublish(aList[0], theName, "pipe")
4228             return aList[0]
4229
4230         ## Create a shape by extrusion of the base shape along
4231         #  the path shape with constant bi-normal direction along the given vector.
4232         #  The path shape can be a wire or an edge.
4233         #  It is possible to generate groups along with the result by means of
4234         #  setting the flag \a IsGenerateGroups. For detailed information on
4235         #  groups that can be created please see the method MakePipe().
4236         #  @param theBase Base shape to be extruded.
4237         #  @param thePath Path shape to extrude the base shape along it.
4238         #  @param theVec Vector defines a constant binormal direction to keep the
4239         #                same angle beetween the direction and the sections
4240         #                along the sweep surface.
4241         #  @param IsGenerateGroups flag that tells if it is necessary to
4242         #         create groups. It is equal to False by default.
4243         #  @param theName Object name; when specified, this parameter is used
4244         #         for result publication in the study. Otherwise, if automatic
4245         #         publication is switched on, default value is used for result name.
4246         #
4247         #  @return New GEOM.GEOM_Object, containing the created pipe if 
4248         #          \a IsGenerateGroups is not set. Otherwise it returns new
4249         #          GEOM.ListOfGO. Its first element is the created pipe, the
4250         #          remaining ones are created groups.
4251         #
4252         #  @ref tui_creation_pipe "Example"
4253         @ManageTransactions("PrimOp")
4254         def MakePipeBiNormalAlongVector(self, theBase, thePath, theVec,
4255                                         IsGenerateGroups=False, theName=None):
4256             """
4257             Create a shape by extrusion of the base shape along
4258             the path shape with constant bi-normal direction along the given vector.
4259             The path shape can be a wire or an edge.
4260             It is possible to generate groups along with the result by means of
4261             setting the flag IsGenerateGroups. For detailed information on
4262             groups that can be created please see the method geompy.MakePipe().
4263
4264             Parameters:
4265                 theBase Base shape to be extruded.
4266                 thePath Path shape to extrude the base shape along it.
4267                 theVec Vector defines a constant binormal direction to keep the
4268                        same angle beetween the direction and the sections
4269                        along the sweep surface.
4270                 IsGenerateGroups flag that tells if it is necessary to
4271                                  create groups. It is equal to False by default.
4272                 theName Object name; when specified, this parameter is used
4273                         for result publication in the study. Otherwise, if automatic
4274                         publication is switched on, default value is used for result name.
4275
4276             Returns:
4277                 New GEOM.GEOM_Object, containing the created pipe if 
4278                 IsGenerateGroups is not set. Otherwise it returns new
4279                 GEOM.ListOfGO. Its first element is the created pipe, the
4280                 remaining ones are created groups.
4281             """
4282             # Example: see GEOM_TestAll.py
4283             aList = self.PrimOp.MakePipeBiNormalAlongVector(theBase, thePath,
4284                           theVec, IsGenerateGroups)
4285             RaiseIfFailed("MakePipeBiNormalAlongVector", self.PrimOp)
4286
4287             if IsGenerateGroups:
4288               self._autoPublish(aList, theName, "pipe")
4289               return aList
4290
4291             self._autoPublish(aList[0], theName, "pipe")
4292             return aList[0]
4293
4294         ## Makes a thick solid from a shape. If the input is a surface shape
4295         #  (face or shell) the result is a thick solid. If an input shape is
4296         #  a solid the result is a hollowed solid with removed faces.
4297         #  @param theShape Face or Shell to get thick solid or solid to get
4298         #         hollowed solid.
4299         #  @param theThickness Thickness of the resulting solid
4300         #  @param theFacesIDs the list of face IDs to be removed from the
4301         #         result. It is ignored if \a theShape is a face or a shell.
4302         #         It is empty by default. 
4303         #  @param theInside If true the thickness is applied towards inside
4304         #  @param theName Object name; when specified, this parameter is used
4305         #         for result publication in the study. Otherwise, if automatic
4306         #         publication is switched on, default value is used for result name.
4307         #
4308         #  @return New GEOM.GEOM_Object, containing the created solid
4309         #
4310         #  @ref tui_creation_thickness "Example"
4311         @ManageTransactions("PrimOp")
4312         def MakeThickSolid(self, theShape, theThickness,
4313                            theFacesIDs=[], theInside=False, theName=None):
4314             """
4315             Make a thick solid from a shape. If the input is a surface shape
4316             (face or shell) the result is a thick solid. If an input shape is
4317             a solid the result is a hollowed solid with removed faces.
4318
4319             Parameters:
4320                  theShape Face or Shell to get thick solid or solid to get
4321                           hollowed solid.
4322                  theThickness Thickness of the resulting solid
4323                  theFacesIDs the list of face IDs to be removed from the
4324                           result. It is ignored if theShape is a face or a
4325                           shell. It is empty by default. 
4326                  theInside If true the thickness is applied towards inside
4327                  theName Object name; when specified, this parameter is used
4328                          for result publication in the study. Otherwise, if automatic
4329                          publication is switched on, default value is used for result name.
4330
4331             Returns:
4332                 New GEOM.GEOM_Object, containing the created solid
4333             """
4334             # Example: see GEOM_TestAll.py
4335             theThickness,Parameters = ParseParameters(theThickness)
4336             anObj = self.PrimOp.MakeThickening(theShape, theFacesIDs,
4337                                                theThickness, True, theInside)
4338             RaiseIfFailed("MakeThickSolid", self.PrimOp)
4339             anObj.SetParameters(Parameters)
4340             self._autoPublish(anObj, theName, "thickSolid")
4341             return anObj
4342
4343
4344         ## Modifies a shape to make it a thick solid. If the input is a surface
4345         #  shape (face or shell) the result is a thick solid. If an input shape
4346         #  is a solid the result is a hollowed solid with removed faces.
4347         #  @param theShape Face or Shell to get thick solid or solid to get
4348         #         hollowed solid.
4349         #  @param theThickness Thickness of the resulting solid
4350         #  @param theFacesIDs the list of face IDs to be removed from the
4351         #         result. It is ignored if \a theShape is a face or a shell.
4352         #         It is empty by default. 
4353         #  @param theInside If true the thickness is applied towards inside
4354         #
4355         #  @return The modified shape
4356         #
4357         #  @ref tui_creation_thickness "Example"
4358         @ManageTransactions("PrimOp")
4359         def Thicken(self, theShape, theThickness, theFacesIDs=[], theInside=False):
4360             """
4361             Modifies a shape to make it a thick solid. If the input is a
4362             surface shape (face or shell) the result is a thick solid. If
4363             an input shape is a solid the result is a hollowed solid with
4364             removed faces.
4365
4366             Parameters:
4367                 theShape Face or Shell to get thick solid or solid to get
4368                          hollowed solid.
4369                 theThickness Thickness of the resulting solid
4370                 theFacesIDs the list of face IDs to be removed from the
4371                          result. It is ignored if \a theShape is a face or
4372                          a shell. It is empty by default. 
4373                 theInside If true the thickness is applied towards inside
4374
4375             Returns:
4376                 The modified shape
4377             """
4378             # Example: see GEOM_TestAll.py
4379             theThickness,Parameters = ParseParameters(theThickness)
4380             anObj = self.PrimOp.MakeThickening(theShape, theFacesIDs,
4381                                                theThickness, False, theInside)
4382             RaiseIfFailed("Thicken", self.PrimOp)
4383             anObj.SetParameters(Parameters)
4384             return anObj
4385
4386         ## Build a middle path of a pipe-like shape.
4387         #  The path shape can be a wire or an edge.
4388         #  @param theShape It can be closed or unclosed pipe-like shell
4389         #                  or a pipe-like solid.
4390         #  @param theBase1, theBase2 Two bases of the supposed pipe. This
4391         #                            should be wires or faces of theShape.
4392         #  @param theName Object name; when specified, this parameter is used
4393         #         for result publication in the study. Otherwise, if automatic
4394         #         publication is switched on, default value is used for result name.
4395         #
4396         #  @note It is not assumed that exact or approximate copy of theShape
4397         #        can be obtained by applying existing Pipe operation on the
4398         #        resulting "Path" wire taking theBase1 as the base - it is not
4399         #        always possible; though in some particular cases it might work
4400         #        it is not guaranteed. Thus, RestorePath function should not be
4401         #        considered as an exact reverse operation of the Pipe.
4402         #
4403         #  @return New GEOM.GEOM_Object, containing an edge or wire that represent
4404         #                                source pipe's "path".
4405         #
4406         #  @ref tui_creation_pipe_path "Example"
4407         @ManageTransactions("PrimOp")
4408         def RestorePath (self, theShape, theBase1, theBase2, theName=None):
4409             """
4410             Build a middle path of a pipe-like shape.
4411             The path shape can be a wire or an edge.
4412
4413             Parameters:
4414                 theShape It can be closed or unclosed pipe-like shell
4415                          or a pipe-like solid.
4416                 theBase1, theBase2 Two bases of the supposed pipe. This
4417                                    should be wires or faces of theShape.
4418                 theName Object name; when specified, this parameter is used
4419                         for result publication in the study. Otherwise, if automatic
4420                         publication is switched on, default value is used for result name.
4421
4422             Returns:
4423                 New GEOM_Object, containing an edge or wire that represent
4424                                  source pipe's path.
4425             """
4426             anObj = self.PrimOp.RestorePath(theShape, theBase1, theBase2)
4427             RaiseIfFailed("RestorePath", self.PrimOp)
4428             self._autoPublish(anObj, theName, "path")
4429             return anObj
4430
4431         ## Build a middle path of a pipe-like shape.
4432         #  The path shape can be a wire or an edge.
4433         #  @param theShape It can be closed or unclosed pipe-like shell
4434         #                  or a pipe-like solid.
4435         #  @param listEdges1, listEdges2 Two bases of the supposed pipe. This
4436         #                                should be lists of edges of theShape.
4437         #  @param theName Object name; when specified, this parameter is used
4438         #         for result publication in the study. Otherwise, if automatic
4439         #         publication is switched on, default value is used for result name.
4440         #
4441         #  @note It is not assumed that exact or approximate copy of theShape
4442         #        can be obtained by applying existing Pipe operation on the
4443         #        resulting "Path" wire taking theBase1 as the base - it is not
4444         #        always possible; though in some particular cases it might work
4445         #        it is not guaranteed. Thus, RestorePath function should not be
4446         #        considered as an exact reverse operation of the Pipe.
4447         #
4448         #  @return New GEOM.GEOM_Object, containing an edge or wire that represent
4449         #                                source pipe's "path".
4450         #
4451         #  @ref tui_creation_pipe_path "Example"
4452         @ManageTransactions("PrimOp")
4453         def RestorePathEdges (self, theShape, listEdges1, listEdges2, theName=None):
4454             """
4455             Build a middle path of a pipe-like shape.
4456             The path shape can be a wire or an edge.
4457
4458             Parameters:
4459                 theShape It can be closed or unclosed pipe-like shell
4460                          or a pipe-like solid.
4461                 listEdges1, listEdges2 Two bases of the supposed pipe. This
4462                                        should be lists of edges of theShape.
4463                 theName Object name; when specified, this parameter is used
4464                         for result publication in the study. Otherwise, if automatic
4465                         publication is switched on, default value is used for result name.
4466
4467             Returns:
4468                 New GEOM_Object, containing an edge or wire that represent
4469                                  source pipe's path.
4470             """
4471             anObj = self.PrimOp.RestorePathEdges(theShape, listEdges1, listEdges2)
4472             RaiseIfFailed("RestorePath", self.PrimOp)
4473             self._autoPublish(anObj, theName, "path")
4474             return anObj
4475
4476         # end of l3_complex
4477         ## @}
4478
4479         ## @addtogroup l3_basic_go
4480         ## @{
4481
4482         ## Create a linear edge with specified ends.
4483         #  @param thePnt1 Point for the first end of edge.
4484         #  @param thePnt2 Point for the second end of edge.
4485         #  @param theName Object name; when specified, this parameter is used
4486         #         for result publication in the study. Otherwise, if automatic
4487         #         publication is switched on, default value is used for result name.
4488         #
4489         #  @return New GEOM.GEOM_Object, containing the created edge.
4490         #
4491         #  @ref tui_creation_edge "Example"
4492         @ManageTransactions("ShapesOp")
4493         def MakeEdge(self, thePnt1, thePnt2, theName=None):
4494             """
4495             Create a linear edge with specified ends.
4496
4497             Parameters:
4498                 thePnt1 Point for the first end of edge.
4499                 thePnt2 Point for the second end of edge.
4500                 theName Object name; when specified, this parameter is used
4501                         for result publication in the study. Otherwise, if automatic
4502                         publication is switched on, default value is used for result name.
4503
4504             Returns:
4505                 New GEOM.GEOM_Object, containing the created edge.
4506             """
4507             # Example: see GEOM_TestAll.py
4508             anObj = self.ShapesOp.MakeEdge(thePnt1, thePnt2)
4509             RaiseIfFailed("MakeEdge", self.ShapesOp)
4510             self._autoPublish(anObj, theName, "edge")
4511             return anObj
4512
4513         ## Create a new edge, corresponding to the given length on the given curve.
4514         #  @param theRefCurve The referenced curve (edge).
4515         #  @param theLength Length on the referenced curve. It can be negative.
4516         #  @param theStartPoint Any point can be selected for it, the new edge will begin
4517         #                       at the end of \a theRefCurve, close to the selected point.
4518         #                       If None, start from the first point of \a theRefCurve.
4519         #  @param theName Object name; when specified, this parameter is used
4520         #         for result publication in the study. Otherwise, if automatic
4521         #         publication is switched on, default value is used for result name.
4522         #
4523         #  @return New GEOM.GEOM_Object, containing the created edge.
4524         #
4525         #  @ref tui_creation_edge "Example"
4526         @ManageTransactions("ShapesOp")
4527         def MakeEdgeOnCurveByLength(self, theRefCurve, theLength, theStartPoint = None, theName=None):
4528             """
4529             Create a new edge, corresponding to the given length on the given curve.
4530
4531             Parameters:
4532                 theRefCurve The referenced curve (edge).
4533                 theLength Length on the referenced curve. It can be negative.
4534                 theStartPoint Any point can be selected for it, the new edge will begin
4535                               at the end of theRefCurve, close to the selected point.
4536                               If None, start from the first point of theRefCurve.
4537                 theName Object name; when specified, this parameter is used
4538                         for result publication in the study. Otherwise, if automatic
4539                         publication is switched on, default value is used for result name.
4540
4541             Returns:
4542                 New GEOM.GEOM_Object, containing the created edge.
4543             """
4544             # Example: see GEOM_TestAll.py
4545             theLength, Parameters = ParseParameters(theLength)
4546             anObj = self.ShapesOp.MakeEdgeOnCurveByLength(theRefCurve, theLength, theStartPoint)
4547             RaiseIfFailed("MakeEdgeOnCurveByLength", self.ShapesOp)
4548             anObj.SetParameters(Parameters)
4549             self._autoPublish(anObj, theName, "edge")
4550             return anObj
4551
4552         ## Create an edge from specified wire.
4553         #  @param theWire source Wire
4554         #  @param theLinearTolerance linear tolerance value (default = 1e-07)
4555         #  @param theAngularTolerance angular tolerance value (default = 1e-12)
4556         #  @param theName Object name; when specified, this parameter is used
4557         #         for result publication in the study. Otherwise, if automatic
4558         #         publication is switched on, default value is used for result name.
4559         #
4560         #  @return New GEOM.GEOM_Object, containing the created edge.
4561         #
4562         #  @ref tui_creation_edge "Example"
4563         @ManageTransactions("ShapesOp")
4564         def MakeEdgeWire(self, theWire, theLinearTolerance = 1e-07, theAngularTolerance = 1e-12, theName=None):
4565             """
4566             Create an edge from specified wire.
4567
4568             Parameters:
4569                 theWire source Wire
4570                 theLinearTolerance linear tolerance value (default = 1e-07)
4571                 theAngularTolerance angular tolerance value (default = 1e-12)
4572                 theName Object name; when specified, this parameter is used
4573                         for result publication in the study. Otherwise, if automatic
4574                         publication is switched on, default value is used for result name.
4575
4576             Returns:
4577                 New GEOM.GEOM_Object, containing the created edge.
4578             """
4579             # Example: see GEOM_TestAll.py
4580             anObj = self.ShapesOp.MakeEdgeWire(theWire, theLinearTolerance, theAngularTolerance)
4581             RaiseIfFailed("MakeEdgeWire", self.ShapesOp)
4582             self._autoPublish(anObj, theName, "edge")
4583             return anObj
4584
4585         ## Create a wire from the set of edges and wires.
4586         #  @param theEdgesAndWires List of edges and/or wires.
4587         #  @param theTolerance Maximum distance between vertices, that will be merged.
4588         #                      Values less than 1e-07 are equivalent to 1e-07 (Precision::Confusion())
4589         #  @param theName Object name; when specified, this parameter is used
4590         #         for result publication in the study. Otherwise, if automatic
4591         #         publication is switched on, default value is used for result name.
4592         #
4593         #  @return New GEOM.GEOM_Object, containing the created wire.
4594         #
4595         #  @ref tui_creation_wire "Example"
4596         @ManageTransactions("ShapesOp")
4597         def MakeWire(self, theEdgesAndWires, theTolerance = 1e-07, theName=None):
4598             """
4599             Create a wire from the set of edges and wires.
4600
4601             Parameters:
4602                 theEdgesAndWires List of edges and/or wires.
4603                 theTolerance Maximum distance between vertices, that will be merged.
4604                              Values less than 1e-07 are equivalent to 1e-07 (Precision::Confusion()).
4605                 theName Object name; when specified, this parameter is used
4606                         for result publication in the study. Otherwise, if automatic
4607                         publication is switched on, default value is used for result name.
4608
4609             Returns:
4610                 New GEOM.GEOM_Object, containing the created wire.
4611             """
4612             # Example: see GEOM_TestAll.py
4613             anObj = self.ShapesOp.MakeWire(theEdgesAndWires, theTolerance)
4614             RaiseIfFailed("MakeWire", self.ShapesOp)
4615             self._autoPublish(anObj, theName, "wire")
4616             return anObj
4617
4618         ## Create a face on the given wire.
4619         #  @param theWire closed Wire or Edge to build the face on.
4620         #  @param isPlanarWanted If TRUE, the algorithm tries to build a planar face.
4621         #                        If the tolerance of the obtained planar face is less
4622         #                        than 1e-06, this face will be returned, otherwise the
4623         #                        algorithm tries to build any suitable face on the given
4624         #                        wire and prints a warning message.
4625         #  @param theName Object name; when specified, this parameter is used
4626         #         for result publication in the study. Otherwise, if automatic
4627         #         publication is switched on, default value is used for result name.
4628         #
4629         #  @return New GEOM.GEOM_Object, containing the created face.
4630         #
4631         #  @ref tui_creation_face "Example"
4632         @ManageTransactions("ShapesOp")
4633         def MakeFace(self, theWire, isPlanarWanted, theName=None):
4634             """
4635             Create a face on the given wire.
4636
4637             Parameters:
4638                 theWire closed Wire or Edge to build the face on.
4639                 isPlanarWanted If TRUE, the algorithm tries to build a planar face.
4640                                If the tolerance of the obtained planar face is less
4641                                than 1e-06, this face will be returned, otherwise the
4642                                algorithm tries to build any suitable face on the given
4643                                wire and prints a warning message.
4644                 theName Object name; when specified, this parameter is used
4645                         for result publication in the study. Otherwise, if automatic
4646                         publication is switched on, default value is used for result name.
4647
4648             Returns:
4649                 New GEOM.GEOM_Object, containing the created face.
4650             """
4651             # Example: see GEOM_TestAll.py
4652             anObj = self.ShapesOp.MakeFace(theWire, isPlanarWanted)
4653             if isPlanarWanted and anObj is not None and self.ShapesOp.GetErrorCode() == "MAKE_FACE_TOLERANCE_TOO_BIG":
4654                 print "WARNING: Cannot build a planar face: required tolerance is too big. Non-planar face is built."
4655             else:
4656                 RaiseIfFailed("MakeFace", self.ShapesOp)
4657             self._autoPublish(anObj, theName, "face")
4658             return anObj
4659
4660         ## Create a face on the given wires set.
4661         #  @param theWires List of closed wires or edges to build the face on.
4662         #  @param isPlanarWanted If TRUE, the algorithm tries to build a planar face.
4663         #                        If the tolerance of the obtained planar face is less
4664         #                        than 1e-06, this face will be returned, otherwise the
4665         #                        algorithm tries to build any suitable face on the given
4666         #                        wire and prints a warning message.
4667         #  @param theName Object name; when specified, this parameter is used
4668         #         for result publication in the study. Otherwise, if automatic
4669         #         publication is switched on, default value is used for result name.
4670         #
4671         #  @return New GEOM.GEOM_Object, containing the created face.
4672         #
4673         #  @ref tui_creation_face "Example"
4674         @ManageTransactions("ShapesOp")
4675         def MakeFaceWires(self, theWires, isPlanarWanted, theName=None):
4676             """
4677             Create a face on the given wires set.
4678
4679             Parameters:
4680                 theWires List of closed wires or edges to build the face on.
4681                 isPlanarWanted If TRUE, the algorithm tries to build a planar face.
4682                                If the tolerance of the obtained planar face is less
4683                                than 1e-06, this face will be returned, otherwise the
4684                                algorithm tries to build any suitable face on the given
4685                                wire and prints a warning message.
4686                 theName Object name; when specified, this parameter is used
4687                         for result publication in the study. Otherwise, if automatic
4688                         publication is switched on, default value is used for result name.
4689
4690             Returns:
4691                 New GEOM.GEOM_Object, containing the created face.
4692             """
4693             # Example: see GEOM_TestAll.py
4694             anObj = self.ShapesOp.MakeFaceWires(ToList(theWires), isPlanarWanted)
4695             if isPlanarWanted and anObj is not None and self.ShapesOp.GetErrorCode() == "MAKE_FACE_TOLERANCE_TOO_BIG":
4696                 print "WARNING: Cannot build a planar face: required tolerance is too big. Non-planar face is built."
4697             else:
4698                 RaiseIfFailed("MakeFaceWires", self.ShapesOp)
4699             self._autoPublish(anObj, theName, "face")
4700             return anObj
4701
4702         ## See MakeFaceWires() method for details.
4703         #
4704         #  @ref tui_creation_face "Example 1"
4705         #  \n @ref swig_MakeFaces  "Example 2"
4706         def MakeFaces(self, theWires, isPlanarWanted, theName=None):
4707             """
4708             See geompy.MakeFaceWires() method for details.
4709             """
4710             # Example: see GEOM_TestOthers.py
4711             # note: auto-publishing is done in self.MakeFaceWires()
4712             anObj = self.MakeFaceWires(theWires, isPlanarWanted, theName)
4713             return anObj
4714
4715         ## Create a face based on a surface from given face bounded
4716         #  by given wire.
4717         #  @param theFace the face whose surface is used to create a new face.
4718         #  @param theWire the wire that will bound a new face.
4719         #  @param theName Object name; when specified, this parameter is used
4720         #         for result publication in the study. Otherwise, if automatic
4721         #         publication is switched on, default value is used for result name.
4722         #
4723         #  @return New GEOM.GEOM_Object, containing the created face.
4724         #
4725         #  @ref tui_creation_face "Example"
4726         @ManageTransactions("ShapesOp")
4727         def MakeFaceFromSurface(self, theFace, theWire, theName=None):
4728             """
4729             Create a face based on a surface from given face bounded
4730             by given wire.
4731
4732             Parameters:
4733                 theFace the face whose surface is used to create a new face.
4734                 theWire the wire that will bound a new face.
4735                 theName Object name; when specified, this parameter is used
4736                         for result publication in the study. Otherwise, if automatic
4737                         publication is switched on, default value is used for result name.
4738
4739             Returns:
4740                 New GEOM.GEOM_Object, containing the created face.
4741             """
4742             # Example: see GEOM_TestAll.py
4743             anObj = self.ShapesOp.MakeFaceFromSurface(theFace, theWire)
4744             RaiseIfFailed("MakeFaceFromSurface", self.ShapesOp)
4745             self._autoPublish(anObj, theName, "face")
4746             return anObj
4747           
4748         ## Create a face from a set of edges with the given constraints.
4749         #  @param theConstraints List of edges and constraint faces (as a sequence of a Edge + Face couples):
4750         #         - edges should form a closed wire;
4751         #         - for each edge, constraint face is optional: if a constraint face is missing
4752         #           for some edge, this means that there no constraint associated with this edge.
4753         #  @param theName Object name; when specified, this parameter is used
4754         #         for result publication in the study. Otherwise, if automatic
4755         #         publication is switched on, default value is used for result name.
4756         # 
4757         # @return New GEOM.GEOM_Object, containing the created face.
4758         # 
4759         # @ref tui_creation_face "Example"
4760         @ManageTransactions("ShapesOp")
4761         def MakeFaceWithConstraints(self, theConstraints, theName=None):
4762             """
4763             Create a face from a set of edges with the given constraints.
4764
4765             Parameters:
4766                 theConstraints List of edges and constraint faces (as a sequence of a Edge + Face couples):
4767                         - edges should form a closed wire;
4768                         - for each edge, constraint face is optional: if a constraint face is missing
4769                           for some edge, this means that there no constraint associated with this edge.
4770                 theName Object name; when specified, this parameter is used
4771                         for result publication in the study. Otherwise, if automatic
4772                         publication is switched on, default value is used for result name.
4773
4774             Returns:
4775                 New GEOM.GEOM_Object, containing the created face.
4776             """
4777             # Example: see GEOM_TestAll.py
4778             anObj = self.ShapesOp.MakeFaceWithConstraints(theConstraints)
4779             if anObj is None:
4780                 RaiseIfFailed("MakeFaceWithConstraints", self.ShapesOp)
4781             self._autoPublish(anObj, theName, "face")
4782             return anObj
4783
4784         ## Create a shell from the set of faces and shells.
4785         #  @param theFacesAndShells List of faces and/or shells.
4786         #  @param theName Object name; when specified, this parameter is used
4787         #         for result publication in the study. Otherwise, if automatic
4788         #         publication is switched on, default value is used for result name.
4789         #
4790         #  @return New GEOM.GEOM_Object, containing the created shell.
4791         #
4792         #  @ref tui_creation_shell "Example"
4793         @ManageTransactions("ShapesOp")
4794         def MakeShell(self, theFacesAndShells, theName=None):
4795             """
4796             Create a shell from the set of faces and shells.
4797
4798             Parameters:
4799                 theFacesAndShells List of faces and/or shells.
4800                 theName Object name; when specified, this parameter is used
4801                         for result publication in the study. Otherwise, if automatic
4802                         publication is switched on, default value is used for result name.
4803
4804             Returns:
4805                 New GEOM.GEOM_Object, containing the created shell.
4806             """
4807             # Example: see GEOM_TestAll.py
4808             anObj = self.ShapesOp.MakeShell( ToList( theFacesAndShells ))
4809             RaiseIfFailed("MakeShell", self.ShapesOp)
4810             self._autoPublish(anObj, theName, "shell")
4811             return anObj
4812
4813         ## Create a solid, bounded by the given shells.
4814         #  @param theShells Sequence of bounding shells.
4815         #  @param theName Object name; when specified, this parameter is used
4816         #         for result publication in the study. Otherwise, if automatic
4817         #         publication is switched on, default value is used for result name.
4818         #
4819         #  @return New GEOM.GEOM_Object, containing the created solid.
4820         #
4821         #  @ref tui_creation_solid "Example"
4822         @ManageTransactions("ShapesOp")
4823         def MakeSolid(self, theShells, theName=None):
4824             """
4825             Create a solid, bounded by the given shells.
4826
4827             Parameters:
4828                 theShells Sequence of bounding shells.
4829                 theName Object name; when specified, this parameter is used
4830                         for result publication in the study. Otherwise, if automatic
4831                         publication is switched on, default value is used for result name.
4832
4833             Returns:
4834                 New GEOM.GEOM_Object, containing the created solid.
4835             """
4836             # Example: see GEOM_TestAll.py
4837             theShells = ToList(theShells)
4838             if len(theShells) == 1:
4839                 descr = self._IsGoodForSolid(theShells[0])
4840                 #if len(descr) > 0:
4841                 #    raise RuntimeError, "MakeSolidShells : " + descr
4842                 if descr == "WRN_SHAPE_UNCLOSED":
4843                     raise RuntimeError, "MakeSolidShells : Unable to create solid from unclosed shape"
4844             anObj = self.ShapesOp.MakeSolidShells(theShells)
4845             RaiseIfFailed("MakeSolidShells", self.ShapesOp)
4846             self._autoPublish(anObj, theName, "solid")
4847             return anObj
4848
4849         ## Create a compound of the given shapes.
4850         #  @param theShapes List of shapes to put in compound.
4851         #  @param theName Object name; when specified, this parameter is used
4852         #         for result publication in the study. Otherwise, if automatic
4853         #         publication is switched on, default value is used for result name.
4854         #
4855         #  @return New GEOM.GEOM_Object, containing the created compound.
4856         #
4857         #  @ref tui_creation_compound "Example"
4858         @ManageTransactions("ShapesOp")
4859         def MakeCompound(self, theShapes, theName=None):
4860             """
4861             Create a compound of the given shapes.
4862
4863             Parameters:
4864                 theShapes List of shapes to put in compound.
4865                 theName Object name; when specified, this parameter is used
4866                         for result publication in the study. Otherwise, if automatic
4867                         publication is switched on, default value is used for result name.
4868
4869             Returns:
4870                 New GEOM.GEOM_Object, containing the created compound.
4871             """
4872             # Example: see GEOM_TestAll.py
4873             anObj = self.ShapesOp.MakeCompound(ToList(theShapes))
4874             RaiseIfFailed("MakeCompound", self.ShapesOp)
4875             self._autoPublish(anObj, theName, "compound")
4876             return anObj
4877         
4878         ## Create a solid (or solids) from the set of faces and/or shells.
4879         #  @param theFacesOrShells List of faces and/or shells.
4880         #  @param isIntersect If TRUE, forces performing intersections
4881         #         between arguments; otherwise (default) intersection is not performed.
4882         #  @param theName Object name; when specified, this parameter is used
4883         #         for result publication in the study. Otherwise, if automatic
4884         #         publication is switched on, default value is used for result name.
4885         #
4886         #  @return New GEOM.GEOM_Object, containing the created solid (or compound of solids).
4887         #
4888         #  @ref tui_creation_solid_from_faces "Example"
4889         @ManageTransactions("ShapesOp")
4890         def MakeSolidFromConnectedFaces(self, theFacesOrShells, isIntersect = False, theName=None):
4891             """
4892             Create a solid (or solids) from the set of connected faces and/or shells.
4893
4894             Parameters:
4895                 theFacesOrShells List of faces and/or shells.
4896                 isIntersect If TRUE, forces performing intersections
4897                         between arguments; otherwise (default) intersection is not performed
4898                 theName Object name; when specified, this parameter is used.
4899                         for result publication in the study. Otherwise, if automatic
4900                         publication is switched on, default value is used for result name.
4901
4902             Returns:
4903                 New GEOM.GEOM_Object, containing the created solid (or compound of solids).
4904             """
4905             # Example: see GEOM_TestAll.py
4906             anObj = self.ShapesOp.MakeSolidFromConnectedFaces(theFacesOrShells, isIntersect)
4907             RaiseIfFailed("MakeSolidFromConnectedFaces", self.ShapesOp)
4908             self._autoPublish(anObj, theName, "solid")
4909             return anObj
4910
4911         # end of l3_basic_go
4912         ## @}
4913
4914         ## @addtogroup l2_measure
4915         ## @{
4916
4917         ## Gives quantity of faces in the given shape.
4918         #  @param theShape Shape to count faces of.
4919         #  @return Quantity of faces.
4920         #
4921         #  @ref swig_NumberOf "Example"
4922         @ManageTransactions("ShapesOp")
4923         def NumberOfFaces(self, theShape):
4924             """
4925             Gives quantity of faces in the given shape.
4926
4927             Parameters:
4928                 theShape Shape to count faces of.
4929
4930             Returns:
4931                 Quantity of faces.
4932             """
4933             # Example: see GEOM_TestOthers.py
4934             nb_faces = self.ShapesOp.NumberOfFaces(theShape)
4935             RaiseIfFailed("NumberOfFaces", self.ShapesOp)
4936             return nb_faces
4937
4938         ## Gives quantity of edges in the given shape.
4939         #  @param theShape Shape to count edges of.
4940         #  @return Quantity of edges.
4941         #
4942         #  @ref swig_NumberOf "Example"
4943         @ManageTransactions("ShapesOp")
4944         def NumberOfEdges(self, theShape):
4945             """
4946             Gives quantity of edges in the given shape.
4947
4948             Parameters:
4949                 theShape Shape to count edges of.
4950
4951             Returns:
4952                 Quantity of edges.
4953             """
4954             # Example: see GEOM_TestOthers.py
4955             nb_edges = self.ShapesOp.NumberOfEdges(theShape)
4956             RaiseIfFailed("NumberOfEdges", self.ShapesOp)
4957             return nb_edges
4958
4959         ## Gives quantity of sub-shapes of type theShapeType in the given shape.
4960         #  @param theShape Shape to count sub-shapes of.
4961         #  @param theShapeType Type of sub-shapes to count (see ShapeType())
4962         #  @return Quantity of sub-shapes of given type.
4963         #
4964         #  @ref swig_NumberOf "Example"
4965         @ManageTransactions("ShapesOp")
4966         def NumberOfSubShapes(self, theShape, theShapeType):
4967             """
4968             Gives quantity of sub-shapes of type theShapeType in the given shape.
4969
4970             Parameters:
4971                 theShape Shape to count sub-shapes of.
4972                 theShapeType Type of sub-shapes to count (see geompy.ShapeType)
4973
4974             Returns:
4975                 Quantity of sub-shapes of given type.
4976             """
4977             # Example: see GEOM_TestOthers.py
4978             nb_ss = self.ShapesOp.NumberOfSubShapes(theShape, theShapeType)
4979             RaiseIfFailed("NumberOfSubShapes", self.ShapesOp)
4980             return nb_ss
4981
4982         ## Gives quantity of solids in the given shape.
4983         #  @param theShape Shape to count solids in.
4984         #  @return Quantity of solids.
4985         #
4986         #  @ref swig_NumberOf "Example"
4987         @ManageTransactions("ShapesOp")
4988         def NumberOfSolids(self, theShape):
4989             """
4990             Gives quantity of solids in the given shape.
4991
4992             Parameters:
4993                 theShape Shape to count solids in.
4994
4995             Returns:
4996                 Quantity of solids.
4997             """
4998             # Example: see GEOM_TestOthers.py
4999             nb_solids = self.ShapesOp.NumberOfSubShapes(theShape, self.ShapeType["SOLID"])
5000             RaiseIfFailed("NumberOfSolids", self.ShapesOp)
5001             return nb_solids
5002
5003         # end of l2_measure
5004         ## @}
5005
5006         ## @addtogroup l3_healing
5007         ## @{
5008
5009         ## Reverses an orientation the given shape.
5010         #  @param theShape Shape to be reversed.
5011         #  @param theName Object name; when specified, this parameter is used
5012         #         for result publication in the study. Otherwise, if automatic
5013         #         publication is switched on, default value is used for result name.
5014         #
5015         #  @return The reversed copy of theShape.
5016         #
5017         #  @ref swig_ChangeOrientation "Example"
5018         @ManageTransactions("ShapesOp")
5019         def ChangeOrientation(self, theShape, theName=None):
5020             """
5021             Reverses an orientation the given shape.
5022
5023             Parameters:
5024                 theShape Shape to be reversed.
5025                 theName Object name; when specified, this parameter is used
5026                         for result publication in the study. Otherwise, if automatic
5027                         publication is switched on, default value is used for result name.
5028
5029             Returns:
5030                 The reversed copy of theShape.
5031             """
5032             # Example: see GEOM_TestAll.py
5033             anObj = self.ShapesOp.ChangeOrientation(theShape)
5034             RaiseIfFailed("ChangeOrientation", self.ShapesOp)
5035             self._autoPublish(anObj, theName, "reversed")
5036             return anObj
5037
5038         ## See ChangeOrientation() method for details.
5039         #
5040         #  @ref swig_OrientationChange "Example"
5041         def OrientationChange(self, theShape, theName=None):
5042             """
5043             See geompy.ChangeOrientation method for details.
5044             """
5045             # Example: see GEOM_TestOthers.py
5046             # note: auto-publishing is done in self.ChangeOrientation()
5047             anObj = self.ChangeOrientation(theShape, theName)
5048             return anObj
5049
5050         # end of l3_healing
5051         ## @}
5052
5053         ## @addtogroup l4_obtain
5054         ## @{
5055
5056         ## Retrieve all free faces from the given shape.
5057         #  Free face is a face, which is not shared between two shells of the shape.
5058         #  @param theShape Shape to find free faces in.
5059         #  @return List of IDs of all free faces, contained in theShape.
5060         #
5061         #  @ref tui_free_faces_page "Example"
5062         @ManageTransactions("ShapesOp")
5063         def GetFreeFacesIDs(self,theShape):
5064             """
5065             Retrieve all free faces from the given shape.
5066             Free face is a face, which is not shared between two shells of the shape.
5067
5068             Parameters:
5069                 theShape Shape to find free faces in.
5070
5071             Returns:
5072                 List of IDs of all free faces, contained in theShape.
5073             """
5074             # Example: see GEOM_TestOthers.py
5075             anIDs = self.ShapesOp.GetFreeFacesIDs(theShape)
5076             RaiseIfFailed("GetFreeFacesIDs", self.ShapesOp)
5077             return anIDs
5078
5079         ## Get all sub-shapes of theShape1 of the given type, shared with theShape2.
5080         #  @param theShape1 Shape to find sub-shapes in.
5081         #  @param theShape2 Shape to find shared sub-shapes with.
5082         #  @param theShapeType Type of sub-shapes to be retrieved.
5083         #  @param theName Object name; when specified, this parameter is used
5084         #         for result publication in the study. Otherwise, if automatic
5085         #         publication is switched on, default value is used for result name.
5086         #
5087         #  @return List of sub-shapes of theShape1, shared with theShape2.
5088         #
5089         #  @ref swig_GetSharedShapes "Example"
5090         @ManageTransactions("ShapesOp")
5091         def GetSharedShapes(self, theShape1, theShape2, theShapeType, theName=None):
5092             """
5093             Get all sub-shapes of theShape1 of the given type, shared with theShape2.
5094
5095             Parameters:
5096                 theShape1 Shape to find sub-shapes in.
5097                 theShape2 Shape to find shared sub-shapes with.
5098                 theShapeType Type of sub-shapes to be retrieved.
5099                 theName Object name; when specified, this parameter is used
5100                         for result publication in the study. Otherwise, if automatic
5101                         publication is switched on, default value is used for result name.
5102
5103             Returns:
5104                 List of sub-shapes of theShape1, shared with theShape2.
5105             """
5106             # Example: see GEOM_TestOthers.py
5107             aList = self.ShapesOp.GetSharedShapes(theShape1, theShape2, theShapeType)
5108             RaiseIfFailed("GetSharedShapes", self.ShapesOp)
5109             self._autoPublish(aList, theName, "shared")
5110             return aList
5111
5112         ## Get sub-shapes, shared by input shapes.
5113         #  @param theShapes Either a list or compound of shapes to find common sub-shapes of.
5114         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType()).
5115         #  @param theMultiShare Specifies what type of shares should be checked:
5116         #         - @c True (default): search sub-shapes from 1st input shape shared with all other input shapes;
5117         #         - @c False: causes to search sub-shapes shared between couples of input shapes.
5118         #  @param theName Object name; when specified, this parameter is used
5119         #         for result publication in the study. Otherwise, if automatic
5120         #         publication is switched on, default value is used for result name.
5121         #
5122         #  @note If @a theShapes contains single compound, the shares between all possible couples of 
5123         #        its top-level shapes are returned; otherwise, only shares between 1st input shape
5124         #        and all rest input shapes are returned.
5125         #
5126         #  @return List of all found sub-shapes.
5127         #
5128         #  Examples:
5129         #  - @ref tui_shared_shapes "Example 1"
5130         #  - @ref swig_GetSharedShapes "Example 2"
5131         @ManageTransactions("ShapesOp")
5132         def GetSharedShapesMulti(self, theShapes, theShapeType, theMultiShare=True, theName=None):
5133             """
5134             Get sub-shapes, shared by input shapes.
5135
5136             Parameters:
5137                 theShapes Either a list or compound of shapes to find common sub-shapes of.
5138                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType).
5139                 theMultiShare Specifies what type of shares should be checked:
5140                   - True (default): search sub-shapes from 1st input shape shared with all other input shapes;
5141                   - False: causes to search sub-shapes shared between couples of input shapes.
5142                 theName Object name; when specified, this parameter is used
5143                         for result publication in the study. Otherwise, if automatic
5144                         publication is switched on, default value is used for result name.
5145
5146             Note: if theShapes contains single compound, the shares between all possible couples of 
5147                   its top-level shapes are returned; otherwise, only shares between 1st input shape
5148                   and all rest input shapes are returned.
5149
5150             Returns:
5151                 List of all found sub-shapes.
5152             """
5153             # Example: see GEOM_TestOthers.py
5154             aList = self.ShapesOp.GetSharedShapesMulti(ToList(theShapes), theShapeType, theMultiShare)
5155             RaiseIfFailed("GetSharedShapesMulti", self.ShapesOp)
5156             self._autoPublish(aList, theName, "shared")
5157             return aList
5158
5159         ## Find in <VAR>theShape</VAR> all sub-shapes of type <VAR>theShapeType</VAR>,
5160         #  situated relatively the specified plane by the certain way,
5161         #  defined through <VAR>theState</VAR> parameter.
5162         #  @param theShape Shape to find sub-shapes of.
5163         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5164         #  @param theAx1 Vector (or line, or linear edge), specifying normal
5165         #                direction and location of the plane to find shapes on.
5166         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5167         #  @param theName Object name; when specified, this parameter is used
5168         #         for result publication in the study. Otherwise, if automatic
5169         #         publication is switched on, default value is used for result name.
5170         #
5171         #  @return List of all found sub-shapes.
5172         #
5173         #  @ref swig_GetShapesOnPlane "Example"
5174         @ManageTransactions("ShapesOp")
5175         def GetShapesOnPlane(self, theShape, theShapeType, theAx1, theState, theName=None):
5176             """
5177             Find in theShape all sub-shapes of type theShapeType,
5178             situated relatively the specified plane by the certain way,
5179             defined through theState parameter.
5180
5181             Parameters:
5182                 theShape Shape to find sub-shapes of.
5183                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5184                 theAx1 Vector (or line, or linear edge), specifying normal
5185                        direction and location of the plane to find shapes on.
5186                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5187                 theName Object name; when specified, this parameter is used
5188                         for result publication in the study. Otherwise, if automatic
5189                         publication is switched on, default value is used for result name.
5190
5191             Returns:
5192                 List of all found sub-shapes.
5193             """
5194             # Example: see GEOM_TestOthers.py
5195             aList = self.ShapesOp.GetShapesOnPlane(theShape, theShapeType, theAx1, theState)
5196             RaiseIfFailed("GetShapesOnPlane", self.ShapesOp)
5197             self._autoPublish(aList, theName, "shapeOnPlane")
5198             return aList
5199
5200         ## Find in <VAR>theShape</VAR> all sub-shapes of type <VAR>theShapeType</VAR>,
5201         #  situated relatively the specified plane by the certain way,
5202         #  defined through <VAR>theState</VAR> parameter.
5203         #  @param theShape Shape to find sub-shapes of.
5204         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5205         #  @param theAx1 Vector (or line, or linear edge), specifying normal
5206         #                direction and location of the plane to find shapes on.
5207         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5208         #
5209         #  @return List of all found sub-shapes indices.
5210         #
5211         #  @ref swig_GetShapesOnPlaneIDs "Example"
5212         @ManageTransactions("ShapesOp")
5213         def GetShapesOnPlaneIDs(self, theShape, theShapeType, theAx1, theState):
5214             """
5215             Find in theShape all sub-shapes of type theShapeType,
5216             situated relatively the specified plane by the certain way,
5217             defined through theState parameter.
5218
5219             Parameters:
5220                 theShape Shape to find sub-shapes of.
5221                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5222                 theAx1 Vector (or line, or linear edge), specifying normal
5223                        direction and location of the plane to find shapes on.
5224                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5225
5226             Returns:
5227                 List of all found sub-shapes indices.
5228             """
5229             # Example: see GEOM_TestOthers.py
5230             aList = self.ShapesOp.GetShapesOnPlaneIDs(theShape, theShapeType, theAx1, theState)
5231             RaiseIfFailed("GetShapesOnPlaneIDs", self.ShapesOp)
5232             return aList
5233
5234         ## Find in <VAR>theShape</VAR> all sub-shapes of type <VAR>theShapeType</VAR>,
5235         #  situated relatively the specified plane by the certain way,
5236         #  defined through <VAR>theState</VAR> parameter.
5237         #  @param theShape Shape to find sub-shapes of.
5238         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5239         #  @param theAx1 Vector (or line, or linear edge), specifying normal
5240         #                direction of the plane to find shapes on.
5241         #  @param thePnt Point specifying location of the plane to find shapes on.
5242         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5243         #  @param theName Object name; when specified, this parameter is used
5244         #         for result publication in the study. Otherwise, if automatic
5245         #         publication is switched on, default value is used for result name.
5246         #
5247         #  @return List of all found sub-shapes.
5248         #
5249         #  @ref swig_GetShapesOnPlaneWithLocation "Example"
5250         @ManageTransactions("ShapesOp")
5251         def GetShapesOnPlaneWithLocation(self, theShape, theShapeType, theAx1, thePnt, theState, theName=None):
5252             """
5253             Find in theShape all sub-shapes of type theShapeType,
5254             situated relatively the specified plane by the certain way,
5255             defined through theState parameter.
5256
5257             Parameters:
5258                 theShape Shape to find sub-shapes of.
5259                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5260                 theAx1 Vector (or line, or linear edge), specifying normal
5261                        direction and location of the plane to find shapes on.
5262                 thePnt Point specifying location of the plane to find shapes on.
5263                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5264                 theName Object name; when specified, this parameter is used
5265                         for result publication in the study. Otherwise, if automatic
5266                         publication is switched on, default value is used for result name.
5267
5268             Returns:
5269                 List of all found sub-shapes.
5270             """
5271             # Example: see GEOM_TestOthers.py
5272             aList = self.ShapesOp.GetShapesOnPlaneWithLocation(theShape, theShapeType,
5273                                                                theAx1, thePnt, theState)
5274             RaiseIfFailed("GetShapesOnPlaneWithLocation", self.ShapesOp)
5275             self._autoPublish(aList, theName, "shapeOnPlane")
5276             return aList
5277
5278         ## Find in <VAR>theShape</VAR> all sub-shapes of type <VAR>theShapeType</VAR>,
5279         #  situated relatively the specified plane by the certain way,
5280         #  defined through <VAR>theState</VAR> parameter.
5281         #  @param theShape Shape to find sub-shapes of.
5282         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5283         #  @param theAx1 Vector (or line, or linear edge), specifying normal
5284         #                direction of the plane to find shapes on.
5285         #  @param thePnt Point specifying location of the plane to find shapes on.
5286         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5287         #
5288         #  @return List of all found sub-shapes indices.
5289         #
5290         #  @ref swig_GetShapesOnPlaneWithLocationIDs "Example"
5291         @ManageTransactions("ShapesOp")
5292         def GetShapesOnPlaneWithLocationIDs(self, theShape, theShapeType, theAx1, thePnt, theState):
5293             """
5294             Find in theShape all sub-shapes of type theShapeType,
5295             situated relatively the specified plane by the certain way,
5296             defined through theState parameter.
5297
5298             Parameters:
5299                 theShape Shape to find sub-shapes of.
5300                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5301                 theAx1 Vector (or line, or linear edge), specifying normal
5302                        direction and location of the plane to find shapes on.
5303                 thePnt Point specifying location of the plane to find shapes on.
5304                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5305
5306             Returns:
5307                 List of all found sub-shapes indices.
5308             """
5309             # Example: see GEOM_TestOthers.py
5310             aList = self.ShapesOp.GetShapesOnPlaneWithLocationIDs(theShape, theShapeType,
5311                                                                   theAx1, thePnt, theState)
5312             RaiseIfFailed("GetShapesOnPlaneWithLocationIDs", self.ShapesOp)
5313             return aList
5314
5315         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
5316         #  the specified cylinder by the certain way, defined through \a theState parameter.
5317         #  @param theShape Shape to find sub-shapes of.
5318         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5319         #  @param theAxis Vector (or line, or linear edge), specifying
5320         #                 axis of the cylinder to find shapes on.
5321         #  @param theRadius Radius of the cylinder 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_GetShapesOnCylinder "Example"
5330         @ManageTransactions("ShapesOp")
5331         def GetShapesOnCylinder(self, theShape, theShapeType, theAxis, theRadius, theState, theName=None):
5332             """
5333             Find in theShape all sub-shapes of type theShapeType, situated relatively
5334             the specified cylinder 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                 theAxis Vector (or line, or linear edge), specifying
5340                         axis of the cylinder to find shapes on.
5341                 theRadius Radius of the cylinder to find shapes on.
5342                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5343                 theName Object name; when specified, this parameter is used
5344                         for result publication in the study. Otherwise, if automatic
5345                         publication is switched on, default value is used for result name.
5346
5347             Returns:
5348                 List of all found sub-shapes.
5349             """
5350             # Example: see GEOM_TestOthers.py
5351             aList = self.ShapesOp.GetShapesOnCylinder(theShape, theShapeType, theAxis, theRadius, theState)
5352             RaiseIfFailed("GetShapesOnCylinder", self.ShapesOp)
5353             self._autoPublish(aList, theName, "shapeOnCylinder")
5354             return aList
5355
5356         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
5357         #  the specified cylinder by the certain way, defined through \a theState parameter.
5358         #  @param theShape Shape to find sub-shapes of.
5359         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5360         #  @param theAxis Vector (or line, or linear edge), specifying
5361         #                 axis of the cylinder to find shapes on.
5362         #  @param theRadius Radius of the cylinder to find shapes on.
5363         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5364         #
5365         #  @return List of all found sub-shapes indices.
5366         #
5367         #  @ref swig_GetShapesOnCylinderIDs "Example"
5368         @ManageTransactions("ShapesOp")
5369         def GetShapesOnCylinderIDs(self, theShape, theShapeType, theAxis, theRadius, theState):
5370             """
5371             Find in theShape all sub-shapes of type theShapeType, situated relatively
5372             the specified cylinder by the certain way, defined through theState parameter.
5373
5374             Parameters:
5375                 theShape Shape to find sub-shapes of.
5376                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5377                 theAxis Vector (or line, or linear edge), specifying
5378                         axis of the cylinder to find shapes on.
5379                 theRadius Radius of the cylinder to find shapes on.
5380                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5381
5382             Returns:
5383                 List of all found sub-shapes indices.
5384             """
5385             # Example: see GEOM_TestOthers.py
5386             aList = self.ShapesOp.GetShapesOnCylinderIDs(theShape, theShapeType, theAxis, theRadius, theState)
5387             RaiseIfFailed("GetShapesOnCylinderIDs", self.ShapesOp)
5388             return aList
5389
5390         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
5391         #  the specified cylinder by the certain way, defined through \a theState parameter.
5392         #  @param theShape Shape to find sub-shapes of.
5393         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5394         #  @param theAxis Vector (or line, or linear edge), specifying
5395         #                 axis of the cylinder to find shapes on.
5396         #  @param thePnt Point specifying location of the bottom of the cylinder.
5397         #  @param theRadius Radius of the cylinder to find shapes on.
5398         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5399         #  @param theName Object name; when specified, this parameter is used
5400         #         for result publication in the study. Otherwise, if automatic
5401         #         publication is switched on, default value is used for result name.
5402         #
5403         #  @return List of all found sub-shapes.
5404         #
5405         #  @ref swig_GetShapesOnCylinderWithLocation "Example"
5406         @ManageTransactions("ShapesOp")
5407         def GetShapesOnCylinderWithLocation(self, theShape, theShapeType, theAxis, thePnt, theRadius, theState, theName=None):
5408             """
5409             Find in theShape all sub-shapes of type theShapeType, situated relatively
5410             the specified cylinder by the certain way, defined through theState parameter.
5411
5412             Parameters:
5413                 theShape Shape to find sub-shapes of.
5414                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5415                 theAxis Vector (or line, or linear edge), specifying
5416                         axis of the cylinder to find shapes on.
5417                 theRadius Radius of the cylinder to find shapes on.
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.GetShapesOnCylinderWithLocation(theShape, theShapeType, theAxis, thePnt, theRadius, theState)
5428             RaiseIfFailed("GetShapesOnCylinderWithLocation", self.ShapesOp)
5429             self._autoPublish(aList, theName, "shapeOnCylinder")
5430             return aList
5431
5432         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
5433         #  the specified cylinder by the certain way, defined through \a theState parameter.
5434         #  @param theShape Shape to find sub-shapes of.
5435         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5436         #  @param theAxis Vector (or line, or linear edge), specifying
5437         #                 axis of the cylinder to find shapes on.
5438         #  @param thePnt Point specifying location of the bottom of the cylinder.
5439         #  @param theRadius Radius of the cylinder to find shapes on.
5440         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5441         #
5442         #  @return List of all found sub-shapes indices
5443         #
5444         #  @ref swig_GetShapesOnCylinderWithLocationIDs "Example"
5445         @ManageTransactions("ShapesOp")
5446         def GetShapesOnCylinderWithLocationIDs(self, theShape, theShapeType, theAxis, thePnt, theRadius, theState):
5447             """
5448             Find in theShape all sub-shapes of type theShapeType, situated relatively
5449             the specified cylinder by the certain way, defined through theState parameter.
5450
5451             Parameters:
5452                 theShape Shape to find sub-shapes of.
5453                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5454                 theAxis Vector (or line, or linear edge), specifying
5455                         axis of the cylinder to find shapes on.
5456                 theRadius Radius of the cylinder to find shapes on.
5457                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5458
5459             Returns:
5460                 List of all found sub-shapes indices.
5461             """
5462             # Example: see GEOM_TestOthers.py
5463             aList = self.ShapesOp.GetShapesOnCylinderWithLocationIDs(theShape, theShapeType, theAxis, thePnt, theRadius, theState)
5464             RaiseIfFailed("GetShapesOnCylinderWithLocationIDs", self.ShapesOp)
5465             return aList
5466
5467         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
5468         #  the specified sphere by the certain way, defined through \a theState parameter.
5469         #  @param theShape Shape to find sub-shapes of.
5470         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5471         #  @param theCenter Point, specifying center of the sphere to find shapes on.
5472         #  @param theRadius Radius of the sphere to find shapes on.
5473         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5474         #  @param theName Object name; when specified, this parameter is used
5475         #         for result publication in the study. Otherwise, if automatic
5476         #         publication is switched on, default value is used for result name.
5477         #
5478         #  @return List of all found sub-shapes.
5479         #
5480         #  @ref swig_GetShapesOnSphere "Example"
5481         @ManageTransactions("ShapesOp")
5482         def GetShapesOnSphere(self, theShape, theShapeType, theCenter, theRadius, theState, theName=None):
5483             """
5484             Find in theShape all sub-shapes of type theShapeType, situated relatively
5485             the specified sphere by the certain way, defined through theState parameter.
5486
5487             Parameters:
5488                 theShape Shape to find sub-shapes of.
5489                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5490                 theCenter Point, specifying center of the sphere to find shapes on.
5491                 theRadius Radius of the sphere to find shapes on.
5492                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5493                 theName Object name; when specified, this parameter is used
5494                         for result publication in the study. Otherwise, if automatic
5495                         publication is switched on, default value is used for result name.
5496
5497             Returns:
5498                 List of all found sub-shapes.
5499             """
5500             # Example: see GEOM_TestOthers.py
5501             aList = self.ShapesOp.GetShapesOnSphere(theShape, theShapeType, theCenter, theRadius, theState)
5502             RaiseIfFailed("GetShapesOnSphere", self.ShapesOp)
5503             self._autoPublish(aList, theName, "shapeOnSphere")
5504             return aList
5505
5506         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
5507         #  the specified sphere by the certain way, defined through \a theState parameter.
5508         #  @param theShape Shape to find sub-shapes of.
5509         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5510         #  @param theCenter Point, specifying center of the sphere to find shapes on.
5511         #  @param theRadius Radius of the sphere to find shapes on.
5512         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5513         #
5514         #  @return List of all found sub-shapes indices.
5515         #
5516         #  @ref swig_GetShapesOnSphereIDs "Example"
5517         @ManageTransactions("ShapesOp")
5518         def GetShapesOnSphereIDs(self, theShape, theShapeType, theCenter, theRadius, theState):
5519             """
5520             Find in theShape all sub-shapes of type theShapeType, situated relatively
5521             the specified sphere by the certain way, defined through theState parameter.
5522
5523             Parameters:
5524                 theShape Shape to find sub-shapes of.
5525                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5526                 theCenter Point, specifying center of the sphere to find shapes on.
5527                 theRadius Radius of the sphere to find shapes on.
5528                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5529
5530             Returns:
5531                 List of all found sub-shapes indices.
5532             """
5533             # Example: see GEOM_TestOthers.py
5534             aList = self.ShapesOp.GetShapesOnSphereIDs(theShape, theShapeType, theCenter, theRadius, theState)
5535             RaiseIfFailed("GetShapesOnSphereIDs", self.ShapesOp)
5536             return aList
5537
5538         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
5539         #  the specified quadrangle by the certain way, defined through \a theState parameter.
5540         #  @param theShape Shape to find sub-shapes of.
5541         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5542         #  @param theTopLeftPoint Point, specifying top left corner of a quadrangle
5543         #  @param theTopRigthPoint Point, specifying top right corner of a quadrangle
5544         #  @param theBottomLeftPoint Point, specifying bottom left corner of a quadrangle
5545         #  @param theBottomRigthPoint Point, specifying bottom right corner of a quadrangle
5546         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5547         #  @param theName Object name; when specified, this parameter is used
5548         #         for result publication in the study. Otherwise, if automatic
5549         #         publication is switched on, default value is used for result name.
5550         #
5551         #  @return List of all found sub-shapes.
5552         #
5553         #  @ref swig_GetShapesOnQuadrangle "Example"
5554         @ManageTransactions("ShapesOp")
5555         def GetShapesOnQuadrangle(self, theShape, theShapeType,
5556                                   theTopLeftPoint, theTopRigthPoint,
5557                                   theBottomLeftPoint, theBottomRigthPoint, theState, theName=None):
5558             """
5559             Find in theShape all sub-shapes of type theShapeType, situated relatively
5560             the specified quadrangle by the certain way, defined through theState parameter.
5561
5562             Parameters:
5563                 theShape Shape to find sub-shapes of.
5564                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5565                 theTopLeftPoint Point, specifying top left corner of a quadrangle
5566                 theTopRigthPoint Point, specifying top right corner of a quadrangle
5567                 theBottomLeftPoint Point, specifying bottom left corner of a quadrangle
5568                 theBottomRigthPoint Point, specifying bottom right corner of a quadrangle
5569                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5570                 theName Object name; when specified, this parameter is used
5571                         for result publication in the study. Otherwise, if automatic
5572                         publication is switched on, default value is used for result name.
5573
5574             Returns:
5575                 List of all found sub-shapes.
5576             """
5577             # Example: see GEOM_TestOthers.py
5578             aList = self.ShapesOp.GetShapesOnQuadrangle(theShape, theShapeType,
5579                                                         theTopLeftPoint, theTopRigthPoint,
5580                                                         theBottomLeftPoint, theBottomRigthPoint, theState)
5581             RaiseIfFailed("GetShapesOnQuadrangle", self.ShapesOp)
5582             self._autoPublish(aList, theName, "shapeOnQuadrangle")
5583             return aList
5584
5585         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
5586         #  the specified quadrangle by the certain way, defined through \a theState parameter.
5587         #  @param theShape Shape to find sub-shapes of.
5588         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5589         #  @param theTopLeftPoint Point, specifying top left corner of a quadrangle
5590         #  @param theTopRigthPoint Point, specifying top right corner of a quadrangle
5591         #  @param theBottomLeftPoint Point, specifying bottom left corner of a quadrangle
5592         #  @param theBottomRigthPoint Point, specifying bottom right corner of a quadrangle
5593         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5594         #
5595         #  @return List of all found sub-shapes indices.
5596         #
5597         #  @ref swig_GetShapesOnQuadrangleIDs "Example"
5598         @ManageTransactions("ShapesOp")
5599         def GetShapesOnQuadrangleIDs(self, theShape, theShapeType,
5600                                      theTopLeftPoint, theTopRigthPoint,
5601                                      theBottomLeftPoint, theBottomRigthPoint, theState):
5602             """
5603             Find in theShape all sub-shapes of type theShapeType, situated relatively
5604             the specified quadrangle by the certain way, defined through theState parameter.
5605
5606             Parameters:
5607                 theShape Shape to find sub-shapes of.
5608                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5609                 theTopLeftPoint Point, specifying top left corner of a quadrangle
5610                 theTopRigthPoint Point, specifying top right corner of a quadrangle
5611                 theBottomLeftPoint Point, specifying bottom left corner of a quadrangle
5612                 theBottomRigthPoint Point, specifying bottom right corner of a quadrangle
5613                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5614
5615             Returns:
5616                 List of all found sub-shapes indices.
5617             """
5618
5619             # Example: see GEOM_TestOthers.py
5620             aList = self.ShapesOp.GetShapesOnQuadrangleIDs(theShape, theShapeType,
5621                                                            theTopLeftPoint, theTopRigthPoint,
5622                                                            theBottomLeftPoint, theBottomRigthPoint, theState)
5623             RaiseIfFailed("GetShapesOnQuadrangleIDs", self.ShapesOp)
5624             return aList
5625
5626         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
5627         #  the specified \a theBox by the certain way, defined through \a theState parameter.
5628         #  @param theBox Shape for relative comparing.
5629         #  @param theShape Shape to find sub-shapes of.
5630         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5631         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5632         #  @param theName Object name; when specified, this parameter is used
5633         #         for result publication in the study. Otherwise, if automatic
5634         #         publication is switched on, default value is used for result name.
5635         #
5636         #  @return List of all found sub-shapes.
5637         #
5638         #  @ref swig_GetShapesOnBox "Example"
5639         @ManageTransactions("ShapesOp")
5640         def GetShapesOnBox(self, theBox, theShape, theShapeType, theState, theName=None):
5641             """
5642             Find in theShape all sub-shapes of type theShapeType, situated relatively
5643             the specified theBox by the certain way, defined through theState parameter.
5644
5645             Parameters:
5646                 theBox Shape for relative comparing.
5647                 theShape Shape to find sub-shapes of.
5648                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5649                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5650                 theName Object name; when specified, this parameter is used
5651                         for result publication in the study. Otherwise, if automatic
5652                         publication is switched on, default value is used for result name.
5653
5654             Returns:
5655                 List of all found sub-shapes.
5656             """
5657             # Example: see GEOM_TestOthers.py
5658             aList = self.ShapesOp.GetShapesOnBox(theBox, theShape, theShapeType, theState)
5659             RaiseIfFailed("GetShapesOnBox", self.ShapesOp)
5660             self._autoPublish(aList, theName, "shapeOnBox")
5661             return aList
5662
5663         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
5664         #  the specified \a theBox by the certain way, defined through \a theState parameter.
5665         #  @param theBox Shape for relative comparing.
5666         #  @param theShape Shape to find sub-shapes of.
5667         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5668         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5669         #
5670         #  @return List of all found sub-shapes indices.
5671         #
5672         #  @ref swig_GetShapesOnBoxIDs "Example"
5673         @ManageTransactions("ShapesOp")
5674         def GetShapesOnBoxIDs(self, theBox, theShape, theShapeType, theState):
5675             """
5676             Find in theShape all sub-shapes of type theShapeType, situated relatively
5677             the specified theBox by the certain way, defined through theState parameter.
5678
5679             Parameters:
5680                 theBox Shape for relative comparing.
5681                 theShape Shape to find sub-shapes of.
5682                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5683                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5684
5685             Returns:
5686                 List of all found sub-shapes indices.
5687             """
5688             # Example: see GEOM_TestOthers.py
5689             aList = self.ShapesOp.GetShapesOnBoxIDs(theBox, theShape, theShapeType, theState)
5690             RaiseIfFailed("GetShapesOnBoxIDs", self.ShapesOp)
5691             return aList
5692
5693         ## Find in \a theShape all sub-shapes of type \a theShapeType,
5694         #  situated relatively the specified \a theCheckShape by the
5695         #  certain way, defined through \a theState parameter.
5696         #  @param theCheckShape Shape for relative comparing. It must be a solid.
5697         #  @param theShape Shape to find sub-shapes of.
5698         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5699         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5700         #  @param theName Object name; when specified, this parameter is used
5701         #         for result publication in the study. Otherwise, if automatic
5702         #         publication is switched on, default value is used for result name.
5703         #
5704         #  @return List of all found sub-shapes.
5705         #
5706         #  @ref swig_GetShapesOnShape "Example"
5707         @ManageTransactions("ShapesOp")
5708         def GetShapesOnShape(self, theCheckShape, theShape, theShapeType, theState, theName=None):
5709             """
5710             Find in theShape all sub-shapes of type theShapeType,
5711             situated relatively the specified theCheckShape by the
5712             certain way, defined through theState parameter.
5713
5714             Parameters:
5715                 theCheckShape Shape for relative comparing. It must be a solid.
5716                 theShape Shape to find sub-shapes of.
5717                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5718                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5719                 theName Object name; when specified, this parameter is used
5720                         for result publication in the study. Otherwise, if automatic
5721                         publication is switched on, default value is used for result name.
5722
5723             Returns:
5724                 List of all found sub-shapes.
5725             """
5726             # Example: see GEOM_TestOthers.py
5727             aList = self.ShapesOp.GetShapesOnShape(theCheckShape, theShape,
5728                                                    theShapeType, theState)
5729             RaiseIfFailed("GetShapesOnShape", self.ShapesOp)
5730             self._autoPublish(aList, theName, "shapeOnShape")
5731             return aList
5732
5733         ## Find in \a theShape all sub-shapes of type \a theShapeType,
5734         #  situated relatively the specified \a theCheckShape by the
5735         #  certain way, defined through \a theState parameter.
5736         #  @param theCheckShape Shape for relative comparing. It must be a solid.
5737         #  @param theShape Shape to find sub-shapes of.
5738         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5739         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5740         #  @param theName Object name; when specified, this parameter is used
5741         #         for result publication in the study. Otherwise, if automatic
5742         #         publication is switched on, default value is used for result name.
5743         #
5744         #  @return All found sub-shapes as compound.
5745         #
5746         #  @ref swig_GetShapesOnShapeAsCompound "Example"
5747         @ManageTransactions("ShapesOp")
5748         def GetShapesOnShapeAsCompound(self, theCheckShape, theShape, theShapeType, theState, theName=None):
5749             """
5750             Find in theShape all sub-shapes of type theShapeType,
5751             situated relatively the specified theCheckShape by the
5752             certain way, defined through theState parameter.
5753
5754             Parameters:
5755                 theCheckShape Shape for relative comparing. It must be a solid.
5756                 theShape Shape to find sub-shapes of.
5757                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5758                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5759                 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             Returns:
5764                 All found sub-shapes as compound.
5765             """
5766             # Example: see GEOM_TestOthers.py
5767             anObj = self.ShapesOp.GetShapesOnShapeAsCompound(theCheckShape, theShape,
5768                                                              theShapeType, theState)
5769             RaiseIfFailed("GetShapesOnShapeAsCompound", self.ShapesOp)
5770             self._autoPublish(anObj, theName, "shapeOnShape")
5771             return anObj
5772
5773         ## Find in \a theShape all sub-shapes of type \a theShapeType,
5774         #  situated relatively the specified \a theCheckShape by the
5775         #  certain way, defined through \a theState parameter.
5776         #  @param theCheckShape Shape for relative comparing. It must be a solid.
5777         #  @param theShape Shape to find sub-shapes of.
5778         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5779         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5780         #
5781         #  @return List of all found sub-shapes indices.
5782         #
5783         #  @ref swig_GetShapesOnShapeIDs "Example"
5784         @ManageTransactions("ShapesOp")
5785         def GetShapesOnShapeIDs(self, theCheckShape, theShape, theShapeType, theState):
5786             """
5787             Find in theShape all sub-shapes of type theShapeType,
5788             situated relatively the specified theCheckShape by the
5789             certain way, defined through theState parameter.
5790
5791             Parameters:
5792                 theCheckShape Shape for relative comparing. It must be a solid.
5793                 theShape Shape to find sub-shapes of.
5794                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5795                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5796
5797             Returns:
5798                 List of all found sub-shapes indices.
5799             """
5800             # Example: see GEOM_TestOthers.py
5801             aList = self.ShapesOp.GetShapesOnShapeIDs(theCheckShape, theShape,
5802                                                       theShapeType, theState)
5803             RaiseIfFailed("GetShapesOnShapeIDs", self.ShapesOp)
5804             return aList
5805
5806         ## Get sub-shape(s) of theShapeWhere, which are
5807         #  coincident with \a theShapeWhat or could be a part of it.
5808         #  @param theShapeWhere Shape to find sub-shapes of.
5809         #  @param theShapeWhat Shape, specifying what to find.
5810         #  @param isNewImplementation implementation of GetInPlace functionality
5811         #             (default = False, old alghorithm based on shape properties)
5812         #  @param theName Object name; when specified, this parameter is used
5813         #         for result publication in the study. Otherwise, if automatic
5814         #         publication is switched on, default value is used for result name.
5815         #
5816         #  @return Group of all found sub-shapes or a single found sub-shape.
5817         #
5818         #  @note This function has a restriction on argument shapes.
5819         #        If \a theShapeWhere has curved parts with significantly
5820         #        outstanding centres (i.e. the mass centre of a part is closer to
5821         #        \a theShapeWhat than to the part), such parts will not be found.
5822         #        @image html get_in_place_lost_part.png
5823         #
5824         #  @ref swig_GetInPlace "Example"
5825         @ManageTransactions("ShapesOp")
5826         def GetInPlace(self, theShapeWhere, theShapeWhat, isNewImplementation = False, theName=None):
5827             """
5828             Get sub-shape(s) of theShapeWhere, which are
5829             coincident with  theShapeWhat or could be a part of it.
5830
5831             Parameters:
5832                 theShapeWhere Shape to find sub-shapes of.
5833                 theShapeWhat Shape, specifying what to find.
5834                 isNewImplementation Implementation of GetInPlace functionality
5835                                     (default = False, old alghorithm based on shape properties)
5836                 theName Object name; when specified, this parameter is used
5837                         for result publication in the study. Otherwise, if automatic
5838                         publication is switched on, default value is used for result name.
5839
5840             Returns:
5841                 Group of all found sub-shapes or a single found sub-shape.
5842
5843
5844             Note:
5845                 This function has a restriction on argument shapes.
5846                 If theShapeWhere has curved parts with significantly
5847                 outstanding centres (i.e. the mass centre of a part is closer to
5848                 theShapeWhat than to the part), such parts will not be found.
5849             """
5850             # Example: see GEOM_TestOthers.py
5851             anObj = None
5852             if isNewImplementation:
5853                 anObj = self.ShapesOp.GetInPlace(theShapeWhere, theShapeWhat)
5854             else:
5855                 anObj = self.ShapesOp.GetInPlaceOld(theShapeWhere, theShapeWhat)
5856                 pass
5857             RaiseIfFailed("GetInPlace", self.ShapesOp)
5858             self._autoPublish(anObj, theName, "inplace")
5859             return anObj
5860
5861         ## Get sub-shape(s) of \a theShapeWhere, which are
5862         #  coincident with \a theShapeWhat or could be a part of it.
5863         #
5864         #  Implementation of this method is based on a saved history of an operation,
5865         #  produced \a theShapeWhere. The \a theShapeWhat must be among this operation's
5866         #  arguments (an argument shape or a sub-shape of an argument shape).
5867         #  The operation could be the Partition or one of boolean operations,
5868         #  performed on simple shapes (not on compounds).
5869         #
5870         #  @param theShapeWhere Shape to find sub-shapes of.
5871         #  @param theShapeWhat Shape, specifying what to find (must be in the
5872         #                      building history of the ShapeWhere).
5873         #  @param theName Object name; when specified, this parameter is used
5874         #         for result publication in the study. Otherwise, if automatic
5875         #         publication is switched on, default value is used for result name.
5876         #
5877         #  @return Group of all found sub-shapes or a single found sub-shape.
5878         #
5879         #  @ref swig_GetInPlace "Example"
5880         @ManageTransactions("ShapesOp")
5881         def GetInPlaceByHistory(self, theShapeWhere, theShapeWhat, theName=None):
5882             """
5883             Implementation of this method is based on a saved history of an operation,
5884             produced theShapeWhere. The theShapeWhat must be among this operation's
5885             arguments (an argument shape or a sub-shape of an argument shape).
5886             The operation could be the Partition or one of boolean operations,
5887             performed on simple shapes (not on compounds).
5888
5889             Parameters:
5890                 theShapeWhere Shape to find sub-shapes of.
5891                 theShapeWhat Shape, specifying what to find (must be in the
5892                                 building history of the ShapeWhere).
5893                 theName Object name; when specified, this parameter is used
5894                         for result publication in the study. Otherwise, if automatic
5895                         publication is switched on, default value is used for result name.
5896
5897             Returns:
5898                 Group of all found sub-shapes or a single found sub-shape.
5899             """
5900             # Example: see GEOM_TestOthers.py
5901             anObj = self.ShapesOp.GetInPlaceByHistory(theShapeWhere, theShapeWhat)
5902             RaiseIfFailed("GetInPlaceByHistory", self.ShapesOp)
5903             self._autoPublish(anObj, theName, "inplace")
5904             return anObj
5905
5906         ## Get sub-shape of theShapeWhere, which is
5907         #  equal to \a theShapeWhat.
5908         #  @param theShapeWhere Shape to find sub-shape of.
5909         #  @param theShapeWhat Shape, specifying what to find.
5910         #  @param theName Object name; when specified, this parameter is used
5911         #         for result publication in the study. Otherwise, if automatic
5912         #         publication is switched on, default value is used for result name.
5913         #
5914         #  @return New GEOM.GEOM_Object for found sub-shape.
5915         #
5916         #  @ref swig_GetSame "Example"
5917         @ManageTransactions("ShapesOp")
5918         def GetSame(self, theShapeWhere, theShapeWhat, theName=None):
5919             """
5920             Get sub-shape of theShapeWhere, which is
5921             equal to theShapeWhat.
5922
5923             Parameters:
5924                 theShapeWhere Shape to find sub-shape of.
5925                 theShapeWhat Shape, specifying what to find.
5926                 theName Object name; when specified, this parameter is used
5927                         for result publication in the study. Otherwise, if automatic
5928                         publication is switched on, default value is used for result name.
5929
5930             Returns:
5931                 New GEOM.GEOM_Object for found sub-shape.
5932             """
5933             anObj = self.ShapesOp.GetSame(theShapeWhere, theShapeWhat)
5934             RaiseIfFailed("GetSame", self.ShapesOp)
5935             self._autoPublish(anObj, theName, "sameShape")
5936             return anObj
5937
5938
5939         ## Get sub-shape indices of theShapeWhere, which is
5940         #  equal to \a theShapeWhat.
5941         #  @param theShapeWhere Shape to find sub-shape of.
5942         #  @param theShapeWhat Shape, specifying what to find.
5943         #  @return List of all found sub-shapes indices.
5944         #
5945         #  @ref swig_GetSame "Example"
5946         @ManageTransactions("ShapesOp")
5947         def GetSameIDs(self, theShapeWhere, theShapeWhat):
5948             """
5949             Get sub-shape indices of theShapeWhere, which is
5950             equal to theShapeWhat.
5951
5952             Parameters:
5953                 theShapeWhere Shape to find sub-shape of.
5954                 theShapeWhat Shape, specifying what to find.
5955
5956             Returns:
5957                 List of all found sub-shapes indices.
5958             """
5959             anObj = self.ShapesOp.GetSameIDs(theShapeWhere, theShapeWhat)
5960             RaiseIfFailed("GetSameIDs", self.ShapesOp)
5961             return anObj
5962
5963         ## Resize the input edge with the new Min and Max parameters.
5964         #  The input edge parameters range is [0, 1]. If theMin parameter is
5965         #  negative, the input edge is extended, otherwise it is shrinked by
5966         #  theMin parameter. If theMax is greater than 1, the edge is extended,
5967         #  otherwise it is shrinked by theMax parameter.
5968         #  @param theEdge the input edge to be resized.
5969         #  @param theMin the minimal parameter value.
5970         #  @param theMax the maximal parameter value.
5971         #  @param theName Object name; when specified, this parameter is used
5972         #         for result publication in the study. Otherwise, if automatic
5973         #         publication is switched on, default value is used for result name.
5974         #  @return New GEOM.GEOM_Object, containing the created edge.
5975         #
5976         #  @ref tui_extend "Example"
5977         @ManageTransactions("ShapesOp")
5978         def ExtendEdge(self, theEdge, theMin, theMax, theName=None):
5979             """
5980             Resize the input edge with the new Min and Max parameters.
5981             The input edge parameters range is [0, 1]. If theMin parameter is
5982             negative, the input edge is extended, otherwise it is shrinked by
5983             theMin parameter. If theMax is greater than 1, the edge is extended,
5984             otherwise it is shrinked by theMax parameter.
5985
5986             Parameters:
5987                 theEdge the input edge to be resized.
5988                 theMin the minimal parameter value.
5989                 theMax the maximal parameter value.
5990                 theName Object name; when specified, this parameter is used
5991                         for result publication in the study. Otherwise, if automatic
5992                         publication is switched on, default value is used for result name.
5993
5994             Returns:
5995                 New GEOM.GEOM_Object, containing the created edge.
5996             """
5997             theMin, theMax, Parameters = ParseParameters(theMin, theMax)
5998             anObj = self.ShapesOp.ExtendEdge(theEdge, theMin, theMax)
5999             RaiseIfFailed("ExtendEdge", self.ShapesOp)
6000             anObj.SetParameters(Parameters)
6001             self._autoPublish(anObj, theName, "edge")
6002             return anObj
6003
6004         ## Resize the input face with the new UMin, UMax, VMin and VMax
6005         #  parameters. The input face U and V parameters range is [0, 1]. If
6006         #  theUMin parameter is negative, the input face is extended, otherwise
6007         #  it is shrinked along U direction by theUMin parameter. If theUMax is
6008         #  greater than 1, the face is extended, otherwise it is shrinked along
6009         #  U direction by theUMax parameter. So as for theVMin, theVMax and
6010         #  V direction of the input face.
6011         #  @param theFace the input face to be resized.
6012         #  @param theUMin the minimal U parameter value.
6013         #  @param theUMax the maximal U parameter value.
6014         #  @param theVMin the minimal V parameter value.
6015         #  @param theVMax the maximal V parameter value.
6016         #  @param theName Object name; when specified, this parameter is used
6017         #         for result publication in the study. Otherwise, if automatic
6018         #         publication is switched on, default value is used for result name.
6019         #  @return New GEOM.GEOM_Object, containing the created face.
6020         #
6021         #  @ref tui_extend "Example"
6022         @ManageTransactions("ShapesOp")
6023         def ExtendFace(self, theFace, theUMin, theUMax,
6024                        theVMin, theVMax, theName=None):
6025             """
6026             Resize the input face with the new UMin, UMax, VMin and VMax
6027             parameters. The input face U and V parameters range is [0, 1]. If
6028             theUMin parameter is negative, the input face is extended, otherwise
6029             it is shrinked along U direction by theUMin parameter. If theUMax is
6030             greater than 1, the face is extended, otherwise it is shrinked along
6031             U direction by theUMax parameter. So as for theVMin, theVMax and
6032             V direction of the input face.
6033
6034             Parameters:
6035                 theFace the input face to be resized.
6036                 theUMin the minimal U parameter value.
6037                 theUMax the maximal U parameter value.
6038                 theVMin the minimal V parameter value.
6039                 theVMax the maximal V parameter value.
6040                 theName Object name; when specified, this parameter is used
6041                         for result publication in the study. Otherwise, if automatic
6042                         publication is switched on, default value is used for result name.
6043
6044             Returns:
6045                 New GEOM.GEOM_Object, containing the created face.
6046             """
6047             theUMin, theUMax, theVMin, theVMax, Parameters = ParseParameters(theUMin, theUMax, theVMin, theVMax)
6048             anObj = self.ShapesOp.ExtendFace(theFace, theUMin, theUMax,
6049                                              theVMin, theVMax)
6050             RaiseIfFailed("ExtendFace", self.ShapesOp)
6051             anObj.SetParameters(Parameters)
6052             self._autoPublish(anObj, theName, "face")
6053             return anObj
6054
6055         ## This function takes some face as input parameter and creates new
6056         #  GEOM_Object, i.e. topological shape by extracting underlying surface
6057         #  of the source face and limiting it by the Umin, Umax, Vmin, Vmax
6058         #  parameters of the source face (in the parametrical space).
6059         #  @param theFace the input face.
6060         #  @param theName Object name; when specified, this parameter is used
6061         #         for result publication in the study. Otherwise, if automatic
6062         #         publication is switched on, default value is used for result name.
6063         #  @return New GEOM.GEOM_Object, containing the created face.
6064         #
6065         #  @ref tui_creation_surface "Example"
6066         @ManageTransactions("ShapesOp")
6067         def MakeSurfaceFromFace(self, theFace, theName=None):
6068             """
6069             This function takes some face as input parameter and creates new
6070             GEOM_Object, i.e. topological shape by extracting underlying surface
6071             of the source face and limiting it by the Umin, Umax, Vmin, Vmax
6072             parameters of the source face (in the parametrical space).
6073
6074             Parameters:
6075                 theFace the input face.
6076                 theName Object name; when specified, this parameter is used
6077                         for result publication in the study. Otherwise, if automatic
6078                         publication is switched on, default value is used for result name.
6079
6080             Returns:
6081                 New GEOM.GEOM_Object, containing the created face.
6082             """
6083             anObj = self.ShapesOp.MakeSurfaceFromFace(theFace)
6084             RaiseIfFailed("MakeSurfaceFromFace", self.ShapesOp)
6085             self._autoPublish(anObj, theName, "surface")
6086             return anObj
6087
6088         # end of l4_obtain
6089         ## @}
6090
6091         ## @addtogroup l4_access
6092         ## @{
6093
6094         ## Obtain a composite sub-shape of <VAR>aShape</VAR>, composed from sub-shapes
6095         #  of aShape, selected by their unique IDs inside <VAR>aShape</VAR>
6096         #  @param aShape Shape to get sub-shape of.
6097         #  @param ListOfID List of sub-shapes indices.
6098         #  @param theName Object name; when specified, this parameter is used
6099         #         for result publication in the study. Otherwise, if automatic
6100         #         publication is switched on, default value is used for result name.
6101         #
6102         #  @return Found sub-shape.
6103         #
6104         #  @ref swig_all_decompose "Example"
6105         def GetSubShape(self, aShape, ListOfID, theName=None):
6106             """
6107             Obtain a composite sub-shape of aShape, composed from sub-shapes
6108             of aShape, selected by their unique IDs inside aShape
6109
6110             Parameters:
6111                 aShape Shape to get sub-shape of.
6112                 ListOfID List of sub-shapes indices.
6113                 theName Object name; when specified, this parameter is used
6114                         for result publication in the study. Otherwise, if automatic
6115                         publication is switched on, default value is used for result name.
6116
6117             Returns:
6118                 Found sub-shape.
6119             """
6120             # Example: see GEOM_TestAll.py
6121             anObj = self.AddSubShape(aShape,ListOfID)
6122             self._autoPublish(anObj, theName, "subshape")
6123             return anObj
6124
6125         ## Obtain unique ID of sub-shape <VAR>aSubShape</VAR> inside <VAR>aShape</VAR>
6126         #  of aShape, selected by their unique IDs inside <VAR>aShape</VAR>
6127         #  @param aShape Shape to get sub-shape of.
6128         #  @param aSubShape Sub-shapes of aShape.
6129         #  @return ID of found sub-shape.
6130         #
6131         #  @ref swig_all_decompose "Example"
6132         @ManageTransactions("LocalOp")
6133         def GetSubShapeID(self, aShape, aSubShape):
6134             """
6135             Obtain unique ID of sub-shape aSubShape inside aShape
6136             of aShape, selected by their unique IDs inside aShape
6137
6138             Parameters:
6139                aShape Shape to get sub-shape of.
6140                aSubShape Sub-shapes of aShape.
6141
6142             Returns:
6143                ID of found sub-shape.
6144             """
6145             # Example: see GEOM_TestAll.py
6146             anID = self.LocalOp.GetSubShapeIndex(aShape, aSubShape)
6147             RaiseIfFailed("GetSubShapeIndex", self.LocalOp)
6148             return anID
6149
6150         ## Obtain unique IDs of sub-shapes <VAR>aSubShapes</VAR> inside <VAR>aShape</VAR>
6151         #  This function is provided for performance purpose. The complexity is O(n) with n
6152         #  the number of subobjects of aShape
6153         #  @param aShape Shape to get sub-shape of.
6154         #  @param aSubShapes Sub-shapes of aShape.
6155         #  @return list of IDs of found sub-shapes.
6156         #
6157         #  @ref swig_all_decompose "Example"
6158         @ManageTransactions("ShapesOp")
6159         def GetSubShapesIDs(self, aShape, aSubShapes):
6160             """
6161             Obtain a list of IDs of sub-shapes aSubShapes inside aShape
6162             This function is provided for performance purpose. The complexity is O(n) with n
6163             the number of subobjects of aShape
6164
6165             Parameters:
6166                aShape Shape to get sub-shape of.
6167                aSubShapes Sub-shapes of aShape.
6168
6169             Returns:
6170                List of IDs of found sub-shape.
6171             """
6172             # Example: see GEOM_TestAll.py
6173             anIDs = self.ShapesOp.GetSubShapesIndices(aShape, aSubShapes)
6174             RaiseIfFailed("GetSubShapesIndices", self.ShapesOp)
6175             return anIDs
6176
6177         # end of l4_access
6178         ## @}
6179
6180         ## @addtogroup l4_decompose
6181         ## @{
6182
6183         ## Get all sub-shapes and groups of \a theShape,
6184         #  that were created already by any other methods.
6185         #  @param theShape Any shape.
6186         #  @param theGroupsOnly If this parameter is TRUE, only groups will be
6187         #                       returned, else all found sub-shapes and groups.
6188         #  @return List of existing sub-objects of \a theShape.
6189         #
6190         #  @ref swig_all_decompose "Example"
6191         @ManageTransactions("ShapesOp")
6192         def GetExistingSubObjects(self, theShape, theGroupsOnly = False):
6193             """
6194             Get all sub-shapes and groups of theShape,
6195             that were created already by any other methods.
6196
6197             Parameters:
6198                 theShape Any shape.
6199                 theGroupsOnly If this parameter is TRUE, only groups will be
6200                                  returned, else all found sub-shapes and groups.
6201
6202             Returns:
6203                 List of existing sub-objects of theShape.
6204             """
6205             # Example: see GEOM_TestAll.py
6206             ListObj = self.ShapesOp.GetExistingSubObjects(theShape, theGroupsOnly)
6207             RaiseIfFailed("GetExistingSubObjects", self.ShapesOp)
6208             return ListObj
6209
6210         ## Get all groups of \a theShape,
6211         #  that were created already by any other methods.
6212         #  @param theShape Any shape.
6213         #  @return List of existing groups of \a theShape.
6214         #
6215         #  @ref swig_all_decompose "Example"
6216         @ManageTransactions("ShapesOp")
6217         def GetGroups(self, theShape):
6218             """
6219             Get all groups of theShape,
6220             that were created already by any other methods.
6221
6222             Parameters:
6223                 theShape Any shape.
6224
6225             Returns:
6226                 List of existing groups of theShape.
6227             """
6228             # Example: see GEOM_TestAll.py
6229             ListObj = self.ShapesOp.GetExistingSubObjects(theShape, True)
6230             RaiseIfFailed("GetExistingSubObjects", self.ShapesOp)
6231             return ListObj
6232
6233         ## Explode a shape on sub-shapes of a given type.
6234         #  If the shape itself matches the type, it is also returned.
6235         #  @param aShape Shape to be exploded.
6236         #  @param aType Type of sub-shapes to be retrieved (see ShapeType())
6237         #  @param theName Object name; when specified, this parameter is used
6238         #         for result publication in the study. Otherwise, if automatic
6239         #         publication is switched on, default value is used for result name.
6240         #
6241         #  @return List of sub-shapes of type theShapeType, contained in theShape.
6242         #
6243         #  @ref swig_all_decompose "Example"
6244         @ManageTransactions("ShapesOp")
6245         def SubShapeAll(self, aShape, aType, theName=None):
6246             """
6247             Explode a shape on sub-shapes of a given type.
6248             If the shape itself matches the type, it is also returned.
6249
6250             Parameters:
6251                 aShape Shape to be exploded.
6252                 aType Type of sub-shapes to be retrieved (see geompy.ShapeType)
6253                 theName Object name; when specified, this parameter is used
6254                         for result publication in the study. Otherwise, if automatic
6255                         publication is switched on, default value is used for result name.
6256
6257             Returns:
6258                 List of sub-shapes of type theShapeType, contained in theShape.
6259             """
6260             # Example: see GEOM_TestAll.py
6261             ListObj = self.ShapesOp.MakeAllSubShapes(aShape, EnumToLong( aType ), False)
6262             RaiseIfFailed("SubShapeAll", self.ShapesOp)
6263             self._autoPublish(ListObj, theName, "subshape")
6264             return ListObj
6265
6266         ## Explode a shape on sub-shapes of a given type.
6267         #  @param aShape Shape to be exploded.
6268         #  @param aType Type of sub-shapes to be retrieved (see ShapeType())
6269         #  @return List of IDs of sub-shapes.
6270         #
6271         #  @ref swig_all_decompose "Example"
6272         @ManageTransactions("ShapesOp")
6273         def SubShapeAllIDs(self, aShape, aType):
6274             """
6275             Explode a shape on sub-shapes of a given type.
6276
6277             Parameters:
6278                 aShape Shape to be exploded (see geompy.ShapeType)
6279                 aType Type of sub-shapes to be retrieved (see geompy.ShapeType)
6280
6281             Returns:
6282                 List of IDs of sub-shapes.
6283             """
6284             ListObj = self.ShapesOp.GetAllSubShapesIDs(aShape, EnumToLong( aType ), False)
6285             RaiseIfFailed("SubShapeAllIDs", self.ShapesOp)
6286             return ListObj
6287
6288         ## Obtain a compound of sub-shapes of <VAR>aShape</VAR>,
6289         #  selected by their indices in list of all sub-shapes of type <VAR>aType</VAR>.
6290         #  Each index is in range [1, Nb_Sub-Shapes_Of_Given_Type]
6291         #  @param aShape Shape to get sub-shape of.
6292         #  @param ListOfInd List of sub-shapes indices.
6293         #  @param aType Type of sub-shapes to be retrieved (see ShapeType())
6294         #  @param theName Object name; when specified, this parameter is used
6295         #         for result publication in the study. Otherwise, if automatic
6296         #         publication is switched on, default value is used for result name.
6297         #
6298         #  @return A compound of sub-shapes of aShape.
6299         #
6300         #  @ref swig_all_decompose "Example"
6301         def SubShape(self, aShape, aType, ListOfInd, theName=None):
6302             """
6303             Obtain a compound of sub-shapes of aShape,
6304             selected by their indices in list of all sub-shapes of type aType.
6305             Each index is in range [1, Nb_Sub-Shapes_Of_Given_Type]
6306
6307             Parameters:
6308                 aShape Shape to get sub-shape of.
6309                 ListOfID List of sub-shapes indices.
6310                 aType Type of sub-shapes to be retrieved (see geompy.ShapeType)
6311                 theName Object name; when specified, this parameter is used
6312                         for result publication in the study. Otherwise, if automatic
6313                         publication is switched on, default value is used for result name.
6314
6315             Returns:
6316                 A compound of sub-shapes of aShape.
6317             """
6318             # Example: see GEOM_TestAll.py
6319             ListOfIDs = []
6320             AllShapeIDsList = self.SubShapeAllIDs(aShape, EnumToLong( aType ))
6321             for ind in ListOfInd:
6322                 ListOfIDs.append(AllShapeIDsList[ind - 1])
6323             # note: auto-publishing is done in self.GetSubShape()
6324             anObj = self.GetSubShape(aShape, ListOfIDs, theName)
6325             return anObj
6326
6327         ## Explode a shape on sub-shapes of a given type.
6328         #  Sub-shapes will be sorted taking into account their gravity centers,
6329         #  to provide stable order of sub-shapes.
6330         #  If the shape itself matches the type, it is also returned.
6331         #  @param aShape Shape to be exploded.
6332         #  @param aType Type of sub-shapes to be retrieved (see ShapeType())
6333         #  @param theName Object name; when specified, this parameter is used
6334         #         for result publication in the study. Otherwise, if automatic
6335         #         publication is switched on, default value is used for result name.
6336         #
6337         #  @return List of sub-shapes of type theShapeType, contained in theShape.
6338         #
6339         #  @ref swig_SubShapeAllSorted "Example"
6340         @ManageTransactions("ShapesOp")
6341         def SubShapeAllSortedCentres(self, aShape, aType, theName=None):
6342             """
6343             Explode a shape on sub-shapes of a given type.
6344             Sub-shapes will be sorted taking into account their gravity centers,
6345             to provide stable order of sub-shapes.
6346             If the shape itself matches the type, it is also returned.
6347
6348             Parameters:
6349                 aShape Shape to be exploded.
6350                 aType Type of sub-shapes to be retrieved (see geompy.ShapeType)
6351                 theName Object name; when specified, this parameter is used
6352                         for result publication in the study. Otherwise, if automatic
6353                         publication is switched on, default value is used for result name.
6354
6355             Returns:
6356                 List of sub-shapes of type theShapeType, contained in theShape.
6357             """
6358             # Example: see GEOM_TestAll.py
6359             ListObj = self.ShapesOp.MakeAllSubShapes(aShape, EnumToLong( aType ), True)
6360             RaiseIfFailed("SubShapeAllSortedCentres", self.ShapesOp)
6361             self._autoPublish(ListObj, theName, "subshape")
6362             return ListObj
6363
6364         ## Explode a shape on sub-shapes of a given type.
6365         #  Sub-shapes will be sorted taking into account their gravity centers,
6366         #  to provide stable order of sub-shapes.
6367         #  @param aShape Shape to be exploded.
6368         #  @param aType Type of sub-shapes to be retrieved (see ShapeType())
6369         #  @return List of IDs of sub-shapes.
6370         #
6371         #  @ref swig_all_decompose "Example"
6372         @ManageTransactions("ShapesOp")
6373         def SubShapeAllSortedCentresIDs(self, aShape, aType):
6374             """
6375             Explode a shape on sub-shapes of a given type.
6376             Sub-shapes will be sorted taking into account their gravity centers,
6377             to provide stable order of sub-shapes.
6378
6379             Parameters:
6380                 aShape Shape to be exploded.
6381                 aType Type of sub-shapes to be retrieved (see geompy.ShapeType)
6382
6383             Returns:
6384                 List of IDs of sub-shapes.
6385             """
6386             ListIDs = self.ShapesOp.GetAllSubShapesIDs(aShape, EnumToLong( aType ), True)
6387             RaiseIfFailed("SubShapeAllIDs", self.ShapesOp)
6388             return ListIDs
6389
6390         ## Obtain a compound of sub-shapes of <VAR>aShape</VAR>,
6391         #  selected by they indices in sorted list of all sub-shapes of type <VAR>aType</VAR>.
6392         #  Each index is in range [1, Nb_Sub-Shapes_Of_Given_Type]
6393         #  @param aShape Shape to get sub-shape of.
6394         #  @param ListOfInd List of sub-shapes indices.
6395         #  @param aType Type of sub-shapes to be retrieved (see ShapeType())
6396         #  @param theName Object name; when specified, this parameter is used
6397         #         for result publication in the study. Otherwise, if automatic
6398         #         publication is switched on, default value is used for result name.
6399         #
6400         #  @return A compound of sub-shapes of aShape.
6401         #
6402         #  @ref swig_all_decompose "Example"
6403         def SubShapeSortedCentres(self, aShape, aType, ListOfInd, theName=None):
6404             """
6405             Obtain a compound of sub-shapes of aShape,
6406             selected by they indices in sorted list of all sub-shapes of type aType.
6407             Each index is in range [1, Nb_Sub-Shapes_Of_Given_Type]
6408
6409             Parameters:
6410                 aShape Shape to get sub-shape of.
6411                 ListOfID List of sub-shapes indices.
6412                 aType Type of sub-shapes to be retrieved (see geompy.ShapeType)
6413                 theName Object name; when specified, this parameter is used
6414                         for result publication in the study. Otherwise, if automatic
6415                         publication is switched on, default value is used for result name.
6416
6417             Returns:
6418                 A compound of sub-shapes of aShape.
6419             """
6420             # Example: see GEOM_TestAll.py
6421             ListOfIDs = []
6422             AllShapeIDsList = self.SubShapeAllSortedCentresIDs(aShape, EnumToLong( aType ))
6423             for ind in ListOfInd:
6424                 ListOfIDs.append(AllShapeIDsList[ind - 1])
6425             # note: auto-publishing is done in self.GetSubShape()
6426             anObj = self.GetSubShape(aShape, ListOfIDs, theName)
6427             return anObj
6428
6429         ## Extract shapes (excluding the main shape) of given type.
6430         #  @param aShape The shape.
6431         #  @param aType  The shape type (see ShapeType())
6432         #  @param isSorted Boolean flag to switch sorting on/off.
6433         #  @param theName Object name; when specified, this parameter is used
6434         #         for result publication in the study. Otherwise, if automatic
6435         #         publication is switched on, default value is used for result name.
6436         #
6437         #  @return List of sub-shapes of type aType, contained in aShape.
6438         #
6439         #  @ref swig_FilletChamfer "Example"
6440         @ManageTransactions("ShapesOp")
6441         def ExtractShapes(self, aShape, aType, isSorted = False, theName=None):
6442             """
6443             Extract shapes (excluding the main shape) of given type.
6444
6445             Parameters:
6446                 aShape The shape.
6447                 aType  The shape type (see geompy.ShapeType)
6448                 isSorted Boolean flag to switch sorting on/off.
6449                 theName Object name; when specified, this parameter is used
6450                         for result publication in the study. Otherwise, if automatic
6451                         publication is switched on, default value is used for result name.
6452
6453             Returns:
6454                 List of sub-shapes of type aType, contained in aShape.
6455             """
6456             # Example: see GEOM_TestAll.py
6457             ListObj = self.ShapesOp.ExtractSubShapes(aShape, EnumToLong( aType ), isSorted)
6458             RaiseIfFailed("ExtractSubShapes", self.ShapesOp)
6459             self._autoPublish(ListObj, theName, "subshape")
6460             return ListObj
6461
6462         ## Get a set of sub-shapes defined by their unique IDs inside <VAR>aShape</VAR>
6463         #  @param aShape Main shape.
6464         #  @param anIDs List of unique IDs of sub-shapes inside <VAR>aShape</VAR>.
6465         #  @param theName Object name; when specified, this parameter is used
6466         #         for result publication in the study. Otherwise, if automatic
6467         #         publication is switched on, default value is used for result name.
6468         #  @return List of GEOM.GEOM_Object, corresponding to found sub-shapes.
6469         #
6470         #  @ref swig_all_decompose "Example"
6471         @ManageTransactions("ShapesOp")
6472         def SubShapes(self, aShape, anIDs, theName=None):
6473             """
6474             Get a set of sub-shapes defined by their unique IDs inside theMainShape
6475
6476             Parameters:
6477                 aShape Main shape.
6478                 anIDs List of unique IDs of sub-shapes inside theMainShape.
6479                 theName Object name; when specified, this parameter is used
6480                         for result publication in the study. Otherwise, if automatic
6481                         publication is switched on, default value is used for result name.
6482
6483             Returns:
6484                 List of GEOM.GEOM_Object, corresponding to found sub-shapes.
6485             """
6486             # Example: see GEOM_TestAll.py
6487             ListObj = self.ShapesOp.MakeSubShapes(aShape, anIDs)
6488             RaiseIfFailed("SubShapes", self.ShapesOp)
6489             self._autoPublish(ListObj, theName, "subshape")
6490             return ListObj
6491
6492         ## Explode a shape into edges sorted in a row from a starting point.
6493         #  @param theShape the shape to be exploded on edges.
6494         #  @param theStartPoint the starting point.
6495         #  @param theName Object name; when specified, this parameter is used
6496         #         for result publication in the study. Otherwise, if automatic
6497         #         publication is switched on, default value is used for result name.
6498         #  @return List of GEOM.GEOM_Object that is actually an ordered list
6499         #          of edges sorted in a row from a starting point.
6500         #
6501         #  @ref swig_GetSubShapeEdgeSorted "Example"
6502         @ManageTransactions("ShapesOp")
6503         def GetSubShapeEdgeSorted(self, theShape, theStartPoint, theName=None):
6504             """
6505             Explode a shape into edges sorted in a row from a starting point.
6506
6507             Parameters:
6508                 theShape the shape to be exploded on edges.
6509                 theStartPoint the starting point.
6510                 theName Object name; when specified, this parameter is used
6511                         for result publication in the study. Otherwise, if automatic
6512                         publication is switched on, default value is used for result name.
6513
6514             Returns:
6515                 List of GEOM.GEOM_Object that is actually an ordered list
6516                 of edges sorted in a row from a starting point.
6517             """
6518             # Example: see GEOM_TestAll.py
6519             ListObj = self.ShapesOp.GetSubShapeEdgeSorted(theShape, theStartPoint)
6520             RaiseIfFailed("GetSubShapeEdgeSorted", self.ShapesOp)
6521             self._autoPublish(ListObj, theName, "SortedEdges")
6522             return ListObj
6523
6524         ## Check if the object is a sub-object of another GEOM object.
6525         #  @param aSubObject Checked sub-object (or its parent object, in case if
6526         #         \a theSubObjectIndex is non-zero).
6527         #  @param anObject An object that is checked for ownership (or its parent object,
6528         #         in case if \a theObjectIndex is non-zero).
6529         #  @param aSubObjectIndex When non-zero, specifies a sub-shape index that
6530         #         identifies a sub-object within its parent specified via \a theSubObject.
6531         #  @param anObjectIndex When non-zero, specifies a sub-shape index that
6532         #         identifies an object within its parent specified via \a theObject.
6533         #  @return TRUE, if the given object contains sub-object.
6534         @ManageTransactions("ShapesOp")
6535         def IsSubShapeBelongsTo(self, aSubObject, anObject, aSubObjectIndex = 0, anObjectIndex = 0):
6536             """
6537             Check if the object is a sub-object of another GEOM object.
6538             
6539             Parameters:
6540                 aSubObject Checked sub-object (or its parent object, in case if
6541                     \a theSubObjectIndex is non-zero).
6542                 anObject An object that is checked for ownership (or its parent object,
6543                     in case if \a theObjectIndex is non-zero).
6544                 aSubObjectIndex When non-zero, specifies a sub-shape index that
6545                     identifies a sub-object within its parent specified via \a theSubObject.
6546                 anObjectIndex When non-zero, specifies a sub-shape index that
6547                     identifies an object within its parent specified via \a theObject.
6548
6549             Returns
6550                 TRUE, if the given object contains sub-object.
6551             """
6552             IsOk = self.ShapesOp.IsSubShapeBelongsTo(aSubObject, aSubObjectIndex, anObject, anObjectIndex)
6553             RaiseIfFailed("IsSubShapeBelongsTo", self.ShapesOp)
6554             return IsOk
6555
6556         # end of l4_decompose
6557         ## @}
6558
6559         ## @addtogroup l4_decompose_d
6560         ## @{
6561
6562         ## Deprecated method
6563         #  It works like SubShapeAllSortedCentres(), but wrongly
6564         #  defines centres of faces, shells and solids.
6565         @ManageTransactions("ShapesOp")
6566         def SubShapeAllSorted(self, aShape, aType, theName=None):
6567             """
6568             Deprecated method
6569             It works like geompy.SubShapeAllSortedCentres, but wrongly
6570             defines centres of faces, shells and solids.
6571             """
6572             ListObj = self.ShapesOp.MakeExplode(aShape, EnumToLong( aType ), True)
6573             RaiseIfFailed("MakeExplode", self.ShapesOp)
6574             self._autoPublish(ListObj, theName, "subshape")
6575             return ListObj
6576
6577         ## Deprecated method
6578         #  It works like SubShapeAllSortedCentresIDs(), but wrongly
6579         #  defines centres of faces, shells and solids.
6580         @ManageTransactions("ShapesOp")
6581         def SubShapeAllSortedIDs(self, aShape, aType):
6582             """
6583             Deprecated method
6584             It works like geompy.SubShapeAllSortedCentresIDs, but wrongly
6585             defines centres of faces, shells and solids.
6586             """
6587             ListIDs = self.ShapesOp.SubShapeAllIDs(aShape, EnumToLong( aType ), True)
6588             RaiseIfFailed("SubShapeAllIDs", self.ShapesOp)
6589             return ListIDs
6590
6591         ## Deprecated method
6592         #  It works like SubShapeSortedCentres(), but has a bug
6593         #  (wrongly defines centres of faces, shells and solids).
6594         def SubShapeSorted(self, aShape, aType, ListOfInd, theName=None):
6595             """
6596             Deprecated method
6597             It works like geompy.SubShapeSortedCentres, but has a bug
6598             (wrongly defines centres of faces, shells and solids).
6599             """
6600             ListOfIDs = []
6601             AllShapeIDsList = self.SubShapeAllSortedIDs(aShape, EnumToLong( aType ))
6602             for ind in ListOfInd:
6603                 ListOfIDs.append(AllShapeIDsList[ind - 1])
6604             # note: auto-publishing is done in self.GetSubShape()
6605             anObj = self.GetSubShape(aShape, ListOfIDs, theName)
6606             return anObj
6607
6608         # end of l4_decompose_d
6609         ## @}
6610
6611         ## @addtogroup l3_healing
6612         ## @{
6613
6614         ## Apply a sequence of Shape Healing operators to the given object.
6615         #  @param theShape Shape to be processed.
6616         #  @param theOperators List of names of operators ("FixShape", "SplitClosedFaces", etc.).
6617         #  @param theParameters List of names of parameters
6618         #                    ("FixShape.Tolerance3d", "SplitClosedFaces.NbSplitPoints", etc.).
6619         #  @param theValues List of values of parameters, in the same order
6620         #                    as parameters are listed in <VAR>theParameters</VAR> list.
6621         #  @param theName Object name; when specified, this parameter is used
6622         #         for result publication in the study. Otherwise, if automatic
6623         #         publication is switched on, default value is used for result name.
6624         #
6625         #  <b> Operators and Parameters: </b> \n
6626         #
6627         #  * \b FixShape - corrects invalid shapes. \n
6628         #  - \b FixShape.Tolerance3d - work tolerance for detection of the problems and correction of them. \n
6629         #  - \b FixShape.MaxTolerance3d - maximal possible tolerance of the shape after correction. \n
6630         #
6631         #  * \b FixFaceSize - removes small faces, such as spots and strips.\n
6632         #  - \b FixFaceSize.Tolerance - defines minimum possible face size. \n
6633         #  - \b DropSmallEdges - removes edges, which merge with neighbouring edges. \n
6634         #  - \b DropSmallEdges.Tolerance3d - defines minimum possible distance between two parallel edges.\n
6635         #  - \b DropSmallSolids - either removes small solids or merges them with neighboring ones. \n
6636         #  - \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
6637         #  - \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
6638         #  - \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
6639         #
6640         #  * \b SplitAngle - splits faces based on conical surfaces, surfaces of revolution and cylindrical
6641         #    surfaces in segments using a certain angle. \n
6642         #  - \b SplitAngle.Angle - the central angle of the resulting segments (i.e. we obtain two segments
6643         #    if Angle=180, four if Angle=90, etc). \n
6644         #  - \b SplitAngle.MaxTolerance - maximum possible tolerance among the resulting segments.\n
6645         #
6646         #  * \b SplitClosedFaces - splits closed faces in segments.
6647         #    The number of segments depends on the number of splitting points.\n
6648         #  - \b SplitClosedFaces.NbSplitPoints - the number of splitting points.\n
6649         #
6650         #  * \b SplitContinuity - splits shapes to reduce continuities of curves and surfaces.\n
6651         #  - \b SplitContinuity.Tolerance3d - 3D tolerance for correction of geometry.\n
6652         #  - \b SplitContinuity.SurfaceContinuity - required continuity for surfaces.\n
6653         #  - \b SplitContinuity.CurveContinuity - required continuity for curves.\n
6654         #   This and the previous parameters can take the following values:\n
6655         #   \b Parametric \b Continuity \n
6656         #   \b C0 (Positional Continuity): curves are joined (the end positions of curves or surfaces
6657         #   are coincidental. The curves or surfaces may still meet at an angle, giving rise to a sharp corner or edge).\n
6658         #   \b C1 (Tangential Continuity): first derivatives are equal (the end vectors of curves or surfaces are parallel,
6659         #    ruling out sharp edges).\n
6660         #   \b C2 (Curvature Continuity): first and second derivatives are equal (the end vectors of curves or surfaces
6661         #       are of the same magnitude).\n
6662         #   \b CN N-th derivatives are equal (both the direction and the magnitude of the Nth derivatives of curves
6663         #    or surfaces (d/du C(u)) are the same at junction. \n
6664         #   \b Geometric \b Continuity \n
6665         #   \b G1: first derivatives are proportional at junction.\n
6666         #   The curve tangents thus have the same direction, but not necessarily the same magnitude.
6667         #      i.e., C1'(1) = (a,b,c) and C2'(0) = (k*a, k*b, k*c).\n
6668         #   \b G2: first and second derivatives are proportional at junction.
6669         #   As the names imply, geometric continuity requires the geometry to be continuous, while parametric
6670         #    continuity requires that the underlying parameterization was continuous as well.
6671         #   Parametric continuity of order n implies geometric continuity of order n, but not vice-versa.\n
6672         #
6673         #  * \b BsplineRestriction - converts curves and surfaces to Bsplines and processes them with the following parameters:\n
6674         #  - \b BSplineRestriction.SurfaceMode - approximation of surfaces if restriction is necessary.\n
6675         #  - \b BSplineRestriction.Curve3dMode - conversion of any 3D curve to BSpline and approximation.\n
6676         #  - \b BSplineRestriction.Curve2dMode - conversion of any 2D curve to BSpline and approximation.\n
6677         #  - \b BSplineRestriction.Tolerance3d - defines the possibility of surfaces and 3D curves approximation
6678         #       with the specified parameters.\n
6679         #  - \b BSplineRestriction.Tolerance2d - defines the possibility of surfaces and 2D curves approximation
6680         #       with the specified parameters.\n
6681         #  - \b BSplineRestriction.RequiredDegree - required degree of the resulting BSplines.\n
6682         #  - \b BSplineRestriction.RequiredNbSegments - required maximum number of segments of resultant BSplines.\n
6683         #  - \b BSplineRestriction.Continuity3d - continuity of the resulting surfaces and 3D curves.\n
6684         #  - \b BSplineRestriction.Continuity2d - continuity of the resulting 2D curves.\n
6685         #
6686         #  * \b ToBezier - converts curves and surfaces of any type to Bezier curves and surfaces.\n
6687         #  - \b ToBezier.SurfaceMode - if checked in, allows conversion of surfaces.\n
6688         #  - \b ToBezier.Curve3dMode - if checked in, allows conversion of 3D curves.\n
6689         #  - \b ToBezier.Curve2dMode - if checked in, allows conversion of 2D curves.\n
6690         #  - \b ToBezier.MaxTolerance - defines tolerance for detection and correction of problems.\n
6691         #
6692         #  * \b SameParameter - fixes edges of 2D and 3D curves not having the same parameter.\n
6693         #  - \b SameParameter.Tolerance3d - defines tolerance for fixing of edges.\n
6694         #
6695         #
6696         #  @return New GEOM.GEOM_Object, containing processed shape.
6697         #
6698         #  \n @ref tui_shape_processing "Example"
6699         @ManageTransactions("HealOp")
6700         def ProcessShape(self, theShape, theOperators, theParameters, theValues, theName=None):
6701             """
6702             Apply a sequence of Shape Healing operators to the given object.
6703
6704             Parameters:
6705                 theShape Shape to be processed.
6706                 theValues List of values of parameters, in the same order
6707                           as parameters are listed in theParameters list.
6708                 theOperators List of names of operators ('FixShape', 'SplitClosedFaces', etc.).
6709                 theParameters List of names of parameters
6710                               ('FixShape.Tolerance3d', 'SplitClosedFaces.NbSplitPoints', etc.).
6711                 theName Object name; when specified, this parameter is used
6712                         for result publication in the study. Otherwise, if automatic
6713                         publication is switched on, default value is used for result name.
6714
6715                 Operators and Parameters:
6716
6717                  * FixShape - corrects invalid shapes.
6718                      * FixShape.Tolerance3d - work tolerance for detection of the problems and correction of them.
6719                      * FixShape.MaxTolerance3d - maximal possible tolerance of the shape after correction.
6720                  * FixFaceSize - removes small faces, such as spots and strips.
6721                      * FixFaceSize.Tolerance - defines minimum possible face size.
6722                  * DropSmallEdges - removes edges, which merge with neighbouring edges.
6723                      * DropSmallEdges.Tolerance3d - defines minimum possible distance between two parallel edges.
6724                  * DropSmallSolids - either removes small solids or merges them with neighboring ones.
6725                      * 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.
6726                      * 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.
6727                      * 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.
6728
6729                  * SplitAngle - splits faces based on conical surfaces, surfaces of revolution and cylindrical surfaces
6730                                 in segments using a certain angle.
6731                      * SplitAngle.Angle - the central angle of the resulting segments (i.e. we obtain two segments
6732                                           if Angle=180, four if Angle=90, etc).
6733                      * SplitAngle.MaxTolerance - maximum possible tolerance among the resulting segments.
6734                  * SplitClosedFaces - splits closed faces in segments. The number of segments depends on the number of
6735                                       splitting points.
6736                      * SplitClosedFaces.NbSplitPoints - the number of splitting points.
6737                  * SplitContinuity - splits shapes to reduce continuities of curves and surfaces.
6738                      * SplitContinuity.Tolerance3d - 3D tolerance for correction of geometry.
6739                      * SplitContinuity.SurfaceContinuity - required continuity for surfaces.
6740                      * SplitContinuity.CurveContinuity - required continuity for curves.
6741                        This and the previous parameters can take the following values:
6742
6743                        Parametric Continuity:
6744                        C0 (Positional Continuity): curves are joined (the end positions of curves or surfaces are
6745                                                    coincidental. The curves or surfaces may still meet at an angle,
6746                                                    giving rise to a sharp corner or edge).
6747                        C1 (Tangential Continuity): first derivatives are equal (the end vectors of curves or surfaces
6748                                                    are parallel, ruling out sharp edges).
6749                        C2 (Curvature Continuity): first and second derivatives are equal (the end vectors of curves
6750                                                   or surfaces are of the same magnitude).
6751                        CN N-th derivatives are equal (both the direction and the magnitude of the Nth derivatives of
6752                           curves or surfaces (d/du C(u)) are the same at junction.
6753
6754                        Geometric Continuity:
6755                        G1: first derivatives are proportional at junction.
6756                            The curve tangents thus have the same direction, but not necessarily the same magnitude.
6757                            i.e., C1'(1) = (a,b,c) and C2'(0) = (k*a, k*b, k*c).
6758                        G2: first and second derivatives are proportional at junction. As the names imply,
6759                            geometric continuity requires the geometry to be continuous, while parametric continuity requires
6760                            that the underlying parameterization was continuous as well. Parametric continuity of order n implies
6761                            geometric continuity of order n, but not vice-versa.
6762                  * BsplineRestriction - converts curves and surfaces to Bsplines and processes them with the following parameters:
6763                      * BSplineRestriction.SurfaceMode - approximation of surfaces if restriction is necessary.
6764                      * BSplineRestriction.Curve3dMode - conversion of any 3D curve to BSpline and approximation.
6765                      * BSplineRestriction.Curve2dMode - conversion of any 2D curve to BSpline and approximation.
6766                      * BSplineRestriction.Tolerance3d - defines the possibility of surfaces and 3D curves approximation with
6767                                                         the specified parameters.
6768                      * BSplineRestriction.Tolerance2d - defines the possibility of surfaces and 2D curves approximation with
6769                                                         the specified parameters.
6770                      * BSplineRestriction.RequiredDegree - required degree of the resulting BSplines.
6771                      * BSplineRestriction.RequiredNbSegments - required maximum number of segments of resultant BSplines.
6772                      * BSplineRestriction.Continuity3d - continuity of the resulting surfaces and 3D curves.
6773                      * BSplineRestriction.Continuity2d - continuity of the resulting 2D curves.
6774                  * ToBezier - converts curves and surfaces of any type to Bezier curves and surfaces.
6775                      * ToBezier.SurfaceMode - if checked in, allows conversion of surfaces.
6776                      * ToBezier.Curve3dMode - if checked in, allows conversion of 3D curves.
6777                      * ToBezier.Curve2dMode - if checked in, allows conversion of 2D curves.
6778                      * ToBezier.MaxTolerance - defines tolerance for detection and correction of problems.
6779                  * SameParameter - fixes edges of 2D and 3D curves not having the same parameter.
6780                      * SameParameter.Tolerance3d - defines tolerance for fixing of edges.
6781
6782             Returns:
6783                 New GEOM.GEOM_Object, containing processed shape.
6784
6785             Note: For more information look through SALOME Geometry User's Guide->
6786                   -> Introduction to Geometry-> Repairing Operations-> Shape Processing
6787             """
6788             # Example: see GEOM_TestHealing.py
6789             theValues,Parameters = ParseList(theValues)
6790             anObj = self.HealOp.ProcessShape(theShape, theOperators, theParameters, theValues)
6791             # To avoid script failure in case of good argument shape
6792             if self.HealOp.GetErrorCode() == "ShHealOper_NotError_msg":
6793                 return theShape
6794             RaiseIfFailed("ProcessShape", self.HealOp)
6795             for string in (theOperators + theParameters):
6796                 Parameters = ":" + Parameters
6797                 pass
6798             anObj.SetParameters(Parameters)
6799             self._autoPublish(anObj, theName, "healed")
6800             return anObj
6801
6802         ## Remove faces from the given object (shape).
6803         #  @param theObject Shape to be processed.
6804         #  @param theFaces Indices of faces to be removed, if EMPTY then the method
6805         #                  removes ALL faces of the given object.
6806         #  @param 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         #  @return New GEOM.GEOM_Object, containing processed shape.
6811         #
6812         #  @ref tui_suppress_faces "Example"
6813         @ManageTransactions("HealOp")
6814         def SuppressFaces(self, theObject, theFaces, theName=None):
6815             """
6816             Remove faces from the given object (shape).
6817
6818             Parameters:
6819                 theObject Shape to be processed.
6820                 theFaces Indices of faces to be removed, if EMPTY then the method
6821                          removes ALL faces of the given object.
6822                 theName Object name; when specified, this parameter is used
6823                         for result publication in the study. Otherwise, if automatic
6824                         publication is switched on, default value is used for result name.
6825
6826             Returns:
6827                 New GEOM.GEOM_Object, containing processed shape.
6828             """
6829             # Example: see GEOM_TestHealing.py
6830             anObj = self.HealOp.SuppressFaces(theObject, theFaces)
6831             RaiseIfFailed("SuppressFaces", self.HealOp)
6832             self._autoPublish(anObj, theName, "suppressFaces")
6833             return anObj
6834
6835         ## Sewing of faces into a single shell.
6836         #  @param ListShape Shapes to be processed.
6837         #  @param theTolerance Required tolerance value.
6838         #  @param AllowNonManifold Flag that allows non-manifold sewing.
6839         #  @param 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         #  @return New GEOM.GEOM_Object, containing a result shell.
6844         #
6845         #  @ref tui_sewing "Example"
6846         def MakeSewing(self, ListShape, theTolerance, AllowNonManifold=False, theName=None):
6847             """
6848             Sewing of faces into a single shell.
6849
6850             Parameters:
6851                 ListShape Shapes to be processed.
6852                 theTolerance Required tolerance value.
6853                 AllowNonManifold Flag that allows non-manifold sewing.
6854                 theName Object name; when specified, this parameter is used
6855                         for result publication in the study. Otherwise, if automatic
6856                         publication is switched on, default value is used for result name.
6857
6858             Returns:
6859                 New GEOM.GEOM_Object, containing containing a result shell.
6860             """
6861             # Example: see GEOM_TestHealing.py
6862             # note: auto-publishing is done in self.Sew()
6863             anObj = self.Sew(ListShape, theTolerance, AllowNonManifold, theName)
6864             return anObj
6865
6866         ## Sewing of faces into a single shell.
6867         #  @param ListShape Shapes to be processed.
6868         #  @param theTolerance Required tolerance value.
6869         #  @param AllowNonManifold Flag that allows non-manifold sewing.
6870         #  @param theName Object name; when specified, this parameter is used
6871         #         for result publication in the study. Otherwise, if automatic
6872         #         publication is switched on, default value is used for result name.
6873         #
6874         #  @return New GEOM.GEOM_Object, containing a result shell.
6875         @ManageTransactions("HealOp")
6876         def Sew(self, ListShape, theTolerance, AllowNonManifold=False, theName=None):
6877             """
6878             Sewing of faces into a single shell.
6879
6880             Parameters:
6881                 ListShape Shapes to be processed.
6882                 theTolerance Required tolerance value.
6883                 AllowNonManifold Flag that allows non-manifold sewing.
6884                 theName Object name; when specified, this parameter is used
6885                         for result publication in the study. Otherwise, if automatic
6886                         publication is switched on, default value is used for result name.
6887
6888             Returns:
6889                 New GEOM.GEOM_Object, containing a result shell.
6890             """
6891             # Example: see MakeSewing() above
6892             theTolerance,Parameters = ParseParameters(theTolerance)
6893             if AllowNonManifold:
6894                 anObj = self.HealOp.SewAllowNonManifold( ToList( ListShape ), theTolerance)
6895             else:
6896                 anObj = self.HealOp.Sew( ToList( ListShape ), theTolerance)
6897             # To avoid script failure in case of good argument shape
6898             # (Fix of test cases geom/bugs11/L7,L8)
6899             if self.HealOp.GetErrorCode() == "ShHealOper_NotError_msg":
6900                 return anObj
6901             RaiseIfFailed("Sew", self.HealOp)
6902             anObj.SetParameters(Parameters)
6903             self._autoPublish(anObj, theName, "sewed")
6904             return anObj
6905
6906         ## Rebuild the topology of theSolids by removing
6907         #  the faces that are shared by several solids.
6908         #  @param theSolids A compound or a list of solids to be processed.
6909         #  @param theName Object name; when specified, this parameter is used
6910         #         for result publication in the study. Otherwise, if automatic
6911         #         publication is switched on, default value is used for result name.
6912         #
6913         #  @return New GEOM.GEOM_Object, containing processed shape.
6914         #
6915         #  @ref tui_remove_webs "Example"
6916         @ManageTransactions("HealOp")
6917         def RemoveInternalFaces (self, theSolids, theName=None):
6918             """
6919             Rebuild the topology of theSolids by removing
6920             the faces that are shared by several solids.
6921
6922             Parameters:
6923                 theSolids A compound or a list of solids to be processed.
6924                 theName Object name; when specified, this parameter is used
6925                         for result publication in the study. Otherwise, if automatic
6926                         publication is switched on, default value is used for result name.
6927
6928             Returns:
6929                 New GEOM.GEOM_Object, containing processed shape.
6930             """
6931             # Example: see GEOM_TestHealing.py
6932             anObj = self.HealOp.RemoveInternalFaces(ToList(theSolids))
6933             RaiseIfFailed("RemoveInternalFaces", self.HealOp)
6934             self._autoPublish(anObj, theName, "removeWebs")
6935             return anObj
6936
6937         ## Remove internal wires and edges from the given object (face).
6938         #  @param theObject Shape to be processed.
6939         #  @param theWires Indices of wires to be removed, if EMPTY then the method
6940         #                  removes ALL internal wires of the given object.
6941         #  @param theName Object name; when specified, this parameter is used
6942         #         for result publication in the study. Otherwise, if automatic
6943         #         publication is switched on, default value is used for result name.
6944         #
6945         #  @return New GEOM.GEOM_Object, containing processed shape.
6946         #
6947         #  @ref tui_suppress_internal_wires "Example"
6948         @ManageTransactions("HealOp")
6949         def SuppressInternalWires(self, theObject, theWires, theName=None):
6950             """
6951             Remove internal wires and edges from the given object (face).
6952
6953             Parameters:
6954                 theObject Shape to be processed.
6955                 theWires Indices of wires to be removed, if EMPTY then the method
6956                          removes ALL internal wires of the given object.
6957                 theName Object name; when specified, this parameter is used
6958                         for result publication in the study. Otherwise, if automatic
6959                         publication is switched on, default value is used for result name.
6960
6961             Returns:
6962                 New GEOM.GEOM_Object, containing processed shape.
6963             """
6964             # Example: see GEOM_TestHealing.py
6965             anObj = self.HealOp.RemoveIntWires(theObject, theWires)
6966             RaiseIfFailed("RemoveIntWires", self.HealOp)
6967             self._autoPublish(anObj, theName, "suppressWires")
6968             return anObj
6969
6970         ## Remove internal closed contours (holes) from the given object.
6971         #  @param theObject Shape to be processed.
6972         #  @param theWires Indices of wires to be removed, if EMPTY then the method
6973         #                  removes ALL internal holes of the given object
6974         #  @param theName Object name; when specified, this parameter is used
6975         #         for result publication in the study. Otherwise, if automatic
6976         #         publication is switched on, default value is used for result name.
6977         #
6978         #  @return New GEOM.GEOM_Object, containing processed shape.
6979         #
6980         #  @ref tui_suppress_holes "Example"
6981         @ManageTransactions("HealOp")
6982         def SuppressHoles(self, theObject, theWires, theName=None):
6983             """
6984             Remove internal closed contours (holes) from the given object.
6985
6986             Parameters:
6987                 theObject Shape to be processed.
6988                 theWires Indices of wires to be removed, if EMPTY then the method
6989                          removes ALL internal holes of the given object
6990                 theName Object name; when specified, this parameter is used
6991                         for result publication in the study. Otherwise, if automatic
6992                         publication is switched on, default value is used for result name.
6993
6994             Returns:
6995                 New GEOM.GEOM_Object, containing processed shape.
6996             """
6997             # Example: see GEOM_TestHealing.py
6998             anObj = self.HealOp.FillHoles(theObject, theWires)
6999             RaiseIfFailed("FillHoles", self.HealOp)
7000             self._autoPublish(anObj, theName, "suppressHoles")
7001             return anObj
7002
7003         ## Close an open wire.
7004         #  @param theObject Shape to be processed.
7005         #  @param theWires Indexes of edge(s) and wire(s) to be closed within <VAR>theObject</VAR>'s shape,
7006         #                  if [ ], then <VAR>theObject</VAR> itself is a wire.
7007         #  @param isCommonVertex If True  : closure by creation of a common vertex,
7008         #                        If False : closure by creation of an edge between ends.
7009         #  @param theName Object name; when specified, this parameter is used
7010         #         for result publication in the study. Otherwise, if automatic
7011         #         publication is switched on, default value is used for result name.
7012         #
7013         #  @return New GEOM.GEOM_Object, containing processed shape.
7014         #
7015         #  @ref tui_close_contour "Example"
7016         @ManageTransactions("HealOp")
7017         def CloseContour(self,theObject, theWires, isCommonVertex, theName=None):
7018             """
7019             Close an open wire.
7020
7021             Parameters:
7022                 theObject Shape to be processed.
7023                 theWires Indexes of edge(s) and wire(s) to be closed within theObject's shape,
7024                          if [ ], then theObject itself is a wire.
7025                 isCommonVertex If True  : closure by creation of a common vertex,
7026                                If False : closure by creation of an edge between ends.
7027                 theName Object name; when specified, this parameter is used
7028                         for result publication in the study. Otherwise, if automatic
7029                         publication is switched on, default value is used for result name.
7030
7031             Returns:
7032                 New GEOM.GEOM_Object, containing processed shape.
7033             """
7034             # Example: see GEOM_TestHealing.py
7035             anObj = self.HealOp.CloseContour(theObject, theWires, isCommonVertex)
7036             RaiseIfFailed("CloseContour", self.HealOp)
7037             self._autoPublish(anObj, theName, "closeContour")
7038             return anObj
7039
7040         ## Addition of a point to a given edge object.
7041         #  @param theObject Shape to be processed.
7042         #  @param theEdgeIndex Index of edge to be divided within theObject's shape,
7043         #                      if -1, then theObject itself is the edge.
7044         #  @param theValue Value of parameter on edge or length parameter,
7045         #                  depending on \a isByParameter.
7046         #  @param isByParameter If TRUE : \a theValue is treated as a curve parameter [0..1], \n
7047         #                       if FALSE : \a theValue is treated as a length parameter [0..1]
7048         #  @param theName Object name; when specified, this parameter is used
7049         #         for result publication in the study. Otherwise, if automatic
7050         #         publication is switched on, default value is used for result name.
7051         #
7052         #  @return New GEOM.GEOM_Object, containing processed shape.
7053         #
7054         #  @ref tui_add_point_on_edge "Example"
7055         @ManageTransactions("HealOp")
7056         def DivideEdge(self, theObject, theEdgeIndex, theValue, isByParameter, theName=None):
7057             """
7058             Addition of a point to a given edge object.
7059
7060             Parameters:
7061                 theObject Shape to be processed.
7062                 theEdgeIndex Index of edge to be divided within theObject's shape,
7063                              if -1, then theObject itself is the edge.
7064                 theValue Value of parameter on edge or length parameter,
7065                          depending on isByParameter.
7066                 isByParameter If TRUE :  theValue is treated as a curve parameter [0..1],
7067                               if FALSE : theValue is treated as a length parameter [0..1]
7068                 theName Object name; when specified, this parameter is used
7069                         for result publication in the study. Otherwise, if automatic
7070                         publication is switched on, default value is used for result name.
7071
7072             Returns:
7073                 New GEOM.GEOM_Object, containing processed shape.
7074             """
7075             # Example: see GEOM_TestHealing.py
7076             theEdgeIndex,theValue,isByParameter,Parameters = ParseParameters(theEdgeIndex,theValue,isByParameter)
7077             anObj = self.HealOp.DivideEdge(theObject, theEdgeIndex, theValue, isByParameter)
7078             RaiseIfFailed("DivideEdge", self.HealOp)
7079             anObj.SetParameters(Parameters)
7080             self._autoPublish(anObj, theName, "divideEdge")
7081             return anObj
7082
7083         ## Addition of points to a given edge of \a theObject by projecting
7084         #  other points to the given edge.
7085         #  @param theObject Shape to be processed.
7086         #  @param theEdgeIndex Index of edge to be divided within theObject's shape,
7087         #                      if -1, then theObject itself is the edge.
7088         #  @param thePoints List of points to project to theEdgeIndex-th edge.
7089         #  @param theName Object name; when specified, this parameter is used
7090         #         for result publication in the study. Otherwise, if automatic
7091         #         publication is switched on, default value is used for result name.
7092         #
7093         #  @return New GEOM.GEOM_Object, containing processed shape.
7094         #
7095         #  @ref tui_add_point_on_edge "Example"
7096         @ManageTransactions("HealOp")
7097         def DivideEdgeByPoint(self, theObject, theEdgeIndex, thePoints, theName=None):
7098             """
7099             Addition of points to a given edge of \a theObject by projecting
7100             other points to the given edge.
7101
7102             Parameters:
7103                 theObject Shape to be processed.
7104                 theEdgeIndex The edge or its index to be divided within theObject's shape,
7105                              if -1, then theObject itself is the edge.
7106                 thePoints List of points to project to theEdgeIndex-th edge.
7107                 theName Object name; when specified, this parameter is used
7108                         for result publication in the study. Otherwise, if automatic
7109                         publication is switched on, default value is used for result name.
7110
7111             Returns:
7112                 New GEOM.GEOM_Object, containing processed shape.
7113             """
7114             # Example: see GEOM_TestHealing.py
7115             if isinstance( theEdgeIndex, GEOM._objref_GEOM_Object ):
7116                 theEdgeIndex = self.GetSubShapeID( theObject, theEdgeIndex )
7117             anObj = self.HealOp.DivideEdgeByPoint(theObject, theEdgeIndex, ToList( thePoints ))
7118             RaiseIfFailed("DivideEdgeByPoint", self.HealOp)
7119             self._autoPublish(anObj, theName, "divideEdge")
7120             return anObj
7121
7122         ## Suppress the vertices in the wire in case if adjacent edges are C1 continuous.
7123         #  @param theWire Wire to minimize the number of C1 continuous edges in.
7124         #  @param theVertices A list of vertices to suppress. If the list
7125         #                     is empty, all vertices in a wire will be assumed.
7126         #  @param theName Object name; when specified, this parameter is used
7127         #         for result publication in the study. Otherwise, if automatic
7128         #         publication is switched on, default value is used for result name.
7129         #
7130         #  @return New GEOM.GEOM_Object with modified wire.
7131         #
7132         #  @ref tui_fuse_collinear_edges "Example"
7133         @ManageTransactions("HealOp")
7134         def FuseCollinearEdgesWithinWire(self, theWire, theVertices = [], theName=None):
7135             """
7136             Suppress the vertices in the wire in case if adjacent edges are C1 continuous.
7137
7138             Parameters:
7139                 theWire Wire to minimize the number of C1 continuous edges in.
7140                 theVertices A list of vertices to suppress. If the list
7141                             is empty, all vertices in a wire will be assumed.
7142                 theName Object name; when specified, this parameter is used
7143                         for result publication in the study. Otherwise, if automatic
7144                         publication is switched on, default value is used for result name.
7145
7146             Returns:
7147                 New GEOM.GEOM_Object with modified wire.
7148             """
7149             anObj = self.HealOp.FuseCollinearEdgesWithinWire(theWire, theVertices)
7150             RaiseIfFailed("FuseCollinearEdgesWithinWire", self.HealOp)
7151             self._autoPublish(anObj, theName, "fuseEdges")
7152             return anObj
7153
7154         ## Change orientation of the given object. Updates given shape.
7155         #  @param theObject Shape to be processed.
7156         #  @return Updated <var>theObject</var>
7157         #
7158         #  @ref swig_todo "Example"
7159         @ManageTransactions("HealOp")
7160         def ChangeOrientationShell(self,theObject):
7161             """
7162             Change orientation of the given object. Updates given shape.
7163
7164             Parameters:
7165                 theObject Shape to be processed.
7166
7167             Returns:
7168                 Updated theObject
7169             """
7170             theObject = self.HealOp.ChangeOrientation(theObject)
7171             RaiseIfFailed("ChangeOrientation", self.HealOp)
7172             pass
7173
7174         ## Change orientation of the given object.
7175         #  @param theObject Shape to be processed.
7176         #  @param theName Object name; when specified, this parameter is used
7177         #         for result publication in the study. Otherwise, if automatic
7178         #         publication is switched on, default value is used for result name.
7179         #
7180         #  @return New GEOM.GEOM_Object, containing processed shape.
7181         #
7182         #  @ref swig_todo "Example"
7183         @ManageTransactions("HealOp")
7184         def ChangeOrientationShellCopy(self, theObject, theName=None):
7185             """
7186             Change orientation of the given object.
7187
7188             Parameters:
7189                 theObject Shape to be processed.
7190                 theName Object name; when specified, this parameter is used
7191                         for result publication in the study. Otherwise, if automatic
7192                         publication is switched on, default value is used for result name.
7193
7194             Returns:
7195                 New GEOM.GEOM_Object, containing processed shape.
7196             """
7197             anObj = self.HealOp.ChangeOrientationCopy(theObject)
7198             RaiseIfFailed("ChangeOrientationCopy", self.HealOp)
7199             self._autoPublish(anObj, theName, "reversed")
7200             return anObj
7201
7202         ## Try to limit tolerance of the given object by value \a theTolerance.
7203         #  @param theObject Shape to be processed.
7204         #  @param theTolerance Required tolerance value.
7205         #  @param theName Object name; when specified, this parameter is used
7206         #         for result publication in the study. Otherwise, if automatic
7207         #         publication is switched on, default value is used for result name.
7208         #
7209         #  @return New GEOM.GEOM_Object, containing processed shape.
7210         #
7211         #  @ref tui_limit_tolerance "Example"
7212         @ManageTransactions("HealOp")
7213         def LimitTolerance(self, theObject, theTolerance = 1e-07, theName=None):
7214             """
7215             Try to limit tolerance of the given object by value theTolerance.
7216
7217             Parameters:
7218                 theObject Shape to be processed.
7219                 theTolerance Required tolerance value.
7220                 theName Object name; when specified, this parameter is used
7221                         for result publication in the study. Otherwise, if automatic
7222                         publication is switched on, default value is used for result name.
7223
7224             Returns:
7225                 New GEOM.GEOM_Object, containing processed shape.
7226             """
7227             anObj = self.HealOp.LimitTolerance(theObject, theTolerance)
7228             RaiseIfFailed("LimitTolerance", self.HealOp)
7229             self._autoPublish(anObj, theName, "limitTolerance")
7230             return anObj
7231
7232         ## Get a list of wires (wrapped in GEOM.GEOM_Object-s),
7233         #  that constitute a free boundary of the given shape.
7234         #  @param theObject Shape to get free boundary of.
7235         #  @param theName Object name; when specified, this parameter is used
7236         #         for result publication in the study. Otherwise, if automatic
7237         #         publication is switched on, default value is used for result name.
7238         #
7239         #  @return [\a status, \a theClosedWires, \a theOpenWires]
7240         #  \n \a status: FALSE, if an error(s) occured during the method execution.
7241         #  \n \a theClosedWires: Closed wires on the free boundary of the given shape.
7242         #  \n \a theOpenWires: Open wires on the free boundary of the given shape.
7243         #
7244         #  @ref tui_free_boundaries_page "Example"
7245         @ManageTransactions("HealOp")
7246         def GetFreeBoundary(self, theObject, theName=None):
7247             """
7248             Get a list of wires (wrapped in GEOM.GEOM_Object-s),
7249             that constitute a free boundary of the given shape.
7250
7251             Parameters:
7252                 theObject Shape to get free boundary of.
7253                 theName Object name; when specified, this parameter is used
7254                         for result publication in the study. Otherwise, if automatic
7255                         publication is switched on, default value is used for result name.
7256
7257             Returns:
7258                 [status, theClosedWires, theOpenWires]
7259                  status: FALSE, if an error(s) occured during the method execution.
7260                  theClosedWires: Closed wires on the free boundary of the given shape.
7261                  theOpenWires: Open wires on the free boundary of the given shape.
7262             """
7263             # Example: see GEOM_TestHealing.py
7264             anObj = self.HealOp.GetFreeBoundary( ToList( theObject ))
7265             RaiseIfFailed("GetFreeBoundary", self.HealOp)
7266             self._autoPublish(anObj[1], theName, "closedWire")
7267             self._autoPublish(anObj[2], theName, "openWire")
7268             return anObj
7269
7270         ## Replace coincident faces in \a theShapes by one face.
7271         #  @param theShapes Initial shapes, either a list or compound of shapes.
7272         #  @param theTolerance Maximum distance between faces, which can be considered as coincident.
7273         #  @param doKeepNonSolids If FALSE, only solids will present in the result,
7274         #                         otherwise all initial shapes.
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 New GEOM.GEOM_Object, containing copies of theShapes without coincident faces.
7280         #
7281         #  @ref tui_glue_faces "Example"
7282         @ManageTransactions("ShapesOp")
7283         def MakeGlueFaces(self, theShapes, theTolerance, doKeepNonSolids=True, theName=None):
7284             """
7285             Replace coincident faces in theShapes by one face.
7286
7287             Parameters:
7288                 theShapes Initial shapes, either a list or compound of shapes.
7289                 theTolerance Maximum distance between faces, which can be considered as coincident.
7290                 doKeepNonSolids If FALSE, only solids will present in the result,
7291                                 otherwise all initial shapes.
7292                 theName Object name; when specified, this parameter is used
7293                         for result publication in the study. Otherwise, if automatic
7294                         publication is switched on, default value is used for result name.
7295
7296             Returns:
7297                 New GEOM.GEOM_Object, containing copies of theShapes without coincident faces.
7298             """
7299             # Example: see GEOM_Spanner.py
7300             theTolerance,Parameters = ParseParameters(theTolerance)
7301             anObj = self.ShapesOp.MakeGlueFaces(ToList(theShapes), theTolerance, doKeepNonSolids)
7302             if anObj is None:
7303                 raise RuntimeError, "MakeGlueFaces : " + self.ShapesOp.GetErrorCode()
7304             anObj.SetParameters(Parameters)
7305             self._autoPublish(anObj, theName, "glueFaces")
7306             return anObj
7307
7308         ## Find coincident faces in \a theShapes for possible gluing.
7309         #  @param theShapes Initial shapes, either a list or compound of shapes.
7310         #  @param theTolerance Maximum distance between faces,
7311         #                      which can be considered as coincident.
7312         #  @param theName Object name; when specified, this parameter is used
7313         #         for result publication in the study. Otherwise, if automatic
7314         #         publication is switched on, default value is used for result name.
7315         #
7316         #  @return GEOM.ListOfGO
7317         #
7318         #  @ref tui_glue_faces "Example"
7319         @ManageTransactions("ShapesOp")
7320         def GetGlueFaces(self, theShapes, theTolerance, theName=None):
7321             """
7322             Find coincident faces in theShapes for possible gluing.
7323
7324             Parameters:
7325                 theShapes Initial shapes, either a list or compound of shapes.
7326                 theTolerance Maximum distance between faces,
7327                              which can be considered as coincident.
7328                 theName Object name; when specified, this parameter is used
7329                         for result publication in the study. Otherwise, if automatic
7330                         publication is switched on, default value is used for result name.
7331
7332             Returns:
7333                 GEOM.ListOfGO
7334             """
7335             anObj = self.ShapesOp.GetGlueFaces(ToList(theShapes), theTolerance)
7336             RaiseIfFailed("GetGlueFaces", self.ShapesOp)
7337             self._autoPublish(anObj, theName, "facesToGlue")
7338             return anObj
7339
7340         ## Replace coincident faces in \a theShapes by one face
7341         #  in compliance with given list of faces
7342         #  @param theShapes Initial shapes, either a list or compound of shapes.
7343         #  @param theTolerance Maximum distance between faces,
7344         #                      which can be considered as coincident.
7345         #  @param theFaces List of faces for gluing.
7346         #  @param doKeepNonSolids If FALSE, only solids will present in the result,
7347         #                         otherwise all initial shapes.
7348         #  @param doGlueAllEdges If TRUE, all coincident edges of <VAR>theShape</VAR>
7349         #                        will be glued, otherwise only the edges,
7350         #                        belonging to <VAR>theFaces</VAR>.
7351         #  @param theName Object name; when specified, this parameter is used
7352         #         for result publication in the study. Otherwise, if automatic
7353         #         publication is switched on, default value is used for result name.
7354         #
7355         #  @return New GEOM.GEOM_Object, containing copies of theShapes without coincident faces.
7356         #
7357         #  @ref tui_glue_faces "Example"
7358         @ManageTransactions("ShapesOp")
7359         def MakeGlueFacesByList(self, theShapes, theTolerance, theFaces,
7360                                 doKeepNonSolids=True, doGlueAllEdges=True, theName=None):
7361             """
7362             Replace coincident faces in theShapes by one face
7363             in compliance with given list of faces
7364
7365             Parameters:
7366                 theShapes theShapes Initial shapes, either a list or compound of shapes.
7367                 theTolerance Maximum distance between faces,
7368                              which can be considered as coincident.
7369                 theFaces List of faces for gluing.
7370                 doKeepNonSolids If FALSE, only solids will present in the result,
7371                                 otherwise all initial shapes.
7372                 doGlueAllEdges If TRUE, all coincident edges of theShape
7373                                will be glued, otherwise only the edges,
7374                                belonging to theFaces.
7375                 theName Object name; when specified, this parameter is used
7376                         for result publication in the study. Otherwise, if automatic
7377                         publication is switched on, default value is used for result name.
7378
7379             Returns:
7380                 New GEOM.GEOM_Object, containing copies of theShapes without coincident faces.
7381             """
7382             anObj = self.ShapesOp.MakeGlueFacesByList(ToList(theShapes), theTolerance, ToList(theFaces),
7383                                                       doKeepNonSolids, doGlueAllEdges)
7384             if anObj is None:
7385                 raise RuntimeError, "MakeGlueFacesByList : " + self.ShapesOp.GetErrorCode()
7386             self._autoPublish(anObj, theName, "glueFaces")
7387             return anObj
7388
7389         ## Replace coincident edges in \a theShapes by one edge.
7390         #  @param theShapes Initial shapes, either a list or compound of shapes.
7391         #  @param theTolerance Maximum distance between edges, which can be considered as coincident.
7392         #  @param theName Object name; when specified, this parameter is used
7393         #         for result publication in the study. Otherwise, if automatic
7394         #         publication is switched on, default value is used for result name.
7395         #
7396         #  @return New GEOM.GEOM_Object, containing copies of theShapes without coincident edges.
7397         #
7398         #  @ref tui_glue_edges "Example"
7399         @ManageTransactions("ShapesOp")
7400         def MakeGlueEdges(self, theShapes, theTolerance, theName=None):
7401             """
7402             Replace coincident edges in theShapes by one edge.
7403
7404             Parameters:
7405                 theShapes Initial shapes, either a list or compound of shapes.
7406                 theTolerance Maximum distance between edges, which can be considered as coincident.
7407                 theName Object name; when specified, this parameter is used
7408                         for result publication in the study. Otherwise, if automatic
7409                         publication is switched on, default value is used for result name.
7410
7411             Returns:
7412                 New GEOM.GEOM_Object, containing copies of theShapes without coincident edges.
7413             """
7414             theTolerance,Parameters = ParseParameters(theTolerance)
7415             anObj = self.ShapesOp.MakeGlueEdges(ToList(theShapes), theTolerance)
7416             if anObj is None:
7417                 raise RuntimeError, "MakeGlueEdges : " + self.ShapesOp.GetErrorCode()
7418             anObj.SetParameters(Parameters)
7419             self._autoPublish(anObj, theName, "glueEdges")
7420             return anObj
7421
7422         ## Find coincident edges in \a theShapes for possible gluing.
7423         #  @param theShapes Initial shapes, either a list or compound of shapes.
7424         #  @param theTolerance Maximum distance between edges,
7425         #                      which can be considered as coincident.
7426         #  @param theName Object name; when specified, this parameter is used
7427         #         for result publication in the study. Otherwise, if automatic
7428         #         publication is switched on, default value is used for result name.
7429         #
7430         #  @return GEOM.ListOfGO
7431         #
7432         #  @ref tui_glue_edges "Example"
7433         @ManageTransactions("ShapesOp")
7434         def GetGlueEdges(self, theShapes, theTolerance, theName=None):
7435             """
7436             Find coincident edges in theShapes for possible gluing.
7437
7438             Parameters:
7439                 theShapes Initial shapes, either a list or compound of shapes.
7440                 theTolerance Maximum distance between edges,
7441                              which can be considered as coincident.
7442                 theName Object name; when specified, this parameter is used
7443                         for result publication in the study. Otherwise, if automatic
7444                         publication is switched on, default value is used for result name.
7445
7446             Returns:
7447                 GEOM.ListOfGO
7448             """
7449             anObj = self.ShapesOp.GetGlueEdges(ToList(theShapes), theTolerance)
7450             RaiseIfFailed("GetGlueEdges", self.ShapesOp)
7451             self._autoPublish(anObj, theName, "edgesToGlue")
7452             return anObj
7453
7454         ## Replace coincident edges in theShapes by one edge
7455         #  in compliance with given list of edges.
7456         #  @param theShapes Initial shapes, either a list or compound of shapes.
7457         #  @param theTolerance Maximum distance between edges,
7458         #                      which can be considered as coincident.
7459         #  @param theEdges List of edges for gluing.
7460         #  @param theName Object name; when specified, this parameter is used
7461         #         for result publication in the study. Otherwise, if automatic
7462         #         publication is switched on, default value is used for result name.
7463         #
7464         #  @return New GEOM.GEOM_Object, containing copies of theShapes without coincident edges.
7465         #
7466         #  @ref tui_glue_edges "Example"
7467         @ManageTransactions("ShapesOp")
7468         def MakeGlueEdgesByList(self, theShapes, theTolerance, theEdges, theName=None):
7469             """
7470             Replace coincident edges in theShapes by one edge
7471             in compliance with given list of edges.
7472
7473             Parameters:
7474                 theShapes Initial shapes, either a list or compound of shapes.
7475                 theTolerance Maximum distance between edges,
7476                              which can be considered as coincident.
7477                 theEdges List of edges for gluing.
7478                 theName Object name; when specified, this parameter is used
7479                         for result publication in the study. Otherwise, if automatic
7480                         publication is switched on, default value is used for result name.
7481
7482             Returns:
7483                 New GEOM.GEOM_Object, containing copies of theShapes without coincident edges.
7484             """
7485             anObj = self.ShapesOp.MakeGlueEdgesByList(ToList(theShapes), theTolerance, theEdges)
7486             if anObj is None:
7487                 raise RuntimeError, "MakeGlueEdgesByList : " + self.ShapesOp.GetErrorCode()
7488             self._autoPublish(anObj, theName, "glueEdges")
7489             return anObj
7490
7491         # end of l3_healing
7492         ## @}
7493
7494         ## @addtogroup l3_boolean Boolean Operations
7495         ## @{
7496
7497         # -----------------------------------------------------------------------------
7498         # Boolean (Common, Cut, Fuse, Section)
7499         # -----------------------------------------------------------------------------
7500
7501         ## Perform one of boolean operations on two given shapes.
7502         #  @param theShape1 First argument for boolean operation.
7503         #  @param theShape2 Second argument for boolean operation.
7504         #  @param theOperation Indicates the operation to be done:\n
7505         #                      1 - Common, 2 - Cut, 3 - Fuse, 4 - Section.
7506         #  @param checkSelfInte The flag that tells if the arguments should
7507         #         be checked for self-intersection prior to the operation.
7508         #  @param theName Object name; when specified, this parameter is used
7509         #         for result publication in the study. Otherwise, if automatic
7510         #         publication is switched on, default value is used for result name.
7511         #
7512         #  @note This algorithm doesn't find all types of self-intersections.
7513         #        It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7514         #        vertex/face and edge/face intersections. Face/face
7515         #        intersections detection is switched off as it is a
7516         #        time-consuming operation that gives an impact on performance.
7517         #        To find all self-intersections please use
7518         #        CheckSelfIntersections() method.
7519         #
7520         #  @return New GEOM.GEOM_Object, containing the result shape.
7521         #
7522         #  @ref tui_fuse "Example"
7523         @ManageTransactions("BoolOp")
7524         def MakeBoolean(self, theShape1, theShape2, theOperation, checkSelfInte=False, theName=None):
7525             """
7526             Perform one of boolean operations on two given shapes.
7527
7528             Parameters:
7529                 theShape1 First argument for boolean operation.
7530                 theShape2 Second argument for boolean operation.
7531                 theOperation Indicates the operation to be done:
7532                              1 - Common, 2 - Cut, 3 - Fuse, 4 - Section.
7533                 checkSelfInte The flag that tells if the arguments should
7534                               be checked for self-intersection prior to
7535                               the operation.
7536                 theName Object name; when specified, this parameter is used
7537                         for result publication in the study. Otherwise, if automatic
7538                         publication is switched on, default value is used for result name.
7539
7540             Note:
7541                     This algorithm doesn't find all types of self-intersections.
7542                     It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7543                     vertex/face and edge/face intersections. Face/face
7544                     intersections detection is switched off as it is a
7545                     time-consuming operation that gives an impact on performance.
7546                     To find all self-intersections please use
7547                     CheckSelfIntersections() method.
7548
7549             Returns:
7550                 New GEOM.GEOM_Object, containing the result shape.
7551             """
7552             # Example: see GEOM_TestAll.py
7553             anObj = self.BoolOp.MakeBoolean(theShape1, theShape2, theOperation, checkSelfInte)
7554             RaiseIfFailed("MakeBoolean", self.BoolOp)
7555             def_names = { 1: "common", 2: "cut", 3: "fuse", 4: "section" }
7556             self._autoPublish(anObj, theName, def_names[theOperation])
7557             return anObj
7558
7559         ## Perform Common boolean operation on two given shapes.
7560         #  @param theShape1 First argument for boolean operation.
7561         #  @param theShape2 Second argument for boolean operation.
7562         #  @param checkSelfInte The flag that tells if the arguments should
7563         #         be checked for self-intersection prior to the operation.
7564         #  @param theName Object name; when specified, this parameter is used
7565         #         for result publication in the study. Otherwise, if automatic
7566         #         publication is switched on, default value is used for result name.
7567         #
7568         #  @note This algorithm doesn't find all types of self-intersections.
7569         #        It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7570         #        vertex/face and edge/face intersections. Face/face
7571         #        intersections detection is switched off as it is a
7572         #        time-consuming operation that gives an impact on performance.
7573         #        To find all self-intersections please use
7574         #        CheckSelfIntersections() method.
7575         #
7576         #  @return New GEOM.GEOM_Object, containing the result shape.
7577         #
7578         #  @ref tui_common "Example 1"
7579         #  \n @ref swig_MakeCommon "Example 2"
7580         def MakeCommon(self, theShape1, theShape2, checkSelfInte=False, theName=None):
7581             """
7582             Perform Common boolean operation on two given shapes.
7583
7584             Parameters:
7585                 theShape1 First argument for boolean operation.
7586                 theShape2 Second argument for boolean operation.
7587                 checkSelfInte The flag that tells if the arguments should
7588                               be checked for self-intersection prior to
7589                               the operation.
7590                 theName Object name; when specified, this parameter is used
7591                         for result publication in the study. Otherwise, if automatic
7592                         publication is switched on, default value is used for result name.
7593
7594             Note:
7595                     This algorithm doesn't find all types of self-intersections.
7596                     It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7597                     vertex/face and edge/face intersections. Face/face
7598                     intersections detection is switched off as it is a
7599                     time-consuming operation that gives an impact on performance.
7600                     To find all self-intersections please use
7601                     CheckSelfIntersections() method.
7602
7603             Returns:
7604                 New GEOM.GEOM_Object, containing the result shape.
7605             """
7606             # Example: see GEOM_TestOthers.py
7607             # note: auto-publishing is done in self.MakeBoolean()
7608             return self.MakeBoolean(theShape1, theShape2, 1, checkSelfInte, theName)
7609
7610         ## Perform Cut boolean operation on two given shapes.
7611         #  @param theShape1 First argument for boolean operation.
7612         #  @param theShape2 Second argument for boolean operation.
7613         #  @param checkSelfInte The flag that tells if the arguments should
7614         #         be checked for self-intersection prior to the operation.
7615         #  @param theName Object name; when specified, this parameter is used
7616         #         for result publication in the study. Otherwise, if automatic
7617         #         publication is switched on, default value is used for result name.
7618         #
7619         #  @note This algorithm doesn't find all types of self-intersections.
7620         #        It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7621         #        vertex/face and edge/face intersections. Face/face
7622         #        intersections detection is switched off as it is a
7623         #        time-consuming operation that gives an impact on performance.
7624         #        To find all self-intersections please use
7625         #        CheckSelfIntersections() method.
7626         #
7627         #  @return New GEOM.GEOM_Object, containing the result shape.
7628         #
7629         #  @ref tui_cut "Example 1"
7630         #  \n @ref swig_MakeCommon "Example 2"
7631         def MakeCut(self, theShape1, theShape2, checkSelfInte=False, theName=None):
7632             """
7633             Perform Cut boolean operation on two given shapes.
7634
7635             Parameters:
7636                 theShape1 First argument for boolean operation.
7637                 theShape2 Second argument for boolean operation.
7638                 checkSelfInte The flag that tells if the arguments should
7639                               be checked for self-intersection prior to
7640                               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             # note: auto-publishing is done in self.MakeBoolean()
7660             return self.MakeBoolean(theShape1, theShape2, 2, checkSelfInte, theName)
7661
7662         ## Perform Fuse boolean operation on two given shapes.
7663         #  @param theShape1 First argument for boolean operation.
7664         #  @param theShape2 Second argument for boolean operation.
7665         #  @param checkSelfInte The flag that tells if the arguments should
7666         #         be checked for self-intersection prior to the operation.
7667         #  @param rmExtraEdges The flag that tells if Remove Extra Edges
7668         #         operation should be performed during 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_fuse "Example 1"
7684         #  \n @ref swig_MakeCommon "Example 2"
7685         @ManageTransactions("BoolOp")
7686         def MakeFuse(self, theShape1, theShape2, checkSelfInte=False,
7687                      rmExtraEdges=False, theName=None):
7688             """
7689             Perform Fuse boolean operation on two given shapes.
7690
7691             Parameters:
7692                 theShape1 First argument for boolean operation.
7693                 theShape2 Second argument for boolean operation.
7694                 checkSelfInte The flag that tells if the arguments should
7695                               be checked for self-intersection prior to
7696                               the operation.
7697                 rmExtraEdges The flag that tells if Remove Extra Edges
7698                              operation should be performed during the operation.
7699                 theName Object name; when specified, this parameter is used
7700                         for result publication in the study. Otherwise, if automatic
7701                         publication is switched on, default value is used for result name.
7702
7703             Note:
7704                     This algorithm doesn't find all types of self-intersections.
7705                     It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7706                     vertex/face and edge/face intersections. Face/face
7707                     intersections detection is switched off as it is a
7708                     time-consuming operation that gives an impact on performance.
7709                     To find all self-intersections please use
7710                     CheckSelfIntersections() method.
7711
7712             Returns:
7713                 New GEOM.GEOM_Object, containing the result shape.
7714
7715             """
7716             # Example: see GEOM_TestOthers.py
7717             anObj = self.BoolOp.MakeFuse(theShape1, theShape2,
7718                                          checkSelfInte, rmExtraEdges)
7719             RaiseIfFailed("MakeFuse", self.BoolOp)
7720             self._autoPublish(anObj, theName, "fuse")
7721             return anObj
7722
7723         ## Perform Section boolean operation on two given shapes.
7724         #  @param theShape1 First argument for boolean operation.
7725         #  @param theShape2 Second argument for boolean operation.
7726         #  @param checkSelfInte The flag that tells if the arguments should
7727         #         be checked for self-intersection prior to the operation.
7728         #         If a self-intersection detected the operation fails.
7729         #  @param theName Object name; when specified, this parameter is used
7730         #         for result publication in the study. Otherwise, if automatic
7731         #         publication is switched on, default value is used for result name.
7732         #  @return New GEOM.GEOM_Object, containing the result shape.
7733         #
7734         #  @ref tui_section "Example 1"
7735         #  \n @ref swig_MakeCommon "Example 2"
7736         def MakeSection(self, theShape1, theShape2, checkSelfInte=False, theName=None):
7737             """
7738             Perform Section boolean operation on two given shapes.
7739
7740             Parameters:
7741                 theShape1 First argument for boolean operation.
7742                 theShape2 Second argument for boolean operation.
7743                 checkSelfInte The flag that tells if the arguments should
7744                               be checked for self-intersection prior to the operation.
7745                               If a self-intersection detected the operation fails.
7746                 theName Object name; when specified, this parameter is used
7747                         for result publication in the study. Otherwise, if automatic
7748                         publication is switched on, default value is used for result name.
7749             Returns:
7750                 New GEOM.GEOM_Object, containing the result shape.
7751
7752             """
7753             # Example: see GEOM_TestOthers.py
7754             # note: auto-publishing is done in self.MakeBoolean()
7755             return self.MakeBoolean(theShape1, theShape2, 4, checkSelfInte, theName)
7756
7757         ## Perform Fuse boolean operation on the list of shapes.
7758         #  @param theShapesList Shapes to be fused.
7759         #  @param checkSelfInte The flag that tells if the arguments should
7760         #         be checked for self-intersection prior to the operation.
7761         #  @param rmExtraEdges The flag that tells if Remove Extra Edges
7762         #         operation should be performed during the operation.
7763         #  @param theName Object name; when specified, this parameter is used
7764         #         for result publication in the study. Otherwise, if automatic
7765         #         publication is switched on, default value is used for result name.
7766         #
7767         #  @note This algorithm doesn't find all types of self-intersections.
7768         #        It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7769         #        vertex/face and edge/face intersections. Face/face
7770         #        intersections detection is switched off as it is a
7771         #        time-consuming operation that gives an impact on performance.
7772         #        To find all self-intersections please use
7773         #        CheckSelfIntersections() method.
7774         #
7775         #  @return New GEOM.GEOM_Object, containing the result shape.
7776         #
7777         #  @ref tui_fuse "Example 1"
7778         #  \n @ref swig_MakeCommon "Example 2"
7779         @ManageTransactions("BoolOp")
7780         def MakeFuseList(self, theShapesList, checkSelfInte=False,
7781                          rmExtraEdges=False, theName=None):
7782             """
7783             Perform Fuse boolean operation on the list of shapes.
7784
7785             Parameters:
7786                 theShapesList Shapes to be fused.
7787                 checkSelfInte The flag that tells if the arguments should
7788                               be checked for self-intersection prior to
7789                               the operation.
7790                 rmExtraEdges The flag that tells if Remove Extra Edges
7791                              operation should be performed during the operation.
7792                 theName Object name; when specified, this parameter is used
7793                         for result publication in the study. Otherwise, if automatic
7794                         publication is switched on, default value is used for result name.
7795
7796             Note:
7797                     This algorithm doesn't find all types of self-intersections.
7798                     It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7799                     vertex/face and edge/face intersections. Face/face
7800                     intersections detection is switched off as it is a
7801                     time-consuming operation that gives an impact on performance.
7802                     To find all self-intersections please use
7803                     CheckSelfIntersections() method.
7804
7805             Returns:
7806                 New GEOM.GEOM_Object, containing the result shape.
7807
7808             """
7809             # Example: see GEOM_TestOthers.py
7810             anObj = self.BoolOp.MakeFuseList(theShapesList, checkSelfInte,
7811                                              rmExtraEdges)
7812             RaiseIfFailed("MakeFuseList", self.BoolOp)
7813             self._autoPublish(anObj, theName, "fuse")
7814             return anObj
7815
7816         ## Perform Common boolean operation on the list of shapes.
7817         #  @param theShapesList Shapes for Common operation.
7818         #  @param checkSelfInte The flag that tells if the arguments should
7819         #         be checked for self-intersection prior to the operation.
7820         #  @param theName Object name; when specified, this parameter is used
7821         #         for result publication in the study. Otherwise, if automatic
7822         #         publication is switched on, default value is used for result name.
7823         #
7824         #  @note This algorithm doesn't find all types of self-intersections.
7825         #        It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7826         #        vertex/face and edge/face intersections. Face/face
7827         #        intersections detection is switched off as it is a
7828         #        time-consuming operation that gives an impact on performance.
7829         #        To find all self-intersections please use
7830         #        CheckSelfIntersections() method.
7831         #
7832         #  @return New GEOM.GEOM_Object, containing the result shape.
7833         #
7834         #  @ref tui_common "Example 1"
7835         #  \n @ref swig_MakeCommon "Example 2"
7836         @ManageTransactions("BoolOp")
7837         def MakeCommonList(self, theShapesList, checkSelfInte=False, theName=None):
7838             """
7839             Perform Common boolean operation on the list of shapes.
7840
7841             Parameters:
7842                 theShapesList Shapes for Common operation.
7843                 checkSelfInte The flag that tells if the arguments should
7844                               be checked for self-intersection prior to
7845                               the operation.
7846                 theName Object name; when specified, this parameter is used
7847                         for result publication in the study. Otherwise, if automatic
7848                         publication is switched on, default value is used for result name.
7849
7850             Note:
7851                     This algorithm doesn't find all types of self-intersections.
7852                     It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7853                     vertex/face and edge/face intersections. Face/face
7854                     intersections detection is switched off as it is a
7855                     time-consuming operation that gives an impact on performance.
7856                     To find all self-intersections please use
7857                     CheckSelfIntersections() method.
7858
7859             Returns:
7860                 New GEOM.GEOM_Object, containing the result shape.
7861
7862             """
7863             # Example: see GEOM_TestOthers.py
7864             anObj = self.BoolOp.MakeCommonList(theShapesList, checkSelfInte)
7865             RaiseIfFailed("MakeCommonList", self.BoolOp)
7866             self._autoPublish(anObj, theName, "common")
7867             return anObj
7868
7869         ## Perform Cut boolean operation on one object and the list of tools.
7870         #  @param theMainShape The object of the operation.
7871         #  @param theShapesList The list of tools of the operation.
7872         #  @param checkSelfInte The flag that tells if the arguments should
7873         #         be checked for self-intersection prior to the operation.
7874         #  @param theName Object name; when specified, this parameter is used
7875         #         for result publication in the study. Otherwise, if automatic
7876         #         publication is switched on, default value is used for result name.
7877         #
7878         #  @note This algorithm doesn't find all types of self-intersections.
7879         #        It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7880         #        vertex/face and edge/face intersections. Face/face
7881         #        intersections detection is switched off as it is a
7882         #        time-consuming operation that gives an impact on performance.
7883         #        To find all self-intersections please use
7884         #        CheckSelfIntersections() method.
7885         #
7886         #  @return New GEOM.GEOM_Object, containing the result shape.
7887         #
7888         #  @ref tui_cut "Example 1"
7889         #  \n @ref swig_MakeCommon "Example 2"
7890         @ManageTransactions("BoolOp")
7891         def MakeCutList(self, theMainShape, theShapesList, checkSelfInte=False, theName=None):
7892             """
7893             Perform Cut boolean operation on one object and the list of tools.
7894
7895             Parameters:
7896                 theMainShape The object of the operation.
7897                 theShapesList The list of tools of the operation.
7898                 checkSelfInte The flag that tells if the arguments should
7899                               be checked for self-intersection prior to
7900                               the operation.
7901                 theName Object name; when specified, this parameter is used
7902                         for result publication in the study. Otherwise, if automatic
7903                         publication is switched on, default value is used for result name.
7904
7905             Note:
7906                     This algorithm doesn't find all types of self-intersections.
7907                     It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7908                     vertex/face and edge/face intersections. Face/face
7909                     intersections detection is switched off as it is a
7910                     time-consuming operation that gives an impact on performance.
7911                     To find all self-intersections please use
7912                     CheckSelfIntersections() method.
7913
7914             Returns:
7915                 New GEOM.GEOM_Object, containing the result shape.
7916
7917             """
7918             # Example: see GEOM_TestOthers.py
7919             anObj = self.BoolOp.MakeCutList(theMainShape, theShapesList, checkSelfInte)
7920             RaiseIfFailed("MakeCutList", self.BoolOp)
7921             self._autoPublish(anObj, theName, "cut")
7922             return anObj
7923
7924         # end of l3_boolean
7925         ## @}
7926
7927         ## @addtogroup l3_basic_op
7928         ## @{
7929
7930         ## Perform partition operation.
7931         #  @param ListShapes Shapes to be intersected.
7932         #  @param ListTools Shapes to intersect theShapes.
7933         #  @param Limit Type of resulting shapes (see ShapeType()).\n
7934         #         If this parameter is set to -1 ("Auto"), most appropriate shape limit
7935         #         type will be detected automatically.
7936         #  @param KeepNonlimitShapes if this parameter == 0, then only shapes of
7937         #                             target type (equal to Limit) are kept in the result,
7938         #                             else standalone shapes of lower dimension
7939         #                             are kept also (if they exist).
7940         #
7941         #  @param theName Object name; when specified, this parameter is used
7942         #         for result publication in the study. Otherwise, if automatic
7943         #         publication is switched on, default value is used for result name.
7944         #
7945         #  @note Each compound from ListShapes and ListTools will be exploded
7946         #        in order to avoid possible intersection between shapes from this compound.
7947         #
7948         #  After implementation new version of PartitionAlgo (October 2006)
7949         #  other parameters are ignored by current functionality. They are kept
7950         #  in this function only for support old versions.
7951         #      @param ListKeepInside Shapes, outside which the results will be deleted.
7952         #         Each shape from theKeepInside must belong to theShapes also.
7953         #      @param ListRemoveInside Shapes, inside which the results will be deleted.
7954         #         Each shape from theRemoveInside must belong to theShapes also.
7955         #      @param RemoveWebs If TRUE, perform Glue 3D algorithm.
7956         #      @param ListMaterials Material indices for each shape. Make sence,
7957         #         only if theRemoveWebs is TRUE.
7958         #
7959         #  @return New GEOM.GEOM_Object, containing the result shapes.
7960         #
7961         #  @ref tui_partition "Example"
7962         @ManageTransactions("BoolOp")
7963         def MakePartition(self, ListShapes, ListTools=[], ListKeepInside=[], ListRemoveInside=[],
7964                           Limit=ShapeType["AUTO"], RemoveWebs=0, ListMaterials=[],
7965                           KeepNonlimitShapes=0, theName=None):
7966             """
7967             Perform partition operation.
7968
7969             Parameters:
7970                 ListShapes Shapes to be intersected.
7971                 ListTools Shapes to intersect theShapes.
7972                 Limit Type of resulting shapes (see geompy.ShapeType)
7973                       If this parameter is set to -1 ("Auto"), most appropriate shape limit
7974                       type will be detected automatically.
7975                 KeepNonlimitShapes if this parameter == 0, then only shapes of
7976                                     target type (equal to Limit) are kept in the result,
7977                                     else standalone shapes of lower dimension
7978                                     are kept also (if they exist).
7979
7980                 theName Object name; when specified, this parameter is used
7981                         for result publication in the study. Otherwise, if automatic
7982                         publication is switched on, default value is used for result name.
7983             Note:
7984                     Each compound from ListShapes and ListTools will be exploded
7985                     in order to avoid possible intersection between shapes from
7986                     this compound.
7987
7988             After implementation new version of PartitionAlgo (October 2006) other
7989             parameters are ignored by current functionality. They are kept in this
7990             function only for support old versions.
7991
7992             Ignored parameters:
7993                 ListKeepInside Shapes, outside which the results will be deleted.
7994                                Each shape from theKeepInside must belong to theShapes also.
7995                 ListRemoveInside Shapes, inside which the results will be deleted.
7996                                  Each shape from theRemoveInside must belong to theShapes also.
7997                 RemoveWebs If TRUE, perform Glue 3D algorithm.
7998                 ListMaterials Material indices for each shape. Make sence, only if theRemoveWebs is TRUE.
7999
8000             Returns:
8001                 New GEOM.GEOM_Object, containing the result shapes.
8002             """
8003             # Example: see GEOM_TestAll.py
8004             if Limit == self.ShapeType["AUTO"]:
8005                 # automatic detection of the most appropriate shape limit type
8006                 lim = GEOM.SHAPE
8007                 for s in ListShapes: lim = min( lim, s.GetMaxShapeType() )
8008                 Limit = EnumToLong(lim)
8009                 pass
8010             anObj = self.BoolOp.MakePartition(ListShapes, ListTools,
8011                                               ListKeepInside, ListRemoveInside,
8012                                               Limit, RemoveWebs, ListMaterials,
8013                                               KeepNonlimitShapes);
8014             RaiseIfFailed("MakePartition", self.BoolOp)
8015             self._autoPublish(anObj, theName, "partition")
8016             return anObj
8017
8018         ## Perform partition operation.
8019         #  This method may be useful if it is needed to make a partition for
8020         #  compound contains nonintersected shapes. Performance will be better
8021         #  since intersection between shapes from compound is not performed.
8022         #
8023         #  Description of all parameters as in previous method MakePartition().
8024         #  One additional parameter is provided:
8025         #  @param checkSelfInte The flag that tells if the arguments should
8026         #         be checked for self-intersection prior to the operation.
8027         #
8028         #  @note This algorithm doesn't find all types of self-intersections.
8029         #        It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
8030         #        vertex/face and edge/face intersections. Face/face
8031         #        intersections detection is switched off as it is a
8032         #        time-consuming operation that gives an impact on performance.
8033         #        To find all self-intersections please use
8034         #        CheckSelfIntersections() method.
8035         #
8036         #  @note Passed compounds (via ListShapes or via ListTools)
8037         #           have to consist of nonintersecting shapes.
8038         #
8039         #  @return New GEOM.GEOM_Object, containing the result shapes.
8040         #
8041         #  @ref swig_todo "Example"
8042         @ManageTransactions("BoolOp")
8043         def MakePartitionNonSelfIntersectedShape(self, ListShapes, ListTools=[],
8044                                                  ListKeepInside=[], ListRemoveInside=[],
8045                                                  Limit=ShapeType["AUTO"], RemoveWebs=0,
8046                                                  ListMaterials=[], KeepNonlimitShapes=0,
8047                                                  checkSelfInte=False, theName=None):
8048             """
8049             Perform partition operation.
8050             This method may be useful if it is needed to make a partition for
8051             compound contains nonintersected shapes. Performance will be better
8052             since intersection between shapes from compound is not performed.
8053
8054             Parameters:
8055                 Description of all parameters as in method geompy.MakePartition.
8056                 One additional parameter is provided:
8057                 checkSelfInte The flag that tells if the arguments should
8058                               be checked for self-intersection prior to
8059                               the operation.
8060
8061             Note:
8062                     This algorithm doesn't find all types of self-intersections.
8063                     It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
8064                     vertex/face and edge/face intersections. Face/face
8065                     intersections detection is switched off as it is a
8066                     time-consuming operation that gives an impact on performance.
8067                     To find all self-intersections please use
8068                     CheckSelfIntersections() method.
8069
8070             NOTE:
8071                 Passed compounds (via ListShapes or via ListTools)
8072                 have to consist of nonintersecting shapes.
8073
8074             Returns:
8075                 New GEOM.GEOM_Object, containing the result shapes.
8076             """
8077             if Limit == self.ShapeType["AUTO"]:
8078                 # automatic detection of the most appropriate shape limit type
8079                 lim = GEOM.SHAPE
8080                 for s in ListShapes: lim = min( lim, s.GetMaxShapeType() )
8081                 Limit = EnumToLong(lim)
8082                 pass
8083             anObj = self.BoolOp.MakePartitionNonSelfIntersectedShape(ListShapes, ListTools,
8084                                                                      ListKeepInside, ListRemoveInside,
8085                                                                      Limit, RemoveWebs, ListMaterials,
8086                                                                      KeepNonlimitShapes, checkSelfInte);
8087             RaiseIfFailed("MakePartitionNonSelfIntersectedShape", self.BoolOp)
8088             self._autoPublish(anObj, theName, "partition")
8089             return anObj
8090
8091         ## See method MakePartition() for more information.
8092         #
8093         #  @ref tui_partition "Example 1"
8094         #  \n @ref swig_Partition "Example 2"
8095         def Partition(self, ListShapes, ListTools=[], ListKeepInside=[], ListRemoveInside=[],
8096                       Limit=ShapeType["AUTO"], RemoveWebs=0, ListMaterials=[],
8097                       KeepNonlimitShapes=0, theName=None):
8098             """
8099             See method geompy.MakePartition for more information.
8100             """
8101             # Example: see GEOM_TestOthers.py
8102             # note: auto-publishing is done in self.MakePartition()
8103             anObj = self.MakePartition(ListShapes, ListTools,
8104                                        ListKeepInside, ListRemoveInside,
8105                                        Limit, RemoveWebs, ListMaterials,
8106                                        KeepNonlimitShapes, theName);
8107             return anObj
8108
8109         ## Perform partition of the Shape with the Plane
8110         #  @param theShape Shape to be intersected.
8111         #  @param thePlane Tool shape, to intersect theShape.
8112         #  @param theName Object name; when specified, this parameter is used
8113         #         for result publication in the study. Otherwise, if automatic
8114         #         publication is switched on, default value is used for result name.
8115         #
8116         #  @return New GEOM.GEOM_Object, containing the result shape.
8117         #
8118         #  @note This operation is a shortcut to the more general @ref MakePartition
8119         #  operation, where @a theShape specifies single "object" (shape being partitioned)
8120         #  and @a thePlane specifies single "tool" (intersector shape). Other parameters of
8121         #  @ref MakePartition operation have default values:
8122         #  - @a Limit: GEOM::SHAPE (shape limit corresponds to the type of @a theShape)
8123         #  - @a KeepNonlimitShapes: 0
8124         #  - @a KeepInside, @a RemoveInside, @a RemoveWebs,
8125         #    @a Materials (obsolete parameters): empty
8126         #
8127         #  @note I.e. the following two operations are equivalent:
8128         #  @code
8129         #  Result = geompy.MakeHalfPartition(Object, Plane)
8130         #  Result = geompy.MakePartition([Object], [Plane])
8131         #  @endcode
8132         #
8133         #  @sa MakePartition, MakePartitionNonSelfIntersectedShape
8134         #
8135         #  @ref tui_partition "Example"
8136         @ManageTransactions("BoolOp")
8137         def MakeHalfPartition(self, theShape, thePlane, theName=None):
8138             """
8139             Perform partition of the Shape with the Plane
8140
8141             Parameters:
8142                 theShape Shape to be intersected.
8143                 thePlane Tool shape, to intersect theShape.
8144                 theName Object name; when specified, this parameter is used
8145                         for result publication in the study. Otherwise, if automatic
8146                         publication is switched on, default value is used for result name.
8147
8148             Returns:
8149                 New GEOM.GEOM_Object, containing the result shape.
8150          
8151             Note: This operation is a shortcut to the more general MakePartition
8152             operation, where theShape specifies single "object" (shape being partitioned)
8153             and thePlane specifies single "tool" (intersector shape). Other parameters of
8154             MakePartition operation have default values:
8155             - Limit: GEOM::SHAPE (shape limit corresponds to the type of theShape)
8156             - KeepNonlimitShapes: 0
8157             - KeepInside, RemoveInside, RemoveWebs, Materials (obsolete parameters): empty
8158          
8159             I.e. the following two operations are equivalent:
8160               Result = geompy.MakeHalfPartition(Object, Plane)
8161               Result = geompy.MakePartition([Object], [Plane])
8162             """
8163             # Example: see GEOM_TestAll.py
8164             anObj = self.BoolOp.MakeHalfPartition(theShape, thePlane)
8165             RaiseIfFailed("MakeHalfPartition", self.BoolOp)
8166             self._autoPublish(anObj, theName, "partition")
8167             return anObj
8168
8169         # end of l3_basic_op
8170         ## @}
8171
8172         ## @addtogroup l3_transform
8173         ## @{
8174
8175         ## Translate the given object along the vector, specified
8176         #  by its end points.
8177         #  @param theObject The object to be translated.
8178         #  @param thePoint1 Start point of translation vector.
8179         #  @param thePoint2 End point of translation vector.
8180         #  @param theCopy Flag used to translate object itself or create a copy.
8181         #  @return Translated @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
8182         #  new GEOM.GEOM_Object, containing the translated object if @a theCopy flag is @c True.
8183         @ManageTransactions("TrsfOp")
8184         def TranslateTwoPoints(self, theObject, thePoint1, thePoint2, theCopy=False):
8185             """
8186             Translate the given object along the vector, specified by its end points.
8187
8188             Parameters:
8189                 theObject The object to be translated.
8190                 thePoint1 Start point of translation vector.
8191                 thePoint2 End point of translation vector.
8192                 theCopy Flag used to translate object itself or create a copy.
8193
8194             Returns:
8195                 Translated theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
8196                 new GEOM.GEOM_Object, containing the translated object if theCopy flag is True.
8197             """
8198             if theCopy:
8199                 anObj = self.TrsfOp.TranslateTwoPointsCopy(theObject, thePoint1, thePoint2)
8200             else:
8201                 anObj = self.TrsfOp.TranslateTwoPoints(theObject, thePoint1, thePoint2)
8202             RaiseIfFailed("TranslateTwoPoints", self.TrsfOp)
8203             return anObj
8204
8205         ## Translate the given object along the vector, specified
8206         #  by its end points, creating its copy before the translation.
8207         #  @param theObject The object to be translated.
8208         #  @param thePoint1 Start point of translation vector.
8209         #  @param thePoint2 End point of translation vector.
8210         #  @param theName Object name; when specified, this parameter is used
8211         #         for result publication in the study. Otherwise, if automatic
8212         #         publication is switched on, default value is used for result name.
8213         #
8214         #  @return New GEOM.GEOM_Object, containing the translated object.
8215         #
8216         #  @ref tui_translation "Example 1"
8217         #  \n @ref swig_MakeTranslationTwoPoints "Example 2"
8218         @ManageTransactions("TrsfOp")
8219         def MakeTranslationTwoPoints(self, theObject, thePoint1, thePoint2, theName=None):
8220             """
8221             Translate the given object along the vector, specified
8222             by its end points, creating its copy before the translation.
8223
8224             Parameters:
8225                 theObject The object to be translated.
8226                 thePoint1 Start point of translation vector.
8227                 thePoint2 End point of translation vector.
8228                 theName Object name; when specified, this parameter is used
8229                         for result publication in the study. Otherwise, if automatic
8230                         publication is switched on, default value is used for result name.
8231
8232             Returns:
8233                 New GEOM.GEOM_Object, containing the translated object.
8234             """
8235             # Example: see GEOM_TestAll.py
8236             anObj = self.TrsfOp.TranslateTwoPointsCopy(theObject, thePoint1, thePoint2)
8237             RaiseIfFailed("TranslateTwoPointsCopy", self.TrsfOp)
8238             self._autoPublish(anObj, theName, "translated")
8239             return anObj
8240
8241         ## Translate the given object along the vector, specified by its components.
8242         #  @param theObject The object to be translated.
8243         #  @param theDX,theDY,theDZ Components of translation vector.
8244         #  @param theCopy Flag used to translate object itself or create a copy.
8245         #  @return Translated @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
8246         #  new GEOM.GEOM_Object, containing the translated object if @a theCopy flag is @c True.
8247         #
8248         #  @ref tui_translation "Example"
8249         @ManageTransactions("TrsfOp")
8250         def TranslateDXDYDZ(self, theObject, theDX, theDY, theDZ, theCopy=False):
8251             """
8252             Translate the given object along the vector, specified by its components.
8253
8254             Parameters:
8255                 theObject The object to be translated.
8256                 theDX,theDY,theDZ Components of translation vector.
8257                 theCopy Flag used to translate object itself or create a copy.
8258
8259             Returns:
8260                 Translated theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
8261                 new GEOM.GEOM_Object, containing the translated object if theCopy flag is True.
8262             """
8263             # Example: see GEOM_TestAll.py
8264             theDX, theDY, theDZ, Parameters = ParseParameters(theDX, theDY, theDZ)
8265             if theCopy:
8266                 anObj = self.TrsfOp.TranslateDXDYDZCopy(theObject, theDX, theDY, theDZ)
8267             else:
8268                 anObj = self.TrsfOp.TranslateDXDYDZ(theObject, theDX, theDY, theDZ)
8269             anObj.SetParameters(Parameters)
8270             RaiseIfFailed("TranslateDXDYDZ", self.TrsfOp)
8271             return anObj
8272
8273         ## Translate the given object along the vector, specified
8274         #  by its components, creating its copy before the translation.
8275         #  @param theObject The object to be translated.
8276         #  @param theDX,theDY,theDZ Components of translation vector.
8277         #  @param theName Object name; when specified, this parameter is used
8278         #         for result publication in the study. Otherwise, if automatic
8279         #         publication is switched on, default value is used for result name.
8280         #
8281         #  @return New GEOM.GEOM_Object, containing the translated object.
8282         #
8283         #  @ref tui_translation "Example"
8284         @ManageTransactions("TrsfOp")
8285         def MakeTranslation(self,theObject, theDX, theDY, theDZ, theName=None):
8286             """
8287             Translate the given object along the vector, specified
8288             by its components, creating its copy before the translation.
8289
8290             Parameters:
8291                 theObject The object to be translated.
8292                 theDX,theDY,theDZ Components of translation vector.
8293                 theName Object name; when specified, this parameter is used
8294                         for result publication in the study. Otherwise, if automatic
8295                         publication is switched on, default value is used for result name.
8296
8297             Returns:
8298                 New GEOM.GEOM_Object, containing the translated object.
8299             """
8300             # Example: see GEOM_TestAll.py
8301             theDX, theDY, theDZ, Parameters = ParseParameters(theDX, theDY, theDZ)
8302             anObj = self.TrsfOp.TranslateDXDYDZCopy(theObject, theDX, theDY, theDZ)
8303             anObj.SetParameters(Parameters)
8304             RaiseIfFailed("TranslateDXDYDZ", self.TrsfOp)
8305             self._autoPublish(anObj, theName, "translated")
8306             return anObj
8307
8308         ## Translate the given object along the given vector.
8309         #  @param theObject The object to be translated.
8310         #  @param theVector The translation vector.
8311         #  @param theCopy Flag used to translate object itself or create a copy.
8312         #  @return Translated @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
8313         #  new GEOM.GEOM_Object, containing the translated object if @a theCopy flag is @c True.
8314         @ManageTransactions("TrsfOp")
8315         def TranslateVector(self, theObject, theVector, theCopy=False):
8316             """
8317             Translate the given object along the given vector.
8318
8319             Parameters:
8320                 theObject The object to be translated.
8321                 theVector The translation vector.
8322                 theCopy Flag used to translate object itself or create a copy.
8323
8324             Returns:
8325                 Translated theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
8326                 new GEOM.GEOM_Object, containing the translated object if theCopy flag is True.
8327             """
8328             if theCopy:
8329                 anObj = self.TrsfOp.TranslateVectorCopy(theObject, theVector)
8330             else:
8331                 anObj = self.TrsfOp.TranslateVector(theObject, theVector)
8332             RaiseIfFailed("TranslateVector", self.TrsfOp)
8333             return anObj
8334
8335         ## Translate the given object along the given vector,
8336         #  creating its copy before the translation.
8337         #  @param theObject The object to be translated.
8338         #  @param theVector The translation vector.
8339         #  @param theName Object name; when specified, this parameter is used
8340         #         for result publication in the study. Otherwise, if automatic
8341         #         publication is switched on, default value is used for result name.
8342         #
8343         #  @return New GEOM.GEOM_Object, containing the translated object.
8344         #
8345         #  @ref tui_translation "Example"
8346         @ManageTransactions("TrsfOp")
8347         def MakeTranslationVector(self, theObject, theVector, theName=None):
8348             """
8349             Translate the given object along the given vector,
8350             creating its copy before the translation.
8351
8352             Parameters:
8353                 theObject The object to be translated.
8354                 theVector The translation vector.
8355                 theName Object name; when specified, this parameter is used
8356                         for result publication in the study. Otherwise, if automatic
8357                         publication is switched on, default value is used for result name.
8358
8359             Returns:
8360                 New GEOM.GEOM_Object, containing the translated object.
8361             """
8362             # Example: see GEOM_TestAll.py
8363             anObj = self.TrsfOp.TranslateVectorCopy(theObject, theVector)
8364             RaiseIfFailed("TranslateVectorCopy", self.TrsfOp)
8365             self._autoPublish(anObj, theName, "translated")
8366             return anObj
8367
8368         ## Translate the given object along the given vector on given distance.
8369         #  @param theObject The object to be translated.
8370         #  @param theVector The translation vector.
8371         #  @param theDistance The translation distance.
8372         #  @param theCopy Flag used to translate object itself or create a copy.
8373         #  @return Translated @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
8374         #  new GEOM.GEOM_Object, containing the translated object if @a theCopy flag is @c True.
8375         #
8376         #  @ref tui_translation "Example"
8377         @ManageTransactions("TrsfOp")
8378         def TranslateVectorDistance(self, theObject, theVector, theDistance, theCopy=False):
8379             """
8380             Translate the given object along the given vector on given distance.
8381
8382             Parameters:
8383                 theObject The object to be translated.
8384                 theVector The translation vector.
8385                 theDistance The translation distance.
8386                 theCopy Flag used to translate object itself or create a copy.
8387
8388             Returns:
8389                 Translated theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
8390                 new GEOM.GEOM_Object, containing the translated object if theCopy flag is True.
8391             """
8392             # Example: see GEOM_TestAll.py
8393             theDistance,Parameters = ParseParameters(theDistance)
8394             anObj = self.TrsfOp.TranslateVectorDistance(theObject, theVector, theDistance, theCopy)
8395             RaiseIfFailed("TranslateVectorDistance", self.TrsfOp)
8396             anObj.SetParameters(Parameters)
8397             return anObj
8398
8399         ## Translate the given object along the given vector on given distance,
8400         #  creating its copy before the translation.
8401         #  @param theObject The object to be translated.
8402         #  @param theVector The translation vector.
8403         #  @param theDistance The translation distance.
8404         #  @param theName Object name; when specified, this parameter is used
8405         #         for result publication in the study. Otherwise, if automatic
8406         #         publication is switched on, default value is used for result name.
8407         #
8408         #  @return New GEOM.GEOM_Object, containing the translated object.
8409         #
8410         #  @ref tui_translation "Example"
8411         @ManageTransactions("TrsfOp")
8412         def MakeTranslationVectorDistance(self, theObject, theVector, theDistance, theName=None):
8413             """
8414             Translate the given object along the given vector on given distance,
8415             creating its copy before the translation.
8416
8417             Parameters:
8418                 theObject The object to be translated.
8419                 theVector The translation vector.
8420                 theDistance The translation distance.
8421                 theName Object name; when specified, this parameter is used
8422                         for result publication in the study. Otherwise, if automatic
8423                         publication is switched on, default value is used for result name.
8424
8425             Returns:
8426                 New GEOM.GEOM_Object, containing the translated object.
8427             """
8428             # Example: see GEOM_TestAll.py
8429             theDistance,Parameters = ParseParameters(theDistance)
8430             anObj = self.TrsfOp.TranslateVectorDistance(theObject, theVector, theDistance, 1)
8431             RaiseIfFailed("TranslateVectorDistance", self.TrsfOp)
8432             anObj.SetParameters(Parameters)
8433             self._autoPublish(anObj, theName, "translated")
8434             return anObj
8435
8436         ## Rotate the given object around the given axis on the given angle.
8437         #  @param theObject The object to be rotated.
8438         #  @param theAxis Rotation axis.
8439         #  @param theAngle Rotation angle in radians.
8440         #  @param theCopy Flag used to rotate object itself or create a copy.
8441         #
8442         #  @return Rotated @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
8443         #  new GEOM.GEOM_Object, containing the rotated object if @a theCopy flag is @c True.
8444         #
8445         #  @ref tui_rotation "Example"
8446         @ManageTransactions("TrsfOp")
8447         def Rotate(self, theObject, theAxis, theAngle, theCopy=False):
8448             """
8449             Rotate the given object around the given axis on the given angle.
8450
8451             Parameters:
8452                 theObject The object to be rotated.
8453                 theAxis Rotation axis.
8454                 theAngle Rotation angle in radians.
8455                 theCopy Flag used to rotate object itself or create a copy.
8456
8457             Returns:
8458                 Rotated theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
8459                 new GEOM.GEOM_Object, containing the rotated object if theCopy flag is True.
8460             """
8461             # Example: see GEOM_TestAll.py
8462             flag = False
8463             if isinstance(theAngle,str):
8464                 flag = True
8465             theAngle, Parameters = ParseParameters(theAngle)
8466             if flag:
8467                 theAngle = theAngle*math.pi/180.0
8468             if theCopy:
8469                 anObj = self.TrsfOp.RotateCopy(theObject, theAxis, theAngle)
8470             else:
8471                 anObj = self.TrsfOp.Rotate(theObject, theAxis, theAngle)
8472             RaiseIfFailed("Rotate", self.TrsfOp)
8473             anObj.SetParameters(Parameters)
8474             return anObj
8475
8476         ## Rotate the given object around the given axis
8477         #  on the given angle, creating its copy before the rotation.
8478         #  @param theObject The object to be rotated.
8479         #  @param theAxis Rotation axis.
8480         #  @param theAngle Rotation angle in radians.
8481         #  @param theName Object name; when specified, this parameter is used
8482         #         for result publication in the study. Otherwise, if automatic
8483         #         publication is switched on, default value is used for result name.
8484         #
8485         #  @return New GEOM.GEOM_Object, containing the rotated object.
8486         #
8487         #  @ref tui_rotation "Example"
8488         @ManageTransactions("TrsfOp")
8489         def MakeRotation(self, theObject, theAxis, theAngle, theName=None):
8490             """
8491             Rotate the given object around the given axis
8492             on the given angle, creating its copy before the rotatation.
8493
8494             Parameters:
8495                 theObject The object to be rotated.
8496                 theAxis Rotation axis.
8497                 theAngle Rotation angle in radians.
8498                 theName Object name; when specified, this parameter is used
8499                         for result publication in the study. Otherwise, if automatic
8500                         publication is switched on, default value is used for result name.
8501
8502             Returns:
8503                 New GEOM.GEOM_Object, containing the rotated object.
8504             """
8505             # Example: see GEOM_TestAll.py
8506             flag = False
8507             if isinstance(theAngle,str):
8508                 flag = True
8509             theAngle, Parameters = ParseParameters(theAngle)
8510             if flag:
8511                 theAngle = theAngle*math.pi/180.0
8512             anObj = self.TrsfOp.RotateCopy(theObject, theAxis, theAngle)
8513             RaiseIfFailed("RotateCopy", self.TrsfOp)
8514             anObj.SetParameters(Parameters)
8515             self._autoPublish(anObj, theName, "rotated")
8516             return anObj
8517
8518         ## Rotate given object around vector perpendicular to plane
8519         #  containing three points.
8520         #  @param theObject The object to be rotated.
8521         #  @param theCentPoint central point the axis is the vector perpendicular to the plane
8522         #  containing the three points.
8523         #  @param thePoint1,thePoint2 points in a perpendicular plane of the axis.
8524         #  @param theCopy Flag used to rotate object itself or create a copy.
8525         #  @return Rotated @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
8526         #  new GEOM.GEOM_Object, containing the rotated object if @a theCopy flag is @c True.
8527         @ManageTransactions("TrsfOp")
8528         def RotateThreePoints(self, theObject, theCentPoint, thePoint1, thePoint2, theCopy=False):
8529             """
8530             Rotate given object around vector perpendicular to plane
8531             containing three points.
8532
8533             Parameters:
8534                 theObject The object to be rotated.
8535                 theCentPoint central point  the axis is the vector perpendicular to the plane
8536                              containing the three points.
8537                 thePoint1,thePoint2 points in a perpendicular plane of the axis.
8538                 theCopy Flag used to rotate object itself or create a copy.
8539
8540             Returns:
8541                 Rotated theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
8542                 new GEOM.GEOM_Object, containing the rotated object if theCopy flag is True.
8543             """
8544             if theCopy:
8545                 anObj = self.TrsfOp.RotateThreePointsCopy(theObject, theCentPoint, thePoint1, thePoint2)
8546             else:
8547                 anObj = self.TrsfOp.RotateThreePoints(theObject, theCentPoint, thePoint1, thePoint2)
8548             RaiseIfFailed("RotateThreePoints", self.TrsfOp)
8549             return anObj
8550
8551         ## Rotate given object around vector perpendicular to plane
8552         #  containing three points, creating its copy before the rotatation.
8553         #  @param theObject The object to be rotated.
8554         #  @param theCentPoint central point the axis is the vector perpendicular to the plane
8555         #  containing the three points.
8556         #  @param thePoint1,thePoint2 in a perpendicular plane of the axis.
8557         #  @param theName Object name; when specified, this parameter is used
8558         #         for result publication in the study. Otherwise, if automatic
8559         #         publication is switched on, default value is used for result name.
8560         #
8561         #  @return New GEOM.GEOM_Object, containing the rotated object.
8562         #
8563         #  @ref tui_rotation "Example"
8564         @ManageTransactions("TrsfOp")
8565         def MakeRotationThreePoints(self, theObject, theCentPoint, thePoint1, thePoint2, theName=None):
8566             """
8567             Rotate given object around vector perpendicular to plane
8568             containing three points, creating its copy before the rotatation.
8569
8570             Parameters:
8571                 theObject The object to be rotated.
8572                 theCentPoint central point  the axis is the vector perpendicular to the plane
8573                              containing the three points.
8574                 thePoint1,thePoint2  in a perpendicular plane of the axis.
8575                 theName Object name; when specified, this parameter is used
8576                         for result publication in the study. Otherwise, if automatic
8577                         publication is switched on, default value is used for result name.
8578
8579             Returns:
8580                 New GEOM.GEOM_Object, containing the rotated object.
8581             """
8582             # Example: see GEOM_TestAll.py
8583             anObj = self.TrsfOp.RotateThreePointsCopy(theObject, theCentPoint, thePoint1, thePoint2)
8584             RaiseIfFailed("RotateThreePointsCopy", self.TrsfOp)
8585             self._autoPublish(anObj, theName, "rotated")
8586             return anObj
8587
8588         ## Scale the given object by the specified factor.
8589         #  @param theObject The object to be scaled.
8590         #  @param thePoint Center point for scaling.
8591         #                  Passing None for it means scaling relatively the origin of global CS.
8592         #  @param theFactor Scaling factor value.
8593         #  @param theCopy Flag used to scale object itself or create a copy.
8594         #  @return Scaled @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
8595         #  new GEOM.GEOM_Object, containing the scaled object if @a theCopy flag is @c True.
8596         @ManageTransactions("TrsfOp")
8597         def Scale(self, theObject, thePoint, theFactor, theCopy=False):
8598             """
8599             Scale the given object by the specified factor.
8600
8601             Parameters:
8602                 theObject The object to be scaled.
8603                 thePoint Center point for scaling.
8604                          Passing None for it means scaling relatively the origin of global CS.
8605                 theFactor Scaling factor value.
8606                 theCopy Flag used to scale object itself or create a copy.
8607
8608             Returns:
8609                 Scaled theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
8610                 new GEOM.GEOM_Object, containing the scaled object if theCopy flag is True.
8611             """
8612             # Example: see GEOM_TestAll.py
8613             theFactor, Parameters = ParseParameters(theFactor)
8614             if theCopy:
8615                 anObj = self.TrsfOp.ScaleShapeCopy(theObject, thePoint, theFactor)
8616             else:
8617                 anObj = self.TrsfOp.ScaleShape(theObject, thePoint, theFactor)
8618             RaiseIfFailed("Scale", self.TrsfOp)
8619             anObj.SetParameters(Parameters)
8620             return anObj
8621
8622         ## Scale the given object by the factor, creating its copy before the scaling.
8623         #  @param theObject The object to be scaled.
8624         #  @param thePoint Center point for scaling.
8625         #                  Passing None for it means scaling relatively the origin of global CS.
8626         #  @param theFactor Scaling factor value.
8627         #  @param theName Object name; when specified, this parameter is used
8628         #         for result publication in the study. Otherwise, if automatic
8629         #         publication is switched on, default value is used for result name.
8630         #
8631         #  @return New GEOM.GEOM_Object, containing the scaled shape.
8632         #
8633         #  @ref tui_scale "Example"
8634         @ManageTransactions("TrsfOp")
8635         def MakeScaleTransform(self, theObject, thePoint, theFactor, theName=None):
8636             """
8637             Scale the given object by the factor, creating its copy before the scaling.
8638
8639             Parameters:
8640                 theObject The object to be scaled.
8641                 thePoint Center point for scaling.
8642                          Passing None for it means scaling relatively the origin of global CS.
8643                 theFactor Scaling factor value.
8644                 theName Object name; when specified, this parameter is used
8645                         for result publication in the study. Otherwise, if automatic
8646                         publication is switched on, default value is used for result name.
8647
8648             Returns:
8649                 New GEOM.GEOM_Object, containing the scaled shape.
8650             """
8651             # Example: see GEOM_TestAll.py
8652             theFactor, Parameters = ParseParameters(theFactor)
8653             anObj = self.TrsfOp.ScaleShapeCopy(theObject, thePoint, theFactor)
8654             RaiseIfFailed("ScaleShapeCopy", self.TrsfOp)
8655             anObj.SetParameters(Parameters)
8656             self._autoPublish(anObj, theName, "scaled")
8657             return anObj
8658
8659         ## Scale the given object by different factors along coordinate axes.
8660         #  @param theObject The object to be scaled.
8661         #  @param thePoint Center point for scaling.
8662         #                  Passing None for it means scaling relatively the origin of global CS.
8663         #  @param theFactorX,theFactorY,theFactorZ Scaling factors along each axis.
8664         #  @param theCopy Flag used to scale object itself or create a copy.
8665         #  @return Scaled @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
8666         #  new GEOM.GEOM_Object, containing the scaled object if @a theCopy flag is @c True.
8667         @ManageTransactions("TrsfOp")
8668         def ScaleAlongAxes(self, theObject, thePoint, theFactorX, theFactorY, theFactorZ, theCopy=False):
8669             """
8670             Scale the given object by different factors along coordinate axes.
8671
8672             Parameters:
8673                 theObject The object to be scaled.
8674                 thePoint Center point for scaling.
8675                             Passing None for it means scaling relatively the origin of global CS.
8676                 theFactorX,theFactorY,theFactorZ Scaling factors along each axis.
8677                 theCopy Flag used to scale object itself or create a copy.
8678
8679             Returns:
8680                 Scaled theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
8681                 new GEOM.GEOM_Object, containing the scaled object if theCopy flag is True.
8682             """
8683             # Example: see GEOM_TestAll.py
8684             theFactorX, theFactorY, theFactorZ, Parameters = ParseParameters(theFactorX, theFactorY, theFactorZ)
8685             if theCopy:
8686                 anObj = self.TrsfOp.ScaleShapeAlongAxesCopy(theObject, thePoint,
8687                                                             theFactorX, theFactorY, theFactorZ)
8688             else:
8689                 anObj = self.TrsfOp.ScaleShapeAlongAxes(theObject, thePoint,
8690                                                         theFactorX, theFactorY, theFactorZ)
8691             RaiseIfFailed("ScaleAlongAxes", self.TrsfOp)
8692             anObj.SetParameters(Parameters)
8693             return anObj
8694
8695         ## Scale the given object by different factors along coordinate axes,
8696         #  creating its copy before the scaling.
8697         #  @param theObject The object to be scaled.
8698         #  @param thePoint Center point for scaling.
8699         #                  Passing None for it means scaling relatively the origin of global CS.
8700         #  @param theFactorX,theFactorY,theFactorZ Scaling factors along each axis.
8701         #  @param theName Object name; when specified, this parameter is used
8702         #         for result publication in the study. Otherwise, if automatic
8703         #         publication is switched on, default value is used for result name.
8704         #
8705         #  @return New GEOM.GEOM_Object, containing the scaled shape.
8706         #
8707         #  @ref swig_scale "Example"
8708         @ManageTransactions("TrsfOp")
8709         def MakeScaleAlongAxes(self, theObject, thePoint, theFactorX, theFactorY, theFactorZ, theName=None):
8710             """
8711             Scale the given object by different factors along coordinate axes,
8712             creating its copy before the scaling.
8713
8714             Parameters:
8715                 theObject The object to be scaled.
8716                 thePoint Center point for scaling.
8717                             Passing None for it means scaling relatively the origin of global CS.
8718                 theFactorX,theFactorY,theFactorZ Scaling factors along each axis.
8719                 theName Object name; when specified, this parameter is used
8720                         for result publication in the study. Otherwise, if automatic
8721                         publication is switched on, default value is used for result name.
8722
8723             Returns:
8724                 New GEOM.GEOM_Object, containing the scaled shape.
8725             """
8726             # Example: see GEOM_TestAll.py
8727             theFactorX, theFactorY, theFactorZ, Parameters = ParseParameters(theFactorX, theFactorY, theFactorZ)
8728             anObj = self.TrsfOp.ScaleShapeAlongAxesCopy(theObject, thePoint,
8729                                                         theFactorX, theFactorY, theFactorZ)
8730             RaiseIfFailed("MakeScaleAlongAxes", self.TrsfOp)
8731             anObj.SetParameters(Parameters)
8732             self._autoPublish(anObj, theName, "scaled")
8733             return anObj
8734
8735         ## Mirror an object relatively the given plane.
8736         #  @param theObject The object to be mirrored.
8737         #  @param thePlane Plane of symmetry.
8738         #  @param theCopy Flag used to mirror object itself or create a copy.
8739         #  @return Mirrored @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
8740         #  new GEOM.GEOM_Object, containing the mirrored object if @a theCopy flag is @c True.
8741         @ManageTransactions("TrsfOp")
8742         def MirrorByPlane(self, theObject, thePlane, theCopy=False):
8743             """
8744             Mirror an object relatively the given plane.
8745
8746             Parameters:
8747                 theObject The object to be mirrored.
8748                 thePlane Plane of symmetry.
8749                 theCopy Flag used to mirror object itself or create a copy.
8750
8751             Returns:
8752                 Mirrored theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
8753                 new GEOM.GEOM_Object, containing the mirrored object if theCopy flag is True.
8754             """
8755             if theCopy:
8756                 anObj = self.TrsfOp.MirrorPlaneCopy(theObject, thePlane)
8757             else:
8758                 anObj = self.TrsfOp.MirrorPlane(theObject, thePlane)
8759             RaiseIfFailed("MirrorByPlane", self.TrsfOp)
8760             return anObj
8761
8762         ## Create an object, symmetrical
8763         #  to the given one relatively the given plane.
8764         #  @param theObject The object to be mirrored.
8765         #  @param thePlane Plane of symmetry.
8766         #  @param theName Object name; when specified, this parameter is used
8767         #         for result publication in the study. Otherwise, if automatic
8768         #         publication is switched on, default value is used for result name.
8769         #
8770         #  @return New GEOM.GEOM_Object, containing the mirrored shape.
8771         #
8772         #  @ref tui_mirror "Example"
8773         @ManageTransactions("TrsfOp")
8774         def MakeMirrorByPlane(self, theObject, thePlane, theName=None):
8775             """
8776             Create an object, symmetrical to the given one relatively the given plane.
8777
8778             Parameters:
8779                 theObject The object to be mirrored.
8780                 thePlane Plane of symmetry.
8781                 theName Object name; when specified, this parameter is used
8782                         for result publication in the study. Otherwise, if automatic
8783                         publication is switched on, default value is used for result name.
8784
8785             Returns:
8786                 New GEOM.GEOM_Object, containing the mirrored shape.
8787             """
8788             # Example: see GEOM_TestAll.py
8789             anObj = self.TrsfOp.MirrorPlaneCopy(theObject, thePlane)
8790             RaiseIfFailed("MirrorPlaneCopy", self.TrsfOp)
8791             self._autoPublish(anObj, theName, "mirrored")
8792             return anObj
8793
8794         ## Mirror an object relatively the given axis.
8795         #  @param theObject The object to be mirrored.
8796         #  @param theAxis Axis of symmetry.
8797         #  @param theCopy Flag used to mirror object itself or create a copy.
8798         #  @return Mirrored @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
8799         #  new GEOM.GEOM_Object, containing the mirrored object if @a theCopy flag is @c True.
8800         @ManageTransactions("TrsfOp")
8801         def MirrorByAxis(self, theObject, theAxis, theCopy=False):
8802             """
8803             Mirror an object relatively the given axis.
8804
8805             Parameters:
8806                 theObject The object to be mirrored.
8807                 theAxis Axis of symmetry.
8808                 theCopy Flag used to mirror object itself or create a copy.
8809
8810             Returns:
8811                 Mirrored theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
8812                 new GEOM.GEOM_Object, containing the mirrored object if theCopy flag is True.
8813             """
8814             if theCopy:
8815                 anObj = self.TrsfOp.MirrorAxisCopy(theObject, theAxis)
8816             else:
8817                 anObj = self.TrsfOp.MirrorAxis(theObject, theAxis)
8818             RaiseIfFailed("MirrorByAxis", self.TrsfOp)
8819             return anObj
8820
8821         ## Create an object, symmetrical
8822         #  to the given one relatively the given axis.
8823         #  @param theObject The object to be mirrored.
8824         #  @param theAxis Axis of symmetry.
8825         #  @param theName Object name; when specified, this parameter is used
8826         #         for result publication in the study. Otherwise, if automatic
8827         #         publication is switched on, default value is used for result name.
8828         #
8829         #  @return New GEOM.GEOM_Object, containing the mirrored shape.
8830         #
8831         #  @ref tui_mirror "Example"
8832         @ManageTransactions("TrsfOp")
8833         def MakeMirrorByAxis(self, theObject, theAxis, theName=None):
8834             """
8835             Create an object, symmetrical to the given one relatively the given axis.
8836
8837             Parameters:
8838                 theObject The object to be mirrored.
8839                 theAxis Axis of symmetry.
8840                 theName Object name; when specified, this parameter is used
8841                         for result publication in the study. Otherwise, if automatic
8842                         publication is switched on, default value is used for result name.
8843
8844             Returns:
8845                 New GEOM.GEOM_Object, containing the mirrored shape.
8846             """
8847             # Example: see GEOM_TestAll.py
8848             anObj = self.TrsfOp.MirrorAxisCopy(theObject, theAxis)
8849             RaiseIfFailed("MirrorAxisCopy", self.TrsfOp)
8850             self._autoPublish(anObj, theName, "mirrored")
8851             return anObj
8852
8853         ## Mirror an object relatively the given point.
8854         #  @param theObject The object to be mirrored.
8855         #  @param thePoint Point of symmetry.
8856         #  @param theCopy Flag used to mirror object itself or create a copy.
8857         #  @return Mirrored @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
8858         #  new GEOM.GEOM_Object, containing the mirrored object if @a theCopy flag is @c True.
8859         @ManageTransactions("TrsfOp")
8860         def MirrorByPoint(self, theObject, thePoint, theCopy=False):
8861             """
8862             Mirror an object relatively the given point.
8863
8864             Parameters:
8865                 theObject The object to be mirrored.
8866                 thePoint Point of symmetry.
8867                 theCopy Flag used to mirror object itself or create a copy.
8868
8869             Returns:
8870                 Mirrored theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
8871                 new GEOM.GEOM_Object, containing the mirrored object if theCopy flag is True.
8872             """
8873             # Example: see GEOM_TestAll.py
8874             if theCopy:
8875                 anObj = self.TrsfOp.MirrorPointCopy(theObject, thePoint)
8876             else:
8877                 anObj = self.TrsfOp.MirrorPoint(theObject, thePoint)
8878             RaiseIfFailed("MirrorByPoint", self.TrsfOp)
8879             return anObj
8880
8881         ## Create an object, symmetrical
8882         #  to the given one relatively the given point.
8883         #  @param theObject The object to be mirrored.
8884         #  @param thePoint Point of symmetry.
8885         #  @param theName Object name; when specified, this parameter is used
8886         #         for result publication in the study. Otherwise, if automatic
8887         #         publication is switched on, default value is used for result name.
8888         #
8889         #  @return New GEOM.GEOM_Object, containing the mirrored shape.
8890         #
8891         #  @ref tui_mirror "Example"
8892         @ManageTransactions("TrsfOp")
8893         def MakeMirrorByPoint(self, theObject, thePoint, theName=None):
8894             """
8895             Create an object, symmetrical
8896             to the given one relatively the given point.
8897
8898             Parameters:
8899                 theObject The object to be mirrored.
8900                 thePoint Point of symmetry.
8901                 theName Object name; when specified, this parameter is used
8902                         for result publication in the study. Otherwise, if automatic
8903                         publication is switched on, default value is used for result name.
8904
8905             Returns:
8906                 New GEOM.GEOM_Object, containing the mirrored shape.
8907             """
8908             # Example: see GEOM_TestAll.py
8909             anObj = self.TrsfOp.MirrorPointCopy(theObject, thePoint)
8910             RaiseIfFailed("MirrorPointCopy", self.TrsfOp)
8911             self._autoPublish(anObj, theName, "mirrored")
8912             return anObj
8913
8914         ## Modify the location of the given object.
8915         #  @param theObject The object to be displaced.
8916         #  @param theStartLCS Coordinate system to perform displacement from it.\n
8917         #                     If \a theStartLCS is NULL, displacement
8918         #                     will be performed from global CS.\n
8919         #                     If \a theObject itself is used as \a theStartLCS,
8920         #                     its location will be changed to \a theEndLCS.
8921         #  @param theEndLCS Coordinate system to perform displacement to it.
8922         #  @param theCopy Flag used to displace object itself or create a copy.
8923         #  @return Displaced @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
8924         #  new GEOM.GEOM_Object, containing the displaced object if @a theCopy flag is @c True.
8925         @ManageTransactions("TrsfOp")
8926         def Position(self, theObject, theStartLCS, theEndLCS, theCopy=False):
8927             """
8928             Modify the Location of the given object by LCS, creating its copy before the setting.
8929
8930             Parameters:
8931                 theObject The object to be displaced.
8932                 theStartLCS Coordinate system to perform displacement from it.
8933                             If theStartLCS is NULL, displacement
8934                             will be performed from global CS.
8935                             If theObject itself is used as theStartLCS,
8936                             its location will be changed to theEndLCS.
8937                 theEndLCS Coordinate system to perform displacement to it.
8938                 theCopy Flag used to displace object itself or create a copy.
8939
8940             Returns:
8941                 Displaced theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
8942                 new GEOM.GEOM_Object, containing the displaced object if theCopy flag is True.
8943             """
8944             # Example: see GEOM_TestAll.py
8945             if theCopy:
8946                 anObj = self.TrsfOp.PositionShapeCopy(theObject, theStartLCS, theEndLCS)
8947             else:
8948                 anObj = self.TrsfOp.PositionShape(theObject, theStartLCS, theEndLCS)
8949             RaiseIfFailed("Displace", self.TrsfOp)
8950             return anObj
8951
8952         ## Modify the Location of the given object by LCS,
8953         #  creating its copy before the setting.
8954         #  @param theObject The object to be displaced.
8955         #  @param theStartLCS Coordinate system to perform displacement from it.\n
8956         #                     If \a theStartLCS is NULL, displacement
8957         #                     will be performed from global CS.\n
8958         #                     If \a theObject itself is used as \a theStartLCS,
8959         #                     its location will be changed to \a theEndLCS.
8960         #  @param theEndLCS Coordinate system to perform displacement to it.
8961         #  @param theName Object name; when specified, this parameter is used
8962         #         for result publication in the study. Otherwise, if automatic
8963         #         publication is switched on, default value is used for result name.
8964         #
8965         #  @return New GEOM.GEOM_Object, containing the displaced shape.
8966         #
8967         #  @ref tui_modify_location "Example"
8968         @ManageTransactions("TrsfOp")
8969         def MakePosition(self, theObject, theStartLCS, theEndLCS, theName=None):
8970             """
8971             Modify the Location of the given object by LCS, creating its copy before the setting.
8972
8973             Parameters:
8974                 theObject The object to be displaced.
8975                 theStartLCS Coordinate system to perform displacement from it.
8976                             If theStartLCS is NULL, displacement
8977                             will be performed from global CS.
8978                             If theObject itself is used as theStartLCS,
8979                             its location will be changed to theEndLCS.
8980                 theEndLCS Coordinate system to perform displacement to it.
8981                 theName Object name; when specified, this parameter is used
8982                         for result publication in the study. Otherwise, if automatic
8983                         publication is switched on, default value is used for result name.
8984
8985             Returns:
8986                 New GEOM.GEOM_Object, containing the displaced shape.
8987
8988             Example of usage:
8989                 # create local coordinate systems
8990                 cs1 = geompy.MakeMarker( 0, 0, 0, 1,0,0, 0,1,0)
8991                 cs2 = geompy.MakeMarker(30,40,40, 1,0,0, 0,1,0)
8992                 # modify the location of the given object
8993                 position = geompy.MakePosition(cylinder, cs1, cs2)
8994             """
8995             # Example: see GEOM_TestAll.py
8996             anObj = self.TrsfOp.PositionShapeCopy(theObject, theStartLCS, theEndLCS)
8997             RaiseIfFailed("PositionShapeCopy", self.TrsfOp)
8998             self._autoPublish(anObj, theName, "displaced")
8999             return anObj
9000
9001         ## Modify the Location of the given object by Path.
9002         #  @param  theObject The object to be displaced.
9003         #  @param  thePath Wire or Edge along that the object will be translated.
9004         #  @param  theDistance progress of Path (0 = start location, 1 = end of path location).
9005         #  @param  theCopy is to create a copy objects if true.
9006         #  @param  theReverse  0 - for usual direction, 1 - to reverse path direction.
9007         #  @return Displaced @a theObject (GEOM.GEOM_Object) if @a theCopy is @c False or
9008         #          new GEOM.GEOM_Object, containing the displaced shape if @a theCopy is @c True.
9009         #
9010         #  @ref tui_modify_location "Example"
9011         @ManageTransactions("TrsfOp")
9012         def PositionAlongPath(self,theObject, thePath, theDistance, theCopy, theReverse):
9013             """
9014             Modify the Location of the given object by Path.
9015
9016             Parameters:
9017                  theObject The object to be displaced.
9018                  thePath Wire or Edge along that the object will be translated.
9019                  theDistance progress of Path (0 = start location, 1 = end of path location).
9020                  theCopy is to create a copy objects if true.
9021                  theReverse  0 - for usual direction, 1 - to reverse path direction.
9022
9023             Returns:
9024                  Displaced theObject (GEOM.GEOM_Object) if theCopy is False or
9025                  new GEOM.GEOM_Object, containing the displaced shape if theCopy is True.
9026
9027             Example of usage:
9028                 position = geompy.PositionAlongPath(cylinder, circle, 0.75, 1, 1)
9029             """
9030             # Example: see GEOM_TestAll.py
9031             anObj = self.TrsfOp.PositionAlongPath(theObject, thePath, theDistance, theCopy, theReverse)
9032             RaiseIfFailed("PositionAlongPath", self.TrsfOp)
9033             return anObj
9034
9035         ## Modify the Location of the given object by Path, creating its copy before the operation.
9036         #  @param theObject The object to be displaced.
9037         #  @param thePath Wire or Edge along that the object will be translated.
9038         #  @param theDistance progress of Path (0 = start location, 1 = end of path location).
9039         #  @param theReverse  0 - for usual direction, 1 - to reverse path direction.
9040         #  @param theName Object name; when specified, this parameter is used
9041         #         for result publication in the study. Otherwise, if automatic
9042         #         publication is switched on, default value is used for result name.
9043         #
9044         #  @return New GEOM.GEOM_Object, containing the displaced shape.
9045         @ManageTransactions("TrsfOp")
9046         def MakePositionAlongPath(self, theObject, thePath, theDistance, theReverse, theName=None):
9047             """
9048             Modify the Location of the given object by Path, creating its copy before the operation.
9049
9050             Parameters:
9051                  theObject The object to be displaced.
9052                  thePath Wire or Edge along that the object will be translated.
9053                  theDistance progress of Path (0 = start location, 1 = end of path location).
9054                  theReverse  0 - for usual direction, 1 - to reverse path direction.
9055                  theName Object name; when specified, this parameter is used
9056                          for result publication in the study. Otherwise, if automatic
9057                          publication is switched on, default value is used for result name.
9058
9059             Returns:
9060                 New GEOM.GEOM_Object, containing the displaced shape.
9061             """
9062             # Example: see GEOM_TestAll.py
9063             anObj = self.TrsfOp.PositionAlongPath(theObject, thePath, theDistance, 1, theReverse)
9064             RaiseIfFailed("PositionAlongPath", self.TrsfOp)
9065             self._autoPublish(anObj, theName, "displaced")
9066             return anObj
9067
9068         ## Offset given shape.
9069         #  @param theObject The base object for the offset.
9070         #  @param theOffset Offset value.
9071         #  @param theCopy Flag used to offset object itself or create a copy.
9072         #  @return Modified @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
9073         #  new GEOM.GEOM_Object, containing the result of offset operation if @a theCopy flag is @c True.
9074         @ManageTransactions("TrsfOp")
9075         def Offset(self, theObject, theOffset, theCopy=False):
9076             """
9077             Offset given shape.
9078
9079             Parameters:
9080                 theObject The base object for the offset.
9081                 theOffset Offset value.
9082                 theCopy Flag used to offset object itself or create a copy.
9083
9084             Returns:
9085                 Modified theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
9086                 new GEOM.GEOM_Object, containing the result of offset operation if theCopy flag is True.
9087             """
9088             theOffset, Parameters = ParseParameters(theOffset)
9089             if theCopy:
9090                 anObj = self.TrsfOp.OffsetShapeCopy(theObject, theOffset)
9091             else:
9092                 anObj = self.TrsfOp.OffsetShape(theObject, theOffset)
9093             RaiseIfFailed("Offset", self.TrsfOp)
9094             anObj.SetParameters(Parameters)
9095             return anObj
9096
9097         ## Create new object as offset of the given one.
9098         #  @param theObject The base object for the offset.
9099         #  @param theOffset Offset value.
9100         #  @param theName Object name; when specified, this parameter is used
9101         #         for result publication in the study. Otherwise, if automatic
9102         #         publication is switched on, default value is used for result name.
9103         #
9104         #  @return New GEOM.GEOM_Object, containing the offset object.
9105         #
9106         #  @ref tui_offset "Example"
9107         @ManageTransactions("TrsfOp")
9108         def MakeOffset(self, theObject, theOffset, theName=None):
9109             """
9110             Create new object as offset of the given one.
9111
9112             Parameters:
9113                 theObject The base object for the offset.
9114                 theOffset Offset value.
9115                 theName Object name; when specified, this parameter is used
9116                         for result publication in the study. Otherwise, if automatic
9117                         publication is switched on, default value is used for result name.
9118
9119             Returns:
9120                 New GEOM.GEOM_Object, containing the offset object.
9121
9122             Example of usage:
9123                  box = geompy.MakeBox(20, 20, 20, 200, 200, 200)
9124                  # create a new object as offset of the given object
9125                  offset = geompy.MakeOffset(box, 70.)
9126             """
9127             # Example: see GEOM_TestAll.py
9128             theOffset, Parameters = ParseParameters(theOffset)
9129             anObj = self.TrsfOp.OffsetShapeCopy(theObject, theOffset)
9130             RaiseIfFailed("OffsetShapeCopy", self.TrsfOp)
9131             anObj.SetParameters(Parameters)
9132             self._autoPublish(anObj, theName, "offset")
9133             return anObj
9134
9135         ## Create new object as projection of the given one on another.
9136         #  @param theSource The source object for the projection. It can be a point, edge or wire.
9137         #         Edge and wire are acceptable if @a theTarget is a face.
9138         #  @param theTarget The target object. It can be planar or cylindrical face, edge or wire.
9139         #  @param theName Object name; when specified, this parameter is used
9140         #         for result publication in the study. Otherwise, if automatic
9141         #         publication is switched on, default value is used for result name.
9142         #
9143         #  @return New GEOM.GEOM_Object, containing the projection.
9144         #
9145         #  @ref tui_projection "Example"
9146         @ManageTransactions("TrsfOp")
9147         def MakeProjection(self, theSource, theTarget, theName=None):
9148             """
9149             Create new object as projection of the given one on another.
9150
9151             Parameters:
9152                 theSource The source object for the projection. It can be a point, edge or wire.
9153                           Edge and wire are acceptable if theTarget is a face.
9154                 theTarget The target object. It can be planar or cylindrical face, edge or wire.
9155                 theName Object name; when specified, this parameter is used
9156                         for result publication in the study. Otherwise, if automatic
9157                         publication is switched on, default value is used for result name.
9158
9159             Returns:
9160                 New GEOM.GEOM_Object, containing the projection.
9161             """
9162             # Example: see GEOM_TestAll.py
9163             anObj = self.TrsfOp.ProjectShapeCopy(theSource, theTarget)
9164             RaiseIfFailed("ProjectShapeCopy", self.TrsfOp)
9165             self._autoPublish(anObj, theName, "projection")
9166             return anObj
9167
9168         ## Create a projection of the given point on a wire or an edge.
9169         #  If there are no solutions or there are 2 or more solutions It throws an
9170         #  exception.
9171         #  @param thePoint the point to be projected.
9172         #  @param theWire the wire. The edge is accepted as well.
9173         #  @param theName Object name; when specified, this parameter is used
9174         #         for result publication in the study. Otherwise, if automatic
9175         #         publication is switched on, default value is used for result name.
9176         #
9177         #  @return [\a u, \a PointOnEdge, \a EdgeInWireIndex]
9178         #  \n \a u: The parameter of projection point on edge.
9179         #  \n \a PointOnEdge: The projection point.
9180         #  \n \a EdgeInWireIndex: The index of an edge in a wire.
9181         #
9182         #  @ref tui_projection "Example"
9183         @ManageTransactions("TrsfOp")
9184         def MakeProjectionOnWire(self, thePoint, theWire, theName=None):
9185             """
9186             Create a projection of the given point on a wire or an edge.
9187             If there are no solutions or there are 2 or more solutions It throws an
9188             exception.
9189
9190             Parameters:
9191                 thePoint the point to be projected.
9192                 theWire the wire. The edge is accepted as well.
9193                 theName Object name; when specified, this parameter is used
9194                         for result publication in the study. Otherwise, if automatic
9195                         publication is switched on, default value is used for result name.
9196
9197             Returns:
9198                 [u, PointOnEdge, EdgeInWireIndex]
9199                  u: The parameter of projection point on edge.
9200                  PointOnEdge: The projection point.
9201                  EdgeInWireIndex: The index of an edge in a wire.
9202             """
9203             # Example: see GEOM_TestAll.py
9204             anObj = self.TrsfOp.ProjectPointOnWire(thePoint, theWire)
9205             RaiseIfFailed("ProjectPointOnWire", self.TrsfOp)
9206             self._autoPublish(anObj[1], theName, "projection")
9207             return anObj
9208
9209         # -----------------------------------------------------------------------------
9210         # Patterns
9211         # -----------------------------------------------------------------------------
9212
9213         ## Translate the given object along the given vector a given number times
9214         #  @param theObject The object to be translated.
9215         #  @param theVector Direction of the translation. DX if None.
9216         #  @param theStep Distance to translate on.
9217         #  @param theNbTimes Quantity of translations to be done.
9218         #  @param theName Object name; when specified, this parameter is used
9219         #         for result publication in the study. Otherwise, if automatic
9220         #         publication is switched on, default value is used for result name.
9221         #
9222         #  @return New GEOM.GEOM_Object, containing compound of all
9223         #          the shapes, obtained after each translation.
9224         #
9225         #  @ref tui_multi_translation "Example"
9226         @ManageTransactions("TrsfOp")
9227         def MakeMultiTranslation1D(self, theObject, theVector, theStep, theNbTimes, theName=None):
9228             """
9229             Translate the given object along the given vector a given number times
9230
9231             Parameters:
9232                 theObject The object to be translated.
9233                 theVector Direction of the translation. DX if None.
9234                 theStep Distance to translate on.
9235                 theNbTimes Quantity of translations to be done.
9236                 theName Object name; when specified, this parameter is used
9237                         for result publication in the study. Otherwise, if automatic
9238                         publication is switched on, default value is used for result name.
9239
9240             Returns:
9241                 New GEOM.GEOM_Object, containing compound of all
9242                 the shapes, obtained after each translation.
9243
9244             Example of usage:
9245                 r1d = geompy.MakeMultiTranslation1D(prism, vect, 20, 4)
9246             """
9247             # Example: see GEOM_TestAll.py
9248             theStep, theNbTimes, Parameters = ParseParameters(theStep, theNbTimes)
9249             anObj = self.TrsfOp.MultiTranslate1D(theObject, theVector, theStep, theNbTimes)
9250             RaiseIfFailed("MultiTranslate1D", self.TrsfOp)
9251             anObj.SetParameters(Parameters)
9252             self._autoPublish(anObj, theName, "multitranslation")
9253             return anObj
9254
9255         ## Conseqently apply two specified translations to theObject specified number of times.
9256         #  @param theObject The object to be translated.
9257         #  @param theVector1 Direction of the first translation. DX if None.
9258         #  @param theStep1 Step of the first translation.
9259         #  @param theNbTimes1 Quantity of translations to be done along theVector1.
9260         #  @param theVector2 Direction of the second translation. DY if None.
9261         #  @param theStep2 Step of the second translation.
9262         #  @param theNbTimes2 Quantity of translations to be done along theVector2.
9263         #  @param theName Object name; when specified, this parameter is used
9264         #         for result publication in the study. Otherwise, if automatic
9265         #         publication is switched on, default value is used for result name.
9266         #
9267         #  @return New GEOM.GEOM_Object, containing compound of all
9268         #          the shapes, obtained after each translation.
9269         #
9270         #  @ref tui_multi_translation "Example"
9271         @ManageTransactions("TrsfOp")
9272         def MakeMultiTranslation2D(self, theObject, theVector1, theStep1, theNbTimes1,
9273                                    theVector2, theStep2, theNbTimes2, theName=None):
9274             """
9275             Conseqently apply two specified translations to theObject specified number of times.
9276
9277             Parameters:
9278                 theObject The object to be translated.
9279                 theVector1 Direction of the first translation. DX if None.
9280                 theStep1 Step of the first translation.
9281                 theNbTimes1 Quantity of translations to be done along theVector1.
9282                 theVector2 Direction of the second translation. DY if None.
9283                 theStep2 Step of the second translation.
9284                 theNbTimes2 Quantity of translations to be done along theVector2.
9285                 theName Object name; when specified, this parameter is used
9286                         for result publication in the study. Otherwise, if automatic
9287                         publication is switched on, default value is used for result name.
9288
9289             Returns:
9290                 New GEOM.GEOM_Object, containing compound of all
9291                 the shapes, obtained after each translation.
9292
9293             Example of usage:
9294                 tr2d = geompy.MakeMultiTranslation2D(prism, vect1, 20, 4, vect2, 80, 3)
9295             """
9296             # Example: see GEOM_TestAll.py
9297             theStep1,theNbTimes1,theStep2,theNbTimes2, Parameters = ParseParameters(theStep1,theNbTimes1,theStep2,theNbTimes2)
9298             anObj = self.TrsfOp.MultiTranslate2D(theObject, theVector1, theStep1, theNbTimes1,
9299                                                  theVector2, theStep2, theNbTimes2)
9300             RaiseIfFailed("MultiTranslate2D", self.TrsfOp)
9301             anObj.SetParameters(Parameters)
9302             self._autoPublish(anObj, theName, "multitranslation")
9303             return anObj
9304
9305         ## Rotate the given object around the given axis a given number times.
9306         #  Rotation angle will be 2*PI/theNbTimes.
9307         #  @param theObject The object to be rotated.
9308         #  @param theAxis The rotation axis. DZ if None.
9309         #  @param theNbTimes Quantity of rotations to be done.
9310         #  @param theName Object name; when specified, this parameter is used
9311         #         for result publication in the study. Otherwise, if automatic
9312         #         publication is switched on, default value is used for result name.
9313         #
9314         #  @return New GEOM.GEOM_Object, containing compound of all the
9315         #          shapes, obtained after each rotation.
9316         #
9317         #  @ref tui_multi_rotation "Example"
9318         @ManageTransactions("TrsfOp")
9319         def MultiRotate1DNbTimes (self, theObject, theAxis, theNbTimes, theName=None):
9320             """
9321             Rotate the given object around the given axis a given number times.
9322             Rotation angle will be 2*PI/theNbTimes.
9323
9324             Parameters:
9325                 theObject The object to be rotated.
9326                 theAxis The rotation axis. DZ if None.
9327                 theNbTimes Quantity of rotations to be done.
9328                 theName Object name; when specified, this parameter is used
9329                         for result publication in the study. Otherwise, if automatic
9330                         publication is switched on, default value is used for result name.
9331
9332             Returns:
9333                 New GEOM.GEOM_Object, containing compound of all the
9334                 shapes, obtained after each rotation.
9335
9336             Example of usage:
9337                 rot1d = geompy.MultiRotate1DNbTimes(prism, vect, 4)
9338             """
9339             # Example: see GEOM_TestAll.py
9340             theNbTimes, Parameters = ParseParameters(theNbTimes)
9341             anObj = self.TrsfOp.MultiRotate1D(theObject, theAxis, theNbTimes)
9342             RaiseIfFailed("MultiRotate1DNbTimes", self.TrsfOp)
9343             anObj.SetParameters(Parameters)
9344             self._autoPublish(anObj, theName, "multirotation")
9345             return anObj
9346
9347         ## Rotate the given object around the given axis
9348         #  a given number times on the given angle.
9349         #  @param theObject The object to be rotated.
9350         #  @param theAxis The rotation axis. DZ if None.
9351         #  @param theAngleStep Rotation angle in radians.
9352         #  @param theNbTimes Quantity of rotations to be done.
9353         #  @param theName Object name; when specified, this parameter is used
9354         #         for result publication in the study. Otherwise, if automatic
9355         #         publication is switched on, default value is used for result name.
9356         #
9357         #  @return New GEOM.GEOM_Object, containing compound of all the
9358         #          shapes, obtained after each rotation.
9359         #
9360         #  @ref tui_multi_rotation "Example"
9361         @ManageTransactions("TrsfOp")
9362         def MultiRotate1DByStep(self, theObject, theAxis, theAngleStep, theNbTimes, theName=None):
9363             """
9364             Rotate the given object around the given axis
9365             a given number times on the given angle.
9366
9367             Parameters:
9368                 theObject The object to be rotated.
9369                 theAxis The rotation axis. DZ if None.
9370                 theAngleStep Rotation angle in radians.
9371                 theNbTimes Quantity of rotations to be done.
9372                 theName Object name; when specified, this parameter is used
9373                         for result publication in the study. Otherwise, if automatic
9374                         publication is switched on, default value is used for result name.
9375
9376             Returns:
9377                 New GEOM.GEOM_Object, containing compound of all the
9378                 shapes, obtained after each rotation.
9379
9380             Example of usage:
9381                 rot1d = geompy.MultiRotate1DByStep(prism, vect, math.pi/4, 4)
9382             """
9383             # Example: see GEOM_TestAll.py
9384             theAngleStep, theNbTimes, Parameters = ParseParameters(theAngleStep, theNbTimes)
9385             anObj = self.TrsfOp.MultiRotate1DByStep(theObject, theAxis, theAngleStep, theNbTimes)
9386             RaiseIfFailed("MultiRotate1DByStep", self.TrsfOp)
9387             anObj.SetParameters(Parameters)
9388             self._autoPublish(anObj, theName, "multirotation")
9389             return anObj
9390
9391         ## Rotate the given object around the given axis a given
9392         #  number times and multi-translate each rotation result.
9393         #  Rotation angle will be 2*PI/theNbTimes1.
9394         #  Translation direction passes through center of gravity
9395         #  of rotated shape and its projection on the rotation axis.
9396         #  @param theObject The object to be rotated.
9397         #  @param theAxis Rotation axis. DZ if None.
9398         #  @param theNbTimes1 Quantity of rotations to be done.
9399         #  @param theRadialStep Translation distance.
9400         #  @param theNbTimes2 Quantity of translations to be done.
9401         #  @param theName Object name; when specified, this parameter is used
9402         #         for result publication in the study. Otherwise, if automatic
9403         #         publication is switched on, default value is used for result name.
9404         #
9405         #  @return New GEOM.GEOM_Object, containing compound of all the
9406         #          shapes, obtained after each transformation.
9407         #
9408         #  @ref tui_multi_rotation "Example"
9409         @ManageTransactions("TrsfOp")
9410         def MultiRotate2DNbTimes(self, theObject, theAxis, theNbTimes1, theRadialStep, theNbTimes2, theName=None):
9411             """
9412             Rotate the given object around the
9413             given axis on the given angle a given number
9414             times and multi-translate each rotation result.
9415             Translation direction passes through center of gravity
9416             of rotated shape and its projection on the rotation axis.
9417
9418             Parameters:
9419                 theObject The object to be rotated.
9420                 theAxis Rotation axis. DZ if None.
9421                 theNbTimes1 Quantity of rotations to be done.
9422                 theRadialStep Translation distance.
9423                 theNbTimes2 Quantity of translations to be done.
9424                 theName Object name; when specified, this parameter is used
9425                         for result publication in the study. Otherwise, if automatic
9426                         publication is switched on, default value is used for result name.
9427
9428             Returns:
9429                 New GEOM.GEOM_Object, containing compound of all the
9430                 shapes, obtained after each transformation.
9431
9432             Example of usage:
9433                 rot2d = geompy.MultiRotate2D(prism, vect, 60, 4, 50, 5)
9434             """
9435             # Example: see GEOM_TestAll.py
9436             theNbTimes1, theRadialStep, theNbTimes2, Parameters = ParseParameters(theNbTimes1, theRadialStep, theNbTimes2)
9437             anObj = self.TrsfOp.MultiRotate2DNbTimes(theObject, theAxis, theNbTimes1, theRadialStep, theNbTimes2)
9438             RaiseIfFailed("MultiRotate2DNbTimes", self.TrsfOp)
9439             anObj.SetParameters(Parameters)
9440             self._autoPublish(anObj, theName, "multirotation")
9441             return anObj
9442
9443         ## Rotate the given object around the
9444         #  given axis on the given angle a given number
9445         #  times and multi-translate each rotation result.
9446         #  Translation direction passes through center of gravity
9447         #  of rotated shape and its projection on the rotation axis.
9448         #  @param theObject The object to be rotated.
9449         #  @param theAxis Rotation axis. DZ if None.
9450         #  @param theAngleStep Rotation angle in radians.
9451         #  @param theNbTimes1 Quantity of rotations to be done.
9452         #  @param theRadialStep Translation distance.
9453         #  @param theNbTimes2 Quantity of translations to be done.
9454         #  @param theName Object name; when specified, this parameter is used
9455         #         for result publication in the study. Otherwise, if automatic
9456         #         publication is switched on, default value is used for result name.
9457         #
9458         #  @return New GEOM.GEOM_Object, containing compound of all the
9459         #          shapes, obtained after each transformation.
9460         #
9461         #  @ref tui_multi_rotation "Example"
9462         @ManageTransactions("TrsfOp")
9463         def MultiRotate2DByStep (self, theObject, theAxis, theAngleStep, theNbTimes1, theRadialStep, theNbTimes2, theName=None):
9464             """
9465             Rotate the given object around the
9466             given axis on the given angle a given number
9467             times and multi-translate each rotation result.
9468             Translation direction passes through center of gravity
9469             of rotated shape and its projection on the rotation axis.
9470
9471             Parameters:
9472                 theObject The object to be rotated.
9473                 theAxis Rotation axis. DZ if None.
9474                 theAngleStep Rotation angle in radians.
9475                 theNbTimes1 Quantity of rotations to be done.
9476                 theRadialStep Translation distance.
9477                 theNbTimes2 Quantity of translations to be done.
9478                 theName Object name; when specified, this parameter is used
9479                         for result publication in the study. Otherwise, if automatic
9480                         publication is switched on, default value is used for result name.
9481
9482             Returns:
9483                 New GEOM.GEOM_Object, containing compound of all the
9484                 shapes, obtained after each transformation.
9485
9486             Example of usage:
9487                 rot2d = geompy.MultiRotate2D(prism, vect, math.pi/3, 4, 50, 5)
9488             """
9489             # Example: see GEOM_TestAll.py
9490             theAngleStep, theNbTimes1, theRadialStep, theNbTimes2, Parameters = ParseParameters(theAngleStep, theNbTimes1, theRadialStep, theNbTimes2)
9491             anObj = self.TrsfOp.MultiRotate2DByStep(theObject, theAxis, theAngleStep, theNbTimes1, theRadialStep, theNbTimes2)
9492             RaiseIfFailed("MultiRotate2DByStep", self.TrsfOp)
9493             anObj.SetParameters(Parameters)
9494             self._autoPublish(anObj, theName, "multirotation")
9495             return anObj
9496
9497         ## The same, as MultiRotate1DNbTimes(), but axis is given by direction and point
9498         #
9499         #  @ref swig_MakeMultiRotation "Example"
9500         def MakeMultiRotation1DNbTimes(self, aShape, aDir, aPoint, aNbTimes, theName=None):
9501             """
9502             The same, as geompy.MultiRotate1DNbTimes, but axis is given by direction and point
9503
9504             Example of usage:
9505                 pz = geompy.MakeVertex(0, 0, 100)
9506                 vy = geompy.MakeVectorDXDYDZ(0, 100, 0)
9507                 MultiRot1D = geompy.MakeMultiRotation1DNbTimes(prism, vy, pz, 6)
9508             """
9509             # Example: see GEOM_TestOthers.py
9510             aVec = self.MakeLine(aPoint,aDir)
9511             # note: auto-publishing is done in self.MultiRotate1D()
9512             anObj = self.MultiRotate1DNbTimes(aShape, aVec, aNbTimes, theName)
9513             return anObj
9514
9515         ## The same, as MultiRotate1DByStep(), but axis is given by direction and point
9516         #
9517         #  @ref swig_MakeMultiRotation "Example"
9518         def MakeMultiRotation1DByStep(self, aShape, aDir, aPoint, anAngle, aNbTimes, theName=None):
9519             """
9520             The same, as geompy.MultiRotate1D, but axis is given by direction and point
9521
9522             Example of usage:
9523                 pz = geompy.MakeVertex(0, 0, 100)
9524                 vy = geompy.MakeVectorDXDYDZ(0, 100, 0)
9525                 MultiRot1D = geompy.MakeMultiRotation1DByStep(prism, vy, pz, math.pi/3, 6)
9526             """
9527             # Example: see GEOM_TestOthers.py
9528             aVec = self.MakeLine(aPoint,aDir)
9529             # note: auto-publishing is done in self.MultiRotate1D()
9530             anObj = self.MultiRotate1DByStep(aShape, aVec, anAngle, aNbTimes, theName)
9531             return anObj
9532
9533         ## The same, as MultiRotate2DNbTimes(), but axis is given by direction and point
9534         #
9535         #  @ref swig_MakeMultiRotation "Example"
9536         def MakeMultiRotation2DNbTimes(self, aShape, aDir, aPoint, nbtimes1, aStep, nbtimes2, theName=None):
9537             """
9538             The same, as MultiRotate2DNbTimes(), but axis is given by direction and point
9539
9540             Example of usage:
9541                 pz = geompy.MakeVertex(0, 0, 100)
9542                 vy = geompy.MakeVectorDXDYDZ(0, 100, 0)
9543                 MultiRot2D = geompy.MakeMultiRotation2DNbTimes(f12, vy, pz, 6, 30, 3)
9544             """
9545             # Example: see GEOM_TestOthers.py
9546             aVec = self.MakeLine(aPoint,aDir)
9547             # note: auto-publishing is done in self.MultiRotate2DNbTimes()
9548             anObj = self.MultiRotate2DNbTimes(aShape, aVec, nbtimes1, aStep, nbtimes2, theName)
9549             return anObj
9550
9551         ## The same, as MultiRotate2DByStep(), but axis is given by direction and point
9552         #
9553         #  @ref swig_MakeMultiRotation "Example"
9554         def MakeMultiRotation2DByStep(self, aShape, aDir, aPoint, anAngle, nbtimes1, aStep, nbtimes2, theName=None):
9555             """
9556             The same, as MultiRotate2DByStep(), but axis is given by direction and point
9557
9558             Example of usage:
9559                 pz = geompy.MakeVertex(0, 0, 100)
9560                 vy = geompy.MakeVectorDXDYDZ(0, 100, 0)
9561                 MultiRot2D = geompy.MakeMultiRotation2DByStep(f12, vy, pz, math.pi/4, 6, 30, 3)
9562             """
9563             # Example: see GEOM_TestOthers.py
9564             aVec = self.MakeLine(aPoint,aDir)
9565             # note: auto-publishing is done in self.MultiRotate2D()
9566             anObj = self.MultiRotate2DByStep(aShape, aVec, anAngle, nbtimes1, aStep, nbtimes2, theName)
9567             return anObj
9568
9569         ##
9570         #  Compute a wire or a face that represents a projection of the source
9571         #  shape onto cylinder. The cylinder's coordinate system is the same
9572         #  as the global coordinate system.
9573         #
9574         #  @param theObject The object to be projected. It can be either
9575         #         a planar wire or a face.
9576         #  @param theRadius The radius of the cylinder.
9577         #  @param theStartAngle The starting angle in radians from
9578         #         the cylinder's X axis around Z axis. The angle from which
9579         #         the projection is started.
9580         #  @param theAngleLength The projection length angle in radians.
9581         #         The angle in which to project the total length of the wire.
9582         #         If it is negative the projection is not scaled and natural
9583         #         wire length is kept for the projection.
9584         #  @param theName Object name; when specified, this parameter is used
9585         #         for result publication in the study. Otherwise, if automatic
9586         #         publication is switched on, default value is used for result name.
9587         #
9588         #  @return New GEOM.GEOM_Object, containing the result shape. The result
9589         #         represents a wire or a face that represents a projection of
9590         #         the source shape onto a cylinder.
9591         #
9592         #  @ref tui_projection "Example"
9593         def MakeProjectionOnCylinder (self, theObject, theRadius,
9594                                       theStartAngle=0.0, theAngleLength=-1.0,
9595                                       theName=None):
9596             """
9597             Compute a wire or a face that represents a projection of the source
9598             shape onto cylinder. The cylinder's coordinate system is the same
9599             as the global coordinate system.
9600
9601             Parameters:
9602                 theObject The object to be projected. It can be either
9603                         a planar wire or a face.
9604                 theRadius The radius of the cylinder.
9605                 theStartAngle The starting angle in radians from the cylinder's X axis
9606                         around Z axis. The angle from which the projection is started.
9607                 theAngleLength The projection length angle in radians. The angle in which
9608                         to project the total length of the wire. If it is negative the
9609                         projection is not scaled and natural wire length is kept for
9610                         the projection.
9611                 theName Object name; when specified, this parameter is used
9612                         for result publication in the study. Otherwise, if automatic
9613                         publication is switched on, default value is used for result name.
9614
9615             Returns:
9616                 New GEOM.GEOM_Object, containing the result shape. The result
9617                 represents a wire or a face that represents a projection of
9618                 the source shape onto a cylinder.
9619             """
9620             # Example: see GEOM_TestAll.py
9621             flagStartAngle = False
9622             if isinstance(theStartAngle,str):
9623                 flagStartAngle = True
9624             flagAngleLength = False
9625             if isinstance(theAngleLength,str):
9626                 flagAngleLength = True
9627             theRadius, theStartAngle, theAngleLength, Parameters = ParseParameters(
9628               theRadius, theStartAngle, theAngleLength)
9629             if flagStartAngle:
9630                 theStartAngle = theStartAngle*math.pi/180.
9631             if flagAngleLength:
9632                 theAngleLength = theAngleLength*math.pi/180.
9633             anObj = self.TrsfOp.MakeProjectionOnCylinder(theObject, theRadius,
9634                 theStartAngle, theAngleLength)
9635             RaiseIfFailed("MakeProjectionOnCylinder", self.TrsfOp)
9636             anObj.SetParameters(Parameters)
9637             self._autoPublish(anObj, theName, "projection")
9638             return anObj
9639
9640         # end of l3_transform
9641         ## @}
9642
9643         ## @addtogroup l3_transform_d
9644         ## @{
9645
9646         ## Deprecated method. Use MultiRotate1DNbTimes instead.
9647         def MultiRotate1D(self, theObject, theAxis, theNbTimes, theName=None):
9648             """
9649             Deprecated method. Use MultiRotate1DNbTimes instead.
9650             """
9651             print "The method MultiRotate1D is DEPRECATED. Use MultiRotate1DNbTimes instead."
9652             return self.MultiRotate1DNbTimes(theObject, theAxis, theNbTimes, theName)
9653
9654         ## The same, as MultiRotate2DByStep(), but theAngle is in degrees.
9655         #  This method is DEPRECATED. Use MultiRotate2DByStep() instead.
9656         @ManageTransactions("TrsfOp")
9657         def MultiRotate2D(self, theObject, theAxis, theAngle, theNbTimes1, theStep, theNbTimes2, theName=None):
9658             """
9659             The same, as MultiRotate2DByStep(), but theAngle is in degrees.
9660             This method is DEPRECATED. Use MultiRotate2DByStep() instead.
9661
9662             Example of usage:
9663                 rot2d = geompy.MultiRotate2D(prism, vect, 60, 4, 50, 5)
9664             """
9665             print "The method MultiRotate2D is DEPRECATED. Use MultiRotate2DByStep instead."
9666             theAngle, theNbTimes1, theStep, theNbTimes2, Parameters = ParseParameters(theAngle, theNbTimes1, theStep, theNbTimes2)
9667             anObj = self.TrsfOp.MultiRotate2D(theObject, theAxis, theAngle, theNbTimes1, theStep, theNbTimes2)
9668             RaiseIfFailed("MultiRotate2D", self.TrsfOp)
9669             anObj.SetParameters(Parameters)
9670             self._autoPublish(anObj, theName, "multirotation")
9671             return anObj
9672
9673         ## The same, as MultiRotate1D(), but axis is given by direction and point
9674         #  This method is DEPRECATED. Use MakeMultiRotation1DNbTimes instead.
9675         def MakeMultiRotation1D(self, aShape, aDir, aPoint, aNbTimes, theName=None):
9676             """
9677             The same, as geompy.MultiRotate1D, but axis is given by direction and point.
9678             This method is DEPRECATED. Use MakeMultiRotation1DNbTimes instead.
9679
9680             Example of usage:
9681                 pz = geompy.MakeVertex(0, 0, 100)
9682                 vy = geompy.MakeVectorDXDYDZ(0, 100, 0)
9683                 MultiRot1D = geompy.MakeMultiRotation1D(prism, vy, pz, 6)
9684             """
9685             print "The method MakeMultiRotation1D is DEPRECATED. Use MakeMultiRotation1DNbTimes instead."
9686             aVec = self.MakeLine(aPoint,aDir)
9687             # note: auto-publishing is done in self.MultiRotate1D()
9688             anObj = self.MultiRotate1D(aShape, aVec, aNbTimes, theName)
9689             return anObj
9690
9691         ## The same, as MultiRotate2D(), but axis is given by direction and point
9692         #  This method is DEPRECATED. Use MakeMultiRotation2DByStep instead.
9693         def MakeMultiRotation2D(self, aShape, aDir, aPoint, anAngle, nbtimes1, aStep, nbtimes2, theName=None):
9694             """
9695             The same, as MultiRotate2D(), but axis is given by direction and point
9696             This method is DEPRECATED. Use MakeMultiRotation2DByStep instead.
9697
9698             Example of usage:
9699                 pz = geompy.MakeVertex(0, 0, 100)
9700                 vy = geompy.MakeVectorDXDYDZ(0, 100, 0)
9701                 MultiRot2D = geompy.MakeMultiRotation2D(f12, vy, pz, 45, 6, 30, 3)
9702             """
9703             print "The method MakeMultiRotation2D is DEPRECATED. Use MakeMultiRotation2DByStep instead."
9704             aVec = self.MakeLine(aPoint,aDir)
9705             # note: auto-publishing is done in self.MultiRotate2D()
9706             anObj = self.MultiRotate2D(aShape, aVec, anAngle, nbtimes1, aStep, nbtimes2, theName)
9707             return anObj
9708
9709         # end of l3_transform_d
9710         ## @}
9711
9712         ## @addtogroup l3_local
9713         ## @{
9714
9715         ## Perform a fillet on all edges of the given shape.
9716         #  @param theShape Shape, to perform fillet on.
9717         #  @param theR Fillet radius.
9718         #  @param theName Object name; when specified, this parameter is used
9719         #         for result publication in the study. Otherwise, if automatic
9720         #         publication is switched on, default value is used for result name.
9721         #
9722         #  @return New GEOM.GEOM_Object, containing the result shape.
9723         #
9724         #  @ref tui_fillet "Example 1"
9725         #  \n @ref swig_MakeFilletAll "Example 2"
9726         @ManageTransactions("LocalOp")
9727         def MakeFilletAll(self, theShape, theR, theName=None):
9728             """
9729             Perform a fillet on all edges of the given shape.
9730
9731             Parameters:
9732                 theShape Shape, to perform fillet on.
9733                 theR Fillet radius.
9734                 theName Object name; when specified, this parameter is used
9735                         for result publication in the study. Otherwise, if automatic
9736                         publication is switched on, default value is used for result name.
9737
9738             Returns:
9739                 New GEOM.GEOM_Object, containing the result shape.
9740
9741             Example of usage:
9742                filletall = geompy.MakeFilletAll(prism, 10.)
9743             """
9744             # Example: see GEOM_TestOthers.py
9745             theR,Parameters = ParseParameters(theR)
9746             anObj = self.LocalOp.MakeFilletAll(theShape, theR)
9747             RaiseIfFailed("MakeFilletAll", self.LocalOp)
9748             anObj.SetParameters(Parameters)
9749             self._autoPublish(anObj, theName, "fillet")
9750             return anObj
9751
9752         ## Perform a fillet on the specified edges/faces of the given shape
9753         #  @param theShape Shape, to perform fillet on.
9754         #  @param theR Fillet radius.
9755         #  @param theShapeType Type of shapes in <VAR>theListShapes</VAR> (see ShapeType())
9756         #  @param theListShapes Global indices of edges/faces to perform fillet on.
9757         #  @param theName Object name; when specified, this parameter is used
9758         #         for result publication in the study. Otherwise, if automatic
9759         #         publication is switched on, default value is used for result name.
9760         #
9761         #  @note Global index of sub-shape can be obtained, using method GetSubShapeID().
9762         #
9763         #  @return New GEOM.GEOM_Object, containing the result shape.
9764         #
9765         #  @ref tui_fillet "Example"
9766         @ManageTransactions("LocalOp")
9767         def MakeFillet(self, theShape, theR, theShapeType, theListShapes, theName=None):
9768             """
9769             Perform a fillet on the specified edges/faces of the given shape
9770
9771             Parameters:
9772                 theShape Shape, to perform fillet on.
9773                 theR Fillet radius.
9774                 theShapeType Type of shapes in theListShapes (see geompy.ShapeTypes)
9775                 theListShapes Global indices of edges/faces to perform fillet on.
9776                 theName Object name; when specified, this parameter is used
9777                         for result publication in the study. Otherwise, if automatic
9778                         publication is switched on, default value is used for result name.
9779
9780             Note:
9781                 Global index of sub-shape can be obtained, using method geompy.GetSubShapeID
9782
9783             Returns:
9784                 New GEOM.GEOM_Object, containing the result shape.
9785
9786             Example of usage:
9787                 # get the list of IDs (IDList) for the fillet
9788                 prism_edges = geompy.SubShapeAllSortedCentres(prism, geompy.ShapeType["EDGE"])
9789                 IDlist_e = []
9790                 IDlist_e.append(geompy.GetSubShapeID(prism, prism_edges[0]))
9791                 IDlist_e.append(geompy.GetSubShapeID(prism, prism_edges[1]))
9792                 IDlist_e.append(geompy.GetSubShapeID(prism, prism_edges[2]))
9793                 # make a fillet on the specified edges of the given shape
9794                 fillet = geompy.MakeFillet(prism, 10., geompy.ShapeType["EDGE"], IDlist_e)
9795             """
9796             # Example: see GEOM_TestAll.py
9797             theR,Parameters = ParseParameters(theR)
9798             anObj = None
9799             if theShapeType == self.ShapeType["EDGE"]:
9800                 anObj = self.LocalOp.MakeFilletEdges(theShape, theR, theListShapes)
9801                 RaiseIfFailed("MakeFilletEdges", self.LocalOp)
9802             else:
9803                 anObj = self.LocalOp.MakeFilletFaces(theShape, theR, theListShapes)
9804                 RaiseIfFailed("MakeFilletFaces", self.LocalOp)
9805             anObj.SetParameters(Parameters)
9806             self._autoPublish(anObj, theName, "fillet")
9807             return anObj
9808
9809         ## The same that MakeFillet() but with two Fillet Radius R1 and R2
9810         @ManageTransactions("LocalOp")
9811         def MakeFilletR1R2(self, theShape, theR1, theR2, theShapeType, theListShapes, theName=None):
9812             """
9813             The same that geompy.MakeFillet but with two Fillet Radius R1 and R2
9814
9815             Example of usage:
9816                 # get the list of IDs (IDList) for the fillet
9817                 prism_edges = geompy.SubShapeAllSortedCentres(prism, geompy.ShapeType["EDGE"])
9818                 IDlist_e = []
9819                 IDlist_e.append(geompy.GetSubShapeID(prism, prism_edges[0]))
9820                 IDlist_e.append(geompy.GetSubShapeID(prism, prism_edges[1]))
9821                 IDlist_e.append(geompy.GetSubShapeID(prism, prism_edges[2]))
9822                 # make a fillet on the specified edges of the given shape
9823                 fillet = geompy.MakeFillet(prism, 10., 15., geompy.ShapeType["EDGE"], IDlist_e)
9824             """
9825             theR1,theR2,Parameters = ParseParameters(theR1,theR2)
9826             anObj = None
9827             if theShapeType == self.ShapeType["EDGE"]:
9828                 anObj = self.LocalOp.MakeFilletEdgesR1R2(theShape, theR1, theR2, theListShapes)
9829                 RaiseIfFailed("MakeFilletEdgesR1R2", self.LocalOp)
9830             else:
9831                 anObj = self.LocalOp.MakeFilletFacesR1R2(theShape, theR1, theR2, theListShapes)
9832                 RaiseIfFailed("MakeFilletFacesR1R2", self.LocalOp)
9833             anObj.SetParameters(Parameters)
9834             self._autoPublish(anObj, theName, "fillet")
9835             return anObj
9836
9837         ## Perform a fillet on the specified edges of the given shape
9838         #  @param theShape  Wire Shape to perform fillet on.
9839         #  @param theR  Fillet radius.
9840         #  @param theListOfVertexes Global indices of vertexes to perform fillet on.
9841         #    \note Global index of sub-shape can be obtained, using method GetSubShapeID()
9842         #    \note The list of vertices could be empty,
9843         #          in this case fillet will done done at all vertices in wire
9844         #  @param doIgnoreSecantVertices If FALSE, fillet radius is always limited
9845         #         by the length of the edges, nearest to the fillet vertex.
9846         #         But sometimes the next edge is C1 continuous with the one, nearest to
9847         #         the fillet point, and such two (or more) edges can be united to allow
9848         #         bigger radius. Set this flag to TRUE to allow collinear edges union,
9849         #         thus ignoring the secant vertex (vertices).
9850         #  @param theName Object name; when specified, this parameter is used
9851         #         for result publication in the study. Otherwise, if automatic
9852         #         publication is switched on, default value is used for result name.
9853         #
9854         #  @return New GEOM.GEOM_Object, containing the result shape.
9855         #
9856         #  @ref tui_fillet2d "Example"
9857         @ManageTransactions("LocalOp")
9858         def MakeFillet1D(self, theShape, theR, theListOfVertexes, doIgnoreSecantVertices = True, theName=None):
9859             """
9860             Perform a fillet on the specified edges of the given shape
9861
9862             Parameters:
9863                 theShape  Wire Shape to perform fillet on.
9864                 theR  Fillet radius.
9865                 theListOfVertexes Global indices of vertexes to perform fillet on.
9866                 doIgnoreSecantVertices If FALSE, fillet radius is always limited
9867                     by the length of the edges, nearest to the fillet vertex.
9868                     But sometimes the next edge is C1 continuous with the one, nearest to
9869                     the fillet point, and such two (or more) edges can be united to allow
9870                     bigger radius. Set this flag to TRUE to allow collinear edges union,
9871                     thus ignoring the secant vertex (vertices).
9872                 theName Object name; when specified, this parameter is used
9873                         for result publication in the study. Otherwise, if automatic
9874                         publication is switched on, default value is used for result name.
9875             Note:
9876                 Global index of sub-shape can be obtained, using method geompy.GetSubShapeID
9877
9878                 The list of vertices could be empty,in this case fillet will done done at all vertices in wire
9879
9880             Returns:
9881                 New GEOM.GEOM_Object, containing the result shape.
9882
9883             Example of usage:
9884                 # create wire
9885                 Wire_1 = geompy.MakeWire([Edge_12, Edge_7, Edge_11, Edge_6, Edge_1,Edge_4])
9886                 # make fillet at given wire vertices with giver radius
9887                 Fillet_1D_1 = geompy.MakeFillet1D(Wire_1, 55, [3, 4, 6, 8, 10])
9888             """
9889             # Example: see GEOM_TestAll.py
9890             theR,doIgnoreSecantVertices,Parameters = ParseParameters(theR,doIgnoreSecantVertices)
9891             anObj = self.LocalOp.MakeFillet1D(theShape, theR, theListOfVertexes, doIgnoreSecantVertices)
9892             RaiseIfFailed("MakeFillet1D", self.LocalOp)
9893             anObj.SetParameters(Parameters)
9894             self._autoPublish(anObj, theName, "fillet")
9895             return anObj
9896
9897         ## Perform a fillet at the specified vertices of the given face/shell.
9898         #  @param theShape Face or Shell shape to perform fillet on.
9899         #  @param theR Fillet radius.
9900         #  @param theListOfVertexes Global indices of vertexes to perform fillet on.
9901         #  @param theName Object name; when specified, this parameter is used
9902         #         for result publication in the study. Otherwise, if automatic
9903         #         publication is switched on, default value is used for result name.
9904         #
9905         #  @note Global index of sub-shape can be obtained, using method GetSubShapeID().
9906         #
9907         #  @return New GEOM.GEOM_Object, containing the result shape.
9908         #
9909         #  @ref tui_fillet2d "Example"
9910         @ManageTransactions("LocalOp")
9911         def MakeFillet2D(self, theShape, theR, theListOfVertexes, theName=None):
9912             """
9913             Perform a fillet at the specified vertices of the given face/shell.
9914
9915             Parameters:
9916                 theShape  Face or Shell shape to perform fillet on.
9917                 theR  Fillet radius.
9918                 theListOfVertexes Global indices of vertexes to perform fillet on.
9919                 theName Object name; when specified, this parameter is used
9920                         for result publication in the study. Otherwise, if automatic
9921                         publication is switched on, default value is used for result name.
9922             Note:
9923                 Global index of sub-shape can be obtained, using method geompy.GetSubShapeID
9924
9925             Returns:
9926                 New GEOM.GEOM_Object, containing the result shape.
9927
9928             Example of usage:
9929                 face = geompy.MakeFaceHW(100, 100, 1)
9930                 fillet2d = geompy.MakeFillet2D(face, 30, [7, 9])
9931             """
9932             # Example: see GEOM_TestAll.py
9933             theR,Parameters = ParseParameters(theR)
9934             anObj = self.LocalOp.MakeFillet2D(theShape, theR, theListOfVertexes)
9935             RaiseIfFailed("MakeFillet2D", self.LocalOp)
9936             anObj.SetParameters(Parameters)
9937             self._autoPublish(anObj, theName, "fillet")
9938             return anObj
9939
9940         ## Perform a symmetric chamfer on all edges of the given shape.
9941         #  @param theShape Shape, to perform chamfer on.
9942         #  @param theD Chamfer size along each face.
9943         #  @param theName Object name; when specified, this parameter is used
9944         #         for result publication in the study. Otherwise, if automatic
9945         #         publication is switched on, default value is used for result name.
9946         #
9947         #  @return New GEOM.GEOM_Object, containing the result shape.
9948         #
9949         #  @ref tui_chamfer "Example 1"
9950         #  \n @ref swig_MakeChamferAll "Example 2"
9951         @ManageTransactions("LocalOp")
9952         def MakeChamferAll(self, theShape, theD, theName=None):
9953             """
9954             Perform a symmetric chamfer on all edges of the given shape.
9955
9956             Parameters:
9957                 theShape Shape, to perform chamfer on.
9958                 theD Chamfer size along each face.
9959                 theName Object name; when specified, this parameter is used
9960                         for result publication in the study. Otherwise, if automatic
9961                         publication is switched on, default value is used for result name.
9962
9963             Returns:
9964                 New GEOM.GEOM_Object, containing the result shape.
9965
9966             Example of usage:
9967                 chamfer_all = geompy.MakeChamferAll(prism, 10.)
9968             """
9969             # Example: see GEOM_TestOthers.py
9970             theD,Parameters = ParseParameters(theD)
9971             anObj = self.LocalOp.MakeChamferAll(theShape, theD)
9972             RaiseIfFailed("MakeChamferAll", self.LocalOp)
9973             anObj.SetParameters(Parameters)
9974             self._autoPublish(anObj, theName, "chamfer")
9975             return anObj
9976
9977         ## Perform a chamfer on edges, common to the specified faces,
9978         #  with distance D1 on the Face1
9979         #  @param theShape Shape, to perform chamfer on.
9980         #  @param theD1 Chamfer size along \a theFace1.
9981         #  @param theD2 Chamfer size along \a theFace2.
9982         #  @param theFace1,theFace2 Global indices of two faces of \a theShape.
9983         #  @param theName Object name; when specified, this parameter is used
9984         #         for result publication in the study. Otherwise, if automatic
9985         #         publication is switched on, default value is used for result name.
9986         #
9987         #  @note Global index of sub-shape can be obtained, using method GetSubShapeID().
9988         #
9989         #  @return New GEOM.GEOM_Object, containing the result shape.
9990         #
9991         #  @ref tui_chamfer "Example"
9992         @ManageTransactions("LocalOp")
9993         def MakeChamferEdge(self, theShape, theD1, theD2, theFace1, theFace2, theName=None):
9994             """
9995             Perform a chamfer on edges, common to the specified faces,
9996             with distance D1 on the Face1
9997
9998             Parameters:
9999                 theShape Shape, to perform chamfer on.
10000                 theD1 Chamfer size along theFace1.
10001                 theD2 Chamfer size along theFace2.
10002                 theFace1,theFace2 Global indices of two faces of theShape.
10003                 theName Object name; when specified, this parameter is used
10004                         for result publication in the study. Otherwise, if automatic
10005                         publication is switched on, default value is used for result name.
10006
10007             Note:
10008                 Global index of sub-shape can be obtained, using method geompy.GetSubShapeID
10009
10010             Returns:
10011                 New GEOM.GEOM_Object, containing the result shape.
10012
10013             Example of usage:
10014                 prism_faces = geompy.SubShapeAllSortedCentres(prism, geompy.ShapeType["FACE"])
10015                 f_ind_1 = geompy.GetSubShapeID(prism, prism_faces[0])
10016                 f_ind_2 = geompy.GetSubShapeID(prism, prism_faces[1])
10017                 chamfer_e = geompy.MakeChamferEdge(prism, 10., 10., f_ind_1, f_ind_2)
10018             """
10019             # Example: see GEOM_TestAll.py
10020             theD1,theD2,Parameters = ParseParameters(theD1,theD2)
10021             anObj = self.LocalOp.MakeChamferEdge(theShape, theD1, theD2, theFace1, theFace2)
10022             RaiseIfFailed("MakeChamferEdge", self.LocalOp)
10023             anObj.SetParameters(Parameters)
10024             self._autoPublish(anObj, theName, "chamfer")
10025             return anObj
10026
10027         ## Perform a chamfer on edges
10028         #  @param theShape Shape, to perform chamfer on.
10029         #  @param theD Chamfer length
10030         #  @param theAngle Angle of chamfer (angle in radians or a name of variable which defines angle in degrees)
10031         #  @param theFace1,theFace2 Global indices of two faces of \a theShape.
10032         #  @param theName Object name; when specified, this parameter is used
10033         #         for result publication in the study. Otherwise, if automatic
10034         #         publication is switched on, default value is used for result name.
10035         #
10036         #  @note Global index of sub-shape can be obtained, using method GetSubShapeID().
10037         #
10038         #  @return New GEOM.GEOM_Object, containing the result shape.
10039         @ManageTransactions("LocalOp")
10040         def MakeChamferEdgeAD(self, theShape, theD, theAngle, theFace1, theFace2, theName=None):
10041             """
10042             Perform a chamfer on edges
10043
10044             Parameters:
10045                 theShape Shape, to perform chamfer on.
10046                 theD1 Chamfer size along theFace1.
10047                 theAngle Angle of chamfer (angle in radians or a name of variable which defines angle in degrees).
10048                 theFace1,theFace2 Global indices of two faces of theShape.
10049                 theName Object name; when specified, this parameter is used
10050                         for result publication in the study. Otherwise, if automatic
10051                         publication is switched on, default value is used for result name.
10052
10053             Note:
10054                 Global index of sub-shape can be obtained, using method geompy.GetSubShapeID
10055
10056             Returns:
10057                 New GEOM.GEOM_Object, containing the result shape.
10058
10059             Example of usage:
10060                 prism_faces = geompy.SubShapeAllSortedCentres(prism, geompy.ShapeType["FACE"])
10061                 f_ind_1 = geompy.GetSubShapeID(prism, prism_faces[0])
10062                 f_ind_2 = geompy.GetSubShapeID(prism, prism_faces[1])
10063                 ang = 30
10064                 chamfer_e = geompy.MakeChamferEdge(prism, 10., ang, f_ind_1, f_ind_2)
10065             """
10066             flag = False
10067             if isinstance(theAngle,str):
10068                 flag = True
10069             theD,theAngle,Parameters = ParseParameters(theD,theAngle)
10070             if flag:
10071                 theAngle = theAngle*math.pi/180.0
10072             anObj = self.LocalOp.MakeChamferEdgeAD(theShape, theD, theAngle, theFace1, theFace2)
10073             RaiseIfFailed("MakeChamferEdgeAD", self.LocalOp)
10074             anObj.SetParameters(Parameters)
10075             self._autoPublish(anObj, theName, "chamfer")
10076             return anObj
10077
10078         ## Perform a chamfer on all edges of the specified faces,
10079         #  with distance D1 on the first specified face (if several for one edge)
10080         #  @param theShape Shape, to perform chamfer on.
10081         #  @param theD1 Chamfer size along face from \a theFaces. If both faces,
10082         #               connected to the edge, are in \a theFaces, \a theD1
10083         #               will be get along face, which is nearer to \a theFaces beginning.
10084         #  @param theD2 Chamfer size along another of two faces, connected to the edge.
10085         #  @param theFaces Sequence of global indices of faces of \a theShape.
10086         #  @param theName Object name; when specified, this parameter is used
10087         #         for result publication in the study. Otherwise, if automatic
10088         #         publication is switched on, default value is used for result name.
10089         #
10090         #  @note Global index of sub-shape can be obtained, using method GetSubShapeID().
10091         #
10092         #  @return New GEOM.GEOM_Object, containing the result shape.
10093         #
10094         #  @ref tui_chamfer "Example"
10095         @ManageTransactions("LocalOp")
10096         def MakeChamferFaces(self, theShape, theD1, theD2, theFaces, theName=None):
10097             """
10098             Perform a chamfer on all edges of the specified faces,
10099             with distance D1 on the first specified face (if several for one edge)
10100
10101             Parameters:
10102                 theShape Shape, to perform chamfer on.
10103                 theD1 Chamfer size along face from  theFaces. If both faces,
10104                       connected to the edge, are in theFaces, theD1
10105                       will be get along face, which is nearer to theFaces beginning.
10106                 theD2 Chamfer size along another of two faces, connected to the edge.
10107                 theFaces Sequence of global indices of faces of theShape.
10108                 theName Object name; when specified, this parameter is used
10109                         for result publication in the study. Otherwise, if automatic
10110                         publication is switched on, default value is used for result name.
10111
10112             Note: Global index of sub-shape can be obtained, using method geompy.GetSubShapeID().
10113
10114             Returns:
10115                 New GEOM.GEOM_Object, containing the result shape.
10116             """
10117             # Example: see GEOM_TestAll.py
10118             theD1,theD2,Parameters = ParseParameters(theD1,theD2)
10119             anObj = self.LocalOp.MakeChamferFaces(theShape, theD1, theD2, theFaces)
10120             RaiseIfFailed("MakeChamferFaces", self.LocalOp)
10121             anObj.SetParameters(Parameters)
10122             self._autoPublish(anObj, theName, "chamfer")
10123             return anObj
10124
10125         ## The Same that MakeChamferFaces() but with params theD is chamfer lenght and
10126         #  theAngle is Angle of chamfer (angle in radians or a name of variable which defines angle in degrees)
10127         #
10128         #  @ref swig_FilletChamfer "Example"
10129         @ManageTransactions("LocalOp")
10130         def MakeChamferFacesAD(self, theShape, theD, theAngle, theFaces, theName=None):
10131             """
10132             The Same that geompy.MakeChamferFaces but with params theD is chamfer lenght and
10133             theAngle is Angle of chamfer (angle in radians or a name of variable which defines angle in degrees)
10134             """
10135             flag = False
10136             if isinstance(theAngle,str):
10137                 flag = True
10138             theD,theAngle,Parameters = ParseParameters(theD,theAngle)
10139             if flag:
10140                 theAngle = theAngle*math.pi/180.0
10141             anObj = self.LocalOp.MakeChamferFacesAD(theShape, theD, theAngle, theFaces)
10142             RaiseIfFailed("MakeChamferFacesAD", self.LocalOp)
10143             anObj.SetParameters(Parameters)
10144             self._autoPublish(anObj, theName, "chamfer")
10145             return anObj
10146
10147         ## Perform a chamfer on edges,
10148         #  with distance D1 on the first specified face (if several for one edge)
10149         #  @param theShape Shape, to perform chamfer on.
10150         #  @param theD1,theD2 Chamfer size
10151         #  @param theEdges Sequence of edges of \a theShape.
10152         #  @param theName Object name; when specified, this parameter is used
10153         #         for result publication in the study. Otherwise, if automatic
10154         #         publication is switched on, default value is used for result name.
10155         #
10156         #  @return New GEOM.GEOM_Object, containing the result shape.
10157         #
10158         #  @ref swig_FilletChamfer "Example"
10159         @ManageTransactions("LocalOp")
10160         def MakeChamferEdges(self, theShape, theD1, theD2, theEdges, theName=None):
10161             """
10162             Perform a chamfer on edges,
10163             with distance D1 on the first specified face (if several for one edge)
10164
10165             Parameters:
10166                 theShape Shape, to perform chamfer on.
10167                 theD1,theD2 Chamfer size
10168                 theEdges Sequence of edges of theShape.
10169                 theName Object name; when specified, this parameter is used
10170                         for result publication in the study. Otherwise, if automatic
10171                         publication is switched on, default value is used for result name.
10172
10173             Returns:
10174                 New GEOM.GEOM_Object, containing the result shape.
10175             """
10176             theD1,theD2,Parameters = ParseParameters(theD1,theD2)
10177             anObj = self.LocalOp.MakeChamferEdges(theShape, theD1, theD2, theEdges)
10178             RaiseIfFailed("MakeChamferEdges", self.LocalOp)
10179             anObj.SetParameters(Parameters)
10180             self._autoPublish(anObj, theName, "chamfer")
10181             return anObj
10182
10183         ## The Same that MakeChamferEdges() but with params theD is chamfer lenght and
10184         #  theAngle is Angle of chamfer (angle in radians or a name of variable which defines angle in degrees)
10185         @ManageTransactions("LocalOp")
10186         def MakeChamferEdgesAD(self, theShape, theD, theAngle, theEdges, theName=None):
10187             """
10188             The Same that geompy.MakeChamferEdges but with params theD is chamfer lenght and
10189             theAngle is Angle of chamfer (angle in radians or a name of variable which defines angle in degrees)
10190             """
10191             flag = False
10192             if isinstance(theAngle,str):
10193                 flag = True
10194             theD,theAngle,Parameters = ParseParameters(theD,theAngle)
10195             if flag:
10196                 theAngle = theAngle*math.pi/180.0
10197             anObj = self.LocalOp.MakeChamferEdgesAD(theShape, theD, theAngle, theEdges)
10198             RaiseIfFailed("MakeChamferEdgesAD", self.LocalOp)
10199             anObj.SetParameters(Parameters)
10200             self._autoPublish(anObj, theName, "chamfer")
10201             return anObj
10202
10203         ## @sa MakeChamferEdge(), MakeChamferFaces()
10204         #
10205         #  @ref swig_MakeChamfer "Example"
10206         def MakeChamfer(self, aShape, d1, d2, aShapeType, ListShape, theName=None):
10207             """
10208             See geompy.MakeChamferEdge() and geompy.MakeChamferFaces() functions for more information.
10209             """
10210             # Example: see GEOM_TestOthers.py
10211             anObj = None
10212             # note: auto-publishing is done in self.MakeChamferEdge() or self.MakeChamferFaces()
10213             if aShapeType == self.ShapeType["EDGE"]:
10214                 anObj = self.MakeChamferEdge(aShape,d1,d2,ListShape[0],ListShape[1],theName)
10215             else:
10216                 anObj = self.MakeChamferFaces(aShape,d1,d2,ListShape,theName)
10217             return anObj
10218
10219         ## Remove material from a solid by extrusion of the base shape on the given distance.
10220         #  @param theInit Shape to remove material from. It must be a solid or
10221         #  a compound made of a single solid.
10222         #  @param theBase Closed edge or wire defining the base shape to be extruded.
10223         #  @param theH Prism dimension along the normal to theBase
10224         #  @param theAngle Draft angle in degrees.
10225         #  @param theInvert If true material changes the direction
10226         #  @param theName Object name; when specified, this parameter is used
10227         #         for result publication in the study. Otherwise, if automatic
10228         #         publication is switched on, default value is used for result name.
10229         #
10230         #  @return New GEOM.GEOM_Object, containing the initial shape with removed material
10231         #
10232         #  @ref tui_creation_prism "Example"
10233         @ManageTransactions("PrimOp")
10234         def MakeExtrudedCut(self, theInit, theBase, theH, theAngle, theInvert=False, theName=None):
10235             """
10236             Add material to a solid by extrusion of the base shape on the given distance.
10237
10238             Parameters:
10239                 theInit Shape to remove material from. It must be a solid or a compound made of a single solid.
10240                 theBase Closed edge or wire defining the base shape to be extruded.
10241                 theH Prism dimension along the normal  to theBase
10242                 theAngle Draft angle in degrees.
10243                 theInvert If true material changes the direction.
10244                 theName Object name; when specified, this parameter is used
10245                         for result publication in the study. Otherwise, if automatic
10246                         publication is switched on, default value is used for result name.
10247
10248             Returns:
10249                 New GEOM.GEOM_Object,  containing the initial shape with removed material.
10250             """
10251             # Example: see GEOM_TestAll.py
10252             theH,theAngle,Parameters = ParseParameters(theH,theAngle)
10253             anObj = self.PrimOp.MakeDraftPrism(theInit, theBase, theH, theAngle, False, theInvert)
10254             RaiseIfFailed("MakeExtrudedBoss", self.PrimOp)
10255             anObj.SetParameters(Parameters)
10256             self._autoPublish(anObj, theName, "extrudedCut")
10257             return anObj
10258
10259         ## Add material to a solid by extrusion of the base shape on the given distance.
10260         #  @param theInit Shape to add material to. It must be a solid or
10261         #  a compound made of a single solid.
10262         #  @param theBase Closed edge or wire defining the base shape to be extruded.
10263         #  @param theH Prism dimension along the normal to theBase
10264         #  @param theAngle Draft angle in degrees.
10265         #  @param theInvert If true material changes the direction
10266         #  @param theName Object name; when specified, this parameter is used
10267         #         for result publication in the study. Otherwise, if automatic
10268         #         publication is switched on, default value is used for result name.
10269         #
10270         #  @return New GEOM.GEOM_Object, containing the initial shape with added material
10271         #
10272         #  @ref tui_creation_prism "Example"
10273         @ManageTransactions("PrimOp")
10274         def MakeExtrudedBoss(self, theInit, theBase, theH, theAngle, theInvert=False, theName=None):
10275             """
10276             Add material to a solid by extrusion of the base shape on the given distance.
10277
10278             Parameters:
10279                 theInit Shape to add material to. It must be a solid or a compound made of a single solid.
10280                 theBase Closed edge or wire defining the base shape to be extruded.
10281                 theH Prism dimension along the normal  to theBase
10282                 theAngle Draft angle in degrees.
10283                 theInvert If true material changes the direction.
10284                 theName Object name; when specified, this parameter is used
10285                         for result publication in the study. Otherwise, if automatic
10286                         publication is switched on, default value is used for result name.
10287
10288             Returns:
10289                 New GEOM.GEOM_Object,  containing the initial shape with added material.
10290             """
10291             # Example: see GEOM_TestAll.py
10292             theH,theAngle,Parameters = ParseParameters(theH,theAngle)
10293             anObj = self.PrimOp.MakeDraftPrism(theInit, theBase, theH, theAngle, True, theInvert)
10294             RaiseIfFailed("MakeExtrudedBoss", self.PrimOp)
10295             anObj.SetParameters(Parameters)
10296             self._autoPublish(anObj, theName, "extrudedBoss")
10297             return anObj
10298
10299         # end of l3_local
10300         ## @}
10301
10302         ## @addtogroup l3_basic_op
10303         ## @{
10304
10305         ## Perform an Archimde operation on the given shape with given parameters.
10306         #  The object presenting the resulting face is returned.
10307         #  @param theShape Shape to be put in water.
10308         #  @param theWeight Weight of the shape.
10309         #  @param theWaterDensity Density of the water.
10310         #  @param theMeshDeflection Deflection of the mesh, using to compute the section.
10311         #  @param theName Object name; when specified, this parameter is used
10312         #         for result publication in the study. Otherwise, if automatic
10313         #         publication is switched on, default value is used for result name.
10314         #
10315         #  @return New GEOM.GEOM_Object, containing a section of \a theShape
10316         #          by a plane, corresponding to water level.
10317         #
10318         #  @ref tui_archimede "Example"
10319         @ManageTransactions("LocalOp")
10320         def Archimede(self, theShape, theWeight, theWaterDensity, theMeshDeflection, theName=None):
10321             """
10322             Perform an Archimde operation on the given shape with given parameters.
10323             The object presenting the resulting face is returned.
10324
10325             Parameters:
10326                 theShape Shape to be put in water.
10327                 theWeight Weight of the shape.
10328                 theWaterDensity Density of the water.
10329                 theMeshDeflection Deflection of the mesh, using to compute the section.
10330                 theName Object name; when specified, this parameter is used
10331                         for result publication in the study. Otherwise, if automatic
10332                         publication is switched on, default value is used for result name.
10333
10334             Returns:
10335                 New GEOM.GEOM_Object, containing a section of theShape
10336                 by a plane, corresponding to water level.
10337             """
10338             # Example: see GEOM_TestAll.py
10339             theWeight,theWaterDensity,theMeshDeflection,Parameters = ParseParameters(
10340               theWeight,theWaterDensity,theMeshDeflection)
10341             anObj = self.LocalOp.MakeArchimede(theShape, theWeight, theWaterDensity, theMeshDeflection)
10342             RaiseIfFailed("MakeArchimede", self.LocalOp)
10343             anObj.SetParameters(Parameters)
10344             self._autoPublish(anObj, theName, "archimede")
10345             return anObj
10346
10347         # end of l3_basic_op
10348         ## @}
10349
10350         ## @addtogroup l2_measure
10351         ## @{
10352
10353         ## Get point coordinates
10354         #  @return [x, y, z]
10355         #
10356         #  @ref tui_point_coordinates_page "Example"
10357         @ManageTransactions("MeasuOp")
10358         def PointCoordinates(self,Point):
10359             """
10360             Get point coordinates
10361
10362             Returns:
10363                 [x, y, z]
10364             """
10365             # Example: see GEOM_TestMeasures.py
10366             aTuple = self.MeasuOp.PointCoordinates(Point)
10367             RaiseIfFailed("PointCoordinates", self.MeasuOp)
10368             return aTuple
10369
10370         ## Get vector coordinates
10371         #  @return [x, y, z]
10372         #
10373         #  @ref tui_measurement_tools_page "Example"
10374         def VectorCoordinates(self,Vector):
10375             """
10376             Get vector coordinates
10377
10378             Returns:
10379                 [x, y, z]
10380             """
10381
10382             p1=self.GetFirstVertex(Vector)
10383             p2=self.GetLastVertex(Vector)
10384
10385             X1=self.PointCoordinates(p1)
10386             X2=self.PointCoordinates(p2)
10387
10388             return (X2[0]-X1[0],X2[1]-X1[1],X2[2]-X1[2])
10389
10390
10391         ## Compute cross product
10392         #  @return vector w=u^v
10393         #
10394         #  @ref tui_measurement_tools_page "Example"
10395         def CrossProduct(self, Vector1, Vector2):
10396             """
10397             Compute cross product
10398
10399             Returns: vector w=u^v
10400             """
10401             u=self.VectorCoordinates(Vector1)
10402             v=self.VectorCoordinates(Vector2)
10403             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])
10404
10405             return w
10406
10407         ## Compute cross product
10408         #  @return dot product  p=u.v
10409         #
10410         #  @ref tui_measurement_tools_page "Example"
10411         def DotProduct(self, Vector1, Vector2):
10412             """
10413             Compute cross product
10414
10415             Returns: dot product  p=u.v
10416             """
10417             u=self.VectorCoordinates(Vector1)
10418             v=self.VectorCoordinates(Vector2)
10419             p=u[0]*v[0]+u[1]*v[1]+u[2]*v[2]
10420
10421             return p
10422
10423
10424         ## Get summarized length of all wires,
10425         #  area of surface and volume of the given shape.
10426         #  @param theShape Shape to define properties of.
10427         #  @return [theLength, theSurfArea, theVolume]\n
10428         #  theLength:   Summarized length of all wires of the given shape.\n
10429         #  theSurfArea: Area of surface of the given shape.\n
10430         #  theVolume:   Volume of the given shape.
10431         #
10432         #  @ref tui_basic_properties_page "Example"
10433         @ManageTransactions("MeasuOp")
10434         def BasicProperties(self,theShape):
10435             """
10436             Get summarized length of all wires,
10437             area of surface and volume of the given shape.
10438
10439             Parameters:
10440                 theShape Shape to define properties of.
10441
10442             Returns:
10443                 [theLength, theSurfArea, theVolume]
10444                  theLength:   Summarized length of all wires of the given shape.
10445                  theSurfArea: Area of surface of the given shape.
10446                  theVolume:   Volume of the given shape.
10447             """
10448             # Example: see GEOM_TestMeasures.py
10449             aTuple = self.MeasuOp.GetBasicProperties(theShape)
10450             RaiseIfFailed("GetBasicProperties", self.MeasuOp)
10451             return aTuple
10452
10453         ## Get parameters of bounding box of the given shape
10454         #  @param theShape Shape to obtain bounding box of.
10455         #  @param precise TRUE for precise computation; FALSE for fast one.
10456         #  @return [Xmin,Xmax, Ymin,Ymax, Zmin,Zmax]
10457         #  Xmin,Xmax: Limits of shape along OX axis.
10458         #  Ymin,Ymax: Limits of shape along OY axis.
10459         #  Zmin,Zmax: Limits of shape along OZ axis.
10460         #
10461         #  @ref tui_bounding_box_page "Example"
10462         @ManageTransactions("MeasuOp")
10463         def BoundingBox (self, theShape, precise=False):
10464             """
10465             Get parameters of bounding box of the given shape
10466
10467             Parameters:
10468                 theShape Shape to obtain bounding box of.
10469                 precise TRUE for precise computation; FALSE for fast one.
10470
10471             Returns:
10472                 [Xmin,Xmax, Ymin,Ymax, Zmin,Zmax]
10473                  Xmin,Xmax: Limits of shape along OX axis.
10474                  Ymin,Ymax: Limits of shape along OY axis.
10475                  Zmin,Zmax: Limits of shape along OZ axis.
10476             """
10477             # Example: see GEOM_TestMeasures.py
10478             aTuple = self.MeasuOp.GetBoundingBox(theShape, precise)
10479             RaiseIfFailed("GetBoundingBox", self.MeasuOp)
10480             return aTuple
10481
10482         ## Get bounding box of the given shape
10483         #  @param theShape Shape to obtain bounding box of.
10484         #  @param precise TRUE for precise computation; FALSE for fast one.
10485         #  @param theName Object name; when specified, this parameter is used
10486         #         for result publication in the study. Otherwise, if automatic
10487         #         publication is switched on, default value is used for result name.
10488         #
10489         #  @return New GEOM.GEOM_Object, containing the created box.
10490         #
10491         #  @ref tui_bounding_box_page "Example"
10492         @ManageTransactions("MeasuOp")
10493         def MakeBoundingBox (self, theShape, precise=False, theName=None):
10494             """
10495             Get bounding box of the given shape
10496
10497             Parameters:
10498                 theShape Shape to obtain bounding box of.
10499                 precise TRUE for precise computation; FALSE for fast one.
10500                 theName Object name; when specified, this parameter is used
10501                         for result publication in the study. Otherwise, if automatic
10502                         publication is switched on, default value is used for result name.
10503
10504             Returns:
10505                 New GEOM.GEOM_Object, containing the created box.
10506             """
10507             # Example: see GEOM_TestMeasures.py
10508             anObj = self.MeasuOp.MakeBoundingBox(theShape, precise)
10509             RaiseIfFailed("MakeBoundingBox", self.MeasuOp)
10510             self._autoPublish(anObj, theName, "bndbox")
10511             return anObj
10512
10513         ## Get inertia matrix and moments of inertia of theShape.
10514         #  @param theShape Shape to calculate inertia of.
10515         #  @return [I11,I12,I13, I21,I22,I23, I31,I32,I33, Ix,Iy,Iz]
10516         #  I(1-3)(1-3): Components of the inertia matrix of the given shape.
10517         #  Ix,Iy,Iz:    Moments of inertia of the given shape.
10518         #
10519         #  @ref tui_inertia_page "Example"
10520         @ManageTransactions("MeasuOp")
10521         def Inertia(self,theShape):
10522             """
10523             Get inertia matrix and moments of inertia of theShape.
10524
10525             Parameters:
10526                 theShape Shape to calculate inertia of.
10527
10528             Returns:
10529                 [I11,I12,I13, I21,I22,I23, I31,I32,I33, Ix,Iy,Iz]
10530                  I(1-3)(1-3): Components of the inertia matrix of the given shape.
10531                  Ix,Iy,Iz:    Moments of inertia of the given shape.
10532             """
10533             # Example: see GEOM_TestMeasures.py
10534             aTuple = self.MeasuOp.GetInertia(theShape)
10535             RaiseIfFailed("GetInertia", self.MeasuOp)
10536             return aTuple
10537
10538         ## Get if coords are included in the shape (ST_IN or ST_ON)
10539         #  @param theShape Shape
10540         #  @param coords list of points coordinates [x1, y1, z1, x2, y2, z2, ...]
10541         #  @param tolerance to be used (default is 1.0e-7)
10542         #  @return list_of_boolean = [res1, res2, ...]
10543         @ManageTransactions("MeasuOp")
10544         def AreCoordsInside(self, theShape, coords, tolerance=1.e-7):
10545             """
10546             Get if coords are included in the shape (ST_IN or ST_ON)
10547
10548             Parameters:
10549                 theShape Shape
10550                 coords list of points coordinates [x1, y1, z1, x2, y2, z2, ...]
10551                 tolerance to be used (default is 1.0e-7)
10552
10553             Returns:
10554                 list_of_boolean = [res1, res2, ...]
10555             """
10556             return self.MeasuOp.AreCoordsInside(theShape, coords, tolerance)
10557
10558         ## Get minimal distance between the given shapes.
10559         #  @param theShape1,theShape2 Shapes to find minimal distance between.
10560         #  @return Value of the minimal distance between the given shapes.
10561         #
10562         #  @ref tui_min_distance_page "Example"
10563         @ManageTransactions("MeasuOp")
10564         def MinDistance(self, theShape1, theShape2):
10565             """
10566             Get minimal distance between the given shapes.
10567
10568             Parameters:
10569                 theShape1,theShape2 Shapes to find minimal distance between.
10570
10571             Returns:
10572                 Value of the minimal distance between the given shapes.
10573             """
10574             # Example: see GEOM_TestMeasures.py
10575             aTuple = self.MeasuOp.GetMinDistance(theShape1, theShape2)
10576             RaiseIfFailed("GetMinDistance", self.MeasuOp)
10577             return aTuple[0]
10578
10579         ## Get minimal distance between the given shapes.
10580         #  @param theShape1,theShape2 Shapes to find minimal distance between.
10581         #  @return Value of the minimal distance between the given shapes, in form of list
10582         #          [Distance, DX, DY, DZ].
10583         #
10584         #  @ref tui_min_distance_page "Example"
10585         @ManageTransactions("MeasuOp")
10586         def MinDistanceComponents(self, theShape1, theShape2):
10587             """
10588             Get minimal distance between the given shapes.
10589
10590             Parameters:
10591                 theShape1,theShape2 Shapes to find minimal distance between.
10592
10593             Returns:
10594                 Value of the minimal distance between the given shapes, in form of list
10595                 [Distance, DX, DY, DZ]
10596             """
10597             # Example: see GEOM_TestMeasures.py
10598             aTuple = self.MeasuOp.GetMinDistance(theShape1, theShape2)
10599             RaiseIfFailed("GetMinDistance", self.MeasuOp)
10600             aRes = [aTuple[0], aTuple[4] - aTuple[1], aTuple[5] - aTuple[2], aTuple[6] - aTuple[3]]
10601             return aRes
10602
10603         ## Get closest points of the given shapes.
10604         #  @param theShape1,theShape2 Shapes to find closest points of.
10605         #  @return The number of found solutions (-1 in case of infinite number of
10606         #          solutions) and a list of (X, Y, Z) coordinates for all couples of points.
10607         #
10608         #  @ref tui_min_distance_page "Example"
10609         @ManageTransactions("MeasuOp")
10610         def ClosestPoints (self, theShape1, theShape2):
10611             """
10612             Get closest points of the given shapes.
10613
10614             Parameters:
10615                 theShape1,theShape2 Shapes to find closest points of.
10616
10617             Returns:
10618                 The number of found solutions (-1 in case of infinite number of
10619                 solutions) and a list of (X, Y, Z) coordinates for all couples of points.
10620             """
10621             # Example: see GEOM_TestMeasures.py
10622             aTuple = self.MeasuOp.ClosestPoints(theShape1, theShape2)
10623             RaiseIfFailed("ClosestPoints", self.MeasuOp)
10624             return aTuple
10625
10626         ## Get angle between the given shapes in degrees.
10627         #  @param theShape1,theShape2 Lines or linear edges to find angle between.
10628         #  @note If both arguments are vectors, the angle is computed in accordance
10629         #        with their orientations, otherwise the minimum angle is computed.
10630         #  @return Value of the angle between the given shapes in degrees.
10631         #
10632         #  @ref tui_angle_page "Example"
10633         @ManageTransactions("MeasuOp")
10634         def GetAngle(self, theShape1, theShape2):
10635             """
10636             Get angle between the given shapes in degrees.
10637
10638             Parameters:
10639                 theShape1,theShape2 Lines or linear edges to find angle between.
10640
10641             Note:
10642                 If both arguments are vectors, the angle is computed in accordance
10643                 with their orientations, otherwise the minimum angle is computed.
10644
10645             Returns:
10646                 Value of the angle between the given shapes in degrees.
10647             """
10648             # Example: see GEOM_TestMeasures.py
10649             anAngle = self.MeasuOp.GetAngle(theShape1, theShape2)
10650             RaiseIfFailed("GetAngle", self.MeasuOp)
10651             return anAngle
10652
10653         ## Get angle between the given shapes in radians.
10654         #  @param theShape1,theShape2 Lines or linear edges to find angle between.
10655         #  @note If both arguments are vectors, the angle is computed in accordance
10656         #        with their orientations, otherwise the minimum angle is computed.
10657         #  @return Value of the angle between the given shapes in radians.
10658         #
10659         #  @ref tui_angle_page "Example"
10660         @ManageTransactions("MeasuOp")
10661         def GetAngleRadians(self, theShape1, theShape2):
10662             """
10663             Get angle between the given shapes in radians.
10664
10665             Parameters:
10666                 theShape1,theShape2 Lines or linear edges to find angle between.
10667
10668
10669             Note:
10670                 If both arguments are vectors, the angle is computed in accordance
10671                 with their orientations, otherwise the minimum angle is computed.
10672
10673             Returns:
10674                 Value of the angle between the given shapes in radians.
10675             """
10676             # Example: see GEOM_TestMeasures.py
10677             anAngle = self.MeasuOp.GetAngle(theShape1, theShape2)*math.pi/180.
10678             RaiseIfFailed("GetAngle", self.MeasuOp)
10679             return anAngle
10680
10681         ## Get angle between the given vectors in degrees.
10682         #  @param theShape1,theShape2 Vectors to find angle between.
10683         #  @param theFlag If True, the normal vector is defined by the two vectors cross,
10684         #                 if False, the opposite vector to the normal vector is used.
10685         #  @return Value of the angle between the given vectors in degrees.
10686         #
10687         #  @ref tui_angle_page "Example"
10688         @ManageTransactions("MeasuOp")
10689         def GetAngleVectors(self, theShape1, theShape2, theFlag = True):
10690             """
10691             Get angle between the given vectors in degrees.
10692
10693             Parameters:
10694                 theShape1,theShape2 Vectors to find angle between.
10695                 theFlag If True, the normal vector is defined by the two vectors cross,
10696                         if False, the opposite vector to the normal vector is used.
10697
10698             Returns:
10699                 Value of the angle between the given vectors in degrees.
10700             """
10701             anAngle = self.MeasuOp.GetAngleBtwVectors(theShape1, theShape2)
10702             if not theFlag:
10703                 anAngle = 360. - anAngle
10704             RaiseIfFailed("GetAngleVectors", self.MeasuOp)
10705             return anAngle
10706
10707         ## The same as GetAngleVectors, but the result is in radians.
10708         def GetAngleRadiansVectors(self, theShape1, theShape2, theFlag = True):
10709             """
10710             Get angle between the given vectors in radians.
10711
10712             Parameters:
10713                 theShape1,theShape2 Vectors to find angle between.
10714                 theFlag If True, the normal vector is defined by the two vectors cross,
10715                         if False, the opposite vector to the normal vector is used.
10716
10717             Returns:
10718                 Value of the angle between the given vectors in radians.
10719             """
10720             anAngle = self.GetAngleVectors(theShape1, theShape2, theFlag)*math.pi/180.
10721             return anAngle
10722
10723         ## @name Curve Curvature Measurement
10724         #  Methods for receiving radius of curvature of curves
10725         #  in the given point
10726         ## @{
10727
10728         ## Measure curvature of a curve at a point, set by parameter.
10729         #  @param theCurve a curve.
10730         #  @param theParam parameter.
10731         #  @return radius of curvature of \a theCurve.
10732         #
10733         #  @ref swig_todo "Example"
10734         @ManageTransactions("MeasuOp")
10735         def CurveCurvatureByParam(self, theCurve, theParam):
10736             """
10737             Measure curvature of a curve at a point, set by parameter.
10738
10739             Parameters:
10740                 theCurve a curve.
10741                 theParam parameter.
10742
10743             Returns:
10744                 radius of curvature of theCurve.
10745             """
10746             # Example: see GEOM_TestMeasures.py
10747             aCurv = self.MeasuOp.CurveCurvatureByParam(theCurve,theParam)
10748             RaiseIfFailed("CurveCurvatureByParam", self.MeasuOp)
10749             return aCurv
10750
10751         ## Measure curvature of a curve at a point.
10752         #  @param theCurve a curve.
10753         #  @param thePoint given point.
10754         #  @return radius of curvature of \a theCurve.
10755         #
10756         #  @ref swig_todo "Example"
10757         @ManageTransactions("MeasuOp")
10758         def CurveCurvatureByPoint(self, theCurve, thePoint):
10759             """
10760             Measure curvature of a curve at a point.
10761
10762             Parameters:
10763                 theCurve a curve.
10764                 thePoint given point.
10765
10766             Returns:
10767                 radius of curvature of theCurve.
10768             """
10769             aCurv = self.MeasuOp.CurveCurvatureByPoint(theCurve,thePoint)
10770             RaiseIfFailed("CurveCurvatureByPoint", self.MeasuOp)
10771             return aCurv
10772         ## @}
10773
10774         ## @name Surface Curvature Measurement
10775         #  Methods for receiving max and min radius of curvature of surfaces
10776         #  in the given point
10777         ## @{
10778
10779         ## Measure max radius of curvature of surface.
10780         #  @param theSurf the given surface.
10781         #  @param theUParam Value of U-parameter on the referenced surface.
10782         #  @param theVParam Value of V-parameter on the referenced surface.
10783         #  @return max radius of curvature of theSurf.
10784         #
10785         ## @ref swig_todo "Example"
10786         @ManageTransactions("MeasuOp")
10787         def MaxSurfaceCurvatureByParam(self, theSurf, theUParam, theVParam):
10788             """
10789             Measure max radius of curvature of surface.
10790
10791             Parameters:
10792                 theSurf the given surface.
10793                 theUParam Value of U-parameter on the referenced surface.
10794                 theVParam Value of V-parameter on the referenced surface.
10795
10796             Returns:
10797                 max radius of curvature of theSurf.
10798             """
10799             # Example: see GEOM_TestMeasures.py
10800             aSurf = self.MeasuOp.MaxSurfaceCurvatureByParam(theSurf,theUParam,theVParam)
10801             RaiseIfFailed("MaxSurfaceCurvatureByParam", self.MeasuOp)
10802             return aSurf
10803
10804         ## Measure max radius of curvature of surface in the given point
10805         #  @param theSurf the given surface.
10806         #  @param thePoint given point.
10807         #  @return max radius of curvature of theSurf.
10808         #
10809         ## @ref swig_todo "Example"
10810         @ManageTransactions("MeasuOp")
10811         def MaxSurfaceCurvatureByPoint(self, theSurf, thePoint):
10812             """
10813             Measure max radius of curvature of surface in the given point.
10814
10815             Parameters:
10816                 theSurf the given surface.
10817                 thePoint given point.
10818
10819             Returns:
10820                 max radius of curvature of theSurf.
10821             """
10822             aSurf = self.MeasuOp.MaxSurfaceCurvatureByPoint(theSurf,thePoint)
10823             RaiseIfFailed("MaxSurfaceCurvatureByPoint", self.MeasuOp)
10824             return aSurf
10825
10826         ## Measure min radius of curvature of surface.
10827         #  @param theSurf the given surface.
10828         #  @param theUParam Value of U-parameter on the referenced surface.
10829         #  @param theVParam Value of V-parameter on the referenced surface.
10830         #  @return min radius of curvature of theSurf.
10831         #
10832         ## @ref swig_todo "Example"
10833         @ManageTransactions("MeasuOp")
10834         def MinSurfaceCurvatureByParam(self, theSurf, theUParam, theVParam):
10835             """
10836             Measure min radius of curvature of surface.
10837
10838             Parameters:
10839                 theSurf the given surface.
10840                 theUParam Value of U-parameter on the referenced surface.
10841                 theVParam Value of V-parameter on the referenced surface.
10842
10843             Returns:
10844                 Min radius of curvature of theSurf.
10845             """
10846             aSurf = self.MeasuOp.MinSurfaceCurvatureByParam(theSurf,theUParam,theVParam)
10847             RaiseIfFailed("MinSurfaceCurvatureByParam", self.MeasuOp)
10848             return aSurf
10849
10850         ## Measure min radius of curvature of surface in the given point
10851         #  @param theSurf the given surface.
10852         #  @param thePoint given point.
10853         #  @return min radius of curvature of theSurf.
10854         #
10855         ## @ref swig_todo "Example"
10856         @ManageTransactions("MeasuOp")
10857         def MinSurfaceCurvatureByPoint(self, theSurf, thePoint):
10858             """
10859             Measure min radius of curvature of surface in the given point.
10860
10861             Parameters:
10862                 theSurf the given surface.
10863                 thePoint given point.
10864
10865             Returns:
10866                 Min radius of curvature of theSurf.
10867             """
10868             aSurf = self.MeasuOp.MinSurfaceCurvatureByPoint(theSurf,thePoint)
10869             RaiseIfFailed("MinSurfaceCurvatureByPoint", self.MeasuOp)
10870             return aSurf
10871         ## @}
10872
10873         ## Get min and max tolerances of sub-shapes of theShape
10874         #  @param theShape Shape, to get tolerances of.
10875         #  @return [FaceMin,FaceMax, EdgeMin,EdgeMax, VertMin,VertMax]\n
10876         #  FaceMin,FaceMax: Min and max tolerances of the faces.\n
10877         #  EdgeMin,EdgeMax: Min and max tolerances of the edges.\n
10878         #  VertMin,VertMax: Min and max tolerances of the vertices.
10879         #
10880         #  @ref tui_tolerance_page "Example"
10881         @ManageTransactions("MeasuOp")
10882         def Tolerance(self,theShape):
10883             """
10884             Get min and max tolerances of sub-shapes of theShape
10885
10886             Parameters:
10887                 theShape Shape, to get tolerances of.
10888
10889             Returns:
10890                 [FaceMin,FaceMax, EdgeMin,EdgeMax, VertMin,VertMax]
10891                  FaceMin,FaceMax: Min and max tolerances of the faces.
10892                  EdgeMin,EdgeMax: Min and max tolerances of the edges.
10893                  VertMin,VertMax: Min and max tolerances of the vertices.
10894             """
10895             # Example: see GEOM_TestMeasures.py
10896             aTuple = self.MeasuOp.GetTolerance(theShape)
10897             RaiseIfFailed("GetTolerance", self.MeasuOp)
10898             return aTuple
10899
10900         ## Obtain description of the given shape (number of sub-shapes of each type)
10901         #  @param theShape Shape to be described.
10902         #  @return Description of the given shape.
10903         #
10904         #  @ref tui_whatis_page "Example"
10905         @ManageTransactions("MeasuOp")
10906         def WhatIs(self,theShape):
10907             """
10908             Obtain description of the given shape (number of sub-shapes of each type)
10909
10910             Parameters:
10911                 theShape Shape to be described.
10912
10913             Returns:
10914                 Description of the given shape.
10915             """
10916             # Example: see GEOM_TestMeasures.py
10917             aDescr = self.MeasuOp.WhatIs(theShape)
10918             RaiseIfFailed("WhatIs", self.MeasuOp)
10919             return aDescr
10920
10921         ## Obtain quantity of shapes of the given type in \a theShape.
10922         #  If \a theShape is of type \a theType, it is also counted.
10923         #  @param theShape Shape to be described.
10924         #  @param theType the given ShapeType().
10925         #  @return Quantity of shapes of type \a theType in \a theShape.
10926         #
10927         #  @ref tui_measurement_tools_page "Example"
10928         def NbShapes (self, theShape, theType):
10929             """
10930             Obtain quantity of shapes of the given type in theShape.
10931             If theShape is of type theType, it is also counted.
10932
10933             Parameters:
10934                 theShape Shape to be described.
10935                 theType the given geompy.ShapeType
10936
10937             Returns:
10938                 Quantity of shapes of type theType in theShape.
10939             """
10940             # Example: see GEOM_TestMeasures.py
10941             listSh = self.SubShapeAllIDs(theShape, theType)
10942             Nb = len(listSh)
10943             return Nb
10944
10945         ## Obtain quantity of shapes of each type in \a theShape.
10946         #  The \a theShape is also counted.
10947         #  @param theShape Shape to be described.
10948         #  @return Dictionary of ShapeType() with bound quantities of shapes.
10949         #
10950         #  @ref tui_measurement_tools_page "Example"
10951         def ShapeInfo (self, theShape):
10952             """
10953             Obtain quantity of shapes of each type in theShape.
10954             The theShape is also counted.
10955
10956             Parameters:
10957                 theShape Shape to be described.
10958
10959             Returns:
10960                 Dictionary of geompy.ShapeType with bound quantities of shapes.
10961             """
10962             # Example: see GEOM_TestMeasures.py
10963             aDict = {}
10964             for typeSh in self.ShapeType:
10965                 if typeSh in ( "AUTO", "SHAPE" ): continue
10966                 listSh = self.SubShapeAllIDs(theShape, self.ShapeType[typeSh])
10967                 Nb = len(listSh)
10968                 aDict[typeSh] = Nb
10969                 pass
10970             return aDict
10971
10972         def GetCreationInformation(self, theShape):
10973             res = ''
10974             infos = theShape.GetCreationInformation()
10975             for info in infos:
10976                 # operationName
10977                 opName = info.operationName
10978                 if not opName: opName = "no info available"
10979                 if res: res += "\n"
10980                 res += "Operation: " + opName
10981                 # parameters
10982                 for parVal in info.params:
10983                     res += "\n \t%s = %s" % ( parVal.name, parVal.value )
10984             return res
10985
10986         ## Get a point, situated at the centre of mass of theShape.
10987         #  @param theShape Shape to define centre of mass of.
10988         #  @param theName Object name; when specified, this parameter is used
10989         #         for result publication in the study. Otherwise, if automatic
10990         #         publication is switched on, default value is used for result name.
10991         #
10992         #  @return New GEOM.GEOM_Object, containing the created point.
10993         #
10994         #  @ref tui_center_of_mass_page "Example"
10995         @ManageTransactions("MeasuOp")
10996         def MakeCDG(self, theShape, theName=None):
10997             """
10998             Get a point, situated at the centre of mass of theShape.
10999
11000             Parameters:
11001                 theShape Shape to define centre of mass of.
11002                 theName Object name; when specified, this parameter is used
11003                         for result publication in the study. Otherwise, if automatic
11004                         publication is switched on, default value is used for result name.
11005
11006             Returns:
11007                 New GEOM.GEOM_Object, containing the created point.
11008             """
11009             # Example: see GEOM_TestMeasures.py
11010             anObj = self.MeasuOp.GetCentreOfMass(theShape)
11011             RaiseIfFailed("GetCentreOfMass", self.MeasuOp)
11012             self._autoPublish(anObj, theName, "centerOfMass")
11013             return anObj
11014
11015         ## Get a vertex sub-shape by index depended with orientation.
11016         #  @param theShape Shape to find sub-shape.
11017         #  @param theIndex Index to find vertex by this index (starting from zero)
11018         #  @param theName Object name; when specified, this parameter is used
11019         #         for result publication in the study. Otherwise, if automatic
11020         #         publication is switched on, default value is used for result name.
11021         #
11022         #  @return New GEOM.GEOM_Object, containing the created vertex.
11023         #
11024         #  @ref tui_measurement_tools_page "Example"
11025         @ManageTransactions("MeasuOp")
11026         def GetVertexByIndex(self, theShape, theIndex, theName=None):
11027             """
11028             Get a vertex sub-shape by index depended with orientation.
11029
11030             Parameters:
11031                 theShape Shape to find sub-shape.
11032                 theIndex Index to find vertex by this index (starting from zero)
11033                 theName Object name; when specified, this parameter is used
11034                         for result publication in the study. Otherwise, if automatic
11035                         publication is switched on, default value is used for result name.
11036
11037             Returns:
11038                 New GEOM.GEOM_Object, containing the created vertex.
11039             """
11040             # Example: see GEOM_TestMeasures.py
11041             anObj = self.MeasuOp.GetVertexByIndex(theShape, theIndex)
11042             RaiseIfFailed("GetVertexByIndex", self.MeasuOp)
11043             self._autoPublish(anObj, theName, "vertex")
11044             return anObj
11045
11046         ## Get the first vertex of wire/edge depended orientation.
11047         #  @param theShape Shape to find first vertex.
11048         #  @param theName Object name; when specified, this parameter is used
11049         #         for result publication in the study. Otherwise, if automatic
11050         #         publication is switched on, default value is used for result name.
11051         #
11052         #  @return New GEOM.GEOM_Object, containing the created vertex.
11053         #
11054         #  @ref tui_measurement_tools_page "Example"
11055         def GetFirstVertex(self, theShape, theName=None):
11056             """
11057             Get the first vertex of wire/edge depended orientation.
11058
11059             Parameters:
11060                 theShape Shape to find first vertex.
11061                 theName Object name; when specified, this parameter is used
11062                         for result publication in the study. Otherwise, if automatic
11063                         publication is switched on, default value is used for result name.
11064
11065             Returns:
11066                 New GEOM.GEOM_Object, containing the created vertex.
11067             """
11068             # Example: see GEOM_TestMeasures.py
11069             # note: auto-publishing is done in self.GetVertexByIndex()
11070             return self.GetVertexByIndex(theShape, 0, theName)
11071
11072         ## Get the last vertex of wire/edge depended orientation.
11073         #  @param theShape Shape to find last vertex.
11074         #  @param theName Object name; when specified, this parameter is used
11075         #         for result publication in the study. Otherwise, if automatic
11076         #         publication is switched on, default value is used for result name.
11077         #
11078         #  @return New GEOM.GEOM_Object, containing the created vertex.
11079         #
11080         #  @ref tui_measurement_tools_page "Example"
11081         def GetLastVertex(self, theShape, theName=None):
11082             """
11083             Get the last vertex of wire/edge depended orientation.
11084
11085             Parameters:
11086                 theShape Shape to find last vertex.
11087                 theName Object name; when specified, this parameter is used
11088                         for result publication in the study. Otherwise, if automatic
11089                         publication is switched on, default value is used for result name.
11090
11091             Returns:
11092                 New GEOM.GEOM_Object, containing the created vertex.
11093             """
11094             # Example: see GEOM_TestMeasures.py
11095             nb_vert =  self.NumberOfSubShapes(theShape, self.ShapeType["VERTEX"])
11096             # note: auto-publishing is done in self.GetVertexByIndex()
11097             return self.GetVertexByIndex(theShape, (nb_vert-1), theName)
11098
11099         ## Get a normale to the given face. If the point is not given,
11100         #  the normale is calculated at the center of mass.
11101         #  @param theFace Face to define normale of.
11102         #  @param theOptionalPoint Point to compute the normale at.
11103         #  @param theName Object name; when specified, this parameter is used
11104         #         for result publication in the study. Otherwise, if automatic
11105         #         publication is switched on, default value is used for result name.
11106         #
11107         #  @return New GEOM.GEOM_Object, containing the created vector.
11108         #
11109         #  @ref swig_todo "Example"
11110         @ManageTransactions("MeasuOp")
11111         def GetNormal(self, theFace, theOptionalPoint = None, theName=None):
11112             """
11113             Get a normale to the given face. If the point is not given,
11114             the normale is calculated at the center of mass.
11115
11116             Parameters:
11117                 theFace Face to define normale of.
11118                 theOptionalPoint Point to compute the normale at.
11119                 theName Object name; when specified, this parameter is used
11120                         for result publication in the study. Otherwise, if automatic
11121                         publication is switched on, default value is used for result name.
11122
11123             Returns:
11124                 New GEOM.GEOM_Object, containing the created vector.
11125             """
11126             # Example: see GEOM_TestMeasures.py
11127             anObj = self.MeasuOp.GetNormal(theFace, theOptionalPoint)
11128             RaiseIfFailed("GetNormal", self.MeasuOp)
11129             self._autoPublish(anObj, theName, "normal")
11130             return anObj
11131
11132         ## Print shape errors obtained from CheckShape.
11133         #  @param theShape Shape that was checked.
11134         #  @param theShapeErrors the shape errors obtained by CheckShape.
11135         #  @param theReturnStatus If 0 the description of problem is printed.
11136         #                         If 1 the description of problem is returned.
11137         #  @return If theReturnStatus is equal to 1 the description is returned.
11138         #          Otherwise doesn't return anything.
11139         #
11140         #  @ref tui_check_shape_page "Example"
11141         @ManageTransactions("MeasuOp")
11142         def PrintShapeErrors(self, theShape, theShapeErrors, theReturnStatus = 0):
11143             """
11144             Print shape errors obtained from CheckShape.
11145
11146             Parameters:
11147                 theShape Shape that was checked.
11148                 theShapeErrors the shape errors obtained by CheckShape.
11149                 theReturnStatus If 0 the description of problem is printed.
11150                                 If 1 the description of problem is returned.
11151
11152             Returns:
11153                 If theReturnStatus is equal to 1 the description is returned.
11154                   Otherwise doesn't return anything.
11155             """
11156             # Example: see GEOM_TestMeasures.py
11157             Descr = self.MeasuOp.PrintShapeErrors(theShape, theShapeErrors)
11158             if theReturnStatus == 1:
11159                 return Descr
11160             print Descr
11161             pass
11162
11163         ## Check a topology of the given shape.
11164         #  @param theShape Shape to check validity of.
11165         #  @param theIsCheckGeom If FALSE, only the shape's topology will be checked, \n
11166         #                        if TRUE, the shape's geometry will be checked also.
11167         #  @param theReturnStatus If 0 and if theShape is invalid, a description
11168         #                         of problem is printed.
11169         #                         If 1 isValid flag and the description of
11170         #                         problem is returned.
11171         #                         If 2 isValid flag and the list of error data
11172         #                         is returned.
11173         #  @return TRUE, if the shape "seems to be valid".
11174         #          If theShape is invalid, prints a description of problem.
11175         #          If theReturnStatus is equal to 1 the description is returned
11176         #          along with IsValid flag.
11177         #          If theReturnStatus is equal to 2 the list of error data is
11178         #          returned along with IsValid flag.
11179         #
11180         #  @ref tui_check_shape_page "Example"
11181         @ManageTransactions("MeasuOp")
11182         def CheckShape(self,theShape, theIsCheckGeom = 0, theReturnStatus = 0):
11183             """
11184             Check a topology of the given shape.
11185
11186             Parameters:
11187                 theShape Shape to check validity of.
11188                 theIsCheckGeom If FALSE, only the shape's topology will be checked,
11189                                if TRUE, the shape's geometry will be checked also.
11190                 theReturnStatus If 0 and if theShape is invalid, a description
11191                                 of problem is printed.
11192                                 If 1 IsValid flag and the description of
11193                                 problem is returned.
11194                                 If 2 IsValid flag and the list of error data
11195                                 is returned.
11196
11197             Returns:
11198                 TRUE, if the shape "seems to be valid".
11199                 If theShape is invalid, prints a description of problem.
11200                 If theReturnStatus is equal to 1 the description is returned
11201                 along with IsValid flag.
11202                 If theReturnStatus is equal to 2 the list of error data is
11203                 returned along with IsValid flag.
11204             """
11205             # Example: see GEOM_TestMeasures.py
11206             if theIsCheckGeom:
11207                 (IsValid, ShapeErrors) = self.MeasuOp.CheckShapeWithGeometry(theShape)
11208                 RaiseIfFailed("CheckShapeWithGeometry", self.MeasuOp)
11209             else:
11210                 (IsValid, ShapeErrors) = self.MeasuOp.CheckShape(theShape)
11211                 RaiseIfFailed("CheckShape", self.MeasuOp)
11212             if IsValid == 0:
11213                 if theReturnStatus == 0:
11214                     Descr = self.MeasuOp.PrintShapeErrors(theShape, ShapeErrors)
11215                     print Descr
11216             if theReturnStatus == 1:
11217               Descr = self.MeasuOp.PrintShapeErrors(theShape, ShapeErrors)
11218               return (IsValid, Descr)
11219             elif theReturnStatus == 2:
11220               return (IsValid, ShapeErrors)
11221             return IsValid
11222
11223         ## Detect self-intersections in the given shape.
11224         #  @param theShape Shape to check.
11225         #  @param theCheckLevel is the level of self-intersection check.
11226         #         Possible input values are:
11227         #         - GEOM.SI_V_V(0) - only V/V interferences
11228         #         - GEOM.SI_V_E(1) - V/V and V/E interferences
11229         #         - GEOM.SI_E_E(2) - V/V, V/E and E/E interferences
11230         #         - GEOM.SI_V_F(3) - V/V, V/E, E/E and V/F interferences
11231         #         - GEOM.SI_E_F(4) - V/V, V/E, E/E, V/F and E/F interferences
11232         #         - GEOM.SI_ALL(5) - all interferences.
11233         #  @return TRUE, if the shape contains no self-intersections.
11234         #
11235         #  @ref tui_check_self_intersections_page "Example"
11236         @ManageTransactions("MeasuOp")
11237         def CheckSelfIntersections(self, theShape, theCheckLevel = GEOM.SI_ALL):
11238             """
11239             Detect self-intersections in the given shape.
11240
11241             Parameters:
11242                 theShape Shape to check.
11243                 theCheckLevel is the level of self-intersection check.
11244                   Possible input values are:
11245                    - GEOM.SI_V_V(0) - only V/V interferences
11246                    - GEOM.SI_V_E(1) - V/V and V/E interferences
11247                    - GEOM.SI_E_E(2) - V/V, V/E and E/E interferences
11248                    - GEOM.SI_V_F(3) - V/V, V/E, E/E and V/F interferences
11249                    - GEOM.SI_E_F(4) - V/V, V/E, E/E, V/F and E/F interferences
11250                    - GEOM.SI_ALL(5) - all interferences.
11251  
11252             Returns:
11253                 TRUE, if the shape contains no self-intersections.
11254             """
11255             # Example: see GEOM_TestMeasures.py
11256             (IsValid, Pairs) = self.MeasuOp.CheckSelfIntersections(theShape, EnumToLong(theCheckLevel))
11257             RaiseIfFailed("CheckSelfIntersections", self.MeasuOp)
11258             return IsValid
11259
11260         ## Detect intersections of the given shapes with algorithm based on mesh intersections.
11261         #  @param theShape1 First source object
11262         #  @param theShape2 Second source object
11263         #  @param theTolerance Specifies a distance between shapes used for detecting gaps:
11264         #         - if \a theTolerance <= 0, algorithm detects intersections (default behavior)
11265         #         - if \a theTolerance > 0, algorithm detects gaps
11266         #  @param theDeflection Linear deflection coefficient that specifies quality of tesselation:
11267         #         - if \a theDeflection <= 0, default deflection 0.001 is used
11268         #  @return TRUE, if there are intersections (gaps) between source shapes
11269         #  @return List of sub-shapes IDs from 1st shape that localize intersection.
11270         #  @return List of sub-shapes IDs from 2nd shape that localize intersection.
11271         #
11272         #  @ref tui_fast_intersection_page "Example"
11273         @ManageTransactions("MeasuOp")
11274         def FastIntersect(self, theShape1, theShape2, theTolerance = 0.0, theDeflection = 0.001):
11275             """
11276             Detect intersections of the given shapes with algorithm based on mesh intersections.
11277
11278             Parameters:
11279                 theShape1 First source object
11280                 theShape2 Second source object
11281                 theTolerance Specifies a distance between shapes used for detecting gaps:
11282                     - if theTolerance <= 0, algorithm detects intersections (default behavior)
11283                     - if theTolerance > 0, algorithm detects gaps
11284                 theDeflection Linear deflection coefficient that specifies quality of tesselation:
11285                     - if theDeflection <= 0, default deflection 0.001 is used
11286  
11287             Returns:
11288                 TRUE, if there are intersections (gaps) between source shapes
11289                 List of sub-shapes IDs from 1st shape that localize intersection.
11290                 List of sub-shapes IDs from 2nd shape that localize intersection.
11291             """
11292             # Example: see GEOM_TestMeasures.py
11293             IsOk, Res1, Res2 = self.MeasuOp.FastIntersect(theShape1, theShape2, theTolerance, theDeflection)
11294             RaiseIfFailed("FastIntersect", self.MeasuOp)
11295             return IsOk, Res1, Res2
11296
11297         ## Get position (LCS) of theShape.
11298         #
11299         #  Origin of the LCS is situated at the shape's center of mass.
11300         #  Axes of the LCS are obtained from shape's location or,
11301         #  if the shape is a planar face, from position of its plane.
11302         #
11303         #  @param theShape Shape to calculate position of.
11304         #  @return [Ox,Oy,Oz, Zx,Zy,Zz, Xx,Xy,Xz].
11305         #          Ox,Oy,Oz: Coordinates of shape's LCS origin.
11306         #          Zx,Zy,Zz: Coordinates of shape's LCS normal(main) direction.
11307         #          Xx,Xy,Xz: Coordinates of shape's LCS X direction.
11308         #
11309         #  @ref swig_todo "Example"
11310         @ManageTransactions("MeasuOp")
11311         def GetPosition(self,theShape):
11312             """
11313             Get position (LCS) of theShape.
11314             Origin of the LCS is situated at the shape's center of mass.
11315             Axes of the LCS are obtained from shape's location or,
11316             if the shape is a planar face, from position of its plane.
11317
11318             Parameters:
11319                 theShape Shape to calculate position of.
11320
11321             Returns:
11322                 [Ox,Oy,Oz, Zx,Zy,Zz, Xx,Xy,Xz].
11323                  Ox,Oy,Oz: Coordinates of shape's LCS origin.
11324                  Zx,Zy,Zz: Coordinates of shape's LCS normal(main) direction.
11325                  Xx,Xy,Xz: Coordinates of shape's LCS X direction.
11326             """
11327             # Example: see GEOM_TestMeasures.py
11328             aTuple = self.MeasuOp.GetPosition(theShape)
11329             RaiseIfFailed("GetPosition", self.MeasuOp)
11330             return aTuple
11331
11332         ## Get kind of theShape.
11333         #
11334         #  @param theShape Shape to get a kind of.
11335         #  @return Returns a kind of shape in terms of <VAR>GEOM.GEOM_IKindOfShape.shape_kind</VAR> enumeration
11336         #          and a list of parameters, describing the shape.
11337         #  @note  Concrete meaning of each value, returned via \a theIntegers
11338         #         or \a theDoubles list depends on the kind() of the shape.
11339         #
11340         #  @ref swig_todo "Example"
11341         @ManageTransactions("MeasuOp")
11342         def KindOfShape(self,theShape):
11343             """
11344             Get kind of theShape.
11345
11346             Parameters:
11347                 theShape Shape to get a kind of.
11348
11349             Returns:
11350                 a kind of shape in terms of GEOM_IKindOfShape.shape_kind enumeration
11351                     and a list of parameters, describing the shape.
11352             Note:
11353                 Concrete meaning of each value, returned via theIntegers
11354                 or theDoubles list depends on the geompy.kind of the shape
11355             """
11356             # Example: see GEOM_TestMeasures.py
11357             aRoughTuple = self.MeasuOp.KindOfShape(theShape)
11358             RaiseIfFailed("KindOfShape", self.MeasuOp)
11359
11360             aKind  = aRoughTuple[0]
11361             anInts = aRoughTuple[1]
11362             aDbls  = aRoughTuple[2]
11363
11364             # Now there is no exception from this rule:
11365             aKindTuple = [aKind] + aDbls + anInts
11366
11367             # If they are we will regroup parameters for such kind of shape.
11368             # For example:
11369             #if aKind == kind.SOME_KIND:
11370             #    #  SOME_KIND     int int double int double double
11371             #    aKindTuple = [aKind, anInts[0], anInts[1], aDbls[0], anInts[2], aDbls[1], aDbls[2]]
11372
11373             return aKindTuple
11374
11375         ## Returns the string that describes if the shell is good for solid.
11376         #  This is a support method for MakeSolid.
11377         #
11378         #  @param theShell the shell to be checked.
11379         #  @return Returns a string that describes the shell validity for
11380         #          solid construction.
11381         @ManageTransactions("MeasuOp")
11382         def _IsGoodForSolid(self, theShell):
11383             """
11384             Returns the string that describes if the shell is good for solid.
11385             This is a support method for MakeSolid.
11386
11387             Parameter:
11388                 theShell the shell to be checked.
11389
11390             Returns:
11391                 Returns a string that describes the shell validity for
11392                 solid construction.
11393             """
11394             aDescr = self.MeasuOp.IsGoodForSolid(theShell)
11395             return aDescr
11396
11397         # end of l2_measure
11398         ## @}
11399
11400         ## @addtogroup l2_import_export
11401         ## @{
11402
11403         ## Import a shape from the BREP, IGES, STEP or other file
11404         #  (depends on given format) with given name.
11405         #
11406         #  Note: this function is deprecated, it is kept for backward compatibility only
11407         #  Use Import<FormatName> instead, where <FormatName> is a name of desirable format to import.
11408         #
11409         #  @param theFileName The file, containing the shape.
11410         #  @param theFormatName Specify format for the file reading.
11411         #         Available formats can be obtained with InsertOp.ImportTranslators() method.
11412         #         If format 'IGES_SCALE' is used instead of 'IGES' or
11413         #            format 'STEP_SCALE' is used instead of 'STEP',
11414         #            length unit will be set to 'meter' and result model will be scaled.
11415         #  @param theName Object name; when specified, this parameter is used
11416         #         for result publication in the study. Otherwise, if automatic
11417         #         publication is switched on, default value is used for result name.
11418         #
11419         #  @return New GEOM.GEOM_Object, containing the imported shape.
11420         #          If material names are imported it returns the list of
11421         #          objects. The first one is the imported object followed by
11422         #          material groups.
11423         #  @note Auto publishing is allowed for the shape itself. Imported
11424         #        material groups are not automatically published.
11425         #
11426         #  @ref swig_Import_Export "Example"
11427         @ManageTransactions("InsertOp")
11428         def ImportFile(self, theFileName, theFormatName, theName=None):
11429             """
11430             Import a shape from the BREP, IGES, STEP or other file
11431             (depends on given format) with given name.
11432
11433             Note: this function is deprecated, it is kept for backward compatibility only
11434             Use Import<FormatName> instead, where <FormatName> is a name of desirable format to import.
11435
11436             Parameters: 
11437                 theFileName The file, containing the shape.
11438                 theFormatName Specify format for the file reading.
11439                     Available formats can be obtained with geompy.InsertOp.ImportTranslators() method.
11440                     If format 'IGES_SCALE' is used instead of 'IGES' or
11441                        format 'STEP_SCALE' is used instead of 'STEP',
11442                        length unit will be set to 'meter' and result model will be scaled.
11443                 theName Object name; when specified, this parameter is used
11444                         for result publication in the study. Otherwise, if automatic
11445                         publication is switched on, default value is used for result name.
11446
11447             Returns:
11448                 New GEOM.GEOM_Object, containing the imported shape.
11449                 If material names are imported it returns the list of
11450                 objects. The first one is the imported object followed by
11451                 material groups.
11452             Note:
11453                 Auto publishing is allowed for the shape itself. Imported
11454                 material groups are not automatically published.
11455             """
11456             # Example: see GEOM_TestOthers.py
11457             print """
11458             WARNING: Function ImportFile is deprecated, use Import<FormatName> instead,
11459             where <FormatName> is a name of desirable format for importing.
11460             """
11461             aListObj = self.InsertOp.ImportFile(theFileName, theFormatName)
11462             RaiseIfFailed("ImportFile", self.InsertOp)
11463             aNbObj = len(aListObj)
11464             if aNbObj > 0:
11465                 self._autoPublish(aListObj[0], theName, "imported")
11466             if aNbObj == 1:
11467                 return aListObj[0]
11468             return aListObj
11469
11470         ## Deprecated analog of ImportFile()
11471         def Import(self, theFileName, theFormatName, theName=None):
11472             """
11473             Deprecated analog of geompy.ImportFile, kept for backward compatibility only.
11474             """
11475             # note: auto-publishing is done in self.ImportFile()
11476             return self.ImportFile(theFileName, theFormatName, theName)
11477
11478         ## Read a shape from the binary stream, containing its bounding representation (BRep).
11479         #  @note This method will not be dumped to the python script by DumpStudy functionality.
11480         #  @note GEOM.GEOM_Object.GetShapeStream() method can be used to obtain the shape's BRep stream.
11481         #  @param theStream The BRep binary stream.
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_Object, containing the shape, read from theStream.
11487         #
11488         #  @ref swig_Import_Export "Example"
11489         @ManageTransactions("InsertOp")
11490         def RestoreShape (self, theStream, theName=None):
11491             """
11492             Read a shape from the binary stream, containing its bounding representation (BRep).
11493
11494             Note:
11495                 shape.GetShapeStream() method can be used to obtain the shape's BRep stream.
11496
11497             Parameters:
11498                 theStream The BRep binary stream.
11499                 theName Object name; when specified, this parameter is used
11500                         for result publication in the study. Otherwise, if automatic
11501                         publication is switched on, default value is used for result name.
11502
11503             Returns:
11504                 New GEOM_Object, containing the shape, read from theStream.
11505             """
11506             # Example: see GEOM_TestOthers.py
11507             anObj = self.InsertOp.RestoreShape(theStream)
11508             RaiseIfFailed("RestoreShape", self.InsertOp)
11509             self._autoPublish(anObj, theName, "restored")
11510             return anObj
11511
11512         ## Export the given shape into a file with given name.
11513         #
11514         #  Note: this function is deprecated, it is kept for backward compatibility only
11515         #  Use Export<FormatName> instead, where <FormatName> is a name of desirable format to export.
11516         #
11517         #  @param theObject Shape to be stored in the file.
11518         #  @param theFileName Name of the file to store the given shape in.
11519         #  @param theFormatName Specify format for the shape storage.
11520         #         Available formats can be obtained with
11521         #         geompy.InsertOp.ExportTranslators()[0] method.
11522         #
11523         #  @ref swig_Import_Export "Example"
11524         @ManageTransactions("InsertOp")
11525         def Export(self, theObject, theFileName, theFormatName):
11526             """
11527             Export the given shape into a file with given name.
11528
11529             Note: this function is deprecated, it is kept for backward compatibility only
11530             Use Export<FormatName> instead, where <FormatName> is a name of desirable format to export.
11531             
11532             Parameters: 
11533                 theObject Shape to be stored in the file.
11534                 theFileName Name of the file to store the given shape in.
11535                 theFormatName Specify format for the shape storage.
11536                               Available formats can be obtained with
11537                               geompy.InsertOp.ExportTranslators()[0] method.
11538             """
11539             # Example: see GEOM_TestOthers.py
11540             print """
11541             WARNING: Function Export is deprecated, use Export<FormatName> instead,
11542             where <FormatName> is a name of desirable format for exporting.
11543             """
11544             self.InsertOp.Export(theObject, theFileName, theFormatName)
11545             if self.InsertOp.IsDone() == 0:
11546                 raise RuntimeError,  "Export : " + self.InsertOp.GetErrorCode()
11547                 pass
11548             pass
11549
11550         # end of l2_import_export
11551         ## @}
11552
11553         ## @addtogroup l3_blocks
11554         ## @{
11555
11556         ## Create a quadrangle face from four edges. Order of Edges is not
11557         #  important. It is  not necessary that edges share the same vertex.
11558         #  @param E1,E2,E3,E4 Edges for the face bound.
11559         #  @param theName Object name; when specified, this parameter is used
11560         #         for result publication in the study. Otherwise, if automatic
11561         #         publication is switched on, default value is used for result name.
11562         #
11563         #  @return New GEOM.GEOM_Object, containing the created face.
11564         #
11565         #  @ref tui_building_by_blocks_page "Example"
11566         @ManageTransactions("BlocksOp")
11567         def MakeQuad(self, E1, E2, E3, E4, theName=None):
11568             """
11569             Create a quadrangle face from four edges. Order of Edges is not
11570             important. It is  not necessary that edges share the same vertex.
11571
11572             Parameters:
11573                 E1,E2,E3,E4 Edges for the face bound.
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 face.
11580
11581             Example of usage:
11582                 qface1 = geompy.MakeQuad(edge1, edge2, edge3, edge4)
11583             """
11584             # Example: see GEOM_Spanner.py
11585             anObj = self.BlocksOp.MakeQuad(E1, E2, E3, E4)
11586             RaiseIfFailed("MakeQuad", self.BlocksOp)
11587             self._autoPublish(anObj, theName, "quad")
11588             return anObj
11589
11590         ## Create a quadrangle face on two edges.
11591         #  The missing edges will be built by creating the shortest ones.
11592         #  @param E1,E2 Two opposite edges for the face.
11593         #  @param theName Object name; when specified, this parameter is used
11594         #         for result publication in the study. Otherwise, if automatic
11595         #         publication is switched on, default value is used for result name.
11596         #
11597         #  @return New GEOM.GEOM_Object, containing the created face.
11598         #
11599         #  @ref tui_building_by_blocks_page "Example"
11600         @ManageTransactions("BlocksOp")
11601         def MakeQuad2Edges(self, E1, E2, theName=None):
11602             """
11603             Create a quadrangle face on two edges.
11604             The missing edges will be built by creating the shortest ones.
11605
11606             Parameters:
11607                 E1,E2 Two opposite edges for the face.
11608                 theName Object name; when specified, this parameter is used
11609                         for result publication in the study. Otherwise, if automatic
11610                         publication is switched on, default value is used for result name.
11611
11612             Returns:
11613                 New GEOM.GEOM_Object, containing the created face.
11614
11615             Example of usage:
11616                 # create vertices
11617                 p1 = geompy.MakeVertex(  0.,   0.,   0.)
11618                 p2 = geompy.MakeVertex(150.,  30.,   0.)
11619                 p3 = geompy.MakeVertex(  0., 120.,  50.)
11620                 p4 = geompy.MakeVertex(  0.,  40.,  70.)
11621                 # create edges
11622                 edge1 = geompy.MakeEdge(p1, p2)
11623                 edge2 = geompy.MakeEdge(p3, p4)
11624                 # create a quadrangle face from two edges
11625                 qface2 = geompy.MakeQuad2Edges(edge1, edge2)
11626             """
11627             # Example: see GEOM_Spanner.py
11628             anObj = self.BlocksOp.MakeQuad2Edges(E1, E2)
11629             RaiseIfFailed("MakeQuad2Edges", self.BlocksOp)
11630             self._autoPublish(anObj, theName, "quad")
11631             return anObj
11632
11633         ## Create a quadrangle face with specified corners.
11634         #  The missing edges will be built by creating the shortest ones.
11635         #  @param V1,V2,V3,V4 Corner vertices for the face.
11636         #  @param theName Object name; when specified, this parameter is used
11637         #         for result publication in the study. Otherwise, if automatic
11638         #         publication is switched on, default value is used for result name.
11639         #
11640         #  @return New GEOM.GEOM_Object, containing the created face.
11641         #
11642         #  @ref tui_building_by_blocks_page "Example 1"
11643         #  \n @ref swig_MakeQuad4Vertices "Example 2"
11644         @ManageTransactions("BlocksOp")
11645         def MakeQuad4Vertices(self, V1, V2, V3, V4, theName=None):
11646             """
11647             Create a quadrangle face with specified corners.
11648             The missing edges will be built by creating the shortest ones.
11649
11650             Parameters:
11651                 V1,V2,V3,V4 Corner vertices for the face.
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 created face.
11658
11659             Example of usage:
11660                 # create vertices
11661                 p1 = geompy.MakeVertex(  0.,   0.,   0.)
11662                 p2 = geompy.MakeVertex(150.,  30.,   0.)
11663                 p3 = geompy.MakeVertex(  0., 120.,  50.)
11664                 p4 = geompy.MakeVertex(  0.,  40.,  70.)
11665                 # create a quadrangle from four points in its corners
11666                 qface3 = geompy.MakeQuad4Vertices(p1, p2, p3, p4)
11667             """
11668             # Example: see GEOM_Spanner.py
11669             anObj = self.BlocksOp.MakeQuad4Vertices(V1, V2, V3, V4)
11670             RaiseIfFailed("MakeQuad4Vertices", self.BlocksOp)
11671             self._autoPublish(anObj, theName, "quad")
11672             return anObj
11673
11674         ## Create a hexahedral solid, bounded by the six given faces. Order of
11675         #  faces is not important. It is  not necessary that Faces share the same edge.
11676         #  @param F1,F2,F3,F4,F5,F6 Faces for the hexahedral solid.
11677         #  @param theName Object name; when specified, this parameter is used
11678         #         for result publication in the study. Otherwise, if automatic
11679         #         publication is switched on, default value is used for result name.
11680         #
11681         #  @return New GEOM.GEOM_Object, containing the created solid.
11682         #
11683         #  @ref tui_building_by_blocks_page "Example 1"
11684         #  \n @ref swig_MakeHexa "Example 2"
11685         @ManageTransactions("BlocksOp")
11686         def MakeHexa(self, F1, F2, F3, F4, F5, F6, theName=None):
11687             """
11688             Create a hexahedral solid, bounded by the six given faces. Order of
11689             faces is not important. It is  not necessary that Faces share the same edge.
11690
11691             Parameters:
11692                 F1,F2,F3,F4,F5,F6 Faces for the hexahedral solid.
11693                 theName Object name; when specified, this parameter is used
11694                         for result publication in the study. Otherwise, if automatic
11695                         publication is switched on, default value is used for result name.
11696
11697             Returns:
11698                 New GEOM.GEOM_Object, containing the created solid.
11699
11700             Example of usage:
11701                 solid = geompy.MakeHexa(qface1, qface2, qface3, qface4, qface5, qface6)
11702             """
11703             # Example: see GEOM_Spanner.py
11704             anObj = self.BlocksOp.MakeHexa(F1, F2, F3, F4, F5, F6)
11705             RaiseIfFailed("MakeHexa", self.BlocksOp)
11706             self._autoPublish(anObj, theName, "hexa")
11707             return anObj
11708
11709         ## Create a hexahedral solid between two given faces.
11710         #  The missing faces will be built by creating the smallest ones.
11711         #  @param F1,F2 Two opposite faces for the hexahedral solid.
11712         #  @param theName Object name; when specified, this parameter is used
11713         #         for result publication in the study. Otherwise, if automatic
11714         #         publication is switched on, default value is used for result name.
11715         #
11716         #  @return New GEOM.GEOM_Object, containing the created solid.
11717         #
11718         #  @ref tui_building_by_blocks_page "Example 1"
11719         #  \n @ref swig_MakeHexa2Faces "Example 2"
11720         @ManageTransactions("BlocksOp")
11721         def MakeHexa2Faces(self, F1, F2, theName=None):
11722             """
11723             Create a hexahedral solid between two given faces.
11724             The missing faces will be built by creating the smallest ones.
11725
11726             Parameters:
11727                 F1,F2 Two opposite faces for the hexahedral solid.
11728                 theName Object name; when specified, this parameter is used
11729                         for result publication in the study. Otherwise, if automatic
11730                         publication is switched on, default value is used for result name.
11731
11732             Returns:
11733                 New GEOM.GEOM_Object, containing the created solid.
11734
11735             Example of usage:
11736                 solid1 = geompy.MakeHexa2Faces(qface1, qface2)
11737             """
11738             # Example: see GEOM_Spanner.py
11739             anObj = self.BlocksOp.MakeHexa2Faces(F1, F2)
11740             RaiseIfFailed("MakeHexa2Faces", self.BlocksOp)
11741             self._autoPublish(anObj, theName, "hexa")
11742             return anObj
11743
11744         # end of l3_blocks
11745         ## @}
11746
11747         ## @addtogroup l3_blocks_op
11748         ## @{
11749
11750         ## Get a vertex, found in the given shape by its coordinates.
11751         #  @param theShape Block or a compound of blocks.
11752         #  @param theX,theY,theZ Coordinates of the sought vertex.
11753         #  @param theEpsilon Maximum allowed distance between the resulting
11754         #                    vertex and point with the given coordinates.
11755         #  @param theName Object name; when specified, this parameter is used
11756         #         for result publication in the study. Otherwise, if automatic
11757         #         publication is switched on, default value is used for result name.
11758         #
11759         #  @return New GEOM.GEOM_Object, containing the found vertex.
11760         #
11761         #  @ref swig_GetPoint "Example"
11762         @ManageTransactions("BlocksOp")
11763         def GetPoint(self, theShape, theX, theY, theZ, theEpsilon, theName=None):
11764             """
11765             Get a vertex, found in the given shape by its coordinates.
11766
11767             Parameters:
11768                 theShape Block or a compound of blocks.
11769                 theX,theY,theZ Coordinates of the sought vertex.
11770                 theEpsilon Maximum allowed distance between the resulting
11771                            vertex and point with the given coordinates.
11772                 theName Object name; when specified, this parameter is used
11773                         for result publication in the study. Otherwise, if automatic
11774                         publication is switched on, default value is used for result name.
11775
11776             Returns:
11777                 New GEOM.GEOM_Object, containing the found vertex.
11778
11779             Example of usage:
11780                 pnt = geompy.GetPoint(shape, -50,  50,  50, 0.01)
11781             """
11782             # Example: see GEOM_TestOthers.py
11783             anObj = self.BlocksOp.GetPoint(theShape, theX, theY, theZ, theEpsilon)
11784             RaiseIfFailed("GetPoint", self.BlocksOp)
11785             self._autoPublish(anObj, theName, "vertex")
11786             return anObj
11787
11788         ## Find a vertex of the given shape, which has minimal distance to the given point.
11789         #  @param theShape Any shape.
11790         #  @param thePoint Point, close to the desired vertex.
11791         #  @param theName Object name; when specified, this parameter is used
11792         #         for result publication in the study. Otherwise, if automatic
11793         #         publication is switched on, default value is used for result name.
11794         #
11795         #  @return New GEOM.GEOM_Object, containing the found vertex.
11796         #
11797         #  @ref swig_GetVertexNearPoint "Example"
11798         @ManageTransactions("BlocksOp")
11799         def GetVertexNearPoint(self, theShape, thePoint, theName=None):
11800             """
11801             Find a vertex of the given shape, which has minimal distance to the given point.
11802
11803             Parameters:
11804                 theShape Any shape.
11805                 thePoint Point, close to the desired vertex.
11806                 theName Object name; when specified, this parameter is used
11807                         for result publication in the study. Otherwise, if automatic
11808                         publication is switched on, default value is used for result name.
11809
11810             Returns:
11811                 New GEOM.GEOM_Object, containing the found vertex.
11812
11813             Example of usage:
11814                 pmidle = geompy.MakeVertex(50, 0, 50)
11815                 edge1 = geompy.GetEdgeNearPoint(blocksComp, pmidle)
11816             """
11817             # Example: see GEOM_TestOthers.py
11818             anObj = self.BlocksOp.GetVertexNearPoint(theShape, thePoint)
11819             RaiseIfFailed("GetVertexNearPoint", self.BlocksOp)
11820             self._autoPublish(anObj, theName, "vertex")
11821             return anObj
11822
11823         ## Get an edge, found in the given shape by two given vertices.
11824         #  @param theShape Block or a compound of blocks.
11825         #  @param thePoint1,thePoint2 Points, close to the ends of the desired edge.
11826         #  @param theName Object name; when specified, this parameter is used
11827         #         for result publication in the study. Otherwise, if automatic
11828         #         publication is switched on, default value is used for result name.
11829         #
11830         #  @return New GEOM.GEOM_Object, containing the found edge.
11831         #
11832         #  @ref swig_GetEdge "Example"
11833         @ManageTransactions("BlocksOp")
11834         def GetEdge(self, theShape, thePoint1, thePoint2, theName=None):
11835             """
11836             Get an edge, found in the given shape by two given vertices.
11837
11838             Parameters:
11839                 theShape Block or a compound of blocks.
11840                 thePoint1,thePoint2 Points, close to the ends of the desired edge.
11841                 theName Object name; when specified, this parameter is used
11842                         for result publication in the study. Otherwise, if automatic
11843                         publication is switched on, default value is used for result name.
11844
11845             Returns:
11846                 New GEOM.GEOM_Object, containing the found edge.
11847             """
11848             # Example: see GEOM_Spanner.py
11849             anObj = self.BlocksOp.GetEdge(theShape, thePoint1, thePoint2)
11850             RaiseIfFailed("GetEdge", self.BlocksOp)
11851             self._autoPublish(anObj, theName, "edge")
11852             return anObj
11853
11854         ## Find an edge of the given shape, which has minimal distance to the given point.
11855         #  @param theShape Block or a compound of blocks.
11856         #  @param thePoint Point, close to the desired edge.
11857         #  @param theName Object name; when specified, this parameter is used
11858         #         for result publication in the study. Otherwise, if automatic
11859         #         publication is switched on, default value is used for result name.
11860         #
11861         #  @return New GEOM.GEOM_Object, containing the found edge.
11862         #
11863         #  @ref swig_GetEdgeNearPoint "Example"
11864         @ManageTransactions("BlocksOp")
11865         def GetEdgeNearPoint(self, theShape, thePoint, theName=None):
11866             """
11867             Find an edge of the given shape, which has minimal distance to the given point.
11868
11869             Parameters:
11870                 theShape Block or a compound of blocks.
11871                 thePoint Point, close to the desired edge.
11872                 theName Object name; when specified, this parameter is used
11873                         for result publication in the study. Otherwise, if automatic
11874                         publication is switched on, default value is used for result name.
11875
11876             Returns:
11877                 New GEOM.GEOM_Object, containing the found edge.
11878             """
11879             # Example: see GEOM_TestOthers.py
11880             anObj = self.BlocksOp.GetEdgeNearPoint(theShape, thePoint)
11881             RaiseIfFailed("GetEdgeNearPoint", self.BlocksOp)
11882             self._autoPublish(anObj, theName, "edge")
11883             return anObj
11884
11885         ## Returns a face, found in the given shape by four given corner vertices.
11886         #  @param theShape Block or a compound of blocks.
11887         #  @param thePoint1,thePoint2,thePoint3,thePoint4 Points, close to the corners of the desired face.
11888         #  @param theName Object name; when specified, this parameter is used
11889         #         for result publication in the study. Otherwise, if automatic
11890         #         publication is switched on, default value is used for result name.
11891         #
11892         #  @return New GEOM.GEOM_Object, containing the found face.
11893         #
11894         #  @ref swig_todo "Example"
11895         @ManageTransactions("BlocksOp")
11896         def GetFaceByPoints(self, theShape, thePoint1, thePoint2, thePoint3, thePoint4, theName=None):
11897             """
11898             Returns a face, found in the given shape by four given corner vertices.
11899
11900             Parameters:
11901                 theShape Block or a compound of blocks.
11902                 thePoint1,thePoint2,thePoint3,thePoint4 Points, close to the corners of the desired face.
11903                 theName Object name; when specified, this parameter is used
11904                         for result publication in the study. Otherwise, if automatic
11905                         publication is switched on, default value is used for result name.
11906
11907             Returns:
11908                 New GEOM.GEOM_Object, containing the found face.
11909             """
11910             # Example: see GEOM_Spanner.py
11911             anObj = self.BlocksOp.GetFaceByPoints(theShape, thePoint1, thePoint2, thePoint3, thePoint4)
11912             RaiseIfFailed("GetFaceByPoints", self.BlocksOp)
11913             self._autoPublish(anObj, theName, "face")
11914             return anObj
11915
11916         ## Get a face of block, found in the given shape by two given edges.
11917         #  @param theShape Block or a compound of blocks.
11918         #  @param theEdge1,theEdge2 Edges, close to the edges of the desired face.
11919         #  @param theName Object name; when specified, this parameter is used
11920         #         for result publication in the study. Otherwise, if automatic
11921         #         publication is switched on, default value is used for result name.
11922         #
11923         #  @return New GEOM.GEOM_Object, containing the found face.
11924         #
11925         #  @ref swig_todo "Example"
11926         @ManageTransactions("BlocksOp")
11927         def GetFaceByEdges(self, theShape, theEdge1, theEdge2, theName=None):
11928             """
11929             Get a face of block, found in the given shape by two given edges.
11930
11931             Parameters:
11932                 theShape Block or a compound of blocks.
11933                 theEdge1,theEdge2 Edges, close to the edges of the desired face.
11934                 theName Object name; when specified, this parameter is used
11935                         for result publication in the study. Otherwise, if automatic
11936                         publication is switched on, default value is used for result name.
11937
11938             Returns:
11939                 New GEOM.GEOM_Object, containing the found face.
11940             """
11941             # Example: see GEOM_Spanner.py
11942             anObj = self.BlocksOp.GetFaceByEdges(theShape, theEdge1, theEdge2)
11943             RaiseIfFailed("GetFaceByEdges", self.BlocksOp)
11944             self._autoPublish(anObj, theName, "face")
11945             return anObj
11946
11947         ## Find a face, opposite to the given one in the given block.
11948         #  @param theBlock Must be a hexahedral solid.
11949         #  @param theFace Face of \a theBlock, opposite to the desired face.
11950         #  @param theName Object name; when specified, this parameter is used
11951         #         for result publication in the study. Otherwise, if automatic
11952         #         publication is switched on, default value is used for result name.
11953         #
11954         #  @return New GEOM.GEOM_Object, containing the found face.
11955         #
11956         #  @ref swig_GetOppositeFace "Example"
11957         @ManageTransactions("BlocksOp")
11958         def GetOppositeFace(self, theBlock, theFace, theName=None):
11959             """
11960             Find a face, opposite to the given one in the given block.
11961
11962             Parameters:
11963                 theBlock Must be a hexahedral solid.
11964                 theFace Face of theBlock, opposite to the desired face.
11965                 theName Object name; when specified, this parameter is used
11966                         for result publication in the study. Otherwise, if automatic
11967                         publication is switched on, default value is used for result name.
11968
11969             Returns:
11970                 New GEOM.GEOM_Object, containing the found face.
11971             """
11972             # Example: see GEOM_Spanner.py
11973             anObj = self.BlocksOp.GetOppositeFace(theBlock, theFace)
11974             RaiseIfFailed("GetOppositeFace", self.BlocksOp)
11975             self._autoPublish(anObj, theName, "face")
11976             return anObj
11977
11978         ## Find a face of the given shape, which has minimal distance to the given point.
11979         #  @param theShape Block or a compound of blocks.
11980         #  @param thePoint Point, close to the desired face.
11981         #  @param theName Object name; when specified, this parameter is used
11982         #         for result publication in the study. Otherwise, if automatic
11983         #         publication is switched on, default value is used for result name.
11984         #
11985         #  @return New GEOM.GEOM_Object, containing the found face.
11986         #
11987         #  @ref swig_GetFaceNearPoint "Example"
11988         @ManageTransactions("BlocksOp")
11989         def GetFaceNearPoint(self, theShape, thePoint, theName=None):
11990             """
11991             Find a face of the given shape, which has minimal distance to the given point.
11992
11993             Parameters:
11994                 theShape Block or a compound of blocks.
11995                 thePoint Point, close to the desired face.
11996                 theName Object name; when specified, this parameter is used
11997                         for result publication in the study. Otherwise, if automatic
11998                         publication is switched on, default value is used for result name.
11999
12000             Returns:
12001                 New GEOM.GEOM_Object, containing the found face.
12002             """
12003             # Example: see GEOM_Spanner.py
12004             anObj = self.BlocksOp.GetFaceNearPoint(theShape, thePoint)
12005             RaiseIfFailed("GetFaceNearPoint", self.BlocksOp)
12006             self._autoPublish(anObj, theName, "face")
12007             return anObj
12008
12009         ## Find a face of block, whose outside normale has minimal angle with the given vector.
12010         #  @param theBlock Block or a compound of blocks.
12011         #  @param theVector Vector, close to the normale of the desired face.
12012         #  @param theName Object name; when specified, this parameter is used
12013         #         for result publication in the study. Otherwise, if automatic
12014         #         publication is switched on, default value is used for result name.
12015         #
12016         #  @return New GEOM.GEOM_Object, containing the found face.
12017         #
12018         #  @ref swig_todo "Example"
12019         @ManageTransactions("BlocksOp")
12020         def GetFaceByNormale(self, theBlock, theVector, theName=None):
12021             """
12022             Find a face of block, whose outside normale has minimal angle with the given vector.
12023
12024             Parameters:
12025                 theBlock Block or a compound of blocks.
12026                 theVector Vector, close to the normale of the desired face.
12027                 theName Object name; when specified, this parameter is used
12028                         for result publication in the study. Otherwise, if automatic
12029                         publication is switched on, default value is used for result name.
12030
12031             Returns:
12032                 New GEOM.GEOM_Object, containing the found face.
12033             """
12034             # Example: see GEOM_Spanner.py
12035             anObj = self.BlocksOp.GetFaceByNormale(theBlock, theVector)
12036             RaiseIfFailed("GetFaceByNormale", self.BlocksOp)
12037             self._autoPublish(anObj, theName, "face")
12038             return anObj
12039
12040         ## Find all sub-shapes of type \a theShapeType of the given shape,
12041         #  which have minimal distance to the given point.
12042         #  @param theShape Any shape.
12043         #  @param thePoint Point, close to the desired shape.
12044         #  @param theShapeType Defines what kind of sub-shapes is searched GEOM::shape_type
12045         #  @param theTolerance The tolerance for distances comparison. All shapes
12046         #                      with distances to the given point in interval
12047         #                      [minimal_distance, minimal_distance + theTolerance] will be gathered.
12048         #  @param theName Object name; when specified, this parameter is used
12049         #         for result publication in the study. Otherwise, if automatic
12050         #         publication is switched on, default value is used for result name.
12051         #
12052         #  @return New GEOM_Object, containing a group of all found shapes.
12053         #
12054         #  @ref swig_GetShapesNearPoint "Example"
12055         @ManageTransactions("BlocksOp")
12056         def GetShapesNearPoint(self, theShape, thePoint, theShapeType, theTolerance = 1e-07, theName=None):
12057             """
12058             Find all sub-shapes of type theShapeType of the given shape,
12059             which have minimal distance to the given point.
12060
12061             Parameters:
12062                 theShape Any shape.
12063                 thePoint Point, close to the desired shape.
12064                 theShapeType Defines what kind of sub-shapes is searched (see GEOM::shape_type)
12065                 theTolerance The tolerance for distances comparison. All shapes
12066                                 with distances to the given point in interval
12067                                 [minimal_distance, minimal_distance + theTolerance] will be gathered.
12068                 theName Object name; when specified, this parameter is used
12069                         for result publication in the study. Otherwise, if automatic
12070                         publication is switched on, default value is used for result name.
12071
12072             Returns:
12073                 New GEOM_Object, containing a group of all found shapes.
12074             """
12075             # Example: see GEOM_TestOthers.py
12076             anObj = self.BlocksOp.GetShapesNearPoint(theShape, thePoint, theShapeType, theTolerance)
12077             RaiseIfFailed("GetShapesNearPoint", self.BlocksOp)
12078             self._autoPublish(anObj, theName, "group")
12079             return anObj
12080
12081         # end of l3_blocks_op
12082         ## @}
12083
12084         ## @addtogroup l4_blocks_measure
12085         ## @{
12086
12087         ## Check, if the compound of blocks is given.
12088         #  To be considered as a compound of blocks, the
12089         #  given shape must satisfy the following conditions:
12090         #  - Each element of the compound should be a Block (6 faces).
12091         #  - Each face should be a quadrangle, i.e. it should have only 1 wire
12092         #       with 4 edges. If <VAR>theIsUseC1</VAR> is set to True and
12093         #       there are more than 4 edges in the only wire of a face,
12094         #       this face is considered to be quadrangle if it has 4 bounds
12095         #       (1 or more edge) of C1 continuity.
12096         #  - A connection between two Blocks should be an entire quadrangle face or an entire edge.
12097         #  - The compound should be connexe.
12098         #  - The glue between two quadrangle faces should be applied.
12099         #  @param theCompound The compound to check.
12100         #  @param theIsUseC1 Flag to check if there are 4 bounds on a face
12101         #         taking into account C1 continuity.
12102         #  @param theAngTolerance the angular tolerance to check if two neighbor
12103         #         edges are codirectional in the common vertex with this
12104         #         tolerance. This parameter is used only if
12105         #         <VAR>theIsUseC1</VAR> is set to True.
12106         #  @return TRUE, if the given shape is a compound of blocks.
12107         #  If theCompound is not valid, prints all discovered errors.
12108         #
12109         #  @ref tui_check_compound_of_blocks_page "Example 1"
12110         #  \n @ref swig_CheckCompoundOfBlocks "Example 2"
12111         @ManageTransactions("BlocksOp")
12112         def CheckCompoundOfBlocks(self,theCompound, theIsUseC1 = False,
12113                                   theAngTolerance = 1.e-12):
12114             """
12115             Check, if the compound of blocks is given.
12116             To be considered as a compound of blocks, the
12117             given shape must satisfy the following conditions:
12118             - Each element of the compound should be a Block (6 faces).
12119             - Each face should be a quadrangle, i.e. it should have only 1 wire
12120                  with 4 edges. If theIsUseC1 is set to True and
12121                  there are more than 4 edges in the only wire of a face,
12122                  this face is considered to be quadrangle if it has 4 bounds
12123                  (1 or more edge) of C1 continuity.
12124             - A connection between two Blocks should be an entire quadrangle face or an entire edge.
12125             - The compound should be connexe.
12126             - The glue between two quadrangle faces should be applied.
12127
12128             Parameters:
12129                 theCompound The compound to check.
12130                 theIsUseC1 Flag to check if there are 4 bounds on a face
12131                            taking into account C1 continuity.
12132                 theAngTolerance the angular tolerance to check if two neighbor
12133                            edges are codirectional in the common vertex with this
12134                            tolerance. This parameter is used only if
12135                            theIsUseC1 is set to True.
12136
12137             Returns:
12138                 TRUE, if the given shape is a compound of blocks.
12139                 If theCompound is not valid, prints all discovered errors.
12140             """
12141             # Example: see GEOM_Spanner.py
12142             aTolerance = -1.0
12143             if theIsUseC1:
12144                 aTolerance = theAngTolerance
12145             (IsValid, BCErrors) = self.BlocksOp.CheckCompoundOfBlocks(theCompound, aTolerance)
12146             RaiseIfFailed("CheckCompoundOfBlocks", self.BlocksOp)
12147             if IsValid == 0:
12148                 Descr = self.BlocksOp.PrintBCErrors(theCompound, BCErrors)
12149                 print Descr
12150             return IsValid
12151
12152         ## Retrieve all non blocks solids and faces from \a theShape.
12153         #  @param theShape The shape to explore.
12154         #  @param theIsUseC1 Flag to check if there are 4 bounds on a face
12155         #         taking into account C1 continuity.
12156         #  @param theAngTolerance the angular tolerance to check if two neighbor
12157         #         edges are codirectional in the common vertex with this
12158         #         tolerance. This parameter is used only if
12159         #         <VAR>theIsUseC1</VAR> is set to True.
12160         #  @param theName Object name; when specified, this parameter is used
12161         #         for result publication in the study. Otherwise, if automatic
12162         #         publication is switched on, default value is used for result name.
12163         #
12164         #  @return A tuple of two GEOM_Objects. The first object is a group of all
12165         #          non block solids (= not 6 faces, or with 6 faces, but with the
12166         #          presence of non-quadrangular faces). The second object is a
12167         #          group of all non quadrangular faces (= faces with more then
12168         #          1 wire or, if <VAR>theIsUseC1</VAR> is set to True, faces
12169         #          with 1 wire with not 4 edges that do not form 4 bounds of
12170         #          C1 continuity).
12171         #
12172         #  @ref tui_get_non_blocks_page "Example 1"
12173         #  \n @ref swig_GetNonBlocks "Example 2"
12174         @ManageTransactions("BlocksOp")
12175         def GetNonBlocks (self, theShape, theIsUseC1 = False,
12176                           theAngTolerance = 1.e-12, theName=None):
12177             """
12178             Retrieve all non blocks solids and faces from theShape.
12179
12180             Parameters:
12181                 theShape The shape to explore.
12182                 theIsUseC1 Flag to check if there are 4 bounds on a face
12183                            taking into account C1 continuity.
12184                 theAngTolerance the angular tolerance to check if two neighbor
12185                            edges are codirectional in the common vertex with this
12186                            tolerance. This parameter is used only if
12187                            theIsUseC1 is set to True.
12188                 theName Object name; when specified, this parameter is used
12189                         for result publication in the study. Otherwise, if automatic
12190                         publication is switched on, default value is used for result name.
12191
12192             Returns:
12193                 A tuple of two GEOM_Objects. The first object is a group of all
12194                 non block solids (= not 6 faces, or with 6 faces, but with the
12195                 presence of non-quadrangular faces). The second object is a
12196                 group of all non quadrangular faces (= faces with more then
12197                 1 wire or, if <VAR>theIsUseC1</VAR> is set to True, faces
12198                 with 1 wire with not 4 edges that do not form 4 bounds of
12199                 C1 continuity).
12200
12201             Usage:
12202                 (res_sols, res_faces) = geompy.GetNonBlocks(myShape1)
12203             """
12204             # Example: see GEOM_Spanner.py
12205             aTolerance = -1.0
12206             if theIsUseC1:
12207                 aTolerance = theAngTolerance
12208             aTuple = self.BlocksOp.GetNonBlocks(theShape, aTolerance)
12209             RaiseIfFailed("GetNonBlocks", self.BlocksOp)
12210             self._autoPublish(aTuple, theName, ("groupNonHexas", "groupNonQuads"))
12211             return aTuple
12212
12213         ## Remove all seam and degenerated edges from \a theShape.
12214         #  Unite faces and edges, sharing one surface. It means that
12215         #  this faces must have references to one C++ surface object (handle).
12216         #  @param theShape The compound or single solid to remove irregular edges from.
12217         #  @param doUnionFaces If True, then unite faces. If False (the default value),
12218         #         do not unite faces.
12219         #  @param theName Object name; when specified, this parameter is used
12220         #         for result publication in the study. Otherwise, if automatic
12221         #         publication is switched on, default value is used for result name.
12222         #
12223         #  @return Improved shape.
12224         #
12225         #  @ref swig_RemoveExtraEdges "Example"
12226         @ManageTransactions("BlocksOp")
12227         def RemoveExtraEdges(self, theShape, doUnionFaces=False, theName=None):
12228             """
12229             Remove all seam and degenerated edges from theShape.
12230             Unite faces and edges, sharing one surface. It means that
12231             this faces must have references to one C++ surface object (handle).
12232
12233             Parameters:
12234                 theShape The compound or single solid to remove irregular edges from.
12235                 doUnionFaces If True, then unite faces. If False (the default value),
12236                              do not unite faces.
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                 Improved shape.
12243             """
12244             # Example: see GEOM_TestOthers.py
12245             nbFacesOptimum = -1 # -1 means do not unite faces
12246             if doUnionFaces is True: nbFacesOptimum = 0 # 0 means unite faces
12247             anObj = self.BlocksOp.RemoveExtraEdges(theShape, nbFacesOptimum)
12248             RaiseIfFailed("RemoveExtraEdges", self.BlocksOp)
12249             self._autoPublish(anObj, theName, "removeExtraEdges")
12250             return anObj
12251
12252         ## Performs union faces of \a theShape
12253         #  Unite faces sharing one surface. It means that
12254         #  these faces must have references to one C++ surface object (handle).
12255         #  @param theShape The compound or single solid that contains faces
12256         #         to perform union.
12257         #  @param theName Object name; when specified, this parameter is used
12258         #         for result publication in the study. Otherwise, if automatic
12259         #         publication is switched on, default value is used for result name.
12260         #
12261         #  @return Improved shape.
12262         #
12263         #  @ref swig_UnionFaces "Example"
12264         @ManageTransactions("BlocksOp")
12265         def UnionFaces(self, theShape, theName=None):
12266             """
12267             Performs union faces of theShape.
12268             Unite faces sharing one surface. It means that
12269             these faces must have references to one C++ surface object (handle).
12270
12271             Parameters:
12272                 theShape The compound or single solid that contains faces
12273                          to perform union.
12274                 theName Object name; when specified, this parameter is used
12275                         for result publication in the study. Otherwise, if automatic
12276                         publication is switched on, default value is used for result name.
12277
12278             Returns:
12279                 Improved shape.
12280             """
12281             # Example: see GEOM_TestOthers.py
12282             anObj = self.BlocksOp.UnionFaces(theShape)
12283             RaiseIfFailed("UnionFaces", self.BlocksOp)
12284             self._autoPublish(anObj, theName, "unionFaces")
12285             return anObj
12286
12287         ## Check, if the given shape is a blocks compound.
12288         #  Fix all detected errors.
12289         #    \note Single block can be also fixed by this method.
12290         #  @param theShape The compound to check and improve.
12291         #  @param theName Object name; when specified, this parameter is used
12292         #         for result publication in the study. Otherwise, if automatic
12293         #         publication is switched on, default value is used for result name.
12294         #
12295         #  @return Improved compound.
12296         #
12297         #  @ref swig_CheckAndImprove "Example"
12298         @ManageTransactions("BlocksOp")
12299         def CheckAndImprove(self, theShape, theName=None):
12300             """
12301             Check, if the given shape is a blocks compound.
12302             Fix all detected errors.
12303
12304             Note:
12305                 Single block can be also fixed by this method.
12306
12307             Parameters:
12308                 theShape The compound to check and improve.
12309                 theName Object name; when specified, this parameter is used
12310                         for result publication in the study. Otherwise, if automatic
12311                         publication is switched on, default value is used for result name.
12312
12313             Returns:
12314                 Improved compound.
12315             """
12316             # Example: see GEOM_TestOthers.py
12317             anObj = self.BlocksOp.CheckAndImprove(theShape)
12318             RaiseIfFailed("CheckAndImprove", self.BlocksOp)
12319             self._autoPublish(anObj, theName, "improved")
12320             return anObj
12321
12322         # end of l4_blocks_measure
12323         ## @}
12324
12325         ## @addtogroup l3_blocks_op
12326         ## @{
12327
12328         ## Get all the blocks, contained in the given compound.
12329         #  @param theCompound The compound to explode.
12330         #  @param theMinNbFaces If solid has lower number of faces, it is not a block.
12331         #  @param theMaxNbFaces If solid has higher number of faces, it is not a block.
12332         #  @param theName Object name; when specified, this parameter is used
12333         #         for result publication in the study. Otherwise, if automatic
12334         #         publication is switched on, default value is used for result name.
12335         #
12336         #  @note If theMaxNbFaces = 0, the maximum number of faces is not restricted.
12337         #
12338         #  @return List of GEOM.GEOM_Object, containing the retrieved blocks.
12339         #
12340         #  @ref tui_explode_on_blocks "Example 1"
12341         #  \n @ref swig_MakeBlockExplode "Example 2"
12342         @ManageTransactions("BlocksOp")
12343         def MakeBlockExplode(self, theCompound, theMinNbFaces, theMaxNbFaces, theName=None):
12344             """
12345             Get all the blocks, contained in the given compound.
12346
12347             Parameters:
12348                 theCompound The compound to explode.
12349                 theMinNbFaces If solid has lower number of faces, it is not a block.
12350                 theMaxNbFaces If solid has higher number of faces, it is not a block.
12351                 theName Object name; when specified, this parameter is used
12352                         for result publication in the study. Otherwise, if automatic
12353                         publication is switched on, default value is used for result name.
12354
12355             Note:
12356                 If theMaxNbFaces = 0, the maximum number of faces is not restricted.
12357
12358             Returns:
12359                 List of GEOM.GEOM_Object, containing the retrieved blocks.
12360             """
12361             # Example: see GEOM_TestOthers.py
12362             theMinNbFaces,theMaxNbFaces,Parameters = ParseParameters(theMinNbFaces,theMaxNbFaces)
12363             aList = self.BlocksOp.ExplodeCompoundOfBlocks(theCompound, theMinNbFaces, theMaxNbFaces)
12364             RaiseIfFailed("ExplodeCompoundOfBlocks", self.BlocksOp)
12365             for anObj in aList:
12366                 anObj.SetParameters(Parameters)
12367                 pass
12368             self._autoPublish(aList, theName, "block")
12369             return aList
12370
12371         ## Find block, containing the given point inside its volume or on boundary.
12372         #  @param theCompound Compound, to find block in.
12373         #  @param thePoint Point, close to the desired block. If the point lays on
12374         #         boundary between some blocks, we return block with nearest center.
12375         #  @param theName Object name; when specified, this parameter is used
12376         #         for result publication in the study. Otherwise, if automatic
12377         #         publication is switched on, default value is used for result name.
12378         #
12379         #  @return New GEOM.GEOM_Object, containing the found block.
12380         #
12381         #  @ref swig_todo "Example"
12382         @ManageTransactions("BlocksOp")
12383         def GetBlockNearPoint(self, theCompound, thePoint, theName=None):
12384             """
12385             Find block, containing the given point inside its volume or on boundary.
12386
12387             Parameters:
12388                 theCompound Compound, to find block in.
12389                 thePoint Point, close to the desired block. If the point lays on
12390                          boundary between some blocks, we return block with nearest center.
12391                 theName Object name; when specified, this parameter is used
12392                         for result publication in the study. Otherwise, if automatic
12393                         publication is switched on, default value is used for result name.
12394
12395             Returns:
12396                 New GEOM.GEOM_Object, containing the found block.
12397             """
12398             # Example: see GEOM_Spanner.py
12399             anObj = self.BlocksOp.GetBlockNearPoint(theCompound, thePoint)
12400             RaiseIfFailed("GetBlockNearPoint", self.BlocksOp)
12401             self._autoPublish(anObj, theName, "block")
12402             return anObj
12403
12404         ## Find block, containing all the elements, passed as the parts, or maximum quantity of them.
12405         #  @param theCompound Compound, to find block in.
12406         #  @param theParts List of faces and/or edges and/or vertices to be parts of the found block.
12407         #  @param theName Object name; when specified, this parameter is used
12408         #         for result publication in the study. Otherwise, if automatic
12409         #         publication is switched on, default value is used for result name.
12410         #
12411         #  @return New GEOM.GEOM_Object, containing the found block.
12412         #
12413         #  @ref swig_GetBlockByParts "Example"
12414         @ManageTransactions("BlocksOp")
12415         def GetBlockByParts(self, theCompound, theParts, theName=None):
12416             """
12417              Find block, containing all the elements, passed as the parts, or maximum quantity of them.
12418
12419              Parameters:
12420                 theCompound Compound, to find block in.
12421                 theParts List of faces and/or edges and/or vertices to be parts of the found block.
12422                 theName Object name; when specified, this parameter is used
12423                         for result publication in the study. Otherwise, if automatic
12424                         publication is switched on, default value is used for result name.
12425
12426             Returns:
12427                 New GEOM_Object, containing the found block.
12428             """
12429             # Example: see GEOM_TestOthers.py
12430             anObj = self.BlocksOp.GetBlockByParts(theCompound, theParts)
12431             RaiseIfFailed("GetBlockByParts", self.BlocksOp)
12432             self._autoPublish(anObj, theName, "block")
12433             return anObj
12434
12435         ## Return all blocks, containing all the elements, passed as the parts.
12436         #  @param theCompound Compound, to find blocks in.
12437         #  @param theParts List of faces and/or edges and/or vertices to be parts of the found blocks.
12438         #  @param theName Object name; when specified, this parameter is used
12439         #         for result publication in the study. Otherwise, if automatic
12440         #         publication is switched on, default value is used for result name.
12441         #
12442         #  @return List of GEOM.GEOM_Object, containing the found blocks.
12443         #
12444         #  @ref swig_todo "Example"
12445         @ManageTransactions("BlocksOp")
12446         def GetBlocksByParts(self, theCompound, theParts, theName=None):
12447             """
12448             Return all blocks, containing all the elements, passed as the parts.
12449
12450             Parameters:
12451                 theCompound Compound, to find blocks in.
12452                 theParts List of faces and/or edges and/or vertices to be parts of the found blocks.
12453                 theName Object name; when specified, this parameter is used
12454                         for result publication in the study. Otherwise, if automatic
12455                         publication is switched on, default value is used for result name.
12456
12457             Returns:
12458                 List of GEOM.GEOM_Object, containing the found blocks.
12459             """
12460             # Example: see GEOM_Spanner.py
12461             aList = self.BlocksOp.GetBlocksByParts(theCompound, theParts)
12462             RaiseIfFailed("GetBlocksByParts", self.BlocksOp)
12463             self._autoPublish(aList, theName, "block")
12464             return aList
12465
12466         ## Multi-transformate block and glue the result.
12467         #  Transformation is defined so, as to superpose direction faces.
12468         #  @param Block Hexahedral solid to be multi-transformed.
12469         #  @param DirFace1 ID of First direction face.
12470         #  @param DirFace2 ID of Second direction face.
12471         #  @param NbTimes Quantity of transformations to be done.
12472         #  @param theName Object name; when specified, this parameter is used
12473         #         for result publication in the study. Otherwise, if automatic
12474         #         publication is switched on, default value is used for result name.
12475         #
12476         #  @note Unique ID of sub-shape can be obtained, using method GetSubShapeID().
12477         #
12478         #  @return New GEOM.GEOM_Object, containing the result shape.
12479         #
12480         #  @ref tui_multi_transformation "Example"
12481         @ManageTransactions("BlocksOp")
12482         def MakeMultiTransformation1D(self, Block, DirFace1, DirFace2, NbTimes, theName=None):
12483             """
12484             Multi-transformate block and glue the result.
12485             Transformation is defined so, as to superpose direction faces.
12486
12487             Parameters:
12488                 Block Hexahedral solid to be multi-transformed.
12489                 DirFace1 ID of First direction face.
12490                 DirFace2 ID of Second direction face.
12491                 NbTimes Quantity of transformations to be done.
12492                 theName Object name; when specified, this parameter is used
12493                         for result publication in the study. Otherwise, if automatic
12494                         publication is switched on, default value is used for result name.
12495
12496             Note:
12497                 Unique ID of sub-shape can be obtained, using method GetSubShapeID().
12498
12499             Returns:
12500                 New GEOM.GEOM_Object, containing the result shape.
12501             """
12502             # Example: see GEOM_Spanner.py
12503             DirFace1,DirFace2,NbTimes,Parameters = ParseParameters(DirFace1,DirFace2,NbTimes)
12504             anObj = self.BlocksOp.MakeMultiTransformation1D(Block, DirFace1, DirFace2, NbTimes)
12505             RaiseIfFailed("MakeMultiTransformation1D", self.BlocksOp)
12506             anObj.SetParameters(Parameters)
12507             self._autoPublish(anObj, theName, "transformed")
12508             return anObj
12509
12510         ## Multi-transformate block and glue the result.
12511         #  @param Block Hexahedral solid to be multi-transformed.
12512         #  @param DirFace1U,DirFace2U IDs of Direction faces for the first transformation.
12513         #  @param DirFace1V,DirFace2V IDs of Direction faces for the second transformation.
12514         #  @param NbTimesU,NbTimesV Quantity of transformations to be done.
12515         #  @param theName Object name; when specified, this parameter is used
12516         #         for result publication in the study. Otherwise, if automatic
12517         #         publication is switched on, default value is used for result name.
12518         #
12519         #  @return New GEOM.GEOM_Object, containing the result shape.
12520         #
12521         #  @ref tui_multi_transformation "Example"
12522         @ManageTransactions("BlocksOp")
12523         def MakeMultiTransformation2D(self, Block, DirFace1U, DirFace2U, NbTimesU,
12524                                       DirFace1V, DirFace2V, NbTimesV, theName=None):
12525             """
12526             Multi-transformate block and glue the result.
12527
12528             Parameters:
12529                 Block Hexahedral solid to be multi-transformed.
12530                 DirFace1U,DirFace2U IDs of Direction faces for the first transformation.
12531                 DirFace1V,DirFace2V IDs of Direction faces for the second transformation.
12532                 NbTimesU,NbTimesV Quantity of transformations to be done.
12533                 theName Object name; when specified, this parameter is used
12534                         for result publication in the study. Otherwise, if automatic
12535                         publication is switched on, default value is used for result name.
12536
12537             Returns:
12538                 New GEOM.GEOM_Object, containing the result shape.
12539             """
12540             # Example: see GEOM_Spanner.py
12541             DirFace1U,DirFace2U,NbTimesU,DirFace1V,DirFace2V,NbTimesV,Parameters = ParseParameters(
12542               DirFace1U,DirFace2U,NbTimesU,DirFace1V,DirFace2V,NbTimesV)
12543             anObj = self.BlocksOp.MakeMultiTransformation2D(Block, DirFace1U, DirFace2U, NbTimesU,
12544                                                             DirFace1V, DirFace2V, NbTimesV)
12545             RaiseIfFailed("MakeMultiTransformation2D", self.BlocksOp)
12546             anObj.SetParameters(Parameters)
12547             self._autoPublish(anObj, theName, "transformed")
12548             return anObj
12549
12550         ## Build all possible propagation groups.
12551         #  Propagation group is a set of all edges, opposite to one (main)
12552         #  edge of this group directly or through other opposite edges.
12553         #  Notion of Opposite Edge make sence only on quadrangle face.
12554         #  @param theShape Shape to build propagation groups on.
12555         #  @param theName Object name; when specified, this parameter is used
12556         #         for result publication in the study. Otherwise, if automatic
12557         #         publication is switched on, default value is used for result name.
12558         #
12559         #  @return List of GEOM.GEOM_Object, each of them is a propagation group.
12560         #
12561         #  @ref swig_Propagate "Example"
12562         @ManageTransactions("BlocksOp")
12563         def Propagate(self, theShape, theName=None):
12564             """
12565             Build all possible propagation groups.
12566             Propagation group is a set of all edges, opposite to one (main)
12567             edge of this group directly or through other opposite edges.
12568             Notion of Opposite Edge make sence only on quadrangle face.
12569
12570             Parameters:
12571                 theShape Shape to build propagation groups on.
12572                 theName Object name; when specified, this parameter is used
12573                         for result publication in the study. Otherwise, if automatic
12574                         publication is switched on, default value is used for result name.
12575
12576             Returns:
12577                 List of GEOM.GEOM_Object, each of them is a propagation group.
12578             """
12579             # Example: see GEOM_TestOthers.py
12580             listChains = self.BlocksOp.Propagate(theShape)
12581             RaiseIfFailed("Propagate", self.BlocksOp)
12582             self._autoPublish(listChains, theName, "propagate")
12583             return listChains
12584
12585         # end of l3_blocks_op
12586         ## @}
12587
12588         ## @addtogroup l3_groups
12589         ## @{
12590
12591         ## Creates a new group which will store sub-shapes of theMainShape
12592         #  @param theMainShape is a GEOM object on which the group is selected
12593         #  @param theShapeType defines a shape type of the group (see GEOM::shape_type)
12594         #  @param theName Object name; when specified, this parameter is used
12595         #         for result publication in the study. Otherwise, if automatic
12596         #         publication is switched on, default value is used for result name.
12597         #
12598         #  @return a newly created GEOM group (GEOM.GEOM_Object)
12599         #
12600         #  @ref tui_working_with_groups_page "Example 1"
12601         #  \n @ref swig_CreateGroup "Example 2"
12602         @ManageTransactions("GroupOp")
12603         def CreateGroup(self, theMainShape, theShapeType, theName=None):
12604             """
12605             Creates a new group which will store sub-shapes of theMainShape
12606
12607             Parameters:
12608                theMainShape is a GEOM object on which the group is selected
12609                theShapeType defines a shape type of the group:"COMPOUND", "COMPSOLID",
12610                             "SOLID", "SHELL", "FACE", "WIRE", "EDGE", "VERTEX", "SHAPE".
12611                 theName Object name; when specified, this parameter is used
12612                         for result publication in the study. Otherwise, if automatic
12613                         publication is switched on, default value is used for result name.
12614
12615             Returns:
12616                a newly created GEOM group
12617
12618             Example of usage:
12619                 group = geompy.CreateGroup(Box, geompy.ShapeType["FACE"])
12620
12621             """
12622             # Example: see GEOM_TestOthers.py
12623             anObj = self.GroupOp.CreateGroup(theMainShape, theShapeType)
12624             RaiseIfFailed("CreateGroup", self.GroupOp)
12625             self._autoPublish(anObj, theName, "group")
12626             return anObj
12627
12628         ## Adds a sub-object with ID theSubShapeId to the group
12629         #  @param theGroup is a GEOM group to which the new sub-shape is added
12630         #  @param theSubShapeID is a sub-shape ID in the main object.
12631         #  \note Use method GetSubShapeID() to get an unique ID of the sub-shape
12632         #
12633         #  @ref tui_working_with_groups_page "Example"
12634         @ManageTransactions("GroupOp")
12635         def AddObject(self,theGroup, theSubShapeID):
12636             """
12637             Adds a sub-object with ID theSubShapeId to the group
12638
12639             Parameters:
12640                 theGroup       is a GEOM group to which the new sub-shape is added
12641                 theSubShapeID  is a sub-shape ID in the main object.
12642
12643             Note:
12644                 Use method GetSubShapeID() to get an unique ID of the sub-shape
12645             """
12646             # Example: see GEOM_TestOthers.py
12647             self.GroupOp.AddObject(theGroup, theSubShapeID)
12648             if self.GroupOp.GetErrorCode() != "PAL_ELEMENT_ALREADY_PRESENT":
12649                 RaiseIfFailed("AddObject", self.GroupOp)
12650                 pass
12651             pass
12652
12653         ## Removes a sub-object with ID \a theSubShapeId from the group
12654         #  @param theGroup is a GEOM group from which the new sub-shape is removed
12655         #  @param theSubShapeID is a sub-shape ID in the main object.
12656         #  \note Use method GetSubShapeID() to get an unique ID of the sub-shape
12657         #
12658         #  @ref tui_working_with_groups_page "Example"
12659         @ManageTransactions("GroupOp")
12660         def RemoveObject(self,theGroup, theSubShapeID):
12661             """
12662             Removes a sub-object with ID theSubShapeId from the group
12663
12664             Parameters:
12665                 theGroup is a GEOM group from which the new sub-shape is removed
12666                 theSubShapeID is a sub-shape ID in the main object.
12667
12668             Note:
12669                 Use method GetSubShapeID() to get an unique ID of the sub-shape
12670             """
12671             # Example: see GEOM_TestOthers.py
12672             self.GroupOp.RemoveObject(theGroup, theSubShapeID)
12673             RaiseIfFailed("RemoveObject", self.GroupOp)
12674             pass
12675
12676         ## Adds to the group all the given shapes. No errors, if some shapes are alredy included.
12677         #  @param theGroup is a GEOM group to which the new sub-shapes are added.
12678         #  @param theSubShapes is a list of sub-shapes to be added.
12679         #
12680         #  @ref tui_working_with_groups_page "Example"
12681         @ManageTransactions("GroupOp")
12682         def UnionList (self,theGroup, theSubShapes):
12683             """
12684             Adds to the group all the given shapes. No errors, if some shapes are alredy included.
12685
12686             Parameters:
12687                 theGroup is a GEOM group to which the new sub-shapes are added.
12688                 theSubShapes is a list of sub-shapes to be added.
12689             """
12690             # Example: see GEOM_TestOthers.py
12691             self.GroupOp.UnionList(theGroup, theSubShapes)
12692             RaiseIfFailed("UnionList", self.GroupOp)
12693             pass
12694
12695         ## Adds to the group all the given shapes. No errors, if some shapes are alredy included.
12696         #  @param theGroup is a GEOM group to which the new sub-shapes are added.
12697         #  @param theSubShapes is a list of indices of sub-shapes to be added.
12698         #
12699         #  @ref swig_UnionIDs "Example"
12700         @ManageTransactions("GroupOp")
12701         def UnionIDs(self,theGroup, theSubShapes):
12702             """
12703             Adds to the group all the given shapes. No errors, if some shapes are alredy included.
12704
12705             Parameters:
12706                 theGroup is a GEOM group to which the new sub-shapes are added.
12707                 theSubShapes is a list of indices of sub-shapes to be added.
12708             """
12709             # Example: see GEOM_TestOthers.py
12710             self.GroupOp.UnionIDs(theGroup, theSubShapes)
12711             RaiseIfFailed("UnionIDs", self.GroupOp)
12712             pass
12713
12714         ## Removes from the group all the given shapes. No errors, if some shapes are not included.
12715         #  @param theGroup is a GEOM group from which the sub-shapes are removed.
12716         #  @param theSubShapes is a list of sub-shapes to be removed.
12717         #
12718         #  @ref tui_working_with_groups_page "Example"
12719         @ManageTransactions("GroupOp")
12720         def DifferenceList (self,theGroup, theSubShapes):
12721             """
12722             Removes from the group all the given shapes. No errors, if some shapes are not included.
12723
12724             Parameters:
12725                 theGroup is a GEOM group from which the sub-shapes are removed.
12726                 theSubShapes is a list of sub-shapes to be removed.
12727             """
12728             # Example: see GEOM_TestOthers.py
12729             self.GroupOp.DifferenceList(theGroup, theSubShapes)
12730             RaiseIfFailed("DifferenceList", self.GroupOp)
12731             pass
12732
12733         ## Removes from the group all the given shapes. No errors, if some shapes are not included.
12734         #  @param theGroup is a GEOM group from which the sub-shapes are removed.
12735         #  @param theSubShapes is a list of indices of sub-shapes to be removed.
12736         #
12737         #  @ref swig_DifferenceIDs "Example"
12738         @ManageTransactions("GroupOp")
12739         def DifferenceIDs(self,theGroup, theSubShapes):
12740             """
12741             Removes from the group all the given shapes. No errors, if some shapes are not included.
12742
12743             Parameters:
12744                 theGroup is a GEOM group from which the sub-shapes are removed.
12745                 theSubShapes is a list of indices of sub-shapes to be removed.
12746             """
12747             # Example: see GEOM_TestOthers.py
12748             self.GroupOp.DifferenceIDs(theGroup, theSubShapes)
12749             RaiseIfFailed("DifferenceIDs", self.GroupOp)
12750             pass
12751
12752         ## Union of two groups.
12753         #  New group is created. It will contain all entities
12754         #  which are present in groups theGroup1 and theGroup2.
12755         #  @param theGroup1, theGroup2 are the initial GEOM groups
12756         #                              to create the united group from.
12757         #  @param theName Object name; when specified, this parameter is used
12758         #         for result publication in the study. Otherwise, if automatic
12759         #         publication is switched on, default value is used for result name.
12760         #
12761         #  @return a newly created GEOM group.
12762         #
12763         #  @ref tui_union_groups_anchor "Example"
12764         @ManageTransactions("GroupOp")
12765         def UnionGroups (self, theGroup1, theGroup2, theName=None):
12766             """
12767             Union of two groups.
12768             New group is created. It will contain all entities
12769             which are present in groups theGroup1 and theGroup2.
12770
12771             Parameters:
12772                 theGroup1, theGroup2 are the initial GEOM groups
12773                                      to create the united group from.
12774                 theName Object name; when specified, this parameter is used
12775                         for result publication in the study. Otherwise, if automatic
12776                         publication is switched on, default value is used for result name.
12777
12778             Returns:
12779                 a newly created GEOM group.
12780             """
12781             # Example: see GEOM_TestOthers.py
12782             aGroup = self.GroupOp.UnionGroups(theGroup1, theGroup2)
12783             RaiseIfFailed("UnionGroups", self.GroupOp)
12784             self._autoPublish(aGroup, theName, "group")
12785             return aGroup
12786
12787         ## Intersection of two groups.
12788         #  New group is created. It will contain only those entities
12789         #  which are present in both groups theGroup1 and theGroup2.
12790         #  @param theGroup1, theGroup2 are the initial GEOM groups to get common part of.
12791         #  @param 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         #  @return a newly created GEOM group.
12796         #
12797         #  @ref tui_intersect_groups_anchor "Example"
12798         @ManageTransactions("GroupOp")
12799         def IntersectGroups (self, theGroup1, theGroup2, theName=None):
12800             """
12801             Intersection of two groups.
12802             New group is created. It will contain only those entities
12803             which are present in both groups theGroup1 and theGroup2.
12804
12805             Parameters:
12806                 theGroup1, theGroup2 are the initial GEOM groups to get common part of.
12807                 theName Object name; when specified, this parameter is used
12808                         for result publication in the study. Otherwise, if automatic
12809                         publication is switched on, default value is used for result name.
12810
12811             Returns:
12812                 a newly created GEOM group.
12813             """
12814             # Example: see GEOM_TestOthers.py
12815             aGroup = self.GroupOp.IntersectGroups(theGroup1, theGroup2)
12816             RaiseIfFailed("IntersectGroups", self.GroupOp)
12817             self._autoPublish(aGroup, theName, "group")
12818             return aGroup
12819
12820         ## Cut of two groups.
12821         #  New group is created. It will contain entities which are
12822         #  present in group theGroup1 but are not present in group theGroup2.
12823         #  @param theGroup1 is a GEOM group to include elements of.
12824         #  @param theGroup2 is a GEOM group to exclude elements of.
12825         #  @param theName Object name; when specified, this parameter is used
12826         #         for result publication in the study. Otherwise, if automatic
12827         #         publication is switched on, default value is used for result name.
12828         #
12829         #  @return a newly created GEOM group.
12830         #
12831         #  @ref tui_cut_groups_anchor "Example"
12832         @ManageTransactions("GroupOp")
12833         def CutGroups (self, theGroup1, theGroup2, theName=None):
12834             """
12835             Cut of two groups.
12836             New group is created. It will contain entities which are
12837             present in group theGroup1 but are not present in group theGroup2.
12838
12839             Parameters:
12840                 theGroup1 is a GEOM group to include elements of.
12841                 theGroup2 is a GEOM group to exclude elements of.
12842                 theName Object name; when specified, this parameter is used
12843                         for result publication in the study. Otherwise, if automatic
12844                         publication is switched on, default value is used for result name.
12845
12846             Returns:
12847                 a newly created GEOM group.
12848             """
12849             # Example: see GEOM_TestOthers.py
12850             aGroup = self.GroupOp.CutGroups(theGroup1, theGroup2)
12851             RaiseIfFailed("CutGroups", self.GroupOp)
12852             self._autoPublish(aGroup, theName, "group")
12853             return aGroup
12854
12855         ## Union of list of groups.
12856         #  New group is created. It will contain all entities that are
12857         #  present in groups listed in theGList.
12858         #  @param theGList is a list of GEOM groups to create the united group from.
12859         #  @param theName Object name; when specified, this parameter is used
12860         #         for result publication in the study. Otherwise, if automatic
12861         #         publication is switched on, default value is used for result name.
12862         #
12863         #  @return a newly created GEOM group.
12864         #
12865         #  @ref tui_union_groups_anchor "Example"
12866         @ManageTransactions("GroupOp")
12867         def UnionListOfGroups (self, theGList, theName=None):
12868             """
12869             Union of list of groups.
12870             New group is created. It will contain all entities that are
12871             present in groups listed in theGList.
12872
12873             Parameters:
12874                 theGList is a list of GEOM groups to create the united group from.
12875                 theName Object name; when specified, this parameter is used
12876                         for result publication in the study. Otherwise, if automatic
12877                         publication is switched on, default value is used for result name.
12878
12879             Returns:
12880                 a newly created GEOM group.
12881             """
12882             # Example: see GEOM_TestOthers.py
12883             aGroup = self.GroupOp.UnionListOfGroups(theGList)
12884             RaiseIfFailed("UnionListOfGroups", self.GroupOp)
12885             self._autoPublish(aGroup, theName, "group")
12886             return aGroup
12887
12888         ## Cut of lists of groups.
12889         #  New group is created. It will contain only entities
12890         #  which are present in groups listed in theGList.
12891         #  @param theGList is a list of GEOM groups to include elements of.
12892         #  @param theName Object name; when specified, this parameter is used
12893         #         for result publication in the study. Otherwise, if automatic
12894         #         publication is switched on, default value is used for result name.
12895         #
12896         #  @return a newly created GEOM group.
12897         #
12898         #  @ref tui_intersect_groups_anchor "Example"
12899         @ManageTransactions("GroupOp")
12900         def IntersectListOfGroups (self, theGList, theName=None):
12901             """
12902             Cut of lists of groups.
12903             New group is created. It will contain only entities
12904             which are present in groups listed in theGList.
12905
12906             Parameters:
12907                 theGList is a list of GEOM groups to include elements of.
12908                 theName Object name; when specified, this parameter is used
12909                         for result publication in the study. Otherwise, if automatic
12910                         publication is switched on, default value is used for result name.
12911
12912             Returns:
12913                 a newly created GEOM group.
12914             """
12915             # Example: see GEOM_TestOthers.py
12916             aGroup = self.GroupOp.IntersectListOfGroups(theGList)
12917             RaiseIfFailed("IntersectListOfGroups", self.GroupOp)
12918             self._autoPublish(aGroup, theName, "group")
12919             return aGroup
12920
12921         ## Cut of lists of groups.
12922         #  New group is created. It will contain only entities
12923         #  which are present in groups listed in theGList1 but
12924         #  are not present in groups from theGList2.
12925         #  @param theGList1 is a list of GEOM groups to include elements of.
12926         #  @param theGList2 is a list of GEOM groups to exclude elements of.
12927         #  @param theName Object name; when specified, this parameter is used
12928         #         for result publication in the study. Otherwise, if automatic
12929         #         publication is switched on, default value is used for result name.
12930         #
12931         #  @return a newly created GEOM group.
12932         #
12933         #  @ref tui_cut_groups_anchor "Example"
12934         @ManageTransactions("GroupOp")
12935         def CutListOfGroups (self, theGList1, theGList2, theName=None):
12936             """
12937             Cut of lists of groups.
12938             New group is created. It will contain only entities
12939             which are present in groups listed in theGList1 but
12940             are not present in groups from theGList2.
12941
12942             Parameters:
12943                 theGList1 is a list of GEOM groups to include elements of.
12944                 theGList2 is a list of GEOM groups to exclude elements of.
12945                 theName Object name; when specified, this parameter is used
12946                         for result publication in the study. Otherwise, if automatic
12947                         publication is switched on, default value is used for result name.
12948
12949             Returns:
12950                 a newly created GEOM group.
12951             """
12952             # Example: see GEOM_TestOthers.py
12953             aGroup = self.GroupOp.CutListOfGroups(theGList1, theGList2)
12954             RaiseIfFailed("CutListOfGroups", self.GroupOp)
12955             self._autoPublish(aGroup, theName, "group")
12956             return aGroup
12957
12958         ## Returns a list of sub-objects ID stored in the group
12959         #  @param theGroup is a GEOM group for which a list of IDs is requested
12960         #
12961         #  @ref swig_GetObjectIDs "Example"
12962         @ManageTransactions("GroupOp")
12963         def GetObjectIDs(self,theGroup):
12964             """
12965             Returns a list of sub-objects ID stored in the group
12966
12967             Parameters:
12968                 theGroup is a GEOM group for which a list of IDs is requested
12969             """
12970             # Example: see GEOM_TestOthers.py
12971             ListIDs = self.GroupOp.GetObjects(theGroup)
12972             RaiseIfFailed("GetObjects", self.GroupOp)
12973             return ListIDs
12974
12975         ## Returns a type of sub-objects stored in the group
12976         #  @param theGroup is a GEOM group which type is returned.
12977         #
12978         #  @ref swig_GetType "Example"
12979         @ManageTransactions("GroupOp")
12980         def GetType(self,theGroup):
12981             """
12982             Returns a type of sub-objects stored in the group
12983
12984             Parameters:
12985                 theGroup is a GEOM group which type is returned.
12986             """
12987             # Example: see GEOM_TestOthers.py
12988             aType = self.GroupOp.GetType(theGroup)
12989             RaiseIfFailed("GetType", self.GroupOp)
12990             return aType
12991
12992         ## Convert a type of geom object from id to string value
12993         #  @param theId is a GEOM obect type id.
12994         #  @return type of geom object (POINT, VECTOR, PLANE, LINE, TORUS, ... )
12995         #  @ref swig_GetType "Example"
12996         def ShapeIdToType(self, theId):
12997             """
12998             Convert a type of geom object from id to string value
12999
13000             Parameters:
13001                 theId is a GEOM obect type id.
13002
13003             Returns:
13004                 type of geom object (POINT, VECTOR, PLANE, LINE, TORUS, ... )
13005             """
13006             if theId == 0:
13007                 return "COPY"
13008             if theId == 1:
13009                 return "IMPORT"
13010             if theId == 2:
13011                 return "POINT"
13012             if theId == 3:
13013                 return "VECTOR"
13014             if theId == 4:
13015                 return "PLANE"
13016             if theId == 5:
13017                 return "LINE"
13018             if theId == 6:
13019                 return "TORUS"
13020             if theId == 7:
13021                 return "BOX"
13022             if theId == 8:
13023                 return "CYLINDER"
13024             if theId == 9:
13025                 return "CONE"
13026             if theId == 10:
13027                 return "SPHERE"
13028             if theId == 11:
13029                 return "PRISM"
13030             if theId == 12:
13031                 return "REVOLUTION"
13032             if theId == 13:
13033                 return "BOOLEAN"
13034             if theId == 14:
13035                 return "PARTITION"
13036             if theId == 15:
13037                 return "POLYLINE"
13038             if theId == 16:
13039                 return "CIRCLE"
13040             if theId == 17:
13041                 return "SPLINE"
13042             if theId == 18:
13043                 return "ELLIPSE"
13044             if theId == 19:
13045                 return "CIRC_ARC"
13046             if theId == 20:
13047                 return "FILLET"
13048             if theId == 21:
13049                 return "CHAMFER"
13050             if theId == 22:
13051                 return "EDGE"
13052             if theId == 23:
13053                 return "WIRE"
13054             if theId == 24:
13055                 return "FACE"
13056             if theId == 25:
13057                 return "SHELL"
13058             if theId == 26:
13059                 return "SOLID"
13060             if theId == 27:
13061                 return "COMPOUND"
13062             if theId == 28:
13063                 return "SUBSHAPE"
13064             if theId == 29:
13065                 return "PIPE"
13066             if theId == 30:
13067                 return "ARCHIMEDE"
13068             if theId == 31:
13069                 return "FILLING"
13070             if theId == 32:
13071                 return "EXPLODE"
13072             if theId == 33:
13073                 return "GLUED"
13074             if theId == 34:
13075                 return "SKETCHER"
13076             if theId == 35:
13077                 return "CDG"
13078             if theId == 36:
13079                 return "FREE_BOUNDS"
13080             if theId == 37:
13081                 return "GROUP"
13082             if theId == 38:
13083                 return "BLOCK"
13084             if theId == 39:
13085                 return "MARKER"
13086             if theId == 40:
13087                 return "THRUSECTIONS"
13088             if theId == 41:
13089                 return "COMPOUNDFILTER"
13090             if theId == 42:
13091                 return "SHAPES_ON_SHAPE"
13092             if theId == 43:
13093                 return "ELLIPSE_ARC"
13094             if theId == 44:
13095                 return "3DSKETCHER"
13096             if theId == 45:
13097                 return "FILLET_2D"
13098             if theId == 46:
13099                 return "FILLET_1D"
13100             if theId == 201:
13101                 return "PIPETSHAPE"
13102             return "Shape Id not exist."
13103
13104         ## Returns a main shape associated with the group
13105         #  @param theGroup is a GEOM group for which a main shape object is requested
13106         #  @return a GEOM object which is a main shape for theGroup
13107         #
13108         #  @ref swig_GetMainShape "Example"
13109         @ManageTransactions("GroupOp")
13110         def GetMainShape(self,theGroup):
13111             """
13112             Returns a main shape associated with the group
13113
13114             Parameters:
13115                 theGroup is a GEOM group for which a main shape object is requested
13116
13117             Returns:
13118                 a GEOM object which is a main shape for theGroup
13119
13120             Example of usage: BoxCopy = geompy.GetMainShape(CreateGroup)
13121             """
13122             # Example: see GEOM_TestOthers.py
13123             anObj = self.GroupOp.GetMainShape(theGroup)
13124             RaiseIfFailed("GetMainShape", self.GroupOp)
13125             return anObj
13126
13127         ## Create group of edges of theShape, whose length is in range [min_length, max_length].
13128         #  If include_min/max == 0, edges with length == min/max_length will not be included in result.
13129         #  @param theShape given shape (see GEOM.GEOM_Object)
13130         #  @param min_length minimum length of edges of theShape
13131         #  @param max_length maximum length of edges of theShape
13132         #  @param include_max indicating if edges with length == max_length should be included in result, 1-yes, 0-no (default=1)
13133         #  @param include_min indicating if edges with length == min_length should be included in result, 1-yes, 0-no (default=1)
13134         #  @param theName Object name; when specified, this parameter is used
13135         #         for result publication in the study. Otherwise, if automatic
13136         #         publication is switched on, default value is used for result name.
13137         #
13138         #  @return a newly created GEOM group of edges
13139         #
13140         #  @@ref swig_todo "Example"
13141         def GetEdgesByLength (self, theShape, min_length, max_length, include_min = 1, include_max = 1, theName=None):
13142             """
13143             Create group of edges of theShape, whose length is in range [min_length, max_length].
13144             If include_min/max == 0, edges with length == min/max_length will not be included in result.
13145
13146             Parameters:
13147                 theShape given shape
13148                 min_length minimum length of edges of theShape
13149                 max_length maximum length of edges of theShape
13150                 include_max indicating if edges with length == max_length should be included in result, 1-yes, 0-no (default=1)
13151                 include_min indicating if edges with length == min_length should be included in result, 1-yes, 0-no (default=1)
13152                 theName Object name; when specified, this parameter is used
13153                         for result publication in the study. Otherwise, if automatic
13154                         publication is switched on, default value is used for result name.
13155
13156              Returns:
13157                 a newly created GEOM group of edges.
13158             """
13159             edges = self.SubShapeAll(theShape, self.ShapeType["EDGE"])
13160             edges_in_range = []
13161             for edge in edges:
13162                 Props = self.BasicProperties(edge)
13163                 if min_length <= Props[0] and Props[0] <= max_length:
13164                     if (not include_min) and (min_length == Props[0]):
13165                         skip = 1
13166                     else:
13167                         if (not include_max) and (Props[0] == max_length):
13168                             skip = 1
13169                         else:
13170                             edges_in_range.append(edge)
13171
13172             if len(edges_in_range) <= 0:
13173                 print "No edges found by given criteria"
13174                 return None
13175
13176             # note: auto-publishing is done in self.CreateGroup()
13177             group_edges = self.CreateGroup(theShape, self.ShapeType["EDGE"], theName)
13178             self.UnionList(group_edges, edges_in_range)
13179
13180             return group_edges
13181
13182         ## Create group of edges of selected shape, whose length is in range [min_length, max_length].
13183         #  If include_min/max == 0, edges with length == min/max_length will not be included in result.
13184         #  @param min_length minimum length of edges of selected shape
13185         #  @param max_length maximum length of edges of selected shape
13186         #  @param include_max indicating if edges with length == max_length should be included in result, 1-yes, 0-no (default=1)
13187         #  @param include_min indicating if edges with length == min_length should be included in result, 1-yes, 0-no (default=1)
13188         #  @return a newly created GEOM group of edges
13189         #  @ref swig_todo "Example"
13190         def SelectEdges (self, min_length, max_length, include_min = 1, include_max = 1):
13191             """
13192             Create group of edges of selected shape, whose length is in range [min_length, max_length].
13193             If include_min/max == 0, edges with length == min/max_length will not be included in result.
13194
13195             Parameters:
13196                 min_length minimum length of edges of selected shape
13197                 max_length maximum length of edges of selected shape
13198                 include_max indicating if edges with length == max_length should be included in result, 1-yes, 0-no (default=1)
13199                 include_min indicating if edges with length == min_length should be included in result, 1-yes, 0-no (default=1)
13200
13201              Returns:
13202                 a newly created GEOM group of edges.
13203             """
13204             nb_selected = sg.SelectedCount()
13205             if nb_selected < 1:
13206                 print "Select a shape before calling this function, please."
13207                 return 0
13208             if nb_selected > 1:
13209                 print "Only one shape must be selected"
13210                 return 0
13211
13212             id_shape = sg.getSelected(0)
13213             shape = IDToObject( id_shape )
13214
13215             group_edges = self.GetEdgesByLength(shape, min_length, max_length, include_min, include_max)
13216
13217             left_str  = " < "
13218             right_str = " < "
13219             if include_min: left_str  = " <= "
13220             if include_max: right_str  = " <= "
13221
13222             self.addToStudyInFather(shape, group_edges, "Group of edges with " + `min_length`
13223                                     + left_str + "length" + right_str + `max_length`)
13224
13225             sg.updateObjBrowser(1)
13226
13227             return group_edges
13228
13229         # end of l3_groups
13230         ## @}
13231
13232         #@@ insert new functions before this line @@ do not remove this line @@#
13233
13234         ## Create a copy of the given object
13235         #
13236         #  @param theOriginal geometry object for copy
13237         #  @param theName Object name; when specified, this parameter is used
13238         #         for result publication in the study. Otherwise, if automatic
13239         #         publication is switched on, default value is used for result name.
13240         #
13241         #  @return New GEOM_Object, containing the copied shape.
13242         #
13243         #  @ingroup l1_geomBuilder_auxiliary
13244         #  @ref swig_MakeCopy "Example"
13245         @ManageTransactions("InsertOp")
13246         def MakeCopy(self, theOriginal, theName=None):
13247             """
13248             Create a copy of the given object
13249
13250             Parameters:
13251                 theOriginal geometry object for copy
13252                 theName Object name; when specified, this parameter is used
13253                         for result publication in the study. Otherwise, if automatic
13254                         publication is switched on, default value is used for result name.
13255
13256             Returns:
13257                 New GEOM_Object, containing the copied shape.
13258
13259             Example of usage: Copy = geompy.MakeCopy(Box)
13260             """
13261             # Example: see GEOM_TestAll.py
13262             anObj = self.InsertOp.MakeCopy(theOriginal)
13263             RaiseIfFailed("MakeCopy", self.InsertOp)
13264             self._autoPublish(anObj, theName, "copy")
13265             return anObj
13266
13267         ## Add Path to load python scripts from
13268         #  @param Path a path to load python scripts from
13269         #  @ingroup l1_geomBuilder_auxiliary
13270         def addPath(self,Path):
13271             """
13272             Add Path to load python scripts from
13273
13274             Parameters:
13275                 Path a path to load python scripts from
13276             """
13277             if (sys.path.count(Path) < 1):
13278                 sys.path.append(Path)
13279                 pass
13280             pass
13281
13282         ## Load marker texture from the file
13283         #  @param Path a path to the texture file
13284         #  @return unique texture identifier
13285         #  @ingroup l1_geomBuilder_auxiliary
13286         @ManageTransactions("InsertOp")
13287         def LoadTexture(self, Path):
13288             """
13289             Load marker texture from the file
13290
13291             Parameters:
13292                 Path a path to the texture file
13293
13294             Returns:
13295                 unique texture identifier
13296             """
13297             # Example: see GEOM_TestAll.py
13298             ID = self.InsertOp.LoadTexture(Path)
13299             RaiseIfFailed("LoadTexture", self.InsertOp)
13300             return ID
13301
13302         ## Get internal name of the object based on its study entry
13303         #  @note This method does not provide an unique identifier of the geometry object.
13304         #  @note This is internal function of GEOM component, though it can be used outside it for
13305         #  appropriate reason (e.g. for identification of geometry object).
13306         #  @param obj geometry object
13307         #  @return unique object identifier
13308         #  @ingroup l1_geomBuilder_auxiliary
13309         def getObjectID(self, obj):
13310             """
13311             Get internal name of the object based on its study entry.
13312             Note: this method does not provide an unique identifier of the geometry object.
13313             It is an internal function of GEOM component, though it can be used outside GEOM for
13314             appropriate reason (e.g. for identification of geometry object).
13315
13316             Parameters:
13317                 obj geometry object
13318
13319             Returns:
13320                 unique object identifier
13321             """
13322             ID = ""
13323             entry = salome.ObjectToID(obj)
13324             if entry is not None:
13325                 lst = entry.split(":")
13326                 if len(lst) > 0:
13327                     ID = lst[-1] # -1 means last item in the list
13328                     return "GEOM_" + ID
13329             return ID
13330
13331
13332
13333         ## Add marker texture. @a Width and @a Height parameters
13334         #  specify width and height of the texture in pixels.
13335         #  If @a RowData is @c True, @a Texture parameter should represent texture data
13336         #  packed into the byte array. If @a RowData is @c False (default), @a Texture
13337         #  parameter should be unpacked string, in which '1' symbols represent opaque
13338         #  pixels and '0' represent transparent pixels of the texture bitmap.
13339         #
13340         #  @param Width texture width in pixels
13341         #  @param Height texture height in pixels
13342         #  @param Texture texture data
13343         #  @param RowData if @c True, @a Texture data are packed in the byte stream
13344         #  @return unique texture identifier
13345         #  @ingroup l1_geomBuilder_auxiliary
13346         @ManageTransactions("InsertOp")
13347         def AddTexture(self, Width, Height, Texture, RowData=False):
13348             """
13349             Add marker texture. Width and Height parameters
13350             specify width and height of the texture in pixels.
13351             If RowData is True, Texture parameter should represent texture data
13352             packed into the byte array. If RowData is False (default), Texture
13353             parameter should be unpacked string, in which '1' symbols represent opaque
13354             pixels and '0' represent transparent pixels of the texture bitmap.
13355
13356             Parameters:
13357                 Width texture width in pixels
13358                 Height texture height in pixels
13359                 Texture texture data
13360                 RowData if True, Texture data are packed in the byte stream
13361
13362             Returns:
13363                 return unique texture identifier
13364             """
13365             if not RowData: Texture = PackData(Texture)
13366             ID = self.InsertOp.AddTexture(Width, Height, Texture)
13367             RaiseIfFailed("AddTexture", self.InsertOp)
13368             return ID
13369
13370         ## Transfer not topological data from one GEOM object to another.
13371         #
13372         #  @param theObjectFrom the source object of non-topological data
13373         #  @param theObjectTo the destination object of non-topological data
13374         #  @param theFindMethod method to search sub-shapes of theObjectFrom
13375         #         in shape theObjectTo. Possible values are: GEOM.FSM_GetInPlace,
13376         #         GEOM.FSM_GetInPlaceByHistory and GEOM.FSM_GetInPlace_Old.
13377         #         Other values of GEOM.find_shape_method are not supported.
13378         #
13379         #  @return True in case of success; False otherwise.
13380         #
13381         #  @ingroup l1_geomBuilder_auxiliary
13382         #
13383         #  @ref swig_TransferData "Example"
13384         @ManageTransactions("InsertOp")
13385         def TransferData(self, theObjectFrom, theObjectTo,
13386                          theFindMethod=GEOM.FSM_GetInPlace):
13387             """
13388             Transfer not topological data from one GEOM object to another.
13389
13390             Parameters:
13391                 theObjectFrom the source object of non-topological data
13392                 theObjectTo the destination object of non-topological data
13393                 theFindMethod method to search sub-shapes of theObjectFrom
13394                               in shape theObjectTo. Possible values are:
13395                               GEOM.FSM_GetInPlace, GEOM.FSM_GetInPlaceByHistory
13396                               and GEOM.FSM_GetInPlace_Old. Other values of
13397                               GEOM.find_shape_method are not supported.
13398
13399             Returns:
13400                 True in case of success; False otherwise.
13401
13402             # Example: see GEOM_TestOthers.py
13403             """
13404             # Example: see GEOM_TestAll.py
13405             isOk = self.InsertOp.TransferData(theObjectFrom,
13406                                                theObjectTo, theFindMethod)
13407             RaiseIfFailed("TransferData", self.InsertOp)
13408             return isOk
13409
13410         ## Creates a new folder object. It is a container for any GEOM objects.
13411         #  @param Name name of the container
13412         #  @param Father parent object. If None,
13413         #         folder under 'Geometry' root object will be created.
13414         #  @return a new created folder
13415         #  @ingroup l1_publish_data
13416         def NewFolder(self, Name, Father=None):
13417             """
13418             Create a new folder object. It is an auxiliary container for any GEOM objects.
13419
13420             Parameters:
13421                 Name name of the container
13422                 Father parent object. If None,
13423                 folder under 'Geometry' root object will be created.
13424
13425             Returns:
13426                 a new created folder
13427             """
13428             if not Father: Father = self.father
13429             return self.CreateFolder(Name, Father)
13430
13431         ## Move object to the specified folder
13432         #  @param Object object to move
13433         #  @param Folder target folder
13434         #  @ingroup l1_publish_data
13435         def PutToFolder(self, Object, Folder):
13436             """
13437             Move object to the specified folder
13438
13439             Parameters:
13440                 Object object to move
13441                 Folder target folder
13442             """
13443             self.MoveToFolder(Object, Folder)
13444             pass
13445
13446         ## Move list of objects to the specified folder
13447         #  @param ListOfSO list of objects to move
13448         #  @param Folder target folder
13449         #  @ingroup l1_publish_data
13450         def PutListToFolder(self, ListOfSO, Folder):
13451             """
13452             Move list of objects to the specified folder
13453
13454             Parameters:
13455                 ListOfSO list of objects to move
13456                 Folder target folder
13457             """
13458             self.MoveListToFolder(ListOfSO, Folder)
13459             pass
13460
13461         ## @addtogroup l2_field
13462         ## @{
13463
13464         ## Creates a field
13465         #  @param shape the shape the field lies on
13466         #  @param name the field name
13467         #  @param type type of field data: 0 - bool, 1 - int, 2 - double, 3 - string
13468         #  @param dimension dimension of the shape the field lies on
13469         #         0 - VERTEX, 1 - EDGE, 2 - FACE, 3 - SOLID, -1 - whole shape
13470         #  @param componentNames names of components
13471         #  @return a created field
13472         @ManageTransactions("FieldOp")
13473         def CreateField(self, shape, name, type, dimension, componentNames):
13474             """
13475             Creates a field
13476
13477             Parameters:
13478                 shape the shape the field lies on
13479                 name  the field name
13480                 type  type of field data
13481                 dimension dimension of the shape the field lies on
13482                           0 - VERTEX, 1 - EDGE, 2 - FACE, 3 - SOLID, -1 - whole shape
13483                 componentNames names of components
13484
13485             Returns:
13486                 a created field
13487             """
13488             if isinstance( type, int ):
13489                 if type < 0 or type > 3:
13490                     raise RuntimeError, "CreateField : Error: data type must be within [0-3] range"
13491                 type = [GEOM.FDT_Bool,GEOM.FDT_Int,GEOM.FDT_Double,GEOM.FDT_String][type]
13492
13493             f = self.FieldOp.CreateField( shape, name, type, dimension, componentNames)
13494             RaiseIfFailed("CreateField", self.FieldOp)
13495             global geom
13496             geom._autoPublish( f, "", name)
13497             return f
13498
13499         ## Removes a field from the GEOM component
13500         #  @param field the field to remove
13501         def RemoveField(self, field):
13502             "Removes a field from the GEOM component"
13503             global geom
13504             if isinstance( field, GEOM._objref_GEOM_Field ):
13505                 geom.RemoveObject( field )
13506             elif isinstance( field, geomField ):
13507                 geom.RemoveObject( field.field )
13508             else:
13509                 raise RuntimeError, "RemoveField() : the object is not a field"
13510             return
13511
13512         ## Returns number of fields on a shape
13513         @ManageTransactions("FieldOp")
13514         def CountFields(self, shape):
13515             "Returns number of fields on a shape"
13516             nb = self.FieldOp.CountFields( shape )
13517             RaiseIfFailed("CountFields", self.FieldOp)
13518             return nb
13519
13520         ## Returns all fields on a shape
13521         @ManageTransactions("FieldOp")
13522         def GetFields(self, shape):
13523             "Returns all fields on a shape"
13524             ff = self.FieldOp.GetFields( shape )
13525             RaiseIfFailed("GetFields", self.FieldOp)
13526             return ff
13527
13528         ## Returns a field on a shape by its name
13529         @ManageTransactions("FieldOp")
13530         def GetField(self, shape, name):
13531             "Returns a field on a shape by its name"
13532             f = self.FieldOp.GetField( shape, name )
13533             RaiseIfFailed("GetField", self.FieldOp)
13534             return f
13535
13536         # end of l2_field
13537         ## @}
13538
13539
13540 import omniORB
13541 # Register the new proxy for GEOM_Gen
13542 omniORB.registerObjref(GEOM._objref_GEOM_Gen._NP_RepositoryId, geomBuilder)
13543
13544
13545 ## Field on Geometry
13546 #  @ingroup l2_field
13547 class geomField( GEOM._objref_GEOM_Field ):
13548
13549     def __init__(self):
13550         GEOM._objref_GEOM_Field.__init__(self)
13551         self.field = GEOM._objref_GEOM_Field
13552         return
13553
13554     ## Returns the shape the field lies on
13555     def getShape(self):
13556         "Returns the shape the field lies on"
13557         return self.field.GetShape(self)
13558
13559     ## Returns the field name
13560     def getName(self):
13561         "Returns the field name"
13562         return self.field.GetName(self)
13563
13564     ## Returns type of field data as integer [0-3]
13565     def getType(self):
13566         "Returns type of field data"
13567         return self.field.GetDataType(self)._v
13568
13569     ## Returns type of field data:
13570     #  one of GEOM.FDT_Bool, GEOM.FDT_Int, GEOM.FDT_Double, GEOM.FDT_String
13571     def getTypeEnum(self):
13572         "Returns type of field data"
13573         return self.field.GetDataType(self)
13574
13575     ## Returns dimension of the shape the field lies on:
13576     #  0 - VERTEX, 1 - EDGE, 2 - FACE, 3 - SOLID, -1 - whole shape
13577     def getDimension(self):
13578         """Returns dimension of the shape the field lies on:
13579         0 - VERTEX, 1 - EDGE, 2 - FACE, 3 - SOLID, -1 - whole shape"""
13580         return self.field.GetDimension(self)
13581
13582     ## Returns names of components
13583     def getComponents(self):
13584         "Returns names of components"
13585         return self.field.GetComponents(self)
13586
13587     ## Adds a time step to the field
13588     #  @param step the time step number further used as the step identifier
13589     #  @param stamp the time step time
13590     #  @param values the values of the time step
13591     def addStep(self, step, stamp, values):
13592         "Adds a time step to the field"
13593         stp = self.field.AddStep( self, step, stamp )
13594         if not stp:
13595             raise RuntimeError, \
13596                   "Field.addStep() : Error: step %s already exists in this field"%step
13597         global geom
13598         geom._autoPublish( stp, "", "Step %s, %s"%(step,stamp))
13599         self.setValues( step, values )
13600         return stp
13601
13602     ## Remove a time step from the field
13603     def removeStep(self,step):
13604         "Remove a time step from the field"
13605         stepSO = None
13606         try:
13607             stepObj = self.field.GetStep( self, step )
13608             if stepObj:
13609                 stepSO = geom.myStudy.FindObjectID( stepObj.GetStudyEntry() )
13610         except:
13611             #import traceback
13612             #traceback.print_exc()
13613             pass
13614         self.field.RemoveStep( self, step )
13615         if stepSO:
13616             geom.myBuilder.RemoveObjectWithChildren( stepSO )
13617         return
13618
13619     ## Returns number of time steps in the field
13620     def countSteps(self):
13621         "Returns number of time steps in the field"
13622         return self.field.CountSteps(self)
13623
13624     ## Returns a list of time step IDs in the field
13625     def getSteps(self):
13626         "Returns a list of time step IDs in the field"
13627         return self.field.GetSteps(self)
13628
13629     ## Returns a time step by its ID
13630     def getStep(self,step):
13631         "Returns a time step by its ID"
13632         stp = self.field.GetStep(self, step)
13633         if not stp:
13634             raise RuntimeError, "Step %s is missing from this field"%step
13635         return stp
13636
13637     ## Returns the time of the field step
13638     def getStamp(self,step):
13639         "Returns the time of the field step"
13640         return self.getStep(step).GetStamp()
13641
13642     ## Changes the time of the field step
13643     def setStamp(self, step, stamp):
13644         "Changes the time of the field step"
13645         return self.getStep(step).SetStamp(stamp)
13646
13647     ## Returns values of the field step
13648     def getValues(self, step):
13649         "Returns values of the field step"
13650         return self.getStep(step).GetValues()
13651
13652     ## Changes values of the field step
13653     def setValues(self, step, values):
13654         "Changes values of the field step"
13655         stp = self.getStep(step)
13656         errBeg = "Field.setValues(values) : Error: "
13657         try:
13658             ok = stp.SetValues( values )
13659         except Exception, e:
13660             excStr = str(e)
13661             if excStr.find("WrongPythonType") > 0:
13662                 raise RuntimeError, errBeg +\
13663                       "wrong type of values, %s values are expected"%str(self.getTypeEnum())[4:]
13664             raise RuntimeError, errBeg + str(e)
13665         if not ok:
13666             nbOK = self.field.GetArraySize(self)
13667             nbKO = len(values)
13668             if nbOK != nbKO:
13669                 raise RuntimeError, errBeg + "len(values) must be %s but not %s"%(nbOK,nbKO)
13670             else:
13671                 raise RuntimeError, errBeg + "failed"
13672         return
13673
13674     pass # end of class geomField
13675
13676 # Register the new proxy for GEOM_Field
13677 omniORB.registerObjref(GEOM._objref_GEOM_Field._NP_RepositoryId, geomField)
13678
13679
13680 ## Create a new geomBuilder instance.The geomBuilder class provides the Python
13681 #  interface to GEOM operations.
13682 #
13683 #  Typical use is:
13684 #  \code
13685 #    import salome
13686 #    salome.salome_init()
13687 #    from salome.geom import geomBuilder
13688 #    geompy = geomBuilder.New(salome.myStudy)
13689 #  \endcode
13690 #  @param  study     SALOME study, generally obtained by salome.myStudy.
13691 #  @param  instance  CORBA proxy of GEOM Engine. If None, the default Engine is used.
13692 #  @return geomBuilder instance
13693 def New( study, instance=None):
13694     """
13695     Create a new geomBuilder instance.The geomBuilder class provides the Python
13696     interface to GEOM operations.
13697
13698     Typical use is:
13699         import salome
13700         salome.salome_init()
13701         from salome.geom import geomBuilder
13702         geompy = geomBuilder.New(salome.myStudy)
13703
13704     Parameters:
13705         study     SALOME study, generally obtained by salome.myStudy.
13706         instance  CORBA proxy of GEOM Engine. If None, the default Engine is used.
13707     Returns:
13708         geomBuilder instance
13709     """
13710     #print "New geomBuilder ", study, instance
13711     global engine
13712     global geom
13713     global doLcc
13714     engine = instance
13715     if engine is None:
13716       doLcc = True
13717     geom = geomBuilder()
13718     assert isinstance(geom,geomBuilder), "Geom engine class is %s but should be geomBuilder.geomBuilder. Import geomBuilder before creating the instance."%geom.__class__
13719     geom.init_geom(study)
13720     return geom
13721
13722
13723 # Register methods from the plug-ins in the geomBuilder class 
13724 plugins_var = os.environ.get( "GEOM_PluginsList" )
13725
13726 plugins = None
13727 if plugins_var is not None:
13728     plugins = plugins_var.split( ":" )
13729     plugins=filter(lambda x: len(x)>0, plugins)
13730 if plugins is not None:
13731     for pluginName in plugins:
13732         pluginBuilderName = pluginName + "Builder"
13733         try:
13734             exec( "from salome.%s.%s import *" % (pluginName, pluginBuilderName))
13735         except Exception, e:
13736             from salome_utils import verbose
13737             print "Exception while loading %s: %s" % ( pluginBuilderName, e )
13738             continue
13739         exec( "from salome.%s import %s" % (pluginName, pluginBuilderName))
13740         plugin = eval( pluginBuilderName )
13741         
13742         # add methods from plugin module to the geomBuilder class
13743         for k in dir( plugin ):
13744             if k[0] == '_': continue
13745             method = getattr( plugin, k )
13746             if type( method ).__name__ == 'function':
13747                 if not hasattr( geomBuilder, k ):
13748                     setattr( geomBuilder, k, method )
13749                 pass
13750             pass
13751         del pluginName
13752         pass
13753     pass